Batterystats.bin on Xiaomi: where is the file, how to delete it and reset battery statistics

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.

πŸ“Š Your Xiaomi smartphone supports root access?
Yes, there is root.
No, but I want to get it.
No, and no planning.
I don't know what it is.

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:

  1. Connect your phone to your PC and confirm access to debugging.
  2. Open the command line (cmd) in the folder with the platform-tools.
  3. Enter the command to copy the file on the PC: adb pull /data/system/batterystats.bin C:\batterystats_backup.bin
  4. To delete the file (reset statistics): adb shell rm /data/system/batterystats.bin

β˜‘οΈ Preparation for work with ADB

Done: 0 / 4

2.Through TWRP (Castom Recaveri)

If your Xiaomi has TWRP installed, you can access the file through the file manager recovery:

  1. Boot to TWRP (turn off phone β†’ pinch Power + Volume up).
  2. Go to Advanced β†’ File Manager.
  3. Open the path /data/system/ and search for batterystats.bin.
  4. 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:

  1. Open the file manager and give it root rights.
  2. Go to /data/system/.
  3. 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




reboot

What if batterystats.bin is not deleted?
If the file is not deleted even from root, the cause may be: 1) SELinux protection (try to temporarily switch to Permissive mode with setenforce command) 0). 2) Mounting of the section /data in Read Only mode (check through mount) | grep data). 3) Active process system_server, blocking changes (you need to "kill" the process or reboot to the recaveri).

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 effectDescriptionDuration
Resetting battery statisticsFlow schedules in Settings β†’ The batteries will be zeroed. The new data will start collecting immediately.Continuously (until the next reset)
Temporary increase in expenditureIn 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” expenseIf a non-existent expense (for example, 30% on the System) was shown before, it will disappear.Constantly.
Adaptive Battery Data ResetThe 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:

  1. Select Battery Information.
  2. Click on the three dots in the top right corner β†’ Reset statistics.
  3. 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:

  1. Go to Settings β†’ About the phone β†’ Reset settings.
  2. Select Reset Battery Statistics (if available).
  3. 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.

πŸ“Š What Battery Statistics Reset Method Have You Tried?
Through ADB
Through TWRP
Through the engineering menu
Through resetting MIUI settings
Nothing.

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.bin

Mistake 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.

FAQ: Answers to frequent questions about batterystats.bin Xiaomi

Can I remove batterystats.bin on Xiaomi without a computer?
Yes, but with limitations: If there is root, it is through any file manager (e.g. MT Manager); if there is TWRP, it is through the file manager, it is through the file manager, it is through the file manager, without root, and TWRP, it is only through applications like FX Explorer, but they cannot delete the file, but only copy it.
After removing batterystats.bin, the phone became more likely to run out. Why?
This is a temporary effect. After resetting the statistics, Android reanalyzes the activity of the applications, which requires additional resources. Usually the flow is normalized after 1-2 charge/discharge cycles. If the problem persists: Check the background activity of the applications in Settings β†’ Battery β†’ Battery usage. Turn off Adaptive battery in Settings β†’ Battery β†’ Battery settings for 1 day. Make sure that third-party battery optimizers are not installed (they may conflict with the battery's performance). MIUI).
Where is batterystats.bin stored on POCO F5 and other new models?
On Android 13/14 and MIUI 14/15 devices (e.g. POCO F5, Redmi Note 12 Pro+, Xiaomi 13T), the file can be in: /data/system/batterystats/batterystats.bin (new folder structure) /data/system/batterystats-checkin.bin (backup) /data/system/batterystats-daily.xml (daily logs) To find the way accurately, use the command: adbsystem /data/batterystats-names
Can I restore the remote batterystats.bin?
Yes, the system will restore it automatically when you recharge or reboot it, but if you want to return the old statistics (before resetting), do this: Copy the backup file backup backup back to your phone (if you have one): adb push ~/Desktop/batterystats_backup.bin /data/system/batterystats.bin The right access rights are set: adb shell chmod 644 /data/system/batterystats.bin If you don't have a backup, you can't restore the old statistics.
Will batterystats.bin reset be useful for battery calibration?
No, they are two different processes: batterystats.bin is responsible only for usage statistics (which applications consumed how much), battery calibration is related to the charge controller and requires a full discharge/charging cycle (0–100%). Calibration: Discharge the phone before automatically shutting down. Charge to 100% without interruptions (use the original RAM). Keep charging for another 1-2 hours after reaching 100%. Removal of batterystats.bin does not affect calibration.