Index: build/android/pylib/android_commands.py |
diff --git a/build/android/pylib/android_commands.py b/build/android/pylib/android_commands.py |
index 20684b7b07b317b870370d8476eb237f6cbffe23..5890b82240f4ece803476ca85578daedf435e018 100644 |
--- a/build/android/pylib/android_commands.py |
+++ b/build/android/pylib/android_commands.py |
@@ -458,6 +458,14 @@ class AndroidCommands(object): |
if out.strip() != 'remount succeeded': |
raise errors.MsgException('Remount failed: %s' % out) |
+ def KillAdbdDevice(self): |
rmcilroy
2013/10/21 11:33:13
Nit - how about RestartAdbdOnDevice()?
bulach
2013/10/21 15:30:13
Done.
|
+ logging.info('Killing adbd on the device...') |
+ adb_pids = self.ExtractPid('adbd') |
+ if adb_pids: |
+ self.RunShellCommandWithSU('kill %s' % ' '.join(adb_pids)) |
+ logging.info('Waiting for device to settle...') |
rmcilroy
2013/10/21 11:33:13
Nit - "Waiting for adbd to restart on device..." ?
bulach
2013/10/21 15:30:13
yes! :) thankfully, it's already done at a lower l
|
+ self._adb.SendCommand('wait-for-device') |
+ |
def RestartAdbServer(self): |
"""Restart the adb server.""" |
ret = self.KillAdbServer() |