realme X2 Pro

Unlocking and custom ROM installation

What's wrong with realme UI?

Everything. From battery bugs to memory leaks to stuttering in games to restricting features to their stock launcher, realme's software is insanely unoptimised.

Furthermore, their Privacy Policy and User Agreement states that they can (and do!) record everything you do on your device and send it to Chinese servers, and that you are not allowed to view or store pornography on your device.

How can we fix it?

The easiest way to fix this for your device is taking back control and installing a custom ROM. Some manufacturers, like realme, make this a pain to do, so you'll need some patience and the ability to read instructions.

Guide info


Massive thanks to Gamr13 for the original guide which I spruced up into this fancy webpage.

Thanks to all the testers on the realme Discord server who made sure this actually worked.


Version and changelog

This version: v2.3


Version 2.3


Update links and guide to Android 11.

Version 2.2


Make disclaimer big and red! Switch to using giffgaff minor alerts (rip off of my existing alerts).

Version 2.1


Update OF img filename. Add step to allow OF to modify system. Add AOSiP to "supported" instructions. Switch to NikGApps from OpenGApps (don't want no bootloop, do we?!). Add missing "back" step after flashing complete.

Version 2.0


Switch instructions to realmeUI firmware-based LineageOS instead of ColorOS-based AOSiP.

Version 1.6.1


Update fastboot flash success message. Fix mobile overflow again. Shrink down button on small viewports.

Version 1.6


Move scripts to end of body, add missing ids, add contents section, fix mobile view.

Version 1.5.1


Fix x-axis overflow due to code blocks, improve VoLTE fix wording, add changelog dates.

Version 1.5


Replace firmware downloads with OZIP downloads after the AFH files were deleted.

Version 1.4


Add "completing installation" section, with info about Magisk, GCam, 90 Hz, fluid navigation gestures, and screen recording.

Version 1.3


Clarify bootloader unlock command line steps.

Version 1.2


Clarify that ADB and Fastboot should be downloaded to your PC, not phone.

Version 1.1


Added changelog, about guide section. Adds universal ADB/Fastboot driver info. Adds info about prepping your device.

Choose your Android version

Some instructions vary based on the version of Android that you are running on your device. Selecting the version your device is running allows us to hide steps which don't apply to your version and add steps that do, so it is critical that you choose the right option.

Before you start

You're running

Not right? Change your selected version

Backing up your data

This guide will involve completely wiping your device. If you have any data you wish to keep, back it up now.


If you want an easy way to back up your photos and videos, take a look at Google Photos. It keeps all your media synced to the cloud for free. If you choose "High Quality" then it won't even use your Google Drive data.

2-factor authentication apps

If you use authenticator software, make sure you know how to reactivate it on your new device. Some apps don't allow for new activations before enabling them on your old device. You don't want to get stuck out of your device.

If you use Google Authenticator, you need to use another device as a go-between to back up your codes. Open the Authenticator app on your phone and tap the three dots in the top right. Choose Transfer accounts, then Export accounts. Select all accounts you wish to transfer, then tap Next. Take a photo of the generated QR code with another device, or use Authenticator on that device to import them. Once your phone is set up with a Custom ROM, you can import them again.

Personally, I use Authy as it syncs between all my devices easily.


The easiest way to back up other data is by transferring it to another device via USB. You can plug in USB drives directly to your phone via USB C OTG connectors (Amazon UK).


Final notes

  • For a few days after installing LineageOS or AOSiP you may see much lower battery life. This is normal and stops after around 2 days. It's due to your phone performing extra setup steps in the background, like updating system apps (Google Apps, Play Store, etc), registering your device with Google, etc.
  • AOSiP does not have facial unlock support, but LineageOS does.
  • Don't burn your retinas: the setup screen is full white at 100% brightness.

Unlocking the bootloader

You're running

Not right? Change your selected version

  1. Download the in-depth testing APK for ColorOS 6
  2. Download the in-depth testing APK for realme UI 1.0
  3. Install and run the APK you downloaded
  4. In the app, tap Start applying and follow the on screen instructions
  5. When you reach the Application submitted screen, press back
  6. Open Settings on your phone and go to About phone. Tap Build number 7 times until you see You are now a developer. Go back, and tap Additional Settings, then open Developer Settings.
  7. Open Settings on your phone and go to About phone and then tap Baseband & Kernel. Tap Version 7 times until you see You are now a developer. Go back, and tap Additional Settings, then open Developer Settings.
  8. In Developer Settings, enable USB Debugging and OEM Unlock
  9. Keep checking the status of your application.
    • It can take up to 30 minutes for your application to be accepted
  10. When you see Review successful, tap Start the in-depth test
    • All data on your device will be deleted during this step.
  11. the ADB and Fastboot zip to your PC and extract their contents to a folder
  12. Connect your device to your computer via a USB cable
  13. Open a command prompt or terminal and change directory to the extracted folder
    • On Windows, for example, if you extracted them to your downloads folder you could type cd "%userprofile%\​Downloads\​extracted folder"
  14. The phone should reboot and show in green text START. If it doesn't, run this command: adb reboot bootloader
  15. Unlock the bootloader by running this command: fastboot flashing unlock
  16. Press Volume Down to highlight the UNLOCK THE BOOTLOADER option, then press Power to select it
  17. Press Volume Up to choose the UNLOCK THE BOOTLOADER option
  18. In your command prompt/terminal, enter the command fastboot reboot
  19. The phone will reboot, perform a factory reset, then show the setup screen

Flashing OrangeFox recovery

You're running

Not right? Change your selected version

  1. Unplug your phone, then turn it off fully
  2. Hold Volume Down and the Power button to boot the phone into Fastboot mode
  3. Plug the phone back into your computer
  4. Download OrangeFox Recovery
    • OrangeFox is a skinned version of TWRP recovery with added features and a simpler UI. If you have issues, you're more likely to find a solution by using TWRP in your Google search than OrangeFox. Note that options are in different locations in OrangeFox and TWRP so solutions might not work without some looking around.
  5. Download vbmeta.img
  6. Move both of these files to the same directory as ADB and Fastboot
  7. In your command prompt, flash the recovery partition to install OrangeFox. It should say OKAY or SUCCESS.
    fastboot flash recovery OrangeFox-​R11.​0_1-Stable-RMX1931.img
  8. Also flash the vbmeta partition. It should say OKAY or SUCCESS.
    fastboot flash vbmeta vbmeta.img
  9. On your phone, press Volume Down until you see RECOVERY MODE at the top, then press Power
  10. If you see a screen saying System Partition - Unmodified System Partition, swipe the bar at the bottom to allow modifications.

Flashing the Custom ROM

You're running

Not right? Change your selected version

Upgrading to realme UI firmware

Due to how most custom ROMs are made for the X2 Pro, you need to upgrade to the realme UI firmware and vendor files before being able to run them.

The easiest way to do this is by downloading a realme UI update file (OZIP) and installing it via your new custom recovery.

  1. Download the appropriate realme UI OZIP file for your device
    • Note: these are hosted on my personal file sharing accounts. The links below will be randomised between Mega and Google Drive on each page load.
    • Global devices
    • Chinese devices
  2. Move this zip file to the same folder as your ADB and Fastboot
  3. Push this zip file to your phone: adb push -p "<FILE NAME>" "/sdcard"
  4. On your phone, scroll and tap the zip you just pushed. Swipe the bar to flash it.

Flashing LineageOS or AOSiP

This guide will primarily focus on how to flash LineageOS or AOSiP but you can also use this guide to flash any custom ROM based on realme UI firmware/vendor files.

  1. Download the latest build of the custom ROM you want to use
  2. Download Google apps
    • This package is the "full" package, which includes all Google apps shown here. You can download any of the packages here and they'll all work, but using Macro at the least is recommended.
  3. Move both of these files to the same folder as ADB and Fastboot
  4. In your command prompt, enter this command: adb push -p "<LineageOS/AOSiP FILE NAME>" "/sdcard"
  5. Wait for this command to complete. This may take several minutes. The progress will be shown in your command prompt window.
  6. Scroll down and find your LineageOS or AOSiP zip file and tap it, then swipe the bar to flash the ROM
  7. After the flashing is complete, tap the back button
  8. On your phone, tap Menu > Manage Partitions > Data > Format Data > Type yes > Press  (tick)

    If you see a red error, you must go to Menu > Reboot > Recovery, and try this step again.

  9. Next, push the NikGApps zip file to your device: adb push -p "<NikGApps ZIP NAME>" "/sdcard"

    If you see a red error, you must go to Menu > Reboot > Recovery, and try this step again.

  10. On your phone, after the push is complete, scroll and find your NikGApps zip. Tap it, and swipe the bar to flash it.
  11. After the flash is complete, tap back at the bottom, then Menu, then Reboot, then System

Completing installation

Extra steps

Rooting with Magisk

It's surprisingly simple to root with Magisk!

Just download Magisk 22.0, then push and flash it like the other files.


  1. Unplug and turn off your phone. Wait about 20 seconds.
  2. Hold Volume Down and Power to boot the phone into the bootloader menu
  3. Use Volume Up and Down to select Recovery Mode, then press Power to select it
  4. Enter your passcode (if you have one) to decrypt your data
  5. Push Magisk 20.3 to your phone via ADB (like you did with other files above)
  6. Tap Files again to refresh the list, then find your Magisk ZIP in the list and tap it
  7. Swipe the bar to flash Magisk

    Do not update Magisk!

    If you do, your device gets stuck in a bootloop (soft brick) and you need to flash the Magisk Uninstaller, then reflash Magisk 20.3.

    If this happens, your phone should automatically reboot to OrangeFox recovery. If it doesn't, just hold Power and Volume Up until it switches off, then quickly swap to holding Volume Down.


You don't need Magisk to pass SafetyNet on LineageOS, but you might on other ROMs. Note that Magisk is helpful for other things, like Substratum themes and Fluid Navigation Gestures.

Some people have reported issues with flashing Magisk before booting once, so it's recommended that your boot at least once before flashing Magisk.

If you see a red error, you must go to Menu > Reboot > Recovery, and try this step again.

GCam Ports
Enabling 90 Hz

You can enable a range of settings specific to the X2 Pro in Realme Settings.

  1. Open Settings
  2. Scroll all the way down, and tap Realme Settings
  3. I recommend setting these:
    • DC-Dimming: ON
    • Auto refresh mode: OFF
    • Force 90Hz peak refresh rate: ON

90 Hz is disabled when Battery Saver is switched on.

Built-in screen recorder

You can enable the built-in screen recorder via Settings.

Note: This option is only present in AOSiP

  1. Open Settings
  2. Search for Power and choose the top result
  3. Toggle on Screenrecord
  4. To record, just hold the power button and tap Screenrecord

The built-in screen recorder is fairly limited. If it doesn't do what you need, find a suitable replacement on the Play Store.

realme UI like gestures

Modern ROMs come with Android 10/11 gestures out-of-the-box! Only use this if you really don't like the stock Android gestures.

Enable these gestures in: Settings > System > Gestures > Navigation.

There's a great app on the Play Store called Fluid Navigation Guestures. It adds gestures to your phone which are similar to the gestures found in realme UI.

Here's how to set it up. For full functionality, you should be rooted with Magisk first.

  1. In LineageOS settings, make sure you are using the navigation bar and not gestures
  2. Install Fluid Navigation Gestures (FNG) from the Play Store
  3. Launch it!
  4. Swipe through the intro
  5. Toggle Enabled to ON
  6. Enable the permissions that the app needs
  7. Tap Hide navigation bar, then tap 3 button navigation, then select Grant with Root
  8. Grant the superuser request with Magisk
  9. Select 3 button navigation again
  10. Go back, then tap Look and feel and choose Fluid (or your preference) for Sides animation
  11. Go back and customise your edges the way you want

If you decide to remove this later on, make sure you disable it before uninstalling it, or your nav bar may remain hidden.

Reverting to ColorOS or realme UI

You're running

Not right? Change your selected version

  1. Unplug your phone, then turn it off fully
  2. Hold Volume Down and the Power button to boot the phone into Fastboot mode
  3. Plug the phone back into your computer
  4. On your phone, press Volume Down until you see RECOVERY MODE at the top, then press Power
  5. Download the OZIP file for the Android variant you want to use.

    It's very likely possible to convert a Chinese device to Global via an OZIP, but it must first be modified to allow it to be installed on the other device.

    If you know how to do this, feel free, but I'm not going to say how are we can't guarantee this will work, and you could likely brick your device.

  6. In your command prompt, enter this command to "push" (transfer) the OZIP update file to your phone: adb push -p "<OZIP FILE NAME>" "/sdcard"
  7. In OrangeFox, after the push is complete, tap Files at the bottom (even if already selected)
  8. Scroll and tap on your OZIP file, then swipe the bar to flash it
  9. Tap Menu > Manage Partitions > Data > Format Data > Type yes > Press  (tick)
  10. Tap Menu > RebootSystem
  11. If you want to re-lock your bootloader, download the in-depth test APK (at the start of this guide), and press Apply to exit in-depth test. Follow the instructions in the app.
    • If you have an unlocked bootloader, you'll only have L3 Widevine DRM (no HD Netflix), and you may not pass SafetyNet (no Netflix or Google Pay at all)

    This could brick your device if you still have traces of Magisk or OrangeFox on your device.

ADB and Fastboot download

Download the correct platform tools for your operating system.