Skip to content

Instantly share code, notes, and snippets.

@jvyden
Last active November 4, 2019 21:15
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 jvyden/8846a56c699333dcffa366402989b5e8 to your computer and use it in GitHub Desktop.
Save jvyden/8846a56c699333dcffa366402989b5e8 to your computer and use it in GitHub Desktop.
Screenshot via ADB

Installation

# curl https://gist.githubusercontent.com/jvyden420/8846a56c699333dcffa366402989b5e8/raw/cd28f1108cfa0797de33a2dbc43e58a95b99b569/adbscreenshot > /usr/local/bin/adbscreenshot

# chmod +x /usr/local/bin/adbscreenshot

or something like that idk

#!/bin/sh
adb shell screencap -p /sdcard/screen.png
adb pull /sdcard/screen.png
adb shell rm /sdcard/screen.png
xdg-open 2>/dev/null screen.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment