Saving Android firmware is a critical step before any manipulation of the system: from manual updating to unlocking the bootloader. Without a backup, you risk losing not only user data, but also the ability to return the phone to a working state if it fails. This article will help you figure out how to properly create a firmware backup on devices from Samsung, Xiaomi, Google Pixel and other brands - taking into account the characteristics of each manufacturer.
We will look at both standard methods (via recovery and ADB), and alternative solutions for devices with an unlocked bootloader. We will pay special attention to the nuances: why backup via TWRP does not always save you, how to bypass manufacturer restrictions, and what to do if the phone does not turn on. If you are planning experiments with custom firmware or just want to be on the safe side before visiting a service center, these instructions are for you.
Why you need to save the firmware: 3 scenarios when a backup will save your phone
Many users think about backing up the firmware only after the phone turns into a brick. Meanwhile, there are at least three situations when system backup becomes the only way to avoid expensive repairs:
- ๐ Failed update. Even official OTA updates sometimes break devices. For example, owners Samsung Galaxy S20 after upgrading to One UI 5.1 faced endless reboots - without a firmware backup, it was possible to restore functionality only through a service center.
- ๐ Unlocking the bootloader. On devices Xiaomi, Huawei i Google Pixel this procedure erases all data, including the partition
/system. Without a backup copy, you will even lose the opportunity to roll back to the factory firmware. - ๐ ๏ธ Repair or replacement of components. Service centers do not always use original software. After replacing the display or battery on iPhone (yes, this also applies to Android devices with similar protections), a warning about a โnon-original partโ may appear - a firmware backup will help return the original state.
It is important to understand the difference between a backup user data (photos, contacts, messages) and backup firmware. The first can be done through Google Drive or Samsung Cloud, and the second requires special tools. The firmware includes:
- ๐ฑ System kernel (
boot.img) - ๐๏ธ System partitions (
/system,/vendor) - ๐ Bootloader (
recovery,bootloader) - โ๏ธ Modem software (
modem,radio)
โ ๏ธ Attention: On devices with a locked bootloader (most smartphones out of the box), creating a full backup of the firmware is impossible without unlocking. Attempt to read system partitions will result in Permission denied errors in ADB or TWRP.
Method 1: Standard recovery (for beginners)
If your phone supports creating backups via standard recovery (stock recovery), this is the simplest method. However, it is not available on all devices. For example, Samsung and Google Pixel do not provide such a function, and on Xiaomi it may be hidden.
To check for the option:
- Turn off the phone.
- Hold the combination buttons to enter recovery (usually
Power + Volume up, but on Sony Xperia it can bePower + Volume down). - In the recovery menu, look for the item
BackuporBackup & Restore.
If there is an option, follow the instructions on the screen. Usually the process takes 5-15 minutes, and the result is saved to the internal memory or SD card in the folder /TWRP/BACKUPS/ (yes, even in standard recovery).
| Manufacturer | Support backup in stock recovery | Alternative method |
|---|---|---|
| Xiaomi (MIUI) | โ No (except for old models) | Fastboot commands or TWRP |
| Samsung (One UI) | โ No | Odin + firmware in format .tar.md5 |
| Google Pixel | โ No | ADB or Fastboot |
| OnePlus (OxygenOS) | โ ๏ธ Partial (user data only) | TWRP or MSM Tool |
โ ๏ธ Attention: Backup through standard recovery often creates incomplete copies, excluding critical sections likemodemorefs. This method is not suitable for a complete system recovery.
If your recovery does not have a backup option, but there is an item Apply update from ADB, this means that the manufacturer allows partial backup via a computer. Connect your phone to the PC and use the command adb backup --twrp (ADB installed is required).
Method 2: TWRP - a universal solution for unlocked devices
TWRP (Team Win Recovery Project) is a custom recovery that allows you to create full backups of the firmware, including boot partitions. However, to use it you need:
- ๐ Unlocked bootloader (
OEM Unlockin the developer settings). - ๐ฑ TWRP support for your model (check on official website).
- ๐ป Computer with installed drivers
ADBiFastboot.
Instructions for installing TWRP and creating a backup:
- Download the TWRP image for your model (for example,
twrp-3.7.0_9-0-redfin.imgfor Google Pixel 5). - Connect the phone to the PC in
Fastboot(holdPower + Volume downwhen turning on). - Run the command:
fastboot flash recovery twrp-3.7.0_9-0-redfin.imgfastboot reboot recovery - In the TWRP menu select
Backup, check all sections (especiallyBoot,System,Vendor,Modem) and start the process.
The result will be saved in the folder /TWRP/BACKUPS/[serial_number]/. The main advantage of TWRP is the ability to restore the firmware even if the phone does not turn on (provided that the bootloader is not installed). blocked).
โ๏ธ Preparing for backup via TWRP
โ ๏ธ Attention: On some devices (for example Samsung Galaxy S22 s One UI 5.0+) installing TWRP can lead to a trigger KNOX and loss of warranty. In addition, after updating the system via OTA, custom recovery often crashes - you will have to reinstall it.
Method 3: ADB Backup - partial backup without root
If unlocking the bootloader is not possible (for example, on corporate devices), you can try create a backup via ADB (Android Debug Bridge). This method does not require root access, but has serious limitations:
- โ Works on any Android device with USB debugging enabled.
- โ Does not copy boot partitions (
boot,recovery). - โ Many manufacturers (including Huawei and Xiaomi) block backup of system applications.
Instructions:
- Enable
USB debuggingin the developer settings (Settings โ About phone โ Build number- tap 7 times). - Connect the phone to the PC and run the command:
adb backup -apk -obb -shared -all -f backup.abwhere:
-apkโ backup applications,-sharedโdata on the SD card,-allโall supported data.
The file backup.ab will be created in current folder on the PC. To restore, use:
adb restore backup.ab
Critical nuance: ADB Backup does not save the firmware in the usual sense - only user data and some system settings. This method is not suitable for fully restoring the system after a failure.
What to do if ADB gives the error "adbd cannot open"
This error occurs when when the ADB service on the phone is not running or is blocked by the manufacturer. Try:
1. Restart the phone and PC.
2. Use another USB cable (preferably the original one).
3. Enable the option in the developer settings Cancel USB debugging authorization, then connect again.
4. On devices Xiaomi disabling MIUI Optimization in the developer settings can help (Settings โ Advanced โ For developers โ Disable MIUI optimization).
Method 4: Fastboot - backup firmware for devices with a locked bootloader
Method Fastboot allows you to create a firmware dump even without unlocking the bootloader, but does not work on all devices. For example, Google Pixel and OnePlus allow reading partitions, but Samsung and Huawei โblock.
Instructions:
- Install
Fastbootand drivers for your device. - Switch the phone to mode
Fastboot(usuallyPower + Volume Down). - Get a list of available partitions:
fastboot getvar all - Create a dump of each partition separately. For example, for
bootandsystem:fastboot flash boot boot.imgfastboot flash system system.imgHowever to read, you will need the command:
fastboot dump boot boot.imgfastboot dump system system.img - ๐ฑ Samsung Odin:
- Supports firmware in the format
.tar.md5. - Can create a backup via the option
Dump(hidden in some versions). - Works only with official firmware from Samsung.
- Supports firmware in the format
- ๐ง LGUP (for LG):
- Allows you to save the firmware in the format
.kdz. - Requires a special cable LG USB Driver.
- Allows you to save the firmware in the format
- ๐ฎ Sony Emma (for Sony Xperia):
- Official tool for restoring firmware.
- Supports backup via
Newflasher(unofficial fork).
Ready images (.img) can be flashed back later using the same commands. The main disadvantage of the method is manual work with each section. For automation, use scripts like fastboot_enhance (available at GitHub).
| Section | Description | Importance for backup |
|---|---|---|
boot |
Kernel and ramdisk | โญโญโญโญโญ |
system |
Main Android OS | โญโญโญโญโญ |
vendor |
Drivers and proprietary software | โญโญโญโญ |
modem |
Modem firmware (communication, GPS) | โญโญโญโญ |
efs |
IMEI and serial numbers | โญโญโญโญโญ |
โ ๏ธ Attention: On devices with Dynamic Partitions (Android 10+) disk layout may vary. For example, Google Pixel 4 instead ofsystemis usedsuper. To work with such partitions, you will need a toollpunpack.
Method 5: Firmware through official utilities (for Samsung, LG, Sony)
Some manufacturers provide their own tools for backing up and restoring firmware. Their main advantage is compatibility with locked bootloaders, and the disadvantage is that they are tied to a specific model.
Overview of popular utilities:
Example of working with Odin:
- Download the latest version of Odin (for example,
Odin3 v3.14.4). - Switch the phone to mode
Download Mode(Power + Volume down + Bixbyfor Samsung). - Connect the device to the PC - a message will appear in Odin
Added!!. - Press
Dumpand select the folder to save the firmware.
Firmware files will be saved as separate .img or .bin For recovery, use the same utility, but selecting the option Flash.
Official. Utilities (Odin, LGUP) are the only way to create a backup of the firmware on devices with a locked bootloader and without root access. However, they only work with original software and can reset user data.
What to do if the phone does not turn on: emergency methods
If the device does not respond to the power button, but is detected by the computer in Fastboot or EDL (Emergency Download Mode), there is still a chance to save the firmware. Let's consider two scenarios:
1. The phone is visible in Fastboot
Use the command to dump critical partitions:
fastboot dump boot boot.imgfastboot dump recovery recovery.img
fastboot dump system system.img
If the phone does not respond to commands, try flashing temporary recovery:
fastboot boot twrp-3.7.0.img
This will launch TWRP without installation, allowing you to create a backup.
2. Phone in EDL mode (Qualcomm 9008)
For devices on processors Qualcomm (most Xiaomi, OnePlus, Sony):
- Download
QFilorMi Flash(for Xiaomi). - Connect the phone to the PC by holding the buttons
Power + Volume up(to enter EDL you may need to close the contacts on the board). - In the utility, select
Read Backand specify the path to save firmware.
In EDL mode, you can restore even a completely โbrickedโ device, but the process requires technical skills. For Mediatekdevices (Realme, Oppo), a similar mode is called BROM and works through SP Flash Tool.
โ ๏ธ Attention: Work in EDL/BROM mode can lead to hardware damage if you use incorrect firmware or interrupt the process. For example, flashing a file preloader from another model Mediatekdevice is guaranteed to kill the phone.
FAQ: Frequently asked questions about Android firmware backup
Is it possible to save the firmware without unlocking the bootloader?
Yes, but with serious limitations. On most devices, you can only backup user data through ADB Backup or standard means (for example, Samsung Smart Switch). A complete firmware dump (system, boot) without unlocking is only possible through exploits (for example, DirtyCOW on older versions of Android) or the manufacturer's official utilities (Odin for Samsung, LGUP for LG).
How to check the integrity of a backup firmware?
To check, use:
- ๐น Checksums: Compare MD5/SHA-1 hashes of the original and saved files (
certutil -hashfile backup.img MD5in Windows). - ๐น Mounting images: Connect
system.imgas a disk in Linux or viaDiskInternals Linux Readerin Windows. - ๐น Test recovery: Try flashing the backup to another device (if any) or to the emulator.
If the backup was created via TWRP, check the log file /TWRP/BACKUPS/log.txt โthere should be no errors like this Failed to mount /system.
How much space does a full firmware backup take?
The volume depends on the model and version of Android:
- ๐ฑ Budget devices (Android Go, Redmi 9A): 1โ3 GB.
- ๐ฑ Flagships 2020โ2022 (Samsung Galaxy S21, OnePlus 9): 4โ8 GB.
- ๐ฑ Modern flagships (Google Pixel 7, Xiaomi 13): 8โ12 GB (due to section
superwith dynamic partitions).
We recommend using an external drive or PC to store backups. Compression (for example, through 7-Zip with the LZMA2 algorithm) can reduce the volume by 30-50%.
Is it possible to restore a firmware backup to another device?
Technically yes, but strongly not recommended. The firmware is tied to:
- ๐น Hardware platform (for example,
msm8998for Snapdragon 835). - ๐น Screen and sensor resolutions.
- ๐น IMEI and serial numbers (section
efs).
An exception is restoration to an identical model (for example, from Xiaomi Redmi Note 10 to another Redmi Note 10). In this case, first check that the versions match bootloader and modem.
How often should you update the firmware backup?
Recommended frequency:
- ๐ After each update systems (even minor).
- ๐ Before installing custom firmware or modifications (root, Magisk).
- ๐ Once every 3-6 months for everyday use.
Tip: keep at least 2 latest versions of backup. For example, if after updating to Android 13 bugs appear, you can roll back to Android 12.