Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Don't treat IP address in serial number as regex

When adb is connected to remote device on network, the serial number
can be of the form "192.168.42.1:5555". This should not be treated as
a regex, but rather as a literal serial number.

Signed-off-by: Matt Gumbel <matthew.k.gumbel@linux.intel.com>
  • Loading branch information...
commit 8b311130ac469cfb188dfe6287a9201c836a31d4 1 parent 7021695
Matt Gumbel authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  AndroidViewClient/src/com/dtmilano/android/viewclient.py
View
2  AndroidViewClient/src/com/dtmilano/android/viewclient.py
@@ -1076,7 +1076,7 @@ def connectToDeviceOrExit(timeout=60, verbose=False, ignoresecuredevice=False, s
if secure == '1' and debuggable == '0' and not ignoresecuredevice and version < 16:
print >> sys.stderr, "%s: ERROR: Device is secure, AndroidViewClient won't work." % progname
sys.exit(2)
- if re.search("[.*()+]", serialno):
+ if re.search("[.*()+]", serialno) and not re.search("(\d{1,3}\.){3}\d{1,3}"):
# if a regex was used we have to determine the serialno used
serialno = ViewClient.__obtainDeviceSerialNumber(device)
return device, serialno
Please sign in to comment.
Something went wrong with that request. Please try again.