Index: build/android/pylib/device/adb_wrapper.py |
diff --git a/build/android/pylib/device/adb_wrapper.py b/build/android/pylib/device/adb_wrapper.py |
index 8e8abf8b5e01bcc7d9bdbc911b3f4e7a634e2758..d56ba2529a1ec5827706737b3627b3a37bd501e0 100644 |
--- a/build/android/pylib/device/adb_wrapper.py |
+++ b/build/android/pylib/device/adb_wrapper.py |
@@ -390,7 +390,8 @@ class AdbWrapper(object): |
self._RunDeviceAdbCmd(['jdwp'], timeout, retries).split('\n')] |
def Install(self, apk_path, forward_lock=False, reinstall=False, |
- sd_card=False, timeout=60*2, retries=_DEFAULT_RETRIES): |
+ sd_card=False, timeout=60*2, retries=_DEFAULT_RETRIES, |
+ split_paths=None): |
"""Install an apk on the device. |
Args: |
@@ -400,9 +401,14 @@ class AdbWrapper(object): |
sd_card: (optional) If set installs on the SD card. |
timeout: (optional) Timeout per try in seconds. |
retries: (optional) Number of retries to attempt. |
+ split_paths: (optional) List of splits to install. Triggers use of |
+ "adb install-multiple" rather than "adb install". |
""" |
_VerifyLocalFileExists(apk_path) |
- cmd = ['install'] |
+ if split_paths: |
+ cmd = ['install-multiple'] |
jbudorick
2015/05/13 15:15:42
This should be in its own InstallMultiple function
agrieve
2015/05/13 15:47:46
Done.
|
+ else: |
+ cmd = ['install'] |
if forward_lock: |
cmd.append('-l') |
if reinstall: |
@@ -410,6 +416,8 @@ class AdbWrapper(object): |
if sd_card: |
cmd.append('-s') |
cmd.append(apk_path) |
+ if split_paths: |
+ cmd.extend(split_paths) |
output = self._RunDeviceAdbCmd(cmd, timeout, retries) |
if 'Success' not in output: |
raise device_errors.AdbCommandFailedError( |
@@ -570,4 +578,3 @@ class AdbWrapper(object): |
return self.GetState() == _READY_STATE |
except device_errors.CommandFailedError: |
return False |
- |