yashsingh1/xdaforums huggingface dataset:
[BetterBatteryStats] DB126:
Actually, no. Google's core services have become significantly more battery friendly in recent builds (last 2 years or so). At the same time many apps are leveraging Google's services to perform routine functions vs incorporating code into the app itself. The result is leaner apps that tap into Google more often making the latter look bad. Not defending Google as some of their own apps (assistant, maps, search to name just a few) are some of the worst power pigs. Same can not be said for core services which everyone loves to hate without knowing why.
[BetterBatteryStats] tet-bundy:
Been using the app for quite some time now. So first a thank's!

What i would like to do is to collect data of multiple full cycles to be able to analyze my overall battery performance. However i'd rather do this automatically than having to create a dump file everytime before charging.

I found no such option in settings so my question is if such an option can be implemented (let's say once connected to charger save the last available data to a dumpfile).

Of course I'd also appreciate if someone would guide me to set up a tasker profile (if possible?) To achieve this.

Anyway general thoughts in this?

Regards
[BetterBatteryStats] Corduroy-21:
Hello guys.

First of all I wish you a happy new year.

I'm posting because during the last week I've experienced a huge battery drain during nights.

I may lose 4-5% per hour without any use and with my data and wi-fi off and Always On Display off. Also, I haven't installed any new apps from what I can remember.

I created a log, I hope I did it right (only thing was that I didn't begin from 95%, but the same happens usually with the phone charged up). I'm unrooted, used the adb commands and followed the instructions.

Something else I noticed, the summary says that wi-fi was on, it was off (and I don't have any options regarding automatically turning it on enabled).
[BetterBatteryStats] TNSMANI:
Please search the thread for posts from the Dev regarding the possibility of having multiple stats surviving a charging session. He has indicated that it is not possible due to Android implementation. However, the possibility of doing it as requested by you has not been specifically dealt with by the Dev, AFAIK. I don't think that dump will remain long enough to be saved, once the charger is connected. However it is for the Dev to answer this.

---------- Post added at 02:23 PM ---------- Previous post was at 02:08 PM ----------

As far as I can see, there is absolutely nothing that justifies the 4% drain. Foursquared seems to be the only app causing some drain but even that fired only 2.2 alarms per hour. I don't think that it would result in such a drain.

Regarding wifi, you might have wifi switched off in the phone (there is no 'wifi running' time in the dump) but I think that BBS is reporting about the wifi modem/router being on.

The only thing I can advise is to clean flash your ROM and see if things improve.

Let the experts also see your dump and comment.
[BetterBatteryStats] Corduroy-21:
I'm no expert but I also thought that Foursquare was the only not normal thing, again not something big that would justify such a drain. Signal seems good too.

Is this normal? : (com.android.systemui.System UI): Sensor: TMx490x PROX(6), wakeup=true, Time: 1 h 49 m 47 s

Sensor: Device Pickup(22), wakeup=true, Time: 1 h 49 m 45 s

This is the proximity sensor, I did not pick up the phone at all. Deep Sleep was 99%.
[BetterBatteryStats] TNSMANI:
You did not pick up the phone but the sensor waited for you to do so. :D

While it is high, I think that you have enabled pickup display which may account for it. May be a clean flash will solve it.
[BetterBatteryStats] DB126:
I'm no "expert" but will offer an opinion. Either the stats are wrong (unlikely) or you're dealing with a hardware issue. Possibly a defective battery or the drain is occuring in a sensor that BBS can't see. Given the device is likely in warranty I would go for an exchange.
[BetterBatteryStats] vctrrl:
2% per hour drain

Hi everybody,

first of all, happy new year :)

hope everybody is having a good time because I'm not :laugh:

I'm experiencing a huge 2% per hour drain (during standby) on my brand new Note 9. Until a few days ago (24th, 25th I guess) it was as low as 0.8% to 1% which feels acceptable to me. Without no new apps installed and no configurations change that I'm aware it bumped to 2%, 2,2% as indicated by Accubattery. It's driving me crazy. Also it had a minor update yesterday but nothing has changed so far.

Any help would be strongly appreciated!

thanks in advance
[BetterBatteryStats] Deni_NS:
Your WhatsApp made unusual big data consumption as you can see in picture. You have some drain because of wifi.

Can you try to turn off WiFi and stay on mobile network?
[BetterBatteryStats] thebestrc:
Crippling Battery drain

Good morning,

I was hoping to have some help regarding my crippling battery drain issues. I used to be able to go a day without charging the phone and now I have to charge every 12 hours and that is with the phone in power saving mode with features like AOD, location or Bluetooth off.

The estimated battery usage used to be around 23 hours and had since halved.

The phone is currently being used so free and in airplane mode of this helps. So the only connectivity is via WiFi which isn't on during the night.

I lost 40% of the battery in approx 7 hours while I was sleeping. So I'm trying to work out if this is a hardware issue or software issue.

Any help would be greatly appreciated.
[BetterBatteryStats] chamonix:
Happy new year [MENTION=9350973]All[/MENTION]!
[BetterBatteryStats] DB126:
No significant Android/kernel drains; device was in "deep sleep" for all but 6 min of the 7¼ hour sampling window (98.6%). Either the battery is failing or the drain is occurring in a sensor BBS can't see. Make sure the finger print sensor is clean. Beyond that you're looking at a warranty repair IMO.
[BetterBatteryStats] thebestrc:
Thanks for the quick reply I thought it was the battery too. I'll see what they say once I take into the repair sensor.

Thanks again for the quick reply. Happy New Year
[BetterBatteryStats] vctrrl:
I haven't noticed the WhatsApp data usage. Do you have any idea of what may caused this? It's too much data usage considering phone was not in use.

Wifi is something that I was kinda suspicious because of the wlan wakelocks. Am I right?

I've already tried to turn wifi off and leave it on mobile network and I noticed the exact same kind of drain (2% per hour). I may try again to provide a proper dump file.

Also, samsung suggested to calibrate the battery by using the *#0228#. It helped but just for a while
[BetterBatteryStats] Deni_NS:
Battery calibration on newer devices is just a myth. It was for older devices good, but calibration resets when you bump on 100% charging, so don't need to use useless programs.

Don't know about whatsapp, maybe backup was in the mean time when you were sleeping?
[BetterBatteryStats] Oswald Boelcke:
For privacy reasons Whatsapp is an absolute no-no for me i.e. no own experiences; however, maybe this post is interesting?
[BetterBatteryStats] vctrrl:
It could be. But I have this drain in a regular basis. It may justify the high data usage but the drain should come from something else.
[BetterBatteryStats] DB126:
Greenify WhatsApp for a few days and observe. Should stop or expose any uncommanded activity.
[BetterBatteryStats] vctrrl:
Found another dump file that was captured a few days before the one I've posted. It features a very similar drain but network session does not point a high data usage coming from Whatsapp which is really confusing. Still may try out to greenify it and see what it gets.
[BetterBatteryStats] Deni_NS:
I see like bad network coverage both wifi and mobile.

If you have same 2%/h

Go to AP mode (airplane) turn on and let's see what is going on.

If everything is OK, then after that try AP mode but in AP mode you just turn on wifi and let it connected. Mobile network would be off, but WiFi will be on. After that we will see what we can do about it, if we can do.
[BetterBatteryStats] Corduroy-21:
First of all thank you and [MENTION=5656100]tnsmani[/MENTION] for your time and effort.

What baffles me is that during normal use (with data-wifi on) the drain is lower. It's around 2%. If it was a hardware issue shouldn't it be present always?

When I go to sleep and the phone remains for 6 hours without any use, the drain goes up to 3-4%. My initial thought was the signal in my bedroom but this is not the case.

Yes, both double tap and and pickup. However it's not the fact that the sensor is awake, but this stat:

Sensor: Device Pickup(22), wakeup=true, Time: 1 m 19 s

Sensor: Proximity Gated Double Tap Gesture(26), wakeup=true, Time: 1 m 18 s

22 and 26 times, shouldn't it be 0?

I'll factory reset today and see how it goes.
[BetterBatteryStats] DB126:
I assume the 2%/hr drain is when the phone is idle but outside your bedroom. That level is still 2-3x higher than seen on most phones.

Nope - just because a sensor is awake does not mean it is drawing significant power.

Keep in mind BBS and other similar tools do not see every activity/drain on your device. The data that is does present is only as good as the source provides.
[BetterBatteryStats] Corduroy-21:
Well, idle is a bit exaggerating with my use. When data/wifi are on I have 4 email accounts syncing, notifications from various social media apps for a website I own and of course many messages from various platforms (Hangouts, Viber, Messenger Lite etc.).

So I may not have much screen on time, but the phone tends to wake up a lot. So 1.8/2% per hour even with minimal use is not too much in my experience. Lots of stuff happen in the background.

My current issue has to do with no data on and phone being perfectly idle.

For example, I'm now at 1 day 1 hour after unplugging at 46%. Screen on was minimal, about 55 minutes because I wanted to check battery behavior. Drain is around 2% or something in total. But at the same time, during the night I disabled data/wifi, left just in case the phone in another room and the drain was about 2.4% in the 6 hours I slept. And one other night it was 3 or 4%.

I cannot fathom why the drain would be higher with the phone totally idle. If it was a battery issue wouldn't drain be even higher with data on?
[BetterBatteryStats] DB126:
Have you tried keeping WiFi (or mobile radio) on overnight so all those syncing apps can do their stuff uninpeeded? I don't really expect a drain reduction but it may shed some additional light on your issue. Also try turning device off for a few hours to test if battery is holding a charge with no load.
[BetterBatteryStats] Amaranth`:
Hello guys i want help if is possible. Sometimes my phone have a very bad drain and sometimes have 0% drain. Im not sure why. This weird situation makes me to write a dump file. I have follow all the OP steps before i start. My rom is full debloat with 3rd party kernel with no weird apps or weird settings or drainer apps expect Instagram. I leave the phone from 94% with screen off for a 6 hours. I have loose 15% battery life... My deep sleep,kernel,screen on,signal is so great but i have a drain. I think i have a bad wake lock maybe from google, but im not 100% sure about that. If any can take a look anytime to my dump file, i will be very happy. I want to know whats going wrong and i want to resolve this issue. I have a screenshots too if anyone need. The most times every 10 hours with screen off when i sleep. I loose only 1% batterylife. But sometimes i loose 20% battery life like the dump file log. Is very weird.

Dump File: https://ufile.io/hyufm
[BetterBatteryStats] DB126:
Device was awake <5 min over the 6 hour monitoring window. No significant drains were recorded by BBS which suggests a hardware anomaly that BBS can't see. Check for a dirty fingerprint scannner or proximity sensor. 3rd party kernel is also suspect as it serves as the hardware interface and may not be fully optimized for your device. One thing for sure: Google isn't the culprit.
[BetterBatteryStats] Amaranth`:
Thank you very much for your help. I have this issue with all roms. When i restart the phone the weird drain gone. After 4-5 days he comes again. Hope android P will fix the issue.

This sensor run normal? Sensor: SAMSUNG Significant Motion Sensor(21), wakeup=true, Time: 4 h 46 m 41 s
[BetterBatteryStats] DB126:
As previously noted I do not believe this is an 'Android', 'Google' or wakelock issue. Hardware and/or kernel are the likely culprits. Any relief with Android P will come in the form or an updated kernel which is (usually) at the discretion of the ROM maintainer.

Gump in the usb charging port can also trigger random drains.

If the problem only occurs every few days reboot your phone nightly and be done with it.
[BetterBatteryStats] Corduroy-21:
I did a factory reset but it didn't change much. Last night drain with no data/wifi and no use was 2.9% per hour. 46% of this was attributed to the 12 seconds that the screen was on. It's insane.

I will try to leave it overnight with WiFi/Data on to see. One night I did it and I think the drain was a bit lower (but not significantly much). I'll let you know.

What I saw is that drain increases with the amount of time the phone remains idle. It's not constant. So maybe the first hour it will be around 1% or even less and then it will gradually increase. During the day I was checking it every hour or so and the drain was lower. Or maybe it's my idea because the increase is gradual.

It's not easy for me to replace it because although it's in warranty, my country is not supported by Google (the phone is P2) so I would have to send it to the US.

Is there any chance that it's a calibration issue? Or is it just a myth?

I'll also try a different charger just in case and wait for the January update, the problem seems to be very recent, but again I'm not too optimistic.
[BetterBatteryStats] DB126:
Obviously the 12 sec screen on attribution is a statistical anaomoly most likely attributable to sampling interval the components used to report battery status popping out of doze. Don't get wrapped up in the manutia as it will drive YOU insane. :)

:good:

Any chance the room(s) where it is left overnight are significantly below 20°C?Ambient temperature can impact readings, although underreported charge levels are usually restored as the device warms.

Possibly...but nothing you would be able to address. Don't get sucked into the myth that draining your phone and recharging fully will restore calibration. It won't. A different charger is unlikely to help if your current charger can bring the phone to 100% within a reasonable period.
[BetterBatteryStats] lexluthor:
I just got a Galaxy s7 running Oreo. Does this procedure with the adb commands still apply to get bbs running fully?

https://xdaforums.com/showpost.php?p=67819528&postcount=4
[BetterBatteryStats] Corduroy-21:
Yes, this is what I used and it worked.

Just checked this. It was from 20 to 15°C during the night. It's pretty cold here these days, it snowed and the temperatures outside are around 0 to -4°C. The problems started around the time the weather got colder but I think it could be a coincidence.

Some more questions, I feel I'm taking advantage of your courtesy.

1) After factory resetting my phone, I used the Google backup to restore. Do you think that I should have built it from scratch up? It's something I wouldn't like, but if it would make a difference I'll repeat the procedure. There is an option to choose what you restore (settings, SMS etc.). Maybe I shouldn't restore the apps (although to be honest, I think that it only downloads the apps from Play Store) and just restore the settings?

2) You asked me what happens if I turn off the phone. Well I charged it to 100%, left it for a couple of hours turned off and it was on 100% when I turned it on. Haven't tried airplane mode though yet. I'll try to do this also.

3) I also left the phone with data/wifi on last night. The behavior was a bit similar, although drain was a bit lower. It spent around 2 hours with no drain. Then suddenly started dropping for another 2 and then again stabilized with almost no drain. I'm attaching a screenshot (sorry it's not from BBB, I couldn't find an option for graphs). It looks like something keeping the phone working, but the stats don't show anything. RCS phone and Android Kernel take most of the drain, but if you look at their stats they kept the phone awake for a couple of minutes at the most.
[BetterBatteryStats] githyanki:
Your screenshot shows a little bit of screen on at 3, right when the drain started. What was it you did right then?
[BetterBatteryStats] Corduroy-21:
I got a message in Hangouts and the sound was on, so I turned it off.

However Hangouts is not causing any drain in the stats. It has 0% battery drain.
[BetterBatteryStats] DB126:
There was clearly activity taking place during the middle of the sampling window. Looks like what might be expected when a device performs routine maintenance during doze with a bunch of social apps in the background begging for attention. Have no idea why BBS didn't expose this activity.

Going back to my first post on this matter (here). It's quite possible reloading your firmware and apps will resolve the problem. Flying blind as the BBS stats aren't painting an accurate picture or the picture has changed since submitting your last log.

As an aside, I have long since moved to GSAM for reasons that are OT in this thread.

Edit: Might try "aggressive doze" to see if that reduces the frequency/duration of idle drain incidents.
[BetterBatteryStats] Stonecaper:
I am using a poco F1 running MI UI stable pie, unlocked and unrooted

Installed BBS and granted all permissions through ADB.since full charging tomorrow morning at around 7 a.m. I have lost 24% of charge with very minimal usage. 4G was always on. I have attached all the dump files and the kernel wake lock screen shot. Please advise

Screenshot_20190107-201922.png

logcat-2019-01-07_201638548.txt

Screenshot_20190107-202525.png
[BetterBatteryStats] umair786:
Can I block job.delay and job.deadline wakelocks under andriod system
[BetterBatteryStats] strongst:
Sorry but you charged your device. Analyzing isn't possible. Also analyzing usage dumps are very hard since there are too many unknown variables that can't be recorded by bbs.

Please make a new dump according instructions in first post.

---------- Post added at 06:40 PM ---------- Previous post was at 06:38 PM ----------

Did you read this already about job.delay https://xdaforums.com/showthread.php?t=1179809&p=77200332 ?
[BetterBatteryStats] DB126:
No justification nor beneficial effect of doing so. Wakelocks are not evil; what causes them *can* be. Gotta do some more digging or post a log for analysis.
[BetterBatteryStats] tet-bundy:
Thanks for the answer. I know charging would erase all logs. However maybe it's possible to contiously write to a file, overwriting it every given time interval (let's say an hour or 2) until charger is detected and starting to write to a new one after full charge.

