Disclaimer: This post is meant more as a note to myself than anything else.
Unlike other posts here, I don’t really expect anyone else to find it valuable. If anyone does, well, it’s just an added bonus 🙂
Lately I went through the (way overdue) process of upgrading my phone’s OS from LineageOS 14.5 to 15.1 (android 7 to 8).
As ever, my process was very manual, time consuming, error-prone (and filled), and extremely frustrating.
In order to help my future self, and possibly any other unfortunate souls who, like me, are not very android / ROM savvy, I wrote down the process that worked for me, and some of the snares that I encountered.
First thing is to make sure your data isn’t lost in case you find that, despite the promises that “no data loss is necessary when upgrading”, you need to wipe (format) your device completely. (Spoiler: you will)
Luckily, nowadays most services are cloud-based, so, for most apps, all you really need is your username and password. There’s nothing to back up there.
Other apps, such as email client, calendar client, podcast apps, VPN client, etc., require more configuration than a simple username and password.
Most of these apps make it easy to export configuration – check the settings options for those apps.
The last kind of apps are the ones that actually store data locally on your device.
The most obvious ones are camera (i.e your photos), and Whatsapp.
Backing up photos is trivial (just connect to a PC and transfer the files), and whatsapp also make it easy with automatic backups, and a backup option under ‘settings’ (see here on how to restore).
If you’re using an MFA app (such as google authenticator), make sure to back it up (google authenticator can’t be backed up easily. There are other, equivalent apps, that can. For example – andOTP).
As an extra precaution, I make sure to be logged in to services requiring MFA while upgrading, in case I find that I actually need to disable MFA for some reason.
Your list of contacts can usually be backed up to different formats (.vcf or .csv) via your contacts app, in case you don’t automatically sync it.
Lastly, you can’t be expected to remember the entire list of apps you currently have installed – you’ll need to save that list so you’d know what to install on your new OS version.
There are many apps that claim to be able to backup and restore your apps (just google “Android backup apps” for an up-to-date list).
Personally, I went with the most simple solution – “List my apps” allows you to save your list of installed apps, to be used as a reference when you’ve got your new OS up and running.
Prepare for upgrade
Before starting to download a bunch of files and booting into recovery mode, it’s highly recommended to have a game plan – read all the relevant instructions from start to finish (including this blogpost 🙂 ), make sure you understand all of them, and have everything you need ready.
The best place to start is LineageOS’s docs for your device. It provides a great step-by-step guide to installing lineage from scratch, and some of the instructions are relevant for upgrades as well (the steps that are one-time only are clearly marked as such).
Unfortunately, the Lineage team doesn’t provide instructions that are specific for upgrades; probably because they deem it trivial.
This blog post contains a few very undetailed steps, which assume the user is quite familiar with the process. A fair assumption, but then again, I am a dummy.
I’ll try and expand on those instructions in this post.
It’s also recommended to read through the /r/LineageOS subreddit, and search there for discussions around upgrading / installing on your specific device.
If you find yourself stuck, this would be a good place to ask for help.
You’ll need some supporting tools installed on your device in order to install an OS.
If you don’t know what “Recovery” is, see appendix I.
Note that, in the official upgrade instructions linked above, one of the first things to do is to make sure your device’s recovery is up to date. In my case, it’s simply a matter of downloading the latest version of TWRP for my device, and using TWRP itself to flash it.
If you don’t know what “Firmware” is, see appendix II.
Finding the latest firmware version for my device is not easy.
It isn’t freely downloadable from my manufacturer’s website, for example.
I’m guessing this is because the manufacturers provide firmware updates bundled with updates to their own operating systems, and they don’t want to provide the same to “competing” operating systems.
I had to search through android enthusiasts’ websites, such as xda-developers forums, in order to find someone who reverse-engineered my device’s firmware updates.
To me, this seems like the most dangerous part of the process, as you don’t have a lot of confidence in what you’re downloading – there are no guarantees of its content (maybe it contains spyware?) or quality.
In the end, I just had to take a leap of faith, choosing a firmware that many others seem to say that has worked for them.
It’s important to have a look around the threads in xda-developers for any issues people have had with the firmware, possible solutions etc.
Since lineageOS is not affiliated with google, by default it doesn’t come with any google-specific software, such as assistant, play store, integration with google account etc.
This may be fine for some people, however, unfortunately, certain apps require the proprietary google software known as “google play services” in order to operate properly.
If you need any kind of google software on your device, you can use resources such as GApps to install it.
Note that you’ll need to install GApps immediately after installing lineageOS, before you boot up your device for the first time.
The upgrade process
Now you should be ready to start to actually upgrading your device.
Like any project, proper preparation is paramount; if you’ve successfully followed the above steps, the actual upgrade process itself should be as simple as what is described in the LineageOS blog post:
- Boot into your custom recovery
- Use the recovery’s “wipe” feature to wipe your system partition
* This will delete your device’s current operating system – be sure you have everything you need before you do this
- Flash your previously-downloaded .zip file containing the new LineageOS version
- Flash any addons (such as GApps)
- Reboot your device into “System”
That should be it – you should see the new LineageOS version, and be asked to set up your device as you did when you first got it.
You can then re-install your apps, restoring any necessary data from backup.
“Recovery” is a low-level system on your device which enables you to manage the very basics of the device – remove all data (wipe), manage your system partition (the part of your device where the operating system is installed), etc.
A custom recovery tool provides more functionality than the built-in recovery tool that ships with your device (which usually only allows you to factory-reset your phone, but not to install any custom OS).
Most importantly for us, it provides the ability to flash (i.e install) system components, such as firmware (see below) and operating system on your device.
More detail can be found here.
Firmware is the technology that connects your phone’s operating system with the device’s hardware (thus the name – connecting software with hardware).
For example, the android operating system might want to do something that takes advantage of the phone’s hardware, such as transmitting data using the phone’s antenna, or taking a photo using the phone’s camera.
However, each phone’s antenna / camera operates in a different way, requires different commands to operate, or produces results in different formats.
It wouldn’t be reasonable to expect the developers of the android operating system to implement dozens of different methods of taking a photo.
For that reason, device manufacturers provide firmware that (roughly) conforms to a single interface (i.e same set of commands, same format of results etc..), so from the outside, to the operating system, all devices look and behave (roughly) the same.
(I assume that) Making sure you have the latest firmware version before upgrading your operating system is important, since the new operating system version might need to take advantage of new firmware features (i.e new commands), that may only be available in updated versions of firmware.