Umvirt Waydroid

Research project aimed to port Waydroid to Umvirt Linux From Scratch.

Installation

1. Disable display manager (if installed and enabled)

Disabling lightdm

    systemctl stop lightdm
    systemctl disable lightdm

2. Install weston

    chimp install weston

3. Install waydroid

    chimp install waydroid

4. Install Android images

Get *-vendor.zip and *-system.zip with same prefixes and unpack it.

Copy vendor.img and system.img to /usr/share/waydroid-extra/images

Note: At first try "lineage-18.1-20241116-MAINLINE-waydroid_x86_64-vendor.zip" and "lineage-18.1-20241116-VANILLA-waydroid_x86_64-system.zip". Then try other versions.

5. Install kernel

6. Reboot system

    reboot

Configuration

1. Edit user's temporary directory

edit /etc/profile (as root) change XDG_USER_DIR from

    export XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR:-/tmp/xdg-$USER}

to

    export XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR:-/run/user/$(id -u)}

tip: to check XDG_USER_DIR value run (as user, after logout)

    env | grep XDG_USER_DIR

2. Add target user to "seat" group (as root) in order to run weston and other Wayland desktop environments.

    usermod -aG seat user

3. Enable and start seatd service

    systemctl enable seatd
    systemctl start seatd

or

    systemctl enable --now seatd

tip: To check seatd status (as root) type

    systemctl status seatd

4. Create user's temporary directory (as root)

    mkdir -p /run/user/1000
    chown 1000:1000 /run/user/1000
    chmod 700 /run/user/1000

5. Check user ability to run weston (as user)

    dbus-launch weston

Tip: press [ctrl]+[alt]+[backspace] to exit.

6. Edit pulseaudio config (as root)

to

    exit-idle-time = -1

7. Waydroid config

or

    systemctl enable --now waydroid-container

tip: To check waydroid-container status (as root) type

    systemctl status waydroid-container

7.4 Check that memfd module for waydroid container is enabled in /var/lib/waydroid/waydroid_base.prop

    cat /var/lib/waydroid/waydroid_base.prop | grep memfd

You should get

    sys.use_memfd=true

Running

1. Create user's temporary directory (as root)

    mkdir -p /run/user/1000
    chown 1000:1000 /run/user/1000
    chmod 700 /run/user/1000

2. Login as user and run weston

    dbus-launch weston

3. Open new terminal and start pulseaudio daemon

    pulseaudio --start

4. In terminal run waydroid session

    waydroid session start

message "Android with user 0 is ready" should appear

ready

5. Open new terminal and open Android screen

    waydroid show-full-ui

showfullui

showfullui-works

Tip: to close Android session open new terminal and run

    waydroid session stop

session stop