Deleting all files from a Xiaomi phone is a challenge that every user faces when selling a device, transferring it to another person or after being infected with viruses. But simply deleting photos and apps through a file manager does not guarantee complete cleanup: residual data can be recovered using special programs, and Mi Account and Google accounts can remain tied to the device. In this article, we will discuss all the official and hidden ways to erase information from Xiaomi without the possibility of recovery, including resetting via Recovery, formatting internal memory and cleaning through Fastboot.
Xiaomi smartphones (including the Redmi series, POCO, Mi) feature a proprietary shell MIUI, which complicates the process of complete deletion of data. For example, even after resetting through the settings, some system files and the cache of applications can remain in the /data section. In addition, if you plan to sell the phone, it is not enough to simply erase files: you need to untie the device from the Xiaomi account through the official website, otherwise the new owner will not be able to activate the smartphone.
In this instruction, we will consider:
- π Reset to factory settings via settings menu and Recovery.
- ποΈ Formatting internal memory (including hidden partitions).
- π§ Cleaning through Fastboot (for advanced users).
- π Remove the Mi Account before selling.
- β οΈ What to do if your phone is locked or not turned on.
1. Preparation for data deletion: what to do before the reset
Before you start cleaning, follow the steps to avoid losing important information and account issues:
- Back up. Use built-in Settings β About Phone β Backup or third-party services like Google Drive. Note: MIUI backup does not store some applicationsβ data (like WhatsApp or Telegram β they need to be exported separately).
- Delete accounts. Go to Settings β Accounts and sync and delete all associated Google, Mi Account, Samsung (if any) and social media profiles. This will prevent the device from being blocked after the reset.
- Untie the device from Mi Account. Go to account.xiaomi.com, select your phone from the device list, and click Delete. Without this step, the new owner will not be able to activate the smartphone!
If you sell a phone, be sure to unblock Mi Account. Otherwise, the buyer will face a login / password request when you first set up, and unlocking through Xiaomi support can take up to 30 days.
Create a backup in MIUI or Google Drive
Delete all accounts (Google, Mi, social networks)
Untie the device from Mi Account on the official website
Get out. SIM-card and memory card (if any)
Charge your phone at least 50 times%-->
β οΈ Warning: If you forget your Mi Account password, restore it to reset. Once your phone is cleaned, it will be more difficult to restore access to your account - you will need confirmation through a linked number or email.
2. Method 1: Reset to factory settings via MIUI settings
The easiest method is to use the built-in reset feature.It's suitable if the phone is turned on, you have access to the settings menu, and you don't plan to sell the device (e.g., just want to clean it up for personal use).
Instructions:
- Open Settings β About the phone β Reset settings.
- Select βErase All Dataβ (not to be confused with βResetβ β these are different options!).
- Enter. PIN-code or pattern lock, if requested.
- Confirm the action by clicking βDelete everythingβ.
It takes 5-15 minutes, and when you restart, it's like new, but:
- πΉ Not all data is permanently deleted. /data You can recover it with programs like Dr.Fone or DiskDigger.
- πΉ System updates remain. MIUI will not be removed from the factory, will remain the one that was installed at the time of the dumping.
- πΉ Mi Accounts can stay tied, unless you untie them in advance, the new owner won't be able to use the phone.
π‘
If the phone asks you to enter the old Mi Account password after the reset, you haven't untie the device from your account. Solution: go to account.xiaomi.com from another device and remove the phone from your associated device list.
Method 2: Hard Reset via Recovery Mode (for locked phones)
If the phone is not turned on, locked with a pattern lock or password, or got stuck on the MI logo, use Recovery mode. This method works on all Xiaomi models, including Redmi Note 10/11/12, POCO X3/F3, Mi 11/12.
Step-by-step:
- Turn off your phone. If it's frozen, press the power button for 10 to 15 seconds.
- Press the button combination to enter Recovery: For most models: Volume up + Power. For older smartphones (until 2019): Volume up + Volume down + Power.
Mi
Recovery
Use volume buttons for navigation and power button to select the item.
Wipe Data β Wipe All Data
Factory Reset
Confirm
Reboot β Reboot to System
If you don't have Wipe All Data in the Recovery menu, you have custom firmware installed (like LineageOS), and then use Factory Reset or Format Data.
β οΈ Note: Some Xiaomi models (e.g. Redmi Note 8 Pro) may require you to enter a Mi Account password after resetting via Recovery, even if you untie it.This is due to the Mi Cloud Lock feature. Solution: Before reset, disable the Find Device option in your account settings.
What happens if the Recovery Mode does not open?
Method 3: Complete formatting of internal memory (for advanced)
If you want to be guaranteed to delete all data without recovery, including system files and cache, use Fastboot formatting.This method requires a computer and command knowledge, but provides complete cleaning of all partitions, including /data, /cache and /system.
What you need:
- π₯οΈ Computer with Windows/Linux/macOS.
- π Cable USB (preferably original).
- π₯ Utility. ADB & Fastboot Tools (you can download from the official Android website).
- π Unlocked bootloader (if the phone is new, it must be unlocked via the Mi Unlock Tool).
Instructions:
- Install ADB & Fastboot Tools on your computer.
- Turn on the phone Developer Mode (7 times click on the build number in Settings β About Phone) and activate Debugging over USB.
- Connect the phone to your computer and execute in the command line: adb reboot bootloader The phone will reboot to Fastboot mode.
- Check the connection command: fastboot devices must display the serial number of the device.
- Run full formatting: fastboot erase userdata fastboot erase cache fastboot format:ext4 userdata fastboot format:ext4 cache
- Reboot the phone: fastboot reboot
After this procedure, the phone will be completely cleaned, including:
| Section | What's removed | Is it being restored? |
|---|---|---|
| /data | All user files, applications, settings | β No. |
| /cache | Temporary files and application cache | β No. |
| /system | MIUI system files (if you use the format system) | β οΈ Partially (requires flashing) |
β οΈ Note: The fastboot erase and fastboot format commands permanently delete data. /boot), The phone may stop turning on. Use this method only if you are confident in your actions!
Reset via MIUI settings
Hard reset via Recovery
Formatting via Fastboot
Never cleaned it completely.-->
5. Method 4: Delete data via Mi Flash Tool (for "bricks")
If the phone doesn't turn on at all (called a "brick"), but the computer detects it in Fastboot or EDL mode, you can use the official Mi Flash Tool, which not only cleans the data, but also reflashes the phone to the factory version of MIUI.
What you need:
- π₯οΈ Windows computer (7/10/11).
- π₯ Mi Flash Tool (download from the official website).
- π¦ Firmware for your model (choose the Fastboot version, not Recovery).
- π Cable USB (preferably original).
Instructions:
- Install the Mi Flash Tool and unpack the firmware into a folder without Cyrillic characters.
- Turn off the phone and put it in Fastboot mode (clip Volume Down + Power).
- Connect your phone to your computer and start the Mi Flash Tool.
- Click Select and point the way to the firmware folder.
- At the bottom, select Clean All (full clean) or Clean All and Lock (clean + lock bootloader).
- Press Flash and wait until it is completed (5-10 minutes).
Once flashed, the phone will be as new as the factory version of MIUI, and all data, including the Mi Account link, will be deleted.
π‘
Use Clean All and Lock mode only if you plan to sell the phone, which blocks the bootloader, making it harder for the new owner to re-unblock.
Method 5: Cleaning through service codes (hidden MIUI functions)
MIUI has hidden service codes that allow you to reset or clear individual partitions without full formatting, which donβt work on all models, but can be useful in emergency situations.
List of working codes for Xiaomi:
- π’ ##7780## - soft reset (deletes application and settings data, but does not touch media files).
- π’ *2767*3855# β Full reset (analogue of Wipe Data in Recovery).
- π’ ##4636## - Test menu (you can clear the cache and data of individual applications).
How to use:
- Open the Phone app.
- Enter the code as a phone number and press the call.
- Confirm the action if a request appears.
β οΈ Attention: Code *2767*3855# It permanently deletes all data, including files on internal memory. It doesn't require confirmation, so enter it carefully!
7.What to do after cleaning: check and setup
After resetting or formatting, follow a few steps to make sure all data is deleted and the phone is ready to use:
- π Check the memory. Connect the phone to the computer and make sure the folders are in place. DCIM, Downloads, Pictures empty.
- π Update. MIUI. Go to Settings. β Update the system and install the latest firmware version.
- π Set up the protection. Set up a new one. PIN-code or pattern lock, enable data encryption (Settings) β Additionally. β Encryption).
- π± Reactivate your Mi Account. If you have the phone, link it to your account.
If you sell a phone, don't sign in to Mi Account after reset! just hand the device over to the buyer - they have to activate it under their account.
π‘
To check if your phone has any traces of old data, install the DiskUsage app from Google Play, which will show you which files are taking up space on internal memory.