What is it? batterystats.bin Why do you need it on Xiaomi?
File. batterystats.bin β This is a hidden system log that Android (including shell) MIUI Xiaomi uses battery consumption statistics to track application activity, screen time, charge/discharge cycles and other parameters that affect device autonomy. Without this file, the system would not be able to show detailed charge flow information in the Settings menu. β Battery.
However, over time, batterystats.bin can inflate or contain incorrect data β especially after MIUI updates, resets or manual intervention in system files β leading to false battery consumption rates, such as when YouTube eats up 50% of its charge in 10 minutes, when it is actually another process that is to blame.
It's important to understand that removing batterystats.bin won't improve real autonomy -- it will only reset statistics, forcing the system to re-collect data -- useful for diagnostics, but not for physical battery "cure."
Where batterystats.bin is stored on Xiaomi smartphones (Redmi, POCO, Black Shark)
The file is in a hidden system folder that is not accessible through standard MIUI Explorer, and its path depends on the Android version and shell:
- π The Main Path (Android) 9β14, MIUI 12β15): /data/system/batterystats.bin
- π Alternative path (older versions) MIUI): /data/system/batterystats-checkin.bin
- π For some models POCO: /data/system/batterystats-daily.xml (log-in)
- π How do you check? You can find out the exact location through ADB team: adb shell ls /data/system/ | grep batterystats
On new devices (such as Xiaomi 14 or Redmi Note 13 Pro+), the file can be encrypted or hidden deeper due to Googleβs security policy, and can only be accessed through root or special utilities like MT Manager.
How to access batterystats.bin without root (3 working methods)
If you don't have a superuser (root) right, you can access the file through workarounds.
1.Across ADB (Android Debug Bridge)
The safest method, which doesn't require unlocking the bootloader, is to:
- π₯οΈ Computer with installed ADB-driver
- π± Included Debugging by USB on a smartphone (Settings) β The phone. β Version. MIUI β 7 times tap to unlock the developer menu)
- π Cable USB (preferably original)
Instructions:
- Connect your phone to your PC and confirm access to debugging.
- Open the command line (cmd) in the folder with the platform-tools.
- Enter the command to copy the file on the PC: adb pull /data/system/batterystats.bin C:\batterystats_backup.bin
- To delete the file (reset statistics): adb shell rm /data/system/batterystats.bin
βοΈ Preparation for work with ADB
2.Through TWRP (Castom Recaveri)
If your Xiaomi has TWRP installed, you can access the file through the file manager recovery:
- Boot to TWRP (turn off phone β pinch Power + Volume up).
- Go to Advanced β File Manager.
- Open the path /data/system/ and search for batterystats.bin.
- Click Delete to delete or Copy to back up.
Note: TWRP does not display files in /data folder if it is encrypted (by default on new Xiaomi).
3. Through applications with access to system files
Some apps from Google Play can view hidden files without root, but their functionality is limited:
- π§ FX File Explorer (requires you to enable access to the root folder in the settings)
- π§ Solid Explorer (similar, but with a more user-friendly interface)
- β οΈ Limitation: These applications will not be able to remove batterystats.bin without root, but will allow you to copy it for analysis.
π‘
If after removing batterystats.bin, the battery statistics did not reset, restart the phone and wait 1-2 hours - the system will create a new file automatically.
How to remove batterystats.bin with root access: step-by-step instructions
If your Xiaomi has unlocked a bootloader and installed Magisk (or another root manager), the process is simplified. Use any root-enabled file manager, such as Root Explorer or MT Manager.
Step-by-step algorithm:
- Open the file manager and give it root rights.
- Go to /data/system/.
- Find the files: batterystats.bin (main) batterystats-checkin.bin (backup) batterystats-daily.xml (daily log, if any)
Remove them (or move them to another folder for backup).
Reboot the phone.
Critical: on some Xiaomi models (e.g. Mi 11 Ultra or POCO F5), batterystats.bin is protected by SELinux. If it is restored with the same data after deletion, run it in Terminal (with root rights):
su
chmod 644 /data/system/batterystats.bin
rm /data/system/batterystats.bin
rebootWhat if batterystats.bin is not deleted?
What happens after the removal of batterystats.bin: consequences and nuances
Deleting the file will not harm the system, but will lead to the following changes:
| The effect | Description | Duration |
|---|---|---|
| Resetting battery statistics | Flow schedules in Settings β The batteries will be zeroed. The new data will start collecting immediately. | Continuously (until the next reset) |
| Temporary increase in expenditure | In the first hours after removal, the system actively monitors applications, which can increase consumption by 5-10%. | 1-2 days |
| The disappearance of the βghostβ expense | If a non-existent expense (for example, 30% on the System) was shown before, it will disappear. | Constantly. |
| Adaptive Battery Data Reset | The adaptive battery (in MIUI 13+) is re-learned to learn the userβs habits. | 3-5 days |
Myths about removing batterystats.bin:
- β File deletion increases battery life by 20%". β Real increase in autonomy = 0%, only statistics are reset.
- β File can be deleted once a week for optimization". β Frequent resets only prevent the system from analyzing usage patterns.
- β Removal is useful if the battery statistics show clearly incorrect data (for example, 100% consumption on Google Play Services in 5 minutes).
π‘
Remove batterystats.bin only if there are obvious battery stats that are not available, otherwise it is useless and may temporarily impair Adaptive Battery performance.
Alternative ways to reset battery statistics on Xiaomi
If you can access batterystats.bin, use alternative methods:
1.Using the engineering menu (#4636##)
Type the code ##4636## on your phone keyboard, then:
- Select Battery Information.
- Click on the three dots in the top right corner β Reset statistics.
- Confirm the action.
Limitation: Not all Xiaomi models (on the same model) MIUI 14+ may be blocked).
2. through resetting settings (without data loss)
MIUI has a function to reset only battery statistics without deleting applications and files:
- Go to Settings β About the phone β Reset settings.
- Select Reset Battery Statistics (if available).
- Confirm and restart the phone.
3. Through optimization applications
Some utilities (such as AccuBattery or GSam Battery Monitor) allow you to reset battery statistics software, but they do not delete batterystats.bin, but only clean their internal logs.
Frequent Mistakes and How to Avoid Them
When working with batterystats.bin, users often make critical errors that can lead to system failures.
β οΈ Attention: Never edit batterystats.bin manually (e.g. via hex editor) Even one incorrect change of byte will cause the BatteryStats service to crash, and the phone will stop displaying the charge level until the file is restored.
Error 1: Delete a file without backup
Before any manipulation, copy the original batterystats.bin If you have problems after deleting (for example, the phone does not show the percentage of charge), you can return the file back. ADB:
adb pull /data/system/batterystats.bin ~/Desktop/batterystats_backup.binMistake 2: Using a single-click utility
Google Play has apps like Battery Stats Reset that promise to reset stats without root, and most of them either don't work or require dangerous permissions like access to the Accessibility Service. Don't use them, they can collect personal data.
Error 3: Resetting statistics during charging
If you delete batterystats.bin while the phone is connected to the charger, new statistics can be recorded with errors. Always reset the file when the charger is turned off and the battery level is 20-80%.
β οΈ Attention: On devices with MIUI 15 (for example, Xiaomi 14) post-exclusion batterystats.bin You may need to reboot to Fastboot and the fastboot reboot command to restore the file correctly.