How to wipe everything from Xiaomi: from reset to factory settings to deep formatting

By erasing all Xiaomi data, you don't just free up space -- you protect personal information from being restored by third parties. But a standard reset through the settings menu often leaves "traces": cache photos, app logs, or even Mi Account backups. This article will help delete everything, including service sections and MIUI data, that aren't cleared in a normal reset.

We’ll look at the methods for different scenarios, from fast phone preparation to sale to deep formatting when sensitive data leaks. Importantly, the procedures for the Redmi Note 12 and Xiaomi 13 Ultra will differ due to different versions of MIUI and memory types (UFS 2.2 vs UFS 3.1). If you plan to sell or transfer a device, pay attention to the section on data recovery protection.

Preparing for complete deletion of data

Before you wipe everything off Xiaomi, follow 3 critical steps:

  • πŸ”„ Unplug Mi Account. Without this, after resetting, the phone will require you to enter your old account (Factory Reset Protection). β†’ Xiaomi account β†’ Get out.
  • πŸ“± Delete. SIM-map SD-Map. External media may still contain copies of files (e.g. WhatsApp or Google Photo backups).
  • πŸ”‹ Charge the phone to at least 60%. interruption of the reset process due to battery discharge can lead to a knock (inoperability) of the device.

If you are using a POCO F5 or newer model with MIUI 14+, check the OEM Unlock status in Settings β†’ About Phone β†’ MIUI version (7 times click on version, then return to Additional β†’ For developers). If the option is disabled, unlock it in advance - this will be required for methods with Fastboot.

πŸ“Š Why you should delete data from Xiaomi?
I'm getting ready to sell.
Eliminate viruses/lag
I'll tell my relative.
I'm changing the firmware.
Other

Method 1: Standard Resetting through Settings

The easiest way is to use the built-in reset feature, which is suitable for most Redmi and Mi users, but does not guarantee 100% deletion of data (snippets remain in the cache and userdata sections).

  1. Open Settings β†’ About the phone β†’ Reset settings.
  2. Choose to Erase All Data (not to be confused with Settings Reset – it only removes settings, not files!).
  3. Enter. PIN-code or pattern lock, if requested.
  4. Confirm the action with the Remove Everything button.

It takes 5-15 minutes, and then you restart it, and it goes back to the box state, but:

What happens after a standard reset?
Even after resetting through the settings on the device can be saved: - Photo fragments in the section /data/media/0/DCIM/.thumbnails. - Logs of system applications in /data/log. - Google Play Services and Mi Cloud Cache /data/data/com.xiaomi*. - Settings MIUI, account-related (if not untied). For complete deletion, use methods with Fastboot or TWRP (see below).

For models with MIUI 13 and later (for example, Xiaomi 12T or Redmi K50), an additional step of checking the account after the reset is added. If you forget the data from Mi Account, you will have to use the Fastboot method.

Method 2: Full formatting via Fastboot

This method removes all partitions, including service partitions (system, vendor, userdata). ADB/Fastboot It is suitable for Xiaomi based on Qualcomm Snapdragon (for example, POCO X5 Pro, Redmi Note 11 Pro+).

Install Platform Tools from Google| Enable USB Debugging in Developer Settings |Unlock bootloader via Mi Unlock Tool | Download firmware for your model with Xiaomi Firmware Updater

-->

Instructions:

  1. Connect your phone to your PC in Fastboot mode (turn off the device, then press Volume Down + Power before the Fastboot logo appears).
  2. Open the command line in the folder with platform-tools and execute: fastboot devices Make sure that the device is determined (serial number should appear).
  3. Enter the command to completely erase: fastboot erase userdata fastboot erase cache fastboot format:ext4 userdata fastboot format:ext4 cache For models with dynamic partitions (Android 10+) add: fastboot wipe-super super
  4. Fastboot flash boot boot.img fastboot flash system.img fastboot flash vendor.img (replace file names with current ones from your firmware).

πŸ’‘

If the phone doesn't turn on after formatting, try flashing persist.img from stock firmware. This section stores data on the screen and camera modules calibration, and damage to it leads to a "black screen."

