Installation Guide

This guide provides instructions for installing Waydroid from source. For most users, we recommend using pre-built packages for your distribution if available.

Dependencies

Waydroid has several dependencies to function correctly. Based on the Debian packaging configuration, the following packages are required on a Debian-based system (like Ubuntu).

Required Packages

  • lxc: The underlying container runtime.
  • python3-gbinder: For communication with Android services.
  • python3-gi: Python bindings for GObject Introspection.
  • gir1.2-gtk-3.0: GTK+ GObject Introspection data.
  • python3-dbus: D-Bus bindings for Python.
  • dbus: The D-Bus message bus system.
  • polkitd or policykit-1: Framework for controlling system-wide privileges.
  • iptables: For network configuration.

On a Debian/Ubuntu system, you can install them with:

sudo apt install lxc python3-gbinder python3-gi gir1.2-gtk-3.0 python3-dbus dbus policykit-1 iptables

Optional Dependencies

  • AppArmor: For enhanced container security. The dh-apparmor build dependency and install_apparmor Makefile target suggest that AppArmor profiles are included. If you have AppArmor enabled on your system, these will be used automatically.

Installation from Source

To install Waydroid from the source code, you can use the provided Makefile.

  1. Clone the repository:

    git clone https://github.com/waydroid/waydroid
    cd waydroid
  2. Run the install script:

    sudo make install

What make install Does

The installation process copies files to standard locations in the Linux filesystem. Here is a summary of the installed components:

  • Core Logic: /usr/lib/waydroid/ (contains waydroid.py, data, and tools)
  • Executable: A symbolic link at /usr/bin/waydroid pointing to /usr/lib/waydroid/waydroid.py.
  • Application Launchers: .desktop files are installed into /usr/share/applications/.
  • AppStream Metadata: Installed to /usr/share/metainfo/.
  • Icons: The Waydroid icon is placed in /usr/share/icons/hicolor/512x512/apps/.
  • Systemd Service: The container service file waydroid-container.service is installed into /usr/lib/systemd/system/ if USE_SYSTEMD=1 (the default).
  • D-Bus Integration: Configuration and service files are installed into /usr/share/dbus-1/.
  • PolicyKit Rules: Installed to /usr/share/polkit-1/actions/.
  • AppArmor Profiles (Optional): If you run make install_apparmor, profiles are installed to /etc/apparmor.d/.

Makefile Options

You can customize the installation by setting variables when running make:

  • PREFIX: The installation prefix (default: /usr).
  • USE_SYSTEMD: Whether to install the systemd service (default: 1).
  • USE_DBUS_ACTIVATION: Whether to install the D-Bus activation service (default: 1).
  • USE_NFTABLES: Set to 1 to configure the networking script to use nftables instead of iptables (default: 0).

Example for a custom prefix:

sudo make install PREFIX=/usr/local