WSABuilds/README.md

136 lines
8.0 KiB
Markdown
Raw Normal View History

2021-12-12 02:20:37 +01:00
# Magisk on WSA (with Google Apps)
2021-10-26 12:19:47 +02:00
2022-09-26 12:20:30 +02:00
:warning: For fork developers: Please detach the fork from [upstream](https://github.com/LSPosed/MagiskOnWSALocal) before building with Actions, Github will count the forked Actions usage to the upstream repository, which means if a forked repository abuses Actions, the repository that gets disabled will be upstream. We are not against forks, but please detach them from our repository. If you do not make changes one day after receiving the detachment request, our organization will ban you.
2022-09-08 04:30:25 +02:00
## Support for generating from these systems
2022-08-14 11:10:50 +02:00
2022-09-08 04:30:25 +02:00
- Linux (x86_64 or arm64)
The following dependencies are required: `setools lzip wine patchelf e2fsprogs aria2 python3 attr`
2022-09-08 04:30:25 +02:00
The following components need to be installed using `winetricks`: `msxml6`
The python3 library `requests` is used.
2022-09-08 11:36:09 +02:00
Python version ≥ 3.7.
2022-09-08 04:30:25 +02:00
- Recommended Use
- Ubuntu (You can use [WSL2](https://apps.microsoft.com/store/search?publisher=Canonical%20Group%20Limited))
Ready to use right out of the box.
- Debian (You can use [WSL2](https://apps.microsoft.com/store/detail/debian/9MSVKQC78PK6))
Need to add `contrib` sources to the source list to install winetricks.
- OpenSUSE (You can use [WSL2](https://apps.microsoft.com/store/search?publisher=SUSE))
Ready to use right out of the box.
`run.sh` will handle all dependencies automatically.
No need to type any commands.
2022-09-08 04:30:25 +02:00
- Other Distributions
Install the dependencies manually.
2022-09-08 04:30:25 +02:00
Use the command-line program `build.sh`.
2022-08-14 11:10:50 +02:00
2021-10-27 15:06:38 +02:00
## Features
2022-05-17 18:25:56 +02:00
- Integrate Magisk and GApps in a few clicks within minutes
2021-10-27 16:07:29 +02:00
- Keep each build up to date
2021-10-27 15:06:38 +02:00
- Support both ARM64 and x64
2021-12-18 16:59:40 +01:00
- Support all OpenGApps variants except for aroma (aroma does not support x86_64, please use super instead)
2022-09-03 06:32:52 +02:00
- Remove Amazon Appstore
- Fix VPN dialog not showing (use our [VpnDialogs app](https://github.com/LSPosed/VpnDialogs))
2022-10-02 15:42:19 +02:00
- Add device administration feature
2021-12-30 04:41:48 +01:00
- Unattended installation
- Automatically activates developers mode in Windows 11
2022-08-14 11:10:50 +02:00
- Update to the new version while preserving data with a one-click script
2021-12-11 21:27:26 +01:00
- Merged all language packs
2021-12-18 14:19:30 +01:00
- Support managing start menu icons (manually installing [WSAHelper](https://github.com/LSPosed/WSAHelper/releases/latest) to use this feature)
2021-10-27 15:06:38 +02:00
2021-12-12 02:20:37 +01:00
## Text Guide
2021-10-26 11:16:38 +02:00
2022-08-14 09:24:32 +02:00
1. Star (if you like)
1. Clone the repo to local
- Run `build.sh --help` to get the usage if you want to use CLI.
1. Run `scripts/run.sh`
2022-09-07 09:27:06 +02:00
1. Select the WSA version and its architecture (mostly x64)
1. Select the version of Magisk
2022-09-10 08:47:48 +02:00
1. Choose which brand of GApps you want to install
- OpenGApps
2022-09-07 09:27:06 +02:00
Select the [OpenGApps variant](https://github.com/opengapps/opengapps/wiki#variants) you like.
- MindtheGapps
2022-09-07 14:07:29 +02:00
There is no other variant we can choose.
2022-09-07 09:27:06 +02:00
1. Select the root solution (none means no root)
2022-10-01 18:07:42 +02:00
1. 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 last step, 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-Nightly`or 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`
1. Extract the compressed file and open the folder created after the extraction of the file.
1. Here look for file `Run.bat` and run it.
2022-08-14 11:10:50 +02:00
- 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 you want to restore the icons to the start menu, please install and use [WSAHelper](https://github.com/LSPosed/WSAHelper/releases/latest).)
2022-01-13 15:18:45 +01: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-11 22:50:28 +01:00
1. Magisk/Play store will be launched. Enjoy by installing LSPosed-zygisk with zygisk enabled or Riru and LSPosed-riru
2021-10-31 12:24:33 +01:00
2021-12-14 17:32:05 +01:00
## FAQ
2022-05-17 18:25:56 +02:00
- Can I delete the installed folder?
2021-12-14 17:32:05 +01:00
No.
2022-08-14 11:10:50 +02:00
- How can I update WSA to a new version?
2021-12-14 17:32:05 +01:00
2022-08-14 11:10:50 +02:00
Delete the `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-14 17:32:05 +01:00
- How can I get the logcat from WSA?
`%LOCALAPPDATA%\Packages\MicrosoftCorporationII.WindowsSubsystemForAndroid_8wekyb3d8bbwe\LocalState\diagnostics\logcat`
2022-08-14 11:10:50 +02:00
- How can I update Magisk to a new version?
2021-12-14 17:32:05 +01:00
Do the same as updating WSA
- How to pass safetynet?
Like all the other emulators, no way.
- Virtualization is not enabled?
2021-12-30 04:41:48 +01: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.
2022-08-14 11:10:50 +02:00
- How to remount the system as read-write?
2021-12-14 17:32:05 +01:00
2022-08-14 11:10:50 +02:00
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.
2021-12-14 17:32:05 +01:00
- I cannot `adb connect localhost:58526`
2022-08-14 11:10:50 +02:00
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`.
2021-12-14 17:32:05 +01:00
- Magisk online module list is empty?
2022-08-14 11:10:50 +02:00
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 23.0 stable or a lower version?
2021-12-14 17:32:05 +01:00
2022-08-14 11:10:50 +02:00
No. Magisk has bugs preventing itself from running on WSA. Magisk 24+ has fixed them. So you must use Magisk 24 or higher version.
2021-12-14 17:32:05 +01:00
- How can I get rid of Magisk?
2022-08-14 11:10:50 +02:00
Choose `none` as the root solution.
2022-09-10 08:47:48 +02:00
- How to install custom GApps?
2022-09-10 08:47:48 +02:00
[Tutorial](./Custom-GApps.md)
- Where can I download MindtheGapps?
2022-09-07 14:07:29 +02:00
You can download from here [MindtheGapps](https://androidfilehost.com/?w=files&flid=322935) ([mirror](http://downloads.codefi.re/jdcteam/javelinanddart/gapps))
2022-09-07 14:07:29 +02:00
Note that there is no x86_64 pre-build, so you need to build it by yourself ([Repository](https://gitlab.com/MindTheGapps/vendor_gapps)).
- Can I switch OpenGApps to MindTheGapps and keep user data in a previous build?
2021-12-14 17:32:05 +01:00
2022-09-07 14:09:48 +02:00
No. You should wipe data after changing the GApps brand. Otherwise, you will find that the installed GApps are not recognized.
2022-09-07 14:07:29 +02:00
2021-10-27 15:11:39 +02:00
## Credits
2022-05-17 18:25:56 +02:00
2022-07-22 19:18:16 +02:00
- [StoreLib](https://github.com/StoreDev/StoreLib): API for downloading WSA
2021-10-27 15:11:39 +02: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