Android Rooted how to run ASL(Android screenshot library) without running service(run.bat) from PC?
I am wondering to develop an app which is having the same functionality of ASL(Android Screen Shot Library ).To run the ASL first we need to invoke the service from our Adb . I want to avoid that and also instead of that i want to keep the ASL-native file in the mobile itself. as well as want to invoke the service from our app . How to do it ??
Note: I am trying on rooted mobile support alone.
If your device is rooted, then avoid use of ASL just make a service which can read framebuffer of device and make a image(png or jpg) file from it. Just look at the code of ASL and fb2png how they read framebuffer and convert it to image.
Also ddmlib help you, it is a library used by Android DDMS for image capture functionality.
On Rooted Device
process = Runtime.getRuntime().exec("su -c cat /dev/graphics/fb0"); InputStream is = process.getInputStream();
And also in manifest file give permission: READ_FRAMEBUFFER