Checking the battery capacity of Xiaomi on Android: the complete guide

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?
If ##6485## doesn't open the menu, you may have a global firmware version with reduced diagnostic rights installed, or Google's Phone app blocks input. Try installing a standard MIUI call.

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

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

πŸ“Š How do you normally check your battery?
Through secret codes.
Apps from the Play Market
Feelings (how it holds the charge)
Through ADB and PC

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 battery

In 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_counter

If 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 statusResidue of capacitySymptomsRecommendation
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-out70-79%Turns off in the cold, jumps %Replacement recommended
CriticalLess 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.

Does fast charging affect the rate of degradation?
Yes, Quick Charge (SuperCharge) technology heats the battery more than a normal 5V/2A charge. High temperature is the main enemy of lithium batteries. Using fast charging overnight or in games accelerates wear and tear.
Do you really need to charge your new phones for 8 hours?
No, it's a myth that's been left over from the days of nickel batteries: modern Li-Po batteries don't have a memory effect. They can be charged at any time, and they don't need to be pumped.
Can the battery capacity be increased programmatically?
No, it's not software-enhanced to increase physical capacity. All applications that promise "capacity increases" are just limiting background processes or reducing screen brightness, saving charge, but not adding mAh.