Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No stats has been collected yet #912

Open
Rexzerge opened this issue Feb 26, 2023 · 7 comments
Open

No stats has been collected yet #912

Rexzerge opened this issue Feb 26, 2023 · 7 comments

Comments

@Rexzerge
Copy link

It doesn't work since purchase all permission granted not sure what I missed

Screenshot_20230226_094147
Screenshot_20230226_093542

Build.VERSION.RELEASE: 13
Build.BRAND: samsung
Build.DEVICE: r8q
Build.MANUFACTURERsamsung
Build.MODEL: SM-G781B
Build.VERSION.SDK_INT: 33

invoking android.os.ServiceManager.getService("batterystats")
android.os.ServiceManager.getService("batterystats") returned a service binder
invoking com.android.internal.app.IBatteryStats$Stub.asInterface
resolving getStatisticsStream(boolean)
invoking getStatisticsStream
retrieving parcel
ParcelFormatException occured
batteryStatsImpl_CREATOR.createFromParcel FAILED, trying readFrmParcel with PowerProfile set
FAILURE: an unhandled exception occured

STACK TRACE
java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at com.asksven.betterbatterystats.DiagnosticsActivity.diagGetService(DiagnosticsActivity.java:329)
at com.asksven.betterbatterystats.DiagnosticsActivity.onResume(DiagnosticsActivity.java:95)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1531)
at android.app.Activity.performResume(Activity.java:8721)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:5338)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:5431)
at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:54)
at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2571)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8741)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
Caused by: android.os.ParcelFormatException: inconsistent tx state lengths
at com.android.internal.os.BatteryStatsImpl$ModemTxRxCounterImpl.(BatteryStatsImpl.java:4309)
at com.android.internal.os.BatteryStatsImpl$ModemActivityCounterImpl.(BatteryStatsImpl.java:4420)
at com.android.internal.os.BatteryStatsImpl.readFromParcelLocked(BatteryStatsImpl.java:21430)
at com.android.internal.os.BatteryStatsImpl.readFromParcel(BatteryStatsImpl.java:21271)

@lazymonkey2
Copy link

happens to me too.

@maalos
Copy link

maalos commented Sep 17, 2023

i don't have any stats either

@ssjason123
Copy link

Not sure if I should open a new issue but I am having the same "No stats have been collected yet" issue, but the stack trace is different:

Build.VERSION.RELEASE: 9
Build.BRAND: lge
Build.DEVICE: lucye
Build.MANUFACTURERLGE
Build.MODEL: VS988
Build.VERSION.SDK_INT: 28

invoking android.os.ServiceManager.getService("batterystats")
android.os.ServiceManager.getService("batterystats") returned a service binder
invoking com.android.internal.app.IBatteryStats$Stub.asInterface
resolving getStatisticsStream(boolean)
FAILED
falling back to getStatisticsStream()
FAILURE: an unhandled exception occured

STACK TRACE
java.lang.NoSuchMethodException: getStatisticsStream []
at java.lang.Class.getMethod(Class.java:2068)
at java.lang.Class.getMethod(Class.java:1690)
at com.asksven.betterbatterystats.DiagnosticsActivity.diagGetService(DiagnosticsActivity.java:192)
at com.asksven.betterbatterystats.DiagnosticsActivity.onResume(DiagnosticsActivity.java:95)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1413)
at android.app.Activity.performResume(Activity.java:7315)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3939)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3979)
at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:51)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:145)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1864)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:205)
at android.app.ActivityThread.main(ActivityThread.java:6991)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:884)

@sergentum
Copy link

sergentum commented Dec 12, 2023

I have the same issue:
All rights are granted, the only issue I see: inconsistent tx state lengths
Samsung galaxy s20fe 5g snapdragon, bootloader locked, non rooted.
oneui 5.1, adnroid 13, security level 1 Nov 2023

@birdie-github
Copy link

birdie-github commented Mar 10, 2024

Dupes:

#913
#915
#921

This app is incompatible with Android 14. Here's what the developer says:

you have not heard a lot from me in the last weeks but I have not been inactive: I am just hitting a wall. The way Android was providing access to battery stats in the past has been changed in Android 14, not letting me access BatteryStatsImpl anymore: this class (com.android.server.power.stats.BatteryStatsImpl) still exists but is not in the path of the classLoader anymore, i.e. it can not be loaded.

I have spent days and days trying to find another way to access the stats but am hitting a wall right now. If anyone has connection to any other dev of an app in the same niche and who has achieved supporting Android 14 I would be very happy if you could reach out and establish a direct contact to get things sorted and gain some knowledge. I believe in the community and am confident that we help each other to progress in the fight against google making our lives more difficult with each release.

dev

@SiddharthManthan
Copy link

I am getting the same error on Android 13, samsung F23 5G. It shows since boot toast and then no stats have been collected yet.

@ThatAnnoyingVegan
Copy link

Same issue here, Android 13. All permissions granted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants