Index: build/android/pylib/android_commands.py |
diff --git a/build/android/pylib/android_commands.py b/build/android/pylib/android_commands.py |
index e7a27f91228a2711679e0986d26466119a2272da..fbde91c4e05cdf299a08a2f0e72665153848f95b 100644 |
--- a/build/android/pylib/android_commands.py |
+++ b/build/android/pylib/android_commands.py |
@@ -215,6 +215,20 @@ class AndroidCommands(object): |
root_test_output = self.RunShellCommand('ls /root') or [''] |
return not 'Permission denied' in root_test_output[0] |
+ def EnableAdbRoot(self): |
+ """Enables adb root on the device. |
+ |
+ Returns: |
+ True: if output from executing adb reboot was as expected. |
bulach
2012/09/21 10:36:46
nit: s/reboot/root/ :)
also, I think 221-223 needs
shashi
2012/09/24 18:33:28
Oops my bad, I have a CL to fix this.
On 2012/09/2
|
+ False: otherwise. |
+ """ |
+ return_value = self._adb.EnableAdbRoot() |
+ # EnableAdbRoot inserts a call for wait-for-device only when adb logcat |
+ # output matches what is expected. Just to be safe add a call to |
+ # wait-for-device. |
+ self._adb.SendCommand('wait-for-device') |
+ return return_value |
+ |
def GetDeviceYear(self): |
"""Returns the year information of the date on device.""" |
return self.RunShellCommand('date +%Y')[0] |