yashsingh1/xdaforums huggingface dataset:
[BetterBatteryStats] chamonix:
You are welcome. It's a little bit more complicated, there were different factory:

- on some devices (and settings) it seems that Android is a little bit too strict in checking some stuff and I got a few logs with an exception telling that a broadcast listener (asynchronous event) is forbidden to be called from an async task. That make sense and the async task is the task refreshing the stats. Only there is no real async listener as I used a synchronous technique to poll the charger status. Only that on some Android ROMs this synchronous techique was recognised as being asynchronous and caused an exception. I guess that's the cause of many "unknown errors" we have seen. I have now replaced the charger detection by a call to a non-public API.

- there was a weakness in the hadling for "other" stats as any error lead to the whole stat to fail. In other I have found a lot of failures lately when retrieving Wifi and Signal info. I have now chaged the code to a) only call those if they are checked in prefs and b) skip the corresponding section but not the whole "other" stats in case of an error.

Both errors were pretty tricky to find as I could not reproduce any of them. Thanks to all who were patient enough to understand that I needed logcats and provided then to me (here and by mail)
[BetterBatteryStats] tigerphil:
Sorry been out with my son all day. Those results were written by myself instead of copied to clipboard etc but quoted from what were shown on screen
[BetterBatteryStats] chamonix:
it would be great if you could post the file (not the content) of /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state
[BetterBatteryStats] chamonix:
Release 1.10.3

New version is up with a few changes in the widget code (nothing functional) and a new option to write logcat to a file.
[BetterBatteryStats] tigerphil:
Is it possible for you to remind me how to get that file for you using a terminal app and i'll get it to you as soon as poss
[BetterBatteryStats] Aly007:
Thanks for making this available for free to us, really apreciate it.

I will report if anything goes wrong with the app.
[BetterBatteryStats] Karpfenhai:
Thx for the brief explanation Sven, it seem i suffered on the first reason.

after a fully charge the reference was set but the display showed weird values and the widget was dead, since boot was working fine, custom ref too.

Glad you solved it!

Tapatalked from my Samsung GT9100
[BetterBatteryStats] Tungstwenty:
Just run this on the terminal:

cp /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state /sdcard/cpu_stats.txt

Then you can attach the cpu_stats.txt file when posting.
[BetterBatteryStats] tigerphil:
Hopefully this is what you need

ATH=/data/local/bin:$PATH <

app_32@android:/ $ su

/sdcard/cpu_stats.txt <

BusyBox v1.20.2-cm9 static (2012-07-14 01:52 +0200) multi-call binary.

Usage: cp [OPTIONS] SOURCE... DEST

Copy SOURCE(s) to DEST

-a Same as -dpR

-R,-r Recurse

-d,-P Preserve symlinks (default if -R)

-L Follow all symlinks

-H Follow symlinks on command line

-p Preserve file attributes if possible

-f Overwrite

-i Prompt before overwrite

-l,-s Create (sym)links

1|app_32@android:/ #
[BetterBatteryStats] electricpete1:
Don't have any widgets?

First I installed the App from xda.

Then I un-installed and installed paid version from market (1.10.1.0)

I opened the program, closed it.

Long-pressed on my home screen, selected widgets, and I am presented of course with a menu of many widgets offered by my programs, but none from B.B.S.

Uninstalled BBS (including remove all data)

Reinstalled BBS again from the market.

Still I can't find any widget.

I searched and don't see anyone else with same problem. I'm not sure what I am doing wrong.

Any suggestions would be deeply appreciated.
[BetterBatteryStats] Karpfenhai:
Hmmm, that's kinda weird, could you try the older version from 1st post? (9.x.x)

If it works, just instal the latest version over it.

Tapatalked from my Samsung GT9100
[BetterBatteryStats] electricpete1:
Thanks. You got me thinking and I figured out what went wrong.

The program got installed onto my sd card vs internal phone storage.

Moved it to phone and found the widget.

Thanks!
[BetterBatteryStats] cerps:
Am I understanding correctly that a wakelock with 10 instances and and hour is worse than something with 300 instances for a total of 1 second?
[BetterBatteryStats] GoJo ^^:
Thanks, i just checked that, but i don't understand first one use?
[BetterBatteryStats] osm0sis:
Hmmm has 1.10.3 been pushed to the Play Store yet? I'm still not seeing it.
[BetterBatteryStats] GoJo ^^:
He said not yet
[BetterBatteryStats] Rob2222:
@Chamonix:

Regarding the new Save Logcat feature... I get only: "Unable to open log device '/dev/log/main': Permission denied" in the logcat file.

Best Regards

Robert
[BetterBatteryStats] yhrn:
Are you on Jelly Bean? I'm pretty sure that in JB accessing logcat requires root and it seems that BBS is not requesting root for this operation.
[BetterBatteryStats] solar666:
Has any installed the new 1.10.3 version already?

I did a clean install by deleting the cache & data of 1.10.1 before the uninstall and afterwards installed the new.

But I always get "no reference set" for each category. Nothing seems to be working.

Am I the only one?
[BetterBatteryStats] stuart0001:
Have you plugged and unplugged since installing to set a reference
[BetterBatteryStats] tramp20:
Hi,

another try because I got no help:

with the versions <1.10.x I could see all "old" values even the phone is charging (plugged in).

With the v1.10.x I get always the hint that in the plugged-in modus BBS cannot show anything (Device is plugged in: no stats) even in "since charged".

So I cannot use the new versions.

Do I make a mistake in the settings? I tried this several times even the newest 1.10.3.

LG-P970 v2.3.4 Zeus v6.39 rooted.
[BetterBatteryStats] Rob2222:
No, I am still on ICS.

BR

Rob
[BetterBatteryStats] chamonix:
I am not really sure and need you help on that one. Are there any rooted devices requiring su to run logcat or it is simply not possible to access logcat on jb devices them self? I am not sure of the dependency to adb (unsecure) and both devices I have on jb are rooted and do not require su to run logcat -d
[BetterBatteryStats] chamonix:
You can turn off the charging check in advanced perfs
[BetterBatteryStats] chamonix:
Well in that proportions (1 hour vs 1 sec) yes but it's not always that simple because the sum showed when the count is high is only the total time the wakelocks were held and does not take the wakeup and go-back-to-Sleep cycle. Compare it to driving 10 km at constant speed and driving 10 km stop-and-go. The latter will consume more fuel and it's hard to say what stop-and-go distance would consume the same amount of fuel than 10 km at constant speed
[BetterBatteryStats] chamonix:
https://github.com/asksven/BetterBatteryStats/issues/271
[BetterBatteryStats] tramp20:
Thank you for this tip. It is OK now :)

But you mean surely "enable while charging" marked.
[BetterBatteryStats] chamonix:
Found something: http://stackoverflow.com/questions/...s-logcat-does-not-output-messages-on-emulator

Edit: I will add that perm to 1.10.4
[BetterBatteryStats] yhrn:
Here's the tweet from Chainfire that made me believe that root was required for logcat in JB but reading it again it seems that this was only true from system wide logs - the app should still be able to read its own logs regardless of root.
[BetterBatteryStats] electricpete1:
Thanks for recording this.

Actually if it's a bug, it's not a bug in B.B.S. but in Android.

Widgets won't work for any Android program installed onto sd card:
[BetterBatteryStats] GoJo ^^:
Thanks, i just checked that, but i don't understand first one..?
[BetterBatteryStats] justtvargi:
deleted_wake_locks

Hi @chamonix, first of all great app, but I have serious problem with my battery ...

The problem started all of a sudden. One day without doing anything at all i plugged my galaxy s3 into the charger and when it charged I went to sleep.. I always turn wifi, synchronizations and mobile data on and It lasted for a full day (since I get up in the morning till the night I went to sleep) so that night I went to sleep and in the morning OMG 70 % for 6 hours :eek: In airplane mode for about 9 hours - 2% In 3g with synchronisation on it dropped about 2-3% / hour , with wifi on about 6-7% / hour .......

here is a screenshot

Can you tell me what is that " deleted_wake_locks " process, is it inportant and how to kill it

Thanks
[BetterBatteryStats] electricpete1:
If an item has an orange question mark next to it, there is help available

https://github.com/asksven/BetterBatteryStats-Knowledge-Base/wiki/deleted_wake_locks
[BetterBatteryStats] chamonix:
Release 1.10.4

Last version is up, adding permissions for readling logcat (seems to be required on some versions). This version goes to google play and will be available over the next hours.
[BetterBatteryStats] iscio:
First download
[BetterBatteryStats] chamonix:
You are rights, there is the possibility to force SD but not for force internal storage: http://developer.android.com/guide/topics/data/install-location.html

I'll close the issue
[BetterBatteryStats] tigerphil:
@Chamonix. I know you get quite busy with things but don't suppose you got the file i posted up? I think i replied to tungsworthy with the needed info.
[BetterBatteryStats] justtvargi:
soooo nothing can be done for my deleted_wake_locks? :(
[BetterBatteryStats] chamonix:
Have you studied this? http://xdaforums.com/showpost.php?p=31036838&postcount=8226
[BetterBatteryStats] chamonix:
I read your answer but I think the command didn't go well. The command should produce a file on /sdcard and you should retrieve that file (not the content) and attach it here.
[BetterBatteryStats] Mario1968:
Please note the space in the code and retry to execute that code and find the file cpu_stats.txt in the root of sdcard.

Hope this helps

Mario

Inviato dal mio Galaxy S2 con Tapatalk2®

XWLPF Stock

Siyah 4.1.2

Jkay V14.1
[BetterBatteryStats] justtvargi:
yeah, I've read it, but as you may noticed my english isn't that good (not at all really) I'm from Bulgaria and can't really understand the link...:eek: can you explain to me can I remove this problem and how .. sorry again :o
[BetterBatteryStats] Hilmesh:
Hello all,

Can somebody please see attached Stats and advise if it is OK. or can it be improved further? This is what i have / got till now,

1 Day 19 Hrs 25M on Battery

Screen on Time - 2 Hrs 5M

Voice Calls - 57M 7s

I have IM + pro in Push mode, As well as Skype

5 Gmail accounts but with manual Sync whenever i connect to Wifi / 3G

Maps has Autorun Modified as mentioned in this thread earlier

Please advise.

Thanks
[BetterBatteryStats] Karpfenhai:
Looks good man!

if you are still not satisfied, you may use the latest phenomenalized Speedmod kernel by geroxx.

Enjoy your phone!
[BetterBatteryStats] m14mclaren:
I believe most of my battery usage is from Wifi, I'm not expert and find it a big confusing, if someone can have a quick look and confirm my suspicions it would be much appreciated.

Should be noted im using Samsung 2000mah battery too.
[BetterBatteryStats] r7s:
Surprisingly high RILJ battery usage and I didn't even talk with anybody that day! Can it be connected to a low GSM signal?

Also, Google Reader synces feeds even though I have syncing disable in system settings and in Google Reader itself.
[BetterBatteryStats] sefuwl:
I just purchased this app, I'm not too sure how to read it, can anyone give me any suggestions to make some improvements?

I noticed my battery drains quicker when im away from home and off wifi even though my wifi is off when I'm away from home.
[BetterBatteryStats] tigerphil:
I've just updated BBS via the playstore and all seems to be running as normal again now :D

Also cpu spy has decided to work aswell
[BetterBatteryStats] chamonix:
Since 12 h 40 m 36 s
Awake (): 6 h 53 m 52 s (24832 s) Ratio: 54.4%
Deep Sleep (): 5 h 46 m 44 s (20804 s) Ratio: 31.7%
Screen On (): 1 h 22 m 28 s (4948 s) Ratio: 10.8%
com.google.android.music.AsyncMediaPlayer (com.google.android.music.Google Play Music): 1 h 3 m 34 s (3814 s) Count:53 8.4%

Your potential is 6:53 - 1:22 - 1:03 = 4:28 so there is really porential as your phone barely sleeps 50% of the time.

the main reason for that is:

"wlan_rx_wake" (): 3 h 11 m 6 s (11466 s) Cnt:(c/wc/ec)7879/0/7878 17.5%

Your phone was awake 3 hours because of wakeups caused by your Wifi being on all the time. Besides those wakeups there is more overhead caused by the location service and google maps.

Turn off Wifi when you are not using it (or use a tool like BetterWifiOnOff to do that for you) and take another reading so we can proceed further
[BetterBatteryStats] chamonix:
Since 1 d 6 m 6 s
Deep Sleep (): 22 h 34 m 18 s (81258 s) Ratio: 93,7%
Awake (): 1 h 31 m 49 s (5509 s) Ratio: 6,3%
Screen On (): 51 m 41 s (3101 s) Ratio: 3,6%

Your potential is 40 minutes from 24 hours so that is already pretty good.

Besides RILJ i See ConnectivityService (System Android): 6 m 20 s (380 s) Count:1977 0,4% with a very high count, witness for unstable network conditions (the reconnect alarms for gtalk tell the same story).

Under those conditions I don't see anything you can do except trying different modems/radio modules to see if they improve the connectivity
[BetterBatteryStats] r7s:
Thanks!

I don't even know why does these alarms for gtalk exist, I'm not logged in in Gtalk.
[BetterBatteryStats] Hilmesh:
Hey Karpfenhai, i am satisfied with what i am able to get. just wanted to know if it is good and i am enjoying :) . You have confirmed the same :).

but i will surely give the kernel a shot. Is the kernel MMC brick safe?
[BetterBatteryStats] Karpfenhai:
Yes it is, because its 100% based on Speedmod, the only difference, undervolting is applied!

oh i see you are on 4.0.4 rom so you can use the original Phenomenal version from this thread --> http://xdaforums.com/showthread.php?t=1601520.

Try medium first, when no issue appears go for extreme. good lucK!
[BetterBatteryStats] Rhonin86:
Missing References

Sry - me again,

since the newest updates i observe a not explainable behaviour. BBS doesn't seem to write a reference for "since unplugged"; "since boot"; "since charged". The only thing working is the manualy set custom reference. Is there an option that must be activated ?

Cheers

Rhonin
[BetterBatteryStats] chamonix:
Thy come from the gsf framework that is also responsible for push and Google play payment
[BetterBatteryStats] chamonix:
That's interesting. Can you please enable the debug logging in advanced prefs, plug/unplug, open 'since uplugged' and send me a logcat and a dump file taken after that.

It seems that some users stuffer from that and I'd really like to solve that issue.

You can save a logcat directly from the app if you don't want to do it by hand.
[BetterBatteryStats] Rhonin86:
Your wish is my demand

OK - i hope i can provide the required information for solving the problem...

I wish you success

Rhonin
[BetterBatteryStats] tigerphil:
Unfortunately my cpu stats problem has re started after rebooting my phone so i'm now thinking it may be a problem with the rom's permissions. I'm away from home at the moment but will try a re flash as soon as i'm home and hope that will sort the problem. Getting confusing to find the cause now
[BetterBatteryStats] teamshao:
After using the free version you had here for a few days with good readings, I decided to buy the version you have on play store to support you - great app. Still messing with it to figure out why my phone keeps waking up during the night! Thanks Sven!
[BetterBatteryStats] arunreturns:
Need help..

Hi can anyone see my bbslog..

Im losing about 20% overnight without data or WiFi

Please help
[BetterBatteryStats] chamonix:
One hour isn't long enough to tell. Please read post #3 on how to take an idle dump and repost
[BetterBatteryStats] GerBBAR14_c:
2x2 widget doesn't work for me at times. It doesn't update. HOX CM10.

Is this a common problem?
[BetterBatteryStats] Karpfenhai:
Are you on 10.0.4 version? If not please update!

If yes, provide a logcat if possible.

Tapatalked from my Samsung GT9100
[BetterBatteryStats] chamonix:
This is becoming weirder and weirder, but very interesting. From the log I believe that you powered/unpowered your phone around the end of the log as I see (correct me if I'm wrong but I assume you plugged/unplugged as requested)

E/MTPRx ( 2099): In MtpReceiverandroid.intent.action.ACTION_POWER_DISCONNECTED

but I completely miss something telling

Received Broadcast ACTION_POWER_DISCONNECTED, serializing 'since unplugged'

I believe that's the reason why you never get a reference "since unplugged" saved.

The question is now why?

I have multiple questions:

a) can you confirm that you plugged/unplugged?

b) you have changed anything to BBS permissions and removed <uses-permission android:name="android.permission.DEVICE_POWER" />?

c) could you try the same but plugging/unplugging a charger instead of your PC (to avoid mtp to mount/unmount the sdcard) and provide another log?

Edit:

and d) is your app installed on SD? if yes could you move it to the internal memory? (I keep reading about lots of stuff going wrong with broadcast receivers and apps being on sd as broadcast receivers may not receive intents due to mount/unmount)
[BetterBatteryStats] shad0vvfax:
Great Job

The app was not working at all on the previous version, but this one seemed to make it work for me. Wonderful app by the way.

HTC Evo LTE running FreshROM 5.2.2 (htcdev unlocked with SuperSU)
[BetterBatteryStats] Many40:
Hi. If not, better to not update. It happened to me as well after shifted from 10.0.2 to 10.0.4.
[BetterBatteryStats] Rhonin86:
First information - Feedback

Hi Charmonix,

a) i can confirm that i only plugged the phone in the usb-connector of a pc.

b) I can't tell you though beeing a noob i don't really know where to find the desired information - Will this problem be solved by fixing permission from CWM ?

c) Will try it maybe later or tomorrow depends on my tiredness :fingers-crossed:

d) Indeed the app was moved to the SD-Card. i pushed it now back to the internal memory and rebooted the phone.

I will attach the new log and dump later...

THX for your work and your commitment

Rhonin
[BetterBatteryStats] GerBBAR14_c:
Yes, I am, and will provide.
[BetterBatteryStats] chamonix:
I'd be happy to head if moving the app to internal storage alone solved the problem. Before posting a new logcat you could just plug/unplug from usb (pc) and check if "since unplugged" starts working. In that case my theory (d) gets validated.

about b) no it has nothing to do with CWM permission but rather with apps allowing to edit / revoke certain perms. If you are not aware of using any you don't ;)
[BetterBatteryStats] chamonix:
How about providing a logcat with some explanations for me to fix any problems instead of staying on an old outdated version and not benefit from newer developments?
[BetterBatteryStats] chamonix:
I reopened #271 as I believe we may have a pattern here: references not working properly when app is installed to sd. If it confirms I will force it to be on the internal storage (I found out how).

Edit: and at latest when it comes to the watchdog (a service) and to widgets installing to SD should not be an option
[BetterBatteryStats] Rhonin86:
The additional logs

This are the logs after moving the app to the internal memory and after plugging the powerplug in (not PC) - Hope it will bring you closer to the solution...

Have a nice evening

Campai

Rhonin
[BetterBatteryStats] sefuwl:
I just purchased this app, I'm not too sure how to use it properly. Can someone kindly please give me some advice to get more juice out of my S3?
[BetterBatteryStats] danz24:
First post for me.

Bought this app to figure out why my S3 (i747) has sleeping problems.

Attached is the . txt file for my dump and some screenshots of BBS. Hopefully with this info someone out there can help me out.

During this time I used actively(screen on) used the phone for about 40 min in a span of about 6hrs.

How do I put my phone to sleep?

Phone is ICS 4.04 stock rooted.
[BetterBatteryStats] alexinna:
First I would suggest to disable juicedefender and maps/location services (read post #3). After that please post new dump file.

---------- Post added at 04:32 AM ---------- Previous post was at 04:17 AM ----------

Please look at FB (the biggest offender), google backup, disable audioOut sources (look here). Also if you are new read post #3 and wiki to get an idea on how to use BBS. Try basic things and post new dump when ready. Good luck!
[BetterBatteryStats] sefuwl:
Thanks!

I already had touch sounds disabled. Could it be Whatsapp notifications?
[BetterBatteryStats] chantoine:
Hi,

I think you should begin by tuning up Facebook (reduce update pace) and ask yourself if all your widgets are really useful (or reduce update pace also).
[BetterBatteryStats] sefuwl:
Thanks for that. I restarted my phone and FB is nowhere as high as it was yesterday. I'll play around with update intervals.
[BetterBatteryStats] asaf-g:
Hi everyone

Please look at this weird behaviour, I've never seen anything like that.

Phone sleeps perfectly for 2-3 hours, then wakes for 5 hours in a row for NetworkLocationLocator.

What could possible cause this? I don't want to disable Network location completely.

http://pastebin.com/jDiRzq18

Thanks

Note: unable to upload images for some reason, but it's important to say that the wakeup was not interrupted. It's 4 hours of constant wake, out of the blue.
[BetterBatteryStats] gollyzila:
Do you have a task in Tasker whose context is a certain location?

What could have happened is your phone tried checking your location but could never get an accurate location.
[BetterBatteryStats] asaf-g:
No, nothing like that (just GSM cells based).

Is there anything I can do to prevent this?
[BetterBatteryStats] Many40:
Yes, you are absolutely right. Apologize for that (just had no time yesterday). Moreover my intention was not to discourage people to update BBS (I'm on the newest version too), but to make Karpfenhai and you of course aware that updating to 1.10.4 didn't help as he suggested but gave (at least for me) opposite result.

Now I'm ready for uploading a logcat but hm..... strange..... can't reproduce a problem from yesterday :confused: Widget works well!

Sorry again for yesterday's post, I'll be keeping an eye on the widget and as soon as can reproduce a problem will send you a logcat (hopefully it will not happen again :)) Regards.
[BetterBatteryStats] alexinna:
yes any sound/audio notifications
[BetterBatteryStats] asaf-g:
FYI problem was an old modem.
[BetterBatteryStats] azcv:
All 1.10 versions are not working on my optimus one.Doesn't show any stats.Only cpu states are showing.1.9 versions doesn't show cpu states but shows everything else.

Sent from my LG-P500
[BetterBatteryStats] alexinna:
Looks like you found the issue but for next dump I suggest you stop Bluetooth that was On all the time.
[BetterBatteryStats] chamonix:
Unfortunately that's a dumpfile no logcat. I guess I got the wrong file
[BetterBatteryStats] chamonix:
Make sure you rebooted once, the plug/unplug, select "since unplugged" and save a dumpfile and logcat of that situation to upload so I can have a look
[BetterBatteryStats] chamonix:
I still can't see the unplug action handled by BBS (I see that MTPReceiver and beautiful widget do). Before we go on with complicated logs to try to understand this I'll write a test app this evening doing nothing else than showing a toast and log for plug/unplug. We can go from there easier.
[BetterBatteryStats] chamonix:
Here's the app. Please install, plug/unplug and provide a logcat (option to do that is in the app).

This app tries different broadcast receiver priorities from default to highest and will hopefully help to narrow down the problem.
[BetterBatteryStats] asaf-g:
Does anyone know if there's a way of controlling alarms of certain apps?

The Google Maps alarms are really annoying and I don't want to stop using the app.

Also tried disabling it using Autostarts but didn't manage to resolve this.

Thanks.
[BetterBatteryStats] melvinaury:
Gemini app manager