dimanche 18 septembre 2016

[App][2.2+] Event based script runner + GPS on / off to significantly save battery

As I moved from Windows Phone to Android, I expect Android to be extremely more powerful than Windows Phone. But the very first two issues I have met ware, 1. Apps on SD card won't be able to automatically start after a device restart. 2. I always would like to store all pictures on SD card, but some apps may randomly store files in different places. So I started "event based script runner" (used to be init) to simply execute an sh script when a certain event triggered. Such as device has been booted, screen is on / off, user unlocked device, etc. Then I would be able to do whatever I want without need to change the application itself.
It works well for me, as I can move files regularly, change between vibrate / normal ringer mode at certain time - though not so accurate, but acceptable.
After some investigation, I realize, GPS is a key battery killer. So I consider to write another no-UI application, which provides two activities to turn GPS on / off. Then I can use the event based script runner to execute GPS on / off commands when the screen is on / off. I do not need to manually switch GPS on / off anymore.
This approach works even better than I expected, now my phone can last almost four days with regular usage, i.e. some twenty or thirty SMSes, some twenty or thirty minutes of phone calls, navigating sometimes, etc. I do not need to worry about GMS to drain my battery during the night. The phone usually uses 0% battery during a seven or eight hours idle in the evening. See the first screenshot. And it can be achieved by a very minimal change to the OS, only move one application to the priv-app.

You will need to have some basic linux knowledge to use these tools, though I do not think it's complex. A sample is @ http://ift.tt/2d9z4tI, which contains exactly what I am using now.

I would like to share these applications here.
1. Event based script runner,
http://ift.tt/2d9yEnt
2. [Root] GPS on / off
You will need to put it in priv-app or app (for old OS) folder
http://ift.tt/2d9yXyx
3. Change ringer mode
http://ift.tt/2d9zoZz

Attached Thumbnails
Click image for larger version Name: Screenshot_2016-09-13-16-50-26.png Views: N/A Size: 83.1 KB ID: 3879594  


from xda-developers http://ift.tt/2cITOKW
via IFTTT

Aucun commentaire:

Enregistrer un commentaire