Home
last modified time | relevance | path

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

1234567

/cts/hostsidetests/security/src/android/security/cts/
DPoc16_12.java30 if(containsDriver(getDevice(), "/dev/nvmap")) { in testPocCVE_2016_8424()
31 AdbUtils.runPoc("CVE-2016-8424", getDevice(), 60); in testPocCVE_2016_8424()
40 if(containsDriver(getDevice(), "/dev/nvhost-vic")) { in testPocCVE_2016_8425()
41 AdbUtils.runPoc("CVE-2016-8425", getDevice(), 60); in testPocCVE_2016_8425()
50 if(containsDriver(getDevice(), "/dev/nvhost-gpu")) { in testPocCVE_2016_8426()
51 AdbUtils.runPoc("CVE-2016-8426", getDevice(), 60); in testPocCVE_2016_8426()
60 if(containsDriver(getDevice(), "/dev/nvhost-gpu") || in testPocCVE_2016_8427()
61 containsDriver(getDevice(), "/dev/nvhost-dbg-gpu")) { in testPocCVE_2016_8427()
62 AdbUtils.runPoc("CVE-2016-8427", getDevice(), 60); in testPocCVE_2016_8427()
71 if(containsDriver(getDevice(), "/dev/nvmap")) { in testPocCVE_2016_8428()
[all …]
DPoc16_10.java29 if(containsDriver(getDevice(), "/dev/dri/renderD129")) { in testPocCVE_2016_6730()
30 AdbUtils.runPoc("CVE-2016-6730", getDevice(), 60); in testPocCVE_2016_6730()
39 if(containsDriver(getDevice(), "/dev/dri/renderD129")) { in testPocCVE_2016_6731()
40 AdbUtils.runPoc("CVE-2016-6731", getDevice(), 60); in testPocCVE_2016_6731()
49 if(containsDriver(getDevice(), "/dev/dri/renderD129")) { in testPocCVE_2016_6732()
50 AdbUtils.runPoc("CVE-2016-6732", getDevice(), 60); in testPocCVE_2016_6732()
59 if(containsDriver(getDevice(), "/dev/dri/renderD129")) { in testPocCVE_2016_6733()
60 AdbUtils.runPoc("CVE-2016-6733", getDevice(), 60); in testPocCVE_2016_6733()
69 if(containsDriver(getDevice(), "/dev/dri/renderD129")) { in testPocCVE_2016_6734()
70 AdbUtils.runPoc("CVE-2016-6734", getDevice(), 60); in testPocCVE_2016_6734()
[all …]
DPoc17_03.java28 if (containsDriver(getDevice(), "/dev/kgsl-3d0")) { in testPocCVE_2016_8479()
29 AdbUtils.runPocNoOutput("CVE-2016-8479", getDevice(), 180); in testPocCVE_2016_8479()
41 if (containsDriver(getDevice(), "/dev/ion") && in testPocCVE_2017_0508()
42 containsDriver(getDevice(), "/dev/dri/renderD129")) { in testPocCVE_2017_0508()
43 AdbUtils.runPocNoOutput("CVE-2017-0508", getDevice(), 30); in testPocCVE_2017_0508()
55 if (containsDriver(getDevice(), "/dev/dri/renderD128")) { in testPocCVE_2017_0333()
56 AdbUtils.runPocNoOutput("CVE-2017-0333", getDevice(), 30); in testPocCVE_2017_0333()
67 if (containsDriver(getDevice(), "/dev/dri/renderD129")) { in testPocCVE_2017_0334()
68 String out = AdbUtils.runPoc("CVE-2017-0334", getDevice()); in testPocCVE_2017_0334()
DPoc17_09.java34 , getDevice() in testPocCve_2017_6983()
40 , getDevice() in testPocCve_2017_6983()
46 , getDevice() in testPocCve_2017_6983()
52 , getDevice() in testPocCve_2017_6983()
DPoc17_11.java29 AdbUtils.runCommandLine("logcat -c", getDevice()); in testPocCVE_2017_0859()
30 AdbUtils.pushResource("/cve_2017_0859.mp4", "/sdcard/cve_2017_0859.mp4", getDevice()); in testPocCVE_2017_0859()
33 " -t audio/amr", getDevice()); in testPocCVE_2017_0859()
36 String logcat = AdbUtils.runCommandLine("logcat -d", getDevice()); in testPocCVE_2017_0859()
DPoc16_04.java28 AdbUtils.runCommandLine("logcat -c" , getDevice()); in testPocCVE_2016_2419()
29 AdbUtils.runPoc("CVE-2016-2419", getDevice(), 60); in testPocCVE_2016_2419()
30 String logcat = AdbUtils.runCommandLine("logcat -d", getDevice()); in testPocCVE_2016_2419()
39 AdbUtils.runPoc("CVE-2016-0844", getDevice(), 60); in testPocCVE_2016_0844()
/cts/hostsidetests/os/src/android/os/cts/
DStaticSharedLibsHostTests.java111 getDevice().uninstallPackage(STATIC_LIB_PROVIDER1_PKG); in doTestInstallSharedLibrary()
112 getDevice().uninstallPackage(STATIC_LIB_PROVIDER2_PKG); in doTestInstallSharedLibrary()
113 getDevice().uninstallPackage(STATIC_LIB_PROVIDER_RECURSIVE_PKG); in doTestInstallSharedLibrary()
122 assertNull(getDevice().uninstallPackage(STATIC_LIB_PROVIDER1_PKG)); in doTestInstallSharedLibrary()
124 assertNull(getDevice().uninstallPackage(STATIC_LIB_PROVIDER2_PKG)); in doTestInstallSharedLibrary()
126 assertNull(getDevice().uninstallPackage(STATIC_LIB_PROVIDER_RECURSIVE_PKG)); in doTestInstallSharedLibrary()
128 getDevice().uninstallPackage(STATIC_LIB_PROVIDER1_PKG); in doTestInstallSharedLibrary()
129 getDevice().uninstallPackage(STATIC_LIB_PROVIDER2_PKG); in doTestInstallSharedLibrary()
130 getDevice().uninstallPackage(STATIC_LIB_PROVIDER_RECURSIVE_PKG); in doTestInstallSharedLibrary()
146 getDevice().uninstallPackage(STATIC_LIB_PROVIDER1_PKG); in doTestCannotInstallSharedLibraryWithMissingDependency()
[all …]
/cts/hostsidetests/appsecurity/src/android/appsecurity/cts/
DMajorVersionTest.java56 Utils.prepareSingleUser(getDevice()); in setUp()
60 getDevice().uninstallPackage(PKG); in setUp()
67 getDevice().uninstallPackage(PKG); in tearDown()
71 assertNull(getDevice().installPackage( in testInstallMinorVersion()
73 assertTrue(getDevice().getInstalledPackageNames().contains(PKG)); in testInstallMinorVersion()
75 getDevice().uninstallPackage(PKG); in testInstallMinorVersion()
79 assertNull(getDevice().installPackage( in testInstallMajorVersion()
81 assertTrue(getDevice().getInstalledPackageNames().contains(PKG)); in testInstallMajorVersion()
83 getDevice().uninstallPackage(PKG); in testInstallMajorVersion()
87 assertNull(getDevice().installPackage( in testInstallUpdateAcrossMinorMajorVersion()
[all …]
DPermissionsHostTest.java78 Utils.prepareSingleUser(getDevice()); in setUp()
82 getDevice().uninstallPackage(USES_PERMISSION_PKG); in setUp()
83 getDevice().uninstallPackage(ESCALATE_PERMISSION_PKG); in setUp()
84 getDevice().uninstallPackage(PERMISSION_POLICY_25_PKG); in setUp()
85 getDevice().uninstallPackage(ACCESS_SERIAL_PKG); in setUp()
88 mScreenTimeoutBeforeTest = getDevice().getSetting(SCREEN_OFF_TIMEOUT_NS, in setUp()
90 getDevice().setSetting(SCREEN_OFF_TIMEOUT_NS, SCREEN_OFF_TIMEOUT_KEY, "1800000"); in setUp()
93 getDevice().executeShellCommand("input keyevent KEYCODE_WAKEUP"); in setUp()
94 getDevice().disableKeyguard(); in setUp()
101 getDevice().setSetting(SCREEN_OFF_TIMEOUT_NS, SCREEN_OFF_TIMEOUT_KEY, in tearDown()
[all …]
DIsolatedSplitsTests.java49 Utils.prepareSingleUser(getDevice()); in setUp()
50 getDevice().uninstallPackage(PKG); in setUp()
56 getDevice().uninstallPackage(PKG); in tearDown()
61 Utils.runDeviceTests(getDevice(), PKG, TEST_CLASS, "shouldLoadDefault"); in testInstallBase()
66 Utils.runDeviceTests(getDevice(), PKG, TEST_CLASS, "shouldLoadPolishLocale"); in testInstallBaseAndConfigSplit()
75 Utils.runDeviceTests(getDevice(), PKG, TEST_CLASS, "shouldLoadDefault"); in testInstallOneFeatureSplit()
76 Utils.runDeviceTests(getDevice(), PKG, TEST_CLASS, "shouldLoadFeatureADefault"); in testInstallOneFeatureSplit()
77 Utils.runDeviceTests(getDevice(), PKG, TEST_CLASS, "shouldLoadFeatureAReceivers"); in testInstallOneFeatureSplit()
83 Utils.runDeviceTests(getDevice(), PKG, TEST_CLASS, "shouldLoadPolishLocale"); in testInstallOneFeatureSplitAndConfigSplits()
84 Utils.runDeviceTests(getDevice(), PKG, TEST_CLASS, "shouldLoadFeatureAPolishLocale"); in testInstallOneFeatureSplitAndConfigSplits()
[all …]
DPackageVisibilityTest.java52 mUsers = Utils.prepareMultipleUsers(getDevice()); in setUpPackage()
54 getDevice().executeShellCommand("settings get global package_verifier_enable"); in setUpPackage()
55 getDevice().executeShellCommand("settings put global package_verifier_enable 0"); in setUpPackage()
56 getDevice().uninstallPackage(TEST_PKG); in setUpPackage()
57 getDevice().uninstallPackage(TINY_PKG); in setUpPackage()
63 getDevice().uninstallPackage(TEST_PKG); in tearDown()
64 getDevice().uninstallPackage(TINY_PKG); in tearDown()
65 getDevice().executeShellCommand("settings put global package_verifier_enable " in tearDown()
78 getDevice().startUser(userId); in testUninstalledPackageVisibility()
89 Utils.runDeviceTests(getDevice(), TEST_PKG, in testUninstalledPackageVisibility()
[all …]
DAppSecurityTests.java96 Utils.prepareSingleUser(getDevice()); in setUp()
110 getDevice().uninstallPackage(SHARED_UI_PKG); in testSharedUidDifferentCerts()
111 getDevice().uninstallPackage(SHARED_UI_DIFF_CERT_PKG); in testSharedUidDifferentCerts()
114 String installResult = getDevice().installPackage(getTestAppFile(SHARED_UI_APK), in testSharedUidDifferentCerts()
118 installResult = getDevice().installPackage(getTestAppFile(SHARED_UI_DIFF_CERT_APK), in testSharedUidDifferentCerts()
125 getDevice().uninstallPackage(SHARED_UI_PKG); in testSharedUidDifferentCerts()
126 getDevice().uninstallPackage(SHARED_UI_DIFF_CERT_PKG); in testSharedUidDifferentCerts()
140 getDevice().uninstallPackage(SIMPLE_APP_PKG); in testAppUpgradeDifferentCerts()
143 String installResult = getDevice().installPackage(getTestAppFile(SIMPLE_APP_APK), in testAppUpgradeDifferentCerts()
147 installResult = getDevice().installPackage(getTestAppFile(SIMPLE_APP_DIFF_CERT_APK), in testAppUpgradeDifferentCerts()
[all …]
DPrivilegedUpdateTests.java58 String defaultAbi = AbiFormatter.getDefaultAbi(getDevice(), mAbi.getBitness()); in isDefaultAbi()
76 Utils.prepareSingleUser(getDevice()); in setUp()
80 getDevice().uninstallPackage(SHIM_PKG); in setUp()
81 getDevice().uninstallPackage(TEST_PKG); in setUp()
83 assertNull(getDevice().installPackage(mBuildHelper.getTestFile(TEST_APK), false)); in setUp()
84 getDevice().executeShellCommand("pm enable " + SHIM_PKG); in setUp()
91 getDevice().uninstallPackage(SHIM_PKG); in tearDown()
92 getDevice().uninstallPackage(TEST_PKG); in tearDown()
93 getDevice().executeShellCommand("pm enable " + SHIM_PKG); in tearDown()
97 getDevice().uninstallPackage(SHIM_PKG); in testPrivilegedAppUpgradeRestricted()
[all …]
DStorageHostTest.java55 mUsers = Utils.prepareMultipleUsers(getDevice()); in setUp()
62 getDevice().executeShellCommand("appops set --user " + user + " " + PKG_STATS in setUp()
71 getDevice().uninstallPackage(PKG_STATS); in tearDown()
72 getDevice().uninstallPackage(PKG_A); in tearDown()
73 getDevice().uninstallPackage(PKG_B); in tearDown()
79 Utils.runDeviceTests(getDevice(), PKG_STATS, CLASS_STATS, "testVerify"); in testVerify()
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()
[all …]
DExternalStorageHostTest.java73 mUsers = Utils.prepareMultipleUsers(getDevice()); in setUp()
87 getDevice().uninstallPackage(NONE_PKG); in testExternalStorageNone()
89 assertNull(getDevice().installPackage(getTestAppFile(NONE_APK), false, options)); in testExternalStorageNone()
96 getDevice().uninstallPackage(NONE_PKG); in testExternalStorageNone()
111 getDevice().uninstallPackage(READ_PKG); in testExternalStorageRead()
113 assertNull(getDevice().installPackage(getTestAppFile(READ_APK), false, options)); in testExternalStorageRead()
120 getDevice().uninstallPackage(READ_PKG); in testExternalStorageRead()
135 getDevice().uninstallPackage(WRITE_PKG); in testExternalStorageWrite()
137 assertNull(getDevice().installPackage(getTestAppFile(WRITE_APK), false, options)); in testExternalStorageWrite()
144 getDevice().uninstallPackage(WRITE_PKG); in testExternalStorageWrite()
[all …]
DDirectBootHostTest.java65 mUsers = Utils.prepareSingleUser(getDevice()); in setUp()
69 getDevice().uninstallPackage(PKG); in setUp()
70 getDevice().uninstallPackage(OTHER_PKG); in setUp()
75 getDevice().uninstallPackage(PKG); in tearDown()
76 getDevice().uninstallPackage(OTHER_PKG); in tearDown()
156 getDevice().executeShellCommand("am start -a android.intent.action.MAIN" in doDirectBootTest()
169 final String res = getDevice().executeShellCommand("sm set-emulate-fbe true"); in doDirectBootTest()
173 getDevice().waitForDeviceNotAvailable(SHUTDOWN_TIME_MS); in doDirectBootTest()
174 getDevice().waitForDeviceOnline(); in doDirectBootTest()
176 getDevice().rebootUntilOnline(); in doDirectBootTest()
[all …]
DApplicationVisibilityTest.java50 mUsers = Utils.prepareMultipleUsers(getDevice(), 3); in setUpPackage()
52 getDevice().executeShellCommand("settings get global package_verifier_enable"); in setUpPackage()
53 getDevice().executeShellCommand("settings put global package_verifier_enable 0"); in setUpPackage()
58 getDevice().uninstallPackage(TEST_WITH_PERMISSION_PKG); in tearDown()
59 getDevice().uninstallPackage(TINY_PKG); in tearDown()
60 getDevice().executeShellCommand("settings put global package_verifier_enable " in tearDown()
80 getDevice().executeShellCommand(grantCmd); in testPackageListCrossUserGrant()
82 getDevice(), in testPackageListCrossUserGrant()
88 getDevice(), in testPackageListCrossUserGrant()
109 getDevice(), in testPackageListCrossUserNoGrant()
[all …]
DAdoptableHostTest.java53 Utils.prepareMultipleUsers(getDevice(), Integer.MAX_VALUE); in setUp()
55 getDevice().uninstallPackage(PKG); in setUp()
61 getDevice().executeShellCommand("sm set-virtual-disk true"); in setUp()
67 getDevice().uninstallPackage(PKG); in tearDown()
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()
[all …]
DPackageResolutionHostTest.java46 getDevice().uninstallPackage(TINY_PKG); in setUp()
52 getDevice().uninstallPackage(TINY_PKG); in tearDown()
58 getDevice().installPackage(mBuildHelper.getTestFile(TINY_APK), true); in testResolveOrderedActivity()
59 Utils.runDeviceTests(getDevice(), TINY_PKG, in testResolveOrderedActivity()
61 getDevice().uninstallPackage(TINY_PKG); in testResolveOrderedActivity()
67 getDevice().installPackage(mBuildHelper.getTestFile(TINY_APK), true); in testResolveOrderedService()
68 Utils.runDeviceTests(getDevice(), TINY_PKG, in testResolveOrderedService()
70 getDevice().uninstallPackage(TINY_PKG); in testResolveOrderedService()
76 getDevice().installPackage(mBuildHelper.getTestFile(TINY_APK), true); in testResolveOrderedReceiver()
77 Utils.runDeviceTests(getDevice(), TINY_PKG, in testResolveOrderedReceiver()
[all …]
DClassloaderSplitsTest.java51 Utils.prepareSingleUser(getDevice()); in setUp()
52 getDevice().uninstallPackage(PKG); in setUp()
57 getDevice().uninstallPackage(PKG); in tearDown()
64 runDeviceTests(getDevice(), PKG, TEST_CLASS, "testBaseClassLoader"); in testBaseClassLoader()
71 runDeviceTests(getDevice(), PKG, TEST_CLASS, "testBaseClassLoader"); in testFeatureAClassLoader()
72 runDeviceTests(getDevice(), PKG, TEST_CLASS, "testFeatureAClassLoader"); in testFeatureAClassLoader()
79 runDeviceTests(getDevice(), PKG, TEST_CLASS, "testBaseClassLoader"); in testFeatureBClassLoader()
80 runDeviceTests(getDevice(), PKG, TEST_CLASS, "testFeatureAClassLoader"); in testFeatureBClassLoader()
81 runDeviceTests(getDevice(), PKG, TEST_CLASS, "testFeatureBClassLoader"); in testFeatureBClassLoader()
88 runDeviceTests(getDevice(), PKG, TEST_CLASS, "testBaseClassLoader"); in testReceiverClassLoaders()
[all …]
DOverlayHostTest.java33 getDevice().uninstallPackage(PKG); in setUp()
38 getDevice().uninstallPackage(PKG); in tearDown()
48 assertFalse(getDevice().getInstalledPackageNames().contains(PKG)); in testInstallingOverlayHasNoEffect()
51 assertNotNull(getDevice().installPackage(mBuildHelper.getTestFile(APK), false, false)); in testInstallingOverlayHasNoEffect()
54 assertFalse(getDevice().getInstalledPackageNames().contains(PKG)); in testInstallingOverlayHasNoEffect()
57 assertFalse(getDevice().executeShellCommand("cmd overlay list").contains(PKG)); in testInstallingOverlayHasNoEffect()
/cts/hostsidetests/numberblocking/src/com/android/cts/numberblocking/hostside/
DNumberBlockingTest.java62 mHasFeature = getDevice().isMultiUserSupported() in setUp()
63 && getDevice().hasFeature(FEATURE_TELEPHONY) in setUp()
64 && getDevice().hasFeature(FEATURE_CONNECTION_SERVICE); in setUp()
70 installTestAppForUser(getDevice().getPrimaryUserId()); in setUp()
74 mPrimaryUserSerialNumber = getUserSerialNumber(getDevice().getPrimaryUserId()); in setUp()
81 getDevice().removeUser(mSecondaryUserId); in tearDown()
103 true /* setToSmsApp */, getDevice().getPrimaryUserId()); in testNumberBlocking()
111 false /* setToSmsApp */, getDevice().getPrimaryUserId()); in testNumberBlocking()
122 assertTrue(getDevice().startUser(mSecondaryUserId)); in testNumberBlocking()
139 true /* setToSmsApp */, getDevice().getPrimaryUserId()); in testNumberBlocking()
[all …]
/cts/hostsidetests/multiuser/src/android/host/multiuser/
DBaseMultiUserTest.java45 mSupportsMultiUser = getDevice().getMaxNumberOfUsersSupported() > 1; in setUp()
47 mPrimaryUserId = getDevice().getPrimaryUserId(); in setUp()
53 getDevice().switchUser(mPrimaryUserId); in setUp()
59 if (getDevice().getCurrentUser() != mPrimaryUserId) { in tearDown()
61 getDevice().switchUser(mPrimaryUserId); in tearDown()
72 public ITestDevice getDevice() { in getDevice() method in BaseMultiUserTest
81 final String output = getDevice().executeShellCommand(command); in createRestrictedProfile()
104 final String output = getDevice().executeShellCommand(command); in createUser()
120 for (int userId : getDevice().listUsers()) { in removeTestUsers()
122 getDevice().removeUser(userId); in removeTestUsers()
[all …]
/cts/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/
DDeviceOwnerTest.java83 getDevice().uninstallPackage(DEVICE_OWNER_PKG); in setUp()
90 getDevice().getProperty("ro.setupwizard.mode")); in setUp()
98 getDevice().uninstallPackage(DEVICE_OWNER_PKG); in tearDown()
141 getDevice().setSetting("global", "sys_storage_threshold_percentage", "100"); in testCreateAndManageUser_LowStorage()
142 getDevice().setSetting("global", "sys_storage_threshold_max_bytes", in testCreateAndManageUser_LowStorage()
149 getDevice().executeShellCommand( in testCreateAndManageUser_LowStorage()
151 getDevice().executeShellCommand( in testCreateAndManageUser_LowStorage()
161 int maxUsers = getDevice().getMaxNumberOfUsersSupported(); in testCreateAndManageUser_MaxUsers()
237 int maxRunningUsers = getDevice().getMaxNumberOfRunningUsersSupported(); in testCreateAndManageUser_StartInBackground_MaxRunningUsers()
419 getDevice().executeShellCommand("dpm force-security-logs"); in testSecurityLoggingWithSingleUser()
[all …]
/cts/hostsidetests/trustedvoice/src/android/trustedvoice/cts/
DTrustedVoiceHostTest.java97 getDevice().executeAdbCommand("logcat", "-c"); in testUnlock()
99 getDevice().executeShellCommand(SLEEP_COMMAND); in testUnlock()
101 getDevice().executeShellCommand(START_COMMAND); in testUnlock()
106 String logs = getDevice().executeAdbCommand( in testUnlock()
128 getDevice().executeShellCommand(AWAKE_COMMAND); in testUnlock()
129 getDevice().executeShellCommand(DISMISS_KEYGUARD_COMMAND); in testUnlock()

1234567