Skip to content

Commit 0958bc7

Browse files
author
gb112211
committed
fixed bug.
1 parent 92a106b commit 0958bc7

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

python/getApp.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
def get_match_apk(package_name, path):
1919
list = []
2020
for packages in utils.shell("pm list packages -f %s" %package_name).stdout.readlines():
21-
list.append(packages.split(":")[-1].split("=")[0])
21+
if packages.split(":")[0] == "package":
22+
list.append(packages.split(":")[-1].split("=")[0])
2223

2324
utils.adb("pull %s %s" %(list[0], path)).wait()
2425

python/get_cpu_mem_info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def line_chart():
104104
if not os.path.isdir(path):
105105
os.makedirs(path)
106106

107-
#图标保存至脚本当前目录的chart目录下
107+
#图片保存至脚本当前目录的chart目录下
108108
c.makeChart(PATH("%s/%s.png" %(path, utils.timestamp())))
109109

110110
if __name__ == "__main__":

python/screenrecord.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import os
1111
import string
1212
import sys
13+
import time
1314

1415
from scriptUtils import utils
1516

@@ -20,11 +21,13 @@
2021

2122
def record():
2223
utils.shell("screenrecord /data/local/tmp/video.mp4")
23-
input_key = raw_input("Please press the Enter key to stop recording:\n")
24+
input_key = raw_input("Please press the Enter key to stop recording:\n")
2425
if input_key == "":
2526
utils.adb("kill-server")
2627

2728
print "Get Video file..."
29+
utils.adb("start-server")
30+
time.sleep(1.5)
2831

2932
path = PATH("%s/video" %os.getcwd())
3033
if not os.path.isdir(path):

0 commit comments

Comments
 (0)