원격AndroidVirtualDevice

public class RemoteAndroidVirtualDevice
extends RemoteAndroidDevice

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


Google Compute Engine(Gce)에서 실행되는 전체 스택 Android 기기에 대한 RemoteAndroidDevice 동작을 확장합니다. 디바이스 시리얼이 다음 형식일 것이라고 가정합니다. : adb에서.

요약

공개 생성자

RemoteAndroidVirtualDevice (IDevice device, IDeviceStateMonitor stateMonitor, IDeviceMonitor allocationMonitor)

RemoteAndroidVirtualDevice 생성합니다.

공개 방법

GceAvdInfo getAvdInfo ()

생성된 원격 VM에서 GceAvdInfo 반환합니다.

GceAvdInfo getAvdInfoAnyState ()

생성된 원격 VM에서 GceAvdInfo 반환합니다.

DeviceDescriptor getDeviceDescriptor ()

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

GceSshTunnelMonitor getGceSshMonitor ()

장치의 GceSshTunnelMonitor 반환합니다.

getTombstones ()

Cuttlefish는 삭제 표시를 직접 가져올 수 있는 원격 호스트로 가져오는 특수 기능이 있습니다.

void postBootSetup ()

{@상속 }

void postInvocationTearDown (Throwable exception)

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

CommandResult powerwash ()

GCE 인스턴스 파워워시 시도

CommandResult powerwashGce (String user, Integer offset)

GCE 인스턴스 파워워시 시도

boolean powerwashGce ()

GCE 인스턴스 파워워시 시도

void preInvocationSetup ( IBuildInfo info, MultiMap <String, String> attributes)

호출 흐름 이전에 장치에서 실행될 장치별 필수 설정을 위한 추가 단계입니다.

boolean recoverDevice ()

장치 통신 복구를 시도합니다.

void setAvdInfo ( GceAvdInfo gceAvdInfo)

실행된 장치에 대한 GceAvdInfo 설정합니다.

void setGceSshMonitor ( GceSshTunnelMonitor gceSshMonitor)

기기의 내부 GceSshTunnelMonitor 재정의합니다.

보호된 메서드

void doAdbReboot ( NativeDevice.RebootMode rebootMode, String reason)

adb 재부팅을 수행합니다.

long getCurrentTime ()

현재 시스템 시간을 반환합니다.

void launchGce ( IBuildInfo buildInfo, MultiMap <String, String> attributes)

빌드 정보를 기반으로 실제 gce 기기를 실행합니다.

void postAdbReboot ()

재부팅 후 수행할 수 있는 가능한 추가 작업입니다.

void waitForTunnelOnline (long waitTime)

터널 모니터가 실행 중인지 확인하십시오.

공개 생성자

원격AndroidVirtualDevice

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

RemoteAndroidVirtualDevice 생성합니다.

매개변수
device IDevice : 연관된 IDevice

stateMonitor IDeviceStateMonitor : 사용할 IDeviceStateMonitor 메커니즘

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

공개 방법

getAvdInfo

public GceAvdInfo getAvdInfo ()

생성된 원격 VM에서 GceAvdInfo 반환합니다. 불러오기에 실패하면 null을 반환합니다.

보고
GceAvdInfo

getAvdInfoAnyState

public GceAvdInfo getAvdInfoAnyState ()

생성된 원격 VM에서 GceAvdInfo 반환합니다. 정보를 검사할 수 있도록 상태와 상관없이 반환됩니다.

보고
GceAvdInfo

getDeviceDescriptor

public DeviceDescriptor getDeviceDescriptor ()

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

보고
DeviceDescriptor

getGceSsh모니터

public GceSshTunnelMonitor getGceSshMonitor ()

장치의 GceSshTunnelMonitor 반환합니다.

보고
GceSshTunnelMonitor

getTombstones

public  getTombstones ()

Cuttlefish는 삭제 표시를 직접 가져올 수 있는 원격 호스트로 가져오는 특수 기능이 있습니다.

보고
삭제 표시 파일 목록, 삭제 표시가 없으면 비어 있습니다.

던지기
DeviceNotAvailableException

postBootSetup

public void postBootSetup ()

{@상속 }

던지기
DeviceNotAvailableException

postInvocationTearDown

public void postInvocationTearDown (Throwable exception)

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

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

파워워시

public CommandResult powerwash ()

GCE 인스턴스 파워워시 시도

보고
CommandResult powerwash 시도의 CommandResult를 반환합니다.

던지기
com.android.tradefed.targetprep.TargetSetupError
TargetSetupError

파워워시Gce

public CommandResult powerwashGce (String user, 
                Integer offset)

GCE 인스턴스 파워워시 시도

매개변수
user String : AVD의 호스트 실행 사용자, 해당되지 않는 경우 null .

offset Integer : 호스트에서 AVD의 장치 번호 오프셋, 적용되지 않는 경우 null

보고
CommandResult powerwash 시도의 CommandResult를 반환합니다.

던지기
com.android.tradefed.targetprep.TargetSetupError
TargetSetupError

파워워시Gce

public boolean powerwashGce ()

GCE 인스턴스 파워워시 시도

보고
boolean powerwash 시도의 CommandResult를 반환합니다.

던지기
TargetSetupError

사전 호출 설정

public void preInvocationSetup (IBuildInfo info, 
                MultiMap<String, String> attributes)

호출 흐름 이전에 장치에서 실행될 장치별 필수 설정을 위한 추가 단계입니다.

매개변수
info IBuildInfo : 장치의 IBuildInfo 입니다.

attributes MultiMap : 호출 컨텍스트에 저장된 속성

던지기
DeviceNotAvailableException
TargetSetupError

복구 장치

public boolean recoverDevice ()

장치 통신 복구를 시도합니다.

보고
boolean 복구를 시도하고 성공한 경우 True, 복구를 건너뛴 경우 False를 반환합니다.

던지기
DeviceNotAvailableException

setAvdInfo

public void setAvdInfo (GceAvdInfo gceAvdInfo)

실행된 장치에 대한 GceAvdInfo 설정합니다.

매개변수
gceAvdInfo GceAvdInfo

던지기
TargetSetupError

setGceSsh모니터

public void setGceSshMonitor (GceSshTunnelMonitor gceSshMonitor)

기기의 내부 GceSshTunnelMonitor 재정의합니다.

매개변수
gceSshMonitor GceSshTunnelMonitor

보호된 메서드

doAdbReboot

protected void doAdbReboot (NativeDevice.RebootMode rebootMode, 
                String reason)

adb 재부팅을 수행합니다.

매개변수
rebootMode NativeDevice.RebootMode : 이 재부팅의 모드입니다.

reason String : 이 재부팅을 위해.

던지기
DeviceNotAvailableException

getCurrentTime

protected long getCurrentTime ()

현재 시스템 시간을 반환합니다. 테스트를 위해 노출되었습니다.

보고
long

launchGce

protected void launchGce (IBuildInfo buildInfo, 
                MultiMap<String, String> attributes)

빌드 정보를 기반으로 실제 gce 기기를 실행합니다.

매개변수
buildInfo IBuildInfo

attributes MultiMap

던지기
TargetSetupError

postAdbReboot

protected void postAdbReboot ()

재부팅 후 수행할 수 있는 가능한 추가 작업입니다.

던지기
DeviceNotAvailableException

waitForTunnelOnline

protected void waitForTunnelOnline (long waitTime)

터널 모니터가 실행 중인지 확인하십시오.

매개변수
waitTime long

던지기
DeviceNotAvailableException