Enable USB Debugging on Xiaomi Phones – Quick Guide
In this article
Yes, you can enable USB debugging on a Xiaomi phone by unlocking Developer options and turning on the USB debugging toggle.
What You'll Need
- A Xiaomi smartphone running MIUI
- A USB‑type‑C (or micro‑USB) cable that works with your device
- A computer if you plan to use ADB or install apps from a PC (optional)
Step‑by‑Step
- Open the Settings app on your Xiaomi phone.
- Scroll down and tap About phone. The exact wording may vary slightly between MIUI versions, but it is usually near the bottom of the main Settings list.
- Find the entry labeled MIUI version. Tap it repeatedly (about seven times) until you see a toast message that says “You are now a developer!” or similar. This action unlocks the hidden Developer options menu.
- Return to the main Settings screen. You should now see a new entry called Additional settings or directly Developer options depending on your MIUI version. Tap it.
- Inside Developer options, locate the switch labeled USB debugging. Turn the switch on. A confirmation dialog will appear warning you about the risks of enabling debugging; tap OK to confirm.
- On newer MIUI releases (MIUI 12 and later), enabling the main toggle also reveals a secondary option called USB debugging (Security settings). Tap this option and enable it as well. You may be prompted to enter your device PIN, password, or pattern.
- Connect your phone to the computer with the USB cable. Pull down the notification shade and tap the USB connection notification. Choose File Transfer / Transfer files (or the appropriate mode) if you want ADB to recognise the device.
- On the computer, open a command prompt (Windows) or terminal (macOS/Linux) and type
adb devices. If the device appears in the list, USB debugging is successfully enabled.
Common Mistakes
- Skipping the “tap MIUI version seven times” step. Without this, Developer options remain hidden.
- Enabling only the primary USB debugging switch and forgetting the secondary Security settings toggle on newer MIUI versions. This can prevent ADB from seeing the device.
- Choosing the wrong USB mode (e.g., “Charging only”). ADB requires the device to be in a data‑transfer mode.
- Using a faulty or power‑only cable. Some cables lack data lines, so the computer never detects the phone.
- Leaving the phone locked with a screen lock that blocks the security prompt. Unlock the device before confirming the security toggle.
Tips
- Keep your phone’s software up to date. MIUI updates sometimes rename settings, but the overall process stays the same.
- If you plan to use ADB frequently, enable Stay awake (found in Developer options) so the screen does not turn off while the phone is charging.
- For faster file transfers, select the “MTP” or “File Transfer” USB mode rather than “PTP” or “MIDI”.
- When connecting to a new computer, you will see a prompt asking to allow USB debugging from that PC’s RSA key. Always verify the fingerprint before granting permission.
- To quickly disable USB debugging, return to Developer options and toggle the switch off. This is useful when you lend the phone to someone else.
Troubleshooting
Device not listed in adb devices
- Restart both the phone and the computer. A simple reboot often resolves connection glitches.
- Confirm that the USB cable is a data‑capable cable. Try a different cable or a different USB port on the computer.
- Make sure the USB mode is set to “File Transfer”. Pull down the notification shade, tap the USB option, and select the correct mode.
- Check that the USB debugging (Security settings) toggle is on. On some MIUI versions the secondary toggle is hidden until you first enable the primary one.
- On Windows, verify that the appropriate Xiaomi USB drivers are installed. You can download the official drivers from Xiaomi’s developer site or use the Google USB driver via Android Studio.
RSA key prompt never appears
- Ensure the phone’s screen is unlocked when you connect the cable. A locked screen can suppress the RSA dialog.
- Disable “USB debugging (Security settings)” temporarily, then re‑enable it. This forces the system to re‑show the RSA prompt.
- Check for a “USB debugging is on” notification in the status bar; tapping it may reveal the RSA dialog.
USB debugging option is greyed out or missing
- Make sure you have completed the “tap MIUI version seven times” step correctly. Some devices require a short pause between taps.
- If the option is still missing, go to Settings > Additional settings > Developer options and scroll to the bottom – sometimes the toggle is hidden under “Debugging” sub‑section.
- Factory‑resetting the phone is a last‑resort measure; it restores the default Settings layout but will erase personal data, so back up first.
Frequently Asked Questions
Do I need to install any software on my computer?
No special software is required to enable the setting on the phone, but to use ADB you need the Android Platform‑Tools package, which includes the adb executable.
Will enabling USB debugging affect my phone’s security?
USB debugging opens a communication channel that can be used by a connected computer. Keep it enabled only when you need it, and always verify RSA key prompts before granting access.
Can I enable USB debugging on a Xiaomi device that is locked with a Google or Mi account?
Yes. The process works regardless of the account status, but you must have access to the device’s lock screen to confirm the security toggle.
What if my phone is running MIUI 13 and the menus look different?
The overall flow is the same: Settings → About phone → tap MIUI version → Settings → Additional settings → Developer options → USB debugging. Labels may be slightly renamed, but the path remains consistent.
Is there a way to enable USB debugging without touching the phone screen?
Not through official MIUI settings. USB debugging must be activated manually on the device for security reasons.
Does enabling USB debugging automatically allow file transfers?
No. File transfer mode is a separate USB setting that you choose from the notification shade after connecting the cable.