| /cts/tests/tests/companion/common/src/android/companion/cts/common/ |
| D | AppHelper.kt | 31 runShellCommand("cmd companiondevice associate $userId $packageName $macAddress") in associate() 34 runShellCommand("cmd companiondevice disassociate $userId $packageName $macAddress") in associate() 37 runShellCommand("pm list packages --user $userId $packageName").isNotBlank() in associate() 39 fun install() = apkPath?.let { runShellCommand("pm install --user $userId $apkPath") } in associate() 42 fun uninstall() = runShellCommand("pm uninstall --user $userId $packageName") in uninstall() 44 fun clearData() = runShellCommand("pm clear --user $userId $packageName") in uninstall() 47 runShellCommand("cmd role add-role-holder --user $userId $role $packageName") in uninstall() 50 runShellCommand("cmd role remove-role-holder --user $userId $role $packageName") in uninstall() 61 private fun runShellCommand(cmd: String) = instrumentation.runShellCommand(cmd) method
|
| /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()
|
| D | ContentCaptureRestrictionsTest.java | 74 runShellCommand("settings put secure --user %d %s %d default", in enableService() 77 runShellCommand("cmd content_capture set temporary-service %d %s %d", mUserId, in enableService() 85 runShellCommand("cmd content_capture set temporary-service %d", mUserId); in disableService()
|
| /cts/tests/attentionservice/src/android/attentionservice/cts/ |
| D | CtsAttentionServiceDeviceTest.java | 22 import static com.android.compatibility.common.util.ShellUtils.runShellCommand; 188 return runShellCommand("cmd attention getAttentionServiceComponent"); in getAttentionServiceComponent() 192 return Integer.parseInt(runShellCommand("cmd attention getLastTestCallbackCode")); in getLastTestCallbackCode() 197 runShellCommand("cmd attention getLastTestProximityUpdateCallbackCode")); in getLastTestProximityUpdateCallbackCode() 208 Boolean isSuccess = runShellCommand("cmd attention call checkAttention") in callCheckAttention() 215 runShellCommand("cmd attention call cancelCheckAttention"); in callCancelAttention() 221 Boolean isSuccess = runShellCommand("cmd attention call onStartProximityUpdates") in callStartProximityUpdates() 228 runShellCommand("cmd attention call onStopProximityUpdates"); in callStopProximityUpdates() 233 return runShellCommand("cmd attention setTestableAttentionService " + service) in setTestableAttentionService() 238 runShellCommand("cmd attention clearTestableAttentionService"); in clearTestableAttentionService() [all …]
|
| /cts/common/device-side/util-axt/src/com/android/compatibility/common/util/ |
| D | ShellUtils.java | 19 import static com.android.compatibility.common.util.ShellUtils.runShellCommand; 39 public static String runShellCommand(@NonNull String template, Object...args) { in runShellCommand() method in ShellUtils 44 .runShellCommand(InstrumentationRegistry.getInstrumentation(), command); in runShellCommand() 62 runShellCommand("input touchscreen tap %d %d", x, y); in tap() 76 runShellCommand("input keyevent " + keyCode); in sendKeyEvent() 84 runShellCommand("appops set %s SYSTEM_ALERT_WINDOW %s", packageName, action); in setOverlayPermissions()
|
| D | OverrideAnimationScaleRule.java | 19 import static com.android.compatibility.common.util.SystemUtil.runShellCommand; 71 mInitialValue = runShellCommand("settings get global " + mName); in put() 72 runShellCommand("settings put global " + mName + " " + value); in put() 76 runShellCommand("settings put global " + mName + " " + mInitialValue); in restore()
|
| 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 …]
|
| /cts/tests/JobScheduler/src/android/jobscheduler/cts/ |
| D | BaseJobSchedulerTest.java | 101 SystemUtil.runShellCommand(getInstrumentation(), "cmd activity set-inactive " in injectInstrumentation() 132 SystemUtil.runShellCommand(getInstrumentation(), "cmd battery reset"); in tearDown() 137 SystemUtil.runShellCommand(getInstrumentation(), "cmd devicestoragemonitor reset"); in tearDown() 140 SystemUtil.runShellCommand(getInstrumentation(), in tearDown() 181 res = SystemUtil.runShellCommand(getInstrumentation(), in setStorageStateLow() 184 res = SystemUtil.runShellCommand(getInstrumentation(), in setStorageStateLow() 193 curSeq = Integer.parseInt(SystemUtil.runShellCommand(getInstrumentation(), in setStorageStateLow() 204 return SystemUtil.runShellCommand(getInstrumentation(), in getJobState() 235 SystemUtil.runShellCommand(getInstrumentation(), "cmd battery set ac 1"); in setBatteryState() 236 final int curLevel = Integer.parseInt(SystemUtil.runShellCommand(getInstrumentation(), in setBatteryState() [all …]
|
| /cts/hostsidetests/packagemanager/domainverification/lib/constants/android/src/com/android/cts/packagemanager/verify/domain/android/ |
| D | SharedVerifications.kt | 37 ShellUtils.runShellCommand(DomainUtils.setAppLinks(it, "STATE_NO_RESPONSE", "all")) in reset() 38 ShellUtils.runShellCommand(DomainUtils.resetAppLinks(it)) in reset() 39 ShellUtils.runShellCommand(DomainUtils.setAppLinksAllowed(it, context.userId, true)) in reset() 40 ShellUtils.runShellCommand( in reset() 48 ShellUtils.runShellCommand("$enablePrefix $DECLARING_PKG_NAME_1") in reset() 49 ShellUtils.runShellCommand("$enablePrefix $DECLARING_PKG_NAME_2") in reset() 50 … ShellUtils.runShellCommand("$enablePrefix ${DECLARING_PKG_1_COMPONENT.flattenToString()}") in reset() 51 … ShellUtils.runShellCommand("$enablePrefix ${DECLARING_PKG_2_COMPONENT.flattenToString()}") in reset() 74 ShellUtils.runShellCommand( in verifyDomains() 91 ShellUtils.runShellCommand( in verifyDomains() [all …]
|
| /cts/tests/input/src/android/input/cts/ |
| D | InputShellCommandTest.kt | 67 ShellUtils.runShellCommand("input tap $x $y") in testDefaultToolType() 78 ShellUtils.runShellCommand("input touchscreen tap $x $y") in testToolType() 81 ShellUtils.runShellCommand("input touchpad tap $x $y") in testToolType() 84 ShellUtils.runShellCommand("input touchnavigation tap $x $y") in testToolType() 87 ShellUtils.runShellCommand("input stylus tap $x $y") in testToolType() 90 ShellUtils.runShellCommand("input mouse tap $x $y") in testToolType() 93 ShellUtils.runShellCommand("input trackball tap $x $y") in testToolType() 96 ShellUtils.runShellCommand("input joystick tap $x $y") in testToolType()
|
| /cts/tests/tests/content/src/android/content/pm/cts/ |
| D | PackageManagerShellCommandMultiUserTest.kt | 106 SystemUtil.runShellCommand("settings get global verifier_verify_adb_installs") in setup() 109 SystemUtil.runShellCommand("settings put global verifier_verify_adb_installs 0") in setup() 110 mStreamingVerificationTimeoutMs = SystemUtil.runShellCommand( in setup() 124 SystemUtil.runShellCommand( in reset() 290 var out = SystemUtil.runShellCommand( in testListPackageDefaultAllUsers() 294 out = SystemUtil.runShellCommand( in testListPackageDefaultAllUsers() 298 out = SystemUtil.runShellCommand("pm list packages -U $TEST_APP_PACKAGE") in testListPackageDefaultAllUsers() 304 out = SystemUtil.runShellCommand("pm list packages -U $TEST_APP_PACKAGE") in testListPackageDefaultAllUsers() 307 out = SystemUtil.runShellCommand( in testListPackageDefaultAllUsers() 311 out = SystemUtil.runShellCommand( in testListPackageDefaultAllUsers() [all …]
|
| /cts/tests/tests/gamemanager/src/android/gamemanager/cts/ |
| D | TestUtil.java | 19 import static com.android.compatibility.common.util.ShellUtils.runShellCommand; 29 return runShellCommand("pm install --force-queryable -t " + apkPath).equals("Success"); in installPackage() 33 runShellCommand("pm uninstall " + packageName); in uninstallPackage()
|
| /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/tests/tests/permission/src/android/permission/cts/ |
| D | RevokeSelfPermissionTest.java | 34 import static com.android.compatibility.common.util.SystemUtil.runShellCommand; 77 SystemUtil.runShellCommand("input keyevent KEYCODE_WAKEUP"); in wakeUpScreen() 78 SystemUtil.runShellCommand("input keyevent 82"); in wakeUpScreen() 79 mOldScreenOffTimeoutValue = SystemUtil.runShellCommand( in wakeUpScreen() 81 mOldSleepTimeoutValue = SystemUtil.runShellCommand("settings get secure sleep_timeout"); in wakeUpScreen() 82 SystemUtil.runShellCommand("settings put system screen_off_timeout -1"); in wakeUpScreen() 83 SystemUtil.runShellCommand("settings put secure sleep_timeout -1"); in wakeUpScreen() 98 runShellCommand("pm uninstall " + APP_PKG_NAME); in uninstallApp() 107 SystemUtil.runShellCommand("settings put system screen_off_timeout " in restoreDeviceForOneTime() 109 SystemUtil.runShellCommand("settings put secure sleep_timeout " + mOldSleepTimeoutValue); in restoreDeviceForOneTime() [all …]
|
| /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/ambientcontext/src/android/ambientcontext/cts/ |
| D | CtsAmbientContextDetectionServiceDeviceTest.java | 20 import static com.android.compatibility.common.util.ShellUtils.runShellCommand; 166 return Integer.parseInt(runShellCommand( in getLastStatusCode() 171 return runShellCommand( in getLastAppPackageName() 183 return runShellCommand("cmd ambient_context get-bound-package %s", USER_ID); in getAmbientContextDetectionServiceComponent() 193 runShellCommand("cmd ambient_context start-detection %s %s", in callStartDetection() 205 runShellCommand("cmd ambient_context query-service-status %s %s", in callQueryServiceStatus() 211 runShellCommand("cmd ambient_context set-temporary-service %s %s %s", in setTestableAmbientContextDetectionService() 216 runShellCommand("cmd ambient_context set-temporary-service %s", USER_ID); in clearTestableAmbientContextDetectionService()
|
| /cts/tests/tests/security/src/android/security/cts/ |
| 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()
|
| D | OneTimePermissionTest.java | 23 import static com.android.compatibility.common.util.SystemUtil.runShellCommand; 65 SystemUtil.runShellCommand("input keyevent KEYCODE_WAKEUP"); in wakeUpScreen() 67 SystemUtil.runShellCommand("input keyevent 82"); in wakeUpScreen() 72 runShellCommand("pm install -r " + CUSTOM_CAMERA_PERM_APK); in installApp() 92 runShellCommand("pm uninstall " + CUSTOM_CAMERA_PERM_APP_PKG_NAME); in uninstallApp()
|
| /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/inputmethod/util/src/android/view/inputmethod/cts/util/ |
| D | RequireImeCompatFlagRule.java | 19 import static com.android.compatibility.common.util.SystemUtil.runShellCommand; 49 runShellCommand("am compat " + (mEnabled ? "enable " : "disable ") in apply() 56 runShellCommand("am compat reset " + mCompatFlag + " " in apply()
|
| /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()
|
| D | AbstractVoiceInteractionBasicTestCase.java | 21 import static com.android.compatibility.common.util.ShellUtils.runShellCommand; 57 runShellCommand("input keyevent KEYCODE_WAKEUP"); in prepareDevice() 60 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/ |
| D | StartActivityAsUserTests.java | 19 import static com.android.compatibility.common.util.ShellUtils.runShellCommand; 70 final String output = runShellCommand( in createSecondUser() 77 runShellCommand("pm install-existing --user " + sSecondUserId + " android.server.wm.cts"); in createSecondUser() 78 runShellCommand("am start-user -w " + sSecondUserId); in createSecondUser() 86 runShellCommand("am stop-user -w -f " + sSecondUserId); in removeSecondUser() 87 runShellCommand("pm remove-user " + sSecondUserId); in removeSecondUser()
|
| /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()
|