Home
last modified time | relevance | path

Searched refs:device (Results 1 – 25 of 522) sorted by relevance

12345678910>>...21

/cts/hostsidetests/security/src/android/security/cts/
DAdbUtils.java20 import com.android.tradefed.device.CollectingOutputReceiver;
21 import com.android.tradefed.device.DeviceNotAvailableException;
22 import com.android.tradefed.device.ITestDevice;
45 public static String runCommandLine(String command, ITestDevice device) throws Exception { in runCommandLine() argument
46 return device.executeShellCommand(command); in runCommandLine()
56 public static String runPoc(String pocName, ITestDevice device) throws Exception { in runPoc() argument
57 device.executeShellCommand("chmod +x /data/local/tmp/" + pocName); in runPoc()
58 return device.executeShellCommand("/data/local/tmp/" + pocName); in runPoc()
69 public static String runPoc(String pocName, ITestDevice device, int timeout) throws Exception { in runPoc() argument
70 device.executeShellCommand("chmod +x /data/local/tmp/" + pocName); in runPoc()
[all …]
DKernelConfigTest.java20 import com.android.tradefed.device.ITestDevice;
65 public void setDevice(ITestDevice device) { in setDevice() argument
66 super.setDevice(device); in setDevice()
67 mDevice = device; in setDevice()
81 private static HashSet<String> getDeviceConfig(ITestDevice device, in getDeviceConfig() argument
83 if (!device.doesFileExist("/proc/config.gz")){ in getDeviceConfig()
88 set = cache.get(device); in getDeviceConfig()
95 device.pullFile("/proc/config.gz", file); in getDeviceConfig()
101 cache.put(device, set); in getDeviceConfig()
/cts/tools/vm-tests-tf/targetprep/src/android/core/vm/targetprep/
DVmTestPreparer.java22 import com.android.tradefed.device.DeviceNotAvailableException;
23 import com.android.tradefed.device.ITestDevice;
48 public void setUp(ITestDevice device, IBuildInfo buildInfo) in setUp() argument
51 if (!installVmPrereqs(device, helper)) { in setUp()
54 device.getSerialNumber())); in setUp()
62 public void tearDown(ITestDevice device, IBuildInfo buildInfo, Throwable e) in tearDown() argument
64 cleanupDeviceFiles(device); in tearDown()
75 private boolean installVmPrereqs(ITestDevice device, CompatibilityBuildHelper ctsBuild) in installVmPrereqs() argument
77 cleanupDeviceFiles(device); in installVmPrereqs()
81 createRemoteDir(device, VM_TEMP_DIR + "/dalvik-cache" ); in installVmPrereqs()
[all …]
/cts/hostsidetests/appsecurity/src/android/appsecurity/cts/
DUtils.java21 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 …]
DAppSecurityPreparer.java21 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 …]
DCorruptApkTests.java23 import com.android.tradefed.device.ITestDevice;
71 ITestDevice device = getDevice(); in uninstall() local
72 if (device.getInstalledPackageNames().contains(pkg)) { in uninstall()
73 device.uninstallPackage(pkg); in uninstall()
106 ITestDevice device = getDevice(); in assertInstallNoFatalError() local
107 device.clearLogcat(); in assertInstallNoFatalError()
109 final String result = device.installPackage( in assertInstallNoFatalError()
114 if (device.getApiLevel() >= 28) { in assertInstallNoFatalError()
117 assertThat(device.getInstalledPackageNames()).doesNotContain(pkg); in assertInstallNoFatalError()
123 InputStreamSource source = device.getLogcat(200 * 1024); in assertInstallNoFatalError()
/cts/hostsidetests/jvmti/attaching/host/src/android/jvmti/cts/
DJvmtiAttachingHostTest.java21 import com.android.tradefed.device.ITestDevice;
64 public void run(ITestDevice device, String pkg, String apk, String abiName); in run() argument
70 runJvmtiAgentLoadTest((ITestDevice device, String pkg, String apk, String abiName) -> { in testJvmtiAttachDuringBind() argument
72 runAttachTestCmd(device, pkg, "--attach-agent-bind " + AGENT); in testJvmtiAttachDuringBind()
80 runJvmtiAgentLoadTest((ITestDevice device, String pkg, String apk, String abiName) -> { in testJvmtiAttachEarly() argument
82 String pwd = device.executeShellCommand("run-as " + pkg + " pwd"); in testJvmtiAttachEarly()
96 installLibToDataData(device, pkg, abiName, apk, pwd, AGENT, in testJvmtiAttachEarly()
98 runAttachTestCmd(device, pkg, "--attach-agent " + agentInDataData); in testJvmtiAttachEarly()
106 runJvmtiAgentLoadTest((ITestDevice device, String pkg, String apk, String abiName) -> { in testJvmtiAgentAppInternal() argument
109 device.executeShellCommand(setAgentAppCmd); in testJvmtiAgentAppInternal()
[all …]
/cts/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/
DReportProcessor.java19 import com.android.tradefed.device.DeviceNotAvailableException;
20 import com.android.tradefed.device.ITestDevice;
54 void setUp(ITestDevice device) throws DeviceNotAvailableException, IOException {} in setUp() argument
68 void process(ITestDevice device, String reportPath) in process() argument
80 boolean recover(ITestDevice device, String reportPath) in recover() argument
90 void cleanup(ITestDevice device, String reportPath) { in cleanup() argument
92 device.executeShellCommand(String.format("rm %s", reportPath)); in cleanup()
104 static String[] getReportLines(ITestDevice device, String reportPath) in getReportLines() argument
106 File reportFile = device.pullFile(reportPath); in getReportLines()
133 ITestDevice device, String method, String reportKey, int testTimeout, in runDeviceTest() argument
[all …]
DMediaBitstreamsTest.java26 import com.android.tradefed.device.DeviceNotAvailableException;
27 import com.android.tradefed.device.ITestDevice;
222 public void setDevice(ITestDevice device) { in setDevice() argument
223 mDevice = device; in setDevice()
236 private boolean bitstreamsExistOnDevice(ITestDevice device) in bitstreamsExistOnDevice() argument
238 return device.doesFileExist(mDeviceBitstreamsPath) in bitstreamsExistOnDevice()
239 && device.isDirectory(mDeviceBitstreamsPath); in bitstreamsExistOnDevice()
284 void setUp(ITestDevice device) throws DeviceNotAvailableException { in setUp() argument
285 if (mDownloadBitstreams || !bitstreamsExistOnDevice(device)) { in setUp()
286 device.pushDir(mHostBitstreamsPath, mDeviceBitstreamsPath); in setUp()
[all …]
/cts/hostsidetests/sample/src/android/sample/cts/
DSampleHostJUnit4Test.java22 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()
DSampleHostTest.java19 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/
Dgenerate_images.py99 def print_adb_result(device, out, err): argument
100 print("device: " + device)
110 device = AndroidDevice(device_serial)
112 version = device.get_version_codename()
114 version = str(device.get_version_sdk())
116 density = device.get_density()
125 device.uninstall_package('android.theme.app')
127 (out, err, success) = device.install_apk(themeApkPath)
135 (out, err) = device.run_instrumentation_test(
140 (out, err) = device.run_instrumentation_test(
[all …]
/cts/hostsidetests/abioverride/src/android/abioverride/cts/
DAbiOverrideTest.java21 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/jni/
DVulkanTestHelpers.cpp229 VK_CALL(mInit->getHardwareBufferPropertiesFn()(mInit->device(), buffer, in init()
264 VK_CALL(vkCreateImage(mInit->device(), &createInfo, nullptr, &mImage)); in init()
281 mInit->device(), "vkGetImageMemoryRequirements2KHR"); in init()
283 getImageMemoryRequirements(mInit->device(), &memReqsInfo, &memReqs); in init()
306 VK_CALL(vkAllocateMemory(mInit->device(), &allocateInfo, nullptr, &mMemory)); in init()
315 (PFN_vkBindImageMemory2KHR)vkGetDeviceProcAddr(mInit->device(), in init()
318 VK_CALL(bindImageMemory(mInit->device(), 1, &bindImageInfo)); 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 …]
DVulkanPreTransformTestHelpers.cpp78 static bool enumerateDeviceExtensions(VkPhysicalDevice device, in enumerateDeviceExtensions() argument
83 result = vkEnumerateDeviceExtensionProperties(device, nullptr, &count, nullptr); in enumerateDeviceExtensions()
87 result = vkEnumerateDeviceExtensionProperties(device, nullptr, &count, extensions->data()); in enumerateDeviceExtensions()
243 if (mDeviceInfo->device()) { in ~SwapchainInfo()
244 vkDeviceWaitIdle(mDeviceInfo->device()); in ~SwapchainInfo()
245 vkDestroySwapchainKHR(mDeviceInfo->device(), mSwapchain, nullptr); in ~SwapchainInfo()
313 VK_CALL(vkCreateSwapchainKHR(mDeviceInfo->device(), &swapchainCreateInfo, nullptr, in init()
316 VK_CALL(vkGetSwapchainImagesKHR(mDeviceInfo->device(), mSwapchain, &mSwapchainLength, nullptr)); in init()
337 if (mDeviceInfo->device()) { in ~Renderer()
338 vkDeviceWaitIdle(mDeviceInfo->device()); in ~Renderer()
[all …]
/cts/hostsidetests/api/src/com/android/cts/api/
DFilePuller.java26 import com.android.tradefed.device.DeviceNotAvailableException;
27 import com.android.tradefed.device.ITestDevice;
33 private final ITestDevice device; field in FilePuller
36 FilePuller(ITestDevice device) { in FilePuller() argument
37 this.device = device; in FilePuller()
59 device.executeShellCommand(String.format("cat %s", path), in pullFromDevice()
/cts/hostsidetests/sustainedperf/src/android/SustainedPerformance/cts/
DSustainedPerformanceHostTest.java23 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()
167device.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/common/device-side/test-app/
DAndroid.mk31 compatibility-device-info-tests\
32 compatibility-device-info\
33 compatibility-device-util-tests\
34 compatibility-device-util
/cts/hostsidetests/incident/apps/batterystatsapp/src/com/android/server/cts/device/batterystats/
DBatteryStatsForegroundActivity.java17 package com.android.server.cts.device.batterystats;
19 import static com.android.server.cts.device.batterystats.BatteryStatsBgVsFgActions.ACTION_SLEEP_WHI…
20 import static com.android.server.cts.device.batterystats.BatteryStatsBgVsFgActions.ACTION_SYNC;
21 import static com.android.server.cts.device.batterystats.BatteryStatsBgVsFgActions.KEY_ACTION;
22 import static com.android.server.cts.device.batterystats.BatteryStatsBgVsFgActions.KEY_REQUEST_CODE;
23 import static com.android.server.cts.device.batterystats.BatteryStatsBgVsFgActions.doAction;
/cts/hostsidetests/incident/src/com/android/server/cts/
DBatteryIncidentTest.java23 import com.android.tradefed.device.DeviceNotAvailableException;
24 import com.android.tradefed.device.ITestDevice;
63 static boolean hasBattery(ITestDevice device) throws DeviceNotAvailableException { in hasBattery() argument
65 return !isLeanback(device); in hasBattery()
68 private static boolean isLeanback(ITestDevice device) throws DeviceNotAvailableException { in isLeanback() argument
69 final String commandOutput = device.executeShellCommand("pm list features"); in isLeanback()
/cts/hostsidetests/dexmetadata/host/src/com/android/cts/dexmetadata/
DBaseInstallMultiple.java20 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/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/
DUserActivityEmulator.java19 import com.android.tradefed.device.DeviceNotAvailableException;
20 import com.android.tradefed.device.ITestDevice;
30 public UserActivityEmulator(ITestDevice device) throws DeviceNotAvailableException { in UserActivityEmulator() argument
32 mDevice = device; in UserActivityEmulator()
/cts/common/device-side/device-info/
DAndroid.mk24 compatibility-device-util \
30 framework-stub-for-compatibility-device-info
32 LOCAL_MODULE := compatibility-device-info
41 LOCAL_MODULE := framework-stub-for-compatibility-device-info
/cts/hostsidetests/net/src/com/android/cts/net/
DNetPolicyTestsPreparer.java20 import com.android.tradefed.device.DeviceNotAvailableException;
21 import com.android.tradefed.device.ITestDevice;
36 public void setUp(ITestDevice device, IBuildInfo buildInfo) throws DeviceNotAvailableException { in setUp() argument
37 mDevice = device; in setUp()
45 public void tearDown(ITestDevice device, IBuildInfo buildInfo, Throwable throwable) in tearDown() argument
/cts/tests/tests/graphics/src/android/graphics/cts/
DVulkanFeaturesTest.java205 for (JSONObject device : mVulkanDevices) { in getBestDevice()
206 int level = determineHardwareLevel(device); in getBestDevice()
207 int compute = determineHardwareCompute(device); in getBestDevice()
208 int version = determineHardwareVersion(device); in getBestDevice()
210 Log.d(TAG, device.getJSONObject("properties").getString("deviceName") + in getBestDevice()
216 bestDevice = device; in getBestDevice()
225 private int determineHardwareLevel(JSONObject device) throws JSONException { in determineHardwareLevel() argument
226 JSONObject features = device.getJSONObject("features"); in determineHardwareLevel()
258 private int determineHardwareCompute(JSONObject device) throws JSONException { in determineHardwareCompute() argument
259 boolean variablePointers = device.getJSONObject("VK_KHR_variable_pointers") in determineHardwareCompute()
[all …]

12345678910>>...21