aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/android/incremental_install.py
diff options
context:
space:
mode:
authorGravatar Lukacs Berki <lberki@google.com>2015-09-15 07:18:47 +0000
committerGravatar John Field <jfield@google.com>2015-09-15 20:26:25 +0000
commit0dffeac00d6be0e37a75b564190a4f4a62908beb (patch)
tree2eee97d676c26407f7f757f30c7237fec67df3f3 /tools/android/incremental_install.py
parent415aae660a932ead71628072610948afd11d7dc2 (diff)
Make --split_apk mobile-install work with a pristine device.
-- MOS_MIGRATED_REVID=103068396
Diffstat (limited to 'tools/android/incremental_install.py')
-rw-r--r--tools/android/incremental_install.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/tools/android/incremental_install.py b/tools/android/incremental_install.py
index 088af54f0d..04da8cd0bf 100644
--- a/tools/android/incremental_install.py
+++ b/tools/android/incremental_install.py
@@ -178,10 +178,7 @@ class Adb(object):
if match:
return match.group(1)
else:
- raise TimestampException(
- "Package '%s' is not installed on the device. At least one "
- "non-incremental 'mobile-install' must precede incremental "
- "installs." % package)
+ return None
def GetAbi(self):
"""Returns the ABI the device supports."""
@@ -586,6 +583,12 @@ def VerifyInstallTimestamp(adb, app_package):
"'mobile-install' must precede incremental installs")
actual_timestamp = adb.GetInstallTime(app_package)
+ if actual_timestamp is None:
+ raise TimestampException(
+ "Package '%s' is not installed on the device. At least one "
+ "non-incremental 'mobile-install' must precede incremental "
+ "installs." % app_package)
+
if actual_timestamp != expected_timestamp:
raise TimestampException("Installed app '%s' has an unexpected timestamp. "
"Did you last install the app in a way other than "