forked from aikinci/droidbox
-
Notifications
You must be signed in to change notification settings - Fork 1
/
run
executable file
·18 lines (18 loc) · 820 Bytes
/
run
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash
if [ "$1" = "NONE" ]; then
echo "Usage: sudo docker run -it --rm -v ~/samples:/samples riker2000/droidbox /samples/filename.apk [duration in seconds]"
exit 1
fi
echo -e "\e[1;32;40mDroidbox Docker starting\nWaiting for the emulator to startup..."
/sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}' > /samples/ip.txt
sleep 1
/opt/android-sdk-linux/tools/emulator64-arm @droidbox -no-window -no-audio -system /opt/DroidBox_4.1.1/images/system.img -ramdisk /opt/DroidBox_4.1.1/images/ramdisk.img >> /samples/emulator.log &
sleep 1
service ssh start
adb wait-for-device
adb forward tcp:5900 tcp:5901
adb shell /data/fastdroid-vnc >> /samples/vnc.log &
echo -ne "\e[0m"
python /opt/DroidBox_4.1.1/scripts/droidbox.py $1 $2 2>&1 |tee /samples/analysis.log
echo -ne "\e[0m"
exit