Debugging mode by USB on Xiaomi smartphones is a hidden feature, without which it is impossible to install custom firmware, unlock the bootloader or use tools like ADB And Fastboot, and even though it's hidden in the developer menu, it takes less than 5 minutes to activate it, if you know the exact sequence of actions. MIUI It changes regularly, and instructions from old manuals often lead to a dead end: users can not find the item โVersionโ. MIUIยป or encounter an unauthorized error when connecting to a PC.
In this article, we will discuss the current way to enable USB debugging for all Xiaomi, Redmi, POCO and Black Shark models (including 2026 devices on MIUI 15 and HyperOS). Particular attention will be paid to typical errors - for example, when the computer does not see the phone even after the mode is turned on, or when the system requires you to unlock the bootloader.
Why do I need to debug USB on Xiaomi
USB debugging isn't just a geek thing, but you can't do it without it.
- ๐ง Install custom firmware (such as LineageOS or Pixel Experience) through TWRP.
- ๐ฑ Unlock Bootloader (mandatory step for rooting).
- ๐ฅ๏ธ Use it. ADB Backing up applications, removing system programs, or transferring files without restrictions MIUI.
- ๐ฎ Connect gamepads or peripherals (for example, for Dolphin emulators or PPSSPP).
- ๐ Recover data after reset via programs like Dr.Fone.
Moreover, some applications (such as Tasker or Termux) require debugging to work properly, and if you are a developer, you will not be able to test your programs on a real device through Android Studio without this mode.
โ ๏ธ Attention: Including debugging by USB It reduces the security of the device, and if the phone falls into the hands of an attacker, they can access personal data through the PC, even if the screen is locked!
Preparation: What to do before turning on debugging
Before you move on to settings, follow three mandatory steps:
- Check out the MIUI/HyperOS version. The path to the developer menu depends on it. You can find out the version in Settings โ About Phone โ MIUI version.
- Connect your phone to charge. If the battery is under 20%, the system can block access to the settings.
- Make sure your PC has drivers installed. Without drivers, your computer won't recognize the device even after you've turned on debugging. Download Mi PC Suite or ADB drivers manually.
If you plan to use ADB or Fastboot, download Googleโs Platform Tools in advance.This is the official toolkit for working with Android via the command line.
Step-by-step: how to enable debugging by USB
The algorithm is the same for all Xiaomi devices, but there are nuances for different versions of the shell.
Step 1: Activate the Developer Menu
The default "Developers" item is hidden to unlock it:
- Open the Settings.
- Go to About Phone (HyperOS can be called About Device).
- Find the MIUI Version line (or HyperOS build number) and tap it 7 times in a row.
- After 3-4 clicks, a notification will appear โYou are almost there!โ, and after the 7th โ a message โYou have become a developer!โ.
If you have POCO or Black Shark, the path may be slightly different. For example, on POCO F5, you need to go to Settings โ More โ About the phone.
Menu for Developers Activated|Phone's charged. >20%|Installed drivers on PC|Scud ADB (if necessary)-->
Step 2: Enable debugging over USB
Now that the developer menu is available:
- Return to the main settings menu.
- Find a new section additionally โ For developers (on HyperOS it can be just For developers at the root of settings).
- Scroll down and activate the Debugging switch over USB.
- In the window that appears, confirm the action by pressing OK or Allow.
On some devices (for example, Xiaomi 13 Ultra) the system will require you to enter a password from the Mi Account. This is a security measure โ without an attached account, you will not be able to turn on debugging.
Step 3: Connect your phone to your PC and confirm your trusted device
After debugging:
- Connect your smartphone to your computer through the original USB-cable (cheap cables may not transmit data).
- On the phone screen, you will see a request to Allow debugging over USB? with an RSA key. Check Always Allow from this computer and click Allow.
- If the request does not appear, check that File Transfer (MTP) is selected in the USB settings (in the notification curtain).
If the computer canโt see the device, try:
- ๐ Reconnect the cable.
- ๐ฅ๏ธ Restart your PC and phone.
- ๐ง Update drivers through Device Manager (the Portable Devices section should show your model name).
What to do if there is no debugging request?
Table: Differences in inclusion of debugging on different versions of MIUI
| MIUI/HyperOS version | The path to the developer menu | Features | You need a Mi Account? |
|---|---|---|---|
| MIUI 12โ14 | Settings โ About the phone โ MIUI version (7 taps) โ Additional โ For developers | The developer menu can be hidden under the item "Advanced settings". | Yes, to confirm. |
| HyperOS 1.0 | Settings โ About the device โ Assembly number (7 taps) โ For developers (at the root of the settings) | There is no "Additional" section. Debugging can be called USB debugging in English. | Yeah, with a tie. |
| MIUI for POCO | Settings โ More โ About the phone โ MIUI version (7 taps) โ System โ For developers | On some models (e.g. POCO X3), you need to first enable Advanced Settings. | No (only screen password) |
| Black Shark | Settings โ About Phone โ Assembly Number (7 taps) โ For developers (in the โSystemโ section) | Debugging can be blocked if the Shark Space mode (game profile) is enabled. | No. |
Typical errors and their solutions
Even after debugging is enabled, users often face problems, and let's take a look at the most common ones:
1 Computer does not see the phone in ADB
If, after connecting, the adb device command returns an empty list:
- ๐ Check the cable and port USB (Try the port USB 2.0, because USB 3.0 is sometimes incompatible with ADB).
- ๐ฅ๏ธ Make sure that Google drivers are installed on the PC USB Driver (they come with Platform Tools).
- ๐ฑ Switch the mode. USB phone-wise MTP on PTP back and forth.
- ๐ Execute in command line: adb kill-server adb start-server
2. Unauthorized Error (Unauthorized Device)
This error means that the phone doesn't trust the computer.
- ๐ Remove the old keys ADB on PC: adb keygen -d (or manually delete the file %USERPROFILE%\.android\adbkey.pub).
- ๐ฑ On the phone, revoke all debugging permissions: Settings โ For developers โ Withdraw permits USB-debugging.
- ๐ Reconnect the device and confirm the request for a trusted connection.
โ ๏ธ Note: On HyperOS devices, the Unauthorized error may occur due to an association with your Mi Account. If you previously connected your phone to another PC, the new computer will not be recognized until you untie the old device in Settings. โ Xiaomi account โ Device management.
3. No paragraph โVersionโ MIUIยป
On some models (e.g. Redmi A2 or POCO C55), the MIUI version may be hidden.
- ๐ Check if the phone is switched to a simplified mode (Settings) โ Special facilities โ Simplified regime).
- ๐ Update the firmware to the latest version (sometimes the item appears after the update).
- ๐ง Use an alternative method: enter the ##4636### in the dialer, then go back to the settings โ the developer menu can be activated automatically.
๐ก
If you frequently connect your phone to different PCs, turn on the USB Debugging option (security options) in the developer settings and set Always Allow from that computer, eliminating the need to confirm the connection every time.
How to disable debugging by USB
After completion, it is recommended to deactivate the debugging mode to protect the device from unauthorized access.
- Go to Settings โ Additional โ For developers.
- Find the USB Debugging Switch and deactivate it.
- Confirm the action in the dialog window.
If you want to completely hide the developer menu (for example, so that someone accidentally turns on debugging), reset the settings:
- Open Settings โ System โ Resetting settings.
- Choose Reset all settings (not to be confused with Reset to factory!).
- Confirm the reset. The developer menu will disappear, but all the data on the phone will remain.
๐ก
USB debugging automatically turns off after you reset your phone to factory settings, but if you're selling or transferring a device, it's best to manually deactivate the mode and delete your Mi Account so the new owner doesn't have access to your data.