Maccraft123 / Cadmium

GNU General Public License v3.0
316 stars 65 forks source link

Can't run Waydroid #150

Closed AsessionGuy closed 2 months ago

AsessionGuy commented 2 years ago

I was able to run cadmium on the lenovo chromebook duet using the image provided and flashing it into a pendrive. It successfully installs debian with phosh to emmc and following the steps from waydro.id for debian also does waydroid. After running systemctl start waydroid-container.service and waydroid session start nothing happens. I will post waydroid log soon.

AsessionGuy commented 2 years ago
(000286) [23:49:07] % modprobe binder_linux devices="anbox-binder,anbox-vndbinder,anbox-hwbinder"
(000286) [23:49:07] % modprobe -q ashmem_linux
(003350) [23:49:07] % chmod 666 -R /dev/anbox-binder
(003350) [23:49:07] % chmod 666 -R /dev/anbox-vndbinder
(003350) [23:49:07] % chmod 666 -R /dev/anbox-hwbinder
(003350) [23:49:07] Container manager is waiting for session to load
(003355) [23:49:09] Save session config: /var/lib/waydroid/session.cfg
(003355) [23:49:09] UserMonitor service is not even started
(003355) [23:49:09] Clipboard service is not even started
(003350) [23:49:10] % /usr/lib/waydroid/data/scripts/waydroid-net.sh start
vnic is waydroid0
/usr/lib/waydroid/data/scripts/waydroid-net.sh: 88: -I: not found
Failed to setup waydroid-net.
/usr/lib/waydroid/data/scripts/waydroid-net.sh: 210: -D: not found
/usr/lib/waydroid/data/scripts/waydroid-net.sh: 211: -D: not found
/usr/lib/waydroid/data/scripts/waydroid-net.sh: 212: -D: not found
/usr/lib/waydroid/data/scripts/waydroid-net.sh: 213: -D: not found
/usr/lib/waydroid/data/scripts/waydroid-net.sh: 214: -D: not found
/usr/lib/waydroid/data/scripts/waydroid-net.sh: 215: -D: not found
/usr/lib/waydroid/data/scripts/waydroid-net.sh: 216: -t: not found
/usr/lib/waydroid/data/scripts/waydroid-net.sh: 217: -t: not found
(003350) [23:49:10] % umount /var/lib/waydroid/rootfs/vendor/waydroid.prop
(003350) [23:49:10] % umount /var/lib/waydroid/rootfs/vendor
(003350) [23:49:10] % umount /var/lib/waydroid/rootfs
(003350) [23:49:10] % mount /var/lib/waydroid/images/system.img /var/lib/waydroid/rootfs
(003350) [23:49:10] % mount -o remount,ro /var/lib/waydroid/images/system.img /var/lib/waydroid/rootfs
(003350) [23:49:10] % mount /var/lib/waydroid/images/vendor.img /var/lib/waydroid/rootfs/vendor
(003350) [23:49:10] % mount -o remount,ro /var/lib/waydroid/images/vendor.img /var/lib/waydroid/rootfs/vendor
(003350) [23:49:10] % mount -o bind /var/lib/waydroid/waydroid.prop /var/lib/waydroid/rootfs/vendor/waydroid.prop
(003350) [23:49:10] Save config: /var/lib/waydroid/waydroid.cfg
(003350) [23:49:10] % chmod 777 -R /dev/ashmem
(003350) [23:49:10] % chmod 777 -R /dev/dri
(003350) [23:49:10] % chmod 777 -R /dev/fb0
(003350) [23:49:10] % lxc-start -P /var/lib/waydroid/lxc -F -n waydroid -- /init
(003350) [23:49:10] New background process: pid=3410, output=background
lxc-start: waydroid: ../src/lxc/cgroups/cgroup2_devices.c: bpf_program_load_kernel: 332 Invalid argument - Failed to load bpf program: (null)
lxc-start: waydroid: ../src/lxc/start.c: lxc_spawn: 1731 Invalid argument - Failed to clone a new set of namespaces
lxc-start: waydroid: ../src/lxc/start.c: __lxc_start: 2107 Failed to spawn container "waydroid"
lxc-start: waydroid: ../src/lxc/conf.c: run_buffer: 321 Script exited with status 126
lxc-start: waydroid: ../src/lxc/start.c: lxc_end: 985 Failed to run lxc.hook.post-stop for container "waydroid"
lxc-start: waydroid: ../src/lxc/tools/lxc_start.c: main: 306 The container failed to start
lxc-start: waydroid: ../src/lxc/tools/lxc_start.c: main: 311 Additional information can be obtained by setting the --logfile and --logpriority options
(003350) [23:49:10] waiting 10 seconds for container to start...
(003350) [23:49:11] waiting 9 seconds for container to start...
(003350) [23:49:12] waiting 8 seconds for container to start...
(003350) [23:49:13] waiting 7 seconds for container to start...
(003350) [23:49:14] waiting 6 seconds for container to start...
(003350) [23:49:15] waiting 5 seconds for container to start...
(003421) [23:49:16] % tail -n 60 -F /var/lib/waydroid/waydroid.log
(003421) [23:49:16] *** output passed to waydroid stdout, not to this log ***
(003350) [23:49:16] waiting 4 seconds for container to start...
(003350) [23:49:17] waiting 3 seconds for container to start...
(003350) [23:49:18] waiting 2 seconds for container to start...
(003350) [23:49:19] waiting 1 seconds for container to start...
(003350) [23:49:20] ERROR: container failed to start
(003350) [23:49:20] See also: <https://github.com/waydroid>
(003350) [23:49:20] Traceback (most recent call last):
  File "/usr/lib/waydroid/tools/__init__.py", line 68, in main
    actions.container_manager.start(args)
  File "/usr/lib/waydroid/tools/actions/container_manager.py", line 131, in start
    raise OSError("container failed to start")
OSError: container failed to start

(003427) [23:49:21] UserMonitor service is not even started
(003427) [23:49:21] Clipboard service is not even started
(003355) [23:49:21] UserMonitor service is not even started
(003355) [23:49:21] Clipboard service is not even started
(003429) [23:50:45] % tail -n 60 -F /var/lib/waydroid/waydroid.log
(003429) [23:50:45] *** output passed to waydroid stdout, not to this log ***
(003431) [23:51:13] % tail -n 60 -F /var/lib/waydroid/waydroid.log
(003431) [23:51:13] *** output passed to waydroid stdout, not to this log ***
AsessionGuy commented 1 year ago

Ok so I found out that probably this is caused to missing kernel modules ashmem and binder. It works on lenovo chromebook duet with custom build with these modules enabled. (make sure to enable psi too) so you don't lose the ability to run android apps.

Maccraft123 commented 2 months ago

Done