Question Battery Stats Manual Reset - Google Pixel 7 Pro

i used to be able to manually reset battery stats using this command on my OP5T
dumpsys batterystats --reset
it doesnt seem to work on the pixel 7 pro. is there a new command for pixel/android 13?
thanks

Related

Q: Xoom wont recognize battery stats

Just yesterday my xoom stopped recognizing my battery stats. Reads 0%. It charges but won't give me an actual reading of my battery. Installed circle battery widget and still gave me a 0 reading...
stevefromyellowstone said:
Just yesterday my xoom stopped recognizing my battery stats. Reads 0%. It charges but won't give me an actual reading of my battery. Installed circle battery widget and still gave me a 0 reading...
Click to expand...
Click to collapse
if you are rooted and have clockworkmod installed you could try wiping battery stats within the clockworkmod settings?
Thanks for letting me know. Forgot to say in the OP that I'm not rooted. I've been shying away since due to the wiping of the device. Might have to do that anyway for a factory reset, to see if that might help.
stevefromyellowstone said:
Thanks for letting me know. Forgot to say in the OP that I'm not rooted. I've been shying away since due to the wiping of the device. Might have to do that anyway for a factory reset, to see if that might help.
Click to expand...
Click to collapse
i have had a look around and it seems you need to have root access - you could try this
1. Run down your device’s battery until it turns itself off
2. Turn it back on and wait for it to turn off again; this may be straight away of after a few minutes
3. Remove the battery for at least 20 seconds
4. Replace the battery and charge until full and then for at least another hour – while the device is off
5. Delete you batterystats.bin file using one of 3 methods (requires root): Terminal Emulator – type su then press enter, next type ‘rm /data/system/batterystats.bin’ (without quotes). Using a Battery Calibration App (from market) – there are many choices available, they just delete your batterystats.bin file. In market, search for battery calibration. Make sure to read review and provided info in case of device incompatibilities. Manually – if for any reason the previous two methods didn’t work you may want to try deleting the file manually. Using a file manager with root access (such as Root Explorer) navigate to ‘data/system/batterystats.bin’. Delete ‘batterystats.bin’
6. Your device will now creates itself a new batterystats.bin file with a correct 100% battery reading
7. Run down the battery until it turns itself off
8. Turn on the device and charge for at least 8 hours
9. Unplug the device, turn off and charge for another hour
10. Unplug the device, turn on and wait for 2 mins
11. Turn off and charge for another hour
12. Use the device as normal
original post can be found here http://goo.gl/PVPvp
or just root and install cwm and wipe battery stats - hope this helps
No Go Rooted this weekend and still 0% battery. Wiped stats with CWM and deleted the bin file, tried different calibration tools. Still same problem. Charges though, and the indicator light changes once fully charged, but still flying blind...

On Android 10, Gmail can be permanently whitelisted (from doze)

I tried excluding Gmail (and Google Photos) from doze using adb and it stayed excluded even after device restart.
Code:
adb shell dumpsys deviceidle whitelist +com.google.android.gm
adb shell dumpsys deviceidle whitelist +com.google.android.apps.photos
(Use minus sign instead of plus to remove package from list)
Verify:
Code:
adb shell dumpsys deviceidle whitelist
I attempted the same on Android 9 before but it always got lost shortly after reboot. On Android 10, it seems like it sticks (and works - based on my first few tries).
I also noticed that com.android.settings.Settings$HighPowerApplicationsActivity no longer lists system apps. OnePlus also removed the more aggressive power saving option.
moneytoo said:
I tried excluding Gmail (and Google Photos) from doze using adb and it stayed excluded even after device restart.
(Use minus sign instead of plus to remove package from list)
Verify:
I attempted the same on Android 9 before but it always got lost shortly after reboot. On Android 10, it seems like it sticks (and works - based on my first few tries).
I also noticed that com.android.settings.Settings$HighPowerApplicationsActivity no longer lists system apps. OnePlus also removed the more aggressive power saving option.
Click to expand...
Click to collapse
Nice findings and thx for sharing it with us
Great! Thanks for sharing
Edit:
Gmail notifications are still delayed by around 10min.
Isn't it true that whitelisting only DISABLES Battery Optimization for a particular app, and you can do the same thing via the Android interface?
And we all know that turning Battery Optimization off doesn't do squat to get notifications sooner.
OR does whitelisting via ADB (supposed to) do something more powerful than disabling Battery Optimization? Thanks so much.
Looking forward to your reply
wgraz said:
Isn't it true that whitelisting only DISABLES Battery Optimization for a particular app, and you can do the same thing via the Android interface?
And we all know that turning Battery Optimization off doesn't do squat to get notifications sooner.
OR does whitelisting via ADB (supposed to) do something more powerful than disabling Battery Optimization? Thanks so much.
Looking forward to your reply
Click to expand...
Click to collapse
Nope, via settings do not work, i disabled battery optimization as a whole but i have delays on sms and alarms, unless i wake up manually the phone, then the sms and alarms arrived all together.
Confirm that the setting is permanent, i'm using android 11 (custom rom), see the last two entries added to the system.
Code:
E:\Adb>adb shell dumpsys deviceidle whitelist
system-excidle,com.android.providers.calendar,10134
system-excidle,com.android.providers.downloads,10124
system-excidle,com.android.messaging,10183
system-excidle,com.qualcomm.qti.telephonyservice,1001
system-excidle,com.qualcomm.qcrilmsgtunnel,1001
system-excidle,com.android.cellbroadcastreceiver,10133
system-excidle,com.android.proxyhandler,10121
system-excidle,com.android.cellbroadcastreceiver.module,10205
system-excidle,com.android.shell,2000
system-excidle,com.android.deskclock,10182
system-excidle,com.qualcomm.atfwd,10197
system-excidle,com.android.providers.contacts,10132
system,com.android.providers.downloads,10124
system,com.android.messaging,10183
system,com.qualcomm.qti.telephonyservice,1001
system,com.qualcomm.qcrilmsgtunnel,1001
system,com.android.cellbroadcastreceiver,10133
system,com.android.cellbroadcastreceiver.module,10205
system,com.android.shell,2000
system,com.android.deskclock,10182
system,com.qualcomm.atfwd,10197
user,com.android.messaging,10183
user,com.android.deskclock,10182
When I added com.google.android.gm and com.google.android.apps.messaging, adb shell dumpsys deviceidle whitelist shows them in the "user" section, not the "system" section. Did I do something wrong? I notice the other apps in the "user" section are the ones I set to "Never Optimize" under battery preferences. I feel like adding these two are not going to make any difference since the "Never Optimize" setting doesn't help.
xda6969 said:
When I added com.google.android.gm and com.google.android.apps.messaging, adb shell dumpsys deviceidle whitelist shows them in the "user" section, not the "system" section. Did I do something wrong? I notice the other apps in the "user" section are the ones I set to "Never Optimize" under battery preferences. I feel like adding these two are not going to make any difference since the "Never Optimize" setting doesn't help.
Click to expand...
Click to collapse
No, is ok, the change is at user level. I disabled doze in the settings too under battery management.
In my case they do a huge different, i do not have anymore the delay on notifications, expecially sms and clock alarms.
kd276 said:
No, is ok, the change is at user level. I disabled doze in the settings too under battery management.
In my case they do a huge different, i do not have anymore the delay on notifications, expecially sms and clock alarms.
Click to expand...
Click to collapse
In my case, this didn't help. Gmail notifications are delayed randomly, sometimes like 7 minutes, other times until I unlock the phone. I have a Pixel 5a. Now I'm gonna try to the turn off doze altogether. I know this method requires it to be redone every reboot. Incidentally, I was able to reverse the whitelisting by using...
adb shell dumpsys deviceidle whitelist -com.google.android.gm
xda6969 said:
In my case, this didn't help. Gmail notifications are delayed randomly, sometimes like 7 minutes, other times until I unlock the phone. I have a Pixel 5a. Now I'm gonna try to the turn off doze altogether. I know this method requires it to be redone every reboot. Incidentally, I was able to reverse the whitelisting by using...
adb shell dumpsys deviceidle whitelist -com.google.android.gm
Click to expand...
Click to collapse
Sorry this trick didn't help your case, i'm on Poco X3 Pro.
Turned of Doze totally using...
adb shell dumpsys deviceidle disable
... and now notifications work correctly. This disable both deep doze and light doze.
Yes it seems like whitelisting com.google.android.gm isn't enough to keep it awake. There must be other package(s) that need to be whitelisted as well.

