Why simple file removal doesnβt work
You've decided to sell or give up your Xiaomi, but just removing photos and apps isn't enough. Even after cleaning the cart and formatting the memory card, you can restore data with special programs, and this is due to the way the Android operating system manages memory: when you delete a file, only the link to it in the file table is erased, and the data itself remains on the disk until you overwrite it.
On Xiaomi devices (including Redmi, POCO, and Black Shark), the situation is complicated by the presence of an encrypted data partition (FBE) (File-Based Encryption). If you just reset through the settings, the encryption keys can remain in the device's memory, which theoretically allows you to recover some information, especially critical for corporate users or those who stored sensitive data on the phone.
In this article, we will look at 5 proven ways to completely delete data, taking into account the features of MIUI and HyperOS firmware, and explain why some methods work more reliably than others.
Method 1: Standard reset via MIUI/HyperOS settings
The simplest method that works for most users is that it deletes all user data, but it doesn't affect system files and firmware, and it's important that it doesn't guarantee complete destruction of data on the physical layer, but it makes it extremely unlikely for the average user to recover it.
The instructions are relevant for MIUI 12-14 and HyperOS (2023-2026):
- Open the Settings. β The phone.
- Tap 7 times on the MIUI version to activate the developer mode (if not already activated)
- Return to the main settings menu and select Additional β Resetting
- Select Erase All Data (not to be confused with Settings Reset)
- Enter a password/pattern lock if requested
- Confirm the action by clicking Delete All
It takes 5-15 minutes depending on the model. After the reboot, you will see the screen of the initial setup, as after the purchase. On devices with a Snapdragon 8 Gen 2 chip and later (for example, Xiaomi 13 Ultra), this method automatically turns on hardware encryption when you first start after the reset, which further protects data.
β οΈ Note: If you have used the second space function in MIUI, A standard reset will not delete the data from the second profile. β Second space β Remove space.
Make a backup copy of important data|Unplug Xiaomi account (Settings) β Account)|Delete everything SIM-memory-cards|Charge your phone to at least 50%|Remember your Google account details for re-entry-->
Method 2: Hard reset via Recovery Mode
This method comes in handy if the phone is locked, not turning on, or you have forgotten your password.It works on all Xiaomi models, including the Redmi Note 12, POCO F5, and Black Shark 5. Unlike a standard reset, here you interact directly with the system partition recovery.
Step-by-step:
- Turn off the phone.
- Press the Power button + Volume up for 10-15 seconds at the same time
- After the Mi logo appears, release the power button, but keep the Volume up until the Recovery menu appears.
- Use volume buttons for navigation and power button for selection
- Choose Wipe Data β Wipe All Data
- Confirm the action by selecting Confirm
- After you complete the process, select Reboot β Reboot to System.
In the latest models (2023-2026), the Recovery menu can be in Chinese, in which case, focus on the order of items:
- πΉ First item - reboot (do not choose)
- πΉ The second item is the installation of the update (do not choose)
- πΉ The third point is Wipe Data (we need it)
- πΉ The fourth point is to connect to the PC (do not choose)
β οΈ Note: Some models (e.g. Xiaomi) 12T) After a hard reset, you may need to enter the data of the Xiaomi account that was previously linked. If you forget your username / password, use method 4 (Fastboot).
Method 3: Full formatting via Fastboot (for experienced)
It's the most radical method that completely overwrites all partitions, including system partitions, and it's guaranteed to delete all data without recovery, but it requires a computer connection and knowledge of commands, and it's suitable for models with an unlocked bootloader.
Tools required:
- π₯οΈ Computer with Windows/Linux/Mac
- π Cable USB (preferably original)
- π οΈ Quickboot (part of Android) SDK)
- π Unlocked bootloader (bootloader)
Instructions:
1. Turn off the phone.
2. Press <Power button + Volume down> to log into Fastboot
3. Connect the phone to the PC
4. Open the command line/terminal and do:
fastboot devices (connection check)
fastboot flashing unlock (if the bootloader is blocked)
fastboot erase userdata
fastboot erase cache
fastboot format:ext4 userdata
fastboot format:ext4 cache
fastboot rebootFor models with dynamic partitions (for example, Xiaomi 13 Pro) use the command:
fastboot wipe-super super| Team team. | What's he doing? | Implementation time |
|---|---|---|
| erase userdata | Deletes all user data | 2-5 seconds |
| format:ext4 userdata | Format the data partition in ext4 | 10-30 seconds |
| wipe-super | Clears dynamic partitions | 1-2 minutes |
| flashing unlock | Unlocks the bootloader (requires confirmation) | 5-10 minutes |
β οΈ Note: On HyperOS devices (e.g. Xiaomi 14), the fastboot oem edl command can put the phone into mode EDL, You can only use this if you're confident that you're doing something, because the wrong firmware can turn your phone into a brick".
What if fastboot doesnβt see the device?
Method 4: Using EDL mode for deep cleaning
EDL (Emergency Download Mode) allows you to flash the device at a low level, bypassing all restrictions.
- π The phone doesn't turn on at all.
- π Password is forgotten and Recovery is not working
- π‘οΈ Delete all data (for example, before disposal)
- π§ You need to refashion the phone from scratch.
For EDL entry on most Xiaomi models (except the latest ones with HyperOS):
- Turn off the phone.
- Press Volume Up + Volume Down + Power for 10-15 seconds
- Connect to a PC β the device is defined as Qualcomm HS-USB QDLoader 9008
To work in this mode will need:
- π₯οΈ Mi Flash Tool (official Xiaomi utility)
- π Firmware in.tgz format for your model
- π Xiaomi Developer Account (for New Models)
The firmware process through EDL completely overwrites all memory partitions, including:
- π± userdata - user data
- πΌοΈ system - system files
- π§ boot and recovery β boot sections
- π Modem β Mobile Network Data
π‘
Before using EDL, check the phone model through IMEI on imei.info β an incorrect firmware can bring the device down.
Method 5: Physical destruction of data (for paranoid people)
If you're working with highly sensitive information or preparing a device for disposal, even software methods may not provide a 100% guarantee, in which case consider physical ways to destroy data:
| Method | Efficiency | Difficulty | Reversibility |
|---|---|---|---|
| Overwriting with random data | 99% | Medium | No. |
| Neodymium magnet demagnetization | 95% | Tall. | No. |
| Drilling of memory chip | 100% | Tall. | No. |
| Thermal destruction (soldier iron) | 100% | Very high. | No. |
To overwrite data, you can use the dd utility via ADB:
adb shell
su
dd if=/dev/urandom of=/dev/block/mmcblk0 bs=1MThis command will fill the entire memory of the phone with random data, which will make it impossible to recover information, a process that can take several hours depending on the amount of memory.
β οΈ Attention: Physical methods of data destruction make the phone unusable for further use. Use them only if the device is planned to be disposed of. UFS 3.1/4.0 (for example, Xiaomi 13T Pro) physical memory destruction requires special equipment due to the multilayer structure of the chips.
What to do after resetting: inspection and preparation for sale
After any of the cleaning methods described, follow the following steps to ensure complete safety:
- Turn on your phone and go through the initial setup.
- Check that:
- Install any application (such as CPU-Z) and check:
Make a test call and check the cameras.
For additional verification, you can use specialized utilities:
- π DiskDigger β Finding File Remainders
- π‘οΈ AVG AntiVirus β to check for malware
- π AIDA64 β iron-diagnostic
If you are planning to sell your phone:
- π¦ Keep the original box and accessories
- π Reset the charge cycle counters (in the service menu ##4636##)
- π Prepare a check or document of sale
- π Delete all fingerprints and facial details (if any)
π‘
Even after a complete reset, some data may remain in the CPU cache and security modules (e.g., the Titan M chip on Xiaomi flagships).