π± Magisk + OpenGApps on Waydroid 11 β Extended Documentation
Overview
This project enables running Magisk and OpenGApps (Pico variant) on Waydroid 11 by modifying and adapting the MagiskOnWSA method to work within Waydroid’s LXC container environment. It is tested on ArchLinux, Fedora, and likely works on Ubuntu as well.
The GitHub Actions workflow builds patched system.img
and vendor.img
files, injecting Magisk and OpenGApps directly into the Waydroid image. These images replace the stock system images in your Waydroid installation.
This repository originally belongs to pagkly/MagiskOnWaydroid, and I have forked it for my use.
βοΈ Features
- π Magisk Integration (root access for Android apps)
- π OpenGApps Support (Google services & Play Store)
- π¦ Supports most Magisk modules that do not rely on Zygisk
- β Works with Magisk versions 24.1 and 24.3
β Limitations
- β Zygisk is NOT working (No ETA)
- β Modules like LSPosed, Riru, Shamiko currently do not function
- β οΈ Magisk v24.2, 2420x, and some newer versions may fail to initialize
- π Magisk v23.0 or below is not supported due to boot issues
- β SafetyNet cannot be passed β similar to other emulators
π₯ Installation Guide
Step 1: Clean Old Waydroid Images
WARNING: This will erase all Android data, apps, and settings. Backup first.
waydroid session stop
sudo waydroid container stop
sudo systemctl stop waydroid-container.service
sudo umount -l /var/lib/waydroid/{data,rootfs}
sudo umount /usr/share/waydroid-extra/images/{system,vendor}.img
sudo rm -rf /var/lib/waydroid /home/.waydroid ~/waydroid ~/.share/waydroid ~/.local/share/applications/*aydroid* ~/.local/share/waydroid
sudo rm -rf /usr/share/waydroid-extra/images/*
Step 2: Install Waydroid Dev Image
Arch Linux (AUR + yay
example)
sudo pacman -Syuu
yay -S waydroid-image-dev
You may need a kernel that supports ashmem
and binder
:
# Examples:
sudo pacman -S linux-xanmod-anbox
# or: sudo pacman -S linux-zen
Step 3: Build Patched Images via GitHub Actions
- Fork the MagiskOnWaydroid repo
- Go to Actions > Build WSA > Run Workflow
- Input:
- Magisk version download URL
- OpenGApps variant (e.g.,
pico
) - Root method (
magisk
)
- Wait for build to complete and download the artifact (ZIP)
- Extract it to get
system.img
andvendor.img
Step 4: Replace Images and Initialize Waydroid
# Replace the existing Waydroid system and vendor images
sudo cp system.img /var/lib/waydroid/images/system.img
sudo cp vendor.img /var/lib/waydroid/images/vendor.img
# Re-initialize Waydroid
sudo waydroid init
sudo systemctl restart waydroid-container.service
waydroid session start &
waydroid show-full-ui
Step 5: Magisk Setup and Reboot (IMPORTANT)
Due to initialization quirks:
waydroid session stop
# First container restart (network may fail)
sudo systemctl restart waydroid-container.service
waydroid session start
waydroid session stop
# Second container restart (should fix Ethernet)
sudo systemctl restart waydroid-container.service
waydroid session start
waydroid show-full-ui
β Working Magisk Modules
- Busybox NDK
- Magisk Hide Props Config
- Detach (detach Play Store apps)
π Updating Instructions
- Update system/vendor images: Rerun GitHub Action and replace images
- Update Magisk version: Same as above (choose version in Action)
- Sync updated scripts: Use
Fetch Upstream
in your forked repo
π‘ FAQ
Q: The downloaded zip size is smaller than shown?
A: GitHub displays uncompressed size. ZIP is compressed.
Q: How to manually install a Magisk module?
adb push module.zip /data/local/tmp
adb shell su -c magisk --install-module /data/local/tmp/module.zip
Q: Can I use Magisk 23.0?
A: No. Use Magisk 24.1 or 24.3 only.
Q: Why isnβt Zygisk working?
A: Waydroid runs in an LXC container using the Linux host kernel. Thereβs no recovery/boot image to patch like on real Android or WSA. Zygote starts too early for Magisk to hook it.
π§ Technical Insights
- Uses modified
init.rc
to loadmagisk su
near UI start - Unlike WSA, Waydroid lacks support for a patched kernel with embedded SU binaries
- Possible workaround involves loading SU binaries as a kernel module when LXC starts, but it may pose security risks
Contributions from LXC experts are welcome to improve this area.
π·οΈ Credits
- Waydroid
- Magisk
- OpenGApps
- MagiskOnWSA
- WSA-Kernel-SU / MagiskOnEmu / MagiskOnEmulator
- Project Kokoro for remount implementation
π Related Resources
- π£ My LinkedIn Post