Connection Settings
Auto Detect
M9A can automatically detect ADB provided by running emulators and automatically fill in the ADB path, connection address, and connection configuration.
When detection fails, if you confirm that the emulator and connection address you are using are correct, please try launching M9A with UAC administrator privileges and detect again. If it still fails, please manually configure.
Manual Configuration
Complete connection settings should include ADB path and ADB address. Other optional settings include touch control mode, emulator multi-instance, ADB extra parameters, etc.
ADB Path
ADB path refers to the path of the ADB executable file required for M9A to connect to the emulator. ADB executable files are generally provided by emulators, but you can also install Google’s ADB yourself.
Using ADB Provided by Emulator
Navigate to the emulator’s installation path. On Windows, you can right-click the emulator process in Task Manager while it’s running and select Open file location
.
There should be an .exe
file with adb
in its name in the top-level or a sub-directory. You can use the search function, then select it.
Note
Some examples:
adb.exe
HD-adb.exe
adb_server.exe
nox_adb.exe
Using ADB Provided by Google
Click to download, extract the archive, and then select adb.exe
from within.
It’s recommended to extract it directly into the M9A folder. This allows you to simply enter .\platform-tools\adb.exe
as the ADB path, and it can be moved together with the M9A folder.
ADB Address
ADB addresses running on the local machine should be 127.0.0.1:<PortNumber>
or emulator-<FourDigitNumber>
.
Supported emulators and connection addresses are as follows:
- MuMu Player 12:
127.0.0.1:16384/16416/16448/16480/16512/16544/16576
- LDPlayer 9:
emulator-5554/5556/5558/5560
,127.0.0.1:5555/5557/5559/5561
- BlueStacks 5:
127.0.0.1:5555/5556/5565/5575/5585/5595/5554
- NoxPlayer:
127.0.0.1:62001/59865
- MEmu Player:
127.0.0.1:21503
Note
The ‘/’ above means or. Please choose based on your actual situation, don’t write them all!
Emulator Documentation and Reference Addresses
- Bluestacks 5
127.0.0.1:5555
- MuMu Player Pro
127.0.0.1:16384
- MuMu Player 12
127.0.0.1:16384
- LDPlayer 9
emulator-5554
- NoxPlayer
127.0.0.1:62001
- MEmu Player
127.0.0.1:21503
For other emulators, you can refer to Zhao Qingqing’s blog post (Chinese).
Getting Multi-Instance Ports
- MuMu 12 Multi-instance manager shows the ports of running instances in the top right corner.
- Bluestacks 5 emulator settings allow viewing the current instance’s port.
- To be supplemented
Note
Alternative Methods
-
Method 1: Use ADB command to view emulator ports
- Start one emulator and ensure no other Android devices are connected to the computer.
- Open a terminal in the folder containing the ADB executable.
- Execute the following command.
# Windows Command Prompt adb devices # Windows PowerShell .\adb devices
Example output:
List of devices attached 127.0.0.1:<PortNumber> device emulator-<FourDigitNumber> device
Use
127.0.0.1:<PortNumber>
oremulator-<FourDigitNumber>
as the connection address. -
Method 2: Find established ADB connections (Windows)
- Perform Method 1.
- Press
Win+S
, typeResource Monitor
, and open it. - Switch to the
Network
tab. In theListening Ports
section, find the emulator process name (e.g.,HD-Player.exe
) in the Image column. - Note down all listening ports for the emulator process.
- In the
TCP Connections
section, findadb.exe
in the Image column. The port listed in theRemote Port
column that matches one of the emulator’s listening ports is the emulator’s debug port.
Touch Control Mode
- Minitouch: An Android touch event injector written in C. It operates
evdev
devices and provides a socket interface for external programs to trigger touch events and gestures. Starting from Android 10, Minitouch is no longer available when SELinux is inEnforcing
mode. - MaaTouch: A reimplementation of Minitouch in Java by MAA, using the native Android
InputDevice
and adding extra features. Usability on higher Android versions is yet to be tested. - Adb Input: Directly calls ADB to use Android’s
input
command for touch operations. It offers the highest compatibility but is the slowest.
M9A and Emulator Multi-Instance
Note
If you need to run multiple emulator instances simultaneously, you can copy the M9A folder multiple times. Use different M9A instances, the same adb.exe, and different connection addresses to connect to each emulator instance.
ADB Extra Parameters
This setting only exists in MFAWPF/MFAAvalonia.
Generally, you don’t need to modify this; keep it as {}
.
This corresponds to the "AdbDevice"
"Config"
field value in debug/config.json
,