Home
last modified time | relevance | path

Searched refs:executeShellCommand (Results 1 – 25 of 85) sorted by relevance

1234

/packages/modules/StatsD/tests/src/android/cts/statsd/atom/
DAtomTestCase.java244 return getDevice().executeShellCommand("if [ -e " + path + " ] ; then" in probe()
249 getDevice().executeShellCommand("setprop persist.traced.enable 1"); in enableSystemTracing()
253 getDevice().executeShellCommand("setprop persist.traced.enable 0"); in disableSystemTracing()
311 getDevice().executeShellCommand(String.join(" ", "cat", remotePath, "|", in uploadConfig()
313 getDevice().executeShellCommand("rm " + remotePath); in uploadConfig()
320 getDevice().executeShellCommand( in removeConfig()
894 return getDevice().executeShellCommand("getprop " + prop).replace("\n", ""); in getProperty()
898 getDevice().executeShellCommand("input keyevent KEYCODE_WAKEUP"); in turnScreenOn()
899 getDevice().executeShellCommand("wm dismiss-keyguard"); in turnScreenOn()
903 getDevice().executeShellCommand("input keyevent KEYCODE_SLEEP"); in turnScreenOff()
[all …]
DDeviceAtomTestCase.java170 final String packages = getDevice().executeShellCommand("cmd package list packages -U" in getUid()
210 getDevice().executeShellCommand(String.format( in allowBackgroundServices()
220 getDevice().executeShellCommand(String.format( in executeBackgroundService()
229 getDevice().executeShellCommand("am set-standby-bucket " in allowImmediateSyncs()
269 getDevice().executeShellCommand( in withActivity()
272 getDevice().executeShellCommand( in withActivity()
277 getDevice().executeShellCommand( in withActivity()
284 getDevice().executeShellCommand("dumpsys batterystats --reset"); in resetBatteryStats()
288 getDevice().executeShellCommand("dumpsys procstats --clear"); in clearProcStats()
292 getDevice().executeShellCommand("dumpsys procstats --start-testing"); in startProcStatsTesting()
[all …]
/packages/modules/AdServices/sdksandbox/tests/testutils/src/android/app/sdksandbox/hosttestutils/
DAdoptableStorageUtils.java42 mTest.getDevice().executeShellCommand("sm has-adoptable").trim()); in isAdoptableStorageSupported()
49 assertEmpty(mTest.getDevice().executeShellCommand("sm partition " + mDiskId + " private")); in createNewVolume()
60 mTest.getDevice().executeShellCommand("sm set-virtual-disk true"); in enableVirtualDisk()
68 result = mTest.getDevice().executeShellCommand("sm list-disks adoptable").trim(); in enableVirtualDisk()
79 mTest.getDevice().executeShellCommand("sm partition " + mDiskId + " public"); in cleanUpVolume()
80 mTest.getDevice().executeShellCommand("sm forget all"); in cleanUpVolume()
89 String disks = mTest.getDevice().executeShellCommand("sm list-disks adoptable"); in getAdoptionDisk()
92 disks = mTest.getDevice().executeShellCommand("sm list-disks adoptable"); in getAdoptionDisk()
127 lines = mTest.getDevice().executeShellCommand("sm list-volumes private").split("\n"); in getAdoptionVolume()
153 .executeShellCommand("dumpsys package volumes") in waitForVolumeReady()
[all …]
/packages/providers/MediaProvider/tests/utils/src/com/android/providers/media/tests/utils/
DPublicVolumeSetupHelper.java74 executeShellCommand("sm set-force-adoptable on"); in createNewPublicVolume()
75 executeShellCommand("sm set-virtual-disk true"); in createNewPublicVolume()
94 final String publicVolume = executeShellCommand("sm list-volumes public").trim(); in isPublicVolumeMounted()
103 final String listDisks = executeShellCommand("sm list-disks").trim(); in partitionDisk()
105 executeShellCommand("sm partition " + listDisks + " public"); in partitionDisk()
134 allPublicVolumeDetails = executeShellCommand("sm list-volumes public") in getCurrentPublicVolumeString()
154 executeShellCommand("sm mount " + getPublicVolumeString()); in mountPublicVolume()
158 executeShellCommand("sm unmount " + getPublicVolumeString()); in unmountPublicVolume()
163 executeShellCommand("sm set-virtual-disk false"); in deletePublicVolumes()
177 public static String executeShellCommand(String pattern, Object...args) throws IOException { in executeShellCommand() method in PublicVolumeSetupHelper
[all …]
/packages/modules/AdServices/adservices/tests/cts/hosttests/src/com/android/adservices/cts/
DTopicsApiLoggingHostTest.java181 getDevice().executeShellCommand("setprop debug.adservices.consent_manager_debug_mode true"); in overrideConsentManagerDebugMode()
188 .executeShellCommand( in disableMddBackgroundTasks()
198 .executeShellCommand( in overrideDisableTopicsEnrollmentCheck()
204 getDevice().executeShellCommand("device_config put adservices global_kill_switch false"); in disableGlobalKillSwitch()
209 getDevice().executeShellCommand("device_config put adservices topics_kill_switch false"); in disableTopicsAPIKillSwitch()
215 .executeShellCommand( in setEnforceForeground()
223 .executeShellCommand( in getEnforceForeground()
254 .executeShellCommand( in setConsentSourceOfTruth()
260 .executeShellCommand( in setBlockedTopicsSourceOfTruth()
266 .executeShellCommand( in disableMeasurementRollbackDelete()
[all …]
DUiApiLoggingHostTest.java177 .executeShellCommand( in disableMddBackgroundTasks()
187 .executeShellCommand( in overrideDisableTopicsEnrollmentCheck()
193 getDevice().executeShellCommand("device_config put adservices global_kill_switch false"); in disableGlobalKillSwitch()
199 device.executeShellCommand("am start -n " + packageName + "/" + CLASS); in startUiMainActivity()
203 getDevice().executeShellCommand("am force-stop " + mTargetPackage); in stopPacakageAPI()
204 getDevice().executeShellCommand("am force-stop " + mTargetPackageAosp); in stopPacakageAPI()
228 .executeShellCommand( in setEnableBackCompatFlag()
234 .executeShellCommand( in setBlockedTopicsSourceOfTruth()
241 .executeShellCommand( in setMeasurementRollbackDeleteKillSwitch()
248 .executeShellCommand( in setConsentSourceOfTruth()
[all …]
DAdExtServicesBootCompleteReceiverHostTest.java77 getDevice().executeShellCommand("am start -a android.adservices.ui.SETTINGS"); in testExtBootCompleteReceiver()
83 getDevice().executeShellCommand("device_config put adservices global_kill_switch false"); in overrideCompatFlags()
84 getDevice().executeShellCommand("device_config put adservices adservice_enabled true"); in overrideCompatFlags()
85 getDevice().executeShellCommand("device_config put adservices enable_back_compat true"); in overrideCompatFlags()
89 getDevice().executeShellCommand("device_config delete adservices global_kill_switch"); in resetCompatFlags()
90 getDevice().executeShellCommand("device_config delete adservices adservice_enabled"); in resetCompatFlags()
91 getDevice().executeShellCommand("device_config delete adservices enable_back_compat"); in resetCompatFlags()
/packages/modules/AdServices/sdksandbox/tests/hostsidetests/SdkSandboxStorageHostTest/src/com/android/tests/sdksandbox/host/
DSdkSandboxStorageHostTest.java221 .executeShellCommand( in testSdkSandboxDataMirrorDirectory_IsVolumeSpecific()
359 getDevice().executeShellCommand(String.format("mv %s %s", cePackageDir, ceInvalidDir)); in testSdkDataPackageDirectory_IsReconciled_InvalidAndMissingPackage()
364 getDevice().executeShellCommand(String.format("mv %s %s", dePackageDir, deInvalidDir)); in testSdkDataPackageDirectory_IsReconciled_InvalidAndMissingPackage()
391 .executeShellCommand( in testSdkDataPackageDirectory_IsReconciled_IncludesDifferentVolumes()
406 .executeShellCommand( in testSdkDataPackageDirectory_IsReconciled_IncludesDifferentVolumes()
413 .executeShellCommand( in testSdkDataPackageDirectory_IsReconciled_IncludesDifferentVolumes()
445 .executeShellCommand( in testSdkDataPackageDirectory_IsReconciled_ChecksForPackageOnWrongVolume()
455 getDevice().executeShellCommand(String.format("mkdir %s", ceInvalidDir)); in testSdkDataPackageDirectory_IsReconciled_ChecksForPackageOnWrongVolume()
456 getDevice().executeShellCommand(String.format("mkdir %s", deInvalidDir)); in testSdkDataPackageDirectory_IsReconciled_ChecksForPackageOnWrongVolume()
498 getDevice().executeShellCommand("pm uninstall -k --user 0 " + TEST_APP_STORAGE_PACKAGE); in testSdkDataPackageDirectory_IsReconciled_DeleteKeepData()
[all …]
/packages/apps/Settings/tests/uitests/src/com/android/settings/ui/
DStorageWizardTest.java60 mDevice.executeShellCommand("setprop sys.debug.storage_slow 1"); in setUp()
61 mDevice.executeShellCommand("sm set-virtual-disk true"); in setUp()
64 mDevice.executeShellCommand("sm partition " + mDisk + " public"); in setUp()
76 mDevice.executeShellCommand("setprop sys.debug.storage_slow 0"); in tearDown()
77 mDevice.executeShellCommand("sm set-virtual-disk false"); in tearDown()
78 mDevice.executeShellCommand("sm forget all"); in tearDown()
151 String disks = mDevice.executeShellCommand("sm list-disks adoptable"); in getAdoptableDisk()
154 disks = mDevice.executeShellCommand("sm list-disks adoptable"); in getAdoptableDisk()
166 String volumes = mDevice.executeShellCommand("sm list-volumes public"); in getPublicVolume()
170 volumes = mDevice.executeShellCommand("sm list-volumes public"); in getPublicVolume()
/packages/services/Car/tests/android_car_api_test/src/com/android/internal/car/
DCarServiceHelperServiceSystemTest.java50 executeShellCommand("cmd car_service emulate-driving-state park"); in testCarServiceHelperServiceDump_safeMode()
66 executeShellCommand("cmd car_service emulate-driving-state drive"); in testCarServiceHelperServiceDump_unsafeMode()
72 executeShellCommand("cmd car_service emulate-driving-state park"); in testCarServiceHelperServiceDump_unsafeMode()
89 executeShellCommand("cmd car_service emulate-driving-state park"); in testCarServiceHelperServiceDump_safeOperation()
105 executeShellCommand("cmd car_service emulate-driving-state drive"); in testCarServiceHelperServiceDump_unsafeOperation()
111 executeShellCommand("cmd car_service emulate-driving-state park"); in testCarServiceHelperServiceDump_unsafeOperation()
121 executeShellCommand("service check system_server_dumper"), in assumeSystemServerDumpSupported()
135 return executeShellCommand(cmd.toString()); in dumpCarServiceHelper()
/packages/modules/AdServices/sdksandbox/tests/hostsidetests/src/com/android/tests/sdksandbox/host/
DSdkSandboxShellHostTest.java83 String processDump = getDevice().executeShellCommand("ps -A"); in testStartAndStopSdkSandboxSucceedsForDebuggableApp()
91 processDump = getDevice().executeShellCommand("ps -A"); in testStartAndStopSdkSandboxSucceedsForDebuggableApp()
101 String processDump = getDevice().executeShellCommand("ps -A"); in testStartSdkSandboxFailsForNonDebuggableApp()
113 String processDump = getDevice().executeShellCommand("ps -A"); in testStartSdkSandboxFailsForIncorrectUser()
126 String processDump = getDevice().executeShellCommand("ps -A"); in testStopSdkSandboxSucceedsForRunningDebuggableApp()
146 String processDump = getDevice().executeShellCommand("ps -A"); in testStopSdkSandboxFailsForNonDebuggableApp()
159 String processDump = getDevice().executeShellCommand("ps -A"); in testStopSdkSandboxFailsForIncorrectUser()
164 getDevice().executeShellCommand(String.format("pm clear %s", pkg)); in clearProcess()
168 getDevice().executeShellCommand(String.format("am start -W -n %s/.%s", pkg, activity)); in startActivity()
DSdkSandboxLifecycleHostTest.java245 .executeShellCommand("device_config put adservices disable_sdk_sandbox false"); in testSandboxIsKilledWhenKillswitchEnabled()
252 .executeShellCommand("device_config put adservices disable_sdk_sandbox true"); in testSandboxIsKilledWhenKillswitchEnabled()
267 getDevice().executeShellCommand("cmd sdk_sandbox set-state --enabled"); in testSandboxIsKilledWhenKillswitchEnabled()
277 .executeShellCommand("device_config put adservices disable_sdk_sandbox false"); in testSpecificAppProcessIsKilledOnSandboxDeath()
292 .executeShellCommand("device_config put adservices disable_sdk_sandbox true"); in testSpecificAppProcessIsKilledOnSandboxDeath()
311 getDevice().executeShellCommand("cmd sdk_sandbox set-state --enabled"); in testSpecificAppProcessIsKilledOnSandboxDeath()
327 getDevice().executeShellCommand("input keyevent KEYCODE_HOME"); in testBackgroundingAppReducesSandboxPriority()
352 getDevice().executeShellCommand("kill -9 " + initialSandboxPid); in testSandboxReconnectionAfterDeath()
371 getDevice().executeShellCommand("input keyevent KEYCODE_HOME"); in testSandboxReconnectionAfterDeath()
389 getDevice().executeShellCommand(String.format("am start -W -n %s/.%s", pkg, activity)); in startActivity()
[all …]
/packages/modules/Connectivity/tests/cts/net/src/android/net/cts/
DBatteryStatsManagerTest.java104 executeShellCommand("cmd battery unplug"); in testReportNetworkInterfaceForTransports()
105 executeShellCommand("cmd battery set status " + BATTERY_STATUS_DISCHARGING); in testReportNetworkInterfaceForTransports()
107 executeShellCommand("dumpsys batterystats --reset"); in testReportNetworkInterfaceForTransports()
111 executeShellCommand("dumpsys batterystats enable no-auto-reset"); in testReportNetworkInterfaceForTransports()
119 executeShellCommand("dumpsys batterystats --write"); in testReportNetworkInterfaceForTransports()
129 executeShellCommand("dumpsys batterystats disable no-auto-reset"); in testReportNetworkInterfaceForTransports()
130 executeShellCommand("cmd battery reset"); in testReportNetworkInterfaceForTransports()
163 executeShellCommand("dumpsys batterystats"); in verifyGetCellBatteryStats()
254 private static String executeShellCommand(String command) { in executeShellCommand() method in BatteryStatsManagerTest
/packages/modules/Connectivity/tests/cts/hostside/app/src/com/android/cts/net/hostside/
DAbstractRestrictBackgroundNetworkTestCase.java25 import static com.android.cts.net.hostside.NetworkPolicyTestUtils.executeShellCommand;
189 executeShellCommand("cmd netpolicy start-watching " + mUid); in setUp()
199 executeShellCommand("cmd netpolicy stop-watching"); in tearDown()
493 final String result = executeShellCommand(command); in executeSilentShellCommand()
525 result = executeShellCommand(command).trim(); in assertDelayedShellCommand()
541 executeShellCommand("cmd netpolicy add restrict-background-whitelist " + uid); in addRestrictBackgroundWhitelist()
549 executeShellCommand("cmd netpolicy remove restrict-background-whitelist " + uid); in removeRestrictBackgroundWhitelist()
558 executeShellCommand("cmd netpolicy add restrict-background-blacklist " + uid); in addRestrictBackgroundBlacklist()
566 executeShellCommand("cmd netpolicy remove restrict-background-blacklist " + uid); in removeRestrictBackgroundBlacklist()
575 executeShellCommand("cmd netpolicy add app-idle-whitelist " + uid); in addAppIdleWhitelist()
[all …]
/packages/apps/Settings/tests/uitests/src/com/android/settings/biometrics2/utils/
DLockScreenUtil.java62 executeShellCommand(format("%s %s", SET_PIN_COMMAND, lockscreenCode)); in setLockscreen()
65 executeShellCommand(format("%s %s", SET_PASSWORD_COMMAND, lockscreenCode)); in setLockscreen()
68 executeShellCommand(format("%s %s", SET_PATTERN_COMMAND, lockscreenCode)); in setLockscreen()
83 executeShellCommand( in resetLockscreen()
96 private static void executeShellCommand(String command) { in executeShellCommand() method in LockScreenUtil
99 getUiDevice().executeShellCommand(command); in executeShellCommand()
/packages/apps/Launcher3/tests/src/com/android/launcher3/util/rule/
DScreenRecordRule.java61 device.executeShellCommand("killall screenrecord"); in apply()
63 automation.executeShellCommand("screenrecord " + outputFile); in apply()
64 String screenRecordPid = device.executeShellCommand("pidof screenrecord"); in apply()
70 device.executeShellCommand("kill -INT " + screenRecordPid); in apply()
74 automation.executeShellCommand("rm " + outputFile); in apply()
/packages/apps/Settings/tests/anomaly-tester/src/com/android/settings/anomaly/tests/
DTestUtils.java40 uiAutomation.executeShellCommand("dumpsys battery unplug"); in setUp()
41 uiAutomation.executeShellCommand("dumpsys batterystats enable pretend-screen-off"); in setUp()
42 uiAutomation.executeShellCommand("dumpsys batterystats --reset"); in setUp()
53 uiAutomation.executeShellCommand("dumpsys battery reset"); in tearDown()
54 uiAutomation.executeShellCommand("dumpsys batterystats disable pretend-screen-off"); in tearDown()
/packages/modules/Permission/tests/cts/safetycenter/src/android/safetycenter/cts/
DSafetyCenterShellCommandsTest.kt37 val enabled = executeShellCommand("cmd safety_center enabled").toBoolean() in enabled_printsEnabledValue()
45 val supported = executeShellCommand("cmd safety_center supported").toBoolean() in supported_printsSupportedValue()
52 val packageName = executeShellCommand("cmd safety_center package-name") in packageName_printsPackageName()
57 private fun executeShellCommand(command: String): String = method in android.safetycenter.cts.SafetyCenterShellCommandsTest
/packages/apps/Settings/tests/perftests/src/com/android/settings/tests/perf/
DLaunchSettingsTest.java91 mDefaultScreenTimeout = mDevice.executeShellCommand( in setUp()
126 final String mString = mDevice.executeShellCommand("am start -W -a" + action); in executePreformanceTest()
141 mDevice.executeShellCommand("am force-stop com.android.settings"); in closeApp()
193 mDevice.executeShellCommand("settings put system screen_off_timeout " + timeout); in setScreenTimeOut()
217 mDevice.executeShellCommand("am start -W -a android.settings.AIRPLANE_MODE_SETTINGS"); in clickAirplaneMode()
224 return mDevice.executeShellCommand("settings get global airplane_mode_on"); in getAirplaneModeStatus()
/packages/apps/Settings/tests/componenttests/src/com/android/settings/fuelgauge/batterysaver/
DBatterySaverButtonPreferenceControllerComponentTest.java66 mInstrumentation.getUiAutomation().executeShellCommand("dumpsys battery unplug"); in setUp()
67 mInstrumentation.getUiAutomation().executeShellCommand("settings get global low_power 0"); in setUp()
96 mInstrumentation.getUiAutomation().executeShellCommand("settings get global low_power 0"); in tearDown()
97 mInstrumentation.getUiAutomation().executeShellCommand("dumpsys battery reset"); in tearDown()
/packages/apps/DocumentsUI/tests/functional/com/android/documentsui/
DFileCopyUiTest.java137 device.executeShellCommand("settings put global stay_on_while_plugged_in 3"); in setUp()
198 device.executeShellCommand("sm set-virtual-disk false"); in tearDown()
218 device.executeShellCommand("settings put global stay_on_while_plugged_in " in tearDown()
335 device.executeShellCommand("sm set-virtual-disk true"); in enableVirtualSdCard()
338 device.executeShellCommand(String.format("sm partition %s public", diskId)); in enableVirtualSdCard()
348 String disks = device.executeShellCommand("sm list-disks adoptable"); in getAdoptionDisk()
351 disks = device.executeShellCommand("sm list-disks adoptable"); in getAdoptionDisk()
362 String volumes = device.executeShellCommand("sm list-volumes public"); in waitForPublicVolume()
366 volumes = device.executeShellCommand("sm list-volumes public"); in waitForPublicVolume()
DDialogUiTest.java329 return Integer.parseInt(executeShellCommand("getprop " + densityProp).trim()); in getStableDensity()
333 executeShellCommand("wm density " + targetDensity); in setDensity()
336 final String output = executeShellCommand("wm density"); in setDensity()
343 executeShellCommand("wm density reset"); in resetDensity()
347 public static String executeShellCommand(String cmd) { in executeShellCommand() method in DialogUiTest
367 ParcelFileDescriptor pfd = automation.executeShellCommand(cmd); in runShellCommand()
/packages/modules/AdServices/adservices/tests/perf/src/android/adservices/test/scenario/adservices/
DMeasurementRegisterCalls.java116 getUiDevice().executeShellCommand("settings put global auto_time false"); in setupDevicePropertiesAndInitializeClient()
123 getUiDevice().executeShellCommand("settings put global auto_time true"); in resetDeviceProperties()
128 getUiDevice().executeShellCommand("date 2023-04-01"); in testRegisterSourceAndTriggerAndRunAttributionAndReporting()
135 getUiDevice().executeShellCommand("date 2023-04-03"); in testRegisterSourceAndTriggerAndRunAttributionAndReporting()
137 getUiDevice().executeShellCommand("date 2023-04-22"); in testRegisterSourceAndTriggerAndRunAttributionAndReporting()
328 getUiDevice().executeShellCommand(cmd); in executeJob()
532 .executeShellCommand("setprop debug.adservices.consent_manager_debug_mode true"); in setFlagsForMeasurement()
621 .executeShellCommand("setprop debug.adservices.consent_manager_debug_mode null"); in resetFlagsForMeasurement()
/packages/providers/MediaProvider/tests/client/src/com/android/providers/media/client/
DDownloadProviderTest.java21 import static com.android.providers.media.tests.utils.PublicVolumeSetupHelper.executeShellCommand;
108 executeShellCommand("mkdir -p " + otherPackageExternalFilesDir + " -m 2770"); in createOtherPackageExternalFilesDir()
122 executeShellCommand("touch " + otherPackagePrivateFile); in createOtherPackagePrivateFile()
129 executeShellCommand("rm -r " + dir.getAbsolutePath()); in deleteOtherPackageExternalFiles()
/packages/modules/ExtServices/java/tests/src/android/ext/services/notification/
DAssistantSettingsTest.java238 uiDevice.executeShellCommand( in clearDeviceConfig()
240 uiDevice.executeShellCommand( in clearDeviceConfig()
242 uiDevice.executeShellCommand( in clearDeviceConfig()
245 uiDevice.executeShellCommand( in clearDeviceConfig()

1234