Dragonboard 845c AOSP phone features enablement

Dragonboard 845c AOSP support in master has been in a very good state since a while, so it’s time to change my AOSP reference board from the Hikey960 to the Dragonboard and start enabling its phone capabilities.

Besides having better specs than the Hikey960, the Dragonboard has an important edge, that is the possibility of having at the same time both host and device capabilities through USB, very useful for debugging issues through adb. The main drawback for the Dragonboard is the price, a few hundreds dollars more than the Hikey.

Dragonboard 845c

Build steps for AOSP and kernel are really straightforward, so that it’s super-easy to have a working setup.

Enabling phone capabilities on Dragonboard 845c

As usual, the first step is to derive the db845c main makefile from a telephony makefile, e.g. in file device/linaro/dragonboard/db845c.mk change line

$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk)

to

$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base_telephony.mk)

Then, customize the overlay found in device/linaro/dragonboard/overlay/frameworks/base/core/res/res/values/config.xml changing lines

<!-- This device is not "voice capable"; it's data-only. -->
<bool name="config_voice_capable">false</bool>

<!-- This device does not allow sms service. -->
<bool name="config_sms_capable">false</bool>

to

<!-- This device is not "voice capable"; it's data-only. -->
<bool name="config_voice_capable">true</bool>

<!-- This device does not allow sms service. -->
<bool name="config_sms_capable">true</bool>

Also line

<item>"mobile,0,0,1,-1,true"</item>

should be added to the networkAttributes string array.

The last step is to change the radio and radio.config HAL versions to the ones supported by the native RIL implementation you are using. Those versions should also be in sync with the ones needed by the Android version to be built. Since Dragonboard is supported in master, a possible way is to use the version suggested for latest official version completely available in AOSP.

In this example I will use 1.4 for radio and 1.2 for radio.config. The following lines should be added to device/linaro/dragonboard/manifest.xml:

<hal format="hidl">
    <name>android.hardware.radio</name>
    <transport>hwbinder</transport>
    <version>1.4</version>
    <interface>
        <name>IRadio</name>
        <instance>slot1</instance>
    </interface>
</hal>
<hal format="hidl">
    <name>android.hardware.radio.config</name>
    <transport>hwbinder</transport>
    <version>1.2</version>
    <interface>
        <name>IRadioConfig</name>
        <instance>default</instance>
    </interface>
</hal>

As usual, this is only a part of the whole picture: to really enable the Dragonboard 845c AOSP phone capabilities, a native RIL implementation suitable for the modem in use should be added, usually provided by the modem vendor.

A reference implementation of the RIL based on AT commands, though a bit outdated, can be found in hardware/ril/

qmi_wwan with Dragonboard

By default the Dragonboard 845c does not support /dev/cdc-wdm device creation, so if you are going to use a Qualcomm modem with qmi_wwan the change db845c: Add usbmisc support is needed (see also sysfs qmi_wwan files writing in AOSP native code).