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

Side by Side Diff: build/android/provision_devices.py

Issue 1960363002: Change provision_devices.py to disable verity for remove webview on M (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 """Provisions Android devices with settings required for bots. 7 """Provisions Android devices with settings required for bots.
8 8
9 Usage: 9 Usage:
10 ./provision_devices.py [-d <device serial number>] 10 ./provision_devices.py [-d <device serial number>]
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 device_settings.ConfigureContentSettings( 289 device_settings.ConfigureContentSettings(
290 device, device_settings.NETWORK_DISABLED_SETTINGS) 290 device, device_settings.NETWORK_DISABLED_SETTINGS)
291 291
292 if options.disable_system_chrome: 292 if options.disable_system_chrome:
293 # The system chrome version on the device interferes with some tests. 293 # The system chrome version on the device interferes with some tests.
294 device.RunShellCommand(['pm', 'disable', 'com.android.chrome'], 294 device.RunShellCommand(['pm', 'disable', 'com.android.chrome'],
295 check_return=True) 295 check_return=True)
296 296
297 if options.remove_system_webview: 297 if options.remove_system_webview:
298 if device.HasRoot(): 298 if device.HasRoot():
299 # Disabled Marshmallow's Verity security feature
300 if device.build_version_sdk >= version_codes.MARSHMALLOW:
301 device.adb.DisableVerity()
302 device.Reboot()
jbudorick 2016/05/09 21:07:33 I'm not crazy about introducing yet another reboot
Yoland Yan(Google) 2016/05/09 22:49:36 hmm, I don't think there is a good place to includ
303 device.adb.WaitForDevice()
jbudorick 2016/05/09 21:07:33 If we keep this, this should change to device.Wait
Yoland Yan(Google) 2016/05/09 22:49:36 Done.
304 device.EnableRoot()
299 # This is required, e.g., to replace the system webview on a device. 305 # This is required, e.g., to replace the system webview on a device.
300 device.adb.Remount() 306 device.adb.Remount()
301 device.RunShellCommand(['stop'], check_return=True) 307 device.RunShellCommand(['stop'], check_return=True)
302 device.RunShellCommand(['rm', '-rf'] + _SYSTEM_WEBVIEW_PATHS, 308 device.RunShellCommand(['rm', '-rf'] + _SYSTEM_WEBVIEW_PATHS,
mikecase (-- gone --) 2016/05/09 21:09:55 I think maybe what we should fix is that none of t
Yoland Yan(Google) 2016/05/09 22:49:36 Done.
303 check_return=True) 309 check_return=True)
304 device.RunShellCommand(['start'], check_return=True) 310 device.RunShellCommand(['start'], check_return=True)
305 else: 311 else:
306 logging.warning('Cannot remove system webview from a non-rooted device') 312 logging.warning('Cannot remove system webview from a non-rooted device')
307 313
308 # Some device types can momentarily disappear after setting properties. 314 # Some device types can momentarily disappear after setting properties.
309 device.adb.WaitForDevice() 315 device.adb.WaitForDevice()
310 316
311 317
312 def _ConfigureLocalProperties(device, java_debug=True): 318 def _ConfigureLocalProperties(device, java_debug=True):
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 }, 542 },
537 } 543 }
538 544
539 devil_chromium.Initialize(custom_deps=devil_custom_deps) 545 devil_chromium.Initialize(custom_deps=devil_custom_deps)
540 546
541 return ProvisionDevices(args) 547 return ProvisionDevices(args)
542 548
543 549
544 if __name__ == '__main__': 550 if __name__ == '__main__':
545 sys.exit(main()) 551 sys.exit(main())
OLDNEW
« 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