Debugging by USB on Xiaomi: how to turn on in 5 minutes (relevant to MIUI 15)

Why do you need USB debugging and when to turn it on?

USB debugging mode is a hidden Android feature that opens access to system tools through a computer connection. On Xiaomi, Redmi and POCO smartphones, it is required to perform operations that are impossible in the standard interface: from installing custom firmware to recovering data after a crash.

This mode should be included in three key cases:

  • πŸ”§ To unlock the bootloader before the firmware through the Mi Unlock Tool (mandatory condition for installation) TWRP or LineageOS).
  • πŸ“± In the case of ADB-commands to remove embedded applications, change screen resolution, or reset a pattern lock.
  • πŸ–₯️ To work with programs like Scrcpy (managing your phone from a PC) or Vysor (screen mirroring).

It’s important to understand that activating USB debugging doesn’t block the warranty itself, but some actions performed through it (such as unlocking the bootloader) can lead to loss of warranty service. On Xiaomi 13/14, Redmi Note 12 and later, the on-boarding process is different from older devices – more on this below.

Preparation: What to do before turning on debugging

Before you go to the settings, make sure that the basic conditions are met:

Download your phone to at least 50%|Use the original. USB-cable (not cheap analogues)|Update. MIUI last-minute|Install the drivers. ADB on PC (if you plan to connect)-->

Pay special attention to cable: many users experience an unauthorized ADB error because of poor-quality wires. Official cables from Xiaomi have an authentication chip that prevents connection problems.

If you plan to use debugging to work with a PC, download in advance:

  • πŸ’» Platform Tools (official package from Google with the ADB and Fastboot).
  • πŸ”Œ Xiaomi drivers USB Drivers (current for Windows; on) macOS/Linux drivers not required).

πŸ’‘

On the POCO F5 and Redmi K60 models, after upgrading to MIUI 15, USB debugging can automatically turn off when you reboot. To avoid this, immediately turn on the option to Allow OEM Unlock in the same menu after activation of the developer mode.

Step-by-step instruction: how to turn on the developer mode

USB debugging is hidden in the developer menu, which is disabled by default, to activate it:

  1. Open the Settings. β†’ The phone.
  2. Find the MIUI version and tap it 7 times in a row (on some models - 10 times).
  3. You will be notified: You have become a developer.

On new devices (such as Xiaomi 14 Ultra or Redmi Note 13 Pro+), the path may be different:

Settings β†’ More β†’ About the phone β†’ All the characteristics β†’ MIUI version

If nothing happens after multiple clicks, check:

  • πŸ“± Is the mode for children turned on (it blocks access to hidden settings).
  • πŸ”’ Is there a password / pattern lock (some firmware requires unlocking the screen before activating the developer mode).

Xiaomi 13/14 series|Redmi Note 12/13|POCO F5/X5|Redmi K60/K70|Another model-->

Including debugging by USB: detailed analysis

After activating the developer mode:

  1. Return to the main settings menu.
  2. Go to Additional Settings β†’ For developers (on MIUI 15 may be called the Developer).
  3. Find the USB Debugging option and move the slider to the right.
  4. In the confirmation window that appears, click OK.

On devices with MIUI 14+ Android 13+ After activating debugging, the system may request input PIN-Mi Account code or password is additional protection against unauthorized access.

If the USB debugging option is not on the menu, try:

  • πŸ”„ Reboot your phone (sometimes the menu is not fully loaded).
  • πŸ“² Update the firmware to the latest version (on older versions) MIUI option may be hidden).
  • πŸ” Manually find the search bar in Settings and enter "debugging".
Xiaomi modelThe Way to Debugging on USBFeatures
Xiaomi 13/14, 13TSettings β†’ Additional β†’ For DevelopersRequires confirmation on PIN + Mi Account
Redmi Note 12, Note 13Settings β†’ About the phone β†’ MIUI version (7 taps) β†’ For developersThere may be no option to allow OEM unlocking
POCO F5, X5 ProSettings β†’ System β†’ For DevelopersDebugging is disabled after restarting (MIUI bug 14)
Redmi K60, K70Settings β†’ Memory β†’ For developers (on some firmware)Requires a connection to Mi Account to unlock the bootloader
What to do if the USB debugging is not enabled?
If the USB debugging slider is inactive or returns to its original position, this may be due to: 1. MIUI Security Policy – on some corporate devices (for example, Xiaomi Mi A3 with Android One), debugging is blocked at the firmware level. 2. Active Power Saving Mode – disable it in Settings β†’ Battery. 3. Damaged system files – reset settings through Settings β†’ System β†’ Reset (data will not be deleted, but settings will be reset). If the problem persists, try flashing the device through the Flash Tool on the official Xiaomi website.

Connecting to PC and confirming debugging

After turning on debugging on the phone, connect it to the computer through USB-The phone will be on the screen:

Allow debugging over USB?


Keyprint: XX:XX:XX:XX:XX:XX:XX:XX

Check Always Allow from this computer and click Allow, which will eliminate the need to confirm the connection every time.

To check the success of the connection:

  1. Open the Command Prompt (Windows) or Terminal (macOS/Linux).
  2. Go to the folder with the platform-tools (where adb.exe is located).
  3. Enter the command: Adb devices

If you see a serial number (e.g., 1234abcd device) in the answer, the debugging works correctly. If it displays unauthorized instead, follow these steps:

  • πŸ”Œ Turn off and reconnect the cable.
  • πŸ“± Reboot the phone.
  • πŸ’» Remove old drivers ADB on the PC and install them again.
  • πŸ”„ In the menu For developers, find the option to withdraw debugging permissions USB and click on it, then reconnect.

πŸ’‘

If you connect your phone to a new PC, always check the RSA key print. Scammers can swap it for data theft!

Common mistakes and their solutions

Even after debugging is enabled correctly, users face challenges, and here are the most common ones and ways to fix them:

⚠️ Warning: If, after connecting to a PC, the phone starts to overheat or discharge quickly, turn off debugging and check the device for viruses. ADB crypto-mining.

Mistake.Reason.Decision
device not found in ADBDrivers not installed or cable is faultyInstall Xiaomi USB Drivers and try a different cable
Debugging is disabled after rebootingbug MIUI 14/15 on some modelsBefore restarting, turn on Allow OEM Unlock
adbd cannot run as rootNo root rights (required for some) ADB-team)Get root access through Magisk or use alternative commands
The phone is not specified in the Mi Unlock Tool.Unlocked bootloader or unbound Mi AccountLink your account to Settings β†’ Xiaomi account and unlock the bootloader

On Android 14 devices (e.g. Xiaomi 14 or Redmi) K70 Pro) a new security system has been introduced: the first time you connect to a PC, you need to confirm through biometrics (fingerprint or facial scan). PIN-code.

Security: How to protect data when using debugging

USB debugging offers a lot of opportunities for managing your phone, but it also poses security risks.

  • πŸ”’ Never connect a phone with debugging enabled to a public one. USB-Attackers can use them to steal data.
  • πŸ“± Turn off debugging when you don't need it. You can do this from the Developer Menu or through the adb disable-verity command.
  • πŸ›‘οΈ Use two-factor authentication for your Mi Account. This will protect you from unauthorized unlocking of the bootloader.
  • πŸ” Check the list of Authorized Devices in the Developer Menu regularly and remove unknown PCs.

⚠️ Attention: On devices with MIUI 15 and newer function Debugging by USB If banking applications (e.g. SberBank Online or Tinkoff) have stopped working after debugging is activated, temporarily disable debugging or add applications to exceptions through Settings. β†’ Confidentiality β†’ Special access.

If you're handing over your phone for repair, be sure to turn off USB debugging and perform a factory reset, which will prevent your data from being accessed via ADB.

FAQ: Answers to Frequent Questions

Can I enable debugging over USB without developer mode?
No, it's not possible. USB debugging is a part of the developer menu that's hidden by default. The only legal way to activate it is to turn on developer mode, as described above. There are alternative methods through ADB (if debugging has already been enabled), but they require physical access to the device and do not work on locked phones.
Why did the USB debugging disappear after the MIUI update?
This is a known problem on Xiaomi devices when upgrading to the new version of MIUI. The system resets some security settings, including debugging. Solution: Re-enable Developer Mode (7 taps according to MIUI). Activate USB debugging in the Developer Menu. If the option is inactive, reset (without deleting data) through Settings β†’ System β†’ Reset.
How to turn on USB debugging if you forgot the pattern lock?
If the phone is locked but USB debugging has been enabled before, you can reset the pattern lock via ADB: Connect the phone to your PC. Enter commands: adb shell rm /data/system/gesture.key reboot After the reboot, the key will be reset (data will not be deleted). If debugging has not been enabled in advance, the only option is to reset via Fastboot (delete all data) or contact the service center.
Does USB debugging work on Xiaomi with a locked bootloader?
Yes, USB debugging works regardless of bootloader status. However, some operations (such as installing TWRP or firmware via Fastboot) require unlocking the bootloader. To unlock the bootloader on Xiaomi: Link Mi Account to Settings β†’ Xiaomi Account. Enable OEM unlock in the Developer menu. Use the official Mi Unlock Tool (you can download it from Xiaomi website). Note: New models (such as Xiaomi 14) require you to wait 168 hours after you have your account tied before unlocked.
Can I enable debugging via USB via computer if my phone is not turned on?
If the phone doesn't respond to the power button, but is detected by the computer in Fastboot mode (the red light is on when connecting to the PC), you can try the following commands: fastboot oem edl This will put the device in EDL mode, from which you can flash the stock firmware through the Mi Flash Tool. However, this will require an authorized Mi Account and the official firmware for your model. If the phone is completely discharged or not detected by the PC, the only way out is to charge for 30+ minutes or contact the service center.