Where in Xiaomi to find debugging on USB: hidden settings and solutions to problems

The USB debugging mode on Xiaomi smartphones is a hidden feature that makes it impossible to connect the device to a computer for deep tuning, firmware or data recovery. Even though it’s hidden in the developer menu, it takes less than a minute to activate it β€” if you know where to look. The problem is that the MIUI interface changes regularly, and in newer versions (such as MIUI 14/15 or HyperOS), the path to settings may be different from the usual one.

In this article, we will not only show you where USB debugging is on different Xiaomi, Redmi and POCO models, but also break down common bugs (like when your computer can’t see your device), explain why you need this feature at all, and give you a checklist for secure connectivity. If you plan to stitch your phone through Fastboot, install custom software, or use ADB, you can’t do without debugging enabled.

Why do I need to debug USB on Xiaomi

Debugging by USB (USB Debugging is not just a tick in the settings, it's a bridge between a smartphone and a computer to execute commands at the system level:

  • πŸ”§ Install custom firmware (such as LineageOS or Pixel Experience) via Fastboot or TWRP.
  • πŸ–₯️ Use it. ADB (Android Debug Bridge for file management, installation APK or changes in system parameters.
  • πŸ“± Recover data after resetting or deleting (for example, via Dr.Fone or Tenorshare).
  • πŸ”„ Unlock Bootloader (mandatory step before firmware).
  • πŸ› οΈ Test apps in Android Studio or debug code on a real device.

It's important to understand that activating debugging opens up potential vulnerabilities for malware if you connect your smartphone to unverified computers, for example, through ADB you can steal data or install spyware, so turn on the mode only when necessary and turn off after use.

⚠️ Note: Some Xiaomi models (e.g. Redmi Note 12 Pro)+ Xiaomi 13 Ultra, after activation of debugging, an unblocking warning may appear OEM. This is normal, because the system protects the user from accidental changes.

πŸ“Š Why do you include debugging on USB?
Phone firmware
Data recovery
Application development
Unlocking the loader
Other

Where is debugging on USB: the way for MIUI and HyperOS

Unlike the older versions of Android, where debugging was open source, MIUI and HyperOS hid it in the developer menu, and to get there, you first need to unlock the hidden settings:

  1. Open the Settings app (cog icon).
  2. Go to About Phone (or About HyperOS Device)
  3. Find the MIUI version line and tap it 7 times in a row (you should see the message "You became a developer!").

After that, a new item will appear in the main settings menu β€” Additional β†’ For developers (or Advanced settings β†’ For developers in HyperOS). Now you can turn on debugging:

  • πŸ“± MIUI 12/13/14: Settings β†’ Additionally. β†’ For developers β†’ Debugging by USB.
  • πŸ†• HyperOS (2026): Settings β†’ Advanced settings β†’ For developers β†’ Debugging by USB (regime ADB).
  • πŸ”„ Old models (Redmi) 4X, Mi A1): Settings β†’ The phone. β†’ Version. MIUI (7 taps) β†’ Come back β†’ Additionally. β†’ For developers.

On some devices (for example, POCO F5 or Xiaomi 12T) after debugging will appear pop-up with a warning. Here you need to confirm the action by ticking Always allow from this computer - this will eliminate repeated requests when connecting.

β˜‘οΈ Preparation for the inclusion of debugging USB

Done: 0 / 4

Why your computer can’t see Xiaomi after debugging

A common problem: you have enabled debugging, connected your smartphone to your PC, but the device is not defined in ADB or Mi Flash Tool. The reasons can be different - from the lack of drivers to blocking from MIUI.

Problem.Reason.Decision
The phone is charging but not visible in ADBNo ADB or Mi USB Driver installedDownload ADB Driver or Mi USB Driver
The error is "Unauthorized" in ADB.Not confirmed by the debugging permission on the phoneDisconnect/connect cable and allow access in the pop-up window on Xiaomi
The device is defined as "Unidentified"Problem with cable or USB portTry another cable (preferably original) or USB 2.0 port
ADB sees the device, but commands are not executedCharging Only mode is onChange the connection mode to File Transfer (MTP) in the notification curtain

If you’re using Windows, check Device Manager: Xiaomi is sometimes defined as an Android Composite ADB Interface with an exclamation point.

  1. Right-click on the device β†’ Update the driver.
  2. Select Search for drivers on this computer.
  3. Specify the path to the ADB driver folder (usually C:\Users\Username\AppData\Local\Android\Sdk\platform-tools).

⚠️ Note: On a MacOS or Linux, you may need to add a rule for udev so that the system recognizes Xiaomi in debugging mode 'SUBSYSTEM=="usb", ATTR{idVendor}=="2717", MODE="0666"' | sudo tee /etc/udev/rules.d/51-android.rules, then reboot the PC.

How to check that USB debugging works

Before you start firmware or data recovery, make sure that ADB interacts with the smartphone correctly.

  1. Connect Xiaomi to your computer with the original cable (cheap cables often don’t support data transfer).
  2. Open the command line (Win + R β†’ enter cmd).
  3. Go to the folder with ADB (if not installed, download Platform Tools):
cd C:\platform-tools
  1. Enter a command to check connected devices:
adb devices

If the debugging works, you'll see your Xiaomi serial number on the list.

List of devices attached


a1b2c3d4e5f6    device

If the device is displayed unauthorized, you have not confirmed the permission on the phone (see section above). If the list is empty, check the cable, drivers or USB port.

adb start-server-->

Debugging by USB on a locked Xiaomi (if you forgot the pattern lock)

Situation: you forgot your password or your pattern lock, and USB debugging was enabled before locking, so you can try unlocking your device through ADB without losing data.

  • βœ… Debugging by USB was activated prior to blocking.
  • βœ… The computer you connect your phone to is previously authorized (there was a confirmation of permission).
  • βœ… No encryption is enabled on the phone (otherwise, the data will be lost).

Instructions for resetting the pattern lock:

  1. Connect Xiaomi to your computer and open the command line in the folder with ADB.
  2. Enter the commands in order:
adb shell


su




rm /data/system/gesture.key




rm /data/system/locksettings.db




rm /data/system/locksettings.db-wal




rm /data/system/locksettings.db-shm




reboot

Once you reboot, the pattern lock will be reset, and if you have a su: not found error, you have no root permissions on the device, and the method will not work.

⚠️ Note: On new Xiaomi models (e.g. Xiaomi 14 or Redmi Note 13 Pro)+) This method may not work due to increased protection. MIUI. In this case, only hard reset remains, but the data will be lost.

What if ADB doesn’t see a blocked Xiaomi?
If debugging was not enabled before locking, it is impossible to unlock the phone without losing data. The only options are: 1. Remember the password / key (try the combinations you used earlier). 2. Reset to factory settings via Recovery (data will be deleted). 3. Contact the Xiaomi service center with proof of ownership (check or box).

How to Disable USB Debugging (and Why It Matters)

Once you've finished working with ADB or firmware, be sure to deactivate the debugging, which closes potential loopholes for malware that ADB could use to access the system.

  1. Go to Settings β†’ Additional β†’ For Developers (or Advanced Settings β†’ For Developers in HyperOS).
  2. Find the USB Debugging option and move the slider to the Off position.
  3. Some versions of MIUI may require confirmation – click Disable.

It is also recommended that:

  • πŸ”’ Remove all authorized computers from the developer menu (optional to revoke debugging permissions) USB).
  • πŸ”„ Disable the developer menu if it is not necessary: delete all the data of the Settings application (but this will reset other personal settings!).
  • πŸ›‘οΈ Check the permissions of applications that have access to ADB (Titanium Backup or Lucky Patcher).

HyperOS devices may be notified of enhanced security after debugging is disabled, and that's normal, as the system informs that potential vulnerabilities are closed.

πŸ’‘

Debugging by USB It should only be enabled during active work with the phone, and the constantly activated mode increases the risk of malware infection through the use of the device. ADB-team.

Frequent mistakes and their solutions

Even after you set up the debugging correctly, users are faced with problems, and here are the most common errors and ways to fix them:

Mistake.Possible causeDecision
device not found in ADBDrivers are not installed or the cable is faultyCheck the connection, install Mi USB Driver, try another cable
No permissions (refusal of access)No confirmation of phone permissionDisconnect/connect the cable and allow debugging in the pop-up window on Xiaomi
ADB sees the device, but commands are not executedCharging Only mode is onChange the connection mode to File Transfer (MTP) in the notification curtain
protocol fault (no status)Conflict of ADB versions on PC and phoneUpdate Platform Tools to the latest version
The phone is constantly asking for permission to debugThere is no box "Always allow from this computer"Connect again and check the box in the pop-up window.

If none of these methods worked, try:

  • πŸ”„ Restart your phone and computer.
  • πŸ”§ Install another version ADB. For example, instead of using the official Minimal ADB and Fastboot.
  • πŸ“± Reset your network settings on Xiaomi: Settings β†’ SIM-maps and networks β†’ Resetting network settings.

FAQ: Answers to Frequent Questions

Can you enable debugging over USB without accessing settings (for example, if the phone is locked)?
No. If the debugging was not enabled before the lock, it is impossible to activate it without a data reset, the only option is to reset it via Recovery (the data will be deleted) or contact the Xiaomi service center.
Why did the USB debugging disappear after the MIUI update?
Updating the system can reset the developer's settings. To get back debugging: Re-activate the developer menu (7 taps according to MIUI). Enable debugging in Settings β†’ Additional β†’ Developer. Connect the phone to your computer and confirm the resolution again.
Do I need to unlock the bootloader to enable debugging over USB?
No, unlocking Bootloader and debugging over USB are different functions. Debugging is enabled in the settings, and unlocking the bootloader requires official permission from Xiaomi and is done through the Mi Unlock Tool.
Can I use USB debugging on Xiaomi without a computer?
No, USB debugging is designed specifically for interaction with your computer via ADB. However, there are alternatives for some tasks: Use Mi Cloud or local copying to back up data; You can use a file manager (e.g. X-Plore) to install APK; There are applications like KingRoot to obtain root rights, but they are less reliable than ADB.
How to enable USB debugging on Xiaomi with a damaged screen?
If the screen doesn't respond to touch, but the phone turns on, you can try: Connect Xiaomi to your computer and use ADB to control (if debugging was enabled earlier), connect your mouse via USB OTG (if supported) and control it. If the screen is completely black, but the phone is determined in ADB, you can try commands like adb shell input tap x y to emulate taps. In extreme cases, you will need to repair the screen or connect to the Mi Assistant via Fastboot.