UNPKG

appium-adb

Version:

Android Debug Bridge interface

73 lines 3.11 kB
import type { ADB } from '../adb'; import type { PortFamily, PortInfo } from './types'; /** * Get TCP port forwarding with adb on the device under test. * * @return The output of the corresponding adb command. * An array contains each forwarding line of output */ export declare function getForwardList(this: ADB): Promise<string[]>; /** * Setup TCP port forwarding with adb on the device under test. * * @param systemPort - The number of the local system port. * @param devicePort - The number of the remote device port. */ export declare function forwardPort(this: ADB, systemPort: string | number, devicePort: string | number): Promise<void>; /** * Remove TCP port forwarding with adb on the device under test. The forwarding * for the given port should be setup with {@link #forwardPort} first. * * @param systemPort - The number of the local system port * to remove forwarding on. */ export declare function removePortForward(this: ADB, systemPort: string | number): Promise<void>; /** * Get TCP port forwarding with adb on the device under test. * * @return The output of the corresponding adb command. * An array contains each forwarding line of output */ export declare function getReverseList(this: ADB): Promise<string[]>; /** * Setup TCP port forwarding with adb on the device under test. * Only available for API 21+. * * @param devicePort - The number of the remote device port. * @param systemPort - The number of the local system port. */ export declare function reversePort(this: ADB, devicePort: string | number, systemPort: string | number): Promise<void>; /** * Remove TCP port forwarding with adb on the device under test. The forwarding * for the given port should be setup with {@link #forwardPort} first. * * @param devicePort - The number of the remote device port * to remove forwarding on. */ export declare function removePortReverse(this: ADB, devicePort: string | number): Promise<void>; /** * Setup TCP port forwarding with adb on the device under test. The difference * between {@link #forwardPort} is that this method does setup for an abstract * local port. * * @param systemPort - The number of the local system port. * @param devicePort - The number of the remote device port. */ export declare function forwardAbstractPort(this: ADB, systemPort: string | number, devicePort: string | number): Promise<void>; /** * Execute ping shell command on the device under test. * * @return True if the command output contains 'ping' substring. * @throws {Error} If there was an error while executing 'ping' command on the * device under test. */ export declare function ping(this: ADB): Promise<boolean>; /** * Returns the list of TCP port states of the given family. * Could be empty if no ports are opened. * * @param family - Port family ('4' for IPv4, '6' for IPv6) * @returns Array of port information */ export declare function listPorts(this: ADB, family?: PortFamily): Promise<PortInfo[]>; //# sourceMappingURL=network-commands.d.ts.map