[ROM][G901F][6.0.1] UNOFFICIAL CyanogenMod 13 for Galaxy S5 4G Plus

Search This thread

xamio

Senior Member
May 24, 2014
60
173
Pull request created. Please keep in mind that cm-14.1 might not be completely happy
with the current device-specific Selinux settings. There may be some avc's in the
logcat output which require their own settings. Feel free to post the avc's here and
we can go over them and see what needs to be looked after.

Thanks!
Observed some avc's on CM14.1 (like no audio when calling)
maybe sepolicy/audioserver.te is also needed in cm13, didn't test though

http://ionkiwi.nl/archive/view/4/samsung-galaxy-s5--g901f--kccat6xx
cm-14.1-20161211-UNOFFICIAL-kccat6xx.zip (Android 7.1.1)
- patch for CVE-2015-8966
- patch for Android 7.1.1. It's required to keep Wifi hotspot working
- vibration sensitivity configuration works
- updated selinux policy
- enforcing mode enabled

Known bugs
- offline charging gets stuck (remove battery to [re]boot) * does still charge
- video recording
- advanced reboot seems broken (device shuts down)
 
Last edited:

cvxda

Senior Member
Dec 31, 2010
882
2,307
Nürnberg
Thanks!
Observed some avc's on CM14.1 (like no audio when calling) CM14.1

The audioserver.te file looks good I think. Are the changes to cameraserver.te still required even with the patches from my pull request an hour ago?

As for "allow mdm_helper self:capability setuid;", I think this is not right. This ostensibly "fixes" the dac_override and dac_read_search avc's, but these only cover another permission problem, which is what actually needs fixing. I'd like to point out this blogentry on dac_override by Dan Walsh. That's why I didn't add that in my original selinux patch.

Does that actually fix something for you? I didn't see any noticable difference.


Thanks,
Corinna

---------- Post added at 10:57 PM ---------- Previous post was at 10:53 PM ----------

I'd recommend you use CM14.0, or CM13. CM14.1 is less tested, a.o. the external storage (SD card) does not work yet.

The external sdcard will work again with my latest patches. We still have to find out what's missing to allow haggertk's sdcardfs patches to work on our device.

Corinna
 

xamio

Senior Member
May 24, 2014
60
173
The audioserver.te file looks good I think. Are the changes to cameraserver.te still required even with the patches from my pull request an hour ago?

As for "allow mdm_helper self:capability setuid;", I think this is not right. This ostensibly "fixes" the dac_override and dac_read_search avc's, but these only cover another permission problem, which is what actually needs fixing. I'd like to point out this blogentry on dac_override by Dan Walsh. That's why I didn't add that in my original selinux patch.

Does that actually fix something for you? I didn't see any noticable difference.

Ah, no doesn't fix anything for me, just saw it in the logcat, will revert it back then :)
Will take another look at cameraserver.te, changes might not be necessary either

The external sdcard will work again with my latest patches. We still have to find out what's missing to allow haggertk's sdcardfs patches to work on our device.

the klte kernel removed the Samsung implementation of sdcardfs
https://github.com/CyanogenMod/andr...mmit/8c3aef5cb070380db35437f107aa39925c3b2719
mybe it has something the do with that
 
  • Like
Reactions: ruchern

MGSGS

Member
Nov 28, 2013
34
6
23
Reims
Thanks!
Observed some avc's on CM14.1 (like no audio when calling)
maybe sepolicy/audioserver.te is also needed in cm13, didn't test though

http://ionkiwi.nl/archive/view/4/samsung-galaxy-s5--g901f--kccat6xx
cm-14.1-20161211-UNOFFICIAL-kccat6xx.zip (Android 7.1.1)
- patch for CVE-2015-8966
- patch for Android 7.1.1. It's required to keep Wifi hotspot working
- vibration sensitivity configuration works
- updated selinux policy
- enforcing mode enabled

Known bugs
- offline charging gets stuck (remove battery to [re]boot) * does still charge
- video recording
- advanced reboot seems broken (device shuts down)
Bluetooth seems broken

Sent from my SM-G901F running CM14.1 with Tapatalk
b2ce1f7a0a7011179152b5dbce470370.jpg
 
Last edited:

Stamgastje

Senior Member
Apr 8, 2011
274
128
@xamio: are there, besides the SELinux issues mentioned above, any known issues specific to CM14.1 (i.e. issues that do no exist on CM14.0/CM13)?

I understand that the sdcard issues is (partially) solved now?
 
Last edited:

xamio

Senior Member
May 24, 2014
60
173
Bluetooth seems broken

Yup Bluetooth is broken:
Code:
12-12 12:48:53.989  3830  3830 I WCNSS_FILTER: Init diag for BT log packets
12-12 12:48:53.991  3830  3830 E WCNSS_FILTER: init_transport: Unable to open /dev/ttyHS0: -1 (Permission denied)
12-12 12:48:53.991  3830  3830 E WCNSS_FILTER: unable to initialize transport /dev/ttyHS0
12-12 12:48:53.991  3830  3830 E WCNSS_FILTER: main: start_reader_thread returns: -1
12-12 12:48:53.984  3830  3830 W wcnss_filter: type=1400 audit(0.0:381): avc: denied { dac_override } for capability=1 scontext=u:r:wcnss_filter:s0 tcontext=u:r:wcnss_filter:s0 tclass=capability permissive=0
12-12 12:48:53.984  3830  3830 W wcnss_filter: type=1300 audit(0.0:381): arch=40000028 syscall=322 per=800008 success=no exit=-13 a0=ffffff9c a1=b6f121ec a2=20002 a3=0 items=1 ppid=1 ppcomm=init auid=4294967295 uid=0 gid=1002 euid=0 suid=0 fsuid=0 egid=1002 sgid=1002 fsgid=1002 ses=4294967295 tty=(none) exe="/system/bin/wcnss_filter" subj=u:r:wcnss_filter:s0 key=(null)
12-12 12:48:53.984   312   312 W auditd  : type=1307 audit(0.0:381): cwd="/"
12-12 12:48:53.984   312   312 W auditd  : type=1302 audit(0.0:381): item=0 name="/dev/ttyHS0" inode=10301 dev=00:0c mode=020660 ouid=1002 ogid=3008 rdev=f5:00 obj=u:object_r:serial_device:s0 nametype=NORMAL
12-12 12:48:53.984   312   312 W auditd  : type=1327 audit(0.0:381): proctitle="/system/bin/wcnss_filter"
12-12 12:48:53.984   312   312 W auditd  : type=1320 audit(0.0:381):

seems wcnss_filter can't open /dev/ttyHS0
 
Last edited:

nhx1992

New member
Apr 20, 2014
1
0
Anyone have any issues with the network and wifi? I can't seem to detect any network, let alone use data on my phone.

My wifi doesnt seem to be working as well, the connect button is grayed out on mine.
 

cvxda

Senior Member
Dec 31, 2010
882
2,307
Nürnberg
Yup Bluetooth is broken:
Code:
12-12 12:48:53.989  3830  3830 I WCNSS_FILTER: Init diag for BT log packets
12-12 12:48:53.991  3830  3830 E WCNSS_FILTER: init_transport: Unable to open /dev/ttyHS0: -1 (Permission denied)
12-12 12:48:53.991  3830  3830 E WCNSS_FILTER: unable to initialize transport /dev/ttyHS0
12-12 12:48:53.991  3830  3830 E WCNSS_FILTER: main: start_reader_thread returns: -1
12-12 12:48:53.984  3830  3830 W wcnss_filter: type=1400 audit(0.0:381): avc: denied { dac_override } for capability=1 scontext=u:r:wcnss_filter:s0 tcontext=u:r:wcnss_filter:s0 tclass=capability permissive=0
12-12 12:48:53.984  3830  3830 W wcnss_filter: type=1300 audit(0.0:381): arch=40000028 syscall=322 per=800008 success=no exit=-13 a0=ffffff9c a1=b6f121ec a2=20002 a3=0 items=1 ppid=1 ppcomm=init auid=4294967295 uid=0 gid=1002 euid=0 suid=0 fsuid=0 egid=1002 sgid=1002 fsgid=1002 ses=4294967295 tty=(none) exe="/system/bin/wcnss_filter" subj=u:r:wcnss_filter:s0 key=(null)
12-12 12:48:53.984   312   312 W auditd  : type=1307 audit(0.0:381): cwd="/"
12-12 12:48:53.984   312   312 W auditd  : type=1302 audit(0.0:381): item=0 name="/dev/ttyHS0" inode=10301 dev=00:0c mode=020660 ouid=1002 ogid=3008 rdev=f5:00 obj=u:object_r:serial_device:s0 nametype=NORMAL
12-12 12:48:53.984   312   312 W auditd  : type=1327 audit(0.0:381): proctitle="/system/bin/wcnss_filter"
12-12 12:48:53.984   312   312 W auditd  : type=1320 audit(0.0:381):

seems wcnss_filter can't open /dev/ttyHS0

I have a fix for that. I'm still looking into a couple other AVCs, but will create a pull request shortly.


Corinna

---------- Post added at 15:07 ---------- Previous post was at 15:05 ----------

I have a fix for that.

Meaning, bluetooth is back with this patch even in selinux enforcing mode, if that wasn't clear.


Corinna

---------- Post added at 15:09 ---------- Previous post was at 15:07 ----------

Anyone have any issues with the network and wifi? I can't seem to detect any network, let alone use data on my phone.

My wifi doesnt seem to be working as well, the connect button is grayed out on mine.

Both work for me.

Corinna

---------- Post added at 15:11 ---------- Previous post was at 15:09 ----------

Ah, no doesn't fix anything for me, just saw it in the logcat, will revert it back then :)
Will take another look at cameraserver.te, changes might not be necessary either



the klte kernel removed the Samsung implementation of sdcardfs
https://github.com/CyanogenMod/andr...mmit/8c3aef5cb070380db35437f107aa39925c3b2719
mybe it has something the do with that

Quite possibly. We should test this at one point.

Corinna
 
  • Like
Reactions: Ogeru and aelfinn

XenonCH

Member
Dec 8, 2016
11
0
Hello guys,

Wanted you to update on my installation. Thanks for all the hints and advises!

Mate, your Baseband version is too old.

To run Marshmallow and above recommend baseband to use is CPE1 and above.

Download it from here and flash it with Odin:

Modem: https://androidfilehost.com/?fid=24533103863138635
Bootloader: https://androidfilehost.com/?fid=24533103863138634
.

Thanks for the links. I meanwhile flashed several Bootloader and Modem versions. With mixed results.
CPHA: Android (CM14) seemed stuck during boot, maybe problem with that version, maybe I was too impatient (I kept it booting for at least 3 min)
BOH4: Immediate reboots whenever I selected Wifi in the Android setup (tried it at least 3x)
CPE1: No issues

Does it work as root?
Corinna

No, it was the same as root. It turned out I needed to reboot my Linux workstation completely (wow, that rarely happens ;) ) in order that the device was recognized in adb. However as I see most tutorials and hints point to Odin, I am just using Odin on Windows in this case now.

So now I successfully installed CM 14 from cm-14.0-20161208-UNOFFICIAL-kccat6xx.zip. FYI I experienced problems with todays OpenGApps Stock (open_gapps-arm-7.0-stock-20161211.zip). During the Android setup right after the "Tap and Go" window, Google Play services crashed every time which led me back to the WiFi selection. It was a loop, it happened always after Tap and Go.
I then tried a new install of CM14 (same zip as above) and GApps mini (open_gapps-arm-7.0-mini-20161211.zip) and got no problems with that.

Trying out CM14 now :)

Thanks guys!
 

robhug

Senior Member
Jun 16, 2016
1,075
401
24
Lausanne
Hello guys,

Wanted you to update on my installation. Thanks for all the hints and advises!



Thanks for the links. I meanwhile flashed several Bootloader and Modem versions. With mixed results.
CPHA: Android (CM14) seemed stuck during boot, maybe problem with that version, maybe I was too impatient (I kept it booting for at least 3 min)
BOH4: Immediate reboots whenever I selected Wifi in the Android setup (tried it at least 3x)
CPE1: No issues



No, it was the same as root. It turned out I needed to reboot my Linux workstation completely (wow, that rarely happens ;) ) in order that the device was recognized in adb. However as I see most tutorials and hints point to Odin, I am just using Odin on Windows in this case now.

So now I successfully installed CM 14 from cm-14.0-20161208-UNOFFICIAL-kccat6xx.zip. FYI I experienced problems with todays OpenGApps Stock (open_gapps-arm-7.0-stock-20161211.zip). During the Android setup right after the "Tap and Go" window, Google Play services crashed every time which led me back to the WiFi selection. It was a loop, it happened always after Tap and Go.
I then tried a new install of CM14 (same zip as above) and GApps mini (open_gapps-arm-7.0-mini-20161211.zip) and got no problems with that.

Trying out CM14 now :)

Thanks guys!
No problem noticed with bok2 bootloader and modem (lollipop) on cm14.1
 

robhug

Senior Member
Jun 16, 2016
1,075
401
24
Lausanne
Could not find BOK2 version. But CPE1 is newer anyway, am I correctly assuming this?
Is there anywhere an official (or semi-official) release page to see a history of the versions?
Yes cpe1 is marshmallow. But you can find everything you need at Android file host website ( just search g901f and cpe1 or bok2 or what you need ) but I said that because people who are on bok2 doesn't need to upgrade to cpe1
 

HuKu52

Member
Jul 11, 2012
33
11
LiveDisplay cm14/cm14.1

settings in this section of display settings don't get realized, color temperature etc,
 

Stamgastje

Senior Member
Apr 8, 2011
274
128
When I installed CM13 on my phone (one of the ROM versions created by @sktjdgns1189), my WiFi MAC address has changed from the original (a8:7c:01:94:4e:0c) to a new one (c0:bd:d1:74:a5:a0).

I never paid much attention, but when browsing my EFS partition today, I noticed that the file /efs/wifi/.mac.info still contains the original MAC address, which is a8:7c:01:94:4e:0c.
Somehow, the kernel of this ROM (I'm now at @xamio's CM14.0 ROM from Dec. 5) ignores the original MAC. Does anyone know how I can fix this?

(Strangely enough, the Bluetooth MAC address matches what is stated in the file /efs/bluetooth/bt_addr: a8:7c:01:94:4e:0b.)
 

girtsn

Senior Member
May 15, 2005
162
38
14.1-20161211
baseband and modem CPH3
a lot of good things like the boot time (really amazingly quick)
but some issues to be expected
* the biggest issue by far is unstable LTE / network connection - could this have to do with the modem version CPH3?
** often there is no network available / LTE with a small cross after switching towers, and it does not refresh, not even with airplane mode on & off, restart is the only option then
** quite often it puts a small cross on LTE, while network is actually working
* system datetime seems to be reset to 2014.01.06 on restarts which causes application errors, alarms to go off e.t.c. when the time is put in sync again, this is easy to note when there is a connection error :)
* sometimes switching on airplane mode causes a freeze and a following restart
 

Top Liked Posts

  • There are no posts matching your filters.
  • 47
    logo.png

    CyanogenMod 13 for Galaxy S5 4G Plus​

    /* Info */

    CyanogenMod 13 build for Galaxy S5 4G Plus.
    This Project is WIP Project.
    If you can help me, please contact to me.
    E-mail : nsh1189@gmail.com

    /* Disclaimer */

    Your warranty is now void.
    I am not responsible for bricked devices, dead SD cards,
    thermonuclear war, or you getting fired because the alarm app failed. Please
    do some research if you have any concerns about features included in this ROM
    before flashing it! YOU are choosing to make these modifications, and if
    you point the finger at me for messing up your device, I will laugh at you. Hard. A lot.

    /* Supported devices */

    Galaxy S5 4G Plus [SM-G901F]

    /* Unsupported devices */

    Everything else from supported devices

    /* Downloads */

    http://fsrv1.sayanogen.com/KCCAT6-13/

    /* Contributions */

    @arter97
    @skvalex

    /* Donations */

    Donate to @arter97 : http://xdaforums.com/donatetome.php?u=4898097
    Donate to @skvalex : https://callrecorder.skvalex.com/buy/howto.php
    Donate to me : http://xdaforums.com/donatetome.php?u=4114162

    /* Fund Raiser */
    Fund-raising was done.
    - Donation use history -
    All Donation : $500
    Fund-raiser Commission : -$40
    Device : -$460
    Shipping : -$18
    Surtax : -KRW 50,800 ($50)
    Thanks.

    /* Open Source */
    https://github.com/sktjdgns1189

    XDA:DevDB Information
    [ROM][G901F][6.0.1] UNOFFICIAL CyanogenMod 13 for Galaxy S5 4G Plus, ROM for the Samsung Galaxy S 5

    Contributors
    sktjdgns1189, arter97, skvalex
    Source Code: https://github.com/sktjdgns1189

    ROM OS Version: 6.0.x Marshmallow
    ROM Kernel: Linux 3.10.x
    ROM Firmware Required: Stock Lollipop
    Based On: CyanogenMod 13

    Version Information
    Status: Beta

    Created 2015-12-29
    Last Updated 2016-01-26
    21
    (Below a summary of the information that was posted in this thread from page 100 onward. Last update: Jan. 8, 2017.)

    Lineage OS (and related) ROMs for the Samsung Galaxy S5 Plus (SM-G901F / kccat6)

    This post provides an overview of Lineage OS ROMs for this phone, as well as its predecessor (CyanogenMod) and a derivative (Resurrection Remix).

    Lineage OS (and CyanogenMod)

    The Lineage OS ROM (14.1) is maintained by @xamio and the latest builds are available here: http://ionkiwi.nl/archive/view/4/samsung-galaxy-s5--g901f--kccat6xx.

    The Lineage OS ROM now has its own thread, so please have a look there for the latest info.

    History and older builds (CyanogenMod)
    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/

    Resurrection Remix

    Resurrection Remix is a distribution that is based on Lineage OS (previously CyanogenMod), but adds its own customizations.
    These ROMs (RR 5.7, 5.8) are maintained by @cvxda (Corinna) and her builds are available here: http://cygwin.de/rr/kccat6xx/

    The Resurrection Remix ROM now has its own thread, so please have a look there for the latest info.

    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)

    Google Apps

    Google Apps packages can be downloaded here: http://opengapps.org/.

    (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!)

    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 (CPJ1) that is compatible for your device.

    Where do I find these images?
    The binaries can be downloaded here (versions BOH4, BOK2, CPE1, CPH3) and here (version CPJ1).
    (Note that modem CP_G901FXXU1CPHA.tar.md5 that can be downloaded via the first link is not version CPHA, but CPH3.)

    How do I flash these images?
    1. Boot the phone into download mode (power off the phone and then press and hold the Power + Home + Volume Down buttons)
    2. Start the Odin tool (download here)
    3. Select the images (CP = modem, BL = boot loader)
    4. Enable (only) these options: 'Auto Reboot' and 'F. Reset Time'.
    5. Flash the images

    Recovery

    It is recommended to use TWRP recovery v3.0.2-0 or later. You can download it from xamio's site, or from cvxda's site.

    Note:
    When restoring Nandroid backups with TWRP may result in com.android.phone constantly crashing. The root cause is known: recent versions of the ROMs set SELinux to enforcing, and some of the security contexts on the /data partition are missing/incorrect after restoring the backup image. To fix this, run 'restorecon -R /data' (manually) from TWRP recovery, immediately after restoring a Nandroid image (so before booting Android), to restore these contexts. Hopefully this will be automated in future versions of TWRP.

    Further information

    If you're new to flashing custom ROMs on this phone, I can recommend you to have a look at this nice tutorial. It explains, step-by-step, how to flash the recovery, modem and bootloader images, and finally the ROM on your phone.

    Known limitations / issues

    Below a list of (previous and current) known issues and limitations.

    Unless stated differently, these issues and limitations apply to all ROMs listed above.
    Note that RR 5.7.x ~ CM 13 and RR 5.8.x ~ CM/LAD 14.1, so these ROMs have (had) the same issues.

    Wireless:
    • cellular data connection unstable (data drops), on certain cellular networks only (in particular, T-Mobile/Telekom, EE, O2 and Proximus) --> fixed (>= 2016-12-29)
    • wrong MAC address is used (real one in /efs/wifi/.mac.info is ignored) --> fixed (>= 20161226)
    • screen casting (miracast) does not work --> fixed (>= 20161226)

    Camera:
    • picture distorted --> fixed (CM13 >= 20161003; CM14.x >= 20161113)
    • starting the camera sometimes takes a long time --> fixed (>= 20161226 *)
    • the camera sometimes stops working (can't connect to the camera); e.g. using the flash may kill the camera --> fixed (>= 20161226 *)
    • recording does not work --> fixed (>= 20161226 *)
    • video playback distorted (during WhatsApp call)

    * The Dec. 26 build reverts the camera app to "camera2" which re-enables using the flash and taking videos. Note that the Google Camera app (GoogleCamera) is buggy, see e.g. this bug report.

    Sensors:
    • fingerprint sensor not working --> fixed (>= 20161127)
    • other sensors not working --> fixed (>= 20161204)

    Various:
    • SD card not working on CM14.1 --> fixed (>= 20161211)
    • vibrator intensity cannot be adjusted --> fixed (>= 20161130)
    • SElinux not enforcing --> fixed (>= 20161213)
    • LiveDisplay not working on CM14 --> fixed (>= 20161226)
    • offline charging gets stuck (battery must be removed to reboot) --> fixed (>= 20170101)
    • advanced restart options (e.g. reboot to recovery) don't always work
    • trying to open Call barring settings crashes com.android.phone and causes the phone to reboot

    Acknowledgement

    Many thanks to @sktjdgns1189, @xamio and @cvxda for creating and improving these ROMs!!!
    20
    Sorry Guys,
    I have very busy days by university.
    After the exam, I'll fix some bugs and build new ROM.
    Thanks. :)
    16
    New build is uploaded and server is working now.
    Thanks.
    16
    Build Fail.
    I'll try fixing build error.
    And guys, this is just my hobby.