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

Unified Diff: build/android/pylib/device/device_utils.py

Issue 772003002: Migrate DeviceUtils.EnableRoot to adb_wrapper (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 | build/android/pylib/device/device_utils_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/device/device_utils.py
diff --git a/build/android/pylib/device/device_utils.py b/build/android/pylib/device/device_utils.py
index 68298578c04fb0cadcc49c391a5cc0ae3b02c253..9a19fa18c3c91ee339f09a556c532833b35f87c0 100644
--- a/build/android/pylib/device/device_utils.py
+++ b/build/android/pylib/device/device_utils.py
@@ -177,11 +177,13 @@ class DeviceUtils(object):
CommandFailedError if root could not be enabled.
CommandTimeoutError on timeout.
"""
+ if self.IsUserBuild():
+ raise device_errors.CommandFailedError(
+ 'Cannot enable root in user builds.', str(self))
if 'needs_su' in self._cache:
del self._cache['needs_su']
- if not self.old_interface.EnableAdbRoot():
- raise device_errors.CommandFailedError(
- 'Could not enable root.', str(self))
+ self.adb.Root()
+ self.adb.WaitForDevice()
@decorators.WithTimeoutAndRetriesFromInstance()
def IsUserBuild(self, timeout=None, retries=None):
« no previous file with comments | « no previous file | build/android/pylib/device/device_utils_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698