In this guide, we will show you the steps to install the MIUI Stock ROM on Xiaomi devices via the TWRP Recovery. There are a plethora of reasons why users prefer to replace their device’s stock recovery with a custom one such as TWRP or OrangeFox. To begin with, you could create a backup of all the partitions on your device. Likewise, you could flash any supported IMG or ZIP file or even root your device by flashing the Magisk ZIP (which is now part of the Magisk App, from v22 onwards).
It is the ability to flash these ZIP files that make the custom recovery the go-to choice for a lot of users. TWRP has made it extremely easy to flash any custom ROM (whether your device is A-only or A/B partition). But when it comes to flashing stock firmware, users opt for the Fastboot Command technique. However, in the case of Xiaomi devices, you could easily flash the stock ROM from the custom recovery itself. This automatically translates to a plethora of benefits.
To begin with, if you are unable to boot the device to OS, then one option is to download the Mi Flash Tool and then flash the firmware accordingly. Or you could manually flash each of the files to their respective partitions via Fastboot Commands. However, both these methods call for quite a lot of manual efforts. This is why users prefer to flash the firmware via TWRP. And in this guide, we will show you how to do just that. So without further ado, here are the required instructions to install the MIUI Stock ROM on Xiaomi devices via the TWRP Recovery.
How to Install MIUI Stock ROM on Xiaomi devices via TWRP Recovery
First and foremost, there are a couple of prerequisites that you need to checkmark. Make sure that you go through each of the below-mentioned requirements and then only proceed with the below steps. Droidwin and its members wouldn’t be held responsible in case of a thermonuclear war, your alarm doesn’t wake you up, or if anything happens to your device and data by performing the below steps.
- First and foremost, you need to have the device’s bootloader unlocked and TYWRP Recovery installed as well. This will already be the case with most of our readers. However, if you are yet to do any of these two tasks, then you may refer to the below guides:
- Next up, take a backup of all the data on your device. This is because the process is going to wipe off the entire data partition (though we wouldn’t be wiping the Internal Storage).
- Likewise, download the Lazy Flasher ZIP to decrypt the data partition. Download: lazyflasher-no-verity-opt-encrypt.zip. Once you have downloaded it, transfer it to your device.
That’s it, these were all the required files. You may now proceed with the steps to install the MIUI Stock ROM on Xiaomi devices via the TWRP Recovery.
Enable USB Debugging
To begin with, you will have to enable USB Debugging on your device. The former will make your device recognizable by the PC in ADB mode. This will then allow you to boot your device to Fastboot Mode. So head over to Settings > About Phone > Tap on MIUI Number 7 times > Go back to Settings > System > Developer Options > Enable USB Debugging. [Interesting Read: Enable USB Debugging on a Broken Android Devices Screen? Here’s a Workaround!].
Install Android SDK
Now install the Android SDK Platform Tools on your PC. This is the official ADB and Fastboot binary provided by Google and is the only recommended one. So download it and then extract it to any convenient location on your PC. Doing so will give you the platform-tools folder, which will be used in this guide.
Download Xiaomi MIUI Recovery ROM
The OEM has two different types of ROMs: Recovery and Fastboot. As is evident from their names, the Fastboot ROM is flashed via Mi Flash Tool or Fastboot Commands. On the other hand, the Recovery ROM is flashed via stock or custom recovery. And for this guide, you will have to get hold of the Recovery ROM.
So head over to the Xiaomi Official Firmware collection and download the ROM corresponding to your device. Once you have downloaded the ROM, transfer it to your device. If you have a memory card, it is recommended to transfer it there. However, if you don’t have it, then you may transfer it to the phone memory itself.
Boot to TWRP Recovery
Next up, you will have to boot your Xiaomi device to TWRP Recovery so that you could flash the MIUI Recovery ROM. So follow the below steps for that:
- Connect your device to the PC via USB cable. Make sure USB Debugging is enabled.
- Then head over to the platform-tools folder, type in CMD in the address bar, and hit Enter. This will launch the Command Prompt.
- Type in the following command in the CMD window to boot your device to Fastboot Mode
adb reboot recovery
Flash MIUI Recovery ROM via TWRP
Let’s now flash the MIUI ROM onto your Xioami device via TWRP Recovery. Follow along:
- Head over to the Wipe section and tap on Advanced Wipe.
- Then select the Dalvik/ART Cache, System, Data, and Vendor partitions and perform a right swipe to perform the wipe.
- Now go to Install, select the MIUI Recovery ROM and perform a right swipe to install it. [Can’t find the MIUI Recovery ROM? Re-send it via this guide: 3 Methods To Transfer or Install Files via TWRP Recovery].
- Once the ROM has been flashed, again go to Install. This time select the lazyflasher-no-verity-opt-encrypt.zip file and perform a right swipe to install it.
- When that is done, you may reboot the device to the OS. For that, go to Reboot and select System.
TWRP on some older Redmi devices might show the No OS installed message, well this is just a false positive. You should ignore it and continue to reboot the device to the OS
So this was all from this guide on how to install the MIUI Stock ROM on Xiaomi devices via the TWRP Recovery. If you have any queries concerning the aforementioned steps, do let us know in the comments. We will get back to you with a solution at the earliest.
2 thoughts on “How to Install MIUI Stock ROM on Xiaomi via TWRP Recovery”
I followed all the steps you instructed. However, I ended up stucking in the fastboot mode after installing the MIIUI Recovery ROM. I had tried this multiple times, but they all ended up the same result. I do not know what I did wrong. So I wrote this comment to you for your help.
P.s. I use the Xiaomi Mi 8 SE device, which I bought from China, and flashed the MIUI 12.5 Global ROM.
you need to flash china miui