Project Icon

MagiskOnWSALocal

优化Windows Android子系统的安装和功能扩展

MagiskOnWSALocal是一款优化Windows Subsystem for Android (WSA)安装和定制的开源工具。该项目支持ARM64和x64架构,可集成Magisk和Google Apps,提供多项功能增强,如移除Amazon Appstore和修复VPN对话框。通过自动化安装过程和无人值守模式,MagiskOnWSALocal简化了WSA的部署。此外,其一键更新功能可在保留用户数据的同时升级系统,为WSA用户提供了灵活且功能丰富的使用体验。

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

  • Linux (x86_64 or arm64)

    The following dependencies are required:

    DistrOS
    Debianpython3 aria2 unzip sudowhiptailpython3-venvpython3-pipp7zip-full
    openSUSE TumbleweedSame as abovedialogpython3-venvctrlSame as aboveSame as above
    ArchSame as DebianlibnewtSame as Debianpython-pipp7zip

    The python3 library requests is used.

    Python version ≥ 3.7.2.

    • Recommended use

      • Ubuntu (You can use WSL2)

        Ready to use right out of the box.

      • Debian (You can use WSL2)

        Ready to use right out of the box.

      • openSUSE Tumbleweed (You can use WSL2)

        Ready to use right out of the box.

      run.sh will handle all dependencies automatically.

      No need to type any commands.

Features

  • Integrate Magisk and GApps in a few clicks within minutes
  • Keep each build up to date
  • Support both ARM64 and x64
  • Support MindTheGapps
  • Remove Amazon Appstore
  • Fix VPN dialog not showing (use our VpnDialogs app)
  • Add device administration feature
  • Unattended installation
  • Automatically activates developers mode in Windows 11
  • Update to the new version while preserving data with a one-click script
  • Merged all language packs

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.

项目侧边栏1项目侧边栏2
推荐项目
Project Cover

豆包MarsCode

豆包 MarsCode 是一款革命性的编程助手,通过AI技术提供代码补全、单测生成、代码解释和智能问答等功能,支持100+编程语言,与主流编辑器无缝集成,显著提升开发效率和代码质量。

Project Cover

AI写歌

Suno AI是一个革命性的AI音乐创作平台,能在短短30秒内帮助用户创作出一首完整的歌曲。无论是寻找创作灵感还是需要快速制作音乐,Suno AI都是音乐爱好者和专业人士的理想选择。

Project Cover

有言AI

有言平台提供一站式AIGC视频创作解决方案,通过智能技术简化视频制作流程。无论是企业宣传还是个人分享,有言都能帮助用户快速、轻松地制作出专业级别的视频内容。

Project Cover

Kimi

Kimi AI助手提供多语言对话支持,能够阅读和理解用户上传的文件内容,解析网页信息,并结合搜索结果为用户提供详尽的答案。无论是日常咨询还是专业问题,Kimi都能以友好、专业的方式提供帮助。

Project Cover

阿里绘蛙

绘蛙是阿里巴巴集团推出的革命性AI电商营销平台。利用尖端人工智能技术,为商家提供一键生成商品图和营销文案的服务,显著提升内容创作效率和营销效果。适用于淘宝、天猫等电商平台,让商品第一时间被种草。

Project Cover

吐司

探索Tensor.Art平台的独特AI模型,免费访问各种图像生成与AI训练工具,从Stable Diffusion等基础模型开始,轻松实现创新图像生成。体验前沿的AI技术,推动个人和企业的创新发展。

Project Cover

SubCat字幕猫

SubCat字幕猫APP是一款创新的视频播放器,它将改变您观看视频的方式!SubCat结合了先进的人工智能技术,为您提供即时视频字幕翻译,无论是本地视频还是网络流媒体,让您轻松享受各种语言的内容。

Project Cover

美间AI

美间AI创意设计平台,利用前沿AI技术,为设计师和营销人员提供一站式设计解决方案。从智能海报到3D效果图,再到文案生成,美间让创意设计更简单、更高效。

Project Cover

稿定AI

稿定设计 是一个多功能的在线设计和创意平台,提供广泛的设计工具和资源,以满足不同用户的需求。从专业的图形设计师到普通用户,无论是进行图片处理、智能抠图、H5页面制作还是视频剪辑,稿定设计都能提供简单、高效的解决方案。该平台以其用户友好的界面和强大的功能集合,帮助用户轻松实现创意设计。

投诉举报邮箱: service@vectorlightyear.com
@2024 懂AI·鲁ICP备2024100362号-6·鲁公网安备37021002001498号