Browse by type
这是一个可以让 Windows 10 运行 WSA (Windows Subsystem for Android) 的补丁及其使用方法。
本人测试过 Windows 10 22H2 10.0.19045.2311 x64 + WSA 2210.40000.7.0 以及 10.0.19045.2364 + 2211.40000.10.0.
winver 命令查看您当前的 Windows 版本.MagiskOnWSALocal/output, 文件名类似于 WSA-with-magisk-stable-MindTheGapps_2210.40000.7.0_x64_Release-Nightly.7z.按以下要求修改 AppxManifest.xml:
AppxManifest.xml 找到 TargetDeviceFamily 节点
xml
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.22000.120" MaxVersionTested="10.0.22000.120"/>把 MinVersion 从 10.0.22000.120 改成 10.0.19045.2311.
AppxManifest.xml 删除 "customInstall" 相关节点,一共有两个.
找到以下内容,然后删掉.xml
<rescap:Capability Name="customInstallActions"/>
xml
<desktop6:Extension Category="windows.customInstall">
<desktop6:CustomInstall Folder="CustomInstall" desktop8:RunAsUser="true">
<desktop6:RepairActions>
<desktop6:RepairAction File="WsaSetup.exe" Name="Repair" Arguments="repair"/>
</desktop6:RepairActions>
<desktop6:UninstallActions>
<desktop6:UninstallAction File="WsaSetup.exe" Name="Uninstall" Arguments="uninstall"/>
</desktop6:UninstallActions>
</desktop6:CustomInstall>
</desktop6:Extension>
运行 Run.bat (需要管理员权限).
编译好的 WsaPatch.dll 和修改过的 icu.dll 可以从 release 页面 下载.
EnableDebugConsole 的文件(没有扩展名)或者把 WsaPatch.cpp 里的 wsapatch::kDebug 改成 true,
你能看到 GetProcAddress 有些结果是 NULL.12-10 16:16:29.474 W WsaPatch: -GetProcAddress: hModule=C:\WINDOWS\SYSTEM32\WINHTTP.dll(00007FFC64780000), lpProcName=WinHttpRegisterProxyChangeNotification, result=NULL
12-10 16:16:29.474 W WsaPatch: -GetProcAddress: hModule=C:\WINDOWS\SYSTEM32\WINHTTP.dll(00007FFC64780000), lpProcName=WinHttpUnregisterProxyChangeNotification, result=NULL
12-10 16:16:29.474 W WsaPatch: -GetProcAddress: hModule=C:\WINDOWS\SYSTEM32\WINHTTP.dll(00007FFC64780000), lpProcName=WinHttpGetProxySettingsEx, result=NULL
12-10 16:16:29.474 W WsaPatch: -GetProcAddress: hModule=C:\WINDOWS\SYSTEM32\WINHTTP.dll(00007FFC64780000), lpProcName=WinHttpGetProxySettingsResultEx, result=NULL
12-10 16:16:29.474 W WsaPatch: -GetProcAddress: hModule=C:\WINDOWS\SYSTEM32\WINHTTP.dll(00007FFC64780000), lpProcName=WinHttpFreeProxySettingsEx, result=NULL
如果你遇到了其他问题或者有什么建议,欢迎在 Issue/PR 中提出.

$ claude mcp add WSAPatch \
-- python -m otcore.mcp_server <graph>