• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[ROM][UNOFFICIAL][s5neolte][SM-G903F][11.0.0_r49] LineageOS 18.1[28-Nov-2021]

Search This thread

lallolu

Senior Member
Dec 5, 2009
651
154
Huawei Mate 30 Pro
Lineage-OS-Feature-Image-Background-Colour.png



LineageOS is a free, community built, aftermarket firmware distribution of Android 10.0, which is designed to increase performance and reliability over stock Android for your device.

LineageOS is based on the Android Open Source Project with extra contributions from many people within the Android community. It can be used without any need to have any Google application installed. Linked below is a package that has come from another Android project that restore the Google parts. LineageOS does still include various hardware-specific code, which is also slowly being open-sourced anyway.

All the source code for LineageOS is available in the LineageOS Github repo. And if you would like to contribute to LineageOS, please visit out Gerrit Code Review.


###########################################################
Note: This is the first time I am building a ROM. My initial plan was to build it just for personal use. But since it is stable, I decided to share it with whoever is interested. I am not sure how often I will be updating it. But, I will try to do it every month. I added LineageOS recovery even though I do not use it at all. It can be downloaded if desired.

What's working:
  • RIL (Calls, SMS, Data)
  • Wi-Fi
  • Bluetooth
  • NFC
  • Camera
  • Video Recording
  • Video Playback
  • Audio
  • Sensors
  • Flash
  • GPS
  • Vibration
  • Wifi Hotspot
  • Selinux enforcing

What's not working:
  • Nothing I am aware of.

Possible issue:
  • If phone does not connect to network, reset APN.
    • Go to settings->Mobile Network -> Advanced -> "Access point names" -> "3 dots" -> "Reset to default".

Flashing Instructions:
  • Copy Lineage zip to phone.
  • (Optional) Copy bit gapps to phone.
  • Boot TWRP
  • Backup things you want to keep.
  • Tap Install -> Select LineageOS zip (and optionally, gapps)
  • Swipe to flash
  • Reboot system now
  • First boot, especially with Gapps, may take a while.

Downloads:
LineageOS 18.1
Optional: Bit Gapps. This is the only gapps that has 32bit for android 11 AFAIK.
Optional: Lineageos recovery

Sources:
https://github.com/LineageOS

s5neolte lineage-18.1 branches
Fincer branch : android_device_samsung_s5neolte_lineageOS

XDADevDB Information
[ROM][UNOFFICIAL][s5neolte][SM-G903F][11] LineageOS 18.1, ROM for the Samsung Galaxy S5 Neo

Contributors

The authors and maintainers of s5neolte gerrit branch PixelBoot, Stricted, danwood76, Borduni, Fincer



ROM OS Version: Android 11
ROM Kernel: Linux 3.10.x
Based On: LineageOS

Version Information
Status:
Testing

Created 2021-06-16
Last Updated 2021-11-28
 
Last edited:

JMek

Senior Member
For now i cant test it cause i had to put back the latest stable official rom from Samsung on this spare phone, but, good work, keep it up. I'll try it for sure soon or later. (y)

Maybe you could even try to reach out / join forces with Stricted and the others if that could simplify all of you guys' work on the roms. Idk, just saying. :)
 
  • Like
Reactions: Beta123MAX

Bikeboy200

New member
May 1, 2019
4
3
Android 11!?!?! I was surprised that the S5 Neo got Android 10 and thought there was now way it would get Android 11, but I guess I was wrong. I wish I could test the rom, but the display on my S5 Neo is completely dead. RIP.
 

0LDST4R

Senior Member
May 2, 2018
288
206
NFC without function, and the ROM feels a bit laggy, Pico GApps installed. Anyways, nice giveaway.
 
  • Like
Reactions: lallolu

danwood76

Recognized Developer
May 23, 2015
1,305
2,104
NFC without function, and the ROM feels a bit laggy, Pico GApps installed. Anyways, nice giveaway.
NFC issue might be caused by the final 2 commits in the device tree.


The new NFC HAL doesn't allow updating the firmware. It fails on the A3 and A5.
 
  • Like
Reactions: lallolu and 0LDST4R

danwood76

Recognized Developer
May 23, 2015
1,305
2,104
For now i cant test it cause i had to put back the latest stable official rom from Samsung on this spare phone, but, good work, keep it up. I'll try it for sure soon or later. (y)

Maybe you could even try to reach out / join forces with Stricted and the others if that could simplify all of you guys' work on the roms. Idk, just saying. :)
We have already completed the 11 bringup. This thread is really just a build of that work.

Regards,
Danny
 

lallolu

Senior Member
Dec 5, 2009
651
154
Huawei Mate 30 Pro
I have got NFC working (s5neolte/Lineage OS 18.1), see my GitHub repository for details. After all, minor tweaks applied to current NFC [email protected] file and SELinux policy seem to be enough.
Thanks. I built a new version with NFC working. I see there is a commit in that branch that should enable call recording. I can't find the option in my phone though. It is maybe due to regional restrictions.
 
  • Like
Reactions: 0LDST4R

Fincer

Member
Jul 8, 2021
8
9
Thanks. I built a new version with NFC working. I see there is a commit in that branch that should enable call recording. I can't find the option in my phone though. It is maybe due to regional restrictions.
Glad to hear (y). Call recording option should activate/be visible only during phone calls. Have you tested that?
 

Fincer

Member
Jul 8, 2021
8
9
Yes, I tested it by initiating and later receiving a call. But recording option did not show up in either case.
Yeah, you are right. There are two relevant Dialer source java files which seem to dictate whether to show or hide the record option. The source code can obviously be patched.

packages/apps/Dialer/java/com/android/incallui/call/CallRecorder.java

- function canRecordInCurrentCountry() (lines 97-109) returns a boolean value

packages/apps/Dialer/java/com/android/incallui/CallButtonPresenter.java

- boolean variable showCallRecordOption, line 565, which gets its value from canRecordInCurrentCountry() function

- I assume showCallRecordOption dictates whether to show or hide recording button




I think one can simply replace lines 565-566 in CallButtonPresenter.java:

Java:
    final boolean showCallRecordOption = recorder.canRecordInCurrentCountry()
        && !isVideo && call.getState() == DialerCallState.ACTIVE;

with

Java:
    final boolean showCallRecordOption = !isVideo && call.getState() == DialerCallState.ACTIVE;
 
Last edited:
  • Like
Reactions: lallolu and 0LDST4R

danwood76

Recognized Developer
May 23, 2015
1,305
2,104
I have got NFC working (s5neolte/Lineage OS 18.1), see my GitHub repository for details. After all, minor tweaks applied to current NFC [email protected] file and SELinux policy seem to be enough.

I have had a quick look over your changes.

The NFC sepolicy stuff doesn't look right to me (it may work but there is probably a simpler/correct way to fix it). I am guessing that an NFC file was incorrectly labelled, what were the original denials you were getting? I could probably fix our SEPolicy properly. It may be that Jan was in permissive when he made the original commits (I have usually taken care of the SEPolicy stuff).

The "patch_tcpsockettracker-crash.patch" fudges round a kernel bug which I should really get round to fixing, I think it is only a few picks (I might take a look at it tomorrow).

BTW running "device/samsung/universal7580-common/extract-files.sh" on an S5NEO stock firmware will probably break stuff, we use the A510F nougat as the source of the common files (our kernel is also based on the A510F). Running the extract scripts from the latest LOS version should work fine but it is actually better to simply use themuppets repo as that has our 18.1 changes already.

As you gathered the call recording feature is disabled in a lot of countries due to legality. For example it is illegal in Germany, Sweden, and lots of other countries.

Also if you fix anything you can always push your changes to gerrit and we can review/merge ;)

Kind regards,
Danny
 
  • Like
Reactions: lallolu and 0LDST4R

TALUAtXDA

Senior Member
Nov 8, 2018
384
693
I have had a quick look over your changes.

The NFC sepolicy stuff doesn't look right to me (it may work but there is probably a simpler/correct way to fix it). I am guessing that an NFC file was incorrectly labelled, what were the original denials you were getting? I could probably fix our SEPolicy properly. It may be that Jan was in permissive when he made the original commits (I have usually taken care of the SEPolicy stuff).

The "patch_tcpsockettracker-crash.patch" fudges round a kernel bug which I should really get round to fixing, I think it is only a few picks (I might take a look at it tomorrow).

BTW running "device/samsung/universal7580-common/extract-files.sh" on an S5NEO stock firmware will probably break stuff, we use the A510F nougat as the source of the common files (our kernel is also based on the A510F). Running the extract scripts from the latest LOS version should work fine but it is actually better to simply use themuppets repo as that has our 18.1 changes already.

As you gathered the call recording feature is disabled in a lot of countries due to legality. For example it is illegal in Germany, Sweden, and lots of other countries.

Also if you fix anything you can always push your changes to gerrit and we can review/merge ;)

Kind regards,
Danny
To me, looking at @Fincer's commits adding the SELinux rules, they seem like they've just been copied right out of a different device tree.

I'm using the new open source Samsung NFC HAL on my own LineageOS 17.1 builds. To address the SELinux denials that I got with it, I labelled its service in the sepolicy in my commit here: https://github.com/TALUAtGitHub/and...mmit/914f6ec44657732de3562fd1b259d3ad1b8fcf95 ...and so, your guess that a file, which happens to be the NFC HAL service, is incorrectly labelled is correct. Labelling it with the correct label is absolutely all that's necessary.


Speaking of NFC, I've got an issue with my S5 Neo where NFC only works with another phone that I've tested it with. It doesn't work with any of the NFC tags/cards that I've tested, and this issue exists with both the new open source NFC HAL and the old NFC HAL. I don't know if that issue exists on the stock firmware as I never tested NFC on it. Has anyone got similar issues?

On the topic of call recording, to enable it (for whichever regions it's set to be allowed in, of course), all that would be required is this change: https://github.com/TALUAtGitHub/and...mmit/11448569ef5d1358bae1e6abbfce9d37200f6887 I haven't tested it myself yet. Changes outside of device-specific trees, as have been shared for it, should always be avoided if at all possible.
 
Last edited:
  • Like
Reactions: 0LDST4R

0LDST4R

Senior Member
May 2, 2018
288
206
So much technical stuff in this last posts. Very interesting for me to read all these things, and even more interesting how many people are active in development with this device. I'm just only the " typical enduser " with a fraction of all your knowledge, but i'm very happy to benefit from that.

Greetz, respect, and thanks.

_-_-_-_-_

0LDST4R

-_-_-_-_-
 

Fincer

Member
Jul 8, 2021
8
9
Thanks for commenting!

I am pretty sure there's room for fixes in my SEPolicy. What comes to NFC, I haven't copied all SEPolicy rules from "other device trees", although there are some rules used from other device tree sources (I know, rules should be evaluated, simply haven't had time for that). In most NFC rules, however, I simply allowed capabilities which did not cause any avc denials in my logs. I am pretty sure my SEPolicy might be too loose and should be more restrictive, and I am grateful if anyone like to improve it. I don't have list of original denials, but the current NFC SEPolicy rule set is mostly based on those.

Running '"device/samsung/universal7580-common/extract-files.sh" has not caused any issues on my S5 Neo, well, so far.

The patch file for TCP socket tracker crashing was one I found once I analyzed my logcat output and was seeing constant messages of the tracker process crashing. I don't like unnecessary crashes.

My personal opinion for call recording is that anyone who uses patches or workarounds to enable the feature takes legal and personal responsibility of doing so, as well.
 
Last edited:
  • Like
Reactions: lallolu

danwood76

Recognized Developer
May 23, 2015
1,305
2,104
To me, looking at @Fincer's commits adding the SELinux rules, they seem like they've just been copied right out of a different device tree.

I'm using the new open source Samsung NFC HAL on my own LineageOS 17.1 builds. To address the SELinux denials that I got with it, I labeled it in the sepolicy in my commit here: https://github.com/TALUAtGitHub/and...mmit/7e1325429647c7420e02d106bfdd0477b44888e4 I also have this related commit: https://github.com/TALUAtGitHub/and...mmit/fe5d4e253c5310523e66c4ff2c84424d5beee424 That's absolutely all that's necessary.

Speaking of NFC, I've got an issue with my S5 Neo where NFC only works with another phone that I've tested it with. It doesn't work with any of the NFC tags/cards that I've tested, and this issue exists with both the new open source NFC HAL and the old NFC HAL. I don't know if that issue exists on the stock firmware as I never tested NFC on it. Has anyone got similar issues?

As for call recording, to enable it, all that would be required is this change: https://github.com/TALUAtGitHub/and...mmit/95dfe486a5cca4b5fe3c9721d927de4aca772e7f I haven't tested it myself yet. Whether or not the call recording option becomes available with it would depend on if call recording is marked as being illegal in your country. Changes outside of device-specific trees should always be avoided if at all possible.
That sepolicy change looks correct. Are you happy for me to cherry-pick your patch and upload to gerrit? (Or you could do that yourself?)

The moving config to vendor patch isn't quite right for us, I will do a correct version with your authorship if you are happy? (also upload to gerrit). We like to keep the config file names the same as on stock.

To test the NFC I use the android CTS verifier. You can emulate payments and all NFC functions using that.

I will also cherry-pick your call recording overlay patch, not really sure how that got dropped as I remember we had that a few years ago.

Thanks for your input.

Kind regards,
Danny
 

TALUAtXDA

Senior Member
Nov 8, 2018
384
693
That sepolicy change looks correct. Are you happy for me to cherry-pick your patch and upload to gerrit? (Or you could do that yourself?)
Alright. Yes, you can upload it to gerrit. I don't know how to upload patches to gerrit yet, so it would be better for you to do it.
The moving config to vendor patch isn't quite right for us, I will do a correct version with your authorship if you are happy? (also upload to gerrit). We like to keep the config file names the same as on stock.
I've edited that commit through a rebase myself, and removed the change of the filename: https://github.com/TALUAtGitHub/and...mmit/c98d51d42c92af13bcfb8cb5157fcde077d9bdad
To test the NFC I use the android CTS verifier. You can emulate payments and all NFC functions using that.
I see. I think the CTS tests for NFC would pass. I just have the issue that I've described on my specific S5 Neo with both the new and old NFC HAL, and it looks like no one else has any similar issues. I think something might just be wrong with the NFC coil in the battery that I'm currently using, which really needs to be replaced, anyway.
I will also cherry-pick your call recording overlay patch, not really sure how that got dropped as I remember we had that a few years ago.
Okay. By the way, I've also edited that commit through a rebase to remove the call_recording_audio_source overlay, so that the default audio source, 1, is used. With audio source 4 which was set to be used through that overlay, call recording fails, with the following log messages from logcat:
Code:
[...]
07-15 09:48:02.103  3564  6980 E APM::AudioPolicyEngine: getDeviceForInputSource() no default device defined
07-15 09:48:02.103  3564  6980 W APM_AudioPolicyManager: getInputForAttr() could not find device for source 4
07-15 09:48:02.103  3564  6980 E AudioFlinger: createRecord() getInputForAttr return error -22
07-15 09:48:02.103  3594  5636 E IAudioFlinger: createRecord returned error -22
07-15 09:48:02.103  3594  5636 E AudioRecord: createRecord_l(0): AudioFlinger could not create record track, status: -22
07-15 09:48:02.104  3594  5636 E StagefrightRecorder: audio source is not initialized
07-15 09:48:02.104  6728  6746 E MediaRecorder: start failed: -2147483648
07-15 09:48:02.145  6728  6746 W CallRecorderService: Could not start recording
[...]
With audio source 1, it works fine.
Thanks for your input.

Kind regards,
Danny
You're welcome.
 

Top Liked Posts

  • 1
    Hi all,

    First of all I must say I am very impressed by this release - everything works smoothly. You guys are amazing. Having Android 11 on board just even further convinced me to stick to S5 Neo. I haven't noticed any flaws while using most common functions, well... except phone calls (my model is SM-G903F). I hand hoped that switching from LOS 17.1 (I did a fresh install - wiped former ROM) will make a difference, but it seems that problem remains the same (reported by me also in this thread: https://forum.xda-developers.com/t/big-problem-mic-gain-volume-low-in-lineage-17.4221863/

    During phone calls people on the other side can barely hear me or they complain that they have an impression as if I was "fading away". Speakerphone is completely unusable. I tried implementing the flashable file (all versions) compiled by danwood76 in this thread: https://forum.xda-developers.com/t/...-sm-g903f-10-0-lineageos-17-1.4082017/page-11 and all I got is slightly better performance while making phone calls, but speakerphone is completely dead.

    Guys, is there any workaround to overcome this issue? I'd love to use S5 Neo as my main phone with LOS (I've read about this ROM by accident and after successful install I don't want to revert back to stock version) and do not feel in need to spend extra cash for a new device.

    Of course I am willing to test any solutions and report back results :)

    Thanks
    1
    I have the same issue as Mike-san above, flashing the MICGAIN-higher.zip changed nothing. Very low mic input it seems.
  • 2
    Danny (@danwood76), what's the reason, that official builds are still on hold, due to pending promotion commit?
    Basically @Stricted and I have no time at the moment. He started a new job and I had a new baby.

    I have released unofficial builds, there is a link to my mega earlier in this thread.

    Kind regards,
    Danny
    1
    Does the FM-radio work on this device?

    Edit: So far the ROM seems to work great, I just can't find the LineageOS FM-Radio app, that I did find on other devices.
    FM radio is not supported. It uses a closed source hal which we could never get to work.

    Kind regards,
    Danny
    1
    Danny (@danwood76), what's the reason, that official builds are still on hold, due to pending promotion commit?
    1
    Hi all,

    First of all I must say I am very impressed by this release - everything works smoothly. You guys are amazing. Having Android 11 on board just even further convinced me to stick to S5 Neo. I haven't noticed any flaws while using most common functions, well... except phone calls (my model is SM-G903F). I hand hoped that switching from LOS 17.1 (I did a fresh install - wiped former ROM) will make a difference, but it seems that problem remains the same (reported by me also in this thread: https://forum.xda-developers.com/t/big-problem-mic-gain-volume-low-in-lineage-17.4221863/

    During phone calls people on the other side can barely hear me or they complain that they have an impression as if I was "fading away". Speakerphone is completely unusable. I tried implementing the flashable file (all versions) compiled by danwood76 in this thread: https://forum.xda-developers.com/t/...-sm-g903f-10-0-lineageos-17-1.4082017/page-11 and all I got is slightly better performance while making phone calls, but speakerphone is completely dead.

    Guys, is there any workaround to overcome this issue? I'd love to use S5 Neo as my main phone with LOS (I've read about this ROM by accident and after successful install I don't want to revert back to stock version) and do not feel in need to spend extra cash for a new device.

    Of course I am willing to test any solutions and report back results :)

    Thanks
    1
    I have the same issue as Mike-san above, flashing the MICGAIN-higher.zip changed nothing. Very low mic input it seems.
  • 12
    Lineage-OS-Feature-Image-Background-Colour.png



    LineageOS is a free, community built, aftermarket firmware distribution of Android 10.0, which is designed to increase performance and reliability over stock Android for your device.

    LineageOS is based on the Android Open Source Project with extra contributions from many people within the Android community. It can be used without any need to have any Google application installed. Linked below is a package that has come from another Android project that restore the Google parts. LineageOS does still include various hardware-specific code, which is also slowly being open-sourced anyway.

    All the source code for LineageOS is available in the LineageOS Github repo. And if you would like to contribute to LineageOS, please visit out Gerrit Code Review.


    ###########################################################
    Note: This is the first time I am building a ROM. My initial plan was to build it just for personal use. But since it is stable, I decided to share it with whoever is interested. I am not sure how often I will be updating it. But, I will try to do it every month. I added LineageOS recovery even though I do not use it at all. It can be downloaded if desired.

    What's working:
    • RIL (Calls, SMS, Data)
    • Wi-Fi
    • Bluetooth
    • NFC
    • Camera
    • Video Recording
    • Video Playback
    • Audio
    • Sensors
    • Flash
    • GPS
    • Vibration
    • Wifi Hotspot
    • Selinux enforcing

    What's not working:
    • Nothing I am aware of.

    Possible issue:
    • If phone does not connect to network, reset APN.
      • Go to settings->Mobile Network -> Advanced -> "Access point names" -> "3 dots" -> "Reset to default".

    Flashing Instructions:
    • Copy Lineage zip to phone.
    • (Optional) Copy bit gapps to phone.
    • Boot TWRP
    • Backup things you want to keep.
    • Tap Install -> Select LineageOS zip (and optionally, gapps)
    • Swipe to flash
    • Reboot system now
    • First boot, especially with Gapps, may take a while.

    Downloads:
    LineageOS 18.1
    Optional: Bit Gapps. This is the only gapps that has 32bit for android 11 AFAIK.
    Optional: Lineageos recovery

    Sources:
    https://github.com/LineageOS

    s5neolte lineage-18.1 branches
    Fincer branch : android_device_samsung_s5neolte_lineageOS

    XDADevDB Information
    [ROM][UNOFFICIAL][s5neolte][SM-G903F][11] LineageOS 18.1, ROM for the Samsung Galaxy S5 Neo

    Contributors

    The authors and maintainers of s5neolte gerrit branch PixelBoot, Stricted, danwood76, Borduni, Fincer



    ROM OS Version: Android 11
    ROM Kernel: Linux 3.10.x
    Based On: LineageOS

    Version Information
    Status:
    Testing

    Created 2021-06-16
    Last Updated 2021-11-28
    4
    Changelogs

    13-Sep-2021
    - September security update
    - Update Lineage sources.

    11.08.2021
    - August security update.

    08.07.2021
    - July security update
    - Update Lineage sources.
    - NFC fix applied. Thanks @Fincer

    17.06.2021
    - Added "Night Light" to display settings.

    16.06.2021
    - Initial release
    4
    For now i cant test it cause i had to put back the latest stable official rom from Samsung on this spare phone, but, good work, keep it up. I'll try it for sure soon or later. (y)

    Maybe you could even try to reach out / join forces with Stricted and the others if that could simplify all of you guys' work on the roms. Idk, just saying. :)
    We have already completed the 11 bringup. This thread is really just a build of that work.

    Regards,
    Danny
    3
    same here, And i flash to odin and get back to 17.1 which is more stable, I have a bad experience on this one. When you are on LOS 18.1 and wish to flash 17.1 you can't access your internal after the flash of 17.1 it says access denied, Also my 256GB Sandisk card ended up corrupted on 18.1 however when i connect my sdcard to computer my sdcard is not corrupted. And i flash the firmware from odin and my sdcard was working fine.
    You cannot downgrade 18.1 -> 17.1. Nor can you flash unofficial builds over the top of official builds (without a special migration zip). You will always get permissions issues and app crashes doing either of those things.

    In 18.1 only exFAT is really supported for large SD volumes. What format is your SD card?

    I have done some builds for the S5NEO which are what will end up as the official releases. Are you able to re-test with that build? Available HERE.

    Kind regards,
    Danny
    3
    I use swap on 18.1 LOS on your room for some reason swap helps a lot to me. However I get this random reboots does this rom of yours support swap in kernel?
    Swap/Zram is already enabled, don't use any crappy third party apps that enable it because they will do it wrong.

    With regards to the reboot, use the latest version from my mega drive as there was a bug in the sdfat driver in older releases.

    Kind regards,
    Danny