yashsingh1/xdaforums huggingface dataset:
[BetterBatteryStats] DB126:
Busy log. Appears device is attempting to enter/remain in deep sleep but is (obviously) unsuccessful. Bluetooth activity may or may not be a contributing factor. General sense is Android 10 (potentially kernel) upgrade did not go well. Might consider rolling back to stock to see if that addresses problem.

---------- Post added at 01:05 PM ---------- Previous post was at 01:00 PM ----------

Logs - nope, nada, rtfm. Others can explain (or you can read yourself).
[BetterBatteryStats] u11boy:
No, unfortunately not. Since the problem prevails even in safe mode and analyzing the BBS log did not reveal any anomalies, I assume that it is a hardware-related issue. I'd appreciate new suggestions though :angel:
[BetterBatteryStats] githyanki:
Your BBS log shows about 2.5 hours use, that will cause your drain.

For any help, your log needs to cover at least 6 hours, and have less than 1 minute screen on time.
[BetterBatteryStats] x-geo:
thanks for your answer, can be before i charge it full, and let it without use all night?
[BetterBatteryStats] githyanki:
Yes, don't need to be charged to full. Either set reference points from screen off to screen on, or set a custom reference point before turning screen off if you don't want to enable the watchdog timer.
[BetterBatteryStats] who ah way:
Very happy with battery life on OnePlus 7 running Android Pie.

But curious to learn to read the BBS stats anyway and understand how tweaks can be made.

Ran the standard "screen OFF to screen ON" test from 95, attaching the results.

Does something stand out to you?
[BetterBatteryStats] strongst:
Read here to compare you're results https://xdaforums.com/oneplus-7/review/screen-time-t3923963

You have 0.3%/h drain which is super good and no need to "tweak" anything.

Attached my dump from Android 10 for reference. But please have a look at here https://xdaforums.com/oneplus-7/review/screen-time-t3923963
[BetterBatteryStats] Oswald Boelcke:
Excellent, I can't say more then [MENTION=613506]strongst[/MENTION] already stated. I wouldn't even try to tweak anything if you're happy with your app portfolio and Google.
[BetterBatteryStats] Sjain11:
I am running op5t on a custom also based 9.0 rom. Often play services top my stock battery stats, higher the consumption higher the idle state of the device.

I am not sure if I am correct, but I do get 5~6 hrs of sot with moderate usage, which is normal for my device, provided it's 2 year old now. So I think that maybe there is some issue with the stock battery stats. Maybe play services topping this list doesn't actually mean it consumed that much. Again i am not sure. But i have tried almost everything that I could think of or what people over various forums have suggested. So in any case, idk what to do next. Better if i just ignore it.
[BetterBatteryStats] Ezito:
Can anyone help me..? The log is a bit old but the drain continues... if it is needed, I can take another log.
[BetterBatteryStats] strongst:
Please provide an proper idle dump, then we'll see what's going on.
[BetterBatteryStats] curiousrom:
Detected problems with API compatibility & Notification

Read post #3 How-to and FAQ > #25 & #26.

"...not sure if it affects the app's functionality in any way?..." - It does not.

***
[BetterBatteryStats] x-geo:
I hope this works....
[BetterBatteryStats] strongst:
Do you have a Google Pixel custom rom installed?

The drain is high compared to the awake time, maybe cause of the custom rom/kernel.

Some apps are awake during sleep:

WhatsApp: 1 h 22 m 53 s

com.clarocolombia.miclaro.Mi Claro: 16 m 46 s

org.thunderdog.challegram.Telegram X): 15 m 43 s
[BetterBatteryStats] x-geo:
Hello, thanks for your answer

No, i dont have a Google pixel custom ROM, i have a Lenovo Z6 pro with original global ROM, with unlocked bootloader and rooted with Magisk 20.1 with some modules
[BetterBatteryStats] DB126:
Android is not the culprit; log clearly shows no outliers other than overall drain. Root cause lies deeper: misbehaving/dirty sensor (check/clean finger print scanner), corrupt/incompatible kernel, flaky Magisk or module installation or failing battery. You may see some relief reflashing ROM if it's not playing nice with kernel or if the latter is included in whatever you are flashing. I'd back out Magisk first...although that doesn't always restore stock behavior. Good luck.
[BetterBatteryStats] DiamondJohn:
Would a test in safe mode be a possible investigation path?
[BetterBatteryStats] DB126:
Unlikely as the scope remains Android minus apps. Trouble lies elsewhere IMHO.
[BetterBatteryStats] zeebee:
Can somebody help me with my Galaxy Tab S4? For 22 hours I have over 10 hours screen off activity from tsp_wakelock - I cant find anything on google with this keyword. The drain seems not so big in this file, but sometimes I lose 30-40% overnight with a 7000mAh battery. Device is normally in flightmode with wifi turned on manually.

https://drive.google.com/open?id=148JKqOzOi3wkYGQn9gyUSMdfppqJqTqh
[BetterBatteryStats] DB126:
Similar to other recent posters issue is (likely) not with Android. No smoking gun in idle log. Noted device has been upgraded to pie which is a yellow flag waving. In the absence of other info I'd fall back to stock [using the backup you created prior to upgrading] to see if the drain persists. 0.3%/hr is a rather poor showing given battery size and radio complement; should be 0.1%/hr or less on that bad boy. Good luck.
[BetterBatteryStats] zeebee:
Thanks, but I cannot downgrade to Oreo as far as I've read because of the signed bootloader. I also did a factory reset, installed no app whatsoever and left everything untouched. But this didn't help either. Maybe I have to wait for a new update and see if the problem vanishes. If not I'll consider buying an iPad.
[BetterBatteryStats] francescod:
I thought it was easy to understand my meaning.

Ofc I, as every senior user, switch-off Wi-Fi when using mobile data, and switch-off mobile data when using Wi-Fi, so, it should be enabled only two more stats, the SOT on Wi-Fi and the SOT over mobile data, other than the usual total SOT, assuming, for those who wanna view these stats, to accurately switch off the connection type not in use. :)

I'm asking this addition, only if it's technically doable by Dev :)
[BetterBatteryStats] DB126:
Probably a good idea given the entry point you're looking at. Just works.
[BetterBatteryStats] cultofluna:
If someone has an idea here...

Getting this wakelock ONLY when I'm turning my phone on airplane mode( ****ing weird)
[BetterBatteryStats] DB126:
Lollipop? Might be time for a refresh.
[BetterBatteryStats] cultofluna:
Refresh???

To Android 11??:D:laugh::laugh::laugh:
[BetterBatteryStats] DB126:
Well, you didn't provide a log so had to go with what was presented. Idle logs are the best way to get assistance with rogue drainers in this thread ... although that wasn't your question.
[BetterBatteryStats] alexbesn:
Hello. Got my phone charging to 80% (I use battery charge limiter), then unplugged it and left it in airplane mode. It lost 20% of battery in 10 hours and I don't understand why. The battery is new (2 weeks old) and I don't see anything strange in the logs. Any clue ?
[BetterBatteryStats] skivnit:
Problem with your battery as your phone slept 99,4% of the time so no draining from apps or anything must be either your battery gauge or your [emoji367] health
[BetterBatteryStats] DB126:
Yep, nothing at Android level. Battery is suspect although it could be hardware.

No need to limit charge to 80% on a mobile device/phone that lives most of its life off the charger unless the battery routinely stays above 80% for prolonged periods (days) or never drops below 40%. Best practice for always plugged-in devices such as laptops has been falsely extended to other gizmos. Temp and charge voltage (speed) have a much greater impact on battery longevity. I use a 'slow' 5W/1A charger overnight and avoid fast charging unless needed for a quick boost.

https://batteryuniversity.com/learn/article/how_to_prolong_lithium_based_batteries
[BetterBatteryStats] DvLAx3l:
Thanks guys, this morning I've clean flashed on both slots the November update and seems the phone like to sleep now, I'll let u know, in the next days I'll take some logs. ??
[BetterBatteryStats] Dr.No.pt:
https://batteryuniversity.com/learn/article/how_to_prolong_lithium_based_batteries

From the link above:

Best practise.
[BetterBatteryStats] DB126:
Sure. Few points:

- well aware of impact of varying voltages

- not going to employ a VR to gain battery longevity beyond expected lifespan of target device (lol)

- in contrast, I do not use any QC variants which use elevated voltage during mid-cycle, even if battery is supposedly optimized for such loading

- good old fast charge (12W max @ 5V) offers the best balance IMHO; I have several aging devices that have retained 80%+ of their rated capacity well beyond 5 years with routine charging; oldest is approaching 8 years! Granted, robust internal design and limited exposure to elevated temps play a big role; batteries in cheap gizmos would have broken down long ago.
[BetterBatteryStats] NickosD:
Some time ago I had issues with the Samsung significant sensor. I managed to narrow it down to the sms permission of Google play services. It even held my device away 5 hours. Turned it off and now the time won't increase. Any ideas on why the sms permission of GPS would need this sensor?
[BetterBatteryStats] DB126:
WAG (with no substantiating evidence): anticipate device use based on motion and make sure all texts and services dependent on SMS permissions are current. On some of my newer devices incoming texts and other priority actions/notifications not subject to doze restrictions can be delayed by a few seconds if the phone is in a prolonged slumber. Move the device and she comes alive! Didn't peak sufficient interest to track down root cause. In your case it would seem something else was a contributor to the prolonged wake periods.
[BetterBatteryStats] ninestarkoko:
Seems like latest beta is working well on S10e (s10 series). I got two or three "API error" crashes but app is usable.

Testing it for a few days and stats are showing all the time, though i can't say if they are reliable and consistent.

I get hundreds of:

com.google.android.location.ALARM_WAKEUP_ACTIVITY_DETECTION

Alarms (> 1 / min ) and hundreds of:

NlpCollectorWakelock

Wakelocks, even though i'm not using Maps nor any other GPS app (and have GPS disabled...).

Any suggestion?

Any other s10 user with same flood of alarms/wakelocks?
[BetterBatteryStats] NickosD:
Test again without the led ring for battery
[BetterBatteryStats] DiamondJohn:
On android, GPS is not the only location provider. You also can get a less accurate location from the cell towers and/or WiFi.
[BetterBatteryStats] TNSMANI:
DiamondJohn is right.

In addition to switching off Location/GPS, turn off wifi and BT scanning in Settings>Location.
[BetterBatteryStats] ninestarkoko:
Tested but I still get the same alarms.

Tested also that, i even disabled emergency location.

Unfortunately the alarms and wakelocks are still there.

Any other idea?
[BetterBatteryStats] pan_pietrek:
Hi, I just made a switch to a Mi 9 Lite with MIUI (Global, 11.3.3, locked BL) from a Redmi Note 4 that always had LINEAGEOS on. Now, with my old phone the overnight idle drain was usually 0.5%, whereas the Mi has 1.5-2%. I'd like it to be at least in the neighbourhood of what the RN4 was capable of.

AFAICT, thera are two sensors that are being used pretty much all the time and the device barely ever deep sleeps. Anyone ever experienced this? Any ideas as to what's preventing deep sleep?

BBS dump: https://pastebin.com/JrRNs8Kz

Thanks.
[BetterBatteryStats] x-geo:
Now, i have make the test with Sync, WiFi, bt,data turned off and got 14% of idle drain

Thanks for your analysis
[BetterBatteryStats] DB126:
What's your idle drain rate? Alarms and wakelocks are irrelevant if nothing is listening at the other end.

---------- Post added at 01:11 PM ---------- Previous post was at 12:55 PM ----------

- couple sensor(s) often associated with games active for most of sampling window

- Google Maps oddly active in background

Temporarily uninstall/disable any games. Make sure maps isn't running. Turn off location services when not in use. Gonna take some trial/error to ID the culprit(s).

---------- Post added at 01:20 PM ---------- Previous post was at 01:11 PM ----------

Device in 'deep sleep' for 97% of sampling window (probably closer to 98% if one excludes ~4-5 min of screen on time). Boils down to bad hardware, bad battery or flawed root. Restore to full stock and see what happens.
[BetterBatteryStats] pan_pietrek:
That'd be my take as well, but I do not have any games installed. What's bothering me as well is that "Uslugi telefonu" (com.android.phone) tapping the sar_detector (whatever it is) all the time.
[BetterBatteryStats] Sjain11:
Hey

I have found new hope for my old play services drain, and i think it will help many. Initial results are promising.

My bbs stats show that play services is constantly using some sensors (significant motion detector).

In android 10,there is an option to disable all sensors in developer options. So i turned it on last night, and battery drain was less than 2 % in 4 hrs, compared to 1% per hour usually, with volte and 4g data on. I would get more accurate stats later on.

There's a qs tile available to activate it.

What I want to ask is, is there a way to automatically enable it every time the screen goes off, and then disable it when screen goes on, without any user input?
[BetterBatteryStats] pan_pietrek:
OK, I went ahead and just removed that Xiaomi Games crap, (adb shell pm uninstall -k --user 0 com.facebook.appmanager).

The wakeups stopped immediatelly and both the game rotation sensor and the sar_sensor are not being pegged anymore.

Then I want ahead and removed some more bloatware as well :)

I think that Xiaomi games app was keeping the phone awake and other processess were just using that to process their stuff, causing the other sensors and wakelocks, because from their perspective the system was not sleeping either way.
[BetterBatteryStats] mrjuniork:
I'd also be interested in finding a way to toggle the qs tile for sensors off with an adb command for example. With an app like xposed edge it'd be possible to assign a terminal command to the mentioned qs tile. The question remains, if there is one. I found that android source regarding that developer setting, but couldn't find a satisfying answer to do this manually. Maybe someone way more adb-savvy could chime in here?

https://source.android.com/devices/sensors/sensors-off
[BetterBatteryStats] Nasvyazi:
Please help with getting the app to work!

Samsung S10 with Android 9, rooted, XPrivacy installed, a firewall installed.

BBS v. 2.5-341 and also tested 2.4-265.

Upon the first run of BBS I granted root access to it. I also granted all permissions the program asked for. I granted everything to BBS in XPrivacy and the firewall.

BBS does not work. It shows "No stats have been collected yet".

BBS shows all permissions as granted BUT the following:

BATTERY_STATS granted

STATUS: Failed: Transaction failed on small parcel; remote process probably died

The rest permissions show up granted.

What can be wrong with it? What to try?

How to troubleshoot?
[BetterBatteryStats] igorrj:
Same issue here with S10+ Exynos.
[BetterBatteryStats] Sjain11:
I spent hours searching for an answer. Didn't find one.

I tried juggling in tasker, macrodroid, automate it, shortcutter to find a way of automating the process upon screen off/on or to find a shortcut for sensors options in dev settings so that tasker or the likes would toggle that shortcut.

I tried searching over the web and in tasker /macrodroid forums. I have also posted a query in tasker thread. Let's see if someone replies.

Only thing that i am afraid about disabling sensors while screen off is that notifications might stop coming when device is idle. But as it seems, no one can tell what exactly would happen until this option is explored further.

