FORUMS
Remove All Ads from XDA

Brought LTE functionality to vanilla LOS 14.1 on jfltespr / SPH-L720 - Questions!

38 posts
Thanks Meter: 13
 
By Nscreated, Member on 17th March 2018, 07:32 PM
Post Reply Email Thread
So I'm not really a developer, just a dilettante playing with Github and Repo. My goal was a stable Android Nougat on SPH-L720 with the latest ASB updates.

The Optimized LineageOS 14.1 by @side was great for a while but I wanted the benefit of bleeding edge LOS development. I compiled LOS using
Code:
breakfast jfltespr
but LTE didn't work. At first I thought this was because of APN problems, hence this stupid post. Please disregard that (although maybe re-enabling the APN menu would be a cool mod).

In fact it had nothing to do with APNs at all. So I focused instead on figuring out what was the secret sauce that JDCTeam put into their unified build that made LTE work so beautifully. So after searching their GitHub, I came across several mentions of Sprint in a file called init/init_jflte.cpp in their andoid_devices_samsung_jf-common respository. The official LOS repo of the same name doesn't have this directory at all.

So I made my own GitHub, forked official LOS andoid_devices_samsung_jf-common respository, and then downloaded-uploaded JDCTeam's jf-common respository into a new branch and did a comparison, which you can see here: https://github.com/nscreated/android...jdcteam-cm14.1

CTRL+F "Sprint" and there was that pesky init/init_jflte.cpp again. OK, so maybe I can try merging this with my forked LOS? That can't work--that would be too easy. Well, I was right--there was also a bit of code to add to my BoardConfigCommon.mk.

So I made this branch, which is official LOS jf-common plus JDCTeam's init/ directory and the snippet added to BoardConfigCommon.mk.

I edited my roomservice.xml to replace the repo for jf-common with my customized one, and then did a
Code:
repo sync --force-sync android/device/samsung/jf-common/
I compiled it, and... IT WORKED. IT ACTUALLY WORKED. HOLY ****. I AM KING CONG.

OK, so here's my question. What exactly does init/init_jflte.cpp do, and if it works so well with the unofficial Optimized LOS, why isn't it in the official LOS jf-common repository?
The Following User Says Thank You to Nscreated For This Useful Post: [ View ] Gift Nscreated Ad-Free
 
 
17th March 2018, 07:41 PM |#2  
side's Avatar
Recognized Developer / Contributor
Flag Thessaloniki
Thanks Meter: 14,348
 
Donate to Me
More
hello mister.

the /init folder is the custom init source code we use to support all s4 variants.if u have some basic programming knowledge you can see that regarding the device bootloader , the init will load the specific properties to the system.prop/build.prop.

So the reason that your build works its because you have edited build.prop.

The real solution ?
Build for jfltexx and add the props from init file to your build.prop

less code-same result.Why didnt u just send me a pm :P ?

PS
my builds contains all the lineage code
The Following 3 Users Say Thank You to side For This Useful Post: [ View ]
17th March 2018, 09:24 PM |#3  
OP Member
Thanks Meter: 13
 
More
Quote:
Originally Posted by side

Why didnt u just send me a pm :P ?

I wanted to boast about my very small achievement.
The Following 3 Users Say Thank You to Nscreated For This Useful Post: [ View ] Gift Nscreated Ad-Free
18th March 2018, 04:02 AM |#4  
OP Member
Thanks Meter: 13
 
More
Quote:
Originally Posted by side

The real solution ?
Build for jfltexx and add the props from init file to your build.prop

less code-same result.

OK, I'm looking at things and I see what you're saying.

Thing is, I can build Lineage for jfltespr and its system.prop already seems to have almost all of the properties in the init file:

Code:
# system.prop for SPH-L720
#

# cannot take spaces
rild.libargs=-d /dev/smd0
rild.libpath=/system/lib/libsec-ril.so

ro.cdma.home.operator.numeric=310120
ro.cdma.home.operator.alpha=Sprint
ro.gps.set_privacy=1
ro.telephony.default_network=8
ro.telephony.get_imsi_from_sim=true
telephony.lteOnCdmaDevice=1
telephony.sms.pseudo_multipart=1
persist.radio.snapshot_enabled=1
persist.radio.snapshot_timer=22
persist.eons.enabled=false

ro.telephony.default_cdma_sub=1
But LTE doesn't work. So I have to think that something's missing.

There are a couple differences between JDCTeam's Init file and the official system.prop. There's this bit:

Code:
void cdma_properties(int sub,bool isSprint)
{
    
    if ( sub == 1 )
		property_set("ro.telephony.default_cdma_sub", "1");
    else
		property_set("ro.telephony.default_cdma_sub", "0");
	    
    property_set("rild.libpath", "/system/lib/libsec-ril.so");
    property_set("ro.gps.set_privacy", "1");
    property_set("persist.eons.enabled", "false");
    property_set("persist.radio.snapshot_enabled", "1");
    property_set("persist.radio.snapshot_timer", "22");
    property_set("telephony.radioAccessFamily", "cdma");
    if (!isSprint)
	property_set("telephony.lteOnCdmaDevice", "1");
    else {
	property_set("rild.libargs","-d /dev/smd0");
	property_set("telephony.lteOnGsmDevice","1");
	property_set("ro.telephony.default_network","8");
    }
}
I can find most of those properties in the official, but not the red bit. I wonder if that's the missing piece.

EDIT: Also, would it matter that the official lineage.mk has a different BUILD_FINGERPRINT and PRIVATE_BUILD_DESC than what is specified in the JDCTeam Init file? They seem to refer to different versions of Android.

Official:
Code:
    BUILD_FINGERPRINT="samsung/jfltespr/jfltespr:5.0.1/LRX22C/L720VPUGOK3:user/release-keys" \
    PRIVATE_BUILD_DESC="jfltespr-user 5.0.1 LRX22C L720VPUGOK3 release-keys"
JDCTeam:
Code:
        property_override("ro.build.fingerprint", "samsung/jfltespr/jfltespr:4.2.2/JDQ39/L720VPUAMDL:user/release-keys");
        property_override("ro.build.description", "jfltespr-user 4.2.2 JDQ39 L720VPUAMDL release-keys");
Post Reply Subscribe to Thread

Tags
lineageos 14.1 jfltespr official jdcteam
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes