forked from aikinci/droidbox
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdroidbox.py.patch
More file actions
24 lines (21 loc) · 813 Bytes
/
droidbox.py.patch
File metadata and controls
24 lines (21 loc) · 813 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--- droidbox.py 2015-04-28 18:21:25.756046277 +0200
+++ droidbox.py 2015-04-30 15:59:27.114049745 +0200
@@ -359,7 +359,12 @@
signal.alarm(duration)
#Collect DroidBox logs
+ lastScreenshot = 0
while 1:
+ if (time.time() - lastScreenshot) >=5:
+ #Take Screenshots every 5 seconds.
+ os.system("adb shell screencap -p | sed 's/\r$//' > /samples/out/screen_$(date +%Y-%m-%d_%H%M%S).png")
+ lastScreenshot = time.time()
try:
logcatInput = adb.stdout.readline()
if not logcatInput:
@@ -507,6 +512,8 @@
output["apkName"] = apkName
print(json.dumps(output))
+ with open("/samples/out/analysis.json","w") as jsonfile:
+ jsonfile.write(json.dumps(output,sort_keys=True, indent=4))
sys.exit(0)
if __name__ == "__main__":