Installing LineageOS on my old Galaxy S8

My phone is a 6 year old Galaxy S8. It has cracks in every corner of the screen glass. It still works just fine, and these days I use my phone less than ever before, thanks to my path of digital minimalism, so I don't really mind.

But a few things about it did bother me. It ran a tad slow and Samsung only updated it up to Android 9. My RSS reader app is no longer supported on Android versions less than 10. It was also low on internal space, partially due to a whole suite of bloatware I never use, that cannot be removed. Not to mention the fact that I have very little control over this device compared with my laptop running Ubuntu, the way its locked down and God knows what its doing behind my back.

The device just did not sit right, regarding my philosophy of Wise-tech.

So I have known about LineageOS, since way back when it was called Cyanogenmod, as a potential path to greater tech-freedom on Android devices. But I was always reluctant to install it on my phone as I thought it would have bugs or be missing functionality, or some apps might not work (Google, banking apps etc). Or worst case it would completely brick my phone. Plus the one-off hassle of carefully following the long and somewhat vague steps to even install it, let alone back up and restore my data.

My phone was so old and worn that I didn't mind bricking it, so as a last resort to breathe new life into it, I decided to give LineageOS a shot, along with installing GApps to support the proprietary Google backend and avoid loosing any functionality.

Was it worth it?

Well I can safely say.. BIG YES, LineageOS on Galaxy S8 blew away my expectations! 😎

It runs blazing fast and responsive compared to before, even with all the same apps installed. There is no added bloatware taking up space, freeing many gigabytes of onboard storage, all without missing any functionality that I actually need. Full device encryption, cameras quality, audio, banking apps, Bluetooth, fingerprint unlock etc all working. Slightly improved battery life, and most impressively - greatly improved speed.

This six year old device is now as fluid as a new flagship model, on the latest version of Android with all the latest features. Now I feel like I truly own this device, and all the downsides I mentioned earlier are suddenly gone.

I really should have done this earlier.

It makes be feel like Samsungs software updates are a kind of monetization conspiracy designed to eventually cripple a phone in terms of speed, storage space and battery life. Then suddenly they just stop updating, forcing users to buy a new phone to get the latest features, space and speed. The cycle repeats. Samsung stock price perpetually rises. Typical line-goes-up economics.

I think its also safe to say that I would very likely never buy another Android device, unless it supports LineageOS out of the box.

Summary of steps

  1. Download correct LineageOS ROM and GApps, and copy to SD card or USB stick inserted into device.
  2. Backup ALL data (it WILL be erased!).
  3. Unlock bootloader, Remove Google and Samsung accounts, and factory reset data.
  4. Install TWRP recovery program.
  5. Boot into TWRP and install LineageOS ROM and GApps.

NOTE: You DO NOT need to root your device (e.g. using Magisk) at any stage to install LineageOS. Rooting allows a user to modify the protected system files on the device, which allows advanced functionality but may reduce security and break certain sensitive apps like banking apps.

Full steps taken

UPDATE: For many devices, there is now a much easier way to install LineageOS and other custom ROMs, via the Open Android Installer app. Though it does not support the Galaxy S8, check whether your phone is supported by that app before resorting to manual steps.

DISCLAIMER: Pay attention and understand each step yourself. Dont follow blindly. I am not responsible for any problems with my instructions or any damage to your device! This applies specifically to Samsung Galaxy S8 (SM-G950F) but the process is similar to most devices.

Installation is doable.. but not for the faint of heart. Be calm and make sure you have a few hours spare to go without your phone working. There are many steps and there is a high chance you will screw something up and start again. You will also need to BACK UP all your data because everything will get erased.

  1. Firstly do your research, check other ROM users comments for any known issues and when you are confident, download the latest LineageOS custom ROM file for your device and copy it to an SD card (alternatively use a USB stick if you can use it with your device via an adapter or hub). In some cases your device will be officially supported and available directly from Lineage, but in many cases (including for my Galaxy S8) you will need to search XDA forums to see if someone made an unofficial one. MAKE SURE it works with your specific device variant by matching actual model numbers.
  2. Also download the latest GApps (I used NikGApps Core) to the same SD card if you want to use any apps that use Google services, but make sure its compatible with the specific Android version of the ROM you want to flash (in my case Android 12 a.k.a Android S).
  3. Insert SD into the device.
  4. BACKUP All data on the device! All apps and internal storage will be lost. Removable SD card will be OK though. Most apps with an online login probably don't need a backup as you just reinstall the app and login again. Local apps without logins, including many open source ones, might require an export to file, or they may also be backed up by Android services depending on the app (I wouldn't count on this, I still have no idea how the Google backup and restore for Android even works!). I prefer to go through each of my local apps and export data to files in individually named folders on the SD card, so I know for sure. Make sure you have the any private-keys/codes/pass-phrases you need to restore self-custody services like crypto wallets. Make sure you have a way to restore your TOTP authentication app, or move all the MFA codes to another device or a Yubikey.
  5. Charge phone to 100% and try to keep it charged.
  6. REMOVE Google account and Samsung account from the device in order to disable FRP.
  7. Turn on Unlock Bootloader in Developer Settings (you may need to turn on Developer Mode first).
  8. Disable Android device encryption if you have it turned on.
  9. Do a factory reset of your device (required to clear data partition).
  10. Flash TWRP to your device - this is a "Recovery program" that your phone can boot into to perform low level maintenance such as flashing a new ROM or GApps (the built-in recovery program on most devices is very limited and cannot flash a LineageOS ROM). The method to do this varies based on your phone. I used the Windows program called Odin, while the device was in flash mode. Another option for Linux is Heimdall (install heimdall-flash apt package in Ubuntu). It can be tricky to get into the flash upload screen on your device, in order for Odin to work. For my S8 the steps were: With device powered off, hold Bixby + vol_Down + power to turn on, then quickly press vol_Up when you see a blue screen. It should show FRP LOCK: OFF and OEM LOCK: OFF if you correctly followed step 6 and 7 above. Then plug the device into the PC and use Odin to flash TWRP (or follow your device-specific TWRP flash steps). If you have issues here, read the instructions on the phone screen CAREFULLY so that you chose the right option, as they can be confusing.
  11. Tricky step for first entry into TWRP for Galaxy S8: Once Odin flash is successful, remove USB cable, then hold vol_Down + power button until screen goes off then quickly release and hold Bixby + vol_Up + power buttons to enter TWRP recovery for the first time. If you fail to be quick enough, redo Odin flash step 10 above and then try again. Your device might have different steps for this, or maybe you can skip if the device goes directly into TWRP, please check for yourself.
  12. Now you should be in TWRP 💪. Much of the hard work is done. Swipe to allow modification to system files, because this is needed to flash a custom ROM
  13. Click Install button.
  14. Click Add zip and choose the LineageOS ROM file from the SD card.
  15. Click Add zip again and choose the Gapps zip file if you want Gapps.
  16. Continue to Install the ROM files.
  17. After success, suggest to Wipe Cache/dalvik if it's the first time installing a LineageOS ROM on this device.
  18. Reboot > System. If it asks for a password at this stage, its probably because you did not factory reset the data or disable encryption at the beginning, which means you can type any password, which will just fail and reboot. If the reboot fails to wipe data, go back into TWRP with Bixby + vol_Up + power and chose Wipe > Format Data. After that is successful, re-install your GApps zip and Reboot > System. Now it should just boot without asking for password.
  19. Congratulations! You now have LineageOS installed 🎉. Log in, reinstall your apps and restore your backed up data.

Updating LineageOS

Assuming you already have it installed, at some point you will get a notification to install an OS update. If you want to install it, download then press install and the phone should automatically reboot into TWRP and install the update.

If anything fails, or you find the phone does not fully boot anymore (boot loop), don't panic. The usual way to fix this problem is simply to power off the device, download the latest GApps and ROM file onto the SD card, insert the card, then boot in TWRP (Hold Bixby + vol_Up + power). Repeat steps 12-16 above to install the zip files, then roboot. This should fix the issues with failure to boot.

More Tips and Troubleshooting

Some additional tips in case you encounter issues (Thanks to Brian for this):

  • For GApps, there are reports of FlameGApps causing bootloops. NikGApps and BitGApps are reported to work.
  • If you get in a boot loop and cannot turn off the device, press volume-down+bixby+power button until a green-ish screen appears with two options: volume-up and volume-down. Press volume-down, and very quickly press and hold volume-up+bixby+power button. That will cause a reboot to occur and it will go into TWRP.
  • If Google Play does not have internet after installing, make sure it has access to your networks: in the app details (where you can clear cache etc, not in the app itself) make sure it has access to your network.
  • It's recommended to install a browser, like Chrome or Firefox, and set it as the default system browser, as otherwise app-uri's (uri that opens an app after login for example) may not work.
  • Custom ROMs only work with the Exynos CPU version of Galaxy S8.
    To identify which S8 CPU you have:
    SM-G950/955U = Snapdragon 835
    SM-G950/955F = Exynos 8895
    and -FD is exynos with dual sim support
  • To identify which ROM download you need (dreamlte vs dream2lte):
    dreamlte: Kernel for the Samsung Galaxy S8
    dream2lte: Kernel for the Samsung Galaxy S8+