Skip to content

Instantly share code, notes, and snippets.

@CreatorB
Last active January 5, 2023 02:54
Show Gist options
  • Save CreatorB/fb09fa3fc1d7d1fca697 to your computer and use it in GitHub Desktop.
Save CreatorB/fb09fa3fc1d7d1fca697 to your computer and use it in GitHub Desktop.
Android Emulator Terminal Screenshot | creatorb
it's just simple solution to take screenshot android emulator from terminal.
adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > screen.png
made easy with create bash
alias screenshot="adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > ~/creatorb/android_screenshot.png"
based tutorials : http://blog.shvetsov.com/2013/02/grab-android-screenshot-to-computer-via.html
When you can't find command adb, surely your adb path is correct.
export PATH=${PATH}:~/adt-bundle/tools
export PATH=${PATH}:~/adt-bundle/platform-tools
put it, on your .bashrc, (alt way : export PATH=${PATH}:<sdk>/tools:<sdk>/platform-tools)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment