/cts/tests/tests/companion/common/src/android/companion/cts/common/ |
D | AppHelper.kt | 30 runShellCommand("cmd companiondevice associate $userId $packageName $macAddress $role") in associate() 33 runShellCommand("cmd companiondevice disassociate $userId $packageName $macAddress") in associate() 36 runShellCommand("cmd companiondevice disassociate-all $userId $packageName") in associate() 39 runShellCommand("pm list packages --user $userId $packageName").isNotBlank() in associate() 41 fun install() = apkPath?.let { runShellCommand("pm install --user $userId $apkPath") } in associate() 44 fun uninstall() = runShellCommand("pm uninstall --user $userId $packageName") in uninstall() 46 fun clearData() = runShellCommand("pm clear --user $userId $packageName") in uninstall() 49 runShellCommand("cmd role get-role-holders --user $userId $role").contains(packageName) in uninstall() 52 runShellCommand("cmd role add-role-holder --user $userId $role $packageName") in uninstall() 55 runShellCommand("cmd role remove-role-holder --user $userId $role $packageName") in uninstall() [all …]
|
D | TestBase.kt | 157 protected fun runShellCommand(cmd: String) = instrumentation.runShellCommand(cmd) in runShellCommand() method 186 runShellCommand("cmd companiondevice simulate-device-event $associationId $event") in simulateDeviceEvent() 189 runShellCommand( in simulateDeviceEvent() 195 runShellCommand( in simulateDeviceEvent() 202 runShellCommand("cmd companiondevice simulate-device-event-device-unlocked $userId") in simulateDeviceEventDeviceUnlocked() 206 runShellCommand( in startObservingDevicePresenceByUuid() 213 runShellCommand( in stopObservingDevicePresenceByUuid() 390 fun Instrumentation.runShellCommand(cmd: String): String { in runShellCommand() method 393 val out = SystemUtil.runShellCommand(this, cmd) in runShellCommand() 403 runShellCommand("setprop $name $value") in setSystemProp() [all …]
|
/cts/tests/JobScheduler/src/android/jobscheduler/cts/ |
D | BaseJobSchedulerTest.java | 116 SystemUtil.runShellCommand(getInstrumentation(), "cmd activity set-inactive " in injectInstrumentation() 136 SystemUtil.runShellCommand("cmd jobscheduler cache-config-changes on"); in setUp() 164 SystemUtil.runShellCommand("cmd jobscheduler cache-config-changes off"); in tearDown() 165 SystemUtil.runShellCommand(getInstrumentation(), "cmd jobscheduler monitor-battery off"); in tearDown() 166 SystemUtil.runShellCommand(getInstrumentation(), "cmd battery reset"); in tearDown() 171 SystemUtil.runShellCommand(getInstrumentation(), "cmd devicestoragemonitor reset -f"); in tearDown() 174 SystemUtil.runShellCommand(getInstrumentation(), in tearDown() 223 final String output = SystemUtil.runShellCommand("cmd deviceidle enabled deep").trim(); in isDeviceIdleEnabled() 228 final String output = SystemUtil.runShellCommand("cmd deviceidle enabled light").trim(); in isDeviceLightIdleEnabled() 235 SystemUtil.runShellCommand(getInstrumentation(), in isJsStorageStateLow() [all …]
|
D | TestAppInterface.java | 108 SystemUtil.runShellCommand( in TestAppInterface() 112 SystemUtil.runShellCommand( in TestAppInterface() 116 SystemUtil.runShellCommand("am set-standby-bucket " + TEST_APP_PACKAGE + " rare"); in TestAppInterface() 119 SystemUtil.runShellCommand("cmd deviceidle whitelist -" + TEST_APP_PACKAGE); in TestAppInterface() 120 SystemUtil.runShellCommand("cmd netpolicy start-watching " + mTestPackageUid); in TestAppInterface() 144 SystemUtil.runShellCommand("am compat reset-all " + TEST_APP_PACKAGE); in cleanup() 146 SystemUtil.runShellCommand("cmd deviceidle whitelist -" + TEST_APP_PACKAGE); in cleanup() 149 SystemUtil.runShellCommand("cmd netpolicy stop-watching"); in cleanup() 150 SystemUtil.runShellCommand( in cleanup() 244 SystemUtil.runShellCommand("am stop-app " + TEST_APP_PACKAGE); in kill() [all …]
|
/cts/tests/input/src/android/input/cts/ |
D | InputShellCommandTest.kt | 77 ShellUtils.runShellCommand("input -d $displayId tap $x $y") in testDefaultTapToolType() 88 ShellUtils.runShellCommand("input touchscreen -d $displayId tap $x $y") in testTapToolType() 91 ShellUtils.runShellCommand("input touchpad -d $displayId tap $x $y") in testTapToolType() 94 ShellUtils.runShellCommand("input touchnavigation -d $displayId tap $x $y") in testTapToolType() 97 ShellUtils.runShellCommand("input stylus -d $displayId tap $x $y") in testTapToolType() 100 ShellUtils.runShellCommand("input mouse -d $displayId tap $x $y") in testTapToolType() 103 ShellUtils.runShellCommand("input trackball -d $displayId tap $x $y") in testTapToolType() 106 ShellUtils.runShellCommand("input joystick -d $displayId tap $x $y") in testTapToolType() 112 ShellUtils.runShellCommand("input -d $displayId scroll") in testDefaultScroll() 123 ShellUtils.runShellCommand("input mouse -d $displayId scroll $x $y --axis VSCROLL,-1") in testPointerScroll() [all …]
|
/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()
|
/cts/tests/attentionservice/src/android/attentionservice/cts/ |
D | CtsAttentionServiceDeviceTest.java | 22 import static com.android.compatibility.common.util.ShellUtils.runShellCommand; 205 return runShellCommand("cmd attention getAttentionServiceComponent"); in getAttentionServiceComponent() 209 return Integer.parseInt(runShellCommand("cmd attention getLastTestCallbackCode")); in getLastTestCallbackCode() 214 runShellCommand("cmd attention getLastTestProximityUpdateCallbackCode")); in getLastTestProximityUpdateCallbackCode() 225 Boolean isSuccess = runShellCommand("cmd attention call checkAttention") in callCheckAttention() 232 runShellCommand("cmd attention call cancelCheckAttention"); in callCancelAttention() 238 Boolean isSuccess = runShellCommand("cmd attention call onStartProximityUpdates") in callStartProximityUpdates() 245 runShellCommand("cmd attention call onStopProximityUpdates"); in callStopProximityUpdates() 250 return runShellCommand("cmd attention setTestableAttentionService " + service) in setTestableAttentionService() 255 runShellCommand("cmd attention clearTestableAttentionService"); in clearTestableAttentionService() [all …]
|
/cts/hostsidetests/packagemanager/domainverification/lib/constants/android/src/com/android/cts/packagemanager/verify/domain/android/ |
D | SharedVerifications.kt | 38 ShellUtils.runShellCommand(DomainUtils.setAppLinks(it, "STATE_NO_RESPONSE", "all")) in reset() 39 ShellUtils.runShellCommand(DomainUtils.resetAppLinks(it)) in reset() 40 ShellUtils.runShellCommand(DomainUtils.setAppLinksAllowed(it, context.userId, true)) in reset() 41 ShellUtils.runShellCommand( in reset() 49 ShellUtils.runShellCommand("$enablePrefix $DECLARING_PKG_NAME_1") in reset() 50 ShellUtils.runShellCommand("$enablePrefix $DECLARING_PKG_NAME_2") in reset() 51 ShellUtils.runShellCommand( in reset() 54 ShellUtils.runShellCommand( in reset() 80 ShellUtils.runShellCommand( in verifyDomains() 98 ShellUtils.runShellCommand( in verifyDomains() [all …]
|
/cts/tests/wearable/src/android/wearable/cts/ |
D | CtsWearableSensingServiceDeviceTest.java | 25 import static com.android.compatibility.common.util.ShellUtils.runShellCommand; 491 return runShellCommand("cmd wearable_sensing get-bound-package %d", USER_ID); in getWearableSensingServiceComponent() 495 runShellCommand( in setTestableWearableSensingService() 501 runShellCommand("cmd wearable_sensing set-temporary-service %d", USER_ID); in clearTestableWearableSensingService() 505 runShellCommand( in callStartDetection() 510 runShellCommand( in callStartDetectionMixed() 515 runShellCommand("cmd ambient_context start-detection %d %s", USER_ID, FAKE_APP_PACKAGE); in callStartDetectionDefault() 519 runShellCommand("cmd wearable_sensing create-data-stream"); in createDataStream() 523 runShellCommand("cmd wearable_sensing destroy-data-stream"); in destroyDataStream() 527 runShellCommand("cmd ambient_context stop-detection %d %s", USER_ID, FAKE_APP_PACKAGE); in callStopDetection() [all …]
|
/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/common/device-side/util-axt/src/com/android/compatibility/common/util/ |
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 …]
|
D | ShellUtils.java | 54 result.set(runShellCommand(command)); in runShellCommandWithTimeout() 82 public static String runShellCommand(@NonNull String template, Object...args) { in runShellCommand() method in ShellUtils 87 .runShellCommand(InstrumentationRegistry.getInstrumentation(), command); in runShellCommand() 105 runShellCommand("%s tap %d %d", sUserHelper.getInputCmd("touchscreen"), x, y); in tap() 118 runShellCommand("%s %s", sUserHelper.getInputCmd("keyevent"), keyCode); in sendKeyEvent() 126 runShellCommand("%s %s SYSTEM_ALERT_WINDOW %s", in setOverlayPermissions()
|
/cts/tests/tests/uidmigration/src/android/uidmigration/cts/ |
D | Common.kt | 20 import com.android.compatibility.common.util.SystemUtil.runShellCommand 60 return runShellCommand("pm install --force-queryable -t $apkPath") == "Success\n" in installPackage() 64 runShellCommand("pm uninstall $packageName") in uninstallPackage() 68 runShellCommand("pm uninstall -k $packageName") in uninstallPackageWithKeepData() 74 set(value) { runShellCommand("setprop $PROPERTY_KEY $value") }
|
/cts/tests/tests/security/src/android/security/cts/CVE_2021_0472/ |
D | CVE_2021_0472.java | 115 SystemUtil.runShellCommand(instrumentation, "am task lock " + mTaskId); in testPocCVE_2021_0472() 130 SystemUtil.runShellCommand( in testPocCVE_2021_0472() 134 SystemUtil.runShellCommand(instrumentation, "am task lock stop"); in testPocCVE_2021_0472() 157 SystemUtil.runShellCommand(instrumentation, "am task lock stop"); in testPocCVE_2021_0472() 161 SystemUtil.runShellCommand(instrumentation, "input keyevent KEYCODE_HOME"); in testPocCVE_2021_0472() 162 SystemUtil.runShellCommand(instrumentation, "input keyevent KEYCODE_WAKEUP"); in testPocCVE_2021_0472() 163 SystemUtil.runShellCommand(instrumentation, "wm dismiss-keyguard"); in testPocCVE_2021_0472() 164 SystemUtil.runShellCommand(instrumentation, "input keyevent KEYCODE_POWER"); in testPocCVE_2021_0472()
|
/cts/tests/tests/security/src/android/security/cts/ |
D | CVE_2024_34719.java | 21 import static com.android.compatibility.common.util.ShellUtils.runShellCommand; 110 runShellCommand("settings get secure bluetooth_name") in testPocCVE_2024_34719() 128 if (runShellCommand("settings get global bluetooth_on").contains("1")) { in withBluetoothEnabled() 133 runShellCommand("svc bluetooth enable"); in withBluetoothEnabled() 136 return () -> runShellCommand("svc bluetooth disable"); in withBluetoothEnabled() 141 final String defaultBluetoothName = runShellCommand("settings get secure bluetooth_name"); in withDefaultBluetoothName() 145 runShellCommand( in withDefaultBluetoothName()
|
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()
|
/cts/tests/accessibilityservice/src/android/accessibilityservice/cts/utils/ |
D | SettingsSession.java | 74 return runShellCommand("settings get --user %d %s %s", mUserId, mNamespace.get(), mKey); in get() 81 runShellCommand("settings delete --user %d %s %s", mUserId, mNamespace.get(), mKey); in set() 84 runShellCommand("settings put --user %d %s %s %s", mUserId, mNamespace.get(), mKey, value); in set() 88 private String runShellCommand(@FormatString String format, Object... args) throws IOException { in runShellCommand() method in SettingsSession 90 return SystemUtil.runShellCommand(mUiAutomation, cmd).strip(); in runShellCommand()
|
/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; 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/ |
D | Utils.java | 19 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/ |
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()
|
/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/tests/gamemanager/src/android/gamemanager/cts/util/ |
D | TestUtil.java | 21 import static com.android.compatibility.common.util.ShellUtils.runShellCommand; 41 assertEquals("Success", runShellCommand("pm install --force-queryable -t " + apkPath)); in installPackage() 46 runShellCommand("pm uninstall " + packageName); in uninstallPackage()
|
/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()
|
/cts/tests/framework/base/windowmanager/src/android/server/wm/other/ |
D | DeprecatedAbiTest.java | 60 SystemUtil.runShellCommand("input keyevent KEYCODE_WAKEUP"); in setUp() 61 SystemUtil.runShellCommand("wm dismiss-keyguard"); in setUp() 62 SystemUtil.runShellCommand("setprop debug.wm.disable_deprecated_abi_dialog 0"); in setUp() 71 SystemUtil.runShellCommand("setprop debug.wm.disable_deprecated_abi_dialog 1"); in tearDown()
|