Created
May 12, 2016 16:14
-
-
Save CameronBanga/b1bdbe5de0750ef67c4499cd2d2963a1 to your computer and use it in GitHub Desktop.
Quickly take a screenshot of an Android phone plugged into your Mac/Linux box
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/bash | |
# need to install adb first, if you haven't | |
# brew install android-platform-tools | |
# then, save this script, chmod 750 it | |
# and easy get Android screens on your desktop | |
# note - this breaks when multiple Android devices | |
# are plugged into your computer | |
NOW=$(date +"%Y%m%d-%H%M%S") | |
FILE="android_screen_"$NOW | |
adb shell screencap -p /sdcard/$FILE.png | |
adb pull /sdcard/$FILE.png ~/Desktop | |
adb shell rm /sdcard/$FILE.png |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment