| 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):
|
|
|