ananjaser1211 / FloydQ_Reports

BUG Reporting for Exynos8890 OneUI 2.0 Project
57 stars 7 forks source link

[Feature] Update CSC configs from newer Galaxy devices #297

Closed hmv47 closed 1 year ago

hmv47 commented 1 year ago

Describe the feature

My carrier enabled VoLTE last year. I got an OTA on my S22, which updated the CSC/IMS/CarrierConfig so VoLTE started working. I run latest release of Floyd on a S7 Edge. VoLTE works with a SIM from different carrier (one that officially enabled VoLTE starting Galaxy S8 back in 2017)

I wonder if it would be possible for you to port latest CSC/IMS/CarrierConfig from some of the latest Galaxy devices, like the S23 to the Floyd ROM?

ananjaser1211 commented 1 year ago

im not sure as updating CSC's from newer OS versions usually breaks things, if note 9 (or possibly note 10 with android 11, 12 is stretching it too far) has the CSC with VoLTE enabled you could take it out of the firmware and swapping the cscfeature_network.xml from it.

which CSC is it ?

hmv47 commented 1 year ago

SEB

ananjaser1211 commented 1 year ago

And which carrier ? from what i see in the note 9 csc we use in V7 the following have clauses to enable VoLTE

LT Omnitel EE Telia EE ELISA

hmv47 commented 1 year ago

LT Tele2. Here's a list of supported phone

Samsung Galaxy S22 serija
Samsung Galaxy S21 serija
Samsung Galaxy S20 serija
Samsung Galaxy Flip4
Samsung Galaxy Fold4
Samsung Galaxy Flip3
Samsung Galaxy Fold3
Samsung Galaxy Fold2 5G
Samsung Galaxy A03s
Samsung Galaxy A03
Samsung Galaxy A04
Samsung Galaxy A12s
Samsung Galaxy A13s
Samsung Galaxy A22
Samsung Galaxy A23 5G
Samsung Galaxy A32
Samsung Galaxy A33 5G
Samsung Galaxy A52 5G
Samsung Galaxy A52s 5G
Samsung Galaxy A53 5G
Samsung Galaxy M12
Samsung Galaxy M31s
Samsung Galaxy M33 5G
Samsung Galaxy Xcover Pro
Samsung Galaxy Xcover Pro2
Samsung Galaxy Xcover 5

There's also this method but as far as I know it doesn't work on Android 9+

ananjaser1211 commented 1 year ago

Yeah this is a bit annoying as all these devices are either on android 12 and 13, their CSC's is not compatible with Android 10. i have gone and checked most recent N960F build but i dont see any csc changes in SEB compared to whats included in V7

possibly what you can try doing is backing up this file first

system/odm/etc/omc/SEB/conf/customer.xml

then replacing it with this file

customer.zip

this is customer.xml from SEB csc from the galaxy S20

i dont have others downloaded yet. comparing files this seems to remove some network locks. so give it a try

i do not see any references to LT Tele2 in apns-conf

Alternative if this did not work is editing the original customer.xml

at the bottom above this section

</IMSSetting>

try adding

  <Setting>
    <NetworkName>LT TELE2</NetworkName>
    <Version>3.0</Version>
    <EnableIMS>true</EnableIMS>
    <VoLTE>
      <EnableVoLTE>true</EnableVoLTE>
      <EnableVoLTEindicator>true</EnableVoLTEindicator>
      <EnableVoiceoverWIFI>true</EnableVoiceoverWIFI>
      <EnableVideocall>true</EnableVideocall>
      <EnableVoLTEindicator>true</EnableVoLTEindicator>
      <Voice_Domain_Preference_EUTRAN>imspsvoicepreferred</Voice_Domain_Preference_EUTRAN>
      <Emregencycall_Domain>ps</Emregencycall_Domain>
      <SRVCCversion>10</SRVCCversion>
      <SS_Domain_Preference>ps_only_volteregied</SS_Domain_Preference>
      <SS_PS_Control_Preference>xcap</SS_PS_Control_Preference>
      <SS_CSFBwithIMSerror>true</SS_CSFBwithIMSerror>
      <USSD_Domain_Preference>pscs</USSD_Domain_Preference>
      <EnableSMSoverIP>true</EnableSMSoverIP>
    </VoLTE>
  </Setting>

i copied this from another VoLTE config in another SEB carrier

hmv47 commented 1 year ago

Unfortunately, neither solution worked. It does seem that actual IMS configs are hard-coded in imsservice.apk, so it's not that easy to add a new provider. I will try this method, both on stock Oreo and this ROM and report if it works.

hmv47 commented 1 year ago

So, long time no see, I managed to do it. I did in on Oreo stock but should be the same until Android 12. It's hard to explain all the changes here, so I basically created myself a GIT repository and did all changes in a PR for easy viewing - here. In short, what was needed to do:

After that, it is needed to re-generate all IMS settings, easiest way is to delete everything in /data/user_de/0/com.sec.imsservice/shared_prefs and restart the phone.

Testing can be as simple as making a call and checking that LTE works, or using this app to launch IMS settings image

So it now works. Yet it also made it clear to me just how much VoLTE implementation sucks.

ananjaser1211 commented 1 year ago

Thank you for the excellent guide, i have pinned this incase anyone in the future also needs to update APNs, and yes the VoLTE implementation is horrible.

I should mention that the most recent security patch released for the note 9 is dated March 2023, firmware N960FXXSAFWB3 but after inspecting the files you modified, there are no new entries for LT Tele 2 sadly, only bunch of changes for Malaysia, i dont get why ims is not an updatable apk that adds new apns/settings as they come, this feels very wrong to lock it behind firmware updates. but oh well

good job figuring it out! i wouldn't have