How To Enable USB Debugging Using ADB Command [Explained] 

how to enable usb debugging using adb command

Many people hunt for ways to use the ADB command to enable USB debugging when their phones break. You may use Adb to enable USB debugging and perform several tasks on your Android smartphone from your computer. However, to do this, your phone must have USB debugging enabled. So, the ADB commands will not operate if this feature is not enabled. Now the question is how to enable USB debugging using adb command.


To enable USB debugging via adb, you must activate a debug bridge to utilize ADB with your device. The process is this: Open Settings > about the device & locate the Build number.

build number

After that, to activate Developer Options, click seven times in the Build Number area. Enter the Developer settings by returning to the previous screen. Since USB debugging has been enabled, your device is ready to utilize ADB.

This article clarifies whether you can use adb to enable USB debugging and, if so, how to do it in detail.

See Also: Best Free & Paid Windows Password Recovery Tools

How To Enable USB Debugging On Android From A Computer

Does a computer have the ability to enable USB debugging? The obvious response is “no,” and this is justification. Although, everyone knows that to interact with an Android device, ADB needs the device’s permission. So, we can only allow the ADB daemon to manage our phone after enabling USB debugging & validating the computer’s RSA key fingerprint. Android enables USB debugging command line. However, this security feature prevents someone from manipulating our Android phone if we lose temporary ownership.

Regardless of whether USB debugging is turned on in the device settings, the ADB daemon cannot detect your device until the Apply upgrade from ADB option is activated within Android Recovery Mode.

The ADB shell commands, on the other hand, will result in the following error.

adb shell

PS C:\> adb shell

error: closed

PS C:\>

You can mount the Data and System partitions better using ADB instructions if you own a rooted Android phone with TWRP recovery installed.

Please be aware that USB debugging is not necessary for Fastboot to function. So, you might try booting through into Fastboot Mode on your device and

fastboot devices

fastboot oem unlock

fastboot oem unlock

The factory data reset will also occur when your phone’s bootloader is unlocked using the OEM unlock command.

Visit: TWRP

Enabling USB Debugging Using ADB Command

Let’s move on to the procedures for enabling USB debugging on phones with a cracked or damaged screen using ADB instructions. Follow these steps to learn how to enable USB debugging using adb command. Only Android devices having a bootloader that has been unlocked will be able to use the approach outlined below.

  1. Firstly, enter recovery mode on your Android device. recovery mode on your android device
  2. Secondly, extract the most recent SDK after downloading it.
  3. By selecting file> Launch Windows PowerShell within the folder window, you may open the “platform-tools” folder and start a command window. If system-wide ADB & Fastboot have been configured, you can open the command window out of any screen on your computer.
  4. Anyway, please enter the following command by entering it after typing it.
    1. adb devices command adb devices
  5. If you see the device ID in the command window as an alphanumeric value, it signifies that ADB can recognize your device in recovery mode.
  6. Press the Enter key after typing the adb shell. Mount the corresponding directories on your smartphone using the commands mount data & mount system. commands mount data & mount system
    1. adb shell
    2. $ mount data
    3. $ mount system
  7. It would help if you transferred the persist.sys.usbconfig file from your phone to your computer. Execute the next command to do that. Substitute your location for the one where you wish to save the extracted file. adb pull datapropertypersist.sys.USB.config 
    1. adb pull /data/property/persist.sys.USB.config 
    2. C:\Users\Technastic\Desktop\
  8. To transmit it back to your device, we are doing the adb push command now. With a text editor, open the persist.sys.USB.config file, change “mtp,adb” to “mtp,adb,” and then save the changes. adb push cuserstechnasticdesktoppersist.sys.usb.config dataproperty
    1. adb push “C:\Users\Technastic\Desktop/persist.sys.USB.config” /data/property
  9. Use a word processor like NotePad++ to add the following words to the build.prop file.
    1. adb pull /system/build.prop C:\Users\Technastic\Desktop\
  10. Include the next lines in the build.prop file by opening it in a text editor like NotePad++.
    1. persist.service.adb.enable=1
    2. persist.service.debuggable=1
    3. persist.sys.USB.config=mtp,adb
  11. Lastly, after making the modifications as mentioned earlier to build, save the file. Use the following command to prop it up and push it down to your phone. adb push cuserstechnasticdesktopbuild.prop system
    1. adb push “C:\Users\Technastic\Desktop/build.prop” /system/

So, If you carefully followed each step and ensured you didn’t miss anything, your device should now have USB debugging enabled. The next command will reboot your phone’s operating system.

adb reboot

The USB debugging feature will be enabled when your phone boots up, but there’s a catch! It is how to enable USB debugging using adb command. The next time you want to perform ADB commands, you’ll still need to enable USB debugging or confirm your phone’s RSA key fingerprint. Tap OK if you can see the RSA caution on your smartphone.

Also, When you connect to a secure wifi network, your Android device will save the password for that network, so if you have forgotten the password, you can easily retrieve it.

See Also: How To Unlock An iphone Without Password

Disable USB Debugging Using ADB Command

Any Android device, regardless of the maker, should be able to use this. It may not be feasible to enable USB debugging on it with a device with either a locked or damaged screen, but if it has already been enabled, you can quickly turn it off using an ADB command. I successfully tested it on the OnePlus 8, Redmi K20 Pro, Galaxy S20, & Samsung Galaxy Note 10 Plus.

  1. Launch the PowerShell window or the Command Prompt. Three options exist for doing it.
  2. Then, starting the adb shell, connect the device to the computer by performing the next command. settings put global adb_enabled 0
    1. Settings put global adb_enabled 0
  3. After that, visit Settings > Developers options to see if you should turn USB debugging off immediately.

Turn Off Developer Options Using ADB Command

Disabling the developer settings in android on a typical smartphone is extremely simple. There’s an ADB command available if you cannot access the device settings but still wish to turn it off.

  1. Open your computer’s command window.
  2. Then, utilize a USB cord to link your gadget to the PC. usb cord
  3. To disable the Developer options on an Android device, enter the adb shell, hit the Enter button, and send the following command. settings put global adb_enabled 0
    1. settings put global development_settings_enabled 0
  4. Developer features will be disabled on your Android smartphone as soon as you press the Enter button on the keyboard.

Go to device settings to see if you successfully disable Developer options using the ADB command.

As a result, using the ADB command to enable USB debugging is impossible, given that USB debugging makes it possible for ADB to communicate with Android devices. Because it saves your life in problematic situations, we suggest that people activate USB debugging and switch on their Android phone or tablet Developer settings. So, It is how to enable USB debugging using adb command.

See Also: How Do You Fix An Unresponsive Touch Screen


Can ADB enable USB debugging?

You need to enable USB debugging in the device's system settings, under Developer options, to utilize ADB with a device connected via USB.

How can I determine whether ADB has USB debugging enabled?

To enable USB debugging on the Android smartphone, open the settings and then hit Developer Settings to interact with an Android smartphone via adb. Check USB-Debugging under Developer options. The default configuration for the device's USB mode is Media device (MTP).

What are the ADB fastboot commands?

For any computer enthusiast or developer, understanding ADB fastboot commands is crucial. You may use it to root your smartphone, put APKs on it, and make a full backup of it. Additionally, it is a crucial step in unlocking your phone.


When a device is faulty or difficult to enable manually, we have provided you with the simplest method for turning on how to enable USB debugging using adb command. If your Android phone is broken and you cannot manually activate USB debugging on android with a black screen or broken display, the instructions in the previous guide should show you how to do it. Above all, we hope the tutorial makes accessing your smartphone’s data easier.

Recommended For You