Created
August 28, 2020 04:05
-
-
Save pweinzettel/84846b2aded058dcc3b25cd682fd6969 to your computer and use it in GitHub Desktop.
Execute DroidCam on the phone and client on pc from bash
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
readonly LOG_FILE=/var/log/droidcam.log | |
exec 1>$LOG_FILE | |
exec 2>&1 | |
port=4747 | |
date | |
env | |
/usr/bin/id | |
function am_stop() { | |
/usr/bin/adb shell am force-stop com.dev47apps.droidcamx; | |
} | |
function am_start() { | |
/usr/bin/adb shell am start -n com.dev47apps.droidcamx/.DroidCamX; | |
} | |
/usr/bin/killall -9 droidcam-cli | |
/usr/bin/adb kill-server | |
#am_stop; | |
am_start; | |
sleep 2 | |
/usr/bin/adb forward tcp:$port tcp:$port | |
/usr/bin/nohup /usr/bin/droidcam-cli adb $port & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment