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:
- Open Settings (the gear icon on the main screen).
- Go to About Phone (in some models β About the device).
- Find the line Version MIUI and tap it 7 times in a row (some devices will need to enter PIN-code after 5th press).
- 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).
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)-->
- Open Settings β Additional β Developer (or Settings β System β Developers on new versions of MIUI).
- Scroll down to the Debugging section and activate the Debugging switch over USB.
- In the window that appears, click OK (or Allow if confirmation is requested).
- Connect your phone to your computer through the original USB-cable (cheap cables often do not support data transmission).
- 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 ADB | Unconfirmed. RSA-phone key | Disconnect/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 used | Install Mi PC Suite or Google USB Driver, try another cable |
| Menu "For developers" disappeared after the update | Resetting MIUI settings after update | Repeat activation via MIUI (7 taps) |
| USB debugging disabled by administrator | Security 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:
- Go to Settings. β For developers.
- Find MIUI Optimization and deactivate it.
- 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?
If you plan to unlock Bootloader, first enable debugging over USB, then:
- Connect the phone to the computer and confirm the debugging.
- Open the command line and type in: adb reboot bootloader
- After rebooting in Fastboot, check the connection with the command: fastboot devices
- 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:
- Go to Settings. β For developers.
- Find the Debugging by USB and deactivate the switch.
- 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 1Method 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:
- Sign in to i.mi.com.
- Go to Find Device β Remote Control.
- 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.