How to Reset Xiaomi via TWRP Recovery: A Step-by-Step Algorithm

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

Done: 0 / 5

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 recovery

This 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?
If you forget the screen unlock password, you can't reset it through TWRP without losing data. You'll have to format the Data partition, which will delete everything, but allow you to use the phone further. Type "yes" into the input field for confirmation.

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.

πŸ“Š What version of Android is installed on your Xiaomi?
Android 10
Android 11
Android 12
Android 13 and higher

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.

ParameterWipe DataFormat Data
Deletion of filesYes.Yes.
Preservation of the FS structureYes.No.
Requires you to type in yes.No (slider)Yes (input text)
Implementation timeQuickly (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.

Frequently Asked Questions (FAQ)

Do I need to unlock the Unlock Bootloader to reset via TWRP?
Yes, to install and use a custom TWRP recavator, unlocking the bootloader is mandatory. Without an unlocked bootloader, you can neither boot into the TWRP nor reset through it. Stock recavators do not provide such capabilities.
Will the Mi Account (link to the Mi Account) be reset?
No, a normal Wipe Data reset does not remove the device’s attachment to the Xiaomi account. Once the phone is turned on, the system will require you to enter a password from Mi Account that was previously synchronized. This is Anti-Theft. To remove the binding, you need to know the password or use special server methods (which is officially impossible without a password).
Can I reset my screen password through TWRP without losing data?
On modern versions of Android (8.0 and higher) with encryption enabled, this is not possible. Password files are protected by an encryption key that is tied to yours. PIN-code or pattern lock without entering the correct code TWRP will not get access to the Data partition, and it will not be possible to reset the password without formatting (loss of data.
What if TWRP doesn’t see internal memory?
Most likely, the partition is encrypted. Try entering the screen unlock password the first time you start TWRP. If that doesn't work, you'll need to run Format Data, which will clear the memory. Also make sure you're using the current version of TWRP that's compatible with your version of Android.
Is it safe to make Wipe Dalvik Cache?
Yes, it's absolutely safe. Cash Dalwick has optimized application code for faster start-ups, takes longer to clean up when you first start the system after a reset, but doesn't result in any loss of personal data or settings. It's standard for firmware change.