I want to run waydroid on my raspberry pi in order to install and test android apps on a "mobile linux device" which i can connect to a touch display. I am running Raspbian OS 64 bit legacy (Debian 11, bullseye) on it. I installed waydroid like the official docs says and initialized with the VANILLA option. First time booting my pi and starting waydroid, the lineageOS splash screen appears for about 5 seconds and then crashes. Here are some Informations about my system and the log from waydroid itself.
Commands from here https://docs.waydro.id/debugging/getting-essential-information:
Command: sudo systemctl status waydroid-container.service
● waydroid-container.service - Waydroid Container
Loaded: loaded (/lib/systemd/system/waydroid-container.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2023-10-19 07:43:50 CEST; 32min ago
Main PID: 422 (waydroid)
Tasks: 5 (limit: 1599)
CPU: 1.507s
CGroup: /system.slice/waydroid-container.service
├─ 422 /usr/bin/python3 /usr/bin/waydroid -w container start
└─1869 dnsmasq --conf-file=/dev/null -u dnsmasq --strict-order --bind-interfaces --pid-file=/run/waydroid-lxc/dnsmasq.pid --listen>
Oct 19 07:43:50 raspberrypi systemd[1]: Started Waydroid Container.
Oct 19 07:56:55 raspberrypi dnsmasq[1869]: started, version 2.85 cachesize 150
Oct 19 07:56:55 raspberrypi dnsmasq[1869]: compile time options: IPv6 GNU-getopt DBus no-UBus i18n IDN2 DHCP DHCPv6 no-Lua TFTP conntrack ipset>
Oct 19 07:56:55 raspberrypi dnsmasq-dhcp[1869]: DHCP, IP range 192.168.240.2 -- 192.168.240.254, lease time 1h
Oct 19 07:56:55 raspberrypi dnsmasq-dhcp[1869]: DHCP, sockets bound exclusively to interface waydroid0
Oct 19 07:56:55 raspberrypi dnsmasq[1869]: reading /etc/resolv.conf
Oct 19 07:56:55 raspberrypi dnsmasq[1869]: using nameserver 8.8.8.8#53
Oct 19 07:56:55 raspberrypi dnsmasq[1869]: using nameserver 8.8.4.4#53
Oct 19 07:56:55 raspberrypi dnsmasq[1869]: read /etc/hosts - 5 addresses
Oct 19 07:56:56 raspberrypi waydroid[422]: [07:56:56] waiting 10 seconds for container to start...
Command: waydroid log
(000426) [08:57:50] % umount /var/lib/waydroid/rootfs
(000426) [08:57:50] % umount /var/lib/waydroid/rootfs
(000414) [08:57:58] % lxc-info -P /var/lib/waydroid/lxc -n waydroid -sH
STOPPED
(000414) [08:57:58] % mkdir -p /dev/binderfs
(000414) [08:57:58] % mount -t binder binder /dev/binderfs
(000414) [08:57:58] % ln -s /dev/binderfs/anbox-hwbinder /dev/binderfs/anbox-vndbinder /dev/binderfs/anbox-binder /dev/binderfs/features /dev/binderfs/vndbinder /dev/binderfs/hwbinder /dev/binderfs/binder /dev/binderfs/binder-control /dev/
(000414) [08:57:58] % modprobe -q ashmem_linux
(000414) [08:57:58] % chmod 666 -R /dev/binder
(000414) [08:57:58] % chmod 666 -R /dev/vndbinder
(000414) [08:57:58] % chmod 666 -R /dev/hwbinder
(000422) [07:43:50] % lxc-info -P /var/lib/waydroid/lxc -n waydroid -sH
STOPPED
(000422) [07:43:50] % mkdir -p /dev/binderfs
(000422) [07:43:50] % mount -t binder binder /dev/binderfs
(000422) [07:43:50] % ln -s /dev/binderfs/anbox-hwbinder /dev/binderfs/anbox-vndbinder /dev/binderfs/anbox-binder /dev/binderfs/features /dev/binderfs/vndbinder /dev/binderfs/hwbinder /dev/binderfs/binder /dev/binderfs/binder-control /dev/
(000422) [07:43:50] % modprobe -q ashmem_linux
(000422) [07:43:50] % chmod 666 -R /dev/binder
(000422) [07:43:50] % chmod 666 -R /dev/vndbinder
(000422) [07:43:50] % chmod 666 -R /dev/hwbinder
(001827) [07:56:48] % tail -n 60 -F /var/lib/waydroid/waydroid.log
(001827) [07:56:48] *** output passed to waydroid stdout, not to this log ***
(001829) [07:56:55] Starting waydroid session
(000422) [07:56:55] % /usr/lib/waydroid/data/scripts/waydroid-net.sh start
vnic is waydroid0
(000422) [07:56:55] % systemctl is-active -q nfcd
(000422) [07:56:55] % chmod 777 -R /dev/dri
(000422) [07:56:55] % chmod 777 -R /dev/fb0
(000422) [07:56:55] % chmod 777 -R /dev/video23
(000422) [07:56:55] % chmod 777 -R /dev/video22
(000422) [07:56:55] % chmod 777 -R /dev/video21
(000422) [07:56:55] % chmod 777 -R /dev/video20
(000422) [07:56:55] % chmod 777 -R /dev/video16
(000422) [07:56:55] % chmod 777 -R /dev/video15
(000422) [07:56:55] % chmod 777 -R /dev/video14
(000422) [07:56:55] % chmod 777 -R /dev/video13
(000422) [07:56:56] % chmod 777 -R /dev/video31
(000422) [07:56:56] % chmod 777 -R /dev/video18
(000422) [07:56:56] % chmod 777 -R /dev/video19
(000422) [07:56:56] % chmod 777 -R /dev/video12
(000422) [07:56:56] % chmod 777 -R /dev/video11
(000422) [07:56:56] % chmod 777 -R /dev/video10
(000422) [07:56:56] % mv /var/lib/waydroid/config_session /var/lib/waydroid/lxc/waydroid
(000422) [07:56:56] % mount -o ro /var/lib/waydroid/images/system.img /var/lib/waydroid/rootfs
(000422) [07:56:56] % mount -t overlay -o ro,lowerdir=/var/lib/waydroid/overlay:/var/lib/waydroid/rootfs,upperdir=/var/lib/waydroid/overlay_rw/system,workdir=/var/lib/waydroid/overlay_work/system,xino=off overlay /var/lib/waydroid/rootfs
(000422) [07:56:56] % mount -o ro /var/lib/waydroid/images/vendor.img /var/lib/waydroid/rootfs/vendor
(000422) [07:56:56] % mount -t overlay -o ro,lowerdir=/var/lib/waydroid/overlay/vendor:/var/lib/waydroid/rootfs/vendor,upperdir=/var/lib/waydroid/overlay_rw/vendor,workdir=/var/lib/waydroid/overlay_work/vendor,xino=off overlay /var/lib/waydroid/rootfs/vendor
(000422) [07:56:56] % mount -o bind /var/lib/waydroid/waydroid.prop /var/lib/waydroid/rootfs/vendor/waydroid.prop
(000422) [07:56:56] Save config: /var/lib/waydroid/waydroid.cfg
(000422) [07:56:56] % lxc-start -P /var/lib/waydroid/lxc -F -n waydroid -- /init
(000422) [07:56:56] New background process: pid=1901, output=background
(000422) [07:56:56] % lxc-info -P /var/lib/waydroid/lxc -n waydroid -sH
STOPPED
(000422) [07:56:56] % lxc-info -P /var/lib/waydroid/lxc -n waydroid -sH
RUNNING
(000422) [07:56:56] waiting 10 seconds for container to start...
lxc-start: waydroid: conf.c: run_buffer: 314 Script exited with status 126
lxc-start: waydroid: start.c: lxc_end: 958 Failed to run lxc.hook.post-stop for container "waydroid"
Command: grep -i -e android -e memfd -e ashmem "/boot/config-$(uname -r)"
grep: /boot/config-6.1.21-v8+: No such file or directory
Command: zgrep -i -e android -e memfd -e ashmem /proc/config.gz
gzip: /proc/config.gz: No such file or directory
Command: uname -a
Linux raspberrypi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux
Command: lsb_release -a
No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 11 (bullseye) Release: 11 Codename: bullseye
Command: waydroid --version
1.4.1
Command: lxc-checkconfig
pl4ko@raspberrypi:~ $ lxc-checkconfig
#LXC version 4.0.6
Kernel configuration not found at /proc/config.gz; searching...
Kernel configuration found at /lib/modules/6.1.21-v8+/build/.config
--- Namespaces ---
Namespaces: enabled
Utsname namespace: enabled
Ipc namespace: enabled
Pid namespace: enabled
User namespace: enabled
Network namespace: enabled
--- Control groups ---
Cgroups: enabled
Cgroup v1 mount points:
Cgroup v2 mount points:
/sys/fs/cgroup
Cgroup v1 systemd controller: missing
Cgroup v1 freezer controller: missing
Cgroup namespace: required
Cgroup device: enabled
Cgroup sched: enabled
Cgroup cpu account: enabled
Cgroup memory controller: enabled
Cgroup cpuset: enabled
--- Misc ---
Veth pair device: enabled, loaded
Macvlan: enabled, not loaded
Vlan: enabled, loaded
Bridges: enabled, loaded
Advanced netfilter: enabled, loaded
CONFIG_NF_NAT_IPV4: missing
CONFIG_NF_NAT_IPV6: missing
CONFIG_IP_NF_TARGET_MASQUERADE: enabled, not loaded
CONFIG_IP6_NF_TARGET_MASQUERADE: enabled, not loaded
CONFIG_NETFILTER_XT_TARGET_CHECKSUM: enabled, loaded
CONFIG_NETFILTER_XT_MATCH_COMMENT: enabled, not loaded
FUSE (for use with lxcfs): enabled, loaded
--- Checkpoint/Restore ---
checkpoint restore: missing
CONFIG_FHANDLE: enabled
CONFIG_EVENTFD: enabled
CONFIG_EPOLL: enabled
CONFIG_UNIX_DIAG: missing
CONFIG_INET_DIAG: enabled
CONFIG_PACKET_DIAG: missing
CONFIG_NETLINK_DIAG: missing
File capabilities:
Note : Before booting a new kernel, you can check its configuration
usage : CONFIG=/path/to/config /usr/bin/lxc-checkconfig
If there is anything you need, please feel free to ask me!
I already did some troubleshooting on Git and it seems that my lxc container is the issue here. Also i read something about the wrong kernel headers for this operation to work, but unfortunately i am not an linux expert at all.
Things i did before reaching out to you:
- I tried installing waydroid with Ubuntu Touch OS, Ubuntu Jammy, RaspbianOS 64bit (Debian 12, bookworm)
- several times reflashed image
- enabled wayland in the raspi config
- did the troubleshooting from the waydroid docs aswell