GuidePublished: 5 min read

How to Enable USB Debugging on Android (Step by Step)

Turn on Developer options and USB debugging on Android, approve the RSA prompt, verify with adb devices, and fix the most common connection problems.

To enable USB debugging, first unlock Developer options by tapping Build number seven times in your phone's settings, then switch on USB debugging inside that menu. When you plug the phone into a computer, Android shows an authorization prompt; tap Allow and the computer can talk to the device over ADB. The whole process takes about a minute and works on every modern Android version.

What USB debugging does

USB debugging lets a computer talk to your phone through the Android Debug Bridge (ADB). With it you can install apps, read logs, copy files, take screenshots, open a shell and mirror the screen. It is off by default because it gives a connected computer a lot of control, so Android hides it behind Developer options and asks you to approve each computer.

Step 1: Unlock Developer options

On stock Android (Pixel and similar):

  1. Open Settings.
  2. Go to About phone (on some versions System > About phone).
  3. Find Build number and tap it seven times in a row.
  4. Enter your PIN, pattern or password if asked.
  5. A message such as "You are now a developer!" appears.

The Build number sometimes lives in a sub-page. On Samsung phones it is under About phone > Software information, and on Xiaomi devices you tap the MIUI version or OS version entry instead. Other manufacturers vary, so search the settings for "Build number" if you cannot find it.

Step 2: Turn on USB debugging

  1. Open Settings > System > Developer options. On some phones Developer options appears at the bottom of the main Settings list instead.
  2. Make sure the master switch at the top of the page is on.
  3. Scroll to the Debugging section and switch on USB debugging.
  4. Confirm the warning dialog.

Some manufacturers add extra switches. Xiaomi, for example, has a separate "USB debugging (Security settings)" option that you need for sending taps from a computer. Only enable what you actually need.

Step 3: Approve the computer

Connect the phone with a data-capable USB cable. A dialog titled Allow USB debugging? appears and shows the computer's RSA key fingerprint.

  • Tap Allow to approve this time only.
  • Tick Always allow from this computer to skip the prompt on future connections from the same computer.
  • Tap Cancel or Don't allow if you do not recognize the computer.

The fingerprint is a hash of a key pair stored on the computer. Android keeps a list of approved keys, which is how it recognizes a trusted computer later.

Note: If no dialog appears, unlock the screen, check that the USB mode is not "Charging only" (pull down the notification shade and choose File transfer or Android Auto if offered), and try a different cable. Many cables carry power only.

Step 4: Verify with adb devices

If you have the Android platform tools installed, check the connection from a terminal:

adb devices

A healthy result looks like this:

List of devices attached
R58M12ABCDE	device

The word after the serial number tells you the state:

StateMeaning
deviceConnected and authorized. Ready to use.
unauthorizedThe phone has not approved this computer yet. Unlock it and tap Allow.
offlineThe connection is stuck. Reconnect the cable or run adb kill-server.
(nothing listed)The phone is not detected. Check the cable, USB mode and drivers.

Step 5: Connect from your browser instead

You do not need to install platform tools to use USB debugging. ADBKit is a free browser workspace that talks to your phone over WebUSB, with no install and no account.

  1. Open the ADBKit workspace in Chrome or Edge on a desktop computer.
  2. Click Connect device.
  3. Choose your phone in the browser's USB window.
  4. Tap Allow on the phone when the debugging prompt appears.

Devices you have allowed before can reconnect automatically next time. Firefox and Safari do not support WebUSB, so use a Chromium-based browser. To understand how this works under the hood, see What is WebADB?.

Revoke USB debugging authorizations

If you ticked "Always allow" on a computer you no longer trust, you can clear the list:

  1. Open Settings > System > Developer options.
  2. Tap Revoke USB debugging authorizations.
  3. Confirm.

Every computer will have to be approved again the next time it connects. You can also switch USB debugging off entirely when you are not using it, which is a sensible habit on a phone you carry everywhere.

Common problems

  • The authorization dialog never shows up. Toggle USB debugging off and on, then reconnect. Make sure the screen is unlocked and that you are not on a charge-only cable.
  • The device shows as unauthorized. Revoke authorizations as described above, reconnect and accept the prompt again.
  • The device is not listed at all. Try another USB port or cable, and on Windows install your manufacturer's USB driver or the Google USB driver. macOS and Linux usually need nothing extra, although Linux may need udev rules.
  • "Device busy" or another program already uses the phone. Only one program can hold the USB connection at a time. Close Android Studio, scrcpy and any other ADBKit tabs, or run adb kill-server. The full walkthrough is in fixing ADB device busy or unauthorized errors.
  • The Developer options menu vanished. Some updates reset it. Tap Build number seven times again.

Next steps

Once the phone is connected, you can control and mirror it from your browser or learn the most useful commands in the ADB commands cheat sheet. Remember to turn USB debugging off, or revoke authorizations, if you hand your phone to someone else or plug it into a shared computer.