Home > ROMs > Custom ROMs

How to Install LineageOS 18.1 [Android 11] on OnePlus 9 Pro

In this guide, we will show you the steps to install the latest LineageOS 18.1 onto your OnePlus 9 Pro device. The latest flagships from OnePlus have caught the attention of the masses. While most of it is due to its impressive feature set, a few eyes also started rolling after its benchmark fiasco. Anyways, the devices have known to be quite an active player in custom development. And the ninth iteration didn’t fail to disappoint either.

While the ability to gain administrative privileges was available on the first day itself, even the popular custom recovery TWRP has made its way for this device. But that’s not it. The latest version of one of the most popular custom ROMs, LineageOS, is now available for your device. The icing on the top is that it’s already in the official state. So without further ado, let’s start off with the guide to install the latest LineageOS 18.1 onto your OnePlus 9 Pro device. Follow along.

How to Install LineageOS 18.1 [Android 11] on OnePlus 9 Pro

install lineageos 18.1 oneplus 9 pro

The below instructions are listed under separate sections for ease of understanding. Make sure to follow in the exact same sequence as mentioned. 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.

STEP 1: Install Android SDK

install adb platform tools windows

First and foremost, you will have to 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.

STEP 2: Enable USB Debugging and OEM Unlocking

Next up, you will also 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.

install lineageos 18.1 oneplus 9 pro

So head over to Settings > About Phone > Tap on Build Number 7 times > Go back to Settings > System > Advanced > Developer Options > Enable USB Debugging and OEM Unlocking.

STEP 3: Boot to Fastboot Mode

  1. Connect your device to the PC via USB cable. Make sure USB Debugging is enabled.
  2. Then head over to the platform-tools folder, type in CMD in the address bar, and hit Enter. This will launch the Command Prompt.
    command-prompt-inside-adb
  3. Type in the following command in the CMD window to boot your device to Fastboot Mode
    adb reboot bootloader
  4. To verify the Fastboot connection, type in the below command and you should get back the device ID, as shown in the image.
    fastboot devices

STEP 4: Unlock Bootloader on OnePlus 9 Pro

You will now have to unlock the bootloader on your device. Doing so will wipe off all the data and could also nullify the device’s warranty as well. If that’s fine, then execute the below command in the CMD window:

fastboot oem unlock

unlock-bootloader-install twrp-oneplus-9-pro

You will now get a confirmation prompt on your device. Use the Volume Keys to highlight Unlock the Bootloader and press the power key to confirm it. Your device will undergo a factory reset and the bootloader stands unlocked. [Don’t restore the data now, as your device would undergo a factory reset once more later on. So it’s better to restore at the end].

STEP 5: Install LineageOS Recovery on OnePlus 9 Pro

Now that the bootloader is unlocked, we may proceed with the rest of the steps of this guide to install the latest LineageOS 18.1 onto your OnePlus 9 Pro device. Follow along

  1. To begin with, download the LineageOS Recovery for OnePlus 9 Pro (Lemonadep).
  2. Once downloaded, transfer it to the platform-tools folder on your PC.
  3. Now rename it to recovery, so that the complete name becomes recovery.img.
  4. Then connect your device to the PC via USB cable and boot it to the Fastboot Mode (as before).
  5. Head over to the platform-tools folder address bar, type in CMD, and hit Enter. This shall launch the Command Prompt window.
  6. Now execute the below command in the CMD window to boot the LineageOS Recovery onto your device
    fastboot flash boot recovery.img

STEP 6: Copy Slot A Contents to Slot B

Well, this is something new! In some instances, Slot B can be left unpopulated or might be having a much older firmware than Slot A. This conflict of data between both these slots could spell out trouble for the device. Therefore, the best route forward is to copy the entire content of Slot A to Slot B, which could be done as follows:

  1. To begin with, download the copy-partitions-20210323_1922.zip file
  2. Then connect your device to the PC via USB cable. Make sure it is booted to LineageOS Recovery.
  3. From the Recovery, select Apply Update and then select the Apply from ADB option.
  4. Now transfer this ‘copy-partitions ZIP file’ to the platform-tools folder on your PC.
  5. Open the Command Prompt inside this folder and type in the below command to flash the ZIP via sideload:
    adb sideload copy-partitions-20210323_1922.zip

The copy-partitions script was created by LineageOS developer erfanoabdi and filipepferraz, but isn’t signed with LineageOS’s official key, and therefore when it is sideloaded, Lineage Recovery will present a screen that says Signature verification failed, this is expected, please click Continue.

STEP 7: Remove Encryption on OnePlus 9 Pro

  1. You will have to remove encryption from your device by performing a reset.
  2. So go to Factory Reset and then select Format data/factory reset.
  3. This will wipe off all the data from your device and would then remove encryption as well.

STEP 8: Install LineageOS 18.1 on OnePlus 9 Pro

  1. To begin with, download the latest version of LineageOS 18.1 for your device: OnePlus 9 Pro (Lemonadep).
  2. Rename the downloaded file to rom, hence the complete name becomes rom.zip.
  3. Then transfer the ROM file to the platform-tools folder on your PC.
  4. Likewise, launch the CMD window inside this platform-tools folder.
  5. Now, from the device’s LineageOS Recovery, select “Apply Update”, then “Apply from ADB”.
  6. Finally, execute the below command in the CMD window to start the sideload process:
    adb sideload rom.zip
  7. Once the flashing is successfully done, the output will stop at 47% and report adb: failed to read command: Success.
  8. Now go to Advanced and select Reboot to Recovery. Your device will reboot to LineageOS Recovery.

STEP 9: Flashing Other Mods [Optional]

  1. If you want to flash any other mods, such as GApps, then download and transfer them to the platform-tools folder on your PC.
  2. Then from the LineageOS Recovery, select “Apply Update”, then “Apply from ADB”.
  3. Now open Command Prompt inside the platform-tools folder.
  4. Finally, type in the below command to flash the desired file (replace the ‘filename’ keyword accordingly):
    adb sideload filename.zip
  5. Once all the mods/files have been flashed, you may now reboot to the OS. For that, tap on the Reboot System Now option.

That’s it. These were the steps to install the LineageOS 18.1 on the OnePlus 9 Pro. 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.


Share: