Enabling USB debugging on Xiaomi via computer: a complete guide with pictures and commands

Why USB Debugging on Xiaomi Needs a Special Approach

Debugging mode by USB (USB Debugging on Xiaomi smartphones is not just a tick in the settings, but a real β€œkey” to the advanced features of the device. Without it, you can not flash your phone through fastboot, get root rights, unlock the bootloader or even transfer data using the help of a fastboot. ADB. But the manufacturer deliberately hides this option: by default, it is locked behind seven menu levels, and on some models (for example, the Redmi Note 12 Pro).+ or POCO F5) Activation requires additional manipulation.

The main problem is that MIUI (branded shell Xiaomi) actively resists the "hacking" of the system. After software updates, the path to the developer's settings can change, and new versions (for example, MIUI 14/15) appear additional checks, such as binding a Mi Account account or requesting a password when connecting to a PC. In this article, we will discuss a universal method for enabling debugging via USB through a computer that works even when the phone sensor does not respond or the screen is broken.

Preparation: What will be needed to include debugging

Before you start, make sure you have everything you need, and without these components, you're going to fail.

  • πŸ“± Smartphone Xiaomi, Redmi or POCO with a battery charge of at least 50% (at a low charge, the system can block debugging).
  • πŸ’» Computer running Windows 10/11, macOS or Linux (for macOS or Linux) Mac/Linux Additional drivers will be required).
  • πŸ”Œ USB-TypeC or USB-MicroUSB cable (original, as cheap cables often don't transmit data).
  • πŸ› οΈ Utilities: ADB and Fastboot (part of Android) SDK Platform Tools), Mi drivers USB Driver for Windows.

Pay special attention to drivers. On Windows, without them, your computer will not see your phone in debugging mode. You can download official drivers from Xiaomi's website or through Device Manager (if the system does not pick them up automatically). macOS/Linux You will need to manually adjust the rules udev – this will be discussed below.

πŸ“Š What kind of smartphone you Xiaomi?
Redmi (Note/Pro series)
POCO (F/X/M)
Mi (11/12/13)
Black Shark
Other

Step 1: Unlock the Developer Menu on Xiaomi

The 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. The message will be: β€œYou are a developer!”

If this method doesn’t work (e.g., on the POCO F6 Pro with HyperOS), try an alternative route:

  • Go to Settings β†’ Additional β†’ Version of the kernel and tap it 5 times.
  • Or in Settings. β†’ System system β†’ Update the system hold the icon βš™οΈ (5 seconds.

πŸ’‘

On some firmware (e.g. global MIUI EU), the developer menu may be called "Developer options" and may be located in the "Additional settings" section.

Once the developer menu is activated, it will appear in the main settings list, but newer versions of MIUI (14+) may hide it for additional authentication, requiring you to enter a password from Mi Account.

Step 2: Enabling USB debugging via computer

Now, to the point, activating debugging through the PC, this is a method that can be useful if:

  • πŸ“΅ The phone sensor is not working, but the screen is visible.
  • πŸ”’ The device is locked with a pattern lock or PIN-code.
  • πŸ–₯️ You need to enable debugging remotely (for example, for repairs).

We use it for that. ADB-Follow the instructions:

Install ADB on your computer |Connect your phone with cable |Run the command line (cmd/terminal) |Check the visibility of the device with the adb devices-->

  1. Connect your phone to your PC and select File Transfer (MTP) mode (if the screen is running).
  2. Open the command prompt (Win + R β†’ cmd) and type: adb devices If the device is not displayed, install drivers or reconnect the cable.
  3. Enter the command to enable debugging: adb shell settings put global development_settings_enabled 1 adb shell am start -n com.android.settings/.DevelopmentSettings This will open the developer menu directly.
  4. Now activate debugging command: adb shell settings put global adb_enabled 1

If your phone is locked, use the fastboot workaround:

  1. Turn off the device and press Volume Down + Power to log into the Fastboot.
  2. Enter the command: fastboot oem edl (only for unlocked bootloader!).
What if the adb device command does not show the device?
1. Check the cable - try another, original. 2. Update drivers through Device Manager (Update driver) β†’ Search on this computer β†’ Select from the list β†’ ADB Interface). 3. Restart your phone and PC. 4. On Windows, disable driver signature: Execute β†’ gpedit.msc β†’ User configuration β†’ Administrative templates β†’ System system β†’ Installation of the driver β†’ Disable signature verification. 5. For macOS/Linux Add the rule udev: sudo nano /etc/udev/rules.d/51-android.rules and insert a line SUBSYSTEM=="usb", ATTR{idVendor}=="2717", MODE="0666", Then sudo udevadm control. --reload

Table: ADB teams for debugging management on Xiaomi

PurposeTeam team.Note
Connection checkadb devicesThe serial number of the device must be displayed.
Enabling the Developer Menuadb shell settings put global development_settings_enabled 1Works on MIUI 12-15
Activation of debugging over USBadb shell settings put global adb_enabled 1Requires confirmation on the phone screen
Debugging permission for this PCadb shell settings put global adb_tcp_port 5555Allows you to connect via Wi-Fi after USB-activation
Dumping everyone ADB-permitadb shell pm clear com.android.providers.settingsHelps if the debugging "hangs" after the update

Note that on Xiaomi with HyperOS (the new firmware based on Android 14), some commands may not work. In this case, use an alternative method through fastboot or EDL-Mode (requires an authorized Mi Account).

Problem Solving: Why Debugging Doesn't Enable

Even if you follow the instructions accurately, you may encounter errors, and here are the most common solutions.

  • ❌ "Device not authorized" (when connected to a PC): "A window should appear on the phone screen asking for debugging permission. If not, check the cable or restart both devices. MIUI 14+ You may need to enter a password from your Mi Account.
  • ❌ Adb devices return unauthorized: Delete adbkey.pub file in folder %USERPROFILE%\.Android (for Windows) and reconnect the device. Mac/Linux path: ~/.android/adbkey.pub.
  • ❌ Developer menu disappears after reboot: This is a feature MIUI. Enter the command: adb shell cmd settings_sec put global development_settings_enabled 1

πŸ’‘

If Xiaomi phone doesn’t respond to you ADB-commands, but defined in fastboot, means the bootloader is locked. Unlocking requires binding Mi Account and waiting. 7-15 Days (policy of Xiaomi).

⚠️ Attention: On Xiaomi models 13T Pro, Redmi K60 Ultra and new POCO with HyperOS enabling debugging through ADB You can reset the Find My Device settings. Before the procedure, disable this feature in Settings. β†’ Google β†’ Security.

Alternative methods: if the standard method does not work

If the above steps didn’t help, try one of these options:

  • πŸ”§ Through TWRP (Custom recovery: Install TWRP (requires an unlocked bootloader, then select Advanced from the recovery menu β†’ File Manager and edit the file /data/property/persist.sys.usb.config, Replace the value with mtp,adb.
  • πŸ“‘ Wi-Fi (if) USB Not working: First activate the debugging cable, then type: adb tcpip 5555 adb connect IP_ARESS TELEFON:5555 Find out. IP You can set up β†’ The phone. β†’ Status. β†’ IP-address.
  • πŸ”„ Through EDL-Mode (for experienced): Requires an authorized Mi Account and Qualcomm programmer. Connect your phone in mode EDL (Close the testpoints or use the fastboot oem edl command, then swipe the persist section with debugging enabled.

For models with a Mediatek processor (e.g. Redmi Note) 12 4G) Instead of fastboot, use the utility. SP Flash Tool with scatter.txt file. usb_debug and change the meaning of c 0 on 1.

FAQ: Frequent questions about debugging USB on Xiaomi

Can I enable debugging over USB if the screen is completely broken and the image is not visible?
Yes, but only if you've activated the developer menu before, plug your phone into your PC and type in the commands: adb shell input tap 100 200 # Tap by coordinates of the adb shell input swipe menu 300 500 300 200 # Swipe down to open curtain adb shell settings put global adb_enabled 1 Coordinates depend on the model – you can learn them from the templates for Xiaomi in the forums. 4PDA or XDA.
Why is USB debugging disabled after MIUI update?
These are Xiaomi's security policies, after major updates (e.g., with the MIUI 13 on MIUI 14) system resets permits ADB. Solution: Turn on the developer menu again (7 tap-up MIUI). Connect to your PC and confirm the request on your phone screen. Enter adb shell settings put global. adb_enabled 1.
How to enable debugging on Xiaomi without a computer?
If the screen is working, do the following: Activate the developer menu (7 taps according to version) MIUI). Go to Settings. β†’ Additionally. β†’ For developers, find the Debugging item. USB and move the slider to the right. In the window that appears, press OK. On new models (Xiaomi 14, Redmi Note 13 Pro)+) may require input PIN-Password or code from Mi Account.
What if, when connecting to a PC, the phone asks to unlock the bootloader?
This means that the bootloader is locked on the device. To unlock it: Go to the site en.miui.com/unlock and download the Mi Unlock Tool. Link your Mi Account to your phone in Settings β†’ Xiaomi account. Log in to Fastboot (clip Volume Down) + Power) and connect to the PC. Run the Mi Unlock Tool and follow the instructions (waiting may take up to 720 Without unlocking the bootloader, many ADB-Teams will be limited.
Can you enable debugging on Xiaomi using apps from the Play Market?
No, applications like USB Debugging Enabler don't work on MIUI because of security constraints. The only reliable way is manual activation via settings or ADB. Except for root-righted devices where you can edit /data/property/persist.sys.usb.config manually.