list
interface AdbForwardListener {
deviceSerial: string;
localName: string;
remoteName: string;
}
declare class AdbReverseCommand {
list(): Promise<AdbForwardListener[]>;
}
The returned AdbForwardListener
objects contain the following fields:
deviceSerial
: The serial number of current ADB Client, in the view of the ADB Daemon. For example, it might beUsbFfs
for USB connections.localName
: Socket address listening on deviceremoteName
: Socket address to forward to on host
Equivalent ADB command
adb reverse --list
Example
const listeners = await adb.reverse.list();
for (const listener of listeners) {
console.log(listener.localName, listener.remoteName);
}