yashsingh1/xdaforums huggingface dataset:
[BetterBatteryStats] mag01:
1.15RC3 as system app

So RC3 installs/uninstalls as system app properly.

Initially after I installed it as system app it seemed to work and show all stats (root mode enabled), however later I ended up with partial stats again.

Often it shows most stats from Boot to Current points after the phone is started, then when cable is connected/disconnected and it switches to "Unplugged - Current" it starts to show only Deep Sleep for Other, and most other stats quite limited or rather not at all.

I've done several phone restart cycles, deleted BBS app data and then reconfigured it from scratch, but it behaves just like that.

debug logcat attached

By the way, I always have problems seeing the log files generated by BBS on PC when connecting via USB cable in MTP mode. I have to restart the phone in order to see the new ones. Could you please try to send each such file to the media scanner (via MediaScannerConnection.scanFile() ) after you save it? That should fix this issue. See for example here http://commonsware.com/blog/2013/11/06/android-4p4-permission-regressions.html (where also your BATTERY_STATS permissions fun is mentioned :D + http://stackoverflow.com/questions/4646913/android-how-to-use-mediascannerconnection-scanfile )

EDIT: Some more updates:

System App: Boot - Current (first run after phone starts) seems to mostly work except for Process that never work for BBS as system app

System App: Unplugged - Current (plug/unplug cable) works only partially (Other: Deep Sleep, Kernel Wakelock, Alarms, Network, CPU States

User App: Boot - Current is similar to System App, just Process work fine as well

User App: Unplugged - Current work fine too

Sometimes I get a glitch, after first BBS startup it refreshes several times, then ends up showing range Boot - Boot and always empty stats (regardless of how do I change from and to reference points). After exiting BBS (and ensuring the process isn't really running) and starting it again it usually starts operating properly.

The same trick (fully exit BBS GUI, start it again) can be used for BBS installed as system app when it doesn't want to show full stats in the range Unplugged - Current.

However Process stats never work for me when BBS is installed as system app.
[BetterBatteryStats] fndpena:
Hi folks.

Yesterday I had this partial wakelock (CacheUpdateService, from Google Play Services) that kept my phone awake for 2h.

I have no idea what it is, and never had it on my phone.

I ended up rebooting my phone and it didn't came back since then. Anybody know what it is?
[BetterBatteryStats] rignfool:
Not that I am a developer at all...

But might I suggest looking at intangibleobjects secure settings... In particular the implementation of the 'helper'...

He has 2 choices... Actually installing an apk to system... And granting the helper system privledges... It is an interesting concept to the uninitiated...
[BetterBatteryStats] chamonix:
I know secure settings and use it a lot. The helper (delegate) is different from what the bbs system app though: the app itself has no features at all but requests the permissions needed by the 'real' bbs app. The functional app sits on user storage but as it's the same package / signatures as the system app the permissions gets inherited. It took me a few hours to understand those mechanisms but they are powerful :)

Thanks for the testing and thorough reporting. I will try to reproduce these steps and see what goes wrong.

About processes : I noticed also that the old way using batterystats/batteryinfo is broken and I will have to read some code. As we just start discovering what Google changed to batterystats now that we have permissions I think that will not be hard to fix (that's the price to pay for using non public API). There has been changes is constants in the last minor releases by Google where eg the meaning of constants changed, I guess just to keep me busy :D

Edit:

About mediascanner: I am no specialist of that stuff but I thought media's canner was for pictures and media but I didn't know it affected MTP (I always thought that it was implemented without caching mechanism). I will do some testing.
[BetterBatteryStats] Perseus:
Can't help with your Greenify problems. You are better off posting them on Greenify's thread.

Based on both logs, its difficult to say. There's not much use of the phone. Only thing I can say is that, if you have bad Wireless and Signal issues then you might be better off turning on Airplane mode.
[BetterBatteryStats] mag01:
Yes that seems a little bit strange to me too, however based on everything I've found about this kind of issues it's really related to media scanner regardless of file type.

This is probably the primary bug https://code.google.com/p/android/issues/detail?id=38282 - still not resolved unfortunately.

If you find a better workaround then feel free to use that one instead.
[BetterBatteryStats] Perseus:
FWIW, I always freeze Media Storage App and then reboot. Its a one time thing after new Rom Flash. This seems to keep Mediascanner wakelocks at bay.

My usage is on 4.2 & 4.3 so can't speak to Kitkat.
[BetterBatteryStats] alexkno:
Was facing the same issue last night....but for 8hours with all networks (wifi and mobile) deactivated.

seems related to goolge services, but no idea where it comes from. Any ideas?

Btw: location and sync were off
[BetterBatteryStats] ksarius:
Guys. Supend_backoff is killing meeeee. Nothing on google besides deleting google chromo which o dont have it.

Any help?
[BetterBatteryStats] chamonix:
Please post a dumpfile and a dmesg. I suspend back off can be caused by drivers not behaving well during the power manager go-to-sleep sequence
[BetterBatteryStats] Perseus:
Google Play does that. If you are turning off all networks, make sure Google play isn't running in background.
[BetterBatteryStats] infinitecreators:
Better App to Check Battery Status
[BetterBatteryStats] shadyabhi:
Although I'm not a kernel/android developer, looking through the source suggests that it might be caused if there are too many wakeups being caused by something. It's something like backing off while doing a wakeup when there are way too many wakeups in very little amount of time.

PS: I may be completely wrong, feel free to correct.
[BetterBatteryStats] LucentBirch:
I'm on 4.3.1 and I keep getting a smscallservice wake lock keeping my phone awake for 15 minutes any ideas?
[BetterBatteryStats] fndpena:
Odd. That was the first time it happened to me. And I don't always take precautions to close Google Play before turning off connections.

BUT, that makes a lot of sense because I've used Google Play just before going to sleep yesterday (and I always disable connections).
[BetterBatteryStats] alexkno:
Thanks a lot! Although I never explcitly force closed play before switching it all off, I never faced it. But I remember that yesterday evening I was running some updates, so you are very likely correct. Will montor that some days. Thanks!
[BetterBatteryStats] Aerowinder:
Don't Greenify GSF. This is a bad idea.

0.7% per hour is not bad, when you take into account the terrible CM kernel. What's the problem, exactly? I'm not sure what you expect from a pre alpha CM build. I thought you had a T999, so why do I see reference to d2att in your logs? But the tmo bootloader?
[BetterBatteryStats] SaintCity86:
Can anybody give me some info on what ask of this is? The most this usually has is maybe 7 alarms, not 217. The only thing I did was update like 19 apps. But I'm not sure if that's even connected.

Tapatold from my Galaxy S4 running Wicked v7
[BetterBatteryStats] Perseus:
[MENTION=4788211]Aerowinder[/MENTION]

Some of the Roms such as Slim, release ATT Build.prop device ID. So T-Mo phones appear like ATT S3s. This is expected.

Network Location Position is a typical wakelock. It is caused when some app wants to know your location. Google Now, BatteryGuru are some of the causes.
[BetterBatteryStats] alexdk:
Hi all

I using Temasek 4.4 and BBS can´t run it says....: the batteryinfo service could not be accessed. If the error persists after a reboot please contact the dev and provide your ROM/kernel version..any idea?

Solved

I just installed the v1.15 and it works now.

Thx
[BetterBatteryStats] Perseus:
And your Kernel is ?

Is Temasek 4.4 based on Android Kitkat ? If yes, you need to use latest beta from OP.

Also please dump a Logcat and DMSG from the BBS app after it provides that error.
[BetterBatteryStats] azrash:
Same thing happened to mine too. Running official Kit Kat on N7. Wifi was available the whole time. Not sure what it is though.
[BetterBatteryStats] alexdk:
Sorry forgot to dump a logcat. as I wrote in my post, I solved it by installing the latest version ( 1.15) and now it run.

I´m using BOEFFLA-NOABB-temasek kernel.

Next time i will giv a logcat.

Thx
[BetterBatteryStats] Sharpeyes:
Anyone can help with this dumpfile?

Ty
[BetterBatteryStats] testrider:
Could someone help me to take a look at this? This is on a Galaxy Note 2 running stock JB 4.1.2, rooted.

This was after I unplugged and put it in airplane mode. I think the high wakelocks were:

================

Kernel Wakelocks

================

"mdm_hsic_pm0" (): 14 m 55 s (895 s) Cnt:(c/wc/ec)928/105/0 2.5%

"battery-monitor" (): 12 m 24 s (744 s) Cnt:(c/wc/ec)750/0/750 2.1%

"alarm_rtc" (): 6 m 48 s (408 s) Cnt:(c/wc/ec)761/239/112 1.1%

"PowerManagerService" (): 4 m 47 s (287 s) Cnt:(c/wc/ec)2407/0/0 0.8%

"deleted_wake_locks" (): 4 m 7 s (247 s) Cnt:(c/wc/ec)28/0/0 0.7%

"alarm" (): 3 m 51 s (231 s) Cnt:(c/wc/ec)1355/0/0 0.6%

"mdm_boot" (): 3 m 21 s (201 s) Cnt:(c/wc/ec)28/0/0 0.6%

"hsicctl0" (): 3 m 13 s (193 s) Cnt:(c/wc/ec)99/0/100 0.5%

"radio-interface" (): 2 m 15 s (135 s) Cnt:(c/wc/ec)119/0/0 0.4%

I was only running BBS and BatteryMonitorWidget (without the widget).

I couldn't find any info on these mdm_hsic_pm0 and battery-monitor wakelocks.

Thank you for any help.
[BetterBatteryStats] skridovaste:
Hey, what's up with my battery? I know it's google or whatever, but 99%?! How do I disable this, or minimize it?

https://www.dropbox.com/s/fcs2n1xp54zqvpr/BetterBatteryStats-2013-11-19_064620834.txt
[BetterBatteryStats] yhrn:
Got this one today also. Kept my phone 100% awake for 15 hours! Searched around a bit but found no good explanation. In this thread there is a recommendation to use an app called Disable Service but I haven't tried it - don't really like disabling things I don't understand. Will reboot and see what happens.
[BetterBatteryStats] Serotheo:
Alrighty.. thanks for the tips - I'll see if it makes any difference.

Is People Details Sync that much of a battery hog?
[BetterBatteryStats] azrash:
In my experience, not much. But it all varies from different users and phones. You can run two new idle test with people details on, and one with off and compare how much partial wake lock it caused.

The recommendations here are always to minimise the partial wake locks to the most minimum. You don't have to follow every recommendation.

If you can live with the slight wake lock given by a service or app that you use regularly, then why not? It is all about trade off to be honest.

The key here is to find the balance of battery life vs features that you are comfortable with, and BBS is a great tool to help you find that balance.
[BetterBatteryStats] chamonix:
I have fixed the process stats in the upcoming RC4 and am now struggling with the other stats. I need to do some more testing but ti seems that the new batterystats service has some pretty heavy changes from previous android version in how it behaves: this affects the other stats where I could observe that all counters are reset when the battery gets fully charged. This of course makes testing pretty difficult and may explain some discrepancies that some of you had observed after plugging/unplugging.

RC4 will be up tomorrow after some more testing.

Edit: I also found something really interesting and sign of some major changes in the way the service behaves (all based on Kitkat):

staying in the "other" stats and refreshing the stats the counters e.g. "awake" and "screen on" do not change, just "since" gets updated. If I close the app and restart it the counters jump up, again showing the right value. Based on that is seems that the new services does some caching that the previous implementation did not have. I will try to work with that and come up with a method to flush that cache at every call.
[BetterBatteryStats] SaintCity86:
Hey guys I really need some help,

My gms alarm is going nuts. I havent changed my use at all over the past few days, I can't think of any app I installed that would effect it....

But the gms used to only have like 7 alarms in 3 hours, now is got over 200 in about 1 hour. The nlp wake lock is the culprit for all 15 minutes about that my screen was of But system was awake. But what could be causing all these alarms all of a sudden. And the bottom one, a car parking alarm? What? This started today. Randomly. Check out the pic, it's a screen of all the alarms.

Tapatold from my Galaxy S4 running Wicked v7
[BetterBatteryStats] ksarius:
I know this has been answered many times but i forgot how to do that. I just leave the phone for at least 4 hours untouched?

Thanks
[BetterBatteryStats] Perseus:
Its not Gms. Its location Service. Check for location based apps that have been running.
[BetterBatteryStats] SaintCity86:
I said gms cuz that's the last 3 letters on that alarm.

Thing is, I haven't had any apps running this whole time. It was idle. Everything else greenified. I'll make a dump, someone check it out please.

It's random, I didn't do anything different to trigger it. I havent even used my gps at all the past 2 days.

I've been on this battery life thing for a couple weeks now and got it down to Basically 0.5% per hour when idle. Then this alarm started going crazy.

Text https://db.tt/5pqCMMo2

Logcat https://db.tt/suIObdl9

Tapatold from my Galaxy S4 running Wicked v7
[BetterBatteryStats] chamonix:
No need to wait so long as the syspend backoff should happen quite systematically. Plug/Unplug your phone, leave it half an hour alone and save a dumpfile and a dmesg. If syspend_backoff shows in BBS then that's the right data to get started.
[BetterBatteryStats] chamonix:
New version is up, fixing another batch of kitkat problems. Please reboot after installing in irder to make sure that all references are rebuilt.
[BetterBatteryStats] matrixzone:
Don't know if this has been answered before.. Should we use the latest rc or use the older stable release if using Android 4.3 or below..
[BetterBatteryStats] chamonix:
Well you can decide but sooner or later 1.15 will replace 1.14 so if it has not been tested enough on pre-kitkat it's not good. In other words I need as much testers an feedback as possible but I guess not everyone understands that this is a dev thread not a website for downloading stuff for free. Thank you for asking though, I'd be happy if you give me feedback, whether positive or negative.
[BetterBatteryStats] matrixzone:
I have been using the latest beta/rc versions on older versions without any issues. Even tested on 4.1.1, and things are looking good. Will share if i came across any issues..
[BetterBatteryStats] fndpena:
I rebooted and it didn't came back since then. I think [MENTION=3639717]Perseus71[/MENTION] was right about this been related to Google Play app.
[BetterBatteryStats] Perseus:
Your Top hog is NLP which practially means someone hammered for your location.

Does the ESPN Score Center want to know your location by chance ? Please check under Settings > Apps to see what permission it wants.Deny Location permission if your rom allows it.

Or could it be Juice Defender? That's more likely culprit.

Just for testing, change your launcher to something else like Apex or something. Another thing, please do rename the file mpdecision from under /system/bin to something else like mpdecision.bak
[BetterBatteryStats] gaich:
I know you need mainly kitkat users feedback, but... Testing every beta since I don`t remember what time. All 1.15 stuff works fine on my phone (signature). Thank you for your work.:good:
[BetterBatteryStats] JBL74:
https://www.dropbox.com/s/mhf59l8tn2gqk9z/BetterBatteryStats-2013-11-20_061808166.txt

My Note 3 won't go to deep sleep at all, after I take it off from charger. What's happening someone please help.
[BetterBatteryStats] boscos:
Help with some crazy wakelocks

Someone please help me, I am witnessing some crazy wakelocks and my phone will never sleep. The worst one is MHL_WAKE_LOCK which I am unable to locate information for anywhere. I have tried everything from wiping and reinstalling different ROMS, to installing a ROM and checking stats on a fresh install but it still is present. I have NEVER connected a MHL/OTG or any cable apart from connecting my phone to the PC to root and flash a ROM via ODIN. To make matters worse, my charger will now not charge the phone at max current.

This is driving me crazy! Attached is all of the details from BBS.
[BetterBatteryStats] artttur:
Please tell me if it's OK,and if possible explain what wakelock is SyncLoopWakeLock and keyguard... Tryed to stop any Sync process,which i have find. ,this both give up to 2000 wakelocks each in 20 hour.

Regards...
[BetterBatteryStats] jlmcr87:
[MENTION=1330150]chamonix[/MENTION]

Definetly the app ignore the drawable-xxxhdpi and is taking only xxhdpi, this causes the blurrines.

I do a test copying the xxxhdpi into the xxhdpi folder and the result is (nexus 5 screenshot):

Also if i delete the xxhdpi folder, the apk lost the icon, so it don´t use the xxxhdpi.

I can´t install the modified apk but i can see that in the file explorer (I don´t know how to compile apks) but maybe this help you to see what happens. Thanks for all.

PD: Take a look on that, maybe you have to update your tools: https://code.google.com/p/android/issues/detail?id=62208
[BetterBatteryStats] mag01:
Well this one looks really good at 4.4 (installed as system app).

All stats work and refresh without the need to restart BBS (before only those I reported as working in system mode kept refreshing in all cases - Other: Deep Sleep, Kernel Wakelock, Alarms, Network, CPU States - even if others were shown, and even with those mentioned it didn't seem really consistent). That also means process stats work in system mode as well. I'll keep it running for longer time to check whether the shown stats really make sense, but it looks very promising. Good work! :good:

Just viewing the phone storage contents via MTP connection still doesn't show any new log files saved without reboot. I understand it's more OS than application issue ( https://code.google.com/p/android/issues/detail?id=38282 ), though there's at least some workaround which may be worth considering...
[BetterBatteryStats] paraponzi:
hello, is there any news for mtk devices? using my thl w8s with jb 4.2.1 stock the partial wakelock section is always empty...looking in the forum the problem was already mentioned in may
[BetterBatteryStats] corwin111:
Wakelock

Ok first off, this seems to be a very useful app. Definitely what I was looking for.

Now for my problem:

I have been battling with a nasty wakelock for a few weeks now, ever since I installed stock 4.3 yakju on my GSM Gnex (non-rooted, previously on yakjuXW).

My phone is being kept awake by something almost all the time. Restarting the phone seems to resolve the issue for a few hours and then it comes back

Normal battery stats shows it is caused by Android OS which is hardly helpful. With BBS, I haven't had much more luck, though I'm afraid.

(Attaching the BBS log file over a 40 minute sample period)

Over these 40 minutes it shows the screen on for about 20 and yet awake time is 100% with the generic "PowerManagerService" taking up exactly the entire time the screen was off.

As far as I understand PowerManagerService is a compilation of all the partial wakelocks. However the strange thing is that it shows up as having taken 51% of the wake time (20 minutes) but the partial wakelocks listed have taken no more than 3-4 minutes combined.

Not sure if it's relevant but a strange discrepancy I can see is that it shows my wifi being on for 12 minutes whereas in all those 40 it was on only long enough to export the log file to my dropbox. 1-2 minutes tops.

I would really appreciate any help you guys can provide. This thing has been hogging my battery pretty badly and I can't seem to catch it.
[BetterBatteryStats] chamonix:
Are your testés based on the default Kitkat launcher? If by removing xxhdpi the launcher does not show the icon anymore it looks like a launcher problem to me. The app just provides the resources and the system / launcher uses them
[BetterBatteryStats] chamonix:
Sorry it was late and I forgot to look close into map. Issue #428 added
[BetterBatteryStats] oediv:
hei guys

need some helps with my wakelocks :( hope somebody can help me

here are the screen and the log

https://drive.google.com/folderview?id=0B2nUjnV7iQHUOHNtWF94MklBM2s&usp=sharing
[BetterBatteryStats] jlmcr87:
Yes stock launcher. No problem with the launcher, i contact other developer and he was able to put the xxxhdpi icon correctly in his app.

I cant help you more because im not developer and i dont know.....but i can test. Thanks
[BetterBatteryStats] j1gga84:
Hi guys,

now I am quite happy with my wakelocks because I was able to reduce them to a minimum.

But as always: It could just be better ;)

I have some screenshots in attachment.

I asked it again: Under the Partial Wakelocks -> Android I see "android.content.syncmanager.SYNC_ALARM", what could be responsible for that? Die syncronisation is disabled completely under settings. Also I disabled Dialer, Phone, Google Play and Google Play Services from autostart.

I have also some wakelocks with Whatsapp. Is it possible to reduce them without disabling the push functionality of whatsapp? (Maybe greenify it but check that I still want to receive messages ?)

Many thanks and regards
[BetterBatteryStats] SaintCity86:
Figured it out. I had clicked this setting that had wifi looking for a signal every 15 min.

That and when greenify updated this last time, my experimental features went away, so my system apps weren't getting greenified.

Once I realized I was seeing apps in bbs that shouldn't be there, I realized it was something with greenify. Had to uninstall/reinstall the pro file.

And it took Android tuner's analyzer for me to see my wifi was attempting to connect every 15. I think the wifi was doing that even when I got my %/hr down to .5%, so I wonder if it'll be .3 or .4 now.

I think with juice, greenify and android tuner, I've got this S4 as efficient as it's going to get.

I set this phone down, come back 2 hours later, and sometimes it hasn't lost a point on the battery.

Tapatold from my Galaxy S4 running Wicked v7
[BetterBatteryStats] oediv:
Sorry Multi poste
[BetterBatteryStats] artttur:
Please.. Can someone take a look on it? I wrote two time.. Here is third time...
[BetterBatteryStats] Karpfenhai:
That's a pretty good result for Wi-Fi turned on the whole time, nothing to worry about you're good.

Tapatalked from my Galaxy SII
[BetterBatteryStats] Casanoaa:
Karpfenhai , Itler and you :)

Any suggestions for viber alarms?

I use system sounds and wifi using device settings.

https://www.dropbox.com/s/cithzcczad0ekg4/BetterBatteryStats-2013-11-20_092838850.txt
[BetterBatteryStats] boscos:
Please can someone help?
[BetterBatteryStats] artttur:
Thank for Your reply... I know that is pretty good,but also I'm sure that things can be better. I have googled,searched in tread what this two wakelocks are,finded only that one has something with screenlock,second is with sync. All my syncs are turned off(all what I have finded),screenlock is stock,nothing changed. Right now i have SyncLoopWakelock Anroid System count 2276 47% Keyguard count 2102

If that is OK,then OK