sodcalculator

10 Tech How-To

Enable USB Debugging on a Locked Phone

Guide 10-8854 · Updated · Step by step

If your phone is locked and you need to enable USB debugging—perhaps to recover data, bypass a forgotten pattern, or run ADB commands—you can do it without unlocking the screen. This guide walks you through the process using recovery mode or manufacturer tools, depending on your device. You’ll need a computer with the appropriate software installed and a USB cable.

What You’ll Need

  • A Windows, Mac, or Linux computer
  • A USB cable compatible with your phone
  • ADB and Fastboot tools installed on your computer (download from the official Android developer site)
  • For Samsung devices: Odin software (Windows) or Heimdall (Mac/Linux)
  • For Google Pixel devices: the latest USB drivers
  • Your phone’s model number (found on the back or in the original box)

Step-by-Step

  1. Install ADB and Fastboot on your computer. Download the platform-tools zip from the Android developer website, extract it to a folder like C:\adb, and add that folder to your system’s PATH or note its location for later.
  2. Put your phone into recovery mode. Power off the phone. Then press and hold the specific key combination for your device:
    • Samsung: Volume Up + Power (or Volume Up + Bixby + Power on older models)
    • Google Pixel: Volume Down + Power
    • OnePlus: Volume Down + Power
    • Most other Android phones: Volume Down + Power, or Volume Up + Power

    Release the buttons when the recovery menu appears.

  3. Navigate to the “Advanced” or “Mount” option. Use the volume keys to scroll and the power button to select. Look for “Mount” or “Advanced” and select it.
  4. Enable USB debugging from recovery. In the “Mount” menu, check the box next to “USB debugging” or “Enable ADB.” This is not available on all devices—if you don’t see it, proceed to the next step.
  5. If recovery doesn’t have the option, use Fastboot. From the recovery menu, select “Reboot to Bootloader” or “Fastboot” (the exact wording varies). Your phone will enter fastboot mode, showing a green Android robot.
  6. Connect your phone to the computer. Plug in the USB cable. On the computer, open a command prompt or terminal in the folder where ADB is installed.
  7. Verify the connection. Type fastboot devices and press Enter. You should see your device’s serial number followed by “fastboot.” If not, install the correct USB drivers.
  8. Enable USB debugging via fastboot command. Type fastboot oem enable-adb and press Enter. This command is supported on many devices, especially older ones. If it returns an error, try fastboot oem unlock (note: this may wipe your data) or fastboot flashing unlock on newer Pixels.
  9. Reboot the phone. Type fastboot reboot and press Enter. The phone will restart normally. Once it boots, USB debugging should be active, even though the screen is locked.
  10. Test with ADB. After reboot, connect the phone to the computer again. In the command prompt, type adb devices. If you see “unauthorized” or “offline,” check the phone’s screen—you may need to accept the RSA key prompt, but if the screen is locked, this might not appear. If you see “device,” USB debugging is successfully enabled.

Common Mistakes

  • Using the wrong key combination to enter recovery. Check your specific model online; a wrong combo may boot to a factory reset instead.
  • Not installing USB drivers. Without proper drivers, the computer won’t recognize your phone, and fastboot commands will fail.
  • Assuming every phone has the “enable-adb” fastboot command. Many modern devices have removed this for security. If it fails, you’ll need another method (see Troubleshooting).
  • Forgetting to unlock the bootloader. Some fastboot commands require an unlocked bootloader, which typically wipes data. If your bootloader is locked, you may not be able to enable ADB this way.

Tips

  • Before attempting any of this, back up your data if possible—especially if you plan to unlock the bootloader, as it erases everything.
  • Use the original USB cable or a high-quality one; cheap cables can cause connection drops.
  • If your phone has a removable battery, take it out for a few seconds before entering recovery to ensure a clean state.
  • On Samsung devices, you can enable USB debugging via Odin by flashing a custom recovery like TWRP, but this is advanced and may void warranty.
  • If you’re trying to recover data, consider using manufacturer-specific tools like Samsung Smart Switch or Google’s Find My Device, which may work without USB debugging.

Troubleshooting

  • “fastboot devices” shows nothing. Install the correct USB drivers for your phone model. On Windows, use Device Manager to update the driver manually. On Mac/Linux, try a different USB port or cable.
  • “fastboot oem enable-adb” returns an error. Your device may not support this command. Try fastboot oem unlock (be aware of data loss) or fastboot flashing unlock on Pixels. If neither works, your phone’s bootloader may be locked and require an official unlock code from the manufacturer.
  • ADB shows “unauthorized” after reboot. This usually means the phone’s screen is locked and you can’t accept the RSA prompt. Some devices allow you to dismiss the prompt by pressing the volume keys, but if not, you may need to use a tool like “ADB Keyboard” or “Android Debug Bridge Auto Authorize” (requires root).
  • The phone boots into recovery but there’s no “Mount” option. Some recovery modes are minimal. Try selecting “Apply update from ADB”—this often enables ADB temporarily, but you’ll need to sideload a zip that enables debugging.
  • All fastboot commands fail with “FAILED (remote: unknown command)”. This means your bootloader doesn’t support these commands. Your only option may be to use manufacturer-specific software (e.g., Samsung’s Odin) or take the phone to a service center.

Frequently Asked Questions

Q: Will enabling USB debugging on a locked phone void my warranty?
A: It depends on the manufacturer. Unlocking the bootloader usually voids the warranty, but just enabling USB debugging via recovery may not. Check your warranty terms.

Q: Can I enable USB debugging without a computer?
A: No, you need a computer to run ADB/fastboot commands. However, some phones have a hidden menu accessible from the dialer that can enable it, but that requires the screen to be unlocked.

Q: Will this erase my data?
A: The steps in this guide generally don’t erase data, except for the fastboot oem unlock command, which wipes everything. Always back up before attempting that.

Q: My phone is a Samsung. Can I use this method?
A: Samsung phones have a different bootloader interface. You’ll need Odin to flash a custom recovery, which then allows you to enable ADB. This is more complex and may trigger Knox security.

Q: I see “device unauthorized” in ADB. What now?
A: This means your phone hasn’t accepted the computer’s RSA key. If the screen is locked, you can’t tap “Allow.” Try using the volume keys to navigate to “Allow” and press the power button—some devices allow this.

Q: Is there any way to bypass the lock screen to enable USB debugging?
A: Bypassing the lock screen is a security feature, and circumventing it may be illegal if you don’t own the phone. This guide only enables USB debugging, not screen unlock. For legitimate recovery, contact your carrier or manufacturer.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →