How to completely clean your Xiaomi phone: 3 ways to reset to factory settings

Resetting Xiaomi’s smartphone to factory settings is a procedure that is required in several cases: before selling the device, in case of critical system failures or to delete personal data. However, a complete cleanup involves not only returning settings to default, but also deleting all files, accounts (including Mi Account), as well as resetting bootloader and EEPROM settings (for deep flashing).

Many users mistakenly believe that it is enough to select the option β€œReset settings” in the menu of the phone, in practice, this only deletes user data, but does not always clear the sections. /data and /cache on 100%. Also, if the device was linked to Mi Account with Find Device activated, you may need to enter the previous owner’s login/password after reset. In this article, we will discuss all the ways of complete cleaning, from standard reset to low-level methods through Fastboot and other devices. EDL-regime.

⚠️ Warning: Full reset deletes all data without recovery, including photos, messages and installed apps.If the phone was stolen or lost, cleanup via Find Device will not work - physical access to the device is required.

Before starting the procedure, make sure that:

  • πŸ”‹ Battery charge of at least 50% (to avoid shutdown during resetting).
  • πŸ“± You have a backup of important data (contacts, photos, documents).
  • πŸ”‘ Remember the username/password from Mi Account if it was tied.
  • πŸ› οΈ There is a PC with Xiaomi drivers installed on hand (for methods via Fastboot).
πŸ“Š Why do you want to reset your Xiaomi phone?
I'm getting ready to sell.
I'm fixing the malfunction.
Delete personal data
Another option

1. Standard reset via the settings menu

The easiest way to clean up is to use the built-in Recovery and Reset feature, which is suitable if the phone is turned on, there is no hardware damage, and you remember the password from the Mi Account (if the account was linked).

  • πŸ“ All user files (photos, videos, music).
  • πŸ“± Installed applications and their data.
  • πŸ”§ System settings (Wi-Fi, Bluetooth, wallpaper, etc.).
  • πŸ‘€ Google and Mi Accounts (but not always depending on version) MIUI).

To perform the discharge:

  1. Open Settings β†’ About the phone β†’ Recover and reset.
  2. Select β€œReset” (or β€œDelete all data” in new versions of MIUI).
  3. Confirm the action by entering the pattern lock/PIN-code.
  4. Wait for the reboot (it will take 5-15 minutes).

⚠️ Note: If the phone requires the previous owner to enter Mi Account data after the reset, the Device Protection feature has been activated, in which case either the original account data will be entered or unlocked via Fastboot (see Section 3).

β˜‘οΈ Preparation for standard discharge

Done: 0 / 4

2. Reset via Recovery Mode (if the phone is not turned on)

If a Xiaomi smartphone is stuck on the logo, does not respond to touches, or is locked with a password you forgot, Recovery Mode will help.This method works on all models from the Redmi Note 4X to the Xiaomi 13 Ultra, but requires physical access to the device buttons.

Instructions for entering Recovery:

  1. Turn off the phone (press the power button for 10-15 seconds).
  2. Hold the combination: πŸ”˜ Power button + Loudness up (for most models). πŸ”˜ Power button + Loudness down (for older devices, such as Redmi) 3S).

Mi

Recovery

In the recovery menu, use volume buttons for navigation and power button for confirmation.

  1. Wipe Data β†’ Wipe All Data (complete reset).
  2. Confirm (confirmation).
  3. Reboot (reboot after cleaning).

Step-by-step:

  1. Turn off the phone and put it in Fastboot mode: Press the power button + volume down The screen should appear the image of a hare in a hat-eared (Fastboot logo).
  2. Connect your phone to your PC and start the Mi Flash Tool.
  3. In the command line (on PC) run: fastboot devices If the device is defined, type: fastboot erase userdata fastboot erase cache fastboot format data
  4. For a complete reset (including bootloader unlock): fastboot oem unlock Attention! This will delete all data and reset the Mi Account protections.
  5. Reboot the phone: fastboot reboot

πŸ“Œ Key takeaway: The fastboot format data command deletes data without recovery, unlike a standard menu reset.This is the only way to bypass the Mi Account lock if you don't remember the password.

πŸ’‘

If the "Couldn't unlock" error appears after the fastboot oem unlock command, then the bootloader is officially blocked, in this case, you will need to unlock through the Mi Unlock Tool (you need a Xiaomi account and wait 7-30 days).

4. Clean through EDL-regime (for β€œbricksΒ»)

EDL-Emergency Download Mode is a firmware emergency mode that is used when the phone has turned into a β€œbrick” (does not turn on, does not respond to buttons, is not defined in Fastboot). In this mode, the device connects to the PC through a special port Qualcomm 9008, which allows you to reflash it from scratch.

⚠️ Attention: Use EDL demand:

  • πŸ”§ Knowledge in firmware (incorrect actions can finally kill the device).
  • πŸ“₯ Special cable or lintel on the board (for forced entry into the mode).
  • πŸ’Ύ Firmware file in.mbn or.elf format for your model.

How to log into EDL:

  1. Turn off the phone.
  2. Close the contacts Test Point (location depends on the model, for example, for the Redmi Note 8 Pro these are points next to the battery).
  3. Connect. USB-cable to PC – in Device Manager should appear Qualcomm device HS-USB QDLoader 9008.

Use the Mi Flash Tool or QFil for firmware:

  • Select a firmware file (prog_emmc_firehose.mbn).
  • Press Flash and wait until it is completed (10-20 minutes).
  • After successful firmware, the phone will automatically restart.

πŸ“Œ Important: Firmware through EDL deletes all data, including IMEI and the serial number if they were damaged, and they can only be restored using specialized software (e.g., by using a computer system, SN Write Tool).

5. Delete Mi Account after reset (if the phone requires an account)

If the phone requests the previous owner’s Mi Account after the reset, it means that the Find My iPhone feature has been activated.

Method 1: Officially unlocked

  • πŸ“§ Contact the previous owner for account details.
  • πŸ”“ If this is not possible, request unlocking through the Xiaomi website (purchase confirmation will be required).

Method 2: Fastboot (requires unlocked bootloader)

  1. Transfer the phone to Fastboot.
  2. Follow the commands: fastboot oem clean_all fastboot flash userdata userdata.img (file userdata.img You can get it from the official firmware).

Method 3: Flashing through EDL

  • πŸ”„ Completely reflashing through EDL (See Section 4) removes the binding to the Mi Account.
  • ⚠️ Risk: Unofficial firmware may contain viruses or unstable builds.

πŸ“Œ Key takeaway: The only legal way to delete Mi Account without a password is to officially unlock through Xiaomi.All other methods violate the user agreement and can lead to the device being blocked.

Cleaning of internal memory after reset (additional)

Even after a complete reset, your phone may still have junk files in /cache or /misc. To ensure you erase everything, follow these steps:

Step 1: Formatting via TWRP (if installed)

  • πŸ”§ Install a custom Recovery TWRP (Requires an unlocked bootloader).
  • πŸ“ On the menu. TWRP Choose the Wipe β†’ Format Data and enter Yes.

Step 2: Manual cleaning through ADB

  1. Activate debugging over USB in the developer settings.
  2. Connect your phone to your PC and execute: adb shell su rm -rf /data/* rm -rf /cache/*

Step 3: Checking the free space

After cleaning, check the actual state of the memory:

  • πŸ“Š Go to Settings. β†’ Memory.
  • πŸ” If a System or Other partition takes up a suspiciously large amount of space (e.g. 10)+ GB), so the reset didn't go completely.

πŸ“Œ Tip: For deep cleaning, use the utility SD Maid (root rights required) deletes temporary files, cache and remnants of deleted applications.

7.Preparation of the phone for sale: checklist

If you clean your phone before selling, it's not enough to just reset your settings. Follow this checklist to avoid data leakage:

β˜‘οΈ Preparing Xiaomi for sale

Done: 0 / 7

⚠️ Note: If you sell a phone with an unblocked bootloader, the new owner can easily get root rights and recover your data:

fastboot oem lock

Comparison of Xiaomi Cleaning Methods

MethodLevel of cleaningPC requiredDeleting Mi AccountRisk of "bricking"Suitable for
Reset via settingsMedium (deletes user data)❌ No.❌ Not if you were tied up)⚠️ Low.Selling, eliminating minor disruptions
Recovery ModeHigh (formats /data)❌ No.❌ No.⚠️ Medium (Risk of Error in Interruption)The phone is not turned on, the pattern lock is forgotten
FastbootComplete (removes all sections)βœ… Yes.βœ… Yes (when unlocking bootloader)⚠️⚠️ High (for errors in teams)Delete Mi Account, Deep Cleanup
EDL-regimeMaximum (reflashing from scratch)βœ… Yes.βœ… Yes.⚠️⚠️⚠️ Critical (risk of damage to fees)Bricks, hardware failures

FAQ: Frequent questions about Xiaomi cleanup

πŸ”Ή Can data be recovered after a complete reset via Fastboot?
No. The fastboot format data command performs low-level formatting, after which file recovery is impossible (unlike the standard reset via settings, where programs like Dr.Fone sometimes help).
πŸ”Ή Phone after reset asks for old Mi Account.What to do?
This means that the previous owner activated Find Device, Options: Contact them for their account details, if this is not possible, reflash the phone via Fastboot or EDL (see sections 3 and 4).
πŸ”Ή How to Clean Xiaomi if I Forgot My Password and Can't Sign In to Recovery?
If the phone doesn't respond to the button combinations, try: Connect to your PC and use the Mi Flash Tool for forced firmware. Use Test Point to log into EDL (disassembly required). Contact the Xiaomi service center (purchase check required).
πŸ”Ή Will photos be deleted from the memory card when reset?
No. Reset via Settings or Recovery only affects the phone's internal memory.However: If the memory card has been encrypted (Settings option) β†’ Security β†’ Encryption SD-The data on the card will become unavailable after the reset.
πŸ”Ή Can Xiaomi be cleaned without losing warranty?
Yes, if you use a standard reset via settings or Recovery. However: Unlocking the bootloader or firmware through Fastboot/EDL will void the warranty. Xiaomi service center may refuse repairs if they find traces of custom firmware.