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

Unified Diff: build/android/adb_reverse_forwarder.py

Issue 1124763003: Update from https://crrev.com/327068 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: update nacl, buildtools, fix display_change_notifier_unittest Created 5 years, 7 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/adb_reverse_forwarder.py
diff --git a/build/android/adb_reverse_forwarder.py b/build/android/adb_reverse_forwarder.py
index 1958fdde018c3afc04f91fdeeb840caca4d11730..6cae0cf5c8375e0cec73b8ab603d34bf45729b04 100755
--- a/build/android/adb_reverse_forwarder.py
+++ b/build/android/adb_reverse_forwarder.py
@@ -11,12 +11,14 @@ i.e., "adb forward" in reverse. Requires |host_forwarder| and |device_forwarder|
to be built.
"""
+import logging
import optparse
import sys
import time
-from pylib import android_commands
-from pylib import constants, forwarder
+from pylib import constants
+from pylib import forwarder
+from pylib.device import adb_wrapper
from pylib.device import device_utils
from pylib.utils import run_tests_helper
@@ -51,19 +53,19 @@ def main(argv):
parser.error('Bad port number')
sys.exit(1)
- devices = android_commands.GetAttachedDevices()
+ devices = device_utils.DeviceUtils.HealthyDevices()
if options.device:
- if options.device not in devices:
+ if options.device not in [str(d) for d in devices]:
raise Exception('Error: %s not in attached devices %s' % (options.device,
','.join(devices)))
devices = [options.device]
else:
if not devices:
raise Exception('Error: no connected devices')
- print "No device specified. Defaulting to " + devices[0]
+ logging.info('No device specified. Defaulting to %s', devices[0])
- device = device_utils.DeviceUtils(devices[0])
+ device = devices[0]
constants.SetBuildType(options.build_type)
try:
forwarder.Forwarder.Map(port_pairs, device)

Powered by Google App Engine
This is Rietveld 408576698