diff --git a/internal/buildinfo/buildinfo.go b/internal/buildinfo/buildinfo.go index bae77f3..5b3c745 100644 --- a/internal/buildinfo/buildinfo.go +++ b/internal/buildinfo/buildinfo.go @@ -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.4.1" +var Version = "0.5.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. diff --git a/release/0.5.0.SHA256SUMS.txt b/release/0.5.0.SHA256SUMS.txt new file mode 100644 index 0000000..1341038 --- /dev/null +++ b/release/0.5.0.SHA256SUMS.txt @@ -0,0 +1,3 @@ +7679bca311222395513b88fb9935bd4fdd7086bc7e0f2d8045d1b1afe8695854 ModAVD.exe +4b7f325216d84b2b8731c5bb87ac66c5257efe548ea5aa14e238b46adbd4edeb ModAVDManager-0.5.0-win-x64.zip +2c7e337ac13e0489c17f3b9e6e77e39aa02ca806d4a1376a8b8b1aadf6d6000b tools/modavd.exe diff --git a/release/0.5.0.md b/release/0.5.0.md new file mode 100644 index 0000000..8e4a537 --- /dev/null +++ b/release/0.5.0.md @@ -0,0 +1,148 @@ +# ModAVDManager v0.5.0 + +- `ModAVD.exe`:`7679bca311222395513b88fb9935bd4fdd7086bc7e0f2d8045d1b1afe8695854` +- `tools/modavd.exe`:`2c7e337ac13e0489c17f3b9e6e77e39aa02ca806d4a1376a8b8b1aadf6d6000b` + +随 ModAVD 0.38.2 进包。下面是相对 v0.4.1 的改动。 + +## 新增 + +- 可选的 Google Play 商店: + - 「补全组件」下面多一项「同时补全 Google Play 商店服务(约 1.5 GB,可选)」,默认不勾。勾上后,同意许可协议时一起从 Google 官方下载 Play 版系统镜像,只取出商店要的五个文件放进 `sdk\playstore\`,下载的压缩包和解出的镜像用完就删。 + - 手里已经有 Google 官方的镜像压缩包 `x86_64-34_r14.zip` 或那五个文件的,点「使用我自己的文件…」导入,不用再下载。每个文件都核对大小和 SHA-256,认不出、对不上、缺文件的一律拒收,什么也不改,你的文件也不动。 + - 新建的实例不带商店。要的话,在实例的「更多操作」里点「补全 Google Play 商店…」:会冷启动一次,开着的做完照原来的方式开回来,关着的做完再关上。装上以后同一处变成「移除 Google Play 商店…」。实例要有执行桥;装了商店的实例要先移除商店,才能卸执行桥。 + - 装了商店的实例开机后,「更多操作」里有「复制 GSF ID」:复制这台的 GSF ID,到 登记,解决登录时「设备未经 Play 保护机制认证」的提示。还没有 ID 时,开着网等一两分钟再试。 + - 装到一半失败(比如空间不够)时,撤回这次放进去的文件;撤不干净的,实例标成「只装了一部分」,「补全」和「移除」都可以点。原来关着的实例,失败后也会关上。 + - 命令行:`components fetch --play-store`、`components import-playstore <文件或文件夹>…`、`playstore <编号> install | uninstall | status | gsfid`;`components status` 多一行商店的五个文件。 + - 商店不算必需组件,没有它不影响开机和 AUTO-MAS。查 Play Integrity 的游戏多半还是过不了。 + + (ModAVD/ModAVD#125,ModAVDManager#89、ModAVDManager#91) +- 补全组件、收集问题信息做进了管理器: + - 「电脑检查」里组件一项没通过时,点「补全组件」:先选下载源(自动、googledownloads_cn、tencent、google 或自定义地址),读从这个下载源取到的许可协议全文,同意后才下载。每个组件显示进度、速度和剩余时间,可以取消;失败时写明原因,可以重试;做完自动重新检查。主页横幅上的「补全组件」也是这个对话框。 + - 你同意的就是要下载的那份协议:下载时从同一个下载源取到的协议和你读过的不一样,就停下,什么也不下。 + - 设置里多了「组件与问题反馈」:看组件状态;「收集问题信息」做完显示问题包在哪,可以在资源管理器里打开;「复制配置信息」复制到剪贴板。 + - ModAVD 0.38.2 起包里不再带「补全组件.bat」「收集问题信息.bat」「复制配置信息.bat」,改在管理器里做,也可以运行 `tools\modavd.exe components fetch`、`tools\modavd.exe collect-info`。 + + (ModAVD/ModAVD#45,ModAVDManager#84) +- 记住组件下载源: + - 设置里「组件下载源」和更新源放在一起,选好就保存。按 Windows 用户存在 `%LOCALAPPDATA%\ModAVD\components-settings.json`。 + - 管理器和 `components fetch`(不给 `--mirror`、`--mirror-url` 时)都用它;下载前那一行「下载源:」写明这次的源是参数给的、保存的设置、管理器里选的,还是默认。 + - 命令行 `components source [auto|googledownloads_cn|tencent|google]` 查看、修改。还没存过时,在控制台里运行 `components fetch` 会用编号问一次并记住;`--json`、`--accept-license`、管道或文件输入都不问、不保存。 + + (ModAVD/ModAVD#120,ModAVDManager#84) +- 诊断模式:在实例设置里打开「诊断模式」,或运行 `modavd set <编号> --diagnostics on`。默认关,日志只存在本机。 + - 开着时,这台实例的模拟器日志、logcat 和崩溃转储留近 30 天,开机失败现场留最新 20 个,用这台单独的 4 GiB 上限,不挤普通实例共用的 1 GiB。客体的日志缓冲区加大,客体内存最多多用 48 MiB。收集问题信息时,这台多收一些日志和现场。 + - 卡片副标题标出「诊断模式」。所在盘剩余不到 20 GiB 时,改按普通规则清理,并提示一次。 + - 关闭时立即按普通规则清掉多留的日志(管理器先告诉你要清多少,再让你确认),返回实际清了多少。 + - 这些日志和现场可能带账号信息,发给别人之前请先看一眼。 + + (ModAVD/ModAVD#97、ModAVD/ModAVD#106,ModAVDManager#78) +- 无头运行的实例(命令行或 AUTO-MAS 开的,没有窗口)在卡片副标题上标「无头」,悬停有说明;可以在管理器里关机。(ModAVD/ModAVD#101,ModAVDManager#90) + +## 变更 + +- `stop --all` 碰上正在新建、处在两次开机之间的实例(这时没有模拟器在跑),以前会漏掉它,新建随后接着开机。现在也把它算进去,取消这次新建,结果照旧标 `interrupted_create`。单台 `stop` 的行为不变。(ModAVD/ModAVD#103,ModAVDManager#86) +- 端口段 `portBase`(只有开发、测试用的根目录才会设): + - 只能是 1100–49000 之间 100 的整数倍,而且不能是 5500:5500 段会被别的 adb server 自动扫描到,49100 及以上和 Windows 默认的临时端口重叠。默认的 20000 不变。 + - 已经设成 5500 或 49100–65400 的根目录,照旧能看状态、关机,但不能再新建、开机;先关掉全部实例,再换一段。 + - 收集问题信息时,用默认端口段的根目录不再把别的端口段里同编号的模拟器当成自己的。 + + (ModAVD/ModAVD#98,ModAVDManager#73) +- 问题包的隐私提示第一句改成「问题包只保存在本机,管理器和命令行都不会上传它。」,以前写的是「脚本不会上传」。(ModAVD/ModAVD#45,ModAVDManager#87) +- macOS 平台层:进程、后台启动、文件锁和 TCP 端口,QEMU 归属核验和私有 adb 隔离,宿主资源和 ARM64 开机前检查,Android 15(API 35)ARM64 的实例配置和 Guest ANGLE。这一版还只出 Windows 包,Mac 版没有发布;Windows 上新建照旧是 Android 14(API 34),行为不变。(ModAVD/ModAVD#67、ModAVD/ModAVD#68、ModAVD/ModAVD#112,ModAVDManager#62、ModAVDManager#68、ModAVDManager#69、ModAVDManager#70、ModAVDManager#71) + +## 给调用方(AUTO-MAS) + +- `protocol` 还是 2:只加了命令、字段和错误原因,没有删字段,已有命令、参数和退出码的含义不变。 +- 新命令:`playstore install|uninstall|status|gsfid`、`components source`、`components import-playstore`;`components fetch` 加 `--play-store`;`set` 加 `--diagnostics on|off`。 +- `components fetch` 不给 `--mirror`、`--mirror-url` 时,用用户在管理器或 `components source` 里保存的下载源,没存过才是自动。带 `--json` 或 `--accept-license` 时不问、不保存。 +- 新字段,调用方照旧要容忍不认识的字段: + - `list`、`info` 的实例:`play_store`、`play_store_partial`(bool);`diagnostics`(bool),开着时另有 `diagnostics_since`。MCP 的 `list_instances` 也带诊断字段,MCP 不提供诊断开关。 + - `components status --json` 的 `data.play_store`:商店的五个文件在不在,`source` 是 `download` 还是 `import`。商店不算必需组件,`check` 和 `components status` 的组件结果不受它影响。 + - `components source --json` 的 `data`:`source`、`mirror`、`mirror_urls`、`configured`。 + - `playstore gsfid --json` 的 `data`:`index`、`decimal`、`hex`。 +- `error.details.reason` 的新取值: + - `not_ready`:`playstore_files_missing`(根目录还没有商店的五个文件)、`no_bridge`(实例没有执行桥)、`no_gsf_id`(还没有 GSF ID)。 + - `unsupported`:`unsupported_guest`(arm64 客体装商店)。 + - `components_rejected`(导入商店文件被拒,退出码 9):`unknown_file`、`mismatch`、`incomplete`。 +- 装着商店(或只装了一部分)的实例,`bridge uninstall` 返回 `not_ready`,要先 `playstore uninstall`。 +- `stop --all` 现在也会取消两次开机之间的新建(见上)。 + +## 下载与核对 + +用 Go 1.26.5、`GOTOOLCHAIN=local` 运行仓库里的 `build.ps1`,能编出相同的字节。单独下载的包里还有 Go 的许可原文和文件清单。请用附件 `SHA256SUMS.txt` 核对 zip 和解压出的两个 exe,例如在 PowerShell 里运行 `Get-FileHash .\ModAVDManager-0.5.0-win-x64.zip -Algorithm SHA256`。 + +单独下载的管理器不会自己更新,新版本要手动替换;ModAVD 包里的那份随 ModAVD 整包一起更新。单独使用时请给 `--root` 或设置 `MODAVD_ROOT`,否则会提示找不到 ModAVD 根目录。不要把单独下载的 zip 解压到 ModAVD 根目录,覆盖整包里的文件。 + +## English + +Shipped in ModAVD 0.38.2. Changes since v0.4.1: + +### New + +- Optional Google Play Store: + - Under "补全组件" (download components) there is a new option, "同时补全 Google Play 商店服务" (also get the Google Play Store services, about 1.5 GB, optional), off by default. When ticked, accepting the license also downloads Google's official Play system image, takes out only the five files the store needs into `sdk\playstore\`, and deletes the downloaded zip and the extracted image afterwards. + - If you already have Google's official image zip `x86_64-34_r14.zip` or the five files, import them with "使用我自己的文件…" (use my own files) instead of downloading. Every file's size and SHA-256 is checked; unknown, mismatching or missing files are refused and nothing is changed. Your files are left as they are. + - New instances come without the store. To add it, choose "补全 Google Play 商店…" (add the Google Play Store) in the instance's "更多操作" (more actions) menu: it cold-boots once; a running instance comes back up the way it ran, a stopped one is stopped again. Once installed, the same item becomes "移除 Google Play 商店…" (remove). The instance needs the execution bridge; to uninstall the bridge from an instance with the store, remove the store first. + - On a booted instance with the store, "复制 GSF ID" (copy GSF ID) in the same menu copies the instance's GSF ID, to register at when sign-in says the device is not Play Protect certified. If there is no ID yet, stay online and try again in a minute or two. + - If an install fails halfway (for example out of space), it takes back what it put in; when it cannot take everything back, the instance is marked as partly installed and offers both add and remove. An instance that was stopped is stopped again after a failure. + - Command line: `components fetch --play-store`, `components import-playstore …`, `playstore install | uninstall | status | gsfid`; `components status` lists the store's five files. + - The store is not a required component; without it booting and AUTO-MAS work as before. Games that check Play Integrity will most likely still fail it. + + (ModAVD/ModAVD#125, ModAVDManager#89, ModAVDManager#91) +- Component download and problem reports in the manager: + - When the component item of "电脑检查" (host check) fails, click "补全组件": first pick a download source (automatic, googledownloads_cn, tencent, google or your own addresses), read the full license text fetched from that source, and download only after you accept. Each component shows progress, speed and time left, and can be canceled; a failure says why and can be retried; when done, the check runs again. The "补全组件" on the home banner opens the same dialog. + - What you accept is what is downloaded: if the license fetched from the same source at download time differs from the one you read, it stops and downloads nothing. + - Settings gain "组件与问题反馈" (components and feedback): the component status; "收集问题信息" (collect problem info) shows where the problem package is and can open it in Explorer; "复制配置信息" (copy configuration info) copies it to the clipboard. + - From ModAVD 0.38.2 the package no longer ships "补全组件.bat", "收集问题信息.bat" and "复制配置信息.bat"; use the manager, or run `tools\modavd.exe components fetch` and `tools\modavd.exe collect-info`. + + (ModAVD/ModAVD#45, ModAVDManager#84) +- The component download source is remembered: + - Settings have "组件下载源" (component download source) next to the update source; a choice is saved right away, per Windows user, in `%LOCALAPPDATA%\ModAVD\components-settings.json`. + - The manager and `components fetch` (without `--mirror` or `--mirror-url`) use it; the "下载源:" line before a download says whether this run's source came from the arguments, the saved setting, the manager's choice or the default. + - `components source [auto|googledownloads_cn|tencent|google]` shows or changes it. With nothing saved yet, `components fetch` in a console asks once by number and remembers the answer; with `--json`, `--accept-license`, or input from a pipe or a file it neither asks nor saves. + + (ModAVD/ModAVD#120, ModAVDManager#84) +- Diagnostics mode: turn on "诊断模式" in the instance settings, or run `modavd set --diagnostics on`. Off by default; the logs stay on this computer. + - While it is on, the instance's emulator logs, logcat and crash dumps are kept for about 30 days and its newest 20 boot-failure snapshots are kept, under a 4 GiB limit of its own that does not eat into the 1 GiB shared by normal instances. The guest log buffers are larger (at most 48 MiB more guest memory). Problem-info collection takes more logs and snapshots from it. + - The card subtitle shows "诊断模式". When the drive has less than 20 GiB free, cleanup falls back to the normal rules and says so once. + - Turning it off cleans the extra logs back to the normal rules right away (the manager shows how much will go and asks first) and reports what was removed. + - These logs and snapshots may contain account information; look through them before sending them to anyone. + + (ModAVD/ModAVD#97, ModAVD/ModAVD#106, ModAVDManager#78) +- Instances running headless (started from the command line or by AUTO-MAS, without a window) show "无头" (headless) in the card subtitle, with an explanation on hover; they can be stopped from the manager. (ModAVD/ModAVD#101, ModAVDManager#90) + +### Changes + +- `stop --all` used to miss an instance being created while it was between two boots (no emulator running at that moment), and the creation then went on to boot. Now it includes such an instance and cancels the creation, marking `interrupted_create` as before. A single `stop` is unchanged. (ModAVD/ModAVD#103, ModAVDManager#86) +- Port range `portBase` (set only on development and test roots): + - It must be a multiple of 100 from 1100 to 49000, and not 5500: the 5500 range is scanned automatically by other adb servers, and 49100 and up overlap Windows' default ephemeral ports. The default 20000 is unchanged. + - Roots already set to 5500 or 49100–65400 can still show status and stop, but cannot create or start; stop all their instances, then change the range. + - Problem-info collection on a root with the default range no longer takes emulators with the same index from other ranges for its own. + + (ModAVD/ModAVD#98, ModAVDManager#73) +- The first line of the problem package's privacy note now says the package stays on this computer and neither the manager nor the command line uploads it; it used to say "the script does not upload it". (ModAVD/ModAVD#45, ModAVDManager#87) +- macOS platform layer: processes, background launch, file locks and TCP ports; QEMU ownership checks and private adb isolation; host resources and ARM64 pre-boot checks; Android 15 (API 35) ARM64 instance configuration and Guest ANGLE. This release still ships only the Windows package; there is no Mac release yet. On Windows, new instances are still Android 14 (API 34) and nothing changes. (ModAVD/ModAVD#67, ModAVD/ModAVD#68, ModAVD/ModAVD#112, ModAVDManager#62, ModAVDManager#68, ModAVDManager#69, ModAVDManager#70, ModAVDManager#71) + +### For callers (AUTO-MAS) + +- `protocol` is still 2: only commands, fields and error reasons were added; no field was removed, and the meaning of existing commands, arguments and exit codes is unchanged. +- New commands: `playstore install|uninstall|status|gsfid`, `components source`, `components import-playstore`; `components fetch` gains `--play-store`; `set` gains `--diagnostics on|off`. +- `components fetch` without `--mirror` or `--mirror-url` uses the download source the user saved in the manager or with `components source`, and is automatic only when nothing is saved. With `--json` or `--accept-license` it neither asks nor saves. +- New fields; callers must still tolerate unknown fields: + - Instances in `list` and `info`: `play_store`, `play_store_partial` (bool); `diagnostics` (bool), plus `diagnostics_since` while it is on. MCP's `list_instances` carries the diagnostics fields too; MCP has no diagnostics switch. + - `data.play_store` in `components status --json`: whether the store's five files are there, and `source` (`download` or `import`). The store is not a required component; the component results of `check` and `components status` do not depend on it. + - `data` of `components source --json`: `source`, `mirror`, `mirror_urls`, `configured`. + - `data` of `playstore gsfid --json`: `index`, `decimal`, `hex`. +- New values of `error.details.reason`: + - `not_ready`: `playstore_files_missing` (the root has not got the store's five files), `no_bridge` (the instance has no execution bridge), `no_gsf_id` (no GSF ID yet). + - `unsupported`: `unsupported_guest` (the store on an arm64 guest). + - `components_rejected` (store files refused on import, exit code 9): `unknown_file`, `mismatch`, `incomplete`. +- On an instance with the store (or part of it), `bridge uninstall` returns `not_ready`; run `playstore uninstall` first. +- `stop --all` now also cancels a creation between two boots (see above). + +### 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.5.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.