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.
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 Unlockin 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
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):
Download the firmware file (for example,
update.zip) and place it in root folder of the internal memory (not in subfolders!).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 selectRecovery Mode).
- ๐ Samsung:
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 recoveryApply 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:
Download the firmware and, if necessary,
Magisk(for root access) orDisable_Dm-Verity_ForceEncrypt.zip(to disable encryption).Boot in TWRP (the button combination is the same as for stock recovery).
Make a full backup of the current system: press
Backup, select partitionsBoot,System,Dataand save to a memory card.Click
Wipe โ Advanced Wipeand markDalvik/ART Cache,System,Data(if a clean installation is required).Select
Install, specify the path to the firmware file and confirm installation.Once completed, repeat step
Installfor additional zip files (for example Magisk or GApps).Reboot into the system (
Reboot โ System).- ๐จ
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!). - ๐ 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
alphaorexperimentalmay contain critical bugs. - ๐ก Disable encryption (unless necessary). On weak devices (Redmi 4X, Galaxy J5)
Force Encryptslows down the work. - ๐ Create backups before each update. Q TWRP this takes 5-10 minutes, but saves hours of recovery.
- ๐ฑ 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.
Typical errors and their solutions:
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:
After a successful update:
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:
- Connect the device to the PC and copy files via
MTPto TWRP. - Use
OTG cableand a flash drive. - 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:
- Download the latest
Magisk.zipfrom the official website. - Load into TWRP and select
Install. - Flash
Magisk.zipand 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:
- Download the required firmware version.
- Run
Wipe System/Data. - Install the old firmware via recovery.
vendor i modem. Some devices (Pixel, OnePlus) require flashing of all partitions via fastboot.