Before you start
First, make sure MuMu itself is installed and that you already have an Android instance available. On a fresh installation, MuMu usually creates and installs the system automatically the first time you launch it.
The setup described here was done on MuMu emulator V5.23.0.
Installing Magisk
Open MuMu's settings and enable both Root and Writable system disk.
After that, download the forked Magisk build from:
https://github.com/ayasa520/Magisk/releases/tag/canary-30403
Install it, launch it, and grant Root permission with permanent allow.
Because Android emulators behave differently from physical devices, the usual installation flow does not work here. This fork includes compatibility for emulator use, so you should choose Direct Install to System.
If that option does not appear when Magisk first opens, it is usually just an initialization timing issue. Close Magisk from the top and reopen it, then check again.
This step depends on the system partition being writable. If you forgot to enable that option in MuMu, Magisk will fail with an error like this:
1 2 3 4 5 6 7 8 9 10 11 12
- Device platform: x86_64 - Installing: f9f02c65 (30403) **************************** Magisk Delta (System Mode) by HuskyDG **************************** ****************** Powered by Magisk ****************** - Remount system partition as read-write ! Installation failed ! System partition is read-only
The last three lines are the important part: the system partition is read-only, so the required changes cannot be applied.
The fix is simple—go back to MuMu settings and turn on the writable system disk option.
If the installation succeeds, you should see output like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
- Device platform: x86 64 - Installing: f9f02c65 (30403) **************************** Magisk Delta (System Mode) by HuskyDG **************************** ****************** Powered by Magisk ****************** - Remount sys tem partition as read-write - Cleaning up enviroment - Copy files to system partition - Check if kernel suppor ts dynamic SELinux Policy patch - Add init boot script [*] Reflash your ROM if your ROM is unable to start and do not use this method to install Magisk - All done! - Unale to find preinit dir
Do not use the reboot button inside Magisk. Restart the emulator from MuMu's own settings menu instead.
In practice, pressing Magisk's Reboot button usually does nothing anyway.
After restarting, open Magisk again. If everything went normally, it should show as installed.
It is also possible to update directly from Magisk Manager now; if you do that, the installation method is still Direct Install to System.
Installing LSPosed
Download LSPosed from:
https://github.com/LSPosed/LSPosed/releases/tag/v1.9.2
Version 1.9.2 has been tested and works fine here. There is no real need to chase the newest release if a known working version already does the job.
When choosing the package, download the one labeled Zygisk. Do not use the Riru build.
Transfer the file into the emulator through MuMu's shared folder.
The default shared directory is usually:
Documents/MuMu Shared Folder
You can also set a different folder manually if needed, for example if the emulator cannot access the original path or the directory has some other issue.
Using the built-in shared folder is the most reliable method here. Sending the file through LocalSend by link did not work in testing, and downloading it from the built-in browser also failed.
Once the module file is inside Android, open Magisk and install it as a module by selecting the file from the shared folder on the Android side.
Also remember to enable Zygisk in Magisk settings. After another reboot, the LSPosed entry should appear in the notification shade. If you want, you can create a home screen shortcut for it.
One more setting worth checking
If the module you install needs to run a local server, change MuMu's network mode to Bridged in the emulator settings.
By default, MuMu uses NAT, which keeps the emulator on its own separate network. Bridged mode lets the emulator share the host computer's network adapter, so services running inside the emulator can be accessed both from inside and outside the emulator more easily.
That is basically the full setup.