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

Unified Diff: build/android/pylib/device/adb_wrapper.py

Issue 1112843002: [Android] Remove more uses of android_commands from build/android/pylib. (RELAND) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@detriplicated
Patch Set: fixes for host-driven tests & specific device Created 5 years, 8 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
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..82f8204acfd83b154945e98e8c109552c4e62fca 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 Emu(self, cmd, timeout=_DEFAULT_TIMEOUT,
+ 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)

Powered by Google App Engine
This is Rietveld 408576698