yashsingh1/xdaforums huggingface dataset:
[BetterBatteryStats] githyanki:
You set the phone down and don't touch it for over 6 hours.. As soon as you turn the screen on, take BBS dump.
[BetterBatteryStats] deloj:
Ok.. a new dump file with less than 30 sec screen on time... smh.
[BetterBatteryStats] deloj:
Ok. Thats exactly what I did when I uploaded my dump files. The screen was off for 6 hours without me touching it. I dont get it.
[BetterBatteryStats] DB126:
Dump shows 75 min of "screen on" time over 9¼ hour sampling window. Either BBS is borked or the device is being used.
[BetterBatteryStats] githyanki:
He posted a new dump 3 minutes after being told that he was doing it wrong, I don't think that he had enough time to create a proper idle log, so did not look at it.
[BetterBatteryStats] DB126:
Thanks - I was referencing the log in this post; 75 min of screen on time.
[BetterBatteryStats] TNSMANI:
What you can do is open BBS, set the references from 'screen off' to 'screen on' and lock the screen. After 6+ hours, unlock the phone, check that the references are still showing 'screen off' to 'screen on' and immediately save the dump. The period between your unlocking the phone and saving the dump should be less than 1 minute.
[BetterBatteryStats] lm089:
32% wake time during screen off?

I'm pretty new to BBS, so currently I'm trying out varisous things and settings. Installed it because I have the feeling that my Xperia TabletZ's Deep Sleep periods could be much longer.

The other day I enabled watchdog and now every time after I wake the tablet after some sleep time I receive messages that watchdog observed around 32 - 34% of wake time when screen was off.

Following OP I let the tablet sleep for 7.5 hrs then set BBS to Screen Off >> Screen ON, then pulled a dump.

Dump tells me something about 5 hrs or 68% Deep Sleep, and I wonder what processes could keep the device awake for 2.5 hrs.

Added the dump here. If someone with more experience than myself could find the time to look at it I's be very happy. And if the dump is useless because of (whatever) let me know and I'll create a differnt one.

Thanks in advance!
[BetterBatteryStats] strongst:
Dump is OK, and the drain is 0,5%/h which is very good.

But there's a mmc1_detect kernel wakelock(awake for over 1h) which causes the wakelock you observed imo. Do you have an sd card inserted? If yes, try again without it or change it.
[BetterBatteryStats] lm089:
Wow, that was quick! :good:

I've seen that wakelock but didn't know what that could mean.

Yes, I'm using an sd card. I'll try without it overnight.

========= UPDATE =========

another test session for 6hrs 46 min, this time wothout SD card. Dump looks very similar to me: drain is near perfect, but still nearly 2 hrs out of the nearly 7 recorded in this dump are "Awake (Screen off)" with the same process ("mmc1_detect") being responsible for the bigger part of it.

Should I simply accept that, or is it worth diving deeper?
[BetterBatteryStats] githyanki:
With .4%/hr drain, I would not spend too much time on it.

If you have a different kernel you could try on your rom, that's worth an experiment, or see of anyone knows what's going on with that in your device thread.

In the end, even of you find a solution for this, you probably won't see much improvement in idle drain, so don't spend too much time/energy on it.
[BetterBatteryStats] deloj:
Ok guys heres my bbs. I did as you asked which was to switch to screen off, screen on and turn screen off undisturbed for at least 6 hours. Would appreciate your feedback..

.
[BetterBatteryStats] DB126:
Adding to [MENTION=1631192]githyanki[/MENTION]'s excellent response, many devices idle very efficiently even if technically not in "deep sleep". Don't get too hung up over states and nomenclature. Average idle hourly drain is generally all that matters ITRW. 0.4%/hr is quite good. :)
[BetterBatteryStats] deloj:
My bbs is attached. Let me know what you think guys...
[BetterBatteryStats] TNSMANI:
The only issue I see is related to wifi. Otherwise, your drain of 0.5% per hour is good. If there are other devices, especially printers, connected to the wifi, switch them off for a night and take another dump. For good measure reset your wifi router.
[BetterBatteryStats] ianmacd:
Actually, I don't even see an SELinux denial. All I see is this:

05-14 10:52:29.838 18319 8672 W BatteryStatsProxy: Unable to read statistics stream
05-14 10:52:29.838 18319 8672 W BatteryStatsProxy: java.io.IOException: read failed: EACCES (Permission denied)

but there's no associated SELinux violation.

I see only one denial in the whole logcat, but it's half an hour later and caused by something unrelated.
[BetterBatteryStats] deloj:
0.5% per hour sounds good. But if you think my wifi may be a bit problematic I can modify the build.prop to reduce the rate that wifi scans. What do you think of this?
[BetterBatteryStats] 7ewis:
I keep getting an error on the OnePlus 6T, running latest firmware, latest version of app.

Just randomly says: "BBS Unexpectedly Quit'. I've sent the report a few times. Any ideas if I can fix?

---------- Post added at 12:03 AM ---------- Previous post was at 12:03 AM ----------

I keep getting an error on the OnePlus 6T, running latest firmware, latest version of app.

Just randomly says: "BBS Unexpectedly Quit'. I've sent the report a few times. Any ideas if I can fix?
[BetterBatteryStats] TNSMANI:
It is not your phone that is at fault here. So reducing the time between scans is not going to help.

What makes your wifi router to send packets of data to the phone disturbing its sleep, is the question here. I suspect a printer since it is a known violator. It may also be other devices on the same wifi network. So as I said earlier, disconnect all other devices for one night, reset your router and take another dump.
[BetterBatteryStats] deloj:
HI tnsmani,

Just to clarify, its not a phone, its a tablet. And I dont have any printers or other devices connected to it. I will reset the router then take another dump. Then I'll let you know.
[BetterBatteryStats] deepu458:
Hi [MENTION=1330150]chamonix[/MENTION],

Thanks for the update, as per the issue in the quote "*job*/com.asksven.betterbatterystats_xdaedition/com.asksven.betterbatterystats.services.WriteBootR eferenceService accounting for longer Awake at screen OFF. Until i force stop the app the wakelock never stops."

i have this issue on the latest version of the XDA edition app on Oneplus 6T OOS (Android Pie Based). To answer your questions above

a) is bbs 'battery optimized'? No its not optimized and BBS is in the not optimized apps list

b) does this only affect the saving of the boot reference or does it repeat for other references like unplug or screen off? yes it only happens at system boot. If i unplug and plug it back this wakelock never happens.

So what i did was with tasker app i forcestoped the BBS app at system reboot in this way i wont get that crazy wakelock (WriteBootReference Wakelock from BBS), but with tthis procedure the reference is completely messed up. I need to set custom and look for stats based on Custom. Attached a pic of wake locks i got from boot.

Let me know if i can do anything for u to test.
[BetterBatteryStats] packtt:
I'm on a lineage 15.0 based OS Android Pie - Rooted

I keep getting a API compatibility error - I've done a search on the forums but couldn't seem to find a solution.

could someone point me in the right direction please? Thanks. :)
[BetterBatteryStats] chamonix:
That is due to the fact that the xda edition is compiled in debug mode.
[BetterBatteryStats] packtt:
Thanks for the response but that doesn't tell me much.

So, how would I go about using the app and collecting stat's?

Because right now, the stat's aren't getting collected properly and I cant determine the cause to my battery drain.

Thanks again!
[BetterBatteryStats] chamonix:
Re-reading the code I have found a potential flaw in the implementation when Android kills the job (that can always happen) before it was finished. 2.5-326 fixes that and is up on hockeyapp
[BetterBatteryStats] chamonix:
New build 2.5-330 is up: an attempt to reduce the number of calls to the service, in the hope of delaying / getting rid of the parcel read errors on S10
[BetterBatteryStats] TNSMANI:
Uninstall the current version, reboot and install the version from the hockeyapp. Read the OP on how to get it. Or else, install the PlayStore version though it is an older one. The choice is yours.
[BetterBatteryStats] deepu458:
Thank you so much Dev, for fixing the issue. I already downloaded the above version of app and i think the issue is now fixed in this version. As i did reboot and BBS not being on top offender. :good:
[BetterBatteryStats] akira888:
Hi folks,

