how do I read and write the framebuffer screen without errors?

ruleh

Senior Member
Jan 12, 2015
344
213
0
The error is normal and the expected behaviour because you are writing more data to the framebuffer than actually fits on it.
However I assume you see no change to the displayed image despite writing to the framebuffer. (I see no change on my display.)
I think this might be because surfaceflinger takes full control of the framebuffer and replaces the static noise (caused by cat /dev/urandom) with a composited android screen image before refreshing the screen.

As for the correct way to write to the framebuffer:
I think you need to kill surfaceflinger first (and make sure it doesn't restart) and then use the cat command(though the error will remain). Alternatively you can write a small program in C that does the same by opening fb0, mapping it to memory and then writing onto that.

To read from fb0, a simple "cat /dev/graphics/fb0 > /sdcard/fbimage" should work.


However I am not too sure about most of this.