提交 a0fb2012 编写于 作者: 黎明灰烬 提交者: Chao

tools: support more adb device scenarios (#139)

Some devices generate `adb devices` message with `-` which
is ignored by current tools. This patch enables them.
上级 9e52599e
...@@ -115,7 +115,7 @@ def clear_phone_data_dir(serialno, phone_data_dir): ...@@ -115,7 +115,7 @@ def clear_phone_data_dir(serialno, phone_data_dir):
################################ ################################
def adb_devices(): def adb_devices():
serialnos = [] serialnos = []
p = re.compile(r'(\w+)\s+device') p = re.compile(r'([\w|-]+)\s+device')
for line in split_stdout(sh.adb("devices")): for line in split_stdout(sh.adb("devices")):
m = p.match(line) m = p.match(line)
if m: if m:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册