FORUMS
Remove All Ads from XDA

[ROM][OFFICIAL] LineageOS for Samsung Galaxy S5 LTE+ (G901F) / LTE-A (G906S/K/L)

643 posts
Thanks Meter: 1,057
 
Post Reply Email Thread
Announcement from cvxda: Lineage OS port for Samsung Galaxy S5 LTE+ (G901F)
LineageOS logo
LineageOS for Samsung Galaxy S5 LTE+ / LTE-A

Code:
- Your warrenty is now void.
- You WILL trip KNOX!
- You have been warned.
- Use at your own risk.
Introduction:

This is the thread for the offical port of LineageOS to
  • Samsung Galaxy S5 LTE+, SM-G901F, codename kccat6, and
  • Samsung Galaxy S5 LTE-A, SM-G906S/K/L, codename lentislte.
  • This port is mostly stable. Still, there's no software without bugs.
  • This project is based on the port to CyanogenMod by @sktjdgns1189. For details on the history, please have a look at the original thread.

How to install:

Know problems:
  • Filesystem encryption is broken. Trying to encrypt results in a bootloop which only a full wipe of the data partition will fix.
  • We're using Camera2 for now since Lineage's Snap has some problems:
    • It often crashes when using the flash.
    • Taking videos either crashes or the videos are broken.
    • Taking Panorama pictures often crashes or just stops without storing the picture.

State of kernel security:

Download from:

Official weekly builds:Test builds (only on demand or request):
Sources:

XDA:DevDB Information
LineageOS for Samsung Galaxy S5 LTE+ / LTE-A, ROM for the Samsung Galaxy S5

Contributors
cvxda, xamio, sktjdgns1189
Source Code: https://github.com/LineageOS

ROM OS Version: 7.x Nougat
ROM Kernel: Linux 3.10.x
ROM Firmware Required: kccat6: CQA2 or later, lentislte: CPL1 or later
Based On: Lineage OS

Version Information
Status: Stable

Created 2017-01-08
Last Updated 2017-07-29
The Following 50 Users Say Thank You to cvxda For This Useful Post: [ View ] Gift cvxda Ad-Free
 
 
8th January 2017, 11:18 AM |#2  
cvxda's Avatar
OP Senior Member
Flag Nürnberg
Thanks Meter: 1,057
 
Donate to Me
More
Notes:
Thanks to @Stamgastje for the first cut of these notes.

History and older builds (LineageOS)

The Lineage OS project -- a.k.a. Lineage Android Distribution (LAD) -- is a continuation of the CyanogenMod project, which was discontinued in December 2016. Before maintaining Lineage OS 14.1 ROM for this phone, @xamio maintained CyanogenMod ROMs (CM13, CM14.1). You can still find these builds via the link to his site (ionkiwi.nl) above. The original (and oldest) CyanogenMod builds for this phone were created by @sktjdgns1189. His original builds are still available here: http://fsrv1.sayanogen.com/KCCAT6-13/, and this was the original thread on this forum.

Installation

Below some hints that may help you to install these ROMs on your phone.

Clean install, or dirty flashing?

What is the difference?
The difference is whether you clean (format) the entire /data partition (which contains your apps and user data, as well as the dalvik cache), or not, before flashing the new ROM image:
  • A clean install means: clean the /system, /data (incl. dalvik cache) and /cache partitions, and then install the ROM
  • Dirty flashing means: clean the /system and /cache partitions, as well as the dalvik cache, but not the entire /data partition, before installing the ROM
With a clean install, you need to manually restore your apps and user data after flashing the new ROM image. With a dirty flash, there is no need to do this -- so this is the faster, but riskier solution. Therefore, it is always recommended to make a backup of your apps (e.g. with Titanium Backup) and user data (internal storage) before flashing any ROM image.

When could you consider a dirty flash?
It is, generally speaking, possible to perform a dirty flash:
  • When upgrading a ROM to an newer build of the same ROM (but be careful when upgrading between major versions, e.g. from CM13 to CM14.1)
  • When upgrading from CyanogenMod 14.1 to Lineage OS 14.1 (as Lineage OS is the continuation of CyanogenMod, based on the same sources)

When should you perform a clean install?
In all other cases, so e.g.:
  • When downgrading a ROM to an older build of the same ROM
  • When switching between ROMS, e.g. from CyanogenMod to Resurrection Remix (or vice versa). Reason: different ROMs use different code bases that are usually not 100% compatible (exception is upgrading from CyanogenMod 14.1 to Lineage OS 14.1, see above)

(Note: in case you choose to perform a dirty flash over your existing ROM, don't forget to re-flash the GApps package immediately afterwards!)

How to dirty flash an official weekly over an unofficial build (and vice versa)?

When trying to update an unofficial build to an official weekly build, I get an error message in TWRP saying
"Can't install this package on top of incompatible data. Please try another package or run a factory reset". How do I fix that?


At the start of an installation the installer checks the build keys. They differ between unoffical and official builds, and the installer refuses to overwrite builds with different keys. To fix this you have to install the official keys before trying to install the official build:
  1. Run this script called lineage-migration-signed.zip in TWRP.
  2. Then install the unofficial ROM zip.
You only have to do this for the first switch from unoffical to offical build.

There may be reason to dirty flash an unofficial build over an official build, for instance, if you're developing or testing new stuff. The problem is the same, just in the other direction: You have to install the unofficial build keys:
  1. Run this script called lineage-migration-unsigned.zip in TWRP.
  2. Then install the official ROM zip.

Modem and bootloader

Which version do I need?
Builds from Sept. 19 (cm-13.0-20160919-UNOFFICIAL-kccat6xx.zip) and later should use a Marshmallow modem & bootloader (starting with 'C', so e.g. CPE1, CPH3, CPJ1). Older builds require a Lollipop modem & bootloader (starting with 'B', so e.g. BOH4, BOK2).

Generally, it is recommended to use the latest modem that is compatible for your device.

How do I get these images?
The original ROM files containing the modem and bootloader files are available from the Sammobile site. You have to extract bootloader and modem files and flash them to your device using Odin (Windows) or Heimdall (Linux, MacOS, Windows).
  • Download the firmware file from Sammobile's firmware page for the G901F. The latest one available at the time of writing these Notes was the "Nordic countries" version with bootloader CPLA and baseband CPJ1. Assuming you download that version, the resulting file will be called G901FXXS1CPLA_G901FNEE1CPJ1_NEE.zip.
  • Unpack that file. On Windows, right click on the file and choose "Extract all...". On Linux/Mac, simply use the command line:
    Code:
    $ unzip G901FXXS1CPLA_G901FNEE1CPJ1_NEE.zip
    After unpacking you get a new file G901FXXS1CPLA_G901FNEE1CPJ1_G901FXXU1CPJ1_HOME.tar .md5. This is a standard tar archive and can be opened with any archiver capable of handling the tar format (especially with tar itself). The attached .md5 suffix indicates, that a md5 checksum has been attached to the file.
  • Extract the file. On Windows you can do this by installing the swiss-army knife of archivers, 7zip. It installs an entry for the right-click context menu. Use it to extract G901FXXS1CPLA_G901FNEE1CPJ1_G901FXXU1CPJ1_HOME.tar .md5. On Linux/Mac, simply use the command line:
    Code:
    $ tar xf G901FXXS1CPLA_G901FNEE1CPJ1_G901FXXU1CPJ1_HOME.tar.md5
    Either way, this extracts the following list of files:
    Code:
    NON-HLOS.bin  cache.img.ext4   recovery.img  sdi.mbn
    aboot.mbn     hidden.img.ext4  rpm.mbn       system.img.ext4
    boot.img      modem.bin        sbl1.mbn      tz.mbn
    The files with suffix .img and .img.ext are the actual system files. You don't want them, unless you want to reinstall stock Samsung Android.
    The files NON-HLOS.bin and modem.bin constitute the baseband, all other files with .mbn suffix constitute the bootloader.

How do I flash these images on Windows with Odin?
This is only marginally more complex than by using Heimdall. The difference is that Heimdall can flash the extracted .bin and .mbn files, while Odin needs them packed into a tar file. Fortunately you already have 7zip!
  • Select all of the aforementioned .bin and .mbn files. Right click to open the context menu. Select 7zip and choose Add to archive... from the sub menu

    This opens 7zip's archive dialog. As Archive format choose tar. Append .md5 to the archive filename and press the OK button

    Congratulations, you're now the happy owner of an Odin file with only bootloader and baseband images.
  • Sidenote: You could also create a tar.md5 file, you just have to append the md5 sum to the just created tar file. It's not really tricky, but you'd need an additional md5sum tool which is not available on Windows by default, so we just skip this here.
  • If you haven't already, download and install Odin.
  • Boot the phone into download mode: Power off the phone, then press and hold Volume Down + Home + Power buttons. You'll see a severe warning message. Ignore it by pressing Volume-Up. You're now in download mode.
  • Connect your device to your PC's USB port.
  • Start Odin.
  • Select the .tar file you just created.
  • Enable (only) these options: 'Auto Reboot' and 'F. Reset Time'.
  • Flash the images.

How do I flash these images on Linux/MacOS/Windows with Heimdall?
  • If you haven't already, download and install Heimdall. If you have trouble with the most recent version of Heimdall (the official version 1.4.1 has a few annoying bugs) you have to rebuild heimdall from source by yourself. Instructions for rebuilding can be found here and here.
  • Boot the phone into download mode: Power off the phone, then press and hold Volume Down + Home + Power buttons. You'll see a severe warning message. Ignore it by pressing Volume-Up. You're now in download mode.
  • Connect your device to your PC's USB port.
  • Check if Heimdall recognizes your device:
    Code:
    $ heimdall detect
    If it doesn't, you have to do some digging:
    • On Windows you might have to install Samsung device drivers.
    • On Linux you might have to create a udev entry for your device. As root, open or create the file /etc/udev/rules.d/51-android.rules and add a line
      Code:
      SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0660", USER="[insert your non-root username here]"
      , then reboot the machine.
    • On Mac... sorry, I have no idea what to do on a Mac in this case.
  • Flash the bootloader and baseband images:
    Code:
    $ heimdall flash --APNHLOS NON-HLOS.bin \
    --MODEM modem.bin --SBL1 sbl1.mbn --DBI sdi.mbn \
    --ABOOT aboot.mbn --RPM rpm.mbn --TZ tz.mbn
    This may take a minute or two and then reboot your device automatically. It might reboot into your recovery. That's nothing to worry about. Just reboot from there into system.
The Following 24 Users Say Thank You to cvxda For This Useful Post: [ View ] Gift cvxda Ad-Free
8th January 2017, 11:18 AM |#3  
cvxda's Avatar
OP Senior Member
Flag Nürnberg
Thanks Meter: 1,057
 
Donate to Me
More
Reserved
The Following 5 Users Say Thank You to cvxda For This Useful Post: [ View ] Gift cvxda Ad-Free
8th January 2017, 11:55 AM |#4  
Senior Member
Thanks Meter: 121
 
More
super!

Just for completeness, hereby a link to a summary of the history of this ROM. I'll stop maintaining that overview post now, with this new thread and the up-to-date overview in the topic start.
The Following 4 Users Say Thank You to Stamgastje For This Useful Post: [ View ] Gift Stamgastje Ad-Free
8th January 2017, 12:07 PM |#5  
cvxda's Avatar
OP Senior Member
Flag Nürnberg
Thanks Meter: 1,057
 
Donate to Me
More
Quote:
Originally Posted by Stamgastje

super!

Just for completeness, hereby a link to a summary of the history of this ROM. I'll stop maintaining that overview post now, with this new thread and the up-to-date overview in the topic start.

I reserved the first two comments to serve as some kind of FAQ. It would be pretty nice if you could have a look over your notes from the old CM thread and rework them slightly for this thread and, if it's not asked too much, the RR thread. If you send them to me in source (i.e. with all format markers), I'd add them to the reserved comments.

Edit: To be clear, there's still some stuff in your notes which isn't in the OP, which might be helpful to newbies and pros alike.

Thanks,
Corinna
The Following 3 Users Say Thank You to cvxda For This Useful Post: [ View ] Gift cvxda Ad-Free
8th January 2017, 12:17 PM |#6  
Senior Member
Thanks Meter: 121
 
More
Quote:
Originally Posted by cvxda

I reserved the first two comments to serve as some kind of FAQ. It would be pretty nice if you could have a look over your notes from the old CM thread and rework them slightly for this thread and, if it's not asked too much, the RR thread. If you send them to me in source (i.e. with all format markers), I'd add them to the reserved comments.

Edit: To be clear, there's still some stuff in your notes which isn't in the OP, which might be helpful to newbies and pros alike.

Thanks,
Corinna

Sure, will do so! How can I best send you the source? I can't send you a private message on this forum. AFAIK you should be able to send me a private message, so would be good if you could share me your contact details there (e.g. an e-mail address).
The Following User Says Thank You to Stamgastje For This Useful Post: [ View ] Gift Stamgastje Ad-Free
8th January 2017, 12:30 PM |#7  
cvxda's Avatar
OP Senior Member
Flag Nürnberg
Thanks Meter: 1,057
 
Donate to Me
More
Quote:
Originally Posted by Stamgastje

Sure, will do so! How can I best send you the source? I can't send you a private message on this forum. AFAIK you should be able to send me a private message, so would be good if you could share me your contact details there (e.g. an e-mail address).

You got a PM.


Thanks,
Corinna
The Following User Says Thank You to cvxda For This Useful Post: [ View ] Gift cvxda Ad-Free
8th January 2017, 12:48 PM |#8  
Excellent (separate thread and the rom).
One annoyance still remaining is the backlight not turning on sometimes, have to lock unlock to get it back.
8th January 2017, 02:11 PM |#9  
Member
Flag Yogyakarta
Thanks Meter: 14
 
Donate to Me
More
Great work. Pls make for G906x too 😅
8th January 2017, 03:01 PM |#10  
cvxda's Avatar
OP Senior Member
Flag Nürnberg
Thanks Meter: 1,057
 
Donate to Me
More
Quote:
Originally Posted by girtsn

Excellent (separate thread and the rom).
One annoyance still remaining is the backlight not turning on sometimes, have to lock unlock to get it back.

What backlight?!? This is an AMOLED display. It has no backlight.

Corinna
The Following User Says Thank You to cvxda For This Useful Post: [ View ] Gift cvxda Ad-Free
8th January 2017, 03:05 PM |#11  
not sure what is the correct name but usually the phone when unlocked goes quite bright. there are however situations (the issue is not sure how to reproduce) when the display is much more pale, like energy saving or something.
i have adaptive brightness on and display mode of livedisplay on auto
Quote:
Originally Posted by cvxda

What backlight?!? This is an AMOLED display. It has no backlight.

Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes