Enable perfboot.py to install APKs before measurement.
This CL adds --apk-dir option, which specifies the directory
that contains APK files to be installed before measuring
boot time.
BUG: 22207911
Change-Id: Ifeacf34c779248686443a9ef02485272c140a456
diff --git a/adb/device.py b/adb/device.py
index b6eaad6..a15675b 100644
--- a/adb/device.py
+++ b/adb/device.py
@@ -170,8 +170,12 @@
out, _ = p.communicate()
return self._parse_shell_output(out)
- def install(self, filename):
- return self._simple_call(['install', filename])
+ def install(self, filename, replace=False):
+ cmd = ['install']
+ if replace:
+ cmd.append('-r')
+ cmd.append(filename)
+ return self._simple_call(cmd)
def push(self, local, remote):
return self._simple_call(['push', local, remote])