Skip to content

发版:ModAVDManager v0.8.0 (#133)

Latest

Choose a tag to compare

@github-actions github-actions released this 12 Nov 10:31
· 4 commits to main since this release
Immutable release. Only release title and notes can be modified.
44d9be5

ModAVDManager v0.8.0

  • ModAVD.exe:c40e2281764d3d3b0c20803419e9279f6fcf08133aedaf50056a2d247d497c8b
  • tools/modavd.exe:51be2e9a562a88e55a8de4c403bca4b30dab7ab60eaec930be91e62d8429b649

随 ModAVD 0.40.0 进包。下面是相对 v0.7.0 的改动。这一版主要是:实例帧率能在 1–60 之间任选(ModAVD/ModAVD#180);每台实例一个老板键,管理器常驻托盘(ModAVD/ModAVD#101);数据盘默认自动扩盘,一开始就是 256 GB、按实际写入占电脑硬盘(ModAVD/ModAVD#153);明日方舟下资源从约 11 MiB/s 提到约 90 MiB/s(ModAVD/ModAVD#35);另外 modavd update 从 GitHub 更新时只下变了的文件(ModAVD/ModAVD#171)。

新增

  • 实例帧率能在 1–60 之间任选,不再只有 30 / 60 两档:

    • 新建实例和实例设置里的帧率改成数字框加滑块,两边联动;填空、小数或超出范围时在框下提示「要填 1–60 之间的整数」,不提交。
    • 命令行 create --fps、set --fps 收 1–60 的整数,默认照旧 60。下次开机生效,已有实例的 30 / 60 不变。
    • 帧率越低越省资源;游戏自己的帧率上限另算。

    (ModAVD/ModAVD#180,ModAVDManager#128)

  • 老板键(只有 Windows):每台实例一个全局快捷键,按一下藏起这台的模拟器窗口,再按一下叫回来。

    • 在实例「设置」里诊断模式下面改:点一下输入框,按想用的组合,至少带 Ctrl、Alt、Shift 中的一个,不收带 Win 的组合;旁边的 × 是清空(这台不要老板键)。改了马上生效,不用重开实例。
    • 没设过时,编号 0–9 默认是 Ctrl+Alt+Shift+编号(主键盘那排数字),超过 9 的默认没有。已有实例不用另外设置。
    • 几台设成同一个键不算冲突:按下时,这几台里有一台的窗口显示着就全部藏起来,全都藏着就全部显示。看的是窗口现在显不显示,所以 AUTO-MAS、modavd window 藏起来的也能叫回来。
    • 只管带窗口运行的实例,无头的没有窗口,不受影响。藏着的时候照旧渲染、照旧能截图,任务栏上没有它的按钮;叫回来以后位置、大小和藏之前一样。
    • 由管理器注册,所以管理器开着(关了窗口、留在托盘也算)才管用。被别的程序占了时,设置里那一项旁边标一个警告图标,悬停说明「这个键被别的程序占了,换一个」,不弹窗;那个程序放开以后自动注册上。
    • 命令行:modavd set <i> --boss-key <组合>|none,modavd info 里显示。

    (ModAVD/ModAVD#101,ModAVDManager#131)

  • 数据盘分成「自动扩盘」和「指定大小」两种,默认自动扩盘:

    • 自动扩盘:数据盘一开始就是 256 GB。磁盘镜像按实际写入增长,电脑硬盘只为写进去的数据付空间,实例里一直有很多剩余,不用等开关机,也不用管大小。比 64 GB 的盘一次性多占约 1 GB(扩出来的那部分的文件系统结构,扩完后几分钟内在后台写完;实测 64 GB 扩到 256 GB 多约 0.97 GB),之后只按实际写入增长。
    • 新建实例不改数据盘,就是自动扩盘。
    • 升级前建的实例没记过模式,也按自动扩盘处理:下次开机前扩到 256 GB,开机后在线扩文件系统,游戏数据不动。以前用 set --data-gb 改过大小、还不到 256 GB 的也一样;已经比 256 GB 大的保持原大小。0.36 之前按 16 GB 及以下建的盘只能扩到约 30 GB,照旧在日志里报出来。
    • 指定大小:16–512 GB,给多少就是多少,不自动扩,而且只能比现在的大小大(已经扩到 256 GB 的实例,改成指定大小也只能填 256 以上)。从指定大小改回自动扩盘:不到 256 GB 的下次开机前扩到 256 GB,比它大的保持原大小。
    • 管理器的新建和实例设置里二选一,选「指定大小」才出大小输入框;卡片上显示「盘自动扩」或「盘 N GB」,实例信息里显示数据盘在电脑上实际占多少。命令行是 create、set 的 --data-gb auto|N。
    • 提醒:每次开机后读一次数据盘的剩余,不到 5 GB 或不到 10% 时,管理器卡片和 modavd status、info 会提醒,带上改大或改成自动扩盘的命令;自动扩盘到了 256 GB 还快满,建议改成指定大小(最大 512 GB)。自动扩盘的实例,电脑硬盘剩余不到 20 GB 时也提醒:数据盘随写入增长,电脑硬盘满了游戏会写不进去。
    • 由 modavd(管理器、命令行、MCP)开机时扩;扩不成只记日志,不挡开机。

    (ModAVD/ModAVD#153,ModAVDManager#130、ModAVDManager#132)

变更

  • 明日方舟下资源快约 8 倍:

    • 游戏下资源时每写 7 KB 就要求落盘一次,每次都要等,不管网多快都只有约 11 MiB/s(0.39.1 以前约 8 MiB/s)。现在开机后把它的下载目录放到一块单独的「下载盘」上:落盘的要求立即返回,整个目录每 3 秒真正落一次盘。实测新装的游戏第一次下整包资源约 90 MiB/s,开机时间不变。
    • 模拟器被强行结束或电脑崩溃以后,下载目录整个回到最后一次落盘时的样子,最多少 3 秒的进度,游戏接着下。解压出来的资源、账号、设置不在这块盘上,和以前一样。
    • 游戏装上以后、第一次启动之前就挂好盘,新装游戏的第一次下载就在盘上;游戏开着时不动它;原来的目录里有下到一半的,等那一轮下完再挂。卸载游戏或清除它的应用数据,盘跟着删。
    • 下载比解压快,下好的包会先堆在盘里:下整包资源时,数据盘的占用高峰比以前多约 6 GB。数据盘剩余不到 2 GB 时不建盘。
    • 名单里是官服和 B 服(实测的是官服,B 服的下载目录相同)。只在 Windows 上,由 modavd(管理器、命令行、MCP)开机时生效,已经开着的实例要关机再开一次。想退回原来的做法,设环境变量 MODAVD_DL_DISK=off 再开机:盘里没下完的搬回原来的目录,删掉盘。

    (ModAVD/ModAVD#35,ModAVDManager#122)

  • modavd update 从 GitHub 更新时只下变了的文件:

    • 先读新版整包的文件目录,和根目录里的文件逐个比大小和校验值,一样的从本地复制,变了的才下载;拼好以后照整包的做法按清单逐个文件核对,再换上。不用填 Mirror 酱 CDK。实测从 0.39.0 更新到 0.39.1 只下了约 18 MB(整包约 287 MB)。
    • 服务器不支持只取一段、变了的超过整包的 40% 或 3000 个文件、取回的数据或拼好后的核对不对时,改下整包,原因写在结果的提示里。已经有下好或下了一半的整包时,直接用它(接着下)。
    • 管理器「设置」里的「更新」也一样。AUTO-MAS 现在发布的版本还用它自己的更新器,要等它之后改成调 modavd update 的版本才用得上。

    (ModAVD/ModAVD#171,ModAVDManager#129)

  • 关掉管理器窗口后,管理器留在托盘(只有 Windows):

    • 以前关掉窗口,等任务做完管理器就退出;现在留在托盘里,老板键照常能用。左键点托盘图标把藏着的窗口都叫回来;右键菜单有「打开管理器」「退出」。
    • 点「退出」时,有任务先等任务做完。不管怎么退出,退出前都先把藏着的模拟器窗口显示出来。
    • 托盘图标放不成时照旧随窗口退出。
    • 用 modavd update install 或 AUTO-MAS 换包前,要在托盘图标的菜单里退出管理器,只关窗口不够。

    (ModAVD/ModAVD#101,ModAVDManager#131)

  • macOS(Apple Silicon):

    • 管理器能打开了:默认在系统浏览器里开页面,加 --chrome-window 用单独的 Chrome 应用窗口,Chrome 用不了时回到默认浏览器;ModAVD.app 放在包根目录时自己找到根目录。「电脑检查」按选中实例下次开机的内存查。
    • 数据盘整理(disk <i> compact)支持 APFS;平常的日志清理会避开还在写的文件;按应用代理跟着适配,包里没有 ARM64 的客体守护时不能打开。
    • modavd update prepare|install --package ZIP --sha256 HEX 能用本地的完整包离线更新,摘要要从可信的渠道另外拿到;Mac 版还没有发布的更新包。
    • 这一版还只出 Windows 包,Mac 版没有发布,完整打包和上机验收在后面的阶段。Windows 上不受影响。

    (ModAVDManager#93、ModAVDManager#97、ModAVDManager#98、ModAVDManager#120)

修复

  • 复制配置信息(report-config)不再把宿主输入法 org.modavd.ime 和早先实例上留着的旧桌面 Fossify 当成游戏列出来;实例里没装游戏时不再列出输入法。(ModAVD/ModAVD#136,ModAVDManager#124)
  • 根目录的 sdk\platform-tools 或根目录本身是目录联接、符号链接时,管理器认不出自己起的 logcat 采集:开机不打印 logcat 的路径,打开诊断模式误报「已有其它程序采集 logcat」。现在认得出了。(ModAVD/ModAVD#135,ModAVDManager#125)
  • 新建实例在拉起模拟器之前就失败(比如根目录缺 adb)时,报错里的「日志见」会指向这个编号以前留下的旧日志;现在只附这次新建写的日志,没有就不附。(ModAVD/ModAVD#174,ModAVDManager#126)

给调用方(AUTO-MAS)

  • protocol 还是 2:没有删命令、参数和 --json 字段,没有新的错误码和退出码,已有的含义不变;只加了参数和字段(见下)。调用方不用改。

  • 帧率:create --fps、set --fps 收 1–60 的整数,config.fps 也可能是这里面的任何值,不再只有 30 / 60。超出范围照旧是 invalid_argument(退出码 2),消息从「ModAVD 的帧率只能选 30 / 60」改成「帧率只能在 1–60 之间」。MCP create_instance、update_instance 的 fps 从 enum: [30, 60] 改成 minimum: 1、maximum: 60。(ModAVDManager#128)

  • 数据盘的两种模式(ModAVDManager#130、ModAVDManager#132):

    • create 不给 --data-gb 时,数据盘是 256 GB、自动扩盘(以前默认 64 GB)。--data-gb 收 auto 或 16–512 的整数:create --data-gb auto 和不给一样;set --data-gb auto 改成自动扩盘,set --data-gb N 改成指定大小(只能改大)。别的值是 invalid_argument(退出码 2),消息是「--data-gb 只能是 auto 或 16–512 的整数(GB),收到「…」」;以前不是整数时是用法错误,退出码同样是 2。
    • 实例信息的 config 加 data_disk_mode(auto / manual)。set 改数据盘时,applied 里除了 data_partition_gb 还有 data_disk_mode。
    • MCP:create_instance 不给 data_partition_gb 就是自动扩盘;update_instance 加 data_disk_auto(布尔值,true 改成自动扩盘),和 data_partition_gb 同时给是 invalid_argument。管理器接口 PATCH /api/instances/{i} 也加了 data_disk_auto。
    • 模式存在 mas-avd.json 的 instances.<i>.dataDiskMode(auto / manual,没写就是 auto);大小照旧在 config.ini 的 disk.dataPartition.size,格式不变。
    • 没写模式(升级前建的)、还不到 256 GB 的实例,由 modavd 开机时,开机前把 disk.dataPartition.size 改成 256G,config.data_partition_gb 随之变成 256,开机日志里写明。256 在 AUTO-MAS 校验的 16–512 范围内。
  • set 加了立即生效的 --boss-key <组合>|none(MCP 没加):老板键,比如 Ctrl+Alt+Shift+1,none 或空串是不要;存在 instances.<i>.bossKey。写法不对是 invalid_argument,同一条命令里的别的设置也不写;不是 Windows 是 unsupported(退出码 4)。applied 里是 boss_key。(ModAVDManager#131)

  • 新字段:

    • 实例信息(list、info、create、set 的结果,MCP list_instances、get_instance 等)加 boss_key(生效的老板键,没有或不是 Windows 是 "")和 data_space;status 也加了 data_space。
    • data_space 是 {free_bytes, total_bytes, checked_at, low, host_bytes, host_free_bytes, state, message, advice},不问客体。free_bytes、total_bytes 是上次开机后读的 /data 剩余和总量,checked_at 是读的时间;low 是那次读数不到 5 GB 或 10%、而且就是现在这个大小的。host_bytes 是数据盘文件在电脑上实际占的字节(只算写进去的),host_free_bytes 是它所在的盘的剩余,读不到是 -1。state 是 ""、low(数据盘快满)或 host_low(自动扩盘、电脑硬盘剩余不到 20 GB);message、advice 是给人看的一句话和带命令的建议。
    • mas-avd.json 每台实例下多了 bossKey、dataDiskMode、dataSpace。写回 mas-avd.json 时请照旧保留不认识的键。
  • update 的更新源和 CDK 可以每次传(status、check、prepare、install;recover 不收,给了是用法错误,退出码 2):

    • --source github|mirrorchyan:这次用的更新源,盖过「设置」里存的,不保存;别的值是 invalid_argument。
    • --cdk-dpapi <base64>:这次用的 Mirror 酱 CDK,不保存。值是调用方用 Windows DPAPI(CryptProtectData,不带 entropy,当前用户或本机作用域都行)加密 UTF-8 的 CDK 后的 base64;解开后按「设置」里的规则检查。不是 base64、解不开、格式不对是 invalid_argument(退出码 2),错误里不带密文和 CDK;不是 Windows 是 unsupported。空串或只有空白表示这次不用 CDK,「设置」里存了也不用。
    • 结果里的 source、cdk_set 是这次生效的。密文和 CDK 都不进日志、错误、.update\state.json 和结果。

    (ModAVDManager#119)

  • --json 时 update 的进度可机读:每个进度事件是 stderr 上的一行日志,多一个 progress 对象 {"stage","percent","done_bytes","total_bytes"}。

    • stage 是 checking(只有 check 有)、downloading、extracting、verifying、installing。checking、extracting、verifying、installing 开始时各一行,percent 为 -1、字节数为 0。
    • downloading 约 2 秒一行,下完那行一定有。从 GitHub 按区间下载时,先有一行 percent 为 -1(读整包的文件目录),之后的 total_bytes 是要取回的字节数、不是整包;退回整包时,进度从 0 重新开始,total_bytes 换成整包大小。
    • --quiet 时不出。stdout 照旧只有最后一行结果。别的日志行以后也可能多出字段,请容忍不认识的键。

    (ModAVDManager#119、ModAVDManager#129)

  • 按区间更新:.update\state.json 的 staged.mode 记成 range;退回整包时 notices 里有一条「按区间下载没用上:……,改下整包」,mode 是 full。(ModAVDManager#129)

  • 命令行解析收紧:字符串或整数选项分开写值时,下一个参数如果是这个命令自己的选项(比如 --source --cdk-dpapi …),就报「选项 --source 后面缺少值」(用法错误,退出码 2),不再把它当成值。可以给多次的 --reopen-arg 不受影响。命令行里有 --cdk-dpapi 时,用法错误不回显位置参数和它的值。(ModAVDManager#119)

  • update install 被占着时照旧是 busy(退出码 5),消息改成「……请先关掉所有实例、管理器(包括托盘里的,在托盘图标的菜单里退出)和 MCP 客户端再……」。管理器关了窗口还在托盘里跑,仍然算占着根目录。(ModAVDManager#131)

  • 新建在拉起模拟器之前就失败时,creation_log 是空的、消息里不附「日志见」;以前会指向这个编号的旧日志。create --resume 关残留实例失败时照旧附残留那次开机的日志。(ModAVDManager#126)

  • 开机(只在 Windows 上):开机后的设置里多一步下载盘(客体脚本 modavd-dldisk.sh),明日方舟的下载目录上挂一层 overlayfs,镜像在客体的 /data/local/tmp/modavd-dldisk/<包名>/dl.img;开机返回时盘已经挂好。设了 MODAVD_DL_DISK=off 就撤掉。只有 modavd 开机时才有。(ModAVDManager#122)

  • macOS:update prepare|install 加了 --package ZIP --sha256 HEX,只在 macOS 上用,Windows 上不变。(ModAVDManager#98)

下载与核对

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

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

English

Shipped in ModAVD 0.40.0. Changes since v0.7.0. This release mostly brings: any instance frame rate from 1 to 60 (ModAVD/ModAVD#180); a boss key per instance, with the manager staying in the tray (ModAVD/ModAVD#101); a data disk that grows by itself by default, 256 GB from the start and taking space on the computer's disk only for what is written (ModAVD/ModAVD#153); Arknights resource downloads going from about 11 MiB/s to about 90 MiB/s (ModAVD/ModAVD#35); and modavd update fetching only the changed files when updating from GitHub (ModAVD/ModAVD#171).

New

  • The instance frame rate can be any whole number from 1 to 60, instead of only 30 or 60:

    • The frame rate in the create dialog and the instance settings is now a number box with a slider that move together; an empty value, a fraction or a value out of range shows "要填 1–60 之间的整数" (enter a whole number from 1 to 60) under the box and is not submitted.
    • On the command line, create --fps and set --fps take a whole number from 1 to 60; the default is still 60. It takes effect at the next start; existing instances keep their 30 or 60.
    • A lower frame rate uses fewer resources; a game's own frame rate cap still applies.

    (ModAVD/ModAVD#180, ModAVDManager#128)

  • Boss keys (Windows only): each instance has a global hot key; press it once to hide this instance's emulator window, and again to bring it back.

    • Change it in the instance's "设置" (settings), below diagnostic mode: click the field and press the combination. It needs at least one of Ctrl, Alt and Shift; combinations with Win are refused. The × next to it clears it (no boss key for this instance). A change applies at once, without restarting the instance.
    • Never set, instances 0–9 default to Ctrl+Alt+Shift+number (the digit row of the main keyboard); instances above 9 have none. Existing instances need no setup.
    • Several instances on one key is not a conflict: a press hides them all when one of them shows its window, and shows them all when all are hidden. It looks at whether the windows show now, so windows hidden by AUTO-MAS or modavd window come back too.
    • Only instances running with their window are affected; headless ones have no window. Hidden windows keep rendering and can still be captured, they have no taskbar button, and they come back at the same position and size.
    • The manager registers the keys, so they work while the manager runs (left in the tray with its window closed counts). When another program holds a key, the settings show a warning icon next to it, saying on hover that another program holds the key and to pick another one; no dialog pops up. Once that program lets go, the key is registered automatically.
    • Command line: modavd set <i> --boss-key <combination>|none; modavd info shows it.

    (ModAVD/ModAVD#101, ModAVDManager#131)

  • The data disk has two modes, "自动扩盘" (grows by itself) and "指定大小" (a set size); growing by itself is the default:

    • Grows by itself: the data disk is 256 GB from the start. The disk image grows only with what is actually written, so the computer's disk pays only for the data written, the instance always has plenty of room, and there is no waiting for a reboot and no size to manage. Compared with a 64 GB disk it takes about 1 GB more once (the file system structures of the added part, written in the background within a few minutes after growing; in our tests 64 GB to 256 GB added about 0.97 GB), and after that it grows only with what is written.
    • A new instance whose data disk is left as is grows by itself.
    • Instances created before this release have no mode recorded and are treated as growing by themselves: before the next start the data disk grows to 256 GB, and after boot the file system grows online; game data is untouched. This includes disks changed with set --data-gb that are still below 256 GB; disks already larger than 256 GB keep their size. A disk created before 0.36 at 16 GB or smaller can only grow to about 30 GB, which is still reported in the log as before.
    • A set size: 16–512 GB, exactly what you give, never grown automatically, and only larger than the current size (an instance already at 256 GB can only be given 256 or more). Switching from a set size back to growing by itself grows a disk below 256 GB to 256 GB before the next start and leaves a larger one as it is.
    • The manager's create dialog and instance settings offer the choice, with a size box only for "指定大小" (a set size); the card shows "盘自动扩" (disk grows by itself) or "盘 N GB" (disk N GB), and the instance info shows how much the data disk actually takes on the computer. On the command line it is --data-gb auto|N of create and set.
    • Reminders: after every boot the data disk's free space is read once; when less than 5 GB or 10% is free, the manager's card and modavd status and info say so, with the commands to make it larger or switch to growing by itself; a disk that grows by itself and is almost full at 256 GB gets the advice to switch to a set size (up to 512 GB). For an instance whose disk grows by itself, they also warn when the computer's disk has less than 20 GB free: the data disk grows with what is written, and when the computer's disk is full the game cannot write.
    • The disk is grown when modavd (the manager, the command line, MCP) boots the instance; a failure is only logged and never stops the boot.

    (ModAVD/ModAVD#153, ModAVDManager#130, ModAVDManager#132)

Changes

  • Arknights resource downloads are about 8 times as fast:

    • While downloading resources the game asks for each 7 KB written to reach the disk, and each request waits, so downloads ran at about 11 MiB/s however fast the network (about 8 MiB/s before 0.39.1). Now its download folder is put on a separate "download disk" after boot: such requests return at once, and the whole folder really reaches the disk every 3 seconds. In our tests the first full resource download of a newly installed game ran at about 90 MiB/s, and boot time did not change.
    • After the emulator is forcibly killed or the computer crashes, the whole download folder is back at its last write to disk, at most 3 seconds of progress short, and the game carries on downloading. What the game has unpacked, accounts and settings are not on this disk and behave as before.
    • The disk is mounted once the game is installed, before its first start, so a newly installed game's first download is already on it; a running game is left alone; a download half done in the old folder finishes there first. Uninstalling the game or clearing its app data removes the disk.
    • Downloading is faster than unpacking, so finished packages queue up on the disk: during a full resource download the data disk's peak use is about 6 GB higher than before. No disk is made when the data disk has less than 2 GB free.
    • The list holds the official and the bilibili server (tested on the official one; the bilibili one uses the same download folder). Windows only; it applies to boots by modavd (the manager, the command line, MCP), and an instance that is already running needs to be stopped and started again. To go back to the old way, set the environment variable MODAVD_DL_DISK=off and boot: unfinished downloads are moved back into the old folder and the disk is deleted.

    (ModAVD/ModAVD#35, ModAVDManager#122)

  • modavd update fetches only the changed files when updating from GitHub:

    • It first reads the file list of the new full package and compares size and checksum with the files in the root; unchanged files are copied locally and only changed ones are downloaded. The result is checked file by file against the manifest, as with a full package, before it is swapped in. No MirrorChyan CDK is needed. In our tests updating from 0.39.0 to 0.39.1 downloaded about 18 MB (the full package is about 287 MB).
    • When the server cannot serve parts of the file, more than 40% of the package or 3000 files changed, or the fetched data or the assembled result fails its checks, the full package is downloaded instead, with the reason in the result's notices. A full package that is already downloaded, or partly downloaded, is used as is (and resumed).
    • "更新" (update) in the manager's "设置" (settings) works the same way. The released AUTO-MAS still uses its own updater; updates through AUTO-MAS get this once a later AUTO-MAS release calls modavd update.

    (ModAVD/ModAVD#171, ModAVDManager#129)

  • Closing the manager window leaves the manager in the tray (Windows only):

    • The manager used to exit once its window was closed and its tasks were done; now it stays in the tray and boss keys keep working. A left click on the tray icon brings every hidden window back; the right-click menu has "打开管理器" (open the manager) and "退出" (exit).
    • "退出" (exit) waits for running tasks to finish first. However it exits, the manager shows the hidden emulator windows before it does.
    • When the tray icon cannot be put up, the manager still exits with its window.
    • Before swapping the package with modavd update install or AUTO-MAS, exit the manager from the tray icon's menu; closing the window is not enough.

    (ModAVD/ModAVD#101, ModAVDManager#131)

  • macOS (Apple Silicon):

    • The manager now opens: by default the page opens in the system browser; --chrome-window uses a separate Chrome app window and falls back to the default browser when Chrome is not available; a ModAVD.app placed in the package root finds the root by itself. "电脑检查" (computer check) checks memory for the selected instance's next boot.
    • Compacting the data disk (disk <i> compact) supports APFS; ordinary log cleanup leaves files that are still being written alone; the per-app proxy is adapted and cannot be turned on when the package has no ARM64 guest daemon.
    • modavd update prepare|install --package ZIP --sha256 HEX updates offline from a local full package; the digest must come from a trusted separate channel. There are no published Mac update packages yet.
    • This release still ships only the Windows package; there is no Mac release, and full packaging and testing on a Mac come in later stages. Windows is not affected.

    (ModAVDManager#93, ModAVDManager#97, ModAVDManager#98, ModAVDManager#120)

Fixes

  • Copying the configuration (report-config) no longer lists the host IME org.modavd.ime and the old Fossify launcher left on earlier instances as games; an instance with no game installed no longer shows the IME. (ModAVD/ModAVD#136, ModAVDManager#124)
  • When the root's sdk\platform-tools, or the root itself, was a directory junction or a symbolic link, the manager did not recognise the logcat capture it had started itself: a boot did not print the logcat path, and turning diagnostic mode on wrongly reported that another program was capturing logcat. It recognises it now. (ModAVD/ModAVD#135, ModAVDManager#125)
  • When creating an instance failed before the emulator was launched (for example adb missing from the root), the error's log pointer named an old log left by this index earlier; now only a log written by this creation is attached, and none when there is none. (ModAVD/ModAVD#174, ModAVDManager#126)

For callers (AUTO-MAS)

  • protocol is still 2: no command, argument or --json field was removed, there are no new error codes or exit codes, and existing ones keep their meaning; only arguments and fields were added (see below). Callers need no changes.

  • Frame rate: create --fps and set --fps take a whole number from 1 to 60, and config.fps can be any value in that range, no longer only 30 or 60. A value out of range is still invalid_argument (exit code 2); the message changed from "ModAVD 的帧率只能选 30 / 60" to "帧率只能在 1–60 之间" (the frame rate must be between 1 and 60). In MCP create_instance and update_instance, fps changed from enum: [30, 60] to minimum: 1, maximum: 60. (ModAVDManager#128)

  • The data disk's two modes (ModAVDManager#130, ModAVDManager#132):

    • create without --data-gb makes a 256 GB data disk that grows by itself (the default used to be 64 GB). --data-gb takes auto or a whole number from 16 to 512: create --data-gb auto is the same as leaving it out; set --data-gb auto switches to growing by itself, and set --data-gb N switches to a set size (only larger). Any other value is invalid_argument (exit code 2) with the message "--data-gb 只能是 auto 或 16–512 的整数(GB),收到「…」" (--data-gb must be auto or a whole number from 16 to 512 (GB), got "…"); a non-integer used to be a usage error, also exit code 2.
    • The instance info's config adds data_disk_mode (auto / manual). When set changes the data disk, applied has data_disk_mode besides data_partition_gb.
    • MCP: create_instance without data_partition_gb makes a data disk that grows by itself; update_instance adds data_disk_auto (boolean, true switches to growing by itself), and giving it together with data_partition_gb is invalid_argument. The manager API PATCH /api/instances/{i} adds data_disk_auto too.
    • The mode is stored as instances.<i>.dataDiskMode in mas-avd.json (auto / manual, absent means auto); the size stays in disk.dataPartition.size in config.ini, in the same format.
    • For an instance with no mode recorded (created before this release) and below 256 GB, a boot by modavd sets disk.dataPartition.size to 256G before the launch, so config.data_partition_gb becomes 256; the boot log says so. 256 is within the 16–512 range AUTO-MAS checks.
  • set has a new option that applies at once, --boss-key <combination>|none (not added to MCP): the boss key, for example Ctrl+Alt+Shift+1; none or an empty string means none; stored as instances.<i>.bossKey. A bad combination is invalid_argument and the other settings in the same command are not written either; on other platforms than Windows it is unsupported (exit code 4). It shows as boss_key in applied. (ModAVDManager#131)

  • New fields:

    • Instance info (the results of list, info, create and set, MCP list_instances, get_instance and so on) adds boss_key (the boss key in effect; "" for none or off Windows) and data_space; status adds data_space too.
    • data_space is {free_bytes, total_bytes, checked_at, low, host_bytes, host_free_bytes, state, message, advice}, without asking the guest. free_bytes and total_bytes are /data's free space and total read after the last boot, and checked_at is when; low means that reading was under 5 GB or 10% and belongs to the current size. host_bytes is what the data disk files actually take on the computer (only what was written), and host_free_bytes is the free space of the disk they are on; -1 when they cannot be read. state is "", low (the data disk is almost full) or host_low (the disk grows by itself and the computer's disk has less than 20 GB free); message and advice are a sentence for people and advice with the commands.
    • Each instance in mas-avd.json gains bossKey, dataDiskMode and dataSpace. Keep keys you do not know when writing mas-avd.json back, as before.
  • update takes the update source and CDK per call (status, check, prepare, install; recover does not take them, and giving them is a usage error, exit code 2):

    • --source github|mirrorchyan: the update source for this run, overriding the one saved in "设置" (settings), never saved; any other value is invalid_argument.
    • --cdk-dpapi <base64>: the MirrorChyan CDK for this run, never saved. The value is the base64 of the UTF-8 CDK encrypted by the caller with Windows DPAPI (CryptProtectData, without entropy, current-user or machine scope); once decrypted it is checked with the rules of "设置" (settings). Not base64, not decryptable or not a valid CDK is invalid_argument (exit code 2), and the error quotes neither the blob nor the CDK; on other platforms than Windows it is unsupported. An empty value or only blanks means no CDK for this run, even when one is saved.
    • source and cdk_set in the result report what was in effect. Neither the blob nor the CDK goes into logs, errors, .update\state.json or the result.

    (ModAVDManager#119)

  • With --json, update progress is machine-readable: every progress event is a stderr log line with one more key, a progress object {"stage","percent","done_bytes","total_bytes"}.

    • stage is checking (only check has it), downloading, extracting, verifying or installing. checking, extracting, verifying and installing each get one line when they begin, with percent -1 and bytes 0.
    • downloading gets about one line every 2 seconds, and the line of the finished download is always there. When downloading by range from GitHub, there is first a line with percent -1 (reading the full package's file list), and after that total_bytes is the number of bytes to fetch, not the full package; when it falls back to the full package, progress starts again from 0 and total_bytes becomes the full package size.
    • Not printed with --quiet. stdout still carries only the final result line. Other log lines may gain keys later too; tolerate keys you do not know.

    (ModAVDManager#119, ModAVDManager#129)

  • Range updates: staged.mode in .update\state.json is range; when it falls back to the full package, notices has a line "按区间下载没用上:……,改下整包" (the range download was not used: …, downloading the full package), and mode is full. (ModAVDManager#129)

  • Stricter command-line parsing: when a string or integer option has its value as the next argument and that argument is one of the command's own options (such as --source --cdk-dpapi …), it is now "选项 --source 后面缺少值" (option --source is missing its value; a usage error, exit code 2) instead of taking that option as the value. The repeatable --reopen-arg is not affected. When the command line has --cdk-dpapi, usage errors do not echo positional arguments or its value. (ModAVDManager#119)

  • update install blocked by programs in use is still busy (exit code 5); the message now says to close all instances, the manager (including one in the tray, exited from the tray icon's menu) and MCP clients. A manager whose window is closed but still runs in the tray counts as holding the root. (ModAVDManager#131)

  • When creation fails before the emulator is launched, creation_log is empty and the message has no log pointer; it used to point to an old log of the index. When create --resume fails to stop the leftover instance, the log of that leftover boot is still attached. (ModAVDManager#126)

  • Boot (Windows only): the after-boot setup has one more step, the download disk (guest script modavd-dldisk.sh): an overlayfs is mounted on Arknights' download folder, with its image at /data/local/tmp/modavd-dldisk/<package>/dl.img in the guest; the disk is mounted by the time the boot returns. With MODAVD_DL_DISK=off it is removed. Only boots by modavd get it. (ModAVDManager#122)

  • macOS: update prepare|install gained --package ZIP --sha256 HEX, used only on macOS; nothing changes on Windows. (ModAVDManager#98)

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.8.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.