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 | |||
การเชื่อมต่อ Adb ผ่านบริดจ์ SSH
สรุป
ตัวสร้างแบบสาธารณะ | |
|---|---|
AdbSshConnection(DefaultConnection.ConnectionBuilder builder)
|
|
เมธอดสาธารณะ | |
|---|---|
HostOrchestratorUtil
|
createHostOrchestratorUtil(GceAvdInfo gceAvdInfo)
ตัวช่วยสร้างยูทิลิตีตัวจัดระเบียบโฮสต์ |
DeviceInspectionResult
|
debugDeviceNotAvailable()
ตรวจสอบ VM โฮสต์และดึงรายละเอียดเพิ่มเติมใน DeviceInspectionResult |
CommandResult
|
deleteSnapshotGce(String user, String snapshotId)
พยายามลบสแนปชอตของอินสแตนซ์ Cuttlefish |
GceAvdInfo
|
getAvdInfo()
แสดงผล |
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 |
แสดงผลลัพธ์ของคำสั่งสำหรับการพยายามลบสแนปชอต |
| การโยน | |
|---|---|
|
com.android.tradefed.targetprep.TargetSetupError |
TargetSetupError |
|
getAvdInfo
public GceAvdInfo getAvdInfo ()
แสดงผล GceAvdInfo จาก VM ระยะไกลที่สร้างขึ้น การส่งคืนโดยไม่คำนึงถึงสถานะเพื่อให้เราตรวจสอบข้อมูลได้
| คิกรีเทิร์น | |
|---|---|
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 |
|
เชื่อมต่ออีกครั้ง
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: รหัสสแนปชอต |
| คิกรีเทิร์น | |
|---|---|
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 |
|