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

The USB debugging mode on Xiaomi smartphones is a hidden feature that makes it impossible to perform many technical operations without it, from firmware via fastboot to data recovery via ADB. But the manufacturer specifically hides this option in the developer menu to prevent accidental changes to system files. If you are here, then you need to connect the device to a computer with superuser rights - and we will detail how to do this safely.

Many users have trouble trying to enable debugging: the system can block access, require unlocking the bootloader or issue a β€œUSB debugging not authorized” error. In this article, current ways for all Xiaomi, Redmi and POCO models based on MIUI 14/15 and Android 13/14, including bypassing typical errors. No water – only proven steps with explanations.

⚠️ Attention: Activation of debugging by USB shut off part of the defense mechanisms MIUI. Do not connect your device to unverified PCs and do not install unknown.apk files through your PC. ADB β€” This can lead to data theft or smartphone locking.

Why do I need to debug USB on Xiaomi

USB Debugging allows you to access low-level smartphone functions through your computer.

  • πŸ”§ Install custom firmware (LineageOS, Pixel Experience) via fastboot or TWRP.
  • πŸ“± Recover deleted files with the help of ADB pull (for example, photos from the /data/media/0/DCIM).
  • 🐞 Test apps in Android Studio or debug code through logcat.
  • πŸ”“ Unlock the bootloader in an official way (required for root rights).
  • πŸ“‘ Modify system settings (e.g. enable Dirac on unaccompanied models).

For example, without debugging, you can’t transfer a Titanium Backup backup to a new smartphone or run Xiaomi.eu on Chinese firmware. But remember, on devices with a locked bootloader, some ADB commands will only work after official unlocking through the Mi Unlock Tool.

⚠️ Note: On smartphones Xiaomi with MIUI Global Stable Debugging USB Automatically shuts down after restart if the device has not connected to an authorized PC within 7 days.This is a security measure - remember to re-activate the mode before critical operations.

Preparation of the smartphone: unlocking the developer menu

Before you start debugging, you need to activate the hidden menu for developers. On Xiaomi, this is done through the system settings, but the path depends on the version of MIUI:

  1. Open the Settings app (cog icon).
  2. Go to About Phone (or About Device on POCO).
  3. Find the MIUI version string and tap it 7 times in a row.
  4. The system will show a notification: β€œYou became a developer!”

Some firmware (e.g. MIUI China) may require you to enter a password from your Mi Account. If you are using an Android One smartphone (e.g. Xiaomi Mi A3), the path will be different:

Settings β†’ System β†’ About phone β†’ Assembly number (shooting 7 times)

πŸ“Š What firmware do you use?
MIUI Global Stable
MIUI China
MIUI Europe (xiaomi.eu)
Android One
other

Once you unlock the developer menu, it will appear in the main settings list, and on MIUI 14/15, it can be found along the way:

Settings β†’ Additional β†’ For Developers

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

Now, to the main stage, follow the instructions carefully, and skipping the steps can lead to authorization errors.

Connect your smartphone to charge (at least 50% of the battery)

Install the original USB-cable (not all cables support data transmission)

Download and install Mi PC Suite or ADB drivers on PC

Shut down. VPN Firewalls (they can block authorization)-->

  1. Open the developer menu (see the previous section).
  2. Scroll down to the Debugging block and activate the Debugging switch over USB.
  3. In the window that appears, click OK to confirm the inclusion.
  4. Connect your smartphone to your computer via USB-C (or Micro-USB for older models).
  5. On the screen of the smartphone will appear the request: "Allow debugging over USB from this computer?". Check Always allow from this computer and click Allow.

⚠️ Note: If you see a message at this point "USB debugging not authorized, so you've previously denied access to this PC. To reset the list of authorized devices, do:

Settings β†’ For developers β†’ Withdraw permissions to debug USB

Then disconnect and reconnect the cable – the request will appear again.

πŸ’‘

If your computer doesn’t see your smartphone in debugging mode, try changing USB to File Transfer (MTP) in the notification curtain. Some PCs require manual installation of Google USB Driver drivers.

Common mistakes and their solutions

Even if you follow the instructions correctly, Xiaomi users often encounter problems, and we have collected common errors and ways to fix them:

Mistake.Reason.Decision
Device unauthorized in ADBSmartphone does not trust PC or the authorization key is resetRevoke permissions in the developer menu and connect again
No devices found in the command lineADB drivers are not installed or the cable is faultyInstall Minimal ADB and Fastboot or check the cable
Developer's menu missing after updateResetting MIUI settings after updateRepeat unlocking (7 taps according to MIUI)
MIUI Optimization blocks teamsMIUI optimizations that interfere with ADB are enabledDisable the Developer Menu (MIUI Optimization β†’ Disable)

