Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/buildinfo/buildinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package buildinfo
// Version of modavd itself, kept in the source rather than set with -ldflags -X: release builds must come out byte
// for byte the same for the same source (Mirror 酱 ships per-file deltas, and a version stamped per package would
// change the exe in every release). The ModAVD package version comes from the root at run time.
var Version = "0.5.0"
var Version = "0.6.0"

// Protocol is the version of the machine-readable contract: the commands, the JSON written by `--json`, the exit codes
// and the MCP tool schemas. Callers such as AUTO-MAS check it (`modavd version --json`) before relying on a field.
Expand Down
3 changes: 3 additions & 0 deletions release/0.6.0.SHA256SUMS.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
cb157a6b81958d78d69845d661fc0e6eae4fd6675a709ce3a42ae39f570d0ab5 ModAVD.exe
bfc199d5b4b99b24332b11378f0a83d5f456e40ad0cdd5fb77d21f4b2c4d038f ModAVDManager-0.6.0-win-x64.zip
d80949e9535fc70cc2bab1af186cc1d4f873b669afc0b6b3ff2a8b6442bc27fa tools/modavd.exe
110 changes: 110 additions & 0 deletions release/0.6.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
# ModAVDManager v0.6.0

- `ModAVD.exe`:`cb157a6b81958d78d69845d661fc0e6eae4fd6675a709ce3a42ae39f570d0ab5`
- `tools/modavd.exe`:`d80949e9535fc70cc2bab1af186cc1d4f873b669afc0b6b3ff2a8b6442bc27fa`

