Add / Use Android Dialer

Trying to include dialer app to turn device into android phone.
Currently owning 4g modem that I have used to send SMS and make voice calls on armbian. I don’t want to develop phone UI from scratch so I want to use Android.
As far as I understand I need to bridge HAL level. Some RIL implementation.

I added android dialer and message app
PRODUCT_PACKAGES+=

  • TeleService
  • TelephonyProvider
  • Telecom
  • Dialer
  • telephony-common
  • Messaging
  • CarrierDefaultApp
  • CarrierConfig

Trying to make it work with ril. Without success yet. There are some signs of life. Currently PhoneFactory does returns null for the given subId

Also currently stuck on hidl version and iradio configs.
Interesting files to explore
https://android.googlesource.com/platform/system/tools/hidl/+/refs/heads/master/build/hidl_interface.go
/hardware/interfaces/compatibility_matrices

Here is what I figured out so far

In order to use IRadio I need to specify it in manifest.xml
The ril driver provided by Quectel is IRadio 1.5
Build process was complaining with message 1.5 is deprecated and 1.6 should be used.
I tried to figure out where these numbers come from.

device/rockchip/common/BoardConfig.mk
DEVICE_MANIFEST_FILE ?= bla bla bla /manifest_level_$(API_LEVEL).xml

which defines attribute level=“6”

and this number is used to get to this file representing constraints
hardware/interfaces/compatibility_matrices/compatibility_matrix.6.xml
in this file only version 1.6 is defined for IRadio, 1.5 is not specified.

I dont know which link in this chain I should be editing. But will try one by one.

interesting flag in device/rockchip/common/device.mk

#PRODUCT_COMPATIBILITY_MATRIX_LEVEL_OVERRIDE := 27

also my build was missing some android.hardware.xyz@A.B.so files

used LOCAL_SHARED_LIBRARIES to add them

Each HIDL device turns into an rc file that starts a service
./etc/init/android.hardware.XYZ@A.B-service.rc
that service call executable created specifically for the device
vendor/bin/hw/android.hardware.XYZ@A.B-service
probably it uses the logic inside library that was created for this device/service
./lib64/android.hardware.XYZ@A.B.so

Trying to figure out relation between libreferene-ril and libril
It looks like the IRadio interface implementation is inside libril, not libreference-ril

Probably it is this way
libril - implements IRadio and all of its supported versions. It is similar or same as the HIDL impl.so
libreference+rild - are HIDL service

At last I managed to make it work. I get and send SMS. I can dial and call numbers. As with experiment I had done on Armbian, next step is forwarding audio.
I will create separate entry to track that topic.

1 Like

Hello, exciting article. I’m currently struggling through the RIL integration. It looks like the implementation of /hardware/ril/libril doesn’t match the Quectel libreference from the driver package. Which libril.so did you use?