I’m currently working on building a custom Android image for Waydroid.
To get cellular network access as well as GPS i bought an EC25-E module (USB / UART).
Looking at the user guide i found out that i need the RIL and GPS drivers specific to android.
Would you please provide me with the driver files ?
Android version is 13 and architecture is x86_64.
If more information about my system is needed please let me know.
I thought the RIL driver supports up to IRadio version 1.4 since that is what it says in the RIL driver user guide (v2.0 from 2021-04-19). Is that not correct ?
Also i need the GPS driver as well. From what i saw for that i need some file called gps.default.so to get the NMEA gps working.
Could you please provide that as well or tell me where i can download it ?
I will give the IRadio 1.1 driver a try but if that doesn’t work then is it possible for you to get the android source code necessary to build a IRadio 1.4 version ? Since the user guide says that IRadio 1.4 is supported it would be nice to actually be able to use it… Also i do need the driver to work well. If it doesn’t its basically useless…
I will provide the libril.so for IRadio 1.5.
I have tested with IRadio 1.5 the Android 13 works well. But you have to replace the libril.so with the original one.
After a lot of try and error i managed to get some success with the driver files and their included documentation. However I’m still facing a few issues:
For RIL 1.1:
The manifest XML provided in the documentation seems to be incomplete as i needed to add some extra bits from here:
Without the extra XML bits i always got this error:
03-30 14:10:01.220 1750 1750 W HidlServiceManagement: Waited one second for android.hardware.radio@1.0::IRadio/slot1
03-30 14:10:01.220 47 47 I hwservicemanager: Since android.hardware.radio@1.0::IRadio/slot1 is not registered, trying to start it as a lazy HAL.
03-30 14:10:01.220 1750 1750 I HidlServiceManagement: getService: Trying again for android.hardware.radio@1.0::IRadio/slot1...
03-30 14:10:01.220 47 2177 W libc : Unable to set property "ctl.interface_start" to "android.hardware.radio@1.0::IRadio/slot1": error code: 0x20
03-30 14:10:01.220 47 2177 I hwservicemanager: Tried to start android.hardware.radio@1.0::IRadio/slot1 as a lazy service, but was unable to. Usually this happens when a service is not installed, but if the service is intended to be used as a lazy service, then it may be configured incorrectly.
03-30 14:10:01.690 0 0 E init : Control message: Could not find 'android.hardware.radio@1.0::IRadio/slot1' for ctl.interface_start from pid: 47 (/system/bin/hwservicemanager)
Other than that it looks like its working for the most part except for audio during voice calls.
Is there some extra configuration required to get that working as well or does that have to do with the RIL driver being incompatible with android 13 ?
GPS is working as expected too so thats something.
So far i wasn’t able to test the data connection yet. I’ll check that later.
For RIL 1.6:
It doesn’t even manage to start the rild due to some linker errors due to a missing symbol. No idea where to start debugging that as i suspect that its related the ril library you provided and not anything with the android itself.
03-30 13:59:04.024 0 0 I init : starting service 'vendor.ril-daemon'...
03-30 13:59:03.591 1656 1656 F linker : CANNOT LINK EXECUTABLE "/vendor/bin/hw/rild": cannot locate symbol "_ZN7android8hardware12ProcessState16initWithMmapSizeEm" referenced by "/vendor/lib64/libril.so"...
03-30 13:59:04.052 0 0 I init : Service 'vendor.ril-daemon' (pid 1656) exited with status 1
03-30 13:59:04.052 0 0 I init : Sending signal 9 to service 'vendor.ril-daemon' (pid 1656) process group...
03-30 13:59:04.052 0 0 I libprocessgroup: Successfully killed process cgroup uid 1001 pid 1656 in 0ms
03-30 13:59:04.238 0 0 I logd : logdr: UID=0 GID=0 PID=1657 b tail=0 logMask=99 pid=0 start=0ns deadline=0ns
03-30 13:59:03.918 115 638 D gps_ql : Error connecting rild-nmea (Connection refused)
03-30 13:59:03.918 115 638 D gps_ql : fail to open GPS channel <rild-nmea>!
03-30 13:59:04.177 816 816 W HidlServiceManagement: Waited one second for android.hardware.radio@1.6::IRadio/slot1
03-30 13:59:04.177 47 47 I hwservicemanager: Since android.hardware.radio@1.6::IRadio/slot1 is not registered, trying to start it as a lazy HAL.
03-30 13:59:04.177 816 816 I HidlServiceManagement: getService: Trying again for android.hardware.radio@1.6::IRadio/slot1...
03-30 13:59:04.177 47 1659 W libc : Unable to set property "ctl.interface_start" to "android.hardware.radio@1.6::IRadio/slot1": error code: 0x20
03-30 13:59:04.177 47 1659 I hwservicemanager: Tried to start android.hardware.radio@1.6::IRadio/slot1 as a lazy service, but was unable to. Usually this happens when a service is not installed, but if the service is intended to be used as a lazy service, then it may be configured incorrectly.
03-30 13:59:04.639 0 0 E init : Control message: Could not find 'android.hardware.radio@1.6::IRadio/slot1' for ctl.interface_start from pid: 47 (/system/bin/hwservicemanager)
03-30 13:59:04.918 115 638 D gps_ql : Error connecting rild-nmea (Connection refused)
03-30 13:59:04.918 115 638 D gps_ql : fail to open GPS channel <rild-nmea>!
03-30 13:59:05.177 816 816 W HidlServiceManagement: Waited one second for android.hardware.radio@1.6::IRadio/slot1
Here is the configuration, command output and the log files from testing the RIL 1.6:
rild.rc
service vendor.ril-daemon /vendor/bin/hw/rild -l /vendor/lib64/hw/libreference-ril.so
class main
user radio
group radio cache inet misc audio log readproc wakelock sdcard_rw
capabilities BLOCK_SUSPEND NET_ADMIN NET_RAW
manifest.xml
<hal format="hidl">
<name>android.hardware.radio</name>
<transport>hwbinder</transport>
<fqname>@1.6::IRadio/slot1</fqname>
<fqname>@1.2::ISap/slot1</fqname>
</hal>
:/ # getprop | grep ril
[init.svc.vendor.ril-daemon]: [restarting]
[init.svc_debug_pid.vendor.ril-daemon]: [1956]
[ril.function.dataonly]: [0]
[ril.subscription.types]: [SIM]
[ro.boot.noril]: [no]
[ro.boottime.vendor.ril-daemon]: [5336849923685]
[ro.radio.noril]: [no]
[ro.ril.enable.amr.wideband]: [1]
[ro.telephony.ril.config]: [simactivation]
[vendor.rild.libpath]: [/vendor/lib64/hw/libreference-ril.so]
:/ # ps -elf | grep ril
root 1991 356 0 16:01:03 pts/0 00:00:00 grep ril
:/ # getprop | grep phone
[hw.nophone]: [no]
:/ # ls -la /vendor/lib64/*radio*
-rw-r--r-- 1 root root 190336 2024-04-01 15:57 /vendor/lib64/android.hardware.radio.config@1.0.so
-rw-r--r-- 1 root root 230712 2024-04-01 15:57 /vendor/lib64/android.hardware.radio.config@1.1.so
-rw-r--r-- 1 root root 170496 2024-04-01 15:57 /vendor/lib64/android.hardware.radio.config@1.2.so
-rw-r--r-- 1 root root 2049088 2024-04-01 15:57 /vendor/lib64/android.hardware.radio@1.0.so
-rw-r--r-- 1 root root 1348920 2024-04-01 15:57 /vendor/lib64/android.hardware.radio@1.1.so
-rw-r--r-- 1 root root 1487936 2024-04-01 15:57 /vendor/lib64/android.hardware.radio@1.2.so
-rw-r--r-- 1 root root 1398664 2024-04-01 15:57 /vendor/lib64/android.hardware.radio@1.3.so
-rw-r--r-- 1 root root 1609288 2024-04-01 15:57 /vendor/lib64/android.hardware.radio@1.4.so
-rw-r--r-- 1 root root 1866672 2024-04-01 15:57 /vendor/lib64/android.hardware.radio@1.5.so
-rw-r--r-- 1 root root 2192080 2024-04-01 15:57 /vendor/lib64/android.hardware.radio@1.6.so
:/ # ls -la /vendor/lib64/*ril*
-rw-r--r-- 1 root root 51424 2024-04-01 15:57 /vendor/lib64/libreference-ril.so
-rw-r--r-- 1 root root 1826912 2024-04-01 15:57 /vendor/lib64/libril.so
-rw-r--r-- 1 root root 7640 2024-04-01 15:57 /vendor/lib64/librilutils.so
|:/ # ls -la /vendor/lib64/hw/*ril*
-rw-r--r-- 1 root root 601000 2024-04-01 15:57 /vendor/lib64/hw/libreference-ril.so
:/ # logcat -b radio -v time
--------- beginning of radio
04-01 15:58:29.549 D/TelephonyRegistry( 328): listen oscl: mHasNotifySubscriptionInfoChangedOccurred==false no callback
04-01 15:58:29.817 D/TelephonyRegistry( 328): listen oscl: mHasNotifySubscriptionInfoChangedOccurred==false no callback
04-01 15:58:30.041 D/TelephonyRegistry( 328): listen oscl: mHasNotifySubscriptionInfoChangedOccurred==false no callback
04-01 15:58:30.068 D/TelephonyRegistry( 328): listen oscl: mHasNotifySubscriptionInfoChangedOccurred==false no callback
04-01 15:58:30.071 D/TelephonyRegistry( 328): listen oscl: mHasNotifySubscriptionInfoChangedOccurred==false no callback
04-01 15:58:30.072 W/CarrierConfigManager( 328): Error getting config for subId -1 ICarrierConfigLoader is null
04-01 15:58:30.073 D/TelephonyRegistry( 328): listen oscl: mHasNotifySubscriptionInfoChangedOccurred==false no callback
04-01 15:58:30.076 D/TelephonyRegistry( 328): systemRunning register for intents
04-01 15:58:30.159 D/TelephonyRegistry( 328): notifyCellLocationForSubscriber: subId=2147483647 cellIdentity=null
04-01 15:58:30.249 W/CarrierConfigManager( 672): Error getting config for subId -1 ICarrierConfigLoader is null
04-01 15:58:30.275 D/TelephonyRegistry( 328): listen oscl: mHasNotifySubscriptionInfoChangedOccurred==false no callback
04-01 15:58:30.279 D/TelephonyComponentFactory( 677): validated paths: null
04-01 15:58:30.279 D/TelephonyComponentFactory( 677): Total components injected: 0
04-01 15:58:30.280 D/TDC ( 677): updateOrInsert: inserting: Modem { uuid=modem, state=0, rilModel=0, rat={}, maxActiveVoiceCall=1, maxActiveDataCall=1, maxStandby=1 }
04-01 15:58:30.280 D/TDC ( 677): updateOrInsert: inserting: Sim { uuid=sim, modemUuid=modem, state=0 }
04-01 15:58:30.280 D/MetricsCollector( 677): registered
04-01 15:58:30.281 D/CdmaSSM ( 677): subscriptionSource from settings: 0
04-01 15:58:30.281 I/PhoneFactory( 677): Cdma Subscription set to 0
04-01 15:58:30.281 I/PhoneFactory( 677): Network Mode set to 10
04-01 15:58:30.281 D/RILJ ( 677): RIL: init allowedNetworkTypes=326655 cdmaSubscription=0) [PHONEnull]
04-01 15:58:30.318 D/TelephonyRegistry( 328): listen oscl: mHasNotifySubscriptionInfoChangedOccurred==false no callback
04-01 15:58:30.354 W/CarrierConfigManager( 567): Error getting config for subId -1 ICarrierConfigLoader is null
04-01 15:58:30.356 D/TelephonyRegistry( 328): listen oscl: mHasNotifySubscriptionInfoChangedOccurred==false no callback
04-01 15:58:30.437 W/CarrierConfigManager( 567): Error getting config for subId -1 ICarrierConfigLoader is null
04-01 15:58:30.437 W/CarrierConfigManager( 567): Error getting config for subId -1 ICarrierConfigLoader is null
04-01 15:58:30.438 D/TelephonyRegistry( 328): listen oscl: mHasNotifySubscriptionInfoChangedOccurred==false no callback
04-01 15:58:30.459 W/CarrierConfigManager( 672): Error getting config for subId -1 ICarrierConfigLoader is null
04-01 15:58:30.465 W/CarrierConfigManager( 672): Error getting config for subId -1 ICarrierConfigLoader is null
04-01 15:58:30.603 W/CarrierConfigManager( 672): Error getting config for subId -1 ICarrierConfigLoader is null
04-01 15:58:31.656 D/TelephonyRegistry( 328): listen oscl: mHasNotifySubscriptionInfoChangedOccurred==false no callback
04-01 15:58:36.813 W/CarrierConfigManager( 672): Error getting config for subId -1 ICarrierConfigLoader is null
04-01 15:58:36.827 W/CarrierConfigManager( 672): Error getting config for subId -1 ICarrierConfigLoader is null
:/ # logcat
04-01 15:58:57.078 115 642 D gps_ql : Error connecting rild-nmea (Connection refused)
04-01 15:58:57.078 115 642 D gps_ql : fail to open GPS channel <rild-nmea>!
04-01 15:58:57.296 677 677 W HidlServiceManagement: Waited one second for android.hardware.radio@1.6::IRadio/slot1
04-01 15:58:57.296 47 47 I hwservicemanager: Since android.hardware.radio@1.6::IRadio/slot1 is not registered, trying to start it as a lazy HAL.
04-01 15:58:57.296 677 677 I HidlServiceManagement: getService: Trying again for android.hardware.radio@1.6::IRadio/slot1...
04-01 15:58:57.296 47 1677 W libc : Unable to set property "ctl.interface_start" to "android.hardware.radio@1.6::IRadio/slot1": error code: 0x20
04-01 15:58:57.297 47 1677 I hwservicemanager: Tried to start android.hardware.radio@1.6::IRadio/slot1 as a lazy service, but was unable to. Usually this happens when a service is not installed, but if the service is intended to be used as a lazy service, then it may be configured incorrectly.
04-01 15:58:56.988 0 0 E init : Control message: Could not find 'android.hardware.radio@1.6::IRadio/slot1' for ctl.interface_start from pid: 47 (/system/bin/hwservicemanager)
04-01 15:58:57.434 0 0 I init : starting service 'vendor.ril-daemon'...
04-01 15:58:57.764 1679 1679 F linker : CANNOT LINK EXECUTABLE "/vendor/bin/hw/rild": cannot locate symbol "_ZN7android8hardware12ProcessState16initWithMmapSizeEm" referenced by "/vendor/lib64/libril.so"...
04-01 15:58:57.456 0 0 I init : Service 'vendor.ril-daemon' (pid 1679) exited with status 1
04-01 15:58:57.456 0 0 I init : Sending signal 9 to service 'vendor.ril-daemon' (pid 1679) process group...
04-01 15:58:57.456 0 0 I libprocessgroup: Successfully killed process cgroup uid 1001 pid 1679 in 0ms
04-01 15:58:57.918 917 949 W System : A resource failed to call release.
04-01 15:58:58.078 115 642 D gps_ql : Error connecting rild-nmea (Connection refused)
04-01 15:58:58.078 115 642 D gps_ql : fail to open GPS channel <rild-nmea>!
As for the RIL 1.1 (V3_6_35_beta) that you provided:
I was able to get LTE working as well now.
While doing some more testing i noticed that sometimes i get network timeouts while running USSD codes. So far i wasn’t able to find anything in the logs though.
Also it seems like audio using UAC is somewhat working now as well.
However enabling audio output through the UAC device is not persistent so i need some way of always executing AT+QPCMV=1,2 before or once the RIL deamon is running.
Is there any way to accomplish that with the RIL driver or is this not the way to do it ?
Here is also the output of the command you said to try as comparison: