/cts/hostsidetests/securitybulletin/src/android/security/cts/ |
D | AdbUtils.java | 20 import com.android.tradefed.device.CollectingOutputReceiver; 21 import com.android.tradefed.device.ITestDevice; 42 public static String runCommandLine(String command, ITestDevice device) throws Exception { in runCommandLine() argument 47 return device.executeShellCommand(command); in runCommandLine() 57 public static String runPoc(String pocName, ITestDevice device) throws Exception { in runPoc() argument 58 device.executeShellCommand("chmod +x /data/local/tmp/" + pocName); in runPoc() 59 return device.executeShellCommand("/data/local/tmp/" + pocName); in runPoc() 70 public static String runPoc(String pocName, ITestDevice device, int timeout) throws Exception { in runPoc() argument 71 device.executeShellCommand("chmod +x /data/local/tmp/" + pocName); in runPoc() 73 … device.executeShellCommand("/data/local/tmp/" + pocName, receiver, timeout, TimeUnit.SECONDS, 0); in runPoc() [all …]
|
D | HostsideOomCatcher.java | 19 import com.android.tradefed.device.CollectingOutputReceiver; 20 import com.android.tradefed.device.DeviceNotAvailableException; 21 import com.android.tradefed.device.ITestDevice; 23 import com.android.tradefed.device.BackgroundDeviceAction; 81 private static long getMemTotal(ITestDevice device) throws DeviceNotAvailableException { in getMemTotal() argument 83 String serial = device.getSerialNumber(); in getMemTotal() 86 String memInfo = device.executeShellCommand("cat /proc/meminfo"); in getMemTotal() 193 private ITestDevice device = null; 196 public OomReceiver(ITestDevice device) { 197 this.device = device; [all …]
|
D | LaunchSomeWhere.java | 19 import com.android.tradefed.device.ITestDevice; 75 public static void launchSomeWhere(String cve, ITestDevice device) in launchSomeWhere() argument 89 AdbUtils.runCommandLine(command, device); in launchSomeWhere() 90 if (device.waitForDeviceNotAvailable(9_000)) in launchSomeWhere() 91 device.waitForDeviceAvailable(); in launchSomeWhere()
|
/cts/hostsidetests/appsecurity/src/android/appsecurity/cts/ |
D | Utils.java | 24 import com.android.tradefed.device.DeviceNotAvailableException; 25 import com.android.tradefed.device.ITestDevice; 40 public static void runDeviceTestsAsCurrentUser(ITestDevice device, String packageName, in runDeviceTestsAsCurrentUser() argument 42 runDeviceTests(device, packageName, testClassName, testMethodName, device.getCurrentUser(), in runDeviceTestsAsCurrentUser() 46 public static void runDeviceTestsAsCurrentUser(ITestDevice device, String packageName, in runDeviceTestsAsCurrentUser() argument 49 runDeviceTests(device, packageName, testClassName, testMethodName, device.getCurrentUser(), in runDeviceTestsAsCurrentUser() 53 public static void runDeviceTests(ITestDevice device, String packageName, String testClassName, in runDeviceTests() argument 55 runDeviceTests(device, packageName, testClassName, testMethodName, USER_SYSTEM, null); in runDeviceTests() 58 public static void runDeviceTests(ITestDevice device, String packageName, String testClassName, in runDeviceTests() argument 61 runDeviceTests(device, packageName, testClassName, testMethodName, USER_SYSTEM, testArgs); in runDeviceTests() [all …]
|
D | AppSecurityPreparer.java | 21 import com.android.tradefed.device.DeviceNotAvailableException; 22 import com.android.tradefed.device.ITestDevice; 41 public void setUp(ITestDevice device, IBuildInfo buildInfo) in setUp() argument 45 removeSecondaryUsers(device); in setUp() 47 final int maxUsers = device.getMaxNumberOfUsersSupported(); in setUp() 51 "Created secondary user " + device.createUser("CTS_" + System.nanoTime())); in setUp() 55 "Created secondary user " + device.createUser("CTS_" + System.nanoTime())); in setUp() 58 try (InputStreamSource logcat = device.getLogcatDump()) { in setUp() 61 throw new TargetSetupError("Failed to create user.", e, device.getDeviceDescriptor()); in setUp() 66 public void tearDown(ITestDevice device, IBuildInfo buildInfo, Throwable throwable) in tearDown() argument [all …]
|
D | CorruptApkTests.java | 27 import com.android.tradefed.device.DeviceNotAvailableException; 28 import com.android.tradefed.device.ITestDevice; 69 ITestDevice device = getDevice(); in retrieveInfo() local 72 String pidResult = device.executeShellCommand("pidof system_server").trim(); in retrieveInfo() 83 String pidStats = device.executeShellCommand("cat /proc/" + pid + "/stat"); in retrieveInfo() 102 ITestDevice device = getDevice(); in uninstallApks() local 103 device.uninstallPackage("com.android.appsecurity.b71360999"); in uninstallApks() 104 device.uninstallPackage("com.android.appsecurity.b71361168"); in uninstallApks() 105 device.uninstallPackage("com.android.appsecurity.b79488511"); in uninstallApks()
|
/cts/tests/tests/provider/preconditions/src/android/provider/cts/preconditions/ |
D | ExternalStoragePreparer.java | 20 import com.android.tradefed.device.DeviceNotAvailableException; 21 import com.android.tradefed.device.ITestDevice; 34 public void setUp(ITestDevice device, IBuildInfo buildInfo) in setUp() argument 37 if (!hasIsolatedStorage(device)) return; in setUp() 39 device.executeShellCommand("sm set-virtual-disk false"); in setUp() 40 device.executeShellCommand("sm set-virtual-disk true"); in setUp() 43 final String diskId = getVirtualDisk(device); in setUp() 44 device.executeShellCommand("sm partition " + diskId + " public"); in setUp() 48 public void tearDown(ITestDevice device, IBuildInfo buildInfo, Throwable throwable) in tearDown() argument 51 if (!hasIsolatedStorage(device)) return; in tearDown() [all …]
|
/cts/tools/vm-tests-tf/targetprep/src/android/core/vm/targetprep/ |
D | VmTestPreparer.java | 22 import com.android.tradefed.device.DeviceNotAvailableException; 23 import com.android.tradefed.device.ITestDevice; 50 public void setUp(ITestDevice device, IBuildInfo buildInfo) in setUp() argument 53 if (!installVmPrereqs(device, helper)) { in setUp() 56 device.getSerialNumber())); in setUp() 64 public void tearDown(ITestDevice device, IBuildInfo buildInfo, Throwable e) in tearDown() argument 66 cleanupDeviceFiles(device); in tearDown() 77 private boolean installVmPrereqs(ITestDevice device, CompatibilityBuildHelper ctsBuild) in installVmPrereqs() argument 79 cleanupDeviceFiles(device); in installVmPrereqs() 83 createRemoteDir(device, VM_TEMP_DIR + "/dalvik-cache" ); in installVmPrereqs() [all …]
|
/cts/hostsidetests/angle/src/android/angle/cts/ |
D | CtsAngleCommon.java | 18 import com.android.tradefed.device.ITestDevice; 84 static String getGlobalSetting(ITestDevice device, String globalSetting) throws Exception { in getGlobalSetting() argument 85 return device.getSetting("global", globalSetting); in getGlobalSetting() 88 …static void setGlobalSetting(ITestDevice device, String globalSetting, String value) throws Except… in setGlobalSetting() argument 89 device.setSetting("global", globalSetting, value); in setGlobalSetting() 92 static void clearSettings(ITestDevice device) throws Exception { in clearSettings() argument 93 setGlobalSetting(device, SETTINGS_GLOBAL_ALL_USE_ANGLE, "0"); in clearSettings() 94 setGlobalSetting(device, SETTINGS_GLOBAL_ANGLE_IN_USE_DIALOG_BOX, "0"); in clearSettings() 95 setGlobalSetting(device, SETTINGS_GLOBAL_DRIVER_PKGS, "\"\""); in clearSettings() 96 setGlobalSetting(device, SETTINGS_GLOBAL_DRIVER_VALUES, "\"\""); in clearSettings() [all …]
|
/cts/hostsidetests/jvmti/attaching/host/src/android/jvmti/cts/ |
D | JvmtiAttachingHostTest.java | 21 import com.android.tradefed.device.ITestDevice; 65 public void run(ITestDevice device, String pkg, String apk, String abiName); in run() argument 76 runJvmtiAgentLoadTest((ITestDevice device, String pkg, String apk, String abiName) -> { in testJvmtiAttachDuringBind() argument 78 runAttachTestCmd(device, pkg, "--attach-agent-bind " + AGENT); in testJvmtiAttachDuringBind() 86 runJvmtiAgentLoadTest((ITestDevice device, String pkg, String apk, String abiName) -> { in testJvmtiAttachEarly() argument 88 String pwd = device.executeShellCommand( in testJvmtiAttachEarly() 103 installLibToDataData(device, pkg, abiName, apk, pwd, AGENT, in testJvmtiAttachEarly() 105 runAttachTestCmd(device, pkg, "--attach-agent " + agentInDataData); in testJvmtiAttachEarly() 113 runJvmtiAgentLoadTest((ITestDevice device, String pkg, String apk, String abiName) -> { in testJvmtiAgentAppInternal() argument 116 device.executeShellCommand(setAgentAppCmd); in testJvmtiAgentAppInternal() [all …]
|
/cts/hostsidetests/classloaders/useslibrary/src/android/classloaders/cts/ |
D | Utils.java | 21 import com.android.tradefed.device.DeviceNotAvailableException; 22 import com.android.tradefed.device.ITestDevice; 35 public static void runDeviceTests(ITestDevice device, String packageName, String testClassName, in runDeviceTests() argument 37 runDeviceTests(device, packageName, testClassName, testMethodName, USER_SYSTEM, null); in runDeviceTests() 40 public static void runDeviceTests(ITestDevice device, String packageName, String testClassName, in runDeviceTests() argument 43 runDeviceTests(device, packageName, testClassName, testMethodName, USER_SYSTEM, testArgs); in runDeviceTests() 46 public static void runDeviceTests(ITestDevice device, String packageName, String testClassName, in runDeviceTests() argument 48 runDeviceTests(device, packageName, testClassName, testMethodName, userId, null); in runDeviceTests() 51 public static void runDeviceTests(ITestDevice device, String packageName, String testClassName, in runDeviceTests() argument 55 runDeviceTests(device, packageName, testClassName, testMethodName, userId, testArgs, in runDeviceTests() [all …]
|
/cts/hostsidetests/wifibroadcasts/src/android/wifibroadcasts/cts/ |
D | WifiBroadcastsHostJUnit4Test.java | 23 import com.android.tradefed.device.ITestDevice; 86 public void setDevice(ITestDevice device) { in setDevice() argument 87 mDevice = device; in setDevice() 102 ITestDevice device = getDevice(); in testCleanLogcat() local 103 assertNotNull("Device not set", device); in testCleanLogcat() 104 if (!device.hasFeature(FEATURE_WIFI)) { in testCleanLogcat() 108 device.executeShellCommand(CLEAR_COMMAND); in testCleanLogcat() 110 device.executeShellCommand("svc data disable; svc wifi disable; svc bluetooth disable"); in testCleanLogcat() 112 device.executeAdbCommand("logcat", "-c"); in testCleanLogcat() 114 device.executeShellCommand("input keyevent KEYCODE_WAKEUP"); in testCleanLogcat() [all …]
|
/cts/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/ |
D | ReportProcessor.java | 19 import com.android.tradefed.device.DeviceNotAvailableException; 20 import com.android.tradefed.device.ITestDevice; 55 void setUp(ITestDevice device) throws DeviceNotAvailableException, IOException {} in setUp() argument 69 void process(ITestDevice device, String reportPath) in process() argument 81 boolean recover(ITestDevice device, String reportPath) in recover() argument 91 void cleanup(ITestDevice device, String reportPath) { in cleanup() argument 93 device.executeShellCommand(String.format("rm %s", reportPath)); in cleanup() 105 static String[] getReportLines(ITestDevice device, String reportPath) in getReportLines() argument 107 File reportFile = device.pullFile(reportPath); in getReportLines() 141 ITestDevice device, String method, String reportKey, int testTimeout, in runDeviceTest() argument [all …]
|
D | MediaBitstreamsTest.java | 26 import com.android.tradefed.device.DeviceNotAvailableException; 27 import com.android.tradefed.device.ITestDevice; 233 public void setDevice(ITestDevice device) { in setDevice() argument 234 mDevice = device; in setDevice() 247 private boolean bitstreamsExistOnDevice(ITestDevice device) in bitstreamsExistOnDevice() argument 249 return device.doesFileExist(mDeviceBitstreamsPath) in bitstreamsExistOnDevice() 250 && device.isDirectory(mDeviceBitstreamsPath); in bitstreamsExistOnDevice() 295 void setUp(ITestDevice device) throws DeviceNotAvailableException { in setUp() argument 296 if (mDownloadBitstreams || !bitstreamsExistOnDevice(device)) { in setUp() 297 device.pushDir(mHostBitstreamsPath, mDeviceBitstreamsPath); in setUp() [all …]
|
/cts/tests/tests/graphics/jni/ |
D | VulkanTestHelpers.cpp | 229 VK_CALL(mInit->getHardwareBufferPropertiesFn()(mInit->device(), buffer, in init() 264 VK_CALL(vkCreateImage(mInit->device(), &createInfo, nullptr, &mImage)); in init() 285 VK_CALL(vkAllocateMemory(mInit->device(), &allocateInfo, nullptr, &mMemory)); in init() 294 (PFN_vkBindImageMemory2KHR)vkGetDeviceProcAddr(mInit->device(), in init() 297 VK_CALL(bindImageMemory(mInit->device(), 1, &bindImageInfo)); in init() 314 mInit->device(), "vkGetImageMemoryRequirements2KHR"); in init() 316 getImageMemoryRequirements(mInit->device(), &memReqsInfo, &memReqs); in init() 335 mInit->device(), "vkCreateSamplerYcbcrConversionKHR"); in init() 337 VK_CALL(createSamplerYcbcrConversion(mInit->device(), &conversionCreateInfo, in init() 367 vkCreateSampler(mInit->device(), &samplerCreateInfo, nullptr, &mSampler)); in init() [all …]
|
D | VulkanPreTransformTestHelpers.cpp | 84 static bool enumerateDeviceExtensions(VkPhysicalDevice device, in enumerateDeviceExtensions() argument 89 result = vkEnumerateDeviceExtensionProperties(device, nullptr, &count, nullptr); in enumerateDeviceExtensions() 93 result = vkEnumerateDeviceExtensionProperties(device, nullptr, &count, extensions->data()); in enumerateDeviceExtensions() 256 if (mDeviceInfo->device()) { in ~SwapchainInfo() 257 vkDeviceWaitIdle(mDeviceInfo->device()); in ~SwapchainInfo() 258 vkDestroySwapchainKHR(mDeviceInfo->device(), mSwapchain, nullptr); in ~SwapchainInfo() 337 VK_CALL(vkCreateSwapchainKHR(mDeviceInfo->device(), &swapchainCreateInfo, nullptr, in init() 340 VK_CALL(vkGetSwapchainImagesKHR(mDeviceInfo->device(), mSwapchain, &mSwapchainLength, nullptr)); in init() 361 if (mDeviceInfo->device()) { in ~Renderer() 362 vkDeviceWaitIdle(mDeviceInfo->device()); in ~Renderer() [all …]
|
/cts/hostsidetests/sample/src/android/sample/cts/ |
D | SampleHostJUnit4Test.java | 22 import com.android.tradefed.device.ITestDevice; 73 public void setDevice(ITestDevice device) { in setDevice() argument 74 mDevice = device; in setDevice() 89 ITestDevice device = getDevice(); in testLogcat() local 90 assertNotNull("Device not set", device); in testLogcat() 92 device.executeShellCommand(CLEAR_COMMAND); in testLogcat() 94 device.executeAdbCommand("logcat", "-c"); in testLogcat() 96 device.executeShellCommand(START_COMMAND); in testLogcat() 98 String logs = device.executeAdbCommand("logcat", "-v", "brief", "-d", CLASS + ":I", "*:S"); in testLogcat()
|
D | SampleHostTest.java | 19 import com.android.tradefed.device.ITestDevice; 65 ITestDevice device = getDevice(); in testLogcat() local 67 device.executeShellCommand(CLEAR_COMMAND); in testLogcat() 69 device.executeAdbCommand("logcat", "-c"); in testLogcat() 71 device.executeShellCommand(START_COMMAND); in testLogcat() 73 String logs = device.executeAdbCommand("logcat", "-v", "brief", "-d", CLASS + ":I", "*:S"); in testLogcat()
|
/cts/hostsidetests/theme/ |
D | generate_images.py | 103 def print_adb_result(device, out, err): argument 104 print("device: " + device) 114 device = AndroidDevice(device_serial) 116 version = device.get_version_codename() 118 version = str(device.get_version_sdk()) 120 density = device.get_density() 129 device.uninstall_package('android.theme.app') 131 (out, err, success) = device.install_apk(themeApkPath) 139 (out, err) = device.run_instrumentation_test( 144 (out, err) = device.run_instrumentation_test( [all …]
|
/cts/hostsidetests/sustainedperf/src/android/SustainedPerformance/cts/ |
D | SustainedPerformanceHostTest.java | 23 import com.android.tradefed.device.ITestDevice; 36 ITestDevice device; field in SustainedPerformanceHostTest 78 device.executeShellCommand("cd " + DHRYSTONE + " ; chmod 777 dhry"); in run() 80 String result = device.executeShellCommand("echo " + loopCount in run() 165 device.executeAdbCommand("logcat", "-c"); in setUpEnvironment() 166 device.executeShellCommand("settings put global airplane_mode_on 1"); in setUpEnvironment() 167 … device.executeShellCommand("am broadcast -a android.intent.action.AIRPLANE_MODE --ez state true"); in setUpEnvironment() 171 device = getDevice(); in testShader() 177 device.executeAdbCommand("logcat", "-c"); in testShader() 178 device.executeShellCommand(START_TEST_COMMAND); in testShader() [all …]
|
/cts/hostsidetests/abioverride/src/android/abioverride/cts/ |
D | AbiOverrideTest.java | 21 import com.android.tradefed.device.ITestDevice; 73 ITestDevice device = getDevice(); in setUp() local 74 device.uninstallPackage(PACKAGE); in setUp() 78 device.installPackage(app, false, options); in setUp() 87 ITestDevice device = getDevice(); in testAbiIs32bit() local 89 device.executeAdbCommand("logcat", "-c"); in testAbiIs32bit() 91 device.executeShellCommand(START_COMMAND); in testAbiIs32bit() 93 String logs = device.executeAdbCommand("logcat", "-v", "brief", "-d", CLASS + ":I", "*:S"); in testAbiIs32bit()
|
/cts/tests/tests/graphics/src/android/graphics/cts/ |
D | VulkanFeaturesTest.java | 231 for (JSONObject device : mVulkanDevices) { in getBestDevice() 232 int level = determineHardwareLevel(device); in getBestDevice() 233 int compute = determineHardwareCompute(device); in getBestDevice() 234 int version = determineHardwareVersion(device); in getBestDevice() 236 Log.d(TAG, device.getJSONObject("properties").getString("deviceName") + in getBestDevice() 242 bestDevice = device; in getBestDevice() 252 for (JSONObject device : mVulkanDevices) { in hasOnlyCpuDevice() 253 if (device.getJSONObject("properties").getInt("deviceType") in hasOnlyCpuDevice() 261 private int determineHardwareLevel(JSONObject device) throws JSONException { in determineHardwareLevel() argument 262 JSONObject features = device.getJSONObject("features"); in determineHardwareLevel() [all …]
|
/cts/hostsidetests/dexmetadata/host/src/com/android/cts/dexmetadata/ |
D | BaseInstallMultiple.java | 20 import com.android.tradefed.device.DeviceNotAvailableException; 21 import com.android.tradefed.device.ITestDevice; 44 /*package*/ BaseInstallMultiple(ITestDevice device, IBuildInfo buildInfo) { in BaseInstallMultiple() argument 45 mDevice = device; in BaseInstallMultiple() 74 final ITestDevice device = mDevice; in run() local 83 String result = device.executeShellCommand(cmd.toString()); in run() 104 if (!device.pushFile(file, remotePath)) { in run() 114 result = device.executeShellCommand(cmd.toString()); in run() 123 result = device.executeShellCommand(cmd.toString()); in run()
|
/cts/tests/tests/hardware/src/android/hardware/input/cts/tests/ |
D | README.md | 1 How to add a test for a new HID device 4 1. Connect the device of interest to Android 7 Here "0005:0B05:4500.000F" is just an example, it will be different for each device. 9 This identifier will also change each time you reconnect the same physical device to Android. 10 4. `cat rdesc` will print the descriptor of this device 11 5. `cat events` will print the events that the device is producing 12 Once you cat the events, generate some events (by hand) on the device. 13 This will show you the hid reports that the device produces.
|
/cts/hostsidetests/devicepolicy/app/IntentSender/src/com/android/cts/intent/sender/ |
D | SuspendPackageTest.java | 96 final UiDevice device = UiDevice.getInstance(getInstrumentation()); in dismissPolicyTransparencyDialog() local 98 device.wait(Until.hasObject(POPUP_TITLE_WATCH_SELECTOR), WAIT_DIALOG_TIMEOUT_IN_MS); in dismissPolicyTransparencyDialog() 99 final UiObject2 title = device.findObject(POPUP_TITLE_WATCH_SELECTOR); in dismissPolicyTransparencyDialog() 103 device.wait(Until.hasObject(POPUP_IMAGE_SELECTOR), WAIT_DIALOG_TIMEOUT_IN_MS); in dismissPolicyTransparencyDialog() 104 final UiObject2 icon = device.findObject(POPUP_IMAGE_SELECTOR); in dismissPolicyTransparencyDialog() 107 final UiObject2 button = device.findObject(POPUP_BUTTON_SELECTOR); in dismissPolicyTransparencyDialog() 114 final UiDevice device = UiDevice.getInstance(getInstrumentation()); in dismissCustomDialog() local 115 device.wait(Until.hasObject(SUSPEND_BUTTON_SELECTOR), WAIT_DIALOG_TIMEOUT_IN_MS); in dismissCustomDialog() 117 final UiObject2 button = device.findObject(SUSPEND_BUTTON_SELECTOR); in dismissCustomDialog()
|