I have just installed the latest version from HockeyApp. An override install though. But the app does not work on my S10 anymore even all permissions are granted

So what caused this?

Should I do a fresh install?

Thanks
[BetterBatteryStats] dr4go:
[MENTION=1416790]akira888[/MENTION]: override install? Were you not on a hockeyapp build before? Updated to 2.5-330 and it's so far working on my G973F... Check Settings -> Advanced -> App permissions to know what's really going on...
[BetterBatteryStats] akira888:
Embarrassingly haven't used BBS for a long time since my s6. So yeah. Sorta new to HockeyApp.

Because I have already previously installed a HockeyApp build. So I just overwrote it with the latest version, thought it might work.

I will uninstall and reinstall the latest version to see whether it fixes my problem.
[BetterBatteryStats] chantoine:
You have to grant permissions again, as it's not the same app's name. Just did it yesterday. And uninstalled "other" app too.
[BetterBatteryStats] folusmile:
does it still work on unrooted devices..am on oreo
[BetterBatteryStats] chantoine:
Yes, tested with Oreo and Pie
[BetterBatteryStats] dr4go:
Sad news: your fix unfortunately doesn't work... Same situation with #330: Alarms show, rest of the things (Wakelocks, Network, Processes, Sensors) just stays blank.

In app permissions the status still reads as "success (fallback)", although BBS doesn't work anymore.
[BetterBatteryStats] chamonix:
Can anyone confirm?
[BetterBatteryStats] ianmacd:
I'm afraid so. Same problem on my S10+.
[BetterBatteryStats] shaggyskunk:
Wakelock - Network - Process & Sensors showing for me on Stock Unrooted S9+ & S10+ unless I'm missing something? ?

Also xda edition v330
[BetterBatteryStats] chamonix:
It is, weird that this problem seems not to occur for everyone. Potentially it is related to an unitialized reference. Could you please check and confirm whether raw stats show values?
[BetterBatteryStats] bigknowz:
[MENTION=1330150]chamonix[/MENTION] can't load widget on Nova Launcher after play store update. Anyone else having trouble?
[BetterBatteryStats] jelbo:
I'm on S10 Exynos and testing the 2.5-330 build. All permissions are granted using adb and Android. BBS agrees it has the permissions. At startup, I got the error 'Detected problems with API compatibility (visit g.co/dev/appcompat for more info)'. Now it stays on 'No stats have been collected yet'.
[BetterBatteryStats] chamonix:
Does the raw stats show data? If yes wait a bit and data should start showing
[BetterBatteryStats] chamonix:
Do you have issues picking/placing the widgets or is it about them showing (no) data. A logcat would come in handy
[BetterBatteryStats] dr4go:
Let me be a bit more precise... It also worked for me when updating to 330, but after I unplugged the phone in the morning, new stats don't come up (so as if the service in the background died like happening before).

Yes, obviously the Raw Stats still show the values, but they aren't updated anymore since today morning. I also see the stats in the main window when changing from reference unplugged to boot, but I only see the values of yesterday and not the ones including the today's values since having unplugged the phone. Long story short: it's still broken.

Exynos G973F here on ASD5 FW
[BetterBatteryStats] ianmacd:
If I check under Raw, I have stats for Alarms, Process and Kernel Wakelock, but nothing for Partial Wakelock.
[BetterBatteryStats] jelbo:
When I open Raw Stats I was greeted again by the 'Detected problems with API compatibility (visit g.co/dev/appcompat for more info)' error. After that, in Raw Stats, I get this:

Summary: empty, with a 'BatteryInfo Service could not be contacted' popup at the bottom

