| name | waydroid |
| description | Waydroid - Container-based Android on Linux with Wayland support, GPU acceleration, and native app integration |
| metadata | {"author":"OSS AI Skills","version":"1.0.0","tags":["waydroid","android","container","linux","wayland","android-emulation","gapps","lineagos"]} |
Waydroid
Complete guide to running Android applications on Linux using Waydroid - a container-based solution with native Wayland integration.
Overview
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
Installation
Ubuntu/Debian
sudo apt install curl ca-certificates python3-gbinder python3-trio -y
curl https://repo.waydro.id | sudo bash
curl -s https://repo.waydro.id | sudo bash -s focal
curl -s https://repo.waydro.id | sudo bash -s jammy
curl -s https://repo.waydro.id | sudo bash -s noble
sudo apt install waydroid -y
Supported Ubuntu versions: focal, jammy, kinetic, lunar, mantic, noble
Supported Debian versions: bullseye, bookworm, trixie, sid
Fedora
sudo dnf copr enable aleasto/waydroid
sudo dnf install waydroid
For Fedora Silverblue/Kinoite:
rpm-ostree install waydroid
Arch Linux
yay -S waydroid
git clone https://aur.archlinux.org/waydroid.git
cd waydroid
makepkg -si
openSUSE
sudo zypper addrepo https://download.opensuse.org/repositories/openSUSE:Tools/openSUSE_Tools.repo
sudo zypper install waydroid
Void Linux
sudo xbps-install -S waydroid
Initialization
Basic Initialization
sudo waydroid init
With Google Apps (GApps)
sudo waydroid init -s GAPPS
Manual OTA URLs
If 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
Starting Waydroid
Using systemd (recommended)
sudo systemctl start waydroid-container.service
sudo systemctl enable waydroid-container.service
waydroid session start
Manual start (without systemd)
sudo waydroid container start
waydroid session start
CLI Commands
App Management
waydroid app install /path/to/app.apk
waydroid app list
waydroid app launch com.package.name
waydroid app uninstall com.package.name
Shell Access
waydroid shell
waydroid shell pm list packages
waydroid shell getprop ro.product.model
waydroid shell su -c "ls -la /sdcard/"
UI Control
waydroid show-full-ui
waydroid screenshot
waydroid window set <fullscreen|windowed|tablet> [position]
Status and Info
waydroid status
waydroid log
waydroid log -cat main
waydroid log -cat all
waydroid prop get
waydroid prop get ro.product.model
Container Control
waydroid session stop
sudo waydroid container stop
sudo waydroid container restart
Configuration
waydroid config set <property> <value>
waydroid config set ro.orientation.portrait 1
Architecture
Container Technology
Waydroid 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
binderfs
Waydroid requires the binder kernel module for Android IPC. Modern kernels use binderfs:
ls -la /dev/binder*
sudo modprobe binder_linux
For Arch Linux with custom kernels, install binder_linux-dkms from AUR.
Images
Waydroid uses LineageOS-based images:
- System image: Contains Android framework and system apps
- Vendor image: Contains hardware-specific blobs
- Images location:
/var/lib/waydroid/
GPU Support
Verification
waydroid shell dumpsys SurfaceFlinger
NVIDIA
Waydroid 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)
AMD/Intel
Works out of the box with Mesa drivers. For best performance:
- Ensure mesa drivers are up to date
- Use a Wayland compositor
Performance Tuning
waydroid prop set ro.hardware.gralloc gbm
waydroid prop set ro.hardware.egl emulated
Networking
Waydroid creates a network bridge automatically. To verify:
ip addr show waydroid0
Sharing Host Network
Internet Access
Waydroid container should have internet access automatically. If not:
waydroid shell getprop net.dns1
waydroid shell ping -c 3 google.com
Window Modes
Fullscreen Mode
waydroid show-full-ui
Windowed Mode
waydroid app launch com.package.name
waydroid window set windowed
Multi-Window (Tablet Mode)
waydroid window set tablet
GAPPS Support
Installation
Initialize with GAPPS support:
sudo waydroid init -s GAPPS
This installs:
- Google Play Services
- Google Play Store
- Core Google apps
Google Play Certification
To use Google Play Store fully:
- Open Play Store on Waydroid
- Sign in with Google account
- The device should auto-register
For certification issues:
waydroid shell settings get secure android_id
Manual GApps Installation
If you initialized without GAPPS, you can add it later:
ADB Integration
Connect to Waydroid via ADB
adb connect 192.168.250.1:5555
waydroid shell getprop ro.debuggable
Enable ADB Network Debugging
waydroid shell setprop persist.adb.enable 1
waydroid shell setprop service.adb.tcp.port 5555
adb connect 192.168.250.1:5555
Common ADB Commands
adb devices
adb install app.apk
adb uninstall com.package.name
adb push local.txt /sdcard/
adb pull /sdcard/screenshot.png
adb shell
File Sharing
Internal Storage
The Android container sees /sdcard/ as internal storage:
ls /var/lib/waydroid/data/media/0/
waydroid shell ls /sdcard/
Shared Folders
Create a shared folder between host and Android:
mkdir -p ~/waydroid/shared
sudo mount --bind ~/waydroid/shared /var/lib/waydroid/data/media/0/Download/shared
Using ADB for Files
adb push /path/on/host /sdcard/Download/
adb pull /sdcard/screenshots/ /path/on/host/
Desktop Environment Integration
GNOME
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)
Sway/i3
For tiling window managers:
waydroid app launch com.package.name
App Launchers
Create desktop entries for Android apps:
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;
EOF
Troubleshooting
Common Issues
Waydroid won't start
lsmod | grep binder
ls -la /dev/binder*
sudo systemctl restart waydroid-container.service
waydroid session start
waydroid log
No internet in Android
ip addr show waydroid0
sudo waydroid container restart
Apps not launching
waydroid status
waydroid session stop
waydroid session start
GPU issues / Poor performance
waydroid shell dumpsys SurfaceFlinger
sudo dnf update
sudo apt upgrade
Audio not working
waydroid shell media list-sinks
waydroid prop set audio.oss 1
Reset Waydroid
waydroid session stop
sudo waydroid container stop
sudo rm -rf /var/lib/waydroid/
sudo waydroid init
sudo systemctl start waydroid-container.service
waydroid session start
Complete Uninstall
waydroid session stop
sudo waydroid container stop
sudo systemctl disable waydroid-container.service
sudo apt remove waydroid
sudo dnf remove waydroid
yay -R waydroid
sudo rm -rf /var/lib/waydroid ~/.local/share/waydroid
Advanced Configuration
Custom Images
Use custom LineageOS images:
sudo cp system.img vendor.img /var/lib/waydroid/images/
HAL Configuration
Configure hardware abstraction layer:
waydroid prop set ro.hardware.vendor <vendor>
Boot Animation
sudo cp bootanimation.zip /var/lib/waydroid/system/media/
Magisk (Root Access)
For root access in Waydroid:
waydroid shell su -c "magisk --setup-mount /sbin/magisk"
Best Practices
- 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 log when 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/
References