From 725db9d86b138a9fa0f5f43259c752377b53361e Mon Sep 17 00:00:00 2001 From: Ji Mao Cai <44921326+jinghero@users.noreply.github.com> Date: Thu, 5 Nov 2026 10:39:23 +0800 Subject: [PATCH 1/3] fix: rotate host logcat captures at 256 MiB --- README.en.md | 1 + README.md | 1 + cmd/modavd-gui/main.go | 2 + internal/cli/cli.go | 4 +- internal/emu/logcat.go | 197 +++++++++++++++++ internal/emu/logcat_test.go | 368 +++++++++++++++++++++++++++++++ internal/emu/logs.go | 50 ++++- internal/emu/manager.go | 2 +- internal/emu/portplan_test.go | 29 +++ scripts/test_logcat_rotation.ps1 | 112 ++++++++++ 10 files changed, 752 insertions(+), 14 deletions(-) create mode 100644 internal/emu/logcat.go create mode 100644 internal/emu/logcat_test.go create mode 100644 scripts/test_logcat_rotation.ps1 diff --git a/README.en.md b/README.en.md index db1cec8..d804bf2 100644 --- a/README.en.md +++ b/README.en.md @@ -135,6 +135,7 @@ modavd [--root ] [--json] [--quiet] [--verbose] [args] - When it is not valid, `status`, `list` and `info` still read the instances in the 20000 range, while starting and creating are refused (`invalid_argument`), and `check` shows a 「端口段」 (port range) row saying why. - Shut down every instance of the root folder before you change it. Do not add a root folder that sets `portBase` to AUTO-MAS. - The emulator, the adb server and logcat are all launched through an intermediate process that exits immediately, so they are not in modavd's process tree: if the caller ends modavd (Ctrl+C, the MCP client disconnects), the emulator is not taken down with it. +- A separate host process writes logcat to `logs\logcat-mas_-