How to Root Realme X [RMX1901]

Hi there, After bringing up successful TWRP & PBRP, I tried installing Magisk by flashing zip from recovery to get root access. From android pie many devices no longer uses ramdisk in boot images. Magisk used to patch ramdisk, but as there is no ramdisk in boot, flashing magisk does nothing but generates same boot image with different key due to which device thinks it’s boot is corrupted. For this situation, magisk has no chice, it should be installed in the recovery partition.

You can read more about magisk in recovery here. And about new partiton layout here.

I remembered same situation for Realme 3 pro where i patched the recovery image and then flashed vbmeta with disable verity flag to get root access. Same thing applied here. I patched the recovery image (both twrp & pbrp) then flashed vbmeta following recovery flash.

Perquisite

  1. Unlocked bootloader
  2. working TWRP or PBRP (get TWRP here OR PBRP here)
  3. patched TWRP/PBRP (from download section)
  4. stock vbmeta.img (from download section)

Instructions

There are some limitations, first go through all the steps once or more untill you completely understand what you are going to do properly. Then follow it.

  1. Flash patched recovery image (TWRP or PBRP) from fastboot or recovery to recovery partiton
     # For TWRP
     fastboot flash recovery patched_twrp.img
        
     # For PBRP
     fastboot flash recovery patched_pbrp.img
    
  2. Flash vbmeta.img to disable boot/recovery signature verification as well as verity to vbmeta partition. You have to flash this from fastboot for now, in future update i may add vbmeta & dtbo partiton to flashing image menu so both can be done from recovery mode.

     fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
    
  3. Only after completing both steps correctly, reboot your phone by selecting start from bootloader options. You should see red statusbar with warning that you are maliciously rooted like below:

    Rooted Device Notification Red Statusbar Warning

    Tap on that notification and select maintain root status.

    Maintain Root

  4. Now install latset magisk manager apk (And yes it won’t show you magisk installed), click on Advance Settings check Recovery Mode & reboot.

    Screenshot-001

  5. Now open magisk manager (It may show you prompt Require Additional Setup to install magisk click No, thanks) it will show you core only mode enabled. And also Superuser, Modules, downloads, log menus will show up.

    Magisk Screenshot 01 Magisk Screenshot 02 Magisk Screenshot 03 Root Explorer Screenshot

  6. Now interesting thing is (also if you read the magisk in recovery notes linked above) when you do reboot to recovery it won’t reboot to recovery, it will reboot to system with magisk.

  7. To boot into recovery mode you have to keep pressing volume up button untill you see recovery splash screen.

Note:

Reverting Back

Downloads

  1. Patched Images
  2. Vbmeta Image

Thanks for reading patiently. See you in future posts !

o EOP o