- Introduction
- System Requirements
- Installation
- Usage
- Additional Configuration
- Automation
- Uninstallation
- Troubleshooting
- References
This comprehensive guide walks you through setting up and optimizing Waydroid on an X11-based Linux system. Waydroid offers a seamless Android container experience, tightly integrated into your Linux desktop. We cover everything from installation to advanced configuration to ensure a smooth experience.
Ensure your system meets these prerequisites:
- Running an X11 desktop environment.
- Administrative privileges (sudo).
- Essential packages: curl and ca-certificates.
Install the prerequisites:
sudo apt install curl ca-certificates -y
You can use the following one-liner to install and set up Waydroid directly.
curl -sSL https://raw.githubusercontent.com/1999AZZAR/use-waydroid-on-x11/master/install.sh | sudo bash
Install Weston, the required Wayland compositor:
sudo apt install weston -y
Add the repository:
curl https://repo.waydro.id | sudo bash
Install Waydroid:
sudo apt install waydroid -y
Follow these steps within a Weston session:
-
Start Weston:
weston --socket=mysocket
-
Initialize Waydroid:
-
Without Google Apps:
sudo waydroid init
-
With Google Apps:
sudo waydroid init -f -s GAPPS
-
For issues like:
[21:15:53] Failed to load binder driver
[21:15:53] ERROR: Binder node "binder" for waydroid not found
Follow this guide.
-
Start Weston:
weston --socket=mysocket
-
Launch Waydroid:
waydroid show-full-ui
Stop Waydroid gracefully:
waydroid session stop
Run this script to hide Waydroid apps from the system launcher:
for app in ~/.local/share/applications/waydroid.*.desktop; do
grep -q NoDisplay $app || sed '/^Icon=/a NoDisplay=true' -i $app
done
Enable clipboard sharing:
-
Install pyclip:
sudo pip install pyclip
-
Install wl-clipboard:
sudo apt install wl-clipboard
Create ~/.config/weston.ini
:
[libinput]
enable-tap=true
[shell]
panel-position=none
Save this script as /usr/bin/waydroid-session.sh
:
#!/bin/bash
weston --xwayland &
WESTON_PID=$!
export WAYLAND_DISPLAY=wayland-1
sleep 2
waydroid show-full-ui &
WAYDROID_PID=$!
trap "waydroid session stop; kill $WESTON_PID; kill $WAYDROID_PID" EXIT
wait $WESTON_PID
Make it executable:
chmod +x /usr/bin/waydroid-session.sh
Create /usr/share/applications/waydroid-session.desktop
:
[Desktop Entry]
Version=1.0
Type=Application
Name=Waydroid Session
Comment=Start Waydroid in a Weston session
Exec=/usr/bin/waydroid-session.sh
Icon=waydroid
Terminal=false
Categories=System;Emulator;
Make it executable:
chmod +x /usr/share/applications/waydroid-session.desktop
Run the clean-removal.sh
script:
-
Make it executable:
chmod +x clean-removal.sh
-
Execute:
sudo ./clean-removal.sh
- Weston startup issues: Verify Weston and X11 configurations.
- Waydroid launch failures: Ensure a running Weston session.
- Performance problems: Allocate more system resources.
If you are using the GApps version of Waydroid and see a "Device is not certified by Google" error in the Play Store, here is a potential fix.
-
Enter the Waydroid Shell
Open a terminal on your computer and run:
sudo waydroid shell
You will now be inside the Android container's shell.
-
Get Your GSF Android ID
Inside the
waydroid shell
, run this command to get your Google Services Framework ID:sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "SELECT * FROM main WHERE name = 'android_id';"
This will output a long number, which is your
android_id
. Copy this number. -
Register Your ID
Go to the Google Device Registration page: https://www.google.com/android/uncertified/
Paste the
android_id
you copied into the input box and click "Register". -
Verify and Restart
Go back to the
waydroid shell
. The user suggests running the following command to verify the ID.ANDROID_RUNTIME_ROOT=/apex/com.android.runtime ANDROID_DATA=/data ANDROID_TZDATA_ROOT=/apex/com.android.tzdata ANDROID_I18N_ROOT=/apex/com.android.i18n sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "select * from main where name = "android_id";"
After this, fully stop and restart Waydroid for the changes to take effect.
# On your main linux terminal, not the waydroid shell waydroid session stop # Then restart it using your preferred method
Good luck!