Created
July 7, 2016 06:58
-
-
Save dbalan/e58f51b713bfd6d711fd02061e27ca90 to your computer and use it in GitHub Desktop.
Get screenshot from a pre ICS android.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# works only with linux, depends on ffmpeg and android-tools installed. | |
# both `which ffmpeg` and `which adb` should return 0 | |
set -e -x | |
if [[ $# != 1 ]]; then | |
echo "Usage: $0 filename.png" | |
exit 0 | |
fi | |
adb pull /dev/graphics/fb0 /tmp/tmpfbgrab | |
ffmpeg -vcodec rawvideo -f rawvideo -pix_fmt rgb32 -s 320x480 -i /tmp/tmpfbgrab -f image2 -vcodec png $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment