Skip to content

Instantly share code, notes, and snippets.

@tonyseek
Created May 9, 2015 14:18
Show Gist options
  • Select an option

  • Save tonyseek/1f227e2e564b9837f18d to your computer and use it in GitHub Desktop.

Select an option

Save tonyseek/1f227e2e564b9837f18d to your computer and use it in GitHub Desktop.
Capture screen of Android devices with adb
#!/usr/bin/env sh
if [ -z $1 ]; then
echo "usage: $0 FILENAME.png" > /dev/stderr
exit 1
fi
adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment