遠端Android虛擬設備
public class RemoteAndroidVirtualDevice
extends RemoteAndroidDevice
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 計算引擎 (Gce) 中運行的全端 Android 裝置的RemoteAndroidDevice
行為。假設設備序號的格式為
概括
公共構造函數 | |
---|---|
RemoteAndroidVirtualDevice (IDevice device, IDeviceStateMonitor stateMonitor, IDeviceMonitor allocationMonitor) |
公共方法 | |
---|---|
GceAvdInfo | getAvdInfo () 此方法已被棄用。應該直接使用連線API |
DeviceDescriptor | getDeviceDescriptor (boolean shortDescriptor) 從設備資訊中返回 |
getTombstones () Cuttlefish 有一個特殊功能,可以將墓碑帶到遠端主機,我們可以直接取得它們。 | |
CommandResult | powerwash () 嘗試對 GCE 實例進行 Powerwash |
CommandResult | powerwashGce (String user, Integer offset) 此方法已被棄用。刪除以支援連接一 |
boolean | powerwashGce () |
公共構造函數
遠端Android虛擬設備
public RemoteAndroidVirtualDevice (IDevice device, IDeviceStateMonitor stateMonitor, IDeviceMonitor allocationMonitor)
建立一個RemoteAndroidVirtualDevice
。
參數 | |
---|---|
device | IDevice :關聯的IDevice |
stateMonitor | IDeviceStateMonitor :要使用的IDeviceStateMonitor 機制 |
allocationMonitor | IDeviceMonitor :通知指派狀態變更的IDeviceMonitor 。 |
公共方法
取得AVD訊息
public GceAvdInfo getAvdInfo ()
此方法已被棄用。
應該直接使用連線API
從已建立的遠端VM返回GceAvdInfo
。如果啟動不成功則傳回 null。
退貨 | |
---|---|
GceAvdInfo |
取得設備描述符
public DeviceDescriptor getDeviceDescriptor (boolean shortDescriptor)
從設備資訊中返回DeviceDescriptor
以獲取其訊息,而無需傳遞實際的設備物件。
參數 | |
---|---|
shortDescriptor | boolean :是否將描述詞限制為最低限度的信息 |
退貨 | |
---|---|
DeviceDescriptor |
取得墓碑
publicgetTombstones ()
Cuttlefish 有一個特殊功能,可以將墓碑帶到遠端主機,我們可以直接取得它們。
退貨 | |
---|---|
邏輯刪除檔案列表,如果沒有邏輯刪除則為空。 |
投擲 | |
---|---|
DeviceNotAvailableException |
強力清洗
public CommandResult powerwash ()
嘗試對 GCE 實例進行 Powerwash
退貨 | |
---|---|
CommandResult | 返回 powerwash 嘗試的 CommandResult |
投擲 | |
---|---|
| com.android.tradefed.targetprep.TargetSetupError |
TargetSetupError |
強力清洗Gce
public CommandResult powerwashGce (String user, Integer offset)
此方法已被棄用。
刪除以支援連接一
參數 | |
---|---|
user | String |
offset | Integer |
退貨 | |
---|---|
CommandResult |
投擲 | |
---|---|
TargetSetupError |