Commit 4dc5fe33 authored by Peter Wen's avatar Peter Wen Committed by Commit Bot

Android: Use device API to install modules

Use new code introduced in: https://crrev.com/c/1758358

Bug: 1000751
Change-Id: Ib1f4d966530c2111e9b0c1fe14637caf4b32d9e8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1810839
Auto-Submit: Peter Wen <wnwen@chromium.org>
Reviewed-by: default avatarTibor Goldschwendt <tiborg@chromium.org>
Commit-Queue: Tibor Goldschwendt <tiborg@chromium.org>
Commit-Queue: Peter Wen <wnwen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#697676}
parent 2b4a1aba
...@@ -227,17 +227,7 @@ def _InstallBundle(devices, bundle_apks, package_name, command_line_flags_file, ...@@ -227,17 +227,7 @@ def _InstallBundle(devices, bundle_apks, package_name, command_line_flags_file,
print(_Colorize(msg, colorama.Fore.YELLOW + colorama.Style.BRIGHT)) print(_Colorize(msg, colorama.Fore.YELLOW + colorama.Style.BRIGHT))
InstallFakeModules(device) InstallFakeModules(device)
device.Install(bundle_apks, modules=modules, allow_downgrade=True)
# NOTE: For now, installation requires running 'bundletool install-apks'.
# TODO(digit): Add proper support for bundles to devil instead, then use it.
install_cmd_args = [
'install-apks', '--apks=' + bundle_apks, '--allow-downgrade',
'--adb=' + adb_wrapper.AdbWrapper.GetAdbPath(),
'--device-id=' + device.serial
]
if modules:
install_cmd_args += ['--modules=' + ','.join(modules)]
bundletool.RunBundleTool(install_cmd_args)
# Basic checks for |modules| and |fake_modules|. # Basic checks for |modules| and |fake_modules|.
# * |fake_modules| cannot include 'base'. # * |fake_modules| cannot include 'base'.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment