yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy Note 8 Questions and Answers] Kalm_Traveler:
I posted this in TEKHD's thread in hopes that someone there will see it but it really applies to us Note 8 N950N users so here it is for you guys as well. I ended up switching back to my earlier stock-ish nandroid trying to figure out why my LTE signal and data rates were awful and it seems something with the EFS partition had gone awry so the nandroid fixed it.

Anyhow, I am back to work on once and for all getting the N variant to work. I started from scratch and made a new patch last night. IMS registers everything, VoLTE works with the stock kernel. Oddly the VoLTE icon stays on even when connected to wifi. Wifi Calling menu options are now there, but mine still just stays on enabling, though it did briefly flash to REG99 (I think might have been REG90) connection error last night, which usually means your E911 address in T-Mobile account isn't set. I reset it though, still no dice.

----------

Big update and still need some help.

Firstly, CSC is not chip specific, you can use Exynos on Snapdragon, and vice versa.

Second, mimicking this pack for a Note 8 works perfectly (with Snapdragon USA Note 8 file replacements) for the F variants. I flashed an F-based ROM on my 950N and with this pack everything worked immediately (wifi calling, volte, rcs, video calling, hd voice, etc).

However, I want to figure out what is missing between the F and N models to make a patch that will work for N variants as well. To that end I ran a compare against the contents of /system/ for the 950F ROM and my stock 950N ROM and found a bunch of additional files that the F has over the N as follows:

/system/app/

EpdgService (this is directly referenced in the TmoWfcPref.apk)

ESEServiceAgent (I think this is just something with NFC)

FBAppManager_NS

vsimservice

/system/bin/

eris

/system/etc/

/epdg/Certification/TMB/ca.crt

appmanager.conf

epdg_apns_conf.xml

eris.conf

ipsecdebug_filter.txt

mapconprovider.xml

/system/framework/

EpdgManager.jar

/system/lib64/

liberis_strongswan.so

liberis_charon.so

liberis_simaka.so

--------------------------------

I made a new zip that put those all into place with the proper permissions and I'm getting IMS registered for everything but WiFi Calling still won't connect. It is in the menu now, but still sits on Enabling. Last night it very briefly switched from Enabling to "Error - REG99" I believe, but it flashed away back to Enabling so it might have been REG90. In any case, this doesn't happen with a 950F ROM so I'm guessing some file or setting(s) still need to be looked at and really hope someone will see this to give some suggestions or pointers on where to look now.

I ran a compare on the build.prop and every .conf file that seemed to have anything to do with network, telephony, ims, wifi, or wifi calling etc and have not found anything that wasn't identical there.
[Samsung Galaxy Note 8 Questions and Answers] iraqgsm:
Thanks a lot, i know you are still trying to figure out how to fix it, whenever you have time can you edit your file for the ATT please.

Thank you
[Samsung Galaxy Note 8 Questions and Answers] Kalm_Traveler:
I can make an AT&T version for you in about 5 minutes, but I don't know if they require any special libraries different than the T-Mobile version of wifi calling. Also, from reading the forums here you will need to have AT&T provision your Note 8 for VoLTE and wifi calling.
[Samsung Galaxy Note 8 Questions and Answers] Kamikaze_Ice:
I've changed the files on my end for AT&T (set update-binary to ATT, copied "\system\omc\ATT\etc" contents to "system\etc", replaced "\system\omc\sales-code.dat" with "\system\omc\ATT\etc\sales-code.dat").

Everything seems to work (all options available), but I can't really confirm if everything works as AT&T is being an asshat.

I can't even get my HTC One (M8) to work properly on their network, which was purchased at their main store here in town, and all results on my Note 8 match my HTC One (M8).

LTE connection is absolutely terrible, ~2.5mbps average speedtest (max was 5mbps!!). I hate dealing with people in person or over the phone, but it looks like I'll have to make a visit to the main store again and possibly get a new SIM.

I don't know if i should bring my HTC One (M8) or my Note 8 + HTC SIM. If I bring the Note 8 my fear is that they wouldn't Provision it for these features because it doesn't have their tramp stamp (read: not bought from AT&T).

I simply wanted to mention that if you use this and have bad results it's highly likely to be AT&T's fault and not Kalm_Traveler's fault.

:highfive:
[Samsung Galaxy Note 8 Questions and Answers] iraqgsm:
will really appreciate if anyone can upload a file as I'm getting errors when I want to flash the zip (error 255)

] thank you for your work

---------- Post added at 09:28 AM ---------- Previous post was at 09:27 AM ----------
[Samsung Galaxy Note 8 Questions and Answers] xxx42069:
Hey man, just thought I'd report that all is working fine for me. Not sure why you're getting slow speeds. I'm getting 15-20 megs download and 5-10 upload. Not great, but certainly not slow. I also live in a remote area known for slow speeds and bad reception so it's actually surprising that it's doing so well for me. Hope you get it sorted out. I'm loving it, this was exactly what I was looking for and I am super grateful to have it.
[Samsung Galaxy Note 8 Questions and Answers] iraqgsm:
I managed to overcome the installation, not all the csc features activated as for the TMOBILE file
[Samsung Galaxy Note 8 Questions and Answers] Kalm_Traveler:
Thanks friend, the speeds you're getting are about as fast as I get on mine after a bit. When I first insert the SIM, if I do run the ookla Speed Test app within the first 5 minutes or so I can get 100-150mbps download or so, but after a few minutes suddenly speeds drop to 2-20mbps down even on the same server, with the same signal strength. I messaged T-Mobile to see if maybe they need to add the IMEI into their system or something, to provision it for super fast network speeds (though I am not sure anything needs to be done since VoLTE works out of the box, and on the 950F ROMs with my CSC pack WiFi calling works out of the box too).

that's correct, the pack was originally made just for T-Mobile so the extra CSC features are only in that TMB folder. Since so many people keep requesting it I will be making my final version of this pack have both T-Mobile and AT&T CSCs included and use the same others.xml CSC features file.

As soon as I can figure out what in the world is different between the 950F and 950N firmwares so I can properly patch the 950N to work with T-Mobile's wifi calling I will release a final version of the pack.
[Samsung Galaxy Note 8 Questions and Answers] Kalm_Traveler:
Dug around between the 950N and 950F again tonight and found a few more things to try swapping over, including all the dialer/telephony/telecom apps, IMS apps and wifi configuration. Flashed them on and rebooted. No change.

I'm wondering at this point if perhaps wiping /data/ is necessary, as there isn't really much left to check between the ROMs, but I would have expected wifi calling to start working once everything was in place. A quick check between the rest of the folders in the system directory looked as though for the most part the files are identical between the two, so either I just need to factory reset to reload /data/ with the additional files, or there is some tiny other thing I'm missing.
[Samsung Galaxy Note 8 Questions and Answers] Kalm_Traveler:
Just a reminder I should have the Note 5-based zip ready to go tomorrow night, just been swamped between work + school this week so I couldn't put it together. I'll test it myself first and if everything seems fine I'll put it up with a link.
[Samsung Galaxy Note 8 Questions and Answers] masri1987:
Hoping for the best
[Samsung Galaxy Note 8 Questions and Answers] jooniloh:
So..... got another weird thing. Just checked my CSCs today (I noticed that I have the shutter toggle in camera as usual with TMO csc but for some reason, it always stays on, no matter how I change it. If I set it off, go out of camera settings, and go in again, it's on still.) and found something fun. My Original CSC and Active CSC are both TMO but my Firmware's CSC is BTU. Any idea how the heck this happened? What is BTU even?
[Samsung Galaxy Note 8 Questions and Answers] Kamikaze_Ice:
I gave up trying to make sense of anything Samsung does (ex: region locked devices that need 5min total call within that region and carrier towers, or those loosing OEM Unlock and need to wait 7 or so days for it to show back up again).

Mine arrived as SKC/SKC/SKO, so active CSC was SKC, which is part of the SKO CSC region.

From my searching what I understood is that you can't change to another CSC if it's already on the device. If this is correct, then what I mean is that I couldn't switch from SKC to KTC as both are part of the SKO CSC which is already on the device. The bootloader(?) does a verification check that compares differences between the "last known good" backup that is made every boot cycle, to the currently active CSC (this includes any CSC flashed during last boot cycle). If they contain the same CSC, even if files are different, then the device simply reuses the "last known good" backup and ignores anything the "stupid human" did to protect them from harming the device.

Another thing, apparently the device should automatically picks out the "best" CSC at the first initialization screen (possibly determined by the SIM card???).

Again, that's just my understanding from about 15 minutes of searching which is not substantial enough to agree or disagree with.

However this behavior would explain the numerous posts I saw from others where the CSC (XXX/XXX/xxx) would not change to what they flashed.
[Samsung Galaxy Note 8 Questions and Answers] Kalm_Traveler:
my first two attempts at dirty-flashing on top of my weird combo didn't work so I deep Odin-reset back to full N950N stock tonight and will keep crackin on this tomorrow. I also had a hunch that perhaps the CSC itself doesn't need to be replaced.

In researching, I found that others.xml overrides anything in the csc_feature.xml and csc_feature_network.xml files so I want to try just adding a T-mobile others.xml along with the necessary apps. Would certainly make things cleaner, and pretty straightforward to swap back to stock without having to flash anything.
[Samsung Galaxy Note 8 Questions and Answers] Kalm_Traveler:
Hmm Odin didn't write the bootloader. I'm still on the F one.

Are we sure that Odin will overwrite it?
[Samsung Galaxy Note 8 Questions and Answers] Kalm_Traveler:
I'm holding off with the (hopefully) final CSC zip until I'm 90% sure it's perfect, but tonight I was able to make the modified 950N boot image but it won't seem to actually flash. I converted it into a .tar.md5 and Odin pretends to flash it successfully but when I reboot it keeps just sending me into TWRP.

Also, I realized that Iron Kernel is overwriting the boot image with a 950F version as well which further doesn't help anything since the whole point of this is to leave as much N in place as possible.

I knew something was fishy because if you use an N ROM with the F boot image, the icons are microscopically small, but with stock N boot image they are normal size.

Should add that I just realized TWRP can flash boot images and recovery images. I tried that for my 'hybrid' N and it still kept booting into recovery, then I tried the stock N and it just hangs at the Galaxy Note8 boot screen....

*EDIT*

Ok I definitely for sure am back on full stock N950N including the boot image. After flashing my modified boot image, then the stock one, then Odin flashing the AP again (since it contains boot.img) I have the normal size icons, no more init.rilepdg.rc in the root, and the default.prop in root is from the N950N boot image's RAMdisk.

At this point I'm not sure what the smartest thing to do is so any suggestions would be appreciated.

Basically I see a few considerations - all the ROMs and kernels are being made with N950F sources, so pretty much no matter which way we go we're going to end up having to flash N950F stuff. The kernels are within the boot.img so if a person wanted an SELinux permissive kernel, you'd end up overwriting the modified RAMdisk anyway. If we flash any of the ROMs they all seem to be developed with the 950F dual-SIM base.

While I am still pretty confident that I can patch the N variant to get T-Mobile wifi calling working, I'm starting to wonder if there's much of a point to it since all the real development is being done with 950F firmware.

Thoughts?
[Samsung Galaxy Note 8 Questions and Answers] gundal:
I have compiled the N kernel from stock sources (I actually filed the initial OSRC request for them to publish the N sources), and can help you with any issues you might be having.

http://opensource.samsung.com/reception/receptionSub.do?method=sub&sub=F&searchValue=SM-N950N

The ramdisk from the N can be used with any kernel that is out there and being developed for the F, just unpack their boot.img, grab the zImage file and pop that into an N ramdisk (thats patched to remove dm-verity) and then you have the custom kernel with our ramdisk, if the source of the problem is actually missing from the built kernel, then we just need to clone the repo for ironkernel, or whatever F kernel, and use the defconfig for the N device and rebuild their sources for the N.

Not too complicated for any, and I'd be happy to show you, one day, if you are interested

To put it in the most relevant terms.. any kernel that is created for us by a dev on xda, the sources and changes (that are compiled) are strictly in the zImage file. Everything else inside the boot.img is part of the ramdisk, we can very easily play around and make freak combos ;) of any ramdisk with any kernel, (granted some ramdisks a kernel dev released may have certain init scripts that must be run and thus may not work if not accounted for, but everything in the boot process is traceable and readable its just bash scripts etc)
[Samsung Galaxy Note 8 Questions and Answers] Kalm_Traveler:
That's awesome! Yes actually if you have time later this week I would appreciate it.

I think the issue I'm running into is not knowing the proper way to flash a modified boot.img after repacking.

Via WinMerge comparing the contents of the N and F boot images, the only real differences in the RAMdisk were the lack of the EPDG init file on the N (no surprise since we lack EPDG binaries as well as several other underlying bits in the system folder for wifi calling) and the functions inside init.rilcarrier.rc I believe. The N sets some tcp parameters and runs something called diagknight where the F runs something called redsocks (could be mistaken on the name) instead. That one does exist in the N firmware though.

One thing I want to eliminate from the N is settings for DMB since it doesn't even work outside Korea so the app is worthless. It has settings in one of those init files on the N.
[Samsung Galaxy Note 8 Questions and Answers] gundal:
What was the issue you were having with flashing after repacking?

You can flash an img in twrp directly to boot or recovery partitions.

If that isn't working, just look at the installer script from any custom kernel, aka ironkernel,

should be something like

dd if=/sdcard/boot.img of=/dev/block/platform/11110000.ufs/by-name/BOOT <- this was off memory so may not be correct, verify it first

also remember that magisk installer actually pulls your boot.img out, extracts it, modifies the ramdisk and puts back together the boot.img so it may be doing something unintended, although I believe it just verifies that it has been patched for dm-verity.. although I am really not sure havent read the magisk installer script.

I was looking at the same diff, they really are very similar, that eris in the init.rilepdg.rc,, and the DMB stuff is really the oinmly other diffs.. that stuff is here

https://github.com/gundal/greatlte/blob/stock/N950N/ramdisk/init.carrier.rc
[Samsung Galaxy Note 8 Questions and Answers] Kalm_Traveler:
ah I just couldn't get anything to flash properly. The repacking appeared to work properly but I tried flashing the modified file with TWRP, tried flashing the stock 950N file with TWRP, used a utility to convert the modified boot.img into a .tar.md5 and flashed with Odin, and none of them would boot up. With either of the forms of modified file the phone just kept booting into TWRP, and with the stock file it hung at the first screen (Galaxy Note8).

Finally I flashed the AP file through Odin and everything is working again.

I'm not sure if I need a different repack tool or something, as far as repacking and flashing any which way I did it acted like it worked properly.
[Samsung Galaxy Note 8 Questions and Answers] Kalm_Traveler:
on the CSC note,

I know that the S8+ TMB CSC didn't cause the garbage signal strength and CA issues that we see with the Note 8 TMB CSC, and after looking through the files repeatedly the only one I can't see what it's doing is TMB_keystrings.dat and per this thread it appears that this file definitely affects functions of the software.

My hunch is that this file contains something to do with the modem commands or something like this, which in turn gave us the craptastic LTE speeds and signal with my earlier 950U-based zips.

Since I didn't seem to have this issue with the S8+-based giant CSC mega zip, I can only assume that whatever it is doing is more compatible with our firmware and/or hardware, so I'm going to replace that file only, from the S8+ zip and try it. Alternatively I might grab the same file from my Note 5 since it has all the same family of hardware components.

However... still need a bootloader to initialize Eris for EPDG functions.
[Samsung Galaxy Note 8 Questions and Answers] jooniloh:
50000 years ago

Now
[Samsung Galaxy Note 8 Questions and Answers] Kalm_Traveler:
haha touche!

I mean... if we want an easy fix just flash an F-based ROM and the S8+ T-Mobile CSC. I definitely didn't have garbage LTE on that setup.

The goal here is to figure out exactly what differences need to be addressed between the F and N variants firmware, and then come up with an appropriate small ZIP file that we can flash to fix all the things.

Once I have a completely functional solution, it will be easy to keep it up to date as newer 950N firmwares are released by Samsung since we'll know exactly what needs to be modified/added. The bootloader mod isn't something that will need to change since it is the same across generations of hardware and OS versions, and I don't think that the CSC or wifi calling-related files will need to be updated either, but it will be good to have all the information available just in case.
[Samsung Galaxy Note 8 Questions and Answers] gundal:
Kalm.. do you have any idea..if simply moving the nv_data.bin from my note (5 or 7) to my note 8 /efs folder.. will my imei bemy note 7 or 5 imei??

I want to root my note 7 and pull my nv_data.bin if this will work, as I feel the only way I will get volte provisioned to my new note8 is if I am able to swap imeis.. otherwise my network keeps unprovisioning it.. and I dont want to crack open the bootloader on my note7 if i dont have to
[Samsung Galaxy Note 8 Questions and Answers] Kalm_Traveler:
That might work but I have never monkeyed around with IMEI stuff. I think we're not supposed to talk about that on XDA anyhow though?
[Samsung Galaxy Note 8 Questions and Answers] gundal:
Oh wasn't aware of that! I thought only certain countries has anything illegal around imei.

Anywhooo if you unpack a boot.img ..

Make no changes and then repack and then flash.. Does it work?

The rebooting to twrp means it couldn't find a valid boot img
[Samsung Galaxy Note 8 Questions and Answers] Kalm_Traveler:
well, I tried the boot.img pulled straight from the .tar.md5 and that one froze. I can try unpacking and repacking though when i get home tonight.
[Samsung Galaxy Note 8 Questions and Answers] gundal:
turns out there is no law against changing the imei or serial number of a mobile device in canada or in the united states.

both countries have bills.. to do just that, but neither has ratified them.

also under the circumstances, what I want to do with the imei would not even be illegal if these bills were indeed passed and made into law,

as the sole reasons are to deter from taking a blacklisted device and getting it to function again, or clonin an esn/imei combo and making free calls on someone elses bill.
[Samsung Galaxy Note 8 Questions and Answers] unimatrix725:
I suspect you might try nodding the /system/csc folder? I recall a month or so ago when still using my Note 4 Edge ,there was a csc zip. It may have been in Note 4 forum. Sorry if this has not helped or been discussed. Lots of work reading 40 pages w/ misc stuff.

PS: have u read this?

I also found a csc tool in threads also...

ww.xda-developers.com/xda-external-link/flashable-country-specific-code-csc-selection-tool-for-the-samsung-galaxy-s8/

More appropriate exynos stuff:

https://xdaforums.com/showpost.php?p=69864872&postcount=5484
[Samsung Galaxy Note 8 Questions and Answers] Kamikaze_Ice:
To give you a really basic TL;DR...

Yes Kalm_Traveler is already aware of tkkg1994's tool, which it's based off (a user in that thread discovered adding "greatlte" devices, aka Note 8, made WiFi calling work for them.)

His goal is to make a compatible csc for

N variant firmware AND/OR N based roms

, which needs a little (lol) more effort to work properly.

USA carriers are asshats and don't like to play nice with the rest of the class. That's why this thread, and the T-Mobile CSC thread, are so long.
[Samsung Galaxy Note 8 Questions and Answers] Kalm_Traveler:
I should have a new non-poor-LTE zip up this weekend, but you've given me an idea in the meantime.

Since all the CSC features files are encrypted or binary encoded on all Note 8 models so we can't just open them as plain text and see what they're doing I may flash the stock 950U tmobile CSC because with the CSC Features app you can see what is loaded. This way we can make sure that any mod pack contains exactly what is in there on the tmobile variant, without needing to use an encrypted file.

I will have to manually go through each feature line by line with the app then type it up on a computer but I think it will be nice to have in an unencrypted format.

Also I'm about 99% sure that replacing the TMB keystrings file with either the S8+ or Note 5 versions will solve the LTE signal and speed issues.

Basically what I need to do is get boot image patching to work (to add the EPDG init config file from the F variant), then confirm that my previous patch contained all the system files from the F or T-mobile U variants necessary for Tmobile wifi calling to function, and finally swap the keystrings file to confirm that was the cause of signal issues.

The only part I am unsure about is the boot.img patching since so far I can't even just swap boot images without needing to flash the whole AP tar.md5 In Odin to get the phone to boot up again.