Little utility script to take a screenshot of a connected Android device and pull it to your computer (if you’re on OSX, remove the sips line for Linux):
#!/bin/sh timestamp=$(date +%s) filepath=/sdcard/$timestamp.png echo $filepath adb shell screencap -p $filepath adb pull $filepath adb shell rm $filepath sips --resampleWidth 270 $timestamp.png
Just put the script somewhere suitable, edit the permissions to make it executable (
chmod u+x screenshot.sh), attach your device via USB, make sure it’s debuggable, then run the script. The Android SDK comes with adb (android debug bridge) which allows you to take and grab the screenshot, then Apple’s own sips (scriptable image processing system full guide here) takes the image file and scales it down to 270 pixels wide (while maintaining the image ratio).