| name | waydroid | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| description | Waydroid - Container-based Android on Linux with Wayland support, GPU acceleration, and native app integration | ||||||||||||||
| metadata |
|
Complete guide to running Android applications on Linux using Waydroid - a container-based solution with native Wayland integration.
Waydroid is a container-based approach to boot a full Android system on a regular GNU/Linux system. It uses Linux namespaces (user, pid, uts, net, mount, ipc) to run a full Android system in a container and provides Android applications on any GNU/Linux-based platform with near-native performance.
Key features:
- Wayland Integration: Full support for Wayland compositors with smooth windowing
- GPU Acceleration: Hardware-accelerated graphics for games and GPU-intensive apps
- Native Performance: Near-native speed with reduced overhead compared to emulators
- LineageOS-based: Uses customized Android system images based on LineageOS
- binderfs: Uses Android binder IPC mechanism for communication between container and host
# Install prerequisites
sudo apt install curl ca-certificates python3-gbinder python3-trio -y
# Add the official repository
curl https://repo.waydro.id | sudo bash
# Or specify distribution manually
curl -s https://repo.waydro.id | sudo bash -s focal # for Ubuntu 20.04
curl -s https://repo.waydro.id | sudo bash -s jammy # for Ubuntu 22.04
curl -s https://repo.waydro.id | sudo bash -s noble # for Ubuntu 24.04
# Install Waydroid
sudo apt install waydroid -ySupported Ubuntu versions: focal, jammy, kinetic, lunar, mantic, noble Supported Debian versions: bullseye, bookworm, trixie, sid
# Enable Waydroid Copr repository
sudo dnf copr enable aleasto/waydroid
# Install Waydroid
sudo dnf install waydroidFor Fedora Silverblue/Kinoite:
rpm-ostree install waydroid# Using yay (AUR helper)
yay -S waydroid
# Or using git
git clone https://aur.archlinux.org/waydroid.git
cd waydroid
makepkg -sisudo zypper addrepo https://download.opensuse.org/repositories/openSUSE:Tools/openSUSE_Tools.repo
sudo zypper install waydroidsudo xbps-install -S waydroid# Initialize Waydroid (downloads latest Android image)
sudo waydroid init# Initialize with GAPPS support
sudo waydroid init -s GAPPSIf the automatic detection fails, you can specify OTA URLs manually:
sudo waydroid init \
-s https://ota.waydro.id/system \
-v https://ota.waydro.id/vendor# Start the container service
sudo systemctl start waydroid-container.service
# Enable on boot
sudo systemctl enable waydroid-container.service
# Start a session
waydroid session start# Start container (requires sudo)
sudo waydroid container start
# Start session (in new terminal, no sudo)
waydroid session start# Install an APK
waydroid app install /path/to/app.apk
# List installed apps
waydroid app list
# Launch an app (use package name from list)
waydroid app launch com.package.name
# Uninstall an app
waydroid app uninstall com.package.name# Enter Android shell
waydroid shell
# Execute a single command
waydroid shell pm list packages
waydroid shell getprop ro.product.model
waydroid shell su -c "ls -la /sdcard/"# Show full Android UI (fullscreen)
waydroid show-full-ui
# Take screenshot
waydroid screenshot
# Set window mode
waydroid window set <fullscreen|windowed|tablet> [position]# Check Waydroid status
waydroid status
# View logs
waydroid log
waydroid log -cat main # Filter by logcat
waydroid log -cat all # All logs
# Get device properties
waydroid prop get
waydroid prop get ro.product.model# Stop session
waydroid session stop
# Stop container
sudo waydroid container stop
# Restart
sudo waydroid container restart# Edit Waydroid configuration
waydroid config set <property> <value>
# Example: set portrait orientation
waydroid config set ro.orientation.portrait 1Waydroid uses Linux namespaces to isolate the Android container:
- user namespace: User ID mapping
- pid namespace: Process isolation
- uts namespace: Hostname
- net namespace: Network stack
- mount namespace: Filesystem
- ipc namespace: Inter-process communication
Waydroid requires the binder kernel module for Android IPC. Modern kernels use binderfs:
# Check if binderfs is available
ls -la /dev/binder*
# Load binder module (if needed)
sudo modprobe binder_linuxFor Arch Linux with custom kernels, install binder_linux-dkms from AUR.
Waydroid uses LineageOS-based images:
- System image: Contains Android framework and system apps
- Vendor image: Contains hardware-specific blobs
- Images location:
/var/lib/waydroid/
# Check GPU rendering
waydroid shell dumpsys SurfaceFlingerWaydroid supports NVIDIA GPUs through the native Wayland renderer. Ensure you have:
- NVIDIA driver installed
- Wayland compositor with NVIDIA support (e.g., GNOME on Wayland, Sway)
Works out of the box with Mesa drivers. For best performance:
- Ensure mesa drivers are up to date
- Use a Wayland compositor
# Enable hardware GPU rendering (usually enabled by default)
waydroid prop set ro.hardware.gralloc gbm
waydroid prop set ro.hardware.egl emulatedWaydroid creates a network bridge automatically. To verify:
# Check network interfaces
ip addr show waydroid0
# Network is usually NAT'd behind host
# Android sees eth0 with DHCP# Waydroid shares the host network by default
# To isolate, you would need to modify the container configurationWaydroid container should have internet access automatically. If not:
# Check DNS
waydroid shell getprop net.dns1
# Test connectivity
waydroid shell ping -c 3 google.comwaydroid show-full-ui# Launch in window
waydroid app launch com.package.name
# Or set windowed mode explicitly
waydroid window set windowed# Enable tablet/multi-window mode
waydroid window set tabletInitialize with GAPPS support:
sudo waydroid init -s GAPPSThis installs:
- Google Play Services
- Google Play Store
- Core Google apps
To use Google Play Store fully:
- Open Play Store on Waydroid
- Sign in with Google account
- The device should auto-register
For certification issues:
# Check certification status
waydroid shell settings get secure android_idIf you initialized without GAPPS, you can add it later:
# Download GApps from OpenGApps
# Extract to /var/lib/waydroid/
# Restart waydroid# Default ADB connects to localhost
adb connect 192.168.250.1:5555
# Or use waydroid's adb over network
waydroid shell getprop ro.debuggable # Check if ADB is enabled# In Waydroid shell
waydroid shell setprop persist.adb.enable 1
waydroid shell setprop service.adb.tcp.port 5555
# Then connect
adb connect 192.168.250.1:5555# List devices
adb devices
# Install APK
adb install app.apk
# Uninstall
adb uninstall com.package.name
# Push file
adb push local.txt /sdcard/
# Pull file
adb pull /sdcard/screenshot.png
# Shell access
adb shellThe Android container sees /sdcard/ as internal storage:
# Access from host (read-only)
ls /var/lib/waydroid/data/media/0/
# Or use waydroid shell
waydroid shell ls /sdcard/Create a shared folder between host and Android:
# Create directory on host
mkdir -p ~/waydroid/shared
# Bind mount (add to /etc/fstab or systemd mount)
sudo mount --bind ~/waydroid/shared /var/lib/waydroid/data/media/0/Download/shared# Push files to Android
adb push /path/on/host /sdcard/Download/
# Pull files from Android
adb pull /sdcard/screenshots/ /path/on/host/Waydroid integrates well with GNOME on Wayland. Apps appear in the application overview. Use GNOME Extensions like:
- Glass Mint: Transparent top bar
- Waydroid: Native integration (check extensions.gnome.org)
For tiling window managers:
# Launch in windowed mode
waydroid app launch com.package.name
# Waydroid windows can be managed like regular XDG windowsCreate desktop entries for Android apps:
# Generate desktop entry
mkdir -p ~/.local/share/applications
cat > ~/.local/share/applications/waydroid-app.desktop << EOF
[Desktop Entry]
Name=App Name
Exec=waydroid app launch com.package.name
Icon=android-icon
Type=Application
Categories=Android;
EOFWaydroid won't start
# Check kernel module
lsmod | grep binder
# Check binderfs
ls -la /dev/binder*
# Restart services
sudo systemctl restart waydroid-container.service
waydroid session start
# Check logs
waydroid logNo internet in Android
# Check network interface
ip addr show waydroid0
# Restart network
sudo waydroid container restartApps not launching
# Check if session is running
waydroid status
# Restart session
waydroid session stop
waydroid session startGPU issues / Poor performance
# Check GPU info
waydroid shell dumpsys SurfaceFlinger
# Update mesa drivers (AMD/Intel)
sudo dnf update # Fedora
sudo apt upgrade # Ubuntu
# For NVIDIA, ensure proprietary driver is installedAudio not working
# Check audio sink
waydroid shell media list-sinks
# Set audio to ALSA/PulseAudio
waydroid prop set audio.oss 1# Stop everything
waydroid session stop
sudo waydroid container stop
# Remove data (creates fresh install)
sudo rm -rf /var/lib/waydroid/
# Reinitialize
sudo waydroid init
# Restart services
sudo systemctl start waydroid-container.service
waydroid session start# Stop services
waydroid session stop
sudo waydroid container stop
sudo systemctl disable waydroid-container.service
# Remove packages
sudo apt remove waydroid # Ubuntu/Debian
sudo dnf remove waydroid # Fedora
yay -R waydroid # Arch
# Remove data
sudo rm -rf /var/lib/waydroid ~/.local/share/waydroidUse custom LineageOS images:
# Download custom system and vendor images
sudo cp system.img vendor.img /var/lib/waydroid/images/Configure hardware abstraction layer:
# Set vendor HAL
waydroid prop set ro.hardware.vendor <vendor>
# Common values: qcom, intel, exynos, mediatek# Custom boot animation
sudo cp bootanimation.zip /var/lib/waydroid/system/media/For root access in Waydroid:
# Install Magisk on Waydroid
waydroid shell su -c "magisk --setup-mount /sbin/magisk"- Use Wayland session: Waydroid only works with Wayland compositors
- Keep system updated: Regular updates ensure compatibility
- Use GAPPS if needed: Google Play Services required for many apps
- Check logs first: Always check
waydroid logwhen troubleshooting - Use proper GPU drivers: Install appropriate drivers for your hardware
- Enable ADB for complex tasks: ADB provides more control
- Back up important data: Waydroid data is in
/var/lib/waydroid/
- Official Documentation: https://docs.waydro.id/
- Waydroid GitHub: https://github.com/waydroid/waydroid
- Arch Wiki: https://wiki.archlinux.org/title/Waydroid
- OTA Images: https://ota.waydro.id/
- LineageOS: https://lineageos.org/