I know that feature would not be sth most people crave for but maybe interesting for some. Just for consideration. Not like I can't live without it.

Regards
[BetterBatteryStats] pegasus5862:
Install error

Why its not letting me install
[BetterBatteryStats] DB126:
Google Play Store issue unrelated to BBS.
[BetterBatteryStats] vctrrl:
Thank you again for your assistant, Deni.

So here is. While on AP mode drain is totally reasonable. 2% during the whole period. Following your tip and letting only WiFi on while disabling cellular connection reduced my previous drain dramatically from 2% or higher to 0.6% per hour. Where I normally let my phone in stand by overnight the signal strength is normally -99dBM/41 asu. Is it really that bad? Though it seems to settle down the drain it's not a very practical solution but still works at least when I'm home and I don't need to receive calls or SMS.

When I'm not in home and I need to use cellular connection and LTE the stand by drain is 2% to 3% per hour. Is it a normal/expected usage or it should be lower?

I've attached the BBS dumps regarding the aforementioned situations (except the LTE/cellular scenario) for better understanding.
[BetterBatteryStats] Deni_NS:
Yup. Thanks to your operator you have bad battery :) either that or change operator which is good at your home place and places that you stays (coffee shops, job place, home etc)

The thing is the more your signal is worse, the more drainage will be. Phone then uses more power to obtain signal and stays on really low, until it is really critical then it switches to hdspa (H+) or 3G. Better the signal, less power phone modem is drawing.
[BetterBatteryStats] Corduroy-21:
The RCSService seems to be relatively high and also I read this thing about RCS and Google Pixel in December:

https://www.xda-developers.com/google-pixel-3-3-xl-verizon-rcs/

So, I cleared data and cache, force stopped RCSService and also disabled through Settings -> Google -> App Preview Messaging.

I left for two consecutive days the phone on 4G during the night. The drain was minimal, close to 1% per hour. Also at my work's wi-fi, drain is very low. However, after having 4G on for the whole night and losing 6-7%, I just turned data-wifi off and I lost around 4% in an hour. So the problem seems to be mainly during no internet. It puzzles me a lot. It seems though that at least with wifi/data on, the behavior is normal.

I'll continue testing.

Never heard before for aggressive doze. Do you mean through battery settings?
[BetterBatteryStats] DB126:
Agressive doze is a native Android cpaability that reduces the number, type and duration of 'maintenance windows' allowed during screen off operations. Most ROMs do not expose the toggle; you'll need a 3rd party app for that. I suggest Greenify which is an essential utility in my tool bag. It's core function (hibernation) is similar to doze but allows you to target individual apps (bad actors) that may be contributing to your overnight drain. Normally BBS exposes such players but that doesn't appear to be happening on your device for whatever reason. Greenify is easy to use and well behaved. However, like any tool it can become a liability if abused. Give it a whirl. XDA thread can be found here: https://xdaforums.com/apps/greenify
[BetterBatteryStats] 3Dota:
ridiculous reading on Mi 5 (Gemini) with Havoc 2.0

any idea?
[BetterBatteryStats] DB126:
Theoretically that combination is valid. Signal strength and data connection are two different things and can behave independently.
[BetterBatteryStats] 3Dota:
might be ... but lol ... I'm depends on mobile connection and the stat tell different story
[BetterBatteryStats] DB126:
Sure, expect the stats do not reflect reality on your device for whatever reason. Probably best to ignore unless other indicators are off as well. Lots of factors to consider tracking down root cause - especially if some components deviate from stock.
[BetterBatteryStats] onliner:
Hi, with the latest beta, the wakelock "com.asksven.betterbatterystats.services.WriteBootReferenceService" always keeps my device awake causing some crazy battery drain, device: Pixel 2 XL, Android Pie.

I made some tests blocking the wakelock and the apps seems to be fine, the stats are collected normally and I don't see any crashes.

If you need any type of logs or extra info just ping me.
[BetterBatteryStats] IronTechmonkey:
Pardon this bit of off topic but something is jamming up this thread in the XDA Labs app where the original post and developer's name are associated with name of XDA member who most recently posted. It was suggested that adding a post to the thread might fix this so here we go.

[EDIT]That seemed to work but for reference this is what happened: https://xdaforums.com/android/apps-games/labs-t3241866/post78641048
[BetterBatteryStats] vctrrl:
BBS has been crashing on both of my devices: Galaxy Note 9 (Android 8.1.0) and LG G6 (Android. 8.0.0). Latest version of BBS obtained from Hockey App.