IDeviceRecovery

public interface IDeviceRecovery

com.android.tradefed.device.IDeviceRecovery
Known Indirect Subclasses
ReconnectingRecovery Recovers a device by re-establishing a TCP connection via the adb server on the host. 
RetryingWaitDeviceRecovery A WaitDeviceRecovery which retries its recovery step either indefinitely or for a certain number of iterations. 
WaitDeviceRecovery A simple implementation of a IDeviceRecovery that waits for device to be online and respond to simple commands. 


Interface for recovering a device that has gone offline.

Summary

Public methods

abstract void recoverDevice(IDeviceStateMonitor monitor, boolean recoverUntilOnline)

Attempt to recover the given device that can no longer be communicated with.

abstract void recoverDeviceBootloader(IDeviceStateMonitor monitor)

Attempt to recover the given unresponsive device in bootloader mode.

abstract void recoverDeviceRecovery(IDeviceStateMonitor monitor)

Attempt to recover the given unresponsive device in recovery mode.

default void setFastbootPath(String fastbootPath)

Sets the path to the fastboot binary to be used.

Public methods

recoverDevice

void recoverDevice (IDeviceStateMonitor monitor, 
                boolean recoverUntilOnline)

Attempt to recover the given device that can no longer be communicated with.

Method should block and only return when device is in requested state.

Parameters
monitor IDeviceStateMonitor: the IDeviceStateMonitor to use.
recoverUntilOnline boolean: if true, method should return as soon as device is online on adb. If false, method should block until device is fully available for testing (ie waitForDeviceAvailable() succeeds.
Throws
DeviceNotAvailableException if device could not be recovered

recoverDeviceBootloader

void recoverDeviceBootloader (IDeviceStateMonitor monitor)

Attempt to recover the given unresponsive device in bootloader mode.

Parameters
monitor IDeviceStateMonitor: the IDeviceStateMonitor to use.
Throws
DeviceNotAvailableException if device could not be recovered

recoverDeviceRecovery

void recoverDeviceRecovery (IDeviceStateMonitor monitor)

Attempt to recover the given unresponsive device in recovery mode.

Parameters
monitor IDeviceStateMonitor: the IDeviceStateMonitor to use.
Throws
DeviceNotAvailableException if device could not be recovered

setFastbootPath

void setFastbootPath (String fastbootPath)

Sets the path to the fastboot binary to be used.

Parameters
fastbootPath String: a String defining the path to the fastboot binary.