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

Why You Need USB Debugging on Xiaomi and When to Enable It

Debugging mode by USB β€” It's a hidden Android feature that opens up advanced possibilities for smartphone-computer interaction. POCO This mode is required to perform dozens of operations: from firmware through Fastboot to data recovery through Fastboot. ADB. Without it, you can’t use tools like Mi Flash Tool, Xiaomi ADB/Fastboot Tools or even standard adb commands in the terminal.

You may have to turn on the debugging if:

  • πŸ”§ Want to unlock the bootloader to install custom firmware (like LineageOS or Pixel Experience)
  • πŸ“± You need to recover the data after resetting through ADB backup
  • πŸ”„ You plan to flash your smartphone through Fastboot or EDL
  • 🐞 Debug the application through Android Studio or Visual Studio
  • πŸ”“ Bypass the MI-account lock (for legal purposes only!)

It's important to understand that USB debugging is a two-way channel of access to the system, on the one hand, it gives you full control of the device, on the other hand, it opens up potential vulnerabilities if the smartphone is connected to an untrusted PC, so turn it on only when necessary and turn it off after use.

πŸ“Š Why you need to debug for USB?
Unlocking the loader
Firmware through Fastboot
Data recovery
Debugging applications
Other

Preparation: Verification of MIUI and Android

Before you turn on debugging, make sure your device supports this feature. On Xiaomi smartphones with MIUI 12 and later (Android 10+), the activation process is the same, but there are nuances for older versions.

  1. Open the Settings. β†’ The phone.
  2. Scroll to MIUI version (e.g. MIUI Global 14.0.5)
  3. Find the Android version below (e.g. Android 13 TKQ1.221114.001)
MIUI versionAndroid versionIs debugging supported?Features
MIUI 14Android 13/14βœ… Yes.PIN confirmation is required when connecting to a new PC
MIUI 12.5Android 11/12βœ… Yes.In some regions, the item "For developers" is hidden
MIUI 11 and olderAndroid 9/10⚠️ Partially.Additional steps may be required to unlock
MIUI 10Android 8❌ No.Requires an update to activate the developer mode

If your version of MIUI is older than 12.5, we recommend updating the firmware through Settings β†’ System Update.This ensures compatibility with modern tools like Google’s Platform Tools.

⚠️ Note: Some Xiaomi models for China (with China firmware) ROM) The item "For developers" can be blocked without binding to the Mi Account. In this case, you will need to unlock the bootloader.

Step 1: Activate the developer mode on Xiaomi

The default "Developers" menu is hidden in MIUI. To open it, you need to perform a simple sequence of actions that unlocks additional settings, which is the same process for all models from the Redmi Note 10 to the Xiaomi 13 Ultra.

Tap 7 times on the item "Version" MIUI"|Enter. PIN-code|Return to the main settings menu|Find a new section for developers"-->

Detailed instructions:

  1. Go to Settings. β†’ The phone.
  2. Find the MIUI version line (usually the second one on top)
  3. Slap it 7 times in a row with an interval of no more than 2 seconds
  4. After 3-4 taps, a pop-up will appear: "You're almost there! 3 steps left."
  5. Keep pressing until you see the message: β€œYou’ve become a developer!”

If nothing happens after 7 clicks:

  • πŸ”„ Make sure you are using the version. MIUI, not Android
  • πŸ”’ Check if the antivirus is blocking or MIUI Optimization Access to Settings
  • πŸ“± Reboot your smartphone and try again.

In some models (for example, POCO F5) may require input PIN-- The code or password after activation. MIUI.

What to do if you don’t get a notification β€œYou’ve become a developer”?
If after 7 clicks the notification does not appear, check: 1. System language – on some localizations (for example, Chinese) the counting of clicks may not be displayed. 2. MIUI version – on beta versions of the firmware sometimes requires 10 clicks instead of 7. 3. Administrator rights – if the device has Root, some system notifications can be blocked.

Step 2: Enabling USB debugging in the developer menu

