This guide walks you through installing Team Win Recovery Project (TWRP) on a Xiaomi phone or tablet. TWRP is a custom recovery that lets you flash custom ROMs, make full backups, and gain deeper system access. You’ll need an unlocked bootloader, a compatible TWRP image, and a computer with ADB and Fastboot tools.
What You’ll Need
- A Xiaomi device with an unlocked bootloader (see note below)
- A Windows, macOS, or Linux computer
- USB cable (preferably the original one)
- ADB and Fastboot tools installed on your computer
- The correct TWRP image file (.img) for your exact Xiaomi model
- Xiaomi USB drivers installed on Windows (or platform-tools for macOS/Linux)
- Backup of your important data (flashing can wipe data)
Bootloader note: Xiaomi devices require an unlocked bootloader before you can flash TWRP. Unlocking takes 7–15 days on most models and wipes your device. Visit Xiaomi’s official unlock page and follow their instructions. Do not skip this step—flashing on a locked bootloader will fail.
Step-by-Step
- Enable Developer Options. Go to Settings > About Phone and tap MIUI Version (or HyperOS Version) seven times until you see “You are now a developer.”
- Enable USB Debugging and OEM Unlocking. Go to Settings > Additional Settings > Developer Options. Turn on USB Debugging and OEM Unlocking (if present).
- Unlock the bootloader. Follow Xiaomi’s official unlock process. This involves applying on their website, waiting for approval, then using the Mi Unlock tool on your PC. Once done, your device will reboot and be wiped.
- Download the correct TWRP image. Visit the official TWRP website (twrp.me) and find your device. Download the latest
.imgfile. Do not use a random file from forums—mismatched images can brick your device. - Install ADB and Fastboot. Download Google’s platform-tools and extract to a folder like
C:\adb. On Windows, add that folder to your PATH or open a command prompt inside it. - Boot your device into Fastboot mode. Power off your phone. Press and hold Volume Down + Power for a few seconds. You’ll see a fastboot screen with a rabbit or “FASTBOOT” text.
- Connect your device to the computer. Use a USB cable. On Windows, install Xiaomi USB drivers if prompted.
- Verify fastboot connection. Open a command prompt/terminal in your ADB folder and run:
fastboot devices
You should see your device serial number followed by “fastboot”. If not, check drivers or cable. - Flash TWRP (temporary boot). Run:
fastboot boot twrp.img
Replacetwrp.imgwith your filename. This boots TWRP without permanently installing it. This is safer—if something goes wrong, a reboot restores your original recovery. - Test TWRP. Your device should reboot into TWRP. Swipe to allow modifications. Check if your touchscreen works and if you can see your internal storage.
- Permanently install TWRP. If everything works, reboot to fastboot again (from TWRP: Reboot > Bootloader). Then run:
fastboot flash recovery twrp.img
After flashing, do not let the system boot normally—it may overwrite TWRP. Instead, boot directly into recovery using:fastboot reboot recovery - Optional: Disable DM-Verity. Some Xiaomi devices fail to boot after flashing TWRP due to encryption. If you get a boot loop, boot into TWRP, go to Advanced > Terminal, and run:
dd if=/dev/zero of=/dev/block/bootdevice/by-name/avb_custom_key
Then reboot. This is model-specific; search for your device’s exact command. - Reboot and verify. After TWRP is installed, reboot to system. If you see TWRP on next boot (or can access it via Volume Up + Power), you’re done.
Common Mistakes
- Using the wrong TWRP image. Xiaomi models with similar names (e.g., Redmi Note 10 vs Note 10 Pro) have different hardware. Always match the exact codename (e.g., “mojito” for Redmi Note 10).
- Skipping bootloader unlock. Flashing TWRP on a locked bootloader will fail with an error or soft-brick your device.
- Letting the system boot after flashing. On many Xiaomi devices, the stock system will overwrite TWRP on first boot. Always boot directly into recovery after flashing.
- Not backing up data. Unlocking and flashing can wipe your data. Back up photos, messages, and app data beforehand.
- Using a faulty USB cable. A loose or low-quality cable can cause disconnections during flashing, leading to a bricked device.
Tips
- Always download TWRP from the official site or a trusted XDA thread for your exact model.
- Keep your device charged above 50% before starting.
- Use the
fastboot bootmethod first to test TWRP without permanent installation. This reduces risk. - If you plan to flash custom ROMs, also download the latest Magisk or a custom kernel—but that’s beyond this guide.
- After installing TWRP, consider making a full backup (Nandroid) before any further modifications.
Troubleshooting
- “fastboot devices” shows nothing. Install the correct Xiaomi USB drivers, try a different USB port (use a USB 2.0 port if possible), or change the cable. On Windows, check Device Manager for unknown devices.
- “FAILED (remote: not allowed)” during flash. Your bootloader is likely still locked. Recheck the unlock status—go to fastboot and run
fastboot getvar unlocked. It should say “yes”. If not, complete the unlock process. - Device boots to a black screen or fastboot loop after flashing. This often means the TWRP image is incompatible. Boot back to fastboot (hold Volume Down + Power for 10 seconds), then reflash the correct image using
fastboot bootfirst. - TWRP asks for a password/decryption. Xiaomi devices have forced encryption. Boot into TWRP, go to Wipe > Format Data (this erases all data), then reboot to TWRP. Do this only if you have backups.
- Touchscreen doesn’t work in TWRP. This is a known issue on some models. Try the
fastboot bootmethod with a different TWRP version (e.g., an older build). - Boot loop after installing TWRP. Boot into TWRP, go to Advanced > Terminal, and run
dd if=/dev/zero of=/dev/block/bootdevice/by-name/avb_custom_key(if your device has AVB). Then reboot. If that fails, reflash the stock boot image using fastboot.
Frequently Asked Questions
Does flashing TWRP void my warranty?
Yes, unlocking the bootloader and flashing custom recovery typically voids the manufacturer warranty. You can often restore the stock recovery and relock the bootloader, but the unlock status is logged.
Will I lose my data?
Unlocking the bootloader wipes your device. Flashing TWRP itself doesn’t wipe data, but formatting data (to remove encryption) will. Always back up before starting.
Can I install TWRP without a computer?
No, you need a computer with fastboot to flash TWRP. There is no reliable on-device method for Xiaomi devices.
Is it safe to flash TWRP on a Xiaomi device?
It’s generally safe if you use the correct image and follow steps carefully. The risk of bricking exists if you flash a wrong image or interrupt the process. The fastboot boot method reduces risk.
How do I update TWRP later?
Download the new image and repeat the flashing steps. You can also flash the new TWRP from within the existing TWRP by selecting “Install Image” and choosing the recovery partition.
What if I want to remove TWRP?
Boot into fastboot and flash the stock recovery image using fastboot flash recovery stock_recovery.img. Then relock the bootloader with fastboot oem lock (this wipes data).
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
More cards in this drawer
- Why Game Servers Need DDoS Protection
- Aion2 Banned Account: What to Do
- Turn Company Strategy into Team Priorities
- Embedded Finance for Small Businesses: How It Works
- Best 3D Printer Brands for Budget, Workflow & Detail
- Brother Printer Keeps Going Offline? Fix It Fast