Debugging by USB on Xiaomi: how to turn on in 5 minutes (all models 2018-2026)

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:

  1. 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.
  2. Connect your phone to charge. If the battery is under 20%, the system can block access to the settings.
  3. 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.

๐Ÿ“Š What Xiaomi model do you use?
Redmi Note 12/13
POCO F5/X5
Xiaomi 13/14
Black Shark 5/6
Another model

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:

  1. Open the Settings.
  2. Go to About Phone (HyperOS can be called About Device).
  3. Find the MIUI Version line (or HyperOS build number) and tap it 7 times in a row.
  4. 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:

  1. Return to the main settings menu.
  2. Find a new section additionally โ†’ For developers (on HyperOS it can be just For developers at the root of settings).
  3. Scroll down and activate the Debugging switch over USB.
  4. 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:

  1. Connect your smartphone to your computer through the original USB-cable (cheap cables may not transmit data).
  2. 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.
  3. 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?
If you do not see a window with a debugging request when connecting to your PC, check: 1. Is File Transfer Mode enabled (MTP) 2. Does the cable work (try another one) 3. Are drivers installed (Device Manager should not have exclamation marks next to the phone name). 4. Does the antivirus block the connection (temporary disable protection). If nothing helps, try connecting to another PC or reset your network settings on your phone (Settings) โ†’ SIM-maps and networks โ†’ Resetting network settings).

Table: Differences in inclusion of debugging on different versions of MIUI

MIUI/HyperOS versionThe path to the developer menuFeaturesYou need a Mi Account?
MIUI 12โ€“14Settings โ†’ About the phone โ†’ MIUI version (7 taps) โ†’ Additional โ†’ For developersThe developer menu can be hidden under the item "Advanced settings".Yes, to confirm.
HyperOS 1.0Settings โ†’ 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 POCOSettings โ†’ More โ†’ About the phone โ†’ MIUI version (7 taps) โ†’ System โ†’ For developersOn some models (e.g. POCO X3), you need to first enable Advanced Settings.No (only screen password)
Black SharkSettings โ†’ 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.

  1. Go to Settings โ†’ Additional โ†’ For developers.
  2. Find the USB Debugging Switch and deactivate it.
  3. 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:

  1. Open Settings โ†’ System โ†’ Resetting settings.
  2. Choose Reset all settings (not to be confused with Reset to factory!).
  3. 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.

FAQ: Answers to Frequent Questions

Can I enable debugging over USB without a password from my Mi Account?
On most Xiaomi devices (especially MIUI 13+ and HyperOS), the system requires you to enter a password from your associated Mi Account to enable debugging. This is an impossible security measure. If you forget your password, restore it through the official website. Except for POCO and Black Shark devices on older firmware versions (until 2022), where sometimes only the lock screen pin code is enough.
Why does the computer still not see the phone after debugging?
There may be several reasons: No drivers: Install Mi PC Suite or ADB drivers manually. Antivirus lock: Temporarily turn off protection (e.g., Avast or Kaspersky can block ADB). Wrong USB mode: In the notification curtain, select File Transfer (MTP). Cable problems: Use the original Xiaomi cable (cheap often don't transfer data). Also check if the connection indicator in Windows Device Manager is on (Section for Portable Devices).
How to enable USB debugging on a locked Xiaomi phone?
If the screen is locked and the debugging has not been enabled in advance, it is impossible to unlock the phone via the PC./PIN-Restore access through Mi Account (if it was tied), reset your phone to factory settings via Fastboot (loss of all data). Reset via Fastboot: Turn off your phone. Press the Power button + Volume down until the Fastboot logo appears. Connect to the PC and execute the command: fastboot erase userdata fastboot erase cache fastboot reboot
Do I need to unlock the bootloader to enable debugging over USB?
No, USB debugging and bootloader unlocking are two different things. You can enable debugging on any Xiaomi device without unlocking Bootloader. However, for custom firmware or rooting installations, unlocking is mandatory. Note: unlocking the bootloader resets the phone to factory settings and erases all data!
Can I enable USB debugging via a computer if my phone doesnโ€™t respond to touch?
If the sensor doesnโ€™t work, but the phone is turning on, try: Connect the device to the PC via USB. Use the mouse through OTG-adapter (if) USB-Control your phone from your computer via TeamViewer QuickSupport or Vysor (presetting required). If the screen is completely out of order, only Fastboot mode or service center remains.