USB debugging sounds intimidating if you’ve never touched it before, but it’s just a setting that lets your computer talk to your Android phone over a USB cable. Developers use it to test apps, but regular users need it too — for sideloading apps, removing bloatware, recovering data from a phone with a broken screen, or running tools like scrcpy to mirror your phone’s display.
The setting is hidden by default because Google doesn’t want people accidentally turning it on. Getting to it requires unlocking a secret Developer Options menu first, which takes about 30 seconds. Below is the full process for every major Android brand, plus wireless debugging, troubleshooting, and security tips most guides skip entirely.
What Is USB Debugging?
USB debugging is a communication bridge between your Android phone and a computer running ADB (Android Debug Bridge). When enabled, your computer can send commands to the phone, install apps without using the Play Store, pull files from protected directories, capture detailed system logs, and even control the phone’s screen remotely.
Without USB debugging turned on, your computer only sees the phone as a basic storage device or media player. With it enabled, you get full access to the Android system through command-line tools. That’s why this setting sits behind a hidden menu — it’s powerful, and granting access to the wrong computer could expose your data.
What Can You Actually Do With It?
Most people enable USB debugging for one specific task and then forget about it. Here are the most common reasons regular users (not just developers) need it:
- Sideload apps: Install APK files directly from your computer using
adb install, useful for apps not available in your region’s Play Store. - Remove bloatware: Uninstall carrier-installed apps that don’t have an uninstall button using
adb shell pm uninstall. This doesn’t require root access. - Recover data from a broken screen: If your screen is cracked or unresponsive, ADB lets you pull photos, contacts, and files to your computer.
- Screen mirroring: Tools like scrcpy use USB debugging to mirror and control your phone from your desktop with virtually zero lag.
- Flash custom ROMs: Installing custom firmware like LineageOS requires an unlocked bootloader and USB debugging.
- Automate tasks: Apps like Tasker and Shizuku use ADB permissions for automation features that normally need root.
- Take bug reports: Capture detailed system logs for reporting issues to app developers or phone manufacturers.
- Push and pull files: Transfer files to protected system directories that a regular file manager can’t access.
Step 1: Enable Developer Options
Before you can toggle USB debugging, you need to unlock the Developer Options menu. Google hides it by default on every Android phone, but the process to reveal it is the same across all brands — you just need to find the Build Number and tap it seven times.
The exact path to Build Number varies by manufacturer:
Google Pixel: Settings → About phone → Build number
Samsung Galaxy: Settings → About phone → Software information → Build number
OnePlus: Settings → About device → Build number
Xiaomi / Redmi / POCO: Settings → About phone → MIUI version (tap this instead of Build number)
Motorola: Settings → About phone → Build number
Oppo / Realme: Settings → About device → Build number (or Version on some models)
Tap the Build Number (or MIUI version on Xiaomi) seven times in quick succession. You’ll see a countdown toast message after the fourth tap — “You are 3 steps away from being a developer.” After the seventh tap, it confirms: “You are now a developer!” If your phone has a PIN or fingerprint lock, you’ll be prompted to verify your identity before the menu unlocks.
If you can’t find the Build Number, open Settings and use the search bar at the top. Type “build number” and it should show the exact location for your phone.
Step 2: Turn On USB Debugging
Now that Developer Options is visible, here’s how to enable USB debugging:
1. Open Settings.
2. Scroll down and tap System (on Pixel and stock Android). On Samsung, tap Developer options directly from the main Settings page. On Xiaomi, go to Additional settings → Developer options.
3. Tap Developer options.
4. Scroll down to the Debugging section and toggle USB debugging to on.
5. A warning dialog appears: “USB debugging is intended only for development purposes.” Tap OK to confirm.
That’s it. USB debugging is now active. When you connect your phone to a computer with ADB installed, you’ll see a prompt on the phone asking “Allow USB debugging?” with the computer’s RSA key fingerprint. Tap “Always allow from this computer” if it’s your personal machine, or just “Allow” for one-time access.
Enable Wireless Debugging (Android 11 and Above)
Starting with Android 11, Google added wireless debugging as an alternative to USB cables. This lets you run ADB commands over Wi-Fi, which is useful if your USB port is damaged, your cable is flaky, or you just prefer working untethered.
1. Make sure your phone and computer are on the same Wi-Fi network.
2. Go to Settings → System → Developer options.
3. Scroll to the Debugging section and toggle Wireless debugging to on. Confirm the prompt.
4. Tap on Wireless debugging to open its settings. You’ll see an IP address and port number.
5. On your computer, open a terminal and type: adb pair [IP]:[Port] using the pairing code shown on your phone. After pairing, connect with adb connect [IP]:[Port].
Wireless debugging disconnects when you leave the Wi-Fi network, which adds a natural layer of security. The connection also drops if the phone’s screen is off for an extended period, so you may need to reconnect during longer sessions.
Install ADB on Your Computer
Enabling USB debugging on your phone is only half the equation. Your computer needs ADB (Android Debug Bridge) installed to communicate with the phone. Here’s the quick setup for each operating system:
Windows: Download the SDK Platform Tools ZIP from Google. Extract it to a folder like C:\adb. Open Command Prompt, navigate to that folder, and run adb devices. If your phone shows up with a serial number, you’re connected. Windows may also need a USB driver for your specific phone — Google, Samsung, and other manufacturers provide these on their developer sites.
Mac: Install via Homebrew with brew install android-platform-tools, or download the Platform Tools ZIP from Google and extract it. Run ./adb devices from the extracted folder in Terminal.
Linux: Most distributions include ADB in their package manager. On Ubuntu/Debian: sudo apt install adb. On Fedora: sudo dnf install android-tools. On Arch: sudo pacman -S android-tools.
Verify the Connection
After installing ADB and enabling USB debugging, connect your phone with a USB cable and run this command in your terminal or command prompt:
adb devices
If everything is working, you’ll see output like this:
List of devices attached
XXXXXXXXX device
If it shows “unauthorized” instead of “device,” check your phone — there should be an authorization prompt waiting for you to approve. If it shows nothing at all, try a different USB cable (cheap cables often lack data pins), switch USB ports, or reinstall the phone’s USB driver.
Useful ADB Commands to Know
Once connected, here are the commands you’ll use most often:
adb devices— Lists all connected devices. Run this first to confirm the connection.adb install app.apk— Installs an APK file from your computer onto the phone.adb uninstall com.package.name— Removes an app by its package name.adb shell pm list packages— Lists every installed package. Add| grep keywordto search for specific apps.adb shell pm uninstall -k --user 0 com.package.name— Removes a system app (bloatware) for your user without needing root.adb push local_file /sdcard/— Copies a file from your computer to the phone.adb pull /sdcard/file local_folder— Copies a file from the phone to your computer.adb logcat— Streams real-time system logs. Press Ctrl+C to stop.adb reboot— Reboots the phone.adb reboot bootloader— Reboots into the bootloader for flashing firmware.
Is USB Debugging Safe?
USB debugging itself doesn’t make your phone less secure as long as you’re careful about two things: which computers you authorize, and where you plug in your phone.
When you connect to a new computer, Android shows an RSA key fingerprint and asks if you trust it. Only tap “Always allow” for computers you own. For a friend’s laptop or a work machine, tap “Allow” for one-time access. You can revoke all previously authorized computers by going to Developer Options and tapping Revoke USB debugging authorizations.
The real risk comes from public USB charging stations at airports, hotels, and coffee shops. An attack called “juice jacking” uses modified charging ports to access phones with USB debugging enabled. The risk is low but not zero. If you regularly use public chargers, keep USB debugging turned off when you don’t actively need it.
Bottom line: enable it when you need it, disable it when you’re done. There’s no benefit to leaving it on permanently unless you’re actively developing apps or running ADB tools daily.
Troubleshooting Common Problems
These are the issues that come up most frequently when setting up USB debugging for the first time:
“USB debugging” toggle is greyed out: This usually means your phone is connected in “Charging only” mode. Change the USB mode to “File transfer (MTP)” from the notification shade. On some phones, you need to disconnect the cable, change the default USB configuration in Developer Options to MTP, and reconnect.
Computer doesn’t detect the phone: Try a different cable. Many cheap or charge-only cables don’t support data transfer. If the cable works for file transfer but not ADB, you likely need to install the correct USB driver. Samsung users should install Samsung USB drivers. Pixel users can use the Google USB driver.
RSA authorization prompt doesn’t appear: Revoke all USB debugging authorizations in Developer Options, disconnect the cable, and reconnect. If the prompt still doesn’t show up, restart both your phone and your computer.
adb devices shows “unauthorized”: Your phone is connected but you haven’t approved the RSA prompt yet. Unlock your phone and look for the authorization dialog. If it’s not there, revoke authorizations and try again.
ADB command not found: You either haven’t installed Platform Tools, or the folder isn’t in your system’s PATH. On Windows, run the command from the folder where you extracted the tools, or add that folder to your PATH environment variable.
How to Disable USB Debugging and Developer Options
To turn off USB debugging, go back to Settings → System → Developer options and toggle USB debugging off. You can also disable the entire Developer Options menu by toggling the master switch at the top of the page. On Samsung phones, you can hide Developer Options completely by going to Settings → Apps → searching for “Settings” → Storage → Clear Data (this resets the Settings app, which re-hides Developer Options).
Disabling Developer Options doesn’t delete any data or undo any changes you made through ADB. It just hides the menu and turns off the developer toggles. You can always re-enable it by tapping Build Number seven times again.





Share Your Thoughts