yashsingh1/xdaforums huggingface dataset:
[BetterBatteryStats] Rhonin86:
The desired log cat

Hi chamonix,

i have installed your test-app and started it. Then plugged and unplugged the phone. After that i created the logcat....

BTW: i've changed kernels and basebands meanwhile to find out if they affect bbs but the behaviour is always the same....

Hope the logs help you to figure out the problem...

Campai

Rhonin
[BetterBatteryStats] MamomaN:
Great app , i think i will need it
[BetterBatteryStats] ufjay5:
Please help...i let the phone sit for 3.5 hourr after charged and something constantly kept the phone awake. Attached is a screen shot and the dump file. Thanks
[BetterBatteryStats] chamonix:
This is not the result I was expecting but I still believe we go somewhere. The log shows:

I/UnplugTest:HighBroadcastHandler( 3309): Received Broadcast ACTION_POWER_DISCONNECTED
I/UnplugTest:SystemBroadcastHandler( 3309): Received Broadcast ACTION_POWER_DISCONNECTED
I/UnplugTest:SimpleBroadcastHandler( 3309): Received Broadcast ACTION_POWER_DISCONNECTED

Now what I was expecting is that one or both Simple and System would not show. Foe that the cause have been something masking broadcasts but this is not happening.

That's good because masking broadcast would have been caused by an app not conforming with standards, but I still don't know the reason why those broadcasts do not reach BBS.

Therefore we are on a dead end here as we can't reproduce on that basis so I will make some structure changes to BBS and provide a new version to go on testing with BBS.

I will upload a version later (RC) and I'd like you to deinstall the BBS version(s) you have on your phone and reinstall the new version (it will force internal storage an installing may be different from moving from SD to internal in terms of what happens at install time. I will also change a few other things in how I register broadcasts and we will go from there).
[BetterBatteryStats] alexkno:
IT was only awake 23 min out of this 3h, so it's OK. 10min of them caused by wifi wake lock

sent via Tapatalk
[BetterBatteryStats] billab0n6:
my BBS

Dear all,

Can someone help me take a look? Lost 15% overnight (around 6 hrs)
[BetterBatteryStats] alexinna:
Please review maps/location services as described in post #3. I see you have google and samsung backups enabled. Do you really need both? TitaniumBackup is a better option. Check FB settings and reduce refresh interval or use manual update if possible. Also I see that screen was up for ~36 min. Is it done by you or alarm clock cause it? AudioOut_1 (1013) is probably alarm clock as well. Ideally dump file needs to be idle to research battery usage. Check the Sidekick_TrafficIntentService as well. Good luck!
[BetterBatteryStats] ufjay5:
What are the wake locks I'm still getting?
[BetterBatteryStats] billab0n6:
Hi there, thank u for the analysis of my BBS, the 36 mins I'm guessing it should be alarm clock, and mind teaching me what do u mean 'dump file needs to be idle to research battery usage' do u mean all alarms need to be off as well? As for maps, the most irritating thing is about whenever i stop, it will just restart the service...

Finally, how do i check sidekick_trafficintentservice? Sorry for all these questions...
[BetterBatteryStats] alexinna:
Phone needs to be idle (not used for some time 1-4h) to see how it will behave when it needs to deep sleep. Yes if you can disable alarms to prevent screen on and other wakelocks related to alarm clock it would be nice. I don't have personal experience with

Sidekick_TrafficIntentService_onHandleIntent (com.google.android.googlequicksearchbox.Google Search): 2 m 18 s (138 s) Count:50 0.7%

but dump file shows 50 wakelocks. Maybe somebody else can suggest or just google.
[BetterBatteryStats] Damasterjj:
I just installed it, anyway I have a noob question. how do you determine what is draining the battery?
[BetterBatteryStats] melvinaury:
Just read the first three post you willfind usefull resorces and info.
[BetterBatteryStats] gollyzila:
I believe that's Google Now. It checks your location and the traffic to your next appointment.
[BetterBatteryStats] alexkno:
as said, the only major wake lock was wifi wakelock:

"wlan_rx_wake" (): 10 m 6 s (606 s) Cnt:(c/wc/ec)534/0/535 5.1%

additionally there was your alarm clock active:

AlarmReceiver (com.sec.android.app.clockpackage.Clock): 2 m 36 s (156 s) Count:63 1.3%

and your battery monitor:

"sec-battery-monitor" (): 6 m 14 s (374 s) Cnt:(c/wc/ec)733/0/0 3.1%

for the latter: do you use a battery widget or app that constantly reads battery infos (temperature voltage or percentage)?

the rest is no too bad...
[BetterBatteryStats] tigerphil:
Sorry to post with the problem again, this has got me confused now to why my cpu stats disappear.

Last night I did a full wipe of my ROM, returned to unrooted stock rom then proceeded to re root, full clean install of my rom, siyah 4.1.2 kernel and changed the modem. Once all my apps were reinstalled I sorted all the settings for the rom and apps, plugged/unplugged then left the phone alone for an hour before checking BBS for the cpu stats, at this time they were being shown, along with cpu spy aswell.

I've fully charged the phone over night, unplugged during work but now I've got a break I've checked the stats again and neither BBS or cpu spy are showing them :confused:

Any help at all with what could be the cause would be greatly appreciated.
[BetterBatteryStats] chamonix:
Either the file gets locked, it's perms changed or the content format changed. Please provide the file as described in the previous posts, I'll start by pushing it through the parser. If it's okay we'll go from there
[BetterBatteryStats] tigerphil:
PATH=/data/local/bin:$PATH <

e /sdcard/cpu_stats.txt <

cp: can't stat '/sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state': Permission denied

1|app_143@android:/ $ su

e /sdcard/cpu_stats.txt <

app_143@android:/ #

I tried without giving su permission and was denied but after giving su I just got the # symbol
[BetterBatteryStats] Karpfenhai:
Thats kinda cute :) (no offense)

1st: switch to root --> su

2nd: type your command

3rd: exit the console

the # Symbol is common for unix based systems that the current user is root.

good luck!
[BetterBatteryStats] tigerphil:
1600000 0

1500000 0

1400000 0

1300000 0

1200000 574

1100000 80

1000000 2611

900000 185

800000 1453

700000 70

600000 61189

500000 44486

400000 3986

300000 1746

200000 539

100000 111286

Hoping that's what was needed, I'm still habit of a noob with the terminal app but noticed this file get put on the sdcard after the command so hoping I've finally got it right
[BetterBatteryStats] Stileth:
Post the file itself not just the data inside.

Odoslané z GT-I9100 cez Tapatalk 2
[BetterBatteryStats] tigerphil:
Hopefully the file can be found here

http://db.tt/6oK5gDWe

I'm guessing i'm going wrong somewhere with this file, i've finally got home and managed to look at the file from my laptop and its only showing the same as what i posted previously. if anyone can advise on what i'm doing wrong i'll upload the right file as soon as i can
[BetterBatteryStats] chamonix:
Release 1.10.5

A new bugfix release (RC) is up, adressing:

- widget problems

- unplugged not detected problems

Please provide logcat + dump with your findings. Happy testing!
[BetterBatteryStats] tigerphil:
I've got an update due to being insomniac and needing things to do, i went through checking and changing permissions and managed to get BBS and CPU SPY both reporting the stats :D

The problem i've found now is that the permissions get changed back every time the phone is rebooted so will be looking into the cause of that after i force some sleep as my rom is not set up to fix any permissions on boot, it was before but i thought that may have been the cause but even after unchecking that option i stil lose permissions and need to reset them
[BetterBatteryStats] Rhonin86:
Here are the results....

of the german jury ;)

it seems to create a new unplug reference :good:

I attach the desired logs.

Cheers Rhonin
[BetterBatteryStats] mzaur:
Not sure if mentioned already, but the "screen on" variable seems to be miscalculated in latest version. It's negative for me.(It's been a while since I updated so I don't know when it as broken. Last version for me was 1.9.21 and that worked fine) --

I noticed in the log on the bottom it says Since unplugged: Reference since_unplugged_ref created 45 m 6 s -- this is definitely wrong.

Also the logcat feature doesn't work. In the text file created it says "Unable to open log device '/dev/log/main': Permission denied" -- yes I'm rooted, but didn't get a popup when selecting logcat. Maybe because i'm on JB. alogcat also doesn't seem to work.... just downloaded catlog and that worked. It required root. It makes the text file way too big.. 1MB.. I can't upload it on here..

logcat link: https://www.dropbox.com/s/lw5bqzocbro1y26/2012-09-07-03-55-46.txt
[BetterBatteryStats] readon1:
Does auto brightness use much battery? Do you guys have it on or just adjust it manually?
[BetterBatteryStats] chantoine:
You can install "lux" app and configure your own brightness curve.
[BetterBatteryStats] Cyb0rgz:
Help me to find out the Apps Causing Drain!!

Hi all,

I have some abnormal battery drain in my mobile, so i tried to find the root cause for this. I just ended up in BBS, where i could see some kernel wakelocks, Alarm wakelock causing drain.

Attached is the dumpfile (Generated from BBS) along with Another Dump Alarm file (dumpsys alarm > AlarmManager.txt)

I Have analysed (with Google, yes!!) upto my knowledge and Unistalled some apps and Disabled Location Services and Backup (under Settings-Privacy). Apart from that i am clueless! Just posting these results for you guys have a look at it.

Kindly Help me to figure it out Guys!!
[BetterBatteryStats] icepixie:
I've been having the same issue as well. It starts off with "-264s" and counts down when the screen is on, ending up with a postive reading. Screenshots, dump, log below. I'm on the latest version of BBS.

Dump: https://docs.google.com/open?id=0B2TFKM5R4NCkenkxNEh5ZHZlcTg

Log: https://docs.google.com/open?id=0B2TFKM5R4NCkOThtN1NHeHdQQlU

I hope I did it properly. :o Thanks for any assistance!
[BetterBatteryStats] chantoine:
You've got this one :

"*backup* (Android System): 15 m 38 s (938 s) Count:825 30.5%"

First, you should disable google backup.
[BetterBatteryStats] Cyb0rgz:
thank you for helping me:) as I said earlier in my my post, I have disabled backup..any idea apart from that?
[BetterBatteryStats] Damasterjj:
can someone help me with this one
[BetterBatteryStats] Karpfenhai:
At Sven, something seems to be wrong with the latest version, in comparison to the 0.3 at least:

But, after two reboots and also two unplug actions (weird i know) the issue its gone:

Now the calculation might have an issue..and it looks incomplete, will report further.

I would suggest to ensure a reboot after installing a new version of bbs, maybe in the faq or during the installation to prevent unnecessary future issues!

Something funny but completely normal for you guys:

This can be explained with chemistry, it is all about chemistry.. :D

Tapatalked from my Samsung GT9100

---------- Post added at 05:29 PM ---------- Previous post was at 05:17 PM ----------

Hey there,

i would say, disable googles cloud backup service and all location bases services, then, chack whether pulling mails instead of push is okay for you, then provide another but clean idle dump!

Good luck!

---------- Post added at 05:31 PM ---------- Previous post was at 05:29 PM ----------

Sure, disable Kakao talk! ;)
[BetterBatteryStats] Damasterjj:
ok, got to warm my friends that I will deleting kakaotalk

how about the green icon wechat is that ok battery drain?
[BetterBatteryStats] skinien:
I'm glad I found this thread. I paid for the app a while back and I love it. Thanks!
[BetterBatteryStats] Karpfenhai:
No, deleting might not be neccessary, just try to tune it a bit, check the autostart behavior and ensure the app is closed if you close it.

Means, while app is on screen and in use, no problem, but when off, then there should be no trace of it in the wakelocks.

Same for wechat.. but, be aware, the cost of beeing reachable are at least a push service, so if you decide to stay online, thats the price for it, some users are reporting good battery consumption on whatsapp, maybe an option..

regards.
[BetterBatteryStats] mzaur:
Dude are you serious? Use pastebin

Chamonix you should write in the OP that if you paste your logs directly here, you won't get a response. So annoying to scroll through all that!

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

Do you have Tibu? If you have pro, you can create a widget which freezes/unfreezes the app. I do this with Facebook.
[BetterBatteryStats] dontezuma:
Shoutout

Just a shoutout to Chamonix from a noob. Thanks for the help solving my SkyICS wake issues. I just flashed AOKP's JB ROM for my SGS2 Skyrocket, and was having some issues getting it to sleep, but with the powerful combination of your Github wiki, searches on this thread, and stepping through each of the wakelocks I found, my phone is sleeping like a baby!

Here's to reading the full post, solid tools, and applied logic!

Couldn't have done it without BBS! BTW, even though I initially got it here, I bought the app via Play. Thanks again.
[BetterBatteryStats] itsLYNDZ:
Could someone take a look at mine? thanks!
[BetterBatteryStats] vasilisf7:
Sorry

Sent from my GT-I9300
[BetterBatteryStats] alexinna:
Dump file shows that you are OK

Awake (): 39 m 37 s (2377 s) Ratio: 12.8%
Screen On (): 30 m 53 s (1853 s) Ratio: 10.0%

Just 9 min pure awake time during 5+h. But you lost 20% and I would say it's on a high side specially with stats provided. Maybe you need to re-calibrate your battery. Also I see you are using older version of BBS so can you install latest version and provide dump again?

The only alarming thing I see so far is

"sdio_al" (): 5 m 39 s (339 s) Cnt:(c/wc/ec)-19266/0/104 -0.1%

I just google it and here is interesting post but I never personally had that issue so can't comment. Good luck!
[BetterBatteryStats] itsLYNDZ:
Someone else said something about the adio_al, but I did the skyrocket thing and it said fast charge. And I got a new sd card. Not sure what is causing that. Ive been getting that wakelock since I basically rooted and started flashing ROMs.
[BetterBatteryStats] alexinna:
According to the article "The wakelock I usually notice is sdio_al, which seems like it's related to I/O on the SD card. Perhaps detecting a cable connected without pins 2&3 bridged, the phone is preparing for data, then fails to terminate the wakelock." Did you ever try different cable/charger?
[BetterBatteryStats] itsLYNDZ:
Yeah I have a few. The USB cable, a travel charger and a regular one that came with the phone. I still get that on my BBS with all 3 of them
[BetterBatteryStats] It_ler:
I am using BBS 1.10.5RC1 right now.

On "Since Custom Ref", I recognize a "small" difference for "Deep sleep" in "Other" and "CPU States" view.

In "Other" I see for example 93,8% for deep sleep ratio, but in "CPU States" 94,1% is shown.

It's only a slight difference, but as both is "Since Custom Ref", I would expect the same value in both views.

Anyone else?!
[BetterBatteryStats] chamonix:
I'd like to hear your feedback on 1.10.5RC1 regarding the problem of the widget not updating
[BetterBatteryStats] chamonix:
you should have to fix perms at boot anyway. I suggest that you take a look at any init script running at boot ans see where the perms get borked
[BetterBatteryStats] tigerphil:
I think I've found the main culprit now. I reflashed my ROM 4 times during the night and configured every app one by one instead of restoring them through Titanium.

It seems as though AnTutu Battery Saver was the problem, it had an option checked to control the CPU freq, since I've unchecked the box I am having my stats reported, still configuring some apps now but restarting after each one and checking cpu spy before configuring the next app but so far seems to be only the one culprit

After finishing configuring each app one at a time and fixed permissions on a final reboot, everything seems to be running perfect again. CPU spy and BBS are both reporting perfectly so I can now make sure there are no sleep problems while watching for any battery drainers at the same time :D
[BetterBatteryStats] itsLYNDZ:
anything else I can do about the sdio_al wakelock? I have 3 different chargers and have tried a BBS dump with all of them and still get it. Also got a new sd card...
[BetterBatteryStats] HawkeyeIC:
Battery Dropped 40% last night while i was asleep. Stats are attached, thanks for the help!
[BetterBatteryStats] Damasterjj:
which one is more important alarm, partial wakelock, or wakelock... in determining battery drain?
[BetterBatteryStats] alexinna:
Negative or inaccurate "screen on" value 1.10.5RC1

I did report it before on other 1.10.x versions but now I see some other people report it as well so I decided to bring it one more time to chamonix attention. Dump file and logcat attached. I unpluged my phone in the morning and spend about 50+ min looking around and screen was On all this time but BBS reported only few minutes.
[BetterBatteryStats] chamonix:
I will release 1.10.5 as it seem to fix the "lost" unplug broadcast and the widget not always updating. After that I will revert the time calculation back to last 1.9 commit and we'll go from there. The main difference in 1.10.x is that I use system time instead of androids internal time ref and there seem to be problems with this reference being passed to the battery info service
[BetterBatteryStats] alexinna:
Your biggest offenders are Exchange mail, location services/maps, Lightflow and goSMS. I would suggest to start from information in post #3 and re-configure refresh rate of above apps or replace them (this topic would have some recommendations). Also I see that Wi-Fi was On all the time and this creates lots of wakelocks

"wlan_rx_wake" (): 42 m 30 s (2550 s) Cnt:(c/wc/ec)1462/0/1462 7.4%
"wlan_ctrl_wake" (): 22 m 1 s (1321 s) Cnt:(c/wc/ec)719/0/719 3.8%

. Do you really need it On all the time?

Please start from above recommendations and provide new dump file if needed. Good luck!
[BetterBatteryStats] chamonix:
Release 1.10.5

Release is rolling out and was updated in post #1 (no changes from RC1)

Next RC will be about #273
[BetterBatteryStats] HawkeyeIC:
Thanks!! Made some changes based on the map suggestions, disabled a bunch of items in lightflow and goSMS, and changed refresh rates for exchange. I was under the impression that wi-fi helped battery versus being on 3G/4G...so I should only use Wifi when streaming/downloading??
[BetterBatteryStats] alexinna:
It depends on many factors such as strength of a signal, modem and so on. I would suggest to try 3G/4G and compare battery usage with Wi-Fi (when phone is not used or not downloading).
[BetterBatteryStats] durangatang:
I could never get this app to work correctly while on neat ROM, always got the "no reference set" for a few or all of the stats. I changed to Chameleon ROM and now the app seems to work great with none of the "no reference set" stats. It's weird. Just a note for anyone else who might be having the same issues.
[BetterBatteryStats] ufjay5:
No one seems to have solved this problem...I'm pure stock..not rooted...phone is still staying awake. Why? Why is clock and alarm receiver so high?
[BetterBatteryStats] azcv:
is this what you need?
[BetterBatteryStats] mzaur:
Not sure why but your log is blank
[BetterBatteryStats] kevindd992002:
Just uploaded my bbs dump file and logcat. I charged my S3 to 100% unplugged it and left it idle for about 6 hours and used it normally for around 1.5 hours. I then went to bbs and created the dump file and logcat which I've uploaded here. Are those partial and kernel wakelocks all normal? I'm optimizing every bit of juice from my battery and want to know which unwanted service is causing wakelocks.

Thanks for the help :)
[BetterBatteryStats] alexinna:
Are you sure that you used your phone for 1.5h? By looking at BBS dump file I don't see that your screen was On for 1.5h. Also file shows that phone was awake only for ~1h. I do see many negative values in your dump so probably you are having the same problem that I have and BBS (1.10.x) is not calculating values correctly. If you read few last pages chamonix already promised to fix this issue.

Current dump doesn't show anything that needs attention right away so I would suggest to wait for BBS calculation fix and provide dump after that.
[BetterBatteryStats] kevindd992002:
Well, not exactly 1.5h that the screen was on. I think around 30min? Alright, so the dump file I got wasn't accurate at all. I will just wait for the next version then and will ask for help again. Thanks for the heads up :)
[BetterBatteryStats] seitentaisei:
Thanks for this app! one thing I immediately noticed is that the awake time of my phone was 100% and there was no deep sleep. And this was measured after I charged the phone to 100% and went to sleep (around 10hrs). the "screen on" was considerably low compared to the "awake" time. Is there a way to know what causes it to be awake even if the screen was off? Thanks.
[BetterBatteryStats] kevindd992002:
That is what wakelocks do, keep the phone in awake state even when the screen is off. But 100% awake is alarming.
[BetterBatteryStats] seitentaisei:
yeah I was alarmed like hell! but thanks to this app I learned about it. now I'm trying to figure out what app causes that kind of wakelock..
[BetterBatteryStats] mzaur:
1.9 didn't have this problem with screen on, but it did have a similar problem with deep sleep. I attached a log to clarify
[BetterBatteryStats] seitentaisei:
Can someone check this log for me? I still cant find the reason why my device is always 100% awake. thanks! :)
[BetterBatteryStats] kyub-ie:
Can someone please check this log for me? I've been getting a lot of bad drain lately. Looking at it myself it appears audioout_3 is causing a lot of probs.
[BetterBatteryStats] yungskeeme:
I'm having major wakelocks on cm10. Can some please help me find out why?

http://db.tt/6oLFxSz7
[BetterBatteryStats] DonCarluchio:
Suspend_back off seem to be part of the issue which is Google chrome I believe. Try uninstalling that and check again.
[BetterBatteryStats] alexinna:
First of all not sure why but dump shows no kernel locks

================
Kernel Wakelocks
================
No reference since unplugged set yet (): (0 s) Cnt:(c/wc/ec)1/1/1 100.0%

and this is not right. It's a key stats so it will be difficult to suggest without seeing them. Anyway from the info provided I would say location services/map is on a first place. Can you please follow instructions in post #3? Also take a look at viber and FB because they do wakelock your device often. DownloadManager needs your attention as well. All the best!

---------- Post added at 02:06 PM ---------- Previous post was at 02:00 PM ----------

It would be more helpful if you can install BBS and provide dump. Attached alarm dump has lots of FB. I think you will benefit if you change refresh interval or put it on manual. Also maps and e-mail need some attention.
[BetterBatteryStats] m14mclaren:
Any suggestions for improvements?

https://docs.google.com/file/d/0B1XEoHCZafKgOFFia21DQXNhbzg/edit

Hopefully that link works
[BetterBatteryStats] yungskeeme:
Sorry..had bbs wrong file

http://db.tt/oGRubmLa

Fb i have no notifications or locations

Maps and latitude location is off..ill look at it again
[BetterBatteryStats] alexinna:
BetterBatteryStats version: 1.1.1.0

Are you serious? Latest is 1.10.x You are way behind.

Also read post #1 on how to create idle dump file.
[BetterBatteryStats] avyrez:
Hello.

Can u add a percent indicator for the 1x1 widget?

Thx.

Ps. Nici app
[BetterBatteryStats] alexinna:
Link doesn't work: "you don't have permission to access this item"
[BetterBatteryStats] shad0vvfax:
The 2x1 widget is cut off and does not show all the values on my HTC EVO LTE running FreshROM 5.2.2. It's just a tad too short in length.

sent from my HTC EVO 4G LTE using the xda-dev app