Created
March 14, 2015 15:07
-
-
Save serverwentdown/e274825576997aecaa6b to your computer and use it in GitHub Desktop.
adbscreenshot
This file contains hidden or 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
#!/bin/sh | |
adb shell "screencap -p /storage/sdcard1/tmp.png" | |
if [ "$1" == "-" ]; then | |
adb pull /storage/sdcard1/tmp.png /dev/stdout | |
elif [ "$1" == "" ]; then | |
adb pull /storage/sdcard1/tmp.png /dev/stdout | open -f -a /Applications/Preview.app | |
else | |
adb pull /storage/sdcard1/tmp.png "$1" | |
fi | |
adb shell "rm /storage/sdcard1/tmp.png" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
does a screenshot over ADB and opens it in Preview.app