Skip to content

Commit 744cbe2

Browse files
authored
Create Installation.md
1 parent 50a2dee commit 744cbe2

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed

‎Guides/Installation.md‎

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Installation
2+
3+
4+
> [!NOTE]
5+
> If you have the official Windows Subsystem For Android™ installed, you must [completely uninstall](#uninstallation) it to use MagiskOnWSA.
6+
7+
> [!IMPORTANT]
8+
> In case you want to preserve your data from the previous installation (official or MagiskOnWSA), you can backup Userdata.vhdx, located at ``%LOCALAPPDATA%\Packages\MicrosoftCorporationII.WindowsSubsystemForAndroid_8wekyb3d8bbwe\LocalCache\userdata.vhdx`` before uninstallation and restore it after installation. A guide for this process is located further down in this README.
9+
10+
1. Go to the [Releases page](https://github.com/MustardChef/WSABuilds/releases/latest)
11+
2. In the latest release, go to the Assets section and download the Windows Subsystem For Android™ version of your choosing (do not download "Source code")
12+
3. Extract the .7z archive and rename the folder (that you extracted) to ``WSA``
13+
4. Delete the .7z archive
14+
5. Move the newly extracted folder to a suitable location (Documents folder is a good choice), as you will need to keep the folder on your PC to use MagiskOnWSA
15+
16+
> [!NOTE]
17+
> If you're updating WSA, merge the folders and replace the files for all items when asked
18+
19+
6. Open the Windows Subsystem For Android™ folder: Search for and double-click `Run.bat`
20+
- 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.
21+
- If the popup windows disappear without asking administrative permission and Windows Subsystem For Android™ is not installed successfully, you should manually run Install.ps1 as administrator:
22+
23+
- Press Win+x and select Windows™ Terminal (Admin)
24+
25+
- Input the command below and press enter, replacing {X:\path\to\your\extracted\folder} including the {} with the path of the extracted folder
26+
```Powershell
27+
cd "{X:\path\to\your\extracted\folder}"
28+
```
29+
30+
- Input the command below and press enter
31+
```Powershell
32+
PowerShell.exe -ExecutionPolicy Bypass -File .\Install.ps1
33+
```
34+
35+
- The script will run and Windows Subsystem For Android™ will be installed
36+
- If this workaround does not work, your PC is not supported for WSA
37+
38+
7. Once the installation process completes, Windows Subsystem For Android™ will launch (if this is a first-time install, a window asking for consent to diagnositic information will be shown instead. Sometimes two identical windows will show, this is fine and nothing bad happens if you click OK in both windows)
39+
8. Click on the PowerShell window, then press any key on the keyboard, the PowerShell window should close
40+
9. Close File Explorer
41+
10. **Enjoy**
42+
43+
 
44+
45+
### Notice (Applicable for both Windows 10 and 11):
46+
47+
1. You can NOT delete the Windows Subsystem For Android™ installation folder.
48+
What `Add-AppxPackage -Register .\AppxManifest.xml` does is to register an appx package with some existing unpackaged files,
49+
so you need to keep them as long as you want to use Windows Subsystem For Android™.
50+
Check https://learn.microsoft.com/en-us/powershell/module/appx/add-appxpackage?view=windowsserver2022-ps for more details.
51+
2. You need to register your Windows Subsystem For Android™ appx package before you can run Windows Subsystem For Android™.
52+
For [WSABuilds](https://github.com/MustardChef/WSABuilds) and [MagiskOnWSALocal](https://github.com/LSPosed/MagiskOnWSALocal) users, you need to run `Run.bat` in the extracted dir.
53+
If the script fails, you can take the following steps for diagnosis (admin privilege required):
54+
1. Open a PowerShell window and change working directory to your Windows Subsystem For Android™ directory.
55+
56+
2. Run the command below in PowerShell. This should fail with an ActivityID, which is a UUID required for the next step.
57+
```Powershell
58+
Add-AppxPackage -ForceApplicationShutdown -ForceUpdateFromAnyVersion -Register .\AppxManifest.xml
59+
```
60+
61+
3. Run the command below in PowerShell. This should print the log of the failed operation.
62+
```Powershell
63+
Get-AppPackageLog -ActivityID <UUID>
64+
```
65+
4. Check the log for the reason of failure and fix it.

0 commit comments

Comments
 (0)