[OnePlus 9R] kakashi_hatake_8:
I'm a newbie here, the last time I have installed a custom ROM on Asus phone over five years ago with lineage os.

Will I be successful if I follow below instructions, as your instructions above are short and suited for pros.

search

Install LineageOS on kebab​

keyboard_arrow_left Back to the overview

warning

WARNING: These instructions only work if you follow every section and step precisely.

Do not continue after something fails!

Basic requirements​

Read through the instructions at least once before actually following them, so as to avoid any problems due to any missed steps!

Make sure your computer has adb and fastboot. Setup instructions can be found here.

Enable USB debugging on your device.

Make sure that your model is actually listed in the “Supported models” section here (exact match required!)

warning

WARNING: Before following these instructions please ensure that the device is currently using Android 12 firmware.

If the vendor provided multiple updates for that version, e.g. security updates, make sure you are on the latest!

If your current installation is newer or older than Android 12, please upgrade or downgrade to the required version before proceeding (guides can be found on the internet!).

Unlocking the bootloader​

info_outline

NOTE: The steps below only need to be run once per device.

warning

WARNING: Unlocking the bootloader will erase all data on your device! Before proceeding, ensure the data you would like to retain is backed up to your PC and/or your Google account, or equivalent. Please note that OEM backup solutions like Samsung and Motorola backup may not be accessible from LineageOS once installed.

Enable OEM unlock in the Developer options under device Settings, if present.

Connect the device to your PC via USB.

On the computer, open a command prompt (on Windows) or terminal (on Linux or macOS) window, and type:

adb reboot bootloader

You can also boot into fastboot mode via a key combination:

With the device powered off, hold Volume Up + Volume Down + Power.

Once the device is in fastboot mode, verify your PC finds it by typing:

fastboot devices

If you don’t get any output or an error:

on Windows: make sure the device appears in the device manager without a triangle. Try other drivers until the command above works!

on Linux or macOS: If you see no permissions fastboot try running fastboot as root. When the output is empty, check your USB cable and port!

Now type the following command to unlock the bootloader:

fastboot oem unlock

info_outline

NOTE: At this point the device may display on-screen prompts which will require interaction to continue the process of unlocking the bootloader. Please take whatever actions the device asks you to to proceed.

If the device doesn’t automatically reboot, reboot it. It should now be unlocked.

Since the device resets completely, you will need to re-enable USB debugging to continue.

Flashing the dtbo partition​

warning

WARNING: This platform requires the dtbo partition to be flashed for recovery to work properly, the process to do so is described below.

Download dtbo file from here. Download the file named dtbo.img from the directory named with the latest date.

Power off the device, and boot it into bootloader mode:

With the device powered off, hold Volume Up + Volume Down + Power.

Flash the downloaded image file to your device by typing (replace <dtbo> with the actual filename!):

fastboot flash dtbo <dtbo>.img

Installing a custom recovery using fastboot​

Download Lineage Recovery. Simply download the latest recovery file, named something like lineage-19.1-20220825-recovery-kebab.img.

Connect your device to your PC via USB.

On the computer, open a command prompt (on Windows) or terminal (on Linux or macOS) window, and type:

adb reboot bootloader

You can also boot into fastboot mode via a key combination:

With the device powered off, hold Volume Up + Volume Down + Power.

Once the device is in fastboot mode, verify your PC finds it by typing:

fastboot devices

If you don’t get any output or an error:

on Windows: make sure the device appears in the device manager without a triangle. Try other drivers until the command above works!

on Linux or macOS: If you see no permissions fastboot try running fastboot as root. When the output is empty, check your USB cable and port!

check

TIP: Some devices have buggy USB support while in bootloader mode, if you see fastboot hanging with no output when using commands such as fastboot getvar ..., fastboot boot ..., fastboot flash ... you may want to try a different USB port (preferably a USB Type-A 2.0 one) or a USB hub.

Flash recovery onto your device (replace <recovery_filename> with the actual filename!):

fastboot flash recovery <recovery_filename>.img

Now reboot into recovery to verify the installation.

Use the menu to navigate to and to select the Recovery option.

Ensuring all firmware partitions are consistent​

info_outline

NOTE: The steps below only need to be run once per device.

In some cases, the inactive slot can be unpopulated or contain much older firmware than the active slot, leading to various issues including a potential hard-brick. We can ensure none of that will happen by copying the contents of the active slot to the inactive slot.

To do this, sideload the copy-partitions-20220613-signed.zip package by doing the following:

Download the copy-partitions-20220613-signed.zip file from here. It should have a MD5 sum of 79f2f860830f023b7030c29bfbea7737 or a SHA-256 sum of 92f03b54dc029e9ca2d68858c14b649974838d73fdb006f9a07a503f2eddd2cd.

Sideload the copy-partitions-20220613-signed.zip package:

On the device, select “Apply Update”, then “Apply from ADB” to begin sideload.

On the host machine, sideload the package using: adb sideload copy-partitions-20220613-signed.zip

info_outline

NOTE: The copy-partitions script was created by LineageOS developer erfanoabdi and filipepferraz

Now reboot to recovery by tapping “Advanced”, then “Reboot to recovery”.

Installing LineageOS from recovery​

Download the LineageOS installation package that you would like to install or build the package yourself.

(Optionally): If you want to install an application package add-on such as Google Apps (use the arm64 architecture), please read and follow the instructions on Google Apps page

If you are not in recovery, reboot into recovery:

With the device powered off, hold Volume Down + Power.

Now tap Factory Reset, then Format data / factory reset and continue with the formatting process. This will remove encryption and delete all files stored in the internal storage, as well as format your cache partition (if you have one).

Return to the main menu.

Sideload the LineageOS .zip package:

On the device, select “Apply Update”, then “Apply from ADB” to begin sideload.

On the host machine, sideload the package using: adb sideload filename.zip.

check

TIP: Normally, adb will report Total xfer: 1.00x, but in some cases, even if the process succeeds the output will stop at 47% and report adb: failed to read command: Success. In some cases it will report adb: failed to read command: No error or adb: failed to read command: Undefined error: 0 which is also fine.

(Optionally): If you want to install any add-ons, click Advanced, then Reboot to Recovery, then when your device reboots, click Apply Update, then Apply from ADB, then adb sideload filename.zip those packages in sequence.

info_outline

NOTE: Add-ons aren’t signed with LineageOS’s official key, and therefore when they are sideloaded, Lineage Recovery will present a screen that says Signature verification failed, this is expected, please click Continue.

info_outline

NOTE: If you want the Google Apps add-on on your device, you must follow this step before booting into LineageOS for the first time!

Once you have installed everything successfully, click the back arrow in the top left of the screen, then “Reboot system now”.