Created
August 28, 2020 04:05
-
-
Save pweinzettel/84846b2aded058dcc3b25cd682fd6969 to your computer and use it in GitHub Desktop.
Revisions
-
pweinzettel created this gist
Aug 28, 2020 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ #!/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 &