Resurrect old smartphone

Everyone of us has probably old smartphones somewhere and some of them would work with a reasonably current Android. My previous previous smartphone was a OnePlus 3, which has been sitting in the drawer for the past few years. I already unlocked it back in the days and installed LineageOS (Version 15.1 - Android 8.1). The current Version for the OnePlus 3 is LineageOS 18.1 (which is not the current Android, but good enough). An update from 15.1 to 18.1 without deletion of everything on the phone is not easily prossible so I will install 18.1 via fastboot. The LineageOS website has a step by step guide which I only need half of because the phone is already unlocked and fastboot is already installed.

Disclaimer: I am doing this on an old phone I had in a drawer for years. If you don't know what you are doing, don't ever do this to a phone you rely on.

I used adb on ArchLinux to sideload everything.

After starting the phone in fastboot mode, I checked if the device is found from my Linux PC:

$ fastboot devices
2b7f3166        fastboot


Meanwhile: updating the radio/modem

I tried to install the new LineageOS version as described below, but the radio/modem was too old. So I needed to update this first.

The current version of twrp, because I already installed LineageOS recovery: Instructions and Download. Now install recovery (the phone needs to be in the bootloader):

$ fastboot flash recovery twrp-3.7.0_9-0-oneplus3.img
Sending 'recovery' (29821 KB)                      OKAY [  1.011s]
Writing 'recovery'                                 OKAY [  0.216s]
Finished. Total time: 1.271s

Next start the twrp mode by booting the phone.

I got the radio from the official OnePlus website included in the final update of OxygenOS 9: Additionally I got the radio+modem from this xda-forum link. The files inside are the same, but without the boot image. So installing the xda-forum zip file via sideload updates only the relevant parts:

$ adb sideload Stable9.0.6\
serving: 'Stable9.0.6'  (~51%)    adb: failed to read command: Success

The message on the phone was that it was successful.

updating to Android 11 (LineageOS 18.1)

Now back to the actual update.

Maybe I could use twrp for this too, but I wanted to use the lineageOS recovery image. I downloaded it from this page:

Now flash it on the phone:

$ fastboot flash recovery lineage-18.1-20230201-recovery-oneplus3.img
Sending 'recovery' (19361 KB)                      OKAY [  0.632s]
Writing 'recovery'                                 OKAY [  0.148s]
Finished. Total time: 0.827s

image of the phone in recovery start screen

For the next step I downloaded the correct lineage version for my phone: And the Google Apps package for Android 11.0 arm64:

In recovery then "Factory reset", then "Format data/factory reset". Be aware that everything on the phone will be deleted! For me this is a phone I haven't touched in years, so nothing relevant is on there.

Next step is "Apply update", "Apply from ADB". The instructions how to do this are on the phone screen:

$ adb sideload
Total xfer: 1.00x

But the update was not successful with this error: "Modem firmware from OxygenOS 9.0.2 or newer stock ROMs is prerequisite to be compatible with this build." So one more hoop to jump: First install OxygenOS 9 on my OnePlus 3. I downloaded from the oneplus page. Thankfully they still have a download for an end-of-life phone.

First I wiped data/cache again - to be sure. Then I installed the OnePlus version of Android:

$ adb sideload