Debugging mode by USB (USB Debugging on Xiaomi smartphones is a hidden feature, without which it is impossible to perform many technical operations: from firmware through fastboot to data recovery through fastboot. ADB. However, the manufacturer deliberately hides this option in the menu for developers to prevent accidental changes to system files. USB shelled MIUI, This guide will help you avoid typical mistakes and save time.
Unlike the βbareβ Android, where the path to enabling debugging is standard, Xiaomi adds its nuances: additional confirmations, locks when unlocked bootloader and even regional restrictions in some versions of MIUI. For example, on the models Redmi Note 12 Pro+ or POCO F5 2023-2026 release may require binding Mi Account before activation. We will analyze all scenarios β from basic inclusion to solving problems with the error βUnauthorizedβ.
Why do you need to debug USB on Xiaomi?
USB debugging allows you to access low-level smartphone functions through your computer.
- π§ Install custom software (such as LineageOS or Pixel Experience) via fastboot or TWRP.
- π± Recover deleted files with tools like Dr.Fone or EaseUS MobiSaver.
- π Testing apps in Android Studio or debugging them through ADB.
- π Unlock the bootloader in the official way through the Mi Unlock Tool.
- π‘ Modify system files (e.g., remove embedded Xiaomi apps).
But there are risks: if you do something careless, you can break your firmware, lose your warranty, or experience a data breach, such as connecting to an unverified PC with debugging enabled, allowing attackers to steal personal information through ADB.
β οΈ Attention: On devices with MIUI 14+ (Xiaomi 13 Ultra or Redmi K60 Pro) when you first connect to a PC with debugging enabled, the system will request permission to access data through a pop-up window, if you miss it, debugging will not work, even if the tick in the settings is ticked.
Preparation of the smartphone: unlocking the developer menu
Before you turn on USB Debugging, you need to activate the hidden menu for developers. On Xiaomi, this process is different from standard Android:
- Open the Settings app (cog icon).
- Go to About Phone (or About Device on some models).
- Find the MIUI version string and tap it 7 times in a row.
- After the notification βYou became a developer!β, return to the main settings menu.
On some devices (e.g. POCO X5 Pro) instead of the MIUI version, you may need to tap the Build Number. If nothing happens after 7 taps, check if the antivirus or the MIUI optimizer is blocking access (turn them off temporarily).
Step-by-step: how to enable debugging by USB
After unlocking the developer menu, follow these steps:
- Return to Settings and select a new Additional (or Advanced) section.
- Slip on the item For developers (may be called Developer settings).
- Scroll down to the Debugging block and activate the Debugging switch over USB.
- In the pop-up window, confirm the action by pressing OK.
On MIUI 14/15, after debugging is enabled, an additional risk warning may appear, it must be accepted, or the function will not work. If the USB debugging switch is inactive (grey), then:
- π Device linked to Mi Account (authentication required).
- π΅ Guest mode or parental control is included.
- π Need to be updated MIUI Up to the latest version (check in Settings) β Update of the PO).
βοΈ Checking before debugging
Solving Errors When Connecting to a PC
Even after debugging is enabled, Xiaomi may not be identified in ADB or issue errors. Consider typical problems and ways to fix them:
| Mistake. | Reason. | Decision |
|---|---|---|
| Unauthorized (not authorized) | The device has not confirmed permission for this PC. | Turn off/connect the cable and check the pop-up window on the phone. |
| Device not found | There are no ADB or Fastboot drivers. | Install Mi PC Suite or drivers manually through Device Manager. |
| Debugging shuts down on its own. | The option to withdraw USB permissions is activated. | In the developer menu, turn off the Revocation of USB permissions. |
| MIUI Optimization blocks teams | MIUI optimization for ADB is enabled. | In the developer menu, turn off MIUI Optimization. |
If you do not have a permission request window on your phone when you connect to a PC, try:
- Reboot your smartphone and computer.
- Use the other USB-cable (preferably original from Xiaomi).
- Connect to another USB-port (preferably) USB 2.0, as 3.0 sometimes causes problems).
- In the developer menu, enable debugging over USB (security options) and restart.
π‘
If after connecting to a PC, the phone starts charging but is not detected in ADB, try changing USB mode to File Transfer (MTP) in the notification curtain.
Features for different Xiaomi models
The manufacturer makes changes to the debugging activation process depending on the model and version of MIUI.
- π± Redmi Note 11/12 Requires you to link your Mi Account before you debug. Without it, the option will be inactive.
adb shell settings put global miui_optimization_disabled 1On devices with MIUI for the global market (for example, Redmi Note 10 Pro Global), sometimes there is no item For developers after taps according to the firmware version.
- Install MIUI bootloader from Google Play.
- Download and install European firmware (EEA) through the app.
- After updating the developer menu will appear.
What to do if the developer menu is gone after the update?
Security: How to protect data when debugging is enabled
Debugging over USB opens up potential vulnerabilities. Follow these rules to minimize the risks:
- π Disable debugging after completion of work (in the developer menu).
- π₯οΈ Connect your phone to trusted PCs with antivirus installed.
- π Use the lock screen (PIN/pattern lock, otherwise anyone with physical access to the device will be able to access the data via ADB.
- π΅ In public places (cafes, airports) avoid connecting to charging via USB β Intruders can use them for Juice Jacking (data theft).
MIUI 15 has a USB Restricted Mode feature that automatically disables USB data transfer when the screen is locked, to activate it:
- Go to Settings. β Passwords and security.
- Select Lock and Protect the Device.
- Activate the Limited USB Mode.
β οΈ Note: If you sell or transfer a smartphone to another person, be sure to turn off debugging. USB and reset to factory settings through Settings β Memory. β Reset settings. Otherwise, the new owner will be able to recover your data through ADB.
Frequent questions and answers
β Why is the phone not being installed in ADB?
β Can we turn on the debugging? USB developer-free?
β How to disable permission request every time you connect to a PC?
β Does debugging work? USB lock-down?
β How to check if the debugging is included USB?
π‘
On devices with MIUI 14+, after enabling debugging, be sure to confirm the resolution on a specific PC through a pop-up window - without this, the connection to ADB will not work, even if all the settings are correct.