yashsingh1/xdaforums huggingface dataset:
[Android General] :
I must say that my battery drain is also higher on Nougat than it was in Marshmallow (on the same exact device). I am obsessed about optimization so the drain is still objectively very low (just 0.4% / h) but in Marshmallow with Xposed and Amplify I was able to achieve as low as 0.2% per hour.

Two tips I can give for sure are as follows.

1. Disable location (or switch to GPS only) when screen is off. I use Automagic to do it, but any automation app (Tasker, Llama, etc.) should suffice. Then re-enable it on screen unlock.

2. Use microG instead of Google Play Services. There are still several limitations so be sure to read the instructions carefully before installation. MicroG has a brilliant function which in fact replaces the Greenify's GCM push that normally requires Xposed to work. When a GCM push is received, microG actually wakes up apps (starts them in background) so that they are able to receive the pushed notification, even if they have been greenified before. This is not the case when using Google Play Services which does not wake up greenified apps, and the notifications are lost.

It all depends on what kind of apps you use, but in my case I use a messanger app which uses both GCM and its own polling system at same time to receive notifications. Normally, it literally devours the battery :p so greenifying it is a must. Thanks to microG I am able to greenify the app and still receive all the notifications through GCM without draining the battery so much.
[Android General] Oswald Boelcke:
Thanks very much for the clear and valid points and suggestions to @tanago. I replied here as I deemed my answer to be too off-topic for this thread.
[Android General] :
I love your analogy to aspirin and its value presently. Makes me wonder if you are involved in the medical field by any chance in your life away from this digital world.
[Android General] Oswald Boelcke:
Negative, not at all. But in my business you always try to go for the causes and sources.
[Android General] AlemanSantos:
never used amplify so i cant make a comparison, but im using wakeblock on my op3, with Zenity RR rom, and yes, it works without xposed and you can block wakelock for a certain amount of time (in miliseconds) or always
[Android General] :
Interesting
[Android General] speedy56:
Guys, please help

I've got some problems with context_manager_alarm_wakeup_xxxxxx

I've set some regex' in Amplify but neither of them seems to block them properly ?

What should I do?

Tnx ind advance http://cloud.tapatalk.com/s/5956995c30b0b/Screenshot_20170630-202933.png?
[Android General] DB126:
Initial response is leave them alone unless demonstrated to be a cause of excessive (operative word) battery drain. Wakelock requests do not always equate to actual/extended wake time. Small amounts of wake time during doze maintenance windows (or traditional sleep) typically do not have a significant impact on battery drain. Only way to assess impact is via BBS idle dump.
[Android General] RANJITH THRISSUR:
This is what I was able to achieve so far.. 0.3% per hour.. any chances of stretching it further??

My device is Samsung galaxy note 5 with khongloi v14 marshmallow custom Rom and skyhigh kernel. I have xposed+greenify + Amplify + power nap.
[Android General] DB126:
An idle dump (screen off -> screen on) is required for proper analysis. That said, 0.3% per hour average drain is typical for most contemporary devices without extreme limiting/tuning which offers minimal real-world benefit (perhaps a few more min of SoT) in relation to effort and likely side effects. Enjoy what you have accomplished to date.
[Android General] pawwaap:
Please, take a look into this special log: http://cloud.tapatalk.com/s/596487b5cd986/BetterBatteryStats-2017-07-11_090828329.txt ;)

It is "special" as it is made on Motorola Defy+ :)

Yes, this tiny phone (although with slim hardware: 1GHz single core processor and half GB RAM) is very useful in these hot summer days as it suits any smallest pocket and is water resistant :)

Yet it'd be nice if it preserved battery energy when idle (indeed, rarely used).

I have flashed JellyBean custom ROM, installed Xposed, Amplify, Greenify, Llama automation, however it still drains in DeepSleep 0.6%/h and BBS shows frequent wakeups from DeepSleep.

Please, help in achieving better results :)
[Android General] DB126:
Little can be derived from the BBS dump (truncated BTW). Low power device takes forever to complete routine tasks extending wake time on an older SOC and ROM not known for power efficiency. Battery age is likely contributing to accelerated rundown; Li-ion cells begin to break down after 3-4 years regard-less of usage; pocket heat doesn't help. 0.6%/hr average drain is respectable; enjoy your device for what it is and the service it has delivered over 6+ years.
[Android General] pawwaap:
It's cute and works incredibly well, I've bought two items for peanuts from an internet seller who sells regularly a bigger set and claims they are new (not used) and come from cleaned storage.

Indeed, they could have upgraded versions with at least 4 cores processor and 2GB RAM, but there is nothing relevant on the market nowadays, isn't there?

And it is possible to buy a brand new replacement battery, by "M-LIFE" manufacturer who promises increased capacity (compared to the original Motorola product). And I have ordered two today.

Please, advise, is there anything possible to do to curb this energy leaking?
[Android General] DB126:
As noted 0.6%/hr is reasonable given platform and ROM. Make sure WiFi and BT radios are disabled when away from home. You'll need to experiment a bit to see if WiFi or the mobile radio is more efficient in the presence of a friendly AP. It will be interesting to see what difference those replacement batteries make. Unless the form-factor is generic it is highly unlikely any manufacturer is cranking out low volumes of 6 year old battery packs.

Running any type of battery optimization app will likely be counter productive given device's limited resources. Even they you're not going to squeeze much more out of the hardware. Is what it is.

Plenty of cheap handsets on the market with 'better' specs. All depends what you're looking for. Size and water resistance are DEFY+ defining chacteristics that may be hard to match.

Good luck.
[Android General] pawwaap:
You know, I have researched the internet to find as much small RAM footprint apps as possible in any category (EMAIL, WEB BROWSER, WEATHER, TOOLBOX, CALL RECORDER) and then removed their components (activities, receivers, providers, services) not much useful. After it each application takes <10MB of RAM, and works fine :)

Yet only LAUNCHER (Nova) doesn't fit into this collection (50MB of RAM), would you recommend any other lightweight one?

Also, I hesitate which optimization solution to choose:

- Greenify (15MB),

- Amplify (<10MB) & Llama (<10MB), or

- DeepSleep battery saver (11MB)?

Presently testing particular apps, one by one, must choose one because they together couldn't squeeze in ;)

And except choosing best optimization application, much depends how to configure it properly. It is why asking you for help ;)

Especially, would Greenify do battery optimization job and to the satisfactory extent? And how to configure it in such way?
[Android General] peterlee928:
whats your phone and os?
[Android General] DB126:
I would only consider Greenify. Package size is irrelevant; memory footprint and resource consumption is all that matters. Not a fan of Amplify nor was their any indication you would benefit from it (same comment applies to Greenify BTW). Personally not interesting in taking on project to optimize JB on a 6 year old device. Read through the thread for guidance, especially the first half dozen posts.
[Android General] pawwaap:
Motorola Defy+, JellyBean custom ROM :)

And is the best in its segment (little waterresistant), if you see better one (in this size) please write about it ;)
[Android General] peterlee928:
gotcha. cant recommend a better phone. but i used the note 3 for years. used biggins rom which was absolutely fantastic on battery life. if i recall correctly, i used jb rom and found it to be worse on my battery life than biggins. if biggins rom is compatible with your phone, i would highly recommend giving it a try as your daily driver.

i used amplify with the note 3/biggins rom combo... and frankly had mixed results at best. and all i did was follow basic guidelines that were posted in xda threads. so i personally just go with greenify now (albeit on a pixel xl) and dont even use aggressive doze.

that said, some amplify users swear by it... so the ultimate decision will require a bit of trial and error for each specific phone and the users specific needs.

but as davey126 said, your phone doesnt exhibit any above-average battery drain. so a simpler solution (eg greenify with basic settings) may prove more optimal that a more "convoluted" option.
[Android General] pawwaap:
And which Note3 have you used:

Xiaomi Redmi,

Coolpad, or

Samsung Galaxy? ;)

Except Greenify run Amplify with Llama. And maybe it's much but Llama has small RAM footprint (<9MB) and wanted to play a little with it. It has many nice features, especially regarding location by cell towers, and works amazingly stable :)
[Android General] peterlee928:
samsung galaxy.

good that amplify is working well for you ?
[Android General] pawwaap:
And what about KittyKat? Elsewhere there is [Kitkat][Nightlies] CM11 Android 4.4 for the Defy(+) with the newest update as new as cm-11-20161124-NIGHTLY-mb52x.

Any better than JB (custom ROM too), how do you think?

Please, advise me, as this custom JellyBean with Llama and Amplify, and after adding the next two alarms in Amplify to disable during screen OFF, now yields 0.2%/h.

And maybe there is another rationale to change to this KittyKat cm-11-20161124-NIGHTLY, what do you think?
[Android General] peterlee928:
i havent tried that specific rom as i do not have the defy phone.
[Android General] RANJITH THRISSUR:
Now idle drain improved up to 0.2 per hour..

