Home > Root

How to Root Realme X without TWRP via Magisk

In this tutorial, we will show you how to root the Realme X device via Magisk, without making use of the TWRP Recovery. The steps will also be applicable to the Realme X Master edition. First of all, we will be extracting the OZIP firmware, then taking the stock boot.img file from that extracted OZIP firmware.

After this, we will patch this stock boot.img file via Magisk. Finally, the Magisk patched boot image will be flashed via Fastboot Commands on to your Realme X device. Realme has managed to bring in a ton of impressive handsets to its arsenal. In this regard, Realme X is one such device that stays true to the roots of this OEM.

Offering a plethora of features at an affordable price, well one couldn’t have asked for much more. The 6.53-inch screen has a 1080 x 2340  pixel resolution. The octa-core Qualcomm SDM710 Snapdragon 710 chipset has Adreno 616 as the GPU. Furthermore, the device comes in five different variants, from 64GB 4GB RAM all the way up to 256GB 8GB RAM.

realme x
Realme X

Then there is a dual 48+5Mp rear camera setup, followed by a single 16MP motorized pop-up camera. Coming with an under-display fingerprint sensor, it supports 20W fast charging, powered by its own VOOC 3.0 Technology. All in all, we couldn’t have asked for more from a device belonging to this segment. But to be fair, this is just the beginning.

You could get hold of tons of other tweaks and modifications once you unlock the device’s bootloader and gain administrative rights. The latter is possible via rooting. And in this guide, we will help you achieve just that. As mentioned before, the steps to root your Realme X device will be done via Magisk, without using TWRP. With that said, here are all the required instructions.


Rooting Realme Devices: What’s the Major Hurdle?

There exist two different methods to root any Android device. The first one simply involves flashing the Magisk Installer ZIP via TWRP. However, not every device has a working custom recovery like TWRP. In that case, the second alternative stands rooting the device without TWRP, using Magisk. All that is needed is a stock boot.img file for your firmware which could then be patched via Magisk and flashed via Fastboot commands.

However, with Realme, things begin to get a little bit difficult in this. The thing is all the Realme stock firmware comes in OZIP extension. Hence you cannot extract the firmware contents ‘the normal way’. You will have to make use of Python and a Decrypt tool to extract this firmware and get the boot image file. Trust us all these sounds difficult only on paper but in practice, it is way too much easier to execute. And in this guide, we will be making use of just that.

On that note, here are the complete instructions to root the Realme X device via Magisk without TWRP Recovery. here is the blueprint of this guide- we will first use Python and Decrypt tool to convert OZIP stock firmware to the ZIP package. Then we will extract that ZIP package via WinZIP or WinRAR. After this, the extracted stock boot.img file will be patched via Magisk. Finally, the magisk patched image fill be flashed via Fastboot on your Realme device. Follow ahead for the complete instructions.

How to Root Realme X

To begin with, there are a few requirements that your device needs to qualify. Make sure to go through them before you proceed with the rooting steps. Droidwin or any of its members won’t be held responsible if anything happens to your device. Proceed ahead at your own risk.


  • Download and install the Android SDK Platform Tools on your PC. This will give us the necessary ADB and fastboot binaries.
  • Next up, enable USB Debugging on your Realme device. It will help your PC in recognizing your device in ADB mode. We would be needing to access ADB mode to reboot your device to Fastboot Mode. To enable Debugging, head over to Settings > About Phone > Tap on Build Number 7 times > Go back to Settings > System > Advanced > Developer Options > Enable USB Debugging.
  • Finally, download and install the Magisk Manager APK file onto your Realme device.

You may now proceed with the steps to root Realme X via Magisk, without TWRP Recovery. Follow along.

Magisk Guides

STEP 1: Unlock Bootloader

To begin with, you will have to unlock the device’s bootloader. If you haven’t done so, refer to our detailed guide on how to Unlock Bootloader of Realme X. For that, we would be making use of the Realme X In-Depth Test Tool APK and one ADB and one Fastboot command. All the instructions are given in the linked guide. Do keep in mind that this process will wipe off all the data from your device and might also make the warranty null and void. Proceed ahead with caution.

STEP 2: Convert Realme X Firmware from OZIP to ZIP

You now have to covert the Convert Realme X Firmware from OZIP to ZIP. We need to do this because then only we could extract the boot image file from ZIP. Extracting an OZIP file is just not possible using WinZIP or WinRAR. For that, a specific set of tools and instructions are needed. So head over to our comprehensive tutorial on How to Extract OZIP Realme Stock ROM (Firmware).


STEP 3: Extract Stock Boot Image File

Once you have converted your device’s stock firmware from OZIP to ZIP, make use of the WinZIP or WinRAR tool to extract the stock boot.img file. No need to extract all the contents of stock firmware. Just the boot.img file will do. Once you have extracted the file, move to your device’s Internal Storage.


STEP 4: Patch Stock Boot Image via Magisk

STEP 4 & STEP 5 outlines the steps to patch stock boot.img file via Magisk and then flash it via Fastboot Commands. For detailed instructions on this topic, refer to our guide on how to Patch Stock Boot Image via Magisk and Flash it using Fastboot.

  1. Launch Magisk Manager APK on your device.
  2. Tap on Install next to the Magisk status (which would show Magisk is not Installed).
  3. Now install Magisk popup will appear, tap on Install.
  4. Under the Select method dialog box, tap on Select and Patch a file.
  5. Navigate to the stock boot.img file that you have transferred to your device in the earlier section and select it.
  6. Magisk will then patch this file and the entire process shall only take a few seconds.
  7. Once that is done, head over to Internal Storage > Downloads folder and you will find the magisk_patched.img file there.

A/B Partition Guides

STEP 5: Flash Magisk Patched Boot Image onto Realme X

  1. Transfer the magisk_patched.img file from your device to the folder where Android SDK Platform Tools are installed. This should be the platform-tools folder on your PC.
  2. Now connect your device to PC via USB cable. Make sure USB debugging is enabled.
  3. Head over to that platform-tools folder, type in CMD in the address bar, and hit Enter. This will launch the Command Prompt.
  4. Execute the following command in the CMD window to boot your Realme device to fastboot mode:
    adb reboot bootloader
  5. Finally, make use of the below command to flash the Magisk patched boot image file:
    fastboot flash boot magisk_patched.img
  6. Once the flashing is done, you may reboot your device. For that either use the hardware key or the below command:
    fastboot reboot

With this, we conclude the guide on how to root the Realme X device via Magisk, without making use of the TWRP Recovery. If you any doubts, do let us know in the comments section below.

  • My realme x stuck in boot loop after this

  • Ashutosh Gupta

    what if I’m using custom rom? I have to patch it’s bboot image in that case. Right?

    Also, I don’t seem to have ramdisk in my device. How’s that? Do I have to patch and install the recovery image? which recovery image should I use?

    • Sadique Hassan

      Hi Ashutosh, could you let me know the custom ROM that you are using on your Realme X?