SPURV Runs Android Apps in Linux over Wayland

We’ve previously seen it was possible to run Android apps natively inside Linux thanks to Anbox that leverages the Linux kernel in Ubuntu for better integration and performance, and uses an LXC container to run Android operating system.

Collabora now offers a different solution with SPURV that runs the full Android OS, including a separate Linux kernel, in its own container and works over Wayland thanks to a graphics bridge from Android to Wayland.

SPURV Architecture
Click to Enlarge

Four main components are part of the implementation:

  • Android target device – This component integrates SPURV into Android by using the device infrastructure that the Android codebase provides, and the company specifically the target runs inside of a systemd-nspawn container.
  • SPURV Audio – Bridges the Android Audio Hardware Abtraction Layer (HAL) to the host PulseAudio stack.
  • SPURV HWComposer – Integrates Android windows into Wayland by implementing a HWC-to-Wayland bridge, where HWC is the Android API for implementing display & buffer management. The composer also manages user input like key presses or touch screen events.
  • SPURV DHCP – Simple DHCP implementation that enable the Android network stack to run within a container.

The video below shows Angry Bird android apps running along side Wayland apps on RDU2 platform powered by NXP i.MX6 quad core processor.

Compared to Anbox, SPURV has the full OS running in a container, increases isolation of Android applications, enhancing security and privacy, but there are footprint and performance costs associated with loading an entire OS on top of the guest OS.

If you want to try it yourself, you’ll have to put some efforts into it. First, you’ll need to run a Linux distribution with Wayland support, and then build everything from source (Gitlab) following those instructions.

Via Liliputing and Android Police

Share this:

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK Pi 4C Plus
Subscribe
Notify of
guest
The comment form collects your name, email and content to allow us keep track of the comments placed on the website. Please read and accept our website Terms and Privacy Policy to post a comment.
7 Comments
oldest
newest
blu
blu
5 years ago

This is truly nice, and perhaps the one right way ™ to do android under linux.

Robert Foss
5 years ago

Author of original article here.
It is one way, and it is very similar to how ChromeOS used to do Android compatability.

blu
blu
5 years ago

Good work documenting it! Do you have plans to get a setup for other wayland-enabled platforms besides imx6, e.g. exynos 5422 (odroid-XU4), or are you bound to a certain hw and kernel version?

BTW, why do you say chros ‘used to’? — AFAIK it does it similarly even today.

zoobab
5 years ago

“uses an LXC container to run Android operating system.”

LXC is a pain in the butt, why not a simple Docker oneliner?

sola
5 years ago

This is great, I would love to see seamless integration of Android apps into ordinary Linux desktops like Ubuntu.

The main appeal of ChromeOS to me is Android application integration.

If GNU Linux distros could run Android apps, I wouldn’t care much about Chromebooks and ChromeOS.

Especially if affordable Linux laptops become a thing (like the Pinebook Pro but without their nonsensical ordering process)

Theguyuk
Theguyuk
5 years ago

Google has been working for awhile to mainline parts of Android in Linux.

Khadas VIM4 SBC