Skip to content
/ adbss Public

Easy screenshots on Android device / emulator

License

Notifications You must be signed in to change notification settings

skoric/adbss

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

adbss

Android Debug Bridge ScreenShoter

The adbss.sh is a small bash script that will allow you to interactively take screenshots on your connected Android device or emulator.

Features

  • Take a screenshot from connected device/emulator with one key press
  • Specify an output directory for the saved screenshots
  • Automatically clean the temporary screenshot from the device

Sample

See the sample of screenshot taking process:

Usage

  • -o Specify output directory for screenshots, e.g. adbss -o ~/Desktop/test_dir
  • -h Print help
  • -v Print version

Installation (Linux and MacOS)

  1. Make sure you have ADB in your path. You can add it to your shell config file (.bash_profile, .zshrc, etc.):
# Your ADB might be different, these are just common locations.

# Linux
export PATH=${PATH}:$HOME/Android/Sdk/platform-tools/

# MacOS
export PATH=${PATH}:$HOME/Library/Android/sdk/platform-tools/
  1. Check that you have a device/emulator connected to the ADB by running adb devices. Output should look like this:
List of devices attached
emulator-5554   device 
  1. You can simply download adbss.sh and call it however you like. This is simpler example for nicer integration and easier updates:
# Clone adbss repo to your home directory.
git clone https://github.com/skoric/adbss.git ~/adbss

# Create alias in your shell config file ('.bash_profile', '.zshrc', etc.).
echo "alias adbss=\"sh $HOME/adbss/adbss.sh\"" >> ~/.zshrc

# Reload configuration.
source ~/.zshrc

# Start taking screenshots.
adbss

If you've used the git repo, you can update by simply calling git pull in local repo directory.