Xiaomi Redmi 9 is one of the most popular budget smartphones, but many users have difficulty trying to enable USB debugging, a feature that is necessary for working with ADB, firmware via Fastboot, obtaining root rights or transferring data using specialized utilities. Unlike other brands, on Xiaomi, the process is complicated by the hidden developer mode and features of the MIUI shell.
In this article, you will find a step-by-step illustration guide that is relevant to the Redmi 9 (M2003J15SC, M2004J19G and other modifications) on MIUI 12-14. We will discuss how to get around typical errors, why the function may not turn on, and what to do if the smartphone is not detected on the PC. You will also learn how to check that the debugging works correctly, and what hidden MIUI settings can block the connection.
Why do you need to debug USB on Xiaomi Redmi 9
Debugging by USB (USB Debugging is a tool for developers, but it's also useful for ordinary users:
- π§ Install custom firmware through TWRP or Fastboot.
- π± Get root rights with Magisk or SuperSU.
- π Recover data after reset via Dr.Fone or Tenorshare.
- π₯οΈ Control your smartphone from PC via scrcpy (real-time screen viewing).
- π οΈ Correct system errors through ADB-team.
Redmi 9 also requires debugging to unlock the bootloader Unlock, without which it is impossible to install alternative software. Importantly, turning on this feature resets some security settings, so after activation, it is recommended to set a strong password on the lock screen.
Preparation of the smartphone: unlocking the developer mode
On Xiaomi Redmi 9, the developer mode menu is hidden by default. To activate it, you need to perform a series of actions in the settings. Important: MIUI can request confirmation through Mi Account - make sure you remember the username and password from the Xiaomi account.
Instructions for MIUI 12-14:
- Open the Settings. β The phone.
- Find the MIUI version and tap it 7 times in a row (you should be notified βYou became a developer!β).
- Return to the main Settings menu β there will be a new section Additional β For developers.
If nothing happens after 7 clicks:
- β Check if the password is installed on the lock screen β without it, the developer mode is not activated.
- β Make sure you are using the version. MIUI, not on other lines (e.g., the device model).
- β Reboot your smartphone and try again.
What if the notification βYou became a developerβ does not appear?
Step-by-step: how to enable debugging by USB
Once the developer mode is activated, you can start debugging. On Redmi 9, the process consists of 5 steps:
- Go to Settings β Additional β For developers.
- Find the USB Debugging option (usually in the Debugging block).
- Activate the slider and a risk warning will appear.
- Confirm the action by pressing OK.
- In the window that appears, select Allow Always from this computer (if connected to a PC) and click Allow.
If the USB Debugging option is inactive (grey), do:
Is the developer mode enabled (see previous section)
Is the smartphone connected to charging or PC (some firmware required)
Are Xiaomi drivers installed on your computer?
Is the power saving mode turned off for settings (Settings β Battery β Energy saving β Energy saving settings β Disable for βSettingsβ)
-->
Critical error: If the device stops being detected on the PC after debugging is enabled, check if the option to Revoke USB permissions in the developer menu is activated.
π‘
To speed up the search for the option "Debugging by USB", Use the search bar in the settings (the magnifying glass icon in the upper right corner "USB debug" or "debug".
Problems and Solutions: Why Debugging is Not Included
Even after doing the right thing, USB debugging may not work, and letβs look at the common mistakes and ways to fix them:
| Problem. | Reason. | Decision |
|---|---|---|
| The USB Debugging Option is Inactive | Developer mode not unlocked | Repeat the taps using the MIUI version (see section 2) |
| The smartphone is not defined on the PC | There are no Xiaomi or ADB drivers. | Install Mi PC Suite or drivers manually through Device Manager |
| The error is "Unknown command: adb" | ADB not added to environment variables | Download Platform Tools and specify the path to the folder in the system variables |
| Debugging is turned on, but after 5 minutes it is turned off | Power saving mode for USB is activated | Turn off in Settings β Battery β Energy saving β Energy saving settings β USB |
If a USB notification appears after connecting to your PC, change the connection mode:
- Swipe down the notification panel.
- Slip on the Charging notification via USB.
- Select File Transfer (MTP) or PTP.
π‘
On some MIUI 14+ firmware, USB debugging is blocked if the bootloader lock option is enabled in the security settings. Before activating debugging, check Settings β Password and security β Lock the bootloader and disable it.
Checking the work of debugging: ADB teams
To make sure that the USB debugging is working correctly, check through ADB:
- Connect Redmi 9 to your PC and allow debugging on your smartphone screen.
- Open the command line (Win + R β cmd) and type:
adb devicesIf you see the serial number of the device (e.g., 1234abcd device) in response, the debugging works.
- π« no devices found β check the cable connection or drivers.
- π« Unauthorized β the smartphone does not have a confirmed permission (check the notification).
- π« offline β restart the device and PC.
For additional diagnosis, use the command:
adb shell getprop ro.build.version.incrementalIt must output the current firmware version (e.g., QKQ1.191222.002). If the command is not executed, the debugging is incorrectly configured.
Security: Risks and how to minimize them
Enabling debugging over USB opens up potential vulnerabilities, and an attacker with physical access to a smartphone can:
- π Install malware through ADB.
- π± Copy personal data (photos, messages, passwords).
- π οΈ Change system settings without your knowledge.
To protect yourself:
β οΈ Warning: Never connect a smartphone with debugging enabled to public charging (at airports, cafes) or other people's computers. Use only trusted ones. USB-port.
- π Turn off debugging after use (Settings) β For developers β Debugging by USB).
- π Set a complex password/pattern lock on the lock screen.
- π‘οΈ Enable data encryption in Settings β Password and security β Encryption.
- π Regularly check the list of trusted computers in Settings β For developers β Withdraw permits USB.
MIUI 14 has added Debugging Protection, which requires you to enter a password every time you connect to your PC.