How to access ADB on a Locked (Password) Device

ADB requires USB Debugging to be enabled from Developer Options. However, if your phone is locked (due to forgotten passwords, screen lock restrictions, or missing options), you can still enable ADB using the following methods.

Notes:

  • Method 1 works best if your bootloader is unlocked.
  • Method 2 only works if USB Debugging was previously enabled.
  • Method 3 requires Fastboot access.

β€”

Method 1: Using Recovery Mode (For Unlocked Bootloaders)

If your device has TWRP Recovery or a stock recovery with ADB support, you can enable ADB without booting into the OS.

Steps:

  1. Power off your device.

  2. Boot into Recovery Mode:
    β€’ Most devices: Hold Power + Volume Down
    β€’ Samsung: Hold Power + Bixby + Volume Up
    β€’ Google Pixel: Hold Power + Volume Down

  3. If you have TWRP, tap Advanced > ADB Sideload

  4. Connect your device to a PC and open a command prompt/terminal.

  5. Run: adb devices. If your device appears, ADB is enabled.

  6. Use:

adb shell settings put global development_settings_enabled 1
adb shell settings put global adb_enabled 1

This manually enables ADB debugging.

  1. Reboot the device: adb reboot.

  2. Now, you can use full ADB commands!

β€”

Method 2: Using Safe Mode (If USB Debugging Was Previously Allowed)

If your device had USB Debugging enabled before it got locked, try Safe Mode:

  1. Power off your phone.
  2. Hold Power until the restart menu appears.
  3. Long-press Power Off, then tap Safe Mode.
  4. Connect your device to your PC.
  5. Run: adb devices
  6. If detected, unlock your device using: adb shell input keyevent 82

β€”

Method 3: Bypassing with a Debugging Bridge (For Certain Devices)

If your phone is locked but has OEM Debugging enabled, try the following:

  1. Boot into Fastboot Mode: adb reboot bootloader
  2. Use Fastboot to boot a temporary TWRP image: fastboot boot twrp.img
  3. From TWRP, enable ADB using: adb shell setprop persist.service.adb.enable 1
  4. Reboot: adb reboot

β€”

If these methods don’t work, factory reset may be the only option.

2 Likes