当前位置:Gxlcms > 数据库问题 > python实现adb命令循环

python实现adb命令循环

时间:2021-07-01 10:21:17 帮助过:21人阅读

n = 1
while n < 6:
cmd = ‘adb shell am start -W -n com.sf.DarkCalculator/.MainActivity‘
content = os.popen(cmd)
print(‘启动成功‘)

for line in content.readlines():

if "ThisTime" in line:
StartTime = line.split(":")[1]
break
print("StartTime:%s" % StartTime)
time.sleep(3)

cmd = ‘adb shell am force-stop com.sf.DarkCalculator‘
content = os.popen(cmd)
print("关闭成功")
n += 1

python实现adb命令循环

标签:rtti   ORC   关闭   spl   实现   pytho   rtt   stop   shell   

人气教程排行