manju manju - 13 days ago 20
Android Question

How to capture the screen using /dev/graphics/fb0 (Android)

How to capture the Android device screen content using

/dev/graphics/fb0
and how to make it an image file using the collected data from frame buffer. I know for this it requires the device to be rooted and I am ok with that.

Thanks in advance,

Answer

This should work:

adb pull /dev/graphics/fb0 fb0
ffmpeg -vframes 1 -vcodec rawvideo -f rawvideo -pix_fmt rgb32 -s 320x480 -i fb0 -f image2 -vcodec png image.png
Comments