Home
last modified time | relevance | path

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

12345678

/cts/hostsidetests/appsecurity/src/android/appsecurity/cts/
DStorageHostTest.java62 getDevice().executeShellCommand("appops set --user " + user + " " + PKG_STATS in setUp()
93 getDevice().executeShellCommand("sync"); in testVerifyAppStats()
177 getDevice().executeShellCommand("settings put global sys_storage_threshold_max_bytes 0"); in testCache()
178 getDevice().executeShellCommand("settings put global sys_storage_cache_max_bytes 0"); in testCache()
179 getDevice().executeShellCommand("svc data disable"); in testCache()
180 getDevice().executeShellCommand("svc wifi disable"); in testCache()
185 getDevice().executeShellCommand("pm trim-caches 4096G"); in testCache()
188 getDevice().executeShellCommand("pm trim-caches 4096G"); in testCache()
192 … getDevice().executeShellCommand("settings delete global sys_storage_threshold_max_bytes"); in testCache()
193 getDevice().executeShellCommand("settings delete global sys_storage_cache_max_bytes"); in testCache()
[all …]
DAdoptableHostTest.java61 getDevice().executeShellCommand("sm set-virtual-disk true"); in setUp()
70 getDevice().executeShellCommand("sm set-virtual-disk false"); in tearDown()
107 assertEmpty(getDevice().executeShellCommand("sm partition " + diskId + " private")); in testApps()
111 assertSuccess(getDevice().executeShellCommand( in testApps()
118 getDevice().executeShellCommand("sm unmount " + vol.volId); in testApps()
119 getDevice().executeShellCommand("sm mount " + vol.volId); in testApps()
125 assertSuccess(getDevice().executeShellCommand("pm move-package " + PKG + " internal")); in testApps()
131 getDevice().executeShellCommand("sm partition " + diskId + " public"); in testApps()
148 .executeShellCommand("sm get-primary-storage-uuid").trim(); in testPrimaryStorage()
169 assertEmpty(getDevice().executeShellCommand("sm partition " + diskId + " private")); in verifyPrimaryInternal()
[all …]
DPrivilegedUpdateTests.java84 getDevice().executeShellCommand("pm enable " + SHIM_PKG); in setUp()
93 getDevice().executeShellCommand("pm enable " + SHIM_PKG); in tearDown()
128 getDevice().executeShellCommand("pm enable " + SHIM_PKG); in testDisableSystemApp()
130 getDevice().executeShellCommand("pm disable-user " + SHIM_PKG); in testDisableSystemApp()
140 getDevice().executeShellCommand("pm enable " + SHIM_PKG); in testDisableUpdatedSystemApp()
145 getDevice().executeShellCommand("pm disable-user " + SHIM_PKG); in testDisableUpdatedSystemApp()
147 getDevice().executeShellCommand("pm enable " + SHIM_PKG); in testDisableUpdatedSystemApp()
DApplicationVisibilityTest.java52 getDevice().executeShellCommand("settings get global package_verifier_enable"); in setUpPackage()
53 getDevice().executeShellCommand("settings put global package_verifier_enable 0"); in setUpPackage()
60 getDevice().executeShellCommand("settings put global package_verifier_enable " in tearDown()
80 getDevice().executeShellCommand(grantCmd); in testPackageListCrossUserGrant()
140 getDevice().executeShellCommand(grantCmd); in testPackageListOtherUserCrossUserGrant()
190 getDevice().executeShellCommand(grantCmd); in testApplicationListCrossUserGrant()
250 getDevice().executeShellCommand(grantCmd); in testApplicationListOtherUserCrossUserGrant()
/cts/hostsidetests/security/src/android/security/cts/
DAdbUtils.java46 return device.executeShellCommand(command); in runCommandLine()
57 device.executeShellCommand("chmod +x /data/local/tmp/" + pocName); in runPoc()
58 return device.executeShellCommand("/data/local/tmp/" + pocName); in runPoc()
70 device.executeShellCommand("chmod +x /data/local/tmp/" + pocName); in runPoc()
72 … device.executeShellCommand("/data/local/tmp/" + pocName, receiver, timeout, TimeUnit.SECONDS, 0); in runPoc()
86 device.executeShellCommand("chmod +x /data/local/tmp/" + pocName); in runPocNoOutput()
88 device.executeShellCommand("/data/local/tmp/" + pocName, receiver, timeout, in runPocNoOutput()
100 device.executeShellCommand("setprop libc.debug.malloc.program " + processName); in enableLibcMallocDebug()
101 device.executeShellCommand("setprop libc.debug.malloc.options \"backtrace guard\""); in enableLibcMallocDebug()
110 String cmdOut = device.executeShellCommand("ps -A | grep '[^]]" + processName + "'"); in enableLibcMallocDebug()
[all …]
DSecurityTestCase.java38 String uptime = getDevice().executeShellCommand("cat /proc/uptime"); in setUp()
49 String uptime = getDevice().executeShellCommand("cat /proc/uptime"); in updateKernelStartTime()
73 String result = mDevice.executeShellCommand("ls -Zl " + driver); in containsDriver()
87 String uptime = getDevice().executeShellCommand("cat /proc/uptime"); in tearDown()
/cts/tests/tests/provider/src/android/provider/cts/
DProviderTestUtils.java45 executeShellCommand(command, uiAutomation); in setDefaultSmsApp()
48 static String executeShellCommand(String command, UiAutomation uiAutomation) in executeShellCommand() method in ProviderTestUtils
50 ParcelFileDescriptor pfd = uiAutomation.executeShellCommand(command.toString()); in executeShellCommand()
68 String output = executeShellCommand("bmgr transport " + transport, uiAutomation); in setBackupTransport()
81 String output = executeShellCommand("bmgr enabled", uiAutomation); in setBackupEnabled()
90 executeShellCommand("bmgr enable " + enable, uiAutomation); in setBackupEnabled()
96 String output = executeShellCommand("bmgr list transports", uiAutomation); in hasBackupTransport()
109 executeShellCommand("bmgr backupnow " + packageName, uiAutomation); in runBackup()
114 executeShellCommand("bmgr restore 1 " + packageName, uiAutomation); in runRestore()
120 executeShellCommand("bmgr wipe " + backupTransport + " " + packageName, uiAutomation); in wipeBackup()
/cts/hostsidetests/incident/src/com/android/server/cts/
DBatteryStatsValidationTest.java92 getDevice().executeShellCommand("dumpsys batterystats enable pretend-screen-off"); in screenOff()
99 getDevice().executeShellCommand("input keyevent KEYCODE_WAKEUP"); in turnScreenOnForReal()
100 getDevice().executeShellCommand("wm dismiss-keyguard"); in turnScreenOnForReal()
107 getDevice().executeShellCommand("input keyevent KEYCODE_SLEEP"); in turnScreenOffForReal()
111 getDevice().executeShellCommand("dumpsys battery unplug"); in batteryOnScreenOn()
112 getDevice().executeShellCommand("dumpsys batterystats disable pretend-screen-off"); in batteryOnScreenOn()
116 getDevice().executeShellCommand("dumpsys battery unplug"); in batteryOnScreenOff()
117 getDevice().executeShellCommand("dumpsys batterystats enable pretend-screen-off"); in batteryOnScreenOff()
121 getDevice().executeShellCommand("dumpsys battery reset"); in batteryOffScreenOn()
122 getDevice().executeShellCommand("dumpsys batterystats disable pretend-screen-off"); in batteryOffScreenOn()
[all …]
/cts/hostsidetests/usage/src/android/app/usage/cts/
DAppIdleHostTest.java65 … String result = mDevice.executeShellCommand(String.format("am get-inactive %s", appPackage)); in isAppIdle()
75 mDevice.executeShellCommand(String.format("settings put global %s \"%s\"", in setAppIdleSettings()
84 String result = mDevice.executeShellCommand(String.format("settings get global %s", in getAppIdleSettings()
95 mDevice.executeShellCommand( in startAndStopTestApp()
103 mDevice.executeShellCommand( in startAndStopTestApp()
124 mDevice.executeShellCommand( in setAppStandbyBucket()
129 final String result = mDevice.executeShellCommand( in isAppStandbyEnabled()
135 String bucketString = mDevice.executeShellCommand( in getAppStandbyBucket()
161 mDevice.executeShellCommand(command); in testSetAppStandbyBuckets()
/cts/hostsidetests/statsd/src/android/cts/statsd/atom/
DAtomTestCase.java157 getDevice().executeShellCommand( in uploadConfig()
160 getDevice().executeShellCommand("rm " + remotePath); in uploadConfig()
164 getDevice().executeShellCommand( in removeConfig()
468 strUid = getDevice().executeShellCommand("id -u"); in getHostUid()
482 getDevice().executeShellCommand("input keyevent KEYCODE_WAKEUP"); in turnScreenOn()
483 getDevice().executeShellCommand("wm dismiss-keyguard"); in turnScreenOn()
487 getDevice().executeShellCommand("input keyevent KEYCODE_SLEEP"); in turnScreenOff()
491 getDevice().executeShellCommand("cmd battery set status " + state); in setChargingState()
495 getDevice().executeShellCommand("cmd battery unplug"); in unplugDevice()
499 getDevice().executeShellCommand("cmd battery set ac 1"); in plugInAc()
[all …]
DDeviceAtomTestCase.java155 String uidLine = getDevice().executeShellCommand("cmd package list packages -U " in getUid()
178 getDevice().executeShellCommand(String.format( in allowBackgroundServices()
184 getDevice().executeShellCommand("am set-standby-bucket " in allowImmediateSyncs()
206 getDevice().executeShellCommand( in runActivity()
209 getDevice().executeShellCommand( in runActivity()
215 getDevice().executeShellCommand( in runActivity()
222 getDevice().executeShellCommand("dumpsys batterystats --reset"); in resetBatteryStats()
/cts/hostsidetests/monkey/src/com/android/cts/monkey/
DSeedTest.java25 String out1 = mDevice.executeShellCommand(cmd1); in testSeed()
26 String out2 = mDevice.executeShellCommand(cmd1); in testSeed()
32 String out3 = mDevice.executeShellCommand(cmd2); in testSeed2()
33 String out4 = mDevice.executeShellCommand(cmd2); in testSeed2()
DVerbosityTest.java22 String v0 = mDevice.executeShellCommand(MONKEY_CMD + " -s 1337 -p " + PKGS[0] + " 500"); in testVerbosity()
29 String v1 = mDevice.executeShellCommand(MONKEY_CMD + " -v -p " + PKGS[0] + " 500"); in testVerbosity()
36 String v2 = mDevice.executeShellCommand(MONKEY_CMD + " -v -v -p " + PKGS[0] + " 500"); in testVerbosity()
DCategoryTest.java31 mDevice.executeShellCommand(cmd, receiver, MAX_TIMEOUT, TimeUnit.MILLISECONDS, 0); in testDefaultCategories()
47 mDevice.executeShellCommand(cmd, receiver, MAX_TIMEOUT, TimeUnit.MILLISECONDS, 0); in testSingleCategory()
59 mDevice.executeShellCommand(MONKEY_CMD + " -v -p " + PKGS[0] in testSingleCategory()
78 mDevice.executeShellCommand(cmd, receiver, MAX_TIMEOUT, TimeUnit.MILLISECONDS, 0); in testMultipleCategories()
/cts/hostsidetests/trustedvoice/src/android/trustedvoice/cts/
DTrustedVoiceHostTest.java99 getDevice().executeShellCommand(SLEEP_COMMAND); in testUnlock()
101 getDevice().executeShellCommand(START_COMMAND); in testUnlock()
128 getDevice().executeShellCommand(AWAKE_COMMAND); in testUnlock()
129 getDevice().executeShellCommand(DISMISS_KEYGUARD_COMMAND); in testUnlock()
/cts/hostsidetests/backup/src/android/cts/backup/
DBaseBackupHostSideTest.java72 return getDevice().executeShellCommand("bmgr backupnow " + packageName); in backupNow()
97 return getDevice().executeShellCommand("bmgr restore " + packageName); in restore()
175 getDevice().executeShellCommand(String.format( in startActivityInPackageAndWait()
188 … getDevice().executeShellCommand(String.format("bmgr wipe %s %s", LOCAL_TRANSPORT, packageName)); in clearBackupDataInLocalTransport()
195 getDevice().executeShellCommand(String.format("pm clear %s", packageName)); in clearPackageData()
200 String output = getDevice().executeShellCommand("bmgr enabled"); in isBackupEnabled()
212 String output = getDevice().executeShellCommand("bmgr list transports"); in getCurrentTransport()
223 getDevice().executeShellCommand("settings put secure backup_local_transport_parameters " in setLocalTransportParameters()
/cts/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/
DBaseDevicePolicyTest.java143 mPackageVerifier = getDevice().executeShellCommand( in setUp()
145 getDevice().executeShellCommand("settings put global package_verifier_enable 0"); in setUp()
159 executeShellCommand("input keyevent KEYCODE_HOME"); in setUp()
165 getDevice().executeShellCommand("settings put global package_verifier_enable " in tearDown()
190 executeShellCommand("am force-stop --user " + userId + " " + packageName); in forceStopPackageForUser()
193 protected void executeShellCommand(final String command) throws Exception { in executeShellCommand() method in BaseDevicePolicyTest
195 String commandOutput = getDevice().executeShellCommand(command); in executeShellCommand()
213 executeShellCommand("am switch-user " + userId); in switchUser()
226 String commandOutput = getDevice().executeShellCommand(command); in getUserFlags()
274 + getDevice().executeShellCommand(stopUserCommand)); in stopUserAsync()
[all …]
/cts/hostsidetests/harmfulappwarning/src/android/harmfulappwarning/cts/
DHarmfulAppWarningTest.java94 String warning = getDevice().executeShellCommand(GET_HARMFUL_APP_WARNING_COMMAND); in verifyHarmfulAppWarningSet()
99 String warning = getDevice().executeShellCommand(GET_HARMFUL_APP_WARNING_COMMAND); in verifyHarmfulAppWarningUnset()
131 mDevice.executeShellCommand(SET_HARMFUL_APP_WARNING_COMMAND); in testLaunchAnyway()
143 mDevice.executeShellCommand(SET_HARMFUL_APP_WARNING_COMMAND); in testUninstall()
153 mDevice.executeShellCommand(SET_HARMFUL_APP_WARNING_COMMAND); in testDismissDialog()
160 return getDevice().executeShellCommand("pm list features").contains(featureName); in hasFeature()
/cts/tests/tests/database/src/android/database/sqlite/cts/
DDatabaseTestUtils.java46 return executeShellCommand("dumpsys dbinfo " + ctx.getPackageName()); in getDbInfoOutput()
49 static String executeShellCommand(String cmd) throws Exception { in executeShellCommand() method in DatabaseTestUtils
51 InstrumentationRegistry.getInstrumentation()).executeShellCommand(cmd); in executeShellCommand()
/cts/tests/framework/base/activitymanager/src/android/server/am/
DDisplaySizeTest.java94 executeShellCommand(startActivityOnTop); in testCompatibilityDialogAfterReturn()
132 return Integer.parseInt(executeShellCommand("getprop " + densityProp).trim()); in getStableDensity()
136 executeShellCommand("wm density " + targetDensity); in setDensity()
139 final String output = executeShellCommand("wm density"); in setDensity()
146 executeShellCommand("wm density reset"); in resetDensity()
/cts/hostsidetests/deviceidle/src/com/android/cts/deviceidle/
DDeviceIdleWhitelistTest.java49 getDevice().executeShellCommand(RESET_SYS_WHITELIST_COMMAND); in setUp()
59 getDevice().executeShellCommand(RESET_SYS_WHITELIST_COMMAND); in tearDown()
65 getDevice().executeShellCommand(DEVICE_IDLE_COMMAND_PREFIX + "-" + packageToRemove); in testRemoveFromSysWhitelist()
75 getDevice().executeShellCommand( in testRemovesPersistedAcrossReboots()
90 final String output = getDevice().executeShellCommand(SHOW_SYS_WHITELIST_COMMAND).trim(); in getSystemWhitelist()
/cts/hostsidetests/sustainedperf/src/android/SustainedPerformance/cts/
DSustainedPerformanceHostTest.java78 device.executeShellCommand("cd " + DHRYSTONE + " ; chmod 777 dhry"); in run()
80 String result = device.executeShellCommand("echo " + loopCount in run()
166 device.executeShellCommand("settings put global airplane_mode_on 1"); in setUpEnvironment()
167 … device.executeShellCommand("am broadcast -a android.intent.action.AIRPLANE_MODE --ez state true"); in setUpEnvironment()
178 device.executeShellCommand(START_TEST_COMMAND); in testShader()
205 device.executeShellCommand(START_COMMAND_MODE); in testShader()
211 device.executeShellCommand(STOP_COMMAND); in testShader()
221 device.executeShellCommand("settings put global airplane_mode_on 0"); in testShader()
222 …device.executeShellCommand("am broadcast -a android.intent.action.AIRPLANE_MODE --ez state false"); in testShader()
/cts/tests/tests/keystore/src/android/server/am/
DActivityManagerTestBase.java132 executeShellCommand(AM_FORCE_STOP_TEST_PACKAGE); in tearDown()
133 executeShellCommand(AM_FORCE_STOP_SECOND_TEST_PACKAGE); in tearDown()
134 executeShellCommand(AM_FORCE_STOP_THIRD_TEST_PACKAGE); in tearDown()
143 public static String executeShellCommand(String command) { in executeShellCommand() method in ActivityManagerTestBase
156 executeShellCommand(getAmStartCmd(activityName, keyValuePairs)); in launchActivity()
165 executeShellCommand(AM_START_HOME_ACTIVITY_COMMAND); in launchHomeActivity()
171 executeShellCommand(getAmStartCmd(activityName, keyValuePairs) in launchActivity()
190 final String output = executeShellCommand(AM_STACK_LIST); in getActivityTaskId()
250 final String output = executeShellCommand("dumpsys power"); in isDisplayOn()
376 final String output = executeShellCommand(command); in runCommandAndPrintOutput()
[all …]
/cts/hostsidetests/appsecurity/test-apps/DocumentClient/src/com/android/cts/documentclient/
DDocumentsClientTestCase.java64 executeShellCommand("input keyevent KEYCODE_WAKEUP"); in setUp()
65 executeShellCommand("wm dismiss-keyguard"); in setUp()
170 protected String executeShellCommand(String command) throws Exception { in executeShellCommand() method in DocumentsClientTestCase
185 executeShellCommand("pm clear com.android.documentsui"); in clearDocumentsUi()
189 mDisabledImes = executeShellCommand("ime list -s").split("\n"); in disableImes()
191 executeShellCommand("ime disable " + ime); in disableImes()
197 executeShellCommand("ime enable " + ime); in enableImes()
/cts/hostsidetests/jvmti/attaching/host/src/android/jvmti/cts/
DJvmtiAttachingHostTest.java82 String pwd = device.executeShellCommand("run-as " + pkg + " pwd"); in testJvmtiAttachEarly()
109 device.executeShellCommand(setAgentAppCmd); in testJvmtiAgentAppInternal()
128 String pwd = device.executeShellCommand("run-as " + pkg + " pwd"); in testJvmtiAgentAppExternal()
146 device.executeShellCommand(setAgentAppCmd); in testJvmtiAgentAppExternal()
186 String abi = device.executeShellCommand("getprop ro.product.cpu.abi").replace("\n", ""); in getDeviceBaseArch()
198 device.executeShellCommand(attachCmd, NullOutputReceiver.getReceiver(), 10, in runAttachTestCmd()
221 String runAsCp = device.executeShellCommand( in installLibToDataData()
228 .executeShellCommand("run-as " + pkg + " chmod a+x " + libInDataData); in installLibToDataData()
239 device.executeShellCommand("rm " + libInTmp); in installLibToDataData()

12345678