Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Execute DroidCam on the phone and client on pc from bash
#!/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