yashsingh1/xdaforums huggingface dataset:
[Android General] :
This script is only for analytics and ads so it will not help you.

You could always just switch location off or set it it to G{S only though, or use any automation app (like Tasker, Automagic, etc.) to switch location off only when the screen is turned off, like I do.
[Android General] Note4Addict:
First of all my thanks to V7. Following the steps described in his guide made on world of difference to the battery life of my device! My phone is a Samsung Note4 (N910F), running Dr. Ketan ROM which ports the Note4 Rom to a Note4. Battery life as such was "acceptable" but, as said, following this guide already made a huge positive impact with idle drain down to 0.6%/hr. However, further tinkering resulted in this going up again to 0.8%/hr?

As I'm stumped trying to understand what is going on, could you please give me your feedback on the BBS dump to point me in the right direction as how to proceed from here to see if there is room for further improvements in battery life? Configuration of battery saving apps is in line with V7's guide, including exposed, while the the BBS dump has been made as explained in post #6.

Thanks for your help!

---------- Post added at 01:10 PM ---------- Previous post was at 01:04 PM ----------

Having trouble attaching the BBS dump file as I keep getting a network error?
[Android General] maybeme2:
Things are better, but still not as it should be. The only thing I changed was to re-enable CmaSystemUpdateService as recommended in the reddit referred to in the quote. I did that because I think it was after I disabled CmaSystemUpdateService that things went downhill. Result is that the battery lost "only" 13% overnight untouched instead of 22%.

What concerns me and may be the cause of the drain is that BBS and Gsam shows wifi is active during the 8hrs of untouched sleep despite my settings to keep it off during sleep. What could be causing that?

(BBS dump and screenshot attached)

Thank you.
[Android General] DB126:
Titanium backup was a significant contributor to overnight wake time and battery drain. Suggest temporarily disabling app to take that out of the mix.

As for WiFi, some ROMs only disable the interface while leaving the radio powered up (this can also be a hardware and/or kernel limitation). If you are confident this is a new behavior try turning off the device and restarting (not just a reboot). I have seen/used this tactic to reset 'stuck' components on older hardware. Newer SOCs don't seem to suffer this from problem as frequently.

There are other smaller potential drainers indicated in the log; go after those later as needed (prefer to tackle one thing at a time to assess impact).
[Android General] maybeme2:
Thank you very much for helping.

Will turn power completely off, wait, and restart.

Not sure if the wifi on during sleep is a new behavior or something I just noticed. What started me looking at battery drainage is the poor battery hours for about 2-3 months. I was even considering replacing the battery (not that any of the available batteries for the nexus 5 are of recent manufacture). That's why I started looking at what might be causing the poor battery hours.

Thank you so much for helping.
[Android General] maybeme2:
This wifi persistently on during sleep is really killing my battery and I don't know how to find what is doing it.

I did as recommended in the quote. And then tested the (rooted nexus 5 running stock 5.1.1 with xposed) overnight. Wifi remains on all night during 8 hrs of phone sleep. Is there any way to find out what is causing that and how to change it? I froze (using Titbackup) a few apps to see if that made a difference and it didn't. There has to be a way to find out *what* is causing the wifi to stay on and drain the battery.

I hope one of the experts here has the answer. Thanks.
[Android General] :
Easy, just turn off wifi in your phone. If your wifi is turned on of course it will be active the entire night. Besides, I don't see how a 1% drain per hour is bad battery life.

Your device says it has been awake for 13 minutes the entire time, so you can try looking elsewhere. Do you have a pedometer app? It's actively using your sensors the entire night so you might wanna disable it or check the settings for it to stop using them.
[Android General] maybeme2:
I have the wifi settings to turn off during sleep at night. But it is on 100% of the 8hr sleep time. (I must have uploaded the wrong files).
[Android General] Lither:
I'm using Doze on the go and aggressive doze in Greenify, is it necessary to use PowerNap as well?
[Android General] :
Did you manually turn it off or did you make Tasker do it? Because it's left turned on at night.
[Android General] zputnyq:
Hi guys,

I'm trying to use my android tools now but I'm confused with the colored number of services which apps have especially the blue one. what kind of sevices are numbered with blue color ?

and how to determine which service it is?
[Android General] maybeme2:
That is the problem I am trying to solvr. I did not turn it off manually. The android setting /wifi /advanced (screenshot I uploaded in the previous message) is supposed to do that automatically - unless I misunderstood that setting. Isn't that what the setting is supposed to do during sleep?
[Android General] DB126:
Yes - it is suppose to auto-disable WiFi but on many devices (including 50% in my portfillo; mostly older gizmos) it simply does not work. When needed I have an Xposed task that kills WiFi on screen off an re-enables it when the device wakes. There are other ways to accomplish this if you don't have (or can't use) Xposed.
[Android General] Portgas D. Ace:
Not sure if this has been suggested already, but check your location scanning settings (Settings - Location - three-dot menu). Maybe WiFi scanning is enabled. This option will turn WiFi on repeatedly for some time to scan for location.
[Android General] TheVic!:
Im new to tasker and cant seem to find out how to use it to turn off location on screen off. Could you Point me to Where i cant find some info, or pm me how to?

Sorry for ot....
[Android General] :
Awesome guide! i love how well put together and organized it is, you have done a wondrous job @v7

-

I am a little confused by the synergy of PowerNap and Greenify Aggressive Doze, won't they conflict with themselves?

Should i leave Automated hibernation enabled?

I have whitelisted the apps as described in the guide on PowerNap, should i also whitelist them on Greenify's whitelist option that leads to Battery Optimization section on Android?

-

On your last part, limiting the permissions of Google Play Services ; Google Services Framework to reduce their drain,

can i use HEBF's Google Play Drain Fix to achieve the same effect?

has anyone from this thread used that app?

-

and also.. is it normal for WhatsApp to have soo many Wakelocks shown on Wakelock Detector ? i don't want to lose its web functionality but is there anything i should limit on it to reduce its "noise" or it shouldn't really mater?

-

I'll attach my BBS log, would love if you guys could take a look and show me what i can improve on my device :)

Like isn't my Awake (Screen Off) kinda high?
[Android General] :
WiFi should turn itself automatically off after 15 minutes. It will not be turned off it the connection is active though. Maybe a rogue app is keeping your connection active and prevents the OS from turning WiFi off.

You may need to use a plugin with Tasker (such as Secure Settings) to do it. In case of Automatic, it can do it natively (with action 'Set Network Location State' or by modifying system settings directly).
[Android General] maybeme2:
Aha! That's what confused me. I thought that with my setting wifi was supposed to turn itself off and couldn't understand why it wasn't doing it.

So I set a task to turn it off after the screen was off for 5 minutes and that did it.

Thanks guys.

---------- Post added at 12:02 PM ---------- Previous post was at 11:57 AM ----------

I purchased Tasker long ago but have since switched to Macrodroid. I find Macrodroid much easier to use. Try it and you may like it. It's on Google Play.

Hope this helps.
[Android General] DB126:
I have stepped away from Tasker some time ago ; impressive tool with a bit of a learning curve unless used regularly. If you have (or are willing to try) Xposed Framework there is relatively new module called Edge has many of Taskers power's with a more approachable UI. Toggling location on a variety of triggers is easy.

---------- Post added at 02:02 PM ---------- Previous post was at 01:04 PM ----------

Wow - this looks to be an impressive tool. Hadn't heard if it before...thanks for sharing.

I know....OT! Tasker (excellent but complex) is mentioned fairly often in this thread; it's nice to have a few 'more approachable' options for quick actions. MacroDroid gets the nod for not requiring Xposed and having a decent UI. Support looks to be good with regular updates.
[Android General] TheVic!:
Tnx for awesome tip! This was easy to use and seems to work just AS I hope. ☺️

---------- Post added at 06:19 PM ---------- Previous post was at 06:15 PM ----------

I agree. Tasker seems comples, but Macrodroid has a easier ui. Seems to do the Job.
[Android General] AsturzioAugias:
Can someone explain me what is the alarm Intent:*job.delay*? I have 55 alarms of that type in under a hour... I tried to google it without results.

Thanks in advance
[Android General] barbocorp:
+1

I've got same problem and

Intent: WifiConnectivityManager Schedule Periodic Scan Timer
[Android General] DB126:
Verify scanning is disabled in WiFi advanced options.
[Android General] barbocorp:
It's already disabled, I've checked it
[Android General] weasterling:
+1

I have both of those plus *job.deadline*.
[Android General] DB126:
Too much fuss over random alarms IMHO. The presence of an alarm does not translate into a problem, excess wake time or elevated battery drain. How the receiver handles the alarm determines what actions are taken. In the absence of a definitive correlation between an 'event' (in this case alarms) and and 'undesirable action' (not simply uncorrelated wake time) just leave it alone.
[Android General] Romullo Sousa:
Hey, battery does not escape that lol.
[Android General] AznBoy00:
Hey guys, anyone of you guys use spotify? Its draining like 5-8%/hr while listening music(online or offline mod). I did most of the stuff mentioned.

Since xposed is not working yet for 7.0, what do you guys suggest to use to improve deep sleep battery usage?

Im using a Note 5 on KhonLoi Nougat ROM v3.

Here are some sample on my battery life from the past few days.

Why is my Android OS so high on usage. Im using a gear s2 as my watch, have lte on all day.
[Android General] AGgup8:
Any ideas on how to improve on this? I'm only using greenify and privacy guard because I'm on nougat.

Thanks in advance.
[Android General] githyanki:
Looks good. GMS was the only thing that did much while asleep, and if you need with that you won't get messages on time.
[Android General] DB126:
~7.2%/hr drain is not unreasonable given all that's going on with your device during the monitoring window (Spotify, Bluetooth, etc.). I don't see any rogue processes in the provided screen snips.
[Android General] gunawanrusli:
Hi friends,

Can any1 tell me how to block these with regex? Thanks so much, friends
[Android General] DB126:
Why block? There is no indication they are causing a problem - which may not be the case if limited. Can you correlate these wakelocks with actual wake time and/or drain? Just because a wakelock is present does not mean the device was woken or kept awake. Depends what the receiver does which is often nothing (wakelock ignored).
[Android General] Ragazzza:
Can someone tell me why are my apps crashing so much when using this app?

I have bought pro vesion and greenified almost all apps, but sometimes when i unlock my phone and start using apps, they start ctashing like mad. I ungreenify them but they still crash, i have to deny acces in supersu to stop this

How can i solve this crashing
[Android General] Bewildered Wolf:
Which all apps are crashing ?

If they are system apps, then maybe greenify is not letting them do their work. This is why it it recommended to not greenify system apps.
[Android General] Ragazzza:
Nah, it is Whatsapp, Instagram..

Too bad i really like this app
[Android General] Bewildered Wolf:
Then, I guess their is a problem. Have you tried clearing the dalvik cache from recovery? if that doesnt works try uninstalling and installing yhe app again?
[Android General] Ragazzza:
I am cleaning cache and dalvik every week, i guess that is my only option
[Android General] Bewildered Wolf:
Try to clear data of greenify. And set up greenify again from start.
[Android General] cybernetus:
Thanks for this topic. On my phone the only problems is PowerNap.

I have many SODs when i try to use the module.
[Android General] DB126:
Yes - recent builds have been unstable. Probably best to avoid (really not needed anyhow).
[Android General] Gerard15799:
I'm running crdroid on Asus Zenfone 2 laser...At first it hibernate every app now it doesn't want to hibernate XDA and messenger....Anyone can help?? It has Magisk too
[Android General] binpax:
Hello,

Thank you for the great thread, I followed almost all the steps and my battery stoped draining like hell, if i don't use my phone much the battery can take up to 3 days thankfully, BUT i'm having an issue reported by some friends that happened a few times, When they call me (sometimes up to 3 consequetive calls) my phone doesn't wake up, doesn't ring and doesn't even show the call in the call log, so i guess the problem would be because i have limited a related service with amplify or greenify, But i'm not sure which service would be the cause of this issue...

I'm on Android 6.0 using my LG G3

Thank you for your help
[Android General] JonasVFC:
is there any down sides of blocking IpReachabilityMonitor wakelock?
[Android General] DB126:
Not a lot of definitive information on this pup. Is there evidence (aside from a big number) that this wakelock is contributing to excess wake time and/or battery drain?
[Android General] JonasVFC:
if i turn off wifi, the drain goes away
[Android General] DB126:
All that says is enabling the WiFi radio is a contributor to "drain" but does not directly implicate the wakelock. Only way to confirm is block/limit the wakelock and see what happens. If idle drain falls and there is no loss of functionality then you are on to something positive. Wakelocks have no impact on active drain rates as the device is already awake (unless the wakelock prevents the device from dozing/sleeping).
[Android General] ProudRed:
http://cloud.tapatalk.com/s/58f041c402287/BetterBatteryStats-2017-04-14_083104206.txt

New battery. Everything as alright ?
[Android General] DB126:
0.3%/hour is quite reasonable. There's some small stuff that might let you claw back a small portion of that. Wouldn't worry about it.
[Android General] JonasVFC:
My CPU is always idling at around 10% usage, how can I find the process that is using it? I'm on 7.1.2 Nexus 6p and the show CPU usage options in the dev options is gone
[Android General] xman099:
Thanks OP's guide. Not sure if it still could be improved. Any comments would be appreciated.

I did get the donation package for the Amplify, but not for the Greenify.

The log was too long to post. Please check the attached file for complete log.
[Android General] githyanki:
Something called wechat and between seem to be keeping the phone awake some. You could block them if losing notifications or other functionality is OK with you. Otherwise, .6%/hr is respectable.
[Android General] xman099:
Thanks a lot. They are instant messaging apps. This phone has dual-sim. it seems .6% is reasonable.

Is the donation package of Greendify worth it? It does have a function called "GCM push for greenified apps". I am wondering if I could greenifiy those messaging apps and still receive the push notification.
[Android General] githyanki:
I have the donation package and greenify WhatsApp and still receive messages. Should work if those apps support GCM.
[Android General] xman099:
I did un-limit the wakelock and alarms as v7's suggestion (Link). I still missed a few Gmail notifications (no notification till I waked it up)after applying Amplify setting. I did whitelist it in Greendify and power nap. So I think it should be Amplify's issue.

Not sure which alarm or wakelock I should avoid. Thanks.
[Android General] zulfi984:
hiii im using RR ROM of nougat 7.1.2.. i have wakelock blocker and alarm blocker in my configuration settings.. but i dont know wat are the process i can block . can anyone say, what i can block on wakelock and alarms..

THANK YOU.
[Android General] jackyaway:
Deleted

Inviato dal mio ONEPLUS A3003 utilizzando Tapatalk
[Android General] githyanki:
Cross posting is bad. See the bbs thread for your info.
[Android General] DB126:
Block nothing until you associate a particular alarm or wakelock with an unwanted behavior (eg: prolonged wake time). Might be amazed how well Android does all by itself - especially Nougat based ROMs.
[Android General] jackyaway:
My mistake

Inviato dal mio ONEPLUS A3003 utilizzando Tapatalk
[Android General] MrMagicPotato:
So I've got a big problem. My phone (a xiaomi redmi note 3 pro, also called Kenzo), despite being of August 2016 and having a massive 4050mAh battery combined with a special 650, discharges very rapidly because of Google play services that sometimes are managing to consume even 4 times more than the screen itself. Now I've noticed that if the phone is in offline or with the data connection is switched off the battery usage decreases a lot, but when the 3g (or 4g or even 2g) the battery drops like crazy, preventing me to get the 10h sot that I would usually get on wifi and without cellular network active.

After a lot of research, I've stated that this happens on every single rom and every single kernel combination, but not on the stock xiaomi's rom (which battery life is **** compared to the custom ROMs one). Where is this problem coming from?

I think that it is due to the fast dormancy or maybe to my bad cellular provider network optimization.

Or maybe some bad wakelocks that I haven't still found.

Is there a way to disable fast dormancy on a xiaomi device?

Please somebody help me! :rolleyes:

Thanks in advance​!
[Android General] XDevOS:
Has anyone tried the new Servicely? Testing it out right now
[Android General] zulfi984:
sorry..! i didn't not understand wat do u mean.. u saying that there is no need of blocking walelocl and alarms in nougat 7.1 ROMs ????
[Android General] DB126:
Often not if your objective is long battery life with minimal wake time when the device is idle. You need to use a tool like Better Battery Stats (BBS) to see if the device is being woken or sleep/doze delayed when not in use. You might see dozens of alarms and wakelocks but they do not need to be managed if battery life is acceptable.
[Android General] githyanki:
In addition to what Davey said, wakelocks are generated by your phone doing things. Often, they are things you want it to do, such as check email or load web pages. If you block the normal wakelocks, your phone will not do the things you want, so you have to figure out what wakelocks are generated by things you don't want your phone to be doing. Use BBS to help find those things.

BTW, it is usually better to stop the service or app from creating the wakelock than to just block the wakelock itself.
[Android General] Aksell:
I have a question

currently I'm on Resurrection Remix M 5.7.4 and rom has inbuilt wakelock blocker (my phone is supported to run RR N 5.8.3 but it drains battery too fast and RR N has inbuilt alarm blocker too)

anyway I was wondering Can I block these wakelocks with wakelock blocker ?
[Android General] Bewildered Wolf:
That wakelock blocker of rr rom has not the time limit options. In Amplify you blocked a wakelock for specific time but in rr it will be blocked permanently.

So that could be a problem i guess.

//Press thanks if it helped. :)
[Android General] Aksell:
I blocked it and I didn't faced any issue:)

idle battery drain is improved too
[Android General] Bewildered Wolf:
Which wakelock or alarm did you blocked. Can you post a list or sine screenshots ?
[Android General] Aksell:
*net_scheduler*

Gcoreflp

Icing

Networkstats

Nfcservice:mroutingwakelock

Rilj

Syncloopwakelock

wakefull statemachine: geofencerstatemachine

:good:
[Android General] zulfi984:
this is my batterylog.. so now u can suggest me which alarm or wakelocks i can block.. and pls say which consumes lot of battery
[Android General] DB126:
Device was active for nearly 7 hours; log is useless. See post #6 for guidance on creating a proper log.
[Android General] zulfi984:
Deleted
[Android General] DB126:
Second log has ~5 hours of screen on time; can not be used.
[Android General] zulfi984:
i enable 3G Data+ WiFi+ Location-> Device .. i used HEBF -> VIP Battery saver -> Extreme and also other profile on battery saving using HEBF.. 998mhz Max CPU Frequency and 300Mhz min frequency changed using Kernel Auditor.. and i used Greenify to hibernate all apps including system apps also but not the BBS.. and i disabled some internal apps using package disabler.. disabled 80 services of google play services using my android tools pro.. And i keep my fone on rack and gone for sleep.. I didn't touch my fone for 8Hours.. in between i get 1 mobile message and 1 mobile call.. thats it.. Sorry For this Long text..

THANK YOU
[Android General] DB126:
Value of log significantly depreciated as device was used over 5m. You'll need to grab another log with <1 min screen on time. As a editorial comment suggest you get rid of all the power management tools and (excessive) tweaks to establish a baseline with native Android 7.1.1. Guessing you will see equivalent (if not better) idle battery endurance which is the starting point for further optimizations (if needed; often not).
[Android General] githyanki:
As Davey said, very little is needed on 7.1.*

For example, look at my attached log, the only thing I did was use greenify, and I am not sure that is even necessary. Of course I always keep an eye on the usage, so I have long since removed any apps that drain battery unnecessarily, and have turned off several settings that would track me to send helpful suggestions on nearby events or traffic or whatever.
[Android General] DB126:
Nice log! :)

Some folks might focus on the 6+ min of wake time and try to manage that. However, most modern devices idle very efficiently at low frequencies. The impact on power consumed is trivial and will often be offset by a spike at wake-up if doze maintenance windows are suppressed (a popular but mis-guided attempt at power savings).

Greenify and MyAndroidTools are nice adds on Nougat as they permit easy monitoring and containment of potentially rogue apps and services. That said, there are very few canidates in a reasonably modern app portfillo as most developers are increasingly cognizant of power utilization (perceived or real) and excess background activity. When necessary the native power management capabilities in Android 7.x quietly step in to rein in the bad actors.