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.

Answers


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.

EDIT:

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


Need Your Help

Loading css using JavaFX null pointer exception in eclipse

java javafx-2 javafx

I'm trying to load a CSS file into JavaFX using this line of code and it gives me a null pointer exception:

Python parsing tac_plus configuration file

python parsing configuration

I'm trying to find the best way to parse the configuration file for tac_plus.It would be good to be able to transform it to JSON format so that I can store it in a NoSQL DB.