In this article, we will show you how to gain root access to The Xiaomi POCO M3 using Magisk Manager by patching the boot image file of the firmware. Before we can root this device, the first step we need to ensure is to have the bootloader unlocked. We have already written an article that gives a step-by-step guide on how to unlock the bootloader of Xiaomi devices.
Downloading the Firmware
If you do not have an unlocked bootloader yet, read our article on “How to root Xiaomi Redmi Note 10 Pro and Pro Max?“. Once you have unlocked the bootloader, we need to download the firmware currently running on our device. So, what we’re going to do first is go to this Xiaomi firmware updater website. Open the website and look for the firmware matching your device name or code.
We are on the global version of Xiaomi POCO M3 so please confirm which version youre device is running. To confirm the exact firmware of your device, go to the About page in the settings app and check the version of MIUI that you are currently running. Make sure that it matches the exact number of the firmware that you’ll download from the website.
Preparing the Device and Magisk Manager
It doesn’t matter if you download the recovery or the fast boot version. For this tutorial, we just downloaded the smaller recovery version. Specifically, it just needs to match the firmware because we need to download the exact firmware on our device was and extract it’s contents. That firmware contains the boot image file and we need that boot image file to patch it with Magisk manager.
Extracting the Boot Image
Download the firmware on your desktop and extract the content. Then, copy the boot image file on your device that you just extracted from the firmware file you downloaded on your desktop.
Installing Magisk Manager
To patch that boot.img file, we need to download and install the Magisk Manager APK. We can download the official version by doing a Google search for GitHub Magisk. You should see the first result for “John’s GitHub Page”. Just scroll down the web page until you get to the downloads section, tap the Magisk Manager button and then download it.
Patching the Boot Image
Open it up and install it on your Xiaomi POCO M3. Once you finished installing the Magisk Manager on your device, Open the app and from here, we are going to patch that boot image file we just copied to our device. Tap on the install button at the top of the Magisk Widget. Tap on Install and allow storage access, and then we will choose the “select and patch a file” option from the first section. From here, we need to browse for that boot.img file that we just copied from the firmware file we downloaded.
So, select that boot.img file and then tap the let’s go option at the top. The process will start, and you can follow the log to see what the Magisk manager is doing to that boot.img file. We will look for where this output file is written, which should be next to that boot.img file. The output file is going to be named magisk_patched_and then some random letters.
When the process finishes, copy that output file from your device to your PC. After you copy that patched_magisk file back onto the PC, just boot your Xiaomi POCO M3 into fast boot mode. We have already written articles in which we discussed how to boot into fast boot mode.
Flashing the Patched Boot Image
Preparing for Fastboot
Just power off your phone completely and then press a combination of the power and volume down buttons to boot your device in Fast boot mode. Once in fast boot mode, we can connect our phone back to the PC with the USB cable. After that, you are going to need to have your Xiaomi POCO M3 connected to your PC with a USB cable; it needs to be in fast boot mode. Ensure that the output file you just copied from your device to your PC must be in the minimal ADB and Fast boot folder. You need to install minimal ADB and fast boot on your PC to continue further and copy the output file in that folder.
Using Fastboot
To make it simpler, just rename the file to a simple name so it is easy for you to type the file name in the command prompt. We have renamed the file to magisk_patched.img to make it simpler. So, once that file has been renamed and is in the same folder as your minimal adb and fastboot tools, we are going to open either our command prompt, Windows PowerShell, or a terminal/CMD.
It doesn’t matter which type of Command Line you use. You must open it in the same folder as your ADB and fast boot tools. When you’re ready, whilst the phone is in fast boot mode and still plugged into your PC. Type out the command “fastboot flash boot magisk_patched.img” The actual command is “fastboot flash boot“, and then type the name of that output file you just copied from your phone. We renamed the “Magisk_patched.img” file and typed that name into the command prompt.
With this command, we are telling that fast boot file to flash, aka copy and install the patched image file to the boot partition. It will overwrite our default and stock boot.img file with the one that we have patched with Magisk.
When you’re ready, type the command. All you have to do is press Enter on the keyboard. It will send that boot file or that image file to the phone and tell you the file size. We are going to look for an OK response, as we want an OK response and then it’s going to write that image to the boot partition.
You should get an ok message, and that’s it.
From here, we can either type “fastboot reboot” and press Enter or press the power button on the Xiaomi POCO M3 for about 7 to 10 seconds to force the device to reboot. Unplug the USB cable from the device before rebooting it and then reboot the device.
The reboot will boot us back into the Android operating system like usual.
Conclusion
That is it! Your device is now rooted.
You can check it by going onto the Play Store, downloading a simple root checker app, and verifying root access.
Experiencing difficulties with your Device, check out our “How To” page on how to resolve some of these issue