Reinstalling the operating system on an Android smartphone is a task that every active user faces sooner or later. The reasons can be different: from banal slowdowns after several years of operation to critical system crasheswhen the device refuses to boot. Unlike computers, where reinstalling Windows or Linux has become a routine procedure, with Android everything is more complicated due to the variety of manufacturers, firmware versions and recovery methods.

This article will not just list the steps for flashing the firmware - we will analyze it. all possible scenarios: from the most secure reset to factory settings to manual installation of custom firmware via Fastboot or TWRP Recovery. You will learn how to avoid loss of IMEI or bootloader lock, what tools are needed for different brands (Samsung, Xiaomi, Google Pixel), and what to do if after reinstallation the phone turns into a โ€œbrickโ€. We will pay special attention to preparation - it is at this stage that 90% of users make mistakes leading to irreversible consequences.

1. When you need to reinstall Android: symptoms and alternatives

Before taking drastic measures, it is worth assessing whether your device really needs a complete flashing. Many problems can be solved in less risky ways:

  • ๐Ÿข Slowdown: try clearing the cache via Settings โ†’ Storage โ†’ Cache data. On Samsung this is done through Device and maintenance โ†’ Memory โ†’ Clear.
  • ๐Ÿ”„ Looping on the logo: often Reset via Recovery Mode helps (press Power + Volume up when turning on).
  • ๐Ÿ“ฑ Viruses or advertising: install an antivirus (for example, Malwarebytes) and check application permissions in Settings โ†’ Applications.
  • ๐Ÿ”‹ Fast battery drain: check background activity in Settings โ†’ Battery โ†’ Usage. Social networks or instant messengers are often the culprits.

Reinstalling Android is justified in three cases:

  1. Device does not turn on or is loaded only into Fastboot Mode/Recovery.
  2. System damaged by a virusthat deletes critical files (for example, Trojans of the family Shuanet).
  3. You want update the Android versionwhich the manufacturer no longer supports (relevant for old Sony Xperia or LG).
โš ๏ธ Attention: On devices with Exynosprocessors (many models Samsung and Meizu) incorrect firmware can lead to hardware locking of the modem. Before proceeding, check the compatibility of the firmware with your chipset revision (indicated in Settings โ†’ Phone information โ†’ Baseband version).
๐Ÿ“Š Why you do you want to reinstall Android?
The phone is very slow
Wonโ€™t turn on after the update
I want to install a new version of Android
Remove viruses
Other

2. Preparing for reinstallation: backup and tools

This stage is often ignored, but it is what determines whether after flashing you will be left with a working device or get a โ€œbrickโ€. For SMS use backup:

  • ๐Ÿ“ฑ Contacts and SMS: Sync with Google Account (Settings โ†’ Accounts โ†’ Google โ†’ Synchronization). For SMS use SMS Backup & Restore.
  • ๐Ÿ“ท Photos and videos: copy to PC or to the cloud (Google Photos, Yandex Drive). Do not rely only on DCIM โ€”check the folders Pictures, Downloads and the root directory.
  • ๐ŸŽฎ Applications and data: use Titanium Backup (requires root) or the built-in backup function in Settings โ†’ System โ†’ Backup.
  • ๐Ÿ”‘ Passwords and tokens: export from Google Smart Lock or password managers (1Password, Bitwarden).

Now about the tools. Depending on the reinstallation method, you will need:

Reinstallation method Required tools Applicability
Reset to factory settings The phone itself (menu Recovery) All devices except locked ones
Firmware via Fastboot Computer, cable USB Type-C, Platform Tools from Google, unlocked bootloader Google Pixel, Xiaomi, OnePlus, Nokia
Firmware via Odion Computer, Odion Tool, original cable Samsung Device only Samsung (series Galaxy S/A/J)
Installation via TWRP Recovery Unlocked bootloader, custom Recovery, ZIP firmware file Any supported devices TWRP (excluding Samsung c Knox)

