New Battery_Screen time remaining


Device version ?


  • Total voters
    22

gogocar62

XM12 Tester
22 Apr 2021
5,065
322
If your "Remaining screen time" is frozen in your battery statistics, vote in the poll (above) which version of your device you have.
 

Attachments

  • Screenshot_2024-05-11-17-14-51-952_com.miui.securitycenter-edit.png
    Screenshot_2024-05-11-17-14-51-952_com.miui.securitycenter-edit.png
    450.9 KB · Views: 180
Last edited:
I doubt it's related directly to device version, as I know at least one person which has same issue on Xiaomi 14 Pro, which is China-only device.
 
  • Like
Reactions: gogocar62
Okay. The purpose of this poll was to find out if there is a problem with the device version.
 
The issue seems like a bug that is triggered by a prop dynamically set by the system.
For those with root, for now you can set it to 0 and remaining time will be showing correctly.
Code:
adb shell
su
setprop persist.sys.power.fuel.gauge 0
Is this something you guys can fix for future releases for the ones without root, or can only Xiaomi fix it? Thanks in advance!
 
Is this something you guys can fix for future releases for the ones without root, or can only Xiaomi fix it? Thanks in advance!
It's not known why this prop was even set on these devices, it's only supposed to be set on specific devices, and Xiaomi 14 isn't one of them.
There's nothing to fix from our side, and those who already have this prop set - it's not possible for us to unset it (it's called a "persist" prop for a reason).
The users either have to unset it themselves or clean flash.
 
  • Like
Reactions: gogocar62
Ok, I think another option is to root for this, fix it and then unroot. I'll check about it tomorrow.
 
It's not known why this prop was even set on these devices, it's only supposed to be set on specific devices, and Xiaomi 14 isn't one of them.
There's nothing to fix from our side, and those who already have this prop set - it's not possible for us to unset it (it's called a "persist" prop for a reason).
The users either have to unset it themselves or clean flash.
A clean install did not fix the problem.
1, install stock ROM in Miflash > format data
2, install xiaomi.eu weekly ROM > data format

Only the commands you provided will solve the problem.

XM 14 Global.
 
  • Like
Reactions: JiaiJ
Summary: issue fixed with the commands shared above, with root.
Long story (steps for noobs):
- Install Magisk
- Get the file images/init_boot.img from the zip of the last version of the rom you installed (the one you have running).
- Copy it to the phone
- In magisk, use that img file to generate a patched one, that will have root.
- Reboot into fastboot, attach the phone to the computer with a cable, and flash that file in fastboot (I'm using the path and filename for my example, any other will be different). Also the command to flash might be different depending on the model, I have a X14 Global, so check the the link at the end for full details):
fastboot flash init_boot_ab root/magisk_patched-27000_6snSA.img
fastboot reboot
- Once you have root, the commands in this thread will not fail (namely the "su" command will ask permission in your phone, and it will work).
- As I don't needed root any more and I don't want to hide to apps, I'm removing it. So I simply flashed back the original init_boot.img file:
fastboot flash init_boot_ab images/init_boot.img
fastboot reboot
More info about rooting, mostly everything extracted from there:
 
  • Love
Reactions: monterrey4ever
Summary: issue fixed with the commands shared above, with root.
Long story (steps for noobs):
- Install Magisk
- Get the file images/init_boot.img from the zip of the last version of the rom you installed (the one you have running).
- Copy it to the phone
- In magisk, use that img file to generate a patched one, that will have root.
- Reboot into fastboot, attach the phone to the computer with a cable, and flash that file in fastboot (I'm using the path and filename for my example, any other will be different). Also the command to flash might be different depending on the model, I have a X14 Global, so check the the link at the end for full details):

- Once you have root, the commands in this thread will not fail (namely the "su" command will ask permission in your phone, and it will work).
- As I don't needed root any more and I don't want to hide to apps, I'm removing it. So I simply flashed back the original init_boot.img file:

More info about rooting, mostly everything extracted from there:
Much appreciated
 
The issue seems like a bug that is triggered by a prop dynamically set by the system.
For those with root, for now you can set it to 0 and remaining time will be showing correctly.
Code:
adb shell
su
setprop persist.sys.power.fuel.gauge 0
A new situation has arisen. Clean installation ROM 24.5.13. (XM 14 Global)
If I root (Magisk, KernelSU) and run the repair commands it works.
However, if I remove the root, the problem returns.
In the previous version of the ROM, the fix worked even after unrooting.