Last active
January 31, 2019 23:27
-
-
Save refo/5498a49a5a025a0335ba to your computer and use it in GitHub Desktop.
Take an android screenshot to desktop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# OS X default screen shot date format | |
# e.g. "2015-08-28 at 18.45.05" | |
DATE=`date +"%F at %H.%M.%S"` | |
# OS X default screen shot file name | |
# e.g. "Screen Shot 2015-08-28 at 18.45.05.png" | |
FILE=~/Desktop/Screen\ Shot\ $DATE.png | |
# Path to genymotion adb | |
ADB="/usr/bin/env adb" | |
# Take the screen shot and save the output to user desktop | |
#$ADB shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > "${FILE}" | |
$ADB exec-out screencap -p > "${FILE}" | |
echo "${FILE}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment