Xiaomi 12, 12X How to Unlock Bootloader, Root and Flash Custom ROM

A basic and bulletproof guide for all the MI and Xiaomi phones: Unlock bootloader, installing recovery (TWRP), and flashing MAGISK to root and Custom ROMs to always taste latest Android versions. Also some instruction on switching from Global MIUI ROM to Developer ROM without unlocking the bootloader. We’ve a good experience with Xiaomi devices and We own many of them; here is everything you’d need to unlock, root and flash custom ROMs on your Xiaomi Device.

Currently Works for: Xiaomi 12 Pro, 12X, and 12

What you’ll learn in this guide.

  • Unlocking Xiaomi device bootloader with official method
  • Installing the TWRP Recovery on your phone
  • Taking root permission with MAGISK
  • Flashing a LineageOS ROM or other custom android ROM

Use the below quick links to jump to your desired guide.

Xiaomi Unlocking bootloader

Psst! this is no quick-time process, which means you’ll have to ask MI to unlock permission. Update: Now it takes some hours to a few days to get unlock permission.

Day 1: Get required tools

  1. Download MI Unlock tool to your computer. Don’t hurry or worry, I have been there, you can trust me on this. It will take days before your device’s bootloader get unlocked (and rooted, so you can flash any ROM, and do everything a rooted phone could ever do), I tried to sum up everything in one single article, come on guys, if this was helpful to you, like us on Facebook.)
  2. Install fastboot drivers: Download adb and fastboot tool.

Day 1: Let Xiaomi know you want to unlock

  1. Add your MI account on your Phone.
  2. Add the same MI account in the Unlock tool.
  3. Press Power+Volume Down to access fastboot mode.
  4. Connect to a PC, make sure to install fastboot drivers.
  5. Open the Unlock tool and click on Unlock.
  6. You’ll be asked to repeat the exact process after 360 Hour (15 Days). You should not use other instant unlock tools, the 15 days time is as per company policy.

Day 15: Bootloader Unlock process

After 15 days, you can use the Unlock tool to unlock bootloader. In the meanwhile you should not change MI account on your phone, otherwise you have to start from scratch.

Open your phone > about > MIUI version > tap several time to enable developer options. Now go to “developer options” and enable the “OEM unlock” and “USB debugging“.

Step 1. Turn off your phone and boot into fastboot mode, (Power + Vol down key simultaneously).

Step 2. Open the MI unlock tool as administrator or just as you open any setup file by double-clicking on it. Accept the rules and the terms of the MI unlock tool. Make sure you’re connected to the Internet on your laptop or computer.

Step 3. Sign in with your MI account, you can use your email and password, though, it should be the same which is logged into your phone.

Step 4. Make sure your phone is connected to the computer via the USB cable while in fastboot mode. On a successful connection, you’ll see the “unlock” button, click on that and hold tight.

unlock-redmi-note-3-bootloader

If everything goes right your phone now has an unlocking bootloader, so you can flash a custom recovery like TWRP install Magisk to root your phone.

Personal Case I: Able to unlock out phone’s bootloader on 2 December 2016, Which means almost 2 days after I got unlock permission.
Case II: It takes 15 days now, unlocked our MI 11X unit.

Known issues while Unlocking bootloader

Q. Can’t see device on clicking refresh button in Unlock tool

A. You did not installed ADB and fastboot drivers correctly, also check if the USB cable you’re using supports data transfer.

1. 501 error = you’re not connected to the Internet.
2. Information on the device doesn’t match.

This is a common issue, you’ll have to wait for a day and try again or flash a developer ROM, is the problem persists. Note that you’ll have to wait for some time after in case you flashed a beta ROM, you need to sign in to your MI account on the phone and enable the find device option. (while there is no solid proof that finds device setting should be turned on).

How to Root Xiaomi 12, Pro and X vartient

Once you have an unlocked bootloader, you can proceed with rooting it. For that purpose, you’ll need to install a custom recovery on the RN3 android phone to root it with SuperSu. The SuperSu is an application that should be flashed on your phone to gain root permission.

  • You can get a recovery such as TWRP.
  • MAGISK (either .APK or ZIP) for handling root permissions.

Follow the next section to root your Xiaomi Phone with TWRP recovery.

Installing Custom Recovery; TWRP

It will require install custom ROMs you need a custom recovery that allows third-party zip files to flash on your Android device TWRP is a popular customer recovery project

After downloading the TWRP image file, paste it inside the ADB & Fastboot folder. You should rename it to just “twrp” for ease.

Get TWRP recovery from here.

Get ADB and fastboot zip (Save and extract on your computer).

Step 1. Open your phone in the fastboot mode and connect to the computer using the USB cable. You’ll need to install the ADB driver and the Fastboot zip files to flash the twrp. img on your phone.

Your folder should look like this.

root redmi note 3, how to

Step 2. Right-click in the white or black area and choose “open command prompt windows from here“, here is an image from an old guide.

how to root redmi note 3 using twrp

Step 3. Now the command prompt window will open, and you’ll need to type a few commands to install TWRP on the phone. Please note that handle this with care and do not type imaginary commands, this might do nasty things to your phone).

Type the following command to determine whether your phone is successfully connected to the computer.

fastboot devices

If you see some characters, this confirms that the phone is in fastboot mode and connected successfully to the computer and there is no need to install other drivers.

Now enter the following command to flash the TWRP recovery. Replace the ‘twrp.img’ if your twrp recovery file have a different name. The twrp.img file should be in the same folder.

fastboot flash recovery twrp.img

or To temporary boot into TWRP recovery (One time)

fastboot boot twrp.img

You can use the following command to reboot. That’s not required. though, you can press “Vol + Power Up” button simultaneously to load the TWRP recovery menu.

fastboot reboot

Step 4. Flashing SuperSU.

Alright, now access the Twrp menu and choose Install > and select the location where you put the SuperSu zip file > Flash it.

Next time when you start your phone, it will have SuperSu application installed which will manage root permission to apps and things that requires it.

Flashing A Custom ROM (i.e. Lineage OS)

TWRP recovery is required to install the CyanogenMod ROM on your Redmi note 3 device (Twrp Link are given above in this guide).

What is required

LineageOS or Other ROM

OpenGapps: Note that the smallest opengapps package named “Pico” won’t support Fingerprint and some other setting. So burn some extra bandwidth.

A Firmware: (Optional) A firmware allows additional options like Volte in Iinda.

Step-by-step guide

Place both files on an SD card or even inside the Internal storage if the phone is currently running. Redmi Note 3 has OTG support so in case if you don’t have an SD card we can also plug a USB drive using an OTG cable.

Access the TWRP recovery, Install > Select CM ROM zip > Add another zip > Select OpenGapps Zip > Slide to flash them.

Hardly after 5 minutes, tap on the Reboot option and boot to the system. The first run will take some time depending on the OpenGapps version, but once it’s done. Choose language > Some basic phone options > Sign in to google > Set Fingerprint > Done.

Issue: TWRP asks for a password to encrypt data

This is a simple thing, even if you skip this, you’d be able to flash a ZIP. But folks over the MIUI forums have a solution for it. Note that this will wipe the data from your device and in case you are solely installing the CM Rom, just Wipe the “Data and Internal storage” using the TWRP recovery without entering the password.


I’ve tried to cover everything in this guide, if you feel I missed something or to suggest me, head to the comment section. I’m listening. Here is the giant guide to root and unlock Xiaomi ends. Go ahead break some eggs.

Get a $200 credit free