Resetting settings or flashing Android are procedures that sooner or later are required by every smartphone owner. Some want to return the device to factory performance after years of use, others want to get rid of viruses or bugs after an unsuccessful update, and others want to install custom software for advanced functions. But how to do this correctly, without turning the phone into a โ€œbrickโ€?

In this article we will look at all the methods - from a soft reset through the menu to a complete flashing via fastboot or recovery. You will find out when the standard one Hard Resetis enough, and when you need to unlock the bootloader and install alternative firmware. We will pay special attention to the nuances for popular brands: Samsung, Xiaomi, Google Pixel and others.

1. When is a reset or flashing needed?

Before taking drastic measures, determine whether they are really necessary. Resetting to factory settings (Factory Reset) solves most software problems:

  • ๐Ÿ“ฑ The phone slows down, often overheats or discharges quickly
  • ๐Ÿ”„ After updating the OS, glitches appeared (freezes, application errors)
  • ๐Ÿฆ  Suspicion of viruses or malware
  • ๐Ÿ”’ All data must be deleted before selling the device

But flashing (installing a new version of Android or custom software) is required in more complex cases:

  • ๐Ÿšซ The device does not turn on or only boots into fastboot/recovery
  • ๐Ÿ”„ Official updates no longer come, but I want a new version of Android
  • ๐Ÿ› ๏ธ You need functions that are not in the stock firmware (for example, root access)
  • ๐Ÿ“ฑ The phone is "locked" by the operator (for example, AT&T or Verizon)
โš ๏ธ Attention: Reflashing will void the warranty and may lead to irreversible data loss. On some models (for example, Samsung s Knox), this will also trigger the flag RPWN, which will block access to Samsung Pay and other services.
๐Ÿ“Š Why do you want to reset/reflash? Android?
The device is slow
I need to delete data before selling
I want to install custom firmware
The phone does not turn on
Other

2. How to reset to factory settings (Hard). Reset)

This is the safest and easiest way to return the phone to its original state. All data will be deleted, but the firmware itself will remain intact. There are two options: through the settings menu or using hardware buttons (if the phone does not turn on).

Method 1: Through the settings menu (if the phone is working)

Suitable for most Android devices. 8.0 and newer:

  1. Open Settings โ†’ System โ†’ Reset settings (on some phones the path may be different: Settings โ†’ General โ†’ Reset).
  2. Select "Delete all data" or "Reset to factory settings".
  3. Confirm the action. The system may request a PIN code or pattern.
  4. Wait for completion (usually takes 5โ€“15 minutes). The phone will reboot.

Method 2: Through Recovery Mode (if the phone does not turn on)

If the device is stuck on the logo or does not respond, use the button combination to enter recovery:

Brand Button combination Notes
Samsung Volume up + Power + Bixby (hold for 10 sec) On new models (S22 and newer), you may need to connect to a PC
Xiaomi/Redmi/POCO Volume up + Power On some models you need to hold the buttons until they vibrate
Google Pixel Volume down + Power (then select Recovery Mode) In the recovery menu, use the volume buttons to navigate
OnePlus Volume down + Power On OxygenOS 12+ may require confirmation via Fastboot

In the menu recovery (usually a blue or black screen with a green robot) select:

Wipe data/factory reset โ†’ Yes โ€” Delete all user data

After the reset, select Reboot system now.

Back up important data (photos, contacts, messages)

Record or photograph accounts (Google, social networks)

Make sure the battery charge is > 50%

Find the button combination for your model (see table above)-->

3. Full flashing: when and how to do it

If the reset did not help or you want to install a different version of Android (for example LineageOS), you will need a complete flashing. This is more complicated than Hard Reset, and requires preparation.

Main steps:

  1. Unlocking the bootloader (bootloader) by default.
  2. Installing custom recovery (for example, TWRP).
  3. Firmware for new software via fastboot or recovery.
โš ๏ธ Attention: On devices Samsung with Exynosprocessors, unlocking the bootloader resets the counter Knox on 0x1, which voids the warranty. On Snapdragonmodels (for example, Galaxy S22 Ultra), the bootloader cannot be unlocked.

Step 1: Unlocking the bootloader

The procedure differs for different brands:

  • ๐Ÿ“ฑ Google Pixel, OnePlus, Xiaomi: officially support unlocking via command fastboot flashing unlock.
  • ๐Ÿ“ฑ Samsung: requires enabling OEM Unlock in the developer settings and using the utility Odin.
  • ๐Ÿ“ฑ Huawei, Honor: since 2018, unlocking is officially prohibited (workarounds required).

Unlocking example for Xiaomi:

  1. Enable OEM Unlock in Settings โ†’ About phone โ†’ MIUI version (tap 7 times to activate the developer menu).
  2. Connect your phone to the PC, run fastboot and do:
    fastboot oem unlock
  3. Confirm unlocking on the phone (all data will be erased!).
What is OEM Unlock and why is it not on some phones?

The OEM Unlock option allows you to unlock the bootloader for installation custom software. Manufacturers often remove it on models for certain regions (for example Samsung in the USA) or after a certain period of support. On Huawei i Honor unlocking has been officially prohibited since 2018 due to company policy.

Step 2: Installing TWRP or other custom recovery

TWRP (Team Win Recovery Project) - the most popular alternative recovery that allows you to flash custom ZIP files. Download the official version for your model from the website twrp.me.

Installation via fastboot:

fastboot flash recovery twrp-3.7.0_9-0-lavender.img

fastboot reboot recovery

On some devices (for example, Samsung) TWRP does not take root due to VBMeta. In this case, use Odin to flash the APfile with a modified recovery.

4. Flashing stock or custom software

Now that the bootloader is unlocked and custom recovery is installed, you can flash the new system. Options:

  • ๐Ÿ”„ Stock firmware (official from the manufacturer) - restores "clean" Android.
  • ๐Ÿ› ๏ธ Custom firmware (LineageOS, Pixel Experience) - adds new functions.
  • ๐Ÿ“ฑ GSI firmware (Generic System Image) - universal firmware for devices with Project Treble.

Firmware via TWRP

The most universal method for custom firmware:

  1. Download the firmware ZIP file and place it on SD card or phone memory.
  2. Boot into TWRP (usually Volume up + Power).
  3. Select Wipe โ†’ Advanced Wipe and mark Dalvik/ART Cache, System, Data.
  4. Click Install, select the ZIP file and confirm the firmware.
  5. Once completed, click Reboot System.

Firmware via Fastboot (for stock software)

Suitable for Google Pixel, OnePlus, Xiaomi and other devices with an unlocked bootloader. Example for Pixel 6:

fastboot flash bootloader bootloader.img

fastboot reboot-bootloader

fastboot flash radio radio.img

fastboot flash --slot=all image.zip

fastboot reboot

โš ๏ธ Attention: Firmware of the wrong software version (for example, Android 13 on a phone with Android 14) can lead to lost IMEI or broken camera. compatibility of the firmware with your model and hardware revision!
๐Ÿ’ก

Before flashing the firmware, check the hash sum (MD5) of the downloaded file. This will prevent you from installing damaged software. Use the utility certutil -hashfile file.zip MD5 in Windows. or md5sum file.zip in Linux/Mac.

Each manufacturer makes its own changes to the firmware process. Let's consider the key nuances.

Samsung: Odin and Knox

For firmware Samsung use the utility Odin (officially intended for service centers). Download it from a trusted source (for example, XDA Developers).

Instructions:

  1. Download stock firmware in format .tar.md5 from the site SamMobile or Frija.
  2. Run Odin, connect the phone in the mode Download Mode (Volume down + Power + USB).
  3. In Odin add files to the appropriate fields:
    • BL โ€” bootloader
    • AP โ€” system
    • CP โ€”modem
    • CSC โ€”regional settings (select HOME_CSCso as not to reset the data)
  • Press Start and wait for completion (the phone will reboot automatically).
  • Important: On Samsung s Exynos after the firmware, a reset may be required Knox via #0# or Samsung Members.

    Xiaomi: Fastboot and Mi Flash Tool

    For Xiaomi there are two ways: through fastboot or Mi Flash Tool. The second method is easier for beginners.

    Instructions for Mi Flash Tool:

    1. Download firmware in format .tgz from the site en.miui.com (select version Fastboot).
    2. Unpack the archive and run Mi Flash Tool.
    3. Connect the phone in mode Fastboot (Volume down + Power).
    4. In the app, select the folder with the firmware and click Refresh โ†’ Flash.
    5. Wait for completion (green checkmark in the status).
    6. Attention: On new models (Redmi Note 12, Xiaomi 13), account authorization may be required Mi to unlock the bootloader.

      Google Pixel: Factory Images and OTA

      Google provides official firmware images (Factory Images) for all models Pixel. They can be flashed via fastboot or install an OTA update.

      Firmware example Pixel 7:

      fastboot flash bootloader bootloader.img
      

      fastboot reboot-bootloader

      fastboot flash radio radio.img

      fastboot flash --slot=all image.zip

      fastboot reboot

      To install OTA without data loss:

      adb sideload ota_update.zip

      6. Common mistakes and how to avoid them

      Even experienced users sometimes encounter problems. Here are the most common errors and their solutions:

      Error Cause Solution
      FAILED (remote: 'Flashing is not allowed in Lock State') Bootloader is not unlocked Run fastboot flashing unlock (see section 3)
      E: Unknown command [log] in TWRP Incompatible recovery version Download the current version TWRP for your model
      Phone stuck on the logo after the firmware Wrong CSC or software version Flash the stock firmware via Odin/Fastboot with the correct region
      Error: Device is LOCKED. Cannot flash images On Samsung enabled OEM Lock Enable OEM Unlock in the developer settings
      Network loss after flashing Modem not flashed (CP or radio.img) Repeat the firmware with the correct modem files

      Tip: If after flashing the phone does not turn on, try booting into fastboot and run:

      fastboot erase userdata
      

      fastboot reboot

      ๐Ÿ’ก

      Always check the compatibility of the firmware with yours model and hardware revision. For example, firmware for Redmi Note 10 Pro (model sweet) is not suitable for Redmi Note 10 Pro 5G (model chopin).

      7. Restoring data after a reset

      If you made a backup copy, restoring the data will be easy. But what to do if there is no backup?

      • ๐Ÿ“ฑ Contacts and calendar: synchronizes with account Google automatically upon first login.
      • ๐Ÿ“ท Photos and videos: if they were stored on the SD card, they can be copied back. To restore from internal memory, use DiskDigger or Recuva (only if you havenโ€™t flashed it userdata!).
      • ๐Ÿ’ฌ Messages: can be restored only if backup was enabled in Google Drive (setting in Settings โ†’ Google โ†’ Backup).
      • ๐ŸŽฎ Game progress: check if the account is linked to Google Play Games or social networks.

      Important: If you have installed it userdata or done Wipe Data in TWRP, the chances of data recovery are minimal. In this case, only professional equipment will help (for example, Chip-Off).

      ๐Ÿ’ก

      For automatic backup, use the application Swift Backup (requires root) or Titanium Backup. They save not only data, but also application settings.

      8. Alternatives: when firmware is not needed

      Sometimes the problem can be solved without radical measures. reset or firmware:

      • ๐Ÿ”„ Reset cache: to recovery select Wipe cache partitionThis does not delete data, but cleans temporary files.
      • ๐Ÿ› ๏ธ Safe Mode: hold the power button โ†’ "Safe Mode". Check whether the glitch is caused by a third-party application.
      • ๐Ÿ“ฑ ADB commands: some problems (for example, freezing on the logo) can be solved with the command:
        adb shell am start -n com.google.android.gsf.login/
      • ๐Ÿ”ง Update rollback: if glitches started after the update, Settings โ†’ Applications โ†’ โ‹ฎ โ†’ Reset application settings you can return the factory versions of system apps.

    If the phone is just slow, try:

    1. Disable animation: in the developer settings (Settings โ†’ About phone โ†’ Build number, tap 7 times) set Window animation, Animation of transitions i Animator duration to 0.5x.
    2. Limit background processes: in the same developer settings, select Limit processes: maximum 2-3.
    3. Delete Google Play cache Services: Settings โ†’ Applications โ†’ Google Play Services โ†’ Memory โ†’ Clear cache.
    FAQ: Frequently asked questions about resetting and flashing Android
    Is it possible to reset Android without losing data?

    No, a full reset (Hard Reset) always deletes user data. However, you can do a selective reset: for example, only settings or the application cache (in the menu Settings โ†’ System โ†’ Reset settings).

    How do you know if the bootloader is unlocked?

    Turn off the phone and turn it on in mode fastboot (usually Volume down + Power). If it says Device State: Unlockedat the bottom of the screen, the bootloader is unlocked. data-i="327">โ€”unlocked. Samsung check status Knox V Download Mode: 0x0 - blocked, 0x1 - unlocked.

    What to do if there is no network after flashing?

    This is a typical problem when flashing the wrong version of the modem. Solutions:

    1. Flash the correct file CP (for Samsung) or radio.img (for Pixel).
    2. Check IMEI: dial *#06#. If it reset to 0000..., restore it via ChimeraTool or Maui META (boxing required).
    3. Reset network settings: Settings โ†’ System โ†’ Reset โ†’ Reset network settings.

    How to flash Android without a computer?

    You do not need a computer to reset to factory settings (use Recovery ModeBut for a complete flashing of a PC, it is required, with the exception of:

    • Installing OTA updates via adb sideload (requires a cable, but not always a PC).
    • Using applications like FlashFire (requires root).

    For flashing custom software without a PC, only TWRP + ZIP file on an SD card is suitable.

    Is it possible to roll back the firmware to an older version of Android?

    Technically yes, but there are nuances:

    • On Google Pixel and some other devices you can flash any version via fastboot.
    • On Samsung rollback is blocked Knox i RMM State. A bypass will be required via Combination Firmware.
    • On Xiaomi rollback is possible, but may be blocked by the bootloader (account authorization required).

    Risks: a rollback can lead to data loss, a non-functioning camera or NFC module.