Created
April 8, 2016 14:08
-
-
Save Adam--/81dbac3fc044471819f0addb73c6954a to your computer and use it in GitHub Desktop.
Windows batch files for useful Android ADB commands. Replace [device] with your device as listed from "adb devices" or remove the -s [device] entirely.
This file contains 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
adb -s [device] shell input keyevent 4 |
This file contains 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
adb -s [device] shell input keyevent 3 |
This file contains 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
adb -s [device] shell screencap -p /sdcard/screen.png | |
adb -s [device] pull -p -a /sdcard/screen.png | |
adb -s [device] shell rm /sdcard/screen.png | |
For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c-%%a-%%b) | |
For /f "tokens=1-3 delims=/:" %%a in ("%TIME%") do (set mytime=%%a-%%b-%%c) | |
set mytime=%mytime: =% | |
move screen.png _Screenshots/Screenshot_%mydate%_%mytime%.png | |
start _Screenshots/Screenshot_%mydate%_%mytime%.png |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment