Table of Contents

Method ToAdbController

Namespace
MaaFramework.Binding
Assembly
MaaFramework.Binding.Native.dll

ToAdbController(AdbDeviceInfo, string?, string?, AdbScreencapMethods, AdbInputMethods, string?, string, LinkOption, CheckStatusOption)

Converts a MaaFramework.Binding.AdbDeviceInfo to a MaaFramework.Binding.MaaAdbController.

public static MaaAdbController ToAdbController(this AdbDeviceInfo info, string? adbPath = null, string? adbSerial = null, AdbScreencapMethods screencapMethods = AdbScreencapMethods.None, AdbInputMethods inputMethods = AdbInputMethods.None, string? config = null, string agentPath = "./MaaAgentBinary", LinkOption link = LinkOption.Start, CheckStatusOption check = CheckStatusOption.ThrowIfNotSucceeded)

Parameters

info AdbDeviceInfo

The AdbDeviceInfo.

adbPath string?

The new adb path.

adbSerial string?

The new adb serial.

screencapMethods AdbScreencapMethods

The screencap methods.

inputMethods AdbInputMethods

The input methods.

config string?

The new adb config.

agentPath string

The new path of agent directory. Default is "./MaaAgentBinary" if package "Maa.Framework" or "Maa.AgentBinary" is used.

link LinkOption

Executes MaaFramework.Binding.MaaController.LinkStart if MaaFramework.Binding.LinkOption.Start; otherwise, not link.

check CheckStatusOption

Checks LinkStart().Wait() status if MaaFramework.Binding.CheckStatusOption.ThrowIfNotSucceeded; otherwise, not check.

Returns

MaaAdbController

A MaaAdbController.

Exceptions

ArgumentNullException