Updating from Cyanogenmod to LineageOS (Samsung S5 – klte)

This page is a brief guide to installing the new LineageOS CFW onto your phone. I have a Samsung S5 (klte) so I will be using that for this guide.

What you need to do before flashing.

  1. The main ROM – find this at https://download.lineageos.org
  2. Optionally create an md5 file with the md5 hash and call it the same as the downloaded file with an md5 extention so your recovery can verify the hash against the rom before you flash.
  3. Download Google Apps from http://opengapps.org/?api=7.1 (I picked the Pico version)
  4. Download LineageOS SuperSU from http://www.lineageosrom.com/2017/01/download-supersuzp-and-su-removalzip.html (download both the installer and uninstaller in case you need them both)
  5. Install TitaniumBackup and get the Pro version (paid) if you can – it’s a worthwhile app to contribute to.
  6. Make backups of all your apps.
  7. Make an “update.zip” file from Titanium Backup. You don’t have to put any apps in there, it’s primarily to allow you to install Titanium Backup after you have flashed the rom.


  1. Put the files (the ROM, the SuperSU, the Gapps, and the update.zip) from your internal storage, into your Download folder on your sdcard of your phone. The reason being is that you will be doing a factory reset which MAY wipe that storage.
  2. Boot into recovery. If your current ROM supports it, reboot into recovery from your reboot menu, if not, find the button combination to boot into recovery for your phone. For an S5, its holding POWER + VOLUP + HOME
  3. Before flashing anything, make sure you make a backup of your current ROM so you can roll back if needed.
  4. Once the backup is complete, perform a factory reset
  5. Now flash the LineageOS ROM file
  6. Reboot and check the OS boots without error. This will take a while as the first boot of a new ROM.
  7. Reboot back into Recovery and flash the SuperSU. Do NOT do this if you intend to install Magisk/systemless root later.
  8. Reboot and confirm the OS still boots without error.
  9. Reboot back into recovery and flash update.zip (this will auto reboot the phone)
  10. Enable developer mode (Tap Build Number on phone status window repeatedly until developer mode is enabled) and check to make sure you have App Root available in Developer Mode -> Root Access. Enable it. If you didn’t install SuperSU, you will not find this option, so don’t worry.
  11. Enabled extended restart menu so you can boot into recovery more easily
  12. Reboot back into recovery mode and flash the OpenGapps. At the time of writing, the current version for LineageOS and S5 is 7.1.
  13. Install Magisk here if you want to also.
  14. Reboot into the main OS
  15. In Developer options, enable:
    1. Android Debugging (needed for apps like Titanium Backup to work properly)
    2. Local Terminal (optional)
    3. Bug Report Shortcut (always good to contribute to the community)
    4. Force allow apps on external (forces your apps to be able to be installed on your external SD card)
    5. Kill app back button (essential for ensuring an app is cleanly killed)
  16. Start up Titanium Backup, you’ll get a message about different Android ID. Click “Ask Me Later” then okay the USB Debugging warning (we’ve enabled it anyway)
  17. Time to find your backups folder. Click Menu -> Preferences -> Backup Folder Location
  18. At the top, where is says “Storage Provider”, theres “Click to change” — click that and choose “DocumentProvider storage”
  19. Browse to the directory ABOVE where your backup folder is. So if your backup directory is /sdcard/backups/Titanium, browse to “/sdcard/backups” and click “Select”
  20. Browse to your backup folder in the list and pick your backup folder to browse inside it. The option “Use the Current Folder” should now be available – click on it
  21. Click on the back key to get back to the main menu
  22. Click on the “Backup/Restore” tab to get to your backups list. If you’ve done it right, you should see all your backed up apps at the bottom of the list crossed out (i.e. they’re backed up, but not installed) so you can now use the Titanium Backup functions to restore. But before you do that, back out of the app and start it up again. Remember that message about Android ID? Now you can restore the previous Android ID (this will reboot the phone)
  23. Check you can still see your apps on the Titanium Backup list, and start restoring your apps. But FIRST, open your 2FA app. If your update.zip worked, you should see your codes. If not, don’t panic, this is why we setup Titanium Backup. Just do a full restore of your 2FA app (Authy/Authenticator) and you should see the codes.
  24. Now setup your Google accounts. Tip, DON’T allow backup to Google as they will be holding your data and make it really difficult to get rid of.
  25. Once you’ve setup your Google accounts, go ahead and finish restoring your apps.
  26. Customise your new ROM to your liking.
  27. Go through each app one at a time and open it to check it functions normally. Most of the time it will be fine. Other times, you may need to cache/clear, uninstall and/or a full reinstall. This is why you need to have a backup from your recovery so you can switch back and forth. In some cases (for example, for my Square Enix 2FA token), I actually had to rollback, log into my account on the site to remove the token, roll forward back to LineageOS and enable the token under the new OS. Crucially, check each if the settings within the app, for example download location as sometimes you need to give the apps permission to write into the folder (more important on more recent Android releases since there’s a higher security level now)
  28. Other things to check:
    • Fingerprint reader — on some devices, you need to flash firmware partitions. See this link: https://jira.lineageos.org/browse/BUGBASH-257 if you cannot enrol a fingerprint into the OS
  29. Once everything is complete, reboot into recovery, and take a new backup of your new OS. Keep this one and the last Cyanogenmod backup in case you need to go back to get a file, or similar.

And finally, make use of the easter egg Google have provided ;)