Software Engineering

Android Application Development Tips: Pull screenshot with ADB

For some reason, pulling screenshots in the DDMS view in Eclipse doesn’t always work. In that case, the following calls became handy (tested with HTC Hero):
adb pull /dev/graphics/fb0 fb0
dd bs=1920 count=800 if=fb0 of=fb0b
ffmpeg -vframes 1 -vcodec rawvideo -f rawvideo -pix_fmt rgb565 -s 320x480 -i fb0 -f image2 -vcodec png image.png

More examples available at the source.

1 Comment

Comments are closed.