How to Enable USB Debugging on a Locked Android Phone

USB debugging usually cannot be switched on from a locked Android phone if it was never enabled before. The real options depend on the device state: regain normal access first, use an already authorized ADB connection, control a working display with an OTG mouse when touch is broken, or choose another recovery path when the screen cannot be operated.

Author Avatar Roger Smith Last Updated: Aug. 26, 2026

If an Android phone is locked and USB debugging was never enabled before, a computer normally cannot use ADB to switch it on from the lock screen. USB debugging is controlled from Android Developer Options, and an ADB connection over USB normally depends on debugging already being enabled and the computer being authorized.

That makes the condition of the phone more important than the number of “USB debugging bypass” methods you find online. A phone you can still unlock, a phone that already trusted your computer, a phone with broken touch but a working display, and a phone with a completely black screen need different solutions.

This guide separates those cases so you can avoid circular ADB instructions, Recovery Mode commands that do not actually enable normal Android USB debugging, and unlock methods that may erase the data you were trying to recover.

Quick Answer: Can You Enable USB Debugging on a Locked Phone?

In most cases, you cannot newly enable USB debugging from a locked Android phone unless you can regain access to Android Settings. A previously enabled and already authorized ADB connection is a different case.

Phone State Can USB Debugging Work? Correct Route
You know the PIN, password, or pattern Yes Unlock the phone, open Developer Options, and enable USB debugging normally.
You forgot the screen lock and debugging was never enabled Not directly Regain normal phone access first.
USB debugging was already enabled and this computer was previously authorized Possibly Connect the phone and check its ADB status with adb devices.
USB debugging was enabled but this computer was never authorized Usually blocked The phone normally needs to be unlocked so you can approve the computer’s debugging authorization.
The touch screen is broken, but the display works and you know the lock credential Possibly If the phone supports USB OTG, use a mouse to unlock it and navigate to Developer Options.
The display is black or unusable Usually no manual Settings route Do not assume ADB or an OTG mouse can solve it; choose a repair or recovery route based on your data goal.
You can only reach stock Recovery Mode Usually no Recovery ADB/sideload is not the same as enabling USB debugging inside normal Android.

If the real blocker is a forgotten PIN, pattern, password, fingerprint, or face lock, the Android phone unlocking software guide compares screen-lock options and their data-loss considerations.

What USB Debugging Actually Does

USB debugging is an Android Developer Options feature that allows an authorized computer to communicate with the phone through Android Debug Bridge, or ADB. Developers and advanced users may use ADB for device logs, app testing, file operations that Android permits, troubleshooting, and other development tasks.

Enabling USB debugging does not automatically give a computer unrestricted access to everything stored on the phone. What ADB can access depends on Android permissions, the device state, app sandboxing, encryption, and whether elevated privileges such as root access exist.

Android also separates two important steps:

  • USB debugging must be enabled on the phone.
  • The computer may also need to be authorized by the phone. On normal Android builds, the first USB-debugging connection to a new computer can display an RSA authorization prompt on the device.

This is why many online instructions become circular: if a locked phone has never enabled USB debugging and never authorized the computer, adb shell is not a shortcut around those prerequisites.

Method 1. Regain Access First, Then Turn On USB Debugging

This is the normal route when USB debugging was not enabled before the phone was locked. The goal is to regain Android access first; USB debugging comes afterward.

If You Still Know the Lock Credential

Step 1. Unlock the phone normally with the PIN, pattern, or password.

Step 2. Open Settings and locate About phone or the equivalent device-information menu.

Step 3. Find Build number and tap it repeatedly until Android confirms that Developer Options are enabled. The exact menu path varies by manufacturer.

Step 4. Return to Settings and open Developer options.

Step 5. Turn on USB debugging.

Enable USB debugging in Android Developer Options

After regaining Android access, enable USB debugging from Developer Options.

What About “Forgot Password” or “Forgot Pattern”?

Some older Android devices provided a Forgot password or Forgot pattern option after repeated failed attempts. If your phone genuinely shows an official recovery option on the lock screen, follow the instructions presented by the device and regain normal access before opening Developer Options.

Older Android lock-screen recovery option

An older Android device may expose a lock-screen recovery option, but this interface is not available on every current phone.

Do not assume every modern Android phone will display the same Google-account-based “Forgot password” flow shown in an older tutorial. If that option is absent, the method ends there.

Important: A factory reset may remove the local screen lock but can erase user data and may trigger Google account verification afterward. If preserving local data is the reason you want USB debugging, review the data impact before choosing a reset-based unlock route.

Method 2. ADB Works Only If Debugging Was Already Enabled

ADB is useful on a locked phone only when the required debugging relationship already existed before the lockout. It is not a general command-line method for turning USB debugging on from scratch.

This route is worth checking when:

  • USB debugging was enabled before the phone became locked;
  • you previously connected this phone to the same computer for ADB;
  • the computer had already been authorized by the phone; and
  • the phone can still maintain a USB connection.

Check the Existing ADB Connection

Step 1. Install or open the Android SDK Platform Tools on the previously trusted computer.

Step 2. Connect the locked phone using a data-capable USB cable.

Step 3. Open Command Prompt or Terminal inside the Platform Tools directory.

Step 4. Run:

adb devices

Then read the result instead of immediately trying more shell commands.

ADB Result What It Means Next Step
device The computer currently has a usable ADB connection. You can use the ADB functions allowed by the current device state and Android permissions.
unauthorized The computer has not been approved for debugging. You normally need access to the phone screen to accept the authorization prompt.
offline ADB sees a connection but cannot establish a usable session. Reconnect the device, restart ADB, and check the USB connection.
No device listed ADB has no usable connection to the phone. Check whether debugging was ever enabled, then inspect the cable, USB port, driver, and device state.

If the result is unauthorized, there is no useful benefit in running commands intended for an already authorized adb shell session. Solve the authorization/access problem first.

Method 3. Recovery Mode: Why It Usually Cannot Enable USB Debugging

Recovery Mode is frequently presented online as a workaround for locked-phone USB debugging, but stock Android recovery and normal Android Developer Options are different environments.

A recovery screen may provide options such as Apply update from ADB. That function is intended for recovery/sideload operations; it should not be treated as proof that normal Android USB debugging has been enabled.

Recovery Feature What It Can Mean What It Does Not Prove
Apply update from ADB Recovery can accept a supported sideload operation. It does not mean the normal Android system has USB debugging enabled.
adb devices sees a recovery/sideload device The recovery environment exposes an ADB-related interface. It does not give you the same authenticated Android adb shell used after enabling Developer Options.
Custom/service recovery exposes extra functions A non-stock environment may behave differently. Those functions should not be generalized to every Android phone.

For a standard locked Android phone, do not expect Recovery Mode to launch the normal Settings app so you can toggle Developer Options. If your only access is stock recovery, choose the next step according to your actual goal: regain Android access, repair the device, or recover data without relying on normal USB debugging.

Method 4. If Screen Lock Is the Blocker: Regain Access with DroidKit

If USB debugging itself is not the real problem—the real problem is that a forgotten PIN, pattern, password, fingerprint, or face lock prevents you from opening Settings—screen-lock recovery becomes the prerequisite.

DroidKit Android Phone Unlocker provides a computer-based screen-unlock workflow for supported Android device situations. It does not directly flip the USB-debugging switch while Android remains inaccessible. The sequence is: resolve the screen lock first, then enable USB debugging manually after you can use Android again.

Data-loss warning: Screen-lock removal can erase data depending on the device and workflow. If your main goal is recovering files from the locked phone, check the current device instructions and data impact before starting an unlock/reset process.

Regain Android Access with DroidKit

Step 1. Install DroidKit on the computer and choose Screen Unlocker.

Choose Screen Unlocker in DroidKit
Choose Screen Unlocker.

Step 2. Connect the locked phone using a data-capable USB cable and start the applicable screen-unlock workflow.

Connect the locked Android phone to DroidKit
Connect the locked Android phone.

Step 3. When the required configuration is prepared, continue with Remove Now.

Click Remove Now in DroidKit Screen Unlocker

Continue with Remove Now.

Step 4. Select the device brand requested by the software and follow the instructions shown for that workflow.

Choose the device brand in DroidKit

Choose the device route requested by the screen-unlock workflow.

Step 5. Wait for the applicable screen-lock removal process to finish.

DroidKit Screen Lock Removal completed

Screen Lock Removal completed.

Step 6. After normal Android access is restored and device setup is complete, open Settings and enable Developer Options and USB debugging manually if you still need ADB.

Method 5. ADB Troubleshooting: Device, Unauthorized, Offline or Missing

The Android SDK Platform Tools do not create a second method for bypassing USB-debugging prerequisites. They provide the ADB program used to diagnose the connection described in Method 2.

Download Platform Tools from the official Android developer source, then use the result of adb devices to identify the actual failure layer.

ADB Shows “Unauthorized”

This means the debugging relationship with the computer has not been approved. If the phone displays an authorization dialog behind the lock screen, you generally need to regain device access before you can approve it.

ADB Shows “Offline”

Reconnect the USB cable, try another direct USB port, and restart the ADB server:

adb kill-server

adb start-server

adb devices

An offline state is different from a phone on which USB debugging was never enabled.

ADB Shows No Device

Check these items in order:

  • Was USB debugging enabled before the phone became locked?
  • Was this exact computer previously authorized?
  • Is the cable capable of data transfer?
  • Does Windows/macOS/Linux detect the phone at the USB level?
  • Does the device require an OEM-specific USB driver?
  • Has the phone restarted since the last trusted ADB session?

If debugging was never enabled, reinstalling Platform Tools does not change that phone-side setting.

ADB Shows “Device” but a Command Is Denied

A valid ADB connection does not mean every command has unrestricted privileges. Android permissions, encryption, app sandboxing, OEM restrictions, and root status can still limit what the computer is allowed to do.

Method 6. Broken Touch Screen: Use USB OTG and a Mouse

An OTG mouse can be useful when the display still works but touch input is broken. This method is much less useful when the screen is black or when you do not know the phone’s lock credential.

For additional touchscreen diagnosis, see the Android touch screen not working guide.

Before Trying an OTG Mouse

This route needs several things to be true:

  • the display must show enough of Android to navigate;
  • the phone must support USB host/OTG operation;
  • you need a compatible OTG adapter and USB mouse;
  • you normally still need the PIN, password, or pattern to unlock Android; and
  • the phone must be usable enough to reach Settings afterward.

Use the Mouse to Reach Developer Options

Step 1. Connect the USB mouse through the appropriate OTG adapter.

Step 2. Confirm that a pointer appears and the mouse can navigate the lock screen.

Step 3. Enter the known PIN, pattern, or password using the mouse.

Step 4. Open Settings > About phone and locate Build number.

Step 5. Tap Build number repeatedly until Developer Options are enabled.

Step 6. Return to Developer Options and turn on USB debugging.

Step 7. When you later connect the phone to a computer for ADB, approve the debugging authorization on the device if Android asks for it.

OTG limitation: A mouse replaces broken touch input; it does not replace a forgotten screen credential. If you cannot authenticate at the lock screen, the pointer alone does not give you access to Developer Options.

What If the Phone Screen Is Completely Black?

A black-screen case should not be treated as the same problem as broken touch. If you cannot see the lock screen, an OTG mouse may give you no practical way to navigate Android or approve an ADB authorization prompt.

Your next decision depends on the goal:

Your Goal What to Consider
You need the phone working again Diagnose or repair the display/system problem before focusing on USB debugging.
You need local files and have no backup Avoid reset-based screen-unlock methods until you understand their data impact.
USB debugging and this computer were already trusted Check adb devices; an existing authorized session may still be useful.
USB debugging was never enabled Do not expect ADB to switch it on invisibly from the computer.

FAQs About USB Debugging on a Locked Phone

Can I enable USB debugging when my Android phone is locked?

Usually not if USB debugging was never enabled before. The normal path is to regain Android access and turn it on from Developer Options. An exception is when an already enabled and previously authorized ADB connection is still available.

Can ADB turn on USB debugging if it was never enabled?

Do not rely on that as a general locked-phone method. A normal USB ADB shell already depends on phone-side debugging access and computer authorization. If adb devices shows nothing or shows unauthorized, commands written for an existing shell session do not bypass those prerequisites.

What does “unauthorized” mean in adb devices?

It means the computer has not been approved for USB debugging on that Android device. The phone normally needs to display and accept an RSA authorization prompt before the computer receives normal ADB access.

Can Recovery Mode enable USB debugging?

Stock Recovery Mode usually cannot turn on the normal USB-debugging switch inside Android Developer Options. An “Apply update from ADB” option provides a recovery/sideload interface, which is not the same as an authorized Android debugging session.

Can I use an OTG mouse if my screen is locked?

Yes when the display works, the phone supports OTG, and you still know the screen credential. The mouse can replace failed touch input so you can unlock Android and navigate to Developer Options. It does not bypass a forgotten PIN or password.

What if USB debugging was already enabled before I forgot the password?

Connect the phone to the computer you previously used and run adb devices. If it shows device, the old authorization may still be usable. If it shows unauthorized or no device, you need to resolve that state before relying on ADB.

Will DroidKit directly enable USB debugging on the locked screen?

No. Its relevance here is screen-lock recovery: if the lock screen is what prevents access to Settings, an applicable unlock workflow can help restore access. USB debugging is then enabled manually from Android Developer Options.

Will removing the screen lock erase my data?

It can. Data impact depends on the phone and the applicable unlock workflow. If preserving local files is your reason for trying to enable USB debugging, review the data-loss warning before starting a reset- or removal-based method.

Does USB debugging let a computer read everything on my phone?

No. USB debugging enables authorized ADB communication, but Android permissions, encryption, app sandboxing, device state, and privilege level still determine what the computer can access.

What happens if a factory reset causes Google verification?

That is a different problem from the original screen lock. After a reset, Android may require the previously synced Google account through Factory Reset Protection. Do not expect newly enabled USB debugging to replace that account-verification requirement.

The Lock State Decides Whether USB Debugging Is Reachable

For a locked Android phone, the most important question is whether USB debugging and computer authorization existed before the lockout. If they did, adb devices can tell you whether the old connection is still usable. If they did not, ADB cannot be treated as a computer-side switch for Developer Options.

A broken touchscreen is a different case: when the display works and you know the PIN, an OTG mouse may let you navigate Settings normally. Stock Recovery Mode is different again—it can expose recovery-specific ADB or sideload functions without turning on normal Android USB debugging.

If the screen lock itself prevents every Settings-based route, decide whether regaining access is worth the possible data impact before using a screen-unlock workflow. That decision matters more than adding another command to a phone that never authorized ADB in the first place.

Author Avatar
Roger Smith Twitter Share Facebook Share

Roger Smith is a senior technical writer with years of experience in providing Android solutions. He loves to help users solve various problems such as Android unlock, Android data recovery, and Android system repair.

Back to Top Icon