1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-01-31 10:11:17 +00:00

AndroidWorkload: Adds support for apk replacement/downgrading

Now tries to replace and downgrade an apk if already installed.
This commit is contained in:
Marc Bonnici 2017-06-28 15:37:32 +01:00
parent 4d397ab465
commit f9bc0261bf

View File

@ -537,7 +537,8 @@ class PackageHandler(object):
self.target.execute('pm clear {}'.format(self.apk_info.package))
def install_apk(self, context):
output = self.target.install_apk(self.apk_file, self.install_timeout)
output = self.target.install_apk(self.apk_file, self.install_timeout,
replace=True, allow_downgrade=True)
if 'Failure' in output:
if 'ALREADY_EXISTS' in output:
msg = 'Using already installed APK (did not unistall properly?)'