docs/en-us/manual/connection.md
MAA can automatically detect and fill in the ADB path, connection address, and connection configuration for a single currently running emulator.
As of MAA v5.22.3, the following emulators and connection addresses are supported for detection:
127.0.0.1:5555/5556/5565/5575/5585/5595/5554127.0.0.1:16384/16416/16448/16480/16512/16544/16576emulator-5554/5556/5558/5560, 127.0.0.1:5555/5557/5559/5561127.0.0.1:62001/59865127.0.0.1:21503127.0.0.1:5555If detection fails, try launching MAA with UAC administrator privileges and detect again. If it still fails, refer to the manual setup instructions below and verify that your emulator and connection address are included in the list above.
:::info Technical details
Auto detection uses the emulator's ADB. Manual configuration is only required if auto detection fails.
Force Replace ADB will download Google's ADB and use it automatically.
If ADB is available in the environment variables, just fill in adb.
:::
Go to your emulator's installation directory. On Windows, you can right-click the process in Task Manager while the emulator is running and select Open file location.
Look for an exe file with adb in its name in the top-level or subdirectories. You can use search to find it.
:::details Examples
adb.exe HD-adb.exe adb_server.exe nox_adb.exe
:::
Download here, extract it, and select adb.exe.
We recommend extracting it directly to the MAA folder so you can enter .\platform-tools\adb.exe as the ADB path, allowing it to move with the MAA folder.
::: tip
Emulators running on your local machine should use addresses like 127.0.0.1:<port number> or emulator-<four digits>.
:::
127.0.0.1:16384emulator-5554127.0.0.1:62001127.0.0.1:21503127.0.0.1:5555. ADB path example: C:\Program Files\Tencent\Androws\Application\<version>\adb.exe.For other emulators, refer to Zhao Qingqing's blog.
::: details Alternative methods
Method 1: Check emulator ports using ADB commands
# Windows command prompt
adb devices
# Windows PowerShell
.\adb devices
Example output:
List of devices attached
127.0.0.1:<port number> device
emulator-<four digits> device
Use 127.0.0.1:<port> or emulator-<four digits> as your connection address.
Method 2: Find established ADB connections
Windows key+S to open search, type Resource Monitor and open it.Network tab and find the emulator process name in the Listening Ports name column, such as HD-Player.exe.TCP Connections name column, find adb.exe and identify the remote port matching the emulator's listening port - this is the emulator's debug port.:::
In Connection Settings, set Connection Configuration to BlueStacks, then check both Auto Detect Connection and Re-detect Each Time.
This should work in most cases. If connection still fails, you may have multiple emulator cores or issues requiring additional settings as explained below.
Bluestacks.Config.Keyword::: info Note If you're using multi-instance or have multiple emulator cores installed, you'll need additional settings to specify which emulator number to use :::
In .\config\gui.json, search for the Bluestacks.Config.Keyword field containing "bst.instance.<emulator number>.status.adb_port". Find the emulator number in the BlueStacks_nxt\Engine folder in the emulator path.
::: details Examples Nougat64 core:
"Bluestacks.Config.Keyword":"bst.instance.Nougat64.status.adb_port",
Pie64_2 core: (the number after the core name indicates a multi-instance core)
"Bluestacks.Config.Keyword": "bst.instance.Pie64_2.status.adb_port",
:::
Bluestacks.Config.Path::: info Note
MAA now attempts to read the bluestacks.conf storage location from the registry. When this fails, you need to manually specify the configuration file path
:::
Find the bluestacks.conf file in the BlueStacks data directory
C:\ProgramData\BlueStacks_nxt\bluestacks.confC:\ProgramData\BlueStacks_nxt_cn\bluestacks.confNote: C:\ProgramData is a hidden directory. If necessary, paste this address directly into the file explorer's address bar to access it.
If this is your first time, run MAA once so it automatically generates the configuration file.
First close MAA, then open gui.json, find your current configuration name under Configurations (viewable in Settings-Switch Configuration, default is Default), search for the Bluestacks.Config.Path field, and enter the full path to bluestacks.conf. (Note: use escaped backslashes \\)
::: details Example
For C:\ProgramData\BlueStacks_nxt\bluestacks.conf:
{
"Configurations": {
"Default": {
"Bluestacks.Config.Path": "C:\\ProgramData\\BlueStacks_nxt\\bluestacks.conf"
// Other configuration fields, don't manually modify
}
}
}
:::
Select the configuration matching your emulator. If not listed, choose General Configuration. If that doesn't work, try any other available configuration.
For specific differences, see the source code.
Version Requirement: Official/Arknights-specific MuMu V4.1.26 or above, or Global MuMu V5.21.3 or above. <!-- Official V3.8.13 supports initial enhanced screenshots -->
In Settings - Connection Settings, check Enable MuMu Screenshot Enhanced Mode. MAA will automatically try to get the installation path from the registry when you check this option.
Enter the path to the MuMu Player or MuMuPlayerGlobal-12.0 or YXArkNights-12.0 folder in MuMu Installation Path, e.g., C:\Program Files\Netease\MuMu Player.
If using MuMu Network Bridge, check MuMu Network Bridge Mode and manually enter the number of the corresponding emulator in the MuMu multi-instance manager, such as 0 for the main instance.
Requires official or international LDPlayer 9 V9.1.32 or newer. <!-- Official V9.0.78 supports initial enhanced screenshots but has high-resolution issues that V9.1.29 fixes -->
In Settings - Connection Settings, check Enable LD Screenshot Enhanced Mode. MAA will automatically try to get the installation path from the registry when you check this option.
Enter the path to the LDPlayer9 folder in LD Installation Path, e.g., C:\leidian\LDPlayer9\.
Enter the number (ID) of the corresponding emulator in the LDPlayer multi-instance manager in Instance Number, such as 0 for the main instance.
Requires Android Emulator v27.2.9 or newer. (You should be fine as long as you got the emulator after Arknights launched.)
AVD Screenshot Enhanced Mode is implemented in MaaFramework. Touch mode must be set accordingly for Screenshot Enhanced Mode to work.
In Settings - Connection - Connection Preset, select Android Virtual Device (AVD).
For Touch Mode, select MaaFramework.
evdev devices and provides a Socket interface for external programs to trigger touch events and gestures. Starting with Android 10, Minitouch is no longer available when SELinux is in Enforcing mode.<sup>source</sup>InputDevice and adds extra features. Compatibility with newer Android versions is still being tested. input command for touch operations. Most compatible but slowest.MAA's independent ADB Client implementation that communicates directly with the ADB Server via TCP. Compared to the original ADB, it avoids constantly launching multiple ADB processes, reducing performance overhead, but some screenshot methods aren't available.<sup>PR</sup>
We recommend enabling it, but specific pros and cons need feedback. Help us test it x3
::: info How to do it To operate multiple emulators simultaneously, copy the MAA folder multiple times and use different MAA instances, the same adb.exe, and different connection addresses to connect. :::
Using BlueStacks International as an example, here are two ways to auto-start multiple emulator instances:
Select Columns, and check Command line.Command line column, find the content after ...\Bluestacks_nxt\HD-Player.exe".--instance Nougat32) to Startup Settings - Additional Commands.::: note
After finishing, we recommend hiding the Command line column opened in Step 2 to prevent slowdowns
:::
::: details Example
Instance 1:
Emulator Path: C:\Program Files\BlueStacks_nxt\HD-Player.exe
Additional Commands: --instance Nougat32 --cmd launchApp --package "com.hypergryph.arknights"
Instance 2:
Emulator Path: C:\Program Files\BlueStacks_nxt\HD-Player.exe
Additional Commands: --instance Nougat32_1 --cmd launchApp --package "com.hypergryph.arknights.bilibili"
The --cmd launchApp --package part auto-launches the specified package after startup; modify as needed.
:::
Some emulators support creating application shortcuts that directly launch the emulator and open Arknights.
Startup Settings - Emulator Path::: details Example
Instance 1:
Emulator Path: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\BlueStacks\Instance 1.lnk
Instance 2:
Emulator Path: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\BlueStacks\Instance 2-Arknights.lnk
:::
When using Emulator Path for multi-instance operation, we recommend leaving Startup Settings -