yashsingh1/xdaforums huggingface dataset:
[BetterBatteryStats] rainbow99:
not sure why, I tried to attach many times using app and desktop but can't go through.
[BetterBatteryStats] TNSMANI:
Please read a few posts above.
[BetterBatteryStats] amn1987:
Could anyone please take a look at the attached dump file? Idle drain in my Redmi 3s had been outstanding, 0.1-0.2%/h over the last year or so but in the last 2 months the best I have seen was 0.4%/h with 0.8-1%/h being the norm. Only change from my end has been adding a second SIM instead of a microSD. I had switched to a different ROM by the same dev briefly and in it idle drain was just fine. If there are no glaring issues I might just give a try with the boot image from that ROM. I have limited charging voltage to 4V which corresponds to 62% or so at which point the OS reports battery as "Full". Thanks.

P.S. I had frozen Google Play Services in the last few days but previously it was always enabled and idle drain was still very good.
[BetterBatteryStats] amn1987:
Try after zipping it. Maybe XDA imposes a max. file size restriction for text files. In my case I always have to zip it otherwise it doesn't go through.
[BetterBatteryStats] TNSMANI:
Except Swiggy & Tasker, I don't find any significant apps draining battery. Obviously you had wifi and mobile data off and may be that was the reason for the elevated 'job deadline' alarms, but I am not sure.

In other words, noting jumps out. How old is the battery? Even this drain for A11 is good but you are used to lesser drain.

May be let the others also see and comment?
[BetterBatteryStats] Hot-Proton:
Why is BBS removed from PlayStore? Which version is for Android 11 on OnePlus 9 Pro the best and where can find the last Update? On first post there is only a old version..
[BetterBatteryStats] amn1987:
I usually freeze Swiggy when not using it. Forgot this time around. Was the drain from Tasker significant? Even previously when idle drain was excellent it was running all the time.

Battery is 4.5 years old but since in a different ROM I did briefly see idle drain around 0.1-0.3%/h I guess it's something with the ROM since the dev confirmed that the kernel is the same for both the ROMs. I will first try with the boot image and if it doesn't work out switch ROM and see.

Thanks.

Edit: I tried a custom kernel and it fixed the idle drain issue. 1% drop in 12 hours. At times previously in the stock kernel 25-30 hours before 1% drop. I guess when the drain is due to the kernel itself BBS can't help diagnose it? @TNSMANI
[BetterBatteryStats] TNSMANI:
These were the stats:

For a 4.5 yrs old battery, this drain is amazing.
[BetterBatteryStats] kiroen:
Please check on f-droid,it works on my pixel A11
[BetterBatteryStats] tortino:
yes but why is removed from play store? I'd like to know too.

can we have an answer from the author? thanks.
[BetterBatteryStats] amn1987:
The attached dump is from my primary device where I never quite had much luck with idle drain except for a while when I was using a custom kernel. Majority of the time in the 0.5-0.8%/h range. Very rarely reduced to 0.1%/h which almost always coincided with charging to 100%. Also right after unplugging the device 2-3% drop occurs in the first 2-3 minutes. Could anyone please check if anything stands out? Thanks.
[BetterBatteryStats] chamonix:
BBS is not dead!

Google has pulled BBS from GPlay. The given reason is that I use a library (HockeyApp) that allows installations by other means than the GPlay; that is correct except that library is a) deprecated and does not have backend anymore and b) the GPlay edition does not use that library, only the xda-edition does.

Removing HockeyApp is unfortunately not so simple because Google has also updated the minSDK to 29 (was 28) previously and some o you have noticed the latst build (with SDK29) had some other issues.

Anyhow, I think I have made some progress, and I have a version that now runs on my Pixel 3 XL and the current beta 2. After some testing - and your feedback - I hope to be able to get BSS re-instated in GPlay.

If you want to test this early fix please make sure to run (in a terminal, or "settings put global hidden_api_policy 1" directly on the device):

(Failing to do that will lead to errors telling you that the battery info service can not be contacted. This is another step by Google to further restrict access to private APIs with SDK29: I stay of the opinion that the only reason is that they don't want to expose how bad their own code is in regards to battery usage).

Tests I could do so far:

- Pixel 3 XL with current beta: OK

- Galaxy S10 running Android 11: NOK (known issue, Samsung unfortunately runs unpublished / undocumented code)

(more to come, I have a few phones laying around)

The build is going up in a few minutes
[BetterBatteryStats] chamonix:
I have been trying to fix the issues and have to apologize for not having posted anything. Post #2 has been updated with the current state
[BetterBatteryStats] chamonix:
This is somewhat problematic and I'd really would like to have a conversation with whomever uploads the BBS binaries to F-Droid.

In principle I have nothign against that (BBS is open souce) but still there are a few points that are unclear:

- where do the binaries come from, and who has signed them? Is it the xda-edition of some build that I don't control (and can not vouch for)

- my name is up there, no one has talked to be / asked me about that

- My e-mail is up there and that means I am expected to do support

- the name / logo are also up there, despite the fact that they are not open source

Don't get me wrong: I know about it and have let it slide because I like F-Droid and the Open Source spirit. That does not means that I would not have appreciated someone talking to me before publishing BBS there.

At the opposite of the spectrum there have been knock-offs on the Amazon App Store I have had these taken down when I saw them.
[BetterBatteryStats] dingsaller:
@chamonix

OnePlus 3 /LOS 15.1 / Magisk 23

I'm still using BBS 2.5-341 'cause this is the last version (for me) with working dark mode; also tried fresh installation with newer BBS, but always light when dark mode is chosen....
[BetterBatteryStats] sinanlenfom:
Hi, Would you check? Thanks in advance.

@chamonix @TNSMANI
[BetterBatteryStats] TNSMANI:
This is not an idle dump, strictly speaking. The screen on time should be as less as possible, preferably under a minute. Please generate another idle dump and post. As soon as you unlock the screen, open BBS and save the dump before doing any exploration.

That said, your mobile signal was not great, it was moderate for most of the time. If possible, while taking the next dump, locate the phone where the mobile signal is best. This is usually a big drainer.

Also, unplugged to current is not the best option for the dump. Try screen off to screen on/current or set a custom reference and save the custom to screen on/current dump. Sometimes, the battery drains faster from 100%. So charge it to about 85 or 75% or use the phone from 100% till it reaches that level and then start the reading.
[BetterBatteryStats] amn1987:
Bump.
[BetterBatteryStats] TNSMANI:
I have already seen this dump and commented. This is the same dump.
[BetterBatteryStats] amn1987:
Oops. I had mistakenly uploaded the previous dump again. Sorry about that.

Could you please take a look at the attached one? Thanks.
[BetterBatteryStats] shaggyskunk:
Wondering if it's possible to grant all the permissions using Shizuku & Wireless Debugging?
[BetterBatteryStats] TNSMANI:
Drain is only 0.6% per hour. Except the following two items, nothing to speak about. Battery should be nearing 3 years. May be a factor.

I will say considering the age of the battery and running A11, this drain is ok.

Regarding the drop from 100%, it happens. I can't pinpoint any specific reasons for that. May be the age of the battery again. This is why we recommend the dump to be started from somewhere around 75 to 85% avoiding the sudden drop.
[BetterBatteryStats] amn1987:
The battery is ~21 months old, cycle count at 640. But idle drain has been an issue from the very beginning. Rarely it would reduce to 0.1-0.15%/h but mostly in the 0.5-0.8%/h range. I keep a bunch of kernel wakelocks blocked all the time.

sns_smd is perhaps Significant Motion Detector sensor wakelock? Related to Doze maybe. I have reinstalled Naptime & disabled motion detection. Hopefully it wil suffice. Although in the OS, Sensor block was already enabled for a few apps.

Next when I clean flash I will skip GApps and all the other apps that I use and observe the idle drain. Thanks again.
[BetterBatteryStats] PsyCoder420:
Ive been noticing that my phone randomly stops going into deepsleep. This doesn't happen very often but like twice a week..and the moment i reboot my phone the problem is solved most of the times

Im attaching a few screenshots below

Whenever this happens I observe that there aren't any major partial wakelocks that are keeping the device up but a few kernel wakelocks..

Any feedback is highly appreciated!!

(I wouldve taken an overnight battery dump and posted but this happens very randomly so it isn't under my control:) Any help is appreciated)
[BetterBatteryStats] TNSMANI:
I think that this is a normal behaviour. If you take a dump for 15 odd minutes like you did, the phone will be awake most of the time (awake screen off). That is why an idle dump is required for a longer period of not less than 6 hours so that the effect of the initial wakelocks/alarms are mitigated over the longer period.

This is only my guess and I may be wrong.
[BetterBatteryStats] waylo:
I've tried running this adb command and it does not fix the issue for me, on Android 11 on S10e Samsung.

Sporadically, BBS will work (before running the ADB command). And then it won't, with that permission error. And the cycle repeats. Can't nail down what's causing it unfortunately.
[BetterBatteryStats] Ran-dom:
Hey, sorry if this is off-topic but it appears that BBS was removed from play store. Can't find it anymore and also gone from my purchase history in my account. Strange that there's isn't a link to download if you already purchased the app. Any info about this? Thanks
[BetterBatteryStats] Oswald Boelcke:
Just scroll up to post #37,758 slightly above yours. On top of post #2 you can also read about Play Store.
[BetterBatteryStats] Ran-dom:
I'm sorry I didn't realize that it was info there. I just panic search everywhere because google decided to remove 4 apps that I paid for from Play Store and I can't reinstall them now. Sorry again.
[BetterBatteryStats] Oswald Boelcke:
I guess you have to blame Google but not the developers of those apps - I know you don't blame the developes. Google tends to remove everything that doesn't fit into their business scheme.
[BetterBatteryStats] Ran-dom:
No no no, there's no way I'm blaming the devs for this, this mess is on google's part. And it's not the first time they do this. I lost quite some apps because they decided to remove them from store ( google I mean ). A few I had the apk files but others I did not :(
[BetterBatteryStats] ShanxRoux:
Cant get it to work on my pixel 4 xl a12 stock beta 2 rooted. Already did the command mention in termux.
[BetterBatteryStats] ShanxRoux:
Nevermind. Got it working after clear the app cache.
[BetterBatteryStats] PsyCoder420:
Can anybody please look at this dump file? I literally had just 2% of deepsleep last night.

(charged my phone to 100% used it till like 65% and took a battery dump for about 7 hours)
[BetterBatteryStats] TNSMANI:
The entire time the Android system was unsuccessfully attempting to silence the apps so that the phone can go to sleep.

I don't know which app/s caused this. If you have recently installed any app/s, uninstall it/them and check.

The next big drainer was Instagram. See if there is any way of controlling it.

And it seems that you had Location and/or wifi & BT scanning on.

Rectify these and post another dump.
[BetterBatteryStats] PsyCoder420:
Thankyou so much for your help man. I really appreciate it.

Im gonna uninstall apps one by one and see.

However my device had airplane mode on so location,bt,data everything was off.

Anyway, thanks for the insights 👍👍
[BetterBatteryStats] DiamondJohn:
I'd explicitly check, recently i was using Airplane mode on my Pixel 4a running A11, and the GPS was not turned off.
[BetterBatteryStats] obiwanbartek:
Does BBS work on Xiaomi MIUI 11 (Android 9) or MIUI 12 (Android 10)?
[BetterBatteryStats] crok.bic:
Yes, for example I'm using it on a Xiaomi Redmi Note 9 Pro (Joyeuse, MIUI 12.0.1.0 RJZEUXM EEA Android 11) and it's okay.
[BetterBatteryStats] crok.bic:
@chamonix

May I have a quick question? I saw here and there that there's a webapp that can probably show diagrams and other fancy stuff from the BBS generated txt file (from the data below the line saying "------ human readable part end here"). Where and|or how can I use the webapp? Is it available online somewhere (I don't know, javascript, php based..?) or is it available via docker, etc? Is it something like Google's Battery Historian? Thank you!
[BetterBatteryStats] DiamondJohn:
I would be interested to know of this app as well!

However, another app which I distribute here on XDA plots a LOT of graphical data relating to battery history. Some of the graphs include:

Doze Cycle in the menu at Currently Running>Doze Doze Cycle Graph

Battery History ie % over time (including over reboots) Currently Running>Battery>Battery Hostory Graph>*

Battery Drain Rate history (ie discharge rate per hour)

All the graphs are run from reports and data already collected by default in android. ie it does not run in the background, and as such can even report on data that occurred before it was installed. It does not use BBS collected data, but data already available / generated by Android.

Recently I have added a BUNCH of (about 100) graphical reports which include (I have bneen meaning to put a post on this thread as I think it provides a lot information) in the menu at Currently Running>Battery>Battery History Extras>*

Volt

Wake Locks

Wake Reason

Mobile Radio Signal Strength

WiFi Signal strength

Charge/discharge

Screen Brightness

Battery Temperature

etc etc etc

EDIT: the graphs require root.
[BetterBatteryStats] crok.bic:
I'm using TeMeFi for a long time on rooted devices (I wrote to your thread in the past, too) but I'm looking for an easy, less complicated graphical representation for non-rooted devices. Google's Battery Historian is really-really helpful but sometimes it's too much for normal users when I'm helping for them to check their battery issues.. thus I'm looking for a -probably little bit less complicated- solution for a little bit less experienced users to show the correlations between things and point to issues (I will still use Battery Historian and|or TeMeFi for myself).
[BetterBatteryStats] DiamondJohn:
I think if you go back through this thread, there is an app on the playstore called something like Samsung Battery or such. Maybe search for posts by me with the word Samsung or Graph. But someone else brought it to my attention. and it is not integrated with BBS and from memory requires to be running in the background to collect its statistics.
[BetterBatteryStats] sohebq:
Where I can get it for testing? its not in the play store yet.
[BetterBatteryStats] cdmackay:
See post 2 :)

---------- Post added at 05:08 PM ---------- Previous post was at 05:06 PM ----------

OH! right, that explains it.

I had bought the Market version, which doesn't have the xda bit appended...
[BetterBatteryStats] Paragon_X:
Hi everyone. I can't complain, I get a good 15hrs out of my battery but if there is anything here that looks like it could be fixed please do let me know.
[BetterBatteryStats] madLyfe:
i cant get the QR code links to do anything on chrome stable...
[BetterBatteryStats] olidie:
I just want to give a little feedback after all this help I got here. Two nights in a row my Nexus S made it over night with a batter loss of 1-2% (even with 3G). Great! Either a miraculous healing or the problem really was the google reader sync. I only wonder why this snyc then never appeared in the battery stats. Doesn't matter. Glad my phone is back at old strength and stays there.

Thank you to those who provided me with hints, tipps and ideas!
[BetterBatteryStats] chamonix:
You should update your BBS as version 1.0 does not provide all info the current version does. Once updated please provide a new dump.

So much I can say: sync is your biggest problem
[BetterBatteryStats] chamonix:
What QR code are your talking about?
[BetterBatteryStats] madLyfe:
the QR codes in the second post.. i tried in chrome and ff stable builds and nothing comes up.. im pretty sure they have worked for me before tho..
[BetterBatteryStats] Paragon_X:
I've gone ahead and updated. Tomorrow I'll repost, thanks.
[BetterBatteryStats] jeremysherriff:
That is something to do with XDA/forum framework, not this app.
[BetterBatteryStats] BusyPooping:
Subscribed
[BetterBatteryStats] sintaku:
I've done both. I barely use viber. I never even restored from the cloud didn't know it was possible.
[BetterBatteryStats] jeremysherriff:
Am running 1.7.0.0rc1, was expecting to see "wifi running" as well as "wifi on" times?
[BetterBatteryStats] chamonix:
Don't you in 'other'?
[BetterBatteryStats] sohebq:
only "wifi on is there", not wifi running.

---------- Post added at 03:30 PM ---------- Previous post was at 03:29 PM ----------

Is there anything we can do to decrease Android System/OS usage in one battery cycle ? I guess it mostly shows in the cycle if the phone is kept on standby for some time.
[BetterBatteryStats] sp8y:
I just see the usual wifi on stat.
[BetterBatteryStats] gradesm:
Same here. Only Wifi on as per the previous version.
[BetterBatteryStats] jeremysherriff:
No, even dumped to file to check there - definitely not available as a stat no matter what I do. I am running ICS though, which is a new thing for me.. maybe the stat isn't available with ICS??
[BetterBatteryStats] KJ98653:
So I improved my awake time (old graphs followed by new graphs attached below), but due to my usage got a little bit less battery life. I didn't uninstall fancy widgets because I paid for the unlocker and really like it. Just disabled automatic sync. I turned off wi-fi so that wi-fi calling wouldn't cause constant drain, but when I have a weak 3G signal I'd like to be able to use the internet and make/receive calls as well. I also restarted my phone so I'm unsure if that solved anything as far as awake time. Anything I can improve?
[BetterBatteryStats] Fincer:
Just for those who are wondering:

*job.deadline* and *job.delay* messages are generated by internal Android server's job controller file TimeController.java

I use a custom patch in my Lineage OS 18.1 build which prints more informative messages. Patch here:

patch_deadline-delay_alarmtags.patch - GitHub - Fincer/android_device_samsung_s5neolte_lineageOS

Obviously, you need to compile Android yourself with this patch applied in order to see more informative messages. Another alternative might be a new, simple Xposed module hook.

New message format syntax in BetterBatteryStats is as follows, Alarms section:

Alarms: 7, Intent: *job.deadline* WorkSource{10150 com.askeven.betterbatterystats_xdaedition}
Alarms: 1, Intent: *job.deadline* WorkSource{1000 android}

WorkSource{<uid> <packageName>}

Quick analysis on my phone indicates that most of the alarms for android are actually generated by BetterBatteryStats application itself.
[BetterBatteryStats] Jolubeat:
Hello.

Been using bbs for a few months so far.

Recently, I updated my xiaomi mi 9 se to the latest miui 12.5.1, rooted, (android 11) and I cannot make bbs work, no matter how many versions I try.

Got rid of the red warnings, but I think it has something to do with appops usage stats (it's always enabled when it asks me to)

Thank you
[BetterBatteryStats] crok.bic:
My educated guess is that you are missing this one: hidden_api_policy

On a PC (or using LADB) via ADB:

adb shell settings put global hidden_api_policy 1

..or in a terminal on your phone with root:

su

settings put global hidden_api_policy 1

..or in one line:

su -c settings put global hidden_api_policy 1
[BetterBatteryStats] Fincer:
Have you checked logs, such as output of logcat?

It may help to pipe log output to a file for further analysis (e.g. sudo logcat | tee <path-to-file>) or filter logs for picking up interesting entries (e.g. sudo logcat | grep -i betterbatterystats)
[BetterBatteryStats] Jolubeat:
Hi. I believe it's working properly now. Thanks man!!
[BetterBatteryStats] Jolubeat:
Thank you for your reply. Followed @crok.bic suggestion and it's working fine.
[BetterBatteryStats] sasik007:
I welcome where you can get the latest versions without root
[BetterBatteryStats] swapyworld:
Please help me understand reason for battery drain. Files attached.

Update: Tried multiple times to upload files. Getting attached, but aren't being uploaded. Any suggestions?
[BetterBatteryStats] Oswald Boelcke:
Occasionally, BBS idle dumps are not accepted for upload as txt-files; as far as I remember you would have to adjust the filename. However, two alternatives:

- Zip the txt and upload.

- Use something like https://hastebin.com/about.md and publish the link.
[BetterBatteryStats] belfakiri00:
any steps to use this patch please!
[BetterBatteryStats] Fincer:
Well, I use Samsung S5 Neo and compiled Lineage OS, mostly using the official guide and a guide I wrote myself. You need to compile AOSP or any variant from source with the patch applied, or ask someone to do it for you.

I compiled AOSP using an Arch Linux laptop with 32GB memory, took ~4-6 hours in total. Subsequent builds were, obviously, faster.

As far as I see, there's no other way than to compile AOSP (or forks like LineageOS) yourself or ask someone to do it for your phone.
[BetterBatteryStats] belfakiri00:
thanks a lot..
[BetterBatteryStats] dlads:
Can't see BBS on play store no more?

Can't remember if I paid for it but odd that' it's not there?
[BetterBatteryStats] Lughnasadh:
See Post #37,758

https://xdaforums.com/t/app-2-2-05-oct-v2-4-betterbatterystats.1179809/post-85176137
[BetterBatteryStats] dlads:
Lol cheers.

That looks and reads insane.

See post 37k ? Lol.

I'll have a look

Edit: yea that's bad, I've just installed another app.. hope it gets sorted.
[BetterBatteryStats] swapyworld:
Guys, please help me find out about the issue.

Device: Redmi note 4 (Mido)

Rom: Carbon Rom 8 ( Android 10) - rooted with magisk
[BetterBatteryStats] pjadec:
Sorry but too much Screen on time (less than 20sec) and too short time for dump ( should be around 6h )
[BetterBatteryStats] dlads:
Google play services potentially.

Give that an update or maybe even re-install it.

When was the last clean OS install??
[BetterBatteryStats] swapyworld:
2 days back. Clean install (Including data). Will try it brother.
[BetterBatteryStats] swapyworld:
ok man...will try to get it more and re-upload tomorrow. Thanks for the suggestion. Flashing another kernel didn't help either.
[BetterBatteryStats] DiamondJohn:
I have a Pixel 4a which has updates every month. I have surprisingly noticed that the PlayStore shipped in a firmware update actually sets me back a version or two, and it can take a few days before it gets updated.
[BetterBatteryStats] swapyworld:
I am attaching files with better details i.e. more time. Please let me know what's the cause of battery issue.
[BetterBatteryStats] TNSMANI:
You haven't followed the instructions in the first page of this thread or those given by @pjadec above. You should save the dump as soon as you unlock the phone, not use it for hours on end and then save it. We need an idle dump, not an in-use one.