I am trying to install Waydroid headlessly into my Incus container on a Debian bookworm VM hosted on my Raspberry PI 5. I want the container itself be as secure as possible.
First thing I encountered is that Waydroid needs binder devices. I finally handled this with:
linux.kernel_modules: binder_linux
devices:
binder:
source: /dev/binder
type: unix-char
hwbinder:
source: /dev/hwbinder
type: unix-char
vndbinder:
source: /dev/vndbinder
type: unix-char
I’m not sure if this is a secure solution by exposing these devices from my host. But Debian 12 Linux kernel seems to support only binder_linux but not binderfs.
Second thing I encountered is that after I tried to start, Waydroid tried mount:
$ waydroid session start
RuntimeError: Command failed: % mount -o ro /var/lib/waydroid/images/system.img /var/lib/waydroid/rootfs
I found the file is in ext2 format:
$ file /var/lib/waydroid/images/system.img
/var/lib/waydroid/images/system.img: Linux rev 1.0 ext2 filesystem data, UUID=xxx (extents) (large files) (huge files)
So after stopping the container, I added:
security.syscalls.intercept.mount: "true"
security.syscalls.intercept.mount.fuse: "ext2=fuse2fs"
security.syscalls.intercept.mount.shift: "true"
Then I cannot start my container again by issuing “incus start …”. Every time after I use the command, “incus list” reports it’s not starting. Also “incus info … --show-log” and /var/log/incus/ has nothing related in log.
I narrow this down and find even if I only enable the mount option itself, I still cannot start the container:
security.syscalls.intercept.mount: "true"
I use bookworm-backports with Incus version 6.0.1.
Is this config option not supported by this version of Incus or some other reason?