Smartphone owners are often faced with a situation where the device suddenly turns off at 20% charge or discharges in a couple of hours, although it initially “held” all day. This is a sure sign of degradation of the lithium-ion battery, but the operating system Android does not always honestly reflect the actual state of the power source. The standard indicator shows only the current charge level as a percentage, completely ignoring the physical wear of the cell and the loss of its nominal capacity.
To understand whether it is time to change the battery or the problem lies in a software failure, it is necessary to conduct in-depth diagnostics. There are methods that allow you to measure the residual capacity, current voltage and temperature of the battery without disassembling the case. We will look at built-in engineering codes, command line capabilities ADB and third-party utilities that provide the most accurate data about the health of your gadget.
Correct interpretation of the data obtained will help you avoid unnecessary expenses for repairs or, conversely, prevent the battery from swelling in time. Below are step-by-step guide for various user levels - from simply entering a code to connecting to a computer.
Diagnostics through the engineering menu and hidden codes
The fastest way to access technical information about the battery is to use special USSD codes or the engineer menu. These sections are hidden from the average user, but contain detailed operation logs hardware. Depending on the smartphone manufacturer (Samsung, Xiaomi, Pixel), the set of commands may differ, so it is worth trying several options.
On most devices, just open the “Phone” application and enter the code ##4636##. If the menu opens, select "Battery Information". Here you will see parameters such as voltage, temperature and charging status. However, this method often shows only the current values, and not the degree of wear.
For devices Samsung there is a more advanced code *#0228#that opens the menu BatteryStatus. Pressing the button Quick Start at the bottom of the screen can reset the power controller and update the displayed charge percentage if it is stuck. Remember that on new versions of Android, access to these menus is often blocked by the manufacturer for security reasons.
⚠️ Attention: Do not change the settings in the engineering menu if you are not sure of their purpose. Resetting the calibration or changing the voltage limits can lead to unstable operation of the device or battery failure.
If the code ##4636## does not work, try installing the QuickShortcutMaker application from the Play Market - it allows you to force open hidden system activities, including the battery test menu.
Using the ADB command line for accurate data
The most reliable information about the battery status can be obtained through the debugging interface ADB (Android Debug Bridge). This method requires connecting your smartphone to your computer and enabling USB Debugging mode in the developer menu. The advantage of this method is that it reads data directly from the system file uevent, bypassing graphical shell add-ons.
After installing the drivers and setting up ADB on the PC, connect the cable and run the command to display all battery parameters. The system will return a detailed report where we are interested in the fields charge_counter (current charge in mAh) and voltage (voltage in mV). By comparing the current capacity with the passport one, you can calculate the percentage of wear.
adb shell dumpsys battery
In the resulting list, find the line level —this is the current percentage, and scale —usually it is 100. More important is the value technology, which will indicate the type of chemistry (most often Li-ion or Li-poly). If the value charge_counter at 100% charge is significantly lower than the capacity declared by the manufacturer (for example, 3000 mAh instead of 4000 mAh), the battery requires replacement.
- 🔋 charge_counter - shows the actual remaining energy in milliamp-hours.
- ⚡ voltage - current voltage; a drop below 3.6V under load indicates severe wear.
- 🌡️ temperature —battery temperature in tenths of a degree (a value of 350 means 35.0°C).
What to do if the computer does not see the phone?
Make sure you are using a high-quality data cable, not just for charging. Also check if your computer has brand-specific software (for example, Samsung USB Drivers or Google USB Driver), as standard Windows drivers may not recognize the device in debug mode.
Wear analysis using third-party applications
For users who do not want to tinker with the computer and codes, there are specialized applications from Google Play. They automate the process of collecting statistics and calculating the degree of degradation. The leader in this niche is considered to be a utility AccuBatterythat analyzes charging and discharging rates in the background.
The operating principle of such apps is based on mathematical modeling. The application measures how many milliamp-hours were “poured” into the battery during the charging session and compares this with the percentage change on the indicator. For example, if charging from 50% to 100% took 2000 mAh, then the total battery capacity is about 4000 mAh. To obtain an accurate result, several charge-discharge cycles are required.
Other popular solutions such as Battery Guru or CPU-Z, provide snapshots of the state: voltage, manufacturing technology and health status. However, it is worth understanding that without root access (root), access to some system charge cycle counters may be limited, and the data will be approximate.
| Application | Root required | Estimation accuracy | Main function |
|---|---|---|---|
| AccuBattery | No | High (after calibration) | Calculation of actual capacity |
| CPU-Z | No | Medium | Info about hardware and voltage |
| Battery Charge Limit | Yes | Maximum | Charging and cycle control |
| 3C Battery Manager | Desirable | High | Detailed discharge statistics |
Calibrating the charge indicator and resetting statistics
Sometimes the problem is not physical wear, but desynchronization of the software controller and the actual cell capacity. The smartphone may show 100%, although the battery is only 80% charged, or turn off at 15%. In such cases, the procedure helps calibration, which resets the battery statistics file (batterystats.bin).
The classic calibration method looks like this: discharge the phone until it turns off completely (0%), then put it on charge and, without turning on the screen, wait until 100%. After that, keep it charging for another hour. Then turn on the device. If the indicator again shows less than 100%, continue charging while turned on. Repeat the cycle until the phone shows a full charge immediately after turning on.
A more radical method involves obtaining root access and deleting the file /data/system/batterystats.bin via a file manager or terminal. This forces the system to rebuild the discharge table. However, on modern versions of Android, the influence of this file on the operation of the power controller is minimal, and most often a simple cycle of complete discharge and charging is sufficient.
⚠️ Attention: Deep discharge of lithium-ion batteries “to zero” is harmful to the chemistry of the element. Do not use the full discharge method too often, only if there are obvious indication failures.
☑️ Checklist for correct calibration
Physical signs of battery failure
Software methods are good, but they cannot always detect physical defects such as swelling or internal short circuit. Visual inspection and tactile sensations sometimes say more than any numbers in AccuBattery. If the smartphone's body begins to diverge, the screen lifts, or the back cover comes unstuck, this is a direct sign that the battery is swollen.
Another alarming symptom is the device overheating in the areas where the battery is located, even in the absence of a heavy load. Normal operating temperature is 30-40°C. If the case burns your hands when watching a video or reading, the internal resistance of the cell has increased and it is not working efficiently, generating excess heat.
Rapid loss of charge in standby mode (when the screen is off and applications are not running) also indicates a problem. If the phone loses 10-20% overnight in airplane mode, most likely there is self-discharge due to aging of the electrolyte or micro-short circuits inside the can.
A swollen battery is a fire hazard. If you notice any deformation in the case, immediately stop using the device and replace the battery without trying to puncture or squeeze it.
Frequently asked questions about battery diagnostics
Why does the application show a different capacity for each measurement?
Estimation algorithms work based on the current load and temperature. To obtain a stable result, you need to carry out at least 3-5 full charge-discharge cycles for the application to accumulate sufficient statistics and average the indicators.
Is it possible to restore the capacity of an old battery using software?
No, the physical wear of the chemical composition is irreversible. Software “recovery” is a myth. The maximum that can be done is to calibrate the controller so that it correctly displays the remaining resource, but the capacity itself will not increase.
What voltage is considered normal for a Li-Ion battery?
The nominal voltage is 3.7V. A fully charged battery should output 4.2V (sometimes 4.35V or 4.4V for high voltage cells). If the voltage drops below 3.0V under load, the battery is considered deeply discharged and may require activation or replacement.
Does replacing the cable affect the accuracy of the measurement?
The cable itself does not affect the system's reading of data, but a bad cable can cause voltage surges when charging, which will throw off the calibration algorithms of applications that analyze the rate of charge replenishment.