Debugging mode by USB on smartphones Xiaomi is a hidden function, without which it is impossible to perform most technical operations: from firmware through Fastboot to work with the company. ADB or custom recavator installations TWRP. Despite the fact that the manufacturer hides these settings "for experienced users", any owner of the device can turn them on - the main thing is to know the exact sequence of actions and take into account the features of the firmware. MIUI.
In this article you will find not only the basic instructions for activating debugging, but also the solution to typical problems: why the button "Debug by" USB" Inactive, how to bypass the Mi Account lock when unlocking the bootloader, and what to do if after the update MIUI Suddenly is gone, and we'll also look at the differences between Xiaomi, Redmi and the other two. POCO β For example, why some devices require additional confirmation through SMS.
Warn in advance: enabling debugging reduces the security level of the device. This does not mean that your smartphone will immediately become vulnerable to hackers, but we do not recommend activating the mode unless you plan to use it for specific tasks (firmware, backup through the Internet). ADB, testing).
What is USB debugging and why you need it on Xiaomi
Debugging mode by USB (USB Debugging is a special protocol that allows Xiaomi device to communicate with your computer at a low level through commands. ADB (Android Debug Bridge is impossible without it:
- π§ Install custom firmware (LineageOS, Pixel Experience)
- π± Unlock the bootloader (Fastboot) for system modifications
- π Create complete data backups through ADB backup
- π Testing apps in Android Studio or other development environments
- π Restore access to the device when the screen is locked (in some cases)
On Xiaomi, this mode is hidden in the Developer Menu, which is disabled by default, and the manufacturer does this not out of malice, but to prevent inexperienced users from accidentally changing the system. ADB It can cause a complete reset of the device or damage to the partition. /data, What will require a flashing through Fastboot.
It is important to understand the difference between the USB Debugging is the door to communication with the PC, and unlocking the bootloader is the key to changing system files. On Xiaomi, unlocking requires binding your Mi Account and waiting. 7-15 days (depending on the model).
Device Preparation: How to Enable the Developer Menu
Before you activate debugging, you need to unlock the hidden βDevelopersβ menu on all Xiaomi devices (including Redmi and other devices). POCO) This process is the same, but there are nuances for different versions. MIUI:
Open "Settings" β "About the phone"
Find the item "Version" MIUI" And tap it 7 times.
Enter your password/pattern lock if you request it.
Return to the main menu "Settings" - a new section "For developers" will appear"-->
Nana MIUI 14 and newer algorithm slightly changed:
1. Go to Settings. β The phone. β Device information.
2. Find the line Version MIUI (Donβt confuse it with the Android version!").
3. Quickly tap it 7 times in a row (some devices will require input) PIN-code).
4. The system will display a notification: "You became a developer!"
If nothing happens after 7 clicks:
- Make sure you are using the version. MIUI, not in other fields.
- In some models (POCO F5, Redmi Note 12 may require an internet connection to activate the menu.
If the device is blocked by corporate policy (for example, on a work phone), the Developer Menu may not be available.
What if the Developer Menu disappeared after the update?
Step-by-step: how to enable debugging by USB
When the Developer menu is activated, you just have to turn on the debugging itself. MIUI 12/13/14:
- Open the Settings. β Additionally. β For developers (on some models, the path may be Settings) β System system β For developers).
- Scroll down to the "Debugging" section.
- Activate the debugging switch over USB.
- In the window that appears, click OK or Allow (depending on the version). MIUI).
- Connect your device to your PC via the original cable (importantly, some cheap cables donβt support data transmission).
- On the screen of the smartphone will appear the request "Allow debugging by USB From this computer?. Check Always Allow from this computer and click Allow.
Critical: If you connect Xiaomi to your computer for the first time, the system may request the installation of drivers.For Windows, download the official Mi package USB Driver from Xiaomi's website. macOS/Linux Drivers are usually installed automatically.
After successful connection, check the work ADB:
1. Open the command line (Windows) or the terminal (macOS/Linux).
2. Enter the command:
adb devices3. if the device is displayed in the list (e.g, 1234abcd device) - debugging works.
1. Reconnect the cable (use the port) USB 2.0 on PC).
2.Reboot the device and computer.
3. Update ADB Up to the latest version (adb) --version).
-->
Differences between models: Xiaomi, Redmi, POCO
All Xiaomi devices are working on MIUI, There are nuances in activating debugging for different lines:
| Device lineup | Features of debugging | Additional requirements |
|---|---|---|
| Xiaomi (flagships)Mi 11/12/13, Mix 4/5 | The Developer Menu may require confirmation via Mi Account. | To unlock the bootloader, you need to link the account and wait 7 days. |
| Redmi (Middle Segment)Note 10/11/12, K50 | On some models (such as the Redmi Note 10 Pro), debugging automatically turns off after a reboot. | It is recommended to disable optimization MIUI developer-setting. |
| POCO (playful)F3/F4/F5, X3/X4 | Nana POCO s MIUI for POCO The path to the developer menu may be different: β System system β Advanced settings. | To firmware through Fastboot, you need to disable the bootloader protection in the developer menu. |
| Outdated Mi models A1/A2 (Android One) | Debugging is enabled in the standard way for Android One (without features) MIUI). | Unlocking the bootloader does not require waiting (as on βpureβ Android). |
On devices with HyperOS (new firmware from Xiaomi, which came to replace the new one) MIUI 2026) The path to the developer menu has changed: Settings β The phone. β Information on POs β HyperOS version (Tapa 7 times).
Note: on some models (Redmi Note 12 Pro)+, Xiaomi 13T) After activating debugging, the system may request confirmation SMS. This is a security measure β enter the code from the message to complete the activation.
π‘
On devices with HyperOS debugging by USB You may need additional permission in the Settings menu β Annexes β Permits β Special access β Debugging USB.
Typical errors and their solutions
Even after debugging is activated correctly, users are faced with problems, and here are the most common errors and ways to fix them:
β οΈ Warning: If, after connecting to a PC, a device is identified as Unauthorized in the adb device list, it means that you have not confirmed permission on the smartphone screen.
Error 1: βDebugging byβ button USB" inactive (grey)
- πΉ Make sure the Developer menu is on (stamped by the Version) MIUI 7 times?).
- πΉ In some models (POCO X3 Pro) Unlocking must be enabled first OEM same-menu.
- πΉ If the device is linked to a corporate account (e.g., at work), the administrator could block these settings.
Error 2: The computer does not see the device in the adb devices
- πΉ Check the cable β use the original from Xiaomi (cheap cables often donβt transmit data).
- πΉ Install Mi drivers USB Driver (link at the beginning of the article).
- πΉ Try another one. USB-port (preferably) USB 2.0).
- πΉ On Windows, disable driver signature: Execute β bcdedit /set nointegritychecks on β Reboot.
Error 3: After the update MIUI debugging is off
This is a typical problem for Xiaomi.
1. Reset network settings (Settings) β Connections β Resetting the network).
2. Re-enable the menu "For developers" (7 taps according to the Version) MIUI).
3. If it does not help, reset to factory settings (without deleting data).
Error 4: Request to unlock Mi Account when you enable debugging
On new devices (Xiaomi 14, Redmi Note 13), the system may require confirmation via your Mi Account.
1. Create a Mi Account on the official website.
2. Attach it in the device settings (Settings) β Accounts. β Mi Account).
3. Re-enable debugging - the unlock request should disappear.
Security: the risks of enabling debugging and how to minimize them
Initiation of debugging USB It opens up potential vulnerabilities to your device. Here are the real risks and ways to protect yourself:
- π‘οΈ Data breach: Through ADB An attacker can copy your files if they get physical access to the device.Solution: Disable debugging when you don't need it, and use screen lock.
- π Installation of malware: Through ADB Solution: Allow debugging only from trusted PCs (Tick Always Allow from this computer).
- π§ System damage: The wrong command ADB It can erase data or disrupt work MIUI. Solution: Backup through Mi Cloud or TWRP before experimentation.
On HyperOS devices, enabling debugging automatically disables App Lock, which can allow other users to access blocked applications (such as banking). ADB Make sure to return the security settings to their original state.
If you are selling or selling a device, be sure to disable debugging:
1. Go to Settings. β For developers.
2. Deactivate the Debugging Switch by USB.
3. In the Reset menu, select Remove all developer settings.
adb keygen ~/.android/adbkey.pubThis will show you a list of authorized PCs, and if there are unknown devices, delete the adbkey file and reconnect only trusted PCs.-->
Debugging without a computer: alternative methods
In most cases, the debugging of USB Requires a PC connection, but there are ways to activate advanced features without a computer:
- π± Local debugging via Wi-Fi (requires initial setup from PC): 1. Connect the device to the PC and activate debugging USB. 2. Enter the command: adb tcpip 5555 3. Turn off the cable and connect via Wi-Fi: Adb connect [IP-address]:5555 4. Now we can use it. ADB wireless.
- π§ Developer mode for testing: In the Developer Menu, turn on Do Not Turn Off the Screen (useful for testing apps) or Show Touch (visualizing taps).
- π‘ Debugging via Bluetooth (experimental function): Some firmware (LineageOS) can be activated ADB over Bluetooth, but it requires root rights.
For devices without access to a PC (for example, if you are on a business trip), you can use applications like Bugjaeger (from Google Play), which emulate the use of the computer. ADB-team USB OTG. However, this method does not work on all Xiaomi models due to limitations. MIUI.
Limitation: Without a physical connection to a PC, you wonβt be able to unlock the bootloader or flash the device. Local debugging over Wi-Fi is only suitable for testing applications and some of the most common ones. ADB-team.