Sunday, August 30, 2009

Android: patch adb to get screenshot

In system/core/adb, you can find the adb source. framebuffer_service.c shows the way to communicate with adbd.

Download patch...

After recompile your adb, use following command:
$ ./adb framebuffer 2>&1 | tee > screen.rgb
You now get a raw rgb image. Further convert it to png:

$ ffmpeg -pix_fmt rgb565 -s 480x800 -f rawvideo -i screen.rgb -f image2 -y test.png

2 comments:

David Wegmuller said...

Do you have an updated patch to match the newer versions of adb? patching arecent version (2 days old) fails...

David Wegmuller said...
This comment has been removed by the author.
Related Posts Plugin for WordPress, Blogger...