Skip to content

Instantly share code, notes, and snippets.

@millipedia
Last active December 19, 2015 12:39
Show Gist options
  • Save millipedia/5956686 to your computer and use it in GitHub Desktop.
Save millipedia/5956686 to your computer and use it in GitHub Desktop.
Grab an android screenshot from adb and save to local computer. Originally came from http://stackoverflow.com/a/14353315
adb shell screencap -p | sed 's/\r$//' > screen.png
@millipedia
Copy link
Author

on OSX we need to use:

adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > screen.png

which came from http://blog.shvetsov.com/2013/02/grab-android-screenshot-to-computer-via.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment