Repository navigation
发版 workflow 和 v0.1.0 的说明、哈希 (#5)
ModAVDExtras v0.1.0
modavd_extras.dll:84719e698c4679185eea9b194dfd33bbecadd05fb4d9bfaf9bba0398aa65f8e3external_renderer_ipc.dll:3e55150f1cc0c702e0b9b41dd9f248e99363aaa7c07d881660143f0cd36b4c45
第一个版本,只有截图,附件是 Windows x64 的两个 DLL。Linux、macOS 能从源码编,这一版不出二进制。
两个 DLL
modavd_extras.dll:ModAVD 自己的截图库,C 接口,见include/modavd_extras.h(接口版本 1)。- 从 ModAVD 实例的截图共享内存直接取画面,不经 adb。按 adb 地址(
127.0.0.1:<adb 端口>、emulator-<控制台端口>)或控制台端口找到实例。 - 交出 BGR、RGBA 或 BGRA,正向或倒向。新帧写到一半时重拷;共享内存没开时经模拟器控制台打开。
- 出错返回错误码,不自己退回 adb,由调用方决定换什么办法。
- 点击、按键、文字的函数已经声明,这一版返回
MODAVD_E_UNSUPPORTED。
- 从 ModAVD 实例的截图共享内存直接取画面,不经 adb。按 adb 地址(
external_renderer_ipc.dll:兼容外壳,只在 Windows 上用。- 导出和 MuMu 同名 DLL 一样的四个截图函数(
nemu_connect、nemu_disconnect、nemu_capture_display、nemu_get_display_id),让还不认识 ModAVD 的 MAA 走「MuMu 截图增强」那条路。不导出输入函数,MAA 照旧用 MaaTouch 点击。 - 用来替换 AUTO-MAS 里原来的伪装 DLL(
res/avdshim):导出、实例编号的换算、返回值都一样,截出的图逐字节相同。日志有三处不同:经控制台开截图时不再记console <端口> webrtc start -> OK;连接失败时多一行port=<端口>: shared memory unavailable,外壳自己那行末尾多出错原因;控制台没人应答时直接返回 0,不再多等约 2 秒。
- 导出和 MuMu 同名 DLL 一样的四个截图函数(
- 两个 DLL 都静态链接 C 运行库,只依赖
KERNEL32、WS2_32。
速度
截一帧的耗时,p50,单位 ms(Windows,7950X3D,测试实例停在桌面,三种实现轮流各截 500 次 × 3 轮):
| 720p | 1080p | |
|---|---|---|
| 原来的伪装 DLL(RGBA,倒向) | 0.28–0.30 | 0.68–0.70 |
external_renderer_ipc.dll(同上) |
0.11–0.12 | 0.28–0.31 |
modavd_extras.dll,BGR 正向 |
0.06–0.07 | 0.13 |
许可证与源码
- LGPL-3.0-or-later。正文是 tag 下的 LICENSE(LGPL-3.0)和 COPYING(GPL-3.0);转发这两个 DLL 时请一起带上。
- 源码:https://github.com/ModAVD/ModAVDExtras/tree/v0.1.0。
下载与核对
两个 DLL 由本仓库的 release workflow 在 GitHub 的 windows-2025 上编出(cmake -A x64,--config Release),和 tag 下的 release/0.1.0.SHA256SUMS.txt 核对过才上传。请用附件 SHA256SUMS.txt 核对,例如在 PowerShell 里运行 Get-FileHash .\modavd_extras.dll -Algorithm SHA256。编译带 /Brepro:用同样的命令、同一版本的 MSVC 和 Windows SDK 编,能得到相同的字节;这两个版本在 workflow 日志里 CMake 配置那一步能看到。
English
The first release: screen capture only. Attached are the two Windows x64 DLLs; Linux and macOS build from source, with no binaries in this release.
modavd_extras.dllis ModAVD's own capture library with a C interface (include/modavd_extras.h, API version 1). It reads frames straight from a ModAVD instance's frame-sharing memory, without adb, finding the instance from an adb address (127.0.0.1:<adb port>,emulator-<console port>) or a console port. It returns BGR, RGBA or BGRA, top-down or bottom-up; copies again when a new frame lands mid-copy; turns frame sharing on through the emulator console when it is off; and returns an error code instead of falling back to adb. The input functions are declared and returnMODAVD_E_UNSUPPORTEDin this release.external_renderer_ipc.dllis a Windows-only compatibility shell. It exports the four capture functions of MuMu's DLL of the same name, so MAA versions that do not know ModAVD can capture through the "MuMu screenshot enhancement" path; touch stays on MaaTouch. It replaces the impersonation DLL in AUTO-MAS (res/avdshim) with the same exports, index mapping and return values, and byte-identical frames. Its log differs in three places: noconsole <port> webrtc start -> OKline; on a failed connect an extraport=<port>: shared memory unavailableline and the reason at the end of the shell's own line; and no extra wait of about 2 s when the console does not answer.- Both DLLs link the C runtime statically and depend only on
KERNEL32andWS2_32. - Capture time, p50 in ms (720p / 1080p): the old impersonation DLL 0.28–0.30 / 0.68–0.70;
external_renderer_ipc.dll0.11–0.12 / 0.28–0.31;modavd_extras.dllBGR top-down 0.06–0.07 / 0.13. - License: LGPL-3.0-or-later; the texts are LICENSE (LGPL-3.0) and COPYING (GPL-3.0) at the tag. Ship them with the DLLs. Source: https://github.com/ModAVD/ModAVDExtras/tree/v0.1.0.
- The DLLs are built by this repository's release workflow on GitHub's
windows-2025(cmake -A x64,--config Release) and checked againstrelease/0.1.0.SHA256SUMS.txtat the tag before upload. Check them with the attachedSHA256SUMS.txt. The build uses/Brepro: the same commands with the same MSVC and Windows SDK versions give the same bytes; both versions show in the CMake configure step of the workflow log.