Any chances of further improvements??
[Android General] peterlee928:
as [MENTION=5488402]Davey126[/MENTION] said about a week ago:

1) an idle dump (screen off -> screen on) is required for proper analysis

2) without extreme limiting/tuning that may have an adverse effect on your phone functionality with limited benefits, your average drain rate is typical for most newer devices

you lowered your average drain rate from 0.3%/hr to 0.2%/hr. the real questions are:

1) was the "payoff" from saving that 0.1%/hr worth all the trouble that went into achieving this result?

2) more importantly - how much of that 0.1%/hr savings is real vs artificial eg was there a burst of activity (and associated immediate 1-2% battery drain) when your phone woke up, which would indicate that the savings was artificial
[Android General] RANJITH THRISSUR:
I didn't change anything except..i changed kernel now it's nemesis kernel
[Android General] pawwaap:
Please, just one question: what about disabling "AlarmManager (Android System)" wakelock only when screen is OFF (with Amplify & automation app)?
[Android General] DB126:
Kernels can (but usually do not) have a measurable impact on power consumption. Report back after few charge/discharge cycles. Be interested to see if they outcome is repeatable. Don't forget to include a 2 min sample after the device wakes in the analysis.
[Android General] zputnyq:
I think u'd better not disabling or reducing it. I have read 3 threads about using amplify & all don't recommend to disable or reduce it.
[Android General] pawwaap:
And maybe they assume "static" reducing it i.e. Amplify is without any automation application?

And what meant is disabling AlarmManager just for ScreeOff period and reenabling while screen is ON, what then, any harm and which precisely, how much acceptable?
[Android General] zputnyq:
Actually I just do what they have stated but with a little bit modification on timing which I usually lowering it to prevent some misbehaviour.

Timer that set by Amplify seems working on both side, screen off & on. So I think automation won't bring big effect on what u wanna do. Correct me if I'm wrong on this.

For alarm manager, I observe it through WLD, some apps or even most apps is always accompanied by this wakelock, but u can still try it
[Android General] DB126:
Fools errand; leave it alone.
[Android General] pawwaap:
Aha, if so help to find source of the problem: idle drain 0.7%/h, in the same Motorola Defy+ but with the newest custom ROM for the model: cm-11-20161124-NIGHTLY-mb52x.zip which is basically custom KittyKat.

Please look into log here: http://cloud.tapatalk.com/s/596d40c46b462/BetterBatteryStats-2017-07-18_003354291.txt

It is only over an hour but result is the same like in many much longer tests done previously.

It is with Amplify managed by Llama, many alarms and wakelocks are blocked when screen is OFF but reenabled when screen comes ON. As you can see it's done too little, what to block yet? ;)
[Android General] DB126:
Log is too short for meaningful analysis (should be at least 6 hours untouched). However, there were no red flags in the snippet provided. Device and ROM performing normally.
[Android General] pawwaap:
If so, what is draining the phone so excessively compared to the previous ROM, JellyBean, in which with the same Amplify & Llama configuration I had achieved 0.2-0.1%/h?

You had said then about "Android version not known from power efficiency", does it mean JellyBean is even better power efficient than this KitKat?
[Android General] DB126:
Log ran for ~90 min resulting in a reported 1% (rounded) drop in battery level. But the drop could have been anywhere from 0.51% to 1.49% yielding a much different picture:

- 0.51%/1.5h = 0.34% per hour

- 1.49%/1.5h = 0.99% per hour

But wait - it's even worse. Let's say the battery was at 54.51% at the start of the run and 54.49% at the end which would have been reported as 55% and 54%, respectively by Android. BBS would calculate 0.7% per hour when the real drain was 0.013%! One reason why longer sampling periods are needed to reduce the impact of resolution and rounding. Not to mention non-linear discharge which is artifically amplified by shorter windows.

Note to purests: I have no direct knowledge of Android's rounding algorithm or whether higher resolution values are available outside BBS. In the end it does not matter where the rounding (or cutoff) occurs, or if values reported down to the hundredths are available elsewhere. People react to what they can see.
[Android General] pawwaap:
And yet here is the log for the next 3¾h, as you can see it confirms the result: 0.8%/h: http://cloud.tapatalk.com/s/596d7d2be7257/BetterBatteryStats-2017-07-18_042752697.txt

As I said: done many such tests before even longer and with even worse results.
[Android General] DB126:
Again - nothing notable in the log. If you got better results before perhaps the ROM and/or kernel was a better fit for your device. Or there is a drain BBS isn't seeing. Also keep in mind I'm only scanning for outliers as chasing down and 'containing' minor drainers is not worth the effort IMHO. Feel free to explore the first half dozen posts in this threads if you feel differently. Finally, your 6 year old device does not present a leverageable learning opportunity. Best of luck.
[Android General] :
[MENTION=5488402]Davey126[/MENTION]

I come here just to read your comments. Lol. Such vocabulary, much wow. :D
[Android General] :
Just to be clear, the drain in the previous ROM was actually 0.6%/h (https://uploads.tapatalk-cdn.com/files-1456/BetterBatteryStats-2017-07-11_090828329.txt). Now it is is 0.8%/h (https://uploads.tapatalk-cdn.com/files-1456/BetterBatteryStats-2017-07-18_042752697.txt).

I would not make any conclusions on these samples though. Above all, the time is too short. It should be at least 6+ hours in both cases to accurately compare the results. Also, battery drain is not linear, and the reported percentage is really not a precise measure of the actual state of the battery. That is why it is normally recommended to charge the battery to maximum (100%) and only start measuring from there. Lastly, a newer ROM / kernel does not necessarily mean that it is better in terms of battery life, i.e. the old one may perform better in this aspect.

Nevertheless, I would say that in order to have a meaningful comparison you really should follow the instructions listed in the beginning of the thread under "Establish Baseline" first, and then draw conclusions.
[Android General] pawwaap:
Yes, the previous log attached (i.e.with previous ROM) was yet before adding few further alarms&wakelocks into Amplify hit list (fired with Llama when screen OFF) and it eventually managed to got the result 0.1%/h for 10h idle testing (please, believe me although maybe I find the log files somewhere in I the SD card).

And in this ROM there are different alarms&wakelocks names so it is tricky to simply reproduce the result.

Yes, indeed, they should be collected and cited on Cambridge English lectures :)
[Android General] DB126:
Fully agree! Both points are often overlooked.

Alternatively, use a relatively consistent start point somewhere between 50% and 95% as the nonlinearities are more common during the first 5% and last 25% of discharge.

---------- Post added at 12:46 PM ---------- Previous post was at 12:32 PM ----------

Yikes - now I'm all self-conscious and shiz. Kidding aside, humbled by the kind words. :)
[Android General] pawwaap:
Again, please ;)

http://cloud.tapatalk.com/s/596f143c3b14d/BetterBatteryStats-2017-07-19_094930967.txt

In this log, it intrigues:

- Awake (Screen Off) (): 4 m 9 s 1.7%

Why for so long is it awaken?[ Previous ROM has it just 1 minute or less.[

- Kernel Wakelocks

================

"PowerManagerService.WakeLocks" (): 1 m 2 s Cnt:(c/wc/ec)15/0/0 0.4%

Possible to limit it in any way?

- Alarms (requires BATTERY_STATS permissions)

======================

com.kebab.Llama (): Wakeups: 9 (2.2 / h)

Alarms: 9, Intent: {com.kebab.Llama/com.kebab.Llama.RtcReceiver}

As you can see Llama has 9 alarms, why so many and what do to with them if they are the culprit?
[Android General] peterlee928:
lets take a step back - if this rom isnt satisfying your needs in terms of battery life as compared to the prior rom, then does it make sense to simply switch back to the prior rom?

in my experience, not every rom provides the same battery life on the same phone. each rom has its own unique features and processes that impact battery life.

with all that said and with the caveat that your dumpfile wasnt at least 6 hours, there dont appear to be any red flags in your dumpfile.
[Android General] pawwaap:
And this ROM has other advantages, e.g. as KitKat it has full market support (vs JellyBean). Isn't really anything to do to curb its wakelocks?
[Android General] :
Have you tried PowerNap or Deep Sleep Battery Saver (both xposed modules)?
[Android General] pawwaap:
PowerNap or DeepSleepBatterySaver, can they do better than Amplify controlled by Llama (and now also with Greenify combined)? And why?

And how to run them: solely or in combination with other battery optimization apps? And which combination do you advise?

And look: http://cloud.tapatalk.com/s/596f34c16bed8/BetterBatteryStats-2017-07-19_122206610.txt

I've disabled events triggered by cell towers based location in Llama and now idle drain dropped to 0.4%/h (and there aren't any Llama alarms reported in this log). Is Llama the enemy or just few options of it?

It's pity, liked this tower location triggers in Llama, however they should run only in awake phone state (absolutely no need to run them in idle state) how to hibernate Llama when screen is OFF (Greenify can't do it: "NOT HIBERNATING AUTOMATICALLY")?
[Android General] pawwaap:
In Amplify there is alarm listed: com.kebab.Llama/.RtcReceiver

Is it responsible for Llama's cell towers tracking?

I've just putted it into Action to disable through Amplify during ScreeOFF.

In this way Llama will switch its alarm ON and OFF depending of screen state. Is it going to work, how do you think? ;)
[Android General] zputnyq:
Perhaps this link could help how to combine powernap, greenify & amplify

https://xdaforums.com/crossdevice-dev/sony/existenz-hacks-tweaks-battery-life-t3516705
[Android General] pawwaap:
And this doesn't include any automation application, what must be game changer combined with Amplify
[Android General] peterlee928:
you can manually hibernate an app in greenify, even if it doesnt hibernate automatically.
[Android General] pawwaap:
You mean Llama can hibernate itself via Greenify plug-in interface, don't you?

Yes, it works, and the problem is it stays hibernated after ScreenON.

(Even there is WakeUp from the same plug-in interface, but how can Llama wake up itself when is hibernated? ;))
[Android General] pawwaap:
Yes, just have tried it, i.e. DeepSleepBatterySaver, combined with Amplify&Llama.

Effect of it is much worse than Amplify&Llama alone (1.6% vs 0.6%/h).
[Android General] DE SEXIEST:
Is there anyway you can do this without root?

Just asking though
[Android General] peterlee928:
do what?
[Android General] Oswald Boelcke:
Obviously not as Xposed is required.
[Android General] akhilkgeorge93:
Nope root is just an entrance to the world of development tomorrow
[Android General] DB126:
First step is to see if "this" is needed as most modern devices doze/idle/sleep just fine without jumping through hoops. See procedure in post #3 to create a baseline. As for your primary question some actions (if needed) can be taken without root depending on identified drainers and version of Android.
[Android General] pawwaap:
Please, again ;) look into log for 9h: http://cloud.tapatalk.com/s/5971cfc64b483/BetterBatteryStats-2017-07-21_114715081.txt

It's strange, what keeps device awaken for 10 minutes?

And what is this:

GKI_LOCK_TIMER_1" (): 1 m 6 s Cnt:(c/wc/ec)3657/0/396 0.2%

?
[Android General] RANJITH THRISSUR:
Please find the the attachment its around 6 hrs.. with idle drain 0.3 per hour
[Android General] RANJITH THRISSUR:
It's pretty consistent at 0.3 per hour
[Android General] DB126:
Looks good; 0.3% is quite respectable. Only comment is to insure 'Doze on the go' is enabled in Greenify settings (can't tell from log).
[Android General] RANJITH THRISSUR:
Thanks.. doze on the go is enabled always.
[Android General] pawwaap:
A question please: what about RtcWakeLock, safe to limit during ScreenOFF (using Llama and Amplify)?

Asking because of this: http://cloud.tapatalk.com/s/597ce23c536b1/BetterBatteryStats-2017-07-29_204909226.txt

Anything possible limited and still something wakes up the phone for half an hour during over a day of this sleep idle logging, taking 20% of battery during it.
[Android General] Celestial Fury:
There is no RtcWakeLock in that log. The closest is only alarm_rtc 41 s which is negligible. RTC = real time clock = leave it alone. Charging to 100% - which makes it easier to compare with other logs - is not done, which means you should read the first three posts and do the baseline tests.
[Android General] Oswald Boelcke:
OT: Great to see you back!:D I'm convinced many people missed you, and certainly all have been hoping that you're fine. Thanks for your great job.:good:
[Android General] DB126:
Screen off -> Screen on is fine as automatically minimizes inadvertent screen on time and facilitates mid-charge drain analysis which is often more accurate vs starting at 100% due to variations in battery/charge circuit cutoffs and resolution of the battery level indication. Actually, either approach is fine depending on the objectives of the idle study.

---------- Post added at 12:45 PM ---------- Previous post was at 12:39 PM ----------

Agreed! I have tried to give credit to the original and past masters of this thread which elevated awarenesses and brought discipline to analyzing idle battery drain. It's far too easy to forget those who have made significant contributions but not posted in the last 12 minutes (or two lifetimes, which ever is shorter). Welcome back, [MENTION=5401012]Celestial Fury[/MENTION]!