yashsingh1/xdaforums huggingface dataset:
[BetterBatteryStats] gene.pavlovsky:
I've been using BBS for a few years already. Just got a new phone, Motorola Moto G3 (Osprey), rooted it and installed

Resurrection Remix 5.7.3 (CM13-based). I also have XPosed installed, with only Greenify module active, I have Aggressive Doze enabled in Greenify settings.

I'm getting very strange, basically useless, partial wakelock data.

Attached are example screenshots in the morning, after the phone spent all night idle.

As you can see on the attached screenshots, phone was in deep sleep almost all night, Awake (screen off) is only 10 minutes.

However if I open the Partial Wakelocks info, there are several >2 hour wakelocks listed in there, with multiple unrelated apps having almost same wakelock time (which is hard to imagine).

On some other days when I had higher-than-expected awake times, the partial wakelock information was as useless as this. Didn't take screenshots, unfortunately.
[BetterBatteryStats] Oswald Boelcke:
Duplicated (?) *alarms* and *launch*

I apologise if you've already seen the attached idle dump at a different thread. My intention isn't to double-post but to share these observations:

This has been my reply to tnsmani:

Has anybody else observed this behaviour, and could it be an issue that started to occur with RC3?
[BetterBatteryStats] DB126:
- There may (emphasize *may*) be a reporting issue with BBS 2.2 RC3; see related post by [MENTION=7408621]noc.jfcbs[/MENTION] (here)

- Keep in mind requested and actual wakelock durations are not the same thing. Former represents a max value; receiver (service/app that does the work) determines the actual value. Not sure if/how this plays into what you are seeing; just commenting.
[BetterBatteryStats] Nimueh:
Those *alarm* and *launch* PWLs are caused by some CM13 roms. My S4 earlier this year had them on just about every custom rom, I didn't have them at all on my LG G5 with stock or custom stock roms and not on the vanilla CM13 rom, I do however have them again on the CM based RR rom.

The built-in wakelock blocker can limit them to some extent but not elimate them completely. They don't use any battery and don't keep the device awake either, so I'm not really concerned - but BBS definitely isn't causing them :)
[BetterBatteryStats] Oswald Boelcke:
I appreciate the hint, thank you very much in deed. However, I haven't changed my ROM (RR v5.7.4 by @rodman01 in his "special" Sammy edition {http://xdaforums.com/showpost.php?p=51612693&postcount=3}) and actually my whole system configuration since middle of September 2016. I didn't observe the described "phanomenon" in the very beginning, it had just occured for the last about two weeks - about the time I installed BBS RC3.

Personally, I guess it might be a valid assumption or probably only a speculation that the indicated *alarms* and *launch* are not ROM related but BBS RC3.

Actually, I don't mind as nothing fights my attempt to increase my battery's duration - it's simply annoying; and I'm convinced something just duplicates what-so-ever.
[BetterBatteryStats] gene.pavlovsky:
I'm using RR (CM13-based) ROM as well, and seeing those too. I didn't enable the built-in Wakelock Blocker, however I'm using Amplify. I froze Amplify for testing, though, and the partial wakelocks I was seeing (I posted a screenshot a few posts earlier) are quire useless.

My point is those spurious partial wakelocks, while not using any battery, made it impossible to troubleshoot misbehaving apps, when one day my idle awake time was much higher than usual.
[BetterBatteryStats] Nimueh:
I've used the same version of BBS on my G5 with custom stock rom, vanilla CM13 and now RR based on CM13 - only RR has those PWLs, so I'm pretty sure BBS isn't the root of this evil :D

I don't think there's any app that I have only used on RR - on the contrary, due to it having so many options to customize it I'm using less now than I was before. Plus I haven't had the S4 since May this year and it also had those PWLs (on multiple different custom roms) long before BBS R3 came out, so I'm convinced the CM13 base is causing it .... somehow :eek:
[BetterBatteryStats] gene.pavlovsky:
It looks like it *may* very well be related.

I was under the impression that BBS displays the actual wakelock durations, is that wrong?

Anyway, when actual overnight awake time is 10 minutes, seeing 2-hour long wakelocks in Partial Wakelocks is very unexpected. I certainly never had anything like it in the past (that was back when I used Android 4.3 on another phone).
[BetterBatteryStats] DB126:
I have no idea which value BBS displays. Not sure how it would know how long the service took to complete a task but it may be able to tell if/when the wakelock was released assuming the underlying service is well behaved and notifies the receiver it is done. Really a developer topic.

Yup - the latter shouldn't exceed the former IMO.
[BetterBatteryStats] prakashkushwaha74:
If anybody can help me out.

17 % overnight with no wakelock rather than RILJ.
[BetterBatteryStats] gene.pavlovsky:
Couple more screenshots, same issue with *launch* and *alarm* and bunch of different wakelocks, all with the same unrealistic time (actual awake time was 22 minutes).
[BetterBatteryStats] rignfool:
Not to piss on [MENTION=1330150]chamonix[/MENTION]'s thread... But...

You're using a ROM with the wakelock blocker... If you're gonna have it... Use it...

Those wakelocks mean nothing... It's the Android system not knowing how to deal with alarms... Due to the wakelock vlocker
[BetterBatteryStats] gene.pavlovsky:
Wakelock blocker is not enabled in the system settings. I use Amplify (just the default settings), actually I tested without Amplify too and it's not a big difference in awake time. Are you saying the built-in wakelock blocker is creating this stats confusion, even when it's disabled?
[BetterBatteryStats] rignfool:
Yes... It has to do with how the wakelock blocker works...

Something to do with intercepting the alarms...
[BetterBatteryStats] DB126:
So curiosity peaked - referring to Privacy Guard?
[BetterBatteryStats] rignfool:
No... Usually that's the wakelock blocker feature available in many 6.0 roms
[BetterBatteryStats] Nimueh:
So the mere fact that the wakelock blocker exists is what causes the wakelocks?

Wow that's weird - thanks though, at least now I know where they come from. :)
[BetterBatteryStats] alanid:
I'm using the paid version of BBS from the play store and have been having problems since upgrading to 7.0 (Pure Nexus). I flashed the provided zip to install BBS as a system app but I still can't get any info on Alarms/Network ("No stats have been collected yet") or Kernel Wakelocks ("File could not be read"). Any advice?
[BetterBatteryStats] kyzn:
The latest version does not need to be installed as a system app. I'm also on PN and BBS works fine installed as a normal apk.
[BetterBatteryStats] alanid:
That's odd. I installed BBS directly from the play store on my Nexus 6, and when launching the app immediately got an error about permissions and the option to "Install as system app", and once that failed, prompted to download the zip and flash it in recovery.
[BetterBatteryStats] kyzn:
Are you rooted? Sign up for BBS beta. RC3 removes the need for system installation.
[BetterBatteryStats] alanid:
I just removed the system app, signed up for the beta, and installed BBS fresh. Everything is working again (rooted N6)! Thanks so much!
[BetterBatteryStats] chamonix:
Make sure that you use the beta from gplay
[BetterBatteryStats] TNSMANI:
You have these in alarms:

Alarms: 13, Intent: com.google.android.gms/.checkin.EventLogServiceReceiver

Alarms: 8, Intent: CONTEXT_MANAGER_ALARM_WAKEUP_308590

Alarms: 0, Intent: com.google.android.gms.common.download.START

Alarms: 9, Intent: com.google.android.gms.gcm.ACTION_CHECK_QUEUE

Alarms: 15, Intent: com.google.android.intent.action.GCM_RECONNECT

Alarms: 4, Intent: com.android.providers.calendar.intent.CalendarProvider2

See this guide: http://xdaforums.com/android/general/guide-0-0-hour-idle-battery-drain-stock-t2973588 Install Amplify and control these alarms and RILJ as advised there.

EDIT: Further, 'boot to current' reading is not ideal since as soon as BBS is loaded, it would start recording alarms and wakelocks. Whereas it takes about 30 seconds for boot to complete and any alarms and wakelocks during that period may also be counted. So next time better charge the battery to 100% and record from 'unplugged to current'.
[BetterBatteryStats] brainvision:
Hi there, I have a small but annoying issue using BBS on my tablet: it always reset battery stats type after each reboot; I use as default the since Charged stats but after rebooting BBS goes to Boot stats type because it lost other stats types. It should an issue of my ROM, not of the app, I guess, but maybe someone else had the same issue in the past and there is some sort of known solution, I hope..

Thanks, see you

Inviato dal mio LG-V400 utilizzando Tapatalk
[BetterBatteryStats] prakashkushwaha74:
With all due respect, thanks for reply.

But... 17% is not a less if i say 5% for booting(actually only 2%) still its 12% is much more than expected, With this simple alarms.

RILJ & few alarm shown already limited

Link you given is for stock ROM's.

Phone : YU yuphoria 5010

Rom : Resurereccurtion RR (cm lettuce based)

Kernel : XESKI 4.0
[BetterBatteryStats] Portgas D. Ace:
The above linked guide can also be applied for custom ROMs. So my recommendation is to follow this guide for better battery life.
[BetterBatteryStats] Oswald Boelcke:
I'm using Resurrection Remix like you, and the linked thread provides superb guidance.
[BetterBatteryStats] TNSMANI:
Apart from what the others have pointed out, you must have patience when you start to unlock your bootloader, root and install custom ROMs. You will have many freezes, crashes etc and to come out of those situations, it is necessary to search and read. I don't know what made you to think that the link I provided was only for stock ROMs. If you had believed somebody who was trying to help you and patiently read through at least the first page of the link I posted, you would have realised that it is relevant for you also.
[BetterBatteryStats] lirong:
Hi I am trying to post a dump file.

I thought the way to do it is choose "Share Data" as Dumpfile from in the app.

But when I email myself the dumpfile and open it, it looks like a messy bunch of text, not at all formatted for consumption like the other dumps I have seen posted. How can I fix that? Thanks.
[BetterBatteryStats] Oswald Boelcke:
3rd paragraph of this post: http://xdaforums.com/showpost.php?p=69077878&postcount=3

Don't use "share with" but "save". And if the txt-file doesn't seem to be formatted it might be related to the application, by which you're opening these file types.

Afterwards, upload the txt-file as an attachment to the regarding XDA thread.
[BetterBatteryStats] lirong:
Thank you for this help.

Over the last couple of months my battery life seems to have degraded significantly. I am routinely getting less than 2 hour Screen Time. I have a Galaxy S4 running the GoldenEye ROM. I generally dont stream much or anything like that - pretty much just email, texting, phone calls and web surfing. I use Nine for emails and I also have Touchdown which I use to synch my calendar.

Often I have noticed that when I check my Battery within System it looks like Chrome is a big user of battery, even though I dont feel like I have spent much time in the app surfing.

Anyway, I have attached a few things that hopefully are helpful - two different dumps from different times this morning. The first was after leaving the phone idle for almost 3 hours, and the second was after about an hour of moderate usage.

Thank you for any advice. I apologize if I didnt do this correctly and am happy to go back an repost any information you might need. Would it be helpful to have screenshots from the app itself?

Thank you!
[BetterBatteryStats] Oswald Boelcke:
If I was of any help simply hit the thanks button in the bottom right corner of the respective post.

I apologise but both logs seem not to be very useful. I suggest to draw the logs in accordance with the guidance in quite a few threads e.g. this one that I also quote below:

http://xdaforums.com/showpost.php?p=65025167&postcount=6
[BetterBatteryStats] lirong:
Thanks you for this reply and sorry if I posted incorrectly. I want to make sure I understand where I fell down here.

I thought that what you describe above is what I had posted, with the exception that I didnt wait 6 hours (the initial post in this thread I think had mentioned 2-3 hours).

But other than that I think I did the following:

- Unplugged and Current selected from the drop down menus

- Chose the Share Data as Dumpfile option and then hit Save

- uploaded the BetterBatteryStats .txt file

Is that all correct and I Just missed the 6 hours time frame? Also what do you mean by "Refer Screenshots" - do you mean I should post screenshots along with the txt file?

Thanks and sorry again didnt want to waste the time of people who are willing to help.
[BetterBatteryStats] githyanki:
Although your dumps are not long enough for a good analysis, you have a lot of wlan wakelocks. Try turning wifi off for one night and get a dump of that also.
[BetterBatteryStats] Oswald Boelcke:
Yeah, you're on the right way... And you don't need to apologise at all. If e.g. I hadn't currently the time I wouldn't answer...

The post I linked explains in total what was meant by "refer screenshots". Just read the post in total. In this case, it refers to explaining screenshots in the post.

Additionally to that what @githyanki recommended, you find here (http://xdaforums.com/showpost.php?p=57507885&postcount=3) even further guidance for the establishment of a good baseline (phone completely off & phone in airplane mode) prior to do the idle dump. As you see, a good examination of your battery's drainage isn't done in one day or night.
[BetterBatteryStats] hmillos:
Hello Guys,

I don't think I'm having weird drains (my phone sleeps like a baby) but I'm not sure I understand screen dark value and its difference with screen dimmed:

Battery Info

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

Level lost [%]: Bat.: -39%(100% to 61%) [4.5%/h]

Voltage lost [mV]: (4368-3882) [55.5%/h]

===========

Other Usage

===========

Deep Sleep (): 6 h 17 m 10 s 71.7%

Awake (Screen Off) (): 33 m 9 s 6.3%

Screen On (): 1 h 55 m 34 s 22.0%

Phone On (): 3 m 12 s 0.6%

Wifi On (): 8 h 45 m 54 s 100.0%

Wifi Running (): 8 h 45 m 54 s 100.0%

Doze Interactive Time (): 1 h 56 m 56 s 22.2%

Sync (): 17 m 23 s 3.3%

Screen dark (): 1 h 53 m 43 s 21.6%

Screen dimmed (): 1 m 18 s 0.2%

Screen medium (): 8 s 0.0%

Screen light (): 12 s 0.0%

Screen bright (): 12 s 0.0%

As you can see, screen has been dark 22% of the time, maybe that % could be reduced in settings?

Also check these Kernel wakelocks

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

Kernel Wakelocks !!! wakeup_sources !!!

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

PowerManagerService.Display (): 1 h 56 m 2 s Cnt:(c/wc/ec)66/0/0 22.1%

PowerManagerService.WakeLocks (): 41 m 49 s Cnt:(c/wc/ec)3937/114/0 8.0%

PowerManagerService.Display () has about the same % as Screen dark.

Finally, do you think this amount of alarms is normal?

com.google.android.gms (): Wakeups: 435 (49.7 / h)

android (): Wakeups: 304 (34.7 / h)

Full report attached.
[BetterBatteryStats] scorpion87bg:
Hey guys I have an xperia Z2 and experiencing a bad Android OS battery drain. It usually happens when I`m traveling and the phone is in my pocket. I am wondering if it would be ok to install betterbatterystats when I see the drain starts(because it's not always) and save the dump file or I should do it the right way charging to 100% and leave it for 6 hours(but if it's sitting on the desk at home probably it's going to be ok).
[BetterBatteryStats] githyanki:
It is hard for us to get a good understanding of what is going on when your using the phone throughout the day.

Use bbs and look at the log and interpret the information. It is actually easier to read the log than look at the pretty graphics.
[BetterBatteryStats] scorpion87bg:
Ok, then I will charge the phone to 100% before I go out and not use it for a couple of hours. I hope the wakeup occurs at this time and I'll save a log. I checked before and as I remember it was suspend_backoff which was mostly keeping the phone awake, but it was months ago, now it can be other thing. Anyway I don't know what is suspend_backoff connected to I searched in google some people say it's something with Chrome I disabled it, I don't use it anyway, but there is no difference.
[BetterBatteryStats] TNSMANI:
What you have attached is an in-use dump. We may not be able to help you much with that. You have to give us an idle dump. Read the last two pages on how to do that.

You seem to have some WiFi issues. Try to assign a static IP for your phone and see if your kernel wakelocks reduce. Else you will have to search for custom kernels.

You are running 7.1.1 so even if we find the offending wakelocks/alarms, you may not be able to control them till Xposed is available for you.
[BetterBatteryStats] hmillos:
Thank you, I will provide another report today. I didn't realize my wifi is running all the time but I use LTE when on my way to work.
[BetterBatteryStats] lirong:
OK thank you for the prior guidance. I think/hope this time I have gotten this right.

I am providing two sets of data - the first one is, as suggested, after approximately 8+ hours of nonuse of the phone. In the event that its at all helpful, I am also including a second dump representing about an hour of "normal" use after the first dump...dont know if thats helpful. Ive also included screen shots of my battery reading at each of the two times I produced the dumps.

Thanks in advance for feedback and advice.
[BetterBatteryStats] githyanki:
Need to keep the usage under 1 minute for an idle log.

Looks like you have lots of awake time due to wlan. Try assigning a static ip, or turning WiFi off while screen off.

wlan_rx_wake" (): 1 h 7 m 45 s Cnt:(c/wc/ec)5923/0/5923 12.5%

"mmc2_detect" (): 25 m 27 s Cnt:(c/wc/ec)5576/0/0 4.7%

"wlan_wd_wake" (): 22 m 38 s Cnt:(c/wc/ec)13320/0/0 4.2%
[BetterBatteryStats] lrishsid:
Please have a look
[BetterBatteryStats] irish-sid:
Please have a look
[BetterBatteryStats] TNSMANI:
You have to update BBS to RC3 from its thread in XDA. Your alarms don't have any detail.

Apart from that, Facebook, WhatsApp, Samsung push, Google app etc have to be limited. Do you require BT to be connected when you sleep? If not, switch it off. If you are not using Amplify, start using it. Many of the wakelocks in your dump can be controlled with it.

After updating BBS, post a fresh idle dump of 6+ hours.
[BetterBatteryStats] irish-sid:
Updated to rc3
[BetterBatteryStats] felipehso:
Hello guys!

I ran an idle test to see how good was my battery, so I left it idle for 6:30h, charged to 100%, then disconnected the charger and only turned the screen to save the BBS dump file. On the app it showed 2.0%/h, which I found a little high for an idle phone. It seems that Google Play Services is the culprit, but can't find the reason.

If anyone could help to see if the drain is normal or high, I'd appreciate [emoji111]

http://cloud.tapatalk.com/s/58286d1b3ad44/BetterBatteryStats-2016-11-13_112743073.txt

Sent from Inferno
[BetterBatteryStats] scorpion87bg:
I also did a test for 6:30h. I couldn't see the normal wakeup which is caused by suspend_backoff. But would like to post the dump file if you have any advises I would appreciate, maybe if I limit some alarms the suspend backoff will go away, cause I'm pretty sure it will appear again at some point just not now(actually it rarely appears from 100%, usually after 1-2 days of use).. I also did a dump after 3 more hours from saving the first one, there is suspend_backoff active for 50s as I can see, which is probably normal. Usually it keeps the phone awake for hours.
[BetterBatteryStats] Singh5:
Please have a look..

http://xdaforums.com/attachment.php?attachmentid=3935932&stc=1&d=1479090074
[BetterBatteryStats] Oswald Boelcke:
Check forum rules! Don't post the same message simultaneously in multiple threads!

Your attachment respective the link isn't working. I assume 'cause you haven't ten posts, yet. Upload the file somewhere into the cloud and post the URL (but without http:// or https://) - but please, post the URL only in one thread of your desire!
[BetterBatteryStats] Singh5:
Thanks ... I can't attached file that why I posted other two
[BetterBatteryStats] TNSMANI:
Sorry for the delayed response. Do as suggested in my earlier reply.

---------- Post added at 07:58 PM ---------- Previous post was at 07:50 PM ----------

As per your dump, your phone did not enter deep sleep at all. Still you had only 2% per hour drain. You also had downloads in the background. Better clean flash your ROM once.

And start using Amplify and follow this guide: http://xdaforums.com/android/general/guide-0-0-hour-idle-battery-drain-stock-t2973588
[BetterBatteryStats] RunLikeHell:
vfsspi_wake_lock

Enviado de meu SM-A800F usando Tapatalk
[BetterBatteryStats] Lither:
I'm getting these wakelocks, is there a way to prevent or reduce it from happening?
[BetterBatteryStats] githyanki:
Follow the guide linked two posts above yours. If you are on N rom, no there nothing you can do until exposed works on N.
[BetterBatteryStats] scorpion87bg:
Guys does anyone have an idea what is causing these kernel wakelocks.?

I installed Amplify, limited some things. I had the alarm set for 7a.m. Left the phone fully charged at 20:30 the previous day, when the alarm rang ~10:30h idle the battery was at 98% - only 2% lost. I was really happy and thought I had the problem resolved. Didn't touch the phone the whole day until an hour ago (24h on battery with only 1 alarm active at the morning) and the battery was at 88%, which means 10% lost for the next 13 hours and when I checked the stats I saw that it was almost 1 hour awake... Really don't know what is causing these annoying kernel wakelocks.
[BetterBatteryStats] felipehso:
Thanks, will install Amplify also. And in BBS, it seems that Sensors is the reason my phone didn't enter deep sleep, as when I enter the Sensor tab it kept Awake almost all the time. Am I correct? And if yes, is there any way to fix that?

Sent from Inferno
[BetterBatteryStats] githyanki:
Greenify has a setting for "Doze on the go" which purports to keep phone sleeping while in motion. I don't know what it changes and haven't really tested to see if it does anything. Franco had an app that modifies doze settings also.
[BetterBatteryStats] felipehso:
Yea, first time I thought it might be that, but when I checked the setting it's switched off, however Aggressive Doze is enabled. Do you think it might be this ?
[BetterBatteryStats] chamonix:
Battery monitor widget is set to store a reading every minutes. That is as you configured it and it causes a wakeup as configured as well. That's the price of active monitoring.

Tasker is causing frequent wakeups as well.

Lightflow would be the next on the list.
[BetterBatteryStats] chamonix:
Kakaotalk is the main drainer here (both on duration and on count).

Vbus_present while unplugged is not supposed to be active and I see some "dhd" wakelocks I don't know that may need some research.

Could you please check usb debugging and in on turn it off, reboot and take another reading after plug/unplug so see if there is any effect.

Also I would like you to use cpuspy to see if your phone is in deep sleep as it is supposed to be most of the time or if a bogus usb plugged detection really causes it to saw awake.

Looking forward to your next reading