Hi,
I want to integrate EC200T to our Android 9.0, 32-bit mediatek custom board.
I have added the RIL library provided by the quectel team and referred to the Quectel_Android_RIL_Driver_User_Guide_V2.0.pdf and Quectel_EC200T_Linux_USB_Driver_User_Guide_V1.0.pdf to integrate RIL driver.
The library libreference-ril.so
is present in /vendor/lib/
. But ril-daemon is not running. Also, according to the document, the RIL library is not provided by Quectel if "getprop gsm.version.ril-impl
" command doesn’t give the ril version.
When i checked the ril logs using the below command,
logcat -b radio -v time
I got the error -
dlopen failed: dlopen failed: library "android.hardware.radio.config@1.1.so" not found
I have these files present in /system/lib/vndk-28
-
/system/lib/vndk-28/android.hardware.radio.config@1.0.so
/system/lib/vndk-28/android.hardware.radio.deprecated@1.0.so
/system/lib/vndk-28/android.hardware.radio@1.0.so
/system/lib/vndk-28/android.hardware.radio@1.1.so
/system/lib/vndk-28/android.hardware.radio@1.2.so
But the error library android.hardware.radio.config@1.1.so
is not present in android 9. I tried adding this by taking it from Android 10 BSP, but then when i check the ril logs, it throws an error saying -
library "android.hardware.radio.config@1.2.so" not found
or library "android.hardware.radio.config@1.3.so" not found
. If i keep on adding these, i get, library "android.hardware.radio@1.4.so" not found
and so on.
Debug steps -
-
Board:/ # getprop | grep ril
[init.svc.ril-daemon]: [stopped]
[rild.libargs]: [-d/dev/ttyUSB1]
[rild.libpath]: [/vendor/lib/libreference-ril.so]
[ro.boot.noril]: [no]
[ro.boottime.ril-daemon]: [23515705385]
[ro.radio.noril]: [no]
[ro.vendor.mtk_ril_mode]: [ro.vendor.md_prop_ver=1]
[vendor.rild.libargs]: [-d/dev/ttyUSB1]
[vendor.rild.libpath]: [/vendor/lib/libreference-ril.so] -
Board:/ # getprop init.svc.ril-daemon
stopped -
Board:/ # cat /init*.rc | grep ril-daemon
service ril-daemon /vendor/bin/hw/rild -l /vendor/lib/libreference-ril.so -
Board:/ # ls -l /dev/ttyUSB*
crw-rw---- 1 radio radio 188, 1 2021-08-23 10:17 /dev/ttyUSB0
crw-rw---- 1 radio radio 188, 2 2021-08-23 10:17 /dev/ttyUSB1
crw-rw---- 1 radio radio 188, 3 2021-08-23 10:17 /dev/ttyUSB2 -
Board:/ # getprop gsm.version.ril-impl
Board:/ #
I have added the steps below-
1) In system/core/rootdir/init.rc
service ril-daemon /vendor/bin/hw/rild -l /vendor/lib/libreference-ril.so
class main
user root
group radio cache inet misc audio sdcard_rw log
capabilities BLOCK_SUSPEND NET_ADMIN NET_RAW
______________________________________________________________________________
2) In device/platform/board/device.mk -
# For rild
$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)
#Quectel RIL
ifeq ($(strip $(BUILD_WITH_EC200)),yes)
DEVICE_MANIFEST_FILE += device/platform/board/manifest.xml
PRODUCT_PACKAGES += \
TelephonyProvider \
TeleService \
CarrierConfig \
telephony-common \
MtkTeleService \
ImsService
PRODUCT_COPY_FILES += \
device/platform/board/quectel-ril/libquectel-ril/armeabi/libreference-ril.so:$(TARGET_COPY_OUT_VENDOR)/lib/libreference-ril.so \
device/platform/board/quectel-ril/libquectel-ril/libril/armeabi/libril.so:$(TARGET_COPY_OUT_VENDOR)/lib/libril.so \
device/platform/board/quectel-ril/libquectel-ril/armeabi/chat:$(TARGET_COPY_OUT_SYSTEM)/bin/chat \
device/platform/board/quectel-ril/libquectel-ril/armeabi/ip-down:$(TARGET_COPY_OUT_SYSTEM)/etc/ppp/ip-down \
device/platform/board/quectel-ril/libquectel-ril/armeabi/ip-up:$(TARGET_COPY_OUT_SYSTEM)/etc/ppp/ip-up \
device/platform/board/quectel-ril/libquectel-ril/ql-ril.conf:$(TARGET_COPY_OUT_SYSTEM)/etc/ql-ril.conf \
device/platform/board/quectel-ril/tools/armeabi-v7a/iperf:$(TARGET_COPY_OUT_SYSTEM)/bin/iperf \
device/platform/board/quectel-ril/tools/armeabi-v7a/mpstat:$(TARGET_COPY_OUT_SYSTEM)/bin/mpstat \
device/platform/board/quectel-ril/tools/armeabi-v7a/QAndroidLog:$(TARGET_COPY_OUT_SYSTEM)/bin/QAndroidLog \
device/platform/board/quectel-ril/tools/armeabi-v7a/QFirehose:$(TARGET_COPY_OUT_SYSTEM)/bin/QFirehose \
frameworks/native/data/etc/android.hardware.telephony.cdma.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.telephony.cdma.xml \
frameworks/native/data/etc/android.hardware.telephony.gsm.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.telephony.gsm.xml \
frameworks/native/data/etc/android.software.sip.voip.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.sip.voip.xml \
frameworks/native/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml \
frameworks/native/data/etc/android.hardware.audio.low_latency.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.low_latency.xml \
# RILD Related
PRODUCT_PROPERTY_OVERRIDES += \
vendor.rild.libpath=/vendor/lib/libreference-ril.so \
vendor.rild.libargs=-d/dev/ttyUSB1 \
rild.libpath=/vendor/lib/libreference-ril.so \
rild.libargs=-d/dev/ttyUSB1 \
hw.nophone=no \
ro.boot.noril=no \
ro.radio.noril=no \
ro.telephony.default_network=10 \
keyguard.no_require_sim=true \
ro.radio.networkmode=enable \
endif
______________________________________________________________________________________________________________________________________________
3) In device/platform/board/manifest.xml -
<manifest version="1.0" type="device">
<hal format="hidl">
<name>android.hardware.radio.deprecated</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IOemHook</name>
<instance>slot1</instance>
</interface>
</hal>
<hal format="hidl">
<name>android.hardware.radio</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IRadio</name>
<instance>slot1</instance>
</interface>
</hal>
</manifest>
______________________________________________________________________________________________________
4) In device/platform/board/ProjectConfig.mk -
BUILD_WITH_EC200 = yes
___________________________________________________________________________________________