/cts/hostsidetests/statsdatom/src/android/cts/statsdatom/lib/ |
D | DeviceUtils.java | 29 import com.android.tradefed.device.CollectingByteOutputReceiver; 30 import com.android.tradefed.device.DeviceNotAvailableException; 31 import com.android.tradefed.device.ITestDevice; 78 public static @Nonnull TestRunResult runDeviceTests(ITestDevice device, String pkgName, in runDeviceTests() argument 86 pkgName, TEST_RUNNER, device.getIDevice()); in runDeviceTests() 94 assertThat(device.runInstrumentationTests(testRunner, listener)).isTrue(); in runDeviceTests() 122 public static @Nonnull TestRunResult runDeviceTestsOnStatsdApp(ITestDevice device, in runDeviceTestsOnStatsdApp() argument 125 return runDeviceTests(device, STATSD_ATOM_TEST_PKG, testClassName, testMethodName); in runDeviceTestsOnStatsdApp() 131 public static void installStatsdTestApp(ITestDevice device, IBuildInfo ctsBuildInfo) in installStatsdTestApp() argument 133 installTestApp(device, STATSD_ATOM_TEST_APK, STATSD_ATOM_TEST_PKG, ctsBuildInfo); in installStatsdTestApp() [all …]
|
/cts/hostsidetests/hdmicec/src/android/hdmicec/cts/ |
D | AudioManagerHelper.java | 24 import com.android.tradefed.device.ITestDevice; 47 public static void muteDevice(ITestDevice device, HdmiCecClientWrapper hdmiCecClient) in muteDevice() argument 50 device.executeShellCommand(CLEAR_COMMAND); in muteDevice() 52 device.executeAdbCommand("logcat", "-c"); in muteDevice() 54 device.executeShellCommand(START_COMMAND + "android.hdmicec.app.MUTE"); in muteDevice() 59 public static void unmuteDevice(ITestDevice device, HdmiCecClientWrapper hdmiCecClient) in unmuteDevice() argument 62 device.executeShellCommand(CLEAR_COMMAND); in unmuteDevice() 64 device.executeShellCommand(START_COMMAND + "android.hdmicec.app.UNMUTE"); in unmuteDevice() 69 public static boolean isDeviceMuted(ITestDevice device) throws Exception { in isDeviceMuted() argument 71 device.executeShellCommand(CLEAR_COMMAND); in isDeviceMuted() [all …]
|
D | LogHelper.java | 24 import com.android.tradefed.device.ITestDevice; 46 private static String getLog(ITestDevice device, String tag) throws Exception { in getLog() argument 48 String logs = device.executeAdbCommand("logcat", "-v", "brief", "-d", tag + ":I", "*:S"); in getLog() 58 device.executeAdbCommand("logcat", "-c"); in getLog() 62 public static void assertLog(ITestDevice device, String tag, String ...expectedOutput) in assertLog() argument 64 String testString = getLog(device, tag); in assertLog() 70 public static int parseDutVolume(ITestDevice device, String tag) throws Exception { in parseDutVolume() argument 71 String testString = getLog(device, tag); in parseDutVolume() 84 public static void assertLogDoesNotContain(ITestDevice device, String tag, in assertLogDoesNotContain() argument 86 String testString = getLog(device, tag); in assertLogDoesNotContain() [all …]
|
D | BaseHdmiCecCtsTest.java | 23 import com.android.tradefed.device.ITestDevice; 140 public static int getDumpsysPhysicalAddress(ITestDevice device) throws Exception { in getDumpsysPhysicalAddress() argument 141 return parseRequiredAddressFromDumpsys(device, AddressType.DUMPSYS_PHYSICAL_ADDRESS); in getDumpsysPhysicalAddress() 150 public static List<LogicalAddress> getDumpsysLogicalAddresses(ITestDevice device) in getDumpsysLogicalAddresses() argument 163 String dumpsys = device.executeShellCommand("dumpsys hdmi_control"); in getDumpsysLogicalAddresses() 188 public static LogicalAddress getTargetLogicalAddress(ITestDevice device) throws Exception { in getTargetLogicalAddress() argument 189 return getTargetLogicalAddress(device, HdmiCecConstants.CEC_DEVICE_TYPE_UNKNOWN); in getTargetLogicalAddress() 199 public static LogicalAddress getTargetLogicalAddress(ITestDevice device, int testDeviceType) in getTargetLogicalAddress() argument 201 List<LogicalAddress> logicalAddressList = getDumpsysLogicalAddresses(device); in getTargetLogicalAddress() 215 ITestDevice device = getDevice(); in getDumpsysActiveSourceLogicalAddress() local [all …]
|
/cts/hostsidetests/angle/src/android/angle/cts/ |
D | CtsAngleCommon.java | 18 import com.android.tradefed.device.ITestDevice; 19 import com.android.tradefed.device.PackageInfo; 86 static String getGlobalSetting(ITestDevice device, String globalSetting) throws Exception { in getGlobalSetting() argument 87 return device.getSetting("global", globalSetting); in getGlobalSetting() 90 …static void setGlobalSetting(ITestDevice device, String globalSetting, String value) throws Except… in setGlobalSetting() argument 91 device.setSetting("global", globalSetting, value); in setGlobalSetting() 92 device.executeShellCommand("am refresh-settings-cache"); in setGlobalSetting() 95 static void clearSettings(ITestDevice device) throws Exception { in clearSettings() argument 97 setGlobalSetting(device, SETTINGS_GLOBAL_ALL_USE_ANGLE, "0"); in clearSettings() 98 setGlobalSetting(device, SETTINGS_GLOBAL_ANGLE_IN_USE_DIALOG_BOX, "0"); in clearSettings() [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/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 …]
|
/cts/hostsidetests/wifibroadcasts/src/android/wifibroadcasts/cts/ |
D | WifiBroadcastsHostJUnit4Test.java | 23 import com.android.tradefed.device.ITestDevice; 91 public void setDevice(ITestDevice device) { in setDevice() argument 92 mDevice = device; in setDevice() 107 ITestDevice device = getDevice(); in testCleanLogcat() local 108 assertNotNull("Device not set", device); in testCleanLogcat() 109 if (!device.hasFeature(FEATURE_WIFI)) { in testCleanLogcat() 113 device.executeShellCommand(CLEAR_COMMAND); in testCleanLogcat() 115 device.executeShellCommand("svc data disable; svc wifi disable"); in testCleanLogcat() 117 device.executeAdbCommand("logcat", "-c"); in testCleanLogcat() 119 device.executeShellCommand("input keyevent KEYCODE_WAKEUP"); in testCleanLogcat() [all …]
|
/cts/hostsidetests/jvmti/attaching/host/src/android/jvmti/cts/ |
D | JvmtiAttachingHostTest.java | 21 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/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 38 device.executeShellCommand("sm set-virtual-disk false"); in setUp() 39 device.executeShellCommand("sm set-virtual-disk true"); in setUp() 42 final String diskId = getVirtualDisk(device); in setUp() 43 device.executeShellCommand("sm partition " + diskId + " public"); in setUp() 47 public void tearDown(ITestDevice device, IBuildInfo buildInfo, Throwable throwable) in tearDown() argument 51 device.executeShellCommand("sm set-virtual-disk false"); in tearDown() 54 private String getVirtualDisk(ITestDevice device) throws DeviceNotAvailableException { in getVirtualDisk() argument [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/hdmicec/src/android/hdmicec/cts/playback/ |
D | HdmiCecTvPowerToggleTest.java | 30 import com.android.tradefed.device.ITestDevice; 67 ITestDevice device = getDevice(); in setPowerControlMode() local 68 String val = device.executeShellCommand("settings get global " + in setPowerControlMode() 70 device.executeShellCommand("settings put global " in setPowerControlMode() 81 ITestDevice device = getDevice(); in cectTvPowerToggleTest_awake_noActiveSource_tvOn() local 83 device.waitForBootComplete(HdmiCecConstants.REBOOT_TIMEOUT); in cectTvPowerToggleTest_awake_noActiveSource_tvOn() 86 device.executeShellCommand("cmd hdmi_control cec_setting set hdmi_cec_enabled 0"); in cectTvPowerToggleTest_awake_noActiveSource_tvOn() 87 device.executeShellCommand("cmd hdmi_control cec_setting set hdmi_cec_enabled 1"); in cectTvPowerToggleTest_awake_noActiveSource_tvOn() 96 device.executeShellCommand("input keyevent KEYCODE_TV_POWER"); in cectTvPowerToggleTest_awake_noActiveSource_tvOn() 102 String wakeState = device.executeShellCommand("dumpsys power | grep mWakefulness="); in cectTvPowerToggleTest_awake_noActiveSource_tvOn() [all …]
|
D | HdmiCecOneTouchPlayTest.java | 28 import com.android.tradefed.device.ITestDevice; 74 ITestDevice device = getDevice(); in cect_11_2_1_1_OneTouchPlay() local 75 device.reboot(); in cect_11_2_1_1_OneTouchPlay() 76 sendOtp(device); in cect_11_2_1_1_OneTouchPlay() 88 ITestDevice device = getDevice(); in cect_PairingActivity_OneTouchPlay() local 89 device.reboot(); in cect_PairingActivity_OneTouchPlay() 90 device.executeShellCommand(START_COMMAND + ACTION_CONNECT_INPUT_NORMAL); in cect_PairingActivity_OneTouchPlay() 94 device.executeShellCommand(FORCE_STOP_COMMAND + SETTINGS_PACKAGE); in cect_PairingActivity_OneTouchPlay() 97 private void sendOtp(ITestDevice device) throws Exception { in sendOtp() argument 98 device.executeShellCommand("cmd hdmi_control onetouchplay"); in sendOtp()
|
/cts/hostsidetests/hdmicec/src/android/hdmicec/cts/common/ |
D | HdmiCecPowerStatusTest.java | 28 import com.android.tradefed.device.ITestDevice; 67 ITestDevice device = getDevice(); in cect_hf4_6_20_broadcastsWhenTurningOn() local 71 device.executeShellCommand("input keyevent KEYCODE_SLEEP"); in cect_hf4_6_20_broadcastsWhenTurningOn() 75 device.executeShellCommand("input keyevent KEYCODE_WAKEUP"); in cect_hf4_6_20_broadcastsWhenTurningOn() 99 ITestDevice device = getDevice(); in cect_hf4_6_21_broadcastsWhenGoingToStandby() local 103 device.executeShellCommand("input keyevent KEYCODE_WAKEUP"); in cect_hf4_6_21_broadcastsWhenGoingToStandby() 107 device.executeShellCommand("input keyevent KEYCODE_SLEEP"); in cect_hf4_6_21_broadcastsWhenGoingToStandby() 131 ITestDevice device = getDevice(); in cect_PowerStatusWhenOn() local 133 device.waitForBootComplete(HdmiCecConstants.REBOOT_TIMEOUT); in cect_PowerStatusWhenOn() 134 device.executeShellCommand("input keyevent KEYCODE_WAKEUP"); in cect_PowerStatusWhenOn() [all …]
|
/cts/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/ |
D | ReportProcessor.java | 20 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 …]
|
/cts/hostsidetests/securitybulletin/src/android/security/cts/ |
D | CVE_2021_0523.java | 20 import com.android.tradefed.device.ITestDevice; 57 ITestDevice device = getDevice(); in testPocCVE_2021_0523() local 65 AdbUtils.runCommandLine("input keyevent KEYCODE_WAKEUP", device); in testPocCVE_2021_0523() 66 AdbUtils.runCommandLine("input keyevent KEYCODE_MENU", device); in testPocCVE_2021_0523() 67 AdbUtils.runCommandLine("input keyevent KEYCODE_HOME", device); in testPocCVE_2021_0523() 70 AdbUtils.runCommandLine("pm install " + appPath, device); in testPocCVE_2021_0523() 74 "pm grant " + packageName + " android.permission.SYSTEM_ALERT_WINDOW", device); in testPocCVE_2021_0523() 82 extractInt(AdbUtils.runCommandLine("wm size", device), displaySize); in testPocCVE_2021_0523() 87 AdbUtils.runCommandLine("input tap " + width / 2 + " " + height / 2, device); in testPocCVE_2021_0523() 92 AdbUtils.runCommandLine("pm uninstall " + packageName, device); in testPocCVE_2021_0523() [all …]
|
D | SecurityTestCase.java | 28 import com.android.tradefed.device.DeviceNotAvailableException; 29 import com.android.tradefed.device.ITestDevice; 30 import com.android.tradefed.device.NativeDevice; 129 public static IBuildInfo getBuildInfo(ITestDevice device) { in getBuildInfo() argument 130 return sBuildInfo.get(device); in getBuildInfo() 133 public static IAbi getAbi(ITestDevice device) { in getAbi() argument 134 return sAbi.get(device); in getAbi() 137 public static String getTestName(ITestDevice device) { in getTestName() argument 138 return sTestName.get(device); in getTestName() 141 public static PocPusher getPocPusher(ITestDevice device) { in getPocPusher() argument [all …]
|
D | CVE_2021_0478.java | 21 import com.android.tradefed.device.ITestDevice; 41 ITestDevice device = getDevice(); in testPocCVE_2021_0478() local 49 AdbUtils.runCommandLine("input keyevent KEYCODE_WAKEUP", device); in testPocCVE_2021_0478() 50 AdbUtils.runCommandLine("input keyevent KEYCODE_MENU", device); in testPocCVE_2021_0478() 51 AdbUtils.runCommandLine("input keyevent KEYCODE_HOME", device); in testPocCVE_2021_0478() 54 AdbUtils.runCommandLine("pm install " + appPath, device); in testPocCVE_2021_0478() 63 AdbUtils.runCommandLine("pm uninstall " + packageName, device); in testPocCVE_2021_0478() 67 String logcat = AdbUtils.runCommandLine("logcat -d *:S AndroidRuntime:E", device); in testPocCVE_2021_0478()
|
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/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()
|
/cts/hostsidetests/hdmicec/src/android/hdmicec/cts/tv/ |
D | HdmiCecTvStandbyTest.java | 24 import com.android.tradefed.device.ITestDevice; 63 ITestDevice device = getDevice(); in cect_11_1_3_1_BroadcastStandby() local 64 device.waitForBootComplete(HdmiCecConstants.REBOOT_TIMEOUT); in cect_11_1_3_1_BroadcastStandby() 67 device.executeShellCommand("input keyevent KEYCODE_SLEEP"); in cect_11_1_3_1_BroadcastStandby() 69 String wakeState = device.executeShellCommand("dumpsys power | grep mWakefulness="); in cect_11_1_3_1_BroadcastStandby() 74 device.executeShellCommand("input keyevent KEYCODE_WAKEUP"); in cect_11_1_3_1_BroadcastStandby() 80 ITestDevice device = getDevice(); in setHdmiControlDeviceAutoOff() local 82 device.executeShellCommand("settings get global " + HDMI_CONTROL_DEVICE_AUTO_OFF) in setHdmiControlDeviceAutoOff() 85 device.executeShellCommand( in setHdmiControlDeviceAutoOff() 87 device.executeShellCommand("settings get global " + HDMI_CONTROL_DEVICE_AUTO_OFF); in setHdmiControlDeviceAutoOff()
|
/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 String prop32bit = device.getProperty("ro.product.cpu.abilist32"); in testAbiIs32bit() 94 device.executeAdbCommand("logcat", "-c"); in testAbiIs32bit() 96 device.executeShellCommand(START_COMMAND); in testAbiIs32bit() 98 String logs = device.executeAdbCommand("logcat", "-v", "brief", "-d", CLASS + ":I", "*:S"); in testAbiIs32bit()
|
/cts/hostsidetests/tagging/src/com/android/cts/tagging/ |
D | TaggingBaseTest.java | 20 import com.android.tradefed.device.ITestDevice; 55 ITestDevice device = getDevice(); in setUp() local 69 device.executeShellCommand( in setUp() 75 device.executeAdbCommand("logcat", "-c"); in setUp() 76 device.executeShellCommand(KERNEL_HELPER_START_COMMAND); in setUp() 77 String logs = device.executeAdbCommand( in setUp() 110 ITestDevice device = getDevice(); in tearDown() local 111 device.executeShellCommand( in tearDown()
|
/cts/hostsidetests/theme/ |
D | generate_images.py | 108 def print_adb_result(device, out, err): argument 109 print("device: " + device) 119 device = AndroidDevice(device_serial) 121 version = device.get_version_codename() 123 version = str(device.get_version_sdk()) 125 density = device.get_density() 134 device.uninstall_package('android.theme.app') 136 (out, err, success) = device.install_apk(themeApkPath) 144 (out, err) = device.run_instrumentation_test( 149 (out, err) = device.run_instrumentation_test( [all …]
|