whatawurst / android_device_sony_yoshino-common

This is the Android device configuration for the yoshino platform
10 stars 48 forks source link

IMS/VoLTE not working #56

Closed Flamefire closed 2 years ago

Flamefire commented 2 years ago

@shank03 I and other users have issues using VoLTE (see https://forum.xda-developers.com/t/rom-lineageos-17-1-18-1-unofficial-update-2021-09-18.4308295/page-10#post-85850807). The setting isn't even shown although the IMS settings are enabled in XPeriaParts:

I found the check in Enhanced4gLtePreferenceController.java: getAvailabilityStatus and printed the values:

So the only wrong value is isImsServiceStateReady.

Any ideas/suggestions on how to debug this? Asking you because you implemented the IMS toggle and might know where to look for issues.

shank03 commented 2 years ago

All I did was handle the flashing of right modem through either carrier config or/and customisation ID.

If any issue is occurring, then it's carrier config.xml overlay file.

PS: that IMS feature settings doesn't enable IMS, it attempts to enable IMS using combination of carrier config and right modem. There maybe at times where user have to manually select modem to get IMS working, although that's not the case here.

For IMS to properly work:

Flamefire commented 2 years ago

So how do I check/debug what is wrong?

derfelot commented 2 years ago

Check wether you mcc/mnc are correctly mentioned here: https://github.com/whatawurst/android_device_sony_lilac/blob/a9a069901af7929815734065c31b0152b22ec903/rro_overlays/CarrierConfigOverlay/res/xml/vendor.xml#L353

Flamefire commented 2 years ago

I found this in the logcat:

KeyguardUpdateMonitor: SubInfo:{id=2, iccId=894922721[] simSlotIndex=0 carrierId=1454 displayName=winSIM carrierName=winSIM nameSource=4 iconTint=-16746133 mNumber= dataRoaming=0 iconBitmap=android.graphics.Bitmap@bfdb341 mcc 262 mnc 07mCountryIso=de isEmbedded false nativeAccessRules null cardString=894922721[] cardId=-1 isOpportunistic false mGroupUUID=null mIsGroupDisabled=false profileClass=-1 ehplmns = [26203, 26207] hplmns = [26203, 26203] subscriptionType=0 mGroupOwner=null carrierConfigAccessRules=null}

So this is https://github.com/whatawurst/android_device_sony_lilac/blob/a9a069901af7929815734065c31b0152b22ec903/rro_overlays/CarrierConfigOverlay/res/xml/vendor.xml#L358 if I'm not missing anything. Or to be exact as I'm using my 17.1 branch myself: https://github.com/Flamefire/android_device_sony_lilac/blob/ade8d15324abb4cde7f3a3cfa18aade709ef2090/overlay/packages/apps/CarrierConfig/res/xml/vendor.xml#L358

derfelot commented 2 years ago

that's weird. assuming your provider works fine with this modem, then everything should be in place.

you could try to set these props in /vendor/build.prop to override and see if that helps:

persist.dbg.volte_avail_ovr=1
persist.dbg.vt_avail_ovr=1
persist.dbg.wfc_avail_ovr=1

By the way, does this work on stock?

Flamefire commented 2 years ago

@derfelot That property is only used in IMSManager::isVolteEnabledByPlatform and I already got "isVolteEnabledByPlatform: true" in my debug printfs. So I guess this won't work either. Currently trying to debug why IImsMmTelFeature binder = tm.getImsMmTelFeatureAndListen... in MmTelFeatureConnection.java returns a null value which then leads to the disabling of IMS/VoLTE

By the way, does this work on stock?

No idea. It's been ages since I switched to LOS. But a help page listed my provider and my phone as working with VoLTE so I'd assume it does

Flamefire commented 2 years ago

BTW: https://github.com/Flamefire/android_device_sony_lilac/commit/9c4b6acea6e42514fd620cb52e49f601b450516f actually disallows ENABLING the VoLTE feature. Check the is4gLtePrefEnabled which has && mCarrierConfig.getBoolean(CarrierConfigManager.KEY_EDITABLE_ENHANCED_4G_LTE_BOOL) That looks suspicious also semi-related to this issue.

derfelot commented 2 years ago

it's possible that the o2 mbn does not work with your provider, that's why i was asking if it works on stock at all.

you could try to manually select the ir51_ir92_ims_gte mbn and see if that works for you. this seems to be a somewhat generic modem config which works for some chinese carriers that are not supported on stock for example.

Flamefire commented 2 years ago

Any ideas on why you set that setting mentioned above? Will check that further once I got the basics up and running.

In the meantime: I traced the issue to the following:

Some relevant logcat output. Maybe you or @shank03 has some idea on what looks suspicious:

ImsServiceController: Granting Runtime permissions to:ComponentInfo{com.android.phone/com.android.internal.telephony.ims.ImsResolver} -- com.android.phone
DefaultPermGrantPolicy: Granting permissions to enabled ImsServices for user:0
ImsServiceController: Binding ImsService:ComponentInfo{com.android.phone/com.android.internal.telephony.ims.ImsResolver}
ImsSCStaticCompat: startBindToService Intent { act=android.telephony.ims.compat.ImsService cmp=com.android.phone/com.android.internal.telephony.ims.ImsResolver } binder: false

(last one is from me with out of binder != null)

With ir51_ir92_ims_gte I see the same. Can't test on stock unfortunately. But as mentioned it should work according to info on the internet.

My current best bet is really that there is some service missing. I.e. something which has this in the manifest: https://source.android.com/devices/tech/connect/ims#service_definition

Edit: Just seen that I included https://github.com/whatawurst/android_device_sony_yoshino-common/commit/4df819eccc47f56332070a32afb746e1dd9bf427 which I included as https://github.com/Flamefire/android_device_sony_yoshino-common/commit/e31d00b8921b1edcfb5754a560f291d260a3a440#diff-4ae9fbc69f2e616c14dec1ffb6177b9a2c1353068e4db1678564a3934fac22ee in my 17.1 builds. Checking if that changes anything...

derfelot commented 2 years ago

Can't test on stock unfortunately. But as mentioned it should work according to info on the internet.

No, just because a provider supports IMS doesn't mean it will work on every phone. And even if stock supports IMS on O2, it does not mean that it is supported for every provider on that network. This heavily depends on both the configs and the modem modifications provided by the phone.

Flamefire commented 2 years ago

I checked info about my exact provider: https://www.spickipedia.com/index.php/2018/winsim-volte-nutzen-so-klappts.html (in German). It specifically lists the XZ1C. So according to that info it is supported with my provider on this phone. Can't get any better info about that until I get a test phone I can reflash with the stock firmware and actually test it.

Flamefire commented 2 years ago

Damn it. It seemingly really was that. With a partial revert (https://github.com/Flamefire/android_device_sony_yoshino-common/commit/55f34bcb9856b5a84a2789e09ee5eafaa8a1aeb0) it now shows the option and I was wrong at https://github.com/whatawurst/android_device_sony_yoshino-common/issues/56#issuecomment-959819649 It indeed shows the option as "switched on" and "disabled" i.e. unchangeable.

So I guess all is fine at least for the 17.1 build.

BTW: I assume having that option and seeing it turned on is a good sign. Is there any way to test if VoLTE is actually used and working? I think I can just make a call but I'm not sure if Android silently falls back to non-VoLTE on issues.

derfelot commented 2 years ago

you can make a call with wifi off and lte on. if lte stays connected during the call, volte works. there should also be an "HD" icon showing on the call screen.

you can also try turning on wifi calling. then put modem on airplane mode, connect to wifi and make a call. it should work and show a wifi icon on call screen.

edit: you can also check the "phone information" screen. go to dialler and enter *#*#4636#*#* --> phone information. at the bottom you can see which ims features are provisioned. and in the top right menue you can check ims status. but the actual use cases are the ones i mentioned above.

Flamefire commented 2 years ago

Perfect thanks. It works :)