[Realme X2 Pro Guides, News, & Discussion] hack-os:
~*~ Disclaimer: I'm not responsible if you destroy your device or break your warranty. Use at your own risk! ~*~

Update your Realme X2 Pro with C.38 with System Update or download the file specific for your device CN/IN/Global and simply opening the ozip file in your File Manager. Latest RUI Updates since c27 and Magisk Canary fixes FP which used to break when rooted. Magisk 20.4 gives issues with RUI and custom roms

Official TWRP for Realme X2 Pro which is also maintained by Mauronofrio is not the same as unofficial TWRP 3.4.0 by Mauronofrio which is given below. Use only as mentioned in this post. Official TWRP has issues when flashing ozip.

​

If TWRP 3.4.0 by Mauronofrio or OrangeFox Recovery for realme X2 Pro is already installed. Repeat these steps for every RUI Update. Thanks @minoccio​

Install c38 update ozip with TWRP and dont reboot to avoid bootloop/softbrick

No need to wipe any partition (Dirty Flash)

[Not recommended] Reboot only if its needed to automatically replace the custom recovery with stock by not installing modified vbmeta or not rooting the device by installing magisk.

Install vbmeta.imgwith TWRP by selecting vbmeta partition.

[This step is essential to have TWRP persistent by not getting replaced with stock recovery and also to avoid bootloop]

Install Magisk Canary - Rename apk tp zip and flash (Optional only if root is required)

Reboot to System (May take 5-7 minutes to complete booting)

Follow the below procedure to root RUI or to replace stock recovery

Make sure the bootloader is unlocked. click here for Unlock Procedure

Boot to fastboot(power off device and hold vol- and power)

Install latest TWRP or OrangeFox in fastboot with a Windows PC. Use Minimal ADB Fastboot v1.4.3

TWRP - Download: TWRP 3.4.0-0 Thanks @mauronofrio

fastboot flash recovery twrp-3.4.0-0-RMX1931-mauronofrio.img

OrangeFox - Download: OrangeFox-R10.1 Thanks @Jerry08

fastboot flash recovery OrangeFox-R10.1_1-Unofficial-RMX1931.img

OrangeFox Recovery for realme X2 Pro - Download: OrangeFox-R11.0_1-Stable-RMX1931 Thanks @Jerry08

flash OrangeFox-R11.0_1-Stable-RMX1931.zip in custom recovery

Reboot to Custom Recovery

Install VBMETA with Custom Recovery -

To avoid bootloop or softbrick your device and to make custom recovery persistent.

Download: VBMETA

Flash Magisk Canary - Download to your device.

Download: Magisk Canary module[12.1 MB]

Rename the .apk file extension to .zip, for example: Magisk-v22.0.apk → Magisk-v22.0.zip. If you have trouble renaming the file extension (like on Windows), use a file manager on Android or the one included in TWRP to rename the file. Thanks @topjohnwu

[*]

Get Magisk Canary Uninstaller to your device as a precaution to uninstall magisk canary by flashing this uninstaller zip file in custom recovery in case of any issues or bootloops related to Magisk.

Download: Magisk Canary Uninstaller [2.54 MB]

Reboot to System (May take 5-7 minutes to complete booting)

New Magisk Canary app will be installed automatically in few seconds

Update Magisk Canary app

Download: Magisk Canary app [9.45 MB]

Uninstall any previous old versions of magisk

Open Magisk Canary app

Click Gear button on the Right Top Corner

Under section Manager click Hide Magisk Manager

Enter any new name of your preference

Modified Magisk manager will be installed

Under Magisk section, enable MagiskHide Toggle

Go Back to Magisk home and click shield icon present at the bottom

Go to MagiskHide - Enable toggle for all banking apps/Google Pay/apps which fail when rooted

Go To SafetyNet - It would Pass basicIntegrity and ctsProfile in basic evaluation mode with Success message.

Note: SafetyNet in canary build passes in stock roms above (C.28) and custom roms still have to use Magisk V20.3

Troubleshoot:

Recover from Black Screen of Death (BSoD) or stuck with realme logo on boot

Can follow the following instruction(s) in any order

Hold Vol+ and Power button till it restarts (more than 10 seconds)

Work in Flashboot to Flash or Wipe anything as per your requirement.

Try flashing Custom Recovery

Flash Magisk Uninstaller if issue related to Magisk

Download: Magisk Canary Uninstaller [2.54 MB]

Check if there are two magisk app installed then Uninstall only the newly magisk app installed which was the result of flashing the magisk module.