There are many Android emulators for Windows and Linux, which can run Slideshow app. It has been successfully tested on Genymotion, Nox player, Bluestacks and others, but none of the emulators could be fully recommended for real-world digital signage usage.

I recently found two similar pieces of software for Linux, which allows you to run Android app on a regular Linux (such as Ubuntu), but they don’t use full operating system emulation, just containerization, which should have much less overhead. They are called Waydroid and Anbox, they are based on the same LXC containers and they are both open-source.

On the following lines, you will find out how usable Android containerization on Linux is with Slideshow app.

Test hardware

For testing I picked an older laptop, which has still some potential:

  • Model: Lenovo ThinkPad E540
  • CPU: Intel Core i7-4712MQ quad core 2.3 GHz
  • GPU: integrated Intel HD graphics
  • RAM: 8 GB DDR3
  • SSD: 128 GB
  • Display: 15.6″ 1366×768 (some of the tests were performed on larger displays connected through HDMI)
  • Operating system: Ubuntu 22.04.1 LTS

Installation of Waydroid

Waydroid has its own APT repository, so it can be installed and initialized on Ubuntu using a few command line commands:

export DISTRO="jammy"
sudo curl --proto '=https' --tlsv1.2 -Sf https://repo.waydro.id/waydroid.gpg --output /usr/share/keyrings/waydroid.gpg
echo "deb [signed-by=/usr/share/keyrings/waydroid.gpg] https://repo.waydro.id/ $DISTRO main" > ~/waydroid.list
sudo mv ~/waydroid.list /etc/apt/sources.list.d/waydroid.list
sudo apt update
sudo apt install waydroid
sudo waydroid init
sudo waydroid container start

During the initialization Waydroid also downloads the necessary Android image. Afterwards you can start Waydroid, then install Slideshow app and open the Android UI:

# In one terminal window
waydroid session start
# Wait until you get message "Android with user 0 is ready" and open another terminal
waydroid app install slideshow-android.apk
waydroid show-full-ui

The underlying Android version of Waydroid is 10 based on LineageOS and it is not rooted by default.

Installation of Anbox

Anbox is available as a Snap package in a beta channel. It can be installed using the following command line commands:

sudo apt-get install snap
sudo snap install --devmode --beta anbox

Afterwards Slideshow app can be installed using Android Debug Bridge (adb):

sudo apt install adb
adb install slideshow-android.apk

The app can be started in one of two ways:

# Start Anbox application manager user interface with all installed apps
anbox.appmgr
# Start directly Slideshow app
anbox launch --package=sk.mimac.slideshow --component=sk.mimac.slideshow.StartupActivity

The underlying Android version of Anbox is 7.1.1 and it is not rooted by default.

Testing Slideshow app

Both Waydroid and Anbox were able to start Slideshow app directly. The app ran without any lags in various resolutions, even moving RSS messages were very smooth.

Direct access to Slideshow’s web interface was possible only from the laptop with Ubuntu, because both containers were connected to the virtual network. Accessing the web interface from another device on the local network required setting up port forwarding.

One of the things I was most curious about was how they would handle different screen resolutions. After starting both Waydroid and Anbox on the laptop display with resolution 1366×768 pixels, I connected an external display with resolution 3440×1440 pixels via HDMI. Waydroid retained its original resolution and had to be restarted to adjust the window size to the new resolution. Anbox froze and crashed, but after restarting it also adjusted to the new resolution. Support for virtually any resolution supported by your graphic card is quite an advantage, as Android boxes based on ARM platform support usually only 16:9 aspect ratio and one or two screen resolutions.

Both containers were running in a window across the entire screen, so the Ubuntu taskbar and menu was always visible. Running in true fullscreen mode would require a little tweaking and hacking of Ubuntu settings.

Video decoding turned out to be quite a big problem. In Anbox is that there is absolutely no hardware or even software video decoder available by default. Software decoders can be enabled manually (see https://github.com/anbox/anbox/issues/904), but their performance is sub-optimal. In the end, there is no way to play any videos in Anbox with a watchable frame rate. Waydroid is in a little bit better state, it has video decoders available by default, some of them are reporting as hardware ones. While 720p video playback was smooth, 4K H.264 video was a little bit laggy and checking CPU usage revealed the decoding is done purely in software, not hardware.

Audio playback worked out-of-the box in Waydroid. In Anbox the audio output stayed silent, because of missing audio decoders (similar problem to video decoders).

Benchmark

The main advantage of running Android on Linux as a container (not virtualized), should be better performance, as the abstraction layer between the systems is much lighter. I checked this by running the benchmark embedded in Slideshow app. For comparison I also installed and benchmarked Genymotion emulator (which runs Android entirely emulated in a VirtualBox virtual machine) and Android-x86 (which runs Android directly on the hardware, as main OS) on the same laptop. The hardware was exactly the same, the only difference was in the software.

 WaydroidAnboxGenymotionAndroid-x86
Mathematical
calculations
304176230331
Database
operations
171144190234
File
read & write
6672122176
Graphic
processing
12020785183
Multithreading100327785631
Total points16648767121555

In the case of Waydroid the performance is excellent, in general it narrowly beats even running Android-x86 directly on the hardware. Anbox is slower, the main problem was parallel multithreading, although it correctly detected 4 cores / 8 threads of the CPU.

Slower storage performance of Waydroid and Anbox (even compared to Genymotion emulator) was probably due to the container file system, which is less optimized than direct file access.

Conclusion

Both Waydroid and Anbox can be an interesting replacement for an Android emulator, if you need Android apps running alongside your regular Linux operating system. The containerization (as opposed to full emulation) brings better performance and lower hardware load. The downside is that the first setup is a little bit more difficult and requires knowledge of Linux command line. Some of the commands had to be run multiple times, as the first time crashed with weird error messages.

As Waydroid has better performance, newer Android version and at least some support for video and audio playback, I suggest picking it over Anbox.

Unfortunately, in the real world digital signage usage (with or without Slideshow app) I can’t really see a place for Android in a container. For usual screen resolutions (FullHD, 4K) you can use Android boxes based on the ARM platform which are much cheaper than Laptop/PC with Intel/AMD CPU and just work out of the box, without a need for command line installation and tweaking. For unusual resolution you can use Android-x86 installed directly on a PC with Intel/AMD CPU, it will detect the resolution automatically, works without any quirks and although it still has only software video decoding, even 4K video is lag-free.

Waydroid

Anbox