Xiaomi, Redmi and POCO are famous for their autonomy, but over time, even the most resistant batteries degrade. Users often notice that the phone has become faster to discharge, suddenly turn off in the cold or show a charge surge of 30% to 5%.
Unlike iOS, where the percentage of battery wear is hidden in the service menu or visible immediately, in the shell. MIUI And HyperOS, this information is often encrypted or inconvenient, but Android still collects detailed statistics about charging cycles and current capacity. There are several proven ways to access this data, from entering hidden data. USSD-codes before connecting the smartphone to the computer.
In this article, we will discuss all available diagnostic methods, from simple engineering menus to professional analysis through ADB. You will learn to distinguish software glitch from physical death of a power cell. It is important to understand that the accuracy of readings depends on the firmware version and the specific device model.
Use of engineering menus and secret codes
The fastest way to get the initial information about the battery status is to enter special commands in the dialing field. Xiaomiβs engineering menu contains sections for factory testing, which displays the current voltage and capacity parameters. To start the diagnosis, go to the Phone application and type the combination # # # # #6485##.
Once you've entered the code, you'll see a window on the screen that has lots of lines of technical information. Don't be afraid of the abundance of numbers, we're interested in the specific parameters that are marked with abbreviations. MB_06 If it's a good state, it means the system thinks the battery is good, but if you want to understand the actual capacity, you need to look for other lines.
- π MB_00 β current charge level as a percentage.
- β‘ MB_01 β current battery voltage (in millivolts).
- π MB_02 β Current charging status (charged/discharged).
- π MB_05 β Number of full charge cycles (Cycle Count).
Unfortunately, in the new versions MIUI line (MB_10 It's often hidden or it's zero, and it's done by manufacturers to make the interface easier, but there are ways that power users can find workarounds, and if the code doesn't work or it shows empty values, your firmware version is blocking this access method.
β οΈ Note: Do not try to change the values in the engineering menu if there are fields for input. Reset battery statistics (reset fuel gauge) without real calibration can lead to incorrect display of percentages of charge.
What if the code doesn't work?
Analysis through system log battery_history.xml
A deeper and more reliable method that does not require root rights is to analyze the system log of battery history. Android keeps a detailed log of all events related to the power system and saves it in a file. battery_history.xml. This file contains accurate data about current and initial capacity, if the smartphone has a Snapdragon or MediaTek processor with appropriate support.
To get the data, you'll need a computer and an ADB driver installed. First, turn on your smartphone's USB Debugging in the Developer Menu. Then connect the device to your PC and execute a command to unload the log. This is the most reliable way to find out the exact passport capacity and current status without installing third-party software.
adb pull /sys/class/power_supply/battery/battery_history.xmlYou can open the file in any text editor, but it's not easy to read it manually. XML-You need to find tags that contain the start and cur attributes, and the difference between them will show the degree of degradation, and there are online parsers and scripts that automatically decrypt this file and give a clear report on the health of the battery.
- π Find a line that starts with <BATTSTAT>.
- π Look for the Cap (capacity) settings or des_cap (design capacity).
- π Compare Design Capacity (factory) and Actual Capacity (current).
The good thing about this method is that it reads data directly from the power controller, bypassing the software add-ons of the shell. Even if the Safety app shows 100% health, the log can reveal a real picture of wear and tear over recent cycles, which is especially useful when buying a used device.
π‘
System log battery_history.xml β The only way to get accurate data about the capacity without Root-rights and third-party applications, as it is read directly from the kernel of the system.
Using diagnostic apps from Google Play
If you are in the command line and XML-You don't want to use files, you'll get specialized apps, and Google Play offers dozens of battery monitoring tools, but not all of them are good at showing real capacity. Most simply read the data that the system itself broadcasts, so its accuracy depends on how honest it is. MIUI share.
One of the leaders in this niche is AccuBattery, which is unique in that it doesn't just read static data, it takes its own measurements in real time. It analyzes the current that flows into the battery during charging and compares it to the percentage gain, which allows you to calculate the actual capacity with high precision after several charging cycles.
Other popular utilities, such as AIDA64 or CPU-Z, display information from the uevent system file. They display the Charge Counter parameter, which often (but not always) matches the actual residual capacity. However, on many new Xiaomi models, this parameter can be locked or show a passport value, ignoring wear and tear.
It is important to understand the limitations of such programs. AccuBattery can take several days of use and at least 2-3 full charge cycles from 15% to 100% to get accurate data.The application must accumulate statistics so that the algorithm can filter out errors and heat losses that distort the measurements.
Checking status through ADB teams
For advanced users who want instant results without installing heavy software, the perfect way to do this is to directly request through ADB Shell, which allows you to ask the power controller for specific values of capacity, temperature and voltage, and works on most USB-enabled devices.
Connect your smartphone to your computer, open the console in the folder with ADB and type a command to query battery properties, and the system returns a list of parameters to look for capacity or charge_counter. If the device supports reading real capacity, you will see a number in milliamp hours (mAh).
adb shell dumpsys batteryIn the resulting output, look for the lines level (percentage charge) and scale (maximum level). However, to get the capacity in mAh, the cat command is more often used to read system files directly:
adb shell cat /sys/class/power_supply/battery/capacity
adb shell cat /sys/class/power_supply/battery/charge_counterIf the team charge_counter returns a value close to the passport (for example, 4500-5000 mAh for modern flagships, means the battery is in good condition, 3000 mAh on passport 5000), This indicates a strong degradation of the element chemistry.
β οΈ Note: The dumpsys battery command shows program status, not physical capacity. For accurate measurements in mAh, use reading files through cat or specialized applications.
Table: Decoding of indicators of battery wear
Understanding the numbers is key to making a good diagnosis, and when you get the current capacity data, you have to compare it to the factory performance of your model, and here's a table that helps you interpret the measurements and make a decision about whether to replace the battery.
| Battery status | Residue of capacity | Symptoms | Recommendation |
|---|---|---|---|
| Excellent. | 90-100% | The phone is full-time. | No replacement required |
| Normal. | 80-89% | By evening, 15-20% remains. | We can use it further. |
| Worn-out | 70-79% | Turns off in the cold, jumps % | Replacement recommended |
| Critical | Less than 70% | Bloating, only the sockets work. | Urgent replacement! |
Consider that a drop in capacity of up to 80% is considered normal after 500 full charge cycles. If your phone is a year old and has worn out as much as 30%, you may have used fast charging in games or overheated your device. Lithium polymer batteries are sensitive to temperatures above 45 degrees.
π‘
To extend the life of the battery, try not to discharge the phone to zero and do not hold on charging at 100% for too long. The optimal range for battery storage is from 20% to 80%.
External features and program calibration
Numbers, but the physical state of the battery is sometimes more important than the software. Before you carry the phone to the service, do a visual inspection. If the battery is swelling, it can damage the display or motherboard. In such cases, software checks are no longer meaningful, you need to replace immediately.
Often times, the capacity seems normal, but the phone turns off by 15-20%, which is a sign of the desynchronization of the charge controller and the actual capacity, in which case calibration helps, it doesn't restore the chemical capacity, but it makes the controller display the percentages correctly.
The calibration procedure is simple, but takes time:
- π Discharge the phone until it is completely turned off (0%).
- π Put on charging in the off state to 100%.
- β³ Keep it on the charger for more. 1-2 hour 100%.
- π Turn on the phone (without turning off charging) and reboot.
After this procedure, the BMS (Battery Management System) will recalculate the voltage limits of 0% and 100%, which can eliminate the problem of sudden shutdowns, and if the situation has not changed after calibration, then the resource of the chemical element is physically exhausted.