Google is committed to advancing racial equity for Black communities. See how.

com.android.tradefed.targetprep

Interfaces

FlashingResourcesParser.Constraint A filtering interface, intended to allow FlashingResourcesParser to ignore some resources that it otherwise might use  
IDeviceFlasher Flashes a device image on a device. 
IFlashingResourcesParser Interface for providing required versions of auxiliary image files needed to flash a device. 
IFlashingResourcesRetriever Interface for retrieving auxiliary image files needed to flash a device. 
IHostCleaner Cleans up the host after the test run has finished. 
ITargetCleaner This interface is deprecated. tearDown has been moved to the base ITargetPreparer interface.  
ITargetPreparer Prepares the test environment for the test run. 
ITestsZipInstaller Installs tests from a tests zip file (as outputted by the build system) on a device. 

Classes

BaseTargetPreparer Base implementation class for ITargetPreparer that allows to control whether the object is disabled or not. 
BuildInfoRecorder An ITargetPreparer that writes build info meta data into a specified file. 
CreateUserPreparer Target preparer for creating user and cleaning it up at the end. 
DefaultTestsZipInstaller A default implementation of tests zip installer. 
DeviceBuildInfoBootStrapper A ITargetPreparer that replaces build info fields with attributes read from device

This is useful for testing devices with builds generated from an external source (e.g. 

DeviceBuildInfoInjector A ITargetPreparer that inserts DeviceBuildDescriptor metadata into the IBuildInfo
DeviceCleaner Performs reboot or format as cleanup action after test, and optionally turns screen off  
DeviceFlashPreparer A ITargetPreparer that flashes an image on physical Android hardware. 
DeviceImageZipFlashingTargetPreparer A target preparer that flashes the device with device images provided via a specific format. 
DeviceSetup A ITargetPreparer that configures a device for testing based on provided Options. 
DeviceUpdateTargetPreparer An abstract ITargetPreparer that takes care of common steps around updating devices with a device image file from an external source (as opposed to a build service). 
FastbootDeviceFlasher A class that relies on fastboot to flash an image on physical Android hardware. 
FastbootUpdateBootstrapPreparer An ITargetPreparer that stages specified files (bootloader, radio, device image zip) into IDeviceBuildInfo to get devices flashed with FastbootDeviceFlasher, then injects post-boot device attributes into the build info for result reporting purposes. 
FlashingResourcesParser A class that parses out required versions of auxiliary image files needed to flash a device. 
FlashingResourcesParser.AndroidInfo A typedef for Map<String, MultiMap<String, String>>
GkiDeviceFlashPreparer A target preparer that flash the device with android common kernel generic image. 
GsiDeviceFlashPreparer A target preparer that flashes the device with android generic system image. 
InstallApexModuleTargetPreparer  
RunCommandTargetPreparer  
StubTargetPreparer Placeholder empty implementation of a ITargetPreparer
TestAppInstallSetup A ITargetPreparer that installs one or more apps from a IDeviceBuildInfo#getTestsDir() folder onto device. 

Enums

AltDirBehavior An enum to define alternative directory behaviors for various test artifact installers/pushers

 

DeviceCleaner.CleanupAction  
DeviceCleaner.PostCleanupAction  
DeviceFlashPreparer.EncryptionOptions Enum of options for handling the encryption of userdata image  
IDeviceFlasher.UserDataFlashOption Enum of options for handling the userdata image  

Exceptions

DeviceFailedToBootError Thrown if a device fails to boot after being flashed with a build.