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

Unified Diff: build/android/provision_devices.py

Issue 358993003: [Android] Switch to DeviceUtils versions of file functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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 | « build/android/gyp/util/build_device.py ('k') | build/android/pylib/android_commands.py » ('j') | 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 f80eea2c73217dfff261e1e79c46ad76cb38fbed..1f354d12c6127df31ff9d0461cc516d6c94489d9 100755
--- a/build/android/provision_devices.py
+++ b/build/android/provision_devices.py
@@ -72,7 +72,7 @@ def PushAndLaunchAdbReboot(devices, target):
print ' Pushing adb_reboot ...'
adb_reboot = os.path.join(constants.DIR_SOURCE_ROOT,
'out/%s/adb_reboot' % target)
- device.old_interface.PushIfNeeded(adb_reboot, '/data/local/tmp/')
+ device.PushChangedFiles(adb_reboot, '/data/local/tmp/')
# Launch adb_reboot
print ' Launching adb_reboot ...'
device.old_interface.GetAndroidToolStatusAndOutput(
@@ -91,9 +91,9 @@ def _ConfigureLocalProperties(device, is_perf):
if not is_perf:
local_props.append('%s=all' % android_commands.JAVA_ASSERT_PROPERTY)
local_props.append('debug.checkjni=1')
- device.old_interface.SetProtectedFileContents(
+ device.WriteFile(
constants.DEVICE_LOCAL_PROPERTIES_PATH,
- '\n'.join(local_props))
+ '\n'.join(local_props), as_root=True)
# Android will not respect the local props file if it is world writable.
device.RunShellCommand(
'chmod 644 %s' % constants.DEVICE_LOCAL_PROPERTIES_PATH,
@@ -114,8 +114,7 @@ def WipeDeviceData(device):
Arguments:
device: the device to wipe
"""
- device_authorized = device.old_interface.FileExistsOnDevice(
- constants.ADB_KEYS_FILE)
+ device_authorized = device.FileExists(constants.ADB_KEYS_FILE)
if device_authorized:
adb_keys = device.RunShellCommand('cat %s' % constants.ADB_KEYS_FILE,
as_root=True)
« no previous file with comments | « build/android/gyp/util/build_device.py ('k') | build/android/pylib/android_commands.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698