随 ModAVD 0.39.0 进包。下面是相对 v0.5.0 的改动。这一版主要是适配 World of Airports 3.7.3(ModAVD/ModAVD#131)。

## 新增

- 按实例的实验开关「报告 GLES 3.2」:
- 有的游戏在清单里要求 GLES 3.2,比如 World of Airports 3.7.3。Google Play 按实例报的 OpenGL ES 版本判断兼容,ModAVD 报的是 3.1,商店就不让装。打开这个开关,实例改报 3.2,商店就放行。
- **只改报的版本,实际渲染仍是 3.1**:走 Vulkan 的游戏能用,真要 GLES 3.2 渲染的应用会装得上、打不开。默认关,界面和命令帮助里都标着「实验」。遇到问题先把它关掉。
- 在实例的「更多操作」里点「开启 / 关闭报告 GLES 3.2(实验)」,或运行 `modavd gles32 <编号> on|off|status`。要冷启动一次(几分钟):原来关着的做完再关上,开着的照原来的方式开回来;冷启动后核对实例报的版本,对不上就报错。
- 实例要有执行桥:改的是执行桥带来的可写系统镜像覆盖层里的 `/vendor/build.prop`。没有执行桥的实例开不了;开着这个开关时不能卸执行桥,要先关掉它。
- 实例装着 Google Play 商店时,改完要到实例里 设置 → 应用 → Google Play 商店 → 存储,清除数据(账号不会退出),商店才会按新的版本重新判断。

(ModAVD/ModAVD#131,ModAVDManager#104)
- 开机时多挂一个 ARM 转译层补丁:
- API 34 r14 镜像自带的 Google ARM 转译层(`libndk_translation.so`)把 AArch64 的 WFE、WFI、SEV、SEVL 这几条 HINT 指令当成未定义指令,用到它们的应用会闪退。新版 Unity(比如 World of Airports 3.7.3 用的 Unity 6)的自旋锁会用 `sevl; wfe`,游戏启动约 2 秒就退出。按 ARM 规范这几条可以当空操作执行,补丁就把它们改成空操作;其余未定义指令照旧报错。
- 和客体 Vulkan 驱动补丁一样,补丁版是在你的电脑上从镜像自带的库生成的(放在根目录的 `guest-patches\`),不随包分发。两个补丁在同一次里挂上,zygote 只重启一次,开机不比原来多花时间。
- 只认 API 34 r14 镜像里的那一份转译层,别的版本不改,只记一条日志。ARM64 客体直接跑 ARM 代码,不套用。
- 这几条指令当空操作以后,用它们等待的自旋锁会一直空转,可能多占一点 CPU;World of Airports 主界面上没看到 CPU 被占满。
- 升级时已经开着的实例只检查、不挂,关机再开一次才生效。
- 开机进度和结果里原来写「客体 Vulkan 修复」的地方,改成「客体库补丁」。

(ModAVD/ModAVD#131,ModAVDManager#103)

## 变更

- 客体 Vulkan 驱动补丁多修一处:镜像自带的 `libvulkan_enc.so` 在批量更新描述符时,一个模板条目连写几个相邻的绑定(Vulkan 规范允许这么写),后面几个绑定没写上,反而写到了数组外面。World of Airports 加载机场到 68% 时模拟器退出(宿主显卡报 `VK_ERROR_DEVICE_LOST`),就是这个原因。只有开着批量描述符更新(`VulkanBatchedDescriptorSetUpdate`,默认开)时才走这条路。补丁版换了文件名,第一次由这一版开机时会在本机重新生成一次。(ModAVD/ModAVD#131,ModAVDManager#102)
- 套不套客体库补丁,按实例自己的配置来定:实例的 `config.ini` 没写 `abi.type` 时按 x86_64 处理。以前读不到或没写这一项时,会跳过 Vulkan 补丁,之后也不再补。ARM64 客体照旧不套用。(ModAVD/ModAVD#130,ModAVDManager#103)
- 整理磁盘前要看数据盘所在卷的文件系统。系统没给出文件系统名时,现在按「读不到」报错并说明原因,错误码是 `internal`(退出码 1);以前报的是 `unsupported`(退出码 4),提示里还会出现一个空的卷名。(ModAVD/ModAVD#142,ModAVDManager#101)
- macOS(Apple Silicon):`components fetch` 能补全固定版本的 adb(平台工具 37.0.1)和 Android 15 Google APIs ARM64 系统镜像(r9),下载前显示对应的两份 Google 许可协议;`components fetch --play-store` 和 `components import-playstore` 能从 Android 15 Google Play ARM64 镜像(r9,`arm64-v8a-35_r09.zip`)里准备好商店的五个文件。这一版还只出 Windows 包,Mac 版没有发布,Mac 上也还不能新建、开机,不能给实例装商店。Windows 上的组件和商店照旧是 Android 14(API 34)x86_64 r14,行为不变。(ModAVD/ModAVD#67、ModAVD/ModAVD#68、ModAVD/ModAVD#112、ModAVD/ModAVD#125,ModAVDManager#72、ModAVDManager#92)

## 给调用方(AUTO-MAS)

- `protocol` 还是 2:只加了命令和字段,没有删字段,已有命令、参数、字段和退出码的含义不变。调用方不用改。
- 新命令 `gles32 <i> on|off|status`(实验):
- `on`、`off` 会冷启动一次再核对,要几分钟;原来关着的做完再关上,开着的照原来的方式(带窗口或无头)开回来。`status` 只读,实例要开着。
- `--json` 的 `data`:`index`、`action`、`state`(`on`、`off`,还没冷启动的是 `pending-on`、`pending-off`)、`enabled`、`prop`(客体的 `ro.opengles.version`)、`restarted`、`stopped`、`notes`、`warnings`。
- 冷启动后实例报的版本和要的对不上,报 `launch_failed`(退出码 7),带不带 `--json` 都一样;成功时 `state` 就是要的 `on` 或 `off`。
- 实例没有执行桥是 `not_ready`,`error.details.reason` 为 `gles32_no_bridge`;arm64 客体是 `unsupported`(`unsupported_guest`);`status` 碰上没开机的实例是 `unsupported`(不带 `reason`,和 `playstore status` 一样)。
- 和装卸执行桥、Google Play 商店共用一把锁:它们正在做时报 `busy`,`error.details` 的 `reason` 为 `locked`、`lock` 为 `bridge`。
- 开着这个开关的实例,`bridge <i> uninstall` 返回 `not_ready`,要先 `gles32 <i> off`。
- MCP 没有这个开关。
- 新字段,调用方照旧要容忍不认识的字段:
- `list`、`info` 的实例:`gles32`(bool),是 `mas-avd.json` 里 `instances.<i>.gles32` 的记录,不问客体。开着时,`info` 的文字输出多一行。MCP 的 `list_instances`、`get_instance` 也带这个字段。
- `components status --json` 的 `data.play_store`:`archive`(可以导入的官方镜像压缩包名,Windows 上是 `x86_64-34_r14.zip`)、`download_bytes`(这个压缩包的大小)、`install_supported`(这台电脑能不能给实例装、卸商店,Windows 上是 `true`)。
- 开机:`start` 结果里的 `zygote_restarted`、`setup_pending`,和进度里的 `vulkan_fix` 这一步,现在也包括 ARM 转译层补丁;名字和含义都没变(挂补丁会重启 zygote,前台开着应用或者正在装 APK 时推迟到下一次 `start` 或下次开机)。
- 客体 Vulkan 驱动补丁在宿主上的缓存换成了新文件名,不和 AUTO-MAS 自己那份(没有这次的修复)同名,互不覆盖。同一次开机里 AUTO-MAS 已经挂上它自己那份时,modavd 不替换,下次由 modavd 开机才换成新的。

## 下载与核对

用 Go 1.26.5、`GOTOOLCHAIN=local` 运行仓库里的 `build.ps1`,能编出相同的字节。单独下载的包里还有 Go 的许可原文和文件清单。请用附件 `SHA256SUMS.txt` 核对 zip 和解压出的两个 exe,例如在 PowerShell 里运行 `Get-FileHash .\ModAVDManager-0.6.0-win-x64.zip -Algorithm SHA256`。

单独下载的管理器不会自己更新,新版本要手动替换;ModAVD 包里的那份随 ModAVD 整包一起更新。单独使用时请给 `--root` 或设置 `MODAVD_ROOT`,否则会提示找不到 ModAVD 根目录。不要把单独下载的 zip 解压到 ModAVD 根目录,覆盖整包里的文件。

## English

Shipped in ModAVD 0.39.0. Changes since v0.5.0. This release is mostly about running World of Airports 3.7.3 (ModAVD/ModAVD#131).

### New

- Per-instance experimental switch "report GLES 3.2":
- Some games list GLES 3.2 in their manifest, World of Airports 3.7.3 among them. Google Play judges compatibility by the OpenGL ES version the instance reports; ModAVD reports 3.1, so the store refuses to install them. With this switch on, the instance reports 3.2 and the store lets them in.
- **It only changes the reported version; rendering stays 3.1**: games that use Vulkan work, while an app that really renders with GLES 3.2 installs but does not start. It is off by default and marked experimental in the manager and in the command help. If something goes wrong, turn it off first.
- Choose "开启 / 关闭报告 GLES 3.2(实验)" (turn reporting GLES 3.2 on / off, experimental) in the instance's "更多操作" (more actions) menu, or run `modavd gles32 <index> on|off|status`. It boots the instance cold once (a few minutes): a stopped instance is stopped again afterwards, a running one comes back the way it ran. After the cold boot it checks the version the instance reports and fails on a mismatch.
- The instance needs the execution bridge: the switch edits `/vendor/build.prop` in the writable system overlay the bridge brings. It cannot be turned on without the bridge, and while it is on the bridge cannot be uninstalled; turn the switch off first.
- With the Google Play Store on the instance, afterwards go to Settings → Apps → Google Play Store → Storage in the instance and clear its data (the account stays signed in), so the store judges compatibility again against the new version.

(ModAVD/ModAVD#131, ModAVDManager#104)
- A patch for the ARM translation layer is mounted at boot:
- Google's ARM translation layer in the API 34 r14 image (`libndk_translation.so`) treats the AArch64 HINT instructions WFE, WFI, SEV and SEVL as undefined, so apps that use them crash. Spin locks in recent Unity (such as the Unity 6 in World of Airports 3.7.3) use `sevl; wfe`, and the game quits about 2 seconds after launch. The ARM specification allows these instructions to run as no-ops, and the patch makes them no-ops; every other undefined instruction still faults.
- As with the guest Vulkan driver patch, the patched library is made on your computer from the image's own library (kept in the root's `guest-patches\`) and is not shipped. Both patches are mounted together with one zygote restart, so booting takes no longer than before.
- Only the translation layer of the API 34 r14 image is recognised; any other version is left alone with a line in the log. ARM64 guests run ARM code natively and are not patched.
- With these instructions as no-ops, spin locks that wait on them keep spinning and may use a little more CPU; on the World of Airports main screen the CPU was not seen to be maxed out.
- An instance that is already running when you upgrade is only checked, not patched; stop it and start it again.
- Boot progress and results that said "客体 Vulkan 修复" (guest Vulkan fix) now say "客体库补丁" (guest library patches).

(ModAVD/ModAVD#131, ModAVDManager#103)

### Changes

- The guest Vulkan driver patch fixes one more bug: in batched descriptor updates, when a single template entry writes several adjacent bindings (which the Vulkan specification allows), the image's `libvulkan_enc.so` did not write the later bindings and wrote past the array instead. This is why the emulator quit at 68% while World of Airports loaded an airport (the host GPU reported `VK_ERROR_DEVICE_LOST`). The code path is used only with batched descriptor updates on (`VulkanBatchedDescriptorSetUpdate`, on by default). The patched library has a new file name and is made once more on this computer at the first boot with this release. (ModAVD/ModAVD#131, ModAVDManager#102)
- Whether the guest library patches apply is decided from the instance's own configuration: an instance whose `config.ini` has no `abi.type` counts as x86_64. Previously, when that entry could not be read or was missing, the Vulkan patch was skipped and never applied later. ARM64 guests are still not patched. (ModAVD/ModAVD#130, ModAVDManager#103)
- Compacting a disk first checks the file system of the volume that holds the data disk. When Windows returns no file system name, this is now reported as unreadable with the reason, with the error code `internal` (exit code 1); it used to be `unsupported` (exit code 4), and the message showed an empty volume type. (ModAVD/ModAVD#142, ModAVDManager#101)
- macOS (Apple Silicon): `components fetch` can fetch the pinned adb (platform-tools 37.0.1) and the Android 15 Google APIs ARM64 system image (r9), showing the two matching Google license agreements before downloading; `components fetch --play-store` and `components import-playstore` can prepare the store's five files from the Android 15 Google Play ARM64 image (r9, `arm64-v8a-35_r09.zip`). This release still ships only the Windows package; there is no Mac release, and a Mac still cannot create or start instances or install the store into one. On Windows the components and the store are still Android 14 (API 34) x86_64 r14, and nothing changes. (ModAVD/ModAVD#67, ModAVD/ModAVD#68, ModAVD/ModAVD#112, ModAVD/ModAVD#125, ModAVDManager#72, ModAVDManager#92)

### For callers (AUTO-MAS)

- `protocol` is still 2: only a command and fields were added; no field was removed, and the meaning of existing commands, arguments, fields and exit codes is unchanged. Callers need no changes.
- New command `gles32 <i> on|off|status` (experimental):
- `on` and `off` boot cold once and then check, which takes a few minutes; a stopped instance is stopped again, a running one comes back the way it ran (with a window or headless). `status` is read-only and needs the instance running.
- `data` with `--json`: `index`, `action`, `state` (`on`, `off`, or `pending-on` / `pending-off` while the cold boot is still to come), `enabled`, `prop` (the guest's `ro.opengles.version`), `restarted`, `stopped`, `notes`, `warnings`.
- When the version the instance reports after the cold boot is not the one asked for, it fails with `launch_failed` (exit code 7), with or without `--json`; on success `state` is the `on` or `off` asked for.
- An instance without the execution bridge gives `not_ready` with `error.details.reason` `gles32_no_bridge`; an arm64 guest gives `unsupported` (`unsupported_guest`); `status` on an instance that is not running gives `unsupported` (without a `reason`, as `playstore status` does).
- It shares one lock with installing or removing the execution bridge and the Google Play Store: while one of those runs it gives `busy`, with `reason` `locked` and `lock` `bridge` in `error.details`.
- On an instance with the switch on, `bridge <i> uninstall` returns `not_ready`; run `gles32 <i> off` first.
- MCP has no such switch.
- New fields; callers must still tolerate unknown fields:
- Instances in `list` and `info`: `gles32` (bool), the record `instances.<i>.gles32` in `mas-avd.json`, without asking the guest. While it is on, the text output of `info` has one more line. MCP's `list_instances` and `get_instance` carry the field too.
- `data.play_store` in `components status --json`: `archive` (the name of the official image zip that can be imported, `x86_64-34_r14.zip` on Windows), `download_bytes` (that zip's size) and `install_supported` (whether this computer can install the store into instances and remove it, `true` on Windows).
- Boot: `zygote_restarted` and `setup_pending` in the result of `start`, and the `vulkan_fix` step of the progress, now include the ARM translation layer patch; their names and meaning are unchanged (mounting the patches restarts zygote, so with an app in the foreground or an APK being installed it waits for the next `start` or the next boot).
- The host's cached copy of the patched guest Vulkan driver has a new file name, so it no longer shares a name with AUTO-MAS's own copy (which lacks this fix) and neither overwrites the other. When AUTO-MAS has already mounted its own copy in the same boot, modavd leaves it in place; the new one is mounted the next time modavd boots the instance.

### Download and verification

Building with Go 1.26.5 and `GOTOOLCHAIN=local` through the repository's `build.ps1` gives the same bytes. The standalone package also holds the Go license text and a file list. Check the zip and the two exes with the attached `SHA256SUMS.txt`, for example `Get-FileHash .\ModAVDManager-0.6.0-win-x64.zip -Algorithm SHA256` in PowerShell.

The standalone manager does not update itself; replace it by hand. The copy in the ModAVD package is updated with the whole package. When you use it standalone, pass `--root` or set `MODAVD_ROOT`, or it reports that it cannot find the ModAVD root. Do not extract the standalone zip over the files of a ModAVD root.
Loading