Create a full Xiaomi backup with TWRP Recovery

Owners of Xiaomi, Redmi and POCO smartphones, who are actively experimenting with software, sooner or later face the need to keep the current state of the system intact. Standard cloud services often save only contacts and photos, ignoring application settings, logins, game saves and system parameters. This is where TWRP recovery mode comes to the rescue, allowing you to create an exact copy of all partitions of the device’s memory.

Backup, or backup, is a critical step before installing custom firmware, cores, or system modifications. A flashing error can cause the phone to stop booting, and the only way to bring it back to life is to roll back to a stable version. Understanding how to properly archive data saves hours and nerve cells.

Unlike simple file copying methods, working with Team Win Recovery Project gives you access to low-level partitions of the disk, which allows you to copy not only user data, but also boot sectors that can not be accessed by a regular file manager without root rights.

πŸ“Š What experience do you have with working with TWRP?
I'm a newbie, doing backup for the first time.
I tried it before, but there were mistakes.
I regularly do backups before experiments.
I prefer cloud backups.

Preparation of the device and necessary tools

Before you start any manipulation of memory partitions, you need to make sure that the device is fully ready for the procedure. The first step is to have a TWRP installed and working. If your smartphone is a standard MIUI Recovery, you will not be able to create a full backup, since the functionality of the stock mode is very limited.

The second critical condition is free space: a full backup system can take from 10 to 30 gigabytes depending on the amount of installed applications and the internal memory filling, it is recommended to use an external drive or microSD card if the smartphone model supports its installation.

⚠️ Warning: Make sure the battery is at least 60%, the process of writing large amounts of data is energy-consuming, and suddenly turning off the smartphone in the middle of the procedure can damage the file system.

It is also important to check the integrity of the memory card itself or USB-Recording a damaged sector can render the archive unreadable when it is vitally needed, and can be verified by creating a large test file on a computer.

β˜‘οΈ Checking before the backup

Done: 0 / 4

After entering the recovery mode, which is usually a combination of volume and power buttons, the user is placed in the main menu. We are interested in the Backup button. The interface may differ depending on the version of the recovery, but the logic remains the same for all Xiaomi devices.

In the menu that opens, you'll see a list of copyable partitions. By default, you'll often select system partitions, which isn't enough for a full recovery, and you'll need to manually mark all the items you need to create a full recovery point.

The key areas that need attention are System, Data, and Boot. The System partition contains the operating system files, Data all your applications, settings, and media files, and Boot is responsible for loading the kernel and recoveries, and ignoring any of them will make the backup incomplete.

What is the EFS section and should it be saved?
Section EFS It contains unique identifiers of your device, including IMEI and MAC-Loss of it can cause mobile phone service to fail. TWRP For Xiaomi, it is often hidden or protected, but if you can copy it separately, do it.">Section EFS It stores unique modem calibration data, and losing that partition can cause the phone to stop seeing. SIM-card or lose signal Wi-Fi/Bluetooth. Keeping this section in a separate archive is a best security practice, and some sections, like Cache and Dalvik Cache, may not be saved if you plan to simply clean them up when you restore them. However, the copy of the Data partition is the most voluminous and important for saving the user experience. By default. TWRP offers to save data to the internal memory of the device in the folder /TWRP/BACKUPS/. This is convenient, but risky: if the phone gets so β€œbuzzy” that it requires formatting internal memory, you lose both the system and a copy of it. If your device does not have a card slot, it is recommended to connect USB-flash-drive OTG-cable. TWRP Supports file systems FAT32 And exFAT, which allows you to use large storage. When you select an external drive from the Select Storage menu, make sure it's formatted correctly. If the recavery can't see the flash drive, it's probably formatted into a formatted drive. NTFS, which requires reflashing the kernel or changing the formatting to compatible. Storage type Write speed Failure Recommended Internal Memory High Low (risk of loss of all data) Only for temporary backups MicroSD Card Average High Optimal USB OTG Flash Drive Depends on Flash Drive Very High Recommended for full copies of the Cloud (MTP) Low High Not supported directly in TWRP Archive Creation Process and Time Costs After selecting partitions and target storage, you can proceed to directly creating a copy. On the configuration screen there is usually a Swipe to Upload Slide. Recommended for the process of writing in the data storage time period before the correct storage time is selected for the storage time period of 20 minutes. Do not interrupt the process or try to restart the device, even if it seems that the process is stalled.In some cases, when working with a large number of small files, the speed may drop to a minimum, but the recording continues. ⚠️ Attention: If an error message (Error) appears during the backup, don't ignore it. Most often it indicates broken sectors of the drive or a lack of space. Try again with another media. TWRP If you've done a backup for the sake of an experiment, it's better to choose Reboot System or Reboot Recovery to make sure the phone is running properly. Restore the system from a copy of the script that will be useful to your copy can come at any time: after a failed firmware, installation of an unstable kernel or a virus attack. To restore, you need to go back to TWRP and select the Restore button. In the list that opens, you will see all available backups, sorted by date and time of creation. Select the desired archive. If you changed your phone or reset the recovery settings, you may need to press the Refresh or Select Storage button to specify the path to the remastered section, which copies will appear after the creation of the file. πŸ’‘When you restore the full backup, all the current data on the phone will be permanently deleted and replaced with data from the archive, which is a complete state change, and once the recovery is completed, the device will automatically prompt a reboot. The first launch after a rollback may take longer than usual, as the system will need to re-optimize applications and reassemble the cache. Advanced settings and data encryption Modern versions of Android and shells MIUI They're using encryption by default, which creates more complexity when you're working with them. TWRP. If you see characters that are not clear to you, or if you see a recap asking for a password, then the Data partition is encrypted. TWRP It should be able to unlock the storage, and it usually happens automatically if you type in a pattern lock or pin when you download it. However, older versions of the recovery may require deleting the gatekeeper.pattern.key file or resetting the password through special scripts. TWRP You can find the option to encrypt the backup itself, and if you plan to store the copy on a third-party medium or in the cloud, turning on the password to the archive will add an additional layer of security. Without knowing the password, it will be impossible to restore the data. ⚠️ Attention: Forgotten password from encrypted backup TWRP You can't recover it. The encryption key is stored only in your memory. Write complex passwords to a secure location. Also, in advanced settings, you should pay attention to the Zip Compression option. Archive compression saves space on the memory card, but significantly increases the backup time and processor load. For fast, large-volume memory cards, compression can be turned off. Why? TWRP Often, after creating a full copy and formatting Data, internal memory becomes inaccessible to Android OS. This occurs due to changing the encryption keys. Solution: perform Factory Reset (cleaning Data) TWRP Right after the firmware or backup, so that the system can create new encryption keys (FAQ)