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) |
วิธีการสาธารณะ | |
---|---|
GceAvdInfo | getAvdInfo () ส่งคืน |
AbstractTunnelMonitor | getGceTunnelMonitor () ส่งคืน |
void | getSshBugreport () บันทึกรายงานข้อบกพร่องระยะไกลโดย ssh-ing ลงในอุปกรณ์โดยตรง |
getTombstones () ปลาหมึกมีคุณสมบัติพิเศษที่จะนำศิลาจารึกหลุมศพไปยังโฮสต์ระยะไกลซึ่งเราสามารถรับพวกมันได้โดยตรง | |
void | initializeConnection () เริ่มต้นการเชื่อมต่อของอุปกรณ์ |
void | notifyAdbRebootCalled () แจ้งเตือนเมื่อมีการเรียก doAdbReboot |
CommandResult | powerwash () พยายาม Powerwash อินสแตนซ์ GCE |
CommandResult | powerwashGce (String user, Integer offset) พยายาม Powerwash อินสแตนซ์ 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) พยายามจับภาพตัวอย่างปลาหมึก |
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 |
วิธีการสาธารณะ
getAvdInfo
public GceAvdInfo getAvdInfo ()
ส่งคืน GceAvdInfo
จาก VM ระยะไกลที่สร้างขึ้น คืนสินค้าโดยไม่คำนึงถึงสถานะเพื่อให้เราตรวจสอบข้อมูลได้
การส่งคืน | |
---|---|
GceAvdInfo |
getGceTunnelMonitor.getGceTunnelMonitor
public AbstractTunnelMonitor getGceTunnelMonitor ()
ส่งคืน AbstractTunnelMonitor
ของอุปกรณ์
การส่งคืน | |
---|---|
AbstractTunnelMonitor |
getSshBugreport
public void getSshBugreport ()
บันทึกรายงานข้อบกพร่องระยะไกลโดย ssh-ing ลงในอุปกรณ์โดยตรง
รับTombstones
publicgetTombstones ()
ปลาหมึกมีคุณสมบัติพิเศษที่จะนำศิลาจารึกหลุมศพไปยังโฮสต์ระยะไกลซึ่งเราสามารถรับพวกมันได้โดยตรง
การส่งคืน | |
---|---|
เริ่มต้นการเชื่อมต่อ
public void initializeConnection ()
เริ่มต้นการเชื่อมต่อของอุปกรณ์
ขว้าง | |
---|---|
DeviceNotAvailableException | |
TargetSetupError |
แจ้ง AdbRebootCalled
public void notifyAdbRebootCalled ()
แจ้งเตือนเมื่อมีการเรียก doAdbReboot
พาวเวอร์วอช
public CommandResult powerwash ()
พยายาม Powerwash อินสแตนซ์ GCE
การส่งคืน | |
---|---|
CommandResult | ส่งคืน CommandResult ของความพยายาม Powerwash |
ขว้าง | |
---|---|
| com.android.tradefed.targetprep.TargetSetupError |
TargetSetupError |
พาวเวอร์วอชGce
public CommandResult powerwashGce (String user, Integer offset)
พยายาม Powerwash อินสแตนซ์ GCE
พารามิเตอร์ | |
---|---|
user | String : ผู้ใช้โฮสต์ของ AVD null หากไม่เกี่ยวข้อง |
offset | Integer : หมายเลขอุปกรณ์ที่ชดเชย AVD ในโฮสต์ null หากไม่เกี่ยวข้อง |
การส่งคืน | |
---|---|
CommandResult | ส่งคืน CommandResult ของความพยายาม Powerwash |
ขว้าง | |
---|---|
| com.android.tradefed.targetprep.TargetSetupError |
TargetSetupError |
เชื่อมต่อใหม่
public void reconnect (String serial)
เชื่อมต่อการเชื่อมต่อกับอุปกรณ์อีกครั้ง
พารามิเตอร์ | |
---|---|
serial | String : หมายเลขซีเรียลของอุปกรณ์ |
ขว้าง | |
---|---|
DeviceNotAvailableException |
เชื่อมต่ออีกครั้งเพื่อการกู้คืน
public void reconnectForRecovery (String serial)
เชื่อมต่อการเชื่อมต่อกับอุปกรณ์อีกครั้งสำหรับรูทีนการกู้คืน
พารามิเตอร์ | |
---|---|
serial | String : หมายเลขซีเรียลของอุปกรณ์ |
ขว้าง | |
---|---|
DeviceNotAvailableException |
คืนค่า SnapshotGce
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 |
สแนปช็อตGce
public CommandResult snapshotGce (String user, Integer offset, String snapshotId)
พยายามจับภาพตัวอย่างปลาหมึก
พารามิเตอร์ | |
---|---|
user | String : ผู้ใช้โฮสต์ของ AVD null หากไม่เกี่ยวข้อง |
offset | Integer : หมายเลขอุปกรณ์ที่ชดเชย AVD ในโฮสต์ null หากไม่เกี่ยวข้อง |
snapshotId | String |
การส่งคืน | |
---|---|
CommandResult | ส่งคืน CommandResult ของความพยายามสแน็ปช็อต |
ขว้าง | |
---|---|
| com.android.tradefed.targetprep.TargetSetupError |
TargetSetupError |
การฉีกขาดการเชื่อมต่อ
public void tearDownConnection ()
ทำความสะอาดการเชื่อมต่อ
วิธีการที่ได้รับการป้องกัน
รับ CurrentTime
protected long getCurrentTime ()
ส่งกลับเวลาของระบบปัจจุบัน เปิดเผยสำหรับการทดสอบ
การส่งคืน | |
---|---|
long |
เปิดตัว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 |