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 行为。假设设备序列号的格式为 adb 中的
摘要
公共构造函数 | |
|---|---|
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 ()
此方法已废弃。
应直接使用连接 API
从创建的远程虚拟机返回 GceAvdInfo。如果启动失败,则返回 null。
| 返回 | |
|---|---|
GceAvdInfo |
|
getDeviceDescriptor
public DeviceDescriptor getDeviceDescriptor (boolean shortDescriptor)
从设备信息返回 DeviceDescriptor,以获取其相关信息,而无需传递实际的设备对象。
| 参数 | |
|---|---|
shortDescriptor |
boolean:是否将描述符限制为仅包含必要信息 |
| 返回 | |
|---|---|
DeviceDescriptor |
|
getTombstones
publicgetTombstones ()
Cuttlefish 有一项特殊功能,可将墓碑传送到远程主机,以便我们直接获取它们。
| 返回 | |
|---|---|
|
墓碑文件列表,如果没有墓碑,则为空。 |
| 抛出 | |
|---|---|
DeviceNotAvailableException |
|
Powerwash
public CommandResult powerwash ()
尝试对 GCE 实例执行 Powerwash
| 返回 | |
|---|---|
CommandResult |
返回 Powerwash 尝试的 CommandResult |
| 抛出 | |
|---|---|
|
com.android.tradefed.targetprep.TargetSetupError |
TargetSetupError |
|
powerwashGce
public CommandResult powerwashGce (String user, Integer offset)
此方法已废弃。
已移除,改为使用关联
| 参数 | |
|---|---|
user |
String |
offset |
Integer |
| 返回 | |
|---|---|
CommandResult |
|
| 抛出 | |
|---|---|
TargetSetupError |
|