From 35a92857d1d79dedf26ea65da997c717a6c04070 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 28 May 2026 06:40:01 +0000 Subject: [PATCH 1/8] chore: Auto Update Game Resources - 2026-05-28 https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/26559057935 [skip changelog] --- resource/tasks/tasks.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/resource/tasks/tasks.json b/resource/tasks/tasks.json index aad315ef71..a395479b3a 100644 --- a/resource/tasks/tasks.json +++ b/resource/tasks/tasks.json @@ -2192,7 +2192,13 @@ }, "MallBegin": { "algorithm": "JustReturn", - "next": ["Mall", "Mall#next", "MallBegin@QuickSwitch@ToMall#next", "Mall@ReturnButtons#next", "Mall@CloseAnnos#next"] + "next": [ + "Mall", + "Mall#next", + "MallBegin@QuickSwitch@ToMall#next", + "Mall@ReturnButtons#next", + "Mall@CloseAnnos#next" + ] }, "Mall": { "action": "DoNothing", From 6ed22751973ebd8ae163ff6f31833155912f05ac Mon Sep 17 00:00:00 2001 From: uye <99072975+ABA2396@users.noreply.github.com> Date: Thu, 28 May 2026 23:03:13 +0800 Subject: [PATCH 2/8] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=BF=AB=E6=8D=B7?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E5=9C=A8=E9=81=87=E5=88=B0=20LoadingText=20?= =?UTF-8?q?=E6=97=B6=E6=97=A0=E6=B3=95=E8=B7=B3=E5=87=BA=E5=BE=AA=E7=8E=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix #16910 --- resource/tasks/UiTheme/QuickSwitch.json | 32 ++++++++++++------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/resource/tasks/UiTheme/QuickSwitch.json b/resource/tasks/UiTheme/QuickSwitch.json index c042b69646..d2833e6331 100644 --- a/resource/tasks/UiTheme/QuickSwitch.json +++ b/resource/tasks/UiTheme/QuickSwitch.json @@ -16,13 +16,13 @@ "Doc": "小房子下拉框中的首页图标", "template": "QuickSwitch/Home.png", "roi": [11, 206, 164, 149], - "next": ["#self", "QuickSwitch@ToHome@Entry@LoadingText", "QuickSwitch@ToHome@Entry@LoadingIcon", "#back"] + "next": ["QuickSwitch@ToHome@Entry", "LoadingText", "LoadingIcon", "#back"] }, "QuickSwitch@ToHome@Open": { "baseTask": "QuickSwitch@Base", "template": "QuickSwitch/Menu.png", "roi": [197, 0, 144, 134], - "next": ["QuickSwitch@ToHome@Entry", "#self"] + "next": ["QuickSwitch@ToHome@Entry", "QuickSwitch@ToHome@Open"] }, "QuickSwitch@ToTerminal": { "Doc": "优先使用小房子快捷切到终端,成功后通过 #back 回到调用方", @@ -35,9 +35,9 @@ "template": "QuickSwitch/Terminal.png", "roi": [450, 0, 159, 148], "next": [ - "#self", - "QuickSwitch@ToTerminal@Entry@LoadingText", - "QuickSwitch@ToTerminal@Entry@LoadingIcon", + "QuickSwitch@ToTerminal@Entry", + "LoadingText", + "LoadingIcon", "#back" ] }, @@ -45,7 +45,7 @@ "baseTask": "QuickSwitch@Base", "template": "QuickSwitch/Menu.png", "roi": [197, 0, 144, 134], - "next": ["QuickSwitch@ToTerminal@Entry", "#self"] + "next": ["QuickSwitch@ToTerminal@Entry", "QuickSwitch@ToTerminal@Open"] }, "QuickSwitch@ToOperBox": { "Doc": "优先使用小房子快捷切到干员页面,成功后通过 #back 回到调用方", @@ -57,13 +57,13 @@ "Doc": "小房子下拉框中的干员图标", "template": "QuickSwitch/OperBox.png", "roi": [226, 204, 163, 154], - "next": ["#self", "QuickSwitch@ToOperBox@Entry@LoadingText", "QuickSwitch@ToOperBox@Entry@LoadingIcon", "#back"] + "next": ["QuickSwitch@ToOperBox@Entry", "LoadingText", "LoadingIcon", "#back"] }, "QuickSwitch@ToOperBox@Open": { "baseTask": "QuickSwitch@Base", "template": "QuickSwitch/Menu.png", "roi": [197, 0, 144, 134], - "next": ["QuickSwitch@ToOperBox@Entry", "#self"] + "next": ["QuickSwitch@ToOperBox@Entry", "QuickSwitch@ToOperBox@Open"] }, "QuickSwitch@ToInfrast": { "Doc": "优先使用小房子快捷切到基建页面,成功后通过 #back 回到调用方", @@ -75,13 +75,13 @@ "Doc": "小房子下拉框中的基建图标", "template": "QuickSwitch/Infrast.png", "roi": [610, 0, 150, 147], - "next": ["#self", "QuickSwitch@ToInfrast@Entry@LoadingText", "QuickSwitch@ToInfrast@Entry@LoadingIcon", "#back"] + "next": ["QuickSwitch@ToInfrast@Entry", "LoadingText", "LoadingIcon", "#back"] }, "QuickSwitch@ToInfrast@Open": { "baseTask": "QuickSwitch@Base", "template": "QuickSwitch/Menu.png", "roi": [197, 0, 144, 134], - "next": ["QuickSwitch@ToInfrast@Entry", "#self"] + "next": ["QuickSwitch@ToInfrast@Entry", "QuickSwitch@ToInfrast@Open"] }, "QuickSwitch@ToRecruit": { "Doc": "优先使用小房子快捷切到公开招募页面,成功后通过 #back 回到调用方", @@ -93,13 +93,13 @@ "Doc": "小房子下拉框中的公开招募图标", "template": "QuickSwitch/Recruit.png", "roi": [879, 207, 152, 152], - "next": ["#self", "QuickSwitch@ToRecruit@Entry@LoadingText", "QuickSwitch@ToRecruit@Entry@LoadingIcon", "#back"] + "next": ["QuickSwitch@ToRecruit@Entry", "LoadingText", "LoadingIcon", "#back"] }, "QuickSwitch@ToRecruit@Open": { "baseTask": "QuickSwitch@Base", "template": "QuickSwitch/Menu.png", "roi": [197, 0, 144, 134], - "next": ["QuickSwitch@ToRecruit@Entry", "#self"] + "next": ["QuickSwitch@ToRecruit@Entry", "QuickSwitch@ToRecruit@Open"] }, "QuickSwitch@ToGacha": { "Doc": "优先使用小房子快捷切到干员寻访页面,成功后通过 #back 回到调用方", @@ -111,13 +111,13 @@ "Doc": "小房子下拉框中的干员寻访图标", "template": "QuickSwitch/Gacha.png", "roi": [1003, 208, 155, 149], - "next": ["#self", "QuickSwitch@ToGacha@Entry@LoadingText", "QuickSwitch@ToGacha@Entry@LoadingIcon", "#back"] + "next": ["QuickSwitch@ToGacha@Entry", "LoadingText", "LoadingIcon", "#back"] }, "QuickSwitch@ToGacha@Open": { "baseTask": "QuickSwitch@Base", "template": "QuickSwitch/Menu.png", "roi": [197, 0, 144, 134], - "next": ["QuickSwitch@ToGacha@Entry", "#self"] + "next": ["QuickSwitch@ToGacha@Entry", "QuickSwitch@ToGacha@Open"] }, "QuickSwitch@ToMall": { "Doc": "优先使用小房子快捷切到采购中心页面,成功后通过 #back 回到调用方", @@ -129,12 +129,12 @@ "Doc": "小房子下拉框中的采购中心图标", "template": "QuickSwitch/Mall.png", "roi": [1117, 207, 163, 150], - "next": ["#self", "QuickSwitch@ToMall@Entry@LoadingText", "QuickSwitch@ToMall@Entry@LoadingIcon", "#back"] + "next": ["QuickSwitch@ToMall@Entry", "LoadingText", "LoadingIcon", "#back"] }, "QuickSwitch@ToMall@Open": { "baseTask": "QuickSwitch@Base", "template": "QuickSwitch/Menu.png", "roi": [197, 0, 144, 134], - "next": ["QuickSwitch@ToMall@Entry", "#self"] + "next": ["QuickSwitch@ToMall@Entry", "QuickSwitch@ToMall@Open"] } } From e8a6d8b0635b548a9e27829f4268c74abb46de80 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 28 May 2026 15:22:16 +0000 Subject: [PATCH 3/8] chore: Auto Update Game Resources - 2026-05-28 https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/26584047595 [skip changelog] --- resource/tasks/UiTheme/QuickSwitch.json | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/resource/tasks/UiTheme/QuickSwitch.json b/resource/tasks/UiTheme/QuickSwitch.json index d2833e6331..ed92d1bcfa 100644 --- a/resource/tasks/UiTheme/QuickSwitch.json +++ b/resource/tasks/UiTheme/QuickSwitch.json @@ -34,12 +34,7 @@ "Doc": "小房子下拉框中的终端图标", "template": "QuickSwitch/Terminal.png", "roi": [450, 0, 159, 148], - "next": [ - "QuickSwitch@ToTerminal@Entry", - "LoadingText", - "LoadingIcon", - "#back" - ] + "next": ["QuickSwitch@ToTerminal@Entry", "LoadingText", "LoadingIcon", "#back"] }, "QuickSwitch@ToTerminal@Open": { "baseTask": "QuickSwitch@Base", From 5a4c3fe7b428c410fbfbfdce14923ac711877c0c Mon Sep 17 00:00:00 2001 From: uye <99072975+ABA2396@users.noreply.github.com> Date: Thu, 28 May 2026 23:59:02 +0800 Subject: [PATCH 4/8] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=BC=80=E5=90=AF?= =?UTF-8?q?=E5=9F=BA=E5=BB=BA=E9=80=80=E5=87=BA=E6=8F=90=E9=86=92=E6=97=B6?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E9=80=80=E5=87=BA=E5=9F=BA=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix #16913 --- resource/tasks/UiTheme/QuickSwitch.json | 27 ++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/resource/tasks/UiTheme/QuickSwitch.json b/resource/tasks/UiTheme/QuickSwitch.json index ed92d1bcfa..c4714b7e17 100644 --- a/resource/tasks/UiTheme/QuickSwitch.json +++ b/resource/tasks/UiTheme/QuickSwitch.json @@ -6,6 +6,13 @@ "maskRange": [150, 255], "postDelay": 500 }, + "QuickSwitch@Confirm": { + "Doc": "小房子切换后如果弹出返回确认框,由 QuickSwitch 自己处理并回到调用方", + "template": "PopupConfirm.png", + "action": "ClickSelf", + "roi": [630, 400, 650, 160], + "next": ["QuickSwitch@Confirm", "LoadingText", "LoadingIcon", "#back"] + }, "QuickSwitch@ToHome": { "Doc": "优先使用小房子快捷回到首页,成功后通过 #back 回到调用方", "algorithm": "JustReturn", @@ -16,7 +23,7 @@ "Doc": "小房子下拉框中的首页图标", "template": "QuickSwitch/Home.png", "roi": [11, 206, 164, 149], - "next": ["QuickSwitch@ToHome@Entry", "LoadingText", "LoadingIcon", "#back"] + "next": ["QuickSwitch@ToHome@Entry", "QuickSwitch@Confirm", "LoadingText", "LoadingIcon", "#back"] }, "QuickSwitch@ToHome@Open": { "baseTask": "QuickSwitch@Base", @@ -34,7 +41,13 @@ "Doc": "小房子下拉框中的终端图标", "template": "QuickSwitch/Terminal.png", "roi": [450, 0, 159, 148], - "next": ["QuickSwitch@ToTerminal@Entry", "LoadingText", "LoadingIcon", "#back"] + "next": [ + "QuickSwitch@ToTerminal@Entry", + "QuickSwitch@Confirm", + "LoadingText", + "LoadingIcon", + "#back" + ] }, "QuickSwitch@ToTerminal@Open": { "baseTask": "QuickSwitch@Base", @@ -52,7 +65,7 @@ "Doc": "小房子下拉框中的干员图标", "template": "QuickSwitch/OperBox.png", "roi": [226, 204, 163, 154], - "next": ["QuickSwitch@ToOperBox@Entry", "LoadingText", "LoadingIcon", "#back"] + "next": ["QuickSwitch@ToOperBox@Entry", "QuickSwitch@Confirm", "LoadingText", "LoadingIcon", "#back"] }, "QuickSwitch@ToOperBox@Open": { "baseTask": "QuickSwitch@Base", @@ -70,7 +83,7 @@ "Doc": "小房子下拉框中的基建图标", "template": "QuickSwitch/Infrast.png", "roi": [610, 0, 150, 147], - "next": ["QuickSwitch@ToInfrast@Entry", "LoadingText", "LoadingIcon", "#back"] + "next": ["QuickSwitch@ToInfrast@Entry", "QuickSwitch@Confirm", "LoadingText", "LoadingIcon", "#back"] }, "QuickSwitch@ToInfrast@Open": { "baseTask": "QuickSwitch@Base", @@ -88,7 +101,7 @@ "Doc": "小房子下拉框中的公开招募图标", "template": "QuickSwitch/Recruit.png", "roi": [879, 207, 152, 152], - "next": ["QuickSwitch@ToRecruit@Entry", "LoadingText", "LoadingIcon", "#back"] + "next": ["QuickSwitch@ToRecruit@Entry", "QuickSwitch@Confirm", "LoadingText", "LoadingIcon", "#back"] }, "QuickSwitch@ToRecruit@Open": { "baseTask": "QuickSwitch@Base", @@ -106,7 +119,7 @@ "Doc": "小房子下拉框中的干员寻访图标", "template": "QuickSwitch/Gacha.png", "roi": [1003, 208, 155, 149], - "next": ["QuickSwitch@ToGacha@Entry", "LoadingText", "LoadingIcon", "#back"] + "next": ["QuickSwitch@ToGacha@Entry", "QuickSwitch@Confirm", "LoadingText", "LoadingIcon", "#back"] }, "QuickSwitch@ToGacha@Open": { "baseTask": "QuickSwitch@Base", @@ -124,7 +137,7 @@ "Doc": "小房子下拉框中的采购中心图标", "template": "QuickSwitch/Mall.png", "roi": [1117, 207, 163, 150], - "next": ["QuickSwitch@ToMall@Entry", "LoadingText", "LoadingIcon", "#back"] + "next": ["QuickSwitch@ToMall@Entry", "QuickSwitch@Confirm", "LoadingText", "LoadingIcon", "#back"] }, "QuickSwitch@ToMall@Open": { "baseTask": "QuickSwitch@Base", From b2fa9a1c3e5bfa1aca0eeef7703d15adb5ff7966 Mon Sep 17 00:00:00 2001 From: Loong <40141251+wangl-cc@users.noreply.github.com> Date: Thu, 28 May 2026 17:46:30 +0100 Subject: [PATCH 5/8] =?UTF-8?q?fix:=20=E6=98=BE=E5=BC=8F=E5=A3=B0=E6=98=8E?= =?UTF-8?q?=20adb-lite=20client=20=E5=AF=B9=E5=BA=94=E7=9A=84=20serial=20(?= =?UTF-8?q?#16853)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 概述 - 在 `AdbController::connect` 确定目标 address/serial 后,通过 `PlatformIO::set_adb_serial` 显式声明当前 adb 设备。 - NativeIO 默认忽略该调用;AdbLiteIO 使用该 serial 初始化或切换内部 adb-lite client。 - adb-lite 的 `shell`、`exec-out`、`push` 和交互式 shell 只使用已声明的 client,不再从命令路径里隐式初始化 client。 - AdbLiteIO 内部集中校验 client/serial,并用 mutex 覆盖 `m_adb_client` / `m_adb_serial` 以及对 adb-lite client 的调用,避免 `call_command` 与 `interactive_shell` 并发访问同一状态。 ## 背景 #16850 已修复 `adb connect` 被跳过后 adb-lite client 未初始化的问题,并补充了内部锁保护。这个 PR 是后续调整:把 client 初始化入口从命令执行路径挪到连接生命周期中,让状态声明更明确。 ## 修复方式 连接阶段已经知道当前 address/serial,所以在设置 connect/release 命令后调用: ```cpp m_platform_io->set_adb_serial(address); ``` 对 NativeIO 来说这是 no-op;对 AdbLiteIO 来说,这是初始化或切换 `adb::client` 的入口。 后续 adb-lite 命令路径通过 `lock_adb_client(serial)` 统一校验命令中的 `-s ` 与当前 client 对应的 serial 一致,并在同一把锁仍然持有时调用 adb-lite client。这样避免在 `interactive_shell` 中隐式写入 client/serial 状态,也避免把 `m_adb_client` 暴露给无锁调用。 `set_adb_serial` 也改为先创建临时 `adb::client`,创建成功后再提交 `m_adb_serial` / `m_adb_client` 状态;如果创建失败则记录错误并清空 adb-lite client 状态,避免 serial 已切换但 client 仍指向旧对象的不一致状态。 ## 验证 - `git diff --check --cached` - `cmake --build /private/tmp/maa-build-8599-core --parallel 8` - `cmake --install /private/tmp/maa-build-8599-core --config RelWithDebInfo` - 本机 `maa` CLI + Android 35 arm64 AVD: - `maa run connect-only -p adb-lite-test --no-summary -vvv` - 日志显示 `Loading MaaCore from: /private/tmp/maa-test-data-8599/lib` - 日志显示 `Setting adb lite enabled to true` - 日志到达 `Connected` - 日志到达 `FastestWayToScreencap Encode` - 未出现 `adb client not initialized` - 未出现 `failed to create adb-lite client` - 未出现 `fallback to NativeIO` --- src/MaaCore/Controller/AdbController.cpp | 1 + src/MaaCore/Controller/Platform/AdbLiteIO.cpp | 87 +++++++++++++++---- src/MaaCore/Controller/Platform/AdbLiteIO.h | 7 +- src/MaaCore/Controller/Platform/PlatformIO.h | 3 + 4 files changed, 79 insertions(+), 19 deletions(-) diff --git a/src/MaaCore/Controller/AdbController.cpp b/src/MaaCore/Controller/AdbController.cpp index 6e3745ee14..dba7e5b259 100644 --- a/src/MaaCore/Controller/AdbController.cpp +++ b/src/MaaCore/Controller/AdbController.cpp @@ -915,6 +915,7 @@ bool asst::AdbController::connect(const std::string& adb_path, const std::string // 设置配置 connect、release 命令,即使这里不连接,后续也会需要用到 m_adb.connect = m_conn_ctx.replace_cmd(adb_cfg.connect); m_adb.release = m_conn_ctx.replace_cmd(adb_cfg.release); + m_platform_io->set_adb_serial(address); if (need_connect) { // 如果不包含 `:` 且需要连接,connect 命令也不会成功 if (address.find(':') == std::string::npos) { diff --git a/src/MaaCore/Controller/Platform/AdbLiteIO.cpp b/src/MaaCore/Controller/Platform/AdbLiteIO.cpp index fe7e89ca07..08eaa6959d 100644 --- a/src/MaaCore/Controller/Platform/AdbLiteIO.cpp +++ b/src/MaaCore/Controller/Platform/AdbLiteIO.cpp @@ -62,8 +62,15 @@ std::optional asst::AdbLiteIO::call_command( // adb connect if (boost::regex_match(cmd, match, connect_regex)) { + const std::string serial = match[1].str(); + auto lock = lock_adb_client(serial); + if (!lock) { + ret = std::nullopt; + goto ret_exit; + } + try { - pipe_data = get_adb_client(match[1].str())->connect(); + pipe_data = m_adb_client->connect(); ret = 0; goto ret_exit; } @@ -77,11 +84,18 @@ std::optional asst::AdbLiteIO::call_command( // adb shell if (boost::regex_match(cmd, match, shell_regex)) { + const std::string serial = match[1].str(); std::string command = match[2].str(); remove_quotes(command); + auto lock = lock_adb_client(serial); + if (!lock) { + ret = std::nullopt; + goto ret_exit; + } + try { - pipe_data = get_adb_client(match[1].str())->shell(command); + pipe_data = m_adb_client->shell(command); ret = 0; goto ret_exit; } @@ -94,11 +108,18 @@ std::optional asst::AdbLiteIO::call_command( // adb exec-out if (boost::regex_match(cmd, match, exec_regex)) { + const std::string serial = match[1].str(); std::string command = match[2].str(); remove_quotes(command); + auto lock = lock_adb_client(serial); + if (!lock) { + ret = std::nullopt; + goto ret_exit; + } + try { - pipe_data = get_adb_client(match[1].str())->exec(command); + pipe_data = m_adb_client->exec(command); ret = 0; goto ret_exit; } @@ -111,8 +132,15 @@ std::optional asst::AdbLiteIO::call_command( // adb push if (boost::regex_match(cmd, match, push_regex)) { + const std::string serial = match[1].str(); + auto lock = lock_adb_client(serial); + if (!lock) { + ret = std::nullopt; + goto ret_exit; + } + try { - get_adb_client(match[1].str())->push(match[2].str(), match[3].str(), 0644); + m_adb_client->push(match[2].str(), match[3].str(), 0644); ret = 0; goto ret_exit; } @@ -135,17 +163,35 @@ ret_exit: return ret; } -std::shared_ptr asst::AdbLiteIO::get_adb_client(std::string_view serial) +std::optional> asst::AdbLiteIO::lock_adb_client(std::string_view serial) +{ + std::unique_lock lock(m_adb_client_mutex); + if (!m_adb_client || m_adb_serial != serial) { + Log.error("adb client not initialized for serial:", std::string(serial), "current:", m_adb_serial); + return std::nullopt; + } + + return std::move(lock); +} + +void asst::AdbLiteIO::set_adb_serial(std::string_view serial) { std::lock_guard lock(m_adb_client_mutex); const std::string serial_str(serial); - if (!m_adb_client || m_adb_serial != serial_str) { + if (m_adb_client && m_adb_serial == serial_str) { + return; + } + + try { auto adb_client = adb::client::create(serial_str); m_adb_serial = serial_str; m_adb_client = std::move(adb_client); } - - return m_adb_client; + catch (const std::exception& e) { + Log.error("failed to create adb-lite client for serial:", serial_str, e.what()); + m_adb_serial.clear(); + m_adb_client.reset(); + } } std::shared_ptr asst::AdbLiteIO::interactive_shell(const std::string& cmd) @@ -154,11 +200,17 @@ std::shared_ptr asst::AdbLiteIO::interactive_shell(const std::s boost::smatch match; if (boost::regex_match(cmd, match, shell_regex)) { + const std::string serial = match[1].str(); std::string command = match[2].str(); remove_quotes(command); + auto lock = lock_adb_client(serial); + if (!lock) { + return nullptr; + } + try { - return std::make_shared(get_adb_client(match[1].str())->interactive_shell(command)); + return std::make_shared(m_adb_client->interactive_shell(command)); } catch (const std::exception& e) { Log.error("adb shell failed:", e.what()); @@ -173,18 +225,19 @@ std::shared_ptr asst::AdbLiteIO::interactive_shell(const std::s void asst::AdbLiteIO::release_adb(const std::string& adb_release, int64_t timeout) { - // 只在读取 m_adb_client 时持锁,避免 call_command 内部调用 get_adb_client 时死锁 + bool has_adb_client = false; { std::lock_guard lock(m_adb_client_mutex); - if (!m_adb_client) { - return; - } + has_adb_client = static_cast(m_adb_client); } - std::string pipe_data; - std::string sock_data; - auto start_time = std::chrono::steady_clock::now(); - call_command(adb_release, false, pipe_data, sock_data, timeout, start_time); + if (has_adb_client) { + std::string pipe_data; + std::string sock_data; + auto start_time = std::chrono::steady_clock::now(); + + call_command(adb_release, false, pipe_data, sock_data, timeout, start_time); + } } bool asst::AdbLiteIO::remove_quotes(std::string& data) diff --git a/src/MaaCore/Controller/Platform/AdbLiteIO.h b/src/MaaCore/Controller/Platform/AdbLiteIO.h index 1c6d2c3979..7da811d87a 100644 --- a/src/MaaCore/Controller/Platform/AdbLiteIO.h +++ b/src/MaaCore/Controller/Platform/AdbLiteIO.h @@ -13,6 +13,7 @@ #include "Utils/Logger.hpp" #include +#include #include #include @@ -42,15 +43,17 @@ public: virtual std::shared_ptr interactive_shell(const std::string& cmd) override; + virtual void set_adb_serial(std::string_view serial) override; + virtual void release_adb(const std::string& adb_release, int64_t timeout = 20000) override; private: - std::shared_ptr get_adb_client(std::string_view serial); + std::optional> lock_adb_client(std::string_view serial); static bool remove_quotes(std::string& data); // 保护 m_adb_client / m_adb_serial,防止 call_command 与 interactive_shell 并发访问 - mutable std::mutex m_adb_client_mutex; + std::mutex m_adb_client_mutex; std::shared_ptr m_adb_client = nullptr; std::string m_adb_serial; }; diff --git a/src/MaaCore/Controller/Platform/PlatformIO.h b/src/MaaCore/Controller/Platform/PlatformIO.h index f0f67c4476..112bfd18b5 100644 --- a/src/MaaCore/Controller/Platform/PlatformIO.h +++ b/src/MaaCore/Controller/Platform/PlatformIO.h @@ -4,6 +4,7 @@ #include #include #include +#include namespace asst { @@ -33,6 +34,8 @@ public: virtual std::shared_ptr interactive_shell(const std::string& cmd) = 0; + virtual void set_adb_serial(std::string_view) {} + virtual void release_adb(const std::string& adb_release, int64_t timeout = 20000) = 0; bool m_support_socket = false; From 952c97d9a6add9c5426c3214739933e69e04ca22 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 28 May 2026 17:00:23 +0000 Subject: [PATCH 6/8] chore: Auto Update Game Resources - 2026-05-28 https://github.com/MaaAssistantArknights/MaaAssistantArknights/actions/runs/26589446911 [skip changelog] --- resource/tasks/UiTheme/QuickSwitch.json | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/resource/tasks/UiTheme/QuickSwitch.json b/resource/tasks/UiTheme/QuickSwitch.json index c4714b7e17..bcc4f342c5 100644 --- a/resource/tasks/UiTheme/QuickSwitch.json +++ b/resource/tasks/UiTheme/QuickSwitch.json @@ -41,13 +41,7 @@ "Doc": "小房子下拉框中的终端图标", "template": "QuickSwitch/Terminal.png", "roi": [450, 0, 159, 148], - "next": [ - "QuickSwitch@ToTerminal@Entry", - "QuickSwitch@Confirm", - "LoadingText", - "LoadingIcon", - "#back" - ] + "next": ["QuickSwitch@ToTerminal@Entry", "QuickSwitch@Confirm", "LoadingText", "LoadingIcon", "#back"] }, "QuickSwitch@ToTerminal@Open": { "baseTask": "QuickSwitch@Base", From f4fafde9bf97cccc8481a86cf31215104eed384e Mon Sep 17 00:00:00 2001 From: uye <99072975+ABA2396@users.noreply.github.com> Date: Fri, 29 May 2026 01:33:56 +0800 Subject: [PATCH 7/8] docs: changelog --- CHANGELOG.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bc8e6bb72c..4b19571346 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## v6.11.0-beta.1 +## v6.11.0-beta.2 ### Highlights @@ -36,6 +36,17 @@ The settings page now features a search bar with keyword highlighting and sectio 以下是详细内容:
+v6.11.0-beta.2 + +### 修复 | Fix + +* 修复 adb-lite 在连接阶段未正确绑定当前设备,减少切换设备或并发执行命令时的连接异常 (#16853) @wangl-cc +* 修复快捷切换在开启基建退出提醒时无法退出基建的问题 @ABA2396 +* 修复修复快捷切换在遇到 LoadingText 时无法跳出循环的问题 @ABA2396 + +
+ +
v6.11.0-beta.1 ### 新增 | New From b3eb6cbbc56bda0c83a8e2a155fbdba5b850db1b Mon Sep 17 00:00:00 2001 From: uye <99072975+ABA2396@users.noreply.github.com> Date: Fri, 29 May 2026 01:41:21 +0800 Subject: [PATCH 8/8] =?UTF-8?q?ai:=20changelog=20details=20=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=97=A5=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .claude/skills/changelog/SKILL.md | 41 ++++++++++++++++--------------- CHANGELOG.md | 4 +-- 2 files changed, 23 insertions(+), 22 deletions(-) diff --git a/.claude/skills/changelog/SKILL.md b/.claude/skills/changelog/SKILL.md index 4330a81d72..9d50ef6ce3 100644 --- a/.claude/skills/changelog/SKILL.md +++ b/.claude/skills/changelog/SKILL.md @@ -63,37 +63,38 @@ description: 根据提交记录、PR、diff、现有 CHANGELOG 与历史 tag 内 - patch 版详细区块只能写“自上一发布版本之后新增的变化”,不能把更早正式版已经出现过的条目整段复制到当前 patch 版本下面。 - 例如生成 v6.10.4 时,v6.10.4 区块只能写 v6.10.3 之后的新变化;v6.10.0、v6.10.1、v6.10.2、v6.10.3 的既有内容应保留在历史区块,而不是重新抄进 v6.10.4。 - 若非 patch 版本不同,则直接根据现有内容组织该版本及其历史区块。 -### 5. patch 版本的 Highlights 复用规则 -- patch 版本(例如 v6.10.4 相对于 v6.10.3)如果没有用户可感知的重要新功能或重大变化,必须直接复用其正式版父版本(v6.10.3)的 Highlights 内容,不得自行重写或另起一套。 -- patch 版本复用 Highlights 时,只改顶部版本号标题(例如 `## v6.10.3` → `## v6.10.4`),Highlights 正文原样保留。 -- 当 patch 版本确实包含用户可感知的重要新变化时(例如新增了重大功能、改变了核心交互),可以为 Highlights 追加新段落,但必须保留原有 Highlights 内容,新段落追加在末尾。 +### 5. patch / 测试版的 Highlights 复用规则 -### 6. patch 版本编辑的完整结构 +- patch 版本(例如 v6.10.4 相对于 v6.10.3)和测试版(例如 v6.11.0-beta.2 相对于 v6.11.0-beta.1)如果没有用户可感知的重要新功能或重大变化,必须直接复用其父版本的 Highlights 内容,不得自行重写或另起一套。 +- 复用 Highlights 时,只改顶部版本号标题和发版日期(例如 `## v6.11.0-beta.1 (2026-05-27)` → `## v6.11.0-beta.2 (2026-05-29)`),Highlights 正文原样保留。 +- 当 patch 版本或测试版确实包含用户可感知的重要新变化时(例如新增了重大功能、改变了核心交互),可以为 Highlights 追加新段落,但必须保留原有 Highlights 内容,新段落追加在末尾。 -- 输出文件的结构必须严格遵循以下层次,不得把 patch 版本的详细内容插入到父版本的 Highlights 与详细内容之间: - 1. 顶部:`## vX.Y.Z`(patch 版本标题) +### 6. patch / 测试版编辑的完整结构 + +- 输出文件的结构必须严格遵循以下层次,不得把 patch 版本或测试版的详细内容插入到父版本的 Highlights 与详细内容之间: + 1. 顶部:`## vX.Y.Z (YYYY-MM-DD)`(patch / 测试版标题,含发版日期) 2. `### Highlights`(复用父版本内容,或在有必要时追加新段落) 3. 英文 Highlights 折叠块 4. `----` 5. `以下是详细内容:` - 6. `
vX.Y.Z`(当前版本详细内容,默认展开) - 7. `
vX.Y.Z-1`(上一 patch 版本,默认收起) + 6. `
vX.Y.Z (YYYY-MM-DD)`(当前版本详细内容,默认展开) + 7. `
vX.Y.Z-1 (YYYY-MM-DD)`(上一 patch 版本,默认收起) 8. 更早版本各自独立折叠块... - 9. `
vX.Y.0`(正式版,默认收起) -- 每个版本的详细内容各自放入独立的 `
` 折叠块,当前目标版本使用 `
` 默认展开,其余默认收起。 + 9. `
vX.Y.0 (YYYY-MM-DD)`(正式版,默认收起) +- 每个版本的详细内容各自放入独立的 `
` 折叠块,`` 内格式为 `vX.Y.Z (YYYY-MM-DD)`(版本号 + 发版日期),当前目标版本使用 `
` 默认展开,其余默认收起。 - 折叠块内只保留详细内容(改进、修复等),不重复 Highlights,不写 `## vX.Y.Z` 子标题(`` 已提供版本标识)。 -### 5. Highlights 必须中英双语且先中后英 +### 7. Highlights 必须中英双语且先中后英 -- 输出顶部必须包含当前目标版本,例如 ## vX.Y.Z。 +- 输出顶部必须包含当前目标版本和发版日期,例如 `## vX.Y.Z (2026-05-29)`。 - 必须包含 ### Highlights。 - 中文 Highlights 直接展示,不折叠。 - 英文 Highlights 放入折叠块:`
English` ... `
`。 - 中文与英文都应按主题分段,标题简洁明确,正文面向最终用户,不是 commit 列表翻译。 - Highlights 只总结本次版本中最值得强调的变化,不要把所有条目机械搬进去。 -### 6. 必须过滤的噪音项 +### 8. 必须过滤的噪音项 - 删除或忽略纯 bot 自动生成的 changelog、update、release 条目。 - 删除显式的 Release 发布记录,例如 Release vX.Y.Z。 @@ -120,9 +121,9 @@ description: 根据提交记录、PR、diff、现有 CHANGELOG 与历史 tag 内 - 把同一功能拆成多条重复表述,例如同一个生息演算功能拆成多个相近新增或改进条目。 - 保留玩梗、口语化、半成品标题,例如不会现在还有人选沙中遗火吧、特意删的 PNS 怎么又给加回来了。 - 机械沿用 commit type 导致分类错误,例如把用户能感知的修复放进其他,把兼容性提升放进新增。 -- patch 版本没有用户可感知的重要新变化,却自行重写了独立的 Highlights,而非复用父版本内容。 +- patch 版本或测试版没有用户可感知的重要新变化,却自行重写了独立的 Highlights,而非复用父版本内容。 - 把 patch 版本的详细内容插入到父版本的 Highlights 与详细内容之间,破坏了文件结构。 -- patch 版本的历史区块中重复保留了 Highlights 和"以下是详细内容:"引导语,这些应只在顶部出现一次。 +- patch / 测试版的历史区块中重复保留了 Highlights 和"以下是详细内容:"引导语,这些应只在顶部出现一次。 ## Output Requirements @@ -174,7 +175,7 @@ English summary paragraph. 以下是详细内容:
-vX.Y.Z +vX.Y.Z (YYYY-MM-DD) ### 改进 | Improved @@ -191,7 +192,7 @@ English summary paragraph.
-vX.Y.1 +vX.Y.1 (YYYY-MM-DD) ### 改进 | Improved @@ -204,7 +205,7 @@ English summary paragraph.
-vX.Y.0 +vX.Y.0 (YYYY-MM-DD) ### 新增 | New @@ -230,7 +231,7 @@ English summary paragraph. - 是否已经按模块正确分类、排序,并保持中文在前、英文在后? - 是否已经输出完整 Markdown,而不是说明文字或代码块? - 如果是 patch 版本且没有用户可感知的重要新变化,是否复用了父版本的 Highlights 而非自行重写? -- patch 版本的详细内容是否紧跟在"以下是详细内容:"之后,而非插入到父版本的 Highlights 下方? +- patch / 测试版的详细内容是否紧跟在"以下是详细内容:"之后,而非插入到父版本的 Highlights 下方? - 历史版本区块中是否只保留详细内容,没有重复 Highlights 和引导语? - 英文 Highlights 是否放入 `
` 折叠块(中文不折叠)? - 每个版本的详细内容是否各自放入独立的 `
` 折叠块? diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b19571346..d9be113d41 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,7 +36,7 @@ The settings page now features a search bar with keyword highlighting and sectio 以下是详细内容:
-v6.11.0-beta.2 +v6.11.0-beta.2 (2026-05-29) ### 修复 | Fix @@ -47,7 +47,7 @@ The settings page now features a search bar with keyword highlighting and sectio
-v6.11.0-beta.1 +v6.11.0-beta.1 (2026-05-29) ### 新增 | New