How to Enable and Use Developer Mode on Xiaomi for USB Debugging
USB Debugging (ADB) allows your Xiaomi phone to communicate with a PC via the Android Debug Bridge — essential for developers, power users, and anyone using ADB tools.
Step 1: Enable Developer Options
- Settings → About Phone → find "HyperOS Version" (or "MIUI Version")
- Tap it 7 times rapidly until "You are now a developer!" appears
- Developer Options is now unlocked under Settings → Additional Settings
(This is the same process as Article 29 — skip if already done)
Step 2: Enable USB Debugging
- Settings → Additional Settings → Developer Options
- Find "USB Debugging" and toggle it ON
- Confirm the warning dialog
Step 3: Connect to PC
- Connect your Xiaomi to a PC via USB-C cable (must be a data cable)
- On your phone, a dialog appears: "Allow USB Debugging?" — tap "Allow" (check "Always allow from this computer" for convenience)
- On PC, open Command Prompt or Terminal and run:
adb devices
Your phone should appear in the list as "authorized"
Common ADB Commands for Xiaomi Users
| Command | Function |
|---|---|
adb devices |
List connected devices |
adb shell |
Open device shell |
adb install app.apk |
Sideload an APK |
adb pull /sdcard/file.txt ./ |
Copy file to PC |
adb shell pm uninstall --user 0 com.pkg |
Remove bloatware |
adb reboot recovery |
Boot into Recovery Mode |
adb reboot bootloader |
Boot into Fastboot Mode |
Security Warning
Disable USB Debugging when not in use — it allows complete access to your phone's data from any connected PC. Settings → Developer Options → USB Debugging → OFF.
OEM Unlocking (For Advanced Users)
Developer Options also contains "OEM Unlocking" — needed to unlock the Xiaomi bootloader for custom ROMs. This voids warranty and should only be enabled if you intend to flash a custom ROM.