Battery optimization using the cloud [possibly]

Rebel 3.0
56
44

Battery optimization using the cloud [possibly]

So I know they are in the works of something but I'm not sure if they are going for this kind of implementation or another. I think a lot of applications on android are either abusive with battery by using wakelocks when they shouldn't be (screen is off for example) or the constantly wake up the device by using high priority alarms when not needed to abuse overriding doze. I've had plans to make this into my own cyanogenmod but I don't have the time with the low paying job I have now and it doesn't even have much to do with android (makes me cry please hire me nextbit although I live in florida). Anyways, So I have some solutions that could help with these problems without messing with doze. 

         First, make a service that runs in the background that pretty much uploads statistics to the cloud. I know what you guys are thinking, "what statistics?" but has anyone here used amplify with xposed framework? yea, those statistics along with another dataset that matches wake locks and alarms to specific apps that envoke those wakelocks and alarms. Now we have a cloud system that knows which alarms and wakelocks belong to what apps on your phone along with how long each wakelock is held for and how many times those alarms are getting called per app. NOW using this information and cross refering the data set that contains which app these wakelocks and alarms belong to, we can now do something like what amplify does, LIMIT how often the wakelocks and alarms from those specific apps are allowed to occur!! Think about it, we can have a user interface that allows users to prioritize how recent they want notifications from each app and then have all wakelocks and alarms in "levels" of sync. For example, lets say I have facebook, pokemon go (love it), messenger, and of course the dreaded google play services. This system will only take effect while the phone is in your pocket and NOT still on a table or something because that would interfere with doze (a lot of doze stuff will be better in android N anyways). Back to the level of sync, lets say that we have the following levels: Every minute, Every 5 minutes, Every 15 minutes, Every 30 minutes, Every Hour, etc. 

We can add as many or little levels as we want for this system to work but the important thing here is to keep all wakelocks and alarms in sync with these levels so facebook for example, I can select in settings to refresh every so often BUT it doesn't mean it'll refresh in sync with every other app I have in my phone. This is where the system comes in, I want facebook to refresh every 1 hour, BAM it gets put in sync with every other app to sync at the exact same time in 1 hour. Messenger I want my messages to be very recent but not so much so that it can't wait a few minutes, I would put it in the 15 minutes category or even 5 minutes. pokemon go I'd group it with messenger as I want it to run as often without being such a battery drain. Google play services is a toss up, google doesn't like people messing with is since it has apis that many apps and services rely on but I would like to do the same for the dreaded passive battery saving gps poll rates at around maybe 5-15 minute tracks. Now this system basically has everything in sync and lets say nothing is put in the 1 minute sync, so what happens between every 5 minutes? 15? 60 minutes? pretty much every 5 minutes, the 5 minute sync apps will run, after 3 rounds of 5  the 15 minute apps will run along the 5 minute track, and in an hour all 3 tracks will run (5, 15 and 60 minute track) but in between the times the phone will be kept in deep sleep mode of some sort (possibly with a kernel that allows for a lower core clock and possibly hotplugging off all cores except the 2 in the quad core low power core in the snapdragon 808) and then turning on all low power quad core whenever we have these doze-like maintence periods WHILE the phone screen is off and not stationary (most likely in pocket). So basically this algorithm is more or less what people who mod their phone and root as well as installed xposed framework do when they want to minimize battery usage from my point of view. It would be great if the cloud could be used to make this kind of mindless task work in the background in the cloud and then make a push call to the robin that enters all these parameters for each app to optimize battery life without much intervention from the user. It can even be taken a step further by allowing the system to "learn" your habits and automatically make these choices for you, for example maybe you get on messenger a lot in late afternoone and night but not so much in the morning or lunch. So then it would make a dynamically changing sync track for messenger where it be in the 1 hour or 30 minute track from 8 am - 5pm and then on the 5 minute track from 5pm - 10pm when you go to bed and your device in charging on a table and doze finally kicks in for the rest of the night. Honestly for a beta test or something like this, I would use kubernetes with docker containers for each specific part of this algorithm using golang since it's so easy to execute async threads and the threads are MUCH lighter than something like java threads. Let me know what you guys think, I was going to add at least 2 other things they could use the cloud for battery optimization but I got a little tired of typing so I might reply to this post and make another statement. I know it might be not be in the best interest of developers but I think the consumer should have the choice whether they want the synchronize their data in batch or not and some developers don't take into account other apps that are installed on the phone and neither does the android OS to an extent. I think the OS should be smart enough to say "Hey these apps are all requesting data every minute, maybe I should sync them all every minute" rather than "this app is requesting data *syncs* *30 secs later* this app is requesting data *syncs*". Sorry for the long post XD Let me know what you guys think, I know that android N has more doze improvements but we lose most of our battery when the device isn't stationary and this is my take to a solution to squeeze every ounce of battery we can from our devices. I have more ideas but I want to hear what you guys think. (Nextbit I need a job pls, I can make you guys rich)

