代码语言:javascript复制
import re
import os
def get_devices():
"""
获取设备列表
:return: 设备列表
"""
devices_info = os.popen('adb devices')
devices_info = devices_info.read()
devices = re.findall(r'(.*?)tdeviceb', devices_info)
return devices