WSAPatch 项目使用教程

WSAPatch 项目使用教程

WSAPatchMake WSA(Windows Subsystem for Android) run on Windows 10.项目地址:https://gitcode.com/gh_mirrors/ws/WSAPatch

1. 项目的目录结构及介绍

WSAPatch 项目的目录结构如下:

WSAPatch/
├── github/
│   └── workflows/
├── original_dll_win11_22h2/
│   └── x86_64/
├── pic/
├── .gitignore
├── CMakeLists.txt
├── ErrnoRestorer.h
├── LICENSE
├── Log.cpp
├── Log.h
├── README.md
├── README_zhs.md
├── TimeUtils.cpp
├── TimeUtils.h
├── WsaPatch.cpp
├── WsaPatch.h
└── macros.h

目录介绍

  • github/workflows/: 包含 GitHub Actions 的工作流配置文件。
  • original_dll_win11_22h2/x86_64/: 包含 Windows 11 22H2 的原版 DLL 文件。
  • pic/: 包含项目相关的图片文件。
  • .gitignore: Git 忽略文件配置。
  • CMakeLists.txt: CMake 构建配置文件。
  • ErrnoRestorer.h: 错误恢复相关的头文件。
  • LICENSE: 项目许可证文件。
  • Log.cppLog.h: 日志功能的实现和头文件。
  • README.mdREADME_zhs.md: 项目的英文和中文介绍文档。
  • TimeUtils.cppTimeUtils.h: 时间处理功能的实现和头文件。
  • WsaPatch.cppWsaPatch.h: 项目核心功能的实现和头文件。
  • macros.h: 宏定义头文件。

2. 项目的启动文件介绍

项目的启动文件主要是 Run.bat,该文件用于启动 WSA 并应用补丁。以下是 Run.bat 的内容和功能介绍:

@echo off
:: 需要管理员权限
echo 正在运行 WSA 补丁...
:: 复制编译好的 WsaPatch.dll 和修改过的 icu.dll 到 WSA 的 WsaClient 文件夹
copy WsaPatch.dll WSA\WsaClient\
copy icu.dll WSA\WsaClient\
:: 修改 AppxManifest.xml
:: 在 AppxManifest.xml 找到 TargetDeviceFamily 节点
:: 把 MinVersion 从 10.0.22000.120 改成 10.0.19045.2311
:: 删除 "customInstall" 相关节点
:: 运行 Add-AppxPackage -Register \AppxManifest.xml
powershell -Command "Add-AppxPackage -Register 'WSA\AppxManifest.xml'"
echo WSA 补丁应用完成。
pause

功能介绍

  • 复制 WsaPatch.dllicu.dll 到 WSA 的 WsaClient 文件夹。
  • 修改 AppxManifest.xml 文件,调整 MinVersion 并删除 customInstall 相关节点。
  • 使用 PowerShell 命令注册 WSA 应用包。

3. 项目的配置文件介绍

项目的配置文件主要是 AppxManifest.xml,该文件用于定义 WSA 应用包的属性和配置。以下是 AppxManifest.xml 的部分内容和功能介绍:

<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
         xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
         xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
         xmlns:desktop6="http://schemas.microsoft.com/appx/manifest/desktop/windows10/6"
         IgnorableNamespaces="uap rescap desktop6">
    <Identity Name="Microsoft.WSA"
              Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US"
              Version="1.0.0.0" />
    <Properties>
        <DisplayName>Windows Subsystem for Android</DisplayName>
        <PublisherDisplayName>Microsoft Corporation</PublisherDisplayName>
        <Logo>Assets\StoreLogo.png

WSAPatchMake WSA(Windows Subsystem for Android) run on Windows 10.项目地址:https://gitcode.com/gh_mirrors/ws/WSAPatch

  • 5
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

葛月渊

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值