ReconnectingRecovery

public class ReconnectingRecovery
extends Object implements IDeviceRecovery

java.lang.Object
   ↳ com.android.tradefed.device.ReconnectingRecovery


Recovers a device by re-establishing a TCP connection via the adb server on the host.

Summary

Public constructors

ReconnectingRecovery()

Public methods

void recoverDevice(IDeviceStateMonitor monitor, boolean recoverUntilOnline)

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

void recoverDeviceBootloader(IDeviceStateMonitor monitor)

Attempt to recover the given unresponsive device in bootloader mode.

void recoverDeviceRecovery(IDeviceStateMonitor monitor)

Attempt to recover the given unresponsive device in recovery mode.

This implementation assumes devices in recovery mode can't be talked to at all, so it will try to recover a device and leave it in fully booted mode.

Public constructors

ReconnectingRecovery

ReconnectingRecovery ()

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

recoverDeviceBootloader

void recoverDeviceBootloader (IDeviceStateMonitor monitor)

Attempt to recover the given unresponsive device in bootloader mode.

Parameters
monitor IDeviceStateMonitor: the IDeviceStateMonitor to use.

Throws
DeviceNotAvailableException

recoverDeviceRecovery

void recoverDeviceRecovery (IDeviceStateMonitor monitor)

Attempt to recover the given unresponsive device in recovery mode.

This implementation assumes devices in recovery mode can't be talked to at all, so it will try to recover a device and leave it in fully booted mode.

Parameters
monitor IDeviceStateMonitor: the IDeviceStateMonitor to use.

Throws
DeviceNotAvailableException