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.
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:
- Open the Settings. β The phone.
- Find the MIUI version and tap it 7 times in a row (on some models - 10 times).
- 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-->
- Connect your phone to your PC and select File Transfer (MTP) mode (if the screen is running).
- Open the command prompt (Win + R β cmd) and type: adb devices If the device is not displayed, install drivers or reconnect the cable.
- 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.
- Now activate debugging command: adb shell settings put global adb_enabled 1
If your phone is locked, use the fastboot workaround:
- Turn off the device and press Volume Down + Power to log into the Fastboot.
- Enter the command: fastboot oem edl (only for unlocked bootloader!).
What if the adb device command does not show the device?
Table: ADB teams for debugging management on Xiaomi
| Purpose | Team team. | Note |
|---|---|---|
| Connection check | adb devices | The serial number of the device must be displayed. |
| Enabling the Developer Menu | adb shell settings put global development_settings_enabled 1 | Works on MIUI 12-15 |
| Activation of debugging over USB | adb shell settings put global adb_enabled 1 | Requires confirmation on the phone screen |
| Debugging permission for this PC | adb shell settings put global adb_tcp_port 5555 | Allows you to connect via Wi-Fi after USB-activation |
| Dumping everyone ADB-permit | adb shell pm clear com.android.providers.settings | Helps 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.