Access the Android framebuffer (and other Linux systems) by opening the device / dev / graphics / fb 0. This requires root access, and even when using root, it will not work properly on all devices. Most devices use a pair of framebuffers and switch between them. The big problem is that even with a root phone, the Dalvik machine user ID does not have access to the frame buffer device (fb0). This means that you can never open and read from fb0 directly from Java code. You will need to run your own linux application with root privileges and it will be able to access fb0 (after the user gives permission). I managed to make this work, and it is rather complicated, and also frowned on Google. I can still potentially turn this into a commercial application, but limitations and incompatibilities make the probability pretty low.
source share