Home
last modified time | relevance | path

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

12345678910>>...13

/cts/tests/tests/companion/common/src/android/companion/cts/common/
DAppHelper.kt31 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 in android.companion.cts.common.AppHelper
/cts/tests/wearable/src/android/wearable/cts/
DCtsWearableSensingServiceDeviceTest.java23 import static com.android.compatibility.common.util.ShellUtils.runShellCommand;
258 return runShellCommand("cmd wearable_sensing get-bound-package %d", USER_ID); in getWearableSensingServiceComponent()
262 runShellCommand("cmd wearable_sensing set-temporary-service %d %s %d", in setTestableWearableSensingService()
267 runShellCommand("cmd wearable_sensing set-temporary-service %d", USER_ID); in clearTestableWearableSensingService()
271 runShellCommand("cmd ambient_context start-detection-wearable %d %s", in callStartDetection()
276 runShellCommand("cmd ambient_context start-detection-mixed %d %s", in callStartDetectionMixed()
281 runShellCommand("cmd ambient_context start-detection %d %s", in callStartDetectionDefault()
286 runShellCommand("cmd wearable_sensing create-data-stream"); in createDataStream()
290 runShellCommand("cmd wearable_sensing destroy-data-stream"); in destroyDataStream()
294 runShellCommand("cmd ambient_context stop-detection %d %s", in callStopDetection()
[all …]
/cts/tests/JobScheduler/src/android/jobscheduler/cts/
DBaseJobSchedulerTest.java110 SystemUtil.runShellCommand(getInstrumentation(), "cmd activity set-inactive " in injectInstrumentation()
149 SystemUtil.runShellCommand(getInstrumentation(), "cmd jobscheduler monitor-battery off"); in tearDown()
150 SystemUtil.runShellCommand(getInstrumentation(), "cmd battery reset"); in tearDown()
155 SystemUtil.runShellCommand(getInstrumentation(), "cmd devicestoragemonitor reset"); in tearDown()
158 SystemUtil.runShellCommand(getInstrumentation(), in tearDown()
207 final String output = SystemUtil.runShellCommand("cmd deviceidle enabled deep").trim(); in isDeviceIdleEnabled()
212 final String output = SystemUtil.runShellCommand("cmd deviceidle enabled light").trim(); in isDeviceLightIdleEnabled()
219 SystemUtil.runShellCommand(getInstrumentation(), in isJsStorageStateLow()
232 res = SystemUtil.runShellCommand(getInstrumentation(), in setStorageStateLow()
235 res = SystemUtil.runShellCommand(getInstrumentation(), in setStorageStateLow()
[all …]
/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()
/cts/tests/attentionservice/src/android/attentionservice/cts/
DCtsAttentionServiceDeviceTest.java22 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/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 …]
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DShellUtils.java39 public static String runShellCommand(@NonNull String template, Object...args) { in runShellCommand() method in ShellUtils
44 .runShellCommand(InstrumentationRegistry.getInstrumentation(), command); in runShellCommand()
62 runShellCommand("%s tap %d %d", sUserHelper.getInputCmd("touchscreen"), x, y); in tap()
75 runShellCommand("%s %s", sUserHelper.getInputCmd("keyevent"), keyCode); in sendKeyEvent()
83 runShellCommand("%s %s SYSTEM_ALERT_WINDOW %s", in setOverlayPermissions()
DSystemUtil.java72 public static String runShellCommand(Instrumentation instrumentation, String cmd) in runShellCommand() method in SystemUtil
74 return runShellCommand(instrumentation.getUiAutomation(), cmd); in runShellCommand()
86 public static String runShellCommand(UiAutomation automation, String cmd) in runShellCommand() method in SystemUtil
121 public static String runShellCommand(String cmd) { in runShellCommand() method in SystemUtil
123 return runShellCommand(InstrumentationRegistry.getInstrumentation(), cmd); in runShellCommand()
136 return runShellCommand(cmd); in runShellCommandOrThrow()
180 public static String runShellCommand(String cmd, Predicate<String> resultChecker) { in runShellCommand() method in SystemUtil
181 final String result = runShellCommand(cmd); in runShellCommand()
194 final String result = runShellCommand(cmd); in runShellCommandForNoOutput()
206 final String output = runShellCommand(cmd); in runCommandAndPrintOnLogcat()
[all …]
/cts/tests/input/src/android/input/cts/
DInputShellCommandTest.kt67 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/
DPackageManagerShellCommandMultiUserTest.kt85 SystemUtil.runShellCommand("am wait-for-broadcast-idle") in apply()
127 SystemUtil.runShellCommand("settings get global verifier_verify_adb_installs") in setup()
130 SystemUtil.runShellCommand("settings put global verifier_verify_adb_installs 0") in setup()
131 mStreamingVerificationTimeoutMs = SystemUtil.runShellCommand( in setup()
145 SystemUtil.runShellCommand( in reset()
311 var out = SystemUtil.runShellCommand( in testListPackageDefaultAllUsers()
315 out = SystemUtil.runShellCommand( in testListPackageDefaultAllUsers()
319 out = SystemUtil.runShellCommand("pm list packages -U $TEST_APP_PACKAGE") in testListPackageDefaultAllUsers()
325 out = SystemUtil.runShellCommand("pm list packages -U $TEST_APP_PACKAGE") in testListPackageDefaultAllUsers()
328 out = SystemUtil.runShellCommand( in testListPackageDefaultAllUsers()
[all …]
/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/tests/permission/src/android/permission/cts/
DRevokeSelfPermissionTest.java34 import static com.android.compatibility.common.util.SystemUtil.runShellCommand;
84 SystemUtil.runShellCommand("input keyevent KEYCODE_WAKEUP"); in wakeUpScreen()
85 SystemUtil.runShellCommand("input keyevent 82"); in wakeUpScreen()
86 mOldScreenOffTimeoutValue = SystemUtil.runShellCommand( in wakeUpScreen()
88 mOldSleepTimeoutValue = SystemUtil.runShellCommand("settings get secure sleep_timeout"); in wakeUpScreen()
89 SystemUtil.runShellCommand("settings put system screen_off_timeout -1"); in wakeUpScreen()
90 SystemUtil.runShellCommand("settings put secure sleep_timeout -1"); in wakeUpScreen()
105 runShellCommand("pm uninstall " + APP_PKG_NAME); in uninstallApp()
114 SystemUtil.runShellCommand("settings put system screen_off_timeout " in restoreDeviceForOneTime()
116 SystemUtil.runShellCommand("settings put secure sleep_timeout " + mOldSleepTimeoutValue); in restoreDeviceForOneTime()
[all …]
DBaseNotificationListenerCheckTest.java22 import static com.android.compatibility.common.util.SystemUtil.runShellCommand;
141 runShellCommand("cmd tare set-vip " in beforeClassSetup()
150 runShellCommand("cmd tare set-vip " in afterClassTearDown()
187 runShellCommand(command); in setNotificationListenerServiceAllowed()
261 runShellCommand("input keyevent KEYCODE_WAKEUP"); in wakeUpAndDismissKeyguard()
262 runShellCommand("wm dismiss-keyguard"); in wakeUpAndDismissKeyguard()
275 runShellCommand( in resetPermissionControllerBeforeEachTest()
278 runShellCommand("cmd jobscheduler reset-schedule-quota"); in resetPermissionControllerBeforeEachTest()
/cts/tests/tests/gamemanager/src/android/gamemanager/cts/
DTestUtil.java19 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/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/tests/security/src/android/security/cts/
DCVE_2022_20611.java18 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/tests/uidmigration/src/android/uidmigration/cts/
DCommon.kt20 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/
DCtsAmbientContextDetectionServiceDeviceTest.java20 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/
DUtils.java19 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/
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()
/cts/tests/inputmethod/util/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/rotationresolverservice/src/android/rotationresolverservice/cts/
DCtsRotationResolverServiceDeviceTest.java23 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/
DDeprecatedAbiTest.java59 SystemUtil.runShellCommand("input keyevent KEYCODE_WAKEUP"); in setUp()
60 SystemUtil.runShellCommand("wm dismiss-keyguard"); in setUp()
61 SystemUtil.runShellCommand("setprop debug.wm.disable_deprecated_abi_dialog 0"); in setUp()
70 SystemUtil.runShellCommand("setprop debug.wm.disable_deprecated_abi_dialog 1"); in tearDown()
/cts/tests/inputmethod/src/android/view/inputmethod/cts/
DInputMethodRegistrationTest.java19 import static com.android.compatibility.common.util.SystemUtil.runShellCommand;
69 runShellCommand("am wait-for-broadcast-barrier"); in setUpClass()
76 runShellCommand("ime reset"); in tearDownClass()
130 runShellCommand("am wait-for-broadcast-barrier"); in testIgnoreLargeSettingsActivityComponent()
152 runShellCommand("am wait-for-broadcast-barrier"); in testLoadIMEsUpToThreshold()
207 runShellCommand("am wait-for-broadcast-barrier"); in testLoadEnabledIMEsAndMore()
234 runShellCommand("am wait-for-broadcast-barrier"); in testLoadEnabledIMEsAndMore()
247 runShellCommand("pm install -r --user " + Process.myUserHandle().getIdentifier() + " " in installLargeResourceIme()
252 runShellCommand("pm uninstall --user " + Process.myUserHandle().getIdentifier() + " " in uninstallLargeResourceIme()
258 runShellCommand("ime enable " + id); in enableImes()
/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()

12345678910>>...13