Add the support to device connection via TCP/IP
authorChun-Ta Lin <itspeter@google.com>
Sun, 29 May 2016 02:42:07 +0000 (10:42 +0800)
committerChun-Ta Lin <itspeter@google.com>
Sun, 29 May 2016 02:42:07 +0000 (10:42 +0800)
Some of the device is connect over TCP/IP. Fix the regular expression
to include the colon character.

Change-Id: I5e84bf48c58ee9ca01119294f78f1784a19b900a

android/scripts/common.py

index 241cecf..c7f3dc8 100644 (file)
@@ -173,7 +173,7 @@ def getDevices (adb):
        if proc.returncode != 0:
                raise Exception("adb devices -l failed, got %d" % proc.returncode)
 
-       ptrn = re.compile(r'^([a-zA-Z0-9]+)\s+.*product:([^\s]+)\s+model:([^\s]+)\s+device:([^\s]+)')
+       ptrn = re.compile(r'^([a-zA-Z0-9:]+)\s+.*product:([^\s]+)\s+model:([^\s]+)\s+device:([^\s]+)')
        devices = []
        for line in stdout.splitlines()[1:]:
                if len(line.strip()) == 0: