首页 > 数据库技术 > 详细

python实现adb命令循环

时间:2019-06-17 13:27:07      阅读:369      评论:0      收藏:0      [点我收藏+]
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命令循环

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!