How to Install TWRP and Root Redmi 8: Step-by-Step Guide
In this article
To install TWRP and root your Redmi 8, you need to unlock the bootloader, flash a compatible TWRP recovery image, and then install Magisk. The whole process takes about 30–60 minutes, but the bootloader unlock alone can take up to 7 days because Xiaomi enforces a waiting period. Before you start, back up all data—unlocking the bootloader wipes the phone completely, and rooting carries a risk of bricking if you skip steps. You'll also need a Windows PC, a USB cable, and the correct files for the Redmi 8 (codename: olive). This guide walks you through each stage safely.
What You'll Need
- A Redmi 8 (codename olive) with at least 60% battery.
- A Windows PC with a working USB port and internet access.
- Original USB cable (or a reliable data cable).
- Xiaomi Mi Unlock Tool (official, from Xiaomi's website).
- ADB and Fastboot platform-tools (from Google's official developer site).
- TWRP recovery image for Redmi 8 (search for “TWRP olive” on the official TWRP website or trusted XDA thread).
- Magisk APK (latest stable from the official Magisk GitHub repository).
- Xiaomi USB drivers (install via Mi Unlock Tool or manually).
- A microSD card or USB OTG drive (optional but helpful for backups).
Step-by-Step
- Enable Developer Options and USB debugging. Go to Settings > About phone and tap “MIUI version” seven times. Then go to Settings > Additional settings > Developer options and enable “USB debugging” and “OEM unlocking”. (Menu labels may vary slightly by MIUI version.)
- Unlock the bootloader. This is the most time-consuming part. On your PC, install the Mi Unlock Tool and log in with your Xiaomi account (the same one you'll use on the phone). On the phone, go to Settings > Additional settings > Developer options > Mi Unlock Status and tap “Add account and device”. Then power off the phone, hold Volume Down + Power to enter Fastboot mode, and connect it to the PC. Open Mi Unlock Tool, accept the disclaimer, and click “Unlock”. If it says you need to wait (often 168 hours), wait the full period without logging out or resetting the phone. After the wait, repeat the unlock step. The phone will wipe all data and reboot.
- Download the correct TWRP image. Visit the official TWRP website (twrp.me) and search for “Xiaomi Redmi 8”. Download the latest .img file for “olive”. Do not use a recovery for a different model—it can brick your phone.
- Install ADB and Fastboot on your PC. Download the platform-tools ZIP from Google's developer site, extract it to a folder like C:\adb. Open a Command Prompt in that folder (Shift + right-click > “Open command window here” or “Open PowerShell window here”).
- Boot the phone into Fastboot mode. Power off, then hold Volume Down + Power until the Fastboot logo appears. Connect to the PC via USB. In the Command Prompt, type
fastboot devicesand press Enter. You should see your device serial number. If not, reinstall the USB drivers. - Flash TWRP. In the same Command Prompt, type
fastboot flash recovery twrp.img(replace “twrp.img” with the actual filename). After it finishes, typefastboot boot twrp.imgto boot directly into TWRP without overwriting the stock recovery yet. This is safer for the first boot. - Make a full backup in TWRP. Once TWRP loads, tap “Backup”, select all partitions (especially Boot, System, Data), and swipe to back up to internal storage or an SD card. This is your safety net.
- Install Magisk for root. Download the Magisk APK to your phone (or push it via ADB). In TWRP, tap “Install”, navigate to the Magisk APK file, and select it. TWRP will detect it as a flashable zip. Swipe to confirm. After flashing, tap “Reboot System”.
- Verify root. After reboot, open the Magisk app (it should be installed automatically). If it shows “Installed” under Magisk, root is active. You can test with a root checker app from the Play Store.
- Optional: Flash TWRP permanently. If you want TWRP to stay after reboots, boot into TWRP again, go to “Advanced” > “Install Recovery Ramdisk” (or use the “Flash current TWRP” option if available), or re-flash the TWRP image via fastboot. Some users prefer to keep the stock recovery and only boot TWRP temporarily for OTA updates.
Common Mistakes
- Using the wrong TWRP image. Redmi 8 is “olive”; Redmi 8A is “olivelite” and Redmi Note 8 is “ginkgo”. Flashing the wrong one can hard-brick the phone.
- Skipping the bootloader unlock wait. Trying to bypass the 168-hour timer often results in errors or a locked bootloader. Wait it out.
- Not backing up before rooting. Rooting or flashing TWRP can wipe data if you unlock the bootloader again. Always back up first.
- Forgetting to disable “Find My Device” and screen lock. Before unlocking, remove all screen locks and sign out of Google and Xiaomi accounts. Otherwise, the unlock may fail or the phone may be locked after reset.
- Flashing Magisk before TWRP is stable. Always boot TWRP temporarily first and make a backup before flashing anything.
Tips
- Use a USB 2.0 port on your PC if fastboot doesn't detect the phone; USB 3.0 can sometimes cause issues.
- Keep the phone charged above 60% during the process.
- After rooting, don't accept OTA updates directly—they can unroot or brick the phone. Instead, download the full ROM and flash it manually, then re-root.
- Install Magisk modules only from trusted sources; a bad module can cause boot loops.
- If you need to relock the bootloader, use
fastboot oem lockonly after flashing a full stock ROM, or you may brick the device.
Troubleshooting
- Fastboot doesn't detect the phone: Reinstall Xiaomi USB drivers, try a different USB cable/port, and run Command Prompt as administrator. Also enable “USB debugging (Security settings)” in Developer options if available.
- TWRP bootloops or shows a black screen: The TWRP image may be incompatible. Download a different version (e.g., from XDA forums) and re-flash. Ensure you're using the correct “olive” build.
- Magisk installation fails in TWRP: Make sure you're flashing the Magisk APK (not a zip). If TWRP doesn't recognize it, rename the .apk to .zip and try again. Also check that the TWRP version supports your Android version (Redmi 8 shipped with Android 9, but may have been updated).
- Phone stuck in bootloop after rooting: Boot into TWRP, go to “Wipe” > “Format Data” (this erases everything, including internal storage), then re-flash Magisk. If that fails, restore your TWRP backup.
- “Waiting for device” in Mi Unlock Tool: Ensure the phone is in Fastboot mode and drivers are installed. Try a different USB cable or port. Sometimes running the tool as administrator helps.
Frequently Asked Questions
Do I need to unlock the bootloader to root Redmi 8?
Yes. Rooting requires flashing a custom recovery, which is only possible with an unlocked bootloader. Xiaomi's unlock process is official but includes a waiting period.
Will rooting void my warranty?
Yes, unlocking the bootloader and rooting typically void the warranty. However, you can often restore the stock ROM and relock the bootloader to reverse this, though it may not restore warranty status in all regions.
Can I root Redmi 8 without a PC?
No, you need a PC to unlock the bootloader and flash TWRP via fastboot. Some one-click root apps claim to work, but they are unreliable and often contain malware.
What is the difference between Redmi 8 and Redmi 8A for rooting?
They have different codenames (olive vs. olivelite) and require different TWRP images and Magisk patches. Always use files specific to your exact model.
How do I unroot and return to stock?
Download the official MIUI fastboot ROM for Redmi 8 from Xiaomi's website, flash it via Mi Flash Tool, and then relock the bootloader with fastboot oem lock. This will wipe all data.
Is it safe to install OTA updates after rooting?
No, OTA updates can fail or remove root. It's safer to download the full ROM, flash it manually, and re-root. Always make a backup before updating.