Skip to main content
Version: 1.1.0

createDeviceConnection

namespace AdbServerClient {
interface Socket extends AdbSocket {
transportId: bigint;
}
}

declare class AdbServerClient {
createDeviceConnection(
device: AdbServerClient.DeviceSelector,
service: string
): Promise<AdbServerClient.Socket>;
}

Creates a socket to the ADB daemon on the device, letting the server forward packets between the client and the device.

Parameters​

device​

A device selector.

Using selectors other than transport IDs requires server version 41 or higher. Transport ID selectors are recommended anyway.

service​

An ADB command, or a socket address on device to connect to.

Remarks​

Usually you don't need to call this method directly. createTransport method uses it internally to implement AdbTransport.

Equivalent ADB Command

There is no equivalent ADB command.