Skip to content

Instantly share code, notes, and snippets.

@polbins
Last active May 17, 2016 05:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save polbins/1146c246713b5502f5523d666254428c to your computer and use it in GitHub Desktop.
Save polbins/1146c246713b5502f5523d666254428c to your computer and use it in GitHub Desktop.
Add ADB Screen Capture to the Command Line

This alias adds ADB Screen Capture on the command-line

HOW-TO

Add the alias to your ~/.bash_profile

alias screencap="adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > "

NOTE: to add adb to the command-line

export PATH=$PATH:~/Library/Android/sdk/platform-tools/:~/Library/Android/sdk/tools/

USAGE

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