Libhybris: Load Android Libraries, Override Bionic Symbols

Written by Michael Larabel in Intel on 25 September 2012 at 07:22 PM EDT. 8 Comments
INTEL
Several Phoronix readers have written in about libhybris, a way to load Android libraries while overriding some Bionic symbols with those symbols from glibc.

So, introducing libhybris, Hybris is a solution that commits hybris, by allowing us to use bionic-based HW adaptations in glibc systems. Practically, if you know what libdl is, this is a libdl-API-like implementation that happens to be able to load Android libraries, and overrides some symbols from bionic with glibc based ones.

The applications for this is for example being able to use binary-only android HW adaptation parts - GPU, RIL, etc. Included are example thin wrappers for libEGL and libGLESv2, with test programmes. The solution is a bit alpha and the pthread implementation needs wrapping/sanity, but currently, it works and shows quite interesting promise.

Shown on video is a unmodified test program, built against Mesa headers and glibc, using GL shaders, fullscreen on a Qualcomm GPU on a HP Touchpad (thanks to WebOS Developer Relations for sending me one) with the GPU userland driver being utilized. Android kernel is utilized with glibc userland. Future directions can be Wayland on top of this solution, utilizing vendor RIL .so's, etc. Come to #mer on irc.freenode.net to discuss this more and get involved in testing this on various hardware and do more amazing demos than the one shown on the demo.
Continue reading on Google Plus.

The code to libhybris is currently hosted on GitHub.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week