yashsingh1/xdaforums huggingface dataset:
[BetterBatteryStats] Hawaiihemd:
Attachment issue in second post

Hey folks,

Is anyone able to download an attachment from second post?

For me every download is failing on multiple devices...

BTW thanks again [MENTION=1330150]chamonix[/MENTION] for providing a xda-edition of your great app!
[BetterBatteryStats] githyanki:
XDA has been having issues with attachments for some lately, but it worked for me just now.
[BetterBatteryStats] woodman:
Downloading from post #2 works fine for me. Tested with BetterBatteryStats_xdaedition_2.2.1.0.apk
[BetterBatteryStats] Hawaiihemd:
Hmm strange. Still failing for me... Maybe there are different servers for different locations. I just realized I have the same problem on the LMT launcher thread.

Well, I'll wait a few days before filing a report. Someone might still be working at it. Thanks guys.
[BetterBatteryStats] artibart:
Hello :)

Please forgive me if this has already been discussed but since the last update I encounter some issue - there are no stats listed in summary tab - have a look at imgur.com/YsnXt1d.png

Please notice that this problem started with the newest version - previously I had stats colleted but now - nothing is there.

Anyone knows how to solve this?

artibart
[BetterBatteryStats] dimm0k:
[MENTION=1330150]chamonix[/MENTION] created a catlog on Nougat along with the BBS logs... hopefully this tells you why stats aren't being collected. one thing to note is that if I restart my device BBS may or may not start collecting stats again so sometimes it works sometimes it doesn't...
[BetterBatteryStats] woodman:
Welcome to XDA!

Yes already discussed, you should have searched first before posting.

Also, post #1 explains how to report bugs (among other very useful info as usual in OPs). Your screenshot is good but really not enough, you have to provide logs, phone model, android version and the exact version number of BBS because "latest" could mean nothing in some cases, etc.

PS: also be sure you have fully charged the phone before unplugging and watching stats.
[BetterBatteryStats] artibart:
:o Roger that!

In fact it was my guilt - I should have first read the very first post.

As far as I understand correctly I should now wait patiently for releasing 2.2.1 version of BBS unless I want to use beta version from xda testers :)

Thanks for keeping order here! :good:

Regards,

artibart
[BetterBatteryStats] gvp9000:
"no stats have been collected yet" message fixed in Summary tab in v2.2.1.0 !!!!

Not fixed in Sensors tab !!!

thank you.

note3, android 4.3, no-root
[BetterBatteryStats] GeNiO790:
Hi, the links required

wakeup_sources:

https://www.dropbox.com/s/g32t516ubj...p_sources?dl=0

Dumpfile:

https://dl.dropboxusercontent.com/u...s/BetterBatteryStats-2017-01-04_161808361.txt

Thanks!
[BetterBatteryStats] MysticGolem:
I have installed BBS v2.2.1.0 over an older version of BBS.

I am running a Galaxy S4, Android 4.4.2, with root.

I can't see any sensor stats, it states "no stats have been collected yet".

I have also installed BBS 2.2.1.0 on a Note 3, not sure which version of Android using the non rooted method with adb and the app works. I did not see any sensor stats.

I am quite impressed with the adb commands and how it allowed the BBS to work without needing root. Is this a viable way to get rooted apps to work without needing root?
[BetterBatteryStats] papakitou:
Good evening.. What is going on here?

Amy sync is disabled, auto updates, backups all disabled
[BetterBatteryStats] BainStain:
Hey there. Would anyone be able to assist me with my battery life?

I have been reading up on the wakelock information on this thread but still don't feel confident in diagnosing any problems. Here's what I got for today.

If it helps to know I am using the Nexus 6p with the Megapixel ROM and Elemental X (Glassfish 2.1 Kernal)

Thanks in advance for any help!
[BetterBatteryStats] githyanki:
Screen On (): 3 h 4 m 55 s 46.4%

Please provide an idle log of about 6 hours and less than a minute of screen on time.

Using the phone makes it impossible for us to tell what wakelocks are needed for your normal use, and which ones are excessive.
[BetterBatteryStats] BainStain:
So is that the logcat you're looking for? Essentially I would charge the phone up and just leave it for 6 hours?
[BetterBatteryStats] githyanki:
No, just the bbs dump. The log would only be used if you were reporting a issue with bbs, so I don't think it is needed if your wanting stats looked at.

Yes, charge your phone, unplug it and let it sit for 6 hours. Probably while you sleep.
[BetterBatteryStats] BainStain:
Thanks so much. I will do that and come back tomorrow. Also does BBS automatically take a new set of data each time you unplug it? Is that how I would get the data for 6 hours of idle? And same for the 1 minute log?
[BetterBatteryStats] x.trinity:
Yes

Sent from my RedmiNote3Pro[kenzo]
[BetterBatteryStats] githyanki:
Yes, that's how you do it.

The one minute screen on is so you can unlock screen, open bbs and save log. It is not a separate log.
[BetterBatteryStats] BainStain:
I have attached the new dump which includes an idle of 5 1/2 hours. Thanks everyone!
[BetterBatteryStats] Freezy202:
->bglr-gcm-scheduler (com.facebook.katana.Facebook): 13 m 15 s Count:31 4.1%

As far as I can see one of your battery drain culprits is the facebook app. You can greenify the app, when you don't use it, you can replace it by your browser or a wrapper
[BetterBatteryStats] BainStain:
Okay thank you! What is a wrapper?

Is Facebook the main culprit for battery drainage?
[BetterBatteryStats] Der-Knuffi:
Or just delete it and do Facebook via the browser. Did you grant the app access to your location? Then it checks it again and again.

Gesendet von meinem ONEPLUS A3003 mit Tapatalk
[BetterBatteryStats] BainStain:
Okay I just disabled location. I always thought it was weird when it told me other people were nearby anyway haha!
[BetterBatteryStats] Freezy202:
Compared to all your app wakelocks, it causes the highest drainage.

A wrapper is an app that transforms the webpage of Facebook and many other apps into an app interface. Examples are "Metal for Facebook" or "Swipe for Facebook". Just look it up on the Playstore :)
[BetterBatteryStats] _Kosmas_:
If no kernel or sensor wakelocks to be displayed debug fs must be mounted like this:

in terminal

su

mntP=$(grep /sys/kernel/debug /proc/mounts | awk '{print $2}')
if [[ "${mntP}" != "/sys/kernel/debug" ]]
then
mount -t debugfs none /sys/kernel/debug
fi

Thanks to [MENTION=4729623]benschhold[/MENTION] for this workaround
[BetterBatteryStats] githyanki:
It is the main one that you can do anything about. Other drains would need Xposed (Which is not out for 7.1.1) or trying different roms/kernels.

You could try greenify or leandroid to try and lower battery usage, I use both on 7.1.1 and have not experienced any issues and they seem to help.
[BetterBatteryStats] solar666:
Thanks man.

Tried this on nougat at OPO and works fine.
[BetterBatteryStats] DB126:
Hermit is another option that will work with most major sites (AMP wrapper).
[BetterBatteryStats] Ex-Cavator:
Hello!

I tried Stock Rom with Android 5.1, CM13, Lineage OS.. And always I have battery drain about 8-10% per night (~8 hours)

Now I have installed custom kernel on latest Lineage OS Build and have same battery drain again (more then hour kernel wakelocks)

Needs your help!
[BetterBatteryStats] jukyO:
Weird. I notice same issue, kernel stats not collected in 7.1 Roms:

OnePlus One, TugaPower ROM

OnePlus Two, seraph08 Unofficial LinOS

OnePlus Two, Aicp ROM, also based on LinOS sources.

What are usual files in /sys/kernel/debug? Naming is?
[BetterBatteryStats] chamonix:
2.2.2 is up, addressing missing sensor stats for pre-lolipop devices. If the feedback is positive that version goes to google play
[BetterBatteryStats] chamonix:
Still no joy accessing the wakeup_sources file but looking at the dumpfile Build.DEVICE is not in the list of the devices bbs takes special (LG) care of. I have added it to the code so you can expect the next build to attempt to fix the problem. I am just waiting for feedback on 2.2.2 to push it to gplay and them I will push 2.2.3 with the LG kernel wakelocks fix.
[BetterBatteryStats] gvp9000:
2.2.2 all work fine

Note3 android 4.3 noroot
[BetterBatteryStats] chamonix:
I would like your feedback on following topics:

- 2.2.2 fixing the pre-lolipop issues for "summary" and "sensor" stats

- 2.2.2 fixing the missing LG kernel wakelocks

What am I working on right now? (in order of priority)

1. converting my toolchain to android studio: almost done, I just need to add the variant for building the xda-edition

2. test automation and automatic builds using circleCI: works in principle, need to add more tests and device coverage

3. adding application analytics: I will used hockey for that

-> with these three steps I will be have the "safe" environment I need for conducting experiments. Expect more frequent releases once I have this is place...
[BetterBatteryStats] lepa71:
Summary and sensors are showing up on 2.2.2 in S3 TW 4.3

One thing I found is that about screen is not scrollable and cuts off at the bottom.

Thanks for hard work.
[BetterBatteryStats] gvp9000:
Ive played a lot with 2.2.2 and i noticed that sometimes the description in sensor tab is missing

Note3 android 4.3 noroot
[BetterBatteryStats] championc:
I have a feeling that i'm losing alot of battery through my lg g3 having a poor connection to the mobile network. The signal goes quite low and seems to frequently disconnect.

What item in BBS can i use to find out if this is indeed the case ?
[BetterBatteryStats] chamonix:
I added issue #792
[BetterBatteryStats] rbt2008:
Hi Guys,

Did a full wipe and clean install of Android 7.1.1 (Pure Nexus) and Ex Kernel for Lg Nexus 5X and suffering from NETLINK wakelock (~74000 wakelocks per night). I have installed couple of applications that uses network (Skype, VK), not so much. Never had such behavior before on 6.0.1 with the same kernel.

Maybe someone facing similar issues?

Here is the dump (7 hours of sleep): View attachment BetterBatteryStats.txt
[BetterBatteryStats] GeNiO790:
I still have the problem. The statistics seem to reset as shown by screenshoot attachments:

Screenshot_1

Screenshot_2

also enclose:

Dumpfile

logcat

dmesg

if you need to try to solve the problem!

At your service for any request! Thank you!
[BetterBatteryStats] Plonkplonk:
I'm using version 2.2.2 a few days now on my Fire Phone (running KitKat, LineageOS/CM11). Everything is fine now, I get stats of every kind.
[BetterBatteryStats] githyanki:
Do you use a wireless charger, or plug your phone in occasionally?

Try changing to charged instead of unplugged.
[BetterBatteryStats] nabla79:
The only statistics I can see are "since boot". The other ones are not available. Why? OnePlus 3T rooted. Thanks

Inviato dal mio ONEPLUS A3003 utilizzando Tapatalk
[BetterBatteryStats] Portgas D. Ace:
Maybe you haven't plugged in your charger since last boot. Try plugging in your charger for some seconds, then disconnect and check if the other options are still unavailable.
[BetterBatteryStats] cekerevac:
I want to understand...but I need someone who have knowledge to help me....thanks
[BetterBatteryStats] :
Strange. Installed 1.6RC and my power button when used to wake up the screen would reboot the phone every time. Reverted to 1.5.1 and no issue.

GT-I9100 (SGSII)

CM9 (Experimental)

Could provide you with a kmesg and/or dmesg if you'd like.
[BetterBatteryStats] chamonix:
I assume you are on ICS. I will try fixing the height without affecting the other Android versions (issue #98)
[BetterBatteryStats] chamonix:
Thanks for the feedback.

Looking at your observations and knowing that this wakelock is related to fetching the battery info I tend to believe the same: those wakelocks are not a cause but an effect and we have overlapping wakelocks here.

What leads me to think that:

- the kernel wakelocks show a high amount of wlan_rx_wake. rx wake is known to happen when incoming packets wake up the phone

- your alarms show a huge amount of wakeups for com.morrison.applock. Now I don't know what this app does exactly but those alarms may be the result of your phone waking up a lot (or it's the cause, I can't decide yet).

What I suggest is to remove one part of the equation by getting rid of rx wakes. This should be easily done by turning off wifi or at least setting the policy to "off when screen off".

Beside having a kernel wakelock less (for now) we should be able to get a better understanding about:

- are the sec-battery wakelocks just a result of your phone waking up and keeping it awake a little longer than if there would be no wakelock

- do the alarms related to applock go down as well? that would put that as an effect and not a root cause. If not then we have another candidate worth inspecting closer

I also hope being able to fix 1.6 fast enough in order to look at the partial wakelocks in the next round. What we should be after is the app that may be the cause of wlan_wake (if no applock).

And thank you for the testing and precise feedback on 1.6RC1, I have taken those up. I just have a doubt about your observation on "screen on" and will do some forther testing. If I can't confirm this may be a further clue about what goes on on your phone. I will double check as unfortunately that data is accessed using a non-public api and devs are changing the constants used behind the scenes to map the series with the data (see https://github.com/asksven/AndroidC.../common/privateapiproxies/HistoryItemIcs.java and https://github.com/asksven/AndroidC...oid/common/privateapiproxies/HistoryItem.java if you want to have some fun)
[BetterBatteryStats] dhrv:
only explanation i found was:

>> expire_count, tells you how many times the timeout expired. For the

>> input event wakelock in the android kernel (which has a timeout) an

>> expire count that matches the count tells you that someone opened an

>> input device but is not reading from it (this has happened several

>> times).

can anybody please provide a better description of c/wc/ec?

thanks!
[BetterBatteryStats] chamonix:
V1.6RC2

1.6RC2 is up (second post).

Fixes:

- refresh

- dump has partial wakelocks again

- height of spinners on ICS increased

- fixed calc of alarms items (details) for references

Enjoy!
[BetterBatteryStats] mariotme:
Thank you chamonix way much better like that ;)
[BetterBatteryStats] SkoreK89:
Hi, why the time from stock battery monitor included in android, and from BetterBatteryStats are different? I play Pocket Legends, but with the other apps is the same situation. Samsung i9100
[BetterBatteryStats] chamonix:
I found a bug in RC2: under some circumstances when BBS wasn't granted SuperUser rights yet SuperUser's dialog pops up behind the readme dialog and BBS stalls.

It is a quite theroretical situation but I think I am able to reproduce it and will fix it in another RC before release. But first I let you guys test a little :)
[BetterBatteryStats] M@31:
Ok, Im back!!

Deep Sleep - 95%

Resting time - 7 hours 58 minutes

Percentage Drained - 12%

I kept the wifi on, just to keep the test as reliable as possible.

Again, for some reason the vbus present is still showing 15%.

Even though it was unplugged the whole time....

Thanks so much for your time!
[BetterBatteryStats] BenKranged:
"vbus_present"

I'm looking for some information about "vbus_present".

Every reference to "vbus_present" I could find searching XDA basically says "this only runs when the device is plugged in".

According to BetterBatteryStats that information is wrong.

Does anyone know why "vbus_present" would run for 14 hours

since unplugged

?
[BetterBatteryStats] chamonix:
You are right, BBS does not interpret it just parses the exiting records (/proc/wakelocks). The only interpretation is by substracting the reference count/times from the current count/times in order to get the values "since....".

Now from what you describe there is still one thing I don't get. My understanding of what we have found out so far is, that applock is causing wakeups. Each of this wakeup causes in turn the kernel to access the battery info causing sec-battery wakelocks on the alternate kernel you have been using.

If that is correct I expect applock to "misbehave" the same with the stock kernel but without the sec-battery wakelocks side effect. And this is the part I am missing from your secord reading. Can you confirm or tell me where I am wrong.
[BetterBatteryStats] chamonix:
vbus_present is indeed caused when USB is connected. Obviously this is not the case in your reading what is weird but not impossible in case the wakelock is not released properly upon unplug, causing the wakelock to stick. If you see the post above your you can see that you are not the only one in that case. Are you on a custom ROM/kernel?

To rule out any bug in BBS I would like you to do following:

- reboot your phone

- plug / unplug USB

- leave it alone for a while

- check in BBS in "since unplugged" to see if the wakelock is still there

- check in "more-raw kernel wakelocks" to see if the figures there are consistent to the ones from "since unplugged"
[BetterBatteryStats] chamonix:
Thw count on that wakelock are puzzling me. Could you please check "more-raw kernel wakelocks" to see if the figures (time/counts) are consistent to the screenshot (just to rule out a bug).

If it is consistent we need to find the reason why your kernel believes that USB is connected. For that couly you please dump a dmesg:

adb shell
dmesg > /sdcard/dmesg.txt

and post that file. I hope we can see something in the kernel logs suggesting plug/unplug actions. If we find that we will have the cause and can talk to the right kernel dev for the cure
[BetterBatteryStats] chamonix:
Witout transkation I am not sure of the values shown on the right screenshot but in BBS you can see that the figures are processor seconds "since unplugged". Afaik the stock stats are "since boot" so that would be the first difference.
[BetterBatteryStats] :
LOL, complete muppet moment on my part. I'm guessing that the reboot fixed it...could have sworn I did that immediately after installing the apk.

Edit: and the height of the drop downs is perfect; thanks.
[BetterBatteryStats] nabla79:
Are the battery statistics kept also after a reboot? I would expect to see the statistics since I charged my phone last time, even if I rebooted it one or more time. Is it not possible?

Inviato dal mio ONEPLUS A3003 utilizzando Tapatalk
[BetterBatteryStats] Portgas D. Ace:
A reboot will trigger the stats to be reseted.
[BetterBatteryStats] GeNiO790:
I don't use wireless charging.

Anyway, I tried to change the reference from unplugged to charged, but doesn't change anything!
[BetterBatteryStats] dimm0k:
^^^^ [MENTION=1330150]chamonix[/MENTION] ^^^^ any luck with this set of logs?
[BetterBatteryStats] championc:
Bump please
[BetterBatteryStats] sakis_the_fraud:
hello!

last few days i noticed that something was wrong with the battery, so last night i decided to check it.

here are the results, kernel wakelock suspend_backoff seems to be the issue.

BUT I don't know how to fix it.

any help on this, or at least how to narrow down to a specific app or service?

thank you!
[BetterBatteryStats] kartik93:
I cannot get kernel wakelocks
[BetterBatteryStats] gvp9000:
Stats not displayed correctly when custom ref. is selected

See screenshots 8 min since unplugged, 2 days since custom.
[BetterBatteryStats] gerardo87:
I have this service that is draining my battery "service.odtcfactory.sec.com.odtcfactoryservice" anyone knows what is that or if I can freeze it without problems? Unfortunately Google doesn't help a lot

Screenshot:

Inviato dal mio SM-G930F utilizzando Tapatalk
[BetterBatteryStats] kchristianc22:
Why can stats be inconsistent while charging (according to your app)? Does this mean that apps like Wakelock Detector show inconsistent stats since you can view stats while charging by default? (There is a "statistics since unplug" setting in Wakelock Detector, but it isn't working.)
[BetterBatteryStats] ZDeuce2:
Phones react differently while charging, it allows some things that normally wouldn't wake while on battery to to stay awake on charge. So it will look like something has a wakelock issue when it's only awake because your phone is charging. So you can't get a true reading while charging. Nor do you need one. You only want your readings per discharge cycle.
[BetterBatteryStats] papakitou:
Good evening..

Is anybody know how can I restrict these huge wakelocks? Measurement and action check queue
[BetterBatteryStats] sleepyg72786:
Would you happen to be using Verizon? It seems like it may be something related to that according to a Google search using "service.odtcfactory". The info I'm referring to is on a forum that requires you to register to view topics... But I just thought that this may be a helpful clue. If you're not using Verizon then I'm not sure either. Maybe GSam could show which processes are related to it.
[BetterBatteryStats] Midnightkid:
event0 and event2 battery drain ?

Hi,

First of all, as this is my first post, I would like to thank you XDA people for your constant help and attention and, in this case, specially to BBS dev Chamonix for his excellent work. Although I am not active, I usually check this forum to learn new things about my devices.

So, here comes my question:

Recently, I have clean-flashed Sultan CM13 ROM in my Oneplus One device. Although an excellent ROM, I have recently experimented some battery issues and I can't identify the source. The main suspects, IMO, are in Kernel Wakelocks section: event0-866 and event2-866.

Can anybody help me to determine the source of the battery drain, please?.

Thanks in advance for your help and attention.

Here are the links (thanks to githyanki):

Dump: pastebin.com/wtZKZWWg

Dmesg: pastebin.com/bG2x0m21
[BetterBatteryStats] githyanki:
Use pastebin and post the link here. Your new enough that you cant post links, so leave https off.
[BetterBatteryStats] Midnightkid:
Thanks. I edited my original message. Hope it helps.
[BetterBatteryStats] githyanki:
Screen On (): 2 h 32 m 45 s 21.8%

Please post an idle dump. We cannot tell what is a drain on battery and what was normal usage.

Charge phone to 100%, unplug and do not use for 6+ hrs then make a BBS log.
[BetterBatteryStats] championc:
I'm running 2.2.2 on my LG G3 running MM rom (Fulmics 6.6). I appear to have an issue with weak mobile signal which i think is draining my battery.

My phone is unplugged for 6h 18m and No or Unknown signal is showing 5h 40m. While i know that signal is bad (showing one bar most of the time), it's not disconnected and searching for a signal.

Am i misreading the stat i'm referring to ?
[BetterBatteryStats] chamonix:
Yes I found something, also related to a hint that I got from another xda user:

01-03 09:24:58.771 E/JavaBinder(17425): !!! FAILED BINDER TRANSACTION !!! (parcel size = 88)

01-03 09:24:58.772 E/BatteryStatsProxy(17425): An exception occured in BatteryStatsProxy(). Message: Transaction failed on small parcel; remote process probably died

It seems that the way stats are retrieved sometimes hit a size limitation and are discarded. This would also explain why sometimes it works and sometimes it doesn't. There should be a way for me to work around that but I have some things that I do not completely understand yet so I asked some questions. Hopefully details will help adopting a size-neutral approach.
[BetterBatteryStats] chamonix:
When Wifi is on Android reports no or unknown signal as data on the cell radio is turned off in such cases
[BetterBatteryStats] championc:
Thanks. I will turn off wifi for a few hours today to get a better result so
[BetterBatteryStats] chamonix:
Stats are inconsistent while charging because some counters do not run in that state. This is the reaon you have to tick a box in the advanced settings to have any stats while charging at a first place. With default settings no stats are not shown for this very reason.