How to make a full backup of Xiaomi phone through Fastboot: instructions with commands and nuances

Backing up via Fastboot is one of the most reliable ways to save data on Xiaomi smartphones when standard methods (via Mi Cloud or Local Backup) are not available, a technique that is especially relevant for owners of devices with unlocked bootloader, custom firmware or after β€œbricking” the phone. Unlike backup through recovery, Fastboot backup allows you to save all memory partitions, including boot, and userdata, which is critical for full system recovery.

The process requires minimal technical skills, but has its pitfalls, from the need to install drivers to the risk of data loss if commands are not executed correctly. In this article, we will take a step-by-step look at how to backup through Fastboot on any Xiaomi phone (including Redmi, POCO What tools are needed and how to avoid common errors.We will pay special attention to the nuances of working with different versions of firmware. MIUI and alternative OS type LineageOS.

What is Fastboot Backup and Why You Need It

Fastboot mode is a low-level interface for interacting with the hardware of a smartphone that allows you to perform operations with memory partitions directly, bypassing the operating system. Backup via Fastboot involves creating byte copies (dump) of all or selected partitions of the phone, which can then be restored even on a dead device.

The main advantages of the method:

  • πŸ”§ Full control: you choose which partitions to save (for example, only the userdata with personal data or the entire system for cloning firmware).
  • πŸ›‘οΈ Reliability: copies are created at the memory level, which eliminates the impact of viruses or OS failures.
  • πŸ”„ Universality: Works even if the phone doesn’t turn on or hovers on the Mi logo.
  • πŸ“± Compatibility: Suitable for all Xiaomi models on Qualcomm and Mediatek chips (if drivers are available).

However, there are limitations to the method, such as the Fastboot backup is not encrypted, it is not secure to store it on cloud services, and it will require the same phone (or an identical model with the same memory markup) to recover, and it is important to understand that some partitions (such as modem or bluetooth) may contain unique calibration data, which will lead to problems with the network or sensors.

πŸ“Š Why you need a Xiaomi backup for?
Firmware update
Installation of custom OS
Recovery after failure
Sale/transfer of telephone
Other

Preparation of telephone and computer

Before you start creating a backup, you need to prepare both the phone and the PC. On the side of the smartphone you will need:

  • πŸ”“ Unlocked bootloader (without this, Fastboot will not give access to partitions).
  • πŸ”‹ Battery charge of at least 50% – the process can take up to an hour.
  • πŸ“Ά Lockdown disabled. MI-account (if the phone is linked to a Xiaomi account).
  • πŸ”Œ Original. USB-cable (cheap cables can cause data transmission errors).

You need to install:

  1. Xiaomi Drivers: Download Mi Phone Manager or use Google’s universal ADB/Fastboot drivers.
  2. Backup program: We recommend MiFlash (the official Xiaomi utility) or Fastboot Enhance (for advanced users).

⚠️ Warning: If you are using Windows 11, disable driver signature verification. To do this, reboot your Shift-clamped PC, select Diagnostics β†’ Additional parameters β†’ Loading parameters β†’ Reboot, then press. F7 (disable mandatory signature verification).

Before connecting the phone to the PC, perform in the command line:

adb devices

If the device appears on the list, the drivers are installed correctly. If not, reinstall them or try another one. USB-port (preferably) USB 2.0).

Step-by-step: creating a backup through Fastboot

When you're done, you can start backing up, and the whole process is three steps: go to Fastboot mode, execute partition dump commands, and save files to your PC.

Step 1: Transfer your phone to Fastboot mode

Turn off the phone. Press the Volume Down + Power buttons at the same time and hold them for 5-10 seconds until the screen with the rabbit in the hat appears.

Step 2: Checking the connection

Open the command line in the platform-tools folder (press Shift + right mouse button β†’ Open in the terminal) and do:

fastboot devices

If the device is determined (the serial number will show), you can continue. If not, check the drivers or cable.

Step 3: Creating a partition dump

For backup of all sections, use the command:

fastboot getvar all

This command will list all the available partitions, copy their titles (e.g. boot, system, userdata) and do for each:

fastboot dump [section name] > [section name].img

Example for the userdata section:

fastboot dump userdata > userdata.img

You can use a script to speed up the process (save as backup.bat):

@echo off


for %%i in (boot system vendor userdata) do (




echo Dumping%%%...




fastboot dump %%i > %%i.img




)




pause

⚠️ Note: Userdata can weigh tens of gigabytes. Make sure there is enough space on the disk, otherwise the process will be interrupted by an error. Use compression: fastboot dump userdata | gzip > userdata.img.gz (requires an installed gzip).

β˜‘οΈ Checklist before backup

Done: 0 / 5

Which sections must be backed up

Not all memory areas are equally important, and below is a table describing key sections and recommendations for backup:

SectionWhat it keeps.Should I backup?Notes
bootThe kernel and boot filesβœ… Yes.It's critical to boot the system. Without it, the phone won't turn on.
systemFirmware (MIUI or custom OS)βœ… Yes.It allows you to restore the original firmware. It weighs 2-4 GB.
userdataPersonal data, applications, settingsβœ… Yes.Largest partition (10-128 GB) and can be backed selectively.
vendorDrivers and brand settings Xiaomiβœ… Yes.It is necessary for the correct operation of the camera, network and sensors.
modemNetwork calibration (IMEI, radio)⚠️ If you wish,Backup is only needed if you plan to change your firmware, and restoring someone else's modem will lead to loss of network!

For most users, it is enough to save boot, system, vendor and userdata. Partitions such as cache or metadata can be skipped - they are restored automatically.

πŸ’‘

If you backup your phone before selling, delete the userdata section after the fastboot erase userdata team has created a copy, which will erase your personal data completely, but leave you with the option to restore it to the new device.

Recovery of the phone from the Fastboot backup

To recover data from the backup, reset the phone to Fastboot mode and connect to the PC. For each partition, run the command:

fastboot flash [section name] [section name].img

Example for the system:

fastboot flash system system.img

Important nuances:

  • πŸ”„ Recovery order: first boot, then system, vendor, and only at the end of userdata.
  • 🚫 Version incompatibility: You can’t restore the system from MIUI 14 on the phone with MIUI 13 - that'll lead to bootloop.
  • πŸ”’ Lockdown MI-account: if the phone was linked to the account, after the recovery of the userdata, you will need to enter a password.

After restoring all sections, perform:

fastboot reboot

The first run can take up to 10 minutes – don’t interrupt the process!

⚠️ Warning: If the phone is stuck on the Mi logo after recovery, try resetting the cache: fastboot erase cache. If that doesn't work, you'll have to reflash the device from scratch.

Common mistakes and their solutions

Even with the correct following of the instructions, errors can occur.

Mistake.Reason.Decision
waiting for devicePhone is not defined by PCCheck the cable, drivers, USB port. Try another version of the platform-tools.
FAILED (remote: 'Not allowed in Lock State')bootloader lockedUnlock the bootloader through the Mi Unlock Tool.
No such file or directoryWrong path to the backup filePlace.img files in the folder from fastboot.exe or specify the full path.
Invalid sparse file format at headerBackup file damaged.Recreate the backup or restore the partition from another source.

If a FAILED (remote: 'Not allowed to flash userdata') error appears when you restore userdata, it means that partition protection is enabled on the phone.

  1. Enter Fastboot.
  2. Run fastboot oem edl (transition to EDL mode).
  3. Use MiFlash to firmware the full image.
What if the backup is interrupted?
If the backup process is interrupted (for example, because of a USB shutdown), check the integrity of the received.img files. The size of each file must match the original partition (you can find out the size by the command fastboot getvar partition-size: [name section]). If the file is smaller, delete it and start the backup again.

Alternative ways of backup for Xiaomi

If Fastboot doesn’t work for some reason, consider alternative methods:

  • πŸ–₯️ Mi Cloud: Automatic backups of contacts, photos and apps. minus the limit on the volume (5 GB on a free account).
  • πŸ“± Local backup: built-in function in Settings β†’ The phone. β†’ Backup: Save applications and settings, but not system files.
  • πŸ”§ TWRP Recovery: Custom recovery with backup function. Suitable for devices with unlocked bootloader.
  • πŸ’Ύ Titanium backup: an application for backup data and applications. Requires superuser rights.

Comparison of methods:

MethodUnlocking requiredSave system filesRecovery on another device
Fastbootβœ… Yes.βœ… Yes.❌ No (only on the same model)
Mi Cloud❌ No.❌ No.βœ… Yes (partially)
TWRPβœ… Yes.βœ… Yes.❌ No.
Local backup❌ No.❌ No.❌ No.

For most users, the best solution is a combination of Fastboot (for system files) and Mi Cloud (for personal data).

πŸ’‘

Fastboot backup is the only way to save all Xiaomi memory partitions, including boot files and firmware, which is indispensable when switching to custom OSes or after serious crashes.

FAQ: Frequent Backup Questions via Fastboot

Can I make a backup through Fastboot without unlocking the bootloader?
No. Without unlocking the bootloader, Fastboot won't give you access to partitions of memory, the only exception being official firmware through MiFlash, but they don't store user data.
How long does it take to build a backup?
Time depends on the amount of data and speed. USB-Port: Boot section (64 MB) – 1-2 minutes; System section (3 GB) – 10-15 minutes; Userdata section (64 GB) – 1-2 hours. USB 3.0 and SSD-The disk will speed up the process by 30-40%.
Can I restore the backup on another Xiaomi model?
No. Memory markup and partition structure are different from model to model, and restoring the backup to an incompatible device will result in a bootloop or a phone that is completely inoperable.
How do you check the integrity of the backup?
Compare the size of the.img files you get with the original partitions. To do this, type in fastboot getvar all and find lines like partition-size:[name]. Translate the value from hexadecimal to decimal (use a calculator). Compare the size of your.img file. For example, if partition-size:userdata is 0x7a120000, it is ~2 GB (but the real userdata is usually much larger).
What to do if IMEI disappears after recovery?
This means that the modem partition has been damaged or not restored. Solutions: Restore modem from the original backup. Use the engineering menu (#4636##) to re-activate IMEI. Fly the phone with the official firmware through MiFlash. ⚠️ Do not restore modem from another phone, this will lead to irreversible loss of the network!