We need to find a way to capture Android screen, without using any external software, which will work on a non-rooted phone.
My research shows that there is no way to do that. In any way, you should have root permissions, to be able to capture device's screen.
Further research, however, shows, that there is a way for limited number of devices, to do that, without having root privileges. As a proof I can bring following application on Android market: Screenshot UX.
It claims, that app doesn't need root permissions for capturing screen on following devices:
- Gallaxy series (S,S2,...)
- HTC phones (Sensation, ...)
- Motorola (Atrix, ...).
- LG Optimus series (G2X, ...)
Some say, that Tegra devices support that also.
Could anyone point on some documentation, at least on specific devices, so we can at least support HTC phones, for example.
EDIT: For now we are trying to use "/system/bin/screencap", with no success on emulator though. Does availability of taking screenshots on some certain devices just means that they allow to use "/system/bin/screencap" or read directly from /dev/graphics/fb0?
Or they give some API for taking screenshots?
Thanks.
Screen capturing is an old and much discussed topic on android. Over the last years few major options developed:
Running screencap on rooted devices, But you already know this.
Running screencap and siginging your application with system certificate:
There is a permission READ_FRAME_BUFFER but you only can obtain it when your apps are signed as system application.
But Since Android 5 things have changed.
The devices you mentioned are quite old and I doubt that they got an official update to android 5, this leaves you with the 2nd option.