Firmware backup Android is not just a recommendation, but a necessity for those who plan to update the system, install custom firmware or repair the device. Without a backup, you risk losing not only user data, but also critical system files that can turn your smartphone into a โbrick.โ However, not all methods are equally effective: standard tools Android often save only applications and settings, and not the firmware itself.
In this article we will examine 5 ways to create a full firmware backup - from built-in functions to advanced solutions using ADB, TWRP and specialized utilities. You will learn how to save not only user data, but also the boot partition (boot), the system partition (system), and the recovery partition (recovery). We will pay special attention to the nuances for devices with a locked bootloader and without root access.
Before you begin, check: you must have at least 30-50% battery chargean original USB cable and a computer (for most methods). If you are working with Samsung, Xiaomi or other brands with proprietary firmware, please note that some methods may require unlocking OEM Unlock in the developer settings.
1. What is firmware backup and why do you need it? data-i="59">System partition
Backup firmware is a complete copy of all device memory partitions, including:
- ๐ฑ System partition (
system) - OS kernel, drivers, standard applications. - ๐ง Boot partition (
boot) - files necessary to start the system. - ๐๏ธ Recovery partition (
recovery) - environment for recovery or installation of firmware. - ๐ User data (
data) - applications, settings, files (optional). - ๐ Modem section (
modem- files responsible for communications (LTE, Wi-Fi, Bluetooth).
Without such a backup, you will not be able to roll back to the previous version Androidif the update fails, or restore the device after a failure. For example, when installing custom firmware (LineageOS, Pixel Experience), it is often necessary to clear the partition system, and without a backup it will be extremely difficult to return to the stock firmware.
In addition, backup firmware is useful in the following cases:
- ๐ Rollback to the previous version of Android after a failed updates.
- ๐ ๏ธ Device repair (replacement of the motherboard, flashing via EDL).
- ๐ Unlocking the bootloader (on some devices this erases all data).
- ๐งช Experiments with kernels or modifications (for example, installation Magisk).
โ ๏ธ Attention: On devices with Samsung Knox (for example, Galaxy S23, Note 20) unlocking the bootloader or installing a custom recovery may trigger the flag Knox 0x1, which will deprive you of the warranty and access to some functions (for example, Samsung Pay or Secure Folder).
2. Preparing the device before creating a backup
Before starting a backup, you need to complete several critical steps. Skipping any of them can lead to an incomplete backup or even data corruption.
Step 1. Enable USB debugging
Go in Settings โ About phone โ Build number and tap on it 7 times to activate developer mode. Then return to the main settings, open System โ For developers and enable:
- ๐ USB debugging (
USB Debugging). - ๐ OEM unlocking (
OEM Unlocking) - if you plan to work with the bootloader.
Step 2. Install the necessary drivers
The following must be installed on the computer:
- ๐ฅ๏ธ Drivers ADB and Fastboot (for example, via Minimal ADB and Fastboot or Platform Tools from Google).
- ๐ฑ Drivers for your device (for example, Samsung USB Drivers for Galaxy, Mi PC Suite for Xiaomi).
Step 3. Check the available space
A full backup of the firmware can occupy 2 to 10 GB depending on the model. Make sure you have enough space on your computer or external drive. For devices with partition super (dynamic partitions used in Android 10+) may require up to 15-20 GB.
Windows debugging is enabled USB|ADB/Fastboot drivers installed|OEM unlocked (if needed)|Battery charge > 50%|Free space on PC > 10 GB-->
โ ๏ธ Attention: On some devices (for example Huawei or Honor s EMUI) To work withfastbootauthorization through the manufacturer's account is required. Without it, commands may fail with an errorFAILED (remote: 'Token Verify Failed').
3. Method 1: Backup via TWRP (the most reliable method)
TWRP (Team Win Recovery Project) is a custom recovery that allows you to create complete backups of all partitions of the device, including boot, system and data. This method is suitable for most devices with an unlocked bootloader.
Advantages:
- โ
Saves all partitions, including
EFS(IMEI, serial numbers). - โ Supports encryption backups.
- โ You can restore individual partitions.
Disadvantages:
- โ Requires an unlocked bootloader and root (on some devices).
- โ Does not work on devices with
A/Bsections without additional settings.
Instructions:
- Download the official version TWRP for your model from the site twrp.me (file format -
.img). - Reboot the device into mode
fastboot:adb reboot bootloader - Flash TWRP via
fastboot:fastboot flash recovery twrp-3.7.0_9-0-lavender.img(replace the file name with yours).
- Boot into TWRP:
fastboot reboot recovery - In TWRP go to
Backup, select partitions (Boot,System,Data,EFS) and start the process. - Save the backup to an external memory card or computer (via
MTPorADB pull).
Backup in TWRP is saved in the folder /TWRP/BACKUPS/[serial_number]. It can be copied to a PC using the command:
adb pull /sdcard/TWRP/BACKUPS
If you have a device with dynamic partitions (for example, Pixel 4 or OnePlus 8), the TWRP partition may not be displayed. In this case, use system. In this case use fastboot to backup each partition separately (see Method 3).
| Section | Description | Important for backup? |
|---|---|---|
boot |
Kernel and boot files | โ Yes |
system |
System applications and OS | โ Yes |
data |
Custom applications and settings | โ ๏ธ Optional |
EFS |
IMEI, serial numbers, modem data | โ Critical |
recovery |
Recovery environment | โ No (can be restored separately) |
4. Method 2: Backup via ADB (without root)
If you do not have root access or custom recovery, you can create a backup of some partitions via ADB. This method is suitable for devices with a locked bootloader, but it does not save all partitions (for example, boot or recovery will not be available).
What can be saved:
- ๐ User data (
/data) - only if the device is not encrypted. - ๐ฑ System applications (
/system/app). - ๐ Configuration files (
/system/build.prop).
Restrictions:
- โ You cannot copy
boot,recoveryormodem. - โ On Android 10+ many system files are protected
dm-verity.
Instructions:
- Connect the device to the PC and check connection:
adb devices(your device should be displayed).
- Create a backup partition
/data(if it is not encrypted):adb backup -f backup.ab -apk -obb -shared -all(a confirmation request will appear on the device).
- For backup system files, use:
adb pull /system/system/build.prop ./backup/(repeat for the required files).
File backup.ab can be later restored via:
adb restore backup.ab
โ ๏ธ Attention: On devices with MIUI (for example, Xiaomi Redmi Note 11) command adb backup may not work due to manufacturer restrictions. In this case, use Mi PC Suite for a partial backup or unlock the bootloader.
How to bypass adb backup restrictions on Xiaomi?
On some devices Xiaomi command adb backup returns an error adbd cannot open. Solution:
1. Install Magisk and module ADB & Fastboot for Apps.
2. Or use an alternative method via dd (requires root):
su
dd if=/dev/block/bootdevice/by-name/userdata of=/sdcard/userdata.img
(the path to the partition may differ - check via ls /dev/block/bootdevice/by-name/).
5. Method 3: Backup via Fastboot (for devices with an unlocked bootloader)
Method via fastboot allows you to copy any section devices, including those that are not accessible via ADB. This is a universal method that works even without TWRP, but requires an unlocked bootloader.
Advantages:
- โ
Works on any device with
fastboot. - โ
You can back up individual partitions (for example, only
modem).
Disadvantages:
- โ Requires an unlocked bootloader.
- โ Inconvenient for regular backup (you need to manually list partitions).
Instructions:
- Reboot the device into
fastboot:adb reboot bootloader - Look at the list of available partitions:
fastboot getvar all(look for lines like
partition-type:...). - Create a backup of the desired partition (for example,
boot):fastboot flash boot boot.imgfastboot flash boot backup_boot.img(or use
ddvia TWRP). - For partition backup
system(can be large):fastboot pull system system.img
For devices with A/B partitions (for example, Pixel or OnePlus) you need to back up both slots:
fastboot --set-active=afastboot pull system system_a.img
fastboot --set-active=b
fastboot pull system system_b.img
Method via fastboot is the only way to save the partition modem (responsible for IMEI and communication) on devices without TWRP. Its loss may lead to a lack of network after recovery!
6. Method 4: Using specialized utilities (SP Flash Tool, Odin)
For processor-based devices MediaTek (MTK) or Samsung Exynos you can use proprietary ones utilities for creating backups. These tools are often used in service centers and allow you to save complete firmware images, including boot files and calibration data.
For MediaTek (SP Flash Tool):
- ๐ง Supports devices on MT65xx, MT67xx, MT81xx.
- ๐พ Can read and write
preloader,secro,nvram.
For Samsung (Odin):
- ๐ฑ Works only with official firmware (
.tar.md5). - ๐ Requires an unlocked bootloader (on new models - only through EDL).
Instructions for SP Flash Tool:
- Download SP Flash Tool and firmware for your model (for example, from firmwarefile.com).
- B SP Flash Tool select
Scatter-loading File(fileMTxxxx_Android_scatter.txtfrom the firmware). - Click
Readback, add a new region and specify the partition addresses (can be found in thescatterfile). - Connect turned off the device to the PC and wait until reading is completed.
Instructions for Odin (Samsung):
- Download the official firmware (
.tar.md5) for your model from the site samfw.com. - Open Odin, connect the device in
Download Mode(Volume Down + Power + Bixby). - B Odin click
BL,AP,CP,CSCand select the appropriate files from firmware. - Click
Startto flash (this will also create a backup copy of the current firmware in the form of files).
โ ๏ธ Attention: On new devices Samsung (for example, Galaxy S22 and newer) to work s Odin may be required authorization through a Samsung account (function RMM State). Without it, the firmware will block the bootloader.
7. Method 5: Backup through custom scripts (for advanced users)
To automate the process, you can use scripts based on ADB, Fastboot or Python. For example, the script Android Image Kitchen allows you to unpack and edit firmware images, and FlashFire (outdated, but still working application) - to create backups directly from the device.
Example script for backup via ADB (requires root):
#!/bin/bashBackup of all partitions via ADB (root required)
DEVICE=your_device_serial
OUTPUT_DIR=./backup_$(date +%Y%m%d)
mkdir -p $OUTPUT_DIR
adb -s $DEVICE shell "su -c 'for partition in $(ls /dev/block/bootdevice/by-name/); do
dd if=/dev/block/bootdevice/by-name/$partition of=/sdcard/backup_$partition.img
done'" && adb -s $DEVICE pull /sdcard/backup_*.img $OUTPUT_DIR/
Popular tools:
- ๐ Android Image Kitchen - for unpacking and editing
boot.imgirecovery.img. - ๐ฆ FlashFire (outdated, but works on Android 5-9) - backup and recovery without a PC.
- ๐ง Parted - to work with partitions via
ADB Shell.
For devices with A/B partitions (for example, Google Pixel) you can use a script ab-backup:
git clone https://github.com/chenxiaolong/ab-backupcd ab-backup
./ab-backup.sh -v
How to restore a backup via fastboot?
To restore a partition from a backup, use the command:
fastboot flash [partition] [file.img]
Example for boot:
fastboot flash boot backup_boot.img
For devices with A/B stitch both slots in sections:
fastboot --set-active=afastboot flash boot backup_boot.img
fastboot --set-active=b
fastboot flash boot backup_boot.img
8. How to check the integrity of the backup and restore the firmware
Creating a backup is only half the battle. It is equally important check its integrity to make sure that the recovery takes place without errors. Here's what you need to do:
Step 1. Checking hash sums
Compare the checksums (MD5 or SHA-256) of the original partitions and the backup. For example, for boot.img:
md5sum boot.img
md5sum backup_boot.img
If the hashes match, the file is copied correctly.
Step 2. Test recovery
Try to restore the backup on a test device or in an emulator (for example, via VirtualBox s Android-x86). If the device boots, the backup is working.
Step 3. Restore via TWRP
- Boot into TWRP.
- Go to
Restoreand select the folder with the backup. - Check necessary partitions and start recovery.
Step 4. Recovery via Fastboot
If you have a backup in the form of .imgfiles, flash them back:
fastboot flash boot backup_boot.imgfastboot flash system backup_system.img
fastboot reboot
โ ๏ธ Attention: On devices with AVB (Android Verified Boot) (for example, Pixel or OnePlus s OxygenOS 11+) after recoverybootorsystemYou may need to disable signature verification:fastboot flashing unlock_criticalfastboot disable-verity
fastboot disable-verification
1. Correctness of partition firmware (for example, vendor must correspond to the firmware version).
2. Availability of the file vbmeta.img โit also needs to be restored or disabled checking (fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img).
3. Compatibility of the bootloader version (bootloader) and firmware.-->
FAQ: Frequently asked questions about Android firmware backup
๐น Is it possible to make a backup of the firmware without unlocking the bootloader?
Partially - yes. Through ADB you can copy user data and some system files, but critical sections (boot, modem, EFS) will be inaccessible. A full backup is required. unlocking.
๐น How to backup firmware on Samsung with Knox?
On devices with Knox (for example, Galaxy S23) a full backup is only possible through Odin (saving the official firmware) or TWRP (but the flag Knox 0x1will work). An alternative is to use Samsung Smart Switch to backup user data.
๐น How much space does a full backup take? firmware?
Depends on the device:
- ๐ฑ Budget smartphones (for example, Redmi 9A): 3-5 GB.
- ๐ฑ Flagships (for example, Galaxy S22 Ultra): 8-12 GB.
- ๐ฑ Devices with dynamic partitions (Pixel 6): up to 20 GB.
It is recommended to use an external SSD or a high-speed memory card.
๐น Is it possible restore a backup to another device?
No, if the models are different. The firmware is strictly tied to the hardware platform (processor, modem, drivers). The exception is devices of the same line (for example, Redmi Note 10 and Redmi Note 10 Pro), but even in this case, problems with drivers may arise.
๐น What to do if the backup is damaged?
Try to restore it via 7-Zip (files .img sometimes you can unpack it as archive) or use utilities like TestDisk to restore bad sectors. If a backup is critical, contact a service center - they may have tools for low-level memory reading (Chip-Off).