Users of advanced Xiaomi, Redmi and POCO smartphones often face the need to completely clean the system after unsuccessful firmware experiments or when critical errors in Android work appear. Standard methods through the settings menu may not work if the operating system is damaged or the device goes into a cyclical reboot. In such situations, the only reliable way to bring the gadget back to life is using the custom bootloader TWRP (Team Win Recovery Project).
The procedure for cleaning the Data partition in TWRP is deeper and more effective than a regular reset, as it affects system files that are not deleted during standard formatting. However, these actions require care, since improper manipulation can lead to the loss of all user data without the possibility of restoring them. Before starting any operations, it is strongly recommended to make sure that you have up-to-date backups of important information on external media.
In this article, we will discuss in detail the preparation process, navigation through the recovery menu and the algorithm for correct device reset, you will learn about the nuances of working with ext4 and f2fs file systems, and understand why sometimes Wipe alone is not enough to solve a problem.
Preparation of the device and necessary conditions
Before you start taking action in a recovery environment, you need to perform a number of preparatory procedures. Make sure that your device already has TWRP installed, as standard Recovery from Xiaomi does not have the functionality to fully format partitions. If the Recovery are not already installed, it must be downloaded through a computer using utilities like fastboot or adb.
Battery charge should be at least 50-60%. The process of resetting and then installing the firmware (if necessary) can take time, and suddenly turning off the smartphone at a critical moment can damage the bootloader. Also prepare a computer with ADB drivers installed and a USB cable that is guaranteed to transmit data, not only charges the device.
β οΈ Attention: All data in internal memory will be permanently deleted. Photos, contacts, correspondence in messengers and installed applications will disappear.
If you plan to refashion the device after reset, download the current firmware version in advance and place it in the root of internal memory or on a microSD card, which will allow you to start installing the new system immediately after cleaning without having to connect to a computer.
βοΈ Ready to dump
Enter Recovery Mode on Xiaomi
You need to go to the recap menu to start the procedure, and there are several ways to do this, but the most reliable is to use a combination of physical buttons when the device is turned off, turn off the smartphone completely, wait for the logo to vibrate or disappear, and then press the Volume Up and Power buttons simultaneously.
Hold the buttons until the Mi or Redmi logo appears, then release the power button while still holding the volume. In a few seconds, you will see the main TWRP menu. If the device requires a screen unlock password or a pattern lock, enter them. This is data protection: without entering the correct code, access to the Data partition will be blocked, and you will not be able to reset.
In some cases, especially after the MIUI or HyperOS update, a standard bootloader can block the entrance to the custom Recovery by automatically downloading the stock one. To get around this, you can use the command via ADB from the connected computer:
adb reboot recoveryThis command will force the phone to restart immediately into recovery mode, bypassing the standard boot system. USB-mouse-over OTG β TWRP supports cursor control.
What if TWRP asks for a password and you donβt remember it?
Navigation on the interface and Wipe section
Team Win Recovery Project's interface is different from the stock menu with big buttons and sliders. To do a reset, we're interested in a section labeled Wipe. Click on this button to go to the cleaning options, and it's important not to confuse a regular reset with formatting.
In the menu that opens, you'll see a few sliders or select buttons: Dalvik/ART Cache, Cache, Data, and sometimes Internal Storage. To fully reset to factory settings, you'll need to select the first three items. The Data slider is responsible for removing all user applications, settings, and files.
- π± Dalvik / ART Cache β Clears the application compilation cache, which helps to eliminate errors after a system update or firmware change.
- ποΈ Cache β removes temporary system files that may have been corrupted and caused interface failures.
- π Data is the most important partition that contains your accounts, photos, music and installed programs, and when it is cleaned, it returns your phone to a store-like state".
You don't have to pull the Format Data slider right away unless you have to. A regular Wipe cleans the file system, but it leaves the structure intact. Formatting creates a new file system from scratch, which is only required when you move between different types of file system or when you encrypt it, which blocks access.
Differences between Wipe Data and Format Data
One of the most common questions for beginners is what the difference is between Wipe Data and Format Data. Understanding this difference is critical to not losing access to the device or removing the extra one. Wipe Data simply deletes files and folders in the data partition, but saves the file system itself and its encryption settings.
Format Data is a more radical operation, which completely reformats the partition by removing the file system (e.g., ext4 or f2fs) and creating it again, a procedure that is necessary if you change the file system type, or if the phone is encrypted and the TWRP cannot read the contents of the memory for a normal vape.
| Parameter | Wipe Data | Format Data |
|---|---|---|
| Deletion of files | Yes. | Yes. |
| Preservation of the FS structure | Yes. | No. |
| Requires you to type in yes. | No (slider) | Yes (input text) |
| Implementation time | Quickly (seconds) | Longer (minutes) |
Use Format Data only in extreme cases, such as switching from MIUI to custom firmware (AOSP) or vice versa, when you need to change the encryption type.
β οΈ Note: After Format Data is executed, the phoneβs internal memory will be completely clean, and the computer will be connected to the device. USB may stop seeing the device as a drive before first booting into the new system.
Step-by-step instructions for resetting via TWRP
Now, to the immediate algorithm, make sure you're in the TWRP main menu. If you've just installed the recaps, the interface language may be English. For convenience, you can change the language in Settings β Language, selecting Russian if it's available in your build.
Press the Wipe button. You will see a slider screen and a partition list. Press Advanced Wipe if it is not active by default. In the list, tick Dalvik/ART Cache, Cache and Data. Internal Storage section is best left unchecked if it contains the firmware files you plan to install.
Once you select the partitions, swipe the Swipe to Wipe slider from right to left, start a cleaning process that takes from a few seconds to a couple of minutes, and in the process log (bottom of the screen), you will see the status of the operations for each partition.
Wiping Data without formatting...
Data successfully wiped.
Wiping Cache...
Cache successfully wiped.
Wiping Dalvik...
Dalvik successfully wiped.Once you've finished, press the Back button to return to the main menu. Now the device is fully ready to install a clean firmware or launch for the first time. If you're not planning on flashing it, just select Reboot β System.
π‘
After a reset, it can take up to 10-15 minutes to start the system first, and don't panic if you see the manufacturer's logo longer than usual - you optimize applications and create cache.
Possible errors and their solution
During the reset process, users may encounter various errors, one of the most common being Failed to mount '/data', which often happens if the file system is corrupted or if the partition is encrypted with a key that TWRP cannot recognize.
In this case, forced formatting helps. Go back to the main menu, select Wipe, then press the Format Data button (usually in the lower right corner), type yes into the field that appears and confirm the action, which will remove the encryption and allow you to create the partition again.
- π Bootloop after reset β if the phone goes into reboot, try resetting Settings β Advanced β Reset TWRP or re-flash the loader.
- β Error when installing firmware - make sure you download the version for your model (codename.
- π The phone turned off during Wipe - plug in the charge, wait for the charge and repeat the procedure. If partitions are damaged, you may need to flash through the Fastboot.
If nothing helps, and the device does not load even in the recave, the bootloader may be damaged, in which case you will need to use the Mi Flash Tool utility and switch the phone to EDL (Emergency Download Mode) mode, which often requires disassembling the device to close the contacts on the board.
β οΈ Attention: Use EDL Mode and firmware through the Mi Flash Tool with unlocked bootloader can lead to loss of warranty if the service detects interference with the software.
π‘
The key to a successful reset is proper preparation (backup, charge) and a clear understanding of the difference between Wipe and Format. Don't be afraid of mistakes, most of them are fixable by repeating the procedure or formatting.