Index: build/android/provision_devices.py |
diff --git a/build/android/provision_devices.py b/build/android/provision_devices.py |
index 8c21f97ef200987db3d3432e4f26da2b67004d19..e46ebebf68bcdacc0bc2c6fe569a0437fa1d8d7e 100755 |
--- a/build/android/provision_devices.py |
+++ b/build/android/provision_devices.py |
@@ -295,7 +295,25 @@ def SetProperties(device, options): |
check_return=True) |
if options.remove_system_webview: |
+ webview_removed = False |
+ for p in _SYSTEM_WEBVIEW_PATHS: |
+ output = device.RunShellCommand(['ls', p], check_return=False, |
jbudorick
2016/05/10 21:52:44
Use DeviceUtils.PathExists: https://code.google.co
Yoland Yan(Google)
2016/05/10 22:19:20
Done.
|
+ raw_output=True) |
+ if 'No such file or directory' in output: |
+ webview_removed = True |
+ else: |
+ webview_removed = False |
+ break |
+ if webview_removed: |
+ logging.info('WebView already removed') |
+ return |
jbudorick
2016/05/10 21:52:44
This shouldn't return. It should simply skip the r
Yoland Yan(Google)
2016/05/10 22:19:20
Done.
|
if device.HasRoot(): |
+ # Disabled Marshmallow's Verity security feature |
+ if device.build_version_sdk >= version_codes.MARSHMALLOW: |
+ device.adb.DisableVerity() |
+ device.Reboot() |
+ device.WaitUntilFullyBooted() |
+ device.EnableRoot() |
# This is required, e.g., to replace the system webview on a device. |
device.adb.Remount() |
device.RunShellCommand(['stop'], check_return=True) |