yashsingh1/xdaforums huggingface dataset:
[BetterBatteryStats] motzvi:
Heres by battery dump. Just wondering what you guys think i need to do to get better battery life. I left the phone alone for about 25 hours! no wifi just regular 3g. i usually get about 6-7 hours with pretty much moderate use. any help is greatly appreciated!
[BetterBatteryStats] jeremysherriff:
I might be wrong, but my thoughts are "you don't have a battery drain problem".

You get 25+ hours if you leave it alone, but you get 6-7 when you use it = you use it in a way that drains the battery.

Over the 25 hours on record here, your phone was only awake and doing something in the background for 26 minutes. That's pretty damn good.
[BetterBatteryStats] motzvi:
Ok! I really thought I actually had an app or two that drained it a bit. Thx
[BetterBatteryStats] DB126:
Your ROM/Kernel is not registering alarms and wakelocks properly as evidenced by identical timings on most entries. It isn't a problem with BBS as any tool that queries alarms/wakelocks would exhibit the same behavior. That said, 0.5% per hour average idle drain is respectable for your device. In the absence of other symptoms nothing needs to be done from an idle behavior perspective.
[BetterBatteryStats] chamonix:
First, thanks for your offer: contributions are alway welcome and will be properly credited.

The easiest way to get going would be for you to fork the github project. If you need some info about how localization on Android works you can find

more here: https://developer.android.com/guide/topics/resources/localization

You may also find interesting resources and other projects to contribute to here: https://xdaforums.com/marketing-analytics/localization

TLDR;

1. clone your fork locally

2. make changes to "app/src/main/res/values-de/strings.xml"

3. Push your changes

4. Submit a pull request and mention what handle/nickname you want to have added to the credits
[BetterBatteryStats] jackyhun920:
is it a bug?i turned on Bluetooth for several hours and the app shows me i have turned on it for a few seconds?
[BetterBatteryStats] chamonix:
Playing with new ideas outside of the app :) What do you think?
[BetterBatteryStats] strongst:
Cool :svetius::cool:
[BetterBatteryStats] shaggyskunk:
Was your BT connected to another BT device - If it wasn't I don't think that you'd see anything... But [MENTION=1330150]chamonix[/MENTION] would know better ?️
[BetterBatteryStats] chamonix:
That is correct: depending on chipset and implementation BT has sometimes egressive energy management built-in by design; even with devices connected the stack will not report being on as long as the connection is not in use, e.g. playing music. This is currently my case with a headset connected around the clock but reporting 1 second of "on" state in 4 1/2 hours since unplugged.
[BetterBatteryStats] jackyhun920:
of course yes. I connected to my Bluetooth earphone

---------- Post added at 03:02 PM ---------- Previous post was at 03:01 PM ----------

ok got it
[BetterBatteryStats] shaggyskunk:
And not necessarily "of course it was connected" - Could be that some people leave BT always on ??️

---------- Post added at 09:50 AM ---------- Previous post was at 09:49 AM ----------

And not necessarily "of course it was connected" - Could be that some people leave BT always on ??️
[BetterBatteryStats] DB126:
Like the concept. Not sure a line chart is the best choice depending on range and number of data points. Might consider a bar chart. Stacked bars are cool but are harder to interpret on a quick glance.
[BetterBatteryStats] chamonix:
This is early work and I wanted to share what I did so far.

The idea is to collect time series ( = huge volumes of data) to be able to observe behaviors over time. Of course you can them compact it up to see a profile per day but also to:

- see differences between phases when phone was on and off - esp. interesting in regards to wakeups/locks (coming soon)

- compare behavior over periods, e.g. previous ROM/current ROM, versions of apps, etc.

- compare your "profile" to benchmarks, e.g. other users on the same device, android version, etc.

I am still struggling with the design of the time series (if you know SQL, forget everything you ever learned) but have a version running shipping time-series at every refresh. Of course this feature will be optional and with explicit opt-in. I plan to play with this for a while so that I get the design of the time-series stable enough to open a closed preview giving selected users full access to their anonymized data, as well as features to edit and build own dashboard. I am hosting a TICK-stack running on Kubernetes (because I can!).

This whole experiment is about finding-out how much value there would be in such a service, for individuals and for the community. Imagine for example publishing a "**** list" of the worst devices/kernels/vendors or of the most hungry apps (Gooooogggggle!) based on the aggregated data of hundreds or thousands of users.
[BetterBatteryStats] shaqman89:
That seems like an interesting experiment indeed. Would be all ears and love to support it however I can ?

As for the graphs, I think it's great especially if it could collect data like you said. If I am not understanding this wrong this would mean that data would also be continuous even after a reboot or power off, right?
[BetterBatteryStats] chamonix:
Yes, this is also a way to show relative data for periods spanning reboots
[BetterBatteryStats] Molock:
I have had an odd spike in battery drain on my Huawei Y6 2017 since i got it, i do have to mention this sudden decrease in battery only happens every couple days and only when my screen is off, which means i wouldnt be able to charge it to full and let it run to 95% and then wait at least 2 days and hope it occured by then. since i use my phone on a daily basis. I do have a log where this sudden drain occured from the last screen off to screen on, would this suffice?

This is the spike i am talking about:

No syncing/gps/data/wifi is enabled when my screen is off, even when i am browsing the internet on 4G its not even close to draining my battery like that spike does. That spike is around 10% in under an hour while the screen is off.

It did however improve since i used "doze on the go" in greenify, i was only using the agressive doze before.

From what i saw in the kernel wakelocks it all points to ttyc0, which should be related to my sim from what i have read?
[BetterBatteryStats] doraemonkey:
Sorry for newbie's question, i want to ask if this app can be used for Pie Rom? Thanks
[BetterBatteryStats] DB126:
Excellent. Brings BBS to a new level with (optional) community profile pooling. Almost a necessary evolutionary step given where Android and the devices it runs on are heading. There ain't a whole lot of difference between major players on more recent builds in terms of power efficiency - all else being equal.
[BetterBatteryStats] shaggyskunk:
BBS is working for me on One UI Beta ??️
[BetterBatteryStats] DB126:
Doze on the go is highly beneficial on Android 6; good idea to enable. It should yield a modest improvement in screen-off wake time.

I suspect the drop-off isn't as dramatic as the chart depicts; more likely a drain of short duration combined with an older battery which exhibit increasingly irratic voltage characteristics. What does your average idle hourly drain look like when the event doesn't occur? Log shows 0.7% which is not horrible given device, battery age and Android build.
[BetterBatteryStats] Molock:
If i charge it to full before i go to sleep, its 0.1% when i wake up, only after i start using it, it goes to 0.5% idle.

Shame i had that sudden drop from the day i bought the phone, although more frequent.

Thank you for your time! guess ill just have to stick with it until i eventually get a new phone :)
[BetterBatteryStats] DiamondJohn:
There are two levels of Doze. Deep and Light; with intermittent doze breaks for maintenance. The phone will also stay out of deep doze if the phone is physically moved. ie it may explain the difference between night drain and active drain.

You can view your history of these by running the following. After the params/config values are listed, you will see "Idling history":

dumpsys deviceidle;

The negative/failure of the above command is that most times, the data it returns is not up to the current time, but stops a few hours ago:silly:

See the graph at https://developer.android.com/training/monitoring-device-state/doze-standby and note how it explicitly differentiates the time when the phone is stationary. If your phone is moving, android will delay going into deep sleep. ie it wont go into power saving mode.

My phone was draining pretty bad until I started messing with the doze parameters (built into my ROM). Now it goes to doze almost as soon as the screen goes off, and does not hold off too long because of motion.

I would also take a look at the results from the following dumpsys call to see if it shows any different behavior around the time of the drain.

dumpsys batterystats;
[BetterBatteryStats] DB126:
The small overnight dropoff after charging to 100% is likely due to minimal activity (including physical motion) and the way some devices indicate a 'full' charge which creates a 'sticky hold' at 100%. If you note your devices <100% charge level just before retiring and then check again first thing in the morning hourly drain rate will likely be somewhere between 0.1% and 0.5%

Pulling the lens back there is nothing wrong with your phone. Blips in the discharge rate are common - especially with Android <7 and/or devices with older batteries. Don't get too wrapped up in the detailed stats. If you monitored your heart rate with the same riggor you'd be all but certain a cardiac event was imminent.
[BetterBatteryStats] Diesmiling:
BBS causing battery drain

The app itself is causing awake while screen off.

I am getting notifications from the app itself that BBS is 35% awake while screen off. Is this normal?
[BetterBatteryStats] TNSMANI:
You have mobile signal issues. May be they happen sporadically when the signal strength drops suddenly for sometime resulting in the steep drop that you complain of. This is your signal strength:

Moderate Signal (): 2 m 57 s 0.2%

Good Signal (): 9 h 1 m 33 s 31.3%

Great Signal (): 19 h 43 m 7 s 68.5%

In addition, your phone downloaded 44+ MB of data during sleep using mobile data.

So, may be enable wifi and take another dump to see whether this behaviour repeats.
[BetterBatteryStats] Molock:
Yea its not that big of a deal, i get around 5 days out of it with the occasional browsing and call/sms which isnt that bad :)

Thats odd, i always disable data when im not browsing, will have to look into that thanks!
[BetterBatteryStats] 3n2o:
Hu guys, i have a problem with my galaxy s7 g930f. I have format system and reflash the lastest stock firmware and root with magisk. Step by step i waited a few days and the problem is the same in all cases, whit root and whitout root. I have disabled some apps and the result that i post is maybe acceptable. Now whit my phone i can do 2,5 hours of screen out of 20 in the best case... In this days i also did 90 minutes of screen. Whit the old version usually i can do 3,5 - 4 hours. With the new update there are problems with play service and android system that where not there before... I followed the guide on te first page. The smartphone was left with data on and wifi off... In BBS i see a lot of wakelocks, but i don't know what are harmful, can anyone help me? Sorry for my language, i'm not english...
[BetterBatteryStats] chamonix:
Well then let me rephrase: where should I invest my time in terms of finding a community that will go against google's efforts to lock down all api they are deciring no apps should call, that will slowly kill bbs for users without root. What is possible today with SDK26 does not even run on SDK28, meaning once the minimum SDK for gplay is set to 28 bbs will stop working on stock android. I guess I have about two years left for non root users without anything I can do about it except pushing back by collaborating with a rom that will cherry pick from the android upstream code
[BetterBatteryStats] chamonix:
A logcat and dumpfile or it did not happen
[BetterBatteryStats] Shadowlover:
couldn't locate the culprit

Hi,

I've been using BBS since last few days (noob here :D ), and the number of partial wakelocks have been too high. Lately, it was due to Blokada app, which I somehow managed. But now, this sensor "sns_smd" is running all the time and wakelocks have been appearing in the graph but not when I check in partial and kernel wakelocks. Every day I have something or the other, which drains my battery quicker than normal. Generally, I am loosing 0.5%/hr even during sleep time (night).

Please help.

I am also unable to save the log file, as the app crashes every time I select the option "save to..". Have already reported the issue.

Thanks

ps: Model name- Xiaomi Poco F1

Rom- MIUI 10.0.6.0 stable
[BetterBatteryStats] TNSMANI:
The drain of 0.5% per hour during sleep is good.

Partial wakelocks are generated when you use your phone, so they are likely to be high as every app will generate them during that time.

sns_smd relates to significant motion sensor, I think. If its numbers are high during sleep, then you may have an issue.

Without a dump file as per OP, this is the best I could do.

---------- Post added at 12:49 PM ---------- Previous post was at 12:34 PM ----------

You did not save the dump as soon as you unlocked the phone. You used it for 1+ minutes before saving and that may have caused some discrepancy in the readings. Your version of BBS is outdated.

Your mobile signal strength is not great. It is ok but it definitely caused some drain. You had location on and it also caused some drain.

Facebook and Samsung Push also caused some drain.

If you think that the update is the reason for your issue, restore the nandroid of the earlier version, if you have it, and check again.
[BetterBatteryStats] Shadowlover:
Thanks for the reply. I've had motion sensor active during the sleep time (shows the screenshot).

Saving dump file feature is working now, I'll upload it once I get enough logs.
[BetterBatteryStats] skivnit:
Any reason why is this happening?

I'm on s9+ pie beta and BBS is keeping phone awake ?
[BetterBatteryStats] chamonix:
It is normal that BBS causes wakelock: it prevents the device to go to sleep while saving data to make sure that no data gets partially saved or corrupted by the device going to sleep before it is finished. That is what wakelocks are for.

Now the high value is disturbing and I will look into it: caused by changes in the way Google wants de s to do background processing jobs have been introduced. One reason of this high value may be that the job gets interrupted by other jobs and this is what I will look into, potentially by this beta. I don't want to suggest that this problem did not happen but on my side the max wakelock caused by bbs is 13 seconds in 11 hours so I would like to hear from other's in this regards
[BetterBatteryStats] skivnit:
Yea I know I never experienced so much wake time from BBS that's why I posted here, I'm running beta pie on s9+. Usually I get 1mn of wake time from BBS over 24hrs uptime
[BetterBatteryStats] Shadowlover:
I've attached the dumpfile. Inspite of battery saver being on during the night, I lost a significant amount of battery. During midnight I checked my phone, and only 0.5% was discharged in 3-4 hrs, but I think when the battery saver (scheduled) turned off, battery drainage was quite fast. Also, I don't use battery saver on daily basis.

Please help!
[BetterBatteryStats] Shadowlover:
Battery works fine while normal usage, the problem is only when it's idle for long period of time, like during night.
[BetterBatteryStats] TNSMANI:
This is an in-use dump, not an idle dump as per OP. As I already said, 0.5% drain per hour during sleep is good. As for the battery draining on wakeup, it is normal since all the apps controlled by Doze wakeup and do their thing in the background. If you think that your in-use drain is high, it depends on the apps, setup and usage and it will vary from person to person. The only recommendation I can make is uninstall/disable all the apps that you don't use and control the others.

You can try to debloat your Poco F1 which may help since Xioami has bundled so many unnecessary apps.

You also have some issues with your wifi's connectivity. Reset the wifi modem and also check the other devices connected to the same wifi.
[BetterBatteryStats] Shadowlover:
Alright, I'll do the needful. Thanks a lot for the help!
[BetterBatteryStats] Oswald Boelcke:
I don't achieve the maximum BBS wakelock values like you but I cannot blame BBS for any excessive battery drainage at all. Attached are the last dumps I took; I know the very last one as of today it's a real idle dump in accordance with the OP. I just took it after I've read your post. Interestingly, the BBS wakelocks are quite often differently annotated.

Side-remark: On this device (Samsung SM-G901F) and different to my Samsung GT-i9305, network values are never made available; I assume this to be a kernel or firmware issue.
[BetterBatteryStats] Shadowlover:
I'm getting this popup after updating my firmware to MIUI 10.1.3.0. What do I need to do?

Thanks
[BetterBatteryStats] TNSMANI:
Try disabling MIUI Optimisations.
[BetterBatteryStats] 3n2o:
Thanks a lot, i not had a location on.. I have restore the earlier version, and in this days i will check if there are a problem...
[BetterBatteryStats] shaggyskunk:
Just curious about this usage by BBS - Not really sure if it means anything - But haven't noticed it before - This is on a S9+ running One UI Pie beta CRLC.

Let me know if you need anything ?️
[BetterBatteryStats] TNSMANI:
[MENTION=1330150]chamonix[/MENTION] is aware of this (see the last two or three pages) and is checking.
[BetterBatteryStats] shaggyskunk:
Yeah I checked a few hours later & BBS seems to have returned to showing the previously normal usage - I wasn't actually checking on BBS - But something else & just happened to notice BBS - No worries ? ?️
[BetterBatteryStats] shaggyskunk:
[MENTION=1330150]chamonix[/MENTION] [MENTION=5656100]tnsmani[/MENTION] Just wanted to update from my previous post regarding the "curious" battery usage of BBS - Seems that it has returned to "normal" behavior for me - Same One UI beta - Same everything fwiw ??️
[BetterBatteryStats] :
Hi all,

I'm having an issue with BBS - xda edition not showing partial wakelocks, or sensors. This also impacts on the apps ability to show this information in the widget.

I've noticed a few other things that may or may not contribute:

- There's a persistent notification for BBS saying "Event Processing"

- Giving BBS storage permissions produces an error message about API compatibility.

Below is some of the information that may be required for the debugging.

- All permissions are granted

- I have tried reinstalling the app/clearing cache

- Re-adding the widget

- Waiting for data to generate

- Searching for a fix with no success

I've also attached some screenshots of the issue as well.

Thanks for any help that can be provided.
[BetterBatteryStats] :
Duplicate post
[BetterBatteryStats] :
Issue has corrected itself in time.
[BetterBatteryStats] hjjiang:
is there a way to download 2.4 build from hockeyapp? 2.5 is buggy
[BetterBatteryStats] shaggyskunk:
You can always check out the OP and the links that are there - But aside from a temporary issue 2.5-302 is working fine ??️

Sent from my SM-G965W ?? Running One UI Beta Masquerading as a SM-G965U ??
[BetterBatteryStats] hjjiang:
On 2.5-302 I'm getting this bug
[BetterBatteryStats] shaggyskunk:
That's not a "bug" & noname posted a it a few pages back - It's a Google thing - Click "ok" & move on ?
[BetterBatteryStats] deepu458:
Hi OP, first of i would like to thank you for this awesome app. And as mentioned in the question even i too have that BBS boot reference wake lock way higher under the partial wakelocks section. This started happening after the 2.52 updates.

Currently my device is OP 6T with Custom kernel and Oxygen OS Pie. I have Disabled the notification for Event Processing so that it wont show under the Notifications.

I will be happy to provide any additional info if needed.
[BetterBatteryStats] itylermartin:
Delete
[BetterBatteryStats] immi803:
Can someone help me identify why my phone is awake while screen off, new to BBS

Dump file attached
[BetterBatteryStats] TNSMANI:
You were told (in the other thread) to provide an idle dump. What you have attached is an in-use dump where the phone was used for about 1.5 hours before saving the dump. This is not useful to analyse your issues.

Please provide an idle dump after reading the OP here on how to produce it. The screen on time before saving the dump should be less than a minute.
[BetterBatteryStats] shaggyskunk:
Now this is really weird - One UI beta seems to think that BBS is using a lot of battery - Yet BBS doesn't appear to be using hardly any battery! This is the first first time that I've seen this notice on this version of One UI (CRLH) & I've been running it for a few days now - Just an FYI

Merry Christmas - Happy Holidays ??️
[BetterBatteryStats] 3n2o:
Hi tnsmani! Thanks a lot for your support. I installed different Stock Roms and now i have a Stock Rom ITV, root etc.. I performed a clean installation to avoid problems but i see a lot of wakelocks, are they normal? I tried with and whitout Root, the result is the same.. I' ve installed lastest BBS from Play Store and i follewed the guide in the first page to produce a good file Dump.. I can not understand if the low battery life is a problem of the Stock Roms, or another problem. Can you help me please?
[BetterBatteryStats] TNSMANI:
Once again mobile signal is your issue. It is ok but not great. Unless you change your mobile service provider to one which has a better signal where you spend most of your time, this can't be avoided. You have to learn to live with it.

Was Location on or Scanning under BT on? If so, switch it off and use it only when you need it.

There are a lot of kernel wakelocks too. If you have alternative kernels for your device, try them.

Again Facebook, Samsung Push etc caused some drain. You can try to use the web based Facebook or the Facebook Lite version.

Samsung apps caused a download of 15 MB while asleep.

Considering the above, you had a reasonable drain of 0.7% per hour.
[BetterBatteryStats] bitubo:
I have the same problem

OnePlus 3 with last MSM extended pie version

OnePlus 3 @ Tapatalk
[BetterBatteryStats] :
Give it some time, it'll calibrate hopefully. That was the issue for mine.
[BetterBatteryStats] fahri170693:
What difference if i used app systemize then systemize this bbs? I mean its neccesary?
[BetterBatteryStats] yochananmarqos:
No, it's no longer of any use. All permissions can be granted via ADB or root.
[BetterBatteryStats] aff1c:
What is the best setting to get most accurate stats? Or just set to default?
[BetterBatteryStats] TNSMANI:
Just leave it at default. There are no settings to obtain 'accurate' stats. Whatever is reported by your phone is codified and presented by BBS.
[BetterBatteryStats] bofh999:
a moment of silence

its now 7 years and 5 months since this app is posted.

only a very few project made it that long let alone without beeing forked and readoped.

we have seen a lot come and go in this time.

lots has changed, the androidworld looks like now very different yet bbs still stands strong

with over 3 and a half tousand pages forums activity this is certaily and exceptional needed and used root app

thanks to the dev at this point. i whish you a bugfree 2019. may the debugger be with you

on that note: 7 years in which google still cant keep apps from eating our batterys seriously they should include bbs in android core
[BetterBatteryStats] 64ashg:
+1 man, i feel you
[BetterBatteryStats] Fahrilubis:
Dude what is windowmanager? Its okay if i block?