Resetting a smartphone Android to factory settings via a computer is a task with which users face when selling a device, eliminating critical errors, or after an unsuccessful update. Unlike a standard reset through the phone menu, formatting via a PC gives more control: you can bypass a locked screen, restore โ€œbricksโ€ after flashing or remove viruses that block access to settings.

This instruction is suitable for most devices based on Android 5.0โ€“14, including Samsung Galaxy, Xiaomi Redmi/POCO, Huawei/Honor, Google Pixel and others. We will consider three methods: through ADB (for working devices), Fastboot (for switched off or โ€œlockedโ€ phones) and Recovery Mode (universal method). Important: the procedure deletes all data, including photos, messages and applications - if the phone is not working. is recognized by the PC, it will be impossible to restore files after formatting.

Before you begin, check the battery charge (at least 50%) and prepare the USB cable. Use an original cord or a certified one - cheap analogues can interrupt the connection at a critical moment.

1. Preparation: what is needed for formatting via PC

To reset Android via a computer, you will need:

  • ๐Ÿ–ฅ๏ธ A computer with Windows 10/11, macOS or Linux (instructions are universal).
  • ๐Ÿ“ฑ USB cable (preferably original, with support for data transfer).
  • ๐Ÿ”ง Utilities ADB i Fastboot (you can download from the official website Google).
  • ๐Ÿ”’ Unlocked OEM Unlock (for methods with Fastboot).
  • ๐Ÿ“„ Backup copy of data (if the phone is still turned on).

If you are formatting the phone for the purpose of selling, after resetting it is recommended unlink Google account (on Android 5.1+ this is mandatory to avoid FRP locks). To do this, before resetting, go to Settings โ†’ Accounts โ†’ Google and delete the profile.

โš ๏ธ Attention: On some models Xiaomi and Huawei after resetting through Fastboot you may need to re-link your account Mi or Huawei IDIf you are selling a phone, find out in advance. from the buyer, does he need help with unlocking.
๐Ÿ“Š What reset method do you plan to use?
ADB (the phone turns on)
Fastboot (the phone does not turn on)
Recovery Mode (universal method)
Not decided yet

2. Method 1: Formatting via ADB (for working phones)

The method is suitable if the phone turns on, but you cannot enter the settings (for example, due to a forgotten password or a glitch in the interface). ADB (Android Debug Bridge) allows you to send a reset command directly from the computer.

Steps:

  1. Download Platform Tools from Google and unpack the archive into a folder C:\platform-tools.
  2. Activate on your phone Developer mode: go to Settings โ†’ About phone โ†’ Build number and tap on it 7 times.
  3. Go back to Settings โ†’ System โ†’ For developers and enable USB debugging.
  4. Connect your phone to the PC, confirm access to debugging on the device screen.
  5. Open Command Prompt (Win + R โ†’ cmd) and go to the folder with ADB:
    cd C:\platform-tools
  6. Check the connection:
    adb devices

    If the phone is displayed in the list, enter the reset command:

    adb shell recovery --wipe_data

    or (for older versions Android):

    adb shell am broadcast -a android.intent.action.MASTER_CLEAR

After executing the command, the phone will automatically reboot and begin the formatting process. Reset time depends on the model and amount of memory - usually takes from 5 to 15 minutes.

Developer mode activated|

USB debugging enabled|

Phone is recognized in `adb devices`|

Data backup made-->

3. Method 2: Reset via Fastboot (for non-working phones)

If the phone does not turn on, is stuck on the logo or is locked, it will help Fastboot - the firmware mode, which works at the bootloader level. This method requires an unlocked OEM Unlock (on most phones it can be enabled. in Settings โ†’ For developers to breakdowns).

Instructions:

  1. Turn off the phone. Hold down the combination of buttons to enter Fastboot Mode (each model has its own):
    • ๐Ÿ“ฑ Samsung: Volume down + Power + Bixby (hold for 10 seconds).
    • ๐Ÿ“ฑ Xiaomi/POCO/Redmi: Volume down + Power.
    • ๐Ÿ“ฑ Google Pixel, OnePlus: Volume up + Power.
    • ๐Ÿ“ฑ Huawei/Honor: Volume down + Power (after vibration, release the power).
  • Connect your phone to the PC and open Command line in the folder platform-tools.
  • Check the connection:
    fastboot devices

    If the device is visible, perform a reset:

    fastboot erase userdata
    

    fastboot erase cache

    fastboot reboot

  • Some phones (for example Xiaomimay require an additional command to unlock the bootloader:

    fastboot oem unlock
    Attention: this command erases all data including DRM keys, which can lead to loss of photo quality on some cameras (relevant for Sony Xperia and Google Pixel).

    โš ๏ธ Attention: On devices with MediaTek (many models Realme, Oppo, Tecno), resetting via Fastboot may lead to error BROM ERROR. In this case, use the method via Recovery Mode (section 4).
    What to do if Fastboot does not see the phone?

    1. Check the cable and USB port (try a different connector on the PC).

    2. Install drivers for your model (for example Samsung USB Driver or Mi PC Suite).

    3. Try running the command line as an administrator.

    4. If the phone is still not detected, the USB connector or controller on the deviceโ€™s motherboard may be damaged.

    4. Method 3: Formatting via Recovery Mode (universal method)

    Recovery Mode - built-in recovery menu, available on all Androiddevices. This method works even if the phone does not turn on, but does not require unlocking the bootloader (unlike Fastboot).

    How to log in Recovery:

    • ๐Ÿ“ฑ Turn off the phone.
    • ๐Ÿ”˜ Press the combination of buttons (depending on the model):
      Brand Combination Note
      Samsung Volume up + Power + Bixby Release the buttons when the logo appears Android.
      Xiaomi/Redmi/POCO Volume up + Power On the screen, select Recovery Mode volume button.
      Google Pixel Volume down + Power In the menu, select Recovery Mode with the power button.
      Huawei/Honor Volume up + Power On some models you need to hold for 10+ seconds.
      OnePlus Volume Down + Power In the menu, select Englishthen Wipe data.
    • ๐Ÿ–ฑ๏ธ In the menu Recovery use the volume buttons to navigate and the power button to select.
    • ๐Ÿงน Select Wipe data/factory reset, then confirm the action (Yes).
    • ๐Ÿ”„ After resetting, select Reboot system now.

    If Recovery requires you to enter a password, and you donโ€™t remember it, try connecting the phone to the PC and use ADB to reset the password (command adb shell rm /data/system/gesture.key), but this will only work on Android 5โ€“7.

    ๐Ÿ’ก

    If there is no item in Recovery Mode Wipe data, try selecting first Advanced โ†’ Wipe Dalvik Cache, then go back and try again reset.

    5. Possible errors and their solutions

    When formatting via PC, users often encounter typical problems and ways to resolve them:

    • ๐Ÿšซ "No devices found" error in ADB/Fastboot:

      Check the cable connection, install drivers for your model (for example, Samsung USB Driver or Qualcomm HS-USB QDLoader 9008). On Windows try disabling driver signature:

      bcdedit /set nointegritychecks on

      (after rebooting the PC).

    • ๐Ÿ”’ The phone asks for a password in Recovery Mode:

      On Samsung s Android 10+ i Xiaomi s MIUI 12+ reset via Recovery may require entering your account password. In this case, use Fastboot (section 3) or special utilities like Mi Flash Tool for Xiaomi.

    • โšก The phone does not turn on after reset:

      If after formatting the device does not start (black screen or stuck on the logo), try:

      1. Charge the phone for 30+ minutes.
      2. Repeat reset via Recovery.
      3. Flash stock firmware via Fastboot (look for instructions for your model at 4PDA or XDA Developers).
    โš ๏ธ Attention: If after resetting via Fastboot the phone gives an error Invalid IMEI or loses the network, it means that they were erased NV-data. They can only be restored through a service center or specialized boxes (for example, UFI Box).

    6. How to recover data after formatting

    If you forgot to make a backup copy, the chances of getting the files back depend on the reset method:

    • ๐Ÿ” After a reset via ADB/Recovery: You can try to restore the data with apps like DiskDigger, Recuva or 7-Data Recovery. mode MTP and scan the internal memory.
    • โŒ After reset via Fastboot: Recovery is almost impossible, since the data is overwritten at a low level. The exception is if you made a backup via TWRP or OrangeFox Recovery.
    • โ˜๏ธ Cloud copies: Check Google Photo, Google Drive or your manufacturer account (Samsung Cloud, Mi Cloud). Contacts and SMS are often synchronized automatically.

    For future resets, we recommend:

    • ๐Ÿ“ฒ Set up automatic backup in Settings โ†’ System โ†’ Backup.
    • ๐Ÿ’พ Use Titanium Backup (requires root) or Swift Backup to save applications and their data.
    • ๐Ÿ” Store copies of IMEI and NV-data (relevant for MediaTek-devices).
    • ๐Ÿ’ก

      The only reliable way to save data before formatting is to create a backup to an external drive or to the cloud. Recovery apps only work 30โ€“50% of the time and do not guarantee the return of all files.

      7. Frequently asked questions (FAQ)

      Is it possible to format Android via a PC without losing data?

      No. Any factory reset deletes all user data. If you need to free up space without formatting, use:

      • Clearing the cache in Settings โ†’ Storage.
      • Deleting unnecessary files via Files by Google or SD Maid.
      • Transfer photos/videos on a PC or cloud.
      Why does the phone ask for the old password after resetting via Fastboot?

      This is FRP lock (Factory Reset Protection), which is activated on Android 5.1+ when resetting via Recovery or Fastboot, if an account was linked on the phone Google. To unlock: FRP lock access

      1. Enter your last used account Google (even if the phone has been formatted).
      2. If you don't remember the details, use access restoration.
      3. To bypass FRP on Samsung you can use the utility SamFirm or a combination with ODIN.
      How to reset a phone if it is not recognized by the computer?

      If the PC does not see the device:

      1. Try another cable and USB port (preferably USB 2.0 on the back panel of the system unit).
      2. Install the drivers manually via Device Manager (Update driver โ†’ Search on this computer).
      3. On Windows disable driver signature (see section 5).
      4. If the phone turns on, but not is determined in ADB, check whether USB debugging is enabled.
      5. For "bricks" (the phone does not turn on at all) you will need JTAG or ISPfirmware at the service center.
    You can Is it possible to format the phone via PC without unlocking the bootloader?

    Yes, but only through Recovery Mode (section 4). Methods with Fastboot require unlocked OEM Unlockotherwise commands fastboot erase will not work. An exception is some models Huawei and Xiaomiwhere a reset via Fastboot is possible without unlocking, but with restrictions (for example, the partition userdata is not erased completely).

    What to do if after a reset the phone does not see the SIM card?

    This is a typical problem after resetting via Fastboot on devices with MediaTek or Spreadtrum. Reasons:

    • Erased NV-data (IMEI, module serial numbers).
    • Partition damaged modem.
    • Solutions:

      1. Restore IMEI through the engineering menu (##3646633## โ†’ Connectivity โ†’ CDS Information).
      2. Flash the stock one modem via Fastboot or SP Flash Tool.
      3. Contact the service center for flashing NV-sections.