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.
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.
- 1 How To Enable USB Debugging On Android From A Computer
- 2 Enabling USB Debugging Using ADB Command
- 3 Disable USB Debugging Using ADB Command
- 4 Turn Off Developer Options Using ADB Command
- 5 FAQs
- 6 Conclusion
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.
PS C:\> adb shell
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 oem unlock
The factory data reset will also occur when your phone’s bootloader is unlocked using the OEM unlock command.
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.
- Firstly, enter recovery mode on your Android device.
- Secondly, extract the most recent SDK Platform-tools.zip after downloading it.
- 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.
- Anyway, please enter the following command by entering it after typing it.
- 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.
- Press the Enter key after typing the adb shell. Mount the corresponding directories on your smartphone using the commands mount data & mount system.
- adb shell
- $ mount data
- $ mount system
- 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 /data/property/persist.sys.USB.config
- 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 “C:\Users\Technastic\Desktop/persist.sys.USB.config” /data/property
- Use a word processor like NotePad++ to add the following words to the build.prop file.
- adb pull /system/build.prop C:\Users\Technastic\Desktop\
- Include the next lines in the build.prop file by opening it in a text editor like NotePad++.
- 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 “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.
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.
- Launch the PowerShell window or the Command Prompt. Three options exist for doing it.
- Then, starting the adb shell, connect the device to the computer by performing the next command.
- Settings put global adb_enabled 0
- 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.
- Open your computer’s command window.
- Then, utilize a USB cord to link your gadget to the PC.
- 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 development_settings_enabled 0
- 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.
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.