远程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 () 从创建的远程VM返回 |
GceAvdInfo | getAvdInfoAnyState () 从创建的远程VM返回 |
DeviceDescriptor | getDeviceDescriptor () 从设备信息中返回 |
getTombstones () Cuttlefish 有一个特殊功能,可以将墓碑带到远程主机,我们可以直接获取它们。 | |
CommandResult | powerwash () 尝试对 GCE 实例进行 Powerwash |
CommandResult | powerwashGce (String user, Integer offset) 此方法已被弃用。删除以支持连接一 |
boolean | powerwashGce () |
void | setAvdInfo ( GceAvdInfo gceAvdInfo) 设置已启动设备的 |
公共构造函数
远程Android虚拟设备
public RemoteAndroidVirtualDevice (IDevice device, IDeviceStateMonitor stateMonitor, IDeviceMonitor allocationMonitor)
创建一个RemoteAndroidVirtualDevice
。
参数 | |
---|---|
device | IDevice :关联的IDevice |
stateMonitor | IDeviceStateMonitor :要使用的IDeviceStateMonitor 机制 |
allocationMonitor | IDeviceMonitor :通知分配状态更改的IDeviceMonitor 。 |
公共方法
获取AvdInfoAnyState
public GceAvdInfo getAvdInfoAnyState ()
从创建的远程VM返回GceAvdInfo
。无论状态如何都会返回,以便我们可以检查信息。
退货 | |
---|---|
GceAvdInfo |
获取设备描述符
public DeviceDescriptor getDeviceDescriptor ()
从设备信息中返回DeviceDescriptor
以获取其信息,而无需传递实际的设备对象。
退货 | |
---|---|
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 |
设置AVD信息
public void setAvdInfo (GceAvdInfo gceAvdInfo)
设置已启动设备的GceAvdInfo
。
参数 | |
---|---|
gceAvdInfo | GceAvdInfo |
投掷 | |
---|---|
TargetSetupError |