Developer tips

Gitlab environment:

Use ssh instead of https on the Baylibre Gitlab projects:

git config --global url."git@gitlab.baylibre.com:".insteadOf "https://gitlab.baylibre.com/"

Virtual display (vkms)

Android requires a display output (HDMI or DSI panel) in order to boot to the app launcher.

With a working HDMI or DSI panel

You should just be able to run scrcpy to show a virtual display. See their GitHub page for more information.

Without a working HDMI or DSI panel

We have a virtual graphics card (based on vkms) that emulates a fake display. This allows us to boot to the “home screen”.

To configure this, at runtime, do:

adb root
adb shell stop
adb shell stop vendor.hwcomposer-3
adb shell setprop vendor.hwc.drm.device /dev/dri/card0
adb shell start vendor.hwcomposer-3
adb shell start

Then, it’s possible to use a tool like scrcpy to show a virtual display. See their GitHub page for more information.

Known limitations

If available on the device, scrcpy will use the hw video encoder.

Currently the Codec2 HAL does not works correctly with scrcpy. As a workaround to still be able to use a virtual display, one can specify the sw video encoder using

scrcpy --video-encoder=c2.android.avc.encoder