Once the developer mode is activated, a new section will appear in the settings, so you need to find and enable the USB debugging itself. Importantly, on MIUI 14, the path to this menu may be different from the older versions.

Instructions for MIUI 12-14:

  1. Return to the main Settings menu
  2. Scroll down and select Additional (or Advanced Settings on some models)
  3. Tap on a new item for developers (may be called Developer Settings)
  4. Enter. PIN-code or password, if required
  5. Find the USB Debugging Switch (usually at the top of the list)
  6. Activate it by moving the slider to the right

A warning will appear on the screen: "Allow debugging by USB? This will allow the computer to RSA-access the data on your device. Press Allow.

⚠️ Attention: On Xiaomi with MIUI 13+ When you first connect to the PC, an additional window will appear with a request to confirm the fingerprint RSA-If you're not sure about the security of your computer, click Cancel, it will block access to the data.

For convenience, you can include several more options in the developer menu:

  • πŸ”„ Do not turn off the screen while charging - useful for long operations through ADB
  • πŸ”Œ Allow unlocking OEM β€” required to unlock the loader
  • πŸ“Ά Disable the absolute signal level – improves communication stability during debugging

πŸ’‘

If you often connect your smartphone to different PCs, turn on the option β€œRevoke USB debugging permissions” in the developer menu, which will allow one tap to reset all trusted devices.

Step 3: Connect Xiaomi to your computer and check drivers

Turn on the debugging on your smartphone is half the battle. To make the computer recognize the device, you need the right drivers. Without them, the adb device commands will return an empty list, and the Mi Flash Tool will return a connection error.

Here's what you need to do on PC:

For Windows:

  1. Download Android SDK Platform Tools (official package from Google)
  2. Unpack the archive in the root of the C:\platform-tools disk
  3. Connect your smartphone to your PC via the original cable (important!)
  4. In Device Manager, check if an Android ADB Interface or Xiaomi device has appeared... with an exclamation point.
  5. If the driver is not installed, download Mi PC Suite – it will automatically install the desired drivers.

For macOS/Linux:

Drivers are not required on these systems, but you need to:

  1. Install platform-tools via brew install android-platform-tools (macOS) or sudo apt install adb fastboot (Linux)
  2. Add a path to adb to environment variables or use a full path (e.g. /Users/yourname/Library/Android/sdk/platform-tools/adb)
  3. Grant rights to execution: chmod +x ~/Android/Sdk/platform-tools/adb

To check the connection, open the terminal (or command line on Windows) and type:

adb devices

If everything is set up correctly, you will see something like:

List of devices attached


a1b2c3d4e5f6    device

⚠️ Attention: On Xiaomi with MIUI 14 The first time you connect, you might have a request to unlock the screen even if it's already unlocked. PIN again.

Solving common problems with debugging over USB

Even after you set it up properly, the debugging may not work. Here are the typical errors and their solutions:

Problem.Reason.Decision
Adb devices are unauthorized.Unconfirmed. RSA-smartphone keyDisconnect/connect the cable and allow debugging on the Xiaomi screen
Device not defined (no permissions)Problems with drivers or udev (Linux)Reinstall drivers or add a rule for udev
Debugging is disabled after rebootingResetting developer settingsCheck if your settings are reset when you restart (virus or MIUI failure)
The computer does not see Xiaomi (charged, but not determined)Faulty cable or USB portTry a different cable (preferably original) and a USB 2.0 port.
Error device offline in ADBThe conflict with MIUI OptimizationTurn off optimization in the developer settings

If the problem is not solved, try:

  • πŸ”„ Reboot both the smartphone and the computer
  • πŸ”Œ Connect to another USB-port (preferably) USB 2.0, as 3.0 sometimes causes problems)
  • πŸ“± Enable/disable File Transfer Mode (MTP) plug-in
  • πŸ”§ Update MIUI Up to the latest version through Settings β†’ Updating the system
What if ADB is giving you a more than one device/emulator error?
This error occurs when multiple devices are connected to the PC (or an emulator is running: 1. Turn off all the extra devices. 2. Specify the target device explicitly: adb -s a1b2c3d4e5f6 shell a1b2c3d4e5f6 β€” The serial number of your Xiaomi (you can find out through Adb devices). 3. Reset it. ADB-Adb kill-server and Adb start-server

Security: How to protect data when debugging is enabled

USB debugging gives you full access to Xiaomi's file system and settings, a powerful tool, but also a potential security threat.

Basic rules:

  • πŸ”’ Connect your smartphone to trusted computers only
  • πŸ”‘ Always lock the screen when you leave the PC (even for 1 minute)
  • πŸ“± Disable debugging after completion of work
  • πŸ”„ Regularly check the list of trusted devices in Settings β†’ For developers β†’ Withdraw debugging permits USB

Additional measures:

  • πŸ›‘οΈ Set up protection through PIN/Password (not pattern lock!) is a prerequisite for debugging. MIUI 14
  • πŸ” Use device encryption (Settings) β†’ Security β†’ Encryption) to protect data when connected
  • 🚫 Disable the installation from unknown sources (Settings) β†’ Annexes β†’ Special access, if you do not use it

⚠️ Note: Xiaomi with unlocked bootloader (Unlocked Bootloader) debugging USB It gives you more rights, including access to Fastboot and EDL. In this case, the attacker can reflash the device without your knowledge.Always check the lock status through the command: fastboot oem device-info Search for Device unlocked: true/false.

If you are transferring your smartphone for repair or selling it, be sure to turn off debugging and reset through Settings. β†’ Resetting settings β†’ Delete all the data. RSA-keys and permits.

πŸ’‘

USB debugging is like leaving your apartment keys with your neighbor, using them only when you need them, and always "take the keys" (turn off mode) after use.

Frequent questions about debugging on USB on Xiaomi

Can I enable debugging over USB without activating the developer mode?
No, it's not possible. All versions of MIUI and Android only allow debugging after the developer menu is activated. Alternative methods (e.g., through ADB or Fastboot) require debugging to be enabled, which is a vicious circle. If your device has blocked access to the developer settings (e.g., corporate phones), contact the administrator or use official Xiaomi tools to unlock.
Why did the USB debugging stop working after the MIUI update?
This is a common problem when switching to a new version. MIUI. Reasons: Reset developer settings β€” sometimes an update resets this section. Change security policy β€” in MIUI 14 added check RSA-Driver conflict β€” old drivers may not work with the new firmware. Solution: Repeat the steps to enable debugging, update Platform Tools, and reinstall the drivers. If it doesn't work, reset through Settings. β†’ Annexes β†’ Application management β†’ Settings (βš™οΈ) β†’ Resetting settings.
How to enable debugging on USB on blocked Xiaomi (forgot the password)?
If the smartphone is locked, and debugging on USB was enabled before blocking, you can try to reset the password through ADB: Connect the device to the PC (should be defined as unauthorized) Enter in the terminal: adb shell rm /data/system/gesture.key or PIN-code: adb shell rm /data/system/password.key Reboot the smartphone – the lock will be reset. ⚠️ Important: This method only works if debugging was enabled before blocking. If not, you will need to reset via Fastboot (data loss) or unlock your Mi Account.
Do I need to enable USB debugging for the average user?
For 90% of Xiaomi users, USB debugging is not necessary. It is only required in specific cases: Unlocking the bootloader or installing custom firmware Data recovery through ADB backup Debugging your own applications Using tools like Scrcpy (controlling a smartphone from a PC) If you do not plan any of these, it is better not to include debugging - this is an unnecessary security risk.
How to disable USB debugging on Xiaomi?
To deactivate debugging: Go to Settings β†’ Additional β†’ For developers Find the Debugging Switch over USB Move the slider to the left (state off.) Confirm the action by clicking Disconnect in the dialog box For full cleaning of trusted devices: In the same menu, find Revoke the debugging permissions of USB Tap on it and confirm the reset After that, all previously connected computers will lose access to debugging.