How to Enable USB Debugging on Android and Connect with ADB
USB debugging lets a computer you trust work with your Android phone through ADB. Here is how to turn it on, approve the computer and fix ADB when it does not see your device.
Updated October 16, 2026
What USB debugging on Android does
Android Debug Bridge (ADB) is a command-line tool that lets a computer communicate with an Android device. As Android Developers explains, it has three parts: a client and a server that run on your computer, and a daemon that runs on the device. USB debugging is the phone setting that allows that connection.
Developers use ADB to install and test apps. Other people use it to copy files, read logs or run tools that depend on it, such as screen mirroring apps. Because it gives the connected computer deep access to the phone, treat it like a key: turn it on for the job, then turn it off.
What you need before you start
- A phone you can unlock. The approval prompt only appears on an unlocked screen.
- A USB cable that carries data. Some cables only charge, and they will never show a device.
- Your own computer with ADB installed. Google publishes it as SDK Platform-Tools for Windows, macOS and Linux, and Android Studio includes it too.
- On Windows, a USB driver for your phone. Android Developers lists OEM USB drivers by manufacturer, and Google devices use the Google USB Driver. macOS needs no extra driver; on Linux you may need to adjust USB permissions, as Android’s hardware device guide explains.
Step 1: Turn on Developer options
Android hides Developer options until you unlock them. The idea is the same on every phone, but the menu location varies by manufacturer and Android version, as the Android Developers guide to developer options notes.
- Open Settings and find Build number. On Google Pixel phones it is under About phone; on Samsung Galaxy phones it is under About phone › Software information. If you cannot find it, search Settings for “build number”.
- Tap Build number seven times. Enter your PIN, pattern or password if asked.
- Wait for the message saying you are now a developer.
- Go back. Developer options now appears in Settings: on Pixel phones under System, and on many other phones near the bottom of the main Settings list. Some phones use a slightly different name.
Step 2: How to enable USB debugging and approve your computer
- Open Developer options and make sure the main switch at the top is on.
- Turn on USB debugging and confirm the warning.
- Connect the phone to your computer with the data cable and unlock the screen.
- On the computer, open a terminal in the Platform-Tools folder and run
adb devices. - On the phone, a prompt asks whether to allow USB debugging and shows the computer’s RSA key fingerprint. Tap Allow.
- Run
adb devicesagain. Your phone should be listed with the statusdevice.
The prompt is a safety check. Android Developers explains that ADB commands cannot run until you unlock the phone and accept the computer’s key. Only tick Always allow from this computer on a computer you own and control.
Step 3: Pick the right USB mode
When you plug in a cable, Android usually shows a USB notification. Tap it to choose a mode such as File transfer, PTP or No data transfer; the exact options depend on the phone.
ADB works in the default mode on many phones. If adb devices stays empty, switch to File transfer and run the command again, because some phone and driver combinations only appear after a mode change. Developer options also has a USB configuration setting with similar choices; leave it at its default unless you are troubleshooting.
Wireless debugging on Android 11 and newer
Phones running Android 11 or newer can use ADB over Wi-Fi after a one-time pairing. Both devices must be on the same wireless network, and you need an up-to-date Platform-Tools.
- In Developer options, turn on Wireless debugging.
- Tap Pair device with pairing code and note the IP address, port and code.
- On the computer, run
adb pairfollowed by that address and port, for exampleadb pair 192.168.1.20:37000, and enter the code. - Once paired, the computer normally connects automatically on the same network. If it does not, run
adb connectwith the IP address and port shown on the main Wireless debugging screen, which is different from the pairing port.
Some office and public networks block the device discovery that wireless debugging relies on. If pairing keeps failing, try a home network or go back to USB. The Android Developers guide to running apps on a hardware device covers both setups.
ADB not detecting your device? A troubleshooting checklist
Run adb devices after each change so you know which step fixed the problem.
- Nothing is listed. Unlock the phone, check that USB debugging is still on, try a different data cable, and plug directly into the computer instead of a hub or dock. Then try another USB port.
- Windows still shows nothing. Open Device Manager while the phone is connected. If it appears under Other devices or with a warning icon, install your manufacturer’s USB driver, or the Google USB Driver for Google devices.
- The status says
unauthorized. The phone has not accepted this computer yet. Unlock it and look for the prompt. If none appears, tap Revoke USB debugging authorizations in Developer options (the name varies), turn USB debugging off and on, reconnect and try again. - The status says
offline. The device is not responding to ADB. Unplug and reconnect, restart the phone and update Platform-Tools. - ADB itself seems stuck. Run
adb kill-server, thenadb devicesto start it again. Close other programs that bundle their own copy of ADB, because two versions can interfere with each other. - Settings closes when you open Developer options. Another app with accessibility or device admin access may be involved. Review those lists in Settings, or restart in Safe mode, which temporarily turns off downloaded apps.
Keep USB debugging safe
- Only approve computers you own. Never accept the prompt on a public kiosk, a shared computer or an unfamiliar charging station.
- Leave Always allow from this computer unticked anywhere but your own computer.
- Turn USB debugging off when you finish. To hide everything again, switch off Developer options with the switch at the top of its screen.
- Revoke USB debugging authorizations before you sell, lend or send the phone for repair, and after you stop using an old computer.
- Change other developer settings only when you know what they do; some affect performance, battery life or how apps behave.
- Keep a screen lock on the phone. The approval prompt only protects you if a stranger cannot unlock the screen.
Where ASL ADB Assist fits
ASL ADB Assist is a free Android app that puts this walk in one place. One card shows your device model, Android version, and whether Developer options, USB debugging and its keep-awake override are on. It opens Developer options directly and guides you through the Build number taps, which no app is allowed to do for you.
It can keep the screen awake for up to 30 minutes while you connect, and when Settings keeps closing it opens the Accessibility and device admin screens and explains the Safe mode route. It requests no permissions, not even internet access, and needs Android 8 or newer. It cannot authorize ADB or change protected settings: Android still asks you to approve the computer yourself.
Frequently asked questions
Is it safe to leave USB debugging on?
It is safer to turn it off when you are done. While it is on, any computer you have approved can send ADB commands, and an accidental tap on a public charger could approve a new one. Turning it back on takes seconds.
Why does adb devices show my phone as unauthorized?
Your phone has not accepted the computer’s RSA key. Unlock the phone and tap Allow on the prompt. If no prompt appears, revoke USB debugging authorizations in Developer options, turn USB debugging off and on, and reconnect.
Why is ADB not detecting my device on Windows?
The usual causes are a charge-only cable, a missing USB driver, USB debugging being off or a locked screen. Try another cable and port, install your manufacturer’s driver, then run adb kill-server and adb devices again.
Does turning on USB debugging erase my data?
No. Turning on Developer options and USB debugging does not erase anything. Unlocking the bootloader is a separate, advanced step that typically wipes the phone, so do not confuse the two.
Can I use wireless debugging instead of a cable?
Yes, on Android 11 and newer, after a one-time pairing on the same Wi-Fi network. You still need a computer with ADB, and the same security advice applies: approve only your own computer and turn it off when you finish.
Related guides
- What Is an APK File? APK Meaning, Contents and Safety
- How to Read Android APK Permissions and Findings