|Screen Capture in Android (Native)||Subhadeep Ghosh||1/7/13 4:28 AM|
I was trying to develop a screen capturing utility for non-rooted Android devices. I am aware that there are a number of such utilities available (in-fact Android itself comes with a set of default utilities such as screencap or screenshot). However, at this point I would like to mention that it is a part of a bigger application (more on that, some other time).
To capture the screen I am opening the frame-buffer device, querying the properties such as screen width, height and bits per pixel and the reading from the device to get the raw frame-buffer. I tried this on an Sony Experia Arc S (LT18i) and it worked perfectly. Then I tried it on a Samsung Galaxy Tab 750 (GT-P7500) and the screenshot always contains a black screen with "Samsung Galaxy Tab 750" written in it.
So, could you guys please help me and let me know where I might be going wrong.
Thank you in advance,
|Re: Screen Capture in Android (Native)||Digit||1/15/13 5:44 AM|
The fact that you can open the framebuffer without root is probably a bug in the Experia Arc S system image (and possibly a security issue).
Applications are _not_ allowed to capture the screen by default for security reasons. This is a by design. Otherwise, a lot of evil behaviour becomes possible / trivial, including the stealing of any user passwords typed on the device (given the default behaviour of displaying one character briefly in this case).
Another point is that nowadays, most devices don't have a framebuffer, or simply do not use it. Instead, everything goes through the GLES libraries / GPU which use completely different memory banks that are not directly accessible by the kernel. That may be what you're encoutering with the Galaxy Tab.
|Re: Screen Capture in Android (Native)||nikesh devaki||12/11/14 7:05 PM|
Inspite of suggestion from Digit, that its not good idea to use frame buffer, I wanted to convert raw image to any viewable format. So please tell me your approach in converting raw format. Snippet to convert frame buffer will be helpful. Thank u.