How to Root Xiaomi 12, 12X, and 12 Pro Using Magisk

Ever wondered how to get the most out of your Xiaomi 12, 12X, or 12 Pro? Rooting your device can give you more control, letting you personalize and improve your phone. Let’s walk through the steps to root your Xiaomi device using Magisk without TWRP. We’ll cover everything you need to know.

Prerequisites

  • Unlocked Bootloader: Your device must have an unlocked bootloader.
  • Battery: Ensure your phone has at least 60% battery.
  • Backup: Backup your device data to avoid data loss.
  • PC/Laptop: A computer is required to run commands.
  • USB Cable: Use a USB cable to connect your device to the computer.

Required Downloads:

Unlocking the Bootloader

First, you need to unlock the bootloader. This step is essential for making any changes to your device.

Turn off your device. Press and hold the Volume Down and Power buttons together to enter Fastboot mode. Connect your device to your PC using a USB cable.

Open a command prompt on your PC and type:

fastboot devices

This command should show your device ID, confirming the connection. Now, unlock the bootloader with:

fastboot oem unlock

Follow the on-screen instructions on your device to confirm the bootloader unlocking process.

Enabling Developer Options and USB Debugging

Next, enable Developer Options and USB Debugging.

Go to Settings > About phone. Tap on MIUI version several times until Developer options are enabled. Then, go to Settings > Additional settings > Developer options and enable USB Debugging.

Downloading Necessary Files

Download all required files listed in the Prerequisites section directly to your PC. These files are crucial for the rooting process.

Patching the Boot Image

Now, let’s patch the boot image.

Download and extract the ROM to your PC. Connect your device via USB cable and copy the boot.img file from the extracted ROM folder to your device storage. Install and open Magisk Manager on your device. Select Install > Install > Select and Patch a File.

Find the boot.img file on your device storage and select it. Magisk will start patching the boot image. Once done, the patched boot image will be saved in your device’s Download folder.

Flashing the Patched Boot Image

Next, we’ll flash the patched boot image to your device.

Copy the patched_boot.img from your device to the ADB & Fastboot tool folder on your PC. Boot your device into Fastboot mode by turning it off and pressing the Volume Down and Power buttons together. Open a command prompt in the ADB & Fastboot tool folder and type:

fastboot flash boot patched_boot.img

For devices with A/B partition, use:

fastboot flash boot_a patched_boot.img
fastboot flash boot_b patched_boot.img

Finally, reboot your device with:

fastboot reboot

 

Verifying Root Access

The last step is to verify root access.

Open the Magisk Manager app on your device. The app should show the root status and confirm that everything is set up correctly.

Great job! Your Xiaomi 12, 12X, or 12 Pro is now rooted. Enjoy having more control over your device.

If you run into any problems or have questions, feel free to ask in the comments below.

Now that your phone is rooted, you can personalize it in ways you never could before.