Skip to content
Closed
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
7 changes: 5 additions & 2 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ modavd [--root <dir>] [--json] [--quiet] [--verbose] <command> [args]

Apple Silicon macOS supports `report-config` and `collect-info`, including hardware, macOS, HVF, Metal and component versions. Game lists are queried only through an existing private ADB server and running instances with verified ownership; no service is started. The package contains an allowlist of local instance settings and at most eight emulator logs, capped at 2 MiB each and 20 MiB of text in total. Common credential fields, paths and device identifiers are filtered. macOS does not collect screenshots, system dumps or other applications' logs. Review the package before sharing it. Clipboard copying and Finder reveal can be disabled with `--no-clipboard` and `--no-explorer`.

- Write `<i>` as `3` or `mas_3` (0-9, except 5). Memory is written as `6144`, `6144M` or `6G`, with only four tiers: 3 / 4 / 5 / 6 GB. Cores are 2 / 4 / 6, and the frame rate is any whole number from 1 to 60 (default 60).
- Write `<i>` as `3` or `mas_3` (0-9, except 5). Memory is written as `6144`, `6144M` or `6G`, with only five tiers: 3 / 4 / 5 / 6 / 8 GB. Cores are 2 / 4 / 6, and the frame rate is any whole number from 1 to 60 (default 60).
- Root folder: `--root`; if not given, the environment variable `MODAVD_ROOT`; otherwise the folder containing `modavd.exe`, or its parent.
- From 0.3.0 there is no `restart`: `stop`, then `start`. An old call gets a usage error (exit code 2) that says so.

Expand Down Expand Up @@ -202,8 +202,11 @@ On Apple Silicon macOS, downloads and imports use Android 15 Google Play `arm64-
- After the emulator is killed or the computer crashes, the download folder is what it was at its last commit, at most 3 seconds of progress short, and the game carries on. What the game has unpacked, accounts and settings are not on this disk and behave as before.
- A watcher looks every 3 seconds: the disk is mounted once the game is installed, before its first start; a running game is left alone; a download that began in the plain folder finishes there first; uninstalling the game or clearing its app data removes the disk.
- The disk is `/data/local/tmp/modavd-dldisk/<package>/dl.img` in the guest, a sparse file of at most 16 GB; space of deleted packages goes back to the data 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 `com.hypergryph.arknights` and the bilibili `com.hypergryph.arknights.bilibili` (not tested on the latter; the folder is the same).
- The list holds Arknights, official `com.hypergryph.arknights` and bilibili `com.hypergryph.arknights.bilibili` (not tested on the latter; the folder is the same), and Arknights: Endfield `com.hypergryph.endfield` (same downloader, same folder and write pattern).
- Boot with the environment variable `MODAVD_DL_DISK=off` to move unfinished downloads back into the plain folder, delete the disk and start no watcher.
- Honkai: Star Rail (official `com.miHoYo.hkrpg` and bilibili `com.miHoYo.hkrpg.bilibili`, not tested on the latter) gets its display mode set to Vulkan in advance (guest script `modavd-vkmode.sh`, Windows only). At its first start the game picks OpenGL ES on its own and closes on ModAVD about fifteen seconds later; in Vulkan mode (Normal Mode under Settings > Graphics > Display Settings in the game) it runs.
- A watcher looks every 3 seconds: once the game is installed, before its first start, it writes `vulkancaps.bin` and `customvulkancaps.bin` in the game's `Android/data/<package>/files`. A game already stuck in OpenGL ES after such a crash is switched to Vulkan as well, at the next boot or once it has exited.
- A display mode chosen in the game's settings (`customvulkancaps.bin` is there and not empty) is left alone; so is a running game; no folder is made for a game that is not installed.
Two display presets are available: 1080p is 1920×1080 / DPI 280; 720p is 1280×720 / DPI 240. New instances default to 1080p. 720p uses fewer resources. The manager forms, CLI `--resolution 1080|720` and MCP `resolution` share these presets. Existing landscape or portrait 1920×1080 instances stay at 1080p; other configurations, including missing dimensions, stay at 720p. Changing the preset updates width, height and DPI together, preserves orientation, and takes effect at the next cold boot. DPI is not a separate option. No runtime `wm size` or `wm density` is used. Update the resolution in your automation tool as well.

AUTO-MAS currently prefers the packaged CLI, which preserves the selected preset. Old roots without a usable CLI fall back to the Python launch path, which still forces 720p. Update the packaged CLI before using 1080p there. AUTO-MAS creation and display settings still need matching two-preset support; use the ModAVD manager to set the preset meanwhile.
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ modavd [--root <目录>] [--json] [--quiet] [--verbose] <命令> [参数]

Apple Silicon macOS 支持 `report-config` 和 `collect-info`:读取硬件、macOS、HVF、Metal 和组件版本;游戏列表只向归属已确认的运行实例与现有私有 ADB 查询,不启动服务。问题包只收本目录的实例配置白名单和最多 8 份模拟器日志,每份最多 2 MiB、总文本最多 20 MiB,过滤常见凭据字段、路径和设备标识。macOS 不收截图、系统转储或其他应用日志;分享前请检查问题包。默认复制配置到剪贴板、用 Finder 显示问题包,自动化可用 `--no-clipboard` / `--no-explorer`。

- `<i>` 写成 `3` 或 `mas_3`(0–9,5 除外);内存写成 `6144`、`6144M` 或 `6G`,只有 3 / 4 / 5 / 6 GB 四档,核数 2 / 4 / 6,帧率 1–60 的整数(默认 60)。
- `<i>` 写成 `3` 或 `mas_3`(0–9,5 除外);内存写成 `6144`、`6144M` 或 `6G`,只有 3 / 4 / 5 / 6 / 8 GB 五档,核数 2 / 4 / 6,帧率 1–60 的整数(默认 60)。
- 根目录:`--root`,没给就用环境变量 `MODAVD_ROOT`,再没有就用 `modavd.exe` 所在目录或它的上一级。
- 0.3.0 起没有 `restart`:先 `stop` 再 `start`。旧的调用报用法错误(退出码 2),提示改用这两步。

Expand Down Expand Up @@ -208,8 +208,11 @@ Apple Silicon macOS 的下载与导入使用 Android 15 Google Play `arm64-v8a`
- 模拟器被强杀或电脑崩溃以后,下载目录回到最后一次落盘时的样子,最多少 3 秒的进度,游戏接着下。解压出来的资源、账号、设置不在这块盘上,和以前一样。
- 守护每 3 秒看一次:游戏装上以后、第一次启动之前就把盘挂好;游戏开着时不动它;普通目录里有下到一半的,等那一轮下完再挂;卸载游戏或清了它的应用数据,盘跟着删。
- 盘是客体里的 `/data/local/tmp/modavd-dldisk/<包名>/dl.img`,一个最大 16 GB 的稀疏文件,删掉的包占的空间会还给数据盘。下载比解压快,下好的包会先堆在盘里:下整包资源时,数据盘的占用高峰比以前多约 6 GB。数据盘剩余不到 2 GB 时不建盘。
- 名单里是官服 `com.hypergryph.arknights` 和 B 服 `com.hypergryph.arknights.bilibili`(B 服没有实测,目录相同)。
- 名单里是明日方舟官服 `com.hypergryph.arknights`、B 服 `com.hypergryph.arknights.bilibili`(B 服没有实测,目录相同),以及明日方舟:终末地 `com.hypergryph.endfield`(同一套下载器,目录和写法相同)。
- 设环境变量 `MODAVD_DL_DISK=off` 再开机:把盘里还没下完的搬回普通目录,删掉盘,不再起守护。
- 崩坏:星穹铁道(官服 `com.miHoYo.hkrpg`、B 服 `com.miHoYo.hkrpg.bilibili`,B 服没有实测)的显示模式预先设成 Vulkan(客体脚本 `modavd-vkmode.sh`,只在 Windows 上)。游戏第一次启动时自己选 OpenGL ES,在 ModAVD 上十几秒后闪退;在游戏设置里的显示设置(Display Settings)选 Vulkan 模式就正常。
- 守护每 3 秒看一次:游戏装上以后、第一次启动之前,在它的 `Android/data/<包名>/files` 里写好 `vulkancaps.bin`、`customvulkancaps.bin`。已经因为闪退停在 OpenGL ES 的,下次开机或游戏退出后也改成 Vulkan。
- 在游戏设置里选过显示模式的(`customvulkancaps.bin` 已经在、不是空文件)不动;游戏开着时不动;没装的游戏不建任何目录。
分辨率只有两档:1080p 为 1920×1080 / DPI 280,720p 为 1280×720 / DPI 240。新建默认 1080p,720p 更省资源。管理器的新建和实例设置、CLI `--resolution 1080|720`、MCP `resolution` 使用同一套档位。已有实例按宽高识别:横屏或竖屏的 1920×1080 保持 1080p,其余配置及缺字段的旧配置保持 720p。换档联动宽、高、DPI,保留方向,下次冷启动生效;DPI 不单独设置,不使用运行时 `wm size` 或 `wm density`。自动化工具里的分辨率也要跟着改。

AUTO-MAS 当前优先调用包内 CLI,这条启动路径保持所选档位。没有可用 CLI 的旧根目录会回退到固定 720p 的 Python 启动路径,使用 1080p 前须更新包内 CLI。AUTO-MAS 的旧新建和显示配置表单仍需配套支持两档;可先在 ModAVD 管理器里设置。
Expand Down
1 change: 1 addition & 0 deletions changelog.d/218-apk-install.fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
新建的实例用浏览器装安装包不再提示不允许安装未知应用 (ModAVD/ModAVD#218)
1 change: 1 addition & 0 deletions changelog.d/220-boot-once.fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
开机时不再先进桌面再黑屏重来一遍 (ModAVD/ModAVD#220)
1 change: 1 addition & 0 deletions changelog.d/221-taskbar-1080p.fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1080p 实例的桌面底部不再多出一条任务栏 (ModAVD/ModAVD#221)
1 change: 1 addition & 0 deletions changelog.d/222-starrail-vulkan.fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
新装的崩坏:星穹铁道默认用 Vulkan 显示模式,首次启动不再闪退 (ModAVD/ModAVD#222)
23 changes: 23 additions & 0 deletions changelog.d/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# 更新说明 / Release note lines

用户看得见的改动,在同一个 PR 里往这个文件夹加一个文件,写一行给用户看的话。ModAVD 发版时,工具把这个仓库上一版以后新加的文件汇总进 ModAVD 发版公告的「更新内容」,并在行尾补上这个 PR 的编号。不加文件的 PR 不会出现在公告里。

- **文件名**:`<名字>.<类型>.md`。名字用小写字母、数字、`-`、`_`,起一个不会和别的改动重复的(比如 issue 号加几个词:`210-resize-crash.fix.md`)。
- **类型**:`feat` 新增,`fix` 修复,`change` 变更,`remove` 移除。
- **内容**:只有一行,不超过 60 字,不能有 `--`。写用户会看到的结果,不写原因和实现,比如「调高分辨率后开机不再卡死退出」。
- 想让公告指向 issue 而不是 PR,就自己在行尾写上,issue 都在 ModAVD 仓库,要写全称:`……不再卡死退出 (ModAVD/ModAVD#210)`;这样工具不再补 PR 编号。
- 只和开发、测试、CI、文档有关的 PR 不用加。
- 已经发过版的文件不要改内容、也不要重复用它的名字;以后的改动另起一个文件。

汇总的工具和完整的说明在 ModAVD 仓库:[changelog.d/README.md](https://github.com/ModAVD/ModAVD/blob/main/changelog.d/README.md)、[tools/pubrel/README.md](https://github.com/ModAVD/ModAVD/blob/main/tools/pubrel/README.md)。

---

A change that users can see adds one file here, in the same pull request, with a single line written for users. When ModAVD is released, its tools collect the files this repository gained since the previous release into the ModAVD release notes and append the pull request number. A pull request without a file is not announced.

- **Name**: `<name>.<type>.md`, the name in lowercase letters, digits, `-`, `_`, and unique (for example the issue number and a few words: `210-resize-crash.fix.md`).
- **Type**: `feat` (新增), `fix` (修复), `change` (变更), `remove` (移除).
- **Content**: one line in Chinese, at most 60 characters, without `--`. Say what users will notice, not the cause or the implementation.
- To point at an issue instead of the pull request, end the line with it yourself, in full: `…… (ModAVD/ModAVD#210)`.
- Pull requests that only touch development, tests, CI or documentation need no file.
- Do not edit or reuse a file that has already been released; a later change takes a new file.
1 change: 1 addition & 0 deletions changelog.d/dldisk-endfield.feat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
终末地下载资源也走下载盘,不再被频繁落盘拖慢 (ModAVD/ModAVD#35)
1 change: 1 addition & 0 deletions changelog.d/memory-8g.feat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
实例内存可以选 8 GB (ModAVD/ModAVDManager#181)
Binary file modified cmd/modavd-gui/rsrc_windows_amd64.syso
Binary file not shown.
2 changes: 1 addition & 1 deletion internal/avd/avd.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (

// Instance options (user decisions: memory and cores only in these steps, no silent rounding).
var (
MemoryChoicesMB = []int{3072, 4096, 5120, 6144}
MemoryChoicesMB = []int{3072, 4096, 5120, 6144, 8192}
CPUChoices = []int{2, 4, 6}
ResolutionChoices = []int{1080, 720}
)
Expand Down
12 changes: 9 additions & 3 deletions internal/avd/avd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ func TestPropertiesMatchPython(t *testing.T) {
titles := []string{"", " ", "星铁", "a=b", "mas_x"}
metas := []string{`{"memoryMb": 4096}`, `{"memoryMb": 4096.0}`, `{"memoryMb": "4096"}`, `{"memoryMb": true}`,
`{"memoryMb": 3000}`, `{"memoryMb": null}`, `5`, `{"memoryMb": 5120}`, `{}`, `{"memoryMb": 3072, "x": 1}`,
`{"memoryMb": 6144e0}`, `{"memoryMb": -0}`}
`{"memoryMb": 6144e0}`, `{"memoryMb": -0}`, `{"memoryMb": 8192}`, `{"memoryMb": 7168}`}

setup := map[string]string{}
var instMeta []string
Expand Down Expand Up @@ -760,8 +760,8 @@ func TestValidate(t *testing.T) {
memory, cpu, data *int
msg string
}{
{ip(1000), nil, nil, "ModAVD 的内存只能选 3 GB / 4 GB / 5 GB / 6 GB"},
{ip(0), ip(3), ip(1), "ModAVD 的内存只能选 3 GB / 4 GB / 5 GB / 6 GB"},
{ip(1000), nil, nil, "ModAVD 的内存只能选 3 GB / 4 GB / 5 GB / 6 GB / 8 GB"},
{ip(0), ip(3), ip(1), "ModAVD 的内存只能选 3 GB / 4 GB / 5 GB / 6 GB / 8 GB"},
{nil, ip(3), ip(1), "ModAVD 的 CPU 核数只能选 2 / 4 / 6"},
{nil, nil, ip(15), "数据盘上限只能在 16–512 GB 之间"},
{nil, nil, ip(513), "数据盘上限只能在 16–512 GB 之间"},
Expand All @@ -772,6 +772,12 @@ func TestValidate(t *testing.T) {
t.Errorf("got %q want %q", err.Error(), tc.msg)
}
}
if m, _, _, err := ValidateOptions(ip(8192), nil, nil); err != nil || m != 8192 {
t.Errorf("8 GB: %d %v", m, err)
}
if _, _, _, err := ValidateOptions(ip(7168), nil, nil); errs.CodeOf(err) != errs.InvalidArgument {
t.Errorf("7 GB: %v", err)
}
if _, _, d, err := ValidateOptions(nil, nil, ip(16)); err != nil || d != 16 {
t.Error("16 GB")
}
Expand Down
2 changes: 1 addition & 1 deletion internal/avd/testdata/instances_ref.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
AVD_DIR = "avd"
METADATA_FILE = "mas-avd.json"
SYSTEM_IMAGE_SYSDIR = "system-images\\android-34\\google_apis\\x86_64\\"
MEMORY_CHOICES_MB = (3072, 4096, 5120, 6144)
MEMORY_CHOICES_MB = (3072, 4096, 5120, 6144, 8192) # 8192: added in ModAVDManager, not in AUTO-MAS
CPU_CHOICES = (2, 4, 6)
DEFAULT_MEMORY_MB = 6144
DEFAULT_CPU = 6
Expand Down
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.12.0"
var Version = "0.41.1"

// 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
2 changes: 1 addition & 1 deletion internal/cli/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func dataGBOpt(inv *invocation) (gb *int, auto bool, err error) {
var (
optIndex = flagSpec{"index", kindString, "N", "实例编号(不给就取最小的空闲编号,端口也要空着)"}
optTitle = flagSpec{"title", kindString, "T", "显示名称"}
optMemory = flagSpec{"memory", kindString, "M", "内存:3072 / 4096 / 5120 / 6144 MB,也可写 6G"}
optMemory = flagSpec{"memory", kindString, "M", "内存:3072 / 4096 / 5120 / 6144 / 8192 MB,也可写 6G"}
optCPU = flagSpec{"cpu", kindInt, "N", "核数:2 / 4 / 6"}
optDataGB = flagSpec{"data-gb", kindString, "auto|N", "数据盘:auto 自动扩盘(默认),或指定大小 16–512 GB"}
optResolution = flagSpec{"resolution", kindInt, "", "分辨率:1080 / 720,DPI 随档位切换;新建默认 1080"}
Expand Down
Loading
Loading