The config file for container from Halium repo is outdated, and will not
load on latest version of LXC, here is the error when you start the container:
postmarketos:~$ sudo lxc-start android
lxc-start: android: confile.c: parse_line: 2447 Unknown configuration key "lxc.rootfs"
lxc-start: android: parse.c: lxc_file_for_each_line_mmap: 142 Failed to parse config file "/var/lib/lxc/android/config" at line "lxc.rootfs = /var/lib/lxc/android/rootfs"
Failed to load config for android
lxc-start: android: tools/lxc_start.c: main: 264 Failed to create lxc_container
postmarketos:~$
This pull request updates the config file, but also use the latest
commit.
As observed on UBPorts, hwcomposer implementation on Android 7 CAF (non-Nexus
Qualcomm) devices has slight differences in employed structs, which makes
them binary incompatible with AOSP headers.
Halium 7.1 android-headers extracted from LineageOS include those
modifications (e. g. https://github.com/Halium/android-headers/blob/halium-7.1/hardware/hwcomposer.h#L290),
so it is enough to add QTI_BSP/QCOM_BSP to defines of programs utilizing
those headers. In case of libhybris, only test_hwcomposer is affected so
far on 7.1 (might be not true for Android 5.1/6!).
This change avoids providing libhybris-7.1-caf package by building a
separate binary of test_hwcomposer for affected devices.
As discussed in #1039, I want to split feature/hybris branch into
smaller sensible pull requests.
This is the first one that simply adds android-headers and libhybris
packaging. libhybris allows apps compiled with glibc (musl in our case)
to load Android libraries that utilize bionic libc, which is used to
load proprietary userspace drivers.
The package isn't very useful on its own and requires core (non-UI/Java)
Android services to be running in some way - either in Halium-style LXC
container or in same root as main OS with modified init (Mer/Sailfish do
it this way). Both ways are tested to work in postmarketOS.
libhybris also includes some tests, not all of them are known to be
representative, but test_vibrator and test_egl_configs are usually good
indicators if system is set up correctly.