Skip to content

Instantly share code, notes, and snippets.

@brandonprry
Last active August 12, 2022 13:23
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save brandonprry/1c7402b5fa9603fb124a956b3c7d9ebb to your computer and use it in GitHub Desktop.
Turn on debugging.
Still install sshd. File transfer over adb push/pull is too slow.
#Disable Sound
$ adb shell input keyevent 164
$ adb shell svc power stayon true
$ adb tcpip 4321 #Enable adb over wifi.
$ setprop persist.adb.tcp.port 4321
#Start the camera app and bring to focus
$ am start -a android.media.action.IMAGE_CAPTURE
Starting: Intent { act=android.media.action.IMAGE_CAPTURE }
#Capture image
$ input keyevent 27
$ dumpsys power | grep 'Display Power'
$ input tap 950 550 # Dead center
$ input keyevent KEYCODE_POWER
$ adb shell dumpsys window windows | grep -E 'mCurrentFocus|mFocusedApp'
am broadcast -a 'com.fihtdc.OTAUpdate.SET_SERVER_URL' -n 'com.fihtdc.OTAUpdate/.OTAReceiver' --es URL http://www.c2dms.com
@brandonprry
Copy link
Author

#stty -F /dev/ttyUSB0 115200

mkdir LFCLHMB7C0701023
mkdir LFCLHMB7C0400599
mkdir outside

while true;
do
	scp -P2222 192.168.1.132:/sdcard/DCIM/Camera/\*.lri LFCLHMB7C0701023
	scp -P2222 192.168.1.134:/sdcard/DCIM/Camera/\*.lri LFCLHMB7C0400599
        scp -P2222 192.168.1.139:/sdcard/DCIM/Camera/\*.lri outside

	ssh -p2222 192.168.1.132 "rm /sdcard/DCIM/Camera/*"
	ssh -p2222 192.168.1.134 "rm /sdcard/DCIM/Camera/*"
        ssh -p2222 192.168.1.139 "rm /sdcard/DCIM/Camera/*"

	adb -s 192.168.1.132:4444 shell "input keyevent 27" || (adb connect 192.168.1.132:4444 && adb -s 192.168.1.132:4444 shell "input keyevent 27")
	
	sleep 1
	
	adb -s 192.168.1.134:4444 shell "input keyevent 27" || (adb connect 192.168.1.134:4444  && adb -s 192.168.1.134:4444 shell "input keyevent 27")
	
	sleep 1
	
	adb -s 192.168.1.139:7777 shell "input keyevent 27" || ( adb connect 192.168.1.139:7777 && adb -s 192.168.1.139:7777 shell "input keyevent 27")

	sleep 1

	#echo "CT+START(0,1,1,0.01,1,1);" > /dev/ttyUSB0

	sleep 60
done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment