Home
last modified time | relevance | path

Searched refs:runShellCommand (Results 1 – 25 of 209) sorted by relevance

123456789

/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/
DAutofillRestrictionsTest.java86 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()
DContentCaptureRestrictionsTest.java74 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/common/device-side/util-axt/src/com/android/compatibility/common/util/
DShellUtils.java19 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()
DDisableAnimationRule.java19 import static com.android.compatibility.common.util.SystemUtil.runShellCommand;
62 mInitialValue = runShellCommand("settings get global " + mName); in put()
63 runShellCommand("settings put global " + mName + " " + value); in put()
67 runShellCommand("settings put global " + mName + " " + mInitialValue); in restore()
DSystemUtil.java74 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 …]
DSettingsUtils.java19 import static com.android.compatibility.common.util.ShellUtils.runShellCommand;
58 runShellCommand("settings put %s %s %s default", namespace, key, value); in set()
112 runShellCommand("settings delete %s %s", namespace, key); in delete()
156 final String value = runShellCommand("settings get %s %s", namespace, key); in get()
198 return SystemUtil.runShellCommand("settings --user current get secure " + key).trim(); in getSecureSetting()
205 return SystemUtil.runShellCommand( in getSecureSettingAsUser()
/cts/tests/attentionservice/src/android/attentionservice/cts/
DCtsAttentionServiceDeviceTest.java20 import static com.android.compatibility.common.util.ShellUtils.runShellCommand;
141 return runShellCommand("cmd attention getAttentionServiceComponent"); in getAttentionServiceComponent()
145 return Integer.parseInt(runShellCommand("cmd attention getLastTestCallbackCode")); in getLastTestCallbackCode()
156 Boolean isSuccess = runShellCommand("cmd attention call checkAttention") in callCheckAttention()
163 runShellCommand("cmd attention call cancelCheckAttention"); in callCancelAttention()
168 return runShellCommand("cmd attention setTestableAttentionService " + service) in setTestableAttentionService()
173 runShellCommand("cmd attention clearTestableAttentionService"); in clearTestableAttentionService()
177 runShellCommand("input keyevent KEYCODE_WAKEUP"); in wakeUpScreen()
/cts/hostsidetests/packagemanager/domainverification/lib/constants/android/src/com/android/cts/packagemanager/verify/domain/android/
DSharedVerifications.kt37 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 …]
DDomainVerificationIntentTestBase.kt106 protected fun runShellCommand(vararg commands: String) = commands.forEach { in runShellCommand() method
107 assertThat(ShellUtils.runShellCommand(it)).isEmpty() in runShellCommand()
114 ShellUtils.runShellCommand( in assertResolvesTo()
158 runShellCommand(DomainUtils.resetAppLinks(packageName)) in resetAppLinks()
163 runShellCommand(DomainUtils.setAppLinks(packageName, state, *domains)) in setAppLinks()
167 runShellCommand(DomainUtils.setAppLinksAllowed(packageName, userId, enabled)) in setAppLinksAllowed()
176 runShellCommand( in setAppLinksUserSelection()
/cts/tests/input/src/android/input/cts/
DInputShellCommandTest.kt65 ShellUtils.runShellCommand("input tap $x $y") in testDefaultToolType()
76 ShellUtils.runShellCommand("input touchscreen tap $x $y") in testToolType()
79 ShellUtils.runShellCommand("input touchpad tap $x $y") in testToolType()
82 ShellUtils.runShellCommand("input touchnavigation tap $x $y") in testToolType()
85 ShellUtils.runShellCommand("input stylus tap $x $y") in testToolType()
88 ShellUtils.runShellCommand("input mouse tap $x $y") in testToolType()
91 ShellUtils.runShellCommand("input trackball tap $x $y") in testToolType()
94 ShellUtils.runShellCommand("input joystick tap $x $y") in testToolType()
/cts/tests/autofillservice/src/android/autofillservice/cts/testcore/
DAutofillLoggingTestRule.java19 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/app/src/android/app/cts/android/app/cts/tools/
DServiceProcessController.java113 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/JobScheduler/src/android/jobscheduler/cts/
DBatteryConstraintTest.java63 SystemUtil.runShellCommand(getInstrumentation(), "cmd jobscheduler monitor-battery on"); in setUp()
70 SystemUtil.runShellCommand(getInstrumentation(), "cmd jobscheduler monitor-battery off"); in tearDown()
71 SystemUtil.runShellCommand(getInstrumentation(), "cmd battery reset"); in tearDown()
97 SystemUtil.runShellCommand(getInstrumentation(), "cmd battery set ac 1"); in setBatteryState()
99 SystemUtil.runShellCommand(getInstrumentation(), "cmd battery unplug"); in setBatteryState()
101 int seq = Integer.parseInt(SystemUtil.runShellCommand(getInstrumentation(), in setBatteryState()
110 curSeq = Integer.parseInt(SystemUtil.runShellCommand(getInstrumentation(), in setBatteryState()
112 curCharging = Boolean.parseBoolean(SystemUtil.runShellCommand(getInstrumentation(), in setBatteryState()
124 boolean curCharging = Boolean.parseBoolean(SystemUtil.runShellCommand(getInstrumentation(), in verifyChargingState()
130 boolean curNotLow = Boolean.parseBoolean(SystemUtil.runShellCommand(getInstrumentation(), in verifyBatteryNotLowState()
DBaseJobSchedulerTest.java96 SystemUtil.runShellCommand(getInstrumentation(), "cmd activity set-inactive " in injectInstrumentation()
121 SystemUtil.runShellCommand(getInstrumentation(), "cmd battery reset"); in tearDown()
124 SystemUtil.runShellCommand(getInstrumentation(), "cmd devicestoragemonitor reset"); in tearDown()
127 SystemUtil.runShellCommand(getInstrumentation(), in tearDown()
168 res = SystemUtil.runShellCommand(getInstrumentation(), in setStorageStateLow()
171 res = SystemUtil.runShellCommand(getInstrumentation(), in setStorageStateLow()
180 curSeq = Integer.parseInt(SystemUtil.runShellCommand(getInstrumentation(), in setStorageStateLow()
191 return SystemUtil.runShellCommand(getInstrumentation(), in getJobState()
222 SystemUtil.runShellCommand(getInstrumentation(), in runSatisfiedJob()
/cts/tests/translation/src/android/translation/cts/
DHelper.java19 import static com.android.compatibility.common.util.ShellUtils.runShellCommand;
71 runShellCommand("cmd translation set temporary-service %d %s 12000", userId, service); in setTemporaryTranslationService()
80 runShellCommand("cmd translation set temporary-service %d", userId); in resetTemporaryTranslationService()
91 runShellCommand("cmd content_capture set temporary-service %d %s 12000", userId, service); in setTemporaryContentCaptureService()
100 runShellCommand("cmd content_capture set temporary-service %d", userId); in resetTemporaryContentCaptureService()
111 runShellCommand("cmd content_capture set default-service-enabled %d %s", userId, in setDefaultContentCaptureServiceEnabled()
/cts/tests/rotationresolverservice/src/android/rotationresolverservice/cts/
DCtsRotationResolverServiceDeviceTest.java23 import static com.android.compatibility.common.util.ShellUtils.runShellCommand;
153 return runShellCommand("cmd resolver get-bound-package"); in getRotationResolverServiceComponent()
157 return Integer.parseInt(runShellCommand("cmd resolver get-last-resolution")); in getLastTestCallbackCode()
167 runShellCommand("cmd resolver resolve-rotation"); in callResolveRotation()
172runShellCommand("cmd resolver set-temporary-service %s %s", service, TEMPORARY_SERVICE_DURATION); in setTestableRotationResolverService()
176 runShellCommand("cmd resolver set-temporary-service"); in clearTestableRotationResolverService()
/cts/tests/inputmethod/src/android/view/inputmethod/cts/util/
DRequireImeCompatFlagRule.java19 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/
DAbstractVoiceInteractionTestCase.java21 import static com.android.compatibility.common.util.ShellUtils.runShellCommand;
50 runShellCommand("input keyevent KEYCODE_WAKEUP"); in prepareDevice()
53 runShellCommand("wm dismiss-keyguard"); in prepareDevice()
DAbstractVoiceInteractionBasicTestCase.java21 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/tests/bluetooth/src/android/bluetooth/cts/
DBluetoothDeviceTest.java19 import static com.android.compatibility.common.util.SystemUtil.runShellCommand;
84 runShellCommand(String.format( in test_setAlias_getAlias()
86 String output = runShellCommand("dumpsys companiondevice"); in test_setAlias_getAlias()
102 runShellCommand(String.format( in test_setAlias_getAlias()
/cts/tests/app/src/android/app/cts/
DApplicationTest.java45 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()
/cts/tests/tests/permission/src/android/permission/cts/
DStorageEscalationTest.kt59 SystemUtil.runShellCommand("pm uninstall $APP_PACKAGE_NAME --user ALL") in <lambda>()
67 val result = SystemUtil.runShellCommand("pm install -r$userString $apk") in <lambda>()
73 val createUserOutput: String = SystemUtil.runShellCommand("pm create-user secondary") in <lambda>()
82 SystemUtil.runShellCommand("am start-user -w $userId") in <lambda>()
89 SystemUtil.runShellCommand("pm remove-user $userId") in <lambda>()
/cts/tests/JobSchedulerSharedUid/src/android/jobscheduler/cts/shareduidtests/
DConstraintTest.java94 SystemUtil.runShellCommand(getInstrumentation(), "cmd activity set-inactive " in injectInstrumentation()
117 SystemUtil.runShellCommand(getInstrumentation(), "cmd devicestoragemonitor reset"); in tearDown()
163 res = SystemUtil.runShellCommand(getInstrumentation(), in setStorageState()
166 res = SystemUtil.runShellCommand(getInstrumentation(), in setStorageState()
175 curSeq = Integer.parseInt(SystemUtil.runShellCommand(getInstrumentation(), in setStorageState()
186 return SystemUtil.runShellCommand(getInstrumentation(), in getJobState()
/cts/hostsidetests/packagemanager/domainverification/apps/calling/src/com/android/cts/packagemanager/verify/domain/callingapp/
DDomainVerificationIntentHostTimedTests.kt60 ShellUtils.runShellCommand( in multipleVerifiedDisableByComponent()
69 ShellUtils.runShellCommand( in multipleVerifiedDisableByComponent()
86 ShellUtils.runShellCommand( in multipleVerifiedDisableByPackage()
94 ShellUtils.runShellCommand( in multipleVerifiedDisableByPackage()
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/systemupdate/
DInstallUpdateTest.java193 runShellCommand( in setNonChargingBatteryThreshold()
203 runShellCommand( in setChargingBatteryThreshold()
214 runShellCommand(plugged ? "cmd battery set ac 1" : "cmd battery unplug"); in setBatteryStateAndWait()
215 runShellCommand("cmd battery set -f level " + level); in setBatteryStateAndWait()
244 runShellCommand("dumpsys battery reset"); in resetBatteryState()
248 runShellCommand("settings delete global device_policy_constants"); in resetDevicePolicyConstants()

123456789