LSPosed / MagiskOnWSALocal

Integrate Magisk root and Google Apps into WSA (Windows Subsystem for Android)
GNU Affero General Public License v3.0
9.6k stars 23.12k forks source link

[Bug] Installation fails with Add-AppxPackage : Deployment failed with HRESULT: 0x80073CF6, Package could not be registered #362

Closed dreamflasher closed 1 year ago

dreamflasher commented 1 year ago

Steps to reproduce/复现步骤

Successfully build MagiskOnWSALocal
Start powershell with admin rights
Navigate to output folder
PowerShell.exe -ExecutionPolicy Bypass -File .\Install.ps1

Expected behaviour/预期行为

Succesful installation of WSA with Magisk

Actual behaviour/实际行为

Add-AppxPackage : Deployment failed with HRESULT: 0x80073CF6, Package could not be registered
In E:\WSA\Install.ps1:102 Character:1
+ Add-AppxPackage -ForceApplicationShutdown -ForceUpdateFromAnyVersion

   + CategoryInfo          : WriteError: (E:\WSA\AppxManifest.xml:String) [Add-AppxPackage], IOException
    + FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.AddAppxPackageCommand

MagiskOnWSALocal commit full SHA/MagiskOnWSALocal 提交的完整哈希

9854c62

Linux distribution info/Linux 发行版信息

WSL 2, Ubuntu 22

Windows version/Windows 版本

11

Build Parameters/构建参数

WSA_2210.40000.7.0_x64_Release-Nightly-with-magisk-25.2(25200)-stable-OpenGApps-11.0-pico

Version requirement/版本要求

Logs/日志

``` Add-AppxPackage : Deployment failed with HRESULT: 0x80073CF6, Package could not be registered In E:\WSA\Install.ps1:102 Character:1 + Add-AppxPackage -ForceApplicationShutdown -ForceUpdateFromAnyVersion + CategoryInfo : WriteError: (E:\WSA\AppxManifest.xml:String) [Add-AppxPackage], IOException + FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.AddAppxPackageCommand ```
dreamflasher commented 1 year ago

None of the existing solutions in the web worked (spent hours trying them all out, including a repair installation). In the end what worked was to delete all folders containing WindowsSubsystemForAndroid from C:\, including those in "C:\ProgramData\Microsoft\Windows\AppRepository" and "C:\ProgramData\Microsoft\Windows\WindowsApps\".