⚠️ Note: On some models (e.g. Xiaomi Mi 11), the fastboot erase userdata command may lead to an error. FAILED (remote: 'Not allowed in Lock State'.This requires pre-unlocking the bootloader via the Mi Unlock Tool.

Method 3: Deep Formatting with TWRP

TWRP’s cadaver retractor allows for low-level data erasure, including internal storage, which is more efficient than standard reset, but requires a TWRP installed and unlocked bootloader, suitable for the POCO F3, Redmi Note 10 Pro and other popular models.

Instructions:

  1. Install TWRP for your model (see instructions on XDA Developers).
  2. Boot to TWRP (Put Volume Up + Power on the phone off).
  3. Go to the Wipe section β†’ Format Data.
  4. Enter yes to confirm (this will delete everything, including files in /sdcard).
  5. Go back to the main menu and select Reboot β†’ System.

After formatting via TWRP:

  • πŸ“ The internal memory will be formatted into F2FS or ext4 (firmware-dependent).
  • πŸ” Data and cache sections will be completely overwritten with zeros (if the Format Data option is selected).
  • ⚠️ Note: On some devices (e.g. Xiaomi Mi) A3) formatting TWRP It can damage the metadata partition, which will lead to a reboot cycle, in which case you will need to run the firmware. MIUI via Fastboot.

Method 4: Protection against data recovery

Even after full formatting, data can be recovered using specialized software (such as Dr.Fone or EaseUS MobiSaver).

  1. Record random data on top of deleted files: πŸ“± Install Secure Erase from Google Play. πŸ”„ Select DoD mode. 5220.22-M (3 random data passes). ⏳ Wait until it is completed (may take several hours).

Encryption before reset

adb shell sm set-force-encrypt true

After that, perform a standard reset - the data will be encrypted and unavailable for recovery.

For maximum protection on models with UFS-Memory (e.g. Xiaomi 13 Pro) use the command:

fastboot erase --secure userdata

It fills the userdata partition with zeros, making file recovery impossible.

πŸ’‘

The only reliable way to protect against recovery is by combining formatting via Fastboot + recording random data, and standard resetting via settings leaves up to 30% of the data available for recovery.

Method 5: Recovery after a failed reset

If after trying to erase the data, the phone stopped turning on ("brick"), follow this instruction:

Symptoms.Possible causeDecision
Black screen, no response to buttonsThe boot or dtbo section is damagedSwitch to stock boot.img via Fastboot
Hanging on the MI logoError in the system or vendor sectionRun fastboot flash system.img
Cyclical rebootMetadata (on Android 12+) is damagedSwitch super.img with dynamic partitions
No Command error in the RecavΓ©rieMissing or damaged recovery.imgInstall stock recavator through Fastboot

Recovery will require:

  1. Download stock firmware for your model from the official Xiaomi or Xiaomi Firmware Updater website.
  2. Unpack the archive and launch the script flash_all.bat (for Windows) or manually flash each partition through Fastboot commands.
  3. If the device is not defined in Fastboot, use EDL-Download emergency mode with the Mi Flash Tool.

For devices with MIUI Global Stable (e.g. Xiaomi 11 Lite NE) after reset, you may need to re-activate the Mi Account even if it was untied.

  1. Connect to Wi-Fi.
  2. At the welcome stage, click Skip (if the option is available).
  3. If you need to enter an account, use the Fastboot bypass (see Method 2).

Frequent questions

Can I recover data after a Fastboot reset?
Not if you used fastboot erase --secure userdata or format:ext4. These methods overwrite the partition, making recovery impossible. Standard resetting through settings leaves up to 30% of the data available for recovery by specialized software.
Why does the phone ask for an old Mi Account after a reset?
This is Factory Reset Protection (FRP) protection, which is activated if the Mi Account is not untied before reset or the device is tied to a Google account. Solutions: Enter your old account information. Use the Fastboot method to bypass (requires an unlocked bootloader). For models on MediaTek (e.g. Redmi 9A), bypass is possible via SP Flash Tool.
How to delete data from a blocked Xiaomi (I don’t know the password)
If the phone is locked, and USB Debugging not enabled: Download to Fastboot (Loudness down) + Power. Run the stock Recovery through the command: fastboot flash recovery recovery.img Load into the Recaveri (Loudness up) + Power) and select Wipe Data. ⚠️ Note: New models (e.g. Xiaomi) 13) This method may not work due to the blocking of the anti-Rollback.
Does the reset erase data from SD-map?
No, standard reset via settings does not affect external media. SD-The card was used as an internal memory (the option to format as an internal drive), it will be formatted, MIUI 14) the application cache may be stored on SD-To clean the map, remove it before reset and format it separately on your PC.
How do you verify that data has been deleted?
Use utilities to analyze the disk: πŸ–₯️ Disk Digger (for Android) – scans internal memory for file residues. πŸ–₯️ Autopsy (for PC) – a professional tool for finding artifacts. πŸ“± Enter in. ADB Team: adb shell ls -la /data/data/ If the application folders are empty, the data is deleted correctly. 100% Confidence to record random data.