| Index: build/android/devil/android/sdk/adb_wrapper.py
|
| diff --git a/build/android/devil/android/sdk/adb_wrapper.py b/build/android/devil/android/sdk/adb_wrapper.py
|
| index b254a7525bba9fc4395f8e909a68006d8b4fd712..42e55ad5bfaaf31001177f74ac14f4504f65d366 100644
|
| --- a/build/android/devil/android/sdk/adb_wrapper.py
|
| +++ b/build/android/devil/android/sdk/adb_wrapper.py
|
| @@ -464,13 +464,15 @@ class AdbWrapper(object):
|
| return [a.strip() for a in
|
| 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):
|
| + def Install(self, apk_path, forward_lock=False, allow_downgrade=False,
|
| + reinstall=False, sd_card=False, timeout=60*2,
|
| + retries=_DEFAULT_RETRIES):
|
| """Install an apk on the device.
|
|
|
| Args:
|
| apk_path: Host path to the APK file.
|
| forward_lock: (optional) If set forward-locks the app.
|
| + allow_downgrade: (optional) If set, allows for downgrades.
|
| reinstall: (optional) If set reinstalls the app, keeping its data.
|
| sd_card: (optional) If set installs on the SD card.
|
| timeout: (optional) Timeout per try in seconds.
|
| @@ -484,6 +486,8 @@ class AdbWrapper(object):
|
| cmd.append('-r')
|
| if sd_card:
|
| cmd.append('-s')
|
| + if allow_downgrade:
|
| + cmd.append('-d')
|
| cmd.append(apk_path)
|
| output = self._RunDeviceAdbCmd(cmd, timeout, retries)
|
| if 'Success' not in output:
|
| @@ -500,10 +504,10 @@ class AdbWrapper(object):
|
| forward_lock: (optional) If set forward-locks the app.
|
| reinstall: (optional) If set reinstalls the app, keeping its data.
|
| sd_card: (optional) If set installs on the SD card.
|
| - timeout: (optional) Timeout per try in seconds.
|
| - retries: (optional) Number of retries to attempt.
|
| allow_downgrade: (optional) Allow versionCode downgrade.
|
| partial: (optional) Package ID if apk_paths doesn't include all .apks.
|
| + timeout: (optional) Timeout per try in seconds.
|
| + retries: (optional) Number of retries to attempt.
|
| """
|
| for path in apk_paths:
|
| VerifyLocalFileExists(path)
|
|
|