yashsingh1/xdaforums huggingface dataset:
[BetterBatteryStats] DiamondJohn:
Not a fix for BBS, but the following should clear / reset your battery stats within android.

Run in shell / over adb.

dumpsys batterystats --reset;
[BetterBatteryStats] swejuggalo:
What kind of ram usage do you guys have?

I use 2.5-344 with standard settings. Over time it seems to get fairly big. After reboot it is around 50MB. Think I've seen up to 300MB usage at times.
[BetterBatteryStats] DB126:
Irrelevant, it's simply preallocated space that will be immediately released if needed by the system or another app.

---------- Post added at 01:22 PM ---------- Previous post was at 01:15 PM ----------

Nothing obvious in the brief log aside from alarm clock app. Erratic behavior is often the first sign of a failing battery. Can happen to new devices and old. Consider having yours serviced while still under warranty.
[BetterBatteryStats] who ah way:
Thank you very much for taking the time to look at it — and for the tip!
[BetterBatteryStats] swejuggalo:
Irrelevant? Would that mean that the app could virtually use an endless amount of ram if it's sees it fit to use without an error behind it? So in theory it could climb to a few GBs if I have the RAM to spare? [emoji6]

To me it would seem logical that the peak RAM usage is a result of available RAM and currently logged data... The size being the result of amount of apps/processes, time of measurement and available RAM. If approx 300MB+ is what it take to do so, then OK.

Was just interested about the bounderies of normal RAM useage, just incase there was a memory leak behind it or something and it would be nessesary to report it [emoji846]
[BetterBatteryStats] DB126:
Sure. Android will cull extraneous memory allocations (pages) as needed. But highly unlikely it would grow that large.
[BetterBatteryStats] sjamie:
After running dumpsys command, BBS continues to show inaccurate information. I'll try clearing data and cache again...
[BetterBatteryStats] curiousrom:
BBS No Data - Logcat?

Maybe you could > BBS > Settings > Advanced > Debug > check Add debug info to logcat.

Then after a couple of hours not touching the phone > BBS > Share > check both Dumpfile & logcat & attach them to a reply?

Dumpfile & other logs are saved in /sdcard/Android/data/com.asksven.betterbatterystats_xdaedition/files/Download/.

***
[BetterBatteryStats] plusminus_:
I compared 2.5-341 and 2.4-262 because I was also surprised by the RAM usage (I have an old phone :o). In Running Services under Developer Options I saw a peak of 128MB for 2.5-341, while 2.4-262 is currently using 8.7MB (for the first 24 hours it was using 4.8MB). So a noticable difference, even if it's irrelevant lol. I wonder if it's related to BBS foreground service for reference processing (if I understood the release notes for 2.5.2-274 correctly! :o)
[BetterBatteryStats] swejuggalo:
Thanks. I use the Google play version on beta. So the info I was after was some kind of indication of normal and abnormal behavior [emoji846]

I don't really see a problem as long as it dont grow out of hand. Atleast it does not grow endlessly.
[BetterBatteryStats] kierownikk:
Hi,

Does anyone know why is BBS not working properly on my Galaxy S10E with Android 9 (pie) on board?

When I first installed it and granted all permissions using ADB it worked fine.

Then it just suddenly stopped working and started showing blank screen.

I reinstalled the app and re-granted all permissions but now it constantly shows "No stats have been collected yet" and that's it. No matter what I do I can't make it work again.

I tried version 2.3.248 Xda edition downloaded from 1st page of this post, nothing. I also tried the paid version from google play but with the same result.

Thanks.
[BetterBatteryStats] DB126:
Search the thread for S10. Common issue with no proven remediation.
[BetterBatteryStats] kierownikk:
It is strange, it worked perfectly fine on my S10e with Android 10 on it. I recently downgraded back to Android 9 due to not liking 10 and it doesn't work on Android 9 on the exactly same phone :eek::eek::eek:
[BetterBatteryStats] jukyO:
Hello guys,

Where can one download version which supports Android 10?
[BetterBatteryStats] swejuggalo:
I use beta version from Play Store. Works for me in Oneplus 7 Pro with 10.
[BetterBatteryStats] jukyO:
Paid version? I see only regular, non beta on PS.
[BetterBatteryStats] swejuggalo:
Yes. You can join beta via the store or here.

https://play.google.com/apps/testing/com.asksven.betterbatterystats
[BetterBatteryStats] ffew2:
Hello. My english in not very good, sorry for this.

I have some trouble with fast battery drain on my Nexus 5x. I installed clean lineageos 15.1 with microG + franco kernel + magisk + BBS. If wifi is turned off phone can work up to 15 days (if i don't touch the phone), but with wifi on it is working less that one day with full charge. When wifi is on it is always Deep Sleep 0%, Wifi Running 100% and i think this is because of qpnp_fg_memaccess and qpnp_fg_update_sram.

I didn't find any information about this wakelocks which I can fully understand with my knowledge's. I also tried use another wifi networks - with all I have same problem. Is there anything that I can do with that? Thanks.

I didn't find where I can attach the file I think because it is my 1st post and also I can't post links because of same reason so link to my dump (change _ to .)

pastebin_com/FmeYzmRH
[BetterBatteryStats] Oswald Boelcke:
Not a usable idle dump. Please refer to OP for detailed procedure but just briefly: Minimum 6 hours with less than one minute screen on time.
[BetterBatteryStats] ffew2:
Sorry. New dump (change _ to .):

pastebin_com/fHgSpJcc
[BetterBatteryStats] strongst:
Since your device never enters deep sleep I recommend to break it down. So same setup but with the stock kernel not Franco kernel. Then make an similar dump file to compare the results.
[BetterBatteryStats] ffew2:
I am turn on location service in microG (set checkbox "Mozilla Location Service" in "Configure locations backends") and all working fine now if anyone interested, it is seems microG bug.
[BetterBatteryStats] realista87:
are latest versions no more available on the xda thread? last version i can see is 2.3.248
[BetterBatteryStats] stevexyz0:
As mentioned in post #2, later versions are now distributed through HockeyApp. Look for the HockeyApp link in that post. You need to sign up for an account, but it looks like it grants access automatically with no delay. Version 2.5-341 is available through HockeyApp. However, note that the Play store version is slightly newer (2.5-344).
[BetterBatteryStats] mirhl:
Ehrm... Good to know, but "event processing" is as much dull of an indication as it could get.

"Service notification for persistent running" (with or without a "press here to hide it" tooltip) or something like that would be much more understandable.

And is it normal that on my XZ2 it only shows up if I first manually start bbs once (anytime I reboot)?
[BetterBatteryStats] fridrik:
Is it normal to give this message when I try to give proper permissions to be able to use bbs on a rootless phone?It's still as denied here.
[BetterBatteryStats] stevexyz0:
Did you install from Play Store or the XDA edition? If from XDA, the package name is different. Try appending "_xdaedition" to the package name on the command line. I.e. com.asksven.betterbatterystats_xdaedition. More details in post #4.
[BetterBatteryStats] fridrik:
I downloaded the version that is on the Hockeyapp site

Edit: I put xdaedition and it was all normally. Thank you for your help.

Is it normal for this first wakelock to appear? I always turn off automatic updates and always turn off background activities from the play store.
[BetterBatteryStats] ianmacd:
Whereas BBS ceased to work properly on Pie-based Samsung devices (such as the Note10+), I'm pleased to report that the app once again works as expected when the device is updated to Android 10. All stats are once again available and properly updated.

Welcome back, BBS. You were missed.
[BetterBatteryStats] natri23:
My Pixel 2 XL is draining almost 3%/h everynight and even with All Sensors Off in Developer and the phone facing down, it still taking 1.8% per hour. The log doesnt help me much. Maybe someone has any suggestions??

Below is a BBS log overnight with All Sensors off and the phone facing down.
[BetterBatteryStats] chamonix:
Solution 1: switch to "since unplugged"... it is more precise most of the times anyway

Solution 2: Check for the log entry of tag "BraodcastHandler" and for the text "Bettery level on uplug is XXX" upon unplug. If your phone is charged to 100% at the time you unplug the log should say "Level was 100% at unplug, serializing 'since charged'", meaning the reference "since charged" was created. Any log with that sequence would help me finding out what is wrong (I suspect that some kernels never charge to 100% for some battery saving reasons. If you could give the value that is returned by userland when the phone is fully charged I could add a threshold to avoid the kind of problem you have for kernels with special battery charge throttles.
[BetterBatteryStats] QckGl:
Hi, could some one help me with these dump files!! My battery is draining very fast and a I have set my facebook, twitter, mail account to be checking every hour or 2 hours. I dont know what I'm doing wrong.

I'm using an AT&T Samsung Galaxy SII i777 with unnamed 1.3.2, Entropy kernal 3-4-12 B and modem KH7
[BetterBatteryStats] bendirkss:
Fell asleep before unplugging my phone but this is my partial wake locks today. Battery is at 55 after 7h with only 40m of screen time. So its pretty awful I think.
[BetterBatteryStats] jeremysherriff:
Sorry dude, a screenshot like that doesn't really help. Post a dump file.

Did you try changing to 2g?
[BetterBatteryStats] razorseal:
Hey guys

Using Atrix 4G with ICS (kang/turl v8)

I was getting AWESOME battery life (35 hours) and today, I couldn't even get 10 hours. something started draining it very fast. Last 2 things I installed was mobile defense and life 360 which were last night. I froze mobile defense and uninstalled life360 but it kept draining rather quick after that...

I was told to get this and check wakelocks. I read the OP but I'm a bit confused...

what shall I do/post for you guys?

since the phone died I let it charge back to 100% which is done now, I haven't unplugged it. betterbatterystats is running.

let me know what I need to show you guys

This is what it's looking like. I'm confused as to why the wifi is on 100% of the time (i thought it checks periodically, not active 100% when it's on) and awake looks wild too I think.
[BetterBatteryStats] bendirkss:
No, Should i run 2G all day tomorrow? I set my syncing to every 15 mins also
[BetterBatteryStats] shingo86:
Wow u sync every 15min. Can I ask Wat phone u using? I can nv set 15min sync on my sgs2. Battery will flat very fast if I do tat on my phone
[BetterBatteryStats] bendirkss:
Well I never said i get good battery life, i can barely get 2h of screen time on my phone, which is a Galaxy Nexus to answer your question.
[BetterBatteryStats] chamonix:
My experience is that screen on time highly depends on brightness on gn. I use screen filter (market) and have no problems reaching 4-5 hours on screen with a battery life > 12 hours on intensive use
[BetterBatteryStats] bendirkss:
I never go over 30% brightness. Usually at 20
[BetterBatteryStats] jeremysherriff:
Yeah, run with 2g for a day and see if there is any noticable difference. I have to run 2g at my work, but at home 3g is fine.

Do you have an auto brightness option? Just a thought..
[BetterBatteryStats] chamonix:
The first reading is useless as you have as much screen on as awake. The second one is a little better but still the screen on time makes the analysis difficult and the interpretation may be biased. Please provide a dump after leaving your phone alone a few hours.

As far as I can see network location is your main problem, causing a large amount of Wakeups. You should check you maps settings, make sure to update to latest version. Are you using latitude and/or automatic check-ins?
[BetterBatteryStats] chamonix:
Create a dump file for 'since unplugged' after plugging / unplugging your charger and leaving your phone alone for 2-4 hours. The dump creation is under the 'more' menu, the file will be located on /sdcard
[BetterBatteryStats] bendirkss:
Ya but I always figured auto brightness would have a higher drain that just sticking at 20% or so, correct me if I'm wrong though. And about lighflow, potential issue? Disable for tomorrow?
[BetterBatteryStats] jeremysherriff:
Light flow looked ok in the dumped file.

Auto brightness it's a matter of personal choice i think, it will use more battery but what use is a device if you can't read the screen?
[BetterBatteryStats] bendirkss:
I'm usually inside so 20% works. I think I'll just switch my 2G to enable when screen is off. Not like I have the option to have my screen on for more than 2h anyhow right
[BetterBatteryStats] freemini:
Just wanted to say that I can't stand low brightness. I better have less battery than brightness. It drives me crazy seeing people use their phones with brightness set at absolute minimum, you lose all the color and beautifulness of the screen. I don't know how bright 20% is on the Galaxy Nexus, but if it's like SGS2 it's only usable in low light.
[BetterBatteryStats] aitkja:
POOR battery performance.. Please Help

Hey guys

Sooo I have been noticing significant battery drain since my original custom firmware on the i9100.. Currently I am running Checkrom RevoHd v6.

Basically it is just using too much juice when idle.

I have followed some very good links on XDA to under volt and limit CPU and GPU frequencies but I have not noticed any difference.

It seems that the device is staying awake far too long than it should when compared to "screen on" time.

http://www.pastebucket.com/1837

Batter stats and screen shot are attached.

Any help would be GREATLY appriciated.

Regards James
[BetterBatteryStats] sohebq:
"Svnet" is your main culprit and according to me its a network traffic issue.
[BetterBatteryStats] aitkja:
Well i have done research and cannot come up with a solution to the Svnet wakelock?? Any ideas? I have whatsapp messenger, could that be cuasing the network traffic issue?
[BetterBatteryStats] DB126:
Lots going on even though device reports being in 'deep sleep' much of the montoring window. Appears to be some type of entitlement issue. I'd say ya got yourself a borked A10 build. Not much you can do short of resetting the device given unrooted status. If the problem persists consider rolling back to Pie.
[BetterBatteryStats] Lughnasadh:
In addition to what DB126 said,

Do you have Bluetooth scanning on? If so, try disabling that and maybe try not using the "Flip to Shhh/Phone facing down" feature (sensor problem?)

As an aside, I have a rooted Pixel 2 XL Q stock and my dumps always say "Root perms: false", so I think BBS may be reporting that falsely.

As a possible baseline, my phone averages around .6%/hr idle drain but I also don't use Facebook, Instagram or similar-type apps.
[BetterBatteryStats] DB126:
FWIW - 0.6%/hr average idle drain appears typical for most well behaved Pixel devices. Lots of sensors on those pups. :)

Good observation on root permissions reported by BBS. TBH I was wondering about that given the number of Pixel logs that indicated no-root.

Happy New Year where ever you reside!
[BetterBatteryStats] curiousrom:
Root perms: false - Error in Dumpfile

Same on Galaxy S5 G900M LineageOS 16.0 klte build 2019-12-24 + Open GApps Pico + LineageOS AddonSU for root:

***

Same to you & your family. :good:

Not there yet as I live in UTC -6 (no DST) as shown @ the present in https://www.timeanddate.com/counters/newyearmap.html

Delayed gratification is so 2019. :silly:

***
[BetterBatteryStats] Lughnasadh:
Happy New Year to you as well :)
[BetterBatteryStats] natri23:
Yeah I already have those scanning turned off and even all Sensors off, also no root since it's a Verizon bastard. Could be because I updated from a beta A10. I will reset and see how it goes.

Thank you and Happy New Year!
[BetterBatteryStats] NickosD:
Anyone knows what's causing the videoplayer wakelock? It wont show anything at bbs app, only in gsam. Tried to turn off the autoplay with no luck.
[BetterBatteryStats] soilentgreen:
Hey

When I tried to choose on statistic type screen off to screen on, I only get screen off to current no screen on.

it is matters?

O.4%/h its fine?

Thanks
[BetterBatteryStats] TNSMANI:
Screen off to current is ok. O.4% per hour drain is more than ok.

Enjoy your device!
[BetterBatteryStats] curiousrom:
mmc0_detect Kernel Wakelock - Micro SD Card Problem?

Yes "Statistic Type: Screen Off to Current" is fine. That's what I see on my Galaxy S5 G900M running LineageOS 16.0.

And yes -0.4%/h battery usage @ idle is pretty good but I noticed this as the #1 Kernel Wakelock in your dumpfile:

mmc0_detect (*api*): 5 m 34 s Cnt: ( c/wc/ec)571/0/0 1.4%

Now a cursory search with mmc0_detect returns pages like Your Memory Card Could Be Screwing Your Battery Life which recommends a backup of the Micro SD card & formatting it:

Or maybe you have a dying memory card? Or is your card set up as Adoptive storage?

Now the wc in "Cnt: ( c/wc/ec)" stands for Wake Count which is 0 in your mmc0_detect case but why so many counts (c/): 571 & 1.4%? :confused:

***
[BetterBatteryStats] soilentgreen:
My memory card works fine.

I doidn't set up the csrd as Adoptive storage.

Hoping someone can answer it.

Should I formatting my SD card?
[BetterBatteryStats] curiousrom:
Re: mmc0_detect Kernel Wakelock - Micro SD Card Problem?

Your memory card could be OK but still have some bad sectors or some corrupted data on it.

To be 100% sure that your card is set as Portable storage check > Settings > Storage.

If it's Portable storage you could backup it's content to computer & I prefer to use the device itself to format the card either via Settings > Storage > memory card or via the stock files explorer.

You have nothing to lose by formatting the card.

I am attaching a dumpfile with zero instances of mmc0_detect in 5 h @ idle, Deep sleep of 98.8% & -0.2%/h battery usage.

That's on a Galaxy S5 G900M LineageOS 16.0 klte build 2019-12-24 + Open GApps Pico + LineageOS AddonSU for root.

***
[BetterBatteryStats] soilentgreen:
Just to be sure, mmc 0 is the SD card not the internal card right?
[BetterBatteryStats] curiousrom:
Re: mmc0_detect Kernel Wakelock - Micro SD Card Problem?

Try this XDA site search & add keywords to taste: site:xdaforums.com/ mmc0_detect

***
[BetterBatteryStats] soilentgreen:
So I have formatted my SD card and its the same.
[BetterBatteryStats] soilentgreen:
And I looked on the link you sent and a few time users says that this is 100% Wifi related. If turn off Wifi both these wake (bbd_wake_lock and mmc0_detect ) locks go away.
[BetterBatteryStats] curiousrom:
Re: mmc0_detect Kernel Wakelock - Micro SD Card Problem?

Humm… That's a specific problem beyond this general BBS thread.

Or maybe some of the local experts posting in this thread could chime in? :cowboy:

Try the mmc0_detect XDA search suggested above to find dedicated threads about it: site:xdaforums.com/ mmc0_detect

Some users reported an OS problem. Some turned off the device, removed the card & rebooted without it as a troubleshooting step. Some got rid of the problem with a factory reset.

Maybe you could capture a logcat, open it with WordPad, Notepad++ or similar & try to find some details about it by searching it with mmc0.

In my S5's logcat after a reboot it's mmc2 and there is only 1 instance of it:

I vold : Found disk at /devices/msm_sdcc.3/mmc_host/mmc2/mmc2:aaaa/block/mmcblk1 but delaying scan due to secure keyguard.

In a TWRP log you can see your partitions. In mine for mmcblk1:

***

If you do find a solution please report back in this thread

***

Edit: I see that you posted this above while I was typing my post:

That's a great clue. :good: Next step is why does turning on Wifi on your device causes those mmc0_detect kernel wakelocks. :confused:

Maybe a WiFi related app you installed?

Check in logcat.

***
[BetterBatteryStats] soilentgreen:
I will run BBS again with WiFi off and see if it make a difference.

And another thing. I use adhell 3 and I blocked the access for the memory card for some apps. Maybe this is what cause of mmc0_detect?
[BetterBatteryStats] Unknowx:
I have not understood if I have to start BBS even before recharging or only after not touching the phone for 6 hours
[BetterBatteryStats] soilentgreen:
Chrging the phone with BBS open. Unplugged the charger , refresh BBS and close the screen in less then 1 minute and don't touching the phone for atleast 6 hours.
[BetterBatteryStats] Oswald Boelcke:
I hope I got your question correctly; if not, I apologise, in which case I'm going to modify/refine my reply.

On all of our devices, I'm regularly monitoring their idle battery drains via BBS, and my best practise is as follows (I won't repeat the valid guidance from the OP), especially after updates/new installations of apps:

Usually in the evening, I charge the device to 100% and if time permits, I use it till the battery indication is down to about 96% but I deem it as not too important. Others might disagree. I don't care if BBS was started, and actually I never start BBS at that moment.

Now, I leave the device untouched for at least six hours! Remark: Occasionally and just for my interest I try if there's a difference in the results later on if the device was rested on the front or the rear side due to the locations of the different sensors.

After the six hours (or more) of untouched rest, I pick up the device, unlock the screen, immediately go to/start BBS, select from "device off to device on", and save the idle dump.
[BetterBatteryStats] Unknowx:
so do I have to turn on monitoring from the settings before leaving it stationary for 6 hours?
[BetterBatteryStats] Atharkhan101:
Suggestion

Please give an option to display app name instead of name of package. For example, display Truecaller instead of com.truecaller.xyz
[BetterBatteryStats] Unknowx:
Okay, I think I did the procedure right.I left the phone to monitor all night. The problem I encounter with op7 Pro is battery drain and I can't make more than 3 hours of screen on.

http://www.mediafire.com/file/5616clyf75ltk4m/BetterBatteryStats-2020-01-06_083710097.txt/file
[BetterBatteryStats] DB126:
Idle drain is fine (0.5%/hr) which suggests an network, app or hardware problem while using the device. Battery is *probably* fine given low idle drain over 8+ hours. However, some batteries only crumble under load so that remains a possibility. I'd look at apps first; battery sucking culprits should be readily identifiable using native tools on your device (eg: settings -> battery).
[BetterBatteryStats] Unknowx:
in the oxygen os battery menu I have no abnormal consumption by some app, however I have a huge battery drain. what could I do?

https://ibb.co/1sTZGK8

https://ibb.co/SdzbSqZ