Have you ever encountered a situation where a Xiaomi smartphone starts to brake, overheat or suddenly reboot for no apparent reason? In such cases, standard diagnostic methods (reboot, reset) often fail, and the service center asks for error logs to accurately determine the problem. This is where debug log comes to the rescue, a tool that records all system events, application errors and hardware failures in real time.
In this article, we will discuss in detail what debug log is on Xiaomi, Redmi and other devices. POCO, How to activate it through hidden settings or ADB, Where log files are stored and how to interpret them correctly, you will learn what types of logs exist (e.g. logcat, dmesg, radio log), how to distinguish them and what tools to use for analysis. MIUI, which may complicate the process of collecting logs on some models (for example, Xiaomi) 12T Redmi Note 11 with a locking of the engineering menu).
What is debug log and why is it needed by Xiaomi?
Debug log is a text file or data stream that records all events occurring on the Android system.
- ๐ฑ System Messages (Services Start/Stop, Settings Changes).
- โ ๏ธ Application errors (coloring, hanging, lack of memory).
- ๐ Hardware events (connection) USB, change in battery charge, overheating of the processor).
- ๐ก Network activity (connection to Wi-Fi, mobile network, Bluetooth).
- ๐ Core and drivers (mistakes of the chipset, camera module, sensors).
On Xiaomi debug devices, log is especially important for two reasons:
- Firmware MIUI It is heavily modified compared to pure Android, which leads to unique bugs not found on other brands.
- Many models (e.g, POCO F5 Xiaomi 13 Ultra has closed drivers for the camera or processor, errors which can only be diagnosed through logs.
Without debug log, service engineers or developers will not be able to:
- ๐ Identify the cause of spontaneous reboots (for example, due to an error in the display driver).
- ๐ Diagnose fast battery discharge caused by background process.
- ๐ฎ Determine why games are lagging (problems with the game) GPU heat-throttle).
- ๐ถ Deal with communication problems (e.g., cliffs) 5G or a bad Wi-Fi 6 signal).
โ ๏ธ Warning: Turning on debug log can speed up battery life by 10-15%, as the system constantly records data in the background.
Types of Logs on Xiaomi: What is needed for your problem
There are several types of logs on Xiaomi devices, each of which is responsible for its own area, and choosing the right type will save time and simplify diagnosis.
| Logo type | A team to assemble | What's fixing | When to use |
|---|---|---|---|
| logcat | adb logcat -d | Application and system messages (levels: Verbose, Debug, Info, Warning, Error). | App crashes, interface errors MIUI, Problems with Google services. |
| dmesg | adb shell dmesg | Linux kernel messages (driver operation, hardware errors). | Reboots, freezes, problems with the camera, display, battery. |
| radio log | adb logcat -b radio -d | Events of mobile network, Wi-Fi, Bluetooth, GPS. | Communication problems: call interruptions, bad signal, unstable Wi-Fi. |
| events | adb logcat -b events -d | System events (on/off screen, charging connection). | Diagnostics of the battery, awakening of the device, operation of sensors. |
| bugreport | adb bugreport | Full system image (includes all logs) + state-dam). | For sending in support of Xiaomi or developers custom firmware. |
For example, if your Redmi K50 It suddenly reboots when you connect to a charger, you need dmesg (a power controller problem). MIUI Launcher constantly flies, enough logcat with a filter on the package com.miui.home.
How to Enable Debug Log on Xiaomi: 3 Working Methods
The debug log on Xiaomi depends on the model and version. MIUI. Below are the current ways to use the MIUI 12-14 and HyperOS.
Method 1: Engineering menu (for most models)
This method works for Xiaomi. 11T, Redmi Note 10, POCO X4 and other devices with unlocked engineering menu.
- Open the Phone app and enter the code: ##4636##.
- Select Usage Statistics (Usage Statistics).
- Click on the three dots in the top right corner and select Enable logging.
- Go back to the main menu of engineering settings and select Logging โ Start.
Method 2: A Universal Method (ADB)
If the engineering menu is blocked (as on Xiaomi 13 Pro), use it. ADB:
adb shell setprop log.redirection console
adb shell setprop persist.logd.size 10M
adb shell stop logd
adb shell start logdAfter that, logs will be recorded in the buffer and they can be saved by the command:
adb logcat -d > xiaomi_log.txtMethod 3: Through the Developer Services application
For MIUI 14 and HyperOS:
- Activate Developer Mode: Go to Settings โ About Phone โ MIUI version and tap 7 times.
- Back to Settings โ Additionally. โ For developers.
- Turn on Debugging. USB Error log and error log.
- Connect the phone to the PC and perform in ADB: adb shell setprop persist.logd.logpersistd true
โ ๏ธ Note: On some models (e.g. Xiaomi Mix Fold 3) after logging through ADB You may reset the firmware region. Before you start, check the current region in Settings. โ Additionally. โ Region.
Make sure the battery is at least 50 times charged%|
Connect your phone to your PC via the original cable|
Install the drivers. ADB (Like Mi. PC Suite)|
Turn off the battery optimization for ADB developer-setting-->
Where to store debug log files on Xiaomi
Logs on Xiaomi can be stored in several places depending on the collection method:
- ๐ Temporary buffer (before reboot): Available only via adb logcat.
- ๐ Permanent logs (reserved after rebooting): /data/log/ โ basic MIUI (Root rights are required). /sdcard/MIUI/debug_log/ โ Logs collected through the engineering menu. /sdcard/bugreports/ โ full reports (bugreport).
- ๐ฅ๏ธ On PC: if you save logs through ADB, They will be in the folder where the command was launched (for example, in the, C:\Users\YourName\xiaomi_log.txt).
To access the folders /data/log/ without root, use the command:
adb pull /data/log/.On HyperOS, the path to logs may be different. For example, on Xiaomi 14, the basic logs are stored in:
/data/vendor/radio/log/How to view logs without PC?
How to read and analyze debug log
Raw logs are thousands of lines of text that are hard to navigate, and here's how to analyze them correctly:
Step 1: Filtration by Importance Level
In logcat, messages are divided into levels:
- V (Verbose) - debugging information (low-value).
- D (Debug) is the data for developers.
- I (Info) - Informational messages.
- W (Warning) โ Warnings (Potential Problems)
- E (Error) โ Critical errors (seek them first!)
- F (Fatal) Fatal failures (lead to reboot)
To filter out errors only, use:
adb logcat -d | findstr"E"Step 2: Search for keywords
Look for the following patterns in the logs:
| Problem. | What to look for in the lairs | Example of a communication |
|---|---|---|
| Overheating | thermal, overheat, throttling | E/ThermalEngine: Temperature too high, cpu4 throttled |
| Crash of the appendix | ANR (Application Not Responding), crash | E/AndroidRuntime: FATAL EXCEPTION: main Process: com.miui.home |
| Battery problems | battery, charger, usbc | E/BatteryService: charger disconnected unexpectedly |
| Camera errors | camera, ISP, hal | E/CameraHal: open camera failed: -19 |
Step 3: Use of specialized tools
For convenient analysis, use:
- ๐ฅ๏ธ Android Studio Logcat โ built-in tool with color labeling and filters.
- ๐ Logcat Reader (Windows) โ allows you to save logs in a readable format.
- ๐ Online Analyzers (e.g. Logcat Extreme).
๐ก
If there are many messages in Chinese (for example, ), use Google Translate to translate key phrases. MIUI duplicated in English and Chinese.
Common errors in Xiaomi logs and their significance
Some of the messages are found in Xiaomi logs, and hereโs what they mean and how to fix them:
1. CameraHal errors (CameraHal)
Examples:
E/CameraHal: open camera failed: -19 (ERROR_CAMERA_IN_USE)
E/CameraService: connect X failed: already connectedReasons:
- Conflict of applications using the camera (e.g, MIUI Camera and Google Camera).
- Damage to the camera driver after the update.
- Hardware malfunction (for example, plume dump on Xiaomi) 12S Ultra).
Solution: Reboot your phone, clear the camera cache in Settings โ Apps or roll back to the previous version of the firmware.
Battery Service Errors (BatteryService)
Examples:
E/BatteryService: charger disconnected unexpectedly
E/HealthService: Battery health: 4 (BATTERY_HEALTH_DEAD)Reasons:
- Faulty cable or power adapter.
- Battery wear (capacity below 60%).
- Failure of the power controller (requires repair).
Solution: Check the charger, calibrate the battery through the engineering menu (#4636## โ Battery information โ Reset).
3. Network errors (RIL, Telephony)
Examples:
E/RIL: Unable to register to network (cause: 11 - PLMN not allowed)
E/Telephony: SIM card removed unexpectedlyReasons:
- Problems with SIM-card (damage, incompatibility with the 5G).
- Failure in the communication module (for example, after a fall) POCO X3 Pro).
- Lockdown IMEI (post-stamp).
Solution: Reboot your phone, check it out SIM in another device or reset network settings in Settings โ SIM-maps and mobile networks โ Resetting settings.
๐ก
If there is a message in the logs E/SensorService: sensor XXXX has no data, this indicates a sensor malfunction (for example, a gyroscope or accelerometer). AMOLED-screens (e.g. Xiaomi) 13 Lite) may be due to the light sensor plume breaking off.
How to send logs in support of Xiaomi
If you are contacting the Xiaomi service center or to the developers of custom firmware, the logs need to be properly prepared:
Step 1: Collect a complete report
Follow the command:
adb bugreportIt's gonna create an archive. bugreport-YYYY-MM-DD-HH-MM-SS.zip complete information about the system.
Step 2: Pack the logs
If you have collected logs manually, add to the archive:
- Logcat.txt (main logs)
- The file dmesg.txt (kernel logs).
- Screenshots of errors (if any).
- File build.prop (information about firmware).
Archive everything in ZIP passwordless.
Step 3: Send through official channels
Depending on the problem:
- ๐ง Xiaomi support: attach archive to the ticket on the site mi.com/support.
- ๐ค Custom firmware developers: download logs to del.dog or Pastebin and give a link.
- ๐ง Service center: write down the logs on the flash drive and transfer it with the device.
โ ๏ธ Note: Do not send logs in open chats or social networks โ they may contain confidential information (IMEI, Serial number, Mi Account details. Always use secure channels (e.g. encrypted email or private messages).