yashsingh1/xdaforums huggingface dataset:
[BetterBatteryStats] jeremysherriff:
Have a read of this article; it's possible that all 7% were taken just by the plunge after unplugging (unlikely though).

Still, pull a dump file, have a look at it, and post it up (as an attachment) with your own thoughts about what is happening and we can help.

The best way is to unplug from the charger just before you go to bed, then in the morning open BBS, change the time range to "since unplugged", and then dump to file. That will ensure we get to see the log without your normal usage stuff cluttering it.

Cheers

Edit - looking at your screenshot, sdmail pro is a problem. The other comments in my post are best practice and some learning for you, but yes it looks like your mail app is holding your phone awake.
[BetterBatteryStats] justjr:
What the DUMP permission is used for? If it is necessary still, wouldn't be better to also include it on the guide?

In the 2nd post you tell us to grant com.asksven.betterbatterystats_xdaedition android.permission.BATTERY_STATS

I gone ahead and also granted the DUMP permission for it.
[BetterBatteryStats] AL_IRAQI:
Hi [MENTION=1330150]chamonix[/MENTION], thanks for this awesome app.

Can you please reference app theme colors to colors.xml so it can be themed with substratum themes ?

Under Theme.Bbs & Theme.Bbs.Dark you have

<item name="colorPrimaryDark">#ff0a883f</item>

Please reference it to colors

<item name="colorPrimaryDark">@color/color_xxxxx</item>

Thanks again
[BetterBatteryStats] infatality:
Still not working..
[BetterBatteryStats] chamonix:
added: https://github.com/asksven/BetterBatteryStats/issues/800
[BetterBatteryStats] chamonix:
I discovered a problem with the fix that was not covered by the test suite. I will either roll-back the change or release a new version tonight.
[BetterBatteryStats] chamonix:
I believe DUMP was needed for historical reasons but will have to do some testing on all supported versions. Added an issue for that: https://github.com/asksven/BetterBatteryStats/issues/799
[BetterBatteryStats] shaggyskunk:
Today's update seems to be working ;)

I had installed .91 but reverted to .90 but Thank you for .92 ?
[BetterBatteryStats] chamonix:
Could you please give me some feedback based on your experience with the hockey app experiment? I try to push the envelope and experiment so I'd like to hear what you like and don't like.

1. Do you consider analytics being an issue? Have you opted-out?

2. What about the cadence? It it too fast? Would you prefer a fast/slow choice for bleeding edge/more stable?

3. Level of details of the release notes. It is too succinct?

4. Whatever else comes to your mind
[BetterBatteryStats] SuperSandro2000:
The updates are to frequent. I think once a day is enough. Analytics is not an issue but I try to opt out everywhere I can.
[BetterBatteryStats] vik2304:
[MENTION=1330150]chamonix[/MENTION] many thanks for this great app. It shows a lot about my batter health, but sadly I'm still unable to resolve my heavy drain issue.

Two weeks ago without making any changes or installing any new apps my battery started to drain heavily with approx. 4% per hour. I'm hardly using the phone, it stays almost all the time on my desk, but it keeps draining with the rate mentioned above.

So far I've tried also hard reset, but without success. Even in safe mode the draining rate stays pretty unchanged.

I don't see any heavy drainers from my logs, but the phone stays awake to almost 99% of the time. I've noticed also, that my CPU stayed at 960 MHz to 50% of the time. There's definitely something running on the background, but I can't figure out what's causing it.

The attached dump file is generated right after turning the screen on, after 7 hours of standby. Would be great, if you can give any suggestions with it.

You can find also the logcat file in the attachment.

Best regards,

Viktor
[BetterBatteryStats] CounterC:
Sorry for the old quote but I didn't seem to find any reply to your question. I also have these excessive wakelocks, any solution?
[BetterBatteryStats] Oswald Boelcke:
My wife's Samsung i9305 and mine have nearly (~95%) the same system configuration, Boeffla Control settings incl. governor, governor profile, frequencies etc. are exactly the same, just our application suite slightly differs. However, her kernel is the boeffla-kernel-6.1-boeffla-stratonz-beta4-UBERTC-6.0-LOS14.1, and my device uses the boeffla-kernel-6.1-boeffla-stratonz-beta3-Linaro6-LOS14.1.

Added a BBS idle dump of each phone (the one of her phone starts with "VS", the one of mine with "RS").

