| Index: build/android/update_verification.py
|
| diff --git a/build/android/update_verification.py b/build/android/update_verification.py
|
| index 9539d94c3fae78ff932fee6698135f453ba04fe9..fe895670f1302054a40525fb19ac940d29fcb276 100755
|
| --- a/build/android/update_verification.py
|
| +++ b/build/android/update_verification.py
|
| @@ -17,7 +17,7 @@ from pylib.device import device_utils
|
|
|
| def _SaveAppData(device, package_name, from_apk=None, data_dir=None):
|
| def _BackupAppData(data_dir=None):
|
| - device.adb.Backup(package_name)
|
| + device.old_interface.Adb().SendCommand('backup %s' % package_name)
|
| backup_file = os.path.join(os.getcwd(), 'backup.ab')
|
| assert os.path.exists(backup_file), 'Backup failed.'
|
| if data_dir:
|
| @@ -29,7 +29,8 @@ def _SaveAppData(device, package_name, from_apk=None, data_dir=None):
|
|
|
| if from_apk:
|
| logging.info('Installing %s...', from_apk)
|
| - output = device.Install(from_apk, reinstall=True)
|
| + # TODO(jbudorick) Switch to AdbWrapper.Install on the impl switch.
|
| + output = device.old_interface.Install(from_apk, reinstall=True)
|
| if 'Success' not in output:
|
| raise Exception('Unable to install %s. output: %s' % (from_apk, output))
|
|
|
| @@ -41,13 +42,14 @@ def _SaveAppData(device, package_name, from_apk=None, data_dir=None):
|
| def _VerifyAppUpdate(device, to_apk, app_data, from_apk=None):
|
| def _RestoreAppData():
|
| assert os.path.exists(app_data), 'Backup file does not exist!'
|
| - device.adb.Restore(app_data)
|
| + device.old_interface.Adb().SendCommand('restore %s' % app_data)
|
| # It seems restore command is not synchronous.
|
| time.sleep(15)
|
|
|
| if from_apk:
|
| logging.info('Installing %s...', from_apk)
|
| - output = device.Install(from_apk, reinstall=True)
|
| + # TODO(jbudorick) Switch to AdbWrapper.Install on the impl switch.
|
| + output = device.old_interface.Install(from_apk, reinstall=True)
|
| if 'Success' not in output:
|
| raise Exception('Unable to install %s. output: %s' % (from_apk, output))
|
|
|
| @@ -57,7 +59,8 @@ def _VerifyAppUpdate(device, to_apk, app_data, from_apk=None):
|
|
|
| logging.info('Verifying that %s cannot be installed side-by-side...',
|
| to_apk)
|
| - output = device.Install(to_apk)
|
| + # TODO(jbudorick) Switch to AdbWrapper.Install on the impl switch.
|
| + output = device.old_interface.Install(to_apk)
|
| if 'INSTALL_FAILED_ALREADY_EXISTS' not in output:
|
| if 'Success' in output:
|
| raise Exception('Package name has changed! output: %s' % output)
|
| @@ -65,7 +68,8 @@ def _VerifyAppUpdate(device, to_apk, app_data, from_apk=None):
|
| raise Exception(output)
|
|
|
| logging.info('Verifying that %s can be overinstalled...', to_apk)
|
| - output = device.adb.Install(to_apk, reinstall=True)
|
| + # TODO(jbudorick) Switch to AdbWrapper.Install on the impl switch.
|
| + output = device.old_interface.Install(to_apk, reinstall=True)
|
| if 'Success' not in output:
|
| raise Exception('Unable to install %s.\n output: %s' % (to_apk, output))
|
| logging.info('Successfully updated to the new apk. Please verify that the '
|
|
|