diff --git a/docs/components/manager.md b/docs/components/manager.md index cc5dd5b..2f31122 100644 --- a/docs/components/manager.md +++ b/docs/components/manager.md @@ -14,9 +14,31 @@ ModAVD 0.36.0 起包里带两个管理程序,源码在 [ModAVDManager](https:/ 双击包根的 `ModAVD.exe`:起一个只听 127.0.0.1 的本地服务,再用 Edge 的应用模式开一个窗口(Windows 10 / 11 自带 Edge);找不到 Edge 时用默认浏览器。页面内嵌在程序里,不联网。 - 功能:实例卡片(在线时有画面缩略图)、开关机(带进度)、新建、设置、删除、电脑检查、[组件与问题反馈](#组件与问题反馈)(管理器 0.3.0 起)、活动面板、画面查看(点击即点按,返回 / 主页 / 最近任务)、日志、安装 APK、打开目录;浅色 / 深色 / 跟随系统。管理器 0.4.0 起还有[按应用走代理](./app-proxy)。 -- 管理器开机一律带窗口;无头开机用命令行或 MCP。无头运行的实例也能在这里关机。 +- 管理器开机一律带窗口。无头只从命令行开(`start ` 默认无头,MCP 的 `start_instance` 也是),给 AUTO-MAS 这类自动化用;管理器里不提供无头开机。无头运行的实例在卡片上标「无头」,也能在这里关机。 - 一个根目录只开一个服务,再双击只是把窗口重新打开;日志在 `<根>\logs\modavd-ui.log`。 -- 关掉窗口后,等正在跑的任务做完再退出。 +- 关掉窗口后,等正在跑的任务做完再退出。管理器 0.8.0 起的 Windows 版改成留在托盘,见下。 + +### 老板键和托盘 + +管理器 0.8.0 起,只有 Windows。 + +- **老板键**:每台带窗口运行的实例一个全局快捷键,按一下藏起这台的模拟器窗口,再按一下叫回来。 + - 藏着的时候照旧渲染、照旧能截图,自动化不受影响。任务栏上没有它的按钮。叫回来以后,位置、大小和藏之前一样。 + - 无头的实例本来就没有窗口,老板键管不到它。 +- **默认键**:编号 0–9 是 Ctrl+Alt+Shift+编号,用主键盘那排数字,比如 `mas_1` 是 Ctrl+Alt+Shift+1;编号超过 9 的默认没有。 +- **在哪改**:在实例的「设置」里改,和诊断模式在一处。 + - 点一下输入框,按想用的组合。至少带 Ctrl、Alt、Shift 中的一个,不收 Win 的组合。 + - 可以清空,这台就没有老板键了。 + - 改了马上生效,不用重开实例。 + - 命令行是 `set --boss-key <组合>`(`none` 是不要),`info` 里能看到。 + - 存在 `mas-avd.json` 这台实例底下的 `bossKey`,没写就用默认值。 +- **几台用同一个键**:不算冲突。按下时,这几台里只要有一台的窗口显示着,就全部藏起来;全都藏着,就全部显示。看的是窗口现在显不显示,所以 AUTO-MAS 或 `window hide` 藏起来的窗口,按老板键也能叫回来。 +- **键被别的程序占了**:设置页那一项旁边标一个警告图标,悬停会提示换一个键,不弹窗。同一台电脑上同时开着两个根目录的管理器时,默认键会撞上,后开的那边会标出来。 +- **托盘**: + - 管理器在托盘里放一个图标。关掉管理器窗口以后,管理器留在托盘,老板键照常能用。 + - 左键点图标,把藏着的窗口都叫回来。 + - 右键菜单有「打开管理器」「退出」。退出前先把藏着的窗口都显示出来,有任务在跑就等它做完。 + - 老板键由管理器注册,所以只用 AUTO-MAS、从来不开管理器的,没有老板键。开一次管理器,让它留在托盘就有了。 ## 组件与问题反馈 @@ -46,7 +68,7 @@ modavd [--root <目录>] [--json] [--quiet] [--verbose] <命令> [参数] | `list` | 全部实例和状态 | | `info ` / `status ` | 一台实例的详细信息 / 状态 | | `create [--index N] [--title T] [--memory 6G] [--cpu N] [--data-gb N] [--fps 30\|60] [--resolution 1080\|720] [--no-bridge]` | 新建。默认带 arm64 执行桥,第一次开机时装上 | -| `set [--title T] [--memory M] [--cpu N] [--fps F] [--resolution 1080\|720] [--data-gb N]` | 修改,下次开机生效。`--data-gb` 只能改大,游戏数据不动 | +| `set [--title T] [--memory M] [--cpu N] [--fps F] [--resolution 1080\|720] [--data-gb N] [--boss-key 组合\|none]` | 修改,下次开机生效。`--data-gb` 只能改大,游戏数据不动。`--boss-key` 是[老板键](#老板键和托盘),马上生效 | | `delete --yes` | 删除已关机的实例,连同游戏数据 | | `start [--window \| --headless] [--timeout 300] [--no-bridge]` | 开机,默认无头;`--window` 带窗口,`--headless` 明确要求无头。等开完并做完开机后的设置 | | `stop [--force]`、`stop --all` | 关机:先让安卓正常关机,不成再 sync + kill;`--force` 是 sync + 强杀 | @@ -56,7 +78,7 @@ modavd [--root <目录>] [--json] [--quiet] [--verbose] <命令> [参数] | `components [status]`、`components source [auto\|googledownloads_cn\|tencent\|google]`、`components fetch [--accept-license] [--keep-downloads]` | 管理器 0.3.0 起:查看组件状态、选下载源、补全 Google 组件。`fetch` 先显示许可协议,输入 `y` 才下载;`--json` 时必须带 `--accept-license`。只有 Windows 有组件清单,其他系统返回 `unsupported` | | `collect-info [--out-dir D] [--no-explorer]` | 管理器 0.3.0 起:收集问题信息,生成 zip,默认放桌面并在资源管理器里选中 | | `report-config [--no-clipboard]` | 管理器 0.3.0 起:复制配置信息,默认复制到剪贴板 | -| `window show\|hide` | 显示 / 隐藏带窗口开机的实例;无头实例没有窗口 | +| `window show\|hide` | 显示 / 隐藏带窗口开机的实例;无头实例没有窗口。管理器里用[老板键](#老板键和托盘) | | `install `、`shell <命令>`、`adb -- <参数>` | 装 APK、客体命令、adb 透传 | | `servers`、`version`、`mcp`、`help [命令]` | | diff --git a/docs/en/components/manager.md b/docs/en/components/manager.md index 9c9aef5..2eff241 100644 --- a/docs/en/components/manager.md +++ b/docs/en/components/manager.md @@ -14,9 +14,31 @@ Instance files and `mas-avd.json` are written the same way as in AUTO-MAS, so in Double-click `ModAVD.exe` in the package root. It starts a local server that listens only on 127.0.0.1, then opens a window in Edge app mode (Edge comes with Windows 10 / 11); if Edge is not found, it uses the default browser. The page is embedded in the program and does not use the network. - Features: instance cards (with a screen thumbnail when the instance is online), start and stop (with progress), create, settings, delete, PC check, [components and feedback](#components-and-feedback) (since manager 0.3.0), activity panel, screen view (a click is a tap; Back / Home / Recents), logs, install APK, open folder; light / dark / follow system. Since manager 0.4.0 there is also the [per-app proxy](./app-proxy). -- The manager always starts instances with a window; use the CLI or MCP for headless starts. Headless instances can also be shut down here. +- The manager always starts instances with a window. Headless starts are only on the command line (`start ` is headless by default, and so is MCP's `start_instance`), for automation such as AUTO-MAS; the manager has no headless start. A headless instance is marked “无头” (headless) on its card and can also be shut down here. - One server runs per root folder; double-clicking again only reopens the window. The log is at `\logs\modavd-ui.log`. -- After you close the window, it waits for the running tasks to finish before it exits. +- After you close the window, it waits for the running tasks to finish before it exits. Since manager 0.8.0 the Windows manager stays in the tray instead; see below. + +### Boss keys and the tray + +Since manager 0.8.0, Windows only. + +- **Boss key**: each instance running with a window has a global hot key. Press it once to hide this instance's emulator window, and again to bring it back. + - While hidden, the instance keeps rendering and screenshots keep working, so automation is not affected. It has no taskbar button. When it comes back, its position and size are the same as before. + - A headless instance has no window, so its boss key does nothing. +- **Default key**: instances 0–9 use Ctrl+Alt+Shift+number, with the digit row of the main keyboard (for example, `mas_1` is Ctrl+Alt+Shift+1). Instances above 9 have no boss key by default. +- **Where to change it**: in the instance's settings, next to diagnostic mode. + - Click the field and press the combination. It needs at least one of Ctrl, Alt and Shift; combinations with Win are refused. + - It can be cleared, which leaves the instance without a boss key. + - A change applies at once, without restarting the instance. + - On the command line it is `set --boss-key ` (`none` for no key), and `info` shows it. + - It is stored as `bossKey` under the instance in `mas-avd.json`; when it is not written, the default applies. +- **Several instances on one key**: this is not a conflict. A press hides them all if any of them shows its window, and shows them all if all are hidden. It looks at whether the windows show right now, so windows hidden by AUTO-MAS or `window hide` come back too. +- **Key taken by another program**: the settings page shows a warning icon next to it, and hovering says to pick another key; no dialog pops up. With managers of two root folders open on one computer, their default keys collide, and the one opened later shows the warning. +- **Tray**: + - The manager puts an icon in the tray. After you close the manager window, the manager stays in the tray and the boss keys keep working. + - A left click on the icon brings every hidden window back. + - The right-click menu has “打开管理器” (open the manager) and “退出” (exit). Exiting first shows the hidden windows, and waits for running tasks to finish. + - The manager registers the boss keys, so if you only use AUTO-MAS and never open the manager, there are no boss keys. Open the manager once and leave it in the tray to get them. ## Components and feedback @@ -46,7 +68,7 @@ modavd [--root ] [--json] [--quiet] [--verbose] [args] | `list` | All instances and their status | | `info ` / `status ` | Detailed information / status of one instance | | `create [--index N] [--title T] [--memory 6G] [--cpu N] [--data-gb N] [--fps 30\|60] [--resolution 1080\|720] [--no-bridge]` | Create an instance. It includes the arm64 execution bridge by default, installed on the first boot | -| `set [--title T] [--memory M] [--cpu N] [--fps F] [--resolution 1080\|720] [--data-gb N]` | Change settings; they take effect on the next start. `--data-gb` can only grow the disk; game data is untouched | +| `set [--title T] [--memory M] [--cpu N] [--fps F] [--resolution 1080\|720] [--data-gb N] [--boss-key combination\|none]` | Change settings; they take effect on the next start. `--data-gb` can only grow the disk; game data is untouched. `--boss-key` is the [boss key](#boss-keys-and-the-tray) and applies at once | | `delete --yes` | Delete a shut-down instance together with its game data | | `start [--window \| --headless] [--timeout 300] [--no-bridge]` | Start headless by default; `--window` starts with a window and `--headless` explicitly requests headless mode. Wait until boot and post-boot setup are complete | | `stop [--force]`, `stop --all` | Shut down: first ask Android for a clean shutdown; if that fails, sync + kill. `--force` is sync + force-kill | @@ -56,7 +78,7 @@ modavd [--root ] [--json] [--quiet] [--verbose] [args] | `components [status]`, `components source [auto\|googledownloads_cn\|tencent\|google]`, `components fetch [--accept-license] [--keep-downloads]` | Since manager 0.3.0: show component status, choose the download source, fetch the Google components. `fetch` shows the license first and downloads only after you type `y`; with `--json` it requires `--accept-license`. Only Windows has a component list; other systems return `unsupported` | | `collect-info [--out-dir D] [--no-explorer]` | Since manager 0.3.0: collect a problem report as a zip, placed on the desktop and selected in File Explorer by default | | `report-config [--no-clipboard]` | Since manager 0.3.0: copy the configuration info, to the clipboard by default | -| `window show\|hide` | Show or hide the window of an instance started with one; headless instances have no window | +| `window show\|hide` | Show or hide the window of an instance started with one; headless instances have no window. In the manager, use the [boss key](#boss-keys-and-the-tray) | | `install `, `shell `, `adb -- ` | Install an APK, guest command, adb passthrough | | `servers`, `version`, `mcp`, `help [command]` | |