码迷,mamicode.com
首页 > 数据库 > 详细

python实现adb命令循环

时间:2019-06-17 12:50:54      阅读:208      评论:0      收藏:0      [点我收藏+]

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

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   

原文地址:https://www.cnblogs.com/wsfsd/p/11038934.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!