Loong
|
b2fa9a1c3e
|
fix: 显式声明 adb-lite client 对应的 serial (#16853)
## 概述
- 在 `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 <serial>` 与当前
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`
|
2026-05-29 00:46:30 +08:00 |
|
Loong
|
48424a68c5
|
fix: refactor ADB connection logic to only connect when needed (#15300)
优化 ADB 连接处理逻辑,避免不必要的连接尝试,并在连接不需要或无效时改进错误报告。
|
2026-05-23 16:24:49 +01:00 |
|
uye
|
5445962a7b
|
docs: 补全连接阶段的 ClientType 参数说明
|
2026-05-04 19:13:52 +08:00 |
|
1b2c
|
e83e49f61b
|
fix: 部分场景下无法自动启动游戏 (#16422)
943a798b38 在 AdbConnectionContext::replace_cmd 的统一替换表中加入了 [PackageName],
导致 m_adb.start / m_adb.stop 在 connect 阶段就被提前替换。当调用方未通过
AsstSetInstanceOption(ClientType, ...) 设置 client_type 时(如 maa-cli 等不感知该
新选项的第三方调用方),m_conn_ctx.package_name 为空字符串,m_adb.start 中的
[PackageName] 被替换为空,后续 start_game(client_type) 内的运行时替换沦为 no-op,
最终启动命令缺失包名导致启动游戏失败。
将 [PackageName] 从统一替换表移除,恢复其作为运行时参数的语义;connect 阶段唯一
需要 [PackageName] 的位置(Androws 的 displayId 查询)改为就地显式替换。
Close #16392
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-02 13:24:54 +08:00 |
|
srdr0p
|
1b1bc15aca
|
feat: 支持腾讯应用宝 5.10.56.xx (#16292)
* feat(connection): 新增腾讯应用宝模拟器支持
在 WinAdapter 和 config.json 中添加应用宝(Androws)模拟器入口。
本次仅支持 ADB Input 方式和官方渠道。
同步更新各语言连接文档(zh/en/ja/ko/tw)及 UI 本地化字符串。
* feat(controller): 为腾讯应用宝新增多渠道与 Minitouch 支持
应用宝的应用与 DisplayId 绑定,需在 connect() 前确定包名。
新增 InstanceOptionKey::ClientType (= 6),经由
AsstSetInstanceOption -> Assistant::set_instance_option
-> Controller::set_client_type 传递渠道信息;
AdbController::connect 在建立连接时通过 ctrler()->get_client_type()
读取并写入 AdbConnectionContext,用于替换命令模板中的 [PackageName]。
引入 AdbConnectionContext 保存 ADB 连接信息供 Minitouch 使用,
并通过 eventId 标识所绑定的输入设备。
|
2026-04-26 23:48:24 +08:00 |
|
MistEO
|
fa7c823dde
|
perf: use boost::regex instead of std::regex (#15126)
|
2025-12-19 13:04:28 +08:00 |
|
MistEO
|
640eed10e2
|
refactor: use MaaUtils instead of Utils (#14579)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
|
2025-11-02 23:19:38 +08:00 |
|
MistEO
|
5c0445d3ab
|
refactor: 依赖大更新 (#13908)
Co-authored-by: status102 <102887808+status102@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
|
2025-09-08 21:17:47 +08:00 |
|
uye
|
6a58d350c6
|
chore: mumu 使用 7555 端口时禁用 Index 检测,添加日志警告
|
2025-08-24 10:49:06 +08:00 |
|
uye
|
c5cb5e744e
|
style: format
|
2025-08-12 22:23:15 +08:00 |
|
uye
|
cf8257b685
|
feat: 支持 mumu 5555 端口使用控制台退出与截图增强
|
2025-08-12 21:53:24 +08:00 |
|
uye
|
7b9e1453ad
|
fix: uuid 与 version 返回错误格式时崩溃
fix #13351
|
2025-07-25 21:20:29 +08:00 |
|
Constrat
|
2972bbfbe9
|
style: clang
[skip changelog]
|
2025-07-12 13:38:47 +02:00 |
|
uye
|
d64f4b3aeb
|
feat: 为截图测试日志添加 Tooltip 展示所有截图方式耗时
|
2025-07-12 18:56:08 +08:00 |
|
uye
|
66f60a206a
|
ci: ubuntu build
|
2025-07-09 16:49:56 +08:00 |
|
uye
|
5537684305
|
feat: 新增雷电专版注册表自动检测,新增雷电端口自动检测
|
2025-07-09 16:26:49 +08:00 |
|
SherkeyXD
|
13e42a7915
|
fix: no unsigned subtraction
|
2025-07-02 19:33:17 +08:00 |
|
status102
|
f44c91ab51
|
fix: ubuntu unused
|
2025-05-12 18:59:23 +08:00 |
|
status102
|
a943d0ef5f
|
chore: mark
|
2025-05-12 17:37:09 +08:00 |
|
status102
|
9d5bb5c609
|
fix: 6be4d0aca0
|
2025-01-15 23:28:21 +08:00 |
|
status102
|
6be4d0aca0
|
fix: 截图失败时清空image_payload
|
2025-01-15 20:18:36 +08:00 |
|
晓丶梦丶仁
|
3d5e05414f
|
feat: 点刺、后勤种子存钱 & ProcessTask 添加 Input 方法 (#11521)
* feat: 为 ProcessTask 添加文本输入功能
* feat: 点刺、后勤种子存钱
* docs: 为 Input 方法添加文档
* perf: 添加循环刷钱cd检查
* perf: werror
* perf: 改变 Input 的 int 值
* perf: 减少 AsstProxy 传参,改用 c:Binding
* chore: 界面显示和获取分离
---------
Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
|
2025-01-12 20:03:09 +08:00 |
|
uye
|
c4da235de7
|
chore: 移除多余变量
|
2024-10-29 16:53:48 +08:00 |
|
Weiyou Wang
|
e4bfd54d94
|
fix: MuMu bridge connection (#10937)
* fix: MuMu bridge connection
* fix: global adaptation
* chore: 调整布局,优化变量位置
* fix: 网络桥接模式设置不再与自动检测链接相关
* chore: 自动检测时禁用增强模式开关
* chore: 添加开启桥接的提示
---------
Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
|
2024-10-27 23:07:16 +08:00 |
|
pre-commit-ci[bot]
|
ce02c80498
|
chore: Auto update by pre-commit hooks [skip changelog]
|
2024-10-22 08:40:28 +00:00 |
|
MistEO
|
312ac0a277
|
feat: 支持mumu后台保活,通过包名获取display_id (#10713)
* feat: 支持mumu后台保活,通过包名获取display_id
* perf: 调整mumu extras需要的信息
* perf: 适配UI
* fix: build error
* feat: 每次截图前都获取display id
* feat: 每次启动app重新获取display id
* fix: 修复mumu保活多屏幕时分辨率错误
* chore: Auto update by pre-commit hooks [skip changelog]
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
|
2024-10-11 20:41:17 +08:00 |
|
uye
|
228e4f03b8
|
feat: LD 截图 (#10581)
* feat: EmulatorExtras 子模块更新
* feat: 写了一坨
* feat: 大概是能用了
* feat: ui 支持 ld 截图增强
* chore: 修改 LdSpecialScreenshot 颜色,调整版本要求描述
* chore: 使用 steady_clock
* chore: 移除未使用变量
|
2024-09-17 22:52:18 +08:00 |
|
uye
|
9359fdc8d5
|
fix: adb lite 无法连接
|
2024-09-16 16:35:28 +08:00 |
|
uye
|
a877a3b14b
|
perf: 使用 devices 判断是否需要连接 (#10606)
* perf: 使用 devices 判断是否需要连接
* chore: 判断是否存在捕获组
|
2024-09-14 14:29:01 +08:00 |
|
uye
|
0ac0ebaad2
|
perf: 优化 connect 逻辑 (#10571)
* chore: 优化 connect 对实体设备和已有错误路径下自动检测的支持
* perf: 优化 core 对 connect 成功的判断逻辑
may fix 类似 #10426 的异常情况
|
2024-09-12 13:07:36 +08:00 |
|
Rbqwow
|
67c10f1982
|
refactor: StopGame (#9658)
* perf: StopGame
* style: rename Intent to packageName
* chore: 不准不选择区服
* fix: 移除其他配置中的抽象 stop 匹配
* style: 统一驼峰
* style: 按照执行顺序重新排序
* feat: 添加回调和文档
* fix: 修复参数传入
* docs: 更新文档
* fix: merge
* chore: 把WSA的配置也改了
* chore: update submodule
---------
Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
Co-authored-by: Loong <wangl.cc@outlook.com>
|
2024-08-11 01:50:30 +08:00 |
|
uye
|
2cda6f747b
|
fix: 开启 MuMu 截图增强后重启模拟器未重启 MAA 后出现截图失败
fix #10110
|
2024-08-06 18:34:41 +08:00 |
|
uye
|
545ce542a0
|
fix: fix smoking-test
|
2024-08-02 14:37:39 +08:00 |
|
Horror Proton
|
2762ef73a7
|
feat: fallback to General config
|
2024-08-02 13:32:51 +08:00 |
|
Horror Proton
|
fbcc8369a0
|
fix: fix coredump caused by screencap failure
|
2024-06-08 22:38:14 +08:00 |
|
uye
|
d4d7eeaef5
|
fix: call_command timeout时提前返回 std::nullopt
fix #9218
fix #9102
|
2024-05-27 18:23:39 +08:00 |
|
Horror Proton
|
9635cdf7f4
|
feat: add compile def to disable emulator extras
|
2024-05-13 18:35:50 +08:00 |
|
Constrat
|
fef2f56d39
|
feat: auto retry start on app startup crash (#8966)
|
2024-05-06 21:04:26 +01:00 |
|
MistEO
|
bafc8c3f71
|
feat: mumu extras (#8939)
Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
Co-authored-by: status102 <102887808+status102@users.noreply.github.com>
|
2024-05-03 22:05:37 +08:00 |
|
status102
|
7bf76068eb
|
perf(MaaCore): ScreenCost截图失败次数为0时,不返回fault_times字段
|
2024-02-08 17:04:13 +08:00 |
|
status102
|
c8dda4cc6e
|
perf(MaaCore): ScreencapCost输出失败次数
|
2024-02-07 19:54:29 +08:00 |
|
Horror Proton
|
644d820315
|
fix: fix typo and undefined behavior of minmax
|
2024-02-07 19:09:56 +08:00 |
|
status102
|
ba4ab76fc0
|
fix: 启动时连续截图出错10次导致MAA崩溃
|
2024-02-07 18:09:27 +08:00 |
|
status102
|
e2a065c2c6
|
perf: 截图耗时计算最值、均值排除截图失败的耗时
|
2024-01-02 15:05:07 +08:00 |
|
status102
|
72caff37d1
|
perf: 截图不成功时,耗时将记录为INT_MAX
|
2023-12-13 23:40:52 +08:00 |
|
status102
|
b09846ec22
|
feat: wpf设置-连接设置新增近期截图耗时
|
2023-12-13 22:41:18 +08:00 |
|
status102
|
a9d661c540
|
fix: 修复在截图最快方式检测不成功时,不输出数值
|
2023-12-11 11:07:45 +08:00 |
|
David
|
889cd0a3f3
|
perf: reduced screencap timeout (#7476)
refs:
https://github.com/MaaAssistantArknights/MaaAssistantArknights/pull/7473#issuecomment-1838440548
https://github.com/MaaAssistantArknights/MaaAssistantArknights/pull/7473#issuecomment-1838446255
|
2023-12-04 19:46:00 +01:00 |
|
status102
|
d813a8747b
|
feat: 新增检测最快截图方式后输出截图方法和截图测试耗时 (#7441)
feat: 新增检测最快截图方式后输出截图方法和截图测试耗时
|
2023-12-01 15:15:40 +08:00 |
|
status102
|
dc555215ce
|
feat: 新增检测最快截图方式后输出截图方法和耗时
|
2023-11-30 19:43:24 +08:00 |
|