How to Factory reset your Android phone using ADB?

How to factory reset your Android phone using ADB? A factory reset can seem daunting, whether it’s for troubleshooting issues, preparing for a new owner, or simply starting from scratch.

But don’t worry! With Android Debug Bridge, or ADB, we will learn how to perform a factory reset quickly and easily.

If other options fail to restore control to an Android device, this method provides a comprehensive solution. Now let’s dive into ADB’s world and learn how to properly reset your Android device.

ADB, which stands for Android Debug Bridge, is a terminal window that allows you to perform a factory reset on your Android phone.

By factory resetting your phone, you will reinstate all your settings, delete all your files and data, and fix bugs and glitches. # Factory reset your Android phone using ADB

What You Need To Factory Reset Android Phone Using ADB

Before you can factory reset your Android phone with ADB, you need to take care of a few prerequisites, which include:

The following are the requirements for factory resetting an Android phone using ADB:

  • You can use a PC with Windows, Linux, or Mac OS.
  • USB debugging is enabled on Android phones that support it.
  • Connecting the phone to the PC requires a USB cable.
  • ADB and other tools are included in the Android SDK Platform Tools, which can be downloaded from [here].
  • Use Google Drive, Dropbox, or other cloud services to backup your important data on the phone before doing a factory reset.

The following steps will guide you through the process of turning it on:

  • Tap on About Phone in the Settings menu of your phone.
  • Tap the Software Information option now.
  • There will be a Build Number here; tap on it 6-7 times.
  • You have now turned on Developer Options once you see the toast saying ‘You are now a developer’ at the bottom of your screen.
  • To access Developer Options, go to the Settings menu and tap Developer Options.
  • Search for USB Debugging and enable it in Developer Options.

SDK Platform Tools must also be installed on your PC. We will discuss it later in this article if you don’t have it. # Factory Reset Android Phone

Factory resetting your Android phone using ADB can be accomplished in two ways:

Method 1: Using recovery mode

  • Launch Android SDK Platform Tools from the folder where it is located.
  • Once USB Debugging is enabled on your phone, connect the phone to your PC.
  • The terminal window should show something like: xxxxxxxxx device detected. Type adb devices and press Enter.
  • You will now be in recovery mode after typing adb reboot recovery and pressing enter.
  • Upon restarting in recovery mode, enter –wipe_data and press Enter. Your phone will begin restoring data.

Method 2: Using fastboot mode

  • Type adb reboot bootloader to enter fastboot mode.
  • Enter fastboot devices and press Enter to see if the phone is also in fastboot mode.
  • Enter fastboot erase userdata and press Enter to delete the data.
  • Type fastboot erase cache and press Enter to delete the cache.
  • By typing fastboot reboot and pressing Enter, the phone will reboot.

How to factory reset your Android phone using ADB?

When you’re dealing with stubborn software issues or need to prepare your device for a new owner, factory resetting your Android phone using Android Debug Bridge (ADB) can be a useful solution.

With ADB, you can interact with your Android phone from a computer. # Factory reset your Android phone using ADB

Here’s how to use ADB to factory reset:


  • To enable developer options, follow these steps:
    • You can access settings on your Android device by going to Settings.
    • To access the About device or About phone section, scroll down.
    • Tap the Build number seven times to enable Developer Options. You’ll need it to access ADB.
  • USB Debugging can be enabled by following these steps:
    • Ensure USB Debugging is enabled in Developer Options.
  • Install ADB on Your Computer:
    • From the Android Developers website, you can download the Android SDK Platform Tools, which include ADB.

Steps to Factory Reset Using ADB:

Connect Your Phone to the Computer:

  • To connect an Android device to a computer, use a USB cable.

Using a terminal or command prompt, open the following:

  • Launch the command prompt on your computer (Windows) or the terminal on your Mac or Linux.

Navigate to the ADB Directory:

  • You can navigate to where ADB is installed by using the cd command. For example, if ADB is installed in the Downloads folder, you would enter: cd Downloads/platform-tools.

Verify Device Connection:

  • The following command will ensure that your device is properly recognized by ADB:
  • adb devices
  • Ensure that USB Debugging is enabled and that your device is correctly connected if you do not see your device’s serial number.

Factory reset your Android phone using ADB
Factory reset your Android phone using ADB

Initiate the Factory Reset:

  • A simple script can be used to initiate the factory reset, rather than typing commands manually. Create a text file (e.g., reset.txt) and open it with a text editor.

Add the ADB Commands to the Text File:

  • The following lines should be added to the text file:

      adb shell recovery –wipe_data

  • You may also use the following apps depending on your Android device and version:

     wipe data/factory_reset

Save and Close the Text File:

  • The text file should be saved and closed after adding the commands.

Run the Script:

  • Navigate back to the command prompt or terminal window where you navigated to the ADB directory.
  • Run the script by running the following command:

      adb shell < reset.txt

Confirm the Factory Reset:

  • Following the on-screen instructions, you will be prompted to confirm the factory reset.

Reboot Your Device:

  • You can reboot your device by typing the following command after the reset has been completed:

Make sure you back up any important data before resetting your device using ADB. A factory reset will delete all data on the device, including apps, settings, and personal files. # Factory reset your Android phone using ADB

It’s also important to check your device’s documentation or online resources if you encounter any issues or require specific instructions, since this process may vary depending on your device’s manufacturer and Android version.

What is Android storage/emulated/0?

How to reboot Android phone with adb?

ADB can be used to reboot Android phones by following these steps:

  • You can download ADB from here and install it on your PC/Mac/Linux machine.
  • Make sure your phone is enabled for USB Debugging and connect it to your PC via a USB cable.
  • In the folder where ADB is installed, open a terminal or command prompt window.
  • Make sure your phone is detected by typing adb devices and pressing Enter.
  • Reboot your phone normally by typing adb reboot and pressing Enter.

Alternatively, you can reboot your phone into recovery mode or fastboot mode by typing adb reboot recovery or adb reboot bootloader. # reboot Android phone with adb

How To Change Preferences on TikTok


ADB can be a valuable tool to know how to factory reset your Android phone in a world where data security and privacy concerns are paramount.

ADB offers a powerful and efficient solution whether you’re troubleshooting stubborn software issues, preparing your device for a new owner, or seeking a fresh start.

If you follow the steps outlined in this guide, you can confidently use ADB to reset your Android phone, ensuring the safety of your personal data and the performance of your device.

Leave a Reply