Android apps on Linux, without an emulator and without an Android device image.
a4l runs the app, not the OS. An unmodified APK's DEX executes on real ART in one glibc process,
next to a4l's native core and the app's own NDK libraries. The app is an xdg-toplevel (or an
ivi-shell surface) on the compositor the product already runs. There is no second compositor, no
binder, no device image and no VM boundary. The Java framework is a vendored Apache-2.0 AOSP
subset. a4l is clean-room C++23 and Apache-2.0; it shares no source with the GPL-3.0 project
that came before it.
It is meant for a Linux product that needs an Android app it does not own: an IVI head unit, a kiosk, a panel, a workstation. It runs on x86-64 and arm64.
Seen on screen on an x86-64 desktop and on Raspberry Pi 4 and 5 boards, as of 2026-12-01. The corpus row is a headless count from the same day.
| App | What works |
|---|---|
| Sonos | Sign-in and everything tried |
| Pandora | Everything tried |
| Spotify | Works, and so does its Android Automotive build |
| Sign-in, chat, audio calls | |
| Telegram | Sign-in, chat, audio, embedded YouTube video |
| Microsoft Teams | Calls |
| Waze | Works |
| Zwift | Signs in and runs |
| Trailforks | Sign-in, the map with a location, activities and stats |
| SuperTuxKart 1.5 | Tutorial race, steered by touch |
| Gems of War | Runs to its age check, which needs the Play Store |
| F-Droid corpus (18 apps) | 17 reach layout |
Sign-in by QR code or by email works. Sign-in through Google or Facebook has not been tested.
By toolkit:
- Compose and Views draw through Skia (Ganesh Vulkan) into a dma-buf, with no copy.
- Flutter runs on an unmodified engine.
libflutter.soloads against a4l'slibandroid.soand its EGL/GLES calls forward to host Mesa. A Flutter app with Rive animations works (Sonos). - WebView composites through Chromium's Vulkan functor.
- Video in a
SurfaceViewgoes to awl_subsurfaceunder the toplevel, as on Android. - Native GL (
GLSurfaceView, SDL2, Unity, libGDX) renders with Mesa straight to a4l'swl_surface.
Not there yet: Google Play services and the Play Store, more than one app at a time with Binder
between them, and confinement of an app's native code. An app that checks its own integrity
will usually refuse to start. docs/app-corpus-status.md has the
F-Droid corpus app by app, and SECURITY.md says what a4l does and does not
check about an APK.
a4l needs a host ART build from an AOSP tree at the tag in
third_party/aosp/METADATA:
source build/envsetup.sh && lunch aosp_x86_64-eng && m dalvikvm dex2oat libartWith that and a Wayland session:
export ACL_AOSP_ROOT=<aosp> # the build and the tools read the tree from here
meson setup build && meson compile -C build
export ACL_ART_HOME=$ACL_AOSP_ROOT/out/host/linux-x86
ACL_PRESENT_GPU=1 ACL_RUN_TIMEOUT=0 tools/run-apk.sh app.apk --presentNo path is tried for the AOSP tree that you did not name. With ACL_AOSP_ROOT unset the build
still configures: it says so in its summary, leaves out what needs the tree (the stub
android.jar, attaching app threads to bionic), and the tests that need it skip.
ACL_PRESENT_GPU=1 selects the zero-copy path that real apps need. Without it a4l uses wl_shm,
and a first run usually looks empty. tools/run-apk.sh builds the framework jars on first use
and stops the app after 60 seconds unless ACL_RUN_TIMEOUT=0.
On arm64 AOSP has no glibc host ART. The patch set in
tools/aosp/glibc-arm64 builds one, and the Raspberry Pi
rows above run on it. docs/split-process-art.md describes the
older path that keeps ART in its own bionic process.
Figure 1 draws the boundary the rest of the design follows. Everything inside the dashed
enclosure is one glibc process, on x86-64 and on arm64; everything below it is the stack the
product already ships, unchanged. No Android compositor, no binder and no second graphics driver
appear in the drawing because none of them is in the process. On arm64 that takes the glibc host
ART from tools/aosp/glibc-arm64. With only the stock bionic
host ART, ART runs in a second process (docs/split-process-art.md),
as the note on the sheet says. The accent marks what sits on a zero-copy path.
Figure 2 follows one frame from the app to the display controller on each of the four present
paths. The first three reach the compositor with no CPU copy, and on the native-GL path a4l
allocates no buffer at all -- Mesa renders and commits a4l's own wl_surface inside
eglSwapBuffers. The fourth is the default, and it is the usual reason a first run without
ACL_PRESENT_GPU=1 looks empty.
Ask in Discussions. To report how an app runs, working or not, use the app report form.
plan.md— full design, ADRs, phases, risk register (source of truth).PROVENANCE.md— enforced source/license policy. The overriding rule: never open the GPL-3.0 predecessor's tree; take the Android API surface from Apache-2.0 AOSP (AOSP-down, not GPL-across).docs/clean-room.md— the clean-room protocol and current posture.docs/adr/— architecture decision records.docs/README.md— an index of everything else underdocs/.CONTRIBUTING.md— SPDX + provenance + DCO requirements.
Build system is Meson (native to the Wayland/PipeWire/Mesa stack this integrates against). Heavy vendored deps keep their own builds — Skia via GN, AOSP ART/frameworks via Soong — and are consumed as prebuilt imported artifacts. The unit tests need none of them.
meson setup build
meson compile -C build
./build/src/shell/a4l # prints version + linked module roster
meson test -C build # Tier A unit tests (needs: meson wrap install catch2)Automotive profile is ON by default. Build the phone subset (must emit zero automotive symbols) or cross-compile for a board:
meson setup build-phone -Dprofile_automotive=false
meson setup build-rk3588 --cross-file cross/rk3588.iniEach optional part has a Meson feature option of its name: wayland, skia, vulkan, gl,
dmabuf_codec, gstreamer, ffmpeg, drm_cxx, alsa, pipewire, libcamera, sdbus,
secret, crypto. The default, auto, builds a part when its dependencies are found;
enabled makes a missing dependency a configure error, and disabled leaves the part out
whatever is installed. meson configure build lists them.
jni.h is required. It comes from the JDK whose java is on PATH, and a4l records that
JDK's javac and libjvm.so paths for --vm=jvm. A build with no JDK, or one whose
build machine is not where a4l will run, gives the headers and the paths itself, and can
turn off the search for an AOSP checkout's android.jar:
meson setup build --buildtype=plain \
-Djni_include=/path/to/jni-headers -Dlibjvm=libjvm.so -Dandroid_jar=none \
-Dskia=enabled -Dskia_prefix=/path/to/skia -Dvulkan=enabled -Dwayland=enabledAttaching an app's own threads to bionic needs bionic's internal layout, measured from the
AOSP tree the bionic is staged from. By default the build measures it from $ACL_AOSP_ROOT
and leaves attach out, without failing, when that is unset or has no tree. A build made apart from that tree takes the layout as a file, and can require it:
tools/gen-bionic-offsets.sh --require bionic_offsets.h aarch64 # where the AOSP tree is
meson setup build -Dbionic_offsets=/path/to/bionic_offsets.h # where a4l is built
meson setup build -Dbionic_attach=enabled # or: no tree is an errorThe two JNI libraries Soong builds (libacl_graphics_jni.so, libacl_gles_jni.so) carry a
stamp of their sources, and a4l one of the sources it was built beside. To check a staged
runtime against the a4l it will run with, on any machine:
a4l check-runtime path/to/libacl_graphics_jni.so path/to/libacl_gles_jni.so # exit 0: both matchmeson install installs a4l alone: bin/a4l, and with FFmpeg
<libdir>/a4l/libsoundpool.so, which a4l opens from there itself. Nothing of a subproject
built from a wrap is installed.
An ivi-shell compositor (Weston's ivi-shell.so with a layer-manager controller) shows a
surface only when it has an ivi id that the controller puts on a layer. Give a4l the id:
a4l run app.apk --present --ivi-surface-id=9000a4l then takes its window role from ivi_application and not xdg_wm_base, and takes the
size the controller sends as it takes a toplevel's. ACL_WL_SHELL=ivi with
ACL_IVI_SURFACE_ID does the same. There is no id to ask the compositor for: pick one the
platform has set aside. Run 2026-11-16 on Weston 15 with a test controller, View and GL
apps, single-process and --split, and the wl_shm presenter on Weston 8 on an SA8155P
board; wm-ivi-shell is the test. Not done: ivi_wm (a4l does not place or raise its own
surface), and input was not tried.
src/{runtime,pkg,wm,gfx,input,audio,media,svc,ndk,shell} native core (C++23)
src/svc/car/ vehicle property hub (automotive)
hosts/{cal,media} Car App Library + media bridges (automotive)
third_party/{aosp,skia} vendored, pinned, prebuilt-consumed
specs/ sanitized functional specs (clean-room)
tests/{unit,integration,cts-runner,app-corpus} Tier A/B + CTS oracle + real-app corpus
docs/adr/ architecture decision records
scripts/, .github/workflows/ CI license/provenance/SPDX gates (Gate G0)
Apache-2.0. Copyright 2026 Contributors to a4l, stated in NOTICE.
LICENSE holds the license text verbatim, because automated license
detection matches that file by content rather than by what it claims; LICENSES/
holds the same text under its SPDX identifier, where the REUSE
specification looks for it. Every file in the tree declares its own license with an SPDX
tag, REUSE.toml records the copyright holder for files that cannot carry a header, and
reuse lint verifies that nothing is unaccounted for.