Kernel Wakelock: empty, with a 'BatteryInfo Service could not be contacted' popup at the bottom

Partial Wakelocks: empty, with a 'BatteryInfo Service could not be contacted' popup at the bottom

Alarms: works

Network: empty

CPU States: worksProcess: empty

Sensors: empty
[BetterBatteryStats] dr4go:
[MENTION=1847079]jelbo[/MENTION]: If you reboot your phone it will work until "the service dies" in the background.
[BetterBatteryStats] shaggyskunk:
Yes Raw Stats are there for me ?
[BetterBatteryStats] bigknowz:
Screen shot and log attached 5-17 09:09:08.793 W/BroadcastQueue( 1143): Background execution not allowed: receiving Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) } to com.google.android.gms/.stats.service.DropBoxEntryAddedReceiver

05-17 09:09:08.793 W/BroadcastQueue( 1143): Background execution not allowed: receiving Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) } to com.google.android.gms/.chimera.GmsIntentOperationService$PersistentTrustedReceiver

05-17 09:09:08.851 W/Looper ( 1143): Slow dispatch took 220ms main h=android.app.ActivityThread$H c=android.app.-$$Lambda$LoadedApk$ReceiverDispatcher$Args$_BumDX2UKsnxLVrE6UJsJZkotuA@6e15049 m=0

05-17 09:09:08.851 W/Looper ( 1143): Slow delivery took 224ms main h=android.app.ActivityThread$H c=android.app.-$$Lambda$LoadedApk$ReceiverDispatcher$Args$_BumDX2UKsnxLVrE6UJsJZkotuA@5db9d4e m=0

05-17 09:09:08.852 W/Looper ( 1143): Drained

05-17 09:09:09.000 W/BroadcastQueue( 1143): Background execution not allowed: receiving Intent { act=BBS_WIDGET_UPDATE flg=0x10 } to com.asksven.betterbatterystats/.widgetproviders.AppWidget

05-17 09:09:09.000 W/BroadcastQueue( 1143): Background execution not allowed: receiving Intent { act=BBS_WIDGET_UPDATE flg=0x10 } to com.asksven.betterbatterystats/.widgetproviders.TextAppWidget

05-17 09:09:10.900 E/BatteryExternalStatsWorker( 1143): no controller energy info supplied for bluetooth

05-17 09:09:16.330 E/BatteryExternalStatsWorker( 1143): no controller energy info supplied for bluetooth

05-17 09:10:00.057 W/BroadcastQueue( 1143): Permission Denial: receiving Intent { act=android.provider.Telephony.SMS_RECEIVED flg=0x19000010 (has extras) } to ProcessRecord{77f8741 3249:com.teslacoilsw.notifier/u0a167} (pid=3249, uid=10167) requires android.permission.RECEIVE_SMS due to sender com.android.phone (uid 1001)

05-17 09:10:16.355 E/BatteryExternalStatsWorker( 1143): no controller energy info supplied for bluetooth

05-17 09:10:16.512 E/BatteryExternalStatsWorker( 1143): no controller energy info supplied for bluetooth

05-17 09:10:19.992 I/UsageStatsService( 1143): User[0] Flushing usage stats to disk

05-17 09:10:38.191 I/PowerManagerService( 1143): Going to sleep due to screen timeout (uid 1000
[BetterBatteryStats] jelbo:
Interesting. For me, Process and Kernel Wakelock stay empty, even after a reboot and some time. You don't get this?

Being Dutch, I assume you have the Exynos SM-G973F as well?
[BetterBatteryStats] bigknowz:
Working after reboot.
[BetterBatteryStats] koekoek91:
Yes same issue here.
[BetterBatteryStats] xuxuzao:
sane issue here

S10+ exynos
[BetterBatteryStats] gautamr9:
It worked briefly on my s10 plus and I could see all stats, but then it stopped working.

I've tried to re-enable ADB permissions with no luck.

I'm on the public beta version
[BetterBatteryStats] akira888:
I have also experienced issue on my Exynos S10 here with the latest version.

No error on permissions as per the app but no stat is collected.

The first S10 workaround build worked for me though not perfectly as it would lose packet midday then I needed to restart. But it worked in a sense that I could at least do a proper dump file.
[BetterBatteryStats] koekoek91:
Do you know the build number of the first workaround build for S10?

That's the only one so far that used to work for me too.

I believe it was 2.5-308 but I've tried all versions from 308 to 330 and on none of them I'm able to collect stats.
[BetterBatteryStats] akira888:
Judging from the date, I think it was 308??

I guess I will just wait for the update instead of reverting back.
[BetterBatteryStats] koekoek91:
I looked at the change log history.

It was actually 311 that had the workaround for s10.
[BetterBatteryStats] jelbo:
Update on this. After the reboot and waiting a few days it started collecting data. Raw Data now shows everything on my Exynos S10 :D

The 'normal' entries are as follows:

Summary: shows only Deep Sleep

Kernel Wakelocks: shows 'No stats have been collected yet'

Partial Wakelocks: shows 'No stats have been collected yet'

Alarms: shows all info

Network: empty

CPU States: shows all info

Process: empty

Sensors: empty

/edit: the Raw Data on Partial Wakelocks (the most interesting measurement for me) is broken; it's all 0.0%.
[BetterBatteryStats] drezz2:
If you use the mobile as an access point, it is normal that during that time appear in the statistics as "awake screen off", correct?
[BetterBatteryStats] TNSMANI:
Should be. Logical. Haven't tried.
[BetterBatteryStats] DB126:
Not on my devices. Likely depends on ROM and/or underlying Android version.
[BetterBatteryStats] drezz2:
ok, maybe, i try in lineage 16, on oneplus one and behaves like this, although it may also depend on the BBS version (use 2.3-248)
[BetterBatteryStats] SoggyBurrito11:
Screen off

My screen off time is 1 hr 30. Device doesn't go into deep sleep often and wake locks are high, but there is no high partial wakelock.
[BetterBatteryStats] strongst:
Maybe rom or kernel issue, but without a dump file... :rolleyes:
[BetterBatteryStats] SoggyBurrito11:
Can I send you a dump file please to see what you can work out?
[BetterBatteryStats] bradical711:
We don't PM dump files, we post them in the forum for everyone to learn. Just upload your dump file in a new post and we will get around to taking a look when we get a moment.
[BetterBatteryStats] strongst:
See below

Exactly :highfive:
[BetterBatteryStats] DB126:
Notification as described has nothing to do with BBS.
[BetterBatteryStats] drezz2:
I said it in case in one of the most recent versions I might post it in a different way.

Maybe it's a matter of lineage, although I also commented that during a time that I activate and then deactivate the GPS or the access point is about 20-30 minutes awake screen off and then it stops being, maybe it's Doze's thing .. or ..
[BetterBatteryStats] Anderconsu:
I wanted to try the app and followed the post link, supposedly I have the beta access for some reason. I can't install anything since It says It is removing my account from the beta program and to try to uninstall the app, but I don't have anything installed. Any clue on what to do?
[BetterBatteryStats] Zrbtfm:
Same here go thru hockeyapp
[BetterBatteryStats] Anderconsu:
Sorry but I don't know what is hockeyapp, but it seems to be fine now anyway (don't know why exactly)
[BetterBatteryStats] shaggyskunk:
Hockey App is what the Dev uses to post updates ??

https://xdaforums.com/showthread.php?t=1179809

Sent from my SM-G975W ??
[BetterBatteryStats] drezz2:
2.5-330 is final or beta?

in hockeyapp it is only possible to get the latest version? I do not see the previous ones
[BetterBatteryStats] shaggyskunk:
Haven't looked to see if I can get previous versions from Hockey App & the Dev is continuously working on BBS - So while I wouldn't call it a "beta" I don't believe that it's the current version is the final version either ?
[BetterBatteryStats] drezz2:
ok, I said it because in hockeyapp I only see possible to download the last apk, or I have not known to find previous apk's
[BetterBatteryStats] shaggyskunk:
Not sure why you would want previous versions? The Dev has updated the app for a reason... ??

Sent from my SM-G975W ??
[BetterBatteryStats] mrjuniork:
Plenty of versions available.. You haven't looked in the right place. They're there :good:
[BetterBatteryStats] Lurker0:
I'm using BBS for past years to tune sleep mode on different devices. Yesterday installed 2.5-325 from Play Market on a new device. Guess what? Partial Wakelocks screen is filled with BBS only. I have hundreds of hits in a couple of hours for widget-related wakeups, though I have no a widget installed. So now BBS is the only power eater and sleep preventer on my device!

How to stop BBS from this new [mis]behaviour?
[BetterBatteryStats] shaggyskunk:
I haven't seen this before - But I'd Wipe Cache & Data for BBS & Reboot ?

Sent from my SM-G975W ??
[BetterBatteryStats] githyanki:
There was an issue on S10 devices fixed recently, you will need the hockeyapp version if that's your new device.
[BetterBatteryStats] Lurker0:
It does not help

My device is iBasso DX220 DAP. It's for music playback, and I prefer not to install software that I don't really need in it. Is there a chance for a fix in Play Store beta section soon?
[BetterBatteryStats] drezz2:
I know, of course, it's not because of underestimating his work, on the contrary.

But sometimes you like some updates more than others, although in this case I did a test with a version of 2.5 and the battery manager of Android showed me that it was bbs what more battery consumed, maybe I did something wrong, I have to update lineage, and I can try it again, but I would have liked to find the 2.4

is that hockeyapp? on the web I only see the download button in the most recent one in the rest
[BetterBatteryStats] akira888:
What is the working version for S10?

I believe I have the latest build on HockeyApp. But it does not work for me. All permissions are shown as granted.
[BetterBatteryStats] githyanki:
I don't have an S10, but I understand from posts that it does work on some variants, but that some still have issues.
[BetterBatteryStats] mrjuniork:
Yes, that's the app
[BetterBatteryStats] Lurker0:
Here is how BBS looks like on my device:
[BetterBatteryStats] koekoek91:
This is the only version that works on my S10+ Exynos so far.
[BetterBatteryStats] akira888:
Thanks man. I will check it out!

But does it work all the time or will stop working after unplugged for say half day?
[BetterBatteryStats] chamonix:
Do you see nothing or is it only the wakelocks not being displayed? Please provide a logcat from the start or from a refresh. BetterBatteryStats uses the data provided by the battery service of android and I can't exclude that your rom does not support it. Would be a pity if yes
[BetterBatteryStats] steslatt:
Is there a list of what the system wake locks are? One I would like to know is RILJ?
[BetterBatteryStats] chamonix:
Have your tried to google "android rilj"?

RILJ is the userland counterpart of the RIL (radio interface lib). RILJ handles whatever the phone need to tell or get from the RIL = phone, e.g. dialing but also coarse location.

You will find possible reasons for high RILJ wakelocks if you search this thread about "RILJ"
[BetterBatteryStats] chamonix:
Guys!

I am always happy to learn new stuff so I could spend a few hours reading and understanding this...

on the other hand why don't you invest that time, understand the dump, format it with unix shell means (grep, sed, awk) to get it in a readable form, solve your problem and sum all that knowledge up in a post so that I can incorporate it to BBS?
[BetterBatteryStats] hyperbolic:
Hi,

I, for example, did search the forum, such as Android and all the above forums including SGS2 forum, and couldn't find anything related to RILJ.

I even searched google and couldn't find.

If you be kind and tell us who is starting it and making the use of it.

Thx in advance.
[BetterBatteryStats] nobnut:
You searched Google and didn't find anything? I don't believe you. Try opening Google and type "Android RILJ Wakelock" then read the results. There are thousands.

Sent from my Motorola StarTac using Voodoo