In this guide, we will show you the steps to root your Realme X2 Pro device via Magisk without using TWRP Recovery. This device from the OEM comes with some power-packed features. Along the same lines, the device is well supported in custom development as well. Once you checkmark the sole prerequisite of unlocking the device’s bootloader, there stands a plethora of tweaks for you to try out.
These include the likes of flashing a custom ROM, installing a custom recovery like TWRP or OrangeFox, or gaining administrative rights over your device. And it is the last one that seems to arouse curiosity in the minds of tech enthusiasts. Once you root your device, you not only gain access to the system partition but also opens the floodgates to the plethora of customizations.
For example, you could now flash Substratum Themes, Xposed Framework, Magisk Modules, and the likes. With that said, there are two different methods through which you could carry out the rooting process. The first one is by flashing the Magisk ZIP via TWRP (Magisk ZIP is now part of the Magisk App). While it is no doubt an easier approach, but there’s a lot of complexities involved with TWRP, especially after the introduction of the A/B Partition.
As a result, users flock towards the second method of patching the stock boot.img via Magisk and flashing it via Fastboot Commands. And in this guide, our focus will be on this method itself. So without further ado, let’s start off with the guide to root your Realme X2 Pro device via Magisk without using TWRP Recovery.
How to Root Realme X2 Pro via Magisk without TWRP
The below instructions are listed under separate sections for ease of understanding. Make sure to follow in the exact same sequence as mentioned below. Droidwin and its members wouldn’t be held responsible in case of a thermonuclear war, your alarm doesn’t wake you up, or if anything happens to your device and data by performing the below steps.
Install Android SDK
To begin with, install the Android SDK Platform Tools on your PC. This is the official ADB and Fastboot binary provided by Google and is the only recommended one. So download it and then extract it to any convenient location on your PC. Doing so will give you the platform tools folder, which will be used throughout this guide.
Enable USB Debugging and OEM Unlocking
Next up, you will have to enable USB Debugging and OEM Unlocking on your device. The former will make your device recognizable by the PC in ADB mode. This will then allow you to boot your device to Fastboot Mode.
On the other hand, OEM Unlocking is required to carry out the bootloader unlocking process. So head over to Settings > About Phone > Tap on Build Number 7 times > Go back to Settings > System > Developer Options > Enable USB Debugging and OEM Unlocking.
Unlock Bootloader on Realme X2 Pro
You will also have to unlock the bootloader on your Realme X2 Pro device if you wish to root it via Magisk without using TWRP. As opposed to other OEMs, Realme takes a different approach when it comes to this process.
It requires you to install the In-Depth Test APK file and proceed with the on-screen instructions to carry out the unlocking process. All the instructions are given here: How to Unlock Bootloader of Realme X2 Pro. Make sure to have a complete device backup beforehand before unlocking.
Extract Realme X2 Pro Stock Boot.img from OZIP Stock Firmware
Next up, you will have to download the stock firmware file for your device. This firmware file will then be extracted to get the stock boot.img file. However, as opposed to other OEMs, Realme again takes a different approach. Its firmware files are packed inside the payload.bin format, hence the normal extraction tools such as WinZip or WinRAR wouldn’t function.
So first off, download the stock firmware for your RealmeX2 Pro device from the official site. Make sure to download the same firmware that is currently installed onto your device (verify from About Phone/Build Number). After that, you will have to make use of a payload extraction tool based on Python for this process. Please refer to this guide to carry out the said process: How to Extract OZIP Realme Stock ROM (Firmware).
As of now, I am using the RMX1931EX_11.C.36 firmware file so I already extracted the stock boot.img from the OZIP firmware. So if you are also on the same build number, then you may directly use my boot.img file.
Moving on, once you have got the stock boot.img file, transfer it to your device. We will now patch this file to root RealmeX2 Pro via Magisk without using TWRP Recovery.
Patch Realme X2 Pro Stock Boot.img via Magisk
- First off, install the Magisk App onto your device
- Likewise, make sure boot.img has been transferred to your device.
- Then tap on the Install button situated next to Magisk.
- From the Method section, choose Select and Patch a file.
- Browse to the extracted boot.img file and select it.
- Then tap on the Let’s Go option situated at the top right.
- Magisk will now load the boot.img file and will patch it accordingly. Once that is done, you would get the Download Complete message.
- The patched boot image file will be saved in Internal Storage > Downloads. The name of the file will be magisk_patched.img.
Boot Realme X2 to Fastboot Mode
- Connect your device to the PC via USB cable. Make sure USB Debugging is enabled.
- Then head over to the platform tools folder, type in CMD in the address bar, and hit Enter. This will launch the Command Prompt.
- Type in the following command in the CMD window to boot your device to Fastboot Mode:
adb reboot bootloader
- To verify the connection, type in the below command. You should get the device ID followed by the Fastboot keyword, signifying that the connection has been successfully established.
- Let’s now proceed to the final step of this guide to root your Realme X2 Pro via Magisk without using TWRP.
Flash Magisk Patched Boot.img and Root Realme X2 Pro
- To begin with, make sure that you have transferred the magisk_patched.img file to the platform tools folder.
- Now type in the below command in the CMD window (that is opened inside the platform-tools folder) to flash the Magisk Patched file:
fastboot flash boot magisk_patched.img
- Once that is done, reboot your device to the OS via the following command:
That’s it. These were the steps to root Realme X2 Pro via Magisk without using TWRP Recovery. If you have any queries concerning the aforementioned steps, do let us know in the comments. We will get back to you with a solution at the earliest.