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

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

Issue 1385943002: GN: Don't attempt incremental install with sandboxes on some samsung devices (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@device-utils-caching
Patch Set: nits Created 5 years, 2 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 1a58941edd6dece554834ad1fb65bb0248eca9fb..55699f3d23f4dca55104ab42e0c96f786a1ff700 100755
--- a/build/android/incremental_install/installer.py
+++ b/build/android/incremental_install/installer.py
@@ -162,13 +162,18 @@ def main():
delete_device_stale=True)
push_dex_timer.Stop(log=False)
- def check_sdk_version():
- if device.build_version_sdk >= version_codes.MARSHMALLOW:
- if apk_help.HasIsolatedProcesses():
- raise Exception('Cannot use perform incremental installs on Android M+ '
- 'without first disabling isolated processes.\n'
- 'To do so, use GN arg:\n'
- ' disable_incremental_isolated_processes=true')
+ def check_selinux():
+ # Samsung started using SELinux before Marshmallow. There may be even more
+ # cases where this is required...
+ has_selinux = (device.build_version_sdk >= version_codes.MARSHMALLOW or
+ device.GetProp('selinux.policy_version'))
+ if has_selinux and apk_help.HasIsolatedProcesses():
+ raise Exception('Cannot use incremental installs on versions of Android '
+ 'where isoloated processes cannot access the filesystem '
+ '(this includes Android M+, and Samsung L+) without '
+ 'first disabling isoloated processes.\n'
+ 'To do so, use GN arg:\n'
+ ' disable_incremental_isolated_processes=true')
cache_path = '%s/files-cache.json' % device_incremental_dir
def restore_cache():
@@ -205,7 +210,7 @@ def main():
# been designed for multi-threading. Enabling only because this is a
# developer-only tool.
setup_timer = _Execute(
- args.threading, create_lock_files, restore_cache, check_sdk_version)
+ args.threading, create_lock_files, restore_cache, check_selinux)
_Execute(args.threading, do_install, do_push_files)
« 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