TrebleDroid / treble_experimentations

Scripts to automatically build/CI/Release TrebleDroid GSI
Other
203 stars 26 forks source link

Cell/Mobile network (call/SMS/data) issues in Android 14 (not in Android 13). #96

Open pokemaster974 opened 4 months ago

pokemaster974 commented 4 months ago

Current Behavior:

I can't success to have a working cell network. I can't receive calls or SMS or use the data mobile.

To Reproduce

  1. Go from a stock ROM MIUI
  2. Go to fastboot (power + volume up)
  3. fastboot reboot fastboot
  4. fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img (which came from my stock ROM fastboot .tgz archive)
  5. fastboot erase system
  6. fastboot flash system android_14.0.0_r21 ci-20240130_system-td-arm64-ab-vanilla
  7. fastboot -w
  8. fastboot reboot recovery, then Wipe All Data (not sure was necessary as I do fastboot -w)
  9. See error

Describe the bug

I'm starting from a very new clean stock MIUI ROM ROSEMARYPEEAGlobal_V13.0.6.0.SFFEUXM (using flashall.bat). I can : enter my PIN code, receive calls & SMS, connect to data mobile (2G/3G/4G) ROSEMARYPEEAGlobal_V13 0 6 0 SFFEUXM

So I install the GSI image as described in "To Reproduce" section. Code PIN is asked at the boot, so it seems that it recognize the SIM and I type the code. TrebleDroid 14 (1) But can't have cell network, and the SIM option is greyed/unavailable. TrebleDroid 14 (2)

After checking & unchecking all Telephony options in Misc features (except Automatically restart RIL as with this checked SIM is not recognized and no PIN is asked), I don't have no more the '!' into the icon (I need to uncheck the options to not have the '!')

I have a full icon and SIM status shows me a "In Service" state with a signal strength & 4G mobile voice and mobile data, but I can't launch a call (dialer crashes when trying, I can't send (stay in "Sending" or receive a SMS), and can't go to Internet (and I don't have the 4G icon like below with Android 13) TrebleDroid 14 (3) TrebleDroid 14 (4)

I've also tried from the last stock MIUI ROM (ROSEMARYPEEAGlobal_V14.0.3.0.TFFEUXM) with just adding the command fastboot delete-logical-partition product_a because of the partition size issue. But I can't still have the cell network.

Expected behavior

Can make calls/SMS/data.

Photos

Smartphone (please complete the following information):

Additional context

It seems to work on Android 13 & LineageOS-TD 20 (but not 21), tried myself : TrebleDroid 13

pokemaster974 commented 4 months ago

One logcat : logcat.txt https://filebin.net/zcva7cknlfb5cp2t https://jumpshare.com/s/dZUjm65SG37DlchZczN7

StupidRepo commented 4 months ago

Getting this exact same issue - please let me know if you find a fix!

StupidRepo commented 4 months ago

I feel like it should be mentioned that if you enable Show ANRs and Always show app crashes, com.android.phone (manages SIM card stuff such as the SIM toolkit) keeps reporting as non responding. Is this related to https://github.com/TrebleDroid/platform_frameworks_opt_telephony too?

StupidRepo commented 4 months ago

Okay so, when I completely wipe my data and go through the setup with no Wi-Fi whatsoever, everything is perfect. As soon as I connect to a Wi-Fi network, com.android.phone breaks.

pokemaster974 commented 4 months ago

Getting this exact same issue - please let me know if you find a fix!

Hi, I received no feedback and found no fix. I've choosen to go back to A13 (with a custom ROM made for rosemary/rosemary_p).

StupidRepo commented 4 months ago

Ah okay. Yeah, I may have to do that too.

StupidRepo commented 4 months ago

In the logcat provided, I see a whole bunch of MTK IRadio errors, and SELinux deny things for interface=vendor.mediatek.hardware.radio::IRadio (about line 34777) Some more interesting errors appear on lines 39744 to 39749, and lines 39753 to 39757.

39753-39757:

02-07 20:43:20.321   477   477 I hwservicemanager: Since vendor.mediatek.hardware.mtkradioex@3.0::IMtkRadioEx/mtkSe1 is not registered, trying to start it as a lazy HAL (if it's not configured to be a lazy HAL, it may be stuck starting or still starting).
02-07 20:43:20.321   477   477 I hwservicemanager: Since vendor.mediatek.hardware.mtkradioex@3.0::IMtkRadioEx/mtkSe2 is not registered, trying to start it as a lazy HAL (if it's not configured to be a lazy HAL, it may be stuck starting or still starting).
02-07 20:43:20.321   477   477 I hwservicemanager: getTransport: Cannot find entry vendor.mediatek.hardware.mtkradioex@2.0::IMtkRadioEx/mtkSe1 in either framework or device VINTF manifest.
02-07 20:43:20.321   477   477 I hwservicemanager: getTransport: Cannot find entry vendor.mediatek.hardware.mtkradioex@2.0::IMtkRadioEx/mtkSe2 in either framework or device VINTF manifest.
02-07 20:43:20.321  1165  3839 E MtkUiccSEHal: [se1]initRadioService:829: get MTK IRadio failed

When I myself run the command lshal, I can see everything but vendor.mediatek.hardware.mtkradioex@2.0::IMtkRadioEx in the list. Not sure if that's normal or not.

I went back to the first pre-release on this repo of Android 14 (r2-20231012), and tried the last release on this repo of Android 13 (r73-20230905) and found that A14 R2 was when the bug first started and A13 R73 was the last release to not have the bug in it. I'm going to look into commits between those tags to see what changed.

phhusson commented 4 months ago

Could you try removing the pin code on the sim card?

StupidRepo commented 4 months ago

Could you try removing the pin code on the sim card?

I know this isn't my post, but my SIM card doesn't have a PIN and the issue still happens. So with or without a PIN added, the issue still seems to happen.

pokemaster974 commented 3 months ago

Could you try removing the pin code on the sim card?

Hi PH, sorry but it's no more installed on my phone. You can close my issue if you feel necessary but I think that @StupidRepo could help you to try the tests you will request. Regards.