yashsingh1/xdaforums huggingface dataset:
[BetterBatteryStats] chamonix:
The logcat suggests the reference "unplugged" was created successfully:

08-23 23:08:02.568 I/BroadcastHandler(10486): Received Broadcast ACTION_POWER_DISCONNECTED, serializing 'since unplugged'
08-23 23:08:02.588 I/WriteUnpluggedReferenceService(10486): Called at 2012-08-23 23:08:02
08-23 23:08:02.588 D/Globals (10486): Wakelock BBS_WAKELOCK_WHILE_SAVING_REF aquired
08-23 23:08:02.588 I/References(10486): Create ref since_unplugged_ref at 12 d 11 h 9 m 48 s

Don't be irritated by the "weird" timestamp format, that's time since boot so it's fine as I guess you didn't boot.

This is confirmed by the dumpfile saying:

Since unplugged: Reference since_unplugged_ref created 12 d 10 h 40 m 5 s (Wl: 45 elements; KWl: 83elements; NetS: 0 elements; Alrm: 0 elements; Proc: [] elements; [B]Oth: 3 elements[/B]; CPU: 13 elements)

Reading the beginning of your logcat (starting 08-23 23:08:02.758) the log reports a null reference. It took me like 10 minutes to understand that even if I know the code so I'll add some more logging to avoid confusions:

what happens here is that, following the unplugged event the *current* stat is saved. Obviously there is no reference for *current* and that's the reasons why the ref is null. The log shows starting from 08-23 23:08:02.798 that all the parts of the references are created, substracting "null" from the current values. The process of saving the reference "since unplugged" ends at 08-23 23:08:02.968.

Next (starting 08-23 23:08:04.980) is the first refresh and that shows a valid "since unplugged" reference. There are a few errors due to negative differences but with the runtime you have had (and the big figures) I don't see any bug in having a conter error of 1 millisecond in 12 days. The errors are also not aborting anything as the result returned is correct anyway: Result value: Deep Sleep (0 s) Ratio: 0.0%

Starting at 08-23 23:08:22.739 I see some interesting stuff in the kernel wakelocks:

- there seems to be duplicate entries like "power-supply" and "msm_ipc_read" and the results are not adjusted in the case of negative results:

"msm_ipc_read" [ (0 s) Cnt:(c/wc/ec)5/0/0 0.0%], "msm_ipc_read" [ (0 s) Cnt:(c/wc/ec)1/0/0 0.0%], "msm_camera" [ (0 s) Cnt:(c/wc/ec)2/0/0 0.0%], "sec_jack_det" [ (0 s) Cnt:(c/wc/ec)1/0/1 0.0%], "event12-543" [ (0 s) Cnt:(c/wc/ec)0/0/0 0.0%], "msm_ipc_read" [ (0 s) Cnt:(c/wc/ec)1/0/0 0.0%], "event8-543" [ (0 s) Cnt:(c/wc/ec)0/0/0 0.0%], "msm_ipc_read" [ (0 s) Cnt:(c/wc/ec)0/0/0 0.0%], "bat_esus_test" [ (0 s) Cnt:(c/wc/ec)0/0/0 0.0%], "BTLowPower" [ (0 s) Cnt:(c/wc/ec)0/0/0 0.0%

I will have to talk to someone who knows more than me about /proc/wakelocks to clarify that: I am under the assumption that the wakelock name is a primary key in the kernel wakelocks so I don't sum/group them and substract the first occurence. Now obviously your kwl contain some wakelock names more than one time so the substraction becomes more complex of summing up and grouping,

It was fun reading the logs and have made some changes while was was at it to make them a little more readable. I hope some readers enjoy the insight.
[BetterBatteryStats] chamonix:
That would depend on factors like the capacity of your battery. In this thread we are after potentials and overheads. Provide a dumpfile and join the party
[BetterBatteryStats] chamonix:
I see a misunderstanding of the logic of BBS here. BBS does not collect any data as it is a passive tool. It compares current values with so called references (on boot, on unplugged, etc.). Rebooting cause all references to be deleted and of course the "boot" one to be re-created (if you are using 1.10.x).

In other words time won't heal a reference not being available

It wasn't lost, if you booted it got deleted, that's "as designed"

No, you just need to know that after boot and as long as you don't plug/unplug only "since boot" will be available (if you use 1.10.x)

It won't, there is no issue

[/QUOTE]
[BetterBatteryStats] chamonix:
Ok guys, tell me if we have a golden release with RC3
[BetterBatteryStats] Stileth:
Hmm, your sentence about not collecting any data would explain a lot. I think this is the main reason why we are expecting to see certain things in BBS. I was always under impression that after its installed it starts collecting own data which are later presented in all the tabs and graphs.

Odoslané z GT-I9100 cez Tapatalk 2
[BetterBatteryStats] chamonix:
That would be active monitoring. It is a solution but it often comes with a high cost. BBS is designed to be not intruding your battery drain.
[BetterBatteryStats] alexinna:
Thanks for detail comments. It always good to understand from the high level what application actually does inside.;)

Still not clear on couple of points:

- Do I need to reboot regularly for BBS to show correct numbers?

- Why if I use "since unplug" BBS goes back to "since boot" time during calculations? Is it because system stores information this way and BBS only extracts "since unplug"?

---------- Post added at 09:58 PM ---------- Previous post was at 09:56 PM ----------

:good:

Some idea for future releases: Add the menu that will show what references are available and set in BBS. Today it's only available in a dump.
[BetterBatteryStats] chamonix:
No, you shouldn't have to reboot. I'm trying to clarify the thing with the negative figures in kernel wakelocks as I believe it's more due to that duplicate problem I mentioned than the long runtimes

The switch back to "since boot" should only happen if a) you have the fallback enabled on prefs and b) if "since unplugged" is missing
[BetterBatteryStats] chamonix:
Poll

I opened a poll (top of thread) so you can decide if we go on with development of 1.10 or if I should release
[BetterBatteryStats] alexinna:
But why "since unplugged" shows 12d in this case? I would expect the same value as Current - "Since".

I'm looking at BBS screen and it shows Screen On as negative so it's not only kernel wakelocks.

For me as a user it's important to have accurate Awake and Screen On times as you know.

Also I don't remember ever seeing negative values before 1.10 (at least for main indicators) but maybe I didn't pay attention.

Will check old dumps that I didn't delete yet.
[BetterBatteryStats] Stileth:
So what about creating something like first run reference to which you compare later?

Also you can make option for passive and active mode no?

Odoslané z GT-I9100 cez Tapatalk 2
[BetterBatteryStats] chamonix:
First run reference = since boot :)

You must know I am conservative when it comes to active monitoring because I don't like tools draining battery, especially if they were designed to help you save battery. Nevertheless there are options (like tasker plugin) and ideas (see git) on adding active aspects.
[BetterBatteryStats] itchn2go:
Yes, I had rebooted and plugged/unplugged.

No references are created at all even on RC1

Thanks for pointing out the task manager. this is a new ROM for me and it is built in. I did not realize that it was there. I have disabled it.
[BetterBatteryStats] Karpfenhai:
From my pov yes, i think most issues are caused by incorrect handling (no references)

Just my 2 cents..

There is only one tiny bit of a complain, if you don't reboot between 2 version, the process reference will not work, it will show no reference, even after plugging /unplugging, all others are fine and correct.

Tapatalked from my Samsung GT9100
[BetterBatteryStats] chamonix:
Don't get irritated by the 12 days that value is a timestamp not a duration. The reason is I use 'time since boot' and not date-time to be sure to never get any daylight saving problems when substracting references.

I will look into the negative screen on again as I only noticed the KWl part. But you are absolutely right, those values should always be accurate
[BetterBatteryStats] itchn2go:
It only appears once under Settings/Apps.
[BetterBatteryStats] alexinna:
I got it about timestamp but if I unplug for example 2h ago 'since unplug' value should be "current time - 2h". Why 'since boot' is in a picture? This is what I can't understand. Thanks.
[BetterBatteryStats] Nos_20:
When you say incorrect handling what is correct handling?

I can't get any reference at all. Plug/unplug reboot. Fully charge then unplug nothing. What am I doing wrong?

Sent from my Jelly Beaned Paranoid Android Galaxy SII
[BetterBatteryStats] mahercs:
I noticed even when I change the default stat setting, Other is still the one that appears when opening the app. When I back out of the app and go back in, the setting displays my choice, but the info displayed is the original "other" information. Small quibble, but otherwise all else seems to be working.
[BetterBatteryStats] Karpfenhai:
Hmmm, hard to say..

Which version of bbs?

What is the content of this folder?

Does your ROM have a "normal" file system structure?

More details including a logfile (logcat) and chamonix will take care.

Does the problem also occur with the market version?

Tapatalked from my Samsung GT9100
[BetterBatteryStats] xelra:
Are you using a special kernel? Some kernel devs remove features from their kernel and advertise them as very "light" kernels.
[BetterBatteryStats] ybres:
Thanks for the answer. I didn't post a Dump file because I was generally speaking:

My Galaxy Ace with a 1350 mAh battery usually lasts for 2 ½ (used for calls, calendar schedules and little internet access) and has an Awake - Screen On time of about 30 min. It seems very decent given that on the battery graph there aren't any abnormal awake times, but I wanted a second opinion because I don't think that anyone could have a zero Awake - Screen On time.
[BetterBatteryStats] Nos_20:
I have installed bbs rc3,

Which folder do you want to know the contents of?

By normal file structure do you mean /emmc and /sdcard? I am on paranoid Android 1.992 which us based on latest cm10

I am using siyah 4.1.1

Sent from my Jelly Beaned Paranoid Android Galaxy SII
[BetterBatteryStats] Karpfenhai:
I mean the /data/data/com.asksven..... Folder..which its why I've attached a screenshot.. :cool:

My fault, bbs could not have been installed with abnormal FS. My question should point more if bbs is allowed to write in its own (above) folder at all.

Not sure how sven handles a write protected data folder.

Could you convert bbs into a system app as a test?

Tapatalked from my Samsung GT9100
[BetterBatteryStats] Nos_20:
Sorry the screen shot didn't load on my phone.

I have checked the folder here is it's contents

I would have thought it would be allowed I have not changed anything only installed app

Yes will copy the apk yo system /app and see if it helps

Sent from my Jelly Beaned Paranoid Android Galaxy SII
[BetterBatteryStats] itchn2go:
Still no data. Running RC3. all options and references are empty

Log attached. Hopefully it has some data in it for BBS. What should i look for in the log to be sure it has BBS data in it?

Changed Log file
[BetterBatteryStats] xelra:
Siyah should work just fine.

I'm also using Paranoid Android, but with stock kernel. It works like a charm here.

I guess you'll have to try some voodoo like fixing permissions, full wipe and stuff.
[BetterBatteryStats] xelra:
I checked out the newest rc3. Everything works fine here on my SGS2 with Paranoid Android.

The percentages in the "other" are correct now, too.

There is a typo in the widget options. I think it should read "2x2 and 2x1 widgets".

Also, when I go to the graph screen, it's not scrollable. When switching to landscape mode, the bottom is cut off.
[BetterBatteryStats] alexinna:
Something is wrong with your dump. Kernel Wakelocks section is empty. Can you please plug/unplug it one more time and post new dump here. Sorry but current dump doesn't show anything that can help to explain quick battery discharge.
[BetterBatteryStats] JkdJedi:
Better Battery Widget

What does KWL and PWL stand for on the cool looking widget?
[BetterBatteryStats] stuart0001:
Kernel wake lock and partial wake lock
[BetterBatteryStats] suku_patel_22:
I get the below error on RC3.

D/StatsProvider( 3066): Reference create at: 5 m 8 s
D/StatsProvider( 3066): It is now 2012-08-25 14:07:03
D/StatsProvider( 3066): Since: 1 m 20 s
D/StatsProvider( 3066): Current Battery Level:99
D/StatsProvider( 3066): Battery Level since 5:98
D/StatsProvider( 3066): Current Battery Level:99
D/StatsProvider( 3066): Battery Level since 5:-1
D/StatsProvider( 3066): Reference create at: 5 m 8 s
D/StatsProvider( 3066): It is now 2012-08-25 14:07:03
D/StatsProvider( 3066): Since: 1 m 20 s
I/StatsActivity( 3066): Since 1 m 20 s
E/StatsActivity( 3066): IntentReceiver components are not allowed to register to
receive intents
E/StatsActivity( 3066): android.content.ReceiverCallNotAllowedException: IntentR
eceiver components are not allowed to register to receive intents
E/StatsActivity( 3066): at com.asksven.betterbatterystats.StatsActivity.
onCreate(StatsActivity.java:338)
E/StatsActivity( 3066): at android.app.Activity.performCreate(Activity.j
ava:5008)
E/StatsActivity( 3066): at android.app.Instrumentation.callActivityOnCre
ate(Instrumentation.java:1079)
E/StatsActivity( 3066): at android.app.ActivityThread.performLaunchActiv
ity(ActivityThread.java:2139)
E/StatsActivity( 3066): at android.app.ActivityThread.handleLaunchActivi
ty(ActivityThread.java:2210)
E/StatsActivity( 3066): at android.app.ActivityThread.access$600(Activit
yThread.java:142)
E/StatsActivity( 3066): at android.app.ActivityThread$H.handleMessage(Ac
tivityThread.java:1208)
E/StatsActivity( 3066): at android.os.Handler.dispatchMessage(Handler.ja
va:99)
E/StatsActivity( 3066): at android.os.Looper.loop(Looper.java:137)
E/StatsActivity( 3066): at android.app.ActivityThread.main(ActivityThrea
d.java:4928)
E/StatsActivity( 3066): at java.lang.reflect.Method.invokeNative(Native
Method)
E/StatsActivity( 3066): at java.lang.reflect.Method.invoke(Method.java:5
11)
E/StatsActivity( 3066): at com.android.internal.os.ZygoteInit$MethodAndA
rgsCaller.run(ZygoteInit.java:791)
E/StatsActivity( 3066): at com.android.internal.os.ZygoteInit.main(Zygot
eInit.java:558)
E/StatsActivity( 3066): at dalvik.system.NativeStart.main(Native Method)

D/memalloc( 1427): /dev/pmem: Allocated buffer base:0x420cc000 size:1536000 offs
et:7127040 fd:70
[BetterBatteryStats] AsianXL:
Bad Battery Life With Kakaotalk App Installed

I notice that I've had very poor battery life when a chat app called Kakaotalk is installed. The following is the dump file and a screenshot. Some of my friends whom are also on Jelly Bean is not having problems with this app, on the other hand, I am having this battery drain issue. I have tried the stock JB rom, and is currently using CM10 on a Nexus S, but the problem still persist. I've had this issue dating back to CM9.

I have emailed the developer regarding this issue, but it hasn't been fixed. It's an app that I must keep, and I don't have a choice of deleting it. If someone knows another solution to this issue that would be awesome.

I've tried re-flashing with various roms countless of times. I am sure it's not a rom issue. THANKS~!
[BetterBatteryStats] Charmacas:
I also want to report about the RC3 version. I am using Tytung ICS 2.6 with securecrt's newest kernel.

Everything works fine, especially the superuser problem seems to be solved.

Should I check something special and report that back?

Gesendet von meinem NexusHD2 mit Tapatalk 2
[BetterBatteryStats] chamonix:
You can check for the main features and fixes in the change log in the first posts of this thread. Thanks for the feedback on the superuser workaround.
[BetterBatteryStats] chamonix:
KWL=kernel wakelocks

PWL=partial wakelocks
[BetterBatteryStats] mythopoeic:
great

this is gread ! thx
[BetterBatteryStats] chamonix:
Flashing ROMs is no solution, imho most drain problems are related to bad behaving or msiconfigured apps.

In your cases jp.naver.line.android and the fact that you leave wifi on all the time, causing counless wakeups are the main causes for the one hour awake while screen was off you suffer from.
[BetterBatteryStats] chamonix:
I have seen this error in another log. I suspect it's because of the way the battery level is retrieved: a receiver with a null intent causing a synchronous read but still a receiver. The part I don't get is that there are no action called from another receiver as, even if I use those, they all end up calling a service responsible for the "long" running operation of e.g. creating a reference. I don't know if that is a bug in the too strict checks being make on intent-less receivers but I will investigate further.
[BetterBatteryStats] chamonix:
It's a kernel wakelock for sure, and google tells me that gpio_kp is involved in managing key mappings
[BetterBatteryStats] chamonix:
12d in that case means that ref was created 12d after the phone booted. Besides the normal calendar linux has a clock/calendar counting from the moment the kernel started (in milliseconds). It's just another time reference and it's handier than the calendar starting 01.01.1970.

Checking the log again now
[BetterBatteryStats] chamonix:
I have double check the log and the dumpfile and couldn't find any negative "screen on" time. Could you point me to another log/dumpfile where you had reported that?
[BetterBatteryStats] mmm286:
From 1030 to 1600 52 % battery remaining. Could you see the log?. Many thanks and sorry for my english
[BetterBatteryStats] chamonix:
The file is written in "private" mode (owner:group = uid) to the private data folder. If a ROM tampers with the perms in that directory it is broken and potentially flawed/compromited from a security point of view. Perms in that directory are given and should not be altered
[BetterBatteryStats] alexinna:
Need to catch this situation again but I did provided dump/log before in this post.
[BetterBatteryStats] Tyrol:
Same here, the default stat setting has been stuck at "Others" and "Since charged" for a few versions or BBS now, even though I've always set it to Partial Wake locks & Since unplugged. :/

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

サンソングガラクシS II からタパトクで書いた。
[BetterBatteryStats] stevenanggelo:
yes i already google that too..

but didn't find the solution

do you have some solution for that? :)
[BetterBatteryStats] chamonix:
I have tested it right now and can't confirm. There are a few causes for default stat/stat type to vary as there are settings that can override the default one:

- as long as bbs is running it will go back to the settings it had previously

- starting bbs from the widget and not from the launcher icon does not use the default settings but the ones from the widget

- since boot will override since unplugged if there is no ref since unplugged and the settings say so

- there is an override for widgets if the selected ref is not exsiting

Please make sure to take those into account when you test. If you still feel that there is something wrong please post a screenshot of your prefs and a logcat
[BetterBatteryStats] chamonix:
no, as this is kernerl related you should take that question to your favorite kernel thread
[BetterBatteryStats] chamonix:
Found it, "screen on" current is less than "screen on" in reference. I see that reading was in RC1 and I have made changed to that calculation since then. Please tell me if it happens again.
[BetterBatteryStats] Xdenwarrior:
New dumpfile attached - (sleep state with no usage for 12 hours upon battery wipe with ground breaking 700+ map wakelocks :( and 20 percent battery loss in total)

I set my wifi in advanced settings to only turn on in sleep mode when the Device Plugged In, yet it appears it continues to run all the time?

(i do have wifi controlled by Easy Battery Saver app to turn wifi off automatically when not near wifi hotspot, but this shouldnt interfere with system settings for wifi during sleep)

And yes Ive seen the freeze maps application quide, but unfortunately i like google maps and use it almost daily, so what i need to know is what function WITHIN the maps apps that causes most wakelocks
[BetterBatteryStats] chamonix:
The wifi sleep policy will not solve the problem, you need to turn wifi off. you may want to try BetterWifiOnOff (here on xda) to do that for you
[BetterBatteryStats] adinpop:
Hi,guys! Please tell me whats wrong in my config? why do i get always this network stats items on bbs? should i change the modem or what else? and the other wakelocks...what should i do?

i have SGS2 (with signature config)
[BetterBatteryStats] chamonix:
You can read more about network stats here: http://grepcode.com/file/repository...r1/android/net/NetworkStats.java#NetworkStats

Looking at your partial wakelocks I notice

ConnectivityService (Sistemul Android): 58 s (58 s) Count:566 0,2%

This tells me either your phone spends a lot of time switching between 3G and Wifi or between network standards. Does NetworkStats stay igh if you turn off Wifi? if yes you may want to try other modems.

Another thing I wonder about: how come a clock is connecting to the internet (see network stats)
[BetterBatteryStats] Xdenwarrior:
i dont get how that app is different from the default settings i mean its same strategy like turn off wifi unless connected to AC adaptor, and any solution on those map wakelocks?? the "alarm_wakeup_locator" in maps is the one that generates most of the wakeups for Google maps.

For Location Services in settings i dont have the option to use sensor aiding for some reason to save power, i did have all other options toggled on (cause i need them for navigation) but now disabled "Use wireless networks" since GPS satellites is better anyhow.

Edit: Um whats that Background Location Reporting thats turned on in Location settings of Google maps? maybe thats what draining battery?
[BetterBatteryStats] rknight68:
We have att repeaters at my work. Before they installed them my att phone died quickly each day. After install, battery life went way up. The other day they were down and battery life was crap for everyone, so yea poor signal is a battery drain for sure
[BetterBatteryStats] Karpfenhai:
Nevertheless you should sign out location services and disable maps autorun you will not use any manual opened functionality!

I myself navigated today about 400 miles with gps enabled and i only got 10! Wakeups from maps in total.

Try it and you will see, you got nothing to loose anyway..

Btw, I'm save back home.. :D

Tapatalked from my Samsung GT9100
[BetterBatteryStats] adinpop:
I cant get to much from here! thanks anyway
[BetterBatteryStats] chamonix:
Well first: maps does wifi sniffing so turning wifi off will stop that from happening

Second: you focus on maps but your reasoning does not cover wifi rx wakeups, turning wifi off when screen is off is in that far different from the wifi policy.

My reasoning is based on observations. As we don't have the sources of maps that's the best way to go imho
[BetterBatteryStats] chamonix:
As requested: the new release will be up tomorrow (here and on play). Expect a little surprise
[BetterBatteryStats] gogol:
Then could you please tell me how do I get the CPU reading?

What should I do?

All the ref are the same, Since charged, unplugged, etc.

I simply cant get the CPU reading.

It used to be working fine before.

And I dont change anything nor the way I use my phone.

Rebooted, reinstalled, all the same issue.

Thanks.
[BetterBatteryStats] chamonix:
Then could you please tell me how do I get the CPU reading?

What should I do?

All the ref are the same, Since charged, unplugged, etc.

I simply cant get the CPU reading.

It used to be working fine before.

And I dont change anything nor the way I use my phone.

Rebooted, reinstalled, all the same issue.

Thanks.[/QUOTE]

Use latest RC or wait for final release tomorrow, use the reference that is available (since boot, since unplugged if you have unplugged) or raw CPU states.

As I told you before reinstalling won't solve your issue.

Edit: how to get a reading

1. select an available reference

2. select the stat type "cpu states"
[BetterBatteryStats] Karpfenhai:
Im so exited, can't wait for my surprise! :D

Tapatalked from my Samsung GT9100
[BetterBatteryStats] honest1212:
Help me to analyse my bbs log......

http://pastebin.com/GZRa7XG9