RemoteAndroidVirtualDevice
  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 Compute Engine (GCE) 中執行的完整堆疊 Android 裝置,擴充 RemoteAndroidDevice 行為。假設裝置序號的格式為 
摘要
| 公用建構函式 | |
|---|---|
| 
      RemoteAndroidVirtualDevice(IDevice device, IDeviceStateMonitor stateMonitor, IDeviceMonitor allocationMonitor)
       | |
| 公用方法 | |
|---|---|
| 
        
        
        
        
        
        DeviceInspectionResult | 
      debugDeviceNotAvailable()
      檢查裝置,並在裝置無法使用時傳回詳細資訊。 | 
| 
        
        
        
        
        
        GceAvdInfo | 
      getAvdInfo()
      這個方法已淘汰。 應直接使用連線 API | 
| 
        
        
        
        
        
        DeviceDescriptor | 
      getDeviceDescriptor(boolean shortDescriptor)
      從裝置資訊傳回  | 
| 
        
        
        
        
        
         | 
      getTombstones()
      Cuttlefish 有特殊功能,可將墓碑帶到遠端主機,讓我們直接取得這些墓碑。 | 
| 
        
        
        
        
        
        CommandResult | 
      powerwash()
      嘗試執行 GCE 執行個體的 Powerwash 作業 | 
| 
        
        
        
        
        
        CommandResult | 
      powerwashGce(String user, Integer offset)
      這個方法已淘汰。 已移除,改用連線一 | 
| 
        
        
        
        
        
        boolean | 
      powerwashGce()
       | 
公用建構函式
RemoteAndroidVirtualDevice
public RemoteAndroidVirtualDevice (IDevice device, 
                IDeviceStateMonitor stateMonitor, 
                IDeviceMonitor allocationMonitor)建立 RemoteAndroidVirtualDevice。
| 參數 | |
|---|---|
| device | IDevice:相關聯的IDevice | 
| stateMonitor | IDeviceStateMonitor:要使用的IDeviceStateMonitor機制 | 
| allocationMonitor | IDeviceMonitor:用於通知分配狀態變更的IDeviceMonitor。 | 
公用方法
debugDeviceNotAvailable
public DeviceInspectionResult debugDeviceNotAvailable ()
檢查裝置,並在裝置無法使用時傳回詳細資訊。
| 傳回 | |
|---|---|
| DeviceInspectionResult | |
getAvdInfo
public GceAvdInfo getAvdInfo ()
      This method is deprecated.
 應直接使用連線 API
傳回已建立的遠端 VM 中的 GceAvdInfo。如果啟動失敗,則傳回空值。
| 傳回 | |
|---|---|
| GceAvdInfo | |
getDeviceDescriptor
public DeviceDescriptor getDeviceDescriptor (boolean shortDescriptor)
從裝置資訊傳回 DeviceDescriptor,即可取得相關資訊,而無須傳遞實際的裝置物件。
| 參數 | |
|---|---|
| shortDescriptor | boolean:是否將描述符限制為最少必要資訊 | 
| 傳回 | |
|---|---|
| DeviceDescriptor | |
getTombstones
publicgetTombstones () 
Cuttlefish 有特殊功能,可將墓碑資訊帶到遠端主機,讓我們直接取得這些資訊。
| 傳回 | |
|---|---|
|  | 墓碑檔案清單,如果沒有墓碑,則為空白。 | 
| 擲回 | |
|---|---|
| DeviceNotAvailableException | |
恢復原廠設定
public CommandResult powerwash ()
嘗試對 GCE 執行個體執行 Powerwash
| 傳回 | |
|---|---|
| CommandResult | 傳回 Powerwash 嘗試的 CommandResult | 
| 擲回 | |
|---|---|
|  | com.android.tradefed.targetprep.TargetSetupError | 
| TargetSetupError | |
powerwashGce
public CommandResult powerwashGce (String user, Integer offset)
      This method is deprecated.
    已移除,改用 connection one
  
| 參數 | |
|---|---|
| user | String | 
| offset | Integer | 
| 傳回 | |
|---|---|
| CommandResult | |
| 擲回 | |
|---|---|
| TargetSetupError | |
