Home
last modified time | relevance | path

Searched refs:runShellCommand (Results 1 – 25 of 133) 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/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()
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()
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/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/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/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()
123 String result = SystemUtil.runShellCommand(mInstrumentation, cmd); in makeUidIdle()
128 String result = SystemUtil.runShellCommand(mInstrumentation, cmd); in removeFromWhitelist()
133 String result = SystemUtil.runShellCommand(mInstrumentation, cmd); in addToWhitelist()
138 String result = SystemUtil.runShellCommand(mInstrumentation, cmd); in tempWhitelist()
143 SystemUtil.runShellCommand(mInstrumentation, cmd); in removeFromTempWhitelist()
148 SystemUtil.runShellCommand(mInstrumentation, cmd); in setAppOpMode()
/cts/tests/app/src/android/app/cts/
DApplicationTest.java40 SystemUtil.runShellCommand(getInstrumentation(), ERASE_FONT_SCALE_CMD); in tearDown()
62 SystemUtil.runShellCommand(getInstrumentation(), ERASE_FONT_SCALE_CMD); in toggleFontScale()
64 SystemUtil.runShellCommand(getInstrumentation(), PUT_FONT_SCALE_CMD); in toggleFontScale()
66 SystemUtil.runShellCommand(getInstrumentation(), ERASE_FONT_SCALE_CMD); in toggleFontScale()
DDownloadManagerTestBase.java18 import static com.android.compatibility.common.util.SystemUtil.runShellCommand;
95 final String res = runShellCommand(cmd).trim(); in updateUri()
115 final String res = runShellCommand(cmd).trim(); in getMediaStoreUri()
157 return runShellCommand("cat " + filePath); in readFromRawFile()
185 runShellCommand("rm " + file); in deleteFromShell()
204 runShellCommand("mkdir -p " + file.getParentFile()); in writeToFileFromShell()
205 runShellCommand("rm " + file); in writeToFileFromShell()
220 runShellCommand("sync"); in writeToFileFromShell()
237 final String output = runShellCommand(cmd); in assertFileContents()
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/
DInstallUpdateTest.java164 SystemUtil.runShellCommand( in setNonChargingBatteryThreshold()
174 SystemUtil.runShellCommand( in setChargingBatteryThreshold()
185 SystemUtil.runShellCommand(plugged ? "cmd battery set ac 1" : "cmd battery unplug"); in setBatteryStateAndWait()
186 SystemUtil.runShellCommand("cmd battery set -f level " + level); in setBatteryStateAndWait()
212 SystemUtil.runShellCommand("dumpsys battery reset"); in resetBatteryState()
216 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/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/packageinstaller/adminpackageinstaller/src/android/packageinstaller/admin/cts/
DSessionCommitBroadcastTest.java121 assertTrue(TextUtils.join(" ", runShellCommand("am start-user " + userId)) in testBroadcastReceivedForEnablingApp()
125 assertTrue(TextUtils.join(" ", runShellCommand( in testBroadcastReceivedForEnablingApp()
131 runShellCommand("cmd package install-existing --user " + in testBroadcastReceivedForEnablingApp()
144 for (String s : runShellCommand("cmd shortcut get-default-launcher")) { in getDefaultLauncher()
153 runShellCommand("cmd package set-home-activity --user " in setLauncher()
/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",
/cts/tests/tests/batterysaving/src/android/os/cts/batterysaving/
DBatterySavingTestBase.java21 import static com.android.compatibility.common.util.SystemUtil.runShellCommand;
93 runShellCommand("dumpsys alarm").contains("Force all apps standby: " + expected)); in waitUntilAlarmForceAppStandby()
98 runShellCommand("dumpsys jobscheduler") in waitUntilJobForceAppStandby()
104 runShellCommand("dumpsys activity").contains("mForceBackgroundCheck=" + expected)); in waitUntilForceBackgroundCheck()
/cts/tests/tests/rcs/src/android/telephony/ims/cts/
DDefaultSmsAppHelper.java19 import static com.android.compatibility.common.util.SystemUtil.runShellCommand;
27 runShellCommand( in ensureDefaultSmsApp()
/cts/tests/tests/permission/src/android/permission/cts/
DPermissionGroupChange.java23 import static com.android.compatibility.common.util.SystemUtil.runShellCommand;
65 SystemUtil.runShellCommand("input keyevent KEYCODE_WAKEUP"); in wakeUpScreen()
132 String installResult = SystemUtil.runShellCommand( in installApp()
150 runShellCommand("pm uninstall android.permission.cts.appthatrequestpermission"); in uninstallTestApp()
DLocationAccessCheckTest.java29 import static com.android.compatibility.common.util.SystemUtil.runShellCommand;
240 runShellCommand("pm clear --user -2 " + pkg); in clearPackageData()
247 runShellCommand("cmd jobscheduler run -f " + PERMISSION_CONTROLLER_PKG + " 0"); in runLocationCheck()
329 runShellCommand("cmd notification allow_listener " + (new ComponentName(sContext, in allowNotificationAccess()
350 runShellCommand("pm install -r -g " + TEST_APP_LOCATION_BG_ACCESS_APK); in installBackgroundAccessApp()
355 runShellCommand("pm uninstall " + TEST_APP_PKG); in uninstallBackgroundAccessApp()
360 runShellCommand("pm install -r -g " + TEST_APP_LOCATION_FG_ACCESS_APK); in installForegroundAccessApp()
470 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()

123456