Pay special attention to the Xiaomi model 12T Redmi Note 12: they are activated by default USB Debugging Security that requires input PIN-You can turn it off from the same developer menu.

What if the debugging is turned on but ADB can’t see the device?
Check if the antivirus (such as Avast or Kaspersky) is blocking the port 5037 used by ADB. Also try running the command prompt on behalf of the administrator and type: adb kill-server adb start-server If the problem persists, delete the %USERPROFILE%\.android folder and reinstall the drivers.

How to check that the debugging works

To make sure everything is set up correctly, do a simple check:

  1. Connect your smartphone to your PC and open the command line (Win + R β†’ cmd).
  2. Enter the command: Adb devices
  3. If debugging is active, you will see the serial number of the device marked device: List of devices attached 1234abcd5678 device

On MacOS or Linux, you may need to pre-install adb via brew install android-platform-tools or sudo apt install adb. If you see unauthorized instead of device, repeat the authorization steps on your smartphone.

πŸ’‘

On Xiaomi smartphones with Android 12+, when you first connect to a new PC, you need to confirm debugging within 1 minute. If you do not have time, you will have to turn off and connect the cable again.

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 smartphone to trusted PCs only (avoid public computers).
  • πŸ”‘ Use the complex PIN or pattern lock – without them, an attacker can access data through ADB backup.
  • πŸ“± Check the list of authorized devices in Settings regularly β†’ For developers β†’ Withdraw permits.

For example, if you connected your smartphone to your computer at a service center, you should revoke all permissions after you return home, and we recommend that you disable the option to Allow OEM unlock in the developer menu if you do not plan to unlock the bootloader, which will prevent unauthorized resetting of settings.

⚠️ Note: Devices with root rights (Magisk, SuperSU) debugging USB This allows you to execute commands with superuser rights, which means that any malware on your computer can take full control of your smartphone).

Debugging on a blocked loader: what can and can not

Many Xiaomi users face restrictions due to a locked bootloader, even with USB debugging enabled, some operations will not be available:

Action.Locked loaderUnlocked loader
Installation of TWRP❌ Impossible.βœ… Maybe.
Firmware through fastboot⚠️ Official firmware onlyβœ… Any firmware
Getting root rights❌ Impossible.βœ… Maybe. Magisk)
Backup through ADB backupβœ… Possibly (without system applications)βœ… Full copying

To unlock the bootloader officially, you need:

  1. Link your Mi Account to your device (in Settings β†’ Xiaomi Account).
  2. Apply via Mi Unlock Tool (waiting 7-30 days).
  3. Connect the smartphone in Fastboot mode and unlock.

How to get around waiting for the bootloader to unlock?
It is not officially possible to bypass the timer, but some users speed up the process by linking the device to a Mi Account in advance (before buying a smartphone) or using alternative methods through EDL. However, these methods are risky and can lead to IMEI blocking.

FAQ: Frequent questions about debugging on Xiaomi

Can I enable debugging over USB without a developer menu?
No, it's impossible. The developer menu is a must-have, and if it doesn't activate through the 7-tape version of MIUI, check if it's hidden by the manufacturer's policies (e.g., on corporate devices).
Why is the MIUI update shutting down?
This is a feature of Xiaomi Global Stable firmware. After major updates (for example, from MIUI 13 to MIUI 14), some security settings are reset, including ADB permissions. Re-enable debugging in the developer menu.
How to enable debugging on Xiaomi with a broken screen?
If the sensor is not working, but the image is visible, connect the mouse over a USB-OTG and control the cursor. If the screen is completely black, then only unlocking through EDL (requires special equipment and knowledge of Qualcomm HS-USB QDLoader 9008) remains.
Can I turn on the debugging remotely (over Wi-Fi)?
Yeah, but first you have to activate it once on the cable, then turn on Wi-Fi Debugging in the developer menu, connect to the same network, and use the command: adb connect. IP_Devices: Port Default Port β€” 5555, but it may be different.
Why does Mi PC Suite not see the device in debugging mode?
This is normal: Mi PC Suite and ADB use different protocols. To work with ADB, install Minimal ADB and Fastboot or Platform Tools from Google. If you want Mi PC Suite, disable debugging and select MTP mode.