yashsingh1/xdaforums huggingface dataset:
[BetterBatteryStats] Eversmile23:
BBS not working perfectly on my unrooted android.

BBS seems to be not working to its full potential on my Vivo Z1 Pro. It does not show any data on 'CPU States' and 'Alarms'. I am posting a BBS dump (taken after 5 Hrs 52 minutes of inactivity, I mistakenly touched the android and the screen was on before 6 hrs duration). Can anybody advise me on how to reduce further idle battery drain of my android?
[BetterBatteryStats] pjadec:
Seems normal drain to me. Battery drain between 0,4-0,7 %/h is normal range depend whats phone apps doing. If you installed and added adb context right, it should be working right. Did you followed OP instructions? This info https://xdaforums.com/showpost.php?p=67819528&postcount=4
[BetterBatteryStats] TNSMANI:
See pjadec's post above. It was actually meant for you but he seems to have quoted another member instead of you.

I concur with his conclusion. 0.7% per hour drain is good.
[BetterBatteryStats] Eversmile23:
Answer not complete in all respect.

If it was meant for me, then I would say, the answer is not complete. Because, nothing is explained on absence of data on 'CPU states' and 'alarms' on BBS screen. Why is it so? I am happy to know that 0.7% per hour of drain is normal.
[BetterBatteryStats] TNSMANI:
Please read the second half of his reply. That relates to your query.

Sometimes no one can explain certain things except may be the Dev himself. In that case, I don't comment on what I don't know.
[BetterBatteryStats] Eversmile23:
I had applied all adb commands and still not getting desired data on alarms and CPU states.
[BetterBatteryStats] rusm:
Hello. My phone continuously have awake time about 7% from qcom-step-chg kernel wakelock. Below is typical situation, and I also attached log, it made 5 min after screenshots, but nothing significantly changed.

This is Redmi Note 8T mobile, with rooted stock MIUI 11 11.0.3.0.PCXEUXM ROM. I see this 7-8% awake from this wakelock any time when phone switched off, flight mode, wifi, etc. does not matter. I also flashed clean ROM with only Magisk installed and I have seen the same results. Typically drain when sleeping at night with wifi on is about 0.3-0.5%/h

I can't found any info about qcom-step-chg wakelock, only one reference to Magisk module Advanced Charging Controller (acc) https://xdaforums.com/apps/magisk/module-magic-charging-switch-cs-v2017-9-t3668427

but I never use it.

So, seems that this wakelock related to battery and ROM, but I have no idea about future investigation, please point me to right direction.
[BetterBatteryStats] DB126:
Device is fine; ridiculously low drain rate. Wakelocks happen and do not need to be actively managed. This is 2020 - way beyond the days when alarms and wakelocks were problematic. Enjoy your well behaved device.
[BetterBatteryStats] mrjuniork:
You should count your blessing with those kind of drain values. Anything above 1% per hour should be investigated. Furthermore, refer to the post above mine, all has been said from the one and only :good:
[BetterBatteryStats] DSF:
[MENTION=1330150]chamonix[/MENTION]? Can you help please?
[BetterBatteryStats] DiamondJohn:
You could always freeze or Hide the app.
[BetterBatteryStats] DB126:
BBS simply reads, massages qnd nicely presents data created/maintained by Android unless 'watch dog' service is enabled. It does not continuously run in the background. No need to disable monitoring.
[BetterBatteryStats] DSF:
I have a pixel 4 and I am not rooted. Would like a service on/off toggle for fast switch without needing a computer or to go root way :(
[BetterBatteryStats] DSF:
It doesn't seems so, it has some background activity.

For eg, in 2m35s screen off, 443 wakelocks. Active monitoring is not enabled
[BetterBatteryStats] DB126:
Seems unusual. Perhaps app was cleaning up after previous foreground use. That said, total duration was <1s which means receiver likely wasn't listening and thus no meaningful activity or drain. Wakelocks are harmless unless some action is taken.
[BetterBatteryStats] DSF:
Fair enough. But my point is that sometimes i would like to turn completely off some apps' background activities, including BBS.
[BetterBatteryStats] DB126:
In that case disabling/freezing app is the best course of action (as noted by [MENTION=5417899]DiamondJohn[/MENTION]). Lots of tools that allow this to be accomplished easily and in bulk. Or simply use the native app management tool under settings on most ROMs.
[BetterBatteryStats] DSF:
I am on stock ROM and not rooted, as stated before. I wanted something hot switch with no other dependencies (eg: adb, root and so on). Hopefully the author will consider in a future release a toggle for service on/off.

(Tried to freeze some apps with SuperFreez but it failed to properly freeze apps like snapchat)

Thanks for your time!
[BetterBatteryStats] DB126:
Apps you install on an unrooted device can be disabled/frozen with no other dependencies. Possible your 'stock' rom does not allow those actions; that's easy to remedy with numerous utilities available in the Play Store.

I realize that's not exactly what you want. Unlikely developer is going to add a kill switch to BBS.
[BetterBatteryStats] topbasework:
Can someone help me what was wrong with my phone.

Gplay services drain my battery

This is my testing

Data on

Sync on

Location off

Idle around 7H
[BetterBatteryStats] shamsul007:
Error messages regarding permissions

my phone is rooted and I've granted all permissions in app info.

running havok is pie rooted through magisk.
[BetterBatteryStats] curiousrom:
Your test is not valid because the screen was on for too long before saving the dump file & the battery was not @ 95% or less. Do it again.

"Screen On (): 1 m 16 s 0.3%"

See Screen Off to Screen On Missing - BBS Settings.

Disable auto-update in Play Store:

"Network (requires root)

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

10162 (Mobile) (Google Play services): 9.0 MBytes 39.0%"

***
[BetterBatteryStats] githyanki:
Your screen was on slightly too long,

If you don't use telegram for calling, turn that "feature" off.

See screenshot for settings (the 2 with the word calls in them)

Then make a new dump.
[BetterBatteryStats] topbasework:
Ok i will do again

Im already off auto update in playstore before do testing.nvm will do the proper one.

Thank for pointed

---------- Post added at 06:53 AM ---------- Previous post was at 06:48 AM ----------

Thanks for pointed

Will do dumb again
[BetterBatteryStats] bertino:
Hi. I get 100% powermanagerservices.wakelocks, but hardly any partial wakelocks and alarms. Any clue what could be going on?
[BetterBatteryStats] DB126:
BBS idle log? See OP for guidance.
[BetterBatteryStats] MrBrady:
Can somebody help me find what's draining my battery? Fresh install of PixelDust on my Taimen (Pixel 2 XL).

I followed the instructions in the OP for these logs.View attachment BetterBatteryStats-2020-02-23_082611911.txt
[BetterBatteryStats] pjadec:
Your phone doesn't sleep at all. Then android system does something strange. i'dont know what it is this time. Theare something fishy your phone system. You can try reboot phone and take another dump. If this doesn't not help then i suggest flash rom again.
[BetterBatteryStats] MrBrady:
That's what I'm seeing too. Rebooting and reflashing system doesn't help. Some people on the same setup report the same issues. Others say their battery life is fine. [emoji2369]
[BetterBatteryStats] leno_p2:
Hi all,

Can Someone tell me whats is draining my battery? Here is my dump file:

filetransfer.io/data-package/ZS2ax50r?do=download

Thanks
[BetterBatteryStats] pjadec:
Your phone drain is probably because bad battery.
[BetterBatteryStats] mcdachpappe:
Hello,

i've already tried to find something via search but i wasn't able to find a solution for my problem. If i want to get the latest test release (from post2) I'll be forwarded to the ms-appcenter and nothing happens. I'm signed in at ms-appcenter but i can't see anything. I tried the same some months ago and it worked back then.

Is there anything that I'm missing ?

//edit:

hockey app is installed on my device
[BetterBatteryStats] leno_p2:
:crying: can someone confirm that plz ?
[BetterBatteryStats] Oswald Boelcke:
Your idle dump doesn't show anything significant to me but with that power level lost I'd also assume a bad or dying battery.
[BetterBatteryStats] curiousrom:
HockeyApp Deprecated - BetterBatteryStats xda edition

I don't know if BBS dev [MENTION=1330150]chamonix[/MENTION] is aware of this but the HockeyApp linked in the post #2 to obtain the BetterBatteryStats xda edition is deprecated.

At one point a few months ago the HockeyApp offered me to install an App Center app (de.codenauts.hockeyapp) which I did.

Now what's important is the invite to get the BetterBatteryStats xda edition.

I just tried this & it works as you can see in the attachments:

Download Visual Studio App Center (com.microsoft.hockeyapp.testerapp) from Play Store.

Hit Sign in which opens a browser page > select Sign in with email & use the same email & password you used with the HockeyApp.

After you sign in it will ask if you want to open with the App Center (com.microsoft.hockeyapp.testerapp) app.

Download BetterBatteryStats xda edition which is version 2.5-341 (98) @ the present.

Note: The Visual Studio App Center is shown as App Center in the app drawer & > Settings > Apps.

BTW the HockeyApp's home page https://hockeyapp.net redirects to https://appcenter.ms/ and I can log in that page with a PC browser & get a QR code & BBS download link to be opened on the device.

***
[BetterBatteryStats] mcdachpappe:
Thank you for your answer.

That's what i did already. Unfortunately i don't remember my email log-in which i used in the past. I'm logged in now with my github account and can't do anything in this app. If I'm opening the site with my browser, everything is empty as like in the app.

Clicking on the provided link in post2 to obtain the latest release will open the app center app but nothing happens.

Is there any other link?
[BetterBatteryStats] curiousrom:
Re: HockeyApp Deprecated - BetterBatteryStats xda edition

Not for the most recent @ the present BetterBatteryStats xda edition 2.5-341.

BBS dev [MENTION=1330150]chamonix[/MENTION] posted this in the post #2:

"xda edition: for xda-dev members I provide an always free and fully featured version of BBS (please play fair and do not redistribute the app without my consent)."

He chose the way he wants to distribute his app & I respect that.

Let's wait a little bit to see if he responds to the ping I included in the post above.

***
[BetterBatteryStats] Navras:
Hello,

I'm having problems with Battery Drain (on S10 Snapdragon) while Bluetooth is activated (around 2.5%/hour vs. 0.7%/hour). I think this wasn't the case a couple of months ago.

Dumpfile with WiFi and Bluetooth On, Cellular Off: dropbox.com/s/c5q20a6of45toml/BetterBatteryStats-2020-02-24_122012085.txt?dl=0

Dumpfile with only Bluetooth Off: dropbox.com/s/3fcajn9h0w4kjv5/BetterBatteryStats-2020-02-28_115456877.txt?dl=0

As far as I understand the logfiles, the phone only enters DeepSleep for about 25% of the time when Bluetooth is on, possibly because of the wakelocks from "bluesleep" and "bluetooth_timer"? And thus the drain. With Bluetooth Off, DeepSleep > 90% is possible and the battery usage is as I would expect from idle use.

I'm also observing the drain in Samsung "Safe Mode" (forces the device to run the essential operating system, and disable most 3rd party applications), so most applications can be ruled out as the source of the problem. I have also reset the Network/Wifi/Bluetooth Settings, disabled "Search for Devices Nearby" and WiFi/Bluetooth scanning for location services. But nothing is helping except turning Bluetooth off.

What is causing this abnormal drain when Bluetooth is on? Surely something is causing it. My current theory is it could be Samsung Wearable constantly looking for devices or a Bixby Routine, which unlocks my device when I'm home. But haven't tested this yet.
[BetterBatteryStats] topbasework:
Can some take alook

Data on

Sync on

Location off
[BetterBatteryStats] DB126:
Poor signal through much if sampling period. Try enabling WiFi if there's a nearby AP. Otherwise, put in airplane mode and retest.
[BetterBatteryStats] topbasework:
Ok thank

Will redo again using WiFi
[BetterBatteryStats] TNSMANI:
BT off:

The mobile signal is weak and that drains your battery fast. Try to locate the phone where the signal is better and take another dump.

Alarms: 107, Intent: com.sec.internal.ims.imsservice.alarmmanager

If you can control this, there will be savings.

Location seems to be on and is causing a lot of alarms. See whether you need this to be on while sleeping. Plus check Wifi/BT scan settings in Settings>Location and if it is on, set it to off.

Samsung Push is also causing a lot of alarms.

WhatsApp had a download/upload of about 85 MB during sleep.

BT on:

In addition to the above, a lot of wakelocks related to BT.

Common: There seems to be some issue with your Wifi also. When was the last time it was reset (switchoff-wait-switchon)?

After attending to the above, take a fresh dump.
[BetterBatteryStats] Navras:
Thanks for your analysis!

But how could I control alarms from com.sec.internal.ims.imsservice.alarmmanager or Samsung Push or wakelocks regarding Bluetooth?

I'd like to keep Location on (for SmartLock and convenience) and as it doesn't make a noticeable impact by my testing. And good point - I'll restart my WiFi router. Will do further testing und dumps the coming days.

Further, would a dump with only Bluetooth on (WiFi, Location, Cellular Off) be insightful? This week, when I checked this configuration it was using 1.5%/h (whereas with WiFi, BT, Location, Cellular all off the phone used about 0.2-0.3%/h on a short test).
[BetterBatteryStats] TNSMANI:
Unless you disable or uninstall those apps, on Android 10, I don't know of any other way.

If you keep Location on and BT also on, then you will have to learn to live with the drain. Just do the wifi reset and take another dump. Let us see.

No further insight is necessary if you want Location and BT on.
[BetterBatteryStats] DiamondJohn:
One of the tricks of yester-year was to reduce increase the wifi scan interval. But I wouldnt expect night and day type results

EDIT: increase/decrease corrected:o
[BetterBatteryStats] TNSMANI:
You mean increase, don't you?
[BetterBatteryStats] DB126:
Decrease seems to be correct. But I agree twiddling this parameter will have next to zero impact on battery life assuming reasonably modern device and ROM (devices equiped with vacuum tubes and mobile Cobol don't quality).
[BetterBatteryStats] DiamondJohn:
Yes. I guess I was thinking of two things at once and typed quicker than my brain operated. I meant to reduce the occurrence of the wifi scan, which would be, as you implied, by increasing the interval value.

EDIT: post corrected in case someone doesn't read the corrections to what I said.
[BetterBatteryStats] mrQQ:
guys, what is ads_tx_wake/ads_rx_wake? i have 2.5h of them during 8h phone use :/
[BetterBatteryStats] viucorp:
Hi guys, bought a Pixel 4 xl 4 days ago.

Can someone please check the log please?

Phone app has a partial wakelock gns sometimes, don't know what that is...
[BetterBatteryStats] TNSMANI:
This is not an idle dump and so not useful for analysis. The screen on time should be as less as possible, preferably within one minute. See the OP and take another dump, idle this time.
[BetterBatteryStats] curiousrom:
Re: HockeyApp Deprecated - BetterBatteryStats xda edition

FYI got this message from BBS dev [MENTION=1330150]chamonix[/MENTION] about the HockeyApp Deprecated - BetterBatteryStats xda edition post:

"Thanks for letting me know. I am a little swamped right now but I will get to it"

The continuous support since 2011 of BBS for XDA users is just amazing.

Thanks :good::cool: Mr. Dev!

***
[BetterBatteryStats] chamonix:
I must say I am really sorry about not being more responsive. I have a lot on my plate in my day job at the moment so I am very thankful for your hint. Rest reassured of my commitment, even if it can always be at the level of the expectations. I will put priority on distribution of the free version, as promised at the start of this project. Next will be investigating what will happen (aka break, following Google's steps to lock the use of private API down) with the next release.

Thanks for your patience and for getting my attention on this serious issue!

Edit: grammar
[BetterBatteryStats] Ardysan:
Gents, would be really grateful for advice re this log, Mi 9T, MIUImix latest Dev.

Used to have 0.2/0.3% per hour drain on miui 10, after updating to 11 it's the best I can do (1.2%). This is under the same conditions, without mobile signal with WiFi calling.

Anything which catches your eye?
[BetterBatteryStats] DB126:
Likely a kernel compatibility/optimization issue; nothing to do with Android as device 'slept' for most of the sampling period. Battery is an unlikely candidate as voltage remained stready. Not at all unexpected given maturity of Android 11. Power optimization as not the focus at this stage.
[BetterBatteryStats] Ardysan:
So, anything else I can do or...?
[BetterBatteryStats] DB126:
Err...roll back or accept the drain until an optimized build is released.
[BetterBatteryStats] sohebq:
Google maps, what's app, and facebook are causing this issue. Also, turn off the WIFI when not in use. You might be using a wifi with poor signals.
[BetterBatteryStats] bendirkss:
I'm very comfortable at 20% but thinking about trying auto today
[BetterBatteryStats] sohebq:
I have around 30% brightness and display is perfectly fine, both indoor and outdoor. Actually when you change brightness settings, your eyes takes some time to adjust, my personal opinion. I have few friends who are even happy with 0% brightness. Anyway, if someone can't compromise, he should not complaint about the battery, just saying. :)
[BetterBatteryStats] bendirkss:
Lol I know. Didn't know I'd get in that much **** for using my phone how I want to :S
[BetterBatteryStats] gradesm:
Did you freeze any system apps btw? Cause facebook whatsapp and maps may be drainers but your svnet is kinda high.

Do list what apps you may have frozen, either that or you could always freeze whatsapp, facebook and for maps just turn off "use wireless networks" and GPS. then redo BB Stats to see if they really are the cause of your svnet issues
[BetterBatteryStats] ybres:
I have observed an odd behavior recently and I was wondering what might cause it...

I'm using Traffic Counter Extended with 1 Minute refresh interval (only setting that provides an accurate reading) and the problem appears after a reboot.

When I look in the Alarms panel after a couple of hours -> com.carl.trafficcounter (): Wakeups: 300. Normal given the high update frequency. Viewing the Android Battery Graph no unusual awake times appear, but when viewing the BetterBatteryStats History some wakelocks appear when screen is off (view attachment).

Ok, the thing is that after approximately 12 hours, or when something like the 1000 wakeup mark is reached, the com.carl.trafficcounter alarm disappears. Surely the alarm is still present because the counter works and in Partial Wakelocks, Alarm Manager count increases. The odd thing is that after it disappears the Awake and Screen On graph looks normal (see second picture).

Also attached a dump if it is of any use.

By the way should I use 3G Watchdog instead or what counter app would you recommend?

Thanks for your time :)
[BetterBatteryStats] chamonix:
You may have put the finger on a '4 digit alarm count bug', thank you for that (I will confirm after checking the code).

About your remark about the different profile before and after the line: I think the explanation lays in other wakelocks (partial and kernel), especially the location related high counts. The only way to get more light into this would be using an active monitoring with bbs taking one snapshot e.g. once per hour (working on that).
[BetterBatteryStats] KJ98653:
Want to get some assistance addressing wifi calling and fancy widget apps. Getting a little over a day out of my phone compared to the 13-15 hrs I use to get but no setting in wifi calling or fancy widgets seems to affect the wakelocks in alarm manager. Are these apps the culprit or am I off the mark?
[BetterBatteryStats] stuart0001:
Please attach the file and don't paste the contents. Otherwise it makes the thread huuuuge
[BetterBatteryStats] pentel:
ok..my bad
[BetterBatteryStats] ybres:
Thanks for the answer.

So you think I have a high location wakelock? Strange, I already cleared data for Maps (not logged in Latitude) and Talk and disabled both Wireless and GPS in My location settings.

Could you recommend a better traffic counter?
[BetterBatteryStats] sohebq:
"unknown_wakeups" (): 2 h 28 m 25 s (8905 s) Cnt:(c/wc/ec)18054/18054/18054 35.2%

Never saw anything like this before. :S
[BetterBatteryStats] pentel:
yes..that's the biggest one, it appears in every bbs log as the main kernel wakelock.

Also in the hidden htc "testing menu" (*#*#4636#*#*) htc sense and setting are reported to run for many hours(and counts), even with screen off and the phone resstarted (with battery off)

:|
[BetterBatteryStats] Karpfenhai:
Yes, Data Counter Widget, consumes almost no Power.

Strange new market...

https://play.google.com/store/apps/...S5yb3lzb2xiZXJnLmFuZHJvaWQuZGF0YWNvdW50ZXIiXQ..

Give it a try..
[BetterBatteryStats] QckGl:
Ok so I already did the update to the latest version of google maps and I unchecked the automatic check-ins. Actually I don't use latitude, the one I use a lot is waze! Ok right now I'm charging my phone and I will then send you the dump file!!
[BetterBatteryStats] chamonix:
Looking at that dump it is clear that your problem is not userland but kernel. You may have a small potential in disabling wifi when not using it and tweaking the settings of your Google accounts. But more than 3 hours of awake can be directly accounted to that unknown kernel wakelock.

I recommend that you take this information to the device specific thread: it's improbable that you are the only one having this problem and you may find ways of updating your phone. Hopefully you find a cure in the form of an update or maybe an alternative rom/kernel.
[BetterBatteryStats] chamonix:
Well, I don't know waze but from the description it looks like this tool could explain the huge number of location related wakelocks. To confirm you should try to disable it to see if those wakelocks stop / reduce.

What location provider do you use (gps, cell) and are there any options in waze that may allow to condition the obsession of your phone about locating itself. Devs have many options available when it comes to getting the location (how often, how precise, how expensive) so I don't tell location is impossible without costs. In contrary, I have proven that it is all a matter of carefull design (see altitude, the alternate latitude updater)
[BetterBatteryStats] chamonix:
Could anyone having the problem that bbs does not save the reference for 'on charged' provide some help.

My theory is that the problem occurs for setups where the battery charger is throttled by code (I guess kernel) to avoid charging to 100%.

If you have that problem please provide a logcat showing the even of unplugging from the charger when battery is charged. What I expect is that the throttling prevents the battery level reported by userland to reach 100%, leading bbs to believe that is not charged (so shipping the reference saving).

If you help me to pinpoint that I could add a threshold controlled through preferences to interpret another battery level as 'charged'.
[BetterBatteryStats] sohebq:
Changing the kernal should solve the problem for you. Good luck
[BetterBatteryStats] Ardysan:
Heey, these are not fun options! I was kinda hoping you'll say something like "step aside young android padawan, lets edit this bloody kernel... ":D
[BetterBatteryStats] DB126:
Yeah, deem days are long gone (along with the primitive devices of yesteryear)