Commit fcc50949 authored by ilevy@chromium.org's avatar ilevy@chromium.org

Disable adb root default call in android_commands

We need to change downstream scripts to explicitly call this.
This is causing devices to drop offline during the adb root command.

I will manually pull this change downstream.

BUG=143109

Review URL: https://chromiumcodereview.appspot.com/10823382

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152019 0039d316-1c4b-4281-b951-d872f2087c98
parent 8fb16a86
...@@ -224,9 +224,8 @@ class AndroidCommands(object): ...@@ -224,9 +224,8 @@ class AndroidCommands(object):
self._adb = adb_interface.AdbInterface() self._adb = adb_interface.AdbInterface()
if device: if device:
self._adb.SetTargetSerial(device) self._adb.SetTargetSerial(device)
# So many users require root that we just always do it. This could root_test_output = self.RunShellCommand('ls /root')[0]
# be made more fine grain if necessary. self._root_enabled = not 'Permission denied' in root_test_output
self._root_enabled = self._adb.EnableAdbRoot()
self._logcat = None self._logcat = None
self._original_governor = None self._original_governor = None
self._pushed_files = [] self._pushed_files = []
...@@ -236,6 +235,10 @@ class AndroidCommands(object): ...@@ -236,6 +235,10 @@ class AndroidCommands(object):
"""Returns our AdbInterface to avoid us wrapping all its methods.""" """Returns our AdbInterface to avoid us wrapping all its methods."""
return self._adb return self._adb
def EnableAdbRoot(self):
self._root_enabled = self.Adb().EnableAdbRoot()
self._adb.SendCommand('wait-for-device')
def IsRootEnabled(self): def IsRootEnabled(self):
"""Returns whether or not _adb.EnabledAdbRoot() has succeeded.""" """Returns whether or not _adb.EnabledAdbRoot() has succeeded."""
return self._root_enabled return self._root_enabled
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment