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:

Note

The ‘/’ above means or. Please choose based on your actual situation, don’t write them all!

Emulator Documentation and Reference Addresses

For other emulators, you can refer to Zhao Qingqing’s blog post (Chinese).

Getting Multi-Instance Ports

Note

Alternative Methods

Touch Control Mode

  1. 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 in Enforcing mode.
  2. 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.
  3. 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,