我有一些要发送到一些设备的adb命令,现在我可以将其仅发送到一个连接的设备。 如何在python中更改代码以将这些命令打入多个设备。
如何用python编写,我必须使用:
adb -s serial_number *command*
吗?
或者还有其他方法可以在python中以简单的方式实现它。
def abc():
adb1 = subprocess.Popen(command_1)
adb1.wait()
adb2 = subprocess.Popen(command_2)
asb2.wait()
现在,使用此代码,我可以仅将命令1和命令2发送到一个连接的设备。
有没有办法发送它而不使用'adb -s 序列号 command_x) 如果没有,我如何获取设备编号到python中的变量?