Follow installation to init modified images.
Note: This is forked https://github.com/pagkly/MagiskOnWaydroid, but It has been and abandoned and building doesn't work anymore. So I fixed it and we can build prerooted images again! Please use Magisk Delta, normal Magisk is very buggy, but the option is still there, If you really want to.
Forked MagiskOnWSA and modified to install Magisk Delta and OpenGapps (pico) replacing stock Google Apps.
Most OpenGApps variants works except for aroma (aroma does not support x86_64, please use super instead)
Tested in ArchLinux, Fedora. Archlinux users, please use linux-xanmod-anbox kernel, or It will not work at all!
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)
Available Magisk versions.
Magisk 26.4
Magisk 26.4 - canary (Normal Magisk just for testing purposes)
Magisk Delta latest (Highly recommended)
Run this command below to clean previous images, before installing new Waydroid 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 rm -rf /var/lib/waydroid /home/.waydroid ~/waydroid ~/.share/waydroid ~/.local/share/applications/*aydroid* ~/.local/share/waydroid
sudo rm -rf /etc/waydroid-extra/images/*
- Fork this repo and go to the Action tab.
- In the left sidebar, click the Modify Waydroid workflow.
- Above the list of workflow runs, select Run workflow
- Select Magisk version and gapps version and the select Run workflow
- Wait for the action to complete and download the artifact
- 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 /etc/waydroid-extra/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 /etc/waydroid-extra/images/system.img sudo cp vendor.img /etc/waydroid-extra/image/vendor.img # Initialize new images sudo waydroid init -f # Restart waydroid lxc container sudo systemctl restart waydroid-container.service waydroid session start or waydroid show-full-ui
- After additional setup in magisk delta, please go in install section and select direct install to system partition and install it!
-
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
-
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