From a0fb201273e1d03b44381a945e4b2009542477a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=98=8E=E7=81=B0=E7=83=AC?= Date: Wed, 1 Aug 2018 10:55:46 +0800 Subject: [PATCH] tools: support more adb device scenarios (#139) Some devices generate `adb devices` message with `-` which is ignored by current tools. This patch enables them. --- tools/sh_commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/sh_commands.py b/tools/sh_commands.py index 3d5eb78c..0340f3d5 100644 --- a/tools/sh_commands.py +++ b/tools/sh_commands.py @@ -115,7 +115,7 @@ def clear_phone_data_dir(serialno, phone_data_dir): ################################ def adb_devices(): serialnos = [] - p = re.compile(r'(\w+)\s+device') + p = re.compile(r'([\w|-]+)\s+device') for line in split_stdout(sh.adb("devices")): m = p.match(line) if m: -- GitLab