/test/framework/harnesses/host_controller/build/ |
D | build_flasher.py | 50 self.device = android_device.AndroidDevice( 62 self.device = android_device.AndroidDevice( 65 self.device.SetCustomFlasherPath(customflasher_path) 80 self.device = android_device.AndroidDevice( 103 self.device.adb.wait_for_device() 104 if not self.device.isBootloaderMode: 105 self.device.log.info(self.device.adb.reboot_bootloader()) 107 if skip_vbmeta == False or self.device.hasVbmetaSlot: 108 self.device.log.info( 109 self.device.fastboot.flash('vbmeta', vbmeta_img)) [all …]
|
/test/suite_harness/common/host-side/util/src/com/android/compatibility/common/util/ |
D | ApiLevelUtil.java | 18 import com.android.tradefed.device.DeviceNotAvailableException; 19 import com.android.tradefed.device.ITestDevice; 30 public static boolean isBefore(ITestDevice device, int version) in isBefore() argument 32 return device.getApiLevel() < version; in isBefore() 35 public static boolean isBefore(ITestDevice device, String version) in isBefore() argument 37 return device.getApiLevel() < resolveVersionString(version); in isBefore() 40 public static boolean isAfter(ITestDevice device, int version) in isAfter() argument 42 return device.getApiLevel() > version; in isAfter() 45 public static boolean isAfter(ITestDevice device, String version) in isAfter() argument 47 return device.getApiLevel() > resolveVersionString(version); in isAfter() [all …]
|
D | FeatureUtil.java | 19 import com.android.tradefed.device.DeviceNotAvailableException; 20 import com.android.tradefed.device.ITestDevice; 39 public static boolean hasSystemFeature(ITestDevice device, String feature) in hasSystemFeature() argument 41 return device.hasFeature(feature); in hasSystemFeature() 45 public static boolean hasAnySystemFeature(ITestDevice device, String... features) in hasAnySystemFeature() argument 48 if (device.hasFeature(feature)) { in hasAnySystemFeature() 56 public static boolean hasAllSystemFeatures(ITestDevice device, String... features) in hasAllSystemFeatures() argument 59 if (!device.hasFeature(feature)) { in hasAllSystemFeatures() 67 public static Set<String> getAllFeatures(ITestDevice device) in getAllFeatures() argument 70 String output = device.executeShellCommand("pm list features"); in getAllFeatures() [all …]
|
D | PropertyUtil.java | 18 import com.android.tradefed.device.DeviceNotAvailableException; 19 import com.android.tradefed.device.ITestDevice; 50 public static boolean isUserBuild(ITestDevice device) throws DeviceNotAvailableException { in isUserBuild() argument 51 return propertyEquals(device, BUILD_TYPE_PROPERTY, "user"); in isUserBuild() 55 public static boolean isDevKeysBuild(ITestDevice device) throws DeviceNotAvailableException { in isDevKeysBuild() argument 56 String buildTags = device.getProperty(BUILD_TAGS_PROPERTY); in isDevKeysBuild() 70 public static int getFirstApiLevel(ITestDevice device) throws DeviceNotAvailableException { in getFirstApiLevel() argument 71 String propString = device.getProperty(FIRST_API_LEVEL); in getFirstApiLevel() 72 return (propString == null) ? device.getApiLevel() : Integer.parseInt(propString); in getFirstApiLevel() 80 public static boolean isVendorApiLevelNewerThan(ITestDevice device, int apiLevel) in isVendorApiLevelNewerThan() argument [all …]
|
D | CpuFeatures.java | 17 import com.android.tradefed.device.CollectingOutputReceiver; 19 import com.android.tradefed.device.DeviceNotAvailableException; 20 import com.android.tradefed.device.ITestDevice; 32 …private static String uname(ITestDevice device, String option) throws DeviceNotAvailableException { in uname() argument 34 device.executeShellCommand("uname " + option, Out); in uname() 41 public static boolean isArm64(ITestDevice device) throws DeviceNotAvailableException { in isArm64() argument 43 return uname(device, UNAME_OPTION_MACHINE_TYPE).contains("aarch64"); in isArm64() 49 public static boolean isArm32(ITestDevice device) throws DeviceNotAvailableException { in isArm32() argument 51 return uname(device, UNAME_OPTION_MACHINE_TYPE).contains("armv7"); in isArm32() 57 public static boolean isX86(ITestDevice device) throws DeviceNotAvailableException { in isX86() argument [all …]
|
D | BackupHostSideUtils.java | 19 import com.android.tradefed.device.DeviceNotAvailableException; 20 import com.android.tradefed.device.INativeDevice; 21 import com.android.tradefed.device.ITestDevice; 36 public static BackupUtils createBackupUtils(INativeDevice device) { in createBackupUtils() argument 41 String result = device.executeShellCommand(command); in createBackupUtils() 50 public static void checkSetupComplete(ITestDevice device) 52 if (!isSetupCompleteSettingForSystemUser(device)) 55 device.getDeviceDescriptor()); 58 private static boolean isSetupCompleteSettingForSystemUser(ITestDevice device) 60 return device.getSetting(USER_SYSTEM, "secure", USER_SETUP_COMPLETE).equals("1");
|
D | PackageUtil.java | 19 import com.android.tradefed.device.DeviceNotAvailableException; 20 import com.android.tradefed.device.ITestDevice; 21 import com.android.tradefed.device.PackageInfo; 29 public static boolean exists(ITestDevice device, String packageName) in exists() argument 31 return device.getInstalledPackageNames().contains(packageName); in exists() 35 public static boolean isSystemApp(ITestDevice device, String packageName) in isSystemApp() argument 37 PackageInfo info = device.getAppPackageInfo(packageName); in isSystemApp() 42 public static String getVersionString(ITestDevice device, String packageName) in getVersionString() argument 44 PackageInfo info = device.getAppPackageInfo(packageName); in getVersionString()
|
D | MonitoringUtils.java | 20 import com.android.tradefed.device.DeviceNotAvailableException; 21 import com.android.tradefed.device.ITestDevice; 34 public static boolean checkDeviceConnectivity(ITestDevice device) in checkDeviceConnectivity() argument 38 if (device.checkConnectivity()) { in checkDeviceConnectivity() 46 device.getSerialNumber(), in checkDeviceConnectivity() 54 public static void checkDeviceConnectivity(ITestDevice device, ITestInvocationListener listener, in checkDeviceConnectivity() argument 56 if (!checkDeviceConnectivity(device)) { in checkDeviceConnectivity() 58 device.logBugreport(String.format("bugreport-connectivity-%s", tag), listener); in checkDeviceConnectivity()
|
/test/vts/harnesses/tradefed/src/com/android/tradefed/util/ |
D | CmdUtil.java | 21 import com.android.tradefed.device.DeviceNotAvailableException; 22 import com.android.tradefed.device.ITestDevice; 49 public boolean waitCmdResultWithDelay(ITestDevice device, String cmd, in waitCmdResultWithDelay() argument 52 if (validateCmdSuccess(device, cmd, predicate)) { in waitCmdResultWithDelay() 69 public boolean retry(ITestDevice device, Vector<String> cmds, String validation_cmd, in retry() argument 78 String out = device.executeShellCommand(cmd); in retry() 81 if (validateCmdSuccess(device, validation_cmd, predicate)) { in retry() 98 public boolean retry(ITestDevice device, String cmd, String validation_cmd, in retry() argument 100 return retry(device, cmd, validation_cmd, predicate, MAX_RETRY_COUNT); in retry() 114 public boolean retry(ITestDevice device, String cmd, String validation_cmd, in retry() argument [all …]
|
/test/suite_harness/common/host-side/tradefed/src/com/android/compatibility/common/tradefed/targetprep/ |
D | MediaPreparer.java | 27 import com.android.tradefed.device.DeviceNotAvailableException; 28 import com.android.tradefed.device.ITestDevice; 213 protected boolean mediaFilesExistOnDevice(ITestDevice device) in mediaFilesExistOnDevice() argument 216 return device.doesFileExist(mBaseDeviceModuleDir); in mediaFilesExistOnDevice() 224 if (!device.doesFileExist(deviceShortFilePath) in mediaFilesExistOnDevice() 225 || !device.doesFileExist(deviceFullFilePath)) { in mediaFilesExistOnDevice() 230 return device.doesFileExist(mBaseDeviceImagesDir); in mediaFilesExistOnDevice() 242 private void updateLocalMediaPath(ITestDevice device, File mediaFolder) in updateLocalMediaPath() argument 248 device.getDeviceDescriptor()); in updateLocalMediaPath() 260 private File downloadMediaToHost(ITestDevice device, IBuildInfo buildInfo) in downloadMediaToHost() argument [all …]
|
D | DeviceInteractionHelperInstaller.java | 22 import com.android.tradefed.device.DeviceNotAvailableException; 23 import com.android.tradefed.device.ITestDevice; 75 public void setUp(ITestDevice device, IBuildInfo buildInfo) in setUp() argument 78 context.addAllocatedDevice("device", device); in setUp() 89 ITestDevice device = testInfo.getDevice(); in setUp() local 95 installHelperApk(device, defaultHelpers, mDefaultHelperPackage); in setUp() 102 device.getDeviceDescriptor()); in setUp() 107 String searchPath = device.getProperty(mHelperPackagePropertyKey); in setUp() 126 checkApkFile(device, apkFile, pkg); in setUp() 127 installHelperApk(device, apkFile, pkg); in setUp() [all …]
|
D | SettingsPreparer.java | 20 import com.android.tradefed.device.DeviceNotAvailableException; 21 import com.android.tradefed.device.ITestDevice; 65 ITestDevice device = testInfo.getDevice(); in run() local 68 "SettingsPreparer class", device.getDeviceDescriptor()); in run() 73 "SettingsPreparer class", device.getDeviceDescriptor()); in run() 79 "\"expected-values\" must be set", device.getDeviceDescriptor()); in run() 97 device.getDeviceDescriptor()); in run() 99 String currentSettingValue = device.executeShellCommand(shellCmdGet).trim(); in run() 104 device.executeShellCommand(shellCmdPut); in run() 112 device.executeShellCommand(shellCmdPut); in run() [all …]
|
D | CrashReporter.java | 21 import com.android.tradefed.device.BackgroundDeviceAction; 22 import com.android.tradefed.device.DeviceNotAvailableException; 23 import com.android.tradefed.device.ITestDevice; 48 private static void upload(ITestDevice device, String testname, JSONArray crashes) { in upload() argument 54 device.executeShellCommand( in upload() 64 device.pushFile(reportFile, CrashUtils.DEVICE_PATH + testname); in upload() 68 device.executeShellCommand( in upload() 79 ITestDevice device = testInfo.getDevice(); in setUp() local 81 device.executeShellCommand("rm -rf " + CrashUtils.DEVICE_PATH); in setUp() 82 device.executeShellCommand("mkdir " + CrashUtils.DEVICE_PATH); in setUp() [all …]
|
/test/vts/harnesses/tradefed/src/com/android/tradefed/targetprep/ |
D | VtsTraceCollectPreparer.java | 24 import com.android.tradefed.device.DeviceNotAvailableException; 25 import com.android.tradefed.device.ITestDevice; 75 public void setUp(ITestDevice device, IBuildInfo buildInfo) in setUp() argument 80 device.enableAdbRoot(); in setUp() 82 pushProfilerLib(device, new File(buildHelper.getTestsDir(), VTS_LIB_DIR_32), in setUp() 85 pushProfilerLib(device, new File(buildHelper.getTestsDir(), VTS_LIB_DIR_64), in setUp() 88 device.pushFile(new File(buildHelper.getTestsDir(), in setUp() 93 removeProfilerLib(device); in setUp() 104 removeProfilerLib(device); in setUp() 108 mEnforcingState = device.executeShellCommand("getenforce"); in setUp() [all …]
|
D | VtsCoveragePreparer.java | 24 import com.android.tradefed.device.DeviceNotAvailableException; 25 import com.android.tradefed.device.ITestDevice; 101 public void setUp(ITestDevice device, IBuildInfo buildInfo) in setUp() argument 103 String flavor = device.getBuildFlavor(); in setUp() 104 String buildId = device.getBuildId(); in setUp() 113 String coverageProperty = device.getProperty(GCOV_PROPERTY); in setUp() 142 mDeviceInfoPath = createTempDir(device); in setUp() 144 cleanupCoverageData(device); in setUp() 161 cleanupCoverageData(device); in setUp() 178 cleanupCoverageData(device); in setUp() [all …]
|
D | VtsHalAdapterPreparer.java | 24 import com.android.tradefed.device.DeviceNotAvailableException; 25 import com.android.tradefed.device.ITestDevice; 88 public void setUp(ITestDevice device, IBuildInfo buildInfo) in setUp() argument 91 device.enableAdbRoot(); in setUp() 95 pushAdapter(device, bitness); in setUp() 102 mCmdUtil.setSystemProperty(device, ADAPTER_SYSPROP, "false"); in setUp() 104 String out = device.executeShellCommand(String.format(LIST_HAL_CMD, mPackageName)); in setUp() 131 device, mCommands, String.format(LIST_HAL_CMD, mPackageName), mCheckEmpty)) { in setUp() 135 mCmdUtil.restartFramework(device); in setUp() 137 device, "service list | grep IPackageManager", mCheckNonEmpty)) { in setUp() [all …]
|
/test/vti/test_serving/gae/webapp/src/tasks/ |
D | removing_outdated_devices_test.py | 56 device = self.GenerateDeviceModel(serial=device_a_serial) 57 device.timestamp = datetime.datetime.now() - datetime.timedelta( 59 device.put() 62 device = self.GenerateDeviceModel(serial=device_b_serial) 63 device.timestamp = datetime.datetime.now() - datetime.timedelta( 65 device.put() 69 device = self.GenerateDeviceModel(serial=serial) 70 device.timestamp = datetime.datetime.now() 71 device.put() 83 for device in devices: [all …]
|
/test/vti/test_serving/gae/webapp/src/endpoint/ |
D | host_info.py | 50 device = model.DeviceModel() 51 device.hostname = hostname 52 device.serial = "n/a" 53 device.product = _NULL_DEVICE_PRODUCT_TYPE 54 device.status = Status.DEVICE_STATUS_DICT["ready"] 55 device.scheduling_status = Status.DEVICE_SCHEDULING_STATUS_DICT[ 57 device.timestamp = datetime.datetime.now() 58 devices_to_put.append(device) 87 device = existing_device[0] 89 device = model.DeviceModel() [all …]
|
D | lab_info.py | 79 for config_device in host.device: 88 device = devices[0] 89 if (device.hostname != host.hostname) and ( 90 device.status != 97 if device.hostname == host.hostname and set( 98 device.device_equipment) == set( 103 device = model.DeviceModel() 104 device.status = Status.DEVICE_STATUS_DICT[ 106 device.product = config_device.product 107 device.serial = config_device.serial [all …]
|
/test/vts/harnesses/tradefed/src/com/android/tradefed/device/metric/ |
D | VtsHalTraceCollector.java | 17 package com.android.tradefed.device.metric; 21 import com.android.tradefed.device.DeviceNotAvailableException; 22 import com.android.tradefed.device.ITestDevice; 51 for (ITestDevice device : getDevices()) { in onTestRunStart() 54 device.enableAdbRoot(); in onTestRunStart() 56 device.executeShellCommand("setenforce 0"); in onTestRunStart() 58 device.executeShellCommand(String.format("rm -rf %s/*.vts.trace", VTS_TMP_DIR)); in onTestRunStart() 59 device.executeShellCommand("chmod 777 " + VTS_TMP_DIR); in onTestRunStart() 60 device.executeShellCommand("chmod 777 " + VTS_TMP_LIB_DIR_32); in onTestRunStart() 61 device.executeShellCommand("chmod 777 " + VTS_TMP_LIB_DIR_64); in onTestRunStart() [all …]
|
/test/vti/test_serving/gae/webapp/src/scheduler/ |
D | schedule_worker_test.py | 58 device = self.GenerateDeviceModel(hostname=lab.hostname) 59 device.put() 62 device_model=device, lab_model=lab) 74 model.DeviceModel.serial == device.serial) 75 device = device_query.fetch()[0] 77 device.scheduling_status) 89 device = self.GenerateDeviceModel( 91 device.put() 94 device_model=device, 101 device_model=device, [all …]
|
D | device_heartbeat.py | 57 for device in lost_devices: 59 device.serial)) 60 device.status = Status.DEVICE_STATUS_DICT["no-response"] 61 devices_to_put.append(device) 65 model.LabModel.hostname == device.hostname) 72 if device.hostname not in labs_to_alert[lab.name]: 73 labs_to_alert[lab.name][device.hostname] = [] 80 labs_to_alert[lab.name][device.hostname].append(device.serial) 84 device.hostname))
|
/test/framework/harnesses/host_controller/command_processor/ |
D | command_device.py | 72 device = {} 73 device["serial"] = serial 74 device["status"] = common._DEVICE_STATUS_DICT[ 76 device["product"] = "error" 77 devices_dict[serial] = device 89 device = {} 90 device["serial"] = line.split()[0] 91 serial = device["serial"] 114 "adb -s %s reboot bootloader" % device["serial"], 117 device["serial"]) [all …]
|
/test/vts/tools/vts-core-tradefed/src/com/android/tradefed/testtype/suite/module/ |
D | KernelTestModuleController.java | 19 import com.android.tradefed.device.DeviceNotAvailableException; 20 import com.android.tradefed.device.ITestDevice; 21 import com.android.tradefed.device.StubDevice; 93 for (ITestDevice device : context.getDevices()) { in deviceLowMem() 94 if (device.getIDevice() instanceof StubDevice) { in deviceLowMem() 98 String lowMemString = device.getProperty(lowMemProp); in deviceLowMem() 110 CLog.e("Couldn't check prop of %s on %s", lowMemProp, device.getSerialNumber()); in deviceLowMem() 119 for (ITestDevice device : context.getDevices()) { in deviceWithHwasan() 120 if (device.getIDevice() instanceof StubDevice) { in deviceWithHwasan() 124 String productName = device.getProperty(productNameProp); in deviceWithHwasan() [all …]
|
/test/vti/dashboard/src/main/java/com/android/vts/entity/ |
D | DeviceInfoEntity.java | 158 .map(device -> device.branch) in getAllBranches() 170 .map(device -> device.branch) in getAllBranches() 189 .map(device -> device.buildFlavor) in getAllBuildFlavors() 201 .map(device -> device.buildFlavor) in getAllBuildFlavors() 267 com.googlecode.objectify.Key parent, AndroidDeviceInfoMessage device) { in fromDeviceInfoMessage() argument 268 if (!device.hasBuildAlias() || !device.hasBuildFlavor() || !device.hasProductVariant() in fromDeviceInfoMessage() 269 || !device.hasBuildId()) { in fromDeviceInfoMessage() 272 String branch = device.getBuildAlias().toStringUtf8(); in fromDeviceInfoMessage() 273 String buildFlavor = device.getBuildFlavor().toStringUtf8(); in fromDeviceInfoMessage() 274 String product = device.getProductVariant().toStringUtf8(); in fromDeviceInfoMessage() [all …]
|