docs/en-us/manual/device/linux.md
Choose one of the following installation methods:
maa-cli is a simple command-line tool for MAA written in Rust. Please read the CLI User Guide for installation and usage instructions.
The MAA WPF GUI can currently be run through Wine. MAA now uses self-contained deployment with the .NET runtime included.
Install Visual C++ Redistributable:
Download and install Visual C++ Redistributable:
wine vc_redist.x64.exe
::: tip
DependencySetup_依赖库安装.bat relies on winget and Windows privilege escalation, which typically doesn't work properly in Wine, so manual installation of runtime libraries is required.
:::
Download the Windows version of MAA, extract it, and run wine MAA.exe.
::: info Note
You need to set the ADB path to the Windows version of adb.exe in the connection settings.
If you need to connect to USB devices via ADB, first run adb start-server outside of Wine to connect to the native ADB server through Wine.
:::
Download and build the MAA Wine Bridge source code, replace the Windows version with the generated MaaCore.dll (ELF file), and place the Linux native dynamic libraries (libMaaCore.so and dependencies) in the same directory.
When running MAA.exe through Wine, it will load the Linux native libraries.
::: info Note When using the Linux native MaaCore, you need to set the ADB path to the Linux native ADB in the connection settings. :::
Desktop integration provides native desktop notification support and maps fontconfig font configurations to WPF.
Place the MaaDesktopIntegration.so generated by MAA Wine Bridge in the same directory as MAA.exe to enable this feature.
winecfg or disabling desktop notifications.Hide Wine version option in winecfg for MAA to correctly detect the Wine environment.winecfg.Download and extract the Linux dynamic library from the MAA website, or install from a software repository:
Navigate to ./MAA-v{version}-linux-{architecture}/Python/ and open the sample.py file
::: tip The precompiled version includes dynamic libraries compiled on relatively new Linux distributions (Ubuntu 22.04). If your system has an older libstdc++ version, you might encounter ABI incompatibility issues. You can refer to the Linux Compilation Tutorial to recompile or use a container solution. :::
Find the line if asst.connect('adb.exe', '127.0.0.1:5554'):
ADB Tool Configuration
Android Studio's AVD emulator, it comes with ADB. You can directly specify the ADB path to replace adb.exe, typically found in $HOME/Android/Sdk/platform-tools/, for example:if asst.connect("/home/foo/Android/Sdk/platform-tools/adb", "emulator's ADB address"):
$ sudo apt install adb, then either specify the path or simply use adb if it's in your PATH environment variable.Getting the Emulator's ADB Address
$ adb_path devices, for example:$ /home/foo/Android/Sdk/platform-tools/adb devices
List of devices attached
emulator-5554 device
emulator-5554 is the emulator's ADB address. Replace 127.0.0.1:5555 with it, for example:if asst.connect("/home/foo/Android/Sdk/platform-tools/adb", "emulator-5554"):
Now you can test with $ python3 sample.py. If it returns "Connection successful," you're ready to proceed.
Custom tasks: Refer to the Integration Documentation and modify the # Task parameters can be found in docs/integration.md section in sample.py
Requirements: 16:9 screen resolution larger than 720p
Recommended configuration: x86_64 architecture (R - 30 - x86_64 - Android 11.0) with MAA's Linux x64 dynamic library
Also supports Screenshot Enhanced Mode.
Note: Starting from Android 10, Minitouch is no longer available when SELinux is in Enforcing mode. Please switch to other touch modes, or temporarily switch SELinux to Permissive mode.
High Android versions include x86_64 framework. Lightweight but tends to crash when running Arknights.
Not thoroughly tested yet, but ADB functionality and path retrieval work without issues.
::: tip The following solutions typically require specific kernel modules. Please install the appropriate modules according to your distribution and the particular solution. :::
After installation, you need to reset the resolution (to 16:9 ratio and greater than 720p, then restart):
waydroid prop set persist.waydroid.width 1280
waydroid prop set persist.waydroid.height 720
To set up ADB IP address: Go to Settings - About - IP address, note the first IP, and use ${recorded IP}:5555 in sample.py for the ADB IP.
Android 11 version images can run the game normally. Make sure to expose port 5555 for ADB.