OtaDeviceBuildInfo
public
class
OtaDeviceBuildInfo
extends Object
implements
IDeviceBuildInfo
java.lang.Object | |
↳ | com.android.tradefed.build.OtaDeviceBuildInfo |
A IDeviceBuildInfo
used for over-the-air update testing. It is composed of two device
builds for ITestDevice
:
- a baseline build image (the build to OTA from).
- a OTA build (a build to OTA to). Should contain necessary build attributes and associated OTA package.
getOtaBuild()
returns the OTA
build.
Summary
Fields | |
---|---|
protected
IDeviceBuildInfo |
mBaselineBuild
|
protected
IDeviceBuildInfo |
mOtaBuild
|
protected
boolean |
mReportTargetBuild
|
Public constructors | |
---|---|
OtaDeviceBuildInfo()
|
Public methods | |
---|---|
void
|
addBuildAttribute(String attributeName, String attributeValue)
|
void
|
cleanUp()
Removes all temporary files. |
void
|
cleanUp(
|
IBuildInfo
|
clone()
|
File
|
getBasebandImageFile()
Get the local baseband image file. |
String
|
getBasebandVersion()
Get the baseband version. |
IDeviceBuildInfo
|
getBaselineBuild()
|
File
|
getBootloaderImageFile()
Get the local bootloader image file. |
String
|
getBootloaderVersion()
Get the bootloader version. |
|
getBuildAttributes()
|
String
|
getBuildBranch()
|
String
|
getBuildFlavor()
|
String
|
getBuildId()
|
String
|
getBuildTargetName()
|
String
|
getDeviceBuildFlavor()
Optional method to return the type of the platform build being tested. |
String
|
getDeviceBuildId()
Returns the unique identifier of platform build under test. |
File
|
getDeviceImageFile()
Get the local device image zip file. |
String
|
getDeviceImageVersion()
Get the local device image zip version. |
String
|
getDeviceSerial()
|
File
|
getFile(String name)
|
|
getFiles()
|
File
|
getMkbootimgFile()
Gets the mkbootimg file used to create the kernel image. |
String
|
getMkbootimgVersion()
Gets the mkbootimg version. |
IDeviceBuildInfo
|
getOtaBuild()
|
File
|
getOtaPackageFile()
Get the device OTA package zip file. |
String
|
getOtaPackageVersion()
Get the device OTA package zip version. |
|
getProperties()
|
File
|
getRamdiskFile()
Gets the ramdisk file used to create the kernel image. |
String
|
getRamdiskVersion()
Gets the ramdisk version. |
File
|
getResourcesDir()
Returns the dir containing some of the downloaded resources. |
String
|
getTestTag()
|
File
|
getTestsDir()
Get the local path to the extracted tests.zip file contents. |
String
|
getTestsDirVersion()
Get the extracted tests.zip version. |
File
|
getUserDataImageFile()
Get the local test userdata image file. |
String
|
getUserDataImageVersion()
Get the local test userdata image version. |
String
|
getVersion(String name)
|
VersionedFile
|
getVersionedFile(String name)
|
|
getVersionedFileKeys()
|
void
|
setBasebandImage(File basebandFile, String version)
Set the baseband image for the device build. |
void
|
setBaselineBuild(IDeviceBuildInfo baselineBuild)
|
void
|
setBootloaderImageFile(File bootloaderImgFile, String version)
Set the bootloader image for the device build. |
void
|
setBuildBranch(String branch)
|
void
|
setBuildFlavor(String buildFlavor)
|
void
|
setBuildId(String buildId)
|
void
|
setDeviceImageFile(File deviceImageFile, String version)
Set the device system image file to use. |
void
|
setDeviceSerial(String serial)
|
void
|
setFile(String name, File file, String version)
|
void
|
setMkbootimgFile(File mkbootimg, String version)
Sets the mkbootimg file used to create the kernel image. |
void
|
setOtaBuild(IDeviceBuildInfo otaBuild)
|
void
|
setOtaPackageFile(File otaFile, String version)
Set the device OTA package zip file. |
void
|
setProperties(BuildInfoProperties... properties)
|
void
|
setRamdiskFile(File ramdisk, String version)
Gets the ramdisk file used to create the kernel image. |
void
|
setReportTargetBuild(boolean downgrade)
|
void
|
setResourcesDir(File resourceDir, String version)
Sets the resources directory |
void
|
setTestTag(String testTag)
|
void
|
setTestsDir(File testsZipFile, String version)
Set local path to the extracted tests.zip file contents. |
void
|
setUserDataImageFile(File userDataFile, String version)
Set the user data image file to use. |
Protected methods | |
---|---|
IDeviceBuildInfo
|
getReportedBuild()
|
Fields
mReportTargetBuild
protected boolean mReportTargetBuild
Public constructors
OtaDeviceBuildInfo
public OtaDeviceBuildInfo ()
Public methods
addBuildAttribute
public void addBuildAttribute (String attributeName, String attributeValue)
Parameters | |
---|---|
attributeName |
String |
attributeValue |
String |
cleanUp
public void cleanUp ()
Removes all temporary files.
cleanUp
public void cleanUp (doNotDelete)
Parameters | |
---|---|
doNotDelete |
|
clone
public IBuildInfo clone ()
Returns | |
---|---|
IBuildInfo |
getBasebandImageFile
public File getBasebandImageFile ()
Get the local baseband image file.
Returns | |
---|---|
File |
getBasebandVersion
public String getBasebandVersion ()
Get the baseband version.
Returns | |
---|---|
String |
getBootloaderImageFile
public File getBootloaderImageFile ()
Get the local bootloader image file.
Returns | |
---|---|
File |
getBootloaderVersion
public String getBootloaderVersion ()
Get the bootloader version.
Returns | |
---|---|
String |
getBuildAttributes
publicgetBuildAttributes ()
Returns | |
---|---|
|
getBuildBranch
public String getBuildBranch ()
Returns | |
---|---|
String |
getBuildFlavor
public String getBuildFlavor ()
Returns | |
---|---|
String |
getBuildId
public String getBuildId ()
Returns | |
---|---|
String |
getBuildTargetName
public String getBuildTargetName ()
Returns | |
---|---|
String |
getDeviceBuildFlavor
public String getDeviceBuildFlavor ()
Optional method to return the type of the platform build being tested.
Returns | |
---|---|
String |
getDeviceBuildId
public String getDeviceBuildId ()
Returns the unique identifier of platform build under test. Should never be null. Defaults to
IBuildInfo.UNKNOWN_BUILD_ID
.
Returns | |
---|---|
String |
getDeviceImageFile
public File getDeviceImageFile ()
Get the local device image zip file.
Returns | |
---|---|
File |
getDeviceImageVersion
public String getDeviceImageVersion ()
Get the local device image zip version.
Returns | |
---|---|
String |
getDeviceSerial
public String getDeviceSerial ()
Returns | |
---|---|
String |
getFile
public File getFile (String name)
Parameters | |
---|---|
name |
String |
Returns | |
---|---|
File |
getFiles
publicgetFiles ()
Returns | |
---|---|
|
getMkbootimgFile
public File getMkbootimgFile ()
Gets the mkbootimg file used to create the kernel image.
Returns | |
---|---|
File |
getMkbootimgVersion
public String getMkbootimgVersion ()
Gets the mkbootimg version.
Returns | |
---|---|
String |
getOtaPackageFile
public File getOtaPackageFile ()
Get the device OTA package zip file.
Returns | |
---|---|
File |
getOtaPackageVersion
public String getOtaPackageVersion ()
Get the device OTA package zip version.
Returns | |
---|---|
String |
getProperties
publicgetProperties ()
Returns | |
---|---|
|
getRamdiskFile
public File getRamdiskFile ()
Gets the ramdisk file used to create the kernel image.
Returns | |
---|---|
File |
getRamdiskVersion
public String getRamdiskVersion ()
Gets the ramdisk version.
Returns | |
---|---|
String |
getResourcesDir
public File getResourcesDir ()
Returns the dir containing some of the downloaded resources. (Resources are usually associated with a isFake=true device definition). Returns null if no resource dir available.
Returns | |
---|---|
File |
getTestTag
public String getTestTag ()
Returns | |
---|---|
String |
getTestsDir
public File getTestsDir ()
Get the local path to the extracted tests.zip file contents.
Returns | |
---|---|
File |
getTestsDirVersion
public String getTestsDirVersion ()
Get the extracted tests.zip version.
Returns | |
---|---|
String |
getUserDataImageFile
public File getUserDataImageFile ()
Get the local test userdata image file.
Returns | |
---|---|
File |
getUserDataImageVersion
public String getUserDataImageVersion ()
Get the local test userdata image version.
Returns | |
---|---|
String |
getVersion
public String getVersion (String name)
Parameters | |
---|---|
name |
String |
Returns | |
---|---|
String |
getVersionedFile
public VersionedFile getVersionedFile (String name)
Parameters | |
---|---|
name |
String |
Returns | |
---|---|
VersionedFile |
getVersionedFileKeys
publicgetVersionedFileKeys ()
Returns | |
---|---|
|
setBasebandImage
public void setBasebandImage (File basebandFile, String version)
Set the baseband image for the device build.
Parameters | |
---|---|
basebandFile |
File : the baseband image ERROR(/File) |
version |
String : the version of the baseband
|
setBaselineBuild
public void setBaselineBuild (IDeviceBuildInfo baselineBuild)
Parameters | |
---|---|
baselineBuild |
IDeviceBuildInfo |
setBootloaderImageFile
public void setBootloaderImageFile (File bootloaderImgFile, String version)
Set the bootloader image for the device build.
Parameters | |
---|---|
bootloaderImgFile |
File : the bootloader image ERROR(/File) |
version |
String : the version of the bootloader
|
setBuildBranch
public void setBuildBranch (String branch)
Parameters | |
---|---|
branch |
String |
setBuildFlavor
public void setBuildFlavor (String buildFlavor)
Parameters | |
---|---|
buildFlavor |
String |
setBuildId
public void setBuildId (String buildId)
Parameters | |
---|---|
buildId |
String |
setDeviceImageFile
public void setDeviceImageFile (File deviceImageFile, String version)
Set the device system image file to use.
Parameters | |
---|---|
version |
String |
setDeviceSerial
public void setDeviceSerial (String serial)
Parameters | |
---|---|
serial |
String |
setFile
public void setFile (String name, File file, String version)
Parameters | |
---|---|
name |
String |
file |
File |
version |
String |
setMkbootimgFile
public void setMkbootimgFile (File mkbootimg, String version)
Sets the mkbootimg file used to create the kernel image.
Parameters | |
---|---|
mkbootimg |
File |
version |
String |
setOtaBuild
public void setOtaBuild (IDeviceBuildInfo otaBuild)
Parameters | |
---|---|
otaBuild |
IDeviceBuildInfo |
setOtaPackageFile
public void setOtaPackageFile (File otaFile, String version)
Set the device OTA package zip file.
Parameters | |
---|---|
otaFile |
File |
version |
String |
setProperties
public void setProperties (BuildInfoProperties... properties)
Parameters | |
---|---|
properties |
BuildInfoProperties |
setRamdiskFile
public void setRamdiskFile (File ramdisk, String version)
Gets the ramdisk file used to create the kernel image.
Parameters | |
---|---|
ramdisk |
File |
version |
String |
setReportTargetBuild
public void setReportTargetBuild (boolean downgrade)
Parameters | |
---|---|
downgrade |
boolean |
setResourcesDir
public void setResourcesDir (File resourceDir, String version)
Sets the resources directory ERROR(/File)
.
Parameters | |
---|---|
resourceDir |
File : The directory containing the shared resources. |
version |
String : The version of the directory file.
|
setTestTag
public void setTestTag (String testTag)
Parameters | |
---|---|
testTag |
String |
setTestsDir
public void setTestsDir (File testsZipFile, String version)
Set local path to the extracted tests.zip file contents.
Parameters | |
---|---|
version |
String |
setUserDataImageFile
public void setUserDataImageFile (File userDataFile, String version)
Set the user data image file to use.
Parameters | |
---|---|
version |
String |