yashsingh1/xdaforums huggingface dataset:
[BetterBatteryStats] CounterC:
Is there a way to continue results after a reboot?

The app always resets the results
[BetterBatteryStats] yukkio:
Partial wake locks are reset after screen off with stock rooted and elementalx kernel.
[BetterBatteryStats] WettbackMartyr:
I can confirm this as well. Stock Nexus 5 Lollipop official release (installed clean with factory images) and root. Does not report wakelocks over the course of a charge cycle. Resets to zero when screen is turned off.

https://copy.com/0HzycoshyXGisQMy
[BetterBatteryStats] trawel:
I can't view kernel wake locks on b3, I get that message (stock rooted lollipop with code blue 620)
[BetterBatteryStats] Karpfenhai:
Nope it's not, it works as designed from Google (counter reset on reboot)

Afaik that's also written in the faq.

Not sure about this but might be related to my answer below.

It's written a few pages back...

You need to change your selinux settings to permissive..

chamonix is aware of the situation and had accounced to implement a workaround avoiding the issue.

Please follow the xda rules for searching next time and do not ask for ETA.

[emoji106] [emoji2] regards.
[BetterBatteryStats] chamonix:
yes
[BetterBatteryStats] chamonix:
The infinity/min fix is in b4 so it's normal that you have the error as it was reported in b3.

Your settings screen is borked. I can't reproduce that on a stock android (neither 4 nor 5).
[BetterBatteryStats] yukkio:
Sorry but getenforce shows permisive.

Br
[BetterBatteryStats] chamonix:
betas: no

release candidates: yes
[BetterBatteryStats] chamonix:
sec-battery-monitor is called avery time your device wakes up. It's a symptom, the cause will be in the wake-ups aka alarms
[BetterBatteryStats] chamonix:
Interesting observation. I will do some testing. Hopefully that is a bug in BBS and not in Android. The first I will be able to fix, the latter not
[BetterBatteryStats] BigLisy:
But like, during a night my total sum of partial and kernel wakelocks is around 1 min (2 min being generous), yet sec-battery-monitor can be anywhere between 30 min and 1h.
[BetterBatteryStats] Scartozzi:
since i've updated my nexus 5 to lollipop i cannot see my kernel wakelocks and partial wakelocks anymore
[BetterBatteryStats] Colnart:
i have the same problem on galaxy note 4 stock rooted
[BetterBatteryStats] gaich:
I had the same problem testing Lollipop ROM, until I deleted everything related to BBS from \data\apps and \system\priv-apps, rebooted and placed the whole betterbatterystats apk to the folder "BBS" I created at \system\priv-apps manually, set rw-r-r permissions for the apk and rwxr-xr-x for the folder. After the reboot I had all kinds of stats present.
[BetterBatteryStats] yukkio:
Done but still not working.
[BetterBatteryStats] GTMoraes:
Thanks, this did the trick to me.
[BetterBatteryStats] dimm0k:
Was b4 released and the OP with the download links not updated yet? I have the infinity/min issue as well...
[BetterBatteryStats] qwerty22:
Intent: {com.drweb/o.ᓱ}

BetterBatteryStats version: 2.0.0.0B3 & antivirus Dr.Web

Dump:

com.drweb (): Wakeups: 2 (0,2 / hr.)
Alarms: 2, Intent: {com.drweb/o.ᓱ}
Alarms: 0, Intent: {com.drweb/com.drweb.antivirus.lib.monitor.MonitorService}

{com.drweb/o.ᓱ} - parsing error?
[BetterBatteryStats] chamonix:
could you please send me a 'dumpsys alarm' showing the data being parsed?
[BetterBatteryStats] Daimonion1980:
chamonix

What do you think, is it possible to make use of the batterystats which can be collect via the project Volta Tool historian?

https://github.com/google/battery-historian
[BetterBatteryStats] relevant_placeholder:
[MENTION=1330150]chamonix[/MENTION], pardon my ignorance but when does the lollipop updated BBS hit the play store?
[BetterBatteryStats] qwerty22:
Alarm Stats:
com.drweb +50ms running, 3 wakeups:
+49ms 2 wakes 2 alarms: cmp={com.drweb/o.ᓱ}
+14ms 1 wakes 1 alarms: cmp={com.drweb/com.drweb.antivirus.lib.monitor.MonitorService}

No error BBS parsing :good:
[BetterBatteryStats] xI mEzMeRiZe Ix:
Ever since flashing the Lollipop factory image on my 2013 Nexus 7, I have been getting a lot of idle drain from Android OS. I got around to rooting after dealing with bad battery life for a few days, and BBS is telling me that this is due to a kernel wakelock called "sns_async_ev_wakelock". I have never seen this before on any device, and have no clue how to fix it. Anyone know what's up? Dump file is attached.

Also, nothing shows up in the "Alarms" section. Is there something special I need to do to fix this?

Thanks.
[BetterBatteryStats] qwerty22:
Up to BetterBatteryStats version 2.0.0.0B3.
[BetterBatteryStats] bthere79:
has anyone successfully installed this in lollipop? I'm completely unable to touch the system folder using file explorers etc. can anyone help?

http://xdaforums.com/android/help/help-change-folder-t2942595

many thanks
[BetterBatteryStats] chamonix:
It's on my list
[BetterBatteryStats] chamonix:
2.0B4 is up.

People asking for an ETA: you are lucky that I didn't hold this version just because you asked but I didn't want to spoil the regular users/helpers. Shame on you though :p

Hope you like the UI corrections, german users, please excuse the possibly bad translations, I just needed a language to start testing I18N

Enjoy!
[BetterBatteryStats] chamonix:
What's wrong with the in-app installer? worked fine on N7 preview and N9 final here
[BetterBatteryStats] bthere79:
kept failing everytime I tried, so I tried manually but as I said the system folder is read only, I don't know what to do... :(

if it works for your then it's something with my device not something affecting lollipop in general like someone suggested in the other thread?
[BetterBatteryStats] chamonix:
Would you mind posting a logcat showing the system app install. This would help me pinning the problem and potentially providing a solution for others
[BetterBatteryStats] bthere79:
does the attached help? this is basically when I tap on "install as system app" and fails, right?
[BetterBatteryStats] gerpc:
It didn't work for me either, :(
[BetterBatteryStats] rignfool:
2 interesting layout bugs...

Display twice... And it cuts off the Advanced sub-menu selection..
[BetterBatteryStats] norml:
#519: re-add battery from/to % to screen (optional)

Thanks for re-adding this in B4.
[BetterBatteryStats] chamonix:
thanks for the feedback. About the kernel wakelocks I will need to tweak my device. I thought accessing the file with 'su cat' would be enough but obviously it doesn't work or the detection is buggy.
[BetterBatteryStats] Rapper_skull:
On Lollipop they changed the directory structure. Apps are not installed directly in /system/app but in their own folder. For example BetterBatteryStats should be installed in /system/priv-app/BetterBatteryStats/BetterBatteryStats.apk
[BetterBatteryStats] :
Still in b4 with Oneplus One
[BetterBatteryStats] chamonix:
Can you provide a document or source code confirming that?

Btw /system/app ist not the right directory since 4.4
[BetterBatteryStats] chamonix:
You may have noticed that there was no report of that having been fixed in the changelog. There is no issue for this as a it does not seem to be reproducible on any of the devices having received L from an official source. I consider this as a bug in the custom rom, please feel free to persuade me of the contrary
[BetterBatteryStats] Rapper_skull:
You can see that in factory images. Also SuperSU installs in /system/app/SuperSU/SuperSU.apk
[BetterBatteryStats] Rapper_skull:
I can't add an image while editing the post. Here is a screenshot.
[BetterBatteryStats] mag01:
Yes he's right, In 5.0 system apps are installed in /system/app/app-directory/app.apk or similarly in /system/priv-app/app-directory/app.apk with app-directory permissions being 755 (rwxr-xr-x) and app.apk permissions being 644 (-rw-r--r--) (owner:group is root:root).

I think there's some a backward compatibility though, because I didn't check this initially and still with BBS apk right in /system/priv-app it gets the required BATTERY_STATS permissions and is able to obtain the data (except kernel wakelocks due to SELinux).

And moving the system apk to its own directory there didn't make any difference at all. I suppose moving the main apk here would do it, because then the main app would be launched with different policy set in effect, but I'm not going to install the whole main apk as system app.

And if you don't want to do it that way, then getting those stats via su --context ... will still be the way to go.

Or you may try to effectively use that system app. I mean don't use it just as a dummy placeholder app in order to obtain those BATTERY_STATS permissions etc, but use it as helper app to obtain the data you can't get directly from the main app. But that could be quite ineffective (performance, resource utilization).

EDIT: So I tried completely removing the BBS and then putting its main apk to /system/priv-app location, however though the apk gets properly labeled as system file (u:object_r:system_file:s0), its process still runs in the untrusted app context (u:r:untrusted_app:s0) and there's of course no difference in getting the kernel wakelock data. So there's something more to launching the process of system apk in the platform_app or system_app context and it would probably require digging into the AOSP sources to find that out.
[BetterBatteryStats] gaich:
[MENTION=1330150]chamonix[/MENTION], could you send me the strings and changelog before releasing next version, if possible, - I`ll give you back Russian strings to test...

These are for B4: View attachment translation_ru.zip

By the way, string 22 in preferences.xml is <PreferenceCategory android:title="pref_section_settings">, I think it should be <PreferenceCategory android:title= [MENTION=936943]string[/MENTION]/pref_section_settings"> to be displayed properly in widget settings. And string 36 wasn`t changed to [MENTION=936943]string[/MENTION]/pref_category_widget_1x1, as I suppose you wanted. :cyclops:
[BetterBatteryStats] chamonix:
thanks for your hard work! As you have seen I started pushing to github since yesterday. Could you submit pull requests so that I can merge with proper credits or would that be too cumbersome?
[BetterBatteryStats] Rapper_skull:
I have ridiculous battery life and BetterBatteryStats show no signal for 99% of the time, but the signal was good.
[BetterBatteryStats] mag01:
Ok, I also added first attempt of Czech translation, pull request 535. Let's see how it will appear in the app itself.

Few little things found during translating:

1. With multiple language variants available it would be good to have an option to select the desired language manually. Default behavior would be unchanged (inherit from OS), but optionally user could override it. It can be "hidden" in the advanced settings.

2. Fixes of few minor glitches in English strings.xml (I didn't want to pull them with the Czech translation)

<string name="label_system_app">System App</string>
<string name="pref_auto_refresh_summary">Automatically refresh \'current\'</string>
<string name="pref_category_widgets_2x2_and_2x1">2x2 and 2x1 Widgets</string>

3. There are Toast messages in at least RawStatsActivity.java and StatsActivity.java that aren't prepared for localization yet.

Also one more graphical glitch related to themes - when I launch the BBS for the 1st time (basically with cleared application data), it starts with light theme applied. When I go to settings, almost all the text is white on the almost white background which is hardly readable.

- If I just go back from settings to main screen (and not change anything), the dark theme is suddenly applied (and then there's that other glitch that causes that it doesn't appear well because both light and dark themes are mixed together untill the app relaunch).

- If I don't go back and instead open the Switch themes option, I can see the dark theme is selected though the app appears to use the light theme until this point. If I switch to the light theme then the view gets finally fixed.

That's at stock Android 5.0 (Nexus 5).
[BetterBatteryStats] gaich:
[MENTION=1330150]chamonix[/MENTION]

Sorry, did not notice you have pushed this to github! Pull requests made.

By the way, still cannot solve the puzzle of mysterious Android sync - tried even to freeze contactssync and calendarsync completely, no success, still 4 stable alarms from Android.

Of course, it isn`t the priority issue right now, just reminding you promised to find the instructions if possible, maybe if you get some free time one day... :D
[BetterBatteryStats] mdamaged:
SyncWakeLoop being there isn't exclusive to having google's stuff installed (chamonix posted about it here), it could be related to anything that has an account which syncs, that being said, the battery life posted at that link shows you have excellent life, it's not keeping the device awake, there's no issue, there's no puzzle. Enjoy the device.
[BetterBatteryStats] gaich:
Well, I am enjoying it, really, but there's a feeling Android' s preparing some plot against me, syncing something behind and giving me no chance to know what it is. Some conspiracy, maybe. Raise of machines...:)
[BetterBatteryStats] mdamaged:
If things doing data exchange behind your back truly a concern, you should probably shut off your phone service and internet. :silly:
[BetterBatteryStats] Colnart:
[MENTION=1330150]chamonix[/MENTION]: on note 4 stock rooted 4.4.4 i notice that kernel wakelock under Raw Stats does work while the main screen will get the "unknown error", so i think it might be a display bug ? Wakelock detector displayed the kernel wakelock just fine.
[BetterBatteryStats] winamp26:
How to set to show alarm c

& CPU states in 2.0.0.0b4?!

Sent from my Nexus 5
[BetterBatteryStats] gaich:
That`s not enough, disconnecting the battery should prevent the unauthorized activity, although the phone`s so smart that I suspect it can connect it back when I`m asleep...;)
[BetterBatteryStats] winamp26:
Can anyone help me?

Why no alarm an CPU states?
[BetterBatteryStats] AA1973:
[MENTION=1330150]chamonix[/MENTION]

Chainfire released a new SuperSU Beta 2.23 which might fix some issues with root apps and SELinux.

As I am running an L ROM in permissive mode, all tabs (except Kernel wakelocks, reason explained in #26555 by Chamonix, thx) show up with results at the moment. Will check Stock Android L in Enforcing mode later.

Download and message by chainfire here

https://plus.google.com/113517319477420052449/posts/jGoDoPPZUdT

Edit Screenshots attached, Nexus 5 Android LRX21O, stock, rooted.

SuperSU 2.23 beta, BBS 2.0.0.B4
[BetterBatteryStats] chamonix:
Thanks to [MENTION=4563466]gaich[/MENTION] and [MENTION=5543250]mag01[/MENTION] BBS will have Russian and Czeck in B5.

Guys you may want to re-check as I have externalized some more stuff. You still have at least until tomorrow since I have 10 more issues to fix
[BetterBatteryStats] chamonix:
Te reason is that other tools like Wakelock detector use the API to retrieve the kernel wakelocks while I prefer the access to the kernel files as these provide more info. Now due to the SELinux policies and some still ongoing changes in the root tools the access to these files is sometimes restricted so that BBS can't grab them. I am planning a fallback to the API for that case (https://github.com/asksven/BetterBatteryStats/issues/522)
[BetterBatteryStats] mag01:
[MENTION=1330150]chamonix[/MENTION]

1. SuperSU 2.23 beta - unfortunately no difference in ability to obtain Kernel Wakelock stats at Android 5.0 with Enforcing SELinux policy

2. I've got 2 things regarding Alarms:

2a. In certain conditions, Alarm stats seem to reset on screen off - similarly to how partial wakelocks did reset prior to 2.0.0.0B4. The reason might be related to the following point.

2b. Sometimes BBS displays Alarm stats like in the example below which seem to look quite strange:

- Filtered (default):

(nothing displayed)

- Non-Filtered:

android: -2

com.google.android.gms: -3

- Raw:

com.google.android.gms: 8

android: 4

And turning the screen off and back on seems to change this a lot - like if it was reset as described in my previous point.

Logs (covering the state shown above) attached, including 'dumpsys alarm' output taken under root with selinux context u:r:system_app:s0 (which was the only one that produced some results)

EDIT: Updated Czech translation, pull request 541. One string in strings.xml I'm currently unsure of is:

<string name="info_unknown_state">Error: could not resolve what changed</string>

I did translate it somehow, but I'm not really sure what exactly it's supposed to mean. Could you please just briefly clarify in which particular condition it's displayed?
[BetterBatteryStats] AA1973:
Thank you [MENTION=1330150]chamonix[/MENTION] for your time explaining the kernel wakelock part. Highly appreciated here ?
[BetterBatteryStats] yohanandz:
pretty useful app

helps me monitor my battery drain :)
[BetterBatteryStats] Quickfire:
I can't get any wake lock stats too. Running latest BBS. Stock android lollipop. Nexus 5. Rooted. It's the same with the Wakelock Detector app as well.
[BetterBatteryStats] marknoll:
Not only does syncloop sync accounts, it is also syncing services. Ie: Google play services and goggle android vending. An app out there called disable services can help. Give it a looksee
[BetterBatteryStats] gaich:
I`ve got myandroidtoolspro installed, it is more sofisticated app from the same developer.

That log was done with ALL recievers of GSF and GPS disabled . Did not touch vending, and did not touch services, but with this configuration I had this kind of alarms on my previous phone (Samsung Galaxy Nexus, running ICS, JB and KK) only when syncronization was on. That`s why I can make the conclusion these services have nothing to do with those alarms. I coud suppose it is LG, but LG Backup is frozen. I just want to know what is beeing synced, if everything is disabled.
[BetterBatteryStats] chamonix:
thanks for the update.

About the alarms: I found yet another change by Google to Constants (what do these guys think) leading to exactly what you have observed: will be fixed in b5

kerbel wakelocks: I have added an api mode to b5 and more logging to digg deeper. I can't reproduce as it works fine with su on my n9 using enforcing
[BetterBatteryStats] Perseus:
[MENTION=1330150]chamonix[/MENTION].

Not sure if this got reported. With the Beta 4, the Screen Dark Value is not reported correctly. It might appear that its same as Screen On time. At least in my example. Please see the attached log.
[BetterBatteryStats] Tunasty:
I'm just curious if there are any beta versions for lollipop builds? I've been trying to search here but Tapatalk search keep showing something else.

My current version (from play store) doesn't show kernel wakelocks or partial wakelocks.

-Tunasty
[BetterBatteryStats] rpr69:
I could have sworn I paid for this app long ago, but it turns out I hadn't, so I just did. Thanks for the hard work [MENTION=1330150]chamonix[/MENTION] !
[BetterBatteryStats] mdamaged:
Tapatalk is horrible. It was hiding, in the second post of this very thread.

http://xdaforums.com/showpost.php?p=15869886&postcount=2
[BetterBatteryStats] Xxirs:
This is probably one of the best apps to find out whats draining your bettery and why its draining your battery. Very user friendly and easy to understand :good:
[BetterBatteryStats] dr.wtf:
i'm getting eye and brain cancer from the google translated stuff. how can i switch back to english?
[BetterBatteryStats] dimm0k:
[MENTION=1330150]chamonix[/MENTION] B4 - "fixed infinite wakeups per hour in alarms"

looks like individual alarms still display infinite when you open each one...
[BetterBatteryStats] chamonix:
could you be a little more specific? what language, what translation? how about providing a correction?
[BetterBatteryStats] dr.wtf:
i'm sorry, since this is sort of a new problem to me i thought this would be known and that its caused by recent changes:

when i'm downloading or using this in germany or on german rom settings(dont know what it depends on) the whole app is in unbareably bad google translated-ish german. i'd like to turn it back to english.

i would have time to provide you a translation in one or two weeks. there are people having more time than me at the moment
[BetterBatteryStats] chamonix:
Works as designed: dumpsys alarm contains exactly that data (line 325 in the attached alarm.txt):

com.drweb +50ms running, 3 wakeups:
+49ms 2 wakes 2 alarms: cmp={com.drweb/o.ᓱ}
+14ms 1 wakes 1 alarms: cmp={com.drweb/com.drweb.antivirus.lib.monitor.MonitorService}
[BetterBatteryStats] chamonix:
The cause is right there is the log:

provider doesn't exist: network

too much tinkering?
[BetterBatteryStats] chamonix:
Well, I guess I will have to revisit my (non-google-translate) german translation then......
[BetterBatteryStats] Karpfenhai:
Ouch Sven it seems you need to improve your German skills then, maybe involving a native speaker would help? [emoji41]

I couldn't resist sorry... made my day..
[BetterBatteryStats] chamonix:
Yea, I guess I need to do that :cool:
[BetterBatteryStats] hotshotz:
Thank you for the suggestions.

I found out Beautiful Widgets was the culprit for triggering the alarm manager wake locks. Even though I had it set to never fresh except for manual, it kept triggering still not putting my phone in deep sleep.

The only factors I have running in background are backup syncs, google calender, google gmail, gps, and location services. Everything I thought of that could have impacted battery life with notifications on status bar I disabled or uninstalled.

Instead of my usual idle drain over night from 100 - 75%, I experienced only 7% drain in 8 hours on my CDMA galaxy nexus ! One strange thing is I noticed awake activity in the middle of the night for a period of time. I am assuming this is because the phone was trying to backup?

I didn't realize how bad some of these apps are at killing your battery. I will slowly add apps back and observe how much it will affect idle drain. Hoping lightflow won't impact it too bad because I miss my colored LED notifications.

Once again I am so happy with my findings. Thank you all for the help.
[BetterBatteryStats] CRXed:
For AlarmManager, look here : https://github.com/asksven/BetterBatteryStats-Knowledge-Base/wiki/AlarmManager

And yeah, Touchdown is your main problem now. Push is not always the best for battery. Try another sync option and do another log to see if that helps.

Also, other apps that are triggering the alarm are;

-com.google.android.gsf = Google Service Framework - Are you syncing anything with Google? Try to disable it or do a manual sync.

-net.rgruet.android.g3watchdog - Disable 3G Watchdog, it's a know battery drainer

-com.motorola.blur.service.blur - I don't know if you can disable this.....

-com.google.android.apps.maps - Know drainer, are you logged into Latitude?

-com.handcent.nextsms - Did you get a lot of sms?

-com.fsck.k9 - K9 - why are you using two mail apps?

---------- Post added at 06:44 PM ---------- Previous post was at 06:35 PM ----------

In the night, you only lose 5 procent, so that is not bad!

But your log was made after heave use of your phone, Since 2 d 13 h 42 m 53 s so we can not really tell what is going on.

-You played music for more than an hour

-Gmail is heavily used

-SportsTracker Pro was used

-Titanium backup

-Google Talk

etc.

So do another log after a night of sleep.
[BetterBatteryStats] bennon05:
Wow, thanks for the help. I stopped syncing a few things with google (contacts and calendar), uninstalled 3G watchdog, and signed out of latitude (though i don't remember signing in). I don't believe I got any text messages--maybe one or two--so that's a little fishy...any thoughts? Also, I use K9 for gmail and touchdown for work. Back when I got touchdown, I was really struggling to setup corporate sync when touchdown's active sync worked right away.
[BetterBatteryStats] Atticustrd:
Great tips in here. Got rid of auto killer memory optimizer and juice defender hopefully I see better battery.

How can I post my battery dump on here so you pros can take a look just in case Im missing something.