Skip to content

Instantly share code, notes, and snippets.

@burntcookie90
Created September 24, 2014 15:28
Show Gist options
  • Save burntcookie90/202584883ca677d9ca35 to your computer and use it in GitHub Desktop.
Save burntcookie90/202584883ca677d9ca35 to your computer and use it in GitHub Desktop.
adb_quick_screen.sh
#!/bin/bash
binary=$(which adb)
filename=$HOME/screen_$(date +"%H%M%S").png
if [ -e $binary ]
then
adb shell screencap -p /sdcard/screen.png
adb pull /sdcard/screen.png $filename
adb shell rm /sdcard/screen.png
echo "Screenshot written to $filename"
else
echo "ADB isn't in your path!"
echo "Add it to your path with \$ export \$PATH:<path to adb>"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment