원격Android가상장치
public class RemoteAndroidVirtualDevice
extends RemoteAndroidDevice
implements ITestLoggerReceiver
java.lang.Object | ||||
↳ | 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
동작을 확장합니다. 장치 일련번호가 다음 형식으로 되어 있다고 가정합니다.
요약
공개 생성자 | |
---|---|
RemoteAndroidVirtualDevice (IDevice device, IDeviceStateMonitor stateMonitor, IDeviceMonitor allocationMonitor) |
공개 메소드 | |
---|---|
GceAvdInfo | getAvdInfo () 생성된 원격 VM에서 |
DeviceDescriptor | getDeviceDescriptor () |
getTombstones () Cuttlefish에는 삭제 표시를 원격 호스트로 가져와서 직접 얻을 수 있는 특별한 기능이 있습니다. | |
void | postBootSetup () {@상속 } |
void | postInvocationTearDown (Throwable exception) |
boolean | powerwashGce () GCE 인스턴스 파워워시 시도 |
void | preInvocationSetup (IBuildInfo info, MultiMap<String, String> attributes) |
void | recoverDevice () 장치 통신을 복구하려고 시도합니다. |
void | setGceSshMonitor ( GceSshTunnelMonitor gceSshMonitor) 장치의 내부 |
void | setTestLogger (ITestLogger testLogger) |
보호된 방법 | |
---|---|
void | doAdbReboot ( NativeDevice.RebootMode rebootMode, String reason) adb 재부팅을 수행합니다. |
long | getCurrentTime () 현재 시스템 시간을 반환합니다. |
GceSshTunnelMonitor | getGceSshMonitor () 장치의 |
void | launchGce (IBuildInfo buildInfo, MultiMap<String, String> attributes) 빌드 정보를 기반으로 실제 gce 장치를 실행합니다. |
void | waitForTunnelOnline (long waitTime) 터널 모니터가 실행 중인지 확인하세요. |
공개 생성자
원격Android가상장치
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 |
getDeviceDescriptor
public DeviceDescriptor getDeviceDescriptor ()
보고 | |
---|---|
DeviceDescriptor |
getTombstones
publicgetTombstones ()
Cuttlefish에는 삭제 표시를 원격 호스트로 가져와서 직접 얻을 수 있는 특별한 기능이 있습니다.
보고 | |
---|---|
던지기 | |
---|---|
DeviceNotAvailableException |
postBoot설정
public void postBootSetup ()
{@상속 }
던지기 | |
---|---|
DeviceNotAvailableException |
postInvocationTearDown
public void postInvocationTearDown (Throwable exception)
매개변수 | |
---|---|
exception | Throwable |
파워워시Gce
public boolean powerwashGce ()
GCE 인스턴스 파워워시 시도
보고 | |
---|---|
boolean | Powerwash Gce가 성공하면 true를 반환합니다. |
던지기 | |
---|---|
| com.android.tradefed.targetprep.TargetSetupError |
DeviceNotAvailableException | |
TargetSetupError |
사전 호출 설정
public void preInvocationSetup (IBuildInfo info, MultiMap<String, String> attributes)
매개변수 | |
---|---|
info | IBuildInfo |
attributes | MultiMap |
던지기 | |
---|---|
DeviceNotAvailableException | |
TargetSetupError |
복구 장치
public void recoverDevice ()
장치 통신을 복구하려고 시도합니다.
던지기 | |
---|---|
DeviceNotAvailableException |
setGceSsh모니터
public void setGceSshMonitor (GceSshTunnelMonitor gceSshMonitor)
장치의 내부 GceSshTunnelMonitor
재정의합니다.
매개변수 | |
---|---|
gceSshMonitor | GceSshTunnelMonitor |
setTestLogger
public void setTestLogger (ITestLogger testLogger)
매개변수 | |
---|---|
testLogger | ITestLogger |
보호된 방법
doAdbReboot
protected void doAdbReboot (NativeDevice.RebootMode rebootMode, String reason)
adb 재부팅을 수행합니다.
매개변수 | |
---|---|
rebootMode | NativeDevice.RebootMode : 이 재부팅 모드입니다. |
reason | String : 이번 재부팅을 위한 것입니다. |
던지기 | |
---|---|
DeviceNotAvailableException |
getCurrentTime
protected long getCurrentTime ()
현재 시스템 시간을 반환합니다. 테스트를 위해 노출되었습니다.
보고 | |
---|---|
long |
getGceSsh모니터
protected GceSshTunnelMonitor getGceSshMonitor ()
장치의 GceSshTunnelMonitor
반환합니다. 테스트를 위해 노출되었습니다.
보고 | |
---|---|
GceSshTunnelMonitor |
발사Gce
protected void launchGce (IBuildInfo buildInfo, MultiMap<String, String> attributes)
빌드 정보를 기반으로 실제 gce 장치를 실행합니다.
매개변수 | |
---|---|
buildInfo | IBuildInfo |
attributes | MultiMap |
던지기 | |
---|---|
TargetSetupError |
waitForTunnelOnline
protected void waitForTunnelOnline (long waitTime)
터널 모니터가 실행 중인지 확인하세요.
매개변수 | |
---|---|
waitTime | long |
던지기 | |
---|---|
DeviceNotAvailableException |