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

Unified Diff: build/android/provision_devices.py

Issue 380073003: Fix provision_devices on the L-release preview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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/provision_devices.py
diff --git a/build/android/provision_devices.py b/build/android/provision_devices.py
index 984c026c21023a05255da07a8ecee1c1923c86ae..fed237b9a770ab0be7fdc2f7c719cbb187deb0d1 100755
--- a/build/android/provision_devices.py
+++ b/build/android/provision_devices.py
@@ -119,18 +119,18 @@ def WipeDeviceData(device):
"""
device_authorized = device.FileExists(constants.ADB_KEYS_FILE)
if device_authorized:
- adb_keys = device.RunShellCommand('cat %s' % constants.ADB_KEYS_FILE,
- as_root=True)
+ adb_keys = '\n'.join(set(
+ device.ReadFile(constants.ADB_KEYS_FILE, as_root=True)))
device.RunShellCommand('wipe data', as_root=True)
if device_authorized:
path_list = constants.ADB_KEYS_FILE.split('/')
dir_path = '/'.join(path_list[:len(path_list)-1])
device.RunShellCommand('mkdir -p %s' % dir_path, as_root=True)
- device.RunShellCommand('echo %s > %s' %
- (adb_keys[0], constants.ADB_KEYS_FILE))
- for adb_key in adb_keys[1:]:
- device.RunShellCommand(
- 'echo %s >> %s' % (adb_key, constants.ADB_KEYS_FILE))
+ device.RunShellCommand('restorecon %s' % dir_path, as_root=True)
+ device.RunShellCommand('echo %s > %s' % (adb_keys, constants.ADB_KEYS_FILE),
Sami 2014/07/10 11:26:37 Does this work if there are multiple keys in adb_k
+ as_root=True)
+ device.RunShellCommand('restorecon %s' % constants.ADB_KEYS_FILE,
+ as_root=True)
def ProvisionDevices(options):
« 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