Home
last modified time | relevance | path

Searched refs:getDevice (Results 1 – 25 of 49) sorted by relevance

12

/cts/hostsidetests/appsecurity/src/com/android/cts/appsecurity/
DAppSecurityTests.java116 getDevice().uninstallPackage(SHARED_UI_PKG); in testSharedUidDifferentCerts()
117 getDevice().uninstallPackage(SHARED_UI_DIFF_CERT_PKG); in testSharedUidDifferentCerts()
120 String installResult = getDevice().installPackage(getTestAppFile(SHARED_UI_APK), in testSharedUidDifferentCerts()
124 installResult = getDevice().installPackage(getTestAppFile(SHARED_UI_DIFF_CERT_APK), in testSharedUidDifferentCerts()
130 getDevice().uninstallPackage(SHARED_UI_PKG); in testSharedUidDifferentCerts()
131 getDevice().uninstallPackage(SHARED_UI_DIFF_CERT_PKG); in testSharedUidDifferentCerts()
143 getDevice().uninstallPackage(SIMPLE_APP_PKG); in testAppUpgradeDifferentCerts()
146 String installResult = getDevice().installPackage(getTestAppFile(SIMPLE_APP_APK), in testAppUpgradeDifferentCerts()
150 installResult = getDevice().installPackage(getTestAppFile(SIMPLE_APP_DIFF_CERT_APK), in testAppUpgradeDifferentCerts()
156 getDevice().uninstallPackage(SIMPLE_APP_PKG); in testAppUpgradeDifferentCerts()
[all …]
DExternalStorageHostTest.java93 getDevice().uninstallPackage(NONE_PKG); in testExternalStorageNone()
95 assertNull(getDevice().installPackage(getTestAppFile(NONE_APK), false, options)); in testExternalStorageNone()
102 getDevice().uninstallPackage(NONE_PKG); in testExternalStorageNone()
117 getDevice().uninstallPackage(READ_PKG); in testExternalStorageRead()
119 assertNull(getDevice().installPackage(getTestAppFile(READ_APK), false, options)); in testExternalStorageRead()
126 getDevice().uninstallPackage(READ_PKG); in testExternalStorageRead()
141 getDevice().uninstallPackage(WRITE_PKG); in testExternalStorageWrite()
143 assertNull(getDevice().installPackage(getTestAppFile(WRITE_APK), false, options)); in testExternalStorageWrite()
150 getDevice().uninstallPackage(WRITE_PKG); in testExternalStorageWrite()
164 getDevice().uninstallPackage(NONE_PKG); in testExternalStorageGifts()
[all …]
DAdoptableHostTest.java61 getDevice().uninstallPackage(PKG); in setUp()
68 getDevice().uninstallPackage(PKG); in tearDown()
87 assertEmpty(getDevice().executeShellCommand("sm partition " + diskId + " private")); in testApps()
91 … assertSuccess(getDevice().executeShellCommand("pm move-package " + PKG + " " + vol.uuid)); in testApps()
97 getDevice().executeShellCommand("sm unmount " + vol.volId); in testApps()
98 getDevice().executeShellCommand("sm mount " + vol.volId); in testApps()
104 assertSuccess(getDevice().executeShellCommand("pm move-package " + PKG + " internal")); in testApps()
110 getDevice().executeShellCommand("sm partition " + diskId + " public"); in testApps()
124 final String originalVol = getDevice() in testPrimaryStorage()
146 assertEmpty(getDevice().executeShellCommand("sm partition " + diskId + " private")); in verifyPrimaryInternal()
[all …]
DPermissionsHostTest.java57 getDevice().uninstallPackage(PKG); in setUp()
64 getDevice().uninstallPackage(PKG); in tearDown()
69 assertNull(getDevice().installPackage(mCtsBuild.getTestApp(APK), false, false)); in testFail()
79 assertNull(getDevice().installPackage(mCtsBuild.getTestApp(APK), false, false)); in testKill()
88 assertNull(getDevice().installPackage(mCtsBuild.getTestApp(APK), false, false)); in testDefault()
93 assertNull(getDevice().installPackage(mCtsBuild.getTestApp(APK), false, false)); in testGranted()
100 assertNull(getDevice().installPackage(mCtsBuild.getTestApp(APK), false, false)); in testInteractiveGrant()
105 assertNull(getDevice().installPackage(mCtsBuild.getTestApp(APK), false, false)); in testRuntimeGroupGrantSpecificity()
110 assertNull(getDevice().installPackage(mCtsBuild.getTestApp(APK), false, false)); in testRuntimeGroupGrantExpansion()
115 assertNull(getDevice().installPackage(mCtsBuild.getTestApp(APK_COMPAT), false, false)); in testCompatDefault()
[all …]
DDocumentsTest.java58 getDevice().uninstallPackage(PROVIDER_PKG); in setUp()
59 getDevice().uninstallPackage(CLIENT_PKG); in setUp()
61 assertNull(getDevice().installPackage(mCtsBuild.getTestApp(PROVIDER_APK), false)); in setUp()
62 assertNull(getDevice().installPackage(mCtsBuild.getTestApp(CLIENT_APK), false)); in setUp()
69 getDevice().uninstallPackage(PROVIDER_PKG); in tearDown()
70 getDevice().uninstallPackage(CLIENT_PKG); in tearDown()
95 Utils.runDeviceTests(getDevice(), packageName, testClassName, testMethodName); in runDeviceTests()
DKeySetHostTest.java183 RUNNER, getDevice().getIDevice()); in doRunTests()
188 getDevice().runInstrumentationTests(testRunner, listener); in doRunTests()
240 mDevice = getDevice(); in setUp()
379 installResult = getDevice().installPackage( in testKeyRotationPerm()
383 installResult = getDevice().installPackage( in testKeyRotationPerm()
/cts/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/
DLauncherAppsSingleUserTest.java33 mHasLauncherApps = getDevice().getApiLevel() >= 21; in setUp()
59 getDevice().uninstallPackage(SIMPLE_APP_PKG); in testInstallAppMainUser()
76 getDevice().uninstallPackage(SIMPLE_APP_PKG); in testLauncherCallbackPackageAddedMainUser()
88 getDevice().uninstallPackage(SIMPLE_APP_PKG); in testLauncherCallbackPackageRemovedMainUser()
94 getDevice().uninstallPackage(SIMPLE_APP_PKG); in testLauncherCallbackPackageRemovedMainUser()
112 getDevice().uninstallPackage(SIMPLE_APP_PKG); in testLauncherCallbackPackageChangedMainUser()
127 getDevice().uninstallPackage(SIMPLE_APP_PKG); in testLauncherNonExportedAppFails()
142 getDevice().uninstallPackage(SIMPLE_APP_PKG); in testLaunchNonExportActivityFails()
157 getDevice().uninstallPackage(SIMPLE_APP_PKG); in testLaunchMainActivity()
DDeviceAndProfileOwnerTest.java65 getDevice().uninstallPackage(DEVICE_ADMIN_PKG); in tearDown()
66 getDevice().uninstallPackage(PERMISSIONS_APP_PKG); in tearDown()
67 getDevice().uninstallPackage(SIMPLE_PRE_M_APP_PKG); in tearDown()
68 getDevice().uninstallPackage(CERT_INSTALLER_PKG); in tearDown()
122 assertNull(getDevice().uninstallPackage(PERMISSIONS_APP_PKG)); in testPermissionAppUpdate()
129 assertNull(getDevice().uninstallPackage(PERMISSIONS_APP_PKG)); in testPermissionAppUpdate()
136 assertNull(getDevice().uninstallPackage(PERMISSIONS_APP_PKG)); in testPermissionAppUpdate()
192 + getDevice().executeShellCommand(command)); in testAccountManagement()
230 assertTrue(getDevice().pushFile(apk, TEST_APP_LOCATION + apk.getName())); in testPackageInstallUserRestrictions()
233 getDevice().uninstallPackage(TEST_APP_PKG); in testPackageInstallUserRestrictions()
[all …]
DCustomDeviceOwnerTest.java64 getDevice().uninstallPackage(DEVICE_OWNER_PKG); in tearDown()
65 getDevice().uninstallPackage(DEVICE_AND_PROFILE_OWNER_PKG); in tearDown()
92 getDevice().uninstallPackage(INTENT_RECEIVER_PKG); in testOwnerChangedBroadcast()
141 getDevice().uninstallPackage(TEST_APP_PKG); in testSilentPackageInstall()
142 assertTrue(getDevice().pushFile(apk, TEST_APP_LOCATION + apk.getName())); in testSilentPackageInstall()
149 String commandOutput = getDevice().executeShellCommand(command); in testSilentPackageInstall()
150 getDevice().uninstallPackage(TEST_APP_PKG); in testSilentPackageInstall()
151 getDevice().uninstallPackage(PACKAGE_INSTALLER_PKG); in testSilentPackageInstall()
DLauncherAppsProfileTest.java60 getDevice().uninstallPackage(MANAGED_PROFILE_PKG); in tearDown()
81 getDevice().uninstallPackage(SIMPLE_APP_PKG); in testGetActivitiesWithProfile()
97 getDevice().uninstallPackage(SIMPLE_APP_PKG); in testLauncherCallbackPackageAddedProfile()
108 getDevice().uninstallPackage(SIMPLE_APP_PKG); in testLauncherCallbackPackageRemovedProfile()
114 getDevice().uninstallPackage(SIMPLE_APP_PKG); in testLauncherCallbackPackageRemovedProfile()
131 getDevice().uninstallPackage(SIMPLE_APP_PKG); in testLauncherCallbackPackageChangedProfile()
DBaseLauncherAppsTest.java43 getDevice().uninstallPackage(LAUNCHER_TESTS_PKG); in uninstallTestApps()
44 getDevice().uninstallPackage(LAUNCHER_TESTS_SUPPORT_PKG); in uninstallTestApps()
45 getDevice().uninstallPackage(SIMPLE_APP_PKG); in uninstallTestApps()
53 + getDevice().executeShellCommand(command)); in startCallbackService()
DBaseDevicePolicyTest.java66 mHasFeature = getDevice().getApiLevel() >= 21 /* Build.VERSION_CODES.L */ in setUp()
69 mPackageVerifier = getDevice().executeShellCommand( in setUp()
71 getDevice().executeShellCommand("settings put global package_verifier_enable 0"); in setUp()
77 getDevice().executeShellCommand("settings put global package_verifier_enable " in tearDown()
85 String installResult = getDevice().installPackage(mCtsBuild.getTestApp(fileName), true); in installApp()
92 final ITestDevice device = getDevice(); in installAppAsUser()
109 String commandOutput = getDevice().executeShellCommand(command); in startUser()
118 String commandOutput = getDevice().executeShellCommand(command); in getMaxNumberOfUsersSupported()
131 String commandOutput = getDevice().executeShellCommand(command); in listUsers()
155 + getDevice().executeShellCommand(stopUserCommand)); in removeUser()
[all …]
DDeviceOwnerTest.java59 getDevice().uninstallPackage(DEVICE_OWNER_PKG); in tearDown()
82 getDevice().uninstallPackage(INTENT_RECEIVER_PKG); in testLockTask()
97 getDevice().uninstallPackage(WIFI_CONFIG_CREATOR_PKG); in testWifiConfigLockdown()
114 getDevice().uninstallPackage(MANAGED_PROFILE_PKG); in testCannotSetDeviceOwnerAgain()
DLauncherAppsMultiUserTest.java39 mMultiUserSupported = getMaxNumberOfUsersSupported() > 1 && getDevice().getApiLevel() >= 21; in setUp()
71 getDevice().uninstallPackage(SIMPLE_APP_PKG); in testGetActivitiesForNonProfileFails()
87 getDevice().uninstallPackage(SIMPLE_APP_PKG); in testNoLauncherCallbackPackageAddedSecondaryUser()
DManagedProfileTest.java91 getDevice().uninstallPackage(MANAGED_PROFILE_PKG); in tearDown()
92 getDevice().uninstallPackage(INTENT_SENDER_PKG); in tearDown()
93 getDevice().uninstallPackage(INTENT_RECEIVER_PKG); in tearDown()
153 getDevice().uninstallPackage(WIFI_CONFIG_CREATOR_APK); in testProfileWifiCleanup()
173 + getDevice().executeShellCommand(command)); in testCrossProfileIntentFilters()
305 if (getDevice().isAdbRoot()) { in testNoDebuggingFeaturesRestriction()
548 getDevice().uninstallPackage(DEVICE_OWNER_PKG); in testCannotSetDeviceOwnerWhenProfilePresent()
583 getDevice().executeShellCommand("appwidget grantbind --user 0 --package " in testCrossProfileWidgets()
613 getDevice().uninstallPackage(WIDGET_PROVIDER_PKG); in testCrossProfileWidgets()
624 + getDevice().executeShellCommand(command)); in disableActivityForUser()
[all …]
DMixedProfileOwnerTest.java71 getDevice().executeShellCommand(command); in testScreenCaptureDisabled_allowedPrimaryUser()
/cts/hostsidetests/atrace/src/android/atrace/cts/
DAtraceHostTest.java157 String output = getDevice().executeShellCommand("atrace"); in testSimpleRun()
172 String output = getDevice().executeShellCommand("atrace --list_categories"); in testCategories()
201 getDevice().uninstallPackage(TEST_PKG); in testTracingContent()
205 String installResult = getDevice().installPackage(testAppFile, false); in testTracingContent()
213 getDevice().executeShellCommand("atrace --async_stop " + atraceArgs); in testTracingContent()
214 getDevice().executeShellCommand("atrace --async_start " + atraceArgs); in testTracingContent()
215 getDevice().executeShellCommand("am start " + TEST_PKG); in testTracingContent()
216 getDevice().executeShellCommand("sleep 1"); in testTracingContent()
217 atraceOutput = getDevice().executeShellCommand("atrace --async_stop " + atraceArgs); in testTracingContent()
220 getDevice().uninstallPackage(TEST_PKG); in testTracingContent()
/cts/tools/tradefed-host/src/com/android/cts/tradefed/testtype/
DUiAutomatorJarTest.java68 Assert.assertNotNull("missing device", getDevice()); in run()
80 CLog.d("Installing %s on %s", mTestJarFileName, getDevice().getSerialNumber()); in installJar()
83 boolean result = getDevice().pushFile(mCtsBuild.getTestApp(mTestJarFileName), in installJar()
93 CLog.d("Uninstalling %s on %s", mTestJarFileName, getDevice().getSerialNumber()); in uninstallJar()
95 getDevice().executeShellCommand(String.format("rm %s", fullJarPath)); in uninstallJar()
DVMHostTest.java44 if (!installVmPrereqs(getDevice(), getBuildHelper())) { in run()
47 getDevice().getSerialNumber())); in run()
50 cleanupDeviceFiles(getDevice()); in run()
DJUnitDeviceTest.java93 public ITestDevice getDevice() { in getDevice() method in JUnitDeviceTest
155 CLog.d("Installing %s on %s", f, getDevice().getSerialNumber()); in installJars()
160 boolean result = getDevice().pushFile(jarFile, fullJarPath); in installJars()
177 CLog.d("Uninstalling %s on %s", fullJarPath, getDevice().getSerialNumber()); in removeJars()
178 getDevice().executeShellCommand(String.format("rm %s", fullJarPath)); in removeJars()
DCtsTest.java357 public ITestDevice getDevice() { in getDevice() method in CtsTest
472 if (getDevice() == null) { in run()
485 listener = new FailedTestBugreportGenerator(listener, getDevice()); in run()
488 listener = new FailedTestScreenshotGenerator(listener, getDevice()); in run()
491 listener = new FailedTestLogcatGenerator(listener, getDevice(), mMaxLogcatBytes); in run()
511 collectDeviceInfo(getDevice(), mCtsBuild, listener); in run()
536 ((IDeviceTest) test).setDevice(getDevice()); in run()
578 InputStreamSource screenshotSource = getDevice().getScreenshot(); in run()
618 preparer.setUp(getDevice(), mBuildInfo); in performPackagePrepareSetup()
648 ((ITargetCleaner) preparer).tearDown(getDevice(), mBuildInfo, null); in performPackagePreparerTearDown()
[all …]
/cts/hostsidetests/jdwpsecurity/src/android/jdwpsecurity/cts/
DJdwpSecurityHostTest.java76 boolean success = getDevice().pushFile(tempFile, getDeviceScriptFilepath()); in setUp()
85 getDevice().executeShellCommand("chmod 755 " + getDeviceScriptFilepath()); in setUp()
89 boolean success = getDevice().pushFile(jarFile, getDeviceJarFilepath()); in setUp()
96 getDevice().executeShellCommand(String.format("rm -r %s", DEVICE_LOCATION)); in tearDown()
266 return ArrayUtil.buildArray(new String[] {"adb", "-s", getDevice().getSerialNumber()}, in buildAdbCommand()
271 if (getDevice().doesFileExist(remoteFilePath)) { in createRemoteDir()
281 getDevice().executeShellCommand(String.format("mkdir %s", remoteFilePath)); in createRemoteDir()
282 return getDevice().doesFileExist(remoteFilePath); in createRemoteDir()
/cts/hostsidetests/net/src/com/android/cts/net/
DHostsideNetworkTests.java61 getDevice().uninstallPackage(TEST_PKG); in setUp()
63 assertNull(getDevice().installPackage(mCtsBuild.getTestApp(TEST_APK), false)); in setUp()
70 getDevice().uninstallPackage(TEST_PKG); in tearDown()
80 "android.support.test.runner.AndroidJUnitRunner", getDevice().getIDevice()); in runDeviceTests()
83 getDevice().runInstrumentationTests(testRunner, listener); in runDeviceTests()
/cts/tools/tradefed-host/tests/src/com/android/cts/tradefed/device/
DDeviceInfoCollectorFuncTest.java58 assertNotNull(getDevice().getSerialNumber()); in setUp()
63 DeviceInfoCollector.collectDeviceInfo(getDevice(), UnitTests.ABI.getName(), new File( in testCollectDeviceInfo()
75 DeviceInfoCollector.collectExtendedDeviceInfo(getDevice(), UnitTests.ABI.getName(), in testExtendedDeviceInfo()
/cts/hostsidetests/os/src/com/android/cts/app/os/
DOsHostTests.java47 mDevice = getDevice(); in setUp()

12