to top
package

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. 
ITargetCleaner Cleans up the target device after the test run has finished. 
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

AbstractTargetCleaner An ITargetCleaner class with a stub setUp(ITestDevice, IBuildInfo) method  
AdditionalFilesInstaller A ITargetPreparer that pushes all getFiles() to specific path on device. 
AllTestAppsInstallSetup A ITargetPreparer that installs all apps from a getTestsDir() folder onto device. 
AppSetup A ITargetPreparer that installs an apk and its tests. 
BuildInfoAttributePreparer A ITargetPreparer that adds arbitrary attributes to the IBuildInfo
BuildInfoRecorder An ITargetPreparer that writes build info meta data into a specified file. 
CdmaDeviceFlasher A class that flashes an image on a physical Android device with a CDMA radio. 
ConnectionChecker Target preparer that waits until an ip address is asigned to any of the specified interfaces. 
DefaultTestsZipInstaller A default implementation of tests zip installer. 
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. 
DeviceSetup A ITargetPreparer that configures a device for testing based on provided Options. 
DeviceWiper A ITargetPreparer that wipes userdata  
EraseUserDataPreparer A ITargetPreparer that wipes user data on the device. 
FastbootDeviceFlasher A class that relies on fastboot to flash an image on physical Android hardware. 
FileCleaner A ITargetCleaner that removes filesystem files on teardown  
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>>
InstallApkSetup A ITargetPreparer that installs one or more apks located on the filesystem. 
InstallBuildEnvApkSetup A ITargetPreparer that installs one or more test apks from an Android platform build env. 
InstrumentationPreparer A ITargetPreparer that runs instrumentation  
KernelFlashPreparer A ITargetPreparer that flashes a kernel on the device. 
KeyValueConfigPreparer A ITargetPreparer which creates and pushes a simple key/value config file to the device. 
LocalSdkAvdPreparer A ITargetPreparer that will create an avd and launch an emulator  
MediaSyncPreparer  
PushFilePreparer A ITargetPreparer that attempts to push any number of files from any host path to any device path. 
RemoveSystemAppPreparer A ITargetPreparer for removing an apk from the system partition before a test run. 
RunCommandTargetPreparer  
SdkAvdPreparer A ITargetPreparer that will create an avd and launch an emulator  
StopServicesSetup A ITargetPreparer that stops services on the device. 
StubTargetPreparer Placeholder empty implementation of a ITargetPreparer
SystemUpdaterDeviceFlasher A IDeviceFlasher that relies on the system updater to install a system image bundled in a OTA update package. 
TearDownPassThroughPreparer Allows for running tearDown on preparers that are included in a config as an object. 
TestAppInstallSetup A ITargetPreparer that installs one or more apps from a getTestsDir() folder onto device. 
TestFilePushSetup A ITargetPreparer that pushes one or more files/dirs from a getTestsDir() folder onto device. 
TestJarInstaller A ITargetPreparer that pushes all .jar files it finds in the IBuildInfo to device. 
TestSystemAppInstallSetup A ITargetPreparer that installs one or more apps from a getTestsDir() folder onto the /system partition on device. 
TimeWaster A simple target preparer to waste time and potentially restart the device. 
WaitForDeviceDatetimePreparer A ITargetPreparer that waits for datetime to be set on device

Optionally this preparer can force a TargetSetupError if datetime is not set within timeout, or force host datetime onto device,  

WifiPreparer A ITargetPreparer that configures wifi on the device if necessary. 

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  
DeviceSetup.BinaryState Enum used to record ON/OFF state with a IGNORE no-op state. 
IDeviceFlasher.UserDataFlashOption Enum of options for handling the userdata image  

Exceptions

BuildError Thrown if the provided build fails to run. 
DeviceFailedToBootError Thrown if a device fails to boot after being flashed with a build. 
TargetSetupError A fatal error occurred while preparing the target for testing.