Home
last modified time | relevance | path

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

12345678910>>...28

/cts/hostsidetests/securitybulletin/src/android/security/cts/
DAdbUtils.java21 import com.android.tradefed.device.CollectingOutputReceiver;
22 import com.android.tradefed.device.ITestDevice;
23 import com.android.tradefed.device.NativeDevice;
61 public static String runCommandLine(String command, ITestDevice device) throws Exception { in runCommandLine() argument
66 return device.executeShellCommand(command); in runCommandLine()
76 public static String runPoc(String pocName, ITestDevice device) throws Exception { in runPoc() argument
77 device.executeShellCommand("chmod +x /data/local/tmp/" + pocName); in runPoc()
78 return device.executeShellCommand("/data/local/tmp/" + pocName); in runPoc()
89 public static String runPoc(String pocName, ITestDevice device, int timeout) throws Exception { in runPoc() argument
90 return runPoc(pocName, device, timeout, null); in runPoc()
[all …]
DHostsideOomCatcher.java19 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 …]
/cts/hostsidetests/jvmti/attaching/host/src/android/jvmti/cts/
DJvmtiAttachingHostTest.java21 import com.android.tradefed.device.ITestDevice;
71 public void run(ITestDevice device, String pkg, String apk, String abiName); in run() argument
86 runJvmtiAgentLoadTest((ITestDevice device, String pkg, String apk, String abiName) -> { in testJvmtiAttachDuringBind() argument
88 runAttachTestCmd(device, pkg, "--attach-agent-bind " + AGENT); in testJvmtiAttachDuringBind()
96 runJvmtiAgentLoadTest((ITestDevice device, String pkg, String apk, String abiName) -> { in testJvmtiAttachEarly() argument
98 String pwd = device.executeShellCommand( in testJvmtiAttachEarly()
113 installLibToDataData(device, pkg, abiName, apk, pwd, AGENT, in testJvmtiAttachEarly()
115 runAttachTestCmd(device, pkg, "--attach-agent " + agentInDataData); in testJvmtiAttachEarly()
123 runJvmtiAgentLoadTest((ITestDevice device, String pkg, String apk, String abiName) -> { in testJvmtiAgentStartupAgents() argument
126 startup_dir = getPwd(device, pkg) + "/" + STARTUP_AGENT_DIR; in testJvmtiAgentStartupAgents()
[all …]
/cts/hostsidetests/appsecurity/src/android/appsecurity/cts/
DUtils.java24 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 …]
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 …]
/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;
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/tests/tests/provider/preconditions/src/android/provider/cts/preconditions/
DExternalStoragePreparer.java20 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/hostsidetests/angle/src/android/angle/cts/
DCtsAngleCommon.java18 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/classloaders/useslibrary/src/android/classloaders/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 …]
/cts/hostsidetests/wifibroadcasts/src/android/wifibroadcasts/cts/
DWifiBroadcastsHostJUnit4Test.java23 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/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()
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 …]
DVulkanPreTransformTestHelpers.cpp86 static bool enumerateDeviceExtensions(VkPhysicalDevice device, in enumerateDeviceExtensions() argument
91 result = vkEnumerateDeviceExtensionProperties(device, nullptr, &count, nullptr); in enumerateDeviceExtensions()
95 result = vkEnumerateDeviceExtensionProperties(device, nullptr, &count, extensions->data()); in enumerateDeviceExtensions()
258 if (mDeviceInfo->device()) { in ~SwapchainInfo()
259 vkDeviceWaitIdle(mDeviceInfo->device()); in ~SwapchainInfo()
260 vkDestroySwapchainKHR(mDeviceInfo->device(), mSwapchain, nullptr); in ~SwapchainInfo()
339 VK_CALL(vkCreateSwapchainKHR(mDeviceInfo->device(), &swapchainCreateInfo, nullptr, in init()
342 VK_CALL(vkGetSwapchainImagesKHR(mDeviceInfo->device(), mSwapchain, &mSwapchainLength, nullptr)); in init()
363 if (mDeviceInfo->device()) { in ~Renderer()
364 vkDeviceWaitIdle(mDeviceInfo->device()); in ~Renderer()
[all …]
/cts/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/
DReportProcessor.java20 import com.android.tradefed.device.DeviceNotAvailableException;
21 import com.android.tradefed.device.ITestDevice;
57 void setUp(ITestDevice device) throws DeviceNotAvailableException, IOException {} in setUp() argument
71 void process(ITestDevice device, String reportPath) in process() argument
83 boolean recover(ITestDevice device, String reportPath) in recover() argument
93 void cleanup(ITestDevice device, String reportPath) { in cleanup() argument
95 device.executeShellCommand(String.format("rm %s", reportPath)); in cleanup()
107 static String[] getReportLines(ITestDevice device, String reportPath) in getReportLines() argument
109 File reportFile = device.pullFile(reportPath); in getReportLines()
144 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;
238 public void setDevice(ITestDevice device) { in setDevice() argument
239 mDevice = device; in setDevice()
262 private boolean bitstreamsExistOnDevice(ITestDevice device) in bitstreamsExistOnDevice() argument
264 return device.doesFileExist(mDeviceBitstreamsPath) in bitstreamsExistOnDevice()
265 && device.isDirectory(mDeviceBitstreamsPath); in bitstreamsExistOnDevice()
310 void setUp(ITestDevice device) throws DeviceNotAvailableException { in setUp() argument
311 if (mDownloadBitstreams || !bitstreamsExistOnDevice(device)) { in setUp()
312 device.pushDir(mHostBitstreamsPath, mDeviceBitstreamsPath); in setUp()
[all …]
/cts/hostsidetests/theme/
Dgenerate_images.py104 def print_adb_result(device, out, err): argument
105 print("device: " + device)
115 device = AndroidDevice(device_serial)
117 version = device.get_version_codename()
119 version = str(device.get_version_sdk())
121 density = device.get_density()
130 device.uninstall_package('android.theme.app')
132 (out, err, success) = device.install_apk(themeApkPath)
140 (out, err) = device.run_instrumentation_test(
145 (out, err) = device.run_instrumentation_test(
[all …]
/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/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()
/cts/hostsidetests/hdmicec/src/android/hdmicec/cts/audio/
DHdmiCecRemoteControlPassThroughTest.java26 import com.android.tradefed.device.ITestDevice;
71 ITestDevice device = getDevice(); in cect_11_2_13_1_UserControlPressAndRelease() local
73 device.executeShellCommand(CLEAR_COMMAND); in cect_11_2_13_1_UserControlPressAndRelease()
75 device.executeAdbCommand("logcat", "-c"); in cect_11_2_13_1_UserControlPressAndRelease()
77 device.executeShellCommand(START_COMMAND); in cect_11_2_13_1_UserControlPressAndRelease()
105 ITestDevice device = getDevice(); in cect_11_2_13_2_UserControlPressAndHold() local
107 device.executeShellCommand(CLEAR_COMMAND); in cect_11_2_13_2_UserControlPressAndHold()
109 device.executeAdbCommand("logcat", "-c"); in cect_11_2_13_2_UserControlPressAndHold()
111 device.executeShellCommand(START_COMMAND); in cect_11_2_13_2_UserControlPressAndHold()
139 ITestDevice device = getDevice(); in cect_11_2_13_3_UserControlPressAndHoldWithNoRelease() local
[all …]
/cts/hostsidetests/hdmicec/src/android/hdmicec/cts/
DLogHelper.java22 import com.android.tradefed.device.ITestDevice;
44 private static String getLog(ITestDevice device, String tag) throws Exception { in getLog() argument
46 String logs = device.executeAdbCommand("logcat", "-v", "brief", "-d", tag + ":I", "*:S"); in getLog()
56 device.executeAdbCommand("logcat", "-c"); in getLog()
60 public static void assertLog(ITestDevice device, String tag, String ...expectedOutput) in assertLog() argument
62 String testString = getLog(device, tag); in assertLog()
67 public static void assertLogDoesNotContain(ITestDevice device, String tag, in assertLogDoesNotContain() argument
69 String testString = getLog(device, tag); in assertLogDoesNotContain()
73 public static List<Integer> getSupportedAudioFormats(ITestDevice device) throws Exception { in getSupportedAudioFormats() argument
76 device.executeAdbCommand("logcat", "-v", "brief", "-d", SAD_READER + ":I", "*:S"); in getSupportedAudioFormats()
[all …]
/cts/hostsidetests/hdmicec/src/android/hdmicec/cts/playback/
DHdmiCecSystemStandbyTest.java28 import com.android.tradefed.device.ITestDevice;
62 ITestDevice device = getDevice(); in setHdmiControlDeviceAutoOff() local
63 String val = device.executeShellCommand("settings get global " + in setHdmiControlDeviceAutoOff()
66 device.executeShellCommand("settings put global " in setHdmiControlDeviceAutoOff()
68 device.executeShellCommand("settings get global " + HDMI_CONTROL_DEVICE_AUTO_OFF).trim(); in setHdmiControlDeviceAutoOff()
74 ITestDevice device = getDevice(); in checkDeviceAsleepAfterStandbySent() local
76 device.executeShellCommand("input keyevent KEYCODE_HOME"); in checkDeviceAsleepAfterStandbySent()
80 String wakeState = device.executeShellCommand("dumpsys power | grep mWakefulness="); in checkDeviceAsleepAfterStandbySent()
84 device.executeShellCommand("input keyevent KEYCODE_WAKEUP"); in checkDeviceAsleepAfterStandbySent()
135 ITestDevice device = getDevice(); in cect_11_2_3_4_NoBroadcastStandby() local
[all …]
DHdmiCecSystemAudioControlTest.java29 import com.android.tradefed.device.ITestDevice;
64 ITestDevice device = getDevice(); in cect_11_2_15_10_GiveSystemAudioModeStatus() local
66 device.executeShellCommand("input keyevent KEYCODE_HOME"); in cect_11_2_15_10_GiveSystemAudioModeStatus()
67 device.executeShellCommand("input keyevent KEYCODE_SLEEP"); in cect_11_2_15_10_GiveSystemAudioModeStatus()
68 device.executeShellCommand("input keyevent KEYCODE_WAKEUP"); in cect_11_2_15_10_GiveSystemAudioModeStatus()
81 ITestDevice device = getDevice(); in cect_11_2_15_11_VolumeUpDownUserControlPressed() local
84 device.executeShellCommand("input keyevent KEYCODE_VOLUME_UP"); in cect_11_2_15_11_VolumeUpDownUserControlPressed()
92 device.executeShellCommand("input keyevent KEYCODE_VOLUME_DOWN"); in cect_11_2_15_11_VolumeUpDownUserControlPressed()
108 ITestDevice device = getDevice(); in cect_11_2_15_12_MuteUserControlPressed() local
111 device.executeShellCommand("input keyevent KEYCODE_VOLUME_MUTE"); in cect_11_2_15_12_MuteUserControlPressed()
/cts/tests/tests/graphics/src/android/graphics/cts/
DVulkanFeaturesTest.java231 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/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/hostsidetests/hdmicec/
Dcec_adapter.md34 No device type given. Using 'recording device'
51 DEBUG: [ 403] TV (0): device status changed into 'present'
60 Nov 18 16:15:46 No device type given. Using 'recording device'
94 : power on the device with the given logical address.
97 : put the device with the given address in standby mode.
102 [p] \{device\} \{port\}
115 : set OSD message on the specified device.
118 : get the CEC version of the specified device.
121 : get the vendor ID of the specified device.
124 : get the menu language of the specified device.
[all …]
/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()

12345678910>>...28