Critical:

  1. Check version bootloader (fastboot getvar all) - firmware with an incompatible version will lead to brick (hardware damage).
  2. For Samsung download full firmware (AP, BL, CP, CSC) from the site SamMobile or Frija. Using only the APfile can break the modem.
  3. On Xiaomi unlock the bootloader via Mi Unlock Tool (requires account linking Mi and waiting 72โ€“168 hours).

โ˜‘๏ธ Checklist before flashing

Done: 0 / 5

3. Method 1: Reset to factory settings (the safest method)

If yours the phone turns on, but is unstable, start with Hard Reset. This method does not require a computer and is suitable for 90% of cases when the problem is caused by software errors rather than hardware damage.

Instructions for most devices:

  1. Turn off the phone.
  2. Hold down the button combination:
    • Samsung: Power + Volume up + Bixby (or Home on older models).
    • Xiaomi/Redmi/Poco: Power + Volume up.
    • Google Pixel, OnePlus: Power + Volume down.
  • In the menu Recovery select Wipe data/factory reset (control - volume buttons, confirmation - power button).
  • Confirm the action (Yes) and wait for completion.
  • Select Reboot system now.
  • On devices with MIUI (for example, Redmi Note 10 Pro), the path may be different: after logging into Recovery you need to select a language, then Wipe Data โ†’ Wipe All Data. On Samsung s One UI the reset is done via Wipe data/factory reset, but after it be sure to select Wipe cache partition.

    โš ๏ธ Attention: On phones with encrypted storage (all modern Android 10+), after the reset you may be required to enter the password for your last Google account. If you do not remember it, the device will remain locked (FRP Lock). This can be solved either by entering the correct password, or with special tools like FRP Bypass Tool (risky!).
    ๐Ÿ’ก

    If after resetting the phone asks for the password for your old Google account, and you donโ€™t remember it, try entering the last used password from Gmail. Sometimes it works even if the account has not been used for a long time.

    4. Method 2: Firmware via Fastboot (for experienced users)

    This method is suitable if:

    • The phone does not turn on or only boots into Fastboot Mode.
    • You want to install official firmware from the manufacturer (for example, you are returning from custom firmware to stock).
    • You have a device with an unlocked bootloader (Google Pixel, Xiaomi, OnePlus i etc.).

    For Samsung this method is not suitable โ€”use Odion (described in the next section).

    Step-by-step guide:

    1. Download Platform Tools from the official website Google and unzip to the root of the disk C:\platform-tools.
    2. Download the firmware for your model (for example, for Pixel 6 from the site Google Factory Images). Unpack the ZIP archive into the same folder.
    3. Connect the phone to the PC in Fastboot (hold Power + Volume down when turning on).
    4. Open command line in the folder platform-tools (Shift + right button โ†’ "Open command window").
    5. Check the connection:
      fastboot devices

      The device serial number should be displayed.

    6. Unlock the bootloader (if not unlocked):
      fastboot flashing unlock

      On your phone, confirm the unlocking (the data will be erased!).

    7. Run the firmware. To Pixel use the script flash-all.bat (double click). For other devices, enter the commands manually:
      fastboot flash boot boot.img
      

      fastboot flash system system.img

      fastboot flash vendor vendor.img

      fastboot flash dtbo dtbo.img

      fastboot reboot

    On devices Xiaomi with processors MediaTek (for example, Redmi 9A) instead of fastboot the utility is used SP Flash Tool. It requires scatter file, which comes complete with the firmware.

    โš ๏ธ Attention: On some devices (OnePlus 8T, Realme GT) firmware via Fastboot can reset IMEI. Before the procedure, write down your IMEI (dial *#06#) and prepare recovery tools (Maui META for MediaTek or QCN Rebuilder for Qualcomm).
    What to do if fastboot does not see the device?

    1. Check the cable - use an original or certified USB Type-C.

    2. Install drivers Google USB Driver or Qualcomm HS-USB QDLoader 9008 (for Qualcommdevices).

    3. Try another USB port (preferably USB 2.0 on the back panel of the PC).

    4. On Windows disable driver signing: enter in the command line bcdedit /set nointegritychecks on and restart the PC.

    5. Method 3: Samsung firmware via Odin (with nuances)

    Devices Samsung require a special approach due to a proprietary bootloader and protection system Knox. will not work Fastboot - you need a tool Odin (officially intended for service centers, but available online).

    Important: Use Odin with incorrect firmware can lead to loss of network (the modem will be damaged) or Knox trigger (loss of warranty and inability to use Samsung Pay, Secure Folder).

    Instructions:

    1. Download Odin3 (version 3.14.4 or later) and firmware in format .tar.md5 (4 files: AP, BL, CP, CSC).
    2. Unpack the firmware. If there is only one file (AP.tar.md5), use the app 7-Zip to extract individual components.
    3. Run Odin as administrator.
    4. Turn off the phone and switch to mode Download Mode:
      • For most models: Power + Volume down + USB cable.
      • On new ones Galaxy S22/S23: Power + Volume up + Volume down, then connect the cable.
  • In Odin upload files into the appropriate fields:
    • BL โ†’ BL_*.tar.md5
    • AP โ†’ AP_*.tar.md5
    • CP โ†’ CP_*.tar.md5
    • CSC โ†’ CSC_*.tar.md5 (select HOME_CSCif you want to save the data).
    • Press Start and wait for completion (do not disconnect the cable!).

    After the firmware is installed, the phone will reboot. The first boot may take up to 15 minutes - do not interrupt the process. If a logo Samsung with an exclamation mark appears on the screen, it means that the firmware is not suitable for your model or region (CSC).

    Error in Odin Cause Solution
    FAIL! (Auth) Incompatible version Odin or firmware Use Odin 3.14.1 for old models or Patched Odin for new ones
    NAND Write Start!! โ†’ freeze Damaged section USERDATA Repeat the firmware from CSC (not HOME_CSC)
    SW REV CHECK FAIL The firmware is older than the current version of the bootloader Download a newer firmware or flash BL separately
    โš ๏ธ Attention: On devices Samsung with Exynos 9820/990 (for example, Galaxy S10/S20), firmware of an unofficial version of Android can lead to loss of 5G support. This is due to blocking of modem firmware at the bootloader level.

    6. Method 4: Installing custom firmware via TWRP

    Custom firmware (for example, LineageOS, Pixel Experience, HavocOS) provide access to new versions of Android on older devices, but require unlocked bootloader an installed TWRP Recovery.

    Warning: Installation of custom firmware:

    • ๐Ÿšซ Void of warranty (trigger Knox on Samsung).
    • ๐Ÿšซ May break Widevine L1 (no HD in Netflix, Disney+).
    • ๐Ÿšซ On some devices disable VoLTE i Wi-Fi Calling.

    Step-by-step guide:

    1. Unlock the bootloader (for Xiaomi - via Mi Unlock Tool, for Pixel - command fastboot flashing unlock).
    2. Install TWRP Recovery:
      fastboot flash recovery twrp-3.7.0_9-0-lavender.img
      

      fastboot reboot recovery

      (replace lavender with the code of your device, for example, davinci for Redmi K20 Pro).

    3. Download the firmware (ZIP file) and GApps (if you need Google services) from the site OpenGApps.
    4. In TWRP execute:
      • Wipe โ†’ Advanced Wipe (check Dalvik, Cache, System, Data).
      • Install โ†’ select ZIP firmware โ†’ Add more ZIPs โ†’ select GApps.
      • Swipe to confirm.
  • After installation, select Reboot System.
  • The first download of custom firmware may take up to 20 minutes. If the device is stuck on the logo for more than 30 minutes, it means that the firmware is incompatible with your kernel or the necessary ones are missing. firmware-files.

    ๐Ÿ’ก

    Before installing custom firmware, check its compatibility with your model on the forum XDA Developers. This is especially important for devices with processors MediaTek (for example, Redmi Note 8 Pro), where incorrect firmware can cause damage. section preloader.

    7. What to do if the phone does not work after reinstallation

    Even if you strictly follow the instructions, problems may arise.

    Problem Possible cause Solution
    The phone does not turn on (black screen) The bootloader is damaged or the firmware is incompatible Repeat the firmware with the correct one version BL (bootloader)
    Loading in a loop (bootloop) Error in the section system or vendor Flash system.img and vendor.img separately via Fastboot
    No network (IMEI invalid) Partition damaged modem or EFS Restore EFS from backup or flash CP (for Samsung)
    Touchscreen does not work Incompatible firmware or damaged dtbo.img Flash original dtbo.img or return to stock firmware
    Wi-Fi/Bluetooth does not turn on Missing files WCNSS_qcom_cfg.ini or bnv Download the correct version firmware for your model

    If the phone has turned into a โ€œbrickโ€ (hard brick), when even Fastboot or Download Mode are unavailable, radical measures remain:

    • ๐Ÿ”ง JTAG resuscitation: requires soldering work and special equipment (for example, RIFF Box or EasyJTAG). data-i="388">).You need an adapter EFS or preloader.
    • ๐Ÿ“ก ISP firmware: firmware directly via memory contacts (eMMC or UFS). Need adapter ISP and a programmer (UFI Box).
    • ๐Ÿฅ Service center: if you have no experience in microelectronics, it is better to turn to professionals. The cost of restoration is from 3,000 to 10,000 rubles.
    โš ๏ธ Attention: On devices with chipsets Qualcomm (most Xiaomi, OnePlus, Realme) with hard brick sometimes the EDL (9008)mode helps. To enter it, you need to short-circuit the test points on the board or use Deep Flash Cable. Firmware in this mode is done via QFil or Mi Flash Tool.

    8. FAQ: Frequently asked questions about reinstalling Android

    Is it possible to reinstall Android without a computer?

    Yes, but with reservations:

    • If the phone turns on, do reset to factory settings via Settings โ†’ System โ†’ Reset or Recovery Mode.
    • Some devices (Samsung, LG) have a built-in restore function via OTA (update over the air), but it only works if the system boots.
    • For a complete flashing without a PC you need root an application like FlashFire (not supported on new Android).

    Without a computer It is impossible Flash the phone if it does not turn on or the bootloader needs to be unlocked.

    How can I find out which firmware is suitable for my phone?

    Check the following parameters:

    1. Device model: dial ##4636## or look in Settings โ†’ Phone information โ†’ Model.
    2. Region (CSC): for Samsung this is critical. You can find out in Settings โ†’ Phone information โ†’ Software information (last 3 letters, for example, SER for Russia).
    3. Bootloader version: in Fastboot Mode enter fastboot getvar all and find the lines bootloader-version or version-bootloader.
    4. Processor type: download CPU-Z and check the chipset model (for example, Snapdragon 865 or Exynos 2100).

    Download firmware only from official sources:

    • Samsung: SamMobile, Frija.
    • Xiaomi: Mi Community (section Fastboot ROM).
    • Google Pixel: Google Factory Images.
    • Custom firmware: XDA Developers, LineageOS Wiki.
    I lost my data after reinstallation. Is it possible to recover it?

    The chances depend on the type of reset:

    • Reset via Recovery: the data is erased, but if you did not overwrite the memory, you can try to restore it using DiskDigger or Dr.Fone (required root).
    • Firmware via Fastboot/Odin: if not formatted userdata, there are chances. Use 7-Zip to extract userdata.img from backup TWRP.
    • Full erase (full wipe): recovery is almost impossible, especially on devices with FBE (file-based encryption, Android 10+).