MagiskOnWSALocal/README.md

86 lines
5.1 KiB
Markdown
Raw Normal View History

2021-12-12 09:20:37 +08:00
# Magisk on WSA (with Google Apps)
2021-10-26 18:19:47 +08:00
2021-10-27 21:06:38 +08:00
## Features
2022-05-18 00:25:56 +08:00
2021-10-27 22:07:29 +08:00
- Integrate Magisk and OpenGApps in a few clicks within minutes
- Keep each build up to date
2021-10-27 21:06:38 +08:00
- Support both ARM64 and x64
2021-12-18 23:59:40 +08:00
- Support all OpenGApps variants except for aroma (aroma does not support x86_64, please use super instead)
- Fix VPN dialog not showing (use our [VpnDialogs app](https://github.com/LSPosed/VpnDialogs))
2021-12-30 11:41:48 +08:00
- Unattended installation
- Automatically activates developers mode in Windows 11
2021-12-12 01:56:48 +08:00
- Update to new version while preserving data with one-click script
2021-12-12 04:27:26 +08:00
- Merged all language packs
2021-12-18 21:19:30 +08:00
- Support managing start menu icons (manually installing [WSAHelper](https://github.com/LSPosed/WSAHelper/releases/latest) to use this feature)
2021-10-27 21:06:38 +08:00
2021-12-12 09:20:37 +08:00
## Text Guide
2021-10-26 17:16:38 +08:00
2022-08-14 15:24:32 +08:00
1. Star (if you like)
1. Clone the repo to local
1. Run `scripts/run.sh`
1. Select the version of Magisk and select the [OpenGApps variant](https://github.com/opengapps/opengapps/wiki#variants) you like, select the root solution (none means no root), select WSA version and its architecture (mostly x64)
1. Wait for the script to complete and the artifact will in `output` folder
2022-08-14 15:24:32 +08:00
1. Move the artifact to a places you like
2021-11-02 09:26:01 +08:00
1. Right-click `Install.ps1` and select `Run with PowerShell`
2021-12-12 01:56:48 +08:00
- If you previously have a MagiskOnWSA installation, it will automatically uninstall the previous while **preserving all userdata** and install the new one, so don't worry about your data.
2021-12-18 21:19:30 +08:00
- 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 you want to restore the icons to start menu, please install and use [WSAHelper](https://github.com/LSPosed/WSAHelper/releases/latest).)
2022-01-13 22:18:45 +08:00
- 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
2021-12-12 05:50:28 +08:00
1. Magisk/Play store will be launched. Enjoy by installing LSPosed-zygisk with zygisk enabled or Riru and LSPosed-riru
2021-10-31 19:24:33 +08:00
2021-12-15 00:32:05 +08:00
## FAQ
2022-05-18 00:25:56 +08:00
- Can I delete the installed folder?
2021-12-15 00:32:05 +08:00
No.
- How can I update WSA to new version?
Delete `download` folder
Rerun the script, replace the content of your previous installation and rerun `Install.ps1`. Don't worry, your data will be preserved.
2021-12-15 00:32:05 +08:00
- How can I get the logcat from WSA?
`%LOCALAPPDATA%\Packages\MicrosoftCorporationII.WindowsSubsystemForAndroid_8wekyb3d8bbwe\LocalState\diagnostics\logcat`
- How can I update Magisk to new version?
Do the same as updating WSA
- How to pass safetynet?
Like all the other emulators, no way.
- Virtualization is not enabled?
2021-12-30 11:41:48 +08:00
`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.
2021-12-15 00:32:05 +08:00
- How to remount system as read-write?
No way in WSA since it's mounted as read-only by Hyper-V. You can modify system by making a Magisk module. Or directly modify system.img. Ask Google for help.
- I cannot `adb connect localhost:58526`
2021-12-30 11:41:48 +08:00
Make sure developer mode is enabled. If the issue persists, check the IP address of WSA in the setting page and try `adb connect ip:5555`.
2021-12-15 00:32:05 +08:00
- Magisk online module list is empty?
Magisk actively remove online module repository. You can install 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 23.0 stable or lower version?
2022-02-14 02:09:01 +08:00
No. Magisk has bugs preventing itself running on WSA. Magisk 24+ has fixed them. So you must use Magisk 24 or higher version.
2021-12-15 00:32:05 +08:00
- How can I get rid of Magisk?
2022-02-14 02:09:01 +08:00
Choose `none` as root solution.
- Github script is updated, how can I synchronize it?
2021-12-16 19:52:22 +08:00
1. In your fork repository, click `fetch upstream`
![fetch](https://docs.github.com/assets/cb-33284/images/help/repository/fetch-upstream-drop-down.png)
1. Then and click `fetch and merge`
![merge](https://docs.github.com/assets/cb-128489/images/help/repository/fetch-and-merge-button.png)
2021-12-15 00:32:05 +08:00
2021-10-27 21:11:39 +08:00
## Credits
2022-05-18 00:25:56 +08:00
2022-07-23 01:18:16 +08:00
- [StoreLib](https://github.com/StoreDev/StoreLib): API for downloading WSA
2021-10-27 21:11:39 +08:00
- [Magisk](https://github.com/topjohnwu/Magisk): The most famous root solution on Android
- [The Open GApps Project](https://opengapps.org): One of the most famous Google Apps packages solution
- [WSA-Kernel-SU](https://github.com/LSPosed/WSA-Kernel-SU) and [kernel-assisted-superuser](https://git.zx2c4.com/kernel-assisted-superuser/): The kernel `su` for debugging Magisk Integration
- [WSAGAScript](https://github.com/ADeltaX/WSAGAScript): The first GApps integration script for WSA