Home
last modified time | relevance | path

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

123456

/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/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/common/device-side/util-axt/src/com/android/compatibility/common/util/
DSystemUtil.java68 public static String runShellCommand(Instrumentation instrumentation, String cmd) in runShellCommand() method in SystemUtil
70 return runShellCommand(instrumentation.getUiAutomation(), cmd); in runShellCommand()
82 public static String runShellCommand(UiAutomation automation, String cmd) in runShellCommand() method in SystemUtil
104 public static String runShellCommand(String cmd) { in runShellCommand() method in SystemUtil
106 return runShellCommand(InstrumentationRegistry.getInstrumentation(), cmd); in runShellCommand()
117 public static String runShellCommand(String cmd, Predicate<String> resultChecker) { in runShellCommand() method in SystemUtil
118 final String result = runShellCommand(cmd); in runShellCommand()
131 final String result = runShellCommand(cmd); in runShellCommandForNoOutput()
143 final String output = runShellCommand(cmd); in runCommandAndPrintOnLogcat()
157 return TextUtils.extractSection(runShellCommand(cmd), extractionStartRegex, startInclusive, in runCommandAndExtractSection()
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()
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()
/cts/common/device-side/util/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()
DSystemUtil.java68 public static String runShellCommand(Instrumentation instrumentation, String cmd) in runShellCommand() method in SystemUtil
90 public static String runShellCommand(String cmd) { in runShellCommand() method in SystemUtil
92 return runShellCommand(InstrumentationRegistry.getInstrumentation(), cmd); in runShellCommand()
103 public static String runShellCommand(String cmd, Predicate<String> resultChecker) { in runShellCommand() method in SystemUtil
104 final String result = runShellCommand(cmd); in runShellCommand()
117 final String result = runShellCommand(cmd); in runShellCommandForNoOutput()
129 final String output = runShellCommand(cmd); in runCommandAndPrintOnLogcat()
143 return TextUtils.extractSection(runShellCommand(cmd), extractionStartRegex, startInclusive, in runCommandAndExtractSection()
DSettingsUtils.java19 import static com.android.compatibility.common.util.ShellUtils.runShellCommand;
59 runShellCommand("settings put %s %s %s default", namespace, key, value); in set()
113 runShellCommand("settings delete %s %s", namespace, key); in delete()
157 final String value = runShellCommand("settings get %s %s", namespace, key); in get()
199 return SystemUtil.runShellCommand("settings --user current get secure " + key).trim(); in getSecureSetting()
/cts/tests/app/src/android/app/cts/android/app/cts/tools/
DServiceProcessController.java109 String result = SystemUtil.runShellCommand(mInstrumentation, cmd); in denyBackgroundOp()
118 String result = SystemUtil.runShellCommand(mInstrumentation, cmd); in allowBackgroundOp()
124 String result = SystemUtil.runShellCommand(mInstrumentation, cmd); in denyAnyInBackgroundOp()
129 String result = SystemUtil.runShellCommand(mInstrumentation, cmd); in allowAnyInBackgroundOp()
134 String result = SystemUtil.runShellCommand(mInstrumentation, cmd); in makeUidIdle()
139 String result = SystemUtil.runShellCommand(mInstrumentation, cmd); in removeFromWhitelist()
144 String result = SystemUtil.runShellCommand(mInstrumentation, cmd); in addToWhitelist()
149 String result = SystemUtil.runShellCommand(mInstrumentation, cmd); in tempWhitelist()
154 SystemUtil.runShellCommand(mInstrumentation, cmd); in removeFromTempWhitelist()
159 SystemUtil.runShellCommand(mInstrumentation, cmd); in setAppOpMode()
/cts/tests/JobScheduler/src/android/jobscheduler/cts/
DConstraintTest.java90 SystemUtil.runShellCommand(getInstrumentation(), "cmd activity set-inactive " in injectInstrumentation()
111 SystemUtil.runShellCommand(getInstrumentation(), "cmd battery reset"); in tearDown()
114 SystemUtil.runShellCommand(getInstrumentation(), "cmd devicestoragemonitor reset"); in tearDown()
130 SystemUtil.runShellCommand(getInstrumentation(), "cmd battery set level 90"); in sendExpediteStableChargingBroadcast()
131 SystemUtil.runShellCommand(getInstrumentation(), "cmd battery set level 91"); in sendExpediteStableChargingBroadcast()
166 res = SystemUtil.runShellCommand(getInstrumentation(), in setStorageState()
169 res = SystemUtil.runShellCommand(getInstrumentation(), in setStorageState()
178 curSeq = Integer.parseInt(SystemUtil.runShellCommand(getInstrumentation(), in setStorageState()
189 return SystemUtil.runShellCommand(getInstrumentation(), in getJobState()
DBatteryConstraintTest.java73 SystemUtil.runShellCommand(getInstrumentation(), "cmd jobscheduler monitor-battery on"); in setUp()
80 SystemUtil.runShellCommand(getInstrumentation(), "cmd jobscheduler monitor-battery off"); in tearDown()
81 SystemUtil.runShellCommand(getInstrumentation(), "cmd battery reset"); in tearDown()
105 SystemUtil.runShellCommand(getInstrumentation(), "cmd battery set ac 1"); in setBatteryState()
107 SystemUtil.runShellCommand(getInstrumentation(), "cmd battery unplug"); in setBatteryState()
109 int seq = Integer.parseInt(SystemUtil.runShellCommand(getInstrumentation(), in setBatteryState()
118 curSeq = Integer.parseInt(SystemUtil.runShellCommand(getInstrumentation(), in setBatteryState()
124 curCharging = Boolean.parseBoolean(SystemUtil.runShellCommand(getInstrumentation(), in setBatteryState()
136 boolean curCharging = Boolean.parseBoolean(SystemUtil.runShellCommand(getInstrumentation(), in verifyChargingState()
142 boolean curNotLow = Boolean.parseBoolean(SystemUtil.runShellCommand(getInstrumentation(), in verifyBatteryNotLowState()
/cts/tests/autofillservice/src/android/autofillservice/cts/
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/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/
DInstallUpdateTest.java166 SystemUtil.runShellCommand( in setNonChargingBatteryThreshold()
176 SystemUtil.runShellCommand( in setChargingBatteryThreshold()
187 SystemUtil.runShellCommand(plugged ? "cmd battery set ac 1" : "cmd battery unplug"); in setBatteryStateAndWait()
188 SystemUtil.runShellCommand("cmd battery set -f level " + level); in setBatteryStateAndWait()
214 SystemUtil.runShellCommand("dumpsys battery reset"); in resetBatteryState()
218 SystemUtil.runShellCommand("settings delete global device_policy_constants"); in resetDevicePolicyConstants()
/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/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/packageinstaller/adminpackageinstaller/src/android/packageinstaller/admin/cts/
DSessionCommitBroadcastTest.java126 assertTrue(TextUtils.join(" ", runShellCommand("am start-user " + userId)) in testBroadcastReceivedForEnablingApp()
130 assertTrue(TextUtils.join(" ", runShellCommand( in testBroadcastReceivedForEnablingApp()
135 runShellCommand("cmd package install-existing --user " + in testBroadcastReceivedForEnablingApp()
148 for (String s : runShellCommand("cmd shortcut get-default-launcher")) { in getDefaultLauncher()
157 runShellCommand("cmd package set-home-activity --user " in setLauncher()
/cts/tests/tests/voiceinteraction/src/android/voiceinteraction/cts/
DAbstractVoiceInteractionTestCase.java21 import static com.android.compatibility.common.util.ShellUtils.runShellCommand;
58 runShellCommand("input keyevent KEYCODE_WAKEUP"); in prepareDevice()
61 runShellCommand("wm dismiss-keyguard"); in prepareDevice()
/cts/tests/tests/batterysaving/src/android/os/cts/batterysaving/
DBatterySavingTestBase.java22 import static com.android.compatibility.common.util.SystemUtil.runShellCommand;
96 runShellCommand("dumpsys alarm").contains("Force all apps standby: " + expected)); in waitUntilAlarmForceAppStandby()
101 runShellCommand("dumpsys jobscheduler") in waitUntilJobForceAppStandby()
107 runShellCommand("dumpsys activity").contains("mForceBackgroundCheck=" + expected)); in waitUntilForceBackgroundCheck()
/cts/tests/contentcaptureservice/src/android/contentcaptureservice/cts/
DContentCaptureLoggingTestRule.java22 import static com.android.compatibility.common.util.ShellUtils.runShellCommand;
79 final String serviceDump = runShellCommand("dumpsys content_capture");
81 final String activityDump = runShellCommand("dumpsys activity %s --contentcapture",
DHelper.java20 import static com.android.compatibility.common.util.ShellUtils.runShellCommand;
89 runShellCommand("cmd content_capture set temporary-service 0 " + service + " 12000"); in setService()
97 runShellCommand("cmd content_capture set temporary-service 0"); in resetService()
105 runShellCommand("cmd content_capture set default-service-enabled 0 %s", in setDefaultServiceEnabled()
/cts/tests/tests/permission/src/android/permission/cts/
DPermissionGroupChange.java23 import static com.android.compatibility.common.util.SystemUtil.runShellCommand;
68 SystemUtil.runShellCommand("input keyevent KEYCODE_WAKEUP"); in wakeUpScreen()
139 String installResult = SystemUtil.runShellCommand( in installApp()
157 runShellCommand("pm uninstall android.permission.cts.appthatrequestpermission"); in uninstallTestApp()
DLocationAccessCheckTest.java29 import static com.android.compatibility.common.util.SystemUtil.runShellCommand;
248 runShellCommand("pm clear --user -2 " + pkg); in clearPackageData()
255 runShellCommand( in runLocationCheck()
338 runShellCommand("cmd notification allow_listener " + (new ComponentName(sContext, in allowNotificationAccess()
359 runShellCommand("pm install -r -g " + TEST_APP_LOCATION_BG_ACCESS_APK); in installBackgroundAccessApp()
364 runShellCommand("pm uninstall " + TEST_APP_PKG); in uninstallBackgroundAccessApp()
369 runShellCommand("pm install -r -g " + TEST_APP_LOCATION_FG_ACCESS_APK); in installForegroundAccessApp()
501 runShellCommand("cmd notification disallow_listener " + (new ComponentName(sContext, in disallowNotificationAccess()
/cts/tests/tests/content/lib/accountaccess/src/com.android.cts.content/
DUtils.java70 SystemUtil.runShellCommand(InstrumentationRegistry.getInstrumentation(), in allowSyncAdapterRunInBackgroundAndDataInBackground()
73 SystemUtil.runShellCommand(InstrumentationRegistry.getInstrumentation(), in allowSyncAdapterRunInBackgroundAndDataInBackground()
79 SystemUtil.runShellCommand(InstrumentationRegistry.getInstrumentation(), in disallowSyncAdapterRunInBackgroundAndDataInBackground()
82 SystemUtil.runShellCommand(InstrumentationRegistry.getInstrumentation(), in disallowSyncAdapterRunInBackgroundAndDataInBackground()
/cts/tests/tests/permission2/src/android/permission2/cts/
DRestrictedStoragePermissionSharedUidTest.java28 import static com.android.compatibility.common.util.SystemUtil.runShellCommand;
130 runShellCommand("pm install -g --restrict-permissions " + mApk); in install()
132 runShellCommand("pm install -g " + mApk); in install()
137 runShellCommand("pm uninstall " + mPkg); in uninstall()

123456