I am on unofficial carbon rom 10 for op5t. Installing Xposed via magisk fails to boot. So Xposed isn't an option for me
[BetterBatteryStats] RANJITH THRISSUR:
I'm on one plus 7 pro 10.0.2 with xxx. No limit room

9.3 and smurf kernel. Earlier i was getting idle drain as low as 0.2% per hour. But today, it's 1% . What could be the reason ? Ironically, in both situations, awake(screen off time are pretty much the same!!) Who could be the culprit??

Please help me

1st screenshot is when I was getting 0.2% drain.

How it can change so suddenly?
[BetterBatteryStats] RANJITH THRISSUR:
With reference to the above post, i have dump file for both occasions attached...Please help. It could be help ful to many android 10 users, especially one plus 7 pro community.

I would love to get that 0.2% back!
[BetterBatteryStats] Nasvyazi:
Just a followup to my previous message.

BBS started to work just by itself. After laying down on my table for the second night it started showing values and "No stats have been collected yet" disappeared.

The app permissions now show STATUS: Success (fallback)

All this is a mystery.
[BetterBatteryStats] Sjain11:
To anyone interested,

I created a new post in tasker sub forums asking for help regarding the same. And some helpful guy suggested a way.

See the attached ss.

If someone tries it and gets success, do reply back here
[BetterBatteryStats] m0han:
yes, he always does - all over on xda. this is the post: https://xdaforums.com/showpost.php?p=81020457&postcount=4.
[BetterBatteryStats] Dr.M.Shaltout:
help needed

Hi everyone

I just tried to install BBS on my non-rooted samsung m30s running on android 9 one ui core

the app installed ok and I granted it the permissions needed and checked it in the advanced tab all 3 permissons were granted but selinux not granted then i performed the api compatibility commands

Tried to check the app it gave me no stats have been collected

And it gave me pop up saying can't load from to please refresh and i refreshed and the same occured no stats have been collected

Please help me and I don't want to root my device

dump file

https://xdaforums.com/attachment.php?attachmentid=4887851&d=1574837835
[BetterBatteryStats] Dr.M.Shaltout:
I downloaded the beta and granted it the permissions already using adb

And returned this to me

BATTERY_STATS granted

STATUS: Failed: transaction failed on small parcel; remote process probably died
[BetterBatteryStats] RANJITH THRISSUR:
Can somebody help me with this dump files? They look similar to me, but idle drain is very different..

Thanks in advance
[BetterBatteryStats] DB126:
Screen on time exceeds 1m in both dumps and is over 6m in the one showing higher drain. Unusable for idle analysis but likely explains discrepancy. Enjoy your device; it's doing fine.
[BetterBatteryStats] Dr.M.Shaltout:
Can Somebody help me with this please? My device never goes to deep sleep on gsam
[BetterBatteryStats] planck0815:
I did not make it work either. I have read a lot and thought the problems would be resolved for the S10, but I have not found clear statements or instructions anywhere. I tried everything that came to mind, unfortunately no success so far.

SM-G973F, Stock ASIG, rooted
[BetterBatteryStats] Dr.M.Shaltout:
I'm using the built in running services in developer options to kill unwanted processes but I stop all unwanted processes not knowing which causes the wake lock

I thing the problem is lying in the SElinux not set to permissive

Are you rooted to try switching the selinux to permissive?

I just bought about 3 days ago and still trying it out for a month "refund period in my country:laugh::laugh:" and I can't root untill then
[BetterBatteryStats] TNSMANI:
Neither of the dumps are idle dumps. Please read the OP on how to produce an idle dump, especially the part about saving the dump as soon as you unlock the phone. The screen on time should be as less as possible and in any case less than one minute.

The major difference between the dumps already produced is screen on time. The one with 0.3% drain has 1 mt and 46 seconds and the second one has 6 mt 31 sec. No wonder the drain is higher.

Take a proper idle dump and attach it so that we can analyse it.
[BetterBatteryStats] planck0815:
Weird. For some reason, it is working right now. Latest beta version 2.5-344, installed yesterday.

Strange.
[BetterBatteryStats] Dr.M.Shaltout:
I was just logging in to tell You that.... Enjoy friend now I"M KEEPING THE DEVICE:laugh::laugh::silly::silly:

---------- Post added at 02:34 PM ---------- Previous post was at 01:57 PM ----------

Stopped Again with the same on accessing battery stats Failed

and also gsam lost its access to BATTERY_STATS

It needs some looking into by the developers if they have the time. It will be much appreciated. and I don't mind buying the app from play store once it works on my mobile as appreciation to the effort done and it really benefits me

thnx in advance
[BetterBatteryStats] planck0815:
Mine has stopped working too. I will try again when I made the update to 10.

Also interesting was the following status while it was running (STATUS: Success (Fallback)):
[BetterBatteryStats] Dr.M.Shaltout:
It gave me the same status also

Is there anyone gonna help us or a way to contact [MENTION=1330150]chamonix[/MENTION] to try and make it work?

Have you tried switching the selinux to permissive by using selinux switcher app?
[BetterBatteryStats] planck0815:
Now that I have done the update to Android 10, everything works as expected, right from the beginning.

There must have been other reasons for the malfunction.
[BetterBatteryStats] Dr.M.Shaltout:
Congrats. Happy time hunting wake locks

I hope it will work on my phone someday

Thnx for the update
[BetterBatteryStats] igorrj:
Is It exynos or snapdragon?
[BetterBatteryStats] planck0815:
It is Exynos (SM-G973F).
[BetterBatteryStats] igorrj:
How about now after some days of usage? Still showing all tasks in BBS?
[BetterBatteryStats] planck0815:
Everything's fine.
[BetterBatteryStats] reneftw:
Hello.

Does anyone have an idea of why the bbs app just shows a white screen when I start it? I tried using different builds, the same thing happens with every one. I'm using s10+ with android 9.
[BetterBatteryStats] shaggyskunk:
Did you try Clearing Cache & Data for BBS?

You Rooted or using adb?

Works fine on my S10+ running One UI Beta v2.0 (Beta 7) ?
[BetterBatteryStats] reneftw:
I am rooted running HadesRom v. 2.5.

I tried clearing data and cache multiple times.
[BetterBatteryStats] shaggyskunk:
Perhaps it's a Rom issue? I don't know why it might be - But I've never had any issues with BBS on any Samsung devices - Running any Roms & Rooted or not...

Sent from my SM-G975W Running One UI Beta v2.0 ??
[BetterBatteryStats] darkony:
Hi, anyone has a solution for Samsung Note 10+ (non-rooted), ADB wasn't enough?

On RAW I get "battery info service could not be contacted"
[BetterBatteryStats] sjamie:
For some strange reason, BBS is no longer properly resetting once the batter is charged to 100%. I pulled my fully charged phone (OP5 on OOS Pie) of the charger about 10 minutes ago yet BBS shows it has been 14 hours since last unplug. Anyone have a solution?
[BetterBatteryStats] mrjuniork:
Have you tried clearing app data?
[BetterBatteryStats] sjamie:
No but I've uninstalled and reinstalled BBS many times and different versions.
[BetterBatteryStats] who ah way:
3% in three minutes… what is going on?

For the second time this week, out of the blue, the phone went into "superfast discharge mode".

This time I caught it just in time and took a three-minute battery stats dump, where battery dropped by three percent!

Rebooting seems to temporarily fix things.

I realize this is not the standard dump from 95% because while this is happening I can't even recharge to 95% (turning off the phone fixes the issue), but this is not a wakelock question.

Would someone be willing to tell me if they see a clue in this dump?

Thanks in advance.

Thinking there's probably a noxious app that needs to be uninstalled.

EDIT: out of precaution, uninstalled "Alarm Clock For Me", which was at the top of the process list even though I didn't even open the app.