Index: build/android/pylib/android_commands.py |
diff --git a/build/android/pylib/android_commands.py b/build/android/pylib/android_commands.py |
index da87f39f4dae86130a6507681404fa322fc808f0..b2628a5f760c754ebcb99eeef1460edb1a104fdb 100644 |
--- a/build/android/pylib/android_commands.py |
+++ b/build/android/pylib/android_commands.py |
@@ -226,7 +226,8 @@ class AndroidCommands(object): |
self._adb.SetTargetSerial(device) |
# So many users require root that we just always do it. This could |
Yaron
2012/08/16 23:49:24
Please update this comment.
|
# be made more fine grain if necessary. |
- self._root_enabled = self._adb.EnableAdbRoot() |
+ root_test_output = self.RunShellCommand('ls /root')[0] |
+ self._root_enabled = not 'Permission denied' in root_test_output |
self._logcat = None |
self._original_governor = None |
self._pushed_files = [] |
@@ -236,6 +237,10 @@ class AndroidCommands(object): |
"""Returns our AdbInterface to avoid us wrapping all its methods.""" |
return self._adb |
+ def EnableAdbRoot(self): |
+ self._root_enabled = self.Adb().EnableAdbRoot() |
+ self._adb.SendCommand('wait-for-device') |
+ |
def IsRootEnabled(self): |
"""Returns whether or not _adb.EnabledAdbRoot() has succeeded.""" |
return self._root_enabled |