Xiaomi, Redmi & POCO: How to Unlock Bootloader, Root and Flash Custom ROM

Learn how to unlock the bootloader on Xiaomi, Redmi, and POCO devices, install TWRP recovery, root with Magisk, and flash custom ROMs. Easy guide.
Unlock Xiaomi Bootloader, Root and Flash Custom ROM
Add Quickfever on Google: Preferred Source Google Discover

A basic and bulletproof guide for all MI, Redmi, and Xiaomi phones: Unlock bootloader, install custom recovery (TWRP / OrangeFox), flash MAGISK to gain root access, and install Custom ROMs to always taste the latest Android versions. We’ve had extensive hands-on experience with Xiaomi devices over the years and own many of them; here is everything you need to unlock, root, and flash custom ROMs on your Xiaomi device.

Works for: Xiaomi 12, 12 Pro, 12X, Mi 11 series, Redmi Note series, POCO phones, and other Xiaomi devices running MIUI and HyperOS.

What you’ll learn in this guide:

Advertisement

  • Unlocking Xiaomi device bootloader using the official Mi Unlock tool
  • Installing TWRP custom recovery on your phone
  • Gaining systemless root access with Magisk
  • Flashing LineageOS or other custom Android ROMs (with GApps)

Part 1: Unlocking Xiaomi Bootloader (Official Method)

Psst! This is no instant process, which means you’ll have to link your account and wait for Xiaomi’s authorization. Today, Xiaomi enforces a mandatory countdown (typically 168 hours / 7 days) before granting unlock permission to prevent unauthorized reselling and ensure device security.

Step 1: Get the Required Tools

  1. Download the official Mi Unlock tool to your computer. Don’t worry or hurry, I have been there, you can trust me on this. It takes a few days before your device’s bootloader gets unlocked, but once unlocked, you can flash any ROM, install Magisk modules, and customize everything.
  2. Install ADB and Fastboot drivers on your PC so your computer properly recognizes your Xiaomi device in Fastboot mode.

Step 2: Bind Your Mi Account to Your Phone

Important Data Warning: Unlocking the bootloader will completely wipe all user data and factory reset your phone. Make sure to back up all photos, contacts, and important files before proceeding.

  1. Open your phone, go to Settings > About phone, and tap MIUI version (or OS version) 7 times until you see the message “You are now a developer!”.
  2. Go to Settings > Additional settings > Developer options. Enable both OEM unlocking and USB debugging.
  3. In Developer options, tap Mi Unlock status.
  4. Turn OFF Wi-Fi and turn ON Mobile Data (SIM card): Tap “Add account and device”. You must use cellular data tied to your registered Mi Account number; doing this over Wi-Fi will fail with a network error.
  5. Once you see “Added successfully. Mi Account is associated with this device now,” power off your phone.
  6. Boot into Fastboot mode by pressing and holding Power + Volume Down simultaneously until the Fastboot logo appears.
  7. Connect your phone to your PC via a reliable USB data cable.
  8. Open the Mi Unlock Tool on your PC, sign in with the exact same Mi Account that is logged into your phone, and click Unlock.
  9. The tool will display a message such as: “Couldn’t unlock. Please unlock 168 hours later” (or 360 hours on some older accounts). This countdown is enforced by Xiaomi’s server.
Xiaomi Bootloader Mi Unlock Tool
Xiaomi official Mi Unlock Tool on Windows

Rule during the waiting period: Disconnect your phone and use it normally during the countdown. Do NOT log out of your Mi Account, do not factory reset, and do not repeatedly tap “Add account and device”, or your timer will reset to day one!

Step 3: Finalizing the Bootloader Unlock

Once the required waiting period (usually 168 hours / 7 days) has passed, you are ready to complete the unlock:

  1. Turn off your phone and boot into Fastboot mode (Power + Volume Down).
  2. Launch the Mi Unlock tool on your PC as administrator and ensure your PC is connected to the internet.
  3. Sign in with your Mi Account credentials.
  4. Connect your phone via USB. Once recognized, click the Unlock button.
Unlocked Xiaomi Bootloader successfully
Bootloader unlocked successfully screen

The unlock tool will verify the device and complete the process in seconds. Your phone will reboot, format its internal data partition, and start with an unlocked bootloader (indicated by an open padlock icon on the boot splash screen).

Personal Case I: We were able to unlock our phone’s bootloader on 2 December 2016 within 2 days.
Case II: Took 15 days when we unlocked our Mi 11X unit. On modern Xiaomi 12, 12 Pro, 12X, and newer devices, the standard wait is 168 hours.

Known Issues While Unlocking Bootloader

  • Device not detected in Unlock Tool: Reinstall ADB & Fastboot drivers or try another USB port (preferably a rear USB 2.0 port rather than USB 3.0/hub).
  • Error 501 / Network Error: Make sure your PC’s internet connection is active and stable.
  • “Connect to the network and try again” error when adding account: Disable Wi-Fi and perform the account binding using mobile data on SIM 1.
  • “Information on device doesn’t match” error: Ensure your phone is signed into Mi Cloud with “Find Device” enabled, wait 24 to 48 hours, and try again.

Part 2: How to Root Xiaomi (Using TWRP and Magisk)

Once you have an unlocked bootloader, you can gain root privileges. While older tutorials relied on legacy tools like SuperSU, modern Android devices use Magisk-the universal systemless root solution that allows you to run root apps, install Magisk modules, and bypass SafetyNet / Play Integrity checks.

Step 1: Install Custom Recovery (TWRP / OrangeFox)

To flash third-party zip packages and custom ROMs, you need a custom recovery like TWRP or OrangeFox.

  1. Download the matching TWRP recovery image for your exact phone model from the official TWRP devices page or trusted device forums on XDA.
  2. Rename the downloaded file to twrp.img for convenience.
  3. Move twrp.img into your extracted ADB & Fastboot folder.
ADB and Fastboot folder structure
Place your recovery image in the ADB and Fastboot folder
  1. Open Command Prompt inside your ADB folder (type cmd in the File Explorer address bar and press Enter).
Opening Command Prompt in ADB folder
Open Command Prompt in your fastboot directory

Boot your phone into Fastboot mode (Power + Volume Down) and connect it via USB. Run the following command to verify connection:

fastboot devices

If your device serial number appears, flash the recovery image:

fastboot flash recovery twrp.img

(Note: On modern A/B partition devices like the Xiaomi 12 series, you can also temporarily boot into TWRP using fastboot boot twrp.img and install recovery permanently from inside TWRP’s Advanced menu).

To reboot straight into recovery, run:

fastboot reboot recovery

Or hold Power + Volume Up until the TWRP splash screen appears.

Step 2: Flash Magisk to Root Your Device

  1. Download the latest Magisk APK from the official Magisk GitHub repository.
  2. Rename the file extension from .apk to .zip (for example: Magisk-v27.0.zip).
  3. Transfer the zip file to your phone’s internal storage or an OTG flash drive.
  4. In TWRP recovery, tap Install, locate and select the Magisk-vXX.X.zip file, and swipe the slider to flash.
  5. Once finished, tap Reboot System.

When your phone reboots, open the Magisk app from your app drawer. It will prompt you to complete the additional setup. Once done, your Xiaomi device is fully rooted!

Part 3: Flashing a Custom ROM (LineageOS, PixelOS, etc.)

With an unlocked bootloader and custom recovery installed, you can replace MIUI/HyperOS with pure AOSP-based custom ROMs like LineageOS, PixelOS, or crDroid to experience stock Android without bloatware.

What You Need:

  • Custom ROM ZIP: Download the official LineageOS or preferred custom ROM build tailored specifically for your device codename (e.g., cupid for Xiaomi 12, psyche for Xiaomi 12X, zeus for Xiaomi 12 Pro).
  • Google Apps (GApps): Modern Android 12, 13, and 14 custom ROMs recommend MindTheGapps or NikGapps (OpenGApps is legacy and largely restricted to older Android builds). Some ROMs come with GApps pre-included.
  • Vendor Firmware (Optional/Recommended): Some custom ROMs require flashing the latest base Xiaomi firmware for your region (e.g., Global or India) before flashing the ROM.

Step-by-Step ROM Installation Guide

  1. Copy your Custom ROM zip and GApps zip to your phone’s internal storage, MicroSD card, or a USB OTG drive.
  2. Boot into TWRP recovery (Power + Volume Up).
  3. Perform a Backup: Tap Backup and take a full NANDroid backup of your current system so you can restore anytime.
  4. Format Data (Crucial for encryption): Go to Wipe > Format Data, type yes, and confirm. This decrypts storage and prevents bootloops when switching ROMs.
  5. Go to Wipe > Advanced Wipe and wipe Dalvik / ART Cache and Cache.
  6. Tap Install, select the Custom ROM zip, tap “Add more Zips”, select the GApps zip, and swipe to flash.
  7. Once flashing completes, tap Reboot System.

The first boot usually takes 3 to 5 minutes. Once loaded, complete the initial Android setup, sign into your Google account, configure fingerprint recognition, and enjoy a clean, fast custom ROM experience!

Issue: TWRP Asks for a Password to Decrypt Data

Modern Android versions enforce storage encryption by default. If TWRP prompts you for a password upon entry, you can dismiss it, go to Wipe > Format Data, type yes, and press Enter. This wipes internal storage encryption cleanly and allows you to flash ROM zips without errors.


I’ve tried to cover everything in this guide. If you feel I missed something or want to suggest an improvement, head to the comment section. I’m listening. That wraps up our guide to root and unlock Xiaomi devices. Go ahead, break some eggs!

Google lets you pick your sources now

If this helped, add quickfever.com to your preferred sources. Our articles will show up higher when you search about tech. One click. Free. And it helps us more than you think.

Add to my Google sources