Stay organized with collections Save and categorize content based on your preferences.

AdbTcpConnection

public class AdbTcpConnection
extends DefaultConnection

java.lang.Object
   ↳ com.android.tradefed.device.connection.AbstractConnection
     ↳ com.android.tradefed.device.connection.DefaultConnection
       ↳ com.android.tradefed.device.connection.AdbTcpConnection


Default connection representation of a device, assumed to be a standard adb connection of the device.

Summary

Protected constructors

AdbTcpConnection(DefaultConnection.ConnectionBuilder builder)

Public methods

String getHostName(String serial)

Return the hostname associated with the device.

String getPortNum(String serial)

Return the port number asociated with the device.

void reconnect(String serial)

Reconnect the connection to the device.

void tearDownConnection()

Clean up the connection.

Protected constructors

AdbTcpConnection

protected AdbTcpConnection (DefaultConnection.ConnectionBuilder builder)

Parameters
builder DefaultConnection.ConnectionBuilder

Public methods

getHostName

public String getHostName (String serial)

Return the hostname associated with the device. Extracted from the serial.

Parameters
serial String

Returns
String

getPortNum

public String getPortNum (String serial)

Return the port number asociated with the device. Extracted from the serial.

Parameters
serial String

Returns
String

reconnect

public void reconnect (String serial)

Reconnect the connection to the device.

Parameters
serial String: The device serial number.

Throws
DeviceNotAvailableException

tearDownConnection

public void tearDownConnection ()

Clean up the connection.