I tried following the official LineageOS installation guide here, for klte (G900F) model, but the described procedure doesn't work (always).
If you broke your phone following my tips, it's your fault, not mine.. I'm not responsible in any way. Read all the linked resources first.
I'm not going to copy&paste here the official LineageOS installation guide, please refer to the LineageOS site for the complete procedure, I'll only fix the wrong parts. I have verified these steps with my Samsung S5 (G900F) phone, with a fully updated Android Marshmallow from Samsung.
Let's fix the wrong part, the TWRP installation:
The TWRP installation - the right way
The official guide tells you to use the heimdall opensource tool in order to flash the new recovery, TWRP. Forgot it and let's use the Odin software for Windows instead of heimdall. Odin is the official Samsung tool for flashing/managing the firmwares.
You can find it here on the xda forums.
If you have already installed Windows Samsung software.. like Smart-Switch you should have all the needed drivers for the Samsung phone. You can also use the Smart-Switch software to do a full backup... that is not a bad idea...
DO BACKUPS, DO BACKUPS.. Cloud or Local
Google for it
- Download the TWRP tar image for S5 klte into your Windows PC
- Activate the Android phone USB debugging mode (please Google about it)
- Connect the phone with a USB cable to your Windows PC
- Press the Volume Down+Home+Power buttons altogether, then confirm in order to enter the Download Mode.
- Open the ODIN application
- The phone may be detected and a confirmation brief message appears in the log tab (OK+something)
- In the AP field select the downloaded TWRP .tar file
- Select only the 'Reset Time' checkbox in the Odin Options tab (Re-partition is DANGEROUS and should be unchecked! And also the other checkboxes should be unchecked)
- Press the START button and the recovery will be flashed
- Reboot into TWRP recovery by pressing at the same time the phone buttons Volume UP+Home+Power
After TWRP installation you can follow the official instructions in order to install LineageOS.
With S5 you need to uncheck Odin "Automatic Reboot" checkbox.
This is needed because the automatic reboot replaces the TWRP with the original Samsung recovery.. you need to manually boot in TWRP at least once in order preserve it right.