Skip to main content
Version: 0.0.24

createTransport

declare class AdbServerTransport implements AdbTransport {}

declare class AdbServerClient {
createTransport(
device: AdbServerClient.DeviceSelector
): Promise<AdbServerTransport>;
}

Creates an AdbTransport object for the device. It's not one server command, it uses multiple server commands internally to implement the transport.

The returned transport object can be used to construct an Adb instance:

import { Adb } from "@yume-chan/adb";

const transport: AdbServerTransport = await client.createTransport({
transportId: 123n,
});
const adb: Adb = new Adb(transport);