Skip to content

Instantly share code, notes, and snippets.

@quangson91
Created December 2, 2017 02:47
Show Gist options
  • Save quangson91/fa500798d33c6952f0d33fc1e60b0dec to your computer and use it in GitHub Desktop.
Save quangson91/fa500798d33c6952f0d33fc1e60b0dec to your computer and use it in GitHub Desktop.
Screenshot for android by commandline
PREFIX="android_screenshot"
if [ $# -gt 0 ]
then
PREFIX=$1
fi
adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > ~/Downloads/${PREFIX}_$(date +'%Y-%m-%d_%H-%M-%S').png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment