DeviceFlashPreparer

public abstract class DeviceFlashPreparer
extends Object implements ITargetCleaner

java.lang.Object
   ↳ com.android.tradefed.targetprep.DeviceFlashPreparer


A ITargetPreparer that flashes an image on physical Android hardware.

Summary

Nested classes

enum DeviceFlashPreparer.EncryptionOptions

Enum of options for handling the encryption of userdata image  

Public constructors

DeviceFlashPreparer()

Public methods

void setUp(ITestDevice device, IBuildInfo buildInfo)

Perform the target setup for testing.

void setUserDataFlashOption(IDeviceFlasher.UserDataFlashOption flashOption)

Set the userdata-flash option

void tearDown(ITestDevice device, IBuildInfo buildInfo, Throwable e)

Perform the target cleanup/teardown after testing.

Protected methods

abstract IDeviceFlasher createFlasher(ITestDevice device)

Create IDeviceFlasher to use.

Public constructors

DeviceFlashPreparer

DeviceFlashPreparer ()

Public methods

setUp

void setUp (ITestDevice device, 
                IBuildInfo buildInfo)

Perform the target setup for testing.

Parameters
device ITestDevice: the ITestDevice to prepare.
buildInfo IBuildInfo: data about the build under test.
Throws
TargetSetupError
DeviceNotAvailableException
BuildError

setUserDataFlashOption

void setUserDataFlashOption (IDeviceFlasher.UserDataFlashOption flashOption)

Set the userdata-flash option

tearDown

void tearDown (ITestDevice device, 
                IBuildInfo buildInfo, 
                Throwable e)

Perform the target cleanup/teardown after testing.

Parameters
device ITestDevice: the ITestDevice to prepare.
buildInfo IBuildInfo: data about the build under test.
e Throwable: if the invocation ended with an exception, this will be the exception that was caught at the Invocation level. Otherwise, will be null.
Throws
DeviceNotAvailableException

Protected methods

createFlasher

IDeviceFlasher createFlasher (ITestDevice device)

Create IDeviceFlasher to use. Subclasses can override

Parameters
device ITestDevice
Returns
IDeviceFlasher
Throws
DeviceNotAvailableException