USB debugging is the Android feature that lets a computer talk to your phone or tablet through the Android Debug Bridge (ADB). Developers use it to install and test apps, but ordinary users rely on it too. It is needed to back up data, remove bloatware, capture screenshots and screen recordings, sideload apps, recover data from a device with a broken screen, and run advanced diagnostics.
Normally you switch it on by hand: open Settings, tap Build number seven times to unlock Developer options, then toggle USB debugging. But what if you want to do it from your PC? Maybe your touchscreen is unresponsive, you are setting up many devices, or you are automating a workflow.
Here is the catch: ADB can only control a device that already allows ADB connections. Android blocks ADB by default so that someone who plugs your phone into a computer cannot take control of it. In practice, “enabling USB debugging from a PC” means one of four things:
- Using ADB over an existing connection (for example, Wi-Fi debugging that is already on) to turn USB debugging on permanently.
- Using ADB commands to drive the Settings screens when the touchscreen is dead.
- Using ADB in recovery mode on a rooted or custom-recovery device to change the debugging setting.
- Setting up and verifying the connection from the PC side so it works as soon as the toggle is on.
This guide walks through each method, with the exact commands, requirements, and limitations. It does not promise a way to bypass your phone’s security. No legitimate method does that.
Before You Start: Set Up ADB on Your PC
Every method below needs ADB installed on your computer.
Step 1: Download Platform Tools. Get Google’s official SDK Platform-Tools package for Windows, macOS, or Linux from the Android Developers website. It is a small ZIP file with adb and fastboot and no installer.
Step 2: Extract the ZIP to an easy-to-reach folder, such as C:\platform-tools on Windows or ~/platform-tools on macOS and Linux.
Step 3: Open a terminal in that folder.
- Windows: open the folder, click the address bar, type
cmd, and press Enter. (PowerShell works too, but prefix commands with.\, as in.\adb devices.) - macOS/Linux: open Terminal and run
cd ~/platform-tools.
Step 4: Install the right drivers (Windows). Windows often needs the manufacturer’s USB driver (Samsung, Xiaomi, Huawei, and so on) or Google’s USB driver for Pixel devices. macOS and Linux generally work without extra drivers, though some Linux systems need udev rules.
Step 5: Check that ADB runs:
adb version
You should see a version number. If you get “command not found,” you are in the wrong folder or have not added platform-tools to your PATH.
Step 6: Use a good cable. Many cables only charge. Use a data-capable cable and set the phone’s USB mode to File transfer (MTP) when prompted.
Method 1: The Standard Route, Then Verify with ADB
Strictly speaking, the first activation happens on the phone, but the PC verifies and completes the setup. This is the most reliable method and the baseline for the others.
On the phone:
- Go to Settings > About phone.
- Tap Build number seven times (on some brands it is under Software information). Enter your PIN if asked.
- Go back to Settings > System > Developer options (the location varies by brand).
- Turn on USB debugging.
On the PC:
Connect the phone and run:
adb devices
A pop-up on the phone asks, “Allow USB debugging?” and shows your computer’s RSA fingerprint. Tick Always allow from this computer and tap Allow.
Run adb devices again. A healthy result looks like this:
List of devices attached
R58M12ABCDE device
What the status means:
- device: connected and authorized.
- unauthorized: the phone is waiting for you to accept the prompt. Unlock the screen and check for the dialog.
- offline: a driver, cable, or ADB version problem. Restart the server (see troubleshooting below).
- No entry at all: USB debugging is off, the cable is charge-only, or the driver is missing.
Method 2: Enable USB Debugging Using an ADB Shell Command
If you already have an ADB connection but USB debugging keeps turning itself off, for example after a reboot or on a device that was set up using wireless debugging, you can switch it on with a single settings command. This is also useful for provisioning and scripting.
Run:
adb shell settings put global adb_enabled 1
To make sure Developer options itself is unlocked:
adb shell settings put global development_settings_enabled 1
To confirm the value:
adb shell settings get global adb_enabled
An output of 1 means enabled and 0 means disabled.
To restart the ADB daemon on the device and refresh the connection:
adb kill-server
adb start-server
adb devices
Important limitations:
- This only works if ADB can already reach the device (over Wi-Fi, an earlier authorization, or a similar route). You cannot run it on a phone where ADB is completely locked out.
- Some manufacturers restrict the
settingscommand, and some OEM skins re-disable debugging automatically after a timeout. On Android 14 and newer there is an option called Disable adb authorization timeout in Developer options that stops authorizations from expiring after seven days. - Never expect this to work on a locked-down device you do not own. That is the intended security boundary.
Method 3: Use Wireless Debugging as a Bridge (Android 11+)
Android 11 and later include Wireless debugging, which lets ADB connect over Wi-Fi without a cable. Once connected, you can use Method 2’s command to turn on USB debugging as well. This helps if the USB port is damaged or the cable connection is unreliable.
On the phone:
- Enable Developer options (see Method 1).
- Turn on Wireless debugging and connect to the same Wi-Fi network as your PC.
- Tap Wireless debugging > Pair device with pairing code. Note the IP address, port, and six-digit pairing code.
On the PC:
adb pair 192.168.1.50:37215
Enter the pairing code when asked, then connect using the IP and port shown on the main Wireless debugging screen (this port differs from the pairing port):
adb connect 192.168.1.50:41234
Verify with adb devices, then enable USB debugging:
adb shell settings put global adb_enabled 1
Older devices (Android 10 and below) can use the classic method: connect once over USB with debugging on, then run:
adb tcpip 5555
adb connect 192.168.1.50:5555
This does not enable debugging from nothing. It extends access you already granted, but it is handy when you need to unplug the cable.
Method 4: Enable It with a Broken or Unresponsive Screen
This is the most common real-world reason people search for this topic. The situation matters:
If debugging was already enabled and authorized on that PC, ADB can still control the phone, and you can use it to navigate:
Open the Developer options screen directly:
adb shell am start -a android.settings.APPLICATION_DEVELOPMENT_SETTINGS
Open the About phone screen:
adb shell am start -a android.settings.DEVICE_INFO_SETTINGS
Simulate taps, swipes, and key presses:
adb shell input tap 540 1200
adb shell input swipe 500 1600 500 400
adb shell input keyevent 3
Here keyevent 3 is Home, 4 is Back, and 26 is Power. To unlock a phone whose screen is on but unresponsive, you can send:
adb shell input keyevent 82
adb shell input text 1234
adb shell input keyevent 66
(Replace 1234 with your PIN. Coordinates depend on screen resolution; adb shell wm size shows yours.)
If debugging was never enabled, ADB cannot help. Instead:
- Connect a USB mouse through an OTG adapter, and use the cursor to unlock the phone and toggle the setting manually.
- Use screen mirroring or casting tools built into some manufacturers’ software (such as Samsung’s Smart Switch or Huawei’s HiSuite), which work without ADB.
- Contact the manufacturer or an authorized repair center, who can often recover data legitimately.
Method 5: Enable It from Recovery Mode (Advanced, Rooted or Custom Recovery)
If your device has a custom recovery such as TWRP, ADB usually works in recovery mode even when USB debugging is off in Android itself. From there you can change the persistent setting.
Warning: This modifies system or data partitions. Back up first, and only do this on a device you own. It can cause boot problems if done incorrectly, and it generally does not work on stock recoveries or on encrypted data partitions you cannot decrypt.
- Boot into recovery (usually by holding Power + Volume Up/Down while powering on).
- Connect to the PC and check:
adb devices
It should show your device with status recovery.
3. Open a shell and mount the data partition:
adb shell
mount /data
- Modify the USB configuration property. On many devices this is stored in
/data/property/persist.sys.usb.config:
echo "mtp,adb" > /data/property/persist.sys.usb.config
- Exit and reboot:
exit
adb reboot
On some devices, adb_enabled lives in the settings database instead, and editing it requires sqlite3. Because this varies by Android version and manufacturer, check guidance for your specific model first. Encrypted devices (almost all modern phones) often cannot be edited this way without the lock-screen credentials.
Troubleshooting Common Problems
Device not listed in adb devices:
- Try a different cable and port, preferably directly on the PC rather than a hub.
- Change the USB mode to File transfer.
- Reinstall the manufacturer’s driver on Windows.
- Make sure USB debugging is actually on.
“Unauthorized” status:
- Unlock the phone and look for the RSA prompt.
- Go to Developer options > Revoke USB debugging authorizations, unplug and reconnect, then accept again.
“Offline” status:
- Run
adb kill-serverthenadb start-server. - Update platform-tools to the latest version.
- Toggle USB debugging off and on.
“adb: command not found” or “‘adb’ is not recognized”:
- Run the command from the platform-tools folder, or add the folder to your system PATH.
Debugging switches itself off:
- Some manufacturers disable it on reboot or after a period of inactivity. Look for “Disable adb authorization timeout,” and check battery optimization or security apps that might be resetting settings.
Security Tips
USB debugging gives a connected computer deep control over your phone, so treat it carefully:
- Only authorize computers you trust.
- Turn USB debugging off when you are done, especially before charging at public USB ports.
- Revoke old authorizations periodically.
- Do not enable wireless debugging on public Wi-Fi networks.
- Keep your phone’s lock screen secured with a PIN, pattern, or biometric.
Conclusion
“Enabling USB debugging from a PC using ADB” is slightly misleading, because Android is designed so that ADB access must first be granted on the device itself. The most reliable path is still the standard one: unlock Developer options, toggle USB debugging, and approve your computer’s RSA key. After that, ADB can do plenty from the PC side.
A single command like adb shell settings put global adb_enabled 1 can re-enable debugging, wireless pairing can replace a faulty cable, and input commands can navigate a phone whose screen no longer responds, as long as an earlier authorization exists. For deeper recovery scenarios, custom recovery environments can sometimes change the persistent setting, but they are model-specific, risky, and often blocked by encryption.
If you are locked out entirely, the safest answers are physical: an OTG mouse, the manufacturer’s recovery tools, or an authorized repair center. Whichever method you use, remember to disable debugging when you no longer need it.
Frequently Asked Questions (FAQ)
1. Can I enable USB debugging on my phone using ADB if it is currently disabled?
Generally, no. ADB needs debugging to be active, or an earlier authorized connection, before it can send any command. The exceptions are recovery-mode methods on rooted or custom-recovery devices, which are device-specific and carry risk. For most people, the practical route is enabling it in Developer options or using an OTG mouse if the screen is damaged.
2. What is the ADB command to turn on USB debugging?
If you already have an ADB connection, use:
adb shell settings put global adb_enabled 1
Check the result with adb shell settings get global adb_enabled, where 1 means enabled. You may also need adb shell settings put global development_settings_enabled 1 to ensure Developer options is unlocked.
3. Why does adb devices show “unauthorized” or nothing at all?
“Unauthorized” means the phone has not accepted your computer’s RSA key. Unlock the phone, check for the Allow USB debugging? pop-up, and approve it. If nothing appears, revoke authorizations in Developer options and reconnect. An empty list usually means a charge-only cable, a missing driver, the wrong USB mode, or debugging being off.
4. Is it safe to leave USB debugging enabled all the time?
It is not recommended. With debugging on, a trusted computer can install apps, access data, and run shell commands. If you plug into untrusted computers or public charging stations, or if your phone is lost or stolen without a strong lock screen, the risk increases. Turn it on when needed, revoke authorizations regularly, and switch it off afterward.


