Screenshot of the Nexus One from adb?
Posted
by Marcus
on Stack Overflow
See other posts from Stack Overflow
or by Marcus
Published on 2010-05-10T23:16:20Z
Indexed on
2010/05/10
23:34 UTC
Read the original article
Hit count: 381
My goal is to be able to type a one word command and get a screenshot from a rooted Nexus One attached by USB.
So far, I can get the framebuffer which I believe is a 32bit xRGB888 raw image by pulling it like this:
adb pull /dev/graphics/fb0 fb0
From there though, I'm having a hard time getting it converted to a png. I'm 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
That creates a lovely purple image that has parts that vaguely resemble the screen, but it's by no means a clean screenshot.
© Stack Overflow or respective owner