Index: build/android/pylib/device/adb_wrapper.py |
diff --git a/build/android/pylib/device/adb_wrapper.py b/build/android/pylib/device/adb_wrapper.py |
index 20787c19dc7b665d3140f3af4867da8d0d39f9b5..588ea0a3e8dd38be2b16f11e83762aff93cdcf8f 100644 |
--- a/build/android/pylib/device/adb_wrapper.py |
+++ b/build/android/pylib/device/adb_wrapper.py |
@@ -542,6 +542,24 @@ class AdbWrapper(object): |
raise device_errors.AdbCommandFailedError( |
['root'], output, device_serial=self._device_serial) |
+ def Emulator(self, cmd, timeout=_DEFAULT_TIMEOUT, |
perezju
2015/04/28 10:33:50
not sure if I like my own suggestion, but we've be
jbudorick
2015/04/28 13:44:59
I don't like the name, but you're right that we've
|
+ retries=_DEFAULT_RETRIES): |
+ """Runs an emulator console command. |
+ |
+ See http://developer.android.com/tools/devices/emulator.html#console |
+ |
+ Args: |
+ cmd: The command to run on the emulator console. |
+ timeout: (optional) Timeout per try in seconds. |
+ retries: (optional) Number of retries to attempt. |
+ |
+ Returns: |
+ The output of the emulator console command. |
+ """ |
+ if isinstance(cmd, basestring): |
+ cmd = [cmd] |
+ return self._RunDeviceAdbCmd(['emu'] + cmd, timeout, retries) |
+ |
@property |
def is_emulator(self): |
return _EMULATOR_RE.match(self._device_serial) |