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

USB debugging mode is a hidden feature of Android, without which you can not connect a Xiaomi smartphone to a computer for deep tuning, firmware or data recovery. Despite the fact that the option is hidden in the menu for developers, it takes literally a few minutes to activate it β€” if you know the exact sequence of actions. The problem is that the MIUI interface (especially in versions 14 and 15) regularly changes, and old instructions from the Internet often lead to a dead end: users can not find the item β€œBuild Number” or face a USB debugging not authorized error.

In this article, we will discuss the current ways to enable USB debugging on all modern Xiaomi smartphones, including Redmi Note 12/13, POCO F5/X5, Black Shark 5/6 and the flagship Xiaomi 13/14 series. Particular attention will be paid to typical errors (for example, when the computer does not see the device even after the mode is turned on) and the nuances of working with Android 13/14. If you plan to sew your phone through Fastboot, install custom recovery (TWRP) or use ADB for manual control of the system – you can not debug USB.

Why do I need to debug USB on Xiaomi

Debugging by USB (USB Debugging is not just a "permission for the computer"; it is a full-fledged bridge between Android and the PC, which allows you to access system commands through the protocol. ADB (Android Debug Bridge is impossible without this mode:

  • πŸ”§ Install custom firmware (such as LineageOS or Pixel Experience) via Fastboot.
  • πŸ“± Unlock Bootloader (a mandatory step for firmware unofficial software).
  • πŸ–₯️ Control your phone from a computer (for example, via Scrcpy for screen mirroring or Vysor).
  • πŸ”„ Recover deleted data with Dr.Fone or EaseUS MobiSaver.
  • πŸ› οΈ Use it. ADB to remove embedded applications (bloatver) or change system files.

Moreover, some Xiaomi service centers require USB debugging enabled to diagnose hardware problems, such as when replacing a display or battery, without which specialists will not be able to check the performance of the sensors or NFC module after repair.

⚠️ Attention: Including debugging USB disables part of the protected encryption MIUI, This is a key feature that could theoretically make it easier to access data when you physically access your phone, and don't activate this mode on sensitive devices unless you plan to turn it off immediately after you use it.

Phone Preparation: How to Unlock the Developer Menu

Before you start debugging, you need to activate the hidden Developer Menu, which is disabled by default in MIUI, but is unlocked by a simple algorithm. Importantly, the sequence of actions may vary slightly depending on the firmware version (MIUI 14 vs MIUI 15) and the phone model.

Follow this instruction:

  1. Open Settings (the gear icon on the main screen).
  2. Go to About Phone (in some models – About the device).
  3. Find the line Version MIUI and tap it 7 times in a row (some devices will need to enter PIN-code after 5th press).
  4. After the 7th touch, a notification will appear: You became a developer!

If you don’t have MIUI (this is the case on POCO or Black Shark), try:

  • πŸ” Go to Settings. β†’ System system β†’ Additionally. β†’ Version. MIUI.
  • πŸ” Click on the Assembly Number (in Android) 13/14 It can be called the version number).
πŸ“Š What Xiaomi model do you use?
Redmi Note 12/13
POCO F5/X5
Xiaomi 13/14
Black Shark 5/6
Another model

Once the developer menu is activated, it will appear in the main settings list. On some devices (e.g. Redmi 10A), it may be hidden in Settings β†’ Additional. If the menu does not appear, restart the phone.

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

Now that the Developer Menu is unlocked, you can start debugging, and Importantly, at this point, many users make the mistake of forgetting to allow debugging for a particular computer when they first connect, and without this step, ADB won't work.

Do it in order:

Make sure the Developer Menu is activated |

Connect your phone to your computer with the original cable|

Allow access to data on the phone screen (if requested)|

Install drivers ADB on PC (if necessary)-->

  1. Open Settings β†’ Additional β†’ Developer (or Settings β†’ System β†’ Developers on new versions of MIUI).
  2. Scroll down to the Debugging section and activate the Debugging switch over USB.
  3. In the window that appears, click OK (or Allow if confirmation is requested).
  4. Connect your phone to your computer through the original USB-cable (cheap cables often do not support data transmission).
  5. On the phone screen will appear a request: Allow debugging by USB? print-mark RSA-Check the box Always allow from this computer and click Allow.

If the request for permission to debug did not appear:

  • πŸ”Œ Try another one. USB-port on the computer (preferably) USB 3.0).
  • πŸ”„ Reboot your phone and reconnect.
  • πŸ–₯️ Make sure that drivers are installed on the PC ADB (You can download from the official Google website or via Mi. PC Suite).

πŸ’‘

If USB debugging is not enabled because of a grey switch, check if MIUI Optimization mode is activated in the developer menu.

Typical errors and their solutions

Even after debugging is enabled, users often face problems: the computer can't see the phone, the ADB issues a device unauthorized error, or the developer menu suddenly disappears, and let's take a look at some of the most common bugs and how to fix them.

Mistake.Reason.Decision
Device unauthorized in ADBUnconfirmed. RSA-phone keyDisconnect/connect the cable again and allow debugging in the window that appears
The phone is not defined in ADB devices.Drivers are not installed or non-original cable is usedInstall Mi PC Suite or Google USB Driver, try another cable
Menu "For developers" disappeared after the updateResetting MIUI settings after updateRepeat activation via MIUI (7 taps)
USB debugging disabled by administratorSecurity policy activated (e.g. on work phone)Contact the device administrator or reset the settings

The MIUI Optimization error is particularly noteworthy, as in some Xiaomi firmware, this option blocks ADB even when debugging is enabled, to turn it off:

  1. Go to Settings. β†’ For developers.
  2. Find MIUI Optimization and deactivate it.
  3. Reboot the phone.

⚠️ Note: On Android 14 and MIUI 15 after blackout MIUI Optimization may reset some system settings (such as control gestures). backup in advance via Settings β†’ Memory. β†’ Backup.

Debugging by USB on a blocked Bootloader

Many users mistakenly believe that debugging USB doesn't work if the Bootloader bootloader is locked, but in fact, they're two different modes:

  • πŸ”“ Debugging by USB (ADB) β€” It works even on a locked bootloader, but with restrictions (for example, you can not flash recovery).
  • πŸ”’ Fastboot mode – requires unlocking Bootloader for firmware custom images.

If you just need to connect to your phone via ADB (for example, to backup or uninstall applications), unlocking the bootloader is not required.

  • πŸ“² Installation TWRP or other custom recovery.
  • πŸ”„ Firmware informal ROM (For example, ArrowOS or Havoc-OS).
  • πŸ”§ Change of system partitions (system, vendor).
How to check the status of Bootloader?
To see if the bootloader is locked on your Xiaomi, turn off your phone and press the Power button + Volume down. If the top of the screen says Locked - Bootloader is locked. If Unlocked - unlocked. Some models (POCO F5, Xiaomi 13) need to use the Power + Volume up combination to enter the Fastboot.

If you plan to unlock Bootloader, first enable debugging over USB, then:

  1. Connect the phone to the computer and confirm the debugging.
  2. Open the command line and type in: adb reboot bootloader
  3. After rebooting in Fastboot, check the connection with the command: fastboot devices
  4. If the device is determined, you can proceed to unlock through the Mi Unlock Tool.

Security: How to disable debugging after use

USB debugging is a powerful tool, but it creates vulnerabilities. Through ADB, an attacker with physical access to a phone can:

  • πŸ“‚ Copy personal data (photos, messages, passwords).
  • πŸ”„ Install malware without your knowledge.
  • πŸ”‘ Bypass screen locking (on some versions of Android).

Therefore, after completion of the work, be sure to turn off debugging:

  1. Go to Settings. β†’ For developers.
  2. Find the Debugging by USB and deactivate the switch.
  3. In the Reset Debugging Permissions (or Revoke USB debugging authorizations) menu, click OK to remove all trusted computers.

πŸ’‘

USB debugging automatically turns off after you reset your phone to factory settings, but if you sell or transfer the device to another person, it is recommended to manually reset the ADB permissions before factory reset.

Additional security measures:

  • πŸ” Use the protected one. PIN-code or pattern lock (at least 6 characters).
  • πŸ“± Activate Find My Device in Google Settings (allows you to block your phone remotely).
  • πŸ”„ Update regularly MIUI β€” The new versions are closing vulnerabilities related to ADB.

Alternative ways to enable debugging (if the standard one doesn't work)

Sometimes it is not possible to enable debugging via USB via the settings menu – for example, if:

  • πŸ“΅ The phone does not respond to touch (broken display).
  • πŸ”’ Forgotten pattern lock or PIN-code.
  • πŸ”„ After updating MIUI The Developer Menu is gone.

In such cases, alternative methods may be used:

Method 1: via ADB (if debugging was enabled earlier)

If the USB debugging has already been activated at least once, you can turn it on again via your computer:

adb shell settings put global adb_enabled 1

Method 2: via Fastboot (requires unlocked Bootloader)

For models with unlocked loader:

fastboot oem enable-adb

⚠️ Not all Xiaomi devices (depending on the Fastboot version).

Method 3: Mi Account (only for some models)

On some phones (such as the Redmi Note 11), you can enable debugging through your Mi Account:

  1. Sign in to i.mi.com.
  2. Go to Find Device β†’ Remote Control.
  3. Select the Enable USB Debugging option (not available in all regions).

πŸ’‘

If none of the methods worked, it remains only to reset the phone to the factory settings via Fastboot (fastboot team). -w). This will delete all data, but will return access to the settings menu.

FAQ: Answers to Frequent Questions

Can I enable debugging over USB without a computer?
Yes, debugging is enabled directly in the phone settings (Developers menu) and the computer is only needed to confirm the connection via ADB or firmware.
Why does the computer not see the phone after debugging?
The reasons may be different: drivers are not installed ADB (Download Mi. PC Suite or Google USB Driver. Uses a non-original cable (try the cable from the kit). Unconfirmed. RSA-key on the phone (check notifications) Charging mode activated via USB (In the notification curtain, select File Transfer).
How to enable debugging on Xiaomi with a broken screen?
If the phone is touch-reacting, plug it into your computer and use Vysor or Scrcpy to control it via your PC. If the sensor is not working: Connect your mouse via USB-OTG. Turn on debugging via the settings menu with your mouse. If nothing works, you need screen repair or firmware through Fastboot (you need an unlocked Bootloader).
Do I need to unlock Bootloader for normal USB debugging?
No, unlock Bootloader is only needed for firmware custom ROM or TWRP. For standard debugging (ADB), it is enough to enable it in the settings.
How to Debug Xiaomi via Wi-Fi (Not Free) USB-cable)?
Starting with Android 11, You can use debugging over Wi-Fi: Connect your phone to your computer USB and turn on the debugging. Type in the command: adb tcpip 5555 Turn off the cable and connect to IP: adb connect [IP-phone]:5555 ⚠️ Don’t forget to turn off Wi-Fi debugging after use (adb tcpip) 0).