Running Android and Wayland on Embedded Devices


Let's get Android running next to Wayland on an i.MX6 based Nitrogen6_MAX board.

A previous post introduced the SPURV Android compatibility layer for Wayland based Linux environment.
In this post we're going to dig into how you can run an Android application on the very common i.MX6 based Nitrogen6_MAX board from Boundary Devices.

Install dependencies

sudo apt install \
    apt-transport-https \
    bmap-tools \
    ca-certificates \
    curl \
    git \
    gnupg2 \
    repo \
    software-properties-common \
    u-boot-tools \

Set up Docker container for building

# Install Docker
curl -fsSL | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] $(lsb_release -cs) stable"
sudo apt update
sudo apt install docker-ce

# Set up privileges for Docker
sudo usermod -aG docker ${USER}
su - ${USER}

# Fetch Docker image
docker pull godebos/debos:latest


Build Android

mkdir android; cd android
repo init -u -b android-9.0.0_r10
git clone .repo/local_manifests/
repo sync -j15
. build/
lunch spurv-eng
make -j12
cd ..

Build Linux Kernel

git clone -b android-container_v5.1-rc5
cd linux
sh ../android/device/freedesktop/spurv/
cd ..

Create root filesystem

Just a kernel does not make an OS, so we're using Debian as a base.
The way we're going to create the root filesystem is using debos, which is a tool for creating Debian based OS images.

Create & flash image

Now we're ready to integrate all of the above into one coherent image. This is where the Nitrogen6_MAX devboard targeting comes in.

git clone
sudo debos/ -b /dev/mmcblk0

The platform specific parts are contained in uboot_nitrogen6qp-max.scr and


Pop the flashed SD-card into your device and restart it, and then log in as root/root.

In order to start Android, run one of these two commands:

# Launch just and Android application

Starting the Android application might take a minute or two, but Weston should start immediately.


A lot of different contributors enabled this work, both directly and indirectly.

This post has been a part of work undertaken by my employer Collabora.

Tags: linux · open source · graphics · wayland · android · 3d · acceleration · imx6 · nitrogen6