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 |
Extends RemoteAndroidDevice
behavior for a full stack android device running in the
Google Compute Engine (Gce). Assume the device serial will be in the format
Summary
Public constructors | |
---|---|
RemoteAndroidVirtualDevice(IDevice device, IDeviceStateMonitor stateMonitor, IDeviceMonitor allocationMonitor)
Creates a |
Public methods | |
---|---|
GceAvdInfo
|
getAvdInfo()
Returns the |
GceAvdInfo
|
getAvdInfoAnyState()
Returns the |
DeviceDescriptor
|
getDeviceDescriptor()
Return a |
|
getTombstones()
Cuttlefish has a special feature that brings the tombstones to the remote host where we can get them directly. |
CommandResult
|
powerwash()
Attempt to powerwash a GCE instance |
CommandResult
|
powerwashGce(String user, Integer offset)
This method is deprecated. Removed in favor of the connection one |
boolean
|
powerwashGce()
|
void
|
setAvdInfo(GceAvdInfo gceAvdInfo)
Set the |
Public constructors
RemoteAndroidVirtualDevice
public RemoteAndroidVirtualDevice (IDevice device, IDeviceStateMonitor stateMonitor, IDeviceMonitor allocationMonitor)
Creates a RemoteAndroidVirtualDevice
.
Parameters | |
---|---|
device |
IDevice : the associated IDevice |
stateMonitor |
IDeviceStateMonitor : the IDeviceStateMonitor mechanism to use |
allocationMonitor |
IDeviceMonitor : the IDeviceMonitor to inform of allocation state changes. |
Public methods
getAvdInfo
public GceAvdInfo getAvdInfo ()
Returns the GceAvdInfo
from the created remote VM. Returns null if the bring up was
not successful.
Returns | |
---|---|
GceAvdInfo |
getAvdInfoAnyState
public GceAvdInfo getAvdInfoAnyState ()
Returns the GceAvdInfo
from the created remote VM. Returns regardless of the status
so we can inspect the info.
Returns | |
---|---|
GceAvdInfo |
getDeviceDescriptor
public DeviceDescriptor getDeviceDescriptor ()
Return a DeviceDescriptor
from the device information to get info on it without
passing the actual device object.
Returns | |
---|---|
DeviceDescriptor |
getTombstones
publicgetTombstones ()
Cuttlefish has a special feature that brings the tombstones to the remote host where we can get them directly.
Returns | |
---|---|
|
A list of tombstone files, empty if no tombstone. |
Throws | |
---|---|
DeviceNotAvailableException |
powerwash
public CommandResult powerwash ()
Attempt to powerwash a GCE instance
Returns | |
---|---|
CommandResult |
returns CommandResult of the powerwash attempts |
Throws | |
---|---|
|
com.android.tradefed.targetprep.TargetSetupError |
TargetSetupError |
powerwashGce
public CommandResult powerwashGce (String user, Integer offset)
This method is deprecated.
Removed in favor of the connection one
Parameters | |
---|---|
user |
String |
offset |
Integer |
Returns | |
---|---|
CommandResult |
Throws | |
---|---|
TargetSetupError |
setAvdInfo
public void setAvdInfo (GceAvdInfo gceAvdInfo)
Set the GceAvdInfo
for launched device.
Parameters | |
---|---|
gceAvdInfo |
GceAvdInfo |
Throws | |
---|---|
TargetSetupError |