Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5576)

Unified Diff: build/android/incremental_install/installer.py

Issue 1926813002: Add --allow-downgrade argument for incremental installer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed documentation for new command line argument Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/incremental_install/installer.py
diff --git a/build/android/incremental_install/installer.py b/build/android/incremental_install/installer.py
index 421318cf3937073fda112c9e591633cc9ad09604..6c429118a018554ff5ce0122191ec9f060079da6 100755
--- a/build/android/incremental_install/installer.py
+++ b/build/android/incremental_install/installer.py
@@ -86,7 +86,8 @@ def Uninstall(device, package, enable_device_cache=False):
def Install(device, apk, split_globs=None, native_libs=None, dex_files=None,
enable_device_cache=False, use_concurrency=True,
- show_proguard_warning=False, permissions=()):
+ show_proguard_warning=False, permissions=(),
+ allow_downgrade=True):
"""Installs the given incremental apk and all required supporting files.
Args:
@@ -119,9 +120,11 @@ def Install(device, apk, split_globs=None, native_libs=None, dex_files=None,
for split_glob in split_globs:
splits.extend((f for f in glob.glob(split_glob)))
device.InstallSplitApk(apk, splits, reinstall=True,
- allow_cached_props=True, permissions=permissions)
+ allow_cached_props=True, permissions=permissions,
+ allow_downgrade=allow_downgrade)
else:
- device.Install(apk, reinstall=True, permissions=permissions)
+ device.Install(apk, reinstall=True, permissions=permissions,
+ allow_downgrade=allow_downgrade)
install_timer.Stop(log=False)
# Push .so and .dex files to the device (if they have changed).
@@ -272,6 +275,12 @@ def main():
default=0,
action='count',
help='Verbose level (multiple times for more)')
+ parser.add_argument('--disable-downgrade',
+ action='store_false',
+ default=True,
+ dest='allow_downgrade',
+ help='Disable install of apk with lower version number'
+ 'than the version already on the device.')
args = parser.parse_args()
@@ -300,7 +309,8 @@ def main():
Install(device, apk, split_globs=args.splits, native_libs=args.native_libs,
dex_files=args.dex_files, enable_device_cache=args.cache,
use_concurrency=args.threading,
- show_proguard_warning=args.show_proguard_warning)
+ show_proguard_warning=args.show_proguard_warning,
+ allow_downgrade=args.allow_downgrade)
if __name__ == '__main__':
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698