/tools/tradefederation/core/src/com/android/tradefed/targetprep/ |
D | FastbootDeviceFlasher.java | 21 import com.android.tradefed.device.DeviceNotAvailableException; 22 import com.android.tradefed.device.IManagedTestDevice; 23 import com.android.tradefed.device.ITestDevice; 24 import com.android.tradefed.device.TestDeviceState; 142 public void flash(ITestDevice device, IDeviceBuildInfo deviceBuild) throws TargetSetupError, in flash() argument 145 CLog.i("Flashing device %s with build %s", device.getSerialNumber(), in flash() 149 String systemBuildId = device.getBuildId(); in flash() 150 String systemBuildFlavor = device.getBuildFlavor(); in flash() 152 device.rebootIntoBootloader(); in flash() 154 downloadFlashingResources(device, deviceBuild); in flash() [all …]
|
D | DeviceSetup.java | 22 import com.android.tradefed.device.DeviceNotAvailableException; 23 import com.android.tradefed.device.ITestDevice; 24 import com.android.tradefed.device.StubDevice; 430 ITestDevice device = getDevice(testInfo); in setUp() local 431 CLog.i("Performing setup on %s", device.getSerialNumber()); in setUp() 433 if (device.getOptions().isEnableAdbRoot() && !device.enableAdbRoot()) { in setUp() 435 device.getSerialNumber()), device.getDeviceDescriptor()); in setUp() 439 processDeprecatedOptions(device); in setUp() 441 processOptions(device); in setUp() 444 changeSystemProps(device); in setUp() [all …]
|
D | DeviceFlashPreparer.java | 23 import com.android.tradefed.device.DeviceNotAvailableException; 24 import com.android.tradefed.device.DeviceUnresponsiveException; 25 import com.android.tradefed.device.IDeviceManager; 26 import com.android.tradefed.device.ITestDevice; 27 import com.android.tradefed.device.ITestDevice.RecoveryMode; 188 ITestDevice device = testInfo.getDevice(); in setUp() local 190 CLog.i("Performing setup on %s", device.getSerialNumber()); in setUp() 206 checkDeviceProductType(device, deviceBuild); in setUp() 207 device.setRecoveryMode(RecoveryMode.ONLINE); in setUp() 208 IDeviceFlasher flasher = createFlasher(device); in setUp() [all …]
|
D | InstallApexModuleTargetPreparer.java | 22 import com.android.tradefed.device.DeviceNotAvailableException; 23 import com.android.tradefed.device.ITestDevice; 24 import com.android.tradefed.device.ITestDevice.ApexInfo; 25 import com.android.tradefed.device.PackageInfo; 95 ITestDevice device = testInfo.getDevice(); in setUp() local 102 cleanUpStagedAndActiveSession(device); in setUp() 104 Set<ApexInfo> activatedApexes = device.getActiveApexes(); in setUp() 123 device.reboot(); in setUp() 131 device.reboot(); in setUp() 139 activatedApexes = device.getActiveApexes(); in setUp() [all …]
|
D | GkiDeviceFlashPreparer.java | 22 import com.android.tradefed.device.DeviceNotAvailableException; 23 import com.android.tradefed.device.DeviceUnresponsiveException; 24 import com.android.tradefed.device.IDeviceManager; 25 import com.android.tradefed.device.ITestDevice; 26 import com.android.tradefed.device.ITestDevice.RecoveryMode; 82 ITestDevice device = testInfo.getDevice(); in setUp() local 88 validateGkiBootImg(device, buildInfo, tmpDir); in setUp() 89 flashGki(device, buildInfo); in setUp() 91 throw new TargetSetupError(ioe.getMessage(), ioe, device.getDeviceDescriptor()); in setUp() 97 device.rebootUntilOnline(); in setUp() [all …]
|
D | GsiDeviceFlashPreparer.java | 22 import com.android.tradefed.device.DeviceNotAvailableException; 23 import com.android.tradefed.device.DeviceUnresponsiveException; 24 import com.android.tradefed.device.IDeviceManager; 25 import com.android.tradefed.device.ITestDevice; 26 import com.android.tradefed.device.ITestDevice.RecoveryMode; 101 ITestDevice device = testInfo.getDevice(); in setUp() local 107 validateGsiImg(device, buildInfo, tmpDir); in setUp() 108 flashGsi(device, buildInfo); in setUp() 110 throw new TargetSetupError(ioe.getMessage(), ioe, device.getDeviceDescriptor()); in setUp() 116 device.rebootUntilOnline(); in setUp() [all …]
|
D | DefaultTestsZipInstaller.java | 21 import com.android.tradefed.device.DeviceNotAvailableException; 22 import com.android.tradefed.device.IFileEntry; 23 import com.android.tradefed.device.ITestDevice; 24 import com.android.tradefed.device.ITestDevice.RecoveryMode; 112 public void pushTestsZipOntoData(ITestDevice device, IDeviceBuildInfo deviceBuild) in pushTestsZipOntoData() argument 115 device.getSerialNumber())); in pushTestsZipOntoData() 117 RecoveryMode cachedRecoveryMode = device.getRecoveryMode(); in pushTestsZipOntoData() 118 device.setRecoveryMode(RecoveryMode.ONLINE); in pushTestsZipOntoData() 120 doDeleteData(device); in pushTestsZipOntoData() 125 File[] hostDataFiles = getTestsZipDataFiles(hostDir, device); in pushTestsZipOntoData() [all …]
|
/tools/test/connectivity/acts/framework/acts/test_utils/abstract_devices/ |
D | bluetooth_device.py | 61 def __init__(self, device): argument 62 self.device = device 379 return self.device.ed.pop_event(expected_event, self.gatt_timeout) 391 self.device.droid.gattClientDiscoverServices(bluetooth_gatt) 410 self.device.droid.bluetoothToggleState(state) 419 self.device.droid.bluetoothMakeDiscoverable() 421 self.device.droid.bluetoothMakeUndiscoverable() 432 self.device.droid.bluetoothStartPairingHelper(True) 453 self.device.droid.gattClientWriteCharacteristicByInstanceId( 483 self.device.droid.gattClientWriteCharacteristicByInstanceId( [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/command/remote/ |
D | RemoteManagerFuncTest.java | 21 import com.android.tradefed.device.DeviceAllocationState; 22 import com.android.tradefed.device.DeviceNotAvailableException; 23 import com.android.tradefed.device.FreeDeviceState; 24 import com.android.tradefed.device.IDeviceManager; 25 import com.android.tradefed.device.ITestDevice; 75 ITestDevice device = EasyMock.createMock(ITestDevice.class); in testAllocateFree() local 76 EasyMock.expect(device.getSerialNumber()).andStubReturn("serial"); in testAllocateFree() 77 EasyMock.expect(mMockDeviceManager.forceAllocateDevice("serial")).andReturn(device); in testAllocateFree() 78 mMockDeviceManager.freeDevice(EasyMock.eq(device), in testAllocateFree() 81 EasyMock.replay(mMockDeviceManager, device); in testAllocateFree() [all …]
|
/tools/tradefederation/core/src/com/android/tradefed/util/ |
D | BluetoothUtils.java | 19 import com.android.tradefed.device.CollectingOutputReceiver; 20 import com.android.tradefed.device.DeviceNotAvailableException; 21 import com.android.tradefed.device.ITestDevice; 71 public static String runBluetoothInstrumentation(ITestDevice device, String command) in runBluetoothInstrumentation() argument 74 device.executeShellCommand(String.format(BT_INSTR_CMD, command), receiver); in runBluetoothInstrumentation() 81 public static boolean runBluetoothInstrumentationWithRetry(ITestDevice device, String command) in runBluetoothInstrumentationWithRetry() argument 84 String output = runBluetoothInstrumentation(device, command); in runBluetoothInstrumentationWithRetry() 98 public static boolean unpairWithRetry(ITestDevice device) in unpairWithRetry() argument 100 return runBluetoothInstrumentationWithRetry(device, "unpairAll"); in unpairWithRetry() 110 public static String getBluetoothMac(ITestDevice device) throws DeviceNotAvailableException { in getBluetoothMac() argument [all …]
|
D | Sl4aBluetoothUtil.java | 19 import com.android.tradefed.device.DeviceNotAvailableException; 20 import com.android.tradefed.device.ITestDevice; 207 public void startSl4a(ITestDevice device, File sl4aApkFile) throws DeviceNotAvailableException { in startSl4a() argument 208 Sl4aClient sl4aClient = Sl4aClient.startSL4A(device, sl4aApkFile); in startSl4a() 209 mSl4aClients.put(device.getSerialNumber(), sl4aClient); in startSl4a() 224 void setSl4a(ITestDevice device, Sl4aClient client) { in setSl4a() argument 225 mSl4aClients.put(device.getSerialNumber(), client); in setSl4a() 241 public boolean enable(ITestDevice device) throws DeviceNotAvailableException { in enable() argument 242 return toggleState(device, true); in enable() 252 public boolean disable(ITestDevice device) throws DeviceNotAvailableException { in disable() argument [all …]
|
/tools/tradefederation/core/src/com/android/tradefed/device/ |
D | DeviceSelectionOptions.java | 16 package com.android.tradefed.device; 21 import com.android.tradefed.device.DeviceManager.FastbootDevice; 22 import com.android.tradefed.device.cloud.VmRemoteDevice; 218 public Collection<String> getSerials(IDevice device) { in getSerials() argument 223 && (!(device instanceof StubDevice) || (device instanceof FastbootDevice))) { in getSerials() 450 public boolean matches(IDevice device) { in matches() argument 451 Collection<String> serials = getSerials(device); in matches() 458 !serials.contains(device.getSerialNumber())) { in matches() 461 if (excludeSerials.contains(device.getSerialNumber())) { in matches() 465 String productType = getDeviceProductType(device); in matches() [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/ |
D | UnitTests.java | 70 import com.android.tradefed.device.AndroidDebugBridgeWrapperTest; 71 import com.android.tradefed.device.BackgroundDeviceActionTest; 72 import com.android.tradefed.device.DeviceManagerTest; 73 import com.android.tradefed.device.DeviceSelectionOptionsTest; 74 import com.android.tradefed.device.DeviceStateMonitorTest; 75 import com.android.tradefed.device.DumpsysPackageReceiverTest; 76 import com.android.tradefed.device.FastbootHelperTest; 77 import com.android.tradefed.device.LocalAndroidVirtualDeviceTest; 78 import com.android.tradefed.device.ManagedDeviceListTest; 79 import com.android.tradefed.device.ManagedTestDeviceFactoryTest; [all …]
|
/tools/tradefederation/core/test_framework/com/android/tradefed/targetprep/ |
D | CdmaDeviceFlasher.java | 21 import com.android.tradefed.device.DeviceNotAvailableException; 22 import com.android.tradefed.device.ITestDevice; 73 public void flash(ITestDevice device, IDeviceBuildInfo deviceBuild) throws TargetSetupError, in flash() argument 77 device.getSerialNumber(), deviceBuild.getBuildId())); in flash() 80 String systemBuildId = device.getBuildId(); in flash() 81 String systemBuildFlavor = device.getBuildFlavor(); in flash() 83 device.rebootIntoBootloader(); in flash() 85 downloadFlashingResources(device, deviceBuild); in flash() 87 checkAndFlashBootloader(device, deviceBuild); in flash() 88 if (checkShouldFlashBaseband(device, deviceBuild)) { in flash() [all …]
|
D | AppSetup.java | 22 import com.android.tradefed.device.CollectingOutputReceiver; 23 import com.android.tradefed.device.DeviceNotAvailableException; 24 import com.android.tradefed.device.ITestDevice; 91 public void setUp(ITestDevice device, IBuildInfo buildInfo) throws TargetSetupError, in setUp() argument 97 CLog.i("Performing setup on %s", device.getSerialNumber()); in setUp() 100 if (mUninstallAll && !uninstallAllApps(device)) { in setUp() 105 "Failed to uninstall apps on %s", device.getSerialNumber()), in setUp() 106 device.getSerialNumber()); in setUp() 110 if (mForceQueryable && device.isAppEnumerationSupported()) { in setUp() 122 device.getDeviceDescriptor(), in setUp() [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/suite/checker/ |
D | UserCheckerTest.java | 26 import com.android.tradefed.device.ITestDevice; 27 import com.android.tradefed.device.UserInfo; 214 ITestDevice device = in testSwitchToSystem() local 217 when(device.switchUser(0)).thenReturn(true); in testSwitchToSystem() 219 StatusCheckerResult result = checker.preExecutionCheck(device); in testSwitchToSystem() 221 verify(device, never()).createUser(any(), anyBoolean(), anyBoolean()); in testSwitchToSystem() 222 verify(device, times(1)).switchUser(0); in testSwitchToSystem() 230 ITestDevice device = in testSwitchToSecondary() local 233 when(device.switchUser(10)).thenReturn(true); in testSwitchToSecondary() 235 StatusCheckerResult result = checker.preExecutionCheck(device); in testSwitchToSecondary() [all …]
|
/tools/tradefederation/core/tests/src/com/android/tradefed/util/ |
D | AbiFormatterTest.java | 22 import com.android.tradefed.device.ITestDevice; 51 ITestDevice device = EasyMock.createMock(ITestDevice.class); in testGetDefaultAbi() local 53 EasyMock.expect(device.getProperty("ro.product.cpu.abilist32")).andReturn(null); in testGetDefaultAbi() 54 EasyMock.expect(device.getProperty("ro.product.cpu.abi")).andReturn(null); in testGetDefaultAbi() 55 EasyMock.replay(device); in testGetDefaultAbi() 56 assertEquals(null, AbiFormatter.getDefaultAbi(device, "32")); in testGetDefaultAbi() 58 EasyMock.reset(device); in testGetDefaultAbi() 59 EasyMock.expect(device.getProperty(EasyMock.eq("ro.product.cpu.abilist32"))) in testGetDefaultAbi() 61 EasyMock.replay(device); in testGetDefaultAbi() 62 assertEquals("abi", AbiFormatter.getDefaultAbi(device, "32")); in testGetDefaultAbi() [all …]
|
/tools/test/connectivity/acts/framework/acts/test_utils/wifi/aware/ |
D | aware_test_utils.py | 403 def get_mac_addr(device, interface): argument 411 out = device.adb.shell("ifconfig %s" % interface) 420 def get_ipv6_addr(device, interface): argument 429 out = device.adb.shell("ifconfig %s" % interface) 509 def configure_power_setting(device, mode, name, value): argument 518 device.adb.shell( 522 def configure_mac_random_interval(device, interval_sec): argument 531 device.adb.shell("cmd wifiaware native_api set mac_random_interval_sec %d" 535 def configure_ndp_allow_any_override(device, override_api_check): argument 548 device.adb.shell("cmd wifiaware state_mgr allow_ndp_any %s" % [all …]
|
/tools/test/openhst/ |
D | stress_test.py | 719 for device in devices: 720 device.AsyncCommand(command) 721 for device in devices: 722 device.WaitForTasks() 801 for device in self.devices: 802 device.WaitForTasks() 810 for device in self.devices: 811 device_pb = stress_test_info.device.add() 812 device_pb.device_type = device.device_type 813 device_pb.serial_number = device.serial_number [all …]
|
/tools/tradefederation/core/test_framework/com/android/tradefed/device/metric/ |
D | RuntimeRestartCollector.java | 16 package com.android.tradefed.device.metric; 24 import com.android.tradefed.device.DeviceNotAvailableException; 25 import com.android.tradefed.device.ITestDevice; 99 for (ITestDevice device : mTestDevices) { in onTestRunStart() 104 getStatsdMetadata(device).getSystemRestartSecList(); in onTestRunStart() 105 mExistingTimestamps.put(device.getSerialNumber(), existingTimestamps); in onTestRunStart() 110 device.getSerialNumber(), e); in onTestRunStart() 116 device.getSerialNumber(), in onTestRunStart() 118 device, Arrays.asList(Atom.APP_CRASH_OCCURRED_FIELD_NUMBER))); in onTestRunStart() 123 device.getSerialNumber(), e); in onTestRunStart() [all …]
|
/tools/tradefederation/core/src/com/android/tradefed/command/ |
D | CommandScheduler.java | 48 import com.android.tradefed.device.DeviceAllocationState; 49 import com.android.tradefed.device.DeviceManager; 50 import com.android.tradefed.device.DeviceNotAvailableException; 51 import com.android.tradefed.device.DeviceUnresponsiveException; 52 import com.android.tradefed.device.FreeDeviceState; 53 import com.android.tradefed.device.IDeviceManager; 54 import com.android.tradefed.device.IDeviceMonitor; 55 import com.android.tradefed.device.IManagedTestDevice; 56 import com.android.tradefed.device.ITestDevice; 57 import com.android.tradefed.device.ITestDevice.RecoveryMode; [all …]
|
/tools/test/connectivity/acts/framework/tests/libs/ota/ota_runners/ |
D | ota_runner_test.py | 71 device = mock.MagicMock() 72 device.skip_sl4a = False 74 runner = OtaRunnerImpl(tool, device) 80 self.assertTrue(device.stop_services.called) 81 self.assertTrue(device.wait_for_boot_completion.called) 82 self.assertTrue(device.start_services.called) 83 self.assertTrue(device.adb.install.called) 87 device = mock.MagicMock() 89 runner = OtaRunnerImpl(tool, device) 99 device = mock.MagicMock() [all …]
|
/tools/tradefederation/core/src/com/android/tradefed/device/metric/ |
D | LogcatOnFailureCollector.java | 16 package com.android.tradefed.device.metric; 19 import com.android.tradefed.device.CollectingByteOutputReceiver; 20 import com.android.tradefed.device.DeviceNotAvailableException; 21 import com.android.tradefed.device.ILogcatReceiver; 22 import com.android.tradefed.device.ITestDevice; 23 import com.android.tradefed.device.LogcatReceiver; 24 import com.android.tradefed.device.TestDeviceState; 56 for (ITestDevice device : getRealDevices()) { in onTestRunStart() 57 if (getApiLevelNoThrow(device) < API_LIMIT) { in onTestRunStart() 61 initReceiver(device); in onTestRunStart() [all …]
|
/tools/tradefederation/core/test_framework/com/android/tradefed/testtype/junit4/ |
D | BaseHostJUnit4Test.java | 26 import com.android.tradefed.device.DeviceNotAvailableException; 27 import com.android.tradefed.device.ITestDevice; 143 public final void installPackage(ITestDevice device, String apkFileName, String... options) in installPackage() argument 149 mInstallers.put(installer, device); in installPackage() 161 e.getMessage(), e, device.getDeviceDescriptor(), e.getErrorId()); in installPackage() 189 ITestDevice device, in installPackageAsUser() argument 199 mInstallers.put(installer, device); in installPackageAsUser() 213 e.getMessage(), e, device.getDeviceDescriptor(), e.getErrorId()); in installPackageAsUser() 337 ITestDevice device, String pkgName, String testClassName, String testMethodName) in runDeviceTests() argument 340 device, in runDeviceTests() [all …]
|
/tools/test/connectivity/acts/framework/acts/test_utils/bt/ |
D | bt_contacts_utils.py | 269 def get_contact_count(device): argument 272 contact_list = device.droid.contactsQueryContent( 277 def import_device_contacts_from_vcf(device, destination_path, vcf_file, timeout=10): argument 281 device.log.info("Trying to add {} phone numbers.".format(number_count)) 284 device.adb.push("{} {}".format(local_phonebook_path, phone_phonebook_path)) 285 device.droid.importVcf("file://{}{}".format(STORAGE_PATH, vcf_file)) 289 if "ImportVCardActivity" in device.get_my_current_focus_window(): 292 device.adb.shell("input keyevent KEYCODE_{}".format(key)) 295 if wait_for_phone_number_update_complete(device, number_count): 301 def export_device_contacts_to_vcf(device, destination_path, vcf_file): argument [all …]
|