From 50000b988a9e0fc1046f4055d6272b95bc5b3ecf Mon Sep 17 00:00:00 2001 From: Frog Chen Date: Fri, 17 Apr 2026 22:38:56 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20AVD=E6=88=AA=E5=9B=BE=E5=A2=9E=E5=BC=BA?= =?UTF-8?q?=E7=9A=84=E5=94=AE=E5=90=8E=EF=BC=88=E6=96=87=E6=A1=A3=E3=80=81?= =?UTF-8?q?CI=E5=8F=98=E6=9B=B4=E7=AD=89=EF=BC=89=20(#16031)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Rbqwow <55343783+Rbqwow@users.noreply.github.com> Co-authored-by: MistEO --- .github/workflows/ci.yml | 33 ++++++++++++++++++++++++---- docs/en-us/develop/development.md | 4 +++- docs/en-us/develop/linux-tutorial.md | 9 ++++---- docs/en-us/manual/connection.md | 13 ++++++++++- docs/en-us/manual/device/linux.md | 2 ++ docs/en-us/manual/device/macos.md | 8 +++++-- docs/en-us/manual/device/windows.md | 2 +- docs/en-us/protocol/integration.md | 4 ++-- docs/ja-jp/develop/development.md | 4 +++- docs/ja-jp/develop/linux-tutorial.md | 5 ++++- docs/ja-jp/manual/connection.md | 13 ++++++++++- docs/ja-jp/manual/device/linux.md | 2 ++ docs/ja-jp/manual/device/macos.md | 6 +++-- docs/ja-jp/manual/device/windows.md | 6 ++--- docs/ja-jp/protocol/integration.md | 4 ++-- docs/ko-kr/develop/development.md | 4 +++- docs/ko-kr/develop/linux-tutorial.md | 8 +++---- docs/ko-kr/manual/connection.md | 11 ++++++++++ docs/ko-kr/manual/device/linux.md | 2 ++ docs/ko-kr/manual/device/macos.md | 8 +++++-- docs/ko-kr/manual/device/windows.md | 2 +- docs/ko-kr/protocol/integration.md | 4 ++-- docs/zh-cn/develop/development.md | 4 +++- docs/zh-cn/develop/linux-tutorial.md | 11 ++++------ docs/zh-cn/manual/connection.md | 13 ++++++++++- docs/zh-cn/manual/device/linux.md | 2 ++ docs/zh-cn/manual/device/macos.md | 14 +++++++----- docs/zh-cn/manual/device/windows.md | 4 ++-- docs/zh-cn/protocol/integration.md | 4 ++-- docs/zh-tw/develop/development.md | 4 +++- docs/zh-tw/develop/linux-tutorial.md | 8 +++---- docs/zh-tw/manual/connection.md | 13 ++++++++++- docs/zh-tw/manual/device/linux.md | 2 ++ docs/zh-tw/manual/device/macos.md | 14 +++++++----- docs/zh-tw/manual/device/windows.md | 2 +- docs/zh-tw/protocol/integration.md | 4 ++-- 36 files changed, 184 insertions(+), 69 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b44e3fdf42..69b640941e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -136,19 +136,18 @@ jobs: cmake --install build --config RelWithDebInfo - name: Download MaaFramework - if: matrix.arch == 'x64' uses: robinraju/release-downloader@v1 with: repository: MaaXYZ/MaaFramework tag: v5.9.2 - fileName: "*win-x86_64*.zip" + fileName: ${{ matrix.arch == "arm64" && "*win-aarch64*.zip" || "*win-x86_64*.zip" }} extract: true out-file-path: MaaFramework-temp - - name: Copy MaaWin32ControlUnit - if: matrix.arch == 'x64' + - name: Copy ControlUnits run: | cp MaaFramework-temp/bin/*Win32ControlUnit* install/ + cp MaaFramework-temp/bin/*AdbControlUnit* install/ - name: Setup .NET SDK uses: actions/setup-dotnet@v5 @@ -266,6 +265,19 @@ jobs: env: CLICOLOR_FORCE: 1 + - name: Download MaaFramework + uses: robinraju/release-downloader@v1 + with: + repository: MaaXYZ/MaaFramework + latest: true + fileName: '*linux-${{ matrix.arch }}*.zip' + extract: true + out-file-path: MaaFramework-temp + + - name: Copy ControlUnits + run: | + cp MaaFramework-temp/bin/*AdbControlUnit* install/ + - name: Setup cross compile toolchains for CLI uses: ./src/maa-cli/.github/actions/setup with: @@ -373,6 +385,19 @@ jobs: cmake --build --preset ${{ matrix.arch == 'x86_64' && 'macos-publish-x64' || 'macos-publish-arm64' }} --parallel $(sysctl -n hw.logicalcpu) cmake --install build --config RelWithDebInfo + - name: Download MaaFramework + uses: robinraju/release-downloader@v1 + with: + repository: MaaXYZ/MaaFramework + latest: true + fileName: ${{ matrix.arch == 'x86_64' && '*macos-x86_64*.zip' || '*macos-aarch64*.zip' }} + extract: true + out-file-path: MaaFramework-temp + + - name: Copy ControlUnits + run: | + cp MaaFramework-temp/bin/*AdbControlUnit* install/ + - name: Upload MAA to GitHub uses: actions/upload-artifact@v7 with: diff --git a/docs/en-us/develop/development.md b/docs/en-us/develop/development.md index ef1368be5f..d52e2669a2 100644 --- a/docs/en-us/develop/development.md +++ b/docs/en-us/develop/development.md @@ -78,7 +78,9 @@ We've preset several different development environments for you to choose from: - Press F5 to run ::: tip - To debug Win32Controller (Windows window control) features, you need to manually download the corresponding platform package from [MaaFramework Releases](https://github.com/MaaXYZ/MaaFramework/releases), and place `MaaWin32ControlUnit.dll` from the `bin` directory into MAA's DLL directory (e.g. `build/bin/Debug`). PRs for an auto-download script are welcome! + To run Win32Controller (Windows window control) / MaaFwAdbController (MaaFramework touch mode) features, you need to manually download the package for your platform from [MaaFramework Releases](https://github.com/MaaXYZ/MaaFramework/releases), and place `MaaWin32ControlUnit.dll` / `MaaAdbControlUnit.dll` from the `bin` directory into MAA's DLL directory (e.g. `build/bin/Debug`). PRs for an auto-download script are welcome! + + To debug these features, [compile the Debug version of MaaFramework yourself](https://maafw.com/docs/4.1-BuildGuide) and use the corresponding DLLs, or it will randomly crash at breakpoints. ::: 9. Now you're ready to happily ~~mess around~~ start developing! diff --git a/docs/en-us/develop/linux-tutorial.md b/docs/en-us/develop/linux-tutorial.md index 06e614a054..269ee66d6f 100644 --- a/docs/en-us/develop/linux-tutorial.md +++ b/docs/en-us/develop/linux-tutorial.md @@ -8,7 +8,8 @@ icon: teenyicons:linux-alt-solid **This tutorial requires readers to have some Linux environment configuration ability and programming foundation!** If you only want to directly install MAA instead of compiling it yourself, please read [User Manual - Linux Emulators and Containers](../manual/device/linux.md). ::: info Note -MAA's build method is still under discussion. The content of this tutorial may be outdated. Please refer to the scripts in [GitHub workflow file](https://github.com/MaaAssistantArknights/MaaAssistantArknights/blob/master/.github/workflows/ci.yml#L134). You can also refer to [AUR PKGBUILD](https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=maa-assistant-arknights), [nixpkgs](https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/by-name/ma/maa-assistant-arknights/package.nix). +MAA's build method is still under discussion. The content of this tutorial may be outdated. Please refer to the scripts in [GitHub workflow file](https://github.com/MaaAssistantArknights/MaaAssistantArknights/blob/dev-v2/.github/workflows/ci.yml#L224#:~:text=ubuntu%3A). +You can also refer to [AUR PKGBUILD](https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=maa-assistant-arknights) or [nixpkgs](https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/by-name/ma/maa-assistant-arknights/package.nix). ::: ::: info @@ -73,6 +74,8 @@ Mac can use the `tools/build_macos_universal.zsh` script for compilation. It's r cmake --install build --prefix ``` +4. To debug MaaFwAdbController (MaaFramework touch mode) features, you need to [compile the Debug version of MaaFramework yourself](https://maafw.com/docs/4.1-BuildGuide) and put `libMaaAdbControlUnit.so` in the installation directory. + ## Integration Documentation [~~Perhaps not really documentation~~](../protocol/integration.md) @@ -85,8 +88,6 @@ You can refer to the implementation of `__main__` in [Python demo](https://githu You can refer to the implementation in [CppSample](https://github.com/MaaAssistantArknights/MaaAssistantArknights/blob/master/src/Cpp/main.cpp) -### C Sharp - - +### C\# You can refer to the implementation in [MaaWpfGui](https://github.com/MaaAssistantArknights/MaaAssistantArknights/blob/master/src/MaaWpfGui/Main/AsstProxy.cs) diff --git a/docs/en-us/manual/connection.md b/docs/en-us/manual/connection.md index 13bb8028e0..3f4e2cf258 100644 --- a/docs/en-us/manual/connection.md +++ b/docs/en-us/manual/connection.md @@ -180,17 +180,28 @@ Requires official or international LDPlayer 9 V9.1.32 or newer. +### C\# [MaaWpfGui](https://github.com/MaaAssistantArknights/MaaAssistantArknights/blob/master/src/MaaWpfGui/Main/AsstProxy.cs)의 구현을 참고하세요. diff --git a/docs/ko-kr/manual/connection.md b/docs/ko-kr/manual/connection.md index 2aca590dda..f215da25b0 100644 --- a/docs/ko-kr/manual/connection.md +++ b/docs/ko-kr/manual/connection.md @@ -194,11 +194,22 @@ MAA 폴더에 직접 압축을 푸는 것을 권장합니다. 그러면 ADB 경 3. `인스턴스 번호`에 LD 멀티플레이어에서 해당 에뮬레이터의 일련번호(ID)를 입력합니다. 예: 메인 멀티플레이어의 경우 `0` +### AVD 스크린샷 향상 모드 + +需使用 Android Emulator v27.2.9 及更新版本。(只要是方舟开服之后下载的就没问题。) + +因为 AVD 截图增强模式在 MaaFramework 中实现,所以必须选择 MaaFramework 触控模式才能启用 AVD 截图增强。 + +1. `设置` - `连接设置` - `连接配置` 选择 `Android 虚拟设备(AVD)`。 + +2. `触控模式` 选择 `MaaFramework`。 + ## 터치 모드 1. [Minitouch](https://github.com/DeviceFarmer/minitouch): C로 작성된 Android 터치 이벤트 핸들러로, 외부 프로그램이 터치 이벤트와 제스처를 트리거할 수 있는 소켓 인터페이스를 제공합니다. Android 10부터는 SELinux가 `Enforcing` 모드일 때 Minitouch가 더 이상 사용되지 않습니다. 2. [MaaTouch](https://github.com/MaaAssistantArknights/MaaTouch): MAA가 Java 기반으로 Minitouch를 재구현한 것입니다. 높은 버전의 Android에서도 사용 가능성이 테스트 중입니다. 3. Adb Input: ADB 명령어를 직접 호출하여 터치 작업을 수행하며, 호환성이 가장 좋지만, 속도는 가장 느립니다. +4. [MaaFramework](https://maafw.com/): 调用 MaaFramework 控制单元的截图和触控功能。可用性尚待测试。~~帮我们做做测试 x2~~ ## ADB Lite diff --git a/docs/ko-kr/manual/device/linux.md b/docs/ko-kr/manual/device/linux.md index 752869c473..c4d024d0fd 100644 --- a/docs/ko-kr/manual/device/linux.md +++ b/docs/ko-kr/manual/device/linux.md @@ -121,6 +121,8 @@ MAA Wine Bridge에서 생성된 `MaaDesktopIntegration.so`를 `MAA.exe`와 같 권장 구성: MAA의 리눅스 x64 동적 라이브러리와 함께 x86_64 프레임워크 (R - 30 - x86_64 - Android 11.0) 사용 +[스크린샷 향상 모드](../connection.md#avd-스크린샷-향상-모드)에 대한 추가 지원이 있습니다. + 참고: Android 10 이상에서는 SELinux가 `Enforcing` 모드인 경우 `Minitouch`를 사용할 수 없습니다. 다른 터치 모드로 전환하거나 SELinux를 **임시**로 `Permissive` 모드로 전환하세요. ### ⚠️ [Genymotion](https://www.genymotion.com/) diff --git a/docs/ko-kr/manual/device/macos.md b/docs/ko-kr/manual/device/macos.md index 5de407b34e..9fb22e83ed 100644 --- a/docs/ko-kr/manual/device/macos.md +++ b/docs/ko-kr/manual/device/macos.md @@ -35,7 +35,9 @@ icon: basil:apple-solid ### ✅ [AVD](https://developer.android.com/studio/run/managing-avds) -지원됩니다. 그러나 Android 10부터는 SELinux가 `Enforcing` 모드일 때 `Minitouch`를 사용할 수 없습니다. 다른 터치 모드로 전환하거나 SELinux를 **임시**로 `Permissive` 모드로 변경하세요. +지원됩니다, [스크린샷 향상 모드](../connection.md#avd-스크린샷-향상-모드)에 대한 추가 지원이 있습니다. + +Android 10부터는 SELinux가 `Enforcing` 모드일 때 `Minitouch`를 사용할 수 없습니다. 다른 터치 모드로 전환하거나 SELinux를 **임시**로 `Permissive` 모드로 변경하세요. ### ✅ [블루스택 에어](https://www.bluestacks.com/mac) (무료, Apple M 시리즈 칩에 최적화된 버전) @@ -65,4 +67,6 @@ Mac 버전 개발에 인력이 부족하여 업데이트 속도가 비교적 느 ### ✅ [AVD](https://developer.android.com/studio/run/managing-avds) -지원됩니다. 그러나 Android 10부터는 SELinux가 `Enforcing` 모드일 때 `Minitouch`를 사용할 수 없습니다. 다른 터치 모드로 전환하거나 SELinux를 **임시**로 `Permissive` 모드로 변경하세요. +지원됩니다, [스크린샷 향상 모드](../connection.md#avd-스크린샷-향상-모드)에 대한 추가 지원이 있습니다. + +Android 10부터는 SELinux가 `Enforcing` 모드일 때 `Minitouch`를 사용할 수 없습니다. 다른 터치 모드로 전환하거나 SELinux를 **임시**로 `Permissive` 모드로 변경하세요. diff --git a/docs/ko-kr/manual/device/windows.md b/docs/ko-kr/manual/device/windows.md index 4d5f3fe284..c7d5909992 100644 --- a/docs/ko-kr/manual/device/windows.md +++ b/docs/ko-kr/manual/device/windows.md @@ -67,7 +67,7 @@ const partiallySupport = shuffleArray([ { name: 'AVD', link: 'https://developer.android.com/studio/run/managing-avds', - note: '이론적으로 지원됩니다.\n\n- Android 10부터 SELinux가 `Enforcing` 모드일 때 Minitouch를 사용할 수 없으므로 다른 터치 모드로 전환하거나 SELinux를 **임시로** `Permissive` 모드로 전환하세요.\n- AVD는 디버깅을 위해 만들어졌으므로 게임용으로 설계된 다른 에뮬레이터를 사용하는 것이 더 좋습니다.', + note: '이론적으로 지원됩니다.\n\n- [스크린샷 향상 모드](../connection.html#avd-스크린샷-향상-모드)에 대한 추가 지원이 있습니다.\n- Android 10부터 SELinux가 `Enforcing` 모드일 때 Minitouch를 사용할 수 없으므로 다른 터치 모드로 전환하거나 SELinux를 **임시로** `Permissive` 모드로 전환하세요.\n- AVD는 디버깅을 위해 만들어졌으므로 게임용으로 설계된 다른 에뮬레이터를 사용하는 것이 더 좋습니다.', }, { name: 'Google Play Games (개발자용)', diff --git a/docs/ko-kr/protocol/integration.md b/docs/ko-kr/protocol/integration.md index 87dc9458e0..89bee9bae7 100644 --- a/docs/ko-kr/protocol/integration.md +++ b/docs/ko-kr/protocol/integration.md @@ -1134,10 +1134,10 @@ Value 무효 점유. 열거값: 0 ::: ::: field name="MinitouchEnabled" type="boolean" optional -폐기됨. 원 minitouch 활성화 여부; "1" 켜기, "0" 끄기. 장치가 지원하지 않을 수 있음. 열거값: 1 (폐기됨) +폐기됨. 원 Minitouch 활성화 여부; "1" 켜기, "0" 끄기. 장치가 지원하지 않을 수 있음. 열거값: 1 (폐기됨) ::: ::: field name="TouchMode" type="string" optional default="minitouch" -터치 모드 설정. 옵션: minitouch | maatouch | adb. 기본값 minitouch. 열거값: 2 +터치 모드 설정. 옵션: minitouch | maatouch | adb | MaaFwAdb. 기본값 minitouch. 열거값: 2 ::: ::: field name="DeploymentWithPause" type="boolean" optional 오퍼레이터 배치 시 일시정지 여부, 자동지휘/통합 전략/보안파견에 모두 영향. 옵션: "1" 켜기, "0" 끄기. 열거값: 3 diff --git a/docs/zh-cn/develop/development.md b/docs/zh-cn/develop/development.md index 1a97abe568..7b0f10a0bf 100644 --- a/docs/zh-cn/develop/development.md +++ b/docs/zh-cn/develop/development.md @@ -78,7 +78,9 @@ icon: iconoir:developer - 按 F5 运行 ::: tip - 若需调试 Win32Controller(Windows 窗口控制)相关功能,需要自行从 [MaaFramework Releases](https://github.com/MaaXYZ/MaaFramework/releases) 下载对应平台的压缩包,将 `bin` 目录中的 `MaaWin32ControlUnit.dll` 放到 MAA 的 DLL 同目录下(如 `build/bin/Debug`)。欢迎 PR 一个自动下载脚本! + 若需运行 Win32Controller(Windows 窗口控制)/ MaaFwAdbController(MaaFramework 触控模式)相关功能,需要自行从 [MaaFramework Releases](https://github.com/MaaXYZ/MaaFramework/releases) 下载对应平台的压缩包,将 `bin` 目录中的 `MaaWin32ControlUnit.dll` / `MaaAdbControlUnit.dll` 放到 MAA 的 DLL 同目录下(如 `build/bin/Debug`)。欢迎 PR 一个自动下载脚本! + + 若需调试相关功能,则需要[自行编译 MaaFramework](https://maafw.com/docs/4.1-BuildGuide) 的 Debug 版本,使用对应的 DLL 文件,否则在断点调试时会神秘闪退。 ::: 9. 到这里,你就可以愉快地 ~~瞎 JB 改~~ 发电了 diff --git a/docs/zh-cn/develop/linux-tutorial.md b/docs/zh-cn/develop/linux-tutorial.md index c9734e2f3b..ce71ae68cf 100644 --- a/docs/zh-cn/develop/linux-tutorial.md +++ b/docs/zh-cn/develop/linux-tutorial.md @@ -8,8 +8,8 @@ icon: teenyicons:linux-alt-solid **本教程需要读者有一定的 Linux 环境配置能力及编程基础!**,若您仅希望直接安装MAA而非自行编译,请阅读[用户手册 - Linux 模拟器与容器](../manual/device/linux.md)。 ::: info 注意 -MAA 的构建方法仍在讨论中, 本教程的内容可能过时, 请以 [GitHub workflow file](https://github.com/MaaAssistantArknights/MaaAssistantArknights/blob/master/.github/workflows/ci.yml#L134) 中的脚本为准 -你也可参考 [AUR PKGBUILD](https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=maa-assistant-arknights) 或 [nixpkgs](https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/by-name/ma/maa-assistant-arknights/package.nix) +MAA 的构建方法仍在讨论中, 本教程的内容可能过时, 请以 [GitHub workflow file](https://github.com/MaaAssistantArknights/MaaAssistantArknights/blob/dev-v2/.github/workflows/ci.yml#L224#:~:text=ubuntu%3A) 中的脚本为准。 +你也可参考 [AUR PKGBUILD](https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=maa-assistant-arknights) 或 [nixpkgs](https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/by-name/ma/maa-assistant-arknights/package.nix)。 ::: ::: info @@ -80,8 +80,7 @@ Mac 可以使用 `tools/build_macos_universal.zsh` 脚本进行编译 cmake --install build --prefix ``` -4. 结束,你应该能在目录下看到构建文件了 - +4. 若需调试 MaaFwAdbController(MaaFramework 触控模式)相关功能,需要[自行编译 MaaFramework](https://maafw.com/docs/4.1-BuildGuide) 的 Debug 版本,将 `libMaaAdbControlUnit.so` 放到安装目录下。 :::: ## 集成文档 @@ -96,8 +95,6 @@ Mac 可以使用 `tools/build_macos_universal.zsh` 脚本进行编译 可参考 [CppSample](https://github.com/MaaAssistantArknights/MaaAssistantArknights/blob/master/src/Cpp/main.cpp) 中的实现 -### C Sharp - - +### C\# 可参考 [MaaWpfGui](https://github.com/MaaAssistantArknights/MaaAssistantArknights/blob/master/src/MaaWpfGui/Main/AsstProxy.cs) 中的实现 diff --git a/docs/zh-cn/manual/connection.md b/docs/zh-cn/manual/connection.md index 148e8d4355..756b76a71b 100644 --- a/docs/zh-cn/manual/connection.md +++ b/docs/zh-cn/manual/connection.md @@ -186,17 +186,28 @@ MAA 可以通过当前**正在运行的单个模拟器**自动检测并填充 AD 3. `实例编号` 填写雷电多开器内对应模拟器的编号(ID),如主多开为 `0`。 +### AVD 截图增强模式 + +需使用 Android Emulator v27.2.9 及更新版本。(只要是方舟开服之后下载的就没问题。) + +AVD 截图增强模式在 MaaFramework 中实现,必须选择 MaaFramework 触控模式才能启用 AVD 截图增强。 + +1. `设置` - `连接设置` - `连接配置` 选择 `Android 虚拟设备(AVD)`。 + +2. `触控模式` 选择 `MaaFramework`。 + ## 触控模式 1. [Minitouch](https://github.com/DeviceFarmer/minitouch):使用 C 编写的 Android 触控事件器,操作 `evdev` 设备,提供 Socket 接口供外部程序触发触控事件和手势。从 Android 10 开始,Minitouch 在 SELinux 为 `Enforcing` 模式时不再可用。[源](https://github.com/DeviceFarmer/minitouch?tab=readme-ov-file#for-android-10-and-up) 2. [MaaTouch](https://github.com/MaaAssistantArknights/MaaTouch):由 MAA 基于 Java 对 Minitouch 的重新实现,使用安卓原生的 `InputDevice`,并添加了额外特性。高版本 Android 可用性尚待测试。~~帮我们做做测试~~ 3. Adb Input:直接调用 ADB 使用安卓的 `input` 命令进行触控操作,兼容性最强,速度最慢。 +4. [MaaFramework](https://maafw.com/):调用 MaaFramework 控制单元的截图和触控功能。可用性尚待测试。~~帮我们做做测试 x2~~ ## ADB Lite 由 MAA 独立实现的 ADB Client,使用 TCP 直接与 ADB Server 通信。相较原版 ADB 可以避免不停开启多个 ADB 进程,减少性能开销,但部分截图方式不可用。[PR](https://github.com/MaaAssistantArknights/MaaAssistantArknights/pull/3315) -推荐启用,但具体优缺点尚待反馈。~~帮我们做做测试 x2~~ +推荐启用,但具体优缺点尚待反馈。~~帮我们做做测试 x3~~ ## MAA 和模拟器多开 diff --git a/docs/zh-cn/manual/device/linux.md b/docs/zh-cn/manual/device/linux.md index 3c2c4e7a02..112c7d5732 100644 --- a/docs/zh-cn/manual/device/linux.md +++ b/docs/zh-cn/manual/device/linux.md @@ -121,6 +121,8 @@ MAA WPF GUI 当前可以通过 Wine 运行。MAA 已采用自包含部署方式 推荐配置: x86_64 的框架 (R - 30 - x86_64 - Android 11.0) 配合 MAA 的 Linux x64 动态库 +额外支持[截图增强模式](../connection.md#avd-截图增强模式)。 + 注意:从 Android 10 开始,Minitouch 在 SELinux 为 `Enforcing` 模式时不再可用,请切换至其他触控模式,或将 SELinux **临时**切换为 `Permissive` 模式。 ### ⚠️ [Genymotion](https://www.genymotion.com/) diff --git a/docs/zh-cn/manual/device/macos.md b/docs/zh-cn/manual/device/macos.md index be6905bee4..2b6a916497 100644 --- a/docs/zh-cn/manual/device/macos.md +++ b/docs/zh-cn/manual/device/macos.md @@ -35,11 +35,13 @@ icon: basil:apple-solid ### ✅ [AVD](https://developer.android.com/studio/run/managing-avds) -支持,但从 Android 10 开始,Minitouch 在 SELinux 为 `Enforcing` 模式时不再可用。请切换至其他触控模式,或将 SELinux **临时**切换为 `Permissive` 模式。 +支持,且额外支持[截图增强模式](../connection.md#avd-截图增强模式)。 -### ✅ [蓝叠模拟器air版](https://www.bluestacks.com/mac) (免费,针对 Apple M 系列芯片进行优化的版本) +从 Android 10 开始,Minitouch 在 SELinux 为 `Enforcing` 模式时不再可用。请切换至其他触控模式,或将 SELinux **临时**切换为 `Permissive` 模式。 -支持,经测试,可用 maatouch 经`127.0.0.1:5555`连接。 +### ✅ [BlueStacks Air](https://www.bluestacks.com/mac) (免费,针对 Apple M 系列芯片进行优化的版本) + +支持,经测试,可使用 MaaTouch 通过 `127.0.0.1:5555` 连接。 需要在模拟器 `设置` - `高级` 中打开 `Android调试(ADB)`。 @@ -61,8 +63,10 @@ icon: basil:apple-solid 完美支持。 -补充:mac 下夜神模拟器的 ADB 二进制文件的位置为 `/Applications/NoxAppPlayer.app/Contents/MacOS/adb` ,在父目录 `MacOS` 下可使用 `adb devices` 命令查看 ADB 端口。 +补充:macOS 下夜神模拟器的 ADB 二进制文件的位置为 `/Applications/NoxAppPlayer.app/Contents/MacOS/adb` ,在父目录 `MacOS` 下可使用 `adb devices` 命令查看 ADB 端口。 ### ✅ [AVD](https://developer.android.com/studio/run/managing-avds) -支持,但从 Android 10 开始,Minitouch 在 SELinux 为 `Enforcing` 模式时不再可用。请切换至其他触控模式,或将 SELinux **临时**切换为 `Permissive` 模式。 +支持,且额外支持[截图增强模式](../connection.md#avd-截图增强模式)。 + +从 Android 10 开始,Minitouch 在 SELinux 为 `Enforcing` 模式时不再可用。请切换至其他触控模式,或将 SELinux **临时**切换为 `Permissive` 模式。 diff --git a/docs/zh-cn/manual/device/windows.md b/docs/zh-cn/manual/device/windows.md index f5113781f7..68be4bba01 100644 --- a/docs/zh-cn/manual/device/windows.md +++ b/docs/zh-cn/manual/device/windows.md @@ -72,12 +72,12 @@ const partiallySupport = shuffleArray([ { name: 'AVD', link: 'https://developer.android.com/studio/run/managing-avds', - note: '理论支持。\n\n- 从 Android 10 开始,Minitouch 在 SELinux 为 `Enforcing` 模式时不再可用,请切换至其他触控模式,或将 SELinux **临时**切换为 `Permissive` 模式。\n- AVD 是为调试而生的,更建议使用其他为游戏而设计的模拟器。', + note: '理论支持,且额外支持[截图增强模式](../connection.html#avd-截图增强模式)。\n- 从 Android 10 开始,Minitouch 在 SELinux 为 `Enforcing` 模式时不再可用,请切换至其他触控模式,或将 SELinux **临时**切换为 `Permissive` 模式。\n- AVD 是为调试而生的,更建议使用其他为游戏而设计的模拟器。', }, { name: 'Google Play 游戏(开发者)', link: 'https://developer.android.com/games/playgames/emulator?hl=zh-cn', - note: '理论支持。必须开启 Hyper-V,且必须登录谷歌账户。\n\n- 需要使用 [自定义连接](../connection.html) 的方式来连接,ADB 端口为 `6520`。\n- 由于 Android 10 及更新版本的 SELinux 策略,Minitouch 无法正常工作,请切换到其他触控模式。\n- 每次启动模拟器后的首次连接都会失败,需勾选 `连接失败后尝试关闭并重启ADB进程`。', + note: '理论支持。必须启用 Hyper-V,且必须登录谷歌账户。\n\n- 需要使用 [自定义连接](../connection.html) 的方式来连接,ADB 端口为 `6520`。\n- 由于 Android 10 及更新版本的 SELinux 策略,Minitouch 无法正常工作,请切换到其他触控模式。\n- 每次启动模拟器后的首次连接都会失败,需勾选 `连接失败后尝试关闭并重启ADB进程`。', }, ]); diff --git a/docs/zh-cn/protocol/integration.md b/docs/zh-cn/protocol/integration.md index 20cee5a0b0..46cc04f8da 100644 --- a/docs/zh-cn/protocol/integration.md +++ b/docs/zh-cn/protocol/integration.md @@ -1145,10 +1145,10 @@ bool ASSTAPI AsstSetInstanceOption(AsstHandle handle, AsstInstanceOptionKey key, 无效占位。枚举值:0。 ::: ::: field name="MinitouchEnabled" type="boolean" optional -已弃用。原为是否启用 minitouch;"1" 开,"0" 关。注意设备可能不支持。枚举值:1(已弃用)。 +已弃用。原为是否启用 Minitouch;"1" 开,"0" 关。注意设备可能不支持。枚举值:1(已弃用)。 ::: ::: field name="TouchMode" type="string" optional default="minitouch" -触控模式设置。可选值:minitouch | maatouch | adb。默认 minitouch。枚举值:2。 +触控模式设置。可选值:minitouch | maatouch | adb | MaaFwAdb。默认 minitouch。枚举值:2。 ::: ::: field name="DeploymentWithPause" type="boolean" optional 是否暂停下干员,同时影响抄作业、肉鸽、保全。可用值:"1" 或 "0"。枚举值:3。 diff --git a/docs/zh-tw/develop/development.md b/docs/zh-tw/develop/development.md index 68488133a4..7ba4c095fc 100644 --- a/docs/zh-tw/develop/development.md +++ b/docs/zh-tw/develop/development.md @@ -78,7 +78,9 @@ icon: iconoir:developer - 按 F5 執行。 ::: tip - 若需針對 Win32Controller(Windows 視窗控制)相關功能進行除錯,需要自行從 [MaaFramework Releases](https://github.com/MaaModular/MaaFramework/releases) 下載對應平台的壓縮檔案,將 `bin` 目錄中的 `MaaWin32ControlUnit.dll` 放到 MAA 的 DLL 同目錄下(例如 `build/bin/Debug`)。歡迎 PR 一個自動下載腳本! + 若需執行 Win32Controller(Windows 視窗控制)/ MaaFwAdbController(MaaFramework 觸控模式)相關功能,需要自行從 [MaaFramework Releases](https://github.com/MaaModular/MaaFramework/releases) 下載對應平台的壓縮檔案,將 `bin` 目錄中的 `MaaWin32ControlUnit.dll` / `MaaAdbControlUnit.dll` 放到 MAA 的 DLL 同目錄下(例如 `build/bin/Debug`)。歡迎 PR 一個自動下載腳本! + + 若需針對相關功能進行除錯,則需要自行編譯 MaaFramework 的 Debug 版本,使用對應的 DLL 檔案,否則在斷點除錯時會神秘閃退。 ::: 9. 到這裡,你就可以愉快地 ~~瞎雞巴改~~ 發電了 diff --git a/docs/zh-tw/develop/linux-tutorial.md b/docs/zh-tw/develop/linux-tutorial.md index 8b2e07c64a..18d5fca517 100644 --- a/docs/zh-tw/develop/linux-tutorial.md +++ b/docs/zh-tw/develop/linux-tutorial.md @@ -8,7 +8,7 @@ icon: teenyicons:linux-alt-solid **本教學需要讀者具備一定的 Linux 環境配置能力與程式設計基礎!** 若您僅希望直接安裝 MAA 而非自行編譯,請參閱[用戶手冊 - Linux 模擬器與容器](../manual/device/linux.md)。 ::: info 注意 -MAA 的建置方法仍在討論中,本教學內容可能過時,請以 [GitHub workflow file](https://github.com/MaaAssistantArknights/MaaAssistantArknights/blob/master/.github/workflows/ci.yml#L134) 中的腳本為準。 +MAA 的建置方法仍在討論中,本教學內容可能過時,請以 [GitHub workflow file](https://github.com/MaaAssistantArknights/MaaAssistantArknights/blob/dev-v2/.github/workflows/ci.yml#L224#:~:text=ubuntu%3A) 中的腳本為準。 您也可以參考 [AUR PKGBUILD](https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=maa-assistant-arknights) 或 [nixpkgs](https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/by-name/ma/maa-assistant-arknights/package.nix)。 ::: @@ -80,7 +80,7 @@ Mac 使用者可以使用 `tools/build_macos_universal.zsh` 腳本進行編譯 cmake --install build --prefix ``` -4. 結束,您現在應該能在目錄下看到建置完成的檔案了。 +4. 若需針對 MaaFwAdbController(MaaFramework 觸控模式)相關功能進行除錯,需要[自行編譯 MaaFramework](https://maafw.com/docs/4.1-BuildGuide) 的 Debug 版本,將 `libMaaAdbControlUnit.so` 放到安裝目錄下。 :::: @@ -96,8 +96,6 @@ Mac 使用者可以使用 `tools/build_macos_universal.zsh` 腳本進行編譯 可參考 [CppSample](https://github.com/MaaAssistantArknights/MaaAssistantArknights/blob/master/src/Cpp/main.cpp) 中的實作方式。 -### C Sharp - - +### C\# 可參考 [MaaWpfGui](https://github.com/MaaAssistantArknights/MaaAssistantArknights/blob/master/src/MaaWpfGui/Main/AsstProxy.cs) 中的實作方式。 diff --git a/docs/zh-tw/manual/connection.md b/docs/zh-tw/manual/connection.md index 9c56eec3d5..e3c34729f5 100644 --- a/docs/zh-tw/manual/connection.md +++ b/docs/zh-tw/manual/connection.md @@ -186,17 +186,28 @@ MAA 可以透過目前**正在執行中的單一模擬器**,自動偵測並填 3. `執行個體編號` 填寫雷電多開器內對應的模擬器序號(ID),主多開為 `0`。 +### AVD 截圖增強模式 + +需使用 Android Emulator v27.2.9 及更新版本。(只要是方舟開服之後下載的就沒問題。) + +AVD 截圖增強模式在 MaaFramework 中實現,必須選擇 MaaFramework 觸控模式才能啟用 AVD 截圖增強。 + +1. `設定` - `連線設定` - `連線配置` 選擇 `Android 虛擬裝置(AVD)`。 + +2. `觸控模式` 選擇 `MaaFramework`。 + ## 觸控模式 1. [Minitouch](https://github.com/DeviceFarmer/minitouch):基於 C 語言編寫的 Android 觸控事件驅動程式,透過操作 `evdev` 裝置,提供 Socket 介面供外部程式觸發觸控事件與手勢。自 Android 10 開始,若系統的 SELinux 為 `Enforcing`(強制)模式,Minitouch 將無法運作。[來源](https://github.com/DeviceFarmer/minitouch?tab=readme-ov-file#for-android-10-and-up) 2. [MaaTouch](https://github.com/MaaAssistantArknights/MaaTouch):由 MAA 基於 Java 對 Minitouch 的重新實作,改用 Android 原生的 `InputDevice`介面,並加入額外特性。目前在高版本 Android 上的相容性仍待測試,~~幫我們做做測試~~。 3. Adb Input:直接呼叫 ADB 執行 Android 內建的 `input` 指令來進行觸控操作。此方式的相容性最強,但執行速度最慢。 +4. [MaaFramework](https://maafw.com/):呼叫 MaaFramework 控制單元的螢幕截圖和觸控功能。可用性尚待測試。~~幫我們做做測試 x2~~ ## ADB Lite 由 MAA 獨立實現的 ADB 用戶端,使用 TCP 直接與 ADB Server 通信。相較原版 ADB 可避免頻繁開啟 ADB 程序並減少效能開銷,但部分截圖方式不支援。[PR](https://github.com/MaaAssistantArknights/MaaAssistantArknights/pull/3315) -推薦開啟,但具體表現尚待回饋。~~幫我們做做測試 x2~~ +推薦開啟,但具體表現尚待回饋。~~幫我們做做測試 x3~~ ## MAA 與模擬器多開 diff --git a/docs/zh-tw/manual/device/linux.md b/docs/zh-tw/manual/device/linux.md index af9c201be3..2cec036742 100644 --- a/docs/zh-tw/manual/device/linux.md +++ b/docs/zh-tw/manual/device/linux.md @@ -121,6 +121,8 @@ MAA WPF GUI 當前可以透過 Wine 執行。MAA 已採用自包含部署方式 推薦配置:x86_64 的架構 (R - 30 - x86_64 - Android 11.0) 配合 MAA 的 Linux x64 動態函式庫 +額外支援[截圖增強模式](../connection.md#avd-截圖增強模式)。 + 請注意:從 Android 10 開始,Minitouch 在 SELinux 為 `Enforcing` 模式時不再可用,請切換至其他觸控模式,或將 SELinux **臨時**切換為 `Permissive` 模式。 ### ⚠️ [Genymotion](https://www.genymotion.com/) diff --git a/docs/zh-tw/manual/device/macos.md b/docs/zh-tw/manual/device/macos.md index 3cf959cdb7..ff44e96f29 100644 --- a/docs/zh-tw/manual/device/macos.md +++ b/docs/zh-tw/manual/device/macos.md @@ -35,11 +35,13 @@ icon: basil:apple-solid ### ✅ [AVD](https://developer.android.com/studio/run/managing-avds) -支援,但從 Android 10 開始,Minitouch 在 SELinux 為 `Enforcing` 模式時不再可用。請切換至其他觸控模式,或將 SELinux **臨時**切換為 `Permissive` 模式。 +支援,且額外支援[截圖增強模式](../connection.md#avd-截圖增強模式)。 -### ✅ [BlueStacks 藍疊模擬器 Air 版](https://www.bluestacks.com/mac) (免費,針對 Apple M 系列晶片進行優化的版本) +從 Android 10 開始,Minitouch 在 SELinux 為 `Enforcing` 模式時不再可用。請切換至其他觸控模式,或將 SELinux **臨時**切換為 `Permissive` 模式。 -支援,經測試,可用 maatouch 透過 `127.0.0.1:5555` 連線。 +### ✅ [BlueStacks Air](https://www.bluestacks.com/mac) (免費,針對 Apple M 系列晶片進行優化的版本) + +支援,經測試,可用 MaaTouch 透過 `127.0.0.1:5555` 連線。 需要在模擬器 `設定` - `進階` 中打開 `Android 調試 (ADB)`。 @@ -61,8 +63,10 @@ icon: basil:apple-solid 完美支援。 -補充:mac 下夜神模擬器的 ADB 執行檔路徑為 `/Applications/NoxAppPlayer.app/Contents/MacOS/adb`,在父目錄 `MacOS` 下可使用 `adb devices` 指令查看 ADB 連接埠。 +補充:macOS 下夜神模擬器的 ADB 執行檔路徑為 `/Applications/NoxAppPlayer.app/Contents/MacOS/adb`,在父目錄 `MacOS` 下可使用 `adb devices` 指令查看 ADB 連接埠。 ### ✅ [AVD](https://developer.android.com/studio/run/managing-avds) -支援,但從 Android 10 開始,Minitouch 在 SELinux 為 `Enforcing` 模式時不再可用。請切換至其他觸控模式,或將 SELinux **臨時**切換為 `Permissive` 模式。 +支援,且額外支援[截圖增強模式](../connection.md#avd-截圖增強模式)。 + +從 Android 10 開始,Minitouch 在 SELinux 為 `Enforcing` 模式時不再可用。請切換至其他觸控模式,或將 SELinux **臨時**切換為 `Permissive` 模式。 diff --git a/docs/zh-tw/manual/device/windows.md b/docs/zh-tw/manual/device/windows.md index 0e248c7828..3f880b4eca 100644 --- a/docs/zh-tw/manual/device/windows.md +++ b/docs/zh-tw/manual/device/windows.md @@ -72,7 +72,7 @@ const partiallySupport = shuffleArray([ { name: 'AVD', link: 'https://developer.android.com/studio/run/managing-avds', - note: '理論支援。\n\n- 從 Android 10 開始,Minitouch 在 SELinux 為 `Enforcing` 模式時不再可用,請切換至其他觸控模式,或將 SELinux **臨時**切換為 `Permissive` 模式。\n- AVD 是為開發除錯而生的,更建議使用其他為遊戲設計的模擬器。', + note: '理論支援,且額外支援[截圖增強模式](../connection.html#avd-截圖增強模式)。\n- 從 Android 10 開始,Minitouch 在 SELinux 為 `Enforcing` 模式時不再可用,請切換至其他觸控模式,或將 SELinux **臨時**切換為 `Permissive` 模式。\n- AVD 是為開發除錯而生的,更建議使用其他為遊戲設計的模擬器。', }, { name: 'Google Play 遊戲(開發者版本)', diff --git a/docs/zh-tw/protocol/integration.md b/docs/zh-tw/protocol/integration.md index 9baf654bf5..c95ce09163 100644 --- a/docs/zh-tw/protocol/integration.md +++ b/docs/zh-tw/protocol/integration.md @@ -1145,10 +1145,10 @@ bool ASSTAPI AsstSetInstanceOption(AsstHandle handle, AsstInstanceOptionKey key, 無效佔位。列舉值:0。 ::: ::: field name="MinitouchEnabled" type="boolean" optional -已棄用。原為是否啟用 `minitouch`;"1" 開,"0" 關。請注意設備可能不支援。列舉值:1(已棄用)。 +已棄用。原為是否啟用 Minitouch;"1" 開,"0" 關。請注意設備可能不支援。列舉值:1(已棄用)。 ::: ::: field name="TouchMode" type="string" optional default="minitouch" -觸控模式設定。可選值:`minitouch` | `maatouch` | `adb`。預設為 `minitouch`。列舉值:2。 +觸控模式設定。可選值:minitouch | maatouch | adb | MaaFwAdb。預設為 minitouch。列舉值:2。 ::: ::: field name="DeploymentWithPause" type="boolean" optional 是否暫停下幹員,同時影響抄作業、肉鴿、保全派駐。可用值:"1" 或 "0"。列舉值:3。