Creating a backup copy of the firmware Android is like insurance for your smartphone. One wrong step when flashing the firmware, an unsuccessful update or experiments with custom ROMs can turn the device into a โbrickโ. But if you have a backup of the original firmware, you can always bring your phone back to life. In this article we will analyze all the current backup methods - from simple ones for beginners to advanced ones for experienced users.
It is important to understand that a firmware backup is not the same as a backup of user data (photos, contacts, messages). Here we are talking about saving system partition, the bootloader, modems and other critical components that are responsible for the operation of the device at a low level. Without them, even after successful flashing, problems may arise with the network, camera or sensors.
We will look at methods for devices with root access and without them, and also focus on the nuances for popular brands - Samsung, Xiaomi, Google Pixel and others. If you plan to experiment with firmware, modify the system, or just want to be on the safe side, these instructions are for you.
Why you need to backup Android firmware
Many users neglect backup until they encounter problems. Here are the most common situations when a firmware backup saves the device:
- ๐ Unsuccessful firmware โ if the new firmware contains errors or is not suitable for your model, you can roll back to the working version.
- ๐ ๏ธ Experiments with custom ROMs โfor example, installation LineageOS or Pixel Experience may lead to loss of functionality (NFC, camera, mobile network).
- ๐ฑ Problems after the update OTA - sometimes official updates โbreakโ the device (for example, known bugs with battery drain or overheating).
- ๐ Loss of root access โafter updating or resetting the settings, you may need to get root again, and without a backup this becomes more complicated.
- ๐ฐ Sale or transferring a phone โif you are selling a device with custom firmware, the new owner may want to return the stock one.
Backup is especially relevant for devices with locked by the bootloader (for example, Samsung s KNOX or Xiaomi s Mi Anti-Rollback). In such cases, unsuccessful firmware can lead to complete loss of the ability to unlock the bootloader in the future.
โ ๏ธ Attention: On some devices (for example, Samsung Galaxy s Exynos or MediaTek) incorrect backup may cause the flag KNOX (0x1) to be triggered, which will void the warranty and block some functions (for example, Samsung Pay or Secure Folder).
Preparing the device for backup
Before you start creating a backup, you need to complete several important steps. This will help avoid mistakes and ensure successful recovery in the future.
1. Checking the model and firmware version
Each device has a unique model and firmware version. For example, Samsung Galaxy S21 may have options SM-G991B (global) and SM-G991U (USA), and the firmware for them is incompatible. To find out the exact data:
- ๐ฑ Go to
Settings โ About phone โ Software information. - ๐ Write down device model, Android version i build number (for example,
RP1A.200720.012). - ๐ Check on the forums (for example, XDA Developers or 4PDA) the compatibility of your model with tools for backup.
2. Unlocking the bootloader
For most backup methods (except backup via TWRP on some devices) the unlocking process differs depending on the manufacturer: unlocked bootloader. The unlocking process differs depending on the manufacturer:
- ๐ Google Pixel, OnePlus, Xiaomi: unlocking via command
fastboot oem unlock. - ๐ Samsung: requires enablement
OEM Unlockin the developer and usage settings Odin. - โ ๏ธ Huawei, Honor: official unlocking of the bootloader has been discontinued, unofficial methods will be required.
โ ๏ธ Attention: Unlocking the bootloader Samsung flag is triggered KNOX, which may lead to loss of warranty and some functions (for example, Samsung Health or Samsung Pass). Xiaomi requires account linking Mi and waiting 7-15 days.
3. Installing the necessary tools
Depending on the chosen method you will need:
| Method | Necessary tools | Complexity level |
|---|---|---|
| Backup via TWRP | TWRP Recovery, ADB/Fastboot, memory card or PC | Medium |
| Backup via SP Flash Tool | SP Flash Tool, drivers MediaTek, donor firmware | High |
| Backup via Odin (Samsung) | Odin3, original firmware, drivers Samsung | Medium |
| Backup via DD commands (root) | Terminal Emulator or ADB, root access | High |
| Backup via Fastboot | Platform Tools, unlocked bootloader | Medium |
Most methods will require a computer with Windows/Linux i USB cable (preferably original). It is also recommended to use card memory or external drive to store a backup - system partitions can take up to 10โ15 GB.
โ๏ธ Preparing for firmware backup
Method 1: Backup via TWRP (for devices with an unlocked bootloader)
TWRP (Team Win Recovery Project) - this is a custom recovery that allows you to create full backups firmware, including system partitions. This method is suitable for most devices, but requires preliminary installation TWRP.
Step 1: Install TWRP
1. Download the official or unofficial version TWRP for your model from the website twrp.me or thematic forum.
2. Connect the phone to the PC in Fastboot (turn off the device, then press Volume Down + Power).
3. On the command line, run:
fastboot flash recovery twrp-3.7.0_9-0-your_model.img
fastboot reboot recovery
Step 2: Create a backup
1. In the menu TWRP select Backup.
2. Check the following sections:
- ๐
Bootโ system bootloader. - ๐
Systemโ main firmware. - ๐
Dataโ user data (optional if you need to save applications). - ๐
EFSorModemโ partitions with IMEI and network settings (critical for Samsung i LG).
3. Select the save location (recommended external memory card) and run process.
Backup will take from 10 to 30 minutes depending on the amount of data. Upon completion, you will receive a folder with files .img or .winthat can be restored via TWRP at any time.
If you have Samsungbe sure to save the partition EFS separately - its loss will lead to a lack of network (IMEI will be reset to 0049...).
Step 3: Restoring from backup
To restore the firmware:
- Boot into TWRP (
Volume up + Power). - Select
Restoreand specify the backup folder. - Mark the required partitions and confirm the restoration.
โ ๏ธ Attention: On some devices (for example, Xiaomi s Anti-Rollback) restoring the old firmware may block the phone. Before restoring, check the compatibility of versions!
TWRP is a universal backup tool, but requires an unlocked bootloader and the correct recovery version.
Method 2: Backup via SP Flash Tool (for devices on MediaTek)
SP Flash Tool is a utility for working with firmware on chips MediaTek. It allows you to create complete memory dumps, including preloader, bootloader and system partitions. The method is suitable for devices Xiaomi Redmi, Realme, Oppo and other brands on MTK.
Step 1: Preparation
1. Download SP Flash Tool (version 5.2 or later) and drivers MediaTek (for example, LibUSB or VCOM).
2. Find out chipset model your device (you can use the application CPU-Z or Settings โ About phone โ Hardware information).
3. Download stock firmware for your model (for example, from the website NeedROM or Xiaomi Firmware Updater).
Step 2: Creating a memory dump
1. Run SP Flash Tool and load scatter file from the downloaded one. firmware.
2. Go to the tab Readback and add a new region:
- ๐ Specify starting address (for example,
0x00000000for a full dump). - ๐ Set size (you can leave
Autoor specify manually, for example0x100000000for 4 GB).
3. Connect turned off phone to the PC (without battery, if it is removable).
4. Click Read Back and wait for completion (may take 30-60 minutes).
As a result, you will receive a file .bin โthis is a complete memory dump of the device. It can be flashed back through SP Flash Tool in mode Download.
What to do if the SP Flash Tool does not see the device?
1. Check the drivers (install LibUSB or VCOM manually via Device Manager).
2. Try a different USB cable or port (preferably USB 2.0).
3. Disable driver signing in Windows (via gpedit.msc or bcdedit).
4. Try running SP Flash Tool as administrator.
Step 3: Restoring from a dump
1. B SP Flash Tool go to tab Download.
2. Download scatter file and specify the path to the dump in the field User Data (or another section if you are restoring partially).
3. Connect the phone in off state and wait until the firmware is completed.
โ ๏ธ Attention: Incorrectly specifying addresses in SP Flash Tool may lead to loss of IMEI or bootloader damage. If you are not sure, use ready-made firmware instead of a manual dump.
Method 3: Backup via Odin (for Samsung devices)
For smartphones Samsung there is an official tool Odinthat allows you to flash and save partitions firmware. However, a full backup via Odin is only possible using modified versions (for example, Odin3 v3.14.4 with support Dump).
Step 1: Preparation
1. Download Odin3 (for example, from the forum XDA or SamMobile).
2. Install drivers Samsung USB Drivers.
3. Turn on your phone Developer mode (press 7 times on Build number in Settings โ About phone) and activate OEM Unlock.
Step 2: Creating a backup
1. Boot the phone into mode Download Mode (Volume down + Power + Bixby for new models).
2. Connect the device to the PC and launch Odin. A message should appear in the log Added!!.
3. Go to the tab Dump (not available in all versions) and select partitions to save:
- ๐
BLโ bootloader. - ๐
APโ system partition. - ๐
CPโ modem (responsible for the network). - ๐
CSCโregional settings.
4. Click Start and wait for completion.
The backup files will be saved in the format .bin or .tar. They can be flashed back through Odin in the mode AP/BL/CP/CSC.
Step 3: Recovery
1. Boot the phone into Download Mode.
2. Odin specify backup files in the appropriate fields (BL, AP etc.).
3. Press Start and wait for the reboot.
โ ๏ธ Attention: On devices Samsung s Exynos 9820 and newer (for example Galaxy S10, Note 10), flashing unofficial files can lead to locking the bootloader (flag RMM State: Prenormal). In this case, you will need to wait 7 days or use official software.
Method 4: Backup via ADB and DD commands (for devices with root)
If you Yes root access, you can create a backup of the firmware from your phone, without using custom recovery. This method requires knowledge of the command line, but gives maximum control over the process.
Step 1: Preparation
1. Install on PC ADB and Fastboot (for example, via Platform Tools from Google).
2. Enable on your phone USB Debugging (Settings โ For developers).
3. Connect the phone to the PC and check the connection:
adb devices
Step 2: Creating a backup via DD
Command dd allows you to copy partitions byte by byte. For example, to save a section boot:
adb shellsu
dd if=/dev/block/bootdevice/by-name/boot of=/sdcard/boot.img
For other sections, replace boot with the one you need (for example, system, vendor, modem). data-i="340">the entire system partition
ls /dev/block/bootdevice/by-name/
To save entire system partition, use:
dd if=/dev/block/bootdevice/by-name/system of=/sdcard/system.img
The process can take a long time (up to an hour for large partitions). Copy the finished files to your PC: .img copy to PC:
adb pull /sdcard/boot.img C:\backup\
Step 3: Recovery
To restore a partition, use the command:
adb shellsu
dd if=/sdcard/boot.img of=/dev/block/bootdevice/by-name/boot
โ ๏ธ Attention: Incorrect useddmay erase critical sections. Always check the paths (if=โ from where we copy,of=โ where we write). An error in one character (for example,of=/dev/block/mmcblk0instead of a section) will lead to the loss of all data!
The method with DD commands is the most flexible, but requires root and accuracy. Suitable for advanced users who want to save specific partitions.
Method 5: Backup via Fastboot (for devices with an unlocked bootloader)
If you have an unlocked bootloader but are not TWRP or root, you can use Fastboot to save critical sections. This method works on most devices, including Google Pixel, OnePlus, Xiaomi and others.
Step 1: Get a list of partitions
Connect your phone in mode Fastboot and run:
fastboot getvar all
This command will list all available variables, including a list of partitions (for example, boot, recovery, system).
Step 2: Saving partitions
To save a partition boot:
fastboot flash boot boot.img
fastboot reboot
However, for backup you need to first read partition. To do this, use:
fastboot flash backup boot.backup
Unfortunately, not all devices support this command. An alternative is to use dd via adb shell (as in the previous method).
For devices Google Pixel can be used utility PixelFlasherthat automates the backup process through Fastboot.
Step 3: Recovery
To restore a partition:
fastboot flash boot boot.img
โ ๏ธ Attention: On some devices (for example, Xiaomi s Anti-Rollback) restoring the old version of the partitionbootormodemcan block the phone. Before restoring, check version compatibility!
Comparison of methods: which one to choose?
The choice of method depends on your device, level of training and goals. Below is a comparison table:
| Method | Root required? | Require bootloader unlocking? | Supported devices | Complexity | Backup completeness |
|---|---|---|---|---|---|
| TWRP | No | Yes | Most brands (except Huaweisome Samsung) | Medium | Full (all partitions) |
| SP Flash Tool | No | No (but drivers are needed) | Devices on MediaTek | High | Full (memory dump) |
| Odin | No | Yes | Only Samsung | Average | Partial (selected partitions) |
| ADB + DD | Yes | No | Any with root | High | Full (any partitions) |
| Fastboot | No | Yes | Most brands (except Huawei, some Samsung) | Average | Partial (selected sections) |
For most users, the optimal option will be TWRP โit combines backup completeness and relative simplicity. If you have MediaTek, will do SP Flash Tool, it will be suitable for Samsung โ Odin (but with reservations for KNOX). data-i="423">and ADB And Fastboot suitable for experienced users who want more fine-tuning.
Frequent errors and their solutions
When creating a firmware backup, users often encounter problems. Let's look at the most common of them and how to eliminate them.
1. The device is not detected in Fastboot/Odin/SP Flash Tool
Possible causes and solutions:
- ๐ Problems with the cable or port โtry another USB cable (preferably original) and a USB 2.0 port.
- ๐ฅ๏ธ Missing drivers - install Google USB Drivers (for
ADB), Samsung USB Drivers (for Odin) or LibUSB (for SP Flash Tool). - ๐ Locking the bootloader โ on some devices (for example, Huawei) requires unlocking through the official service.
- ๐ Incorrect mode mode โ make sure that the phone is in
Fastboot(Volume down + PowerorDownload Mode(for Samsung).
2. Errors when creating a backup in TWRP
Typical errors and their solutions:
- ๐ซ
E: Unable to mount /dataโ try formattingDatav TWRP (but this will erase user data!). - ๐ด
Error creating backup- check the free space on the memory card (you need at least 10-15 GB). - โ ๏ธ
Failed to backup boot- the partition may be protected. Try getting root or using another method.
3. After recovery, the phone does not turn on
If the device does not boot after restoring the backup:
- ๐ Check whether the firmware version in the backup matches the current version of the bootloader.
- ๐ฑ Try flashing section only