Installing updates via recovery is one of the most reliable ways to flash a smartphone when standard methods do not work. This process requires care, but it allows you to update the system even on devices with damaged firmware, a locked bootloader, or without access to the manufacturer's OTA servers. Unlike automatic updating via Settings โ†’ System, manual installation gives control over the software version, the ability to rollback or use custom firmware.

However, not everyone knows that recovery comes in two types: stock (factory) and custom (for example, TWRP). The first is limited by the manufacturer's functions and often does not support the installation of unofficial files, while the second opens up wide possibilities, but requires unlocking the bootloader. In this article we will analyze both options, we will dwell in detail on preparation, choosing the correct firmware file and typical errors that can turn the update into a โ€œbrickโ€.

Before you begin, please note: the process differs for devices of different brands (Samsung, Xiaomi, Google Pixel etc.), and incorrect actions can lead to data loss or damage to the gadget. If you are a beginner, follow the instructions carefully and do not skip the verification steps.

1. Preparing the device: what needs to be done before installation

The first and most important stage is data backup. Installing the firmware through recovery in most cases leads to resetting the settings, and sometimes even completely clearing the internal memory. Even if you upgrade on top of an existing system, the risk of losing photos, contacts or messages remains. Use cloud services (Google Drive, Mi Cloud) or local copying to a PC.

Next check battery charge โ€”it should be at least 50-60%. Interruption of the process due to discharge may render the phone inoperable. Also prepare:

  • ๐Ÿ“ฑ USB cable (original, without damage) for connecting to a PC if necessary.
  • ๐Ÿ’ป Computer with installed drivers ADB/Fastboot (to unlock the bootloader or install a custom recovery).
  • ๐Ÿ“„ File firmware in format .zip (for TWRP) or .img (for stock recovery).
  • ๐Ÿ”ง Tools: ADB, Fastboot, 7-Zip (for unpacking archives).

Pay special attention to the choice of firmware. For stock recovery, only official file from the manufacturer is suitable (for example, update.zip for Xiaomi or BL_AP_CP_CSC_*.tar.md5 for Samsung). Custom firmware (LineageOS, Pixel Experience) are installed only through TWRP and require preliminary unlocking of the bootloader.

โš ๏ธ Attention: On devices Samsung c processors Exynos (series Galaxy S/A/Note until 2022) unlocking the bootloader resets Knox, which voids the warranty and disables functions like Samsung Pay or Secure Folder.
๐Ÿ“Š What type of recovery is installed on your device?
Stock (factory)
TWRP or other custom
I donโ€™t know
No recovery

2. Unlocking the bootloader and installing TWRP (if required)

If you plan to use TWRP or custom firmware, you first need to unlock bootloader. This process differs for different brands:

  • ๐Ÿ“ฑ Google Pixel, OnePlus, Xiaomi: unlocking via command fastboot oem unlock.
  • ๐Ÿ“ฑ Samsung: requires enabling OEM Unlock in the developer and usage settings Odin.
  • ๐Ÿ“ฑ Huawei, Honor: official unlocking has been discontinued, but there are unofficial methods (risky).

After unlocking, install TWRP via fastboot:

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

fastboot reboot recovery

Important: on some devices (for example, Xiaomi with MIUI 12+) stock recovery automatically overwrites TWRP on reboot. To avoid this, after installation, immediately go to TWRP and disable signature verification in the settings (Settings โ†’ Disable DM-Verity).

โš ๏ธ Attention: On devices with dynamic partitions (Android 10+), installing custom recovery may lead to an error Invalid sparse file format at header. In this case, a patched file is required TWRP or use OrangeFox Recovery.

โ˜‘๏ธ Preparing to unlock the bootloader

Done: 0 / 5

3. Selecting the correct firmware file

An error in selecting the firmware file is the most common reason for devices to become bricked. Here's what to pay attention to:

Firmware type File format For which recovery Name example
Official OTA update .zip Stock or TWRP MIUI-V12.5.3.0.RKBCNXM.zip
Full stock firmware .tar.md5 (Samsung), .tgz (Google) Stock only (via Odin/Fastboot) AP_G975FXXU7FUE5_CL20953455_QB34170567.tar.md5
Custom firmware (AOSP) .zip Only TWRP/OrangeFox lineage-19.1-20220614-nightly-redfin-signed.zip
Kernel or mod (Magisk) .zip or .img TWRP (for zip) or Fastboot (for img) Magisk-v25.2.zip

Where to download:

  • ๐Ÿ”— Official firmware: support sites Samsung (Sammobile), Xiaomi (Mi Community), Google (Android Developers).
  • ๐Ÿ”— Custom firmware: XDA Developers, LineageOS Wiki, Telegram developer channels.

Critical: never use firmware from unknown sources (torrents, file hosting services without checking hash sums). In 2023, cases of viruses spreading through fake firmware files for Redmi Note 10 and Galaxy A52.

๐Ÿ’ก

Before downloading, compare the MD5 hash of the file with the official one. To do this, use the utility certutil -hashfile file_name.zip MD5 on the Windows command line or md5sum file_name.zip on Linux/Mac.

4. Step-by-step installation via stock recovery

Stock recovery is limited in functions, but is suitable for installing official updates. The instructions are universal for most devices (Samsung, Motorola, Nokia):

  1. Download the firmware file (for example, update.zip) and place it in root folder of the internal memory (not in subfolders!).

  2. Turn off the phone and hold down the button combination to enter recovery. Popular options:

    • ๐Ÿ”˜ Samsung: Volume up + Bixby + Power.
    • ๐Ÿ”˜ Xiaomi/Redmi: Volume up + Power.
    • ๐Ÿ”˜ Google Pixel: Volume down + Power (then select Recovery Mode).

  • In the recovery menu select Apply update from ADB (if updating via PC) or Apply update from SD card (if the file is on a memory card).

  • Confirm the installation and wait for completion. A process log will appear on the screen with a green check mark when completed.

  • Select Reboot system now.

  • On devices Samsung s Odin Mode the process is different: the firmware is installed via a PC using the app Odin. The firmware file usually has an extension .tar.md5 and contains several sections (AP, BL, CP, CSC).

    โš ๏ธ Attention: If there is no option in the stock recovery Apply update, your device does not support manual OTA installation. Trying to flash an incompatible file will result in an error. E:footer is wrong.
    What to do if the recovery does not see the update.zip file?

    Check that the file is named exactly update.zip (without extra characters). Some recovery does not support long names or Cyrillic alphabet. Also make sure that the file is not damaged - try unpacking it on your PC.

    5. Installation via TWRP: nuances and possible errors. data-i="167">offers more features, but also requires caution. Basic steps:

    TWRP offers more opportunities, but also requires caution. Basic steps:

    1. Download the firmware and, if necessary, Magisk (for root access) or Disable_Dm-Verity_ForceEncrypt.zip (to disable encryption).

    2. Boot in TWRP (the button combination is the same as for stock recovery).

    3. Make a full backup of the current system: press Backup, select partitions Boot, System, Data and save to a memory card.

    4. Click Wipe โ†’ Advanced Wipe and mark Dalvik/ART Cache, System, Data (if a clean installation is required).

    5. Select Install, specify the path to the firmware file and confirm installation.

    6. Once completed, repeat step Install for additional zip files (for example Magisk or GApps).

    7. Reboot into the system (Reboot โ†’ System).

    8. Typical errors and their solutions:

      • ๐Ÿšจ Error 7: firmware incompatibility with the device. Check the model and version.
      • ๐Ÿšจ Error 255: damaged zip file. Re-download the firmware.
      • ๐Ÿšจ Stuck on the logo after reboot: run Wipe โ†’ Format Data (losing all data!).
      ๐Ÿ’ก

      Always install the firmware and Magisk/GApps in the same TWRP session. Rebooting between installations of zip files may result. to bootloop (loop reboot).

      6. Solving problems after installation

      Even with a successful installation, problems may occur. Here are the most common ones and how to fix them:

      Problem Possible cause Solution
      The phone does not turn on (black screen) Incompatible firmware or interrupted installation Repeat the firmware after Fastboot or Odin s full reset (fastboot erase userdata)
      Stuck on the logo (bootloop) Modules conflict or incorrect Wipe Enter recovery, run Format Data and reinstall the firmware
      No network or IMEI reset Partition damaged modem or EFS Restore backup EFS or flash stock firmware
      Applications crash Incompatibility GApps or absence Dalvik Cache Reinstall GApps or run Wipe Dalvik Cache

      If after the update IMEI or Wi-Fi MAC addresss disappear, this means the partition is damaged. EFS. You can only restore it from a backup (if you have one) or through a service center. On devices Qualcomm sometimes flashing the file nvdata.bin via QPSThelps, but this is risky for beginners.

      To diagnose problems, use the recovery log. It is saved in TWRP it is saved in /tmp/recovery.log. Copy it to your PC and examine the lines with errors (for example, E:unknown command or failed to mount /system).

      7. Security and optimization tips

      To minimize risks, follow these recommendations:

      • ๐Ÿ”’ Check the sources of firmware. Even XDA Developers come across fake files. Check hash sums and read reviews.
      • ๐Ÿ”‹ Do not use unstable builds. Firmwares marked alpha or experimental may contain critical bugs.
      • ๐Ÿ“ก Disable encryption (unless necessary). On weak devices (Redmi 4X, Galaxy J5) Force Encrypt slows down the work.
      • ๐Ÿ”„ Create backups before each update. Q TWRP this takes 5-10 minutes, but saves hours of recovery.

      After a successful update:

      • ๐Ÿ“ฑ Reboot the device 1-2 times - this will stabilize the system.
      • ๐Ÿ”ง Check the settings Settings โ†’ System โ†’ Software update โ€” sometimes additional patch installation is required.
      • ๐Ÿ›ก๏ธ Install an antivirus (for example, Malwarebytes) and scan system - custom firmware may contain vulnerabilities.
    ๐Ÿ’ก

    If after the update the phone begins to heat up or quickly discharges, check the background processes via Settings โ†’ Battery. Often unoptimized kernels or Google services are to blame.

    FAQ: Frequently asked questions about updating through recovery

    Is it possible to update through recovery without losing data?

    Yes, if you install incremental OTA update (for example, from MIUI 12.5 to 13.0) through stock recovery. However, when switching to another version of Android (for example, from 11 to 12) or installing custom firmware Wipe Data required. Always make a backup!

    Why doesnโ€™t TWRP see the internal memory?

    This happens because encryption is enabled (File-Based Encryption). Solutions:

    1. Connect the device to the PC and copy files via MTP to TWRP.
    2. Use OTG cable and a flash drive.
    3. Format Data (loss of all data!).

    How to return stock recovery after TWRP?

    Download the official recovery file for your model (usually included in the stock firmware) and flash it through fastboot:

    fastboot flash recovery stock_recovery.img
    

    fastboot reboot

    On Samsung the stock recovery is restored automatically when flashing the firmware via Odin (the checkbox Auto Reboot must be unchecked).

    What to do if there is no root access after the update?

    Root (Magisk) is reset when the system is updated. Install it again via TWRP:

    1. Download the latest Magisk.zip from the official website.
    2. Load into TWRP and select Install.
    3. Flash Magisk.zip and reboot.

    If the root does not appear, check the version Magisk (for Android 12+ you need 24.0+).

    Is it possible to roll back the update through recovery?

    Yes, if you have a backup in TWRP or the official firmware of the old version. To rollback:

    1. Download the required firmware version.
    2. Run Wipe System/Data.
    3. Install the old firmware via recovery.
    Attention: rolling back to an older version of Android (for example, from 13 to 11) can lead to problems with vendor i modem. Some devices (Pixel, OnePlus) require flashing of all partitions via fastboot.