/cts/tests/tests/companion/common/src/android/companion/cts/common/ |
D | AppHelper.kt | 30 runShellCommand("cmd companiondevice associate $userId $packageName $macAddress $role") in associate() 33 runShellCommand("cmd companiondevice disassociate $userId $packageName $macAddress") in associate() 36 runShellCommand("cmd companiondevice disassociate-all $userId $packageName") in associate() 39 runShellCommand("pm list packages --user $userId $packageName").isNotBlank() in associate() 41 fun install() = apkPath?.let { runShellCommand("pm install --user $userId $apkPath") } in associate() 44 fun uninstall() = runShellCommand("pm uninstall --user $userId $packageName") in uninstall() 46 fun clearData() = runShellCommand("pm clear --user $userId $packageName") in uninstall() 49 runShellCommand("cmd role get-role-holders --user $userId $role").contains(packageName) in uninstall() 52 runShellCommand("cmd role add-role-holder --user $userId $role $packageName") in uninstall() 55 runShellCommand("cmd role remove-role-holder --user $userId $role $packageName") in uninstall() [all …]
|
D | TestBase.kt | 157 protected fun runShellCommand(cmd: String) = instrumentation.runShellCommand(cmd) in runShellCommand() method 186 runShellCommand("cmd companiondevice simulate-device-event $associationId $event") in simulateDeviceEvent() 189 runShellCommand( in simulateDeviceEvent() 195 runShellCommand( in simulateDeviceEvent() 202 runShellCommand("cmd companiondevice simulate-device-event-device-unlocked $userId") in simulateDeviceEventDeviceUnlocked() 206 runShellCommand( in startObservingDevicePresenceByUuid() 213 runShellCommand( in stopObservingDevicePresenceByUuid() 390 fun Instrumentation.runShellCommand(cmd: String): String { in runShellCommand() method 393 val out = SystemUtil.runShellCommand(this, cmd) in runShellCommand() 403 runShellCommand("setprop $name $value") in setSystemProp() [all …]
|
/cts/tests/JobScheduler/src/android/jobscheduler/cts/ |
D | BaseJobSchedulerTest.java | 115 SystemUtil.runShellCommand(getInstrumentation(), "cmd activity set-inactive " in injectInstrumentation() 135 SystemUtil.runShellCommand("cmd jobscheduler cache-config-changes on"); in setUp() 163 SystemUtil.runShellCommand("cmd jobscheduler cache-config-changes off"); in tearDown() 164 SystemUtil.runShellCommand(getInstrumentation(), "cmd jobscheduler monitor-battery off"); in tearDown() 165 SystemUtil.runShellCommand(getInstrumentation(), "cmd battery reset"); in tearDown() 170 SystemUtil.runShellCommand(getInstrumentation(), "cmd devicestoragemonitor reset"); in tearDown() 173 SystemUtil.runShellCommand(getInstrumentation(), in tearDown() 222 final String output = SystemUtil.runShellCommand("cmd deviceidle enabled deep").trim(); in isDeviceIdleEnabled() 227 final String output = SystemUtil.runShellCommand("cmd deviceidle enabled light").trim(); in isDeviceLightIdleEnabled() 234 SystemUtil.runShellCommand(getInstrumentation(), in isJsStorageStateLow() [all …]
|
D | TestAppInterface.java | 107 SystemUtil.runShellCommand( in TestAppInterface() 111 SystemUtil.runShellCommand( in TestAppInterface() 115 SystemUtil.runShellCommand("am set-standby-bucket " + TEST_APP_PACKAGE + " rare"); in TestAppInterface() 118 SystemUtil.runShellCommand("cmd deviceidle whitelist -" + TEST_APP_PACKAGE); in TestAppInterface() 119 SystemUtil.runShellCommand("cmd netpolicy start-watching " + mTestPackageUid); in TestAppInterface() 143 SystemUtil.runShellCommand("am compat reset-all " + TEST_APP_PACKAGE); in cleanup() 145 SystemUtil.runShellCommand("cmd deviceidle whitelist -" + TEST_APP_PACKAGE); in cleanup() 148 SystemUtil.runShellCommand("cmd netpolicy stop-watching"); in cleanup() 149 SystemUtil.runShellCommand( in cleanup() 242 SystemUtil.runShellCommand("am stop-app " + TEST_APP_PACKAGE); in kill() [all …]
|
/cts/tests/input/src/android/input/cts/ |
D | InputShellCommandTest.kt | 68 ShellUtils.runShellCommand("input tap $x $y") in testDefaultTapToolType() 79 ShellUtils.runShellCommand("input touchscreen tap $x $y") in testTapToolType() 82 ShellUtils.runShellCommand("input touchpad tap $x $y") in testTapToolType() 85 ShellUtils.runShellCommand("input touchnavigation tap $x $y") in testTapToolType() 88 ShellUtils.runShellCommand("input stylus tap $x $y") in testTapToolType() 91 ShellUtils.runShellCommand("input mouse tap $x $y") in testTapToolType() 94 ShellUtils.runShellCommand("input trackball tap $x $y") in testTapToolType() 97 ShellUtils.runShellCommand("input joystick tap $x $y") in testTapToolType() 103 ShellUtils.runShellCommand("input scroll") in testDefaultScroll() 114 ShellUtils.runShellCommand("input mouse scroll $x $y --axis VSCROLL,-1") in testPointerScroll() [all …]
|
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/ |
D | AutofillRestrictionsTest.java | 86 runShellCommand("settings put secure --user %d %s %d default", in enableService() 90 runShellCommand("settings put secure %s %s default", AUTOFILL_SERVICE, SERVICE_NAME); in enableService() 92 runShellCommand("settings put --user %d secure %s %s default", in enableService() 100 runShellCommand("settings delete secure %s", AUTOFILL_SERVICE); in disableService() 102 runShellCommand("settings delete --user %d secure %s", mUserId, AUTOFILL_SERVICE); in disableService() 111 actual = runShellCommand("settings get secure %s", AUTOFILL_SERVICE); in waitForServiceSettingSaved() 113 actual = runShellCommand("settings get --user %d secure %s", mUserId, in waitForServiceSettingSaved()
|
/cts/tests/attentionservice/src/android/attentionservice/cts/ |
D | CtsAttentionServiceDeviceTest.java | 22 import static com.android.compatibility.common.util.ShellUtils.runShellCommand; 205 return runShellCommand("cmd attention getAttentionServiceComponent"); in getAttentionServiceComponent() 209 return Integer.parseInt(runShellCommand("cmd attention getLastTestCallbackCode")); in getLastTestCallbackCode() 214 runShellCommand("cmd attention getLastTestProximityUpdateCallbackCode")); in getLastTestProximityUpdateCallbackCode() 225 Boolean isSuccess = runShellCommand("cmd attention call checkAttention") in callCheckAttention() 232 runShellCommand("cmd attention call cancelCheckAttention"); in callCancelAttention() 238 Boolean isSuccess = runShellCommand("cmd attention call onStartProximityUpdates") in callStartProximityUpdates() 245 runShellCommand("cmd attention call onStopProximityUpdates"); in callStopProximityUpdates() 250 return runShellCommand("cmd attention setTestableAttentionService " + service) in setTestableAttentionService() 255 runShellCommand("cmd attention clearTestableAttentionService"); in clearTestableAttentionService() [all …]
|
/cts/hostsidetests/packagemanager/domainverification/lib/constants/android/src/com/android/cts/packagemanager/verify/domain/android/ |
D | SharedVerifications.kt | 38 ShellUtils.runShellCommand(DomainUtils.setAppLinks(it, "STATE_NO_RESPONSE", "all")) in reset() 39 ShellUtils.runShellCommand(DomainUtils.resetAppLinks(it)) in reset() 40 ShellUtils.runShellCommand(DomainUtils.setAppLinksAllowed(it, context.userId, true)) in reset() 41 ShellUtils.runShellCommand( in reset() 49 ShellUtils.runShellCommand("$enablePrefix $DECLARING_PKG_NAME_1") in reset() 50 ShellUtils.runShellCommand("$enablePrefix $DECLARING_PKG_NAME_2") in reset() 51 ShellUtils.runShellCommand( in reset() 54 ShellUtils.runShellCommand( in reset() 80 ShellUtils.runShellCommand( in verifyDomains() 98 ShellUtils.runShellCommand( in verifyDomains() [all …]
|
D | DomainVerificationIntentTestBase.kt | 102 protected fun runShellCommand(vararg commands: String) = commands.forEach { in runShellCommand() method in com.android.cts.packagemanager.verify.domain.android.DomainVerificationIntentTestBase 103 assertThat(ShellUtils.runShellCommand(it)).isEmpty() in runShellCommand() 113 val message = ShellUtils.runShellCommand( in assertResolvesTo() 115 ) + "\n" + ShellUtils.runShellCommand( in assertResolvesTo() 163 runShellCommand(DomainUtils.resetAppLinks(packageName)) in resetAppLinks() 168 runShellCommand(DomainUtils.setAppLinks(packageName, state, *domains)) in setAppLinks() 172 runShellCommand(DomainUtils.setAppLinksAllowed(packageName, userId, enabled)) in setAppLinksAllowed() 181 runShellCommand( in setAppLinksUserSelection()
|
/cts/tests/wearable/src/android/wearable/cts/ |
D | CtsWearableSensingServiceDeviceTest.java | 25 import static com.android.compatibility.common.util.ShellUtils.runShellCommand; 498 return runShellCommand("cmd wearable_sensing get-bound-package %d", USER_ID); in getWearableSensingServiceComponent() 502 runShellCommand("cmd wearable_sensing set-temporary-service %d %s %d", in setTestableWearableSensingService() 507 runShellCommand("cmd wearable_sensing set-temporary-service %d", USER_ID); in clearTestableWearableSensingService() 511 runShellCommand("cmd ambient_context start-detection-wearable %d %s", in callStartDetection() 516 runShellCommand("cmd ambient_context start-detection-mixed %d %s", in callStartDetectionMixed() 521 runShellCommand("cmd ambient_context start-detection %d %s", in callStartDetectionDefault() 526 runShellCommand("cmd wearable_sensing create-data-stream"); in createDataStream() 530 runShellCommand("cmd wearable_sensing destroy-data-stream"); in destroyDataStream() 534 runShellCommand("cmd ambient_context stop-detection %d %s", in callStopDetection() [all …]
|
/cts/tests/autofillservice/src/android/autofillservice/cts/testcore/ |
D | AutofillLoggingTestRule.java | 19 import static com.android.compatibility.common.util.ShellUtils.runShellCommand; 58 final String levelBefore = runShellCommand("cmd autofill get log_level"); in apply() 60 runShellCommand("cmd autofill set log_level verbose"); in apply() 70 runShellCommand("cmd autofill set log_level %s", levelBefore); in apply() 94 final String activityDump = runShellCommand("dumpsys activity top");
|
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/ |
D | ShellUtils.java | 54 result.set(runShellCommand(command)); in runShellCommandWithTimeout() 82 public static String runShellCommand(@NonNull String template, Object...args) { in runShellCommand() method in ShellUtils 87 .runShellCommand(InstrumentationRegistry.getInstrumentation(), command); in runShellCommand() 105 runShellCommand("%s tap %d %d", sUserHelper.getInputCmd("touchscreen"), x, y); in tap() 118 runShellCommand("%s %s", sUserHelper.getInputCmd("keyevent"), keyCode); in sendKeyEvent() 126 runShellCommand("%s %s SYSTEM_ALERT_WINDOW %s", in setOverlayPermissions()
|
D | SystemUtil.java | 74 public static String runShellCommand(Instrumentation instrumentation, String cmd) in runShellCommand() method in SystemUtil 76 return runShellCommand(instrumentation.getUiAutomation(), cmd); in runShellCommand() 88 public static String runShellCommand(UiAutomation automation, String cmd) in runShellCommand() method in SystemUtil 123 public static String runShellCommand(String cmd) { in runShellCommand() method in SystemUtil 125 return runShellCommand(InstrumentationRegistry.getInstrumentation(), cmd); in runShellCommand() 138 return runShellCommand(cmd); in runShellCommandOrThrow() 182 public static String runShellCommand(String cmd, Predicate<String> resultChecker) { in runShellCommand() method in SystemUtil 183 final String result = runShellCommand(cmd); in runShellCommand() 196 final String result = runShellCommand(cmd); in runShellCommandForNoOutput() 208 final String output = runShellCommand(cmd); in runCommandAndPrintOnLogcat() [all …]
|
D | OverrideAnimationScaleRule.java | 19 import static com.android.compatibility.common.util.SystemUtil.runShellCommand; 88 mInitialValue = runShellCommand("settings get global " + mName); 89 runShellCommand("settings put global " + mName + " " + value); 95 runShellCommand("settings put global " + mName + " " + restoreValue);
|
/cts/tests/tests/gamemanager/src/android/gamemanager/cts/ |
D | TestUtil.java | 19 import static com.android.compatibility.common.util.ShellUtils.runShellCommand; 31 assertEquals("Success", runShellCommand("pm install --force-queryable -t " + apkPath)); in installPackage() 35 runShellCommand("pm uninstall " + packageName); in uninstallPackage()
|
/cts/tests/tests/security/src/android/security/cts/ |
D | CVE_2024_34719.java | 21 import static com.android.compatibility.common.util.ShellUtils.runShellCommand; 110 runShellCommand("settings get secure bluetooth_name") in testPocCVE_2024_34719() 128 if (runShellCommand("settings get global bluetooth_on").contains("1")) { in withBluetoothEnabled() 133 runShellCommand("svc bluetooth enable"); in withBluetoothEnabled() 136 return () -> runShellCommand("svc bluetooth disable"); in withBluetoothEnabled() 141 final String defaultBluetoothName = runShellCommand("settings get secure bluetooth_name"); in withDefaultBluetoothName() 145 runShellCommand( in withDefaultBluetoothName()
|
D | CVE_2022_20611.java | 18 import static com.android.compatibility.common.util.ShellUtils.runShellCommand; 52 String res = runShellCommand("pm list packages " + protectedPkg); in testPocCVE_2022_20611() 55 res = runShellCommand("pm uninstall -k --user 0 " + protectedPkg); in testPocCVE_2022_20611() 57 runShellCommand("pm install-existing --user 0 " + protectedPkg); in testPocCVE_2022_20611()
|
/cts/tests/app/src/android/app/cts/android/app/cts/tools/ |
D | ServiceProcessController.java | 113 String result = SystemUtil.runShellCommand(mInstrumentation, cmd); in denyBackgroundOp() 123 String result = SystemUtil.runShellCommand(mInstrumentation, cmd); in allowBackgroundOp() 130 String result = SystemUtil.runShellCommand(mInstrumentation, cmd); in denyAnyInBackgroundOp() 136 String result = SystemUtil.runShellCommand(mInstrumentation, cmd); in allowAnyInBackgroundOp() 141 String result = SystemUtil.runShellCommand(mInstrumentation, cmd); in makeUidIdle() 146 String result = SystemUtil.runShellCommand(mInstrumentation, cmd); in removeFromWhitelist() 151 String result = SystemUtil.runShellCommand(mInstrumentation, cmd); in addToWhitelist() 157 String result = SystemUtil.runShellCommand(mInstrumentation, cmd); in tempWhitelist() 163 SystemUtil.runShellCommand(mInstrumentation, cmd); in removeFromTempWhitelist() 169 SystemUtil.runShellCommand(mInstrumentation, cmd); in setAppOpMode()
|
/cts/tests/tests/uidmigration/src/android/uidmigration/cts/ |
D | Common.kt | 20 import com.android.compatibility.common.util.SystemUtil.runShellCommand 57 return runShellCommand("pm install --force-queryable -t $apkPath") == "Success\n" in installPackage() 61 runShellCommand("pm uninstall $packageName") in uninstallPackage() 67 set(value) { runShellCommand("setprop $PROPERTY_KEY $value") }
|
/cts/tests/ambientcontext/src/android/ambientcontext/cts/ |
D | CtsAmbientContextDetectionServiceDeviceTest.java | 20 import static com.android.compatibility.common.util.ShellUtils.runShellCommand; 162 return Integer.parseInt(runShellCommand( in getLastStatusCode() 174 return runShellCommand("cmd ambient_context get-bound-package %d", USER_ID); in getAmbientContextDetectionServiceComponent() 184 runShellCommand("cmd ambient_context start-detection %d %s", in callStartDetection() 196 runShellCommand("cmd ambient_context query-service-status %d %s", in callQueryServiceStatus() 202 runShellCommand("cmd ambient_context set-temporary-service %d %s %d", in setTestableAmbientContextDetectionService() 207 runShellCommand("cmd ambient_context set-temporary-service %d", USER_ID); in clearTestableAmbientContextDetectionService()
|
/cts/tests/tests/appenumeration/src/android/appenumeration/cts/ |
D | Utils.java | 19 import static com.android.compatibility.common.util.ShellUtils.runShellCommand; 110 final String result = runShellCommand(cmd.toString()).trim(); in installPackageForUser() 124 final String result = runShellCommand(cmd.toString()); in installExistPackageForUser() 145 runShellCommand(cmd.toString()); in uninstallPackageForUser() 165 runShellCommand(cmd.toString()); in forceStopPackageForUser() 178 runShellCommand(cmd.toString()); in clearAppDataForUser() 208 runShellCommand(cmd.toString()); in suspendPackagesForUser() 215 runShellCommand("pm install -R " + apkPath); in ensurePackageIsInstalled() 290 final String result = runShellCommand(cmd.toString()).trim(); in allowTestApiAccess() 300 final String result = runShellCommand(cmd.toString()).trim(); in resetTestApiAccess()
|
/cts/tests/tests/voiceinteraction/src/android/voiceinteraction/cts/ |
D | AbstractVoiceInteractionTestCase.java | 21 import static com.android.compatibility.common.util.ShellUtils.runShellCommand; 50 runShellCommand("input keyevent KEYCODE_WAKEUP"); in prepareDevice() 53 runShellCommand("wm dismiss-keyguard"); in prepareDevice()
|
/cts/tests/rotationresolverservice/src/android/rotationresolverservice/cts/ |
D | CtsRotationResolverServiceDeviceTest.java | 23 import static com.android.compatibility.common.util.ShellUtils.runShellCommand; 154 return runShellCommand("cmd resolver get-bound-package %s", USER_ID); in getRotationResolverServiceComponent() 158 return Integer.parseInt(runShellCommand("cmd resolver get-last-resolution")); in getLastTestCallbackCode() 168 runShellCommand("cmd resolver resolve-rotation %s", USER_ID); in callResolveRotation() 173 runShellCommand("cmd resolver set-temporary-service %s %s %s", in setTestableRotationResolverService() 178 runShellCommand("cmd resolver set-temporary-service %s", USER_ID); in clearTestableRotationResolverService()
|
/cts/tests/framework/base/windowmanager/src/android/server/wm/other/ |
D | DeprecatedAbiTest.java | 60 SystemUtil.runShellCommand("input keyevent KEYCODE_WAKEUP"); in setUp() 61 SystemUtil.runShellCommand("wm dismiss-keyguard"); in setUp() 62 SystemUtil.runShellCommand("setprop debug.wm.disable_deprecated_abi_dialog 0"); in setUp() 71 SystemUtil.runShellCommand("setprop debug.wm.disable_deprecated_abi_dialog 1"); in tearDown()
|
/cts/tests/app/src/android/app/cts/ |
D | ApplicationTest.java | 45 SystemUtil.runShellCommand(getInstrumentation(), ERASE_FONT_SCALE_CMD); in tearDown() 78 SystemUtil.runShellCommand(getInstrumentation(), ERASE_FONT_SCALE_CMD); in toggleFontScale() 80 SystemUtil.runShellCommand(getInstrumentation(), PUT_FONT_SCALE_CMD); in toggleFontScale() 82 SystemUtil.runShellCommand(getInstrumentation(), ERASE_FONT_SCALE_CMD); in toggleFontScale()
|