How to Root Xiaomi Mi4: Full Guide
Rooting your Xiaomi Mi4 gives you full administrative control over the Android system, allowing you to remove bloatware, install root-only apps, customize the interface, and improve performance. This guide walks you through unlocking the bootloader, installing a custom recovery, and flashing Magisk to gain root access. Before starting, back up all important data, ensure your battery is above 70%, and use a reliable USB cable.
What You’ll Need
- A Xiaomi Mi4 (any variant: 3G, LTE, or 4G) with an unlocked bootloader
- A Windows PC (or a Mac with ADB setup)
- USB debugging enabled on your phone (Settings > Developer options > USB debugging)
- Mi Unlock tool (for bootloader unlock, if not already done)
- TWRP recovery image for Mi4 (cancro)
- Magisk ZIP file (latest stable version)
- ADB and Fastboot drivers installed on your PC
Step-by-Step
- Back up your data. Rooting wipes your device. Use Mi Cloud, Google backup, or manually copy files to your PC.
- Enable Developer options. Go to Settings > About phone, tap MIUI version 7 times until you see “You are now a developer!”
- Enable USB debugging and OEM unlocking. In Developer options, turn on USB debugging and OEM unlocking (if available).
- Unlock the bootloader. If not already unlocked, download the Mi Unlock tool from Xiaomi’s official site. Log in with your Mi account, put the phone in Fastboot mode (power off, then hold Volume Down + Power), connect to PC, and follow the tool’s instructions. Wait for the 7-day or 15-day waiting period if required.
- Download TWRP and Magisk. Get the TWRP image for cancro (Mi4) from the official TWRP site or trusted XDA forums. Download the latest Magisk ZIP from the official Magisk GitHub releases.
- Boot into Fastboot mode. Power off the phone. Press and hold Volume Down + Power simultaneously until the Fastboot logo appears.
- Flash TWRP. On your PC, open a command prompt in the folder where you saved TWRP. Run:
fastboot flash recovery twrp.img(replace twrp.img with your file name). Then runfastboot reboot. - Boot into TWRP. Immediately after the reboot, hold Volume Up + Power to enter recovery. If you miss it, reboot and try again.
- Wipe data (optional but recommended). In TWRP, tap Wipe > Format Data, type “yes”, and swipe to confirm. This clears encryption and old data.
- Transfer Magisk ZIP. While in TWRP, use the Mount option to enable MTP, then copy the Magisk ZIP from your PC to the phone’s internal storage. Alternatively, use adb push.
- Install Magisk. In TWRP, tap Install, select the Magisk ZIP, and swipe to flash. Wait for the process to finish.
- Reboot system. Tap Reboot > System. The first boot may take longer than usual.
- Verify root. After boot, install a root checker app from the Play Store, or open Magisk Manager (installed automatically) to confirm the installation.
Common Mistakes
- Using the wrong TWRP image. The Mi4 has variants (cancro). Downloading a TWRP for another Xiaomi device will fail or brick.
- Skipping the bootloader unlock. Flashing TWRP without unlocking will result in a bootloop or the recovery being overwritten by MIUI.
- Not enabling USB debugging. ADB commands won’t work, and the Mi Unlock tool may not detect the device.
- Interrupting the flashing process. Unplugging the cable or closing the command window mid-flash can corrupt the recovery.
- Flashing Magisk on a locked bootloader. This will cause a bootloop. Always unlock first.
Tips
- Use a stable, original USB cable. Third-party cables often cause connection drops during flashing.
- Keep the phone charged. A sudden shutdown during flashing can brick the device.
- Check the MIUI version. Some older MIUI versions have different bootloader unlock procedures. Ensure you’re on a recent version.
- Download the exact TWRP version. Read the XDA thread for your specific Mi4 model to avoid compatibility issues.
- After rooting, avoid OTA updates. System updates can overwrite Magisk; reflash Magisk after any update.
- Use Magisk’s built-in module manager. Install modules carefully; a bad module can cause bootloops.
Troubleshooting
- Phone stuck in bootloop. Boot into TWRP (Volume Up + Power), wipe cache/dalvik, and reboot. If still stuck, format data and reflash Magisk. If that fails, flash a stock MIUI ROM via Mi Flash tool.
- TWRP not sticking after reboot. This usually means the bootloader is still locked. Re-run the Mi Unlock tool and verify the bootloader status (in Fastboot, run
fastboot oem device-info). If it says “locked”, unlock again. - ADB/fastboot not recognizing the device. Install proper drivers, try a different USB port, and ensure USB debugging is enabled. On Windows, run the commands as administrator.
- Magisk Manager shows “not installed”. Reflash the Magisk ZIP via TWRP. If it still fails, download the latest Magisk version and try again.
- Phone boots but root apps don’t work. Check if Magisk Manager is installed. If not, manually install the APK from the Magisk ZIP. Also ensure you flashed the ZIP, not just the APK.
- Wi-Fi or camera not working after rooting. This is rare but can happen if you flashed a wrong module. Boot into TWRP, go to Advanced > File Manager, and delete the problematic module from /data/adb/modules. Alternatively, wipe data and reflash.
Frequently Asked Questions
Will rooting my Mi4 void its warranty?
Yes, unlocking the bootloader and rooting typically voids the manufacturer’s warranty. However, you can restore the stock ROM and relock the bootloader to regain warranty in most regions.
Is rooting safe for my Mi4?
Rooting itself is safe if you follow the steps correctly. The risk is in flashing wrong files or interrupting the process, which can cause bootloops or bricking. Always use the correct TWRP and Magisk versions.
Can I still receive OTA updates after rooting?
You can receive them, but installing them will likely remove root. You’ll need to reflash Magisk after each OTA update. Some custom ROMs handle this automatically.
What is the difference between rooting and unlocking the bootloader?
Unlocking the bootloader allows you to flash custom recoveries and ROMs. Rooting gives you superuser access within the Android OS. You must unlock the bootloader first to root.
Will rooting improve the battery life of my Mi4?
Not directly. Rooting allows you to install apps like Greenify or custom kernels that can improve battery life, but it can also drain battery if you use aggressive modules. It depends on how you configure it.
Can I unroot my Mi4 later?
Yes. You can unroot by flashing the stock boot image or using Magisk Manager’s “Uninstall” option. For a complete return to stock, flash the official MIUI ROM via Mi Flash tool and relock the bootloader.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.