Yanqiyu/waydroid

Description

Waydroid (and dependencies) packaged for Fedora on x86_64 and aarch64

※ I only have the dependencies packaged for now

Installation Instructions

Make sure you're using a kernel that supports ashmem and binder to use Waydroid. One such example is XanMod kernel which can be installed on Fedora
  1. Add the Copr repository

sudo dnf copr enable rmnscnce/waydroid

  1. Install the Waydroid dependencies

sudo dnf in python3-gbinder-python

  1. Install Waydroid

Active Releases

The following unofficial repositories are provided as-is by owner of this project. Contact the owner directly for bugs or issues (IE: not bugzilla).

* Total number of packages downloaded in the last seven days.


This is a companion discussion topic for the original entry at https://copr.fedorainfracloud.org/coprs/yanqiyu/waydroid/

Waydroid show-full-ui error

(004510) [18:09:48] WayDroid container is STOPPED
(004512) [18:09:48] WayDroid session is not started
(003081) [18:11:58] % modprobe binder_linux devices=“anbox-binder,anbox-vndbinder,anbox-hwbinder”
(003081) [18:11:58] % mkdir -p /dev/binderfs
(003081) [18:11:58] % mount -t binder binder /dev/binderfs
(003081) [18:11:58] % ln -s /dev/binderfs/anbox-hwbinder /dev/binderfs/anbox-vndbinder /dev/binderfs/anbox-binder /dev/binderfs/binder-control /dev/
(003081) [18:11:58] % modprobe ashmem_linux
(003081) [18:11:58] % chmod 666 -R /dev/anbox-binder
(003081) [18:11:58] % chmod 666 -R /dev/anbox-vndbinder
(003081) [18:11:58] % chmod 666 -R /dev/anbox-hwbinder
(003081) [18:11:58] Container manager is waiting for session to load
(003243) [18:12:57] Starting waydroid session
(003243) [18:12:57] Save session config: /var/lib/waydroid/session.cfg
(003243) [18:12:57] UserMonitor service is not even started
(003243) [18:12:57] Clipboard service is not even started
(003081) [18:12:57] % /usr/lib/waydroid/data/scripts/waydroid-net.sh start
success
(003081) [18:12:58] % waydroid-sensord /dev/anbox-hwbinder
(003081) [18:12:58] New background process: pid=3295, output=background
(003081) [18:12:58] % mount /var/lib/waydroid/images/system.img /var/lib/waydroid/rootfs
[waydroid-sensors-daemon] failed to call load_plugin
[waydroid-sensors-daemon] Failed to create SensorfwAccelerometerSensor: Could not create sensorfw backend
[waydroid-sensors-daemon] failed to call load_plugin
[waydroid-sensors-daemon] Failed to create SensorfwGyroscopeSensor: Could not create sensorfw backend
[waydroid-sensors-daemon] failed to call load_plugin
[waydroid-sensors-daemon] Failed to create SensorfwHumiditySensor: Could not create sensorfw backend
[waydroid-sensors-daemon] failed to call load_plugin
[waydroid-sensors-daemon] Failed to create SensorfwLightSensor: Could not create sensorfw backend
[waydroid-sensors-daemon] failed to call load_plugin
[waydroid-sensors-daemon] Failed to create SensorfwMagnetometerSensor: Could not create sensorfw backend
[waydroid-sensors-daemon] failed to call load_plugin
[waydroid-sensors-daemon] Failed to create SensorfwOrientationSensor: Could not create sensorfw backend
[waydroid-sensors-daemon] failed to call load_plugin
[waydroid-sensors-daemon] Failed to create SensorfwPressureSensor: Could not create sensorfw backend
[waydroid-sensors-daemon] failed to call load_plugin
[waydroid-sensors-daemon] Failed to create SensorfwProximitySensor: Could not create sensorfw backend
[waydroid-sensors-daemon] failed to call load_plugin
[waydroid-sensors-daemon] Failed to create SensorfwStepcounterSensor: Could not create sensorfw backend
[waydroid-sensors-daemon] failed to call load_plugin
[waydroid-sensors-daemon] Failed to create SensorfwTemperatureSensor: Could not create sensorfw backend
(003081) [18:12:58] % mount -o remount,ro /var/lib/waydroid/images/system.img /var/lib/waydroid/rootfs
(003081) [18:12:58] % mount /var/lib/waydroid/images/vendor.img /var/lib/waydroid/rootfs/vendor
(003081) [18:12:58] % mount -o remount,ro /var/lib/waydroid/images/vendor.img /var/lib/waydroid/rootfs/vendor
(003081) [18:12:58] % mount -o bind /var/lib/waydroid/waydroid.prop /var/lib/waydroid/rootfs/vendor/waydroid.prop
(003081) [18:12:58] % mount -o bind /home/hellgate/.local/share/waydroid/data /var/lib/waydroid/data
(003081) [18:12:58] % umount -l /sys/fs/cgroup/schedtune
umount: /sys/fs/cgroup/schedtune: no mount point specified.
(003081) [18:12:58] % chmod 777 -R /dev/ashmem
(003081) [18:12:58] % chmod 777 -R /sys/kernel/debug/sync/sw_sync
(003081) [18:12:58] % chmod 777 -R /dev/dri
(003081) [18:12:58] % chmod 777 -R /dev/fb0
(003081) [18:12:58] % chmod 777 -R /dev/video1
(003081) [18:12:58] % chmod 777 -R /dev/video0
(003081) [18:12:58] % lxc-start -P /var/lib/waydroid/lxc -F -n waydroid – /init
(003081) [18:12:58] New background process: pid=3331, output=background
(003081) [18:12:58] Save session config: /var/lib/waydroid/session.cfg
[gbinder] Service manager /dev/anbox-hwbinder has appeared
[waydroid-sensors-daemon] Waydroid Sensors HAL service ready.
lxc-start: waydroid: conf.c: run_buffer: 323 Script exited with status 126
lxc-start: waydroid: start.c: lxc_end: 996 Failed to run lxc.hook.post-stop for container “waydroid”

Don’t install waydroid-sensors for now, that is problematic now

ah ok now works great! Thanks you so much dude

Hello, rmnscnce here!

Seriously, @yanqiyu thank you for coming around to finish up the Waydroid packaging. I haven’t got around it because I didn’t manage to boot it successfully after all these times.

1 Like

problem with selinux

ERROR: [Errno 13] Permission denied: ‘/dev/binderfs/binder-control’

:thinking:

Since I am not using kernel built with binderfs, so the selinux module included don’t have related policy, can you run waydroid in permissive mode and run sudo ausearch -ts today --raw | audit2allow -M waydroid, and send me the waydroid.te file generated?

waydroid.te

module waydroid 1.0;

require {
type init_t;
type unlabeled_t;
type kernel_t;
type xdm_t;
type lib_t;
class chr_file { ioctl map open read write };
class dir { add_name remove_name };
class file { create rename unlink write };
class key read;
}

#============= init_t ==============
allow init_t lib_t:dir { add_name remove_name };
allow init_t lib_t:file { create rename unlink write };
allow init_t unlabeled_t:chr_file { ioctl open read write };

#!!! This avc can be allowed using the boolean ‘domain_can_mmap_files’
allow init_t unlabeled_t:chr_file map;

#============= xdm_t ==============
allow xdm_t kernel_t:key read;

@yanqiyu Is there a hosted repository for the waydroid.spec so that we can contribute?
The main issue I find currently is that a proper waydroid system user is not created to own the installed files.

Usually we don’t create separate user to own installed files, unless upstream supports and suggests to. And for a hosted spec file: GitHub - karuboniru/waydroid-spec: File used to package waydroid for Fedora

sudo dnf in waydroid
Last metadata expiration check: 0:34:28 ago on Di 14 Jun 2022 14:57:13 CEST.
Error:
Problem: conflicting requests

  • nothing provides python-gbinder-python needed by waydroid-1.2.0-3.20211021git1.2.0.fc36.x86_64

seems like it’s just redirecting to the other repo that’s not existing anymore? not entirely sure:

Error 404: Not Found

Project rmnscnce/waydroid does not exist.