Skip to content

Instantly share code, notes, and snippets.

@SimonMarquis
Created May 2, 2015 22:10
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 SimonMarquis/317e0f19aa72e01162ec to your computer and use it in GitHub Desktop.
Save SimonMarquis/317e0f19aa72e01162ec to your computer and use it in GitHub Desktop.
file=$(date +%Y.%m.%d-%H.%M.%S).png \
&& path="/sdcard/$file" \
&& adb shell screencap -p "$path" \
&& adb pull "$path" \
&& adb shell rm "$path" \
&& echo "Screenshot saved at $(pwd)/$file" \
|| echo "Screenshot failed"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment