Handshake and authenticate
Authenticate with device
Once a connection and a credential store is ready, use AdbDaemonTransport.authenticate
method to initiate the handshake and authenticate with the device.
type AdbDaemonConnection = ReadableWritablePair<
AdbPacketData,
Consumable<AdbPacketInit>
>;
interface AdbDaemonAuthenticationOptions {
serial: string;
connection: AdbDaemonConnection;
credentialStore: AdbCredentialStore;
authenticators?: AdbAuthenticator[];
features?: readonly AdbFeature[];
initialDelayedAckBytes?: number;
preserveConnection?: boolean | undefined;
readTimeLimit?: number | undefined;
}
declare class AdbDaemonTransport implements AdbTransport {
static authenticate(
options: AdbDaemonAuthenticationOptions
): Promise<AdbDaemonTransport>;
}
serial
The serial
field is not used by Tango, it helps you to identify the device associated with the transport. You can use any string to represent the device.
connection
A pair of ReadableStream<AdbPacketData>
and WritableStream<Consumable<AdbPacketInit>>
is used to send and receive ADB packets. You can use any stream implementation that conforms to the interface.