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
posted on 2019-06-17 11:50  熊猫星人  阅读(696)  评论(0编辑  收藏  举报