원격안드로이드장치

public class RemoteAndroidDevice
extends TestDevice

java.lang.객체
com.android.tradefed.device.NativeDevice
com.android.tradefed.device.TestDevice
com.android.tradefed.device.RemoteAndroidDevice


adb connect를 통해 연결된 전체 스택 Android 기기용 ITestDevice 구현입니다. 디바이스 시리얼이 다음 형식일 것이라고 가정합니다. : adb에서.

요약

상수

long DEFAULT_SHORT_CMD_TIMEOUT

int MAX_RETRIES

long RETRY_INTERVAL_MS

long WAIT_FOR_ADB_CONNECT

공개 생성자

RemoteAndroidDevice (IDevice device, IDeviceStateMonitor stateMonitor, IDeviceMonitor allocationMonitor)

RemoteAndroidDevice 생성합니다.

공개 방법

static boolean checkSerialFormatValid (String serialString)

직렬의 형식이 예상대로인지 확인하십시오. :포트

DeviceDescriptor getDeviceDescriptor ()

장치 정보에서 DeviceDescriptor 반환하여 실제 장치 개체를 전달하지 않고 장치에 대한 정보를 가져옵니다.

Integer getInitialDeviceNumOffset ()

있는 경우 알려진 장치 번호 오프셋을 반환합니다.

String getInitialIp ()

있는 경우 장치에 초기 관련 IP를 반환합니다.

String getInitialSerial ()

장치의 초기 일련 이름을 반환합니다.

String getInitialUser ()

있는 경우 초기 알려진 사용자를 반환합니다.

String getMacAddress ()

장치의 MAC 주소를 반환하며, 장치에서 쿼리에 실패하면 null을 반환합니다.

boolean isEncryptionSupported ()

장치에서 암호화가 지원되는지 여부를 반환합니다.

void postInvocationTearDown (Throwable exception)

호출이 완료된 후 실행될 장치별 필수 정리를 위한 추가 단계입니다.

void setAdbLogFile (File adbLogFile)

디버깅 목적으로 모든 adb 연결 로그를 저장할 수 있는 수신기 파일을 제공합니다.

상수

DEFAULT_SHORT_CMD_TIMEOUT

protected static final long DEFAULT_SHORT_CMD_TIMEOUT

상수 값: 20000(0x0000000000004e20)

MAX_RETRIES

protected static final int MAX_RETRIES

상수 값: 5(0x00000005)

RETRY_INTERVAL_MS

protected static final long RETRY_INTERVAL_MS

상수 값: 5000(0x0000000000001388)

WAIT_FOR_ADB_CONNECT

public static final long WAIT_FOR_ADB_CONNECT

상수 값: 120000(0x000000000001d4c0)

공개 생성자

원격안드로이드장치

public RemoteAndroidDevice (IDevice device, 
                IDeviceStateMonitor stateMonitor, 
                IDeviceMonitor allocationMonitor)

RemoteAndroidDevice 생성합니다.

매개변수
device IDevice : 연관된 IDevice

stateMonitor IDeviceStateMonitor : 사용할 IDeviceStateMonitor 메커니즘

allocationMonitor IDeviceMonitor : 할당 상태 변경을 알리는 IDeviceMonitor .

공개 방법

checkSerialFormat유효

public static boolean checkSerialFormatValid (String serialString)

직렬의 형식이 예상대로인지 확인하십시오. :포트

매개변수
serialString String

보고
boolean 형식이 유효하면 true, 그렇지 않으면 false입니다.

getDeviceDescriptor

public DeviceDescriptor getDeviceDescriptor ()

장치 정보에서 DeviceDescriptor 반환하여 실제 장치 개체를 전달하지 않고 장치에 대한 정보를 가져옵니다.

보고
DeviceDescriptor

getInitialDeviceNumOffset

public Integer getInitialDeviceNumOffset ()

있는 경우 알려진 장치 번호 오프셋을 반환합니다. 사용할 수 없는 경우 null을 반환합니다.

보고
Integer

getInitialIp

public String getInitialIp ()

있는 경우 장치에 초기 관련 IP를 반환합니다. 알려진 초기 IP가 없으면 null을 반환합니다.

보고
String

getInitialSerial

public String getInitialSerial ()

장치의 초기 일련 이름을 반환합니다.

보고
String

getInitialUser

public String getInitialUser ()

있는 경우 초기 알려진 사용자를 반환합니다. 알려진 초기 사용자가 없으면 null을 반환합니다.

보고
String

getMacAddress

public String getMacAddress ()

장치의 MAC 주소를 반환하며, 장치에서 쿼리에 실패하면 null을 반환합니다.

보고
String

isEncryptionSupported

public boolean isEncryptionSupported ()

장치에서 암호화가 지원되는지 여부를 반환합니다.

보고
boolean 장치가 암호화를 지원하는 경우 true .

postInvocationTearDown

public void postInvocationTearDown (Throwable exception)

호출이 완료된 후 실행될 장치별 필수 정리를 위한 추가 단계입니다.

매개변수
exception Throwable : 있는 경우 호출 실패로 인해 발생한 최종 예외입니다.

setAdbLogFile

public void setAdbLogFile (File adbLogFile)

디버깅 목적으로 모든 adb 연결 로그를 저장할 수 있는 수신기 파일을 제공합니다.

매개변수
adbLogFile File