Yoodley is reader-supported. When you buy through links on our site, we may earn an affiliate commission.
The Android Debug Bridge (ADB) is a command-line tool that enables device communication. It is used to establish communication between an emulator instance (Android device) and a daemon process that is operating in the background (server).
By providing access to a Unix shell, it enables you to conduct various tasks such as installing or debugging a device and running various commands on it.
You can also factory reset Android using ADB; below is how:
Factory resetting Android using ADB?
Below we have enlisted two methods you can factory reset Android using ADB:
- USB Debugging should be enabled on your mobile phone. Navigate to Settings > Applications > Development in order to make this setting effective.
- Install the ADB and Fastboot Tools on your computer by downloading and installing them.
- Check to see that the USB driver for your device has been successfully installed on your computer. You may use ADB Fastboot to download drivers from ADB and then use Fastboot to install the newest version of the desired drivers using ADB and Fastboot respectively.
- Connect your Android phone to your computer by connecting it with a functional USB cable. Turn on your ADB device and check to see if your Android phone is being identified by Windows Device Manager as being connected to the computer.
- Start the Windows command prompt and navigate to the ADB Fastboot Tool folder by entering C:\Users\Your username\AppData\Local\Android\android-sdk\platform-tools
- Type the ADB and Fastboot commands into the command line.
adb reboot recovery
- After pressing the Enter key, your Android device will restart and should boot into the Android System Recovery / Bootloader Mode interface.
- You can now unplug your Android device from your computer and access the Android Recovery Menu by selecting Wipe Data / Factory Reset from the menu bar.
This should factory reset your Android device.
- Launch Minimal ADB & Fastboot by navigating to the folder where it is located.
- To begin, turn on USB Debugging on your phone and then connect it to your computer.
- Type the following command into the terminal window and click Enter:
- You should see something along the lines of: xxxxxxxxx device detected. After that, enter the command that follows after pressing Enter.
- Then, enter the command below. After inputting the command, press Enter.
If the command does not work, type and press Enter the following command:
- Your phone should restart and the restoration procedure should begin.
- You can alternatively boot into recovery mode and complete the reset manually.
- Enter the following command and click Enter:
adb reboot recovery
How to disable USB Debugging using ADB Command
Even if you are unable to enable USB debugging on your smartphone due to a locked or damaged screen, you may easily stop it using the ADB command if it has previously been enabled on your device.
- Start the Command Prompt or a PowerShell window, whichever you want.
- Connection to your device and execution of the following command after launching adb shell are required.
settings put global adb_enabled 0
- After that, navigate to Settings > Developers settings, where you will discover that USB debugging has been turned off.
ADB Commands for certain actions on Android
1. Show Connected Devices
In order to use ADB commands, you must first check that the device with which you need to interface is truly connected to your computer. Despite the fact that ADB has made tremendous strides in recent years, it can still have difficulties “seeing” smartphones or tablets that are connected.
Making sure ABD is ready to communicate with your Android device is as simple as running the following command:
Following the execution of this command, the serial numbers of the connected devices should be displayed in the command prompt/Terminal.
Make sure that USB debugging is enabled on your Android device if the device does not appear to be connected to the computer.
2. Reboot Your Device
This command restarts your device in its default configuration. This command is often used after you’ve flashed anything to your device and need to reboot it after you’ve done so.
Using this command might also be beneficial if you’re having problems with your Android device — for example, if your smartphone becomes unresponsive all at once.
3. Reboot into Recovery
Recovery mode on Android devices is a separate bootable partition that can be used in the event of a system failure. It’s possible that booting into recovery mode will allow you to fix problems with your Android handset.
If you’d like to reboot your device into recovery mode, you can use the command:
adb reboot recovery
Restarting your device into recovery mode will cause it to shut off. In the event that you’ve installed a custom recovery on your device, this will take its place.
4. Reboot into Bootloader Mode
The bootloader is the first thing that runs when you boot up your Android device. If you want to unlock the bootloader, reboot into recovery mode or perform other rooting-related tasks, then you’ll need to boot your device into bootloader mode.
adb reboot bootloader
5. Reboot into Fastboot
Fastboot mode on Android allows you to flash custom recoveries as well as custom ROMs. Instead of entering the bootloader and then selecting fastboot, use the following command to enter fastboot mode directly:
adb reboot fastboot
6. Send File to Your Device
It’s possible to transfer files between your Android device and your PC using a variety of apps, including OpenMTP, which is free. However, if you just need to transfer a few files, then downloading a complete application may be unnecessary.
Using the adb push command, you can transfer files to your Android phone or tablet from your computer. Only the location of the file and the place where you wish to deliver the file are required:
adb push Source Destination
As a result, the file will be transferred to your smartphone or tablet’s “Downloads” folder.
7. Get Files from Your Device
Pulling files is an option as well as pushing them. With this command, you can copy a file from a computer to your Android device and display it on your laptop or desktop.
Specify the file you want to extract and where it should be saved on your computer by using the pull command.
adb pull FileLocation Destination
Consider the following scenario: we wish to download a “myphoto.jpg” file from our smartphone or tablet and save it to our computer’s desktop.
8. Install an App on Your Device
When you download an application from a source other than Google Play, you may be required to push that application from your laptop to your smartphone or tablet in the form of an APK file (Android Package Kit).
To install an APK file, you simply need to specify the path of the APK file:
adb install APKLocation
9. Remount the System
You may need to remount the entire system of your Android device at some occasion. As a result of this, the “/system” partition is made writable, and it should be executed before any files are copied to this partition. Remounting the system on an Android smartphone that has been rooted is only possible.
Run the following command to remount your hard drive: