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.
- The main ROM – find this at https://download.lineageos.org
- 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.
- Download Google Apps from http://opengapps.org/?api=7.1 (I picked the Pico version)
- 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)
- Install TitaniumBackup and get the Pro version (paid) if you can – it’s a worthwhile app to contribute to.
- Make backups of all your apps.
- 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.
Steps
- 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.
- 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
- Before flashing anything, make sure you make a backup of your current ROM so you can roll back if needed.
- Once the backup is complete, perform a factory reset
- Now flash the LineageOS ROM file
- Reboot and check the OS boots without error. This will take a while as the first boot of a new ROM.
- Reboot back into Recovery and flash the SuperSU. Do NOT do this if you intend to install Magisk/systemless root later.
- Reboot and confirm the OS still boots without error.
- Reboot back into recovery and flash update.zip (this will auto reboot the phone)
- 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.
- Enabled extended restart menu so you can boot into recovery more easily
- Reboot back into recovery mode and flash the OpenGapps. At the time of writing, the current version for LineageOS and S5 is 7.1.
- Install Magisk here if you want to also.
- Reboot into the main OS
- In Developer options, enable:
- Android Debugging (needed for apps like Titanium Backup to work properly)
- Local Terminal (optional)
- Bug Report Shortcut (always good to contribute to the community)
- Force allow apps on external (forces your apps to be able to be installed on your external SD card)
- Kill app back button (essential for ensuring an app is cleanly killed)
- 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)
- Time to find your backups folder. Click Menu -> Preferences -> Backup Folder Location
- At the top, where is says “Storage Provider”, theres “Click to change” — click that and choose “DocumentProvider storage”
- 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”
- 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
- Click on the back key to get back to the main menu
- 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)
- 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.
- 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.
- Once you’ve setup your Google accounts, go ahead and finish restoring your apps.
- Customise your new ROM to your liking.
- 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)
- 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
- 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 ;)
http://www.pocket-lint.com/news/138312-how-to-access-android-n-nougat-easter-egg