GSAM app usage zero

Its an odd one was working for a few days then now GSAM ceases to show application battery usage .
I tried placing GSAM app exempt for battery optimization and also even tried putting it inside the never sleeping app list under battery usage menu.
Anything I missed ? Cheers
I'm using GSAM Pro on my N9860 and I have all my app stats showing since I used the ADB command to enable more stats a few days ago. I've disabled battery optimisation altogether for the app. I have not added it to the never sleeping apps because it cannot be added there once optimisation is disabled.
tdodd said:
I'm using GSAM Pro on my N9860 and I have all my app stats showing since I used the ADB command to enable more stats a few days ago. I've disabled battery optimisation altogether for the app. I have not added it to the never sleeping apps because it cannot be added there once optimisation is disabled.
Click to expand...
Click to collapse
I remember having the same issue after some time with my s10 plus also, don't remember how I resolved it. But it appears samsung is using aggressive hibernation methods within their devices OS according to
https://dontkillmyapp.com/
Either way, I deleted app and reinstalled again and added to my never sleeping app list. So far working .

battery drain

Hi.
I have been experiencing Battery Drain in my P20Pro lately. Saw the battery consumption alert and can see that it says Awake all the time even though the screen is off!!
Have hard reset my phone to no use. Any ideas!
Screenshot attached
Maybe install an app like better battery stats, it'll show what app or process is causing battery drain.
Check your EMUI version. The last one that did not drain battery for me was 10.0.0.161. I reverted back to that and disabled the update feature via adb shell. Also, look at power consumption details » software. I found out that google play was draining my battery overnight (around 10% ). I have disabled it and I only install apks now. All Huawei bloatware disabled via adb also.
I'm facing exactly the same problem Whene I'm traveling.
I'm on emui 10.0.0.180

Battery stats is not showing correctly [MIUI 12.1.3]

Hey there,
Hope you are well. When i do Settings - Battery & performance, it is showing last 30 minutes and sometimes 4 minutes. I did some research about this issue on the internet (Reddit, etc.) and many people have this problem. May i ask how can i view the battery stats correctly? I don't want to use 3rd party battery stats app because as i learn they are really draining battery.
Also i see Cell Standby is draining battery because it's usage is %28.4 since 1 day.
May i ask when do you think to fix battery stats issue? We really in trouble with this issue. We really need urgent update about this. Any hel
Stock ROM, MIUI 12.1.3, Global Stable, not rooted
Thanks in advance.
Kind Regards.
Hint: Replace "Need Help" in this thread's title by MIUI 12.1.3
jwoegerbauer said:
Hint: Replace "Need Help" in this thread's title by MIUI 12.1.3
Click to expand...
Click to collapse
Done.
What you're reporting is battery consumption, isn't related to what the battery stats tool - embedded in Android - reports.
You can dump battery stats with ADB
adb shell dumpsys batterystats

Categories

Resources