yashsingh1/xdaforums huggingface dataset:
[BetterBatteryStats] Navras:
So here I am again. Resetting WiFi at home etc. didn't seem to have any effect (also when using the WiFi from another modem at home - which was reactivated for testing). I got 3.1%/h for the following overnight test at home with everything on (WiFi, Location, Cellular 4G, BT with Connected Smartwatch): dropbox.com/s/xeh3pkd24h046lz/BetterBatteryStats-2020-03-09_045001277.txt?dl=0

Now the funny part: With nothing changing except the location (6h test at university, with bad cellular reception I might add) I averaged 0.7%/h. dropbox.com/s/3s7qiaemd9jjojy/BetterBatteryStats-2020-03-09_203454571.txt?dl=0

The next day at uni during a short 3h test I got 1.2%/h with Location services turned off.

In airplane mode it still uses about 0.3%/h, no matter the physical location. dropbox.com/s/bjf97n6y3pirntm/BetterBatteryStats-2020-03-10_132045884.txt?dl=0

Next thing I tested is with everything on again (at home overnight) but the phone being in a tinfoil faraday-cage (indeed shielded away from Cellular, WiFi and Bluetooth at least). This way I got 1.3%/h. Not quite as good as away from home, but still 2.4 times better. dropbox.com/s/ub1pyjkzen143bx/BetterBatteryStats-2020-03-11_121043646.txt?dl=0

So its a quite curious problem, don't you think? My results suggest a local problem at home (with BT being on as the main culprit). Although I do not observe the drain on another phone (S10e Exynos) at home, which has BT enabled. I'm out of ideas. For now I try to turn off BT during sleep, but I'd still like to solve this issue as it is quite noticeably.
[BetterBatteryStats] DAusRon:
Hi, how to get the xda version? When i clicked the link in post #2, it brings me to appcentre page, logged in, but nothing appears as shown in the attached picture. Any idea?
[BetterBatteryStats] curiousrom:
You have to wait for the Dev to fix it.

Read the 8th & 9th posts above yours.

***
[BetterBatteryStats] chantoine:
[MENTION=1330150]chamonix[/MENTION]

Hi,

For your information, it seems that latest Samsung phones with Android 10 have a bug / memory leak / problem (don't know exactly) when BetterBatteryStats (and other apps) are used with ADB permissions.

Just have a look here :

https://xdaforums.com/showpost.php?p=82031633&postcount=63

I just uninstalled BBS and Gsam battery monitor pro, and all is fine now, my swap free memory is 1,6GB on 2GB after a few hours (it decreased lightning fast before, and never recovered, leading to reboot necessity every 24h), my phone is cold.

Weird.
[BetterBatteryStats] TNSMANI:
Sorry for the late reply. What I said earlier stands except for WhatsApp. Your drain is mainly coming from ims service, BT and location (maybe wifi too). Apart from these, I am not able to find any other culprits. Did you try any other ROMs?

I invite the others also to comment on this.
[BetterBatteryStats] Navras:
So except the mentioned you couldn't find any differences between the at-home (3.1%/h) test and the away-from-home (0.7%/h) test?

As I said, nothing except the physical location changed there; the tests were just hours apart, all settings being identical. I think understanding the difference there should bring us closer to the root of the problem. Assuming the culprit is logged in the dump files.

Playing around with the Quicksettings (BT, Airplane, Location, WiFi) the last few weeks, the main contribution comes from BT (1.2-2.0%/h), followed by the rest with smaller than 0.5%/h contribution each (Location and Cellular might even only contribute ~0.1%/h each; but I don't have enough tests in every possible configuration, to say that for certain).

No other ROMs. Only (non-rooted) offical Samsung over-the-air updates for Android 10. December update, january update, and since yesterday the march update. Battery drain persists across these smaller OTA updates.
[BetterBatteryStats] TNSMANI:
Since you are on stock updated through OTA, you can try a clean flash of the updated stock ROM and see if there is any improvement.
[BetterBatteryStats] DB126:
IDK - perhaps the BT radio isn't moderating power consumption based on use and/or conditions. That can happen entirely 'under the radar' from an Android perspective. Try a clean install as suggested by [MENTION=5656100]TNSMANI[/MENTION]. That should replace the bootloader/kernel where the hardware interface resides. Or just turn off BT when not in use ...
[BetterBatteryStats] chamonix:
The link and info for downloading bbs has been updated (thanks to [MENTION=4122877]curiousrom[/MENTION] for reaching-out)! I am also now leveraging the AppCenter feature of public distribution, meaning registering to AppCenter is not required to downloading (you still can if you want to benefit from advanced features like notifications). This has been a request in the past from privacy-concious users and I am happy to now have to possibility to deliver on that.

If you face any issues with the public downloads please let me know.

There is no new builds up yet but I will try to carve-out some time to fix a few issues and to bake-in the new crash analytics modules as well.
[BetterBatteryStats] T3rm1:
Can anyone help me diagnose why I get 4 to 6 % per hour of battery drain? I captured the log while airplane mode was on (with Bluetooth and Wifi on).

https://pastebin.com/fu8Vuurv
[BetterBatteryStats] TNSMANI:
This dump is not as per the instructions in the OP. The dump should cover a minimum of 6 hrs in order to help.

Please provide a fresh dump.
[BetterBatteryStats] T3rm1:
Sorry, I didn't see this requirement. Here is a dump from the last 6:30 hours. https://pastebin.com/xpBq4FkA

Again: FlightMode was on during the whole time. Bluetooth and Wifi were enabled. The phone was only used a few minutes. I lost over 4 % per hour.
[BetterBatteryStats] pjadec:
Too much sot = screen on time. It need to be less than 1 min or 60 seconds. Yours was almost 5 min. Take new one

Your phone was awake half of time?.
[BetterBatteryStats] Navras:
[MENTION=5656100]TNSMANI[/MENTION] [MENTION=5488402]DB126[/MENTION] I've found the culprit and verified it: It was an external Bluetooth Audio Adapter/Receiver from Logitech I bougth late 2015 for my speakers, so they would also be wirelessly accessible. The BT adapter was constantly communicating with my S10 every 5 seconds or less, so my phone wouldn't go to deep sleep anymore., thus the huge idle-drain. I found this out by taking a look at Bluetooth logs I created via the "Bluetooth HCI Snoop Log" option in the Android Developer Settings (transferring the created 1-2 minute logs to PC and viewing them with Wireshark; screenshot attached). By unplugging/turning off the receiver I was back at 0.7%/h at home again!

Now I also know what caused the drain only to appear at the beginning of the year: Until this winter I simply haven't used the BT adapter with my S10 yet. I paired them once around January and after I was done using it I unpaired them again. I haven't used the adapter since, so I forgot about it. But apparently they weren't truly unpaired from the receivers point of view. So it kept pinging my S10 for the last few months... while this is not apparent without the Bluetooth logs...

I also did an additional test, to see if I could reproduce the issue: I turned the BT adapter back on, and paired and unpaired a S10e Exynos with it. Now the receiver was communicating with the S10e instead of my S10 (judging by the Bluetooth Logs I took). And indeed, my S10 went back to normal Idle-Drain (even though the BT adapter was on), while the idle-drain of the S10e went up three-fold. This suggests it is only a problem with the BT adapter itself. So a factory reset of my S10 wouldn't have helped here.

The Logitech Bluetooth Adapter is now permanently off the grid and a different better BT receiver already took its place. I hope, someone can learn something from my story here.
[BetterBatteryStats] T3rm1:
Thank you for looking into it. I think you missread the data. I have only 4 minutes of screen on time.

Screen On (): 4 m 57 s 1,2%
[BetterBatteryStats] Lughnasadh:
It needs to be less than 1 minute.
[BetterBatteryStats] T3rm1:
I have no idea why 3 minutes make a difference but I will get another with no SOT. Maybe you could explain to me in the meantime why this would make any difference at all.
[BetterBatteryStats] strongst:
With in 3 minutes there can happen a lot, so if you can narrow the sot to 0, you don't have to guess around if the drain comes from screen on or screen off ;)
[BetterBatteryStats] DB126:
Great detective work! Thanks for sharing. :good::cool:

---------- Post added at 05:16 AM ---------- Previous post was at 05:12 AM ----------

Upon waking a busy device can easily burn as much power in 5 min as a 6 hour slumber. This thread is largely about identifying idle culprits. Hence the request for <1 min (ideally <10 sec) of 'screen on' time over a 6 hour window.
[BetterBatteryStats] bikacharf:
Bt_host_wake

Hello.

Room floyd 5.1

My charge is running out very quickly, bluetooth is off, scan nearby device is off. Where's the problem? What should I do? Is this what causes the phone to heat up and run out of charge quickly?
[BetterBatteryStats] curiousrom:
Create a proper dumpfile & attach it to a new post.

See Screen Off to Screen On Missing - BBS Settings.

***
[BetterBatteryStats] DiamondJohn:
Visual Representation of battery drain

Something that may be of interest and helpful in understanding your battery drain.

A free app with no monetisation. I'll try to keep this short, and direct you to the appropriate thread/post.

This app creates a Visual graph of battery drain over time

as well as the doze state over time. NB: these two graphs are unrelated

There are also some Wake lock reports

Currently Running>Battery>Battery Stat Summaries

And you can ignore a specific app wake lock

Currently Running>Doze>Ignore App Wakelock>*APP*

I also have further details and more example graphs within the thread (as well as by other users), but specifically explain how to drill down to see what caused a drain at the post: https://xdaforums.com/showpost.php?p=81993255&postcount=252

It also provides the raw data used to generate the graph, so you could do your own analysis.

Nothing extra is running during collecting the data. It uses the standard data that is inherently supplied within android already. You dont even need it installed during the data collection to have the data collected. You can install it just before you run the app/reports. So you could run a standard overnight battery drain test for BBS, then after collecting BBS data, run the two reports.

Two graphs are of interest.

i) The battery History graph using report 4 - shows drain rate vs time Which is found in the menu at

Currently Running>Battery>Battery History Graph

ii) Doze cycle graph - shows doze state vs time

Currently Running>Doze>Doze Cycle Graph

Reports can be saved off. Graphs as HTML, others as text

The battery history graph can also traverse reboots. I have managed to get just under 4 days history. But is dependent on your phone keeping the correct time.

There are multiple ways to look at the history, the most interesting for BBS users would be:

Currently Running>Battery>Battery History Graph>AUTO-WIDTHx8>4 - Discharge Rate as vertical height and Battery Level as the Gradient Colour (Green=100%, Red=0%)>4% - Idle drain - 25 hour battery life when 100% for 100% of graph

This shows the battery drain as the height of each vertical bar in the graph. The colour of the column is a graduated scale indicating the battery charge / level. And you can "click" on a graph bar to get the details.

To uninstall the app use:

TeMeFI Configuration>Self Destruct in ...3...2...1...

To download, the download link is in the OP

https://xdaforums.com/android/apps-games/app-temefi-comprehensive-documentation-t3806260

attached is also another battery history report I ran during the day (ie not while in the perfect conditions of an overnight idle drain) So lets me know how my battery drain is operating while I am using the phone.
[BetterBatteryStats] bikacharf:
Help please

hi, my phone is consuming too much charge. I locked the screen in 100% of the night and slept, when I woke up in the morning it was 83%, only wifi was on. Nfc, mobile data, bluetooth off. What should I do? What is the problem? How do I enable bt_host_wake enable disable. I do not use a lot of bluetooth, and bluetooth, which ends the charge, we can cancel it completely.

(Greenify and hktweaks installed applications.

medium power saving enable)
[BetterBatteryStats] pjadec:
Sorry, but this was not good dump. Because drain was negative that not should be. Try again
[BetterBatteryStats] githyanki:
Please update BBS and take another dump. As mentioned you have a negative drain and period covers two days, so you probably had from and to set wrong.
[BetterBatteryStats] bikacharf:
I will try and inform you again
[BetterBatteryStats] artisticwizard:
I was trying to use the ADB command to grant battery stat, but I got some java.lang exceptions, I was wonder if someone could take a look

Device - POCO X2

firmware - MIUI 11 (Q)

Google platform tools.

Edit (fix) : Enable USB debugging (Security settings)

here are the errors
[BetterBatteryStats] TNSMANI:
Did you read post #4 about the adb commands? Why "RuntimePermission"?
[BetterBatteryStats] artisticwizard:
I don't see anything about that in post 4, however I found something else that how another xioam guy was able to fix it.
[BetterBatteryStats] oz42:
Installation fails on Android 10

As searching this thread for "Android 10" did not show any results:

When running the command

adb -d shell pm grant com.asksven.betterbatterystats android.permission.BATTERY_STATS

I get

Security exception: grantRuntimePermission: Neither user 2000 nor current process has android.permission.GRANT_RUNTIME_PERMISSIONS.

java.lang.SecurityException: grantRuntimePermission: Neither user 2000 nor current process has android.permission.GRANT_RUNTIME_PERMISSIONS.
at android.app.ContextImpl.enforce(ContextImpl.java:1906)
at android.app.ContextImpl.enforceCallingOrSelfPermission(ContextImpl.java:1934)
at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermission(PermissionManagerService.java:2108)
at com.android.server.pm.permission.PermissionManagerService.access$900(PermissionManagerService.java:121)
at com.android.server.pm.permission.PermissionManagerService$PermissionManagerServiceInternalImpl.grantRuntimePermission(PermissionManagerService.java:3048)
at com.android.server.pm.PackageManagerService.grantRuntimePermission(PackageManagerService.java:5876)
at com.android.server.pm.PackageManagerShellCommand.runGrantRevokePermission(PackageManagerShellCommand.java:1955)
at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:230)
at android.os.ShellCommand.exec(ShellCommand.java:104)
at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:22360)
at android.os.Binder.shellCommand(Binder.java:881)
at android.os.Binder.onTransact(Binder.java:765)
at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4924)
at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:4122)
at android.os.Binder.execTransactInternal(Binder.java:1021)
at android.os.Binder.execTransact(Binder.java:994)

Mi 9T, stock Android 10 / MIUI.
[BetterBatteryStats] TNSMANI:
If the workaround/solution works, would you mind posting it here? It may help others.

There is another member [MENTION=4593083]oz42[/MENTION] above who is in a similar situation.
[BetterBatteryStats] oz42:
I might have found a solution here. Will try that this evening when I am home.
[BetterBatteryStats] artisticwizard:
Edit (fix) : Enable USB debugging (Security settings)
[BetterBatteryStats] Bonvaz:
Hi guys, I'm using the last XDA version on my OP 7 pro with Android 10.

The problem is that values doesn't refresh after a unplug my phone, they are all wrong. I just unplugged my phone but the app still show 1 day and 23 since unplugged.

What can I do? I try to force close the app but doesn't work...

Thanks!

Inviato dal mio GM1913 utilizzando Tapatalk
[BetterBatteryStats] artisticwizard:
Which version of BBS? Try newer if it's not.

May b clear app data, or reinstall
[BetterBatteryStats] Zrbtfm:
Playstore bêta is latest afaik and fixed refresh error counters on ma Android 10 pixel

---------- Post added at 01:05 AM ---------- Previous post was at 01:03 AM ----------

Playstore bêta is latest afaik and fixed refresh error counters on ma Android 10 pixel
[BetterBatteryStats] Bonvaz:
Ups, I think that xdaversion and playstore version was the same :) so, only playstore beta is updated at the moment? Thanks!

Inviato dal mio GM1913 utilizzando Tapatalk
[BetterBatteryStats] Zrbtfm:
Don't know if updated or not but it's the latest
[BetterBatteryStats] artisticwizard:
FYI , I m running the lastest XDA version and I don't have such issues
[BetterBatteryStats] Bonvaz:
I use the same version on my OP 7 Pro, I don't know... Maybe it's that my phone is not rooted and I grant permission with adb? I really don't know, I'm using the same version anyway, but it's not working..

Inviato dal mio GM1913 utilizzando Tapatalk
[BetterBatteryStats] artisticwizard:
I did the adb way as well. :D
[BetterBatteryStats] Bonvaz:
:( that's really weird, maybe it's something related to oxygen os?

Inviato dal mio GM1913 utilizzando Tapatalk
[BetterBatteryStats] gnam:
+1 with this issue, running OOS 10.3.2 OP6 rooted
[BetterBatteryStats] ali.jujara:
Hello Guys,

Need help. I have a oneplus 3. I was on pie with the stable oxygen OS. However, the battery didn't last as long. I am hardly getting a SOT of two hours or less. I recently switched to havoc OS (android 10). I have better battery stats installed but I am having problems figuring out what is causing the drain. Can someone here help me out.
[BetterBatteryStats] DiamondJohn:
read the OP, especially under the red text "If you need help"
[BetterBatteryStats] Kyukazai:
I just don't know what's going on, I don't know if it's a problem with my ROM, but this use of the system configuration itself is very high, can someone help me?
[BetterBatteryStats] SergioA92:
Hi can someone help me understand why I'm having so many alarm wakeups? The phone seems to be constantly awake due to these alarms despite my actual wakelock time not being extremely high. I have an Xperia 1, stock software.
[BetterBatteryStats] pjadec:
To both of you. Those pictures doesn't help to analyze. Take dump file like OP post has instructed.
[BetterBatteryStats] tomhouf:
S20 - BBS analysis

Hi guys,

I'd like to show you some feedbacks on the galaxy s20 battery.

I've made some optimisations with features I don't consider as necessary to me, and this process is still ongoing.

The battery life I have is still a bit lower thant the ones I can see on different posts of this forum.

Here is what I did to observe it :

- Charge it during the evening fully,

- Swithching it off during the night (battery full),

- Switching it on the morning and observing the battery life while using it.

During the day, I had periods of time when the phone slepts well, whereas, other time, the battery was going down like ice under the sun.

Could you help me to interprete the BBS data ?

I can see from the graphs that there are many many wakelocks, but I'm not sure how to read the data.

Thank you for your help.

Thomas

Sorry, I could not manage to edit my post, or reply to it.

Here is the link to the file : pastebin.com/YXPSkczW/?e=1
[BetterBatteryStats] DB126:
Not an idle log; includes 3+ hours of 'screen on' time. See OP for guidance on creating an idle log, 6+ hours duration, <1 min screen on.
[BetterBatteryStats] tomhouf:
Well all right, I use my phone during the day for professional reasons, but I can try at night even if some routines are triggering to lower consumption.

Thanks anyway
[BetterBatteryStats] methuselah:
[MENTION=1330150]chamonix[/MENTION] I am unable to get anything on non-rooted moto G8 plus having Android 9.0 stock. I have given all permissions to the app but still it shows this

I installed via play store.
[BetterBatteryStats] DB126:
Analyzing idle behavior is the key to identifying nefarious power consumers. If none are found (or found/mitigated) then little can be done about high active drain rates beyond dimming the screen, closing inactive apps and making sure your phone has a strong signal. Especially on newer devices that effectively throttle power consumption of various hardware components when not in use.

You will find a lot of 'experts' on the net touting old methodologies that never worked that well to begin with and typically introduce compromises or side effects. I bought my device to use, not manage. Choose your poison (wisely).

p.s. there's an app for that; just head on over to the Play Store ...
[BetterBatteryStats] Kyukazai:
So, I did what was recommended to do if I needed help, which would be to leave the cell phone quiet for 6 hours and have a screen use of less than 1 minute.

I am leaving the log of BBS I took earlier today in Attachments so that it is better to observe. :)

The others I put in zip file
[BetterBatteryStats] DB126:
Nice! Idle drain rate was fantastic at just 0.2%/hr avg decline with only 8 min of wake time over 6+ hour sampling window. Nothing to see here folks other than a well behaved device.
[BetterBatteryStats] pjadec:
Battery drain was 0.2%/h that's excellent low drain. Normal drain is about 0.4 - 0.7%/h. No bad behave apps or services.
[BetterBatteryStats] Kyukazai:
Thanks guys :laugh:

I think my problem really it's about active drain, as i had posted previously, is there another way to demonstrate and find out what causes my active drain?
[BetterBatteryStats] DB126:
I mentioned primary sources of "active" drain in a previous post: screen brightness, background apps, signal strength (weak is bad) are the primary offenders. You have control over all those items and tools built into your device and body to monitor. Panel brightness is obvious; a modest reduction can score an 25% or better improvement in battery life. App usage can be monitored in the built-in battery tool on most Android phones. Ignore system apps/services for now, just look at the stuff you have installed. Social apps take a heavy toll on battery life; decide if need need them running 7x24 along with accompanying notifications. Wearables (smart watches, health gizmos, etc) are another major source of drain. Also keep and eye on signal strength indicators. If you're rocking one bar in the office try switching to WiFi or moving your phone closer to an exterior wall. When signal strength is week your device ramps up radio power to compensate. Of course, there are other potential issues such as failing battery that drains quickly under load, aggressive location monitoring services and everyone's favorite target (because they don't understand it), Google Play Services. Try to avoid going down those rat holes until other possibilities have been exhausted. Good luck.
[BetterBatteryStats] tomhouf:
Hi,

Thanks for your answer.

Yeah, maybe I'm just paranoid, and I know that the Exynos CPU on this phone wasn't specially well designed for battery life. But, in my mind, it's still weird that the S20 comes with the same battery capacity than the note 9, a smaller screen and only achieve half screen on time usage. PLus, the idle seems to vary a lot depending on god knows what.

I now have the logs for two different periods of time :

- One during the night : I used the phone until 94% and then went to sleep at 11:53 :

pastebin.com/sPLiSYcd

- one during the morning : used the phone until 87% (9:37) and then didn't use it until 2:54 PM, at 82% :

pastebin.com/KjbaJyFu

Do you see something weird ?

In advance, thank you for your help.

Thomas
[BetterBatteryStats] Kyukazai:
I understood! Thank you very much for the explanation :D I also think that I ended up entering the possible explanation for my problem, it is something that I found a while ago, it happens in all ROMs that I try or custom kernels.

Anyway, these are higher frequencies having greater uses than lower frequencies.