Debugging by USB on Xiaomi: how to turn on in 5 minutes (all models 2026)

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:

  1. Open the Settings app (cog icon).
  2. Go to About Phone (or About Device on some models).
  3. Find the MIUI version string and tap it 7 times in a row.
  4. 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).

πŸ“Š What Xiaomi model do you use?
Redmi (Note/Pro series)
POCO (F/M/X-series)
Xiaomi (the flagships of the 11/12/13 series)
Another model

Step-by-step: how to enable debugging by USB

After unlocking the developer menu, follow these steps:

  1. Return to Settings and select a new Additional (or Advanced) section.
  2. Slip on the item For developers (may be called Developer settings).
  3. Scroll down to the Debugging block and activate the Debugging switch over USB.
  4. 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

Done: 0 / 4

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 foundThere 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 teamsMIUI 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:

  1. Reboot your smartphone and computer.
  2. Use the other USB-cable (preferably original from Xiaomi).
  3. Connect to another USB-port (preferably) USB 2.0, as 3.0 sometimes causes problems).
  4. 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 1

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

  1. Install MIUI bootloader from Google Play.
  2. Download and install European firmware (EEA) through the app.
  3. After updating the developer menu will appear.
What to do if the developer menu is gone after the update?
On some versions of MIUI (e.g. 14.0.3), the menu may be hidden. To return it, reset settings through Settings β†’ Memory β†’ Reset settings (without deleting data).

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:

  1. Go to Settings. β†’ Passwords and security.
  2. Select Lock and Protect the Device.
  3. 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?
Check: Is the phone connected in File Transfer (MTP) mode. Are there ADB drivers installed on your PC (download Minimal ADB and Fastboot or Platform Tools from Google). Is USB Debugging (security options) enabled in the developer menu. If the problem persists, try the command in the terminal: adb kill-server adb start-server
❓ Can we turn on the debugging? USB developer-free?
No, it's impossible. The developer menu is the only legitimate way to activate debugging. Alternative methods (e.g., via fastboot oem unlock) require an unlocked bootloader and can result in data loss. If the developer menu is lost after the update, try: Reset Settings β†’ Memory β†’ Reset (no data deletion). Set custom recovery (TWRP) and manually edit the build.prop file.
❓ How to disable permission request every time you connect to a PC?
In MIUI, this request appears for security. To remove it: Connect your phone to your PC and confirm permission. In the developer menu, activate USB Permissions Revocation (paradoxically, but this resets the list of trusted devices). Connect again and confirm the resolution again. After that, the device will be remembered, but only until the next phone restarts.
❓ Does debugging work? USB lock-down?
Yes, USB debugging does not require an unlocked bootloader. However, some commands (e.g., fastboot flash) will not be available without unlocking. For most tasks (backup, APK installation via ADB), a locked bootloader is not a hindrance. Exception: Xiaomi cannot have a locked bootloader: Install custom recovery (TWRP). Switch informal firmware. Modify boot or system partitions.
❓ How to check if the debugging is included USB?
There are three ways: In the developer menu, if the USB Debugging Switch is active (blue), the function is turned on. When you connect to a PC, the notification curtain should show the message "Debugging by USB is connected." Through ADB, type in the adb device command - if the device is displayed in the list, the debugging works.

πŸ’‘

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.