Quick Answer: How to Enable USB Debugging Using ADB Command
ADB lets you perform many actions on your Android device right from your computer. However, this requires an option called USB debugging enabled on your phone. If this option is not enabled, the ADB commands will not work. Many users who get their phones broken usually look for methods for how to enable USB debugging using ADB command.
This guide sheds light on if you can enable USB debugging with ADB, and if so, then how you can go about doing that. The guide also explains how you can recover the data from your broken phone once you have successfully turned on the USB debugging feature.
- Part 1. Is It Possible to Enable USB Debugging Using ADB Command?
- Part 2. How to Enable USB Debugging via Recovery Mode Using ADB Command?
- Bonus Tips: How to Recover Lost Data on Locked or Broken Android Phone
Part 1. Is It Possible to Enable USB Debugging Using ADB Command?
Before you proceed further, it is important to know if you can use an ADB command to enable the USB debugging option on your phone. The answer to this question is no.
You cannot enable USB debugging using an ADB command. This is because executing an ADB command requires you to already have USB debugging enabled on your phone. If USB debugging is not turned on, ADB cannot communicate with your device.
Part 2. How to Enable USB Debugging via Recovery Mode Using ADB Command?
A user named Pantasio on GitHub claims that he was able to enable USB debugging on an Android device from the recovery mode. While there is no guarantee that this method works, you can give it a go if you want.
It is highly unlikely that this method will work to turn on USB debugging, but if you have no other options available, the following is how you perform this method. Make sure your phone has an unlocked bootloader before you do this.
Reboot your Android device into recovery mode and connect it to your computer. The key combination to get into recovery mode varies with each device.
- Download and extract ADB toolkit on your computer.
- Open the ADB folder, hold down Shift, right-click anywhere blank, and select Open command window here.
Type the following command and hit Enter.
If you see your device listed, run the following commands one by one.
Use the following command to fetch a file named persist.sys.usb.config from your phone to your computer.
adb pull /data/property/persist.sys.usb.config C:\Users\[your-username]\Desktop\
- Access the fetched file on your computer on your computer with a text editor and change it to mtp,adb.
Run the following command to send the file back to your device.
adb push "C:\Users\[your-username]\Desktop/persist.sys.usb.config" /data/property
Get the build.prop file in a text editor like NotePad++ from your phone by using this command.
adb pull /system/build.prop C:\Users\[your-username]\Desktop\
Launch the build.prop file in an editor on your computer, and add the following code to it.
Save the file and transfer the file back to your device with this command.
adb push "C:\Users\[your-username]\Desktop/build.prop" /system/
Reboot your device using the following command.
If all went well, USB debugging is now enabled on your Android device. That is how to enable USB debugging using ADB command broken screen.
Bonus Tips: How to Recover Lost Data on Locked or Broken Android Phone
Now that USB debugging is enabled on your Android phone, you can recover all your data from your broken or locked device. You need to use a data recovery tool called Tenorshare UltData for Android and this tool allows you to recover several file types from your Android-based devices. You do not need to configure any complex options or anything; simply select the files you want to recover and the tool will do that for you.
The following takes a look at how to use this program to recover files from your Android phone.
Download the program and install it on your computer. Launch the program and click on the option that says Recover Lost Data.
Plug your phone into your computer using a USB cable.You now need to enable USB debugging on your phone, but since it is already enabled, you do not need to do anything.
Select the types of files you want to recover and click Start.
You can now choose individual files to recover them. Choose the files and then hit Recover at the bottom. Select a folder to save your recovered files in.
Your selected files are now recovered from your broken Android phone to your computer.
If your Android device is broken and you cannot manually enable USB debugging on Android with black screen or broken screen, the guide above should teach you how to enable USB debugging using ADB command black screen. We hope the guide helps you get access to the data stored on your device.