Connection Settings

Auto Detect

M9A can automatically detect and fill in the ADB path, connection address, and connection configuration based on the single currently running emulator.

As of M9A v2.5.7, supported emulators and their connection addresses for auto-detection are:

Note

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

If detection fails, try launching M9A with UAC administrator privileges and detect again. If it still fails, please refer to the manual setup instructions below and confirm if your emulator and connection address are in the list above.

ADB Path

Note

Auto-detection uses the emulator’s ADB, but sometimes it fails. Manual setup is then required. Force Replace ADB downloads Google’s ADB and replaces the existing one. Setting up Google’s ADB yourself provides a permanent solution.

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.

Connection Address

Tip

The connection address for an emulator running on the local machine should be 127.0.0.1:<PortNumber> or emulator-<FourDigitNumber>.

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.Source
  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. Help us test it
  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.

MFAWPF/MFAAvalonia Specific Settings

ADB Extra Parameters

Generally, you don’t need to modify this; keep it as {}.

This corresponds to the "AdbDevice" "Config" field value in debug/config.json, e.g., {"extras":{"mumu":{"enable":true,"index":0,"path":"D:/Program Files/Netease/MuMu Player 12"}}} or {"extras":{"ld":{"enable":true,"index":1,"path":"C:/leidian/LDPlayer9","pid":7524}}}.

Emulator Additional Commands (Optional)

This parameter is used for automatically starting/stopping the emulator. You can find it in Settings -> Startup Settings. Configure it according to your needs.

Brand Launch Parameter
MuMu -v <instance_index>
LDPlayer index=<instance_index>

Note

<instance_index> should be replaced entirely when filling it in (index starts from 0). Pay attention to spaces.