I believe it's a pretty difference betwenn 2.1%/h and 1.3%/h. Might be the different kernel but also that she's synchronising her contacts and calendar entries with her email server via CardDAV and CalDAV, while I only synchronise with my notebook via MPE.

Both devices are on:

Resurrection Remix N-v5.8.3-20170430

Magisk v12 SU

GApps free via the Magisk module NanoMod

Kernels differ as stated above

Both have fixed IPs in our WiFi network

I'd appreciate any comment, assumption and/or recommendation why our devices so much differ in their battery drainage.
[BetterBatteryStats] skivnit:
Hello, I have a question regarding the partial wakelock stats I get something like 12mn in powermanager service wakelocks but looking at partial wakelocks I only see 3mn
[BetterBatteryStats] DB126:
Problem likely started following a silent update to Google Play Services and/or related apps. A quick look at BBS log suggests the Significant Motion Detector was in play during the entire period. Why remains a mystery...at least on brief inspection. You may find relief using Greenify with 'doze-on-the-go' enabled (requires root, donation and Xposed Framework). A ROM refresh or a lighter GAaps package may also do the trick. Good luck.
[BetterBatteryStats] DB126:
Given significant differences in logged activity a detailed comparison would a time consuming (albeit not technically difficult) affair. Different run durations adds a layer of complexity as most activity is reported in total time vs rate per hour. Suggest reviewing logs side-by-side with a multimotor desktop setup (if available). Otherwise print the first half-dozen pages of each log and lay them out on the kitchen table along with the beverage of your choosing.

Random thoughts:

- take a close look a sync related activity; email servers (and mail clients) vary widely in their efficency; ping frequency, connection type and duration, etc

- kernels can have a significant impact on power management including stuff BBS doesn't directly see

- not all battery packs are created equal and may exhibit different drain curves even when new

- long term environmental factors can impact battery performance; heat is the number one enemy of Li-ion batteries
[BetterBatteryStats] Oswald Boelcke:
I appreciate your patience and that I was allowed to make use of your time. Currently out of my thanks for the day but I'll certainly come back.

I guess the latter is the best choice - certainly with pure British spring water...;):D

Battery is certainly an issue. Mine is just half a year old and as I love my wife, I'd most likely going to chance to her really mature one. She hadn't just complained, yet.

We're using the same email client (R2Mail2) and the same excellent email-provider/-server (posteo.de); however, I'm convinced that sync really differs among our devices. Her phone uses two applications to "directly" syn her contacts/calendar with the email-server, and I only synchronise them via USB with my notebook that in turn sync's with the server.

Wishing you a great weekend! CU Schmidy
[BetterBatteryStats] Ruka82:
I have just noticed that there is the "App ops" option, i have Nexus 5x with latest 11.4 version do Dirty Unicorn but clicking that option doesn't work (in the form with that button there are other button but nothing works).

Is it normal? The app ops button that appear is related to xposed that not works with nougat but appear because on the rom there is the op apps options?
[BetterBatteryStats] DB126:
This question should be asked in your device or custom ROM forum as it has has nothing to do with BBS.
[BetterBatteryStats] rignfool:
Actually... [MENTION=1330150]chamonix[/MENTION] had a version of app ops in a previous version of BBS... When it was hidden in AOSP...
[BetterBatteryStats] mminoss:
Hello, can i see more statistic without root and entering an adb command as the app "GSam Battery Monitor"
[BetterBatteryStats] DB126:
Did you read the OP (BBS overview), post #3 (FAQ) and post #4 (guidance for non-root usage) in this thread? Seems like the answer lies there - especially post #4.
[BetterBatteryStats] mminoss:
Thanks a lot !
[BetterBatteryStats] Tayx:
Hi guys! I'm posting this here to ask for help diagnosing what is keeping my device awake more than 50% of the screen off time. I've posted in other threads, but I figured that in the BBS one people may know more about this specific problem.

I'm running Android Nougat 7.1.2 with Resurrection Remix for the htc-m8, and I have an idle battery drain of around 2.5%/h.

Things I've tried:

- Setting the phone to airplane mode: this gives me a 99% sleep time with ~0.2%/h battery drain, the way it should be.

- Clean flashed the Resurrection Remix rom with GAPPS: same result as now (+2%/h drain)

- Clean flashed the Resurrection Remix rom without GAPPS: correct behaviour, 99% deep sleep time.

- Clean flashed the Resurrection Remix rom with microG (an open source Google Play Services subsitute): it's exactly the same as having GAPPS (in terms of battery life)

- Clean flashed other LineageOS based roms with GAPPS: the same as Resurrection Remix (I guess the problem lies inside LineageOS?)

- Tried blocking various alarms and wakelocks with the included Alarm and Wakelock blocker in the RR rom, but it didn't have any effect.

- Revoking Google Play Services "Keep awake" permission in Privacy Guard: left my phone in a bootloop, had to restore a previous backup.

- Reset app preferences in Battery Optimization: no change

This is all in the addition of the basic stuff that's recommended everywhere about disabling WiFi an Bluetooth scanning, disabling GPS, Google location history, etc.

I'm attaching a BBS dump of my phone with the usual apps I have installed (not many). If anyone has any insight on what could be causing so much awake time, please let me know ;)
[BetterBatteryStats] githyanki:
The top drain is Google services.

*alarm* (com.android.vending.Google Play Store): 1 h 54 m 14 s Count:0 29.3%

Icing (com.google.android.apps.maps.Maps): 1 h 54 m 14 s Count:0 29.3%

*alarm* (Google Services): 1 h 44 m 53 s Count:243 26.9%

*alarm* (com.android.providers.calendar.Calendar Storage): 14 m 51 s Count:3 3.8%

wake:com.google.android.calendar/.alerts.AlertService (Calendar): 12 m 37 s Count:3 3.2%

ScheduleNextAlarmWakeLock (com.android.providers.calendar.Calendar Storage): 12 m 36 s Count:2 3.2%

From what you are saying, this drain continues even after flashing different roms. Try backing up the phone to your computer and wipe everything. Even the internal storage. Clean flash rom, and try using beans gapps if they will work on your phone.

Do basic setup, and get a log afterwards, then start restoring apps and your backed up data.
[BetterBatteryStats] hmillos:
BBS is not collecting any "Alarms" stats, is there any permission that I have to set? I'm rooted.
[BetterBatteryStats] Tayx:
Thanks for answering! Everytime I clean flashed, I also wiped everything, including internal storage. Actually I had also tried using beans gapps, but it was the same for me as open gapps (should there be a noticeable difference between the 2?).

Do you have any other ideas of what I could try to reduce the everlasting drain?
[BetterBatteryStats] githyanki:
Trying to limit or block Google play services usually causes more drain than leaving them alone. That's why I recommend a clean install and leave it alone to get a base line.

Other than that, perhaps checking for updates to boot loader, radio, or twrp.
[BetterBatteryStats] peterlee928:
here r some addl threads

they address

battery life

wakelocks

etc

simple reads with simple instructions

op has the main pts

https://xdaforums.com/oneplus-3/how-to/guide-stop-google-play-services-t3549760/page8

https://xdaforums.com/android/general/guide-extreme-battery-life-t3095884/page1249

https://xdaforums.com/galaxy-s-adva...androidtools-guide-to-disable-t2869119/page11
[BetterBatteryStats] KaranKapoor:
Settings > Advanced > (Tick) Alarms using API
[BetterBatteryStats] justjr:
Maybe it's already knew , but not collecting wake locks on latest Dirty Unicorns. Not even with API ticked.

But more important, sometimes I open the app to discover it is not showing the from boot tab, I think never happened when unplugged, only from boot.
[BetterBatteryStats] DB126:
Concur w/@githyanki. Also try preferred ROM w/o GAaps to get a device baseline. Then flash a suitable smaller GAaps package (eg: Nano), don't install any apps and grab a comparitive baseline. If all looks good install a few apps at a time until you find the culprit. Time consuming? Yes. But peeling back the onion one layer at a time is often the only path to discovering root cause (or at least something closer to root cause that is user actionable). Good luck.
[BetterBatteryStats] Tayx:
Thanks for answering! The thing is, I've already tried that, as I say in my first post in this thread, clean flashing my ROM without GAPPS is fine (0.2%/h), but with pico GAPPS it already goes up to +2%/h. I'm trying some kernel stuff to see if that fixes the problem (changing hotplug and governor).
[BetterBatteryStats] DB126:
Neither will address root cause, although you might see some incremental changes (likely higher) as reducing max frequency, ramp up/down rates or number of cores utilized generally has an opposite effect during screen off operations as it prolongs wake intervals.
[BetterBatteryStats] mminoss:
Hello

What screen should I post so that you help me to find what consumes battery?
[BetterBatteryStats] DB126:
Post a BBS idle log, not screen shots. Fully charge, disconnect, put device to sleep for 6+ hours, wake and immediately capture log via share menu. Ideally screen-on time should be <1 min. Practice this a few times so you get it right. If you can't attach to XDA post provide a link to a public file sharing service.
[BetterBatteryStats] mminoss:
Thanks :)

I am share Dumpfile ? Logcat ? dmesg ? The three?
[BetterBatteryStats] DB126:
Just a BBS dumpfile (sorry for not specifying).

Edit: also set range unplugged -> current
[BetterBatteryStats] mminoss:
Thanks a lot :) I will do that tomorrow after charged max then plane mode since 7~10 hours
[BetterBatteryStats] DB126:
Great! No need to place device in "plane mode" unless that is your normal normal practice when device is not being used. An idle log should represent the 'normal' state of the device when it is not being used to identify and address potential zombie drainers. If your concern leans more toward screen-on activity use the built in battery tool, BBS or GSAM to identify apps that *may* be contributing to the rundown.
[BetterBatteryStats] mminoss:
Thanks, i will do that this weekend and publish. Thanks yet Davey126
[BetterBatteryStats] mminoss:
Hello, ThIS my logcat. Good or not? I AM Lost 11% since 8hours.. its so much?
[BetterBatteryStats] JLius:
If you find a solution, please let me know. I face this very same problem. My battery drains +-3%/h while idle, and I have naptime on agressive doze. Only thing that stops this drain is airplane mode, just like you. I'm on latest LOS, officially unlocked and clean flashed with nano gapps.
[BetterBatteryStats] DB126:
The log is good (aside from lacking alarm stats due to missing permission on unrooted rom; don't view this a critical). That's about the only good news. The device slept reasonably well over 8+ hour monitoring window although 13 min wake time is a little high for Nougat; would have expected 4-5 min. There was no significant app or network activity aside from Google Play Services. But the drain rate remained surprisingly high at 1.3% per hour with no obvious culprits. I have seen this pattern in several recent Nougat logs; don't have an immediate explaination. One could jump on Google Play Services as the bad boy but total CPU activity and frequencies don't support the argument. An aging battery is another possibility but the limited voltage drop and age of device don't support that either. Suggests BBS isn't seeing all sources of drain. Those who put their device in airplane mode and/or run without GAaps report drain rates fall in the expected 0.2% per hour range. Which points back to Google. Somewhat of a head scratcher ...

Side note: personal life is getting busy of late so I won't be able to spend much time on this little mystery for awhile. Hopefully another resource in this thread or other battery focused threads can come up with an answer. Maybe they have already!
[BetterBatteryStats] Tayx:
Will do, what phone do you have? I have an M8, and right now I'm trying Dirty Unicorns for a couple of days to see how that goes. The first day the drain has been a bit lower, I'm at 1.8%/h right now, but who knows.
[BetterBatteryStats] JLius:
Redmi note 3 Kenzo. I disabled wifi and Bluetooth scanning + location history. Now google play services drains even more battery. I don't get it.
[BetterBatteryStats] DB126:
Try clearing all local data from Google Play services followed by an immediate reboot. No liabilities and sometimes helps w/zombie drain.
[BetterBatteryStats] xander59:
Hi! Someone knows what is this alarms (job.delay and job.deadline) ? :)
[BetterBatteryStats] JLius:
I think I accidentally solved my idle drain problem. To remove the encryption on my phone, I did a data format in twrp (I don't mean wipe, format), and reinstalled LineageOS + open gapps nano. By doing so, I quadrupled my battery life. Idle drain is less than 0,5%/h now.
[BetterBatteryStats] mminoss:
Thank you for coming back. I repeated a test in airplane mode for 7 hours, rebooting before disconnecting and killing the apps using the most alarm (endomondo and pronomax). Result: another 5% and in plane mode!

So: do you see an app that I will not have seen or is it better that I reinstall everything? this is my stats
[BetterBatteryStats] Tayx:
Very interesting! Thanks for the tip, I will try it, because changing roms still didn't fix it :(

It's very weird. Let me know if it still holds up in a couple of days, I'm flashing everything right now.
[BetterBatteryStats] DB126:
Wake time was reasonable (2½ min) but the average drain rate remained high (0.7% per hour) given network isolation and low voltage drop suggesting a healthy battery. The only apps/processes showing significant activity were deskclock widget, Google Play Services (within normal range) and fitness which seems to be a "feature" of many Nougat ROMs. Also noticed 'pick-up' and 'significant motion' sensors were active during 100% and 40% of the sampling period, respectively​. Don't know what to make of that. Finally, there was 90 sec of high/max CPU activity which may have occurred during doze maintenance windows which really shouldn't happen in Airplane mode. My only suggestion is to disable location services during sleep; don't think that was a factor as there wasn't much related activity but disabling eliminates another variable.

While the exact source(s) of drain remain a mystery (at least to me) I don't believe reinstalling "everything" will yield a different outcome.

Sorry I couldn't be of more help. Hopefully someone else jumps in with more productive thoughts.
[BetterBatteryStats] mminoss:
Really, huge thank you to you to look at my problem. I'll do the test again tonight by turning off the localization. I want to disable the google of the home but I think that we can not on nexus 5x. At worst, maybe I could try to kill the service if possible. I repeat a test and I publish tomorrow morning :)
[BetterBatteryStats] JLius:
Will do.

Did you try a ROM that supports signature spoofing to eliminate play services, if that is your biggest drainer?
[BetterBatteryStats] ralfbergs:
How could an update to TWRP save battery?
[BetterBatteryStats] githyanki:
At least in the Nexus 6,if you used an older version of twrp you would get loads of errors after flashing a nougat rom. Possibly other errors could arise from a faulty flash that show up as a process or sensor staying on.

I really don't know, but if your checking for all other things to update, it shouldn't hurt to do twrp also.
[BetterBatteryStats] lemonade747:
Please look at my dumpfile and tell me what should I do to save more battery. Actually the battery is really good for me but I dont know why it has many wake up. What is deviceIdleController.light/deep wake up? And what is Significant Motion? Thanks!
[BetterBatteryStats] Tayx:
I've tried microG, that requires signature spoofing, but I don't know exactly what you mean by "eliminate play services". I need to use Google apps, is it possible to limit the times Google Play services wakes the device?
[BetterBatteryStats] Maheshnotani:
Hey,

Its been quiet some time with this post, but i am stuck in similar situations.

I have redmi note 3, on LOS 7.1.2 latest build, battery drain issues from Google play services, Android os and Android system.

Wakelock detector shows wakelocks from phone and play services. Play services is taking 5 percent of my battery and the current stats are from 98 to 27 percentage battery.

Major wakelocks are GCM Conn alarm, GCM reconnect, package measurement and net scheduler from play services, and a few from android system and android os.

Also the phone idle drain shows at 12 percent, is it normal. The operator signal is weak in my area, i am assuming it does have an impact on the battery drain.

Please let me know what all should i block to stop wakelocks if any.

Thanks a ton :)
[BetterBatteryStats] JLius:
I don't know much about this, it is just something someone advised me but I haven't looked into it yet. Anyway, finally drained my battery now. Google play services doesn't drain that much. Phone idle is still the biggest player. Still, I have never lasted for 2 days before, max was 24 hours. So I am happy.
[BetterBatteryStats] Tayx:
Those flat lines holly crap. They almost seem to be going up hahaha. I tried formatting as you said, but no change :(

Did you try anything else apart from formatting the data partition?
[BetterBatteryStats] mminoss:
THis my last stat.. Airplane mode and i closed all... That confirmed i have a probem because most 1% per hour
[BetterBatteryStats] JLius:
First I reflashed stock rom to unlock officially, then I flashed LineageOS. Battery was still bad, so I formatted data, wiped system and caches, flashed LineageOS again with nano gapps and Franco kernel + naptime on super doze

Did you try recallibrating your battery? Don't know if that actually works or not, though.

I have a 4050mah battery, so my stats aren't that great compared to others. I only had 3 hours of sot in 2 days. I'm not a gamer, I don't use my phone that intensely. It's all relative.
[BetterBatteryStats] DB126:
Log is relatively clean and shows no smoking guns with minimal wake time. Either a bad battery (seems unlikely given reported voltages), miscalibration (try resetting battery status) or device is consuming power BBS can't see.
[BetterBatteryStats] azeem40:
Ever since I switched to slimclark (part of slim ROMs), my battery life has been bad. This is the log of almost 4 hrs at work. Idk what's going on...
[BetterBatteryStats] githyanki:
The only thing that stands out to me is GMS.

com.google.android.gms (): Wakeups: 3084 (17.1 / min)

there's some other stuff, but that's a big one. Something is using the messenger service a whole lot.
[BetterBatteryStats] ralfbergs:
Sure, flashing errors can result if you use an outdated recovery. But "just" increased power consumption (without instabilities!) due to issues resulting by use of an outdated recovery would be pure chance, and anything but typical.