[Samsung Galaxy S 5 Unified Development] curiousrom:
Old Unofficial 16.0 - Google Pay, NFC Payments & Root Method

There is no reasons to stick to the old unofficial 16.0 as several patches were applied since so it's a waste of time to troubleshoot it.

Look at all the merged commits in the LineageOS Gerrit by S5 dev haggertk that you are missing: owner:haggertk@lineageos.org status:merged branch:lineage-16.0 and this is not counting all the other patches by other devs that applies to the S5 also. Look here & keep on scrolling down: https://download.lineageos.org/klte/changes/

It's easy to update to official LineageOS 16.0 for S5 with the benefit of easy OTA updates.

The best is a clean install with wiping both System & data but I described here how I installed quickly & easily official 16.0 over unofficial 16.0 by wiping only System & caches & preserving all my apps, accounts & settings: Official 16.0 for S5 2019-03-01 - Dirty Flash Report.

After running that setup successfully for 2 weeks I did a S5 LineageOS Super Clean Install including a Google Backup that I restored as soon as I booted to System the first time. My Google backup was huge @ 1.3 GB so make sure you have a quick wifi connection if you do that.

It restored 90% of my settings & did not include the apps that I installed manually from other sources than Google Play obviously.

Always do a full TWRP backup including the EFS partition before doing any of this so you can go back quickly to your current setup by restoring that backup in case something goes wrong.

Check also S5 Odin Flashable Modem & Bootloader to update those.

***

Google Pay & NFC Payments

"...with a message that I can't remember exactly but had something to see with the rooted device" - It's important to write down or at least make a screenshot of the exact error you receive as those keywords are the best to search the web for that error. It's also maybe useful when searching in a logcat.

For secure NFC-based transactions through Host Card Emulation - HCE (Wikipedia), Google Pay & several Banking apps, Netflix, etc. many of those check if the phone is rooted & also if it passes the SafetyNet test.

From the LineageOS official page about SafetyNet: What it is, and how it affects you:

So the LineageOS Addonsu does not hide the fact that the device is rooted & fails the test made with the SafetyNet Test app. If you install this one, disable Keep your device awake in Privacy Guard.

While this works & passes the SafetyNet Test, it has to be done before any NFC transactions, may require a reboot & may mess up your other rooted apps that runs in the background like GSam, BBS, etc.

Users who want root & also NFC payments, Netflix, etc are installing Magisk v18.1 @ the present as a rooting method which hides root & passes the SafetyNet Test. Several S5 LineageOS 16.0 users reported success in this thread recently:

When I installed Magisk this is what I did: downloaded & copied to the external sdcard from the Magisk release thread: Latest Stable, Latest Uninstaller (it's TWRP flashable if something goes wrong) & Latest Magisk Manager.

Back into TWRP wiped both caches, then flashed Magisk-v18.1.zip & rebooted to System. Magisk Manager was not showing up so installed manually the MagiskManager....apk downloaded previously & everything was working fine.

In Magisk Manager > Settings my preferences were: Update Channel: Stable, Automatic Response: Prompt, Superuser Notification: None (otherwise it's gets annoying fast). And kept the default settings for all the rest and the S5 passes the SafetyNet test in both Magisk Manager & in the SafetyNet Test app.

Now after a super clean install I am running LineageOS Addonsu because there is no Google Pay in my country yet (official Google Pay Help country list here), no NFC payments where I live & I want to be able to contribute to the LineageOS bug tracker & the devs don't like setups with Magisk because it modifies the boot.img & other system stuff.

According to recent posts in this thread in this page the Magisk uninstaller does not remove everything that Magisk installs so I suggest doing a full TWRP backup before trying Magisk.

"... I re-flashed the very same ROM with no Addonsu, and now Google Pay works just fine, as does NFC" - It's not necessary to do that. If you installed addonsu-16.0-arm-signed.zip from https://download.lineageos.org/extras you just run the addonsu-remove-16.0-arm-signed.zip from that same page & reboot to System before doing anything else. It removes everything that the LineageOS Addonsu installed.

I would be very surprised if this works for making NFC payments. Try the SafetyNet test like in the attachments.

***