My goal is to be able to enter a command from a single word and get a screenshot from the root Nexus One connected by USB.
So far I can get the framebuffer, which, in my opinion, is a 32bit xRGB888 raw image by pulling it like this:
adb pull /dev/graphics/fb0 fb0
From there, however, it is difficult for me to translate it into png. I am trying with ffmpeg like this:
ffmpeg -vframes 1 -vcodec rawvideo -f rawvideo -pix_fmt rgb8888 -s 480x800 -i fb0 -f image2 -vcodec png image.png
This creates a beautiful purple image that has parts that vaguely resemble the screen, but it is by no means a clean screenshot.
android ffmpeg graphics screenshot
Marcus May 10, '10 at 23:16 2010-05-10 23:16
source share