Skip to content

Instantly share code, notes, and snippets.

@sugoi-wada
Created December 26, 2013 13:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sugoi-wada/8133573 to your computer and use it in GitHub Desktop.
Save sugoi-wada/8133573 to your computer and use it in GitHub Desktop.
FILENAME="screenshot_`date \"+%Y%m%d%H%M%S\"`.png"
while getopts n: opt
do
if test $opt = "n"
then
FILENAME=${OPTARG}
fi
done
adb shell screencap -p /sdcard/$FILENAME
adb pull /sdcard/$FILENAME
adb shell rm /sdcard/$FILENAME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment