phhusson / treble_experimentations

Notes about tinkering with Android Project Treble
3.37k stars 659 forks source link

[pstar] VoLTE not configurable even after installing IMS APK. #2031

Open lss4 opened 2 years ago

lss4 commented 2 years ago

GSI: DotOS 5.1.3 (August) Device: Motorola Edge S/20 Pro (pstar)

My data plan supports 5G. On my previous phone VoLTE can be enabled after installing IMS APK, but not here.

Even after installing IMS APK, VoLTE does not show up in Mobile Networks configuration and the Phone Information secret menu shows VoLTE not provisioned, IMS status unregistered. In this state, the phone still needs to downgrade to 3G signal to make/receive phone calls.

Logcat shows the following messages regarding IMS, which looks like some kind of mismatch.

10-08 13:24:26.135  1953  2653 E QMI_FW  : qmi_cci_get_ref: ref count increased 2
10-08 13:24:26.140  1953  2153 E RIL-MOTEXT: qcrilUpdRegRAT, called , rat =7
10-08 13:24:26.149  3554  3742 W hw-Parcel: **** enforceInterface() expected 'vendor.qti.hardware.radio.ims@1.3::IImsRadioIndication' but read 'vendor.qti.hardware.radio.ims@1.2::IImsRadioIndication'
10-08 13:24:26.150  1953  2153 E QMI_FW  : qmi_cci_get_ref: ref count increased 2
10-08 13:24:26.151  3554  3742 W System.err: java.lang.SecurityException: HWBinder invocation to an incorrect interface
10-08 13:24:26.151  3554  3742 W System.err:    at android.os.HwParcel.enforceInterface(Native Method)
10-08 13:24:26.151  3554  3742 W System.err:    at vendor.qti.hardware.radio.ims.V1_4.IImsRadioIndication$Stub.onTransact(IImsRadioIndication.java:1327)
10-08 13:24:26.151  3554  3742 E android_os_HwBinder: Uncaught exception!
10-08 13:24:26.152  3554  3742 W hw-Parcel: **** enforceInterface() expected 'vendor.qti.hardware.radio.ims@1.1::IImsRadioIndication' but read 'vendor.qti.hardware.radio.ims@1.0::IImsRadioIndication'
10-08 13:24:26.152  3554  3742 W System.err: java.lang.SecurityException: HWBinder invocation to an incorrect interface
10-08 13:24:26.152  3554  3742 W System.err:    at android.os.HwParcel.enforceInterface(Native Method)
10-08 13:24:26.152  3554  3742 W System.err:    at vendor.qti.hardware.radio.ims.V1_4.IImsRadioIndication$Stub.onTransact(IImsRadioIndication.java:1241)
10-08 13:24:26.152  3554  3742 E android_os_HwBinder: Uncaught exception!
phhusson commented 2 years ago

uh that's pretty weird.

In lshal, do you see @.*** ? what about 1.4? 1.2?

If you see 1.2, 1.3 but not 1.4, you may be able to edit your /vendor/etc/manifest and remove the @1.3 instance, and see if it works

Le ven. 8 oct. 2021 à 07:29, L.S.S. @.***> a écrit :

GSI: DotOS 5.1.3 (August) Device: Motorola Edge S/20 Pro (pstar)

My data plan supports 5G. On my previous phone VoLTE can be enabled after installing IMS APK, but not here.

Even after installing IMS APK, VoLTE does not show up in Mobile Networks configuration and the Phone Information secret menu shows VoLTE not provisioned, IMS status unregistered. In this state, the phone still needs to downgrade to 3G signal to make/receive phone calls.

Logcat shows the following messages regarding IMS, which looks like some kind of mismatch.

10-08 13:24:26.135 1953 2653 E QMI_FW : qmi_cci_get_ref: ref count increased 2 10-08 13:24:26.140 1953 2153 E RIL-MOTEXT: qcrilUpdRegRAT, called , rat =7 10-08 13:24:26.149 3554 3742 W hw-Parcel: ** enforceInterface() expected **@.::IImsRadioIndication' but read @.::IImsRadioIndication' 10-08 13:24:26.150 1953 2153 E QMI_FW : qmi_cci_get_ref: ref count increased 2 10-08 13:24:26.151 3554 3742 W System.err: java.lang.SecurityException: HWBinder invocation to an incorrect interface 10-08 13:24:26.151 3554 3742 W System.err: at android.os.HwParcel.enforceInterface(Native Method) 10-08 13:24:26.151 3554 3742 W System.err: at vendor.qti.hardware.radio.ims.V1_4.IImsRadioIndication$Stub.onTransact(IImsRadioIndication.java:1327) 10-08 13:24:26.151 3554 3742 E android_os_HwBinder: Uncaught exception! 10-08 13:24:26.152 3554 3742 W hw-Parcel: ** enforceInterface() expected **@.::IImsRadioIndication' but read @.::IImsRadioIndication' 10-08 13:24:26.152 3554 3742 W System.err: java.lang.SecurityException: HWBinder invocation to an incorrect interface 10-08 13:24:26.152 3554 3742 W System.err: at android.os.HwParcel.enforceInterface(Native Method) 10-08 13:24:26.152 3554 3742 W System.err: at vendor.qti.hardware.radio.ims.V1_4.IImsRadioIndication$Stub.onTransact(IImsRadioIndication.java:1241) 10-08 13:24:26.152 3554 3742 E android_os_HwBinder: Uncaught exception!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

lss4 commented 2 years ago
phhgsi_arm64_ab:/ # lshal | grep -i ims                                                                                                                                                                                                     
X        Y android.hidl.base@1.0::IBase/imsradio0                                                                 0/2        1953   10513 3554 750
X        Y android.hidl.base@1.0::IBase/imsradio1                                                                 0/2        1994   3554 750
X        Y android.hidl.base@1.0::IBase/imsrtpservice                                                             0/2        2673   750
X        Y android.hidl.base@1.0::IBase/qti.ims.connectionmanagerservice                                          0/1        2732   750
DM       Y com.qualcomm.qti.imscmservice@2.0::IImsCmService/qti.ims.connectionmanagerservice                      0/1        2732   750
DM       Y com.qualcomm.qti.imscmservice@2.1::IImsCmService/qti.ims.connectionmanagerservice                      0/1        2732   750
DM       Y com.qualcomm.qti.imscmservice@2.2::IImsCmService/qti.ims.connectionmanagerservice                      0/1        2732   750
DM       Y vendor.qti.hardware.radio.ims@1.0::IImsRadio/imsradio0                                                 0/2        1953   10513 3554 750
DM       Y vendor.qti.hardware.radio.ims@1.0::IImsRadio/imsradio1                                                 0/2        1994   3554 750
DM       Y vendor.qti.hardware.radio.ims@1.1::IImsRadio/imsradio0                                                 0/2        1953   10513 3554 750
DM       Y vendor.qti.hardware.radio.ims@1.1::IImsRadio/imsradio1                                                 0/2        1994   3554 750
DM       Y vendor.qti.hardware.radio.ims@1.2::IImsRadio/imsradio0                                                 0/2        1953   10513 3554 750
DM       Y vendor.qti.hardware.radio.ims@1.2::IImsRadio/imsradio1                                                 0/2        1994   3554 750
DM       Y vendor.qti.hardware.radio.ims@1.3::IImsRadio/imsradio0                                                 0/2        1953   10513 3554 750
DM       Y vendor.qti.hardware.radio.ims@1.3::IImsRadio/imsradio1                                                 0/2        1994   3554 750
DM       Y vendor.qti.hardware.radio.ims@1.4::IImsRadio/imsradio0                                                 0/2        1953   10513 3554 750
DM       Y vendor.qti.hardware.radio.ims@1.4::IImsRadio/imsradio1                                                 0/2        1994   3554 750
DM       Y vendor.qti.hardware.radio.ims@1.5::IImsRadio/imsradio0                                                 0/2        1953   10513 3554 750
DM       Y vendor.qti.hardware.radio.ims@1.5::IImsRadio/imsradio1                                                 0/2        1994   3554 750
DM       Y vendor.qti.hardware.radio.ims@1.6::IImsRadio/imsradio0                                                 0/2        1953   10513 3554 750
DM       Y vendor.qti.hardware.radio.ims@1.6::IImsRadio/imsradio1                                                 0/2        1994   3554 750
DM       Y vendor.qti.ims.callinfo@1.0::IService/default                                                          0/1        2732   750
DM       Y vendor.qti.ims.factory@1.0::IImsFactory/default                                                        0/1        2732   750
DM       Y vendor.qti.imsrtpservice@3.0::IRTPService/imsrtpservice                                                0/2        2673   750

Is there anything out of ordinary?

It appears to have all 1.0-1.6. Each has two entries as the phone is dual-SIM, though I only use one.

This phone is actually very easy to boot a GSI. The vendor is stock and untouched.

lss4 commented 2 years ago

Okay... I think I've found my answer.

Turned out I need to toggle "Phh Treble Settings -> IMS features -> Force the password of 4G Calling setting" to force the VoLTE option appear. After that I just need to do the thing I always need to do whenever I boot the system (toggle VoLTE off then on). After that I get the VoLTE icon and IMS status showing everything's working.

I'm not closing the issue yet, as I suspect something needs to be fixed for the IMS APK as normally the VoLTE option should be visible on its own after installing it and that the environment allows such. Right now it's obviously not the case, as I need to force the option to be visible.

lss4 commented 2 years ago

!!! UPDATE: IT DOESN'T WORK CORRECTLY !!!

While I could enable VoLTE this way, making calls would simply stuck at "Calling...".

If I hang up, it'll stuck at "Hanging up" forever that while I could switch back to home screen, I won't be able to make any other calls as if the previous call was still there.

Lesking72 commented 2 years ago

I was having the same issue on my Moto Z4. I couldn't make calling and SMS work reliably at all unless I disabled LTE altogether so I had to go back to stock.

Edit: I realize this reply isn't very helpful so here's some more information: I noticed similar messages appearing in my logs, and when VoLTE was enabled I couldn't make or receive calls, and the phone stays at "Hanging up" until I reboot. Incoming calls ring for the caller, a message appeared in the log (I don't remember what it was) and the signal strength reading goes up to full, but the phone doesn't ring. With VoLTE disabled, I could place calls, but incoming calls went straight to voicemail and receiving SMS wouldn't work. I'm just guessing here but I think that may have been because T-Mobile always tries to provision me for VoLTE since it ordinarily can't be disabled on the stock rom.

lss4 commented 2 years ago

Actually I did not have this issue with Razer Phone 2 using Android 11 GSI (Android 10 GSI also works, but a bit more complicated).

VoLTE works well after installing IMS APK and a manual toggle upon boot (a manual toggle is also needed upon losing and regaining the LTE signal, such as Airplane Mode).

The issue I'm having with my Edge S Pro reminds me of a similar situation I had with Razer Phone 2 using Android 9 GSI. At that time, I was able to make VoLTE calls (and the call works fine), but it got stuck when hanging up so pretty much I could only make one call per boot.

With my current phone, looks like receiving SMS is still fine for now, just that the phone still needs to downgrade to 3G signal when making calls and the issue is relatively minor.

PS: The issue persists with the recently released DotOS 5.2 GSI (October build). I'm using the non-vndklite build.

lss4 commented 2 years ago

An update...

Looks like IMS stuffs from the stock ROM were in /system_ext, and GSIs (such as DotOS) don't use that.

I tried putting the stock IMS stuffs (as well as the libs which were symlinks to actual libraries that are supposed to reside in /lib64) into a Magisk Module (at /system). The system picks up that apk but IMS stuffs can't function (the VoLTE toggle can't even be forced out in this case).

So probably I need a way to deodex the stock ims.apk as well as packing the necessary libs.

lss4 commented 2 years ago

Very late bump. The issue is still present on phh-AOSP 12.1 v411 with my device.

IMS doesn't work, and I still can't make calls after forcing the option out. Similar error messages like this exist in the logcat.

03-26 22:06:26.017  1875  2010 W hw-Parcel: **** enforceInterface() expected 'vendor.qti.hardware.radio.ims@1.3::IImsRadio' but read 'vendor.qti.hardware.radio.ims@1.4::IImsRadio'
...
03-26 22:07:44.365  1875  1875 W hw-Parcel: **** enforceInterface() expected 'vendor.qti.hardware.radio.ims@1.2::IImsRadio' but read 'vendor.qti.hardware.radio.ims@1.3::IImsRadio'

Currently I'm not going to test too much about this as I just clean-flashed the device with this new GSI and I'm still in the middle of putting back my old files and apps.

EDIT: Additionally, I noticed that NR (5G) cannot be selected from the Preferred Network Type menu, only LTE (4G). I have to open up the hidden menu to select a mode containing NR (5G) and then the phone will operate in 5G mode.