Skip to content

Instantly share code, notes, and snippets.

@ishida
Created May 27, 2015 06:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ishida/94aa8d522e4b0459bf4e to your computer and use it in GitHub Desktop.
Save ishida/94aa8d522e4b0459bf4e to your computer and use it in GitHub Desktop.
Android screen capture shell command
#!/bin/bash
DATE=`date +"%Y-%m-%d-%H-%M-%S"`
FILENAME="s-${DATE}.png"
echo "capturing ${FILENAME}..."
adb shell screencap -p "/sdcard/${FILENAME}"
adb pull /sdcard/"${FILENAME}"
adb shell rm "/sdcard/${FILENAME}"
echo "saved ${FILENAME}."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment