有兴趣可以先看看这个网站中列出的命令http://adbshell.com
首先使用adb devices列出所有的真机(即你的手机)
以下的我的手机
219fac0e device
5758cc8d device
点击坐标
adb -s 219fac0e shell input tap 123 123
adb -s 5758cc8d shell input tap 123 123
下面是一段python代码实现
import os
attached_list = os.popen('adb devices').readlines()
del attached_list[0]
aaaaa = attached_list[0]
#
attached_codes = []
a =0
for iin range(len(attached_list)):
tmp = attached_list[i].split(" ")
if len(tmp[0]) >5:
attached_codes.append(attached_list[i][0:8])
pass
print(attached_codes)
for onein attached_codes:
os.system("adb -s %s shell input tap 123 123"% one)
网友评论