github.com/libhybris/libhybris ↗
Hybris is a solution that commits hybris, by allowing us to use bionic-based HW adaptations in glibc systems
Open this visualization on its own page →
Contributors
101
Lines of Code
4,227
From
2012-08-05
To
2022-05-08
About libhybris/libhybris
libhybris is a compatibility layer that enables loading and using hardware drivers compiled for Android within standard Linux distributions using glibc or other C libraries. Android drivers are typically linked against bionic, Android's C library, which has different interfaces and behaviors than glibc. libhybris solves this by allowing processes running under glibc to load and communicate with bionic-based drivers, particularly graphics drivers and other hardware adaptation components.
To function, libhybris requires a stripped-down Android system running alongside the main Linux distribution, often as a systemd service or container. This Android system is patched to remove unnecessary components like zygote, surfaceflinger, and bootanim that aren't needed outside of a phone environment, while also addressing compatibility issues such as TLS access conflicts between bionic and glibc. The approach requires extracting Android headers for compilation and developing wrapper layers that translate between Android's driver interfaces and the Linux distribution's expected interfaces.
The project is actively used by several Linux distributions ported to Android-based hardware, including SailfishOS, Ubuntu Touch, Droidian, and FuriPhone through the Halium project. Since Android 8, many drivers have shifted to using binder-IPC, and the libhybris ecosystem provides complementary tools like libgbinder to interact with these modern driver interfaces directly from native Linux contexts.