[Samsung Galaxy S 5 Unified Development] LouLuo:
About flashing full stock firmwares, I can share my experience briefly.

First attempt​

My Galaxy S5 was quite unreliable... read further.

I had BL (BootLoader) + Modem firmware versions from G900FXXU1POF4 + Lineage OS 17.1 as system.

I've tried few years ago to upgrade bootloader and modem software from flashing Stock files with Odin.

The modem & bootloader have been flashed with success.

But failed to boot system: frozen on booting animation.

I thought the bootloader & modem would have been upgraded anyway.

Mistake: Nothing has been upgraded.

I recommend to check it with shell command: getprop ro.bootloader

Seems that to upgrade those components, it is required to boot successfully the full stock firmware + Android system.

I gave up for few years. Sad me.

Why to upgrade the bootloader & modem firmware?​

Solved battery draining issue getting discharged within 1 to 4 hours, even "sleeping".

Solved laggy UI & random reboots

Solved 4G / 3G network frequent disconnection

Solved fast auto switch from 4G to 3G when receiving a phone call

Solved most of the bluetooth crash issues with audio streaming

Unfortunately, no improvement about some graphics rendering glitches in some Apps.

Also, it's likely to fix some severe security vulnerability issues.

- More info for curious crazy you (good luck): https://bits-please.blogspot.com/2015/08/exploring-qualcomms-trustzone.html

What is working now with my Galaxy S5 SM-G900F KLTE?​

BL + Modem upgrade with stock firmware G900FXXS1CQD2

Restore Recovery+Boot+System+Data.

Now I can smoothly download & play some PS1 games, with wireless Xbox Controller + USB OTG receiver, streaming sound over bluetooth to BT speakers, for some time.

That's all.

Easier said than done.

Before flashing anything (and cry)

> Backup your EFS + Modem files <

> from TWRP to an External SD Card & copy it somewhere safe <

But do not play with restoring it, unless your IMEI & other hardware addresses are messed up

You will be grateful to yourself if anything really bad happens

​

Now, how to get it nicely working?

Tools​

I recommend to actively check the sources from where you get those tools before using them.

+ VirusTotal check

Galaxy S5 SM-G900F klte with unlocked bootloader & battey charged

External SD Card with enough free space & reliable

Micro USB cable that makes a secure data connection

(yes. IMPORTANT. Buy a new one if not.)

ADB USB Drivers

Samsung USB Drivers

ADB tools (within platform-tools package)

Odin 3.14.1

TWRP 3.7.0_9

Full stock firmware G900FXXS1CQD2

Lineage OS 18.1 for MicroG

- At least - 24h in front of you, without a working phone, to be in peace, keep focus & take your time.

And, do you trust yourself enough?

Backups​

Remove any lockscreen security from Android to prevent issues with it

From Download Mode: Flash latest TWRP recovery stable release into the recovery partition with Odin

From Recovery: backup ALL your partitions into your External SD Card

Check the backup logs that it went without errors

Optionnaly copy the backup into another device: we never know if the card could get corrupted

Manually backup your Internal Storage user data too, like your pictures. (through MTP or a file manager,from Internal to External SD Card or to your PC).

It is NOT included in any TWRP Backup!

Cleaning​

Format (not wipe) the data partition from TWRP: prevents mess with encryption + increased stability

Wipe System + Cache + Dalvik.

Shutdown.

Upgrading Bootloader + Modem with full Stock firmwares​

Reboot into Download Mode

Plug USB cable into your phone securely, in such way phone + cable cannot move by itself.

From Odin, flash all the .md5 files from stock G900FXXS1CQD2 (AP, BL, CSC... fields doesn't matter)

DO NOT TOUCH YOUR USB CABLE AND PHONE AT ALL

Observe any errors & which recovery is started at reboot (TWRP? Samsung?)

Wait 30 minutes while phone tries to apply the update anyway.

If at 1st attempt, not showing fresh install Samsung welcome wizard:

Pull off battery & back.

Start again this Upgrading section from 1.

- I suspect it needs to be flashed twice when the recovery wasn't Samsung's official one.

If at 2nd attempt, still not showing fresh install Samsung welcome wizard:

Reflash TWRP into recovery partition & immediately boot to it

Wipe Data + Cache + Dalvik

Shutdown

Remove battery for 5-10 seconds & put it back.

Boot again.

Be patient.

Wait more, up to 1 hour.

If it still doesn't work:

Find another USB cable.

Come back to the first Cleaning section and do it again.

If hard-bricked (no access to download mode): there is some hope with Qualcomm EDL Mode.

If it boots successfully: Congratulations! Yay!

Test & backup again​

Check if the bootloader version is successfully upgraded:

From any phone's terminal you can run (TWRP, ADB, apps...): getprop ro.bootloader​

Can also be wise to check how the phone works from stock system:

Mobile network stability, bluetooth, microphone clarity & gains, feedback cancellation, wifi, camera quality... battery consumption.​

Backup your EFS + Modem again - in case something changed in it with the upgrade​

Now, you are free to try out whatever system build!

If you want some more of my advices​

I would be mindful to not mess up with any other manufacturer partition, but only recovery, boot (not aboot!), system and data partitions.

(Download Mode doesn't check Samsung's firmware crypto signatures for nothing... even though I dream of more open and documented systems...)

Be curious and check what any script does & if that's really needed.

And remember G900F is only 2 GB RAM.

So, lighter it is, smoother it will run.

What I've been doing from here​

I flashed back TWRP with Odin, restored Boot+System (LineageOS 17.1) + Data.

I've been so surprised how the user experience became smooth. Phone cold. Battery life back to normal.

Data got successfully encrypted when I enabled pattern lock. While still accessible from TWRP.

Made a half-dirty upgrade from LineageOS 17.1 to LineageOS for MicroG 18.1:

From TWRP, wiping system partition to get rid of any customization, then flashing the official LineageOS for MicroG 18.1.

LinageOS for MicroG enables signature spoofing, which brings better compatibility with lots of apps while avoiding heavy Google libraries & trackers.

18.1 feels heavier than 17.1, but is satisfying enough couple of minutes after booting, with benefit of regular OTA updates.

Also tried out Magisk (extracting the boot.img file from the system zip installer + Magisk apk + flash patched boot.img), but heavily slowing down the boot process + SystemUI crash before asking SIM PIN code.

So I removed it for now.

Some useful apps I recommend to get rid of Google & more:

App stores: F-Droid, Aurora Store

Better UX: Kiss Launcher, Todo Agenda (widget)

Google internal services alternatives:

MicroG (Services Core + Services Framework Proxy), Mozilla UnifiedNlp Backend, Nominatim Geocoder Backend

Browsing: URLCheck, FFUpdater (providing Bromite or Fennec (+uBlock Origin (network lock disabled), Firefox Klar)

Cloud Synchronization - Contacts, calendar, tasks, files, passwords... : OpenTasks, DAVx5, NextCloud, NextCloud Notes, KeepassDX, Document Viewer (PDF)

Communicating: K-9 Mail (UX & UI became awesome last few years!), Signal, Frost (Facebook Client)

Navigating: OsmAnd (Maps. For now made TTS work only with Speech services by Google alone... unhappy about it)

Self-care: Finch (self-care turstworthy app), Noice (makes nice background noise), personnalize wisely with your own music your notifications and alarms & disable useless ones & disable vibrations.

For more clean customization without messing with the system: Magisk (?)

I've been previously taking some time to choose apps & review all settings of everything to take control of my digital life.

Can take 1+ full day + extra time later to adjust.

Now I am considering deleting Signal's data & uninstall & restore from app's backup, in hope to force enable push notifications and save some battery instead of an every 30s connection to Internet (thanks logcat).

Seems good to check apps permission and check if they register well in MicroG.

I'll try out some configurations to fix the microphone low sensitivity issue and feedback.

Ask me if you want more updates about my findings now I have a more stable system to play with

:)

s