yashsingh1/xdaforums huggingface dataset:
[BetterBatteryStats] DiamondJohn:
It sounds sticky if locked in recents, and I have never locked an app in recents (ie never used it soi know nada), so it may go down a different treatment when locked, as opposed to simply being presented/listed in recents. ie "locking" it in recents is not related to the situations I described, ie locking is toltally different5r to simply being displayed in recents. IDK. It isnt an issue for me, but it would be interesting to see what happens to a locked app in recents, when it is forced close or simply PID killed. Or if it is implemented / related to being whitelisted from doze or OOM. But right now i dont have any apps that are being randomly killed, so its not something Im that interested in enough to check, just thought Id share what I've seen. The reason I was interested in recents locking, was because it slightly annoyes me when I force closed apps, they were still in recents.
[BetterBatteryStats] TNSMANI:
I have now tested it and on A12, whether locked in Recents or not, an app that is force closed via Settings>Apps still remains in Recents. Just for your information since you wondered about it.

I think that we have gone sufficiently OT.
[BetterBatteryStats] zuiffon:
Hello

I have installed bbs and have done adb commands

But how can I know with this app which other app have made my screen on for 5 seconds just before I try to read infos collected ?
[BetterBatteryStats] TNSMANI:
The purpose of BBS is to reduce battery drain during the time the device is sleeping which will also help in reducing the drain during the time the device is in use. It may not be suitable for finding out which app triggered a screen-on action. If you are interested, please read the first few posts of this thread and generate an idle dump file and attach it here. We will try to help.
[BetterBatteryStats] linom:
I just downloaded BBS from F-droid and enabled all stats through adb. However the app does not seem to work and no stats are collected. I have S22U with stable Android 13 on OneUi 5.0.

I have restarted the phone, charged completely, but the app does not collect or show any data.
[BetterBatteryStats] TNSMANI:
I don't think that the app is yet compatible with A13. Apart from that, Samsung has its own issues with BBS.

You are using version 3.0-485 of BBS?
[BetterBatteryStats] linom:
I am on 3.0 and it says it's updated for A13.
[BetterBatteryStats] TNSMANI:
Download ver. 3.0-485 from HERE which is linked in the second post of this thread and try it. If it still doesn't work, contact the OP.
[BetterBatteryStats] Arealhooman:
is this ever going to be updated?
[BetterBatteryStats] Lughnasadh:
It was updated 3 months ago.
[BetterBatteryStats] xgerryx:
App crash upon open on Galaxy s22 ultra android 13 snapdragon not rooted. Worked last night just fine. Opened it today, just closes. Anyone else?

Starting to think it has to do with granting ADB permissions. I installed GSAM fresh, which I was also having this issue. It worked fine. Then gave it permissions in ADB, doesn't open.
[BetterBatteryStats] Arealhooman:
I mean lately
[BetterBatteryStats] Thebear j koss:
It's against forum decorum to ask for updates. Updates come when they are ready. No sooner, no later. If you have an issue with the latest version post all relevant info including logcats and any other info available that can help rectify the issue.
[BetterBatteryStats] Arealhooman:
I’m simply asking if I will be updated, or abandoned
[BetterBatteryStats] Oswald Boelcke:
It has never been abandonned, and the time span between new versions solely depends on the developer's decision. It will be updated when the developer is ready for an update. Remember, the developer owes you absolutely nothing and you're not his customer cause you did not pay him.

If you're impatient, you can develop your own app.

Xda-developers is a site where you can learn how to develop roms or apps, not just to request them.

Regards

Oswald Boelcke

Senior Moderator
[BetterBatteryStats] Arealhooman:
I am not impatient, it was a simple question and you turned it into something else. all I wanted to know is if the developer(s) are still active.
[BetterBatteryStats] Oswald Boelcke:
A quick search in this thread showed me that @chamonix last posted here on 2022-09-06. This thread is more than 11 years alive, and affirmative if someone who created such a fantastic tool and great thread 11 years ago and just recently posted in it, I'd call him alive.

And by the way: I didn't turn it into something else. It was my obviously unsuccessful intention to say between the lines it might be worth to review the XDA Forum Rules, to which you agreed to adhere when you registered on this private website a few month ago.

And I suggest we quit this off-topic discussion in this development thread now. If you've any questions regarding the rules of this forum, feel free to contact me privately. Thanks for your cooperation.

Regards

Oswald Boelcke

Senior Moderator
[BetterBatteryStats] DiamondJohn:
NINJA'D!

If you searched the thread, you would of found that the OP (ie the dev) has posted recently stating its further progression. ie you asked a question (considered impolite at XDA) that has already been answered, recently. So, impatient or just expect to be spoon fed, Its a rule of XDA to read the thread.

On an opposing note, if the app works, what is the need for further dev? I have numerous apps on my device that have long been abandoned and don't even exist on the PlayStore anymore. I also have apps I developed myself for me (ie I have the source) but haven't updated to the latest android, as they work as is. What is probably more pertinent is the amazing amount of activity and support of the app in this thread. You may of just offended someone who could help you. You have also poked a senior moderator. Read the room.
[BetterBatteryStats] Oswald Boelcke:
Friends, please. I know you all want the very best for this thread - and that's really appreciated. But it gets off-topic, and I suggest we refrain from that.

Ok, you might call me that I've started with it but alternatively you could call my post an official moderator announcement (sometimes abbreviated as PSA) although I didn't begin my post with that.

Please consider to move to private messages if further sharing of information in this respect is required. And I hope you don't mind if I remove any follow-on OT posts. Thanks a lot.

Regards

Oswald Boelcke

Senior Moderator
[BetterBatteryStats] amn1987:
Wakelocks like adsp_IPCRTR, ipc00000105_sensors@1.0 are causing several thousands of wakelocks in a span of a few hours. The device (Redmi Note 3 ) as a result doesn't enter Deep Sleep and idle drain is high at around 2%/h. Less than a week ago idle drain was pretty good. It used to average around 0.1-0.2%/h after dropping a few percent initially. I have attached the log albeit not taken under ideal conditions. Can someone please take a look?
[BetterBatteryStats] TNSMANI:
The wakelock you refer to looks like it is connected to battery and charging. Atleast that's what a Search indicates, though not sure.

Those being kernel wakelocks, I don't think that we can do anything about them except perhaps to say clear the cache and see. Did you change the ROM or kernel recently?

This raises the question, how old is the battery?

Apart from that, significant motion sensor was on for nearly 7 hours. Any settings you changed recently relating to motion, like AOD, Lift to Wake etc? This may be related to the kernel wakelock too, going by the word "sensors" in the name of the wakelock.

I am not smart enough to diagnose beyond this. Anyone else can throw any light on this?
[BetterBatteryStats] amn1987:
Battery is a few months short of 6 years but it's has behaved in the same way since over a year. After being unplugged it almost always falls by 5-8% in the next few hours and then proceeds to drain very little. I am on the same A10 ROM since early this year. Recently made the switch to BitGApps from NikGApps and started observing these strange wakelocks after an update to BitGApps arrived in the last week or so. The ROM (Havoc ) actually had an option to disable Sensors for selected apps which didn't seem to make a difference and I re-enabled it later. AOD etc. is disabled. About the significant motion detector let me check with Naptime as I remember it had some setting to deal with it. I will clean flash just the ROM soon and check how it goes. Thanks for taking the time to check.
[BetterBatteryStats] Oswald Boelcke:
Just uploading my last two idle dumps for two reasons:

1. To have them available if occasionally someone else with a Samsung Galaxy S8+ (SM-G955F) needs a comparion.

2. To test if I meanwhile can upload them as txt-files without the former failures or if I still have to zip them.

Results of both idle dumps were 0.3%/h over 10 respectively 8 hours screen-off time.

EDIT: Interestingly, only one txt-file "stuck" after upload. The other one showed the already known problems. If I find the time, I attempt to analyse their contents to hopefully figur out what entries prevent one of the files from being stuck. Zipped and upload the failed one.
[BetterBatteryStats] dnabrit:
Getting a similar error "inconsistent tx state lengths" on my SM-S908U (non-rooted) on Android 13. Thank you for the amazing app development over the years.

**Edit: Uninstalled/installed the app several times to try to pinpoint why I was getting this failure. Seems that, best I can tell, if you leave the app before running the ADB commands (for non-root devices), and try to come back using Settings ->Advanced -> App Permissions, the process fails. I also noticed that when I first install the app, it defaults to my system theme (dark), but when I leave the app, then return to it, and do the above actions (Settings ->Advanced -> App Permissions), the app switches to the light theme, then (sometimes) force closes. My apologies for not providing more details.
[BetterBatteryStats] amn1987:
Just freezing Play Services results in much improved idle drain seemingly even without disabling the kernel wakelocks.

Edit: Back to consistently good idle drain zero overnight. Will clean flash the ROM today and switch back to NikGApps.
[BetterBatteryStats] mambayo:
Hello,

the 2.5-344 version in a dumpfile shows "Voltage lost [mV]: (3972-3724) [27,2%/h]". I think 27,2 should be in mV, not in %.
[BetterBatteryStats] lys1980:
Hello,

i installed BBS on my Android 12 Device (no-root), i followed the instructions but i get this error:

C:\platform-tools>adb -d shell pm grant com.asksven.betterbatterystats android.permission.BATTERY_STATS

Exception occurred while executing 'grant':

java.lang.SecurityException: grantRuntimePermission: Neither user 2000 nor current process has android.permission.GRANT_RUNTIME_PERMISSIONS.

at android.app.ContextImpl.enforce(ContextImpl.java:2188)

at android.app.ContextImpl.enforceCallingOrSelfPermission(ContextImpl.java:2216)

at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermissionInternal(PermissionManagerService.java:1497)

at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermission(PermissionManagerService.java:1479)

at android.permission.PermissionManager.grantRuntimePermission(PermissionManager.java:378)

at com.android.server.pm.PackageManagerShellCommand.runGrantRevokePermission(PackageManagerShellCommand.java:2419)

at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:260)

at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)

at android.os.ShellCommand.exec(ShellCommand.java:38)

at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:25913)

at android.os.Binder.shellCommand(Binder.java:970)

at android.os.Binder.onTransact(Binder.java:854)

at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4818)

at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:9004)

at android.os.Binder.execTransactInternal(Binder.java:1226)

at android.os.Binder.execTransact(Binder.java:1163)

Could you please help me? Thanks!
[BetterBatteryStats] pratik_193:
Ok. Could not find a solution on XDA/internet, hence posting

I am on latest BBS version 3.0-485 on Android 13, Unrooted, Samsung S22 Ultra SD model.

Granted all the below permissions, rebooted too

adb -d shell pm grant com.asksven.betterbatterystats android.permission.BATTERY_STATS

adb -d shell pm grant com.asksven.betterbatterystats android.permission.DUMP

adb -d shell pm grant com.asksven.betterbatterystats android.permission.PACKAGE_USAGE_STATS

adb -d shell settings put global hidden_api_policy 1

Still i get the error "no stats have been collected yet"

All permissions are granted, however i do get "Failed: inconsistend tx state lenght"error in permission window.

Can someone help please?
[BetterBatteryStats] Schroeder09:
I am on A13 on a pixie 7 pro running the November update and the kirisakura kernel. I’m rooted with magisk v24.2 with lsposed latest version using aosp mods and xprivacy lua. I had bbs v.24 and it wasn’t working. I updated to the latest version on play store. The app had already been granted root with the old version. The new version didn’t request root permission. BBS did flag me with the message that it needed more permissions. I entered:

adb -d shell pm grant com.asksven.betterbatterystats_xdaedition android.permission.BATTERY_STATS

adb -d shell pm grant com.asksven.betterbatterystats_xdaedition android.permission.BATTERY_STATS

adb -d shell pm grant com.asksven.betterbatterystats_xdaedition android.permission.DUMP

adb -d shell pm grant com.asksven.betterbatterystats_xdaedition android.permission.PACKAGE_USAGE_STATS (needed starting on Lolipop)

adb -d shell settings put global hidden_api_policy_pre_p_apps 0

adb -d shell settings put global hidden_api_policy_p_apps 1

adb -d shell settings put global hidden_api_policy 1

Notice I modified the global hidden api policy to a 0 above because I thought this was some global setting.

At first the device would boot but return right to the Lock Screen upon entering my PIN. After entering safe mode I can get in the phone but after a few seconds or minutes of booting up the UI freezes up and I have to get reboot. I imagine when something starts up now I’m getting the issue.

Any idea of how I fix this up?
[BetterBatteryStats] Thebear j koss:
You're rooted with magisk? Just grant permissions in magisk app.
[BetterBatteryStats] Schroeder09:
Yea. That’s what I thought. I did grant it root access. BBS requested root access. I’m not sure why I receive the message from BBS when I opened it that it didn’t have access. I managed to get into the OS and uninstall BBS but the UI freezing up after a few seconds still happens. Could setting the:

adb -d shell settings put global hidden_api_policy_pre_p_apps 0

be affecting other apps? I’m not sure what effect (if any) magisk and lsposed are having on the phone since the same behavior happens in safe mode.
[BetterBatteryStats] Thebear j koss:
Sounds like another mod is causing issues. Have you tried disabling mods thru and and or grabbing a logcat? Should be able to pull a log if it boots up.
[BetterBatteryStats] Schroeder09:
it boots up but freezes pretty quick. i dont have time to access through matlog or anything. can i pull the log from ADB or bootloader or something? any direction you can provide on that would be helpful.
[BetterBatteryStats] Thebear j koss:
Yeah, try pulling the log thru adb. If you have any mods maybe uninstall or disable them. Also did you try reverting back the commands you ran in adb? Uninstall BBS, wipe cache, and reboot. Curious to see what is causing the freeze up. Maybe someone else sees something I don't.
[BetterBatteryStats] Schroeder09:
ok. do i just boot to bootloader and enter command

adb logcat

?
[BetterBatteryStats] Thebear j koss:
Logcat command-line tool | Android Studio | Android Developers

Logcat is a command-line tool that dumps a log of system messages, including stack traces, when the device throws an error and sends messages that you have written from your app with the Log class.

developer.android.com
[BetterBatteryStats] Schroeder09:
how can i just undo these commands via adb?

adb -d shell pm grant com.asksven.betterbatterystats_xdaedition android.permission.BATTERY_STATS

adb -d shell pm grant com.asksven.betterbatterystats_xdaedition android.permission.BATTERY_STATS
adb -d shell pm grant com.asksven.betterbatterystats_xdaedition android.permission.DUMP
adb -d shell pm grant com.asksven.betterbatterystats_xdaedition android.permission.PACKAGE_USAGE_STATS (needed starting on Lolipop)

adb -d shell settings put global hidden_api_policy_pre_p_apps 1
adb -d shell settings put global hidden_api_policy_p_apps 1

adb -d shell settings put global hidden_api_policy 1

do all the "1"'s go to "0" and all the "grants" go to "deny"? If so, will that affect any other apps?
[BetterBatteryStats] Thebear j koss:
So hold on, you didn't install the XDA version? You updated from the play store? Uninstall it and install the XDA version. Those commands I think are for the XDA version in the OP or second post. That may be your issue
[BetterBatteryStats] Schroeder09:
I updated what I had with the play store version yes.

It looks like you have a lot of legacy installs. Which oils the XDA most recent version? I’m guessing I’ll have to install this with adb since the phone freezes up if I boot it normally. It’s been on safe mode and on all day without issue. i did get the play store version uninstalled, but it’s still freezing when booting up.
[BetterBatteryStats] Thebear j koss:
Well it may be a different command and I don't think that is necessary unless you don't have root. Try disabling BBS root in magisk and then re enable root. Should have gotten a prompt for su access when you updated.
[BetterBatteryStats] Schroeder09:
Please see above. I edited my post while you were replying and out more info.
[BetterBatteryStats] Wolfcity:
L

Latest XDA version is 3.0-485.

Link from OP:

App Center

install.appcenter.ms
[BetterBatteryStats] pratik_193:
No one?
[BetterBatteryStats] Thebear j koss:
Read back the past few posts. I think you have the same issue. Your commands are wrong if you are using latest version from here on XDA.
[BetterBatteryStats] pratik_193:
i am not using XDA version. Plus the ADB commands are from the OP
[BetterBatteryStats] Thebear j koss:
OK. I have no way of knowing that. I just saw that there were 2 different commands for play store and xda versions. I don't know then. I think you may have to use the XDA version and xda commands for non root users.
[BetterBatteryStats] Thebear j koss:
OP has the XDA variant to use for non root devices
[BetterBatteryStats] Schroeder09:
I had to end up wiping my phone from installing better battery stats, updating it with the version from the Play store, and entering the ADB codes after granting root access. Still did not allow it to function. I am on a rooted pixel 7 pro. I have some LS posed modules including AOSP mods- I mentioned this one explicitly because it seems to be the heaviest. Does better battery stats conflict with Accu battery or any other app? I am a fan of BBS, but I am definitely afraid of having to set my phone back up After a wipe for a second time this week.
[BetterBatteryStats] Lughnasadh:
BBS works fine with AccuBattery. Also working fine on my rooted Pixel 7 Pro without having to do any adb commands. I'm using Version 3.0-485 (102) from the App Center. I don't have LSposed or AOSP mods installed.
[BetterBatteryStats] poiki:
I have this exact same problem. On S22 using Android 13. There is no difference between the xda or Google play editions. Unrooted, but followed all the adb instructions. No issues with Android 12 or less (on S9 and tab S6). I have had a similiar problem after giving adb permissions to Gsam Battery Monitor. Phone is brand new and no other modifications have been made.
[BetterBatteryStats] Thebear j koss:
Well there is a difference. They have different package names. When typing commands which you shouldn't need to do if rooted, the XDA version has an appendage to the package name if you read the op the directions send you to a link for correct command lines on Android 13 and using the XDA packaged version
[BetterBatteryStats] poiki:
I did actually do that before I made my original post. Adb commands were made specific to the gplay and xda packages without any difference, hence the original post.

The attached screenshot is the product.
[BetterBatteryStats] Thebear j koss:
Are you rooted on magisk? If so there is no reason to be doing adb commands at all. And I'm not understanding your without any difference. Either way it wouldn't matter as those are given when you grant BBS root

If you are not rooted, I believe you need the XDA version and correct corresponding XDA package command lines. Although these Samsung devices just got android 13, so they might not work on Samsung. As far as I know this has only been tested on aosp based android 13. Samsung most likely screwed the pooch as they always gave since the Galaxy note 2. May need to hear back from dev.
[BetterBatteryStats] poiki:
As I reported on my original post. I am not on root, and do not intend to. The adb commands were made on the basis of not having root. I did not have this problem with my other mobile devices.
[BetterBatteryStats] Thebear j koss:
I ammended my last post.
[BetterBatteryStats] thewaywardgeek013:
same issue with you, granted permission, but still no go, tho wondering why phone storage permission for this app is not asked as of. As I know it needs phone storage to backup and restore. Not to mention to read data, right?
[BetterBatteryStats] Thebear j koss:
Phone and notification. It doesnt require anything from other apps except as a listener. It needs root permissions so it can gather info from within. Magisk should ask or if not rooted , need to read OP and follow directions