Giter Site home page Giter Site logo

lsposed / magiskonwsalocal Goto Github PK

View Code? Open in Web Editor NEW
9.4K 161.0 22.9K 27.77 MB

Integrate Magisk root and Google Apps into WSA (Windows Subsystem for Android)

License: GNU Affero General Public License v3.0

Python 34.05% Shell 49.68% PowerShell 14.90% Batchfile 1.37%
android windows google-apps magisk windows11 wsa

magiskonwsalocal's Introduction

Magisk on WSA (with Google Apps)

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

⚠️ 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
    Debian python3 aria2 unzip sudo whiptail python3-venv python3-pip p7zip-full
    openSUSE Tumbleweed Same as above dialog python3-venvctrl Same as above Same as above
    Arch Same as Debian libnewt Same as Debian python-pip p7zip

    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.

magiskonwsalocal's People

Contributors

alex-sandro92 avatar b- avatar bilditup1 avatar calendulish avatar carlgao4 avatar doddddd avatar everclearecct avatar faizauthar12 avatar ferferga avatar howard20181 avatar humenth avatar kokarare1212 avatar lalishansh avatar milkclouds avatar mriamnobody avatar okibcn avatar orariley70 avatar pawloland avatar pazhanir avatar ricnava00 avatar s1204it avatar sekibetu avatar sn-o-w avatar soleera avatar someone5678 avatar star-zer0 avatar vvb2060 avatar yeyaowei avatar yujincheng08 avatar zhongfly avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

magiskonwsalocal's Issues

error bash ./scripts/run.sh

Dependencies
Hit:1 https://mirrors.ustc.edu.cn/ubuntu bionic InRelease
Hit:2 https://mirrors.ustc.edu.cn/ubuntu bionic-updates InRelease
Hit:3 https://mirrors.ustc.edu.cn/ubuntu bionic-backports InRelease
Hit:4 https://mirrors.ustc.edu.cn/ubuntu bionic-security InRelease
Hit:5 https://mirrors.ustc.edu.cn/ubuntu bionic-proposed InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
6 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package wine is a virtual package provided by:
wine-stable 3.0-1ubuntu1
wine-development 3.6-1
You should explicitly select one to install.

E: Package 'wine' has no installation candidate
Requirement already satisfied: requests in /usr/lib/python3/dist-packages
./scripts/run.sh: line 65: winetricks: command not found
An error occurs, exit
Cleanup Work Directory

Some Errors

Should I rerun the run.sh, what's wrong?

[sudo] password for darkov:
Remove Amazon AppStore
Integrate Magisk
#!/system/bin/sh
mkdir -p /data/adb/magisk
cp /sbin/* /data/adb/magisk/
chmod -R 755 /data/adb/magisk
restorecon -R /data/adb/magisk
for module in $(ls /data/adb/modules); do
    if ! [ -f "/data/adb/modules/$module/disable" ] && [ -f "/data/adb/modules/$module/sepolicy.rule" ]; then
        /sbin/magiskpolicy --live --apply "/data/adb/modules/$module/sepolicy.rule"
    fi
done
sudo: patchelf: command not found
sudo: patchelf: command not found
sudo: patchelf: command not found
sudo: patchelf: command not found
/dev/wsa-magisk(/.*)?    u:object_r:magisk_file:s0
/data/adb/magisk(/.*)?   u:object_r:magisk_file:s0
sudo: unable to execute ../workdir/magisk/magiskpolicy: No such file or directory
on post-fs-data
    start logd
    start adbd
    mkdir /dev/wsa-magisk
    mount tmpfs tmpfs /dev/wsa-magisk mode=0755
    copy /sbin/magisk64 /dev/wsa-magisk/magisk64
    chmod 0755 /dev/wsa-magisk/magisk64
    symlink ./magisk64 /dev/wsa-magisk/magisk
    symlink ./magisk64 /dev/wsa-magisk/su
    symlink ./magisk64 /dev/wsa-magisk/resetprop
    copy /sbin/magisk32 /dev/wsa-magisk/magisk32
    chmod 0755 /dev/wsa-magisk/magisk32
    copy /sbin/magiskinit /dev/wsa-magisk/magiskinit
    chmod 0755 /dev/wsa-magisk/magiskinit
    copy /sbin/magiskpolicy /dev/wsa-magisk/magiskpolicy
    chmod 0755 /dev/wsa-magisk/magiskpolicy
    mkdir /dev/wsa-magisk/.magisk 700
    mkdir /dev/wsa-magisk/.magisk/mirror 700
    mkdir /dev/wsa-magisk/.magisk/block 700
    copy /sbin/magisk.apk /dev/wsa-magisk/stub.apk
    rm /dev/.magisk_unblock
    start IhhslLhHYfse
    start FAhW7H9G5sf
    wait /dev/.magisk_unblock 40
    rm /dev/.magisk_unblock

service IhhslLhHYfse /system/bin/sh /sbin/loadpolicy.sh
    user root
    seclabel u:r:magisk:s0
    oneshot

service FAhW7H9G5sf /dev/wsa-magisk/magisk --post-fs-data
    user root
    seclabel u:r:magisk:s0
    oneshot

service HLiFsR1HtIXVN6 /dev/wsa-magisk/magisk --service
    class late_start
    user root
    seclabel u:r:magisk:s0
    oneshot

on property:sys.boot_completed=1
    mkdir /data/adb/magisk 755
    copy /sbin/magisk.apk /data/adb/magisk/magisk.apk
    start YqCTLTppv3ML

service YqCTLTppv3ML /dev/wsa-magisk/magisk --boot-complete
    user root
    seclabel u:r:magisk:s0
    oneshot
Merge Language Resources
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<resources targetOsVersion="10.0.0" majorVersion="1">
<index root="\" startIndexAt="\">
    <indexer-config type="folder" foldernameAsQualifier="true" filenameAsQualifier="true" qualifierDelimiter="."/>
    <indexer-config type="PRI"/>
</index>
</resources>
run.sh: line 280: wine64: command not found
Add extra packages
chcon: failed to change context of '../workdir/system/system/priv-app/BuiltInPrintService/lib/x86_64/libwfds.so' to ‘u:object_r:system_file:s0’: No such file or directory
chcon: failed to change context of '../workdir/system/system/priv-app/BuiltInPrintService/lib/x86_64/libcups.so' to ‘u:object_r:system_file:s0’: No such file or directory
Integrate GApps
'../workdir/gapps/product/overlay/GoogleWebViewOverlay.apk' -> '../workdir/system/product/overlay/GoogleWebViewOverlay.apk'
rm: cannot remove '../workdir/gapps/product/overlay/GoogleWebViewOverlay.apk': Permission denied
'../workdir/gapps/priv-app/SetupWizard' -> '../workdir/system/system/priv-app/SetupWizard'
'../workdir/gapps/priv-app/SetupWizard/SetupWizard.apk' -> '../workdir/system/system/priv-app/SetupWizard/SetupWizard.apk'
cp: cannot overwrite non-directory '../workdir/system/system/product' with directory '../workdir/gapps/product'
chown: cannot dereference '../workdir/system/system/app/PrintSpooler/lib/x86_64/libprintspooler_jni.so': No such file or directory
chown: cannot dereference '../workdir/system/system/app/Bluetooth/lib/x86_64/libbluetooth_jni.so': No such file or directory
chown: cannot dereference '../workdir/system/system/priv-app/BuiltInPrintService/lib/x86_64/libwfds.so': No such file or directory
chown: cannot dereference '../workdir/system/system/priv-app/BuiltInPrintService/lib/x86_64/libcups.so': No such file or directory
chown: cannot dereference '../workdir/system/product/app/Camera2/lib/x86_64/libjni_jpegutil.so': No such file or directory
chown: cannot dereference '../workdir/system/product/app/Camera2/lib/x86_64/libjni_tinyplanet.so': No such file or directory
chown: cannot dereference '../workdir/system/product/app/Gallery2/lib/x86_64/libjni_jpegstream.so': No such file or directory
chown: cannot dereference '../workdir/system/product/app/Gallery2/lib/x86_64/libjni_filtershow_filters.so': No such file or directory
chown: cannot dereference '../workdir/system/product/app/Gallery2/lib/x86_64/libjni_eglfence.so': No such file or directory
find: ‘../workdir/system/product/lib’: No such file or directory
find: ‘../workdir/system/product/lib’: No such file or directory
find: ‘../workdir/system/product/lib’: No such file or directory
find: ‘../workdir/system/product/lib’: No such file or directory
find: ‘../workdir/system/product/lib’: No such file or directory
ls: cannot access '../workdir/gapps/etc/': No such file or directory
ls: cannot access '../workdir/gapps/etc/': No such file or directory
ls: cannot access '../workdir/gapps/etc/': No such file or directory
sudo: patchelf: command not found
sudo: patchelf: command not found
sudo: patchelf: command not found
sudo: patchelf: command not found
sudo: unable to execute ../workdir/magisk/magiskpolicy: No such file or directory
Fix GApps prop
fixing ../workdir/system/system/build.prop
fixing ../workdir/system/vendor/build.prop
fixing ../workdir/system/vendor/odm/etc/build.prop
Umount images
Shrink images
e2fsck 1.45.5 (07-Jan-2020)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/: 2697/3072 files (0.5% non-contiguous), 216870/237259 blocks
resize2fs 1.45.5 (07-Jan-2020)
Resizing the filesystem on ../workdir/wsa/x64/system.img to 229469 (4k) blocks.
The filesystem on ../workdir/wsa/x64/system.img is now 229469 (4k) blocks long.

e2fsck 1.45.5 (07-Jan-2020)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
vendor: 1349/1392 files (0.9% non-contiguous), 89241/93637 blocks
resize2fs 1.45.5 (07-Jan-2020)
Resizing the filesystem on ../workdir/wsa/x64/vendor.img to 89249 (4k) blocks.
The filesystem on ../workdir/wsa/x64/vendor.img is now 89249 (4k) blocks long.

e2fsck 1.45.5 (07-Jan-2020)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
product: 144/192 files (0.0% non-contiguous), 73014/84421 blocks
resize2fs 1.45.5 (07-Jan-2020)
Resizing the filesystem on ../workdir/wsa/x64/product.img to 73036 (4k) blocks.
The filesystem on ../workdir/wsa/x64/product.img is now 73036 (4k) blocks long.

e2fsck 1.45.5 (07-Jan-2020)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
system_ext: 83/96 files (1.2% non-contiguous), 33709/37316 blocks
resize2fs 1.45.5 (07-Jan-2020)
Resizing the filesystem on ../workdir/wsa/x64/system_ext.img to 33716 (4k) blocks.
The filesystem on ../workdir/wsa/x64/system_ext.img is now 33716 (4k) blocks long.

Remove signature and add scripts
# Automated Install script by Mioki
# http://github.com/okibcn
function Test-Administrator {
    [OutputType([bool])]
    param()
    process {
        [Security.Principal.WindowsPrincipal]$user = [Security.Principal.WindowsIdentity]::GetCurrent();
        return $user.IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator);
    }
}

function Finish {
    Clear-Host
    Start-Process "wsa://com.topjohnwu.magisk"
    Start-Process "wsa://com.android.vending"
}

if (-not (Test-Administrator)) {
    Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Bypass -Force
    $proc = Start-Process -PassThru -WindowStyle Hidden -Verb RunAs powershell.exe -Args "-executionpolicy bypass -command Set-Location '$PSScriptRoot'; &'$PSCommandPath' EVAL"
    $proc.WaitForExit()
    if ($proc.ExitCode -ne 0) {
        Clear-Host
        Write-Warning "Failed to launch start as Administrator`r`nPress any key to exit"
        $null = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown');
    }
    exit
}
elseif (($args.Count -eq 1) -and ($args[0] -eq "EVAL")) {
    Start-Process powershell.exe -Args "-executionpolicy bypass -command Set-Location '$PSScriptRoot'; &'$PSCommandPath'"
    exit
}

if (((Test-Path -Path "AppxManifest.xml","Assets","CustomInstall","Fonts","GSKServer","Images","Licenses","Microsoft.UI.Xaml.winmd","Registry.dat","Styles","Tools","WSACodecs.dll","WSACrashUploader","WsaClient","WsaProxy","WsaService","WsaSettings.exe","WsaSettings.winmd","WsaSettingsBroker","appcompatdb.json","classicAppInstaller_WSA.sccd","gfxstream_backend.dll","libEGL.dll","libGLESv2.dll","lxutil.dll","metadata.vhdx","product.img","resources.pri","system.img","system_ext.img","userdata.vhdx","vclibs.appx","vendor.img","wslcore.dll","wsldeps.dll","wsldevicehost.dll","wslhost.exe","xaml.appx") -eq $false).Count) {
    Write-Error "Some files are missing in the zip. Please try to download it again from the browser downloader, or try to run the workflow again. Press any key to exist"
    $null = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown')
    exit 1
}

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" /t REG_DWORD /f /v "AllowDevelopmentWithoutDevLicense" /d "1"

$VMP = Get-WindowsOptionalFeature -Online -FeatureName 'VirtualMachinePlatform'
if ($VMP.State -ne "Enabled") {
    Enable-WindowsOptionalFeature -Online -NoRestart -FeatureName 'VirtualMachinePlatform'
    Clear-Host
    Write-Warning "Need restart to enable virtual machine platform`r`nPress y to restart or press any key to exit"
    $key = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown')
    If ("y" -eq $key.Character) {
        Restart-Computer -Confirm
    }
    Else {
        exit 1
    }
}

Add-AppxPackage -ForceApplicationShutdown -ForceUpdateFromAnyVersion -Path vclibs.appx
Add-AppxPackage -ForceApplicationShutdown -ForceUpdateFromAnyVersion -Path xaml.appx

$Installed = $null
$Installed = Get-AppxPackage -Name 'MicrosoftCorporationII.WindowsSubsystemForAndroid'

If (($null -ne $Installed) -and (-not ($Installed.IsDevelopmentMode))) {
    Clear-Host
    Write-Warning "There is already one installed WSA. Please uninstall it first.`r`nPress y to uninstall existing WSA or press any key to exit"
    $key = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown')
    If ("y" -eq $key.Character) {
        Remove-AppxPackage -Package $Installed.PackageFullName
    }
    Else {
        exit 1
    }
}
Clear-Host
Write-Host "Installing MagiskOnWSA..."
Stop-Process -Name "wsaclient" -ErrorAction "silentlycontinue"
Add-AppxPackage -ForceApplicationShutdown -ForceUpdateFromAnyVersion -Register .\AppxManifest.xml
if ($?) {
    Finish
}
Elseif ($null -ne $Installed) {
    Clear-Host
    Write-Host "Failed to update, try to uninstall existing installation while preserving userdata..."
    Remove-AppxPackage -PreserveApplicationData -Package $Installed.PackageFullName
    Add-AppxPackage -ForceApplicationShutdown -ForceUpdateFromAnyVersion -Register .\AppxManifest.xml
    if ($?) {
        Finish
    }
}
Write-Host "All Done`r`nPress any key to exit"
$null = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown')
Generate info
WSA-with-magisk-GApps-pico_x64
WSA_VER=2205.40000.21.0
WSA_MAIN_VER=2205
WSA_REL=Release-Nightly
rm: cannot remove '../workdir/gapps/product/overlay/GoogleWebViewOverlay.apk': Permission denied
rm: cannot remove '../workdir/gapps/priv-app/SetupWizard/SetupWizard.apk': Permission denied

Apps icons disappeared after update

After updating WSA and Magisk with this method all my android apps icons disappeared from start menu and they are not listed in compatibility tab in WSA settings.
Anyway those apps are installed and are working (I can launch them using an utility). Also Magisk and GApps still work.

I already tried running install.ps1 multiple times and restarting my PC.

下载Magisk时出错

Download Magisk
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 159, in _new_conn
conn = connection.create_connection(
File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 61, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File "/usr/lib/python3.8/socket.py", line 918, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 665, in urlopen
httplib_response = self._make_request(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 376, in _make_request
self._validate_conn(conn)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 996, in _validate_conn
conn.connect()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 314, in connect
conn = self._new_conn()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 171, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7f4971e14520>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 719, in urlopen
retries = retries.increment(
File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 436, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /topjohnwu/magisk-files/raw/master/stable.json (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f4971e14520>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "downloadMagisk.py", line 25, in
magisk_apk = json.loads(requests.get(
File "/usr/lib/python3/dist-packages/requests/api.py", line 75, in get
return request('get', url, params=params, **kwargs)
File "/usr/lib/python3/dist-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /topjohnwu/magisk-files/raw/master/stable.json (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f4971e14520>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))
An error occurs, exit
Cleanup Work Directory
Cleanup Download Directory

无法下载magisk.zip,一直在尝试

ARCH=x64
RELEASE_TYPE=retail
MAGISK_VER=stable
GAPPS_VARIANT=
REMOVE_AMAZON=remove
ROOT_SOL=magisk
COMPRESS_OUTPUT=yes
Generate Download Links
Generating WSA download link: arch=x64 release_type=Retail
Generating Magisk download link: release type=stable
download link: https://cdn.jsdelivr.net/gh/topjohnwu/[email protected]/app-release.apk
./scripts/run.sh: 第 180 行: [: !=:需要一元表达式
Download Artifacts

08/25 16:36:03 [NOTICE] Downloading 2 item(s)

08/25 16:36:04 [NOTICE] CUID#7 - Redirecting to https://download.microsoft.com/download/4/7/c/47c6134b-d61f-4024-83bd-b9c9ea951c25/appx/Microsoft.VCLibs.x64.14.00.Desktop.appx

08/25 16:36:04 [NOTICE] GID#dc5bb57834d062cb - 下载已完成:/www/wwwroot/wsa/download/vclibs.appx

08/25 16:36:04 [NOTICE] 下载已完成:/www/wwwroot/wsa/download/vclibs.appx

08/25 16:36:04 [NOTICE] CUID#8 - Redirecting to https://raw.githubusercontent.com/topjohnwu/magisk-files/25.2/app-release.apk
*** Download Progress Summary as of Thu Aug 25 16:37:03 2022 ***

[#19ae89 0B/0B CN:1 DL:0B]
FILE: /www/wwwroot/wsa/download/magisk.zip

[#19ae89 0B/0B CN:1 DL:0B]
08/25 16:37:05 [NOTICE] CUID#8 - Redirecting to https://raw.githubusercontent.com/topjohnwu/magisk-files/25.2/app-release.apk
*** Download Progress Summary as of Thu Aug 25 16:38:04 2022 ***

[#19ae89 0B/0B CN:1 DL:0B]
FILE: /www/wwwroot/wsa/download/magisk.zip

[#19ae89 0B/0B CN:1 DL:0B]
08/25 16:38:06 [NOTICE] CUID#8 - Redirecting to https://raw.githubusercontent.com/topjohnwu/magisk-files/25.2/app-release.apk
*** Download Progress Summary as of Thu Aug 25 16:39:04 2022 ***

[#19ae89 0B/0B CN:1 DL:0B]
FILE: /www/wwwroot/wsa/download/magisk.zip

[#19ae89 0B/0B CN:1 DL:0B]
08/25 16:39:08 [NOTICE] CUID#8 - Redirecting to https://raw.githubusercontent.com/topjohnwu/magisk-files/25.2/app-release.apk
*** Download Progress Summary as of Thu Aug 25 16:40:05 2022 ***

[#19ae89 0B/0B CN:1 DL:0B]
FILE: /www/wwwroot/wsa/download/magisk.zip

[#19ae89 0B/0B CN:1 DL:0B]
08/25 16:40:09 [NOTICE] CUID#8 - Redirecting to https://raw.githubusercontent.com/topjohnwu/magisk-files/25.2/app-release.apk
*** Download Progress Summary as of Thu Aug 25 16:41:05 2022 ***

[#19ae89 0B/0B CN:1 DL:0B]
FILE: /www/wwwroot/wsa/download/magisk.zip

[#19ae89 0B/0B CN:1 DL:0B]
08/25 16:41:11 [NOTICE] CUID#8 - Redirecting to https://raw.githubusercontent.com/topjohnwu/magisk-files/25.2/app-release.apk
*** Download Progress Summary as of Thu Aug 25 16:42:05 2022 ***

[#19ae89 0B/0B CN:1 DL:0B]
FILE: /www/wwwroot/wsa/download/magisk.zip

[#19ae89 0B/0B CN:1 DL:0B]
08/25 16:42:16 [NOTICE] CUID#8 - Redirecting to https://raw.githubusercontent.com/topjohnwu/magisk-files/25.2/app-release.apk
[#19ae89 0B/0B CN:1 DL:0B]
08/25 16:42:24 [NOTICE] 正在关闭程序…再次按 Ctrl-C 可强制关闭程序。

08/25 16:42:24 [NOTICE] GID 为 19ae89aa331741c3 的下载项未完成:/www/wwwroot/wsa/download/magisk.zip

下载结果:
gid |stat|avg speed |path/URI
======+====+===========+=======================================================
dc5bb5|OK | 0B/s|/www/wwwroot/wsa/download/vclibs.appx
19ae89|INPR| 0B/s|/www/wwwroot/wsa/download/magisk.zip

状态标识:
(OK): 下载完成。(INPR): 正在下载。

传输重启后 aria2 可继续该下载。
如见任何错误,详查日志文件。详细信息见帮助或手册页面中的“-l”选项。
An error has occurred, exit
Cleanup Work Directory
Cleanup Download Directory
[root@ubuntu-virtual-machine:/www/wwwroot/wsa#

Erroring out in run.sh

ARCH=x64
RELEASE_TYPE=retail
MAGISK_VER=stable
GAPPS_VARIANT=pico
REMOVE_AMAZON=remove
ROOT_SOL=magisk
Download WSA
python3: can't open file 'downloadWSA.py': [Errno 2] No such file or directory
extractWSA
python3: can't open file 'extractWSA.py': [Errno 2] No such file or directory
Download Magisk
python3: can't open file 'downloadMagisk.py': [Errno 2] No such file or directory
Download OpenGApps
python3: can't open file 'downloadGapps.py': [Errno 2] No such file or directory
Extract GApps
lzip: (stdin): File ends unexpectedly at member header.
tar: Child returned status 2
tar: Error is not recoverable: exiting now
Expand images
e2fsck 1.45.5 (07-Jan-2020)
e2fsck: No such file or directory while trying to open ../workdir/wsa/x64/system_ext.img
Possibly non-existent device?
du: cannot access '../workdir/wsa/x64/system_ext.img': No such file or directory
resize2fs 1.45.5 (07-Jan-2020)
open: No such file or directory while opening ../workdir/wsa/x64/system_ext.img
e2fsck 1.45.5 (07-Jan-2020)
e2fsck: No such file or directory while trying to open ../workdir/wsa/x64/product.img
Possibly non-existent device?
du: cannot access '../workdir/wsa/x64/product.img': No such file or directory
resize2fs 1.45.5 (07-Jan-2020)
open: No such file or directory while opening ../workdir/wsa/x64/product.img
e2fsck 1.45.5 (07-Jan-2020)
e2fsck: No such file or directory while trying to open ../workdir/wsa/x64/system.img
Possibly non-existent device?
du: cannot access '../workdir/wsa/x64/system.img': No such file or directory
du: cannot access '../workdir/gapps/product': No such file or directory
./scripts/run.sh: line 155: 20000 + 0 - : syntax error: operand expected (error token is "- ")
resize2fs 1.45.5 (07-Jan-2020)
open: No such file or directory while opening ../workdir/wsa/x64/system.img
e2fsck 1.45.5 (07-Jan-2020)
e2fsck: No such file or directory while trying to open ../workdir/wsa/x64/vendor.img
Possibly non-existent device?
du: cannot access '../workdir/wsa/x64/vendor.img': No such file or directory
resize2fs 1.45.5 (07-Jan-2020)
open: No such file or directory while opening ../workdir/wsa/x64/vendor.img
Mount images
mount: ../workdir/system: failed to setup loop device for ../workdir/wsa/x64/system.img.
mount: ../workdir/system/vendor: failed to setup loop device for ../workdir/wsa/x64/vendor.img.
mount: ../workdir/system/product: failed to setup loop device for ../workdir/wsa/x64/product.img.
mount: ../workdir/system/system_ext: failed to setup loop device for ../workdir/wsa/x64/system_ext.img.
Remove Amazon AppStore
find: ‘../workdir/system/product/etc/permissions’: No such file or directory
find: ‘../workdir/system/product/etc/sysconfig’: No such file or directory
find: ‘../workdir/system/product/framework’: No such file or directory
find: ‘../workdir/system/product/priv-app’: No such file or directory
Integrate Magisk
chcon: failed to get security context of '../workdir/system/init.environ.rc': No such file or directory
cp: cannot stat '../workdir/magisk/magisk/*': No such file or directory
cp: cannot stat '../download/magisk.zip': No such file or directory
#!/system/bin/sh
mkdir -p /data/adb/magisk
cp /sbin/* /data/adb/magisk/
chmod -R 755 /data/adb/magisk
restorecon -R /data/adb/magisk
for module in $(ls /data/adb/modules); do
    if ! [ -f "/data/adb/modules/$module/disable" ] && [ -f "/data/adb/modules/$module/sepolicy.rule" ]; then
        /sbin/magiskpolicy --live --apply "/data/adb/modules/$module/sepolicy.rule"
    fi
done
chcon: failed to get security context of '../workdir/system/product': No such file or directory
patchelf: getting info about '../workdir/magisk/magiskpolicy': No such file or directory
patchelf: getting info about '../workdir/magisk/magiskpolicy': No such file or directory
patchelf: getting info about '../workdir/magisk/magiskpolicy': No such file or directory
patchelf: getting info about '../workdir/magisk/magiskpolicy': No such file or directory
chmod: cannot access '../workdir/magisk/magiskpolicy': No such file or directory
tee: ../workdir/system/vendor/etc/selinux/vendor_file_contexts: No such file or directory
/dev/wsa-magisk(/.*)?    u:object_r:magisk_file:s0
tee: ../workdir/system/vendor/etc/selinux/vendor_file_contexts: No such file or directory
/data/adb/magisk(/.*)?   u:object_r:magisk_file:s0
sudo: ../workdir/magisk/magiskpolicy: command not found
tee: ../workdir/system/system/etc/init/hw/init.rc: No such file or directory
on post-fs-data
    start logd
    start adbd
    mkdir /dev/wsa-magisk
    mount tmpfs tmpfs /dev/wsa-magisk mode=0755
    copy /sbin/magisk64 /dev/wsa-magisk/magisk64
    chmod 0755 /dev/wsa-magisk/magisk64
    symlink ./magisk64 /dev/wsa-magisk/magisk
    symlink ./magisk64 /dev/wsa-magisk/su
    symlink ./magisk64 /dev/wsa-magisk/resetprop
    copy /sbin/magisk32 /dev/wsa-magisk/magisk32
    chmod 0755 /dev/wsa-magisk/magisk32
    copy /sbin/magiskinit /dev/wsa-magisk/magiskinit
    chmod 0755 /dev/wsa-magisk/magiskinit
    copy /sbin/magiskpolicy /dev/wsa-magisk/magiskpolicy
    chmod 0755 /dev/wsa-magisk/magiskpolicy
    mkdir /dev/wsa-magisk/.magisk 700
    mkdir /dev/wsa-magisk/.magisk/mirror 700
    mkdir /dev/wsa-magisk/.magisk/block 700
    copy /sbin/magisk.apk /dev/wsa-magisk/stub.apk
    rm /dev/.magisk_unblock
    start IhhslLhHYfse
    start FAhW7H9G5sf
    wait /dev/.magisk_unblock 40
    rm /dev/.magisk_unblock

service IhhslLhHYfse /system/bin/sh /sbin/loadpolicy.sh
    user root
    seclabel u:r:magisk:s0
    oneshot

service FAhW7H9G5sf /dev/wsa-magisk/magisk --post-fs-data
    user root
    seclabel u:r:magisk:s0
    oneshot

service HLiFsR1HtIXVN6 /dev/wsa-magisk/magisk --service
    class late_start
    user root
    seclabel u:r:magisk:s0
    oneshot

on property:sys.boot_completed=1
    mkdir /data/adb/magisk 755
    copy /sbin/magisk.apk /data/adb/magisk/magisk.apk
    start YqCTLTppv3ML

service YqCTLTppv3ML /dev/wsa-magisk/magisk --boot-complete
    user root
    seclabel u:r:magisk:s0
    oneshot
Merge Language Resources
cp: cannot stat '../workdir/wsa/x64/resources.pri': No such file or directory
cp: cannot stat '../workdir/wsa/x64/AppxManifest.xml': No such file or directory
tee: ../workdir/wsa/priconfig.xml: No such file or directory
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<resources targetOsVersion="10.0.0" majorVersion="1">
<index root="\" startIndexAt="\">
    <indexer-config type="folder" foldernameAsQualifier="true" filenameAsQualifier="true" qualifierDelimiter="."/>
    <indexer-config type="PRI"/>
</index>
</resources>
wine: cannot find '../wine/makepri.exe'
cat: '../workdir/wsa/xml/*': No such file or directory
sed: can't read ../workdir/wsa/x64/AppxManifest.xml: No such file or directory
Add extra packages
cp: cannot stat '../x64/system/*': No such file or directory
find: ‘../workdir/system/system/priv-app’: No such file or directory
find: ‘../workdir/system/system/priv-app’: No such file or directory
find: ‘../workdir/system/system/priv-app’: No such file or directory
Integrate GApps
cp: cannot stat '../x64/gapps/*': No such file or directory
cp: cannot stat '../workdir/gapps/product/*': No such file or directory
cp: cannot stat '../workdir/gapps/*': No such file or directory
find: ‘../workdir/system/system/app’: No such file or directory
find: ‘../workdir/system/system/etc’: No such file or directory
find: ‘../workdir/system/system/framework’: No such file or directory
find: ‘../workdir/system/system/priv-app’: No such file or directory
find: ‘../workdir/system/product/app’: No such file or directory
find: ‘../workdir/system/product/etc’: No such file or directory
find: ‘../workdir/system/product/overlay’: No such file or directory
find: ‘../workdir/system/product/priv-app’: No such file or directory
find: ‘../workdir/system/product/lib64’: No such file or directory
find: ‘../workdir/system/product/lib’: No such file or directory
find: ‘../workdir/system/product/framework’: No such file or directory
find: ‘../workdir/system/system/app’: No such file or directory
find: ‘../workdir/system/system/etc’: No such file or directory
find: ‘../workdir/system/system/framework’: No such file or directory
find: ‘../workdir/system/system/priv-app’: No such file or directory
find: ‘../workdir/system/product/app’: No such file or directory
find: ‘../workdir/system/product/etc’: No such file or directory
find: ‘../workdir/system/product/overlay’: No such file or directory
find: ‘../workdir/system/product/priv-app’: No such file or directory
find: ‘../workdir/system/product/lib64’: No such file or directory
find: ‘../workdir/system/product/lib’: No such file or directory
find: ‘../workdir/system/product/framework’: No such file or directory
find: ‘../workdir/system/system/app’: No such file or directory
find: ‘../workdir/system/system/framework’: No such file or directory
find: ‘../workdir/system/system/priv-app’: No such file or directory
find: ‘../workdir/system/product/app’: No such file or directory
find: ‘../workdir/system/product/etc’: No such file or directory
find: ‘../workdir/system/product/overlay’: No such file or directory
find: ‘../workdir/system/product/priv-app’: No such file or directory
find: ‘../workdir/system/product/lib64’: No such file or directory
find: ‘../workdir/system/product/lib’: No such file or directory
find: ‘../workdir/system/product/framework’: No such file or directory
find: ‘../workdir/system/system/app’: No such file or directory
find: ‘../workdir/system/system/framework’: No such file or directory
find: ‘../workdir/system/system/priv-app’: No such file or directory
find: ‘../workdir/system/product/app’: No such file or directory
find: ‘../workdir/system/product/etc’: No such file or directory
find: ‘../workdir/system/product/overlay’: No such file or directory
find: ‘../workdir/system/product/priv-app’: No such file or directory
find: ‘../workdir/system/product/lib64’: No such file or directory
find: ‘../workdir/system/product/lib’: No such file or directory
find: ‘../workdir/system/product/framework’: No such file or directory
find: ‘../workdir/system/system/app’: No such file or directory
find: ‘../workdir/system/system/framework’: No such file or directory
find: ‘../workdir/system/system/priv-app’: No such file or directory
find: ‘../workdir/system/product/app’: No such file or directory
find: ‘../workdir/system/product/etc’: No such file or directory
find: ‘../workdir/system/product/overlay’: No such file or directory
find: ‘../workdir/system/product/priv-app’: No such file or directory
find: ‘../workdir/system/product/lib64’: No such file or directory
find: ‘../workdir/system/product/lib’: No such file or directory
find: ‘../workdir/system/product/framework’: No such file or directory
ls: cannot access '../workdir/gapps/etc/': No such file or directory
ls: cannot access '../workdir/gapps/etc/': No such file or directory
ls: cannot access '../workdir/gapps/etc/': No such file or directory
patchelf: getting info about '../workdir/magisk/magiskpolicy': No such file or directory
patchelf: getting info about '../workdir/magisk/magiskpolicy': No such file or directory
patchelf: getting info about '../workdir/magisk/magiskpolicy': No such file or directory
patchelf: getting info about '../workdir/magisk/magiskpolicy': No such file or directory
chmod: cannot access '../workdir/magisk/magiskpolicy': No such file or directory
sudo: ../workdir/magisk/magiskpolicy: command not found
Fix GApps prop
python3: can't open file 'fixGappsProp.py': [Errno 2] No such file or directory
Umount images
umount: ../workdir/system/vendor: no mount point specified.
umount: ../workdir/system/product: no mount point specified.
umount: ../workdir/system/system_ext: no mount point specified.
umount: ../workdir/system: not mounted.
Shrink images
e2fsck 1.45.5 (07-Jan-2020)
e2fsck: No such file or directory while trying to open ../workdir/wsa/x64/system.img
Possibly non-existent device?
resize2fs 1.45.5 (07-Jan-2020)
open: No such file or directory while opening ../workdir/wsa/x64/system.img
e2fsck 1.45.5 (07-Jan-2020)
e2fsck: No such file or directory while trying to open ../workdir/wsa/x64/vendor.img
Possibly non-existent device?
resize2fs 1.45.5 (07-Jan-2020)
open: No such file or directory while opening ../workdir/wsa/x64/vendor.img
e2fsck 1.45.5 (07-Jan-2020)
e2fsck: No such file or directory while trying to open ../workdir/wsa/x64/product.img
Possibly non-existent device?
resize2fs 1.45.5 (07-Jan-2020)
open: No such file or directory while opening ../workdir/wsa/x64/product.img
e2fsck 1.45.5 (07-Jan-2020)
e2fsck: No such file or directory while trying to open ../workdir/wsa/x64/system_ext.img
Possibly non-existent device?
resize2fs 1.45.5 (07-Jan-2020)
open: No such file or directory while opening ../workdir/wsa/x64/system_ext.img
Remove signature and add scripts
cp: target '../workdir/wsa/x64' is not a directory
ls: cannot access '../workdir/wsa/x64': No such file or directory
tee: ../workdir/wsa/x64/Install.ps1: No such file or directory
# Automated Install script by Mioki
# http://github.com/okibcn
function Test-Administrator {
    [OutputType([bool])]
    param()
    process {
        [Security.Principal.WindowsPrincipal]$user = [Security.Principal.WindowsIdentity]::GetCurrent();
        return $user.IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator);
    }
}

function Finish {
    Clear-Host
    Start-Process "wsa://com.topjohnwu.magisk"
    Start-Process "wsa://com.android.vending"
}

if (-not (Test-Administrator)) {
    Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Bypass -Force
    $proc = Start-Process -PassThru -WindowStyle Hidden -Verb RunAs powershell.exe -Args "-executionpolicy bypass -command Set-Location '$PSScriptRoot'; &'$PSCommandPath' EVAL"
    $proc.WaitForExit()
    if ($proc.ExitCode -ne 0) {
        Clear-Host
        Write-Warning "Failed to launch start as Administrator`r`nPress any key to exit"
        $null = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown');
    }
    exit
}
elseif (($args.Count -eq 1) -and ($args[0] -eq "EVAL")) {
    Start-Process powershell.exe -Args "-executionpolicy bypass -command Set-Location '$PSScriptRoot'; &'$PSCommandPath'"
    exit
}

if (((Test-Path -Path ) -eq $false).Count) {
    Write-Error "Some files are missing in the zip. Please try to download it again from the browser downloader, or try to run the workflow again. Press any key to exist"
    $null = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown')
    exit 1
}

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" /t REG_DWORD /f /v "AllowDevelopmentWithoutDevLicense" /d "1"

$VMP = Get-WindowsOptionalFeature -Online -FeatureName 'VirtualMachinePlatform'
if ($VMP.State -ne "Enabled") {
    Enable-WindowsOptionalFeature -Online -NoRestart -FeatureName 'VirtualMachinePlatform'
    Clear-Host
    Write-Warning "Need restart to enable virtual machine platform`r`nPress y to restart or press any key to exit"
    $key = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown')
    If ("y" -eq $key.Character) {
        Restart-Computer -Confirm
    }
    Else {
        exit 1
    }
}

Add-AppxPackage -ForceApplicationShutdown -ForceUpdateFromAnyVersion -Path vclibs.appx
Add-AppxPackage -ForceApplicationShutdown -ForceUpdateFromAnyVersion -Path xaml.appx

$Installed = $null
$Installed = Get-AppxPackage -Name 'MicrosoftCorporationII.WindowsSubsystemForAndroid'

If (($null -ne $Installed) -and (-not ($Installed.IsDevelopmentMode))) {
    Clear-Host
    Write-Warning "There is already one installed WSA. Please uninstall it first.`r`nPress y to uninstall existing WSA or press any key to exit"
    $key = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown')
    If ("y" -eq $key.Character) {
        Remove-AppxPackage -Package $Installed.PackageFullName
    }
    Else {
        exit 1
    }
}
Clear-Host
Write-Host "Installing MagiskOnWSA..."
Stop-Process -Name "wsaclient" -ErrorAction "silentlycontinue"
Add-AppxPackage -ForceApplicationShutdown -ForceUpdateFromAnyVersion -Register .\AppxManifest.xml
if ($?) {
    Finish
}
Elseif ($null -ne $Installed) {
    Clear-Host
    Write-Host "Failed to update, try to uninstall existing installation while preserving userdata..."
    Remove-AppxPackage -PreserveApplicationData -Package $Installed.PackageFullName
    Add-AppxPackage -ForceApplicationShutdown -ForceUpdateFromAnyVersion -Register .\AppxManifest.xml
    if ($?) {
        Finish
    }
}
Write-Host "All Done`r`nPress any key to exit"
$null = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown')
Generate info
WSA-with-magisk-GApps-pico_x64
cat: ../workdir/ENV: No such file or directory
mv: cannot stat '../workdir/wsa/x64': No such file or directory
mahas@Kenobi:/mnt/e/magiskonwsalocal$

Also might be worth noting: I had tried to change the WSA version from "retail" to "insider fast" but it doesnt seem to have taken effect

Add-AppxPackage : Deployment failed with

nstalling MagiskOnWSA...
Add-AppxPackage : Deployment failed with HRESULT:
                                                    Deployment operation progress: \\wsl.localhost\Ubu    Processing                                         [ooooooooooooooooooooooooooooooooooooooo]       Deployment operation progress: \\wsl.localhost\Ubu    Completed                                          [ooooooooooooooooooooooooooooooooooooooo]       Deployment operation progress: \\wsl.localhost\Ubu    Processing                                         [                                       ]                                                         + Add-AppxPackage -ForceApplicationShutdown
-ForceUpdateFromAnyVersion  ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (\\ws
   l.localhost...ppxManifest.xml:String) [Add-Ap
  pxPackage], Exception
    + FullyQualifiedErrorId : DeploymentError,Mic
   rosoft.Windows.Appx.PackageManager.Commands.A
  ddAppxPackageCommand

Build failure on Windows 11 22H2 [SOLVED]

I´m getting the following output:

[code]
ARCH=x64
RELEASE_TYPE=retail
MAGISK_VER=stable
GAPPS_VARIANT=pico
REMOVE_AMAZON=remove
ROOT_SOL=magisk

Download WSA
downloading link: http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice/files/8a26c76e-5a63-42d5-9f7d-df053c273363?P1=1660923563&P2=404&P3=2&P4=eR5IKmKZcsKZfBckw3xiZpz68tHFIlAjXVtgX%2b96usSQ6V8Zo50kIQSTaqRX06hrCauv2zV5l8wJPHiw0O88lg%3d%3d to /root/MagiskOnWSALocal/download/vclibs.appx
downloading link: http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice/files/605edfa0-3ba9-423b-abb2-aa8da0b0e8f2?P1=1660923547&P2=404&P3=2&P4=NHfYYKhIg13QkBC%2fShvryl3G9fGkNTw8n1IJI8XdUBE2y2jgg7JypyHQNnJ9nhWOtw3P3Y9m0KeJQTXXg3LwCw%3d%3d to /root/MagiskOnWSALocal/download/xaml.appx
downloading link: http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice/files/dad8ebbc-9e63-4ee6-8dfb-f12fd34669bf?P1=1660951132&P2=404&P3=2&P4=lvPBPC2oQ7CON%2baRCiTODCz2M%2fJZLfi9yXD%2bdqqRbvbG2DrY1b2VyDWUyR4lXIyT9NlRHD8jmcbmHVHHRfQGVA%3d%3d to /root/MagiskOnWSALocal/download/wsa.zip
Download done

Extract WSA
unzipping to /tmp/wsa-build-Y4okGWq1jm_/wsa
unzipping from /tmp/wsa-build-Y4okGWq1jm_/wsa/WsaPackage_2206.40000.15.0_x64_Release-Nightly.msix
done
Extract done

Download Magisk
done

Download OpenGApps
downloading link: https://downloads.sourceforge.net/project/opengapps/x86_64/20220503/open_gapps-x86_64-11.0-pico-20220503.zip
Download done

Extract GApps
Extract done

Expand images
e2fsck 1.45.5 (07-Jan-2020)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
system_ext: 83/96 files (1.2% non-contiguous), 33727/33829 blocks
resize2fs 1.45.5 (07-Jan-2020)
resize2fs: New size smaller than minimum (33727)

An error occurs, exit
Cleanup Work Directory
Cleanup Download Directory
root@vmWin11:~/MagiskOnWSALocal/scripts#
[/code]

I don´t know where are the log files...

关于临时数据即“/tmp”的一个建议

首先说明该问题在Ubuntu中并不存在,仅仅是我尝试其他Linux编译时遇到的问题
经过替换软件包的方式我成功在Arch Linux编译了MagiskOnWSA且经过测试在Windows中运行正常
https://github.com/Zaphkito/MagiskOnWSAArchLocal

但是在编译过程中,我发现由于系统默认分配的"/tmp"空间太小(我是archinstall官方脚本安装非手敲),所以会导致出现空间不足的报错,临时解决方案是重定向或直接更改这些临时数据的存放位置,编译完成后删除临时目录,或者直接扩容tmp也是一种选择,但是较为过程复杂

既然你们能直接删除临时使用的download文件夹,那为什么不也在源码根目录临时借用一些地方存放临时数据?
只是建议,毕竟项目主要给Ubuntu用而不是给Arch使用,如果实际使用中有不合理的地方希望指出
image
LG9ZZAG5TQR4JKTP}Y~2G
UIPFFC(T%(6A F875W_1

下载WSA时出现错误

ARCH=x64
RELEASE_TYPE=retail
MAGISK_VER=stable
GAPPS_VARIANT=pico
REMOVE_AMAZON=keep
ROOT_SOL=magisk

Download WSA

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/contrib/pyopenssl.py", line 485, in wrap_socket
cnx.do_handshake()
File "/usr/lib/python3/dist-packages/OpenSSL/SSL.py", line 1915, in do_handshake
self._raise_ssl_error(self._ssl, result)
File "/usr/lib/python3/dist-packages/OpenSSL/SSL.py", line 1639, in _raise_ssl_error
raise SysCallError(errno, errorcode.get(errno))
OpenSSL.SSL.SysCallError: (104, 'ECONNRESET')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 665, in urlopen
httplib_response = self._make_request(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 376, in _make_request
self._validate_conn(conn)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 996, in validate_conn
conn.connect()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 352, in connect
self.sock = ssl_wrap_socket(
File "/usr/lib/python3/dist-packages/urllib3/util/ssl
.py", line 370, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "/usr/lib/python3/dist-packages/urllib3/contrib/pyopenssl.py", line 491, in wrap_socket
raise ssl.SSLError("bad handshake: %r" % e)
ssl.SSLError: ("bad handshake: SysCallError(104, 'ECONNRESET')",)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 719, in urlopen
retries = retries.increment(
File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 436, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='fe3.delivery.mp.microsoft.com', port=443): Max retries exceeded with url: /ClientWebService/client.asmx (Caused by SSLError(SSLError("bad handshake: SysCallError(104, 'ECONNRESET')")))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "downloadWSA.py", line 27, in
out = requests.post(
File "/usr/lib/python3/dist-packages/requests/api.py", line 116, in post
return request('post', url, data=data, json=json, **kwargs)
File "/usr/lib/python3/dist-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 514, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='fe3.delivery.mp.microsoft.com', port=443): Max retries exceeded with url: /ClientWebService/client.asmx (Caused by SSLError(SSLError("bad handshake: SysCallError(104, 'ECONNRESET')")))
An error occurs, exit

进不去界面

刚刚整完,开发者选项都没界面,直接读条读着读着就闪退了。

Script run errors

I get these errors when running the script:
run.sh: 4: function: not found
run.sh: 5: declare: not found
run.sh: 6: shift: can't shift that many

I'm running in WSL2

Weird errors after 2nd run of install.ps

After having succesfully installed everything on my Windows 11 Pro computer I copied all the WSA directory to my daughter's computer, enabled everything needed for VMs, but after the second install.ps (after the 1st reboot) I got these weird errors while running it.

What is going on please?

Immagine 2022-08-30 094708

下载WSA时出错

选择完选项之后提示
ARCH=x64
RELEASE_TYPE=insider fast
MAGISK_VER=canary
GAPPS_VARIANT=pico
REMOVE_AMAZON=keep
ROOT_SOL=magisk

Download WSA
Traceback (most recent call last):
File "/home/abbaccadd0/MagiskOnWSALocal/scripts/downloadWSA.py", line 5, in
import requests
ModuleNotFoundError: No module named 'requests'
An error occurs, exit

可以排除是网络问题……能连上google,请问这个是什么原因🤔

error while creating the file

Get:42 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 c-n-f Metadata [508 B]
Fetched 24.1 MB in 15s (1610 kB/s)
Reading package lists... Done
scripts/run.sh: line 94: pip: command not found
/usr/bin/python3: No module named pip
scripts/run.sh: line 96: winetricks: command not found
scripts/run.sh: line 98: winetricks: command not found
Dependencies: an error has occurred, exit

Immagine 2022-09-06 091540

List dependencies required

I'm not sure if the run script is supposed to collect the dependencies or not, but on WSL it didn't for me so I ran the install script multiple times with it stopping and complaining about missing deps and me grabbing said deps and getting closer and closer to it working each time.

Could this be added to the script? In my case I needed to manually install wine, winetricks, lzip, aria2 and patchelf

在下载Magisk时报错

Download Magisk
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 699, in urlopen
    httplib_response = self._make_request(
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 445, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 440, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/lib/python3.10/http/client.py", line 1374, in getresponse
    response.begin()
  File "/usr/lib/python3.10/http/client.py", line 318, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.10/http/client.py", line 287, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 439, in send
    resp = conn.urlopen(
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 755, in urlopen
    retries = retries.increment(
  File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 532, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/usr/lib/python3/dist-packages/six.py", line 718, in reraise
    raise value.with_traceback(tb)
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 699, in urlopen
    httplib_response = self._make_request(
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 445, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 440, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/lib/python3.10/http/client.py", line 1374, in getresponse
    response.begin()
  File "/usr/lib/python3.10/http/client.py", line 318, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.10/http/client.py", line 287, in _read_status
    raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/cycolus/MagiskOnWSALocal/scripts/downloadMagisk.py", line 25, in <module>
    magisk_apk = json.loads(requests.get(
  File "/usr/lib/python3/dist-packages/requests/api.py", line 76, in get
    return request('get', url, params=params, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 498, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

Ubuntu-22.04又一次报错

ARCH=x64
RELEASE_TYPE=retail
MAGISK_VER=debug
GAPPS_VARIANT=pico
REMOVE_AMAZON=keep
ROOT_SOL=magisk
COMPRESS_OUTPUT=no
Generate Download Links
Generating WSA download link: arch=x64 release_type=Retail
download link: http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice/files/605edfa0-3ba9-423b-abb2-aa8da0b0e8f2?P1=1661477813&P2=404&P3=2&P4=kRq5ofBiwzOQkcXctbxzXHEZSAyXjuKT9yh7I0ZPhUfisBJW%2bMktfzbkQ71peRw8Ds34AA4tg5rlXdGioI%2fBjA%3d%3d to /root/MagiskOnWSALocal/download/xaml-x64.appx
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 169, in _new_conn
conn = connection.create_connection(
File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 96, in create_connection
raise err
File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 86, in create_connection
sock.connect(sa)
OSError: [Errno 101] Network is unreachable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 382, in _make_request
self._validate_conn(conn)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 1012, in _validate_conn
conn.connect()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 353, in connect
conn = self._new_conn()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 181, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f079dcaa320>: Failed to establish a new connection: [Errno 101] Network is unreachable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 574, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='fe3.delivery.mp.microsoft.com', port=443): Max retries exceeded with url: /ClientWebService/client.asmx/secured (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f079dcaa320>: Failed to establish a new connection: [Errno 101] Network is unreachable'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/root/MagiskOnWSALocal/scripts/generateWSALinks.py", line 98, in
out = requests.post(
File "/usr/lib/python3/dist-packages/requests/api.py", line 119, in post
return request('post', url, data=data, json=json, **kwargs)
File "/usr/lib/python3/dist-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='fe3.delivery.mp.microsoft.com', port=443): Max retries exceeded with url: /ClientWebService/client.asmx/secured (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f079dcaa320>: Failed to establish a new connection: [Errno 101] Network is unreachable'))
An error has occurred, exit
Cleanup Work Directory
Cleanup Download Directory
已实践的方式:
1.改DNS
2.改IP

Issues with downloads

When running the script I am receiving the following error when the packages are downloading. It also gets stuck for a while before it errors out.

 *** Download Progress Summary as of Sat Sep  3 08:51:35 2022 ***
=======================================================================================================
[#fd9b20 176KiB/4.6MiB(3%) CN:1 DL:0B]
FILE: /home/andmpel/MagiskOnWSALocal/download/xaml-x64.appx
-------------------------------------------------------------------------------------------------------
[#a83e09 896KiB/1.3GiB(0%) CN:16 DL:0B]
FILE: /home/andmpel/MagiskOnWSALocal/download/wsa-x64-WIF.zip
-------------------------------------------------------------------------------------------------------

[DL:0B][#fd9b20 176KiB/4.6MiB(3%)][#a83e09 896KiB/1.3GiB(0%)]
09/03 08:51:35 [ERROR] CUID#16 - Download aborted. URI=http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice/files/605edfa0-3ba9-423b-abb2-aa8da0b0e8f2?P1=1662209472&P2=404&P3=2&P4=CsaIqQJ714t4Q5cpcOYkENDk%2b3ievuTItn547A%2bm5ZmOKy31bA4VqcZMWVPO0UQB%2fBL4J92fCZYGsHU132bv4A%3d%3d
Exception: [AbstractCommand.cc:351] errorCode=22 URI=http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice/files/605edfa0-3ba9-423b-abb2-aa8da0b0e8f2?P1=1662209472&P2=404&P3=2&P4=CsaIqQJ714t4Q5cpcOYkENDk%2b3ievuTItn547A%2bm5ZmOKy31bA4VqcZMWVPO0UQB%2fBL4J92fCZYGsHU132bv4A%3d%3d
  -> [HttpSkipResponseCommand.cc:239] errorCode=22 The response status is not successful. status=403

09/03 08:51:35 [NOTICE] Download GID#fd9b20079ca96d78 not complete: /home/andmpel/MagiskOnWSALocal/download/xaml-x64.appx
[#a83e09 1.0MiB/1.3GiB(0%) CN:16 DL:0B]

GApps Pico won't download

image
it doesn't ask me which gapps I want (pico is fine) but the download fails.
I am able to download the gapps pico zip from sourceforge via my browser.

Broken execution sequence causes Busybox being copied concurrently

Steps to reproduce/复现步骤

  • Install WSA with Magisk (WSA-with-magisk-GApps-pico_x64, WSA_VER=2206.40000.15.0, WSA_MAIN_VER=2206)
  • Enable Zygisk
  • Reboot
  • Install lsposed
  • Reboot
  • Install lsposed manager using shell apk method
  • Open lsposed manager, it works
  • Restart WSA/terminate process
  • Open lsposed manager
  • 'lsposed is not found' (sometimes it works, sometimes it doesn't)
    image
    image

Expected behaviour/预期行为

LSPosed should be running all the time and LSPosed Manager should detect the installation

Actual behaviour/实际行为

When rebooting WSA, LSPosed manager often does not detect LSPosed. I have tried many other versions (including riru versions) and they all exhibit the same behavior. I have also tried different installations of Windows 11.

Xposed Module List/Xposed 模块列表

None

Magisk Module List/Magisk 模块列表

Zygisk - lsposed

LSPosed version/LSPosed 版本

LSPosed-v1.8.3-6597-zygisk-debug

Android version/Android 版本

12

Magisk version/Magisk 版本

25201

Riru version/Riru 版本

N/A

Version requirement/版本要求

  • I am using latest debug CI version of LSPosed and enable verbose log/我正在使用最新 CI 调试版本且启用详细日志

Logs/日志

magisk_log_2022-08-16T22.44.20.log

Save WSA in friendly name folder or in zip archive

Hello, I have a suggestion.

On the previous repo we were getting WSA build from Github Actions in a Zip archive with friendly name like WSA-GApps-pico_2206.40000.15.0_x64_Release-Nightly.zip.

In this solution we are getting WSA files in output folder which is less convenient for me.

Can we please save multiple WSA builds in appropriate folder like ../MagiskOnWSALocal/output/WSA-GApps-pico_2206.40000.15.0_x64_Release-Nightly or better yet have an option to compress WSA build into Zip archive with appropriate filename?

Thank you for all your hard work.

Win11 21H2 wsl Ubuntu-22.04报错

ARCH=x64
RELEASE_TYPE=release preview
MAGISK_VER=stable
GAPPS_VARIANT=pico
REMOVE_AMAZON=keep
ROOT_SOL=magisk

Download WSA
downloading link: http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice/files/8a26c76e-5a63-42d5-9f7d-df053c273363?P1=1660997879&P2=404&P3=2&P4=IEAHwvFY399uSsFGF%2bvovwE9AsWzhy4nJ8eQHsIkD0AQA%2fH2qt9EWRmp%2b%2bTHIKM1gMO9J%2bPt0oDUStbSr%2fKchQ%3d%3d to /MagiskOnWSALocal-main/download/vclibs.appx
downloading link: http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice/files/605edfa0-3ba9-423b-abb2-aa8da0b0e8f2?P1=1660997856&P2=404&P3=2&P4=WCBUwPVw7lMHxYDkmagPULTwQOpIDEpGo8tumk8Uiw9lfcQjLvKJj07Q%2bEJf9vInkKXqzuJASqhh4uUWE7bJCw%3d%3d to /MagiskOnWSALocal-main/download/xaml.appx
downloading link: http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice/files/dad8ebbc-9e63-4ee6-8dfb-f12fd34669bf?P1=1661025446&P2=404&P3=2&P4=YyThPNUGlh3xgSQm5%2fa%2bO7i6xTqgp%2fhXaXVZy1taf6IeOadpQFFwpDbxYq0VMvReKPBLHNK7GMkaxgKrbuENLg%3d%3d to /MagiskOnWSALocal-main/download/wsa.zip
Download done

Extract WSA
unzipping to /tmp/wsa-build-Xsk0FbhmkZ_/wsa
unzipping from /tmp/wsa-build-Xsk0FbhmkZ_/wsa/WsaPackage_2206.40000.15.0_x64_Release-Nightly.msix
done
Extract done

Download Magisk
done

Download OpenGApps
downloading link: https://downloads.sourceforge.net/project/opengapps/x86_64/20220503/open_gapps-x86_64-11.0-pico-20220503.zip
Download done

Extract GApps
Extract done

Expand images
e2fsck 1.46.5 (30-Dec-2021)
第 1 遍:检查 inode、块,和大小
第 2 遍:检查目录结构
第 3 遍:检查目录连接性
第 4 遍:检查引用计数
第 5 遍:检查组概要信息
system_ext:83/96 文件(1.2% 为非连续的),33727/33829 块
resize2fs 1.46.5 (30-Dec-2021)
将 /tmp/wsa-build-Xsk0FbhmkZ_/wsa/x64/system_ext.img 上的文件系统调整为 37316 个块(每块 4k)。
/tmp/wsa-build-Xsk0FbhmkZ_/wsa/x64/system_ext.img 上的文件系统大小已经调整为 37316 个块(每块 4k)。

e2fsck 1.46.5 (30-Dec-2021)
第 1 遍:检查 inode、块,和大小
第 2 遍:检查目录结构
第 3 遍:检查目录连接性
第 4 遍:检查引用计数
第 5 遍:检查组概要信息
product:153/192 文件(0.0% 为非连续的),80266/80507 块
resize2fs 1.46.5 (30-Dec-2021)
将 /tmp/wsa-build-Xsk0FbhmkZ_/wsa/x64/product.img 上的文件系统调整为 84423 个块(每块 4k)。
/tmp/wsa-build-Xsk0FbhmkZ_/wsa/x64/product.img 上的文件系统大小已经调整为 84423 个块(每块 4k)。

e2fsck 1.46.5 (30-Dec-2021)
第 1 遍:检查 inode、块,和大小
第 2 遍:检查目录结构
第 3 遍:检查目录连接性
第 3A 遍:优化目录
第 4 遍:检查引用计数
第 5 遍:检查组概要信息

/:***** 文件系统已被修改 *****
/:2679/2688 文件(0.4% 为非连续的),211645/226940 块
resize2fs 1.46.5 (30-Dec-2021)
将 /tmp/wsa-build-Xsk0FbhmkZ_/wsa/x64/system.img 上的文件系统调整为 309860 个块(每块 4k)。
/tmp/wsa-build-Xsk0FbhmkZ_/wsa/x64/system.img 上的文件系统大小已经调整为 309860 个块(每块 4k)。

e2fsck 1.46.5 (30-Dec-2021)
第 1 遍:检查 inode、块,和大小
第 2 遍:检查目录结构
第 3 遍:检查目录连接性
第 3A 遍:优化目录
第 4 遍:检查引用计数
第 5 遍:检查组概要信息

vendor:***** 文件系统已被修改 *****
vendor:1349/1392 文件(0.9% 为非连续的),89253/89522 块
resize2fs 1.46.5 (30-Dec-2021)
将 /tmp/wsa-build-Xsk0FbhmkZ_/wsa/x64/vendor.img 上的文件系统调整为 93636 个块(每块 4k)。
/tmp/wsa-build-Xsk0FbhmkZ_/wsa/x64/vendor.img 上的文件系统大小已经调整为 93636 个块(每块 4k)。

Expand images done

Mount images
done

Integrate Magisk
#!/system/bin/sh
mkdir -p /data/adb/magisk
cp /sbin/* /data/adb/magisk/
chmod -R 755 /data/adb/magisk
restorecon -R /data/adb/magisk
for module in $(ls /data/adb/modules); do
if ! [ -f "/data/adb/modules/$module/disable" ] && [ -f "/data/adb/modules/$module/sepolicy.rule" ]; then
/sbin/magiskpolicy --live --apply "/data/adb/modules/$module/sepolicy.rule"
fi
done
/dev/FYMyZNfj(/.)? u:object_r:magisk_file:s0
/data/adb/magisk(/.
)? u:object_r:magisk_file:s0
sudo: unable to execute /tmp/wsa-build-Xsk0FbhmkZ_/magisk/magiskpolicy: Permission denied
on post-fs-data
start adbd
mkdir /dev/FYMyZNfj
mount tmpfs tmpfs /dev/FYMyZNfj mode=0755
copy /sbin/magisk64 /dev/FYMyZNfj/magisk64
chmod 0755 /dev/FYMyZNfj/magisk64
symlink ./magisk64 /dev/FYMyZNfj/magisk
symlink ./magisk64 /dev/FYMyZNfj/su
symlink ./magisk64 /dev/FYMyZNfj/resetprop
copy /sbin/magisk32 /dev/FYMyZNfj/magisk32
chmod 0755 /dev/FYMyZNfj/magisk32
copy /sbin/magiskinit /dev/FYMyZNfj/magiskinit
chmod 0755 /dev/FYMyZNfj/magiskinit
copy /sbin/magiskpolicy /dev/FYMyZNfj/magiskpolicy
chmod 0755 /dev/FYMyZNfj/magiskpolicy
mkdir /dev/FYMyZNfj/.magisk 700
mkdir /dev/FYMyZNfj/.magisk/mirror 700
mkdir /dev/FYMyZNfj/.magisk/block 700
copy /sbin/magisk.apk /dev/FYMyZNfj/stub.apk
rm /dev/.magisk_unblock
start VG8tndZ6kw2L
start 1rjRRJmVQlGH
wait /dev/.magisk_unblock 40
rm /dev/.magisk_unblock

service VG8tndZ6kw2L /system/bin/sh /sbin/loadpolicy.sh
user root
seclabel u:r:magisk:s0
oneshot

service 1rjRRJmVQlGH /dev/FYMyZNfj/magisk --post-fs-data
user root
seclabel u:r:magisk:s0
oneshot

service Q9sMIzobh4HY /dev/FYMyZNfj/magisk --service
class late_start
user root
seclabel u:r:magisk:s0
oneshot

on property:sys.boot_completed=1
mkdir /data/adb/magisk 755
copy /sbin/magisk.apk /data/adb/magisk/magisk.apk
start 42oJgODUliht

service 42oJgODUliht /dev/FYMyZNfj/magisk --boot-complete
user root
seclabel u:r:magisk:s0
oneshot
Integrate Magisk done

Merge Language Resources

0064:err:explorer:initialize_display_settings Failed to query current display settings for L"\\\\.\\DISPLAY1". 0024:fixme:nls:RtlSetThreadPreferredUILanguages 256, 0000000000000000, 0000000000000000 0024:fixme:heap:RtlSetHeapInformation 0000000001400000 0 000000000021E420 4 stub 0024:fixme:heap:RtlSetHeapInformation 0000000001400000 0 000000000021E420 4 stub Index Pass Completed. AlternateForm Qualifiers: LIGHTUNPLATED,UNPLATED Language Qualifiers: EN-US,EN-GB,AF-ZA,AR-SA,AZ-LATN-AZ,BG-BG,BS-LATN-BA,CA-ES,CS-CZ,CY-GB,DA-DK,DE-DE,EL-GR,ES-ES,ES-MX ,ET-EE,EU-ES,FA-IR,FI-FI,FR-CA,FR-FR,GL-ES,HE-IL,HI-IN,HR-HR,HU-HU,ID-ID,IS-IS,IT-IT,JA-JP,KA-GE,KK-KZ,KO-KR,LT-LT,LV-LV ,MS-MY,NB-NO,NL-NL,NN-NO,PL-PL,PT-BR,PT-PT,QPS-PLOC,QPS-PLOCA,QPS-PLOCM,RO-RO,RU-RU,SK-SK,SL-SI,SQ-AL,SR-CYRL-RS,SR-LATN -RS,SV-SE,TH-TH,TR-TR,UK-UA,VI-VN,ZH-CN,ZH-TW Scale Qualifiers: 200,400,150,125,100 TargetSize Qualifiers: 256,16,20,24,30,32,36,40,48,60,64,72,80,96

Finished building
Version: 1.0
Resource Map Name: MicrosoftCorporationII.WindowsSubsystemForAndroid
Named Resources: 235
Resource Candidates: 9787
Successfully Completed
Merge Language Resources done

Add extra packages
chcon: 改变 '/tmp/wsa-build-Xsk0FbhmkZ_/system/system/priv-app/BuiltInPrintService/lib/x86_64/libcups.so' 的上下文到 “u:object_r:system_file:s0” 失败: 没有那个文件或目录
chcon: 改变 '/tmp/wsa-build-Xsk0FbhmkZ_/system/system/priv-app/BuiltInPrintService/lib/x86_64/libwfds.so' 的上下文到 “u:object_r:system_file:s0” 失败: 没有那个文件或目录
Add extra packages done

Integrate GApps
chown: 无法取消'/tmp/wsa-build-Xsk0FbhmkZ_/system/system/app/PrintSpooler/lib/x86_64/libprintspooler_jni.so' 的引用: 没
有那个文件或目录
chown: 无法取消'/tmp/wsa-build-Xsk0FbhmkZ_/system/system/app/Bluetooth/lib/x86_64/libbluetooth_jni.so' 的引用: 没有那个 文件或目录
chown: 无法取消'/tmp/wsa-build-Xsk0FbhmkZ_/system/system/priv-app/BuiltInPrintService/lib/x86_64/libcups.so' 的引用: 没
有那个文件或目录
chown: 无法取消'/tmp/wsa-build-Xsk0FbhmkZ_/system/system/priv-app/BuiltInPrintService/lib/x86_64/libwfds.so' 的引用: 没 有那个文件或目录
chown: 无法取消'/tmp/wsa-build-Xsk0FbhmkZ_/system/product/app/Camera2/lib/x86_64/libjni_tinyplanet.so' 的引用: 没有那个
文件或目录
chown: 无法取消'/tmp/wsa-build-Xsk0FbhmkZ_/system/product/app/Camera2/lib/x86_64/libjni_jpegutil.so' 的引用: 没有那个文 件或目录
chown: 无法取消'/tmp/wsa-build-Xsk0FbhmkZ_/system/product/app/Gallery2/lib/x86_64/libjni_jpegstream.so' 的引用: 没有那个文件或目录
chown: 无法取消'/tmp/wsa-build-Xsk0FbhmkZ_/system/product/app/Gallery2/lib/x86_64/libjni_filtershow_filters.so' 的引用: 没有那个文件或目录
chown: 无法取消'/tmp/wsa-build-Xsk0FbhmkZ_/system/product/app/Gallery2/lib/x86_64/libjni_eglfence.so' 的引用: 没有那个文件或目录
find: ‘/tmp/wsa-build-Xsk0FbhmkZ_/system/product/lib’: 没有那个文件或目录
find: ‘/tmp/wsa-build-Xsk0FbhmkZ_/system/product/lib’: 没有那个文件或目录
find: ‘/tmp/wsa-build-Xsk0FbhmkZ_/system/product/lib’: 没有那个文件或目录
find: ‘/tmp/wsa-build-Xsk0FbhmkZ_/system/product/lib’: 没有那个文件或目录
find: ‘/tmp/wsa-build-Xsk0FbhmkZ_/system/product/lib’: 没有那个文件或目录
xargs: warning: options --max-args and --replace/-I/-i are mutually exclusive, ignoring previous --max-args value
xargs: warning: options --max-args and --replace/-I/-i are mutually exclusive, ignoring previous --max-args value
xargs: warning: options --max-args and --replace/-I/-i are mutually exclusive, ignoring previous --max-args value
sudo: unable to execute /tmp/wsa-build-Xsk0FbhmkZ_/magisk/magiskpolicy: Permission denied
An error occurs, exit
Cleanup Work Directory
Cleanup Download Directory

Cant run - run.sh

When try open run.sh it closes after 1-2 sec. How to Execute, start run.sh properly, or there errors in this file?

Run.sh not working.

ARCH=run.sh: line 6: whiptail: command not found
x64
RELEASE_TYPE=run.sh: line 6: whiptail: command not found
retail
MAGISK_VER=run.sh: line 6: whiptail: command not found
stable
GAPPS_VARIANT=
REMOVE_AMAZON=remove
ROOT_SOL=run.sh: line 6: whiptail: command not found
magisk
Download WSA
Traceback (most recent call last):
  File "C:\Users\Darkov\OneDrive\Documents\Personal\Windows\MagiskOnWSALocal\scripts\downloadWSA.py", line 5, in <module>
    import requests
ModuleNotFoundError: No module named 'requests'
extractWSA
Traceback (most recent call last):
  File "C:\Users\Darkov\OneDrive\Documents\Personal\Windows\MagiskOnWSALocal\scripts\extractWSA.py", line 5, in <module>
    import requests
ModuleNotFoundError: No module named 'requests'
Download Magisk
Traceback (most recent call last):
  File "C:\Users\Darkov\OneDrive\Documents\Personal\Windows\MagiskOnWSALocal\scripts\downloadMagisk.py", line 9, in <module>
    import requests
ModuleNotFoundError: No module named 'requests'
run.sh: line 120: [: !=: unary operator expected
Expand images
run.sh: line 138: e2fsck: command not found
du: cannot access '../workdir/wsa/run.sh:': No such file or directory
du: cannot access 'x64/system_ext.img': No such file or directory
run.sh: line 139: 8
8
8
8
8
8 + 20000: syntax error in expression (error token is "8
8
8
8
8 + 20000")
run.sh: line 143: resize2fs: command not found
run.sh: line 145: e2fsck: command not found
du: cannot access '../workdir/wsa/run.sh:': No such file or directory
du: cannot access 'x64/product.img': No such file or directory
run.sh: line 146: 8
8
8
8
8
8 + 20000: syntax error in expression (error token is "8
8
8
8
8 + 20000")
run.sh: line 150: resize2fs: command not found
run.sh: line 152: e2fsck: command not found
du: cannot access '../workdir/wsa/run.sh:': No such file or directory
du: cannot access 'x64/system.img': No such file or directory
run.sh: line 153: 8
8
8
8
8
8 + 20000: syntax error in expression (error token is "8
8
8
8
8 + 20000")
run.sh: line 166: resize2fs: command not found
run.sh: line 168: e2fsck: command not found
du: cannot access '../workdir/wsa/run.sh:': No such file or directory
du: cannot access 'x64/vendor.img': No such file or directory
run.sh: line 169: 8
8
8
8
8
8 + 20000: syntax error in expression (error token is "8
8
8
8
8 + 20000")
run.sh: line 170: resize2fs: command not found
Mount images
run.sh: line 174: sudo: command not found
run.sh: line 175: sudo: command not found
run.sh: line 176: sudo: command not found
run.sh: line 177: sudo: command not found
run.sh: line 178: sudo: command not found
Remove Amazon AppStore
run.sh: line 182: sudo: command not found
find: ‘../workdir/system/product/etc/permissions’: No such file or directory
find: ‘../workdir/system/product/etc/sysconfig’: No such file or directory
find: ‘../workdir/system/product/framework’: No such file or directory
find: ‘../workdir/system/product/priv-app’: No such file or directory
run.sh: line 185: [: too many arguments
run.sh: line 185: [: too many arguments
Merge Language Resources
cp: target '../workdir/wsa/pri/en-us.pri' is not a directory
cp: target '../workdir/wsa/xml/en-us.xml' is not a directory
tee: ../workdir/wsa/priconfig.xml: No such file or directory
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<resources targetOsVersion="10.0.0" majorVersion="1">
<index root="\" startIndexAt="\">
    <indexer-config type="folder" foldernameAsQualifier="true" filenameAsQualifier="true" qualifierDelimiter="."/>
    <indexer-config type="PRI"/>
</index>
</resources>
run.sh: line 284: wine64: command not found
cat: '../workdir/wsa/xml/*': No such file or directory
sed: can't read ../workdir/wsa/run.sh:: No such file or directory
sed: can't read x64/AppxManifest.xml: No such file or directory
Add extra packages
run.sh: line 288: sudo: command not found
run.sh: line 289: sudo: command not found
run.sh: line 290: sudo: command not found
run.sh: line 291: sudo: command not found
run.sh: line 293: [: !=: unary operator expected
run.sh: line 361: [: !=: unary operator expected
Umount images
run.sh: line 368: sudo: command not found
run.sh: line 369: sudo: command not found
run.sh: line 370: sudo: command not found
run.sh: line 371: sudo: command not found
Shrink images
run.sh: line 374: e2fsck: command not found
run.sh: line 375: resize2fs: command not found
run.sh: line 376: e2fsck: command not found
run.sh: line 377: resize2fs: command not found
run.sh: line 378: e2fsck: command not found
run.sh: line 379: resize2fs: command not found
run.sh: line 380: e2fsck: command not found
run.sh: line 381: resize2fs: command not found
Remove signature and add scripts
cp: target 'x64' is not a directory
ls: cannot access '../workdir/wsa/run.sh:': No such file or directory
ls: cannot access 'line': No such file or directory
ls: cannot access '6:': No such file or directory
ls: cannot access 'whiptail:': No such file or directory
ls: cannot access 'command': No such file or directory
ls: cannot access 'not': No such file or directory
ls: cannot access 'found': No such file or directory
ls: cannot access 'x64': No such file or directory
tee: '../workdir/wsa/run.sh:': No such file or directory
tee: x64/Install.ps1: No such file or directory
# Automated Install script by Mioki
# http://github.com/okibcn
function Test-Administrator {
    [OutputType([bool])]
    param()
    process {
        [Security.Principal.WindowsPrincipal]$user = [Security.Principal.WindowsIdentity]::GetCurrent();
        return $user.IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator);
    }
}

function Finish {
    Clear-Host
    Start-Process "wsa://com.topjohnwu.magisk"
    Start-Process "wsa://com.android.vending"
}

if (-not (Test-Administrator)) {
    Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Bypass -Force
    $proc = Start-Process -PassThru -WindowStyle Hidden -Verb RunAs powershell.exe -Args "-executionpolicy bypass -command Set-Location '$PSScriptRoot'; &'$PSCommandPath' EVAL"
    $proc.WaitForExit()
    if ($proc.ExitCode -ne 0) {
        Clear-Host
        Write-Warning "Failed to launch start as Administrator`r`nPress any key to exit"
        $null = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown');
    }
    exit
}
elseif (($args.Count -eq 1) -and ($args[0] -eq "EVAL")) {
    Start-Process powershell.exe -Args "-executionpolicy bypass -command Set-Location '$PSScriptRoot'; &'$PSCommandPath'"
    exit
}

if (((Test-Path -Path ) -eq $false).Count) {
    Write-Error "Some files are missing in the zip. Please try to download it again from the browser downloader, or try to run the workflow again. Press any key to exist"
    $null = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown')
    exit 1
}

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" /t REG_DWORD /f /v "AllowDevelopmentWithoutDevLicense" /d "1"

$VMP = Get-WindowsOptionalFeature -Online -FeatureName 'VirtualMachinePlatform'
if ($VMP.State -ne "Enabled") {
    Enable-WindowsOptionalFeature -Online -NoRestart -FeatureName 'VirtualMachinePlatform'
    Clear-Host
    Write-Warning "Need restart to enable virtual machine platform`r`nPress y to restart or press any key to exit"
    $key = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown')
    If ("y" -eq $key.Character) {
        Restart-Computer -Confirm
    }
    Else {
        exit 1
    }
}

Add-AppxPackage -ForceApplicationShutdown -ForceUpdateFromAnyVersion -Path vclibs.appx
Add-AppxPackage -ForceApplicationShutdown -ForceUpdateFromAnyVersion -Path xaml.appx

$Installed = $null
$Installed = Get-AppxPackage -Name 'MicrosoftCorporationII.WindowsSubsystemForAndroid'

If (($null -ne $Installed) -and (-not ($Installed.IsDevelopmentMode))) {
    Clear-Host
    Write-Warning "There is already one installed WSA. Please uninstall it first.`r`nPress y to uninstall existing WSA or press any key to exit"
    $key = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown')
    If ("y" -eq $key.Character) {
        Remove-AppxPackage -Package $Installed.PackageFullName
    }
    Else {
        exit 1
    }
}
Clear-Host
Write-Host "Installing MagiskOnWSA..."
Stop-Process -Name "wsaclient" -ErrorAction "silentlycontinue"
Add-AppxPackage -ForceApplicationShutdown -ForceUpdateFromAnyVersion -Register .\AppxManifest.xml
if ($?) {
    Finish
}
Elseif ($null -ne $Installed) {
    Clear-Host
    Write-Host "Failed to update, try to uninstall existing installation while preserving userdata..."
    Remove-AppxPackage -PreserveApplicationData -Package $Installed.PackageFullName
    Add-AppxPackage -ForceApplicationShutdown -ForceUpdateFromAnyVersion -Register .\AppxManifest.xml
    if ($?) {
        Finish
    }
}
Write-Host "All Done`r`nPress any key to exit"
$null = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown')
Generate info
WSA-with-run.sh: line 6: whiptail: command not found
magisk-NoGApps_run.sh: line 6: whiptail: command not found
x64
cat: ../workdir/ENV: No such file or directory
mv: target '../output' is not a directory

the touch area isn't correct

image
the touch area isn't correct as the guide on the screen. the "previous" area is nowhere to be found and the "next" area is at the middle of the screen.
this problem happens when the android is in fullscreen mode (eg. watching videos, reading books) and the wsa window is in windowed mode. it is correct if i turn wsa window into fullscreen.
this problem doesn't appear in version 2203.40000.3.0 and appears after this version

Error chown: cannot dereference '/tmp/wsa-build-mkvZprhMMl_

Running the script on arm64 server. Tried with both bash and zsh.

ARCH=x64
RELEASE_TYPE=release preview
MAGISK_VER=stable
GAPPS_VARIANT=pico
REMOVE_AMAZON=keep
ROOT_SOL=magisk

Download WSA
downloading link: http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice/files/605edfa0-3ba9-423b-abb2-aa8da0b0e8f2?P1=1661185319&P2=404&P3=2&P4=IJpuNr1G%2fS3GrOanYnfX%2byY1buqbSMP4PcEv2f7bDb3oq%2fImfpUoiZxKSUsgGwIcswuKUNxtVlhkR%2fRWBocsGA%3d%3d to /home/ubuntu/MagiskOnWSALocal/download/xaml.appx
downloading link: http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice/files/1ee8f2d3-cfbe-4514-a83a-5aaadb44df5e?P1=1661185214&P2=404&P3=2&P4=WvZ7VZeuTsnB%2bsyLJXBCj%2bIVMNFVE%2fAAGSXSizBLPmvSMiWYHzwvQJ%2fvG5s66HyncZvIjujWGa2LV0FLBqP6lA%3d%3d to /home/ubuntu/MagiskOnWSALocal/download/vclibs.appx
downloading link: http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice/files/dad8ebbc-9e63-4ee6-8dfb-f12fd34669bf?P1=1661212741&P2=404&P3=2&P4=AOcH%2fL0%2f3DYK%2fkS0kF66H7v9mgtsMIp48KxrmP5LYik2vLQ8lKQiwMRxLz1w4UrRIAaa0AvTAbMSEI%2bN8EbseQ%3d%3d to /home/ubuntu/MagiskOnWSALocal/download/wsa.zip
Download done

Extract WSA
unzipping to /tmp/wsa-build-mkvZprhMMl_/wsa
unzipping from /tmp/wsa-build-mkvZprhMMl_/wsa/WsaPackage_2206.40000.15.0_x64_Release-Nightly.msix
done
Extract done

Download Magisk
done

Download OpenGApps
downloading link: https://downloads.sourceforge.net/project/opengapps/x86_64/20220503/open_gapps-x86_64-11.0-pico-20220503.zip


Download done

Extract GApps
Extract done

Expand images
e2fsck 1.46.5 (30-Dec-2021)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
system_ext: 83/96 files (1.2% non-contiguous), 33727/33829 blocks
resize2fs 1.46.5 (30-Dec-2021)
Resizing the filesystem on /tmp/wsa-build-mkvZprhMMl_/wsa/x64/system_ext.img to 37316 (4k) blocks.
The filesystem on /tmp/wsa-build-mkvZprhMMl_/wsa/x64/system_ext.img is now 37316 (4k) blocks long.

e2fsck 1.46.5 (30-Dec-2021)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
product: 153/192 files (0.0% non-contiguous), 80266/80507 blocks
resize2fs 1.46.5 (30-Dec-2021)
Resizing the filesystem on /tmp/wsa-build-mkvZprhMMl_/wsa/x64/product.img to 84423 (4k) blocks.
The filesystem on /tmp/wsa-build-mkvZprhMMl_/wsa/x64/product.img is now 84423 (4k) blocks long.

e2fsck 1.46.5 (30-Dec-2021)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 3A: Optimizing directories
Pass 4: Checking reference counts
Pass 5: Checking group summary information

/: ***** FILE SYSTEM WAS MODIFIED *****
/: 2679/2688 files (0.4% non-contiguous), 211645/226940 blocks
resize2fs 1.46.5 (30-Dec-2021)
Resizing the filesystem on /tmp/wsa-build-mkvZprhMMl_/wsa/x64/system.img to 309860 (4k) blocks.
The filesystem on /tmp/wsa-build-mkvZprhMMl_/wsa/x64/system.img is now 309860 (4k) blocks long.

e2fsck 1.46.5 (30-Dec-2021)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 3A: Optimizing directories
Pass 4: Checking reference counts
Pass 5: Checking group summary information

vendor: ***** FILE SYSTEM WAS MODIFIED *****
vendor: 1349/1392 files (0.9% non-contiguous), 89253/89522 blocks
resize2fs 1.46.5 (30-Dec-2021)
Resizing the filesystem on /tmp/wsa-build-mkvZprhMMl_/wsa/x64/vendor.img to 93636 (4k) blocks.
The filesystem on /tmp/wsa-build-mkvZprhMMl_/wsa/x64/vendor.img is now 93636 (4k) blocks long.

Expand images done

Mount images


done

Integrate Magisk
#!/system/bin/sh
mkdir -p /data/adb/magisk
cp /sbin/* /data/adb/magisk/
chmod -R 755 /data/adb/magisk
restorecon -R /data/adb/magisk
for module in $(ls /data/adb/modules); do
    if ! [ -f "/data/adb/modules/$module/disable" ] && [ -f "/data/adb/modules/$module/sepolicy.rule" ]; then
        /sbin/magiskpolicy --live --apply "/data/adb/modules/$module/sepolicy.rule"
    fi
done
/dev/nXwCnniX(/.*)?    u:object_r:magisk_file:s0
/data/adb/magisk(/.*)?   u:object_r:magisk_file:s0
/tmp/wsa-build-mkvZprhMMl_/magisk/magiskpolicy: 7: Syntax error: "(" unexpected
on post-fs-data
    start adbd
    mkdir /dev/nXwCnniX
    mount tmpfs tmpfs /dev/nXwCnniX mode=0755
    copy /sbin/magisk64 /dev/nXwCnniX/magisk64
    chmod 0755 /dev/nXwCnniX/magisk64
    symlink ./magisk64 /dev/nXwCnniX/magisk
    symlink ./magisk64 /dev/nXwCnniX/su
    symlink ./magisk64 /dev/nXwCnniX/resetprop
    copy /sbin/magisk32 /dev/nXwCnniX/magisk32
    chmod 0755 /dev/nXwCnniX/magisk32
    copy /sbin/magiskinit /dev/nXwCnniX/magiskinit
    chmod 0755 /dev/nXwCnniX/magiskinit
    copy /sbin/magiskpolicy /dev/nXwCnniX/magiskpolicy
    chmod 0755 /dev/nXwCnniX/magiskpolicy
    mkdir /dev/nXwCnniX/.magisk 700
    mkdir /dev/nXwCnniX/.magisk/mirror 700
    mkdir /dev/nXwCnniX/.magisk/block 700
    copy /sbin/magisk.apk /dev/nXwCnniX/stub.apk
    rm /dev/.magisk_unblock
    start o24DZm4jV8kG
    start qM4kFJp2vrYq
    wait /dev/.magisk_unblock 40
    rm /dev/.magisk_unblock

service o24DZm4jV8kG /system/bin/sh /sbin/loadpolicy.sh
    user root
    seclabel u:r:magisk:s0
    oneshot

service qM4kFJp2vrYq /dev/nXwCnniX/magisk --post-fs-data
    user root
    seclabel u:r:magisk:s0
    oneshot

service m8kmgYakmxLa /dev/nXwCnniX/magisk --service
    class late_start
    user root
    seclabel u:r:magisk:s0
    oneshot

on property:sys.boot_completed=1
    mkdir /data/adb/magisk 755
    copy /sbin/magisk.apk /data/adb/magisk/magisk.apk
    start 2ewzYKiVTsfI

service 2ewzYKiVTsfI /dev/nXwCnniX/magisk --boot-complete
    user root
    seclabel u:r:magisk:s0
    oneshot
Integrate Magisk done

Merge Language Resources
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<resources targetOsVersion="10.0.0" majorVersion="1">
<index root="\" startIndexAt="\">
    <indexer-config type="folder" foldernameAsQualifier="true" filenameAsQualifier="true" qualifierDelimiter="."/>
    <indexer-config type="PRI"/>
</index>
</resources>
0044:err:explorer:initialize_display_settings Failed to query current display settings for L"\\\\.\\DISPLAY1".
0024:err:process:exec_process L"Z:\\home\\ubuntu\\MagiskOnWSALocal\\wine\\makepri.exe" not supported on this system
Merge Language Resources done

Add extra packages
chcon: failed to change context of '/tmp/wsa-build-mkvZprhMMl_/system/system/priv-app/BuiltInPrintService/lib/x86_64/libcups.so' to ‘u:object_r:system_file:s0’: No such file or directory
chcon: failed to change context of '/tmp/wsa-build-mkvZprhMMl_/system/system/priv-app/BuiltInPrintService/lib/x86_64/libwfds.so' to ‘u:object_r:system_file:s0’: No such file or directory
Add extra packages done

Integrate GApps
chown: cannot dereference '/tmp/wsa-build-mkvZprhMMl_/system/system/app/PrintSpooler/lib/x86_64/libprintspooler_jni.so': No such file or directory
chown: cannot dereference '/tmp/wsa-build-mkvZprhMMl_/system/system/app/Bluetooth/lib/x86_64/libbluetooth_jni.so': No such file or directory
chown: cannot dereference '/tmp/wsa-build-mkvZprhMMl_/system/system/priv-app/BuiltInPrintService/lib/x86_64/libcups.so': No such file or directory
chown: cannot dereference '/tmp/wsa-build-mkvZprhMMl_/system/system/priv-app/BuiltInPrintService/lib/x86_64/libwfds.so': No such file or directory
chown: cannot dereference '/tmp/wsa-build-mkvZprhMMl_/system/product/app/Camera2/lib/x86_64/libjni_tinyplanet.so': No such file or directory
chown: cannot dereference '/tmp/wsa-build-mkvZprhMMl_/system/product/app/Camera2/lib/x86_64/libjni_jpegutil.so': No such file or directorychown: cannot dereference '/tmp/wsa-build-mkvZprhMMl_/system/product/app/Gallery2/lib/x86_64/libjni_jpegstream.so': No such file or directory
chown: cannot dereference '/tmp/wsa-build-mkvZprhMMl_/system/product/app/Gallery2/lib/x86_64/libjni_filtershow_filters.so': No such file or directory
chown: cannot dereference '/tmp/wsa-build-mkvZprhMMl_/system/product/app/Gallery2/lib/x86_64/libjni_eglfence.so': No such file or directory
find: ‘/tmp/wsa-build-mkvZprhMMl_/system/product/lib’: No such file or directory
find: ‘/tmp/wsa-build-mkvZprhMMl_/system/product/lib’: No such file or directory
find: ‘/tmp/wsa-build-mkvZprhMMl_/system/product/lib’: No such file or directory
find: ‘/tmp/wsa-build-mkvZprhMMl_/system/product/lib’: No such file or directory
find: ‘/tmp/wsa-build-mkvZprhMMl_/system/product/lib’: No such file or directory
xargs: warning: options --max-args and --replace/-I/-i are mutually exclusive, ignoring previous --max-args value
xargs: warning: options --max-args and --replace/-I/-i are mutually exclusive, ignoring previous --max-args value
xargs: warning: options --max-args and --replace/-I/-i are mutually exclusive, ignoring previous --max-args value
/tmp/wsa-build-mkvZprhMMl_/magisk/magiskpolicy: 7: Syntax error: "(" unexpected
An error occurs, exit
Cleanup Work Directory
Cleanup Download Directory

Recommendation: add "offline mode" for download directory.

hi, if I understand correctly, the files downloaded to the "download" directory will be deleted after the "output" directory is created. For WSA builds, they download again, even if the version of the downloaded files has not changed.

You can add "offline mode" where downloads are kept in the "downloads" directory and WSA is repeatedly created from them.

It might come in handy if a user needs to build different WSA variants (with/without GApps) like me. I solved the commenting of the code in "run.sh" according to my needs.

无法选择GApps版本

准确来说是没有地方可以选择
我看到README里面是这么说的:

Support all OpenGApps variants except for aroma (aroma does not support x86_64, please use super instead)
Select the version of Magisk and select the OpenGApps variant you like, select the root solution (none means no root), select the WSA version and its architecture (mostly x64)

但是我实际操作的时候却是这样的:

构建架构
WSA的更新通道
Magisk版本
是否安装GApps(我选择的是“是”)
是否保留亚马逊应用商店
Root方案
是否压缩输出文件

没了
我最后得到的输出是这个文件名:WSA-with-magisk-stable-OpenGApps-pico_2206.40000.15.0_x64_Release-Nightly.7z
看这个名字应该的OpenGApps的Pico版本吧,但是文档里说可以自己选择的嘞
是我哪里做错了嘛?还是怎么回事
还有一个问题是我从以前的Action构建升级过来,按照说明把文件全部替换进去之后运行了install.ps1,但是完事之后我数据都没了,那几个VHDX虚拟盘是不是不能替换啊?

Python error

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 382, in _make_request
self._validate_conn(conn)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 1012, in validate_conn
conn.connect()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 411, in connect
self.sock = ssl_wrap_socket(
File "/usr/lib/python3/dist-packages/urllib3/util/ssl
.py", line 449, in ssl_wrap_socket
ssl_sock = ssl_wrap_socket_impl(
File "/usr/lib/python3/dist-packages/urllib3/util/ssl
.py", line 493, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
File "/usr/lib/python3.10/ssl.py", line 512, in wrap_socket
return self.sslsocket_class._create(
File "/usr/lib/python3.10/ssl.py", line 1070, in _create
self.do_handshake()
File "/usr/lib/python3.10/ssl.py", line 1341, in do_handshake
self._sslobj.do_handshake()
ssl.SSLZeroReturnError: TLS/SSL connection has been closed (EOF) (_ssl.c:997)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 755, in urlopen
retries = retries.increment(
File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 574, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='fe3.delivery.mp.microsoft.com', port=443): Max retries exceeded with url: /ClientWebService/client.asmx (Caused by SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:997)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/dgqyushen/OpenSource/MagiskOnWSALocal/scripts/generateWSALinks.py", line 46, in
out = requests.post(
File "/usr/lib/python3/dist-packages/requests/api.py", line 119, in post
return request('post', url, data=data, json=json, **kwargs)
File "/usr/lib/python3/dist-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 514, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='fe3.delivery.mp.microsoft.com', port=443): Max retries exceeded with url: /ClientWebService/client.asmx (Caused by SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:997)')))
Build: an error has occurred, exit

无法选择GApps类型

运行run.sh之后,在选择是否安装GApps之后没有选择类型的界面,后续默认使用了pico类型

安装完成后,WsaSettings闪退

run.sh输出信息,看起来好像没什么问题
ARCH=x64
RELEASE_TYPE=retail
MAGISK_VER=stable
GAPPS_VARIANT=pico
REMOVE_AMAZON=remove
ROOT_SOL=magisk
COMPRESS_OUTPUT=no
Generate Download Links
Generating WSA download link: arch=x64 release_type=Retail
download link: http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice/files/605edfa0-3ba9-423b-abb2-aa8da0b0e8f2?P1=1661519923&P2=404&P3=2&P4=gmRNb38TgAHLlczz93yQ6GThH90ycgQjPuBW%2b3ZJDOavB1lgpg9CirpwwvYnCB7Z1dVQnPBGDHYwtFaG%2fUDRDg%3d%3d to /home/devel/MagiskOnWSALocal-main/download/xaml-x64.appx
download link: http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice/files/dad8ebbc-9e63-4ee6-8dfb-f12fd34669bf?P1=1661547511&P2=404&P3=2&P4=API9Ybrqos8%2fLV2bRKbzTlMzmEtBVQJR%2fDY40Lah2zW9ZUwEtHmKJUqjXpVbMHcVB6UbmScO%2bpavh%2bsoKuijRw%3d%3d to /home/devel/MagiskOnWSALocal-main/download/wsa-x64-Retail.zip
Generating Magisk download link: release type=stable
download link: https://cdn.jsdelivr.net/gh/topjohnwu/[email protected]/app-release.apk
Generating OpenGApps download link: arch=x64 variant=pico
download link: https://downloads.sourceforge.net/project/opengapps/x86_64/20220503/open_gapps-x86_64-11.0-pico-20220503.zip
Download Artifacts

08/26 21:07:19 [NOTICE] Downloading 5 item(s)

08/26 21:07:19 [NOTICE] GID#43bc67896a9ecb15 - 下载已完成:/home/devel/MagiskOnWSALocal-main/download/xaml-x64.appx

08/26 21:07:19 [NOTICE] 下载已完成:/home/devel/MagiskOnWSALocal-main/download/xaml-x64.appx

08/26 21:07:19 [NOTICE] GID#a421aea9aa341b89 - 下载已完成:/home/devel/MagiskOnWSALocal-main/download/wsa-x64-Retail.zip

08/26 21:07:19 [NOTICE] 下载已完成:/home/devel/MagiskOnWSALocal-main/download/wsa-x64-Retail.zip

08/26 21:07:19 [NOTICE] CUID#10 - Redirecting to https://raw.githubusercontent.com/topjohnwu/magisk-files/25.2/app-release.apk
[DL:0B][#d82b62 0B/0B][#3cd63d 0B/0B][#0e6d3f 0B/0B]                           
08/26 21:07:20 [NOTICE] CUID#11 - Redirecting to https://udomain.dl.sourceforge.net/project/opengapps/x86_64/20220503/open_gapps-x86_64-11.0-pico-20220503.zip

08/26 21:07:20 [NOTICE] GID#3cd63d07bdec5acc - 下载已完成:/home/devel/MagiskOnWSALocal-main/download/magisk-stable.zip

08/26 21:07:20 [NOTICE] 下载已完成:/home/devel/MagiskOnWSALocal-main/download/magisk-stable.zip
[DL:0B][#d82b62 0B/0B][#0e6d3f 0B/0B]                                          
08/26 21:07:35 [NOTICE] CUID#9 - Redirecting to https://download.microsoft.com/download/4/7/c/47c6134b-d61f-4024-83bd-b9c9ea951c25/appx/Microsoft.VCLibs.x64.14.00.Desktop.appx
[DL:0B][#d82b62 0B/0B][#0e6d3f 0B/0B]                                          
08/26 21:07:35 [NOTICE] GID#d82b623755398465 - 下载已完成:/home/devel/MagiskOnWSALocal-main/download/vclibs-x64.appx

08/26 21:07:35 [NOTICE] 下载已完成:/home/devel/MagiskOnWSALocal-main/download/vclibs-x64.appx

08/26 21:07:36 [NOTICE] GID#0e6d3fa8c86c2c1c - 下载已完成:/home/devel/MagiskOnWSALocal-main/download/OpenGApps-x64-pico.zip

08/26 21:07:36 [NOTICE] 下载已完成:/home/devel/MagiskOnWSALocal-main/download/OpenGApps-x64-pico.zip

下载结果:
gid   |stat|avg speed  |path/URI
======+====+===========+=======================================================
43bc67|OK  |       0B/s|/home/devel/MagiskOnWSALocal-main/download/xaml-x64.appx
a421ae|OK  |       0B/s|/home/devel/MagiskOnWSALocal-main/download/wsa-x64-Retail.zip
3cd63d|OK  |       0B/s|/home/devel/MagiskOnWSALocal-main/download/magisk-stable.zip
d82b62|OK  |       0B/s|/home/devel/MagiskOnWSALocal-main/download/vclibs-x64.appx
0e6d3f|OK  |       0B/s|/home/devel/MagiskOnWSALocal-main/download/OpenGApps-x64-pico.zip

状态标识:
(OK): 下载完成。
Extract WSA
unzipping to /tmp/wsa-build-0MWXKqVkZG_/wsa
unzipping from /tmp/wsa-build-0MWXKqVkZG_/wsa/WsaPackage_2206.40000.15.0_x64_Release-Nightly.msix
Extract done

Extract Magisk
done

Extract GApps
Extract done

Expand images
e2fsck 1.46.5 (30-Dec-2021)
第 1 遍:检查 inode、块,和大小
第 2 遍:检查目录结构
第 3 遍:检查目录连接性
第 4 遍:检查引用计数
第 5 遍:检查组概要信息
system_ext:83/96 文件(1.2% 为非连续的),33727/33829 块
resize2fs 1.46.5 (30-Dec-2021)
将 /tmp/wsa-build-0MWXKqVkZG_/wsa/x64/system_ext.img 上的文件系统调整为 37316 个块(每块 4k)。
/tmp/wsa-build-0MWXKqVkZG_/wsa/x64/system_ext.img 上的文件系统大小已经调整为 37316 个块(每块 4k)。

e2fsck 1.46.5 (30-Dec-2021)
第 1 遍:检查 inode、块,和大小
第 2 遍:检查目录结构
第 3 遍:检查目录连接性
第 4 遍:检查引用计数
第 5 遍:检查组概要信息
product:153/192 文件(0.0% 为非连续的),80266/80507 块
resize2fs 1.46.5 (30-Dec-2021)
将 /tmp/wsa-build-0MWXKqVkZG_/wsa/x64/product.img 上的文件系统调整为 84428 个块(每块 4k)。
/tmp/wsa-build-0MWXKqVkZG_/wsa/x64/product.img 上的文件系统大小已经调整为 84428 个块(每块 4k)。

e2fsck 1.46.5 (30-Dec-2021)
第 1 遍:检查 inode、块,和大小
第 2 遍:检查目录结构
第 3 遍:检查目录连接性
第 3A 遍:优化目录
第 4 遍:检查引用计数
第 5 遍:检查组概要信息

/:***** 文件系统已被修改 *****
/:2679/2688 文件(0.4% 为非连续的),211645/226940 块
resize2fs 1.46.5 (30-Dec-2021)
将 /tmp/wsa-build-0MWXKqVkZG_/wsa/x64/system.img 上的文件系统调整为 311302 个块(每块 4k)。
/tmp/wsa-build-0MWXKqVkZG_/wsa/x64/system.img 上的文件系统大小已经调整为 311302 个块(每块 4k)。

e2fsck 1.46.5 (30-Dec-2021)
第 1 遍:检查 inode、块,和大小
第 2 遍:检查目录结构
第 3 遍:检查目录连接性
第 3A 遍:优化目录
第 4 遍:检查引用计数
第 5 遍:检查组概要信息

vendor:***** 文件系统已被修改 *****
vendor:1349/1392 文件(0.9% 为非连续的),89253/89522 块
resize2fs 1.46.5 (30-Dec-2021)
将 /tmp/wsa-build-0MWXKqVkZG_/wsa/x64/vendor.img 上的文件系统调整为 93636 个块(每块 4k)。
/tmp/wsa-build-0MWXKqVkZG_/wsa/x64/vendor.img 上的文件系统大小已经调整为 93636 个块(每块 4k)。

Expand images done

Mount images
done

Remove Amazon AppStore
done

Integrate Magisk
#!/system/bin/sh
mkdir -p /data/adb/magisk
cp /sbin/* /data/adb/magisk/
chmod -R 755 /data/adb/magisk
restorecon -R /data/adb/magisk
for module in $(ls /data/adb/modules); do
    if ! [ -f "/data/adb/modules/$module/disable" ] && [ -f "/data/adb/modules/$module/sepolicy.rule" ]; then
        /sbin/magiskpolicy --live --apply "/data/adb/modules/$module/sepolicy.rule"
    fi
done
/dev/DPBK6LVj(/.*)?    u:object_r:magisk_file:s0
/data/adb/magisk(/.*)?   u:object_r:magisk_file:s0
on post-fs-data
    start adbd
    mkdir /dev/DPBK6LVj
    mount tmpfs tmpfs /dev/DPBK6LVj mode=0755
    copy /sbin/magisk64 /dev/DPBK6LVj/magisk64
    chmod 0755 /dev/DPBK6LVj/magisk64
    symlink ./magisk64 /dev/DPBK6LVj/magisk
    symlink ./magisk64 /dev/DPBK6LVj/su
    symlink ./magisk64 /dev/DPBK6LVj/resetprop
    copy /sbin/magisk32 /dev/DPBK6LVj/magisk32
    chmod 0755 /dev/DPBK6LVj/magisk32
    copy /sbin/magiskinit /dev/DPBK6LVj/magiskinit
    chmod 0755 /dev/DPBK6LVj/magiskinit
    copy /sbin/magiskpolicy /dev/DPBK6LVj/magiskpolicy
    chmod 0755 /dev/DPBK6LVj/magiskpolicy
    mkdir /dev/DPBK6LVj/.magisk 700
    mkdir /dev/DPBK6LVj/.magisk/mirror 700
    mkdir /dev/DPBK6LVj/.magisk/block 700
    copy /sbin/magisk.apk /dev/DPBK6LVj/stub.apk
    rm /dev/.magisk_unblock
    start EaxmOMv4MLsG
    start IeAzHhAai4sN
    wait /dev/.magisk_unblock 40
    rm /dev/.magisk_unblock

service EaxmOMv4MLsG /system/bin/sh /sbin/loadpolicy.sh
    user root
    seclabel u:r:magisk:s0
    oneshot

service IeAzHhAai4sN /dev/DPBK6LVj/magisk --post-fs-data
    user root
    seclabel u:r:magisk:s0
    oneshot

service iMQjZ3rrvCoA /dev/DPBK6LVj/magisk --service
    class late_start
    user root
    seclabel u:r:magisk:s0
    oneshot

on property:sys.boot_completed=1
    mkdir /data/adb/magisk 755
    copy /sbin/magisk.apk /data/adb/magisk/magisk.apk
    start a24dc2WQOFqq

service a24dc2WQOFqq /dev/DPBK6LVj/magisk --boot-complete
    user root
    seclabel u:r:magisk:s0
    oneshot
Integrate Magisk done

Merge Language Resources
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<resources targetOsVersion="10.0.0" majorVersion="1">
<index root="\" startIndexAt="\">
    <indexer-config type="folder" foldernameAsQualifier="true" filenameAsQualifier="true" qualifierDelimiter="."/>
    <indexer-config type="PRI"/>
</index>
</resources>
0034:fixme:font:get_name_record_codepage encoding 29 not handled, platform 1.
0034:fixme:font:get_name_record_codepage encoding 29 not handled, platform 1.
0034:fixme:font:get_name_record_codepage encoding 29 not handled, platform 1.
0034:fixme:font:get_name_record_codepage encoding 29 not handled, platform 1.
0034:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
0034:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
0064:fixme:font:get_name_record_codepage encoding 29 not handled, platform 1.
0064:fixme:font:get_name_record_codepage encoding 29 not handled, platform 1.
0064:fixme:font:get_name_record_codepage encoding 29 not handled, platform 1.
0064:fixme:font:get_name_record_codepage encoding 29 not handled, platform 1.
0064:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
0064:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
006c:fixme:font:get_name_record_codepage encoding 29 not handled, platform 1.
006c:fixme:font:get_name_record_codepage encoding 29 not handled, platform 1.
006c:fixme:font:get_name_record_codepage encoding 29 not handled, platform 1.
006c:fixme:font:get_name_record_codepage encoding 29 not handled, platform 1.
006c:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
006c:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0

MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0

002c:fixme:font:get_name_record_codepage encoding 29 not handled, platform 1.
002c:fixme:font:get_name_record_codepage encoding 29 not handled, platform 1.
002c:fixme:font:get_name_record_codepage encoding 29 not handled, platform 1.
002c:fixme:font:get_name_record_codepage encoding 29 not handled, platform 1.
002c:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
002c:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
006c:err:system:ChangeDisplaySettingsExW Changing L"\\\\.\\DISPLAY1" display settings returned -2.
006c:err:explorer:initialize_display_settings Failed to initialize registry display settings for L"\\\\.\\DISPLAY1".
0024:fixme:font:get_name_record_codepage encoding 29 not handled, platform 1.
0024:fixme:font:get_name_record_codepage encoding 29 not handled, platform 1.
0024:fixme:font:get_name_record_codepage encoding 29 not handled, platform 1.
0024:fixme:font:get_name_record_codepage encoding 29 not handled, platform 1.
00c0:fixme:font:get_name_record_codepage encoding 29 not handled, platform 1.
00c0:fixme:font:get_name_record_codepage encoding 29 not handled, platform 1.
00c0:fixme:font:get_name_record_codepage encoding 29 not handled, platform 1.
00c0:fixme:font:get_name_record_codepage encoding 29 not handled, platform 1.
0024:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
0024:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
00c0:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
00c0:fixme:font:get_name_record_codepage encoding 20 not handled, platform 1.
0024:fixme:nls:RtlSetThreadPreferredUILanguages 256, 0000000000000000, 0000000000000000
0024:fixme:heap:RtlSetHeapInformation 0000000001950000 0 000000000021E420 4 stub
0024:fixme:heap:RtlSetHeapInformation 0000000001950000 0 000000000021E420 4 stub
Index Pass Completed.
AlternateForm Qualifiers: LIGHTUNPLATED,UNPLATED
Language Qualifiers: EN-US,EN-GB,AF-ZA,AR-SA,AZ-LATN-AZ,BG-BG,BS-LATN-BA,CA-ES,C
S-CZ,CY-GB,DA-DK,DE-DE,EL-GR,ES-ES,ES-MX,ET-EE,EU-ES,FA-IR,FI-FI,FR-CA,FR-FR,GL-
ES,HE-IL,HI-IN,HR-HR,HU-HU,ID-ID,IS-IS,IT-IT,JA-JP,KA-GE,KK-KZ,KO-KR,LT-LT,LV-LV
,MS-MY,NB-NO,NL-NL,NN-NO,PL-PL,PT-BR,PT-PT,QPS-PLOC,QPS-PLOCA,QPS-PLOCM,RO-RO,RU
-RU,SK-SK,SL-SI,SQ-AL,SR-CYRL-RS,SR-LATN-RS,SV-SE,TH-TH,TR-TR,UK-UA,VI-VN,ZH-CN,
ZH-TW
Scale Qualifiers: 200,400,150,125,100
TargetSize Qualifiers: 256,16,20,24,30,32,36,40,48,60,64,72,80,96

Finished building
Version: 1.0
Resource Map Name: MicrosoftCorporationII.WindowsSubsystemForAndroid
Named Resources: 235
Resource Candidates: 9787
Successfully Completed
Merge Language Resources done

Add extra packages
Add extra packages done

Integrate GApps
Integrate GApps done

Fix GApps prop
fixing /tmp/wsa-build-0MWXKqVkZG_/system/system/build.prop
fixing /tmp/wsa-build-0MWXKqVkZG_/system/vendor/build.prop
fixing /tmp/wsa-build-0MWXKqVkZG_/system/vendor/odm/etc/build.prop
done

Umount images
done

Shrink images
e2fsck 1.46.5 (30-Dec-2021)
第 1 遍:检查 inode、块,和大小
第 2 遍:检查目录结构
第 3 遍:检查目录连接性
第 4 遍:检查引用计数
第 5 遍:检查组概要信息
/:2749/3840 文件(0.7% 为非连续的),289633/311302 块
resize2fs 1.46.5 (30-Dec-2021)
将 /tmp/wsa-build-0MWXKqVkZG_/wsa/x64/system.img 上的文件系统调整为 289648 个块(每块 4k)。
/tmp/wsa-build-0MWXKqVkZG_/wsa/x64/system.img 上的文件系统大小已经调整为 289648 个块(每块 4k)。

e2fsck 1.46.5 (30-Dec-2021)
第 1 遍:检查 inode、块,和大小
第 2 遍:检查目录结构
第 3 遍:检查目录连接性
第 4 遍:检查引用计数
第 5 遍:检查组概要信息
vendor:1349/1392 文件(0.9% 为非连续的),89316/93636 块
resize2fs 1.46.5 (30-Dec-2021)
将 /tmp/wsa-build-0MWXKqVkZG_/wsa/x64/vendor.img 上的文件系统调整为 89324 个块(每块 4k)。
/tmp/wsa-build-0MWXKqVkZG_/wsa/x64/vendor.img 上的文件系统大小已经调整为 89324 个块(每块 4k)。

e2fsck 1.46.5 (30-Dec-2021)
第 1 遍:检查 inode、块,和大小
第 2 遍:检查目录结构
第 3 遍:检查目录连接性
第 4 遍:检查引用计数
第 5 遍:检查组概要信息
product:145/192 文件(0.0% 为非连续的),73449/84428 块
resize2fs 1.46.5 (30-Dec-2021)
将 /tmp/wsa-build-0MWXKqVkZG_/wsa/x64/product.img 上的文件系统调整为 73470 个块(每块 4k)。
/tmp/wsa-build-0MWXKqVkZG_/wsa/x64/product.img 上的文件系统大小已经调整为 73470 个块(每块 4k)。

e2fsck 1.46.5 (30-Dec-2021)
第 1 遍:检查 inode、块,和大小
第 2 遍:检查目录结构
第 3 遍:检查目录连接性
第 4 遍:检查引用计数
第 5 遍:检查组概要信息
system_ext:83/96 文件(1.2% 为非连续的),33727/37316 块
resize2fs 1.46.5 (30-Dec-2021)
将 /tmp/wsa-build-0MWXKqVkZG_/wsa/x64/system_ext.img 上的文件系统调整为 33734 个块(每块 4k)。
/tmp/wsa-build-0MWXKqVkZG_/wsa/x64/system_ext.img 上的文件系统大小已经调整为 33734 个块(每块 4k)。

Shrink images done

Remove signature and add scripts
# Automated Install script by Midonei
# http://github.com/doneibcn
function Test-Administrator {
    [OutputType([bool])]
    param()
    process {
        [Security.Principal.WindowsPrincipal]$user = [Security.Principal.WindowsIdentity]::GetCurrent();
        return $user.IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator);
    }
}

function Finish {
    Clear-Host
    Start-Process "wsa://com.topjohnwu.magisk"
    Start-Process "wsa://com.android.vending"
}

if (-not (Test-Administrator)) {
    Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Bypass -Force
    $proc = Start-Process -PassThru -WindowStyle Hidden -Verb RunAs powershell.exe -Args "-executionpolicy bypass -command Set-Location '$PSScriptRoot'; &'$PSCommandPath' EVAL"
    $proc.WaitForExit()
    if ($proc.ExitCode -ne 0) {
        Clear-Host
        Write-Warning "Failed to launch start as Administrator`r`nPress any key to exit"
        $null = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown');
    }
    exit
}
elseif (($args.Count -eq 1) -and ($args[0] -eq "EVAL")) {
    Start-Process powershell.exe -Args "-executionpolicy bypass -command Set-Location '$PSScriptRoot'; &'$PSCommandPath'"
    exit
}

if (((Test-Path -Path "system.img","classicAppInstaller_WSA.sccd","resources.pri","Assets","userdata.vhdx","metadata.vhdx","libGLESv2.dll","WsaService","appcompatdb.json","lxutil.dll","gfxstream_backend.dll","wslhost.exe","libEGL.dll","AppxManifest.xml","Tools","Microsoft.UI.Xaml.winmd","Fonts","WSACodecs.dll","vclibs-x64.appx","Registry.dat","xaml-x64.appx","WSACrashUploader","CustomInstall","vendor.img","WsaSettingsBroker","Images","product.img","GSKServer","WsaSettings.exe","WsaProxy","Styles","appcompatdb_schema.json","wsldevicehost.dll","WsaSettings.winmd","Licenses","system_ext.img","wslcore.dll","WsaClient","wsldeps.dll") -eq $false).Count) {
    Write-Error "Some files are missing in the folder. Please try to build again. Press any key to exist"
    $null = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown')
    exit 1
}

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" /t REG_DWORD /f /v "AllowDevelopmentWithoutDevLicense" /d "1"

$VMP = Get-WindowsOptionalFeature -Online -FeatureName 'VirtualMachinePlatform'
if ($VMP.State -ne "Enabled") {
    Enable-WindowsOptionalFeature -Online -NoRestart -FeatureName 'VirtualMachinePlatform'
    Clear-Host
    Write-Warning "Need restart to enable virtual machine platform`r`nPress y to restart or press any key to exit"
    $key = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown')
    If ("y" -eq $key.Character) {
        Restart-Computer -Confirm
    }
    Else {
        exit 1
    }
}

Add-AppxPackage -ForceApplicationShutdown -ForceUpdateFromAnyVersion -Path vclibs-x64.appx
Add-AppxPackage -ForceApplicationShutdown -ForceUpdateFromAnyVersion -Path xaml-x64.appx

$Installed = $null
$Installed = Get-AppxPackage -Name 'MicrosoftCorporationII.WindowsSubsystemForAndroid'

If (($null -ne $Installed) -and (-not ($Installed.IsDevelopmentMode))) {
    Clear-Host
    Write-Warning "There is already one installed WSA. Please uninstall it first.`r`nPress y to uninstall existing WSA or press any key to exit"
    $key = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown')
    If ("y" -eq $key.Character) {
        Remove-AppxPackage -Package $Installed.PackageFullName
    }
    Else {
        exit 1
    }
}
Clear-Host
Write-Host "Installing MagiskOnWSA..."
Stop-Process -Name "wsaclient" -ErrorAction "silentlycontinue"
Add-AppxPackage -ForceApplicationShutdown -ForceUpdateFromAnyVersion -Register .\AppxManifest.xml
if ($?) {
    Finish
}
Elseif ($null -ne $Installed) {
    Clear-Host
    Write-Host "Failed to update, try to uninstall existing installation while preserving userdata..."
    Remove-AppxPackage -PreserveApplicationData -Package $Installed.PackageFullName
    Add-AppxPackage -ForceApplicationShutdown -ForceUpdateFromAnyVersion -Register .\AppxManifest.xml
    if ($?) {
        Finish
    }
}
Write-Host "All Done`r`nPress any key to exit"
$null = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown')
Remove signature and add scripts done

Generate info
:warning: Since OpenGApps doesn't officially support Android 12.1 yet, lock the variant to pico!
WSA-with-magisk-stable-OpenGApps-pico_2206.40000.15.0_x64_Release-Nightly

Finishing building....
done

Cleanup Work Directory
done

Windows这边,安装也没遇到太大问题。但是装完以后从开始菜单启动wsa,能看到窗口和标题栏,窗体是灰色。接着没有显示任何实际内容,就崩溃闪退了。

我在“事件查看器”里找到了如下内容:

错误应用程序名称: WsaSettings.exe,版本: 2206.40000.15.0,时间戳: 0x62e2db13
错误模块名称: Windows.UI.Xaml.dll,版本: 10.0.22000.832,时间戳: 0x9e96a54a
异常代码: 0xc000027b
错误偏移量: 0x0000000000834980
错误进程 ID: 0x3dec
错误应用程序启动时间: 0x01d8b954c8181867
错误应用程序路径: D:\Shared\WSA-with-magisk-stable-OpenGApps-pico_2206.40000.15.0_x64_Release-Nightly\WsaSettings.exe
错误模块路径: C:\Windows\System32\Windows.UI.Xaml.dll
报告 ID: d42c37d8-49d4-4deb-8979-9d9c04cfd0c8
错误程序包全名: MicrosoftCorporationII.WindowsSubsystemForAndroid_2206.40000.15.0_x64__8wekyb3d8bbwe
错误程序包相对应用程序 ID: SettingsApp

可是我将MagiskOnWSALocal生成的wsa删除后,将wsa-x64-Retail.zip后缀名改为Msixbundle,装上是可以用的,说明xaml和wsa的原始包应该也没啥问题。

我也不确定这个是不是bug,请问还有啥我可以去检查的地方么?

谢谢。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.