Created
July 23, 2015 19:44
-
-
Save MTen/e5a5af911d855b8731d3 to your computer and use it in GitHub Desktop.
android screenshot from the command line
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
#Add this to your .bash_profile or .bash_alias and source ~/.bash_<<your location>> | |
#This uses the android debug bridge to screen cap. | |
#Usage: $ androidScreenshot <name of file> | |
#i.e. androidScreenshot myAwesomeScreenshot | |
androidScreenshot() { | |
adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > $1.png | |
echo "$1.png has been saved" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment