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

Unified Diff: build/android/pylib/android_commands.py

Issue 10823382: Disable adb root default call in android_commands (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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/pylib/android_commands.py
diff --git a/build/android/pylib/android_commands.py b/build/android/pylib/android_commands.py
index da87f39f4dae86130a6507681404fa322fc808f0..c0863e0a12ce1a4a67c8ed28d7e2175af174408f 100644
--- a/build/android/pylib/android_commands.py
+++ b/build/android/pylib/android_commands.py
@@ -224,9 +224,8 @@ class AndroidCommands(object):
self._adb = adb_interface.AdbInterface()
if device:
self._adb.SetTargetSerial(device)
- # So many users require root that we just always do it. This could
- # 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 +235,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()
Satish 2012/08/17 09:32:58 I see in __init__ we check if adb is already in ro
Isaac (away) 2012/08/17 09:34:37 sure. This function isn't called right now and mi
+ self._adb.SendCommand('wait-for-device')
+
def IsRootEnabled(self):
"""Returns whether or not _adb.EnabledAdbRoot() has succeeded."""
return self._root_enabled
« 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