Skip to content

Instantly share code, notes, and snippets.

Last active Aug 29, 2015
What would you like to do?
droidshot - simple cli utility that wraps taking screenshots from an android phone
function droidshot {
fname=$(date +"%Y%m%d%H%M").png
[[ ! -z $1 ]] && fname=$1
[[ -d $saveto ]] || mkdir $saveto
adb shell screencap -p /sdcard/$fname
adb pull /sdcard/$fname $saveto/$fname
adb shell rm /sdcard/$fname
echo "saved to $saveto/$fname"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment