yashsingh1/xdaforums huggingface dataset:
[BetterBatteryStats] shaggyskunk:
I'm puzzled - With the recent updates to the xda-edition (stock Unrooted Samsung) When I first click on the BBS icon I get System App Screen with the list of adb commands (all of which have been added) But it's not until I click on back that BBS normal screen UI appears?

Edit: I uninstalled the xda-edition of BBS and ran the three adb commands again and it seems to have fixed the issue ?

Sent from my SM-G955W ??
[BetterBatteryStats] simplex1987:
Hi guys, I've a Samsung Galaxy S7 edge with Android 7.0 and the buildnumber G935FXXS1DQKH. I'm not satisfied with my battery life. What I could I do to improve my battery life?
[BetterBatteryStats] nahoku:
My fault... ref 1.... I copied and pasted the command from the first page of thread. I actually eliminated the "_xdaedition" in all commands when I issued the commands.

Ok, I'll try the beta and see how it goes. Thanks!
[BetterBatteryStats] chamonix:
Well it's as you prefer. Just let me know if you will start working on a pr or if I should so that we don't both ;)
[BetterBatteryStats] nahoku:
Well, I installed the beta from Playstore version 2.3-205 (on my non-rooted Note 4, KK 4.4.4)

Applying adb .... adb -d shell pm grant com.asksven.betterbatterystats android.permission.BATTERY_STATS... I get this...

Operation not allowed: java.lang.SecurityException: Permission android.permission.BATTERY_STATS is not a changeable permission type

I even restarted the phone, cleared cache in recovery, revoked debugging permissions (and allowed again), and still got the same error after attempting adb. Not looking good.
[BetterBatteryStats] azsl1326:
Where can I find the recent update of the XDA app? I looked in the OP, but it appears that it's still v2.2.2.0.

Thanks.
[BetterBatteryStats] shaggyskunk:
Go to Post #2 and Click on & sign up for the Current Test Releases ?

Sent from my SM-G955W ??
[BetterBatteryStats] Osid:
I'm a lazy developer so, better if you should start working on :D
[BetterBatteryStats] KokkoM:
Oukitel k10000 pro:
[BetterBatteryStats] hawkdown77:
I always wants this phone!!! It worth?
[BetterBatteryStats] chamonix:
I never killed any part of GSF, have an SGS2 and a GN, haven't disabled anything vital (I want a smart phone) and enjoy 2+ days on a low activity profile and 18+ hours with screen on of about 4 hours and high activity on my GN.

Right now I am at 13 hours on battery, 36 minutes of screen on (low usage day), 1 hour 18 minutes awake and 75% battery left.

GSF woke up my phone 54 times in 13 hours and I am happy with that. The only thing I don't use is latitude to update my location (using ALTitude instead, search the forum if interested) and location stuff does not show up on my partial wakelocks.
[BetterBatteryStats] chamonix:
Please check if your dump is complete before posting next time. I know the reason for 25% of your wakelocks because it jumped into my face when I opened the dump.

Have you looked into it?
[BetterBatteryStats] chamonix:
No BBS can't freeze any apps, that's beyond monitoring and I stick to what BBS does the best. You could use titanium for that, or any other of the many tools offering freeze/unfreeze
[BetterBatteryStats] chamonix:
Whatapp is a know drainer. Most of the problem comes from it syncing your contacts and the last time I tried disabling that (from seetings - accounts) it kept turning itself on so I tossed it.

Now looking at your dump:

Awake (): 1 h 27 m 35 s (5255 s) Ratio: 48.9%
Screen On (): 1 h 12 m 24 s (4344 s) Ratio: 40.4%
================
Kernel Wakelocks
================
"PowerManagerService" (): 8 m 4 s (484 s) Cnt:(c/wc/ec)450/0/0 4.5%

15 minutes awake with screen of, 8 minutes of that can be accounted to partial wakelocks, most of the rest seemed related to network traffic.

Due to the high amount of screen on to total time I believe that this reading is not representative.

Could you try to re-run a test with your phone unused so we can have a dump that does not contain wakelocks that may be accounted to you using the phone (like the audio one)
[BetterBatteryStats] Karish1989:
Hey,

Hmmm I just checked it, and this is the full dump (what is missing) :(... uhh yes I looked ito it but still I don't know what to do :( ... I searched it on XDA but found nothing relevant

Edit: I just disabled my back-up :) (first problem dismissed? )
[BetterBatteryStats] Icey34:
Added 1 more dump file here and on my last post there's like 3-4. Down to 70% after 1h 28min. 3g for 30 minutes and wi-fi the rest idle. Again, I'm using 2100mah battery, francoturtle kernel (bettery battery supposedly) and AOKP. With hotplug so 1 core shuts down when I lock phone and when I unlock it that core unlocks and back to 2 cores.
[BetterBatteryStats] jeremysherriff:
Can you edit that post and remove all the screenshots? Post attachments instead (image attachemnts convert into clickable thumbnails), but screenshotss rarely give any assistance other than making us scroll a half-mile and chew up data allocations.
[BetterBatteryStats] chamonix:
I see a pattern here:

Since 1 h 2 m 46 s
Awake (): 44 m 58 s (2698 s) Ratio: 71.6%
Screen On (): 40 m 9 s (2409 s) Ratio: 64.0%

In one hour your phone has been awake 45 minutes, 40 of them due to screen being on and 4 minutes it could have been in deep sleep but was not.

If you were using the phone then this would be normal but if you weren't this is a place to start.

Unfortunately the reference for kernel and alarms were not present so some critical information is missing. Can you switch to "since unplugged" and make sure kernel wakelocks and alarms have a proper references before re-posting
[BetterBatteryStats] Icey34:
What do you mean by that? Do you want a dump or a screenshot, of bbstats or battery use?

And sorry for all the huge screenshots, will post thumbnails next.

Lost 5% more and it's been idle. With WiFi. These idle drains really suck, and my 4g isn't even working atm, verizon is getting it fixed for me.

My Alarm App is Alarm Clock Xtreme Free if it helps.
[BetterBatteryStats] superbobup:
i believe you just go to BBS-> preferences and set the default stat type (i usually do "since unplugged")

also, try doing a dump for a longer period of time when the phone is not in use (take it off the charger before you sleep then leave it idle and get a dump in the morning)

also, "alarms" do not mean your alarm app. i think it's a reference for the alarms that Android is causing...you can check under "more" to see a better idea i think
[BetterBatteryStats] jeremysherriff:
Correct. That's the sort of dump we need - charge, then let idle for a few hours, dump from BBS using "since unplugged" view and menu->dump to file option.
[BetterBatteryStats] Sincitybronze:
This may not matter because I'm using a Froyo ROM but v1.6.1 preferences don't survive a reboot for me.
[BetterBatteryStats] glennkaonang:
So what's the best way to lower down these gtalk reconnect wakeups?

I've been very frustrated with this. I even downgraded to GB but the issue still persists although the battery life in GB seems better. But still I believe this gtalk reconnect wakeups drain my battery.

Here's what I did:

1. Unchecked "automatically sign in" in Talk.

2. Signed out from Talk

3. Cleared Talk data

However I can confirm that gtalk reconnect wakeups are still annoyingly showing up.

One thing that can stop it from showing up is what I did earlier (disabling parts of GSF).

But yeah I also think it's not the best idea.

That's why I'm asking how I can stop these gtalk reconnect wakeups.

Thanks a lot.
[BetterBatteryStats] jeremysherriff:
They don't need to be stopped, they are usually not the cause of battery drain. The GTALK data transport is used by all sorts of Google apps and system components - and it's a Google OS so it's really deep inside.

How about you take a BBS reading after charging and then leaving idle, post the dump file up, and we can take a look?
[BetterBatteryStats] glennkaonang:
Alright, I'll post the dump file later today.

Thanks for the advice.
[BetterBatteryStats] -viperboy-:
Not sure if you've gotten this report before but when the phone is plugged in, BBS asks for su permissions alot, about every 30 seconds. Doesn't do it when its not plugged in.
[BetterBatteryStats] chamonix:
What version are you using? This was fixed in 1.6.1
[BetterBatteryStats] chamonix:
That's definitely not normal as prefs are written to the appear data directory.

Could you do a ls -l of the directory before and after the boot so we can check timestamps.
[BetterBatteryStats] Karish1989:
Hey chamonix,

Mine battery is atm 6% ... I have made a dump file.

I hope this one is good :D

I hope that you can help me!

Ps. I am on mike's 7.0 rom
[BetterBatteryStats] glennkaonang:
After 6 hours and 30 minutes, I was on 48% from full charge.

Here's my dump file. I didn't have long time having the phone idling (only 4 hours with little texting and messaging, no gaming nor browsing at all).

After 4 hours I did some browsing.

Could someone take a look at it and tell me if there's something wrong?

Thanks a lot.

EDIT: Added some screenshots and newer dump file.
[BetterBatteryStats] KokkoM:
Yes, it is :) only minus is weight, but it's BigBattery is worth it. I have two of these :)
[BetterBatteryStats] Bestsniper:
job.delay

My battery drained horribly while sleeping, losing 5% in 7h. attached my BBS log file , please help

*job.delay* kill my battery , i couldn't find the source of this issue

My is LG G6 H870
[BetterBatteryStats] nahoku:
Well, I've tried several things without success trying to get BBS to work on my non-rooted Note 4 on Kitkat 4.4.4

I have no idea why I keep getting the same error message no matter which version of BBS I install (Playstore or XDA version). It's so weird that it works on my spare Note 4 (Lollipop) and my work Note 4 (Marshmallow). I even tried the XDA version on my non-rooted Note 10.1 2014 tablet on KK 4.4.4 and got the same error.

Operation not allowed: java.lang.SecurityException: Permission android.permission.BATTERY_STATS is not a changeable permission type

Must be something with Kitkat that's very different from LP and MM.

Time to give up?
[BetterBatteryStats] DB126:
It is possible to grant the required permission(s) for BBS to run on unrooted Android 4.4.4. At one time I had such a beast and was able to work through the ADB command (only one at the time) w/o issue. I suspect the the custom Android build Samsung uses on Galaxy devices is the issue vs. KitKat in general. Also possible Verizon layered on some additional restrictions although that seems unlikely.

Might give GSAM a whirl. You'll need to grant special permissions to that app as well but the developer uses a slightly different approach. GSAM is a solid battery monitor app that presents info in a different manner than BBS. I recommend and use both (sometime together on the same device) depending on the situation. Good luck.
[BetterBatteryStats] nixie2121:
anyone see anything? oneplus 5t, seems ok during the day, I go to sleep around 10pm at 90% battery, wake up 5:25am at 45%?
[BetterBatteryStats] DeeZee3000:
I am experiencing a funny problem with BBS.

I set it to give a notification if device is awake for more than 10% of screen off time.

Most of the time it works. But sometimes it reports my phone is awake for 2600-8300% of the time...

I guess, that would explain why SGS7Es have such crappy battery life... :rolleyes:

Or maybe it's just the fact, Samsung really srewed up something inside the "Android System" packages, what with them using 34% of total battery, and thus literally halving the battery life.
[BetterBatteryStats] TNSMANI:
The dump provided is not an 'idle dump'. It has over 7 minutes of 'screen on' time. Please generate a fresh dump with less than one minute of 'screen on' time.

---------- Post added at 03:18 PM ---------- Previous post was at 03:11 PM ----------

As per the screenshot, the 'screen on' time is more than double the time of the dump itself. The readings are not correct. Clear data and cache of BBS, uninstall it, reboot and reinstall it. Then attempt taking a fresh 'idle dump' for 6+ hours. Search how to make it and attach it here. The logcat is not useful for what we are attempting.
[BetterBatteryStats] 93fuelslut:
Hold up Willis!
[BetterBatteryStats] chamonix:
Fix for BT: https://github.com/asksven/BetterBatteryStats/commit/f3816a78c0497b2bceae95df8ca708807286a3fe

Better fix for Doze Mode Idle time reporting: https://github.com/asksven/BetterBatteryStats/commit/b14d889a9f31b4b42ec39560c7861a4b785e5f0c
[BetterBatteryStats] adm1jtg:
Android 8.1 beltz room Nexus 6 rooted with magisk .15.3... Bbs even beta version can never get stats. Can't set a reference try to refresh. If I refresh it just spins without getting a reference If I force stop and start enough times since in a while it will see reference properly but not sure it works right after that.

Tried the latest from playstore and also latest xda version. Any thoughts or ideas? If it's working on Jan patch 8.1 for others I will more closely look at my setup.
[BetterBatteryStats] shaggyskunk:
[MENTION=1330150]chamonix[/MENTION]

On Stock Unrooted Samsung Galaxy S8+ with permissions granted with adb - On the Play Store version I can Select Charged - Unplugged & Boot from the Dropdown - But on the XDA version I can only select from Unplugged or Charged - I'm pretty sure that I entered the correct adb commands for both the Play Store and the XDA versions... Did I miss something?

Thanks ?

Sent from my SM-G955W ??
[BetterBatteryStats] chamonix:
Jan patch on p2xl on 8.1 unrooted working fine. I would recommend latest beta and un-granting root.
[BetterBatteryStats] chamonix:
The references are created upon certain events; e.g. "on boot" will not be available as long as your device was not booted after installing BBS. You also should make sure that BBS is not "optimized" (under settings - battery optimization) as being optimized may result in android deciding not to pass all events (like screen on/off, plugged/unplugged) to BBS
[BetterBatteryStats] Eversmile23:
No kernel wakelock displayed.

I do not see anything inside ' Kernel Wakelock' tab. Why is it so?
[BetterBatteryStats] TNSMANI:
Without providing any information about your setup, how do you think that someone will be able to help you?

Also use the search function and read atleast the last couple of pages.
[BetterBatteryStats] adm1jtg:
Tried that and still not working, stats never get gathered and reference will never get set.

When I say tried that I mean as follows:

revoked root privs to bbs... same issue (expected)

added in adb commands to grant permissions... same issue

unloaded and reloaded app from playstore (Yes I joined beta group)... same issue

unloaded playstore version and loaded xda version (latest beta).... same issue

Both reloads were tested with and without root enabled. I simply cannot make it work
[BetterBatteryStats] rignfool:
I will bet that you have some kind of lock on your device...

If I understand what I've read correctly... No information gets passed to any app until the screen is unlocked for the first time...

Since boot happens before you can unlock... And ON_BOOT has passed... BBS never gets the reference?

[MENTION=1330150]chamonix[/MENTION]
[BetterBatteryStats] jukyO:
[MENTION=1330150]chamonix[/MENTION]

I have none of these 2 locations in my system.

As a consequence, kernel wakelocks are not shown.

What should I tell to rom/kernel developer?
[BetterBatteryStats] adm1jtg:
Nope had tested boot and removed the slide to lock I had enabled and still same.

It appears like somehow EX-Kernel manager is the culprit. I removed it and things are better. Getting stats now. Will continue to monitor. Thanks to everyone for the help. I just didnt think another app would be the cause.
[BetterBatteryStats] chamonix:
Just to confirm before I request for debug logs: does the raw stats deliver data?
[BetterBatteryStats] chamonix:
Ask him if if the kernel writes wakelocks (and if not why) and what permissions are set on the path
[BetterBatteryStats] rignfool:
I have a similar issue... If not the same... And raw stats always works...
[BetterBatteryStats] chamonix:
Have you already check FAQ #15?
[BetterBatteryStats] chamonix:
Have you already checked FAQ #15?
[BetterBatteryStats] rignfool:
Yeah... Did that like 3 days ago...

It let's the unplugged reference be created no problem... But ON_BOOT is super hit or miss... I got it once...

I am assuming it's FBE keeping the info secret until first unlock... But I'm no dev

And you don't want logs from me because I'm using xposed... And I reboot so little that unplugged is more than adequate for me...
[BetterBatteryStats] Plutonium0587:
[MENTION=1330150]chamonix[/MENTION]

I would greatly appreciate you looking over this dumpfile for me. I did an overnight untouched drain. Thanks!

https://www.dropbox.com/s/ycmtb4i2j4h6ugp/BetterBatteryStats-2018-01-27_092942940.txt?dl=0
[BetterBatteryStats] chamonix:
You may still want to look at logcat tag "OnBootHandler" and message "Received Broadcast" for the on_boot broadcast receiver as well as for tag "WriteBootRefService" and message "Called at ...." to see what may have been gone wrong writing the "on boot" reference.
[BetterBatteryStats] chamonix:
In a nutshell:

causes for wakeups: com.samsung.android.app.aodservice (every 2 minutes): try finding the samsung app responsible for that and think about you are willing to pay the price

Causes for staying awake: wlan_rx_wake: this is your phone having wifi on all the time and being woken up by broadcasts/multicasts from the network, most probably UPnP

CastSocketMultiplexer_WakeLock (Google Play services): potentially related to wlan_rx_wake, google points at chromecast traffic
[BetterBatteryStats] kventura:
Operation not allowed: java.lang.SecurityException: Package com.asksven.betterbatterystats has not requested permission android.permission.PACKAGE_USAGE_STATS

Any help with this?
[BetterBatteryStats] shaggyskunk:
What device?

Does your computer "see" the phone?

Did you use adb commands to enable BBS for non Root?

Which version of BBS - Play Store or XDA?

You can find the adb commands for both versions along with how to setup adb and USB Debugging here:

http://better.asksven.org/nonroot-devices/

?

Sent from my SM-G955W ??
[BetterBatteryStats] adm1jtg:
Sorry it has taken so long to reply, thought I had resolved the issue by removing ex kernel manager but that only let it get stats one time then it had all the same issues again. Did a further test, Loaded up Dirty Unicorns 12 (oreo rc version) for the N6 (Shamu). Loaded no apps at all and still could not get a reference on bbs. Reloading my beltz backup now. let me know what more I can provide as have been using BBS for years as a paid user and really miss it.

One last note I tested Ex-kernel managers battery stats as well as accubattery and both work fine for battery stats, and yes I tested BBS without any of those present to be sure they were not the cause of these issues (on beltz), and as stated earlier the DU test had no apps ever loaded at all.
[BetterBatteryStats] sirxdroid:
Pixel 2 XL rooted w/ Magisk 15.3, BBS XDA version 2.3-214 (91) from hockeyapp

It doesn't seem to work well at all on my phone. Refreshing data takes forever, it just spins and spins, then I get stats that show everything at 100% on the summary screen. I enabled the watchdog set to the defaults 30% threshold and 10 min. and I get alerts with some crazy numbers like 1800%

Are these known problems with the P2XL and Oreo 8.1?
[BetterBatteryStats] adm1jtg:
As I listed earlier I am also having issues and actually they are as you describe, I just wasn't patient enough. Can you try something for me... load up some kernel manager program (I use a modded kamod) and turn selinux to permissive. For me bbs is running much better now since I did that I would be curious to see if it helps you as well. Refresh still takes forever but it seems to properly gather stats in background, just dont refresh :)

Update: Never-mind just like when I uninstalled ex-kernel manager changing selinux to permissive made bbs work for a short time but now it is doing the same thing again, completely unable to set a reference, so I dont know what to do now. I simply cannot make it work reliably and consistently.
[BetterBatteryStats] rootSU:
I am getting terrible IDLE battery life on cellular 4G data, OnePlus 3 with OpenBeta 30.

I have disabled "SchedulerInternalReceiver" and "SchedulerReceiver" services in Myandroidtools, still net_scheduler wakelock seems to be there.

Log attached.
[BetterBatteryStats] sirxdroid:
I ended up uninstalling it because it doesn't work right. Been using it on a lot of Nexus devices before and while it was not bug free, it was useful. Hopefully a new version will be released soon that addresses these issues.
[BetterBatteryStats] TNSMANI:
Are you on Kitkat? I remember Chamonix saying that Kitkat or pre-Kitkat (or MM, I don't exactly remember) doesn't require this permission.

Read a few pages back or search this thread.

---------- Post added at 02:23 PM ---------- Previous post was at 01:55 PM ----------

Netscheduler is the least of your worries. Much more is going on.

Do you require Location to be on when the phone sleeps? Also check the setting of wifi and BT scans in Location under Settings. If you are on 4G or 3G switch to 2G during sleep and check, since the strength of the signal may be causing some issues.

alarmtimer (): 1 h 16 m 37 s Cnt:(c/wc/ec)2294/2294/2294 25.4% Check which setting is causing this.

Android system is running riot behind the scene.

Whatsapp is another.

What are the widgets that are set to update often?

Lot of background downloads on mobile data by Android system, PlayServices, Whatsapp, Kaspersky etc.

PlayServices also caused the Significant Motion Detector to be awake for more than two hours. Check what setting is causing this.
[BetterBatteryStats] adm1jtg:
Yeah, did the same this will be the first time in years I wont be running BBS on my phone
[BetterBatteryStats] Eversmile23:
Plz suggest if any further improvement can be done.

I am uploading my device dump files. Please suggest if any further improvement is possible. 'Kernel wakelock'section does not show anything.

1.

https://drive.google.com/file/d/1pJwEIZIpRMCxP7qnTBcD9FAMfK_M9Fpx/view?usp=drivesdk

2.

https://drive.google.com/file/d/1B7m_D9rzM80qsSC47MaOlyp7V-HFA0d0/view?usp=drivesdk

3.

https://drive.google.com/file/d/1QxWMpXoceY4dmkFaxdy-k2syXYWZ7QDY/view?usp=drivesdk
[BetterBatteryStats] stylemessiah:
Same here, latest private build, takes ages to do anything on Oreo 8.1 and no data. First time I've ever not run it..
[BetterBatteryStats] rootSU:
Oh, that much is going on. :eek:

This all started only after I updated to OB30, it was fine with OB29.

Standby time on Wifi is still pretty OK, but as soon as I switch to cellular network, it wreakes havoc like this.

Don't need location, but it shouldn't be this bad with it switched on. Have switched off the scanning now, both were switched on.

I have a couple of widgets which auto-updates, though they are greenified. Google Now and Weather are the one that aren't though.

Will check for Motion Detection, can't say what's causing this.

Let me check and post the results again after tonight.
[BetterBatteryStats] jukyO:
Hello!

[MENTION=1330150]chamonix[/MENTION]

Overnight, had a drain of 18 % in 8.5 hours.

Can you please check collected logs, as well as screenshots taken?

GDrive location:

https://drive.google.com/folderview?id=1kSwOGVVjMEq7oZ0IKmKkw9LZ9vnzIVkn

Thank you in advance!
[BetterBatteryStats] chamonix:
How about helping me fix it? I won't deny that there is an issue but it seems to be specific to certain settings that I can not reproduce. A debug logcat and a dumpfile would help
[BetterBatteryStats] Newtac:
Am i blind or what? :cyclops: i cant find the download link :confused::crying:
[BetterBatteryStats] peterlee928:
hello... big fan of this app. but lately ive been getting the following issues:

1) notifications will show crazy %s (eg 491% awake while screen off)

2) screen on is sporadically available in the "to" section

ive attached my dmesg and logcat for reference.

any guidance would be greatly appreciated.

much thanks in advance :)