MagiskOnWSALocal README

The project's README from github.com/LSPosed/MagiskOnWSALocal. As one markdown file: README.md.

Magisk on WSA (with Google Apps)

:warning: Magisk on WSA will no longer be available after March 5, 2025. Learn more.

:warning: For fork developers: Please don't build using GitHub Actions, as GitHub will count your forked GitHub Actions usage against this upstream repository, which may cause this upstream repository gets disabled by GitHub staff like MagiskOnWSA because of numerous forks building GitHub Actions, and counting the forks' Action usage against this upstream repository.

Support for generating from these systems

Features

Text Guide

  1. Star (if you like).

  2. Clone the repo to local:

    git clone https://github.com/LSPosed/MagiskOnWSALocal.git --depth 1
    
  3. Run cd MagiskOnWSALocal.

  4. Run ./scripts/run.sh.

  5. Select the WSA version and its architecture (mostly x64).

  6. Select the version of Magisk.

  7. Choose which brand of GApps you want to install:

    • MindTheGapps

      There is no other variant we can choose.

  8. Select the root solution (none means no root).

  9. If you are running the script for the first time, it will take some time to complete. After the script completes, two new folders named output and download will be generated in the MagiskOnWSALocal folder. Go to the output folder. While running the ./run.sh script in the step 3, if you selected Yes for Do you want to compress the output? then in output folder you will see a compressed file called WSA-with-magisk-stable-MindTheGapps_2207.40000.8.0_x64_Release-Nightlyor else there will be folder with the WSA-with-magisk-stable-MindTheGapps_2207.40000.8.0_x64_Release-Nightly. If there is a folder open it and skip to step 10. NOTE: The name of compressed file or the folder generated in the output folder may be different for you. It will be dependent on the choices made when executing ./run.sh.

  10. Extract the compressed file and open the folder created after the extraction of the file.

  11. Here look for file Run.bat and run it.

    • If you previously have a MagiskOnWSA installation, it will automatically uninstall the previous one while preserving all user data and install the new one, so don't worry about your data.
    • If you have an official WSA installation, you should uninstall it first. (In case you want to preserve your data, you can backup %LOCALAPPDATA%\Packages\MicrosoftCorporationII.WindowsSubsystemForAndroid_8wekyb3d8bbwe\LocalCache\userdata.vhdx before uninstallation and restore it after installation.)
    • If the popup windows disappear without asking administrative permission and WSA is not installed successfully, you should manually run Install.ps1 as Administrator:
      1. Press Win+x and select Windows Terminal (Admin).
      2. Input cd "{X:\path\to\your\extracted\folder}" and press enter, and remember to replace {X:\path\to\your\extracted\folder} including the {}, for example cd "D:\wsa"
      3. Input PowerShell.exe -ExecutionPolicy Bypass -File .\Install.ps1 and press Enter.
      4. The script will run and WSA will be installed.
      5. If this workaround does not work, your PC is not supported for WSA.
  12. Magisk/Play Store will be launched. Enjoy by installing LSPosed-Zygisk with Zygisk enabled or Riru and LSPosed-Riru.


FAQ

  • Can I delete the installed folder?

    No.

  • How can I update WSA to a newer version?

    1. Update build scripts:

      git pull
      

      For more usage of git, referred to https://git-scm.com/book

    2. Rerun the script, replace the content of your previous installation and rerun Install.ps1. Don't worry, your data will be preserved.

  • How can I get the logcat from WSA?

    %LOCALAPPDATA%\Packages\MicrosoftCorporationII.WindowsSubsystemForAndroid_8wekyb3d8bbwe\LocalState\diagnostics\logcat

  • How can I update Magisk to a newer version?

    Do the same as updating WSA.

  • How to pass Play Integrity (formerly known as SafetyNet)?

    Like all the other emulators, no way.

  • Virtualization is not enabled?

    Install.ps1 helps you enable it if not enabled. After rebooting, rerun Install.ps1 to install WSA. If it's still not working, you have to enable virtualization in BIOS. That's a long story so ask Google for help.

  • How to remount the system as read-write?

    No way in WSA since it's mounted as read-only by Hyper-V. You can modify the system by making a Magisk module. Or directly modify the system.img. Ask Google for help.

  • I cannot adb connect localhost:58526, what to do?

    Make sure developer mode is enabled. If the issue persists, check the IP address of WSA on the setting page and try adb connect ip:5555.

  • Why the Magisk online module is empty?

    Magisk actively removes the online module repository. You can install the module locally or by adb push module.zip /data/local/tmp and adb shell su -c magisk --install-module /data/local/tmp/module.zip.

  • Can I use Magisk v23.0 stable or a lower version?

    No. Magisk has bugs preventing itself from running on WSA. Magisk v24+ has fixed them. So you must use Magisk v24 or later.

  • How can I get rid of Magisk?

    Choose none as the root solution.

  • How to install custom GApps?

    Tutorial

  • Where can I download MindTheGapps?

    You can download from here MindTheGapps (mirror).

    Note that there is no x86_64 pre-build, so you need to build it by yourself (Repository).

    Or you can download the built package for 12.1 and 13 for x86_64 from this page.

  • Is it possible to migrate data from a lower version like 2305 to a newer version?

    This is certainly available, Microsoft's change of read-only partition from 2305's EROFS to read-only EXT4 only affects the read-only system partition.

    It has no effect on the user data partition. Check the logs if there is a failure to boot.

  • How to install KernelSU?

    Tutorial


Credits

The repository is provided as a utility.

Android is a trademark of Google LLC. Windows is a trademark of Microsoft Corporation.

MagiskOnWSALocal (LSPosed/MagiskOnWSALocal)

Searching Database…

这是什么?一套构建脚本,用来生成定制版的 Windows Subsystem for Android(WSA)安装包,内置 Magisk root 和 Google 应用(Play 商店),可以直接装到 Windows 11 上。
那这是装到我电脑上的应用,还是要先运行的东西?它是一个脚本工具,不是应用本身:你要先在 Linux 或 WSL2 上运行它来构建修改过的 WSA 安装包,然后在 Windows 上运行生成出来的 Run.bat 才能真正安装。
我该怎么用它构建并安装带 root 的 WSA?克隆仓库并运行 ./scripts/run.sh;按菜单提示选择(WSA 版本、x64 还是 ARM64、Magisk 版本、GApps、root 方案),然后解压输出的文件夹并运行 Run.bat。如果安装静默失败了,就用管理员身份运行 Install.ps1。
运行它之前我的电脑上需要装什么?需要一台 Linux 机器(x86_64 或 arm64)或 Windows 上的 WSL2;支持 Ubuntu、Debian、openSUSE Tumbleweed 和 Arch。它会用到 Python 3.7.2(加 requests 库)、aria2、unzip 和 7-Zip,不过 run.sh 会自动把所有依赖装好。
现在还能用它装带 Play 商店的 WSA 吗?基本不行了:README 提醒说,2025 年 3 月 5 日之后 Magisk on WSA 就不再可用了。其他坑:必须先卸载官方版 WSA,而且安装后的文件夹之后不能删除。
它能给 ARM 架构的 Windows 机器构建吗,还是只支持 x64?生成的 WSA 同时支持 ARM64 和 x64,构建脚本本身也能在 x86_64 或 arm64 的 Linux 上运行;大多数用户选 x64。
和原版 WSA 相比,构建出来的成品多了什么?Magisk root、通过 MindTheGapps 提供的 Google 应用、移除了 Amazon Appstore、修复 VPN 弹窗不显示的问题、支持设备管理、在 Windows 11 上自动激活开发者模式、支持无人值守安装,以及合并了语言包。
我能只装 GApps 但不做 root 吗?可以——root 方案那一步有个 'none' 选项,意思是不做 root,这样你就能得到带 Play 商店但没有 Magisk 的 WSA。
我可以选哪个 GApps 包?只有 MindTheGapps;README 说明没有其他可选的版本,Open GApps 的支持已经移除(在致谢里被划掉了)。
WSA 装好之后,我怎么让 LSPosed 本体跑起来?安装完成后会立刻启动 Magisk 或 Play 商店;在 Magisk 里启用 Zygisk 并安装 LSPosed-Zygisk,或者用 Riru 搭配 LSPosed-Riru。
Creator
LSPosed
Size
28.2 MB
Stars
10.6K
Updated
CommitSep 20
Age
4y
Commits · 90 Days