How to Reset Xiaomi to Factory Settings via TWRP

The Android operating system on Xiaomi smartphones can accumulate errors over time that cannot always be fixed by standard methods. When the device starts to work unstable, system failures appear or you need a complete cleanup before selling the gadget, TWRP Recovery Mode comes to the rescue. This tool provides advanced file system management capabilities that are not available in the standard menu.

Using custom reset allows you to perform a deep reset by removing not only user data, but also the cache, Dalvik, as well as system partitions that often remain affected during a normal reset. Formatting a Data partition through TWRP is the only way to completely unblock encryption after installing custom firmware. In this guide, we will break down all the nuances of the procedure so that you can safely return the device to its original state.

Before you start taking action, you need to be clear that the process of resetting through Team Win Recovery Project is irreversible. All your photos, contacts, apps and settings will be permanently deleted. So it is crucial to back up important information in advance on external media or in the cloud.

⚠️ Warning: Before starting the procedure, make sure that the battery charge of your Xiaomi smartphone is at least 60%. interruption of the formatting process due to battery discharge can lead to the inability to boot the system.

Preparation of the device and necessary conditions

Successful reset depends on the correct preparation of the gadget. You must have installed and correctly working TWRP Recovery. If you do not already have a custom recovery, it must be installed in advance, as standard Recovery from Xiaomi does not have the functionality to format the Data partition in the required mode.

It’s also worth checking the bootloader’s unlock status. On Xiaomi devices with Bootloader blocked, some TWRP features may be limited and partition access is prohibited. Make sure you know the passwords from your accounts, as after a reset, the device can request proof of ownership of Google Account or Mi Account.

β˜‘οΈ Pre-reset check

Done: 0 / 4

Remember to disable all third-party screen blockers and passwords if the device is still available to control, this will help avoid situations where after reset, the system will require entering a forgotten pin code to decrypt data, which can lead to a cyclical reboot.

Enter TWRP Recovery Mode on Xiaomi

The procedure for logging into the recavΓ©ri may vary slightly depending on the smartphone model, but the basic algorithm remains the same for most Xiaomi, Redmi and POCO devices. First, you need to completely turn off the device.

Once the screen is out, press the key combination, most commonly the Volume Up button and the Power button. Hold them together until the Mi logo appears or in the TWRP menu. Some models may require a USB cable to be connected to your computer while the buttons are pressed.

πŸ“Š What is your current status as a loader?
Unlocked.
Blocked.
I don't know.
The device is not switched on.

If you have a password or a graphical key on the screen and you don't remember it, the situation becomes complicated, in which case TWRP may not allow access to the file system without unlocking it. However, if the purpose is to reset, you can try pressing the Cancel button to go to the main menu, although the functionality may be limited.

TWRP is intuitive, but it requires attention. Once you download, you'll see some big buttons. We're interested in the Wipe section, which is usually located on the right at the bottom or top of the screen. Click on it to go to the cleaning tools.

In the menu that opens, you'll see the Swipe to Factory Reset slider. However, a normal slider is often not enough to fully reset through TWRP, as it only performs basic cleaning. For deep formatting, you need to press the Advanced Wipe button in the lower right corner.

Here you will see a list of the device's memory partitions, and that's where critical decisions are made about what data will be destroyed, and the standard set for a complete reset includes a few key items, which we'll look at in the table below.

Section (Partition)DescriptionRecommendation
Dalvik / ART CacheCash compilation applicationsI'll be sure.
CacheSystem cacheI'll be sure.
DataUser data and applicationsI'll be sure.
Internal StorageInternal memory (photos, files)If you wish,

⚠️ Warning: Be extremely careful with the System, Vendor and Boot partitions, formatting them without further flashing will cause the phone to stop loading (bootloop).

Formatting the Data partition and decrypting

The most important step, especially after installing custom firmware or obtaining root rights, is to format the Data partition. In modern versions of Android, this partition is encrypted. If you just select it from the Advanced Wipe menu and swipe it, the data will be deleted, but the encryption may remain, which will lead to an error on the first start of the system.

To do the right formatting, go back to the main TWRP menu and select Wipe, and then press the Format Data button (not to be confused with Advanced Wipe). In the input field that appears, you will be prompted to confirm the action. The system will ask you to enter the word yes manually.

yes

Once you input the confirmation and press the confirmation button, the formatting process will begin, which can take from a few seconds to a couple of minutes, depending on the amount of internal memory and the speed of the drive, and when the process is completed, the Done message will appear in the log.

Why not just make an Advanced Wipe?
Simple deletion (Wipe) leaves the file system structure and encryption headers intact. Format Data creates a new file system from scratch, which is necessary to change the type of encryption or completely reset the access keys.

After the formatting is complete, you need to go back to the main menu and press the Reboot System button. The first run after this procedure will be long, since the operating system will recreate the necessary files and cache structures.

Solving problems after discharge

Even with strict adherence to the instructions, unexpected situations can occur, and one of the most common problems is a cyclic restart (bootloop) or a freeze on the Mi logo. This often happens if incompatible firmware was installed or system files were damaged during previous manipulations.

If the device is stuck in a reboot cycle, log in to TWRP again. Try to perform the Format Data procedure again. If that doesn't help, you may need to reflash the device via Fastboot using the original stock firmware for your model.

πŸ’‘

If the phone warms up and discharges quickly after reset, let it lie on charging in a switched-off state for about an hour. The system indexes files, which puts a high load on the processor.

Another problem is that you don't have access to internal memory after you download it to the system, which can mean that the partition has been formatted to a file system that the current version of Android doesn't support, or that the permissions have been lost, in which case resetting via TWRP with only Dalvik and Cache can sometimes help restore the correct operation.

FAQ: Frequently Asked Questions

Will TWRP reset its Mi Account status?
No, a reset via TWRP only deletes user data and settings on the device. The binding to the Mi Account is stored on the company's servers. After the reset, the phone may require you to enter a password from an account that was previously synchronized (anti-theft protection).
Can I recover deleted data via TWRP?
Recovering data after formatting a Data partition via TWRP is almost impossible for the average user. The process overwrites memory sectors, making the information unreadable. Specialized services may try to do something, but there is no guarantee.
Do you need a computer to reset via TWRP?
No, the reset and formatting operation itself is done directly on the smartphone, and the computer is only required during the installation phase of the TWRP receptacle itself, if it is not already installed, or for flashing in case of critical errors.
What if TWRP asks for a password when you sign in?
This is a password from the lock screen or PIN-If you don't remember it, the only option is to run Format Data through the Wipe menu -> Format Data by entering "yes." This will delete all data, including the password, but allow you to use the phone.

πŸ’‘

Using TWRP for reset is a powerful tool that solves problems that are not available to the standard menu, but requires understanding the differences between Wipe and Format Data.