The Sony Xperia 5 II was a popular device back in the day as this offering by Sony came with many exciting features that were ahead of its time. It also became one of the go-to choices for many users.
Launched with the Android 10 OS out of the box, the device has received multiple OS upgrades with the last one being Android 12. However, there is a possibility you can use Android 13 on your device too. This device is pretty impressive when it comes to custom development. This is possible by installing a custom ROM. In this guide, you will get to know how to install Android 13-based LineageOS 20 on Sony Xperia 5 II.
How to install Android 13-based LineageOS on Sony Xperia 5 II
Step 1: Install Android SDK
To start off, install the Android SDK Platform Tools on your PC or computer. It’s the official ADB and Fastboot binary provided by Google. You should download it and extract it to a convenient location on your PC. Doing this will give you the necessary platform-tools folder.
Step 2: Enable USB Debugging and OEM Unlocking
Then, you will need to enable USB Debugging and OEM Unlocking on your smartphone. The former makes your smartphone recognizable by the PC in ADB mode. Meanwhile, it’ll allow you to easily boot your smartphone to Fastboot Mode.
OEM Unlocking will be needed to carry out the bootloader unlocking process. You’ll need to go to Settings -> About Phone -> Tap on Build Number 7 times -> Return to Settings -> System -> Advanced -> Developer Options -> Enable USB Debugging and OEM Unlocking.
Read More: How to enable USB Debugging on Android 12
Step 3: Unlock Bootloader on your smartphone
You’ll also need to unlock the bootloader on your Sony Xperia 5 II if you’re looking to root your phone. Remember that doing this will wipe off the data and might even make your device’s warranty null and void.
Step 4: Download LineageOS 20 Custom ROM
- Next, you need to grab the latest LineageOS ROM and Gapps for your device by heading over to the links mentioned below –
Sony Xperia 5 II – LineageOS 20 | Gapps
- Once you’ve downloaded these files, you need to transfer them to the platform-tools folder on your PC
- Rename the LineageOS 20 ROM to “rom.zip” while renaming the Gapps package to “gapps.zip”
Step 5: Boot your device to Fastboot mode
- Connect your smartphone to the PC using a USB cable while ensuring that USB debugging is enabled
- After that, go to the platform-tools folder and type in CMD in the address bar before hitting Enter to launch the Command Prompt
- Then, type in the following command in the CMD window for booting your smartphone to Fastboot Mode
adb reboot bootloader
- For verifying the Fastboot connection, you should type the following command and you’ll get back the device ID –
- fastboot devices
Step 6: Flash LineageOS 20 on your device
- You’ll now need to flash the LineageOS recovery onto your device by executing the following command –
fastboot flash recovery recovery.img
- Once the flashing is done, you should type the following commands to boot your device to LineageOS Recovery –
fastboot reboot recovery
Step 7: Copy the content from Slot A to Slot B
- Download copy-partitions-20220613-signed.zip and then transfer it to the platform-tools folder
- Likewise, you should rename it to CP such that the complete name becomes “cp.zip”
- On the LineageOS recovery, you should head over to Apply Update -> Apply from ADB
- Then, open CMD inside the platform-tools folder before executing the below command –
adb sideload cp.zip
- Once it is flashed, you should head over to Advanced and select Reboot to Recovery
- Your smartphone will now reboot to LineageOS Recovery
Step 8: Factory reset your device
- From the LineageOS Recovery, you should head over to Factory Reset
- After that, select Format Data/Factory Reset -> Format Data
- Your smartphone will undergo a reset
- Once it is done, you should get the “Data wipe complete” message
Step 9: Install LineageOS 20 ROM on your phone
- From the LineageOS Recovery, you should go to Apply Update -> Apply from ADB
- After that, go to the platform-tools folder and type in CMD in the address bar before hitting Enter
- Once the Command Prompt opens, you should give the command to flash the ROM via Sideload –
adb sideload rom.zip
- The process will start and once it is done, you should get the Total xfer: 1.00x message