Repository navigation
USB Debugging Setup
Warning
USB Debugging is a privileged developer setting that allows full system command execution on your device. Turn it off when you are not actively using debugging features.
USB Debugging allows Android devices to communicate with ADB (Android Debug Bridge) tools such as aShell You, desktop development workstations, and recovery utilities. This guide outlines the standard procedure and manufacturer-specific requirements.
-
Open System Settings:
- Launch the Settings application on your Android device.
-
Navigate to About Phone:
- Scroll down and tap About phone (or About device).
-
Locate Build Number:
- Find the Build number entry.
On Samsung devices: Navigate to
Settings > About phone > Software information > Build number.
On Xiaomi / POCO: TapOS versionorMIUI versioninstead of Build number.
- Find the Build number entry.
-
Unlock Developer Mode:
- Tap the Build number entry seven times in rapid succession.
- Enter your lock screen PIN, pattern, or password if prompted.
- A confirmation toast will appear: "You are now a developer!"
-
Open Developer Options:
- Return to the primary Settings menu.
- Navigate to System > Developer options (or Additional settings > Developer options).
-
Enable USB Debugging:
- Scroll to the Debugging section.
- Toggle USB debugging to ON.
-
Confirm System Warning:
- Read the system warning dialog and tap OK to authorize USB debugging.
Certain Android distributions require additional configuration steps before accepting external ADB commands:
Xiaomi devices enforce strict secondary authorization gates:
- In Developer options, toggle on Install via USB.
- Toggle on USB debugging (Security settings).
This permission requires an active SIM card and Xiaomi account authorization. Without it, commands that modify settings or inject input will fail with
SecurityException.
- In Developer options, enable USB debugging.
- Toggle on Disable permission monitoring if you plan to install packages or simulate user interaction without repetitive security toasts.
- If your device is protected by Knox or Auto Blocker (One UI 6+), navigate to Settings > Security and privacy > Auto Blocker.
- Ensure Auto Blocker is temporarily disabled if it blocks USB software installation or ADB debugging commands.
If you connect your device to an untrusted workstation or another phone:
- Go to Settings > System > Developer options.
- Tap Revoke USB debugging authorizations.
- Tap OK to invalidate all previously accepted cryptographic RSA keys.
| Symptom | Probable Cause | Recommended Resolution |
|---|---|---|
| "You are now a developer" toast does not appear | Build number not tapped fast enough | Tap the build number 7 times rapidly without pausing between taps. |
| Developer options missing from Settings menu | Feature not unlocked or restricted by enterprise MDM profile | Check if a work profile or school device manager has disabled developer access. |
| USB Debugging toggle is greyed out | Device connected to a USB port enforcing Charging Only or MDM restriction | Unplug the USB cable, toggle the setting, and reconnect the cable. |
Commands fail with SecurityException on Xiaomi device |
Security settings toggle inactive | Enable USB debugging (Security settings) in Developer options. |
If you run into any issues or want to ask questions, feel free to:
- Join our Telegram Community
- Open an Issue on GitHub
- Local ADB Guide
- TCP/IP Setup Guide
- Wireless Debugging Setup
- OTG ADB Setup Guide
- Fastboot over OTG Guide
- USB Debugging Setup