Add --keep_data as option to adb_install_apk
Useful in a compile/debug/retry workflow where you're wanting to keep some options persisted across installs. Defaults to off so it doesn't mess anything in production. R=craigdh@chromium.org Review URL: https://chromiumcodereview.appspot.com/12096018 git-svn-id: http://src.chromium.org/svn/trunk/src/build@179275 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
Родитель
c85c5f4c2d
Коммит
74c614c8f2
|
@ -16,9 +16,9 @@ from pylib.utils import test_options_parser
|
|||
|
||||
|
||||
def _InstallApk(args):
|
||||
apk_path, apk_package, device = args
|
||||
apk_path, apk_package, keep_data, device = args
|
||||
result = android_commands.AndroidCommands(device=device).ManagedInstall(
|
||||
apk_path, False, apk_package)
|
||||
apk_path, keep_data, apk_package)
|
||||
print '----- Installed on %s -----' % device
|
||||
print result
|
||||
|
||||
|
@ -42,6 +42,7 @@ def main(argv):
|
|||
# Send a tuple (apk_path, apk_package, device) per device.
|
||||
pool.map(_InstallApk, zip([options.apk] * len(devices),
|
||||
[options.apk_package] * len(devices),
|
||||
[options.keep_data] * len(devices),
|
||||
devices))
|
||||
|
||||
|
||||
|
|
|
@ -37,6 +37,11 @@ def AddInstallAPKOption(option_parser):
|
|||
option_parser.add_option('--apk_package',
|
||||
help=('The package name used by the apk containing '
|
||||
'the application.'))
|
||||
option_parser.add_option('--keep_data',
|
||||
action='store_true',
|
||||
default=False,
|
||||
help=('Keep the package data when installing '
|
||||
'the application.'))
|
||||
|
||||
|
||||
def ValidateInstallAPKOption(option_parser, options):
|
||||
|
|
Загрузка…
Ссылка в новой задаче