to top
public interface

IDeviceFlasher

com.android.tradefed.targetprep.IDeviceFlasher
Known Indirect Subclasses

Class Overview

Flashes a device image on a device.

Summary

Nested Classes
enum IDeviceFlasher.UserDataFlashOption Enum of options for handling the userdata image  
Public Methods
abstract void flash(ITestDevice device, IDeviceBuildInfo deviceBuild)
Flashes build on device.
abstract IDeviceFlasher.UserDataFlashOption getUserDataFlashOption()
Gets whether the user data image should be flashed, wiped, or retained
abstract void overrideDeviceOptions(ITestDevice device)
Override options for a device.
abstract void setDataWipeSkipList(Collection<String> dataWipeSkipList)
Sets the list of paths under /data to avoid clearing when using ERROR(/ITestsZipInsaller)

Note that the granularity of the skip list is direct children of /data.

abstract void setFlashingResourcesRetriever(IFlashingResourcesRetriever retriever)
Sets the mechanism by which the flasher can retrieve resource files for flashing.
abstract void setForceSystemFlash(boolean forceSystemFlash)
Sets if system should always be flashed even if running current build
abstract void setUserDataFlashOption(IDeviceFlasher.UserDataFlashOption flashOption)
Toggles whether the user data image should be flashed, wiped, or retained

Public Methods

public abstract void flash (ITestDevice device, IDeviceBuildInfo deviceBuild)

Flashes build on device.

Returns immediately after flashing is complete. Callers should wait for device to be online and available before proceeding with testing.

Parameters
device the ITestDevice to flash
deviceBuild the IDeviceBuildInfo to flash
Throws
TargetSetupError if failed to flash build
DeviceNotAvailableException if device becomes unresponsive

public abstract IDeviceFlasher.UserDataFlashOption getUserDataFlashOption ()

Gets whether the user data image should be flashed, wiped, or retained

Returns
  • Whether the user data image should be flashed, wiped, or retained

public abstract void overrideDeviceOptions (ITestDevice device)

Override options for a device. Used to override default option values if the defaults are not supported by a particular device.

public abstract void setDataWipeSkipList (Collection<String> dataWipeSkipList)

Sets the list of paths under /data to avoid clearing when using ERROR(/ITestsZipInsaller)

Note that the granularity of the skip list is direct children of /data.

public abstract void setFlashingResourcesRetriever (IFlashingResourcesRetriever retriever)

Sets the mechanism by which the flasher can retrieve resource files for flashing.

Parameters
retriever the IFlashingResourcesRetriever to use

public abstract void setForceSystemFlash (boolean forceSystemFlash)

Sets if system should always be flashed even if running current build

public abstract void setUserDataFlashOption (IDeviceFlasher.UserDataFlashOption flashOption)

Toggles whether the user data image should be flashed, wiped, or retained