6 REPLIES
Rebel 3.0
56
44

Re: Battery optimization using the cloud [possibly]

[ Edited ]

Already graduated with a BS degree in computer science btw nextbit Smiley Wink 

Rebel 3.6
334
97

Re: Battery optimization using the cloud [possibly]

[ Edited ]

Note : Hey OP, I am not trying to be rude or offensive. Please don't read this post in an arrogant voice. Most might not read your post completely, and ignore what you are trying to imply. I am just trying to make it simple to read so if they think its interesting, they would read your post for details and not ignore your ideas completely.

 

P.S. : The only harsh thing I will say is, your post formatting skills are horrible. Sorry.

 

-

tl;dr :

- Add a layer of background process which monitors app statistics/notifications and allows users to choose which app gives how many notifications every few minutes or hours to stop constant notifications of apps you didn't want too much in the first place and avoid wakelocks(?)

- Limit background sync of (battery hogging)apps to once in few minutes or few hours.

- Manual control over Doze mode. i.e. Force the Doze mode even if hasn't been 30 minutes of idle.

- OP's coverletter which covers as to how OP would implement the beta if OP is hired.

 

-----------

I think the more deep the integration goes, the UI keeps getting heavy and eventually comes a point where the hardware needs to be upgraded for smooth performance. And this rises the cost, the recent barrage of cheap near stock UI phones are the example. They just add a layer of UI without changing the UX and they are done to make sure Android runs the best it can.

 

Adding more UI also makes it difficult for manufacturers to provide quick updates. I think nextbit is trying ot avoid that and I do not diasgree with that.

 

Most of what you said can be achieved by some or the other apps and obviously once rooted its far more easy to achieve.  At the top of my head, Amplify, Xprivacy and Greenify combined would achieve 70% of what you explained. But these are quite advanced apps with configuration that would require a lot of days of proper usage until you know exactly how it works for you and nextbit can't really provide something so complicated that only users like us who are well versed with all this would know what to do. Most might not care about this, as it would require quite a setup for almost every app.

 

Being said that if battery optimisation can be done without comprising all this, it is always welcome.

Rebel 3.0
56
44

Re: Battery optimization using the cloud [possibly]

I agree, I know that applications with xposed framework are there but this is my thought process on how to automate it kinda like how people use tasker to automate some tasks. Plus I got inspired from the video from the kickstarter which was "But no one is building a smart smartphone" which made me think, why do some machine learning research on this? like I can imagine how it could be set up with a server collecting all this data to create a self learning phone that knows to do this automatically for you. Originally I wanted to make a PC client so people could host this solution on their own computers but I don't really have time to do that with my job. I'm also sorry for the format that I layed out my idea, I was never good with words but to me it seems like it's a field of research that should be looked at. I also have some ideas about using Robin's camera with the cloud as well.

Rebel 3.0
56
44

Re: Battery optimization using the cloud [possibly]

I also feel like there is something odd with how the UI is handled and rendered using the snapdragon 808. I feel like the global scheduler isn't doing as good as it should be. wouldn't it be better to have 2 cores dedicated to UI? or rather have the UI run on the BIG cores at expense of battery? Just some thoughts that ran through my head while I tried out robin on stock I felt a little jitter on the UI. 

Rebel 3.6
334
97

Re: Battery optimization using the cloud [possibly]


LiquidShadowFox wrote:

I also feel like there is something odd with how the UI is handled and rendered using the snapdragon 808. I feel like the global scheduler isn't doing as good as it should be. wouldn't it be better to have 2 cores dedicated to UI? or rather have the UI run on the BIG cores at expense of battery? Just some thoughts that ran through my head while I tried out robin on stock I felt a little jitter on the UI. 


From my understanding this is what iOS does since its inception. The precedence is given to the UI which is why no matter how weak(in comparision) the hardware is, it always feels smooth and stable.

 

Had you tried any other launcher while on stock? You had the same jittery feeling? I could just the nextbit home launcher.

Rebel 3.0
56
44

Re: Battery optimization using the cloud [possibly]

I used google launcher, nextbit home has more occasional jitter. I play a lot of video games at 60 frames so I notice when the fps drop switching from home screen to google now, I switched to cyanogen mod, it never happens when set to performance mode but that drains much more battery since the cores are constantly at max frequency.