Follow installation to init modified images.
Unable to test latest build in Arch due to recent waydroid update showing this issue, hoping somebody can provide feedback if 25.2 is working in Ubuntu or Arch.
Forked MagiskOnWSA and modified to install Magisk and OpenGapps (pico) replacing FOSS apps in BlissOS/LineageOS 18.1 dev image (Android 11)
Most OpenGApps variants works except for aroma (aroma does not support x86_64, please use super instead)
Tested in ArchLinux, Fedora.
More in Waydroid Telegram
-
Zygisk not yet working (No ETA).
Currently, this script is using MagiskonWSA method in patching initrc so that it would load magisk su binaries close to the end of initrc, before ui started. However zygote is usually loaded at the start of initrc, meaning it would be too late to replace zygote with zygisk zygote by the time su from magisk is loaded.
In LSPosed's MagiskonWSA implementation, there is a patched WSA kernel with su binaries just like in Android devices where Magisk patch recovery/boot image to have su binaries. Waydroid, on the other hand, uses lxc containers utilizing linux host kernel without su binaries needed to patch zygote.
There might be a way to load su binaries as kernel module when lxc session is starting with one caveat that this solution might introduce security issues to linux host. Anybody who is well-versed in lxc can contact me/create issue to explain to me how to make it work.
Thus, modules requiring zygote/zygisk like Riru, LSPosed (pre-zygisk) or Shamiko (module to hide magisk root utilizing zygisk) unfortunately wont work for now unless someone figures out a workaround.
In the meantime, here is some examples of modules that work:
- Busybox NDK
- Magisk Hide Prop
- Detach (detach app from play store)
Also, not all Magisk version guaranteed to work.
Versions that work are build 24001 < x < 24102 and 24301. This is due to a change in how Magisk load the binaries during booting somewhere in commit between build v24102 to v24103 and present in v24.2, 2420x builds; and a change in magiskpolicy applet in 24301. I added stable magisk versions to choose from in workflow so that they can be tested. If you run the workflow and install the img properly and magisk icon not shown when booting the first time, that means Magisk is not setup properly.
For now, latest working is 24.1 and 24.3 and thus, do not update magisk apk.
-
Restart waydroid container twice after additional setup in Magisk.
First restart usually have a bug where the ethernet connection would fail to connect to the internet. Second restart should fix them.
Run this command below to clean previous image such as Waydroid 10 or before installing new Waydroid 11 image or when updating to new Magisk.
Warning: You will lose all your data, apps, settings of previous Android installation.
Kindly backup everything in your Android before you proceed
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/*
-
Install waydroid dev image on your Linux Distro.
-
e.g. In Arch Linux with AUR + yay
# install one of the kernel that supports ashmem,binder # sudo pacman -S linux-mainline-anbox #(5.17-rc) # sudo pacman -S linux-zen #(tested on 5.16 - 5.17rc; 5.17.1 not working) # sudo pacman -S linux-xanmod-anbox #(5.17.12>; the one Im using right now) sudo pacman -Syuu yay -S waydroid-image-dev
-
-
Input the download link of Magisk and select the OpenGApps variant (none is no OpenGApps) you like, select the root solution (none means no root) and click Run workflow
-
Unzip the artifact
- The size shown in the webpage is uncompressed size and the zip you download will be compressed. So the size of the zip will be much less than the size shown in the webpage.
-
Copy system.img and vendor.img to
/usr/share/waydroid-extras/images/var/lib/waydroid/images and init the new img.# Remove original img and copy magisk img sudo rm -rf /var/lib/waydroid/images/system.img sudo rm -rf /var/lib/waydroid/images/vendor.img sudo cp system.img /var/lib/waydroid/images/system.img sudo cp vendor.img /var/lib/waydroid/images/vendor.img # Initialize new images sudo waydroid init # Restart waydroid lxc container sudo systemctl restart waydroid-container.service waydroid session start & # Start Waydroid UI waydroid show-full-ui
-
After additional setup in magisk, reboot and restart container twice (refer to Bugs as to why)
waydroid stop session # First container restart sudo systemctl restart waydroid-container.service waydroid session start #(wait until successfully booted) waydroid session stop # Second container restart sudo systemctl restart waydroid-container.service waydroid session start #(wait until successfully booted) waydroid show-full-ui
-
Why the size of the zip does not match the one shown?
The zip you downloaded is compressed and Github is showing the uncompressed size.
-
How can I update System.img to new version?
Rerun the Github action, download the new artifact, replace the content of your previous installation.
-
How can I update Magisk to new version?
Do the same as updating System.img
-
How to pass safetynet?
Like all the other emulators, no way.
-
Magisk online module list is empty?
Install manually by
adb push module.zip /data/local/tmp adb shell su -c magisk --install-module /data/local/tmp/module.zip
-
Can I use Magisk 23.0 stable or lower version?
No. Magisk has bugs preventing itself running on WSA. Magisk 24+ has fixed them. So you must use Magisk 24 or higher version.
-
Github Action script is updated, how can I synchronize it?
- Waydroid
- Magisk
- The Open GApps Project
- WSA-Kernel-SU and kernel-assisted-superuser
- WSAGAScript
- MagiskonWSA
- MagiskOnEmulator
- MagiskOnEmu
- Project Kokoro - Magisk module remount implementation