[Xperia Z5 Q&A, Help & Troubleshooting] nlra:
So, I've been experimenting further, and have discovered that most of the things included in this patch are not necessary in order to make VoLTE or Wi-Fi Calling work on the Xperia Z5 family.

These are the only things you need to do to enable VoLTE and Wi-Fi Calling on Z5:

Properties (setprop / build.prop / config.prop):

persist.radio.calls.on.ims=1 (needed for both)

persist.data.iwlan.enable=true (needed for Wi-Fi Calling)

persist.dbg.volte_avail_ovr=1 (enables VoLTE switch in Settings)

persist.dbg.wfc_avail_ovr=1 (enables Wi-Fi Calling switch in Settings and Phone app)

That's all! None of the other "prop"s that this patch adds to build.prop are needed. I suspect that VoLTE and WFC switches in Settings would also be exposed if you edited the appropriate XML for your carrier in CarrierConfig.apk, but setting persist.dbg.*_avail_ovr is way easier! :D

As implied above, modifying CarrierConfig.apk is not necessary.

Neither is adding or touching (if it exists on your ROM) imscmlibrary.jar. It is still not clear to me what the purpose of this framework/library is (I mean, it has "IMS" in the name, so it seems logical that it's related, but other than that...), but as far as I can tell, none of the 7.1.1 firmwares come with this file, and VoLTE and WFC both still work fine if you don't load this file onto your phone. It appears to exist in older Android versions (5.1 and 6.0.x both seem to have it; haven't yet tried to hunt down a 7.0 firmware to look at), but you don't need to replace or modify whatever version of it you already have in order for VoLTE to work.

On the Android side, besides setting the 4 "prop"s I already talked about, the

only

other thing you need to do is add an appropriate IMS APN. And since either "ims" as an APN name or APN types of "ims" (not sure which) are given special status somehow (can't manually create one, and any that are "active" are hidden), really the only way to do this is to add the APN details to apns-conf.xml and then reset all APNs to defaults in order to load it.

Once you have the persist.* properties set and the IMS APN defined, the final step is to create the appropriate config to be uploaded to the Qualcomm baseband. If Sony shipped a modem config file (MBN) with the Z5 firmware, then you can simply use the QuickShortcutMaker method to access the Xperia Modem Switcher, and select the appropriate modem config for your carrier. (If Modem Switcher does not appear, then *probably* you have Magisk installed...not clear what about Magisk prevents this from working, but Magisk Hide doesn't help, so you have to *completely uninstall* Magisk, run the Modem Switcher, and then *reinstall* Magisk. Yes, it's a pain.) However, if (like me) your carrier never supported VoLTE or WFC on the Z5 (or any other Xperia model), you're going to have to manually edit the NV variables in the baseband EFS to achieve the desired result. As I can attest, this will likely take you weeks of research, and trial & error...

But in short, you don't need to install the GreyLeshy patch. The 4 persist.* properties, modifying your apns-conf.xml, and then getting the right settings for your carrier into the baseband are sufficient. I have tried this on both Marshmallow 6.0.1 (32.2.A.5.11) and Nougat 7.1.1 (32.4.A.1.54), and these changes work for me 100% on both. (I tried Lollipop for grins, and haven't been able to get that to work yet for unknown reasons. Debug logs suggest it's an APN issue, but I haven't yet dug deep enough to know for sure.)

Still looking for detailed information about qp_ims_reg_config_db...Qualcomm engineers: call me. :cool:

-- Nathan