Skip to content

Commit 687e704

Browse files
committed
多设备安装应用(installApp.py)
1 parent f1bee1d commit 687e704

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

python/installApp.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env python
2+
#coding=utf-8
3+
4+
'''
5+
Created on 2019/5/30 10:24
6+
@author: rikixu
7+
'''
8+
9+
from scriptUtils import utils
10+
11+
12+
def install(apkPath):
13+
print (utils.adb("install -r %s" %apkPath).stdout.read())
14+
15+
16+
if __name__ == "__main__":
17+
apkPath = raw_input("apk path:")
18+
install(apkPath)

python/screenrecord.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ def record():
3333
else:
3434
print "Please set again!"
3535
record()
36-
36+
37+
3738
if __name__ == "__main__":
3839
sdk = string.atoi(utils.shell("getprop ro.build.version.sdk").stdout.read())
3940
if sdk < 19:
@@ -48,5 +49,5 @@ def record():
4849
if not os.path.isdir(path):
4950
os.makedirs(path)
5051

51-
os.popen("adb pull /data/local/tmp/video.mp4 %s" %PATH("%s/%s.mp4" %(path, utils.timestamp())))
52+
utils.adb("pull /data/local/tmp/video.mp4 %s" %PATH("%s/%s.mp4" %(path, utils.timestamp())))
5253
print "Completed"

0 commit comments

Comments
 (0)