Android: How can you get framebuffer (screenshot) on rooted device?

后端 未结 2 1952
星月不相逢
星月不相逢 2020-12-29 10:39

I tried :

process = Runtime.getRuntime().exec(\"su -c cat /dev/graphics/fb0 > /sdcard/frame.raw\");
process.waitFor();

but it doesn\'t w

2条回答
  •  南方客
    南方客 (楼主)
    2020-12-29 11:11

    The answer lies in replicating the way the device itself handles it:

    fb = open("/dev/graphics/fb0", O_RDONLY);

    check this

提交回复
热议问题