AdbSshConnection
public
class
AdbSshConnection
extends AdbTcpConnection
| java.lang.Object | ||||
| ↳ | com.android.tradefed.device.connection.AbstractConnection | |||
| ↳ | com.android.tradefed.device.connection.DefaultConnection | |||
| ↳ | com.android.tradefed.device.connection.AdbTcpConnection | |||
| ↳ | com.android.tradefed.device.connection.AdbSshConnection | |||
ssh 브리지를 통한 ADB 연결
요약
공개 생성자 | |
|---|---|
AdbSshConnection(DefaultConnection.ConnectionBuilder builder)
|
|
공개 메서드 | |
|---|---|
HostOrchestratorUtil
|
createHostOrchestratorUtil(GceAvdInfo gceAvdInfo)
호스트 오케스트레이터 유틸리티를 만드는 도우미입니다. |
DeviceInspectionResult
|
debugDeviceNotAvailable()
호스트 VM을 검사하고 DeviceInspectionResult에서 자세한 내용을 가져옵니다. |
CommandResult
|
deleteSnapshotGce(String user, String snapshotId)
Cuttlefish 인스턴스의 스냅샷 삭제 시도 |
GceAvdInfo
|
getAvdInfo()
생성된 원격 VM의 |
AbstractTunnelMonitor
|
getGceTunnelMonitor()
기기의 |
void
|
getSshBugreport()
기기에 직접 SSH를 연결하여 원격 버그 신고를 캡처합니다. |
|
getTombstones()
Cuttlefish에는 삭제된 항목을 직접 가져올 수 있는 원격 호스트로 삭제된 항목을 가져오는 특수 기능이 있습니다. |
void
|
initializeConnection()
기기 연결을 초기화합니다. |
void
|
notifyAdbRebootCalled()
doAdbReboot가 호출되면 알립니다. |
CommandResult
|
powerwash()
GCE 인스턴스 파워워시 시도 |
CommandResult
|
powerwashGce(String user, Integer offset)
GCE 인스턴스 파워워시 시도 |
void
|
reconnect(String serial)
기기에 다시 연결합니다. |
void
|
reconnectForRecovery(String serial)
복구 루틴을 위해 기기에 다시 연결합니다. |
CommandResult
|
restoreSnapshotGce(String user, Integer offset, String snapshotId)
Cuttlefish 인스턴스의 스냅샷 복원 시도 |
CommandResult
|
snapshotGce(String user, Integer offset, String snapshotId)
Cuttlefish 인스턴스 스냅샷 시도 |
void
|
tearDownConnection()
연결을 정리합니다. |
보호된 메서드 | |
|---|---|
long
|
getCurrentTime()
현재 시스템 시간을 반환합니다. |
void
|
launchGce(IBuildInfo buildInfo, MultiMap<String, String> attributes)
빌드 정보를 기반으로 실제 gce 기기를 실행합니다. |
void
|
waitForTunnelOnline(long waitTime)
터널 모니터가 실행 중인지 확인합니다. |
공개 생성자
AdbSshConnection
public AdbSshConnection (DefaultConnection.ConnectionBuilder builder)
| 매개변수 | |
|---|---|
builder |
DefaultConnection.ConnectionBuilder |
공개 메서드
createHostOrchestratorUtil
public HostOrchestratorUtil createHostOrchestratorUtil (GceAvdInfo gceAvdInfo)
호스트 오케스트레이터 유틸리티를 만드는 도우미입니다.
| 매개변수 | |
|---|---|
gceAvdInfo |
GceAvdInfo |
| 반환 값 | |
|---|---|
HostOrchestratorUtil |
|
debugDeviceNotAvailable
public DeviceInspectionResult debugDeviceNotAvailable ()
호스트 VM을 검사하고 DeviceInspectionResult에서 자세한 내용을 가져옵니다.
| 반환 값 | |
|---|---|
DeviceInspectionResult |
DeviceInspectionResult |
deleteSnapshotGce
public CommandResult deleteSnapshotGce (String user, String snapshotId)
Cuttlefish 인스턴스의 스냅샷 삭제 시도
| 매개변수 | |
|---|---|
user |
String: AVD를 실행하는 호스트 사용자입니다. 해당하지 않는 경우 null입니다. |
snapshotId |
String |
| 반환 값 | |
|---|---|
CommandResult |
스냅샷 삭제 시도의 CommandResult를 반환합니다. |
| 생성 값 | |
|---|---|
|
com.android.tradefed.targetprep.TargetSetupError |
TargetSetupError |
|
getAvdInfo
public GceAvdInfo getAvdInfo ()
생성된 원격 VM의 GceAvdInfo를 반환합니다. Google에서 정보를 검사할 수 있도록 상태와 관계없이 반환합니다.
| 반환 값 | |
|---|---|
GceAvdInfo |
|
getGceTunnelMonitor
public AbstractTunnelMonitor getGceTunnelMonitor ()
기기의 AbstractTunnelMonitor를 반환합니다.
| 반환 값 | |
|---|---|
AbstractTunnelMonitor |
|
getSshBugreport
public void getSshBugreport ()
기기에 직접 SSH를 연결하여 원격 버그 신고를 캡처합니다.
getTombstones
publicgetTombstones ()
Cuttlefish에는 삭제된 항목을 직접 가져올 수 있는 원격 호스트로 삭제된 항목을 가져오는 특수 기능이 있습니다.
| 반환 값 | |
|---|---|
|
|
initializeConnection
public void initializeConnection ()
기기 연결을 초기화합니다.
| 생성 값 | |
|---|---|
DeviceNotAvailableException |
|
TargetSetupError |
|
notifyAdbRebootCalled
public void notifyAdbRebootCalled ()
doAdbReboot가 호출되면 알립니다.
초기화
public CommandResult powerwash ()
GCE 인스턴스 파워워시 시도
| 반환 값 | |
|---|---|
CommandResult |
파워워시 시도의 CommandResult를 반환합니다. |
| 생성 값 | |
|---|---|
|
com.android.tradefed.targetprep.TargetSetupError |
TargetSetupError |
|
powerwashGce
public CommandResult powerwashGce (String user, Integer offset)
GCE 인스턴스 파워워시 시도
| 매개변수 | |
|---|---|
user |
String: AVD를 실행하는 호스트 사용자입니다. 해당하지 않는 경우 null입니다. |
offset |
Integer: 호스트의 AVD 기기 번호 오프셋입니다. 해당하지 않는 경우 null입니다. |
| 반환 값 | |
|---|---|
CommandResult |
파워워시 시도의 CommandResult를 반환합니다. |
| 생성 값 | |
|---|---|
|
com.android.tradefed.targetprep.TargetSetupError |
TargetSetupError |
|
reconnect
public void reconnect (String serial)
기기에 다시 연결합니다.
| 매개변수 | |
|---|---|
serial |
String: 기기 일련번호입니다. |
| 생성 값 | |
|---|---|
DeviceNotAvailableException |
|
reconnectForRecovery
public void reconnectForRecovery (String serial)
복구 루틴을 위해 기기에 다시 연결합니다.
| 매개변수 | |
|---|---|
serial |
String: 기기 일련번호입니다. |
| 생성 값 | |
|---|---|
DeviceNotAvailableException |
|
restoreSnapshotGce
public CommandResult restoreSnapshotGce (String user, Integer offset, String snapshotId)
Cuttlefish 인스턴스의 스냅샷 복원 시도
| 매개변수 | |
|---|---|
user |
String: AVD를 실행하는 호스트 사용자입니다. 해당하지 않는 경우 null입니다. |
offset |
Integer: 호스트의 AVD 기기 번호 오프셋입니다(해당하지 않는 경우 null). |
snapshotId |
String: 스냅샷 ID |
| 반환 값 | |
|---|---|
CommandResult |
스냅샷 복원 시도의 CommandResult를 반환합니다. |
| 생성 값 | |
|---|---|
|
com.android.tradefed.targetprep.TargetSetupError |
TargetSetupError |
|
snapshotGce
public CommandResult snapshotGce (String user, Integer offset, String snapshotId)
Cuttlefish 인스턴스 스냅샷 시도
| 매개변수 | |
|---|---|
user |
String: AVD를 실행하는 호스트 사용자입니다. 해당하지 않는 경우 null입니다. |
offset |
Integer: 호스트의 AVD 기기 번호 오프셋입니다. 해당하지 않는 경우 null입니다. |
snapshotId |
String |
| 반환 값 | |
|---|---|
CommandResult |
스냅샷 시도의 CommandResult를 반환합니다. |
| 생성 값 | |
|---|---|
|
com.android.tradefed.targetprep.TargetSetupError |
TargetSetupError |
|
tearDownConnection
public void tearDownConnection ()
연결을 정리합니다.
보호된 메서드
getCurrentTime
protected long getCurrentTime ()
현재 시스템 시간을 반환합니다. 테스트를 위해 노출됩니다.
| 반환 값 | |
|---|---|
long |
|
launchGce
protected void launchGce (IBuildInfo buildInfo, MultiMap<String, String> attributes)
빌드 정보를 기반으로 실제 gce 기기를 실행합니다.
| 매개변수 | |
|---|---|
buildInfo |
IBuildInfo |
attributes |
MultiMap |
| 생성 값 | |
|---|---|
TargetSetupError |
|
waitForTunnelOnline
protected void waitForTunnelOnline (long waitTime)
터널 모니터가 실행 중인지 확인합니다.
| 매개변수 | |
|---|---|
waitTime |
long |
| 생성 값 | |
|---|---|
DeviceNotAvailableException |
|