1 /* 2 * Copyright (C) 2010 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.android.tradefed.build; 18 19 import java.io.File; 20 21 /** 22 * A {@link IBuildInfo} that represents a complete Android device build and (optionally) its tests. 23 */ 24 public interface IDeviceBuildInfo extends IBuildInfo { 25 26 /** 27 * Returns the unique identifier of platform build under test. Should never be null. Defaults to 28 * {@link #UNKNOWN_BUILD_ID}. 29 */ 30 public String getDeviceBuildId(); 31 32 /** 33 * Optional method to return the type of the platform build being tested. 34 */ 35 public String getDeviceBuildFlavor(); 36 37 /** 38 * Get the local device image zip file. 39 */ 40 public File getDeviceImageFile(); 41 42 /** 43 * Get the local device image zip version. 44 */ 45 public String getDeviceImageVersion(); 46 47 /** 48 * Set the device system image file to use. 49 * 50 * @param deviceImageFile 51 */ 52 public void setDeviceImageFile(File deviceImageFile, String version); 53 54 /** 55 * Get the local test userdata image file. 56 */ 57 public File getUserDataImageFile(); 58 59 /** 60 * Get the local test userdata image version. 61 */ 62 public String getUserDataImageVersion(); 63 64 /** 65 * Set the user data image file to use. 66 * 67 * @param userDataFile 68 */ 69 public void setUserDataImageFile(File userDataFile, String version); 70 71 /** 72 * Get the local path to the extracted tests.zip file contents. 73 */ 74 public File getTestsDir(); 75 76 /** 77 * Get the extracted tests.zip version. 78 */ 79 public String getTestsDirVersion(); 80 81 /** 82 * Set local path to the extracted tests.zip file contents. 83 * 84 * @param testsZipFile 85 */ 86 public void setTestsDir(File testsZipFile, String version); 87 88 /** 89 * Get the local baseband image file. 90 */ 91 public File getBasebandImageFile(); 92 93 /** 94 * Get the baseband version. 95 */ 96 public String getBasebandVersion(); 97 98 /** 99 * Set the baseband image for the device build. 100 * 101 * @param basebandFile the baseband image {@link File} 102 * @param version the version of the baseband 103 */ 104 public void setBasebandImage(File basebandFile, String version); 105 106 /** 107 * Get the local bootloader image file. 108 */ 109 public File getBootloaderImageFile(); 110 111 /** 112 * Get the bootloader version. 113 */ 114 public String getBootloaderVersion(); 115 116 /** 117 * Set the bootloader image for the device build. 118 * 119 * @param bootloaderImgFile the bootloader image {@link File} 120 * @param version the version of the bootloader 121 */ 122 public void setBootloaderImageFile(File bootloaderImgFile, String version); 123 124 /** 125 * Get the device OTA package zip file. 126 */ 127 public File getOtaPackageFile(); 128 129 /** 130 * Get the device OTA package zip version. 131 */ 132 public String getOtaPackageVersion(); 133 134 /** 135 * Set the device OTA package zip file. 136 */ 137 public void setOtaPackageFile(File otaFile, String version); 138 139 /** 140 * Gets the mkbootimg file used to create the kernel image. 141 */ 142 public File getMkbootimgFile(); 143 144 /** 145 * Gets the mkbootimg version. 146 */ 147 public String getMkbootimgVersion(); 148 149 /** 150 * Sets the mkbootimg file used to create the kernel image. 151 */ 152 public void setMkbootimgFile(File mkbootimg, String version); 153 154 /** 155 * Gets the ramdisk file used to create the kernel image. 156 */ 157 public File getRamdiskFile(); 158 159 /** 160 * Gets the ramdisk version. 161 */ 162 public String getRamdiskVersion(); 163 164 /** 165 * Gets the ramdisk file used to create the kernel image. 166 */ 167 public void setRamdiskFile(File ramdisk, String version); 168 169 /** 170 * Removes all temporary files. 171 */ 172 @Override 173 public void cleanUp(); 174 175 } 176