Running Waydroid on NixOS using X11



NixOS Configuration

virtualisation = {
    waydroid = {
        enable = true;

environment.systemPackages = with pkgs; [weston];

Initialize Waydroid

This downloads the LineageOS image and installs it

# Fetch WayDroid images.
# You can add the parameters "-s GAPPS -f" to have GApps support.
sudo waydroid init

Start Waydroid

  1. Open the terminal and start the waydroid container

    sudo systemctl start waydroid-container
  2. Check status of container

    sudo journalctl -u waydroid-container
  3. Open terminal and start weston

  4. In the weston window, open a terminal and start Waydroid sesson in the background

    waydroid session start &
  5. Start the UI

    waydroid show-full-ui

Stop Waydroid

  1. Close weston window

  2. Stop waydroid container

    sudo systemctl stop waydroid-container

Remove user data

Only do this if you don't want to persist anything from that container

# Removing images and user data
sudo rm -r /var/lib/waydroid/* ~/.local/share/waydroid

Update Android

sudo waydroid upgrade

General Usage

# Start Android UI
waydroid show-full-ui

# List Android apps
waydroid app list

# Start an Android app
waydroid app launch <application name>

# Install an Android app
waydroid app install </path/to/app.apk>

# Enter the LXC shell
sudo waydroid shell

# Overrides the full-ui width
waydroid prop set persist.waydroid.width 608