Search This thread

chamonix

Recognized Contributor
Nov 7, 2008
5,048
19,622
Berlin
Google Pixel 6 Pro
I've seen (and reported too) this same oddness a few times, but it seems to happen randomly; I know of no way to reproduce on demand.

I didn't say I never heard of it just that I was not able to describe it. I have added some code to try to get more info.
One case that we could reproduce is after a warm reboot (userland restart) that caused the references to be wrong compared to the 'current' readings. Unfortunately I don't know how to detect that so I can not reset the referenced.
Hopefully with some more logging we can find the root cause.
 

chamonix

Recognized Contributor
Nov 7, 2008
5,048
19,622
Berlin
Google Pixel 6 Pro
this is a perfect example of what is going on with my phone and its driving me nuts.

- I unplug the phone at 3 am - 100%
- I wake up at 7am (no use, no screen time) - 95%
- I take a screen shot and dump bbs file send one 65kb email. This lasts all of 6 minutes - 90%

one hour later I turn on the screen - just to see if i was still @ 90% - and it went down to 85%. I don't get it. I am posting screenshots of usage at both times I checked the battery and the bbs logs.

Something is siphoning off my battery well after my screen locks. ideas? Thanks.

Well I don't see much of a difference in the usage profile "before" and "after" except the screen being on for 10 minutes so if that drop worries you that's the place to look at.

On the other hand I see quite some potential in the usage profile when the screen is off:
- you use both friendcaster and facebook: two apps for the same thing, double resource consumption: if you want my opinion go for friendcaster if a facebook app is important to you
- sync: your usage profile is pretty heavy on sync and you may want to try optimizing that by checking all the acoounts and making sure you really need to sync all that info (contacts e.g.) and what frequency to use
- gmail multiple accounts push: that as for the first issue multiple times the same overhead. A solution with forwarding and tagging your mails may be more friendly on the battery
- In addition to gmail you seem to be using the standard mail app as well, that's another time the same overhead
- pure messenger is causing quite some wakeups and you seem also to use gtalk
- backup: if you have an offline backup solution like titanium you may want to turn off the cloud version of google
 
  • Like
Reactions: steve austin

chamonix

Recognized Contributor
Nov 7, 2008
5,048
19,622
Berlin
Google Pixel 6 Pro
I've been lurking for a while, trying to figure out why, when I upgraded from Stock GB (unlocked) to stock ICS, my battery went from reasonable to unusable. Since that time, I've changed my ROM and my Kernel (currently running Matr1x and AOKP), and calibrated my battery. I've tried some of the things in the other threads (force stopping programs, turning off location services, bluetooth), to no avail. I got BBS and did what the recommended procedure seems to be - I charged it overnight, then unplugged it and let it collect stats for a while. Attached is my BBS dumpfile. During the 1 h 43 m that this dump file was created, my batter went from 100% to 84% without turning on the screen except to create the dump file.

I realize I'm being a noob here, but I can't figure out what to do to fix my problem. Please help! :confused:

That reading is far too short to be representative. Please read the first posts of this thread about how to proceed for providing a representative reading
 

chamonix

Recognized Contributor
Nov 7, 2008
5,048
19,622
Berlin
Google Pixel 6 Pro
lol permanently, use 3rd party fb app, its pretty much battery consuming, and just sync once a day for some time, also use 3rd party app for gmail, turn off auto sync, you have to sacrifice your apps or your battery, :)

---------- Post added at 09:39 PM ---------- Previous post was at 09:38 PM ----------

ICS is more memory hungry u can check other roms if you are rooted, like miui or cm9

That's the kind of hints I don't like because they are without context. Of course if you turn off data the battery drain will be less but that's not what this thread is about nor do you need a tool like bbs to make such statements. This thread is about analysing readings and explaining how to improve on that basis.
 

steve austin

Senior Member
Feb 6, 2009
707
73
this is a perfect example of what is going on with my phone and its driving me nuts.

- I unplug the phone at 3 am - 100%
- I wake up at 7am (no use, no screen time) - 95%
- I take a screen shot and dump bbs file send one 65kb email. This lasts all of 6 minutes - 90%

one hour later I turn on the screen - just to see if i was still @ 90% - and it went down to 85%. I don't get it. I am posting screenshots of usage at both times I checked the battery and the bbs logs.

Something is siphoning off my battery well after my screen locks. ideas? Thanks.

I'm using fb app, imo chat messenger with 5 accounts always logged in. I have sync on for everything and wifi, too.

My battery life is great. It's about 2 days with screen off and about 1 day with normal usage. 16-20 hours with very heavy usage.
I have a Galaxy S2 with stock battery.

So as you can see, good battery life without sacrifices is possible.

First off. Wifi is way more battery friendly than mobile data. The problem is, you have to make sure your phone doesn't get woken up. Therefore you need to clean your network from broadcasts. This is not an easy task, but if you have the will, there's a way. Start with a tool called shark and wireshark. Google is your friend.

Limit your mobile data to 2G. It will save battery. Especially when you are moving. Because bad signal causes wakeups. You also have less handshakes to make while traveling. Put the 2G3G switch in the power widget bar and switch on 3G when you need it. You will be surprised to realize that you need 3G for almost nothing. Not for chating, not for mail. Only for surfing.

The next thing to do, and where bbs can't help you, is to reduce battery usage while screen on and while active with screen off. This is mainly related to your kernel. Governors and other settings play an important role here. Maybe undervolt a bit to squeeze out the last drop of juice from your battery. Install CPU spy. If there's a lot of usage in one of the upper middle frequencies it might be that you phone wakes to 800 MHz while screen off.
You could set in your governor that it should only ramp to 400
. It will drop to 200 then anyway.

Those are just a few tips, I hope I could help you. It won't be easy. But battery life is a complicated topic.
No wonder the guys at Berkeley took a interest in it, too.

BTW chamonix, are you planning to put those techniques they published in their paper to use in future versions?

EDIT:
I forgot, get Autostarts or Gemini app manager and disable apps that you don't need to run all the time. Like maps. Google maps causes wakeups when wifi is on, because it sniffs your location.
Turn off everything in location settings also.


Thanks for your post and insight. I am of the same mindframe. I have a smart phone. i want to use it as such to take advantage of all its potential. However, the way my battery is responding to use is really hindering me from taking advantage of such benchmarks you are posting - and I am using an extended 1900 mA battery (up from 1540 mA stock).

My screen brightness is always at 50% or less. I have used Gemini App manager to halt Drop box, DoubleTwist, Bible and Maps data connectivity. I have gotten rid of, as suggested, Juice Defender and (my favorite battery app) Battery Monitor Widget. However, as you can see from the post I have included, my battery is still draining extremly fast - especially when it is supposed to be at rest.

You mentioned the govs impacting the battery life. The hight end is 1.56 gh and the min mhz is 384. Is the 384 the minimum at which the phone would "ramp up to"?

I have read different things about the benefits of using wifi over data. One person swears by wifi one person swears by the other. I "thought" wifi was better, but I have been advised not to leave it on all night while in sleep mode. Do you see anythiing in my bbs logs to indicate why my phone is draining so fast? Thanks again for the insight.
 

chamonix

Recognized Contributor
Nov 7, 2008
5,048
19,622
Berlin
Google Pixel 6 Pro
Release 1.9RC1

Here is is and it is a pretty heavy release with lots on new features. That means a lot of testing and I count on you guys.

The complete changelog is in post #2 but I want to add a few details on 2 features to help you do better tests:

Network Stats
This feature was present in BBS' first version but was removed because of an inconsistent behavior. I was able to track down that behavior to a bug in Android so I basically rewrote the whole thing. The good new is it works, the bad new is it requires root. Please also test on an unrooted phone to make sure is has no negative effects except not providing any data.
The report shows the data traffic per package/app and interface so please test Wifi, Mobile and Bluetooth. All three interfaces should be named with speaking names. If you get some non speaking info please report as there may be differences in namings between version / kernels.

Watchdog (is not turned on by default)
This is the first attempt in adding active monitoring to BBS and I tried to do this in a non invasive way, using natural events in order to avoid wakeups. The logic is pretty simple:
- when the screen goes off a reference is automatically stored "since screen off"
- when the screen goes back on (or is being unlocked, depending on prefs) the time of screen off and the awake / total time ratio are checked against the configured thresholds. In case the threshold for awake is exceeded a notification is displayed, clicking on it brings you to the main screen in the "other" stats for the "screen off" reference.

The "screen off reference" is of course also available in the drop down.

If a notification was discarded while the screen was on it gets deleted when the screen goes off again (as the reference is also overwritten).

Besindes testing all that stuff I'd be happy to hear how you like it. I have no clear roadmap about active monitoring so there is space for "inventing" new features; but be warned, I will always be critical about those features when it comes to drain.
 

steve austin

Senior Member
Feb 6, 2009
707
73
Well I don't see much of a difference in the usage profile "before" and "after" except the screen being on for 10 minutes so if that drop worries you that's the place to look at.

- Yes. I saw it go from 95-90% in the 10 minutes I sent my e-mail and made the bbs dump. I was reluctantly fine with that 5% drop. Its the additional 5%, that dropped it to 85%, while the screen was off for an hour, that is constantly the issue. It has and continues to worry me.

On the other hand I see quite some potential in the usage profile when the screen is off:
- you use both friendcaster and facebook: two apps for the same thing, double resource consumption: if you want my opinion go for friendcaster if a facebook app is important to you
- I tried Friendcaster for both accounts, but it kept mucking up. It would make me log in to the web version of facebook everytime I tried to access either account. Passwords were never saved and there would be overlap. Therefore, I have stuck with both but do a 2 or 4 hour pinging. For me, it works out better if I use both.

- sync: your usage profile is pretty heavy on sync and you may want to try optimizing that by checking all the acoounts and making sure you really need to sync all that info (contacts e.g.) and what frequency to use
- I can not find out how to only sync the contacts at a certain rate.


- gmail multiple accounts push: that as for the first issue multiple times the same overhead. A solution with forwarding and tagging your mails may be more friendly on the battery
- Alas, I do not know how to do this. In looking into g-mail settings, I do not see the option to determine the sync time.

- In addition to gmail you seem to be using the standard mail app as well, that's another time the same overhead
- Yes, I do for yahoo mail. Not too fond of K-9. However, that is only sync'd for 4 hour intervals. But I do get e-mail pushed immediately. I thought it would grab it only at the 4 hour rate though.

- pure messenger is causing quite some wakeups and you seem also to use gtalk
[B]-Yes. I see that as well. I do not know how to accurately regulate Pure messenger. I have it set to 3 hours, but I seee that it does get updated more frequently than that. Side note. I looked in apps and System tuner and I did not see g-talk to delete it. what program do you suggest to find it? Also, I was under the impression that g-talk effected how voice recognition software works. I don't want to mess anything up. However, if I can get rid of it I will.

[/B]- backup: if you have an offline backup solution like titanium you may want to turn off the cloud version of google
- Cool. thanks.


* I just saw you released a new version of the app. congrats and thanks! You are about to get swamped. So I understand if you don't have time to respond to my reply anytime soon.
 

chamonix

Recognized Contributor
Nov 7, 2008
5,048
19,622
Berlin
Google Pixel 6 Pro
* I just saw you released a new version of the app. congrats and thanks! You are about to get swamped. So I understand if you don't have time to respond to my reply anytime soon.

No problem, I need to relax from the release stress anyway so I'm browsing thread ;)

- Yes. I saw it go from 95-90% in the 10 minutes I sent my e-mail and made the bbs dump. I was reluctantly fine with that 5% drop. Its the additional 5%, that dropped it to 85%, while the screen was off for an hour, that is constantly the issue. It has and continues to worry me.
With the new version there is an option called "watchdog" that may help you in finding out what is different in that hour you mention as a "since screen off" automatically gets created when the screen goes off. As you did email just before the network stats feature may also be handy in this regards

- I tried Friendcaster for both accounts, but it kept mucking up. It would make me log in to the web version of facebook everytime I tried to access either account. Passwords were never saved and there would be overlap. Therefore, I have stuck with both but do a 2 or 4 hour pinging. For me, it works out better if I use both.
Well if you are taking the costs into account there's nothing wrong about it. You still may want to make sure that only one app syncs the contacts though. For me FB is not that important and my technique is a little different: I get email notifications for everything I am interested in and use the web version for checking. Like that I have no overhead of sync at all but still get the infos that are important to me.

- I can not find out how to only sync the contacts at a certain rate.
I don't think the rate can be definied but you can decide not to sync the contacts.

- Alas, I do not know how to do this. In looking into g-mail settings, I do not see the option to determine the sync time.
gmail uses push and has no timing

- Yes, I do for yahoo mail. Not too fond of K-9. However, that is only sync'd for 4 hour intervals. But I do get e-mail pushed immediately. I thought it would grab it only at the 4 hour rate though.
As I wrote in the previous post putting the accounts together may be a solution. I believe that gmail can poll pop3 accounts on the server you you could deliver all pop3/imap mails using one gmail account.


-Yes. I see that as well. I do not know how to accurately regulate Pure messenger. I have it set to 3 hours, but I seee that it does get updated more frequently than that. Side note. I looked in apps and System tuner and I did not see g-talk to delete it. what program do you suggest to find it? Also, I was under the impression that g-talk effected how voice recognition software works. I don't want to mess anything up. However, if I can get rid of it I will.

The wakeups of pure messenger are more likely to be keep alive packets that the client has to send from time to time for the server to know you are still online. There is nothing you can do to change that timeout.

There is no way to delete gmail but you can sign off. Some google framework activities not related to gmail will still show up then.
 

stuart0001

Senior Member
Jan 9, 2011
2,477
1,236
Hampton
Thanks for the new release. However, I'm still getting this error frequently on fully stock device and Rom. Any thoughts?
5cef253a-0eb4-f980.jpg


Sent from my HTC One X using xda premium
 

Karpfenhai

Senior Member
Nov 25, 2011
3,769
2,775
Leipzig
I've been lurking for a while, trying to figure out why, when I upgraded from Stock GB (unlocked) to stock ICS, my battery went from reasonable to unusable. Since that time, I've changed my ROM and my Kernel (currently running Matr1x and AOKP), and calibrated my battery. I've tried some of the things in the other threads (force stopping programs, turning off location services, bluetooth), to no avail. I got BBS and did what the recommended procedure seems to be - I charged it overnight, then unplugged it and let it collect stats for a while. Attached is my BBS dumpfile. During the 1 h 43 m that this dump file was created, my batter went from 100% to 84% without turning on the screen except to create the dump file.

I realize I'm being a noob here, but I can't figure out what to do to fix my problem. Please help! :confused:

Hmm, since your dump looks good,i would recommend too repeat the test on flightmode, if the drain disappears, the reason could be bad network coverage in your area, try to find a modem with better reception then.

Tapatalked from my Samsung GT9100
 

chamonix

Recognized Contributor
Nov 7, 2008
5,048
19,622
Berlin
Google Pixel 6 Pro
Thanks for the new release. However, I'm still getting this error frequently on fully stock device and Rom. Any thoughts?

Sent from my HTC One X using xda premium

Then you are the chosen one :)
Based on the feedback of two users having this problem I will PM you a link for downloading 1.9.0.1RC1 with a small add-on (an additional permission "android.permission.BLUETOOTH") in the hope it helps. Give me 5 minutes and you will get a PM.
I count on you to check that version and give me feedback if the error situation went better. Depending on that I will integrated that attempt to fix into RC2 or drop it as a dead end.
 
Last edited:
  • Like
Reactions: stuart0001

stuart0001

Senior Member
Jan 9, 2011
2,477
1,236
Hampton
did you try reboot?

Working fine here on a Galaxy S3 using CM9 Rom


reboot fixes it temporarily but it returns after a few hours.




Then you are the chosen one :)
Based on the feedback of two users having this problem I will PM you a link for downloading 1.9.0.1RC1 with a small add-on (an additional permission "android.permission.BLUETOOTH") in the hope it helps. Give me 5 minutes and you will get a PM.
I count on you to check that version and give me feedback if the error situation went better. Depending on that I will integrated that attempt to fix into RC2 or drop it as a dead end.

Excellent. Thanks and ill be sure to give feedback.

Sent from my HTC One X using xda premium
 

odub303

Senior Member
Nov 30, 2007
1,337
464
On the new rc, no matter what the preference setting is, the app opens from a widget click to "since screen off" for me. Well keep testing and let you know if i find any other quirks.

Sent from my SPH-D710 using xda premium
 
  • Like
Reactions: chamonix

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    Not compatible with the Samsung Galaxy S20 Ultra (Snapdragon)? That's surprising. Anyone else on here have a Galaxy S20 series using Better Battery Stats?
    That is not at all surprising, if you have been following this thread. There are multiple complaints from Samsung owners here. If you search this thread for the OP's posts, you will also find him saying why Samsung devices have an issue.
    2
    Attached a second log after having disabled Meta Services.
    Wifi on, GPS off, screen on less than a minute. I generated the log after 5 h 52 m 49 s , but I'm confident that's fine.

    Thanks for any suggestion you might have.
    This dump file is ok but the earlier observations about your mobile signal remain.

    Too many wakelocks, alarms, kernel wakelocks etc, mostly from system. Unable to specify the exact reason. May be your updating of apps or freeing up space has something to do with it.

    Your wifi also seems to have an issue. Please try resetting it by switching off the router, wait for 30 seconds and restart.

    Was location/scanning on? If so, do you require it during sleep?

    Instagram had 2 alarms per hour.

    A whole lot of apps had background uploads/downloads of data. The system apps can't be tweaked AFAIK but the other apps can be. Check the list within the spoilers and determine whether you need to have these many apps on auto update.
    10228 (Wifi) (com.microsoft.office.outlook.Outlook): 4.0 MBytes 26.1%
    10107 (Wifi) (com.android.chrome.Chrome): 2.0 MBytes 12.1%
    5009 (Wifi) (com.samsung.android.scloud.Samsung Cloud): 1.0 MBytes 9.4%
    10047 (Wifi) (com.android.vending.Google Play Store): 1.0 MBytes 8.0%
    10187 (Wifi) (com.google.android.apps.tachyon.Meet): 1.0 MBytes 6.8%
    10023 (Wifi) (Google Play Services): 880.0 KBytes 4.5%
    1051 (Wifi) (1051): 724.0 KBytes 3.7%
    10170 (Wifi) (com.google.android.youtube.YouTube): 724.0 KBytes 3.7%
    10265 (Wifi) (us.zoom.videomeetings.Zoom): 632.0 KBytes 3.3%
    15010023 (Wifi) (Google Play Services): 526.0 KBytes 2.7%
    10080 (Wifi) (com.google.android.googlequicksearchbox.Google): 470.0 KBytes 2.4%
    10205 (Wifi) (de.stocard.stocard.Stocard): 431.0 KBytes 2.2%
    15010047 (Wifi) (com.android.vending.Google Play Store): 333.0 KBytes 1.7%
    10139 (Wifi) (com.google.android.apps.maps.Maps): 332.0 KBytes 1.7%
    10231 (Wifi) (it.subito.Subito): 245.0 KBytes 1.3%
    10315 (Wifi) (com.azure.authenticator.Authenticator): 218.0 KBytes 1.1%
    10199 (Wifi) (com.whatsapp.WhatsApp): 211.0 KBytes 1.1%
    10044 (Wifi) (com.microsoft.skydrive.OneDrive): 195.0 KBytes 1.0%
    10254 (Wifi) (com.google.android.apps.chromecast.app.Home): 180.0 KBytes 0.9%
    0 (Wifi) (0): 164.0 KBytes 0.8%
    10130 (Wifi) (com.google.android.gm.Gmail): 135.0 KBytes 0.7%
    10298 (Wifi) (com.idealista.android.idealista): 122.0 KBytes 0.6%
    10200 (Wifi) (com.instagram.android.Instagram): 118.0 KBytes 0.6%
    10244 (Wifi) (com.sand.airdroid.AirDroid): 97.0 KBytes 0.5%
    10217 (Wifi) (com.alarmclock.xtreme.free.Alarm Clock Xtreme): 87.0 KBytes 0.5%
    10119 (Wifi) (com.facebook.appmanager.Meta App Manager): 81.0 KBytes 0.4%
    10209 (Wifi) (com.amazon.mShop.android.shopping.Amazon Shopping): 51.0 KBytes 0.3%
    15010080 (Wifi) (com.google.android.googlequicksearchbox.Google): 48.0 KBytes 0.3%
    10178 (Wifi) (com.sec.android.daemonapp.Meteo): 37.0 KBytes 0.2%
    1000 (Wifi) (Sistema Android): 21.0 KBytes 0.1%
    10185 (Wifi) (com.google.android.apps.docs.Drive): 21.0 KBytes 0.1%
    10303 (Wifi) (com.app.tgtg.Too Good To Go): 18.0 KBytes 0.1%
    10039 (Wifi) (Multimedia): 17.0 KBytes 0.1%
    10102 (Wifi) (com.samsung.android.mobileservice.Samsung Experience Service): 17.0 KBytes 0.1%
    5250 (Wifi) (UID): 13.0 KBytes 0.1%
    10258 (Wifi) (com.google.android.apps.docs.editors.docs.Documenti): 10.0 KBytes 0.1%
    10286 (Wifi) (com.google.android.apps.docs.editors.sheets.Fogli): 10.0 KBytes 0.1%
    10419 (Wifi) (com.google.android.apps.fitness.Fit): 10.0 KBytes 0.1%
    10126 (Wifi) (Calendar): 10.0 KBytes 0.1%
    10272 (Wifi) (com.google.android.apps.walletnfcrel.Google Wallet): 10.0 KBytes 0.1%
    10059 (Wifi) (com.samsung.android.themestore.Galaxy Themes): 9.0 KBytes 0.1%
    10269 (Wifi) (com.google.android.keep.Note di Keep): 9.0 KBytes 0.1%
    10395 (Wifi) (com.google.android.apps.tasks.Tasks): 9.0 KBytes 0.0%
    10041 (Wifi) (com.sec.spp.push.Samsung Push Service): 9.0 KBytes 0.0%
    15010139 (Wifi) (com.google.android.apps.maps.Maps): 9.0 KBytes 0.0%
    10319 (Wifi) (com.zucchetti.hr.hrsuite.ZConnect): 8.0 KBytes 0.0%
    10266 (Wifi) (com.samsung.android.oneconnect.SmartThings): 8.0 KBytes 0.0%
    10196 (Wifi) (com.samsung.android.spay.Samsung Wallet): 8.0 KBytes 0.0%
    10328 (Wifi) (com.dashlane.Dashlane): 8.0 KBytes 0.0%
    10090 (Wifi) (com.sec.android.app.samsungapps.Galaxy Store): 5.0 KBytes 0.0%
    10246 (Wifi) (co.windyapp.android.Windy.app): 1.0 KBytes 0.0%
    1021 (Wifi) (1021): 984.0 Bytes 0.0%
    1200 (Wifi) (com.samsung.android.spayfw.Samsung Pay Framework): 192.0 Bytes 0.0%

    And the phone was on the highest CPU speed for more than 2 hours. I am not able to say why except for the already made observations.

    May be you have a rogue app or an update was not properly taken resulting in misbehaviour. Two options: uninstall all the apps, reboot and install the apps one by one looking for any misbehaviour. Or back up to the PC/laptop and reset the phone and check drain before installing apps. Painful, I know, but you may not have many choices.

    You can also enable airplane mode and generate another dump file to check the drain without wifi and mobile signal. BTW, how old is the battery?
    I'm living close to the border and signal is always poor, like in the past 5 years. It should not be the culprit, but I can switch to roaming in case.
    In that case, how much drain you experienced overnight before this episode?

    I hoped that 2 minutes wouldn't invalidate 8h45mins of log. In addition WiFi and also mobile data were off. Having them enabled it's almost impossible to reach 6hrs of log.
    The moment the screen is unlocked, most of the sleeping apps wake up and start their background activity. Even if for a minute, that will skew the readings and that is why the dev requested that that interval be as brief as possible. And in the earlier dump file, wifi was off, not mobile data through which background uploads/downloads happened.
    2
    Dears,

    I hope someone can help me by reading the attached dump file.

    Since some days I have a impressive battery drain. This happened from one day to another after having:
    1. Updated 80 apps
    2. Free up space in the internal drive
    3. Updated time zones of the Samsung Watch

    Thanks to BBS I uninstalled few apps (Facebook Lite, Amazon Music and Investing) but still I have huge battery drain (35% overnight, during the day 40%/h).

    I see many *alarms* wakelocks, but I do not know where they come from.

    Thank you!
    The dump file you attached is not strictly according to requirements. You seem to have used it for 2+ minutes after unlocking but before you saved the file. Please produce another one where the 'screen on' time is in seconds ie save the file as soon as you unlock.

    Apart from that, your mobile signal is poor/moderate most of the time. This is a huge battery guzzler. You also seem to have turned off the wifi. On top of a poor mobile signal, with the wifi turned off, the background downloads/uploads all happened via mobile data. Still more battery drain.

    Please enable wifi while generating the next dump file and if possible, locate your phone where it has better mobile signal.
    2
    Sorry, it did not click that the filters on the page would also apply to the dump.

    I have attached what should be a dump of 6 hours. At least, I hope. I charged the phone to 100%, played a bit with it to get it to 95%. Then I laid it down.

    During that approx. 6 hour period, it restarted all by itself twice :( These were not full reboots, they happened way too fast for that, but it did mean the screen went on and back off. So this is a dump from "unplugged" to "current".

    Thanks to anyone who's willing to take a look at it.
    It does look like an 'Unplugged' to 'Current' dump. But the battery was at 35% at the start, not 95% as you say. It went down to 20% at the end. In between, the phone was on for 18 odd minutes. May be that accounts for what you described ie. screen coming on a few times. And the dump is not for 6 odd hours but for 9 odd hours.

    Google Play Services seems to have been on for a few hours but I think that it was not draining the battery by itself. You may have a rogue app which doesn't go to sleep or misbehaves otherwise and gets Google Play Service blamed. I have not found any other major culprit.

    Did you recently install any app? If so, uninstall it and check. If not, I am afraid, the only other way may be to factory reset the phone losing data in the process. Do take a backup in case you decide to do this. And check the drain after the reset but before installing any apps by yourself. If the drain is ok, add your apps one by one (don't restore them from the backup) and see which app triggers the drain.

    I know it is a tedious process but I have no other advice given your circumstances. If you want to, please wait for advice from others too, before proceeding.
    2
    Hi guys. I bought a Nothing Phone (2a) and I'm having issues with Google Play Services - at least according to Battery Usage. The battery drain only happens when I'm actively using the phone, it doesn’t happen if it’s on idle. I already disabled "App install optimization" on Google Play Store and every setting I could think of - like Wi-Fi Scanning. I even did a hard reset.

    Now, I'm aware that BBS doesn't fully work in Android 14, but I wanted to give it a shot at least. Alarms is the only section working and it shows a lot of wakeups from android itself, dunno if that's a normal amount or not. I have attached the log and some screenshots. Sorry for the incomplete log, but I would be grateful if anybody has any idea of what is going on. Worst-case scenario I will simply return the phone and order a new one, but I would like to keep trying before resorting to that.

    *edit: I think screen time is bugged on this phone, since Digital Wellbeing shows more hours of screen time - 5h 12min.
    BBS is not intended to analyse in-use drain. That said, your wifi accounted for 75% of the drain which in my opinion is too high. The other alarms look normal for in-use (though I am not an expert on in-use stats).

    Check your wifi. How far away from the wifi were you when you used it? Reset it by switching the router off, wait for 30 seconds and then switch on and check. May be try using mobile data for some time to see whether that drains any less, though normally wifi consumes less power comparatively.

    EDIT:
    Usually the screen is the top most drainer when you look at Battery under Settings whereas in your case it is the wifi. Strange.
  • 5475
    I started BetterBatteryStats because I was missing the great battery history that Spare Parts allowed to call on Froyo. It has been a long journey since the first version. BetterBatteryStats provides an insight in following categories:
    - General "other stats "overview: Awake, Deep Sleep, Screen On, Phone On, Wifi On, Wifi Running ratios
    - Kernel Wakelocks
    - Partial wakelocks
    - Alarms/Wakeups
    - CPU States
    - Network stats
    - Process stats with User and System CPU time

    Use so called references BetterBatteryStats shows data for different samples over time:
    - since boot
    - since unplugged
    - since charged
    - since screen off
    - custom references
    - any combination of the above (e.g. from screen off to screen on)

    BetterBatteryStats is calling the "batteryinfo" service of Android to retrieve data already lying there without generating overhead. Since Kitkat Google has revoked the permission for normal apps to access these stats (without valid reasons IMHO). You can read more about that here.

    Fortunately and thanks to @Looki75 there is a way to work around the restrictions intruduced by google in Kitkat and run BBS on non-rooted devices. Please see here for more details.

    BetterBatteryStats has been tested on Froyo, Gingerbread, Honeycomb (3.1, thanks to daveid), ICS, JB, Kitkat and Lollipop on different ROMs and Kernels.

    What are wakelocks and why should you care about them?
    When it comes to Android the most discussed and commented topic that I know is battery drain / battery life. I'm a quite heavy user because I spend a lot of time on the train every day reading my mails, surfing and listening to music but still my phone is off for a long time during the day and while I accept the battery being drained while I use the phone I care about it draining slowly while "doing nothing".

    Wakelocks or to be more precise partial wakelocks is a pattern than helps devs to make sure that important pieces of their code do not get interrupted. Wakelocks are not bad per se, they are a tool. There are many poor implementations that make use of wakelocks and BBS helps making that transparent.
    Caution: do not use and wakelock supressor tools. They will cause an erratic behavior of your phone, causing more harm than good.

    Basically the phone has (simplified, kernel devs don't shoot) three states:
    1. awake with screen on
    2. awake
    3. sleeping (that's you phone favorite state)

    The transitions are from (1) to (2) and finally from (2) to (3). Now as long as you use your phone it's in (1) and does not leave that state as long as you keep using it interactively. If you stop using it the phone is aiming to go to (3) as fast as possible.
    And here's where wakelocks are important: as our phones as smartphones they tend to do background processing. Some of this processing is important like e.g. making a phone call, listening to music or synchronizing your contacts.
    As the phone wants to go from (2) to (3) and on the other hand you don't want to hang up while you are in a call the app keeps hold of a wakelock to prevent that transisiton. When you hang up the partial wakelock gets release and here we go (the phone goes to sleep).

    So partial wakelocks is a tool and it's not something that we should forbid for obvious reasons. Now there are cases when the design on an app is not real life proven (conditions of poor of no converage) and the wakelocks have negative effects because they are held unnecessarily or for too long.
    BetterBatteryStats identifies these wakelocks and using your expertise or the once from our users here you can understand what happens and find a strategy to change that for the better.

    And what about wakeups?
    Wakeups (alarms) is a pattern to be used when an application should to something after a certain period of time (or at a certain time). Again, an alarm is a tool and is nothing.
    On the other hand there are a lot of poor implementations that BBS can help you discover:
    - alarms waking up the device when all the app should do is refresh the screen: in such cases the app uses the wrong type of alarm, there are alarms that are specifically to be used only when the screen is on
    - to frequent alarms: in case of e.g. poor network conditions some apps may use alarms to repeat failed network operations. Doing this too often will cause too many wakeups (and wakelocks for doing the handling)
    - apps that wake up your device when you did not expect any activity while screen is off: you can use the info provided by BBS to contact the dev about such issues

    Try it yourself

    If you need help
    Always add the whole context when asking for help. Most of the times a dumpfile is helpful, sometimes screenshots showing your observations may help as well.

    Before posting a dump please make sure that the references for kernel wakelocks and alarms were processed correctly. Reading a dump takes a few minutes and it would be great if you could not waste the time of whomever studies it, aiming at helping you.
    Generally a dump "since unplugged" is better than "since charged". When you start your analysis make sure to follow following procedure:
    - enable watchdog processing in BBS settings
    - verify from/to references is checked under custom views
    - full charge device then let it run down to ~95%
    - put device to sleep for at least 6 hours (no touchy!)
    - wake device and launch BBS
    - adjust from/to references to 'screen off' and 'screen on'
    - save dumpfile from share menu
    - post resulting log to this thread (or provide cloud link)
    I will not reply to posts with incomplete dumps

    Reporting bugs
    If you want to report a bug please make sure:
    - that you can reproduce the problem
    - explain what the problem is, how you could reproduce it and what is going wrong (a sentence lke "xxxx does not work for me" is a waste of your time and wil be ignored)
    - enable debug in advanced prefernces
    - post a logcat

    A good read about reporting bugs
    Translations
    Starting with 2.0 BBS is getting multi-language. Currently following languages are included:
    - en: main language, maintained by me
    - ru: translation thanks to @gaich
    - cz: translation thanks to @mag01
    - es translation thanks to @vldesco
    - it translation thanks to @code010101
    - hr translation thanks to @seky2205
    - fr translation thanks to @xavihernandez
    - de translation thanks to @Minty123
    - tr translation and other language improvement by @Eleo

    If you want to contribute with a new language please feel free to offer you service and contribute to BBS, by submitting a pull request to the github project with the translated strings.xml. But please be aware of the fact that translation is a continuous work: even if the initial effort is higher there will be unavoidable changes to the english master XMLs that will require regular updates of your translations.

    If you have a recommendation for a free croud-translation service that you would prefer I am open for suggestions.

    Thanks
    To nobnut for donating me a Nexus S for testing
    To nobnut and brandall for their support, encouragements, testing and constructive feedback in the early stages of the development.
    To @Javinotfound or the new icons / logo

    To suku_patel_22, jeremysherriff, Karpfenhai, Tungstwenty, It_ler, Perseus71 and mag01 for their help in this thread and their systematic testing my betas and RCs

    To Entropy512 for providing support and insights about kernel wakelocks and helping making BBS a better tool
    4849
    Release

    Edit 2021-06-13: 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. Anyhow, I am working on a fix

    BetterBatteryStats is available on Google Play (https://play.google.com/store/apps/details?id=com.asksven.betterbatterystats) for what I believe is a fair price. If you like my work and want to support me please fell free to show your gratitude by buying the app.

    Google play users can register to be part of the public beta programme. Selected Release Candidates will be released to google play as part of the beta programm. You can enroll to the beta programme here: https://play.google.com/apps/testing/com.asksven.betterbatterystats

    Follow me on Mastodon to be notified of updates and get insights in new features/developments.

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

    Current test-release:

    I have moved to an automated build system (older releases are still attached here) and do the distribution using AppCenter.
    Privacy note
    Access to the downloads does not require you to register to AppCenter (you still can to benefit from neat features like notifications when new releases are available)

    Get release candidates here
    attachment.php







    Changelog

    2.3
    - Full android O support
    - Unrooted devices now fully supported (with perms added using ADB)
    - UI improvements and I18N
    - Better support for substratum theming
    - Fixes based on crash-reports
    - Added application analytics

    2.2.2.0

    Fixed #791: bugs preventing sensor stats to show properly on pre-lolipop devices

    2.2.1.0
    Fixed #787, #788: bugs preventing some stats to show properly on pre-lolipop devices

    2.2.0.0
    Merged translations
    same as RC3

    Older Changelogs


    2.2.0.0RC3

    Fixed sensor report
    Prep for release

    2.2.0.0RC2
    #780: Added proper Sensor Stats

    2.2.0.0RC1
    #659: Renamed "Other" stat to "Summary"
    #398: possibility to add a note when saving a dumpfile
    #682: Alarms details view is now scrollable
    #772: use bolder fonts to comply with design guidelines and make reading on smaller devices easier
    #677: added GPS time (sensors) to Summary
    #777: folded both Text and JSON representations of the dumpfile into one file

    2.2.0.0B6
    #675: watchdog sometimes shows awake > 100%
    #756: added LG G2 Kernel Wakelocks support and more agressive detection of LG G2, G3, G4
    #759: Watchdog toast sometimes get sticky
    #760: Kernel Wakelocks do not substract properly on non-root devices (or with API-mode on)
    #762: alarm do not show icon on non-root devices (or wirh API-mode)

    2.2.0.0B5
    #733: Kernel wakelocks parser for LG G4
    #753: Added option to select the destination directory for dumpfile/locat/etc. (Requires OI FileManager)

    2.2.0.0B4
    #715: introduced snackbars instead of many of the toasts
    #731: fixed layout issues for "old" widgets with RTL languages
    #749: fixed another non-root issue

    2.2.0.0B3
    #211: add sensor data to "other" stats
    #741: improvements on non-root experience (network stats, fixes)
    #748: fixed doze mode counters
    Added sync time to other stats

    2.2.0.0B2
    #734: added doze mode stats (Marshmallow)#744, #747: more fixes for non-rooted usage
    #745: fixed/more accurate Bluetooth stats for Marshmallow


    2.2.0.0B1
    #716: experimental: grant required permissions without having to install system app (requires root)
    #735: fixed parsing of native alarms and API call for Marshmallow
    #736, #737, #738: various FC from gplay crash reports
    #741: improve functionality for non rooted devices (having system app installed)

    2.1.0.0
    No changes from RC6

    2.1.0.0_RC6
    Some more widget tuning
    Merged transations
    2.1.0.0_RC5
    Some widget tuning
    Merged and compacted changelog

    2.1.0.0_RC4
    #720, #721: "Awake" is now consistently "Awake when screen off"

    2.1.0.0_RC3
    I18N
    More work on widget

    2.1.0.0_RC2
    #712: Fixed widget real estate

    2.1.0.0_RC1
    #708: reverted AppOps call back to older working version
    #711: fixed process view sort
    #713: fixed graph series
    See also in-app changelog

    2.1.0.0_B5
    #673: permissions list scroll issue
    Experimental M-preview support
    Transition animations

    2.1.0.0_B4
    #612: kernel wakelocks for LG G3 5.0
    #694: added awake ratio to dashclock
    #699: merged system app changes
    #702: moved to new appcompat
    New Icons by Javi
    2.1.0.0_B3
    #693, 695: fixed crash on 2.3.x devices
    #693: reverted back to "old" (small) system app apk to work around CM/LP 5.1.1 installation isuues
    #696: fixed behavior of the "back" icon on older Android devices

    2.1.0.0_B2
    #671: revert to old AppOps calling method
    #681: fixed rate dialog
    #683: limit widget font size
    #686: string mssing leading to @number being displayed
    #687: widget opacity can be adjusted
    I18N

    2.1.0.0_B1
    New responsive widget
    #510: New System App (no need to update)
    #658: Fixed various crash reports from gplay
    #679: Fixed graphs being off on 5.1
    #405: Fixed widget sometimes not refreshing at screen on

    2.0.0.0
    No functional changes from RC6
    Merged I18Nalized changelogs

    2.0.0.0RC6
    This is the golden release: release notes have been updated for the upcoming 2.0
    #650: semi transparent grey touch feedback for pre-lolipop devices
    - Sorry, no fix for the unthemed dialogs: there is a bug in appcompat to that and I could not find a way around that except rewriting all dialogs and that is too much change at this point in time.

    2.0.0.0RC5
    #632, #633, #634, #635: Fixed package info dialog (colors, label width)
    #639: added arabic (testwise)
    #626: fix (again) for FC on long press using german language

    2.0.0.0RC4
    #626: fixes crash when long-pressing a list item
    #630: added credits for I18N
    #631: hotfix for issue with RC3 on pre-lolipop devices
    2.0.0.0RC3
    #616: no battery graph when all values are 100%
    #617: no changelog showing in RC2
    #618: add info to dumpfile is alarms/kernel wakelocks are from API
    #621, #624: I18N
    #622: material design touch feedback
    #625: FC opening dashclock settings

    2.0.0.0RC2
    #552: fixed wrong style for overflow menu in dark theme
    #609: fixed oblique lines in graphs

    2.0.0.0RC1
    #546: option to force EN-en locale
    #569, #582, #588, #595: more translations
    #583: move *api* out of the title
    #585: optimized load time of graphs
    #586: use white icon for watchdog notifications
    #597: battery graph always shows same data
    #599: FC opening credits screen
    #600: clean up debug info from normal logcat
    #602: fixed watchdog reporting of awake

    2.0.0.0B7
    #491: added frature to import/export preferences
    #540: System App Dialog now includes link to the recovery ZIP as a workaround is in-app install does not work (links to XDA or gplay, depending on version)
    #551: fixed "pinned" battery graph
    #553: lighter cicle gauge and font
    #554: settings screen and white text on the light background that appears after clean start
    #558: make from-to ref spinners suppressable
    #563: more I18N (thanks to gaich and mag01 fpr their hard work keeping up with me changing the strings)
    #564: alarm details dialog title is too dark for dark theme
    #566: add notification bar color for lolipop
    #572: pass the su --context for accessing dumpsys alarm (may cause slowdown, please report on that with supersu version you are using)
    #574: better performance in graphics

    2.0.0.0B6
    #521: make icon size and font size adjustable
    #522: kernel wakelock using API fail on lolipop
    #550: missing strings
    #556: fixed native kernal wakelocks on lolipop
    #557: no translation of array, mote stuff to strings
    2.0.0.0B5
    #360, #529, #534, #539: more externalized strings for I18N
    #387: use of wakelocks with timeouts, because I can
    #511: Themed dialogs
    #517: redesigned graphs
    #527: add SELinux policy to dumpfile
    #532: fixed theme switching issues
    #535: added Czeck, thanks to mag01
    #536, #537, #538: added russian, thanks to gaich
    #531: fixed alarms dialog showing infinite / Hr.
    #545: merged new constants that were causing the wrong stats to be processed

    2.0.0.0B4
    First shot at I18N: implemented german
    #495: cleanup ununsed libs
    #502: cleanup assets
    #518: fixed infinite wakeups per hour in alarms
    #519: re-add battery from/to % to screen (optional)
    #520: alignment of labele/icons
    #523: theme switch only complete after restart
    #524: switched back from cards layout as it takes too much real estate
    #525: notification area invisible by default
    #526: FC after theme switch
    #528: Partial wakelocks show wrong values (thank google for changing the constants again)!

    2.0.0.0B3
    #484, #508: surface information about errors / failures to the UI
    #493: avoid retrieving the battery level from battery info API to reduce load (and avoid service unavailable)
    #497: added dark theme
    #509: added % from/to back to dumpfile
    #512: theme preference slider controls
    #513: fixed empty release notes
    #515: automatically detect SELinux preventing access to dumpsys alarm and fall back to API mode
    #516: fixed alarms showing infinity in gauges
    2.0.0.0B2
    #496: fixed gauges in RAW stats always being 100%
    #499: "since" and white header missing in raw stats
    #504: failed remot to ro after system app install does not report an error anymore since the app was installed correctly
    #505: advanced pref to enable alternate (API) mode for retrieving alarms (and avoid the need for permissive kernel)
    #506: alarm details missing in dumpfile
    Bigger changes under the hood: externalized all preferences to prepare for I18N


    2.0.0.0B1
    It's all new and shiny
    #487: ability to save JSON format from tasker plugin
    New calculation approach to avoid rounding differences
    Simplified / removed unused options from settings
    Removed google analytics

    1.16.1.0B2
    #486: watchdog does not warn

    1.16.1.0B1
    #446, #483: watchdog warns about 100% awake even if reading shows it's not the case
    #481, #482: FC conditions from crash reports
    #485: addedf more comprehensive info about BATTERY_STATS perm and Xposed setting to dumpfile

    1.16.0.0
    no changes from RC6 1.16.0.0_RC6
    #479: attempt to fix failing system app install process on certain devices
    #480: fixed Dashclock settings not opening in xdaedition

    1.16.0.0_RC5
    #475: more speaking text for XPosed module settings
    #476: fixed dashclock API 2 manifest (kudos to DvTonder)
    #477: fixed exception in method to obtain other stats from dumpsys (compat mode)
    #478: fixed alarm parsing error on pre 4.2 versions

    1.16.0.0_RC4
    #469: Fixed network stats parsing error
    #472: Fixed alarm parsing for L preview
    #473: fixed wakelock being expressed in ms on L preview
    #474: fixed sorting of CPU states

    1.16.0.0_RC3
    #470: fixed non null extra passed by certain launchers
    #471: fixed batterystats service name on L preview

    1.16.0.0_RC2
    #464: fixed icon height in list
    #466: if xposed modue is checked in advanced prefs do as if all perms were there (use at your own risk)
    #467: fixed missing icons in network view
    #468: fixed FC condition when creating a logcat

    1.16.0.0_RC1
    #463: added copy to clipboard on long-press
    Merged to master1.16.0.0_B7
    #462: fixed antialiasing of pie gauge to avoid pixelation

    1.16.0.0_B6
    #457: fixed FC on calling permissions
    #458: fixed value of "other" stats gauge being off
    #459: pie gauge brush too large on low density devices
    #460: add setting to disable system app presence (for XPosed module users)
    #461: added setting (display section) to use "old" bar gauge instead of "new" pie

    1.16.0.0_B5
    #452: update to Dashclock API 2.0
    #453: fixed "current" reference not getting updated when BBS is called from tasker
    #454: fixed network stats "lo" not matched to "Mobile"
    #455: merged a few UI changes from the upcoming 2.0 branch
    #456: fixed: when only one reference spinner is shown avoid Toast message
    1.16.0.0_B4
    #426: added occurences per minute/hours in alarms on screen and dumpfile
    #450: fix for memory leak
    #451: revert from JSON the Java serialization of references for better performance (references will be deleted after installation)

    1.16.0.0_B3
    #448: if root is available offer full featured alarms using dumpsys
    #449 avoid flushing cache, imporving performance

    1.16.0.0_B2
    #447: system app has wrong signature

    1.16.0.0_B1
    #427: optimize the root calls for dumpsys if system app installed
    #429: replace java serialization of references with a more flexible JSON serialization
    #435: avoid crashing when appops not available (4.4.2+)
    #437: better resetting of screen counters for non rooted 4.4+ devices
    #439: dumpfile chapters comments reflect need for root
    #440: better support for root (does not require to be enabled in advanced prefs anymore)
    #441: offer to install as system app on 4.4+ is root available
    #443: alarm does not require root anymore
    #446: watchdog notification should never report more than 100%


    1.15.0.0
    Same as RC8 except the release notes

    1.15.0.0_RC8
    #432: make sure to ask for su rights right after enabling root features
    #433: hint that the system app should be uninstalled before uninstalling BBS

    1.15.0.0_RC7
    #430: better fix for blocking root access
    #431: fix for install as system app when package comes from gplay
    A few changes in the popup for kitkat user at first run
    Bump in version number causes references to be deleted at first run

    1.15.0.0_RC6
    #430: fixed blocking call if trying to install as system app without having root features enabled

    1.15.0.0_RC5
    #428: force mediascanner after saving files
    Recreated icons in all densities

    1.15.0.0_RC4
    #421: Another attempt to fix the xxxhdpi icon
    #426: fied missing process stats on kitkat
    Fixed other stats not refreshing properly on kitkat

    1.15.0.0_RC3
    Fixed the way we manage system apps

    1.15.0.0_RC2
    Sharpened xxxhdpi icon
    Added the ability to install BBS as system app (requires root, usefull only for kitkat right now)

    1.15.0.0_RC1
    #424: add proper (error) messages to notify about features not available without root on kitkat.
    Add timing of screen on time when no stats can be retrieved

    1.15.0.0_B6
    #421: added xxhdpi assets
    #423: fixed alarms parsing on 4.3+

    1.15.0.0_B5
    #422: fixed account info obfuscation for new account format coming with kitkat

    1.15.0.0_B4
    #418: re-add process stats to kitkat
    Fix for potentially missed partial wakelocks where uid could not be found

    1.15.0.0_B3
    #419: Package info and icons re-added to kitkat partial wakelocks
    #420: fixe from gplay creashreports
    Added hires icon

    1.15.0.0_B2
    #416: readded missing other stats (kitkat)
    #417: fix for duplicate partial wakelocks

    1.15.0.0_B1
    #414: Fixed error at launch (service not available for kitkat)
    #415: re-added partial wakelocks and very basic other stats (deep sleep only) to kitkat (requires root)

    1.14.0.0
    Updated libs

    1.14.0.0RC1
    #404: Fixed text padding for short time strings
    #407: added app ops for 4.3+ users

    1.14.0.0B2
    #401: added ACCESS_SUPERUSER to manifest permissions
    #402: wrong values in wakelocks with hashed account info caused by hash being applied multiple times

    1.14.0.0B1
    #355: implement a permanent su shell to execute all commands
    Various fixes from gplay crash reports

    1.13.4.0
    Same as B2, no changes

    1.13.4.0B2
    #391 support all implementations of sqlite

    1.13.4.0B1
    Refactoring of database access to avoid locking

    1.13.3.0
    Fix for users having FCs due to database lock problem
    1.13.2.0
    Fix for users having FCs at start

    1.13.0.0
    Unchanged from RC2

    1.13.0.0RC2
    #384: salted the account name before hashing
    Fix for stats not reflecting the combo boxes anymore for some users after a reference refresh

    1.13.0.0RC1
    Fix to make sure spinners do not get out of sync
    #383: Fixed battery / voltage level in dumpfile
    A few typos
    Added timestamp to logcat

    1.13.0.0B5
    #191, #334: Added "share" option for saving/sharing dumpfiles, dmesg and logcat
    #381: fixed database exception occuring sometimes and potentially responsible for the blank stats happening from time to time for some users
    #382: dmesg requires root for newer kernels

    1.13.0.0B4
    Added some logging to debug percentage problem: adb logcat | grep StatsAdapter
    #377: refactored KB handling
    #379: refactored "raw" stats
    Stats row shows interactive areas (glow)


    1.13.0.0B3
    #236: mask account info
    #378: fixed fallback stat in DashClock widget

    1.13.0.0B2
    #376: no icon in process view
    #377: missing KB icon

    1.13.0.0B1
    #367: added dashclock support
    #375: added JSON dumpfile format support

    1.12.4.0
    #372: Widgets do not update on a fresh install
    #373: change default widget fallbacl to "boot"
    #374: refresh spinners and user refresh causes the cache of refs to get flushed/reloaded from data

    1.12.3.0
    #369: small widget uses wrong prefs
    #370: Other stat times/total time incorrect

    1.12.2.0
    #366: fixed FC when creating a dumpfiel from tasker
    Improved logging
    Fixed concurrency problems potentially leading to weird display
    Fixed a caching issue

    1.12.1.0
    Fix migration issues from 1.11 leading to inconsistent stats
    #359: make sure BatteryInfoUnavailableException does not other stats to be shown
    #361: a better fix for battery/voltage using current instead of "to" stat
    #363, #364, #365: fixed different error conditions from crash reports

    1.12.0.2
    Skipped 1.12.0.1
    #356: bug when migrating from 1.11
    #357: to battery % always shows current value

    1.12
    Same as RC12, no changes

    1.12RC12
    #356: fixed empty stats after screen being rotated

    1.12RC11
    #223: active monitoring
    #346: save 'unplugged' ref at first use to avoid empty refs
    #347: pref to diable widgets to be refreshed at screen on
    #344: better fix for errors in parsing network/alarms causing the whole reference to be saved empty

    1.12RC10
    #302: added credits for used libs in app besides git (under help)
    #342, #345: remove log verbosity when debug advanced pref is not enabled for cleaner logcats
    #343: fixed alarms parsing of details for flg= and cmp= (both pre- and post 4.2.2)
    #344: error in parsing network stats causes the reference to be saved empty (potentially a cause of reference shown as not having been created)

    1.12RC9
    #323: pref for saving dumpfile to private storage
    #337: implement 48dp rhythm
    #338: optimize list real estate
    #339 (partially): fixed tiny font for widget being same as small

    1.12RC8
    #341: fixed alarms for android 4.2.2

    1.12RC7
    #327: spinner refresh issues
    #331: sometimes the stats shown do not reflect the spinner selection
    #333: charged and unplugged should not be in the "to" spinner as that makes no sense

    1.12RC6
    #307, #328; widget stops updating and stays blank
    #327: spinner refresh issues
    #329: fallback ref in 1x1 widget is never loaded
    #330: an attempt to fix wakelock issue when su commands are blocked

    1.12RC5
    #326: fixed rate dialog showing at each start
    Some profining
    Less intrusive logging if dedug is disabled in prefs

    1.12RC4
    New readme and rate dialogs
    #325: times in wakeup_sources are a factory 1000 to small

    1.12RC3
    #321: fixed spinner heights
    #322: filter "0" cpu states
    #324: add marker to dumfile if using wakeup_sources

    1.12RC2
    #320: added experimental support for wakeup_sources (newer kernels deprecate /proc/wakelocks)

    1.12RC1
    #318: automatically refresh current when entering the main screen (can be changed in adv. prefs)
    #319: "to ref" is shown by default (can be changed in adv. prefs)

    1.12B9
    #316: FC when calling BBS from watchdog notification
    #317: 2x2 widget showing 0 KWL/PWL

    1.12B8
    #312: Fixed negative CPU percentages
    #313: refresh after events creating new references show inconsistent references (from/to)
    #314: proper migration of default stat type prefs coming from 1.11
    #315: fixed cause of "unknown error"

    1.12B7
    #310: fixed partial and kernel wakelocks always being the same and icons missing
    #311: fixed kb reader thread not retriieving online content

    1.12B6
    Changed the way su operations are processed
    Some fixes regarding the refresh of the spinners
    Make sure all root operations are running in an own thread

    1.12B5
    #308: since boot can not be selected
    Fixed callstack when updating a reference
    Widget now have a lightweight method for obtaining the current data without causing the cache to be updated
    Spinners show references sorted in ascending order
    Fixed spinner not showing all existing references

    1.12B4
    #306: fixed broken dumpfile
    Added pref to show/hide the "reference to" spinner
    Added screen on reference (saved when watchdog is active)
    References are now stored in a database
    From/To references are chronogical
    1.12B3
    #303: invalidate "current" when other refs are saved
    #305: dissapearing refs

    1.12B2
    Some tuning
    #298: Fixed FC on raw alarms
    #299: Watchdog does not report when awake > threshold
    #300: fixed spinner height

    1.12B1
    #187: freeze current time
    #193: add screen brightness states to "other" stats
    #274: copy wakelock to clipboard
    #279: add option to save dmesg
    #286: add mV/h to dumpfile
    #290, 292: typo, wording
    #296: kbreader is now asynchronous and doesn't block UI thread when github is slow

    1.11
    no change from RC8

    1.11RC8
    #289: FC on package info screen for pre-ICS devices

    1.11RC7
    #288: usability issue in permission view fixed

    1.11RC6
    #276: another attempt at fixing scheduled dumpfile creation from tasker
    #287: fixed ratio calculation for battery drain in %/h

    1.11RC5
    #280: added legend to permissions tab
    #283: unticking watchdog option "Screen off" stops the EventHandler service
    #284: added drain per hour to battery drain text on screen and dumpfile

    1.11RC4
    #281: Fixed bad reference on unplug when 100% charged
    #276: fixed dumpfile creation from tasker
    removed delimiter till a configurable version can be provided

    1.11RC3
    A better fix for widgets being updated
    Nicer implementation of package info using a tabbed pager (using ActionBarSherlock)
    Changed in-app help and messages to make the conect of references clearer
    More speaking "missing ref" texts

    1.11RC2
    #277: more prominent delimiter in listview
    fixed calculation of since value

    1.11RC1
    #229: show autorun and other package info like permissions and services, click on the icons
    #279: reverted the time reference for since and calculations back to 1.9.x
    #275: widgets do not always refresh: hack to make sure the widget always get the broadcasts from the launcher, even if the lancher is not complying with standards (see http://stackoverflow.com/questions/7390449/widget-notification-when-homescreen-app-is-restarted)
    yet another attempt to fix since screen off dump incomplete when created at wakeup from taker plugin
    big refactoring (only relevant for the ones reading the code)
    1.10.5
    No changes from RC1

    1.10.5RC1
    Make sure app is not installed to SD (watchdog, widgets, detecting boot and unplug won't work properly)
    Writing references respect "root features" settings
    Fixed error condition in widget (potentially not showing data)
    Refactored broadcast handlers
    Another attempt to fix dumpfile creation in tasker plugin

    1.10.4
    Fixed logcat permission

    1.10.3
    Some changes in widget code
    #270: added option to save logcat from app

    1.10.2
    #263: adv prefs to turn on stats while plugged
    #264: error happening when reading other stats should not skip the whole stats
    #265: reference summary shows data instead of counts (in dumpfile and log)
    #266: difference in "since" time between widget and screen
    #268: error when checking charger status causes exception

    1.10.1
    #261: missing cpu states file causes references to stay empty
    #262: battery level handling causes exception

    1.10
    A few changes in logging
    New ?????

    1.10RC3
    #257: referencea are missing processes
    #258: if debug pref is not checked since shows 0s

    1.10RC2
    #256: silent crash on progress dialog
    #252: a better fix for the FC on enabling root features
    Typo in prefs
    Added drain to on screen battery info

    1.10RC1
    #251: added batter level from/to to screen (and a pref to enable/disable it)
    #252: an attempt to fix the FC on enabling root features
    #254: incomplete (ref missing) dump from tasker
    #255: not systematic crash on creating custom ref

    1.10b7
    #248: added raw CPU states
    #249: ratio of other stats is calculated against something that is smaller than "since"
    #250: when a reference is null all stats should show that there is no reference availble

    1.10b6
    #247: fixed deep sleep sometimes being substracted twice, causing negative values

    1.10b5
    #245: source of "since" is now the reference
    #246: added battery voltage/level from/to to dumpfile
    Removed unneeded API calls (that were to cause to batteryinfo stopping)
    New error handling exposes API errors to the user

    1.10b4
    #243: deep sleep not showing
    #244: no stats when plugged (as some internal registers do not count when plugged, leading to inconsistencies)
    Removed pre-1.9 migration code that may lead refs to be deleted at start
    #235: grey background for bars


    1.10b3
    #234: show icon for stats providing package info
    #8: call application settings when package info is available (click on icon)
    Refactored error handling
    Workaround to avoid SuperUser to obcess about asking for rights

    1.10b2
    #240: removed "test" menu
    #241: fixed nested menu causing FC on SDK<14
    #242: removed froyo specific references as BBS is not depending on Android's implementation of refs anymore

    1.10b1
    #209: added since boot ref
    #227: fallback to since boot if default stat type is not available
    #228: pref to control log level
    #230: two step save of references to avoid empty references if su request times out
    #231, #232: reorganized preferences
    #233: reorganized menu
    #238: process Siyah "deleted: " kernel wakelocks properly
    #239: network stats / alarms are disabled by default, can be turned on in advanced prefs
    1.9.2.1
    #226: reference info to dumpfile

    1.9.2 (|xda only)
    Fixed error condition where "no ref since charged" appeared after a while when a reference was present
    #224: screen on time is too high in "since screen off"

    1.9.1 (@xda only)
    Added more logging to references
    #213: Tasker plugin does not create dumpfiles / custom refs
    #216: more compact CPU state view
    #218, 220, 221: various fixes from Google Play logs



    I maintain A list of features to be implemented and bugs here.

    Below you can find older releases.

    If not required I do not recommend using these as they are not up-to-date with the most current development, features and fixes.
    764
    How-to and FAQ

    How-to
    I have created a GitHub project for the Knowledge Base where the online and in-app help will be maintained as well. You can find the information here:

    The online help: https://better.asksven.io/betterbatterystats/help/
    The how-to: https://better.asksven.io/betterbatterystats/how-to/

    A good how-to by Chris Hoffman published by How-to geek

    Online Hilfe auf Deutsch: http://asksven.github.com/BetterBatteryStats-Knowledge-Base/help_de.html
    How-To auf Deutsch: http://asksven.github.com/BetterBatteryStats-Knowledge-Base/howto_de.html

    The repo: https://github.com/asksven/BetterBatteryStats-Knowledge-Base
    The Knowledge Base Project: http://asksven.github.com/BetterBatteryStats-Knowledge-Base/

    FAQ
    1. Q:Will BBS be fixed to support Kitkat (I get "Services could not be contacted" errors?
    A: Kitkat is supported by BBS starting from version 1.15

    2. Q:Why are partial statitics not available on Kikat?
    A: If you have a rooted phone enable the advanced root features and all will be fine. If you have no root unfortunately you are stuck without Partial Wakelocks as Google has made changes to prevent apps to access that data (see also here)

    3. Q:Why installing BBS as a system app as everything works with root?
    Deprecated: BBS does not require the system app anymore
    A: Starting with Kikat BBS has 3 modes: without root a limited mode provides a minimal set of stats. With root the set of stats is complete but some stats (other, partial wakelocks, processes) still use a workaround. Finally with the system app BBS is fully featured without any workaround.

    4. Q:I have high wlan_rx kernel wakelock. What is it and how to proceed?
    A: This kernel wakelock is caused by Wifi waking up your device. To avoid it you should turn your Wifi off if not using it, use a tool to control your Wifi state or try to find and remove the cause. More here

    5. Q: Google Maps is causing a lot of overhead. Must I freeze it?
    A: no, Karpfenhai wrote step-by-step instructions on how to configure autostarts and the location service to avoid that

    6. Q: Are you aware of the bug in BBS causing SuperUser to ask for su-permissions over and over again
    A: As you said, SuperUser is asking over and over again, it's no BBS bug as BBS only requests su rights. More here

    7. Q: BBS shows "no ref since unplugged"
    A: Starting from 1.9 is is mandatory to plug/unplug after boot to get a "since unplugged" reference to be created. Starting from 1.10 there is anew reference "since boot" and a preference to fall back to that reference if no other is available.

    8. Q: Why can't you just skip deleting the references at boot?
    A: If I could I would. In a nutshell: BBS is a passive monitoring tool; this means it does not cause any overhead collecting data but compares snapshots. Now the disadvantage of this is that it makes no sense to compare values of counters between two references (e.g. "since unplugged" and "current") if the counters were reset in between. In fact that would potentially cause negative values, in every case wrong values.

    9. Q: But is used to work before. Why did you change it?
    A: It didn't work, you just didn't notice. The kernel and Android reset their counters at boot. That means that there is no way to compare counters from before the boot with counters from after.


    10. Q: What do the widget colors / graphics mean?
    A (new round widgets): the legend is displayed if you resize the widget
    A (legacy widgets): For the large widget it's pretty simple. The colors represent the values "Since" (blue), "Deep sleep" (green), "Awake" (yellow), "Screen on" (white), "Kernel wakelocks" (magenta), "Partial wakelocks" (cyan). The 100% is the max of those values.
    For the small widget see here

    11. Q: Where are the dumpfile and logcat saved / how are the files named?
    A: Both files are saved to /sdcard, their names are BetterBatteryStats-.txt and logcat-.txt where timestamp is of the format "yyyy-MM-dd_HHmmssSSS" (starting from 1.12 there is an option in advanced prefs to save those files to the private directory /sdcard/Android/com.asksven.betterbatterystats/files).

    12. Q: Are you aware of the fact that BBS does not work properly for secondary users (Android 4.2)?
    A: BBS works fine for secondary users as long as you don't enable root features. The reason is not BBS but the lack of support of the multiuser feature in the superuser/supersu version you are using.

    13. Q: What is *overflow*?
    *overflow* is a sign that one stat counter was overrun. This may happen if you have not boote your phone since long or if some wakeup/wakelock is very frequent. The only way to see what is hidden behind *overflow* is to reboot and take a fresh reading.

    14. Q: Why is 'screen off' reference not being created?
    A: You have to enable the watchdog for that reference to be created

    15. Q: Even after plugging/unplugging my phone no reference except 'boot' is shown
    A: something is preventing the unplug event to be passed to BBS. You should check for tools like greenify or stamina mode that mask such events and make sure that BBS is whitelisted. On newer Android versions please also make sure that BBS is not "optimized" by Android, under "Settings - Battery Optimization"

    16. Q: What is the watchdog and how does it work?
    A: The wachdog is a feature to help you in analysing when happens when screen is off. When the watchdog is turned on a reference 'screen off' is created. You can also configure the watchdog to create a reference 'screen on'. Opionally the watchdog will notify you when screen is turned on and the awake ratio was bigger that the configured threshold. In order to avoid too much overhead in processing a threshold can be set to disable the computing for short screen off times.

    17. Q: my logcat is empty and says "Unable to open log device '/dev/log/main': No such file or directory"
    A: Check if you have a custom kernel that turns off logging. If not some file permissions may be broken: use the repair permissions function from your recovery

    18. Q: How can I get rid of GSF wakelocks
    A: GSF (google service framework) can not be avoided and in no case it should be frozen. Here are some settings that can help reducing the overhead.

    19. Q: The other stat is wrong. It shows "No data connection" and "No or unknown signal" while was online with Wifi all the time
    A: "No data connection" and "No or unknown signal" refer to your cell data (2G/3G) service. As you have had Wifi on for some time the cell data was turned off, consistent to what the stats say: work as designed

    20. Q: I can not install BBS as a system app. What can I do.
    A: BBS does not require the system app anymore
    A: If you are on a version older than 4.4 you don't need to install BBS as a system app. If you are on 4.4+ you should first try the in app installer. If for some reason it fails you can use the CWM scripts attached to install / uninstall BBS as a system app

    21. Q: I am suffering from a high NLPWakelock time. Is there something I can do about it?
    A: Here's a good summary of what NLP is and how it can be positively impacted (thanks to @Perseus71)


    22. Q: On CM12 based ROMs the launcher crashes when placing a widget. When will this be fixed?
    A: I can not find anything wrong with BBS code and the crash occurs in the launcher, not in BBS. After spending quite some time trying to understand the problem I must conclude that the problem is with CM12 (other ROMs on Lollipop do not have this problem)

    23. Q: I can not or do not want to root my devices but would like to use BBS to gain insight. Can this be done?
    A: The answer used to be "no" but this has now changed. See post #4 for a detailed description on how to proceed.

    24. Q: I can not get BBS to work. How should I proceed to find out the cause
    BBS has no dependency to any root-tool and does not require root to work, it only requires specific permissions that can be granted by:
    - using ADB as described in the FAQ
    - letting the app grant itself the permission if root is available

    25. Q: BBS Shows a permanent notification. Can I remove it?
    The notification is due to the android app model having changed and now requiring apps that run in the background to show themselves. I have put the "background app" notification into a separate channel named "BBS Event Processing" so you can disable it if it bugs you: no other vital notification will be send to that channel

    26. Q: What is this popup saying "Detected problems with API compatibility"?
    For Android 9.0 Pie users getting the "Detected problems with API compatibility (visit g.co/dev/appcompat for more info)" popup error please see this post.

    When diagnosing / analysing there are a few important things to know:
    - the app (advanced settings) shows you whether the permissions were granted or not
    - when checking if any acition had a positive result you should always use raw stats as the default view does a diff between two snapshots, i.e. if one snapshot is missing it may show no results
    - logcat may give you some info about what is going wrong, e.g. the app not being able to contact the battery_info service
    414
    Ref, Hints and blacklist

    Litterature
    Article from the Android PDK about Power Management: http://www.netmite.com/android/mydr...s/power_management.html#androidPowerWakeLocks

    Other useful tools
    The default battery usage (Gingerbread): Settings -> About Phone -> Battery Usage
    The most interesting data is shown when clicking on the graph (bars below the graph). Unjustified "awake" times when display is off is an indicator for rogue apps doing stuff in the background when you think your phone is asleep
    Battery Monitor Widget
    Has a great stat on battery drain over time. I use this tool regularly after leaving my phone alone for 1/2 hour to check how the battery drain looks like against my benchmark of 2-10 mAh average (optimal for my SGS2).

    [android backup service]
    (http://code.google.com/android/backup/index.html). It is a service that offers cloud backup/restore of your settings and offers an API for other apps to do the same (http://developer.android.com/guide/t...ta/backup.html).
    You can turn it off (but will lose the automatic backup) under Setting -> Privacy ->Back up my data.
    Backups are useful though but no need to do it in the cloud, I'd recommend scheduling a regular backup using titanium instead (that's my setting).

    [DataTracker-FD] is fast dormancy. Find the 'secret' codes for your device to turn FD off. *#*#9900#*#* on an SGSII. (contrib. by nobnut)

    [syncmanagerhandlesyncalarm] That service is documented here (http://www.kiwidoc.com/java/l/x/andr.../c/SyncManager) and is responsible for updating the accounts you have under Settings -> Accounts and Sync. High values may come from bad settings (sync too often, huge amounts of data) or poorly written providers.


    [reserved for misbehaving apps]
    166
    You you mind writing all that together (location settings, autostart settings) in one post. I'd like to add that to the FAQ

    I hope i don't forget a thing:D

    -------- -------- -------- -------- --------

    Silencing maps (preventing non user caused wakelocks)

    1. Sign out and /or freeze latitude.
    2. Disable all location based services:

    5dd9f5f8-058d-cb69.jpg


    3. Deny all maps related autostarts using a certain app like Gemini app manager or autostarts from playstore:

    5dd9f5f8-05f9-887c.jpg

    5dd9f5f8-069c-d35f.jpg

    5dd9f5f8-06ab-a78a.jpg


    That's it!

    Additional information:

    -manual startup of maps will work anyhow, don't worry,
    -navigation still works
    -toggling gps on will show your current position on the map.

    If you do it right, your alarm after almost 2 days can look like this:

    5dd9f5f8-07e7-2c11.jpg
    5dd9f5f8-07f5-c526.jpg


    As you can see, maps does not exist!

    Hint: preventing all autostarts from maps should be enough, you probably don't need to get rid of the other stuff, try to start from point 3 in the beginning.
    -------- -------- -------- -------- --------

    Okay with this Sven?

    Tapatalked from my Samsung GT9100