STS test for Android Security CVE-2021-0306
Test: sts-tradefed run sts-engbuild-no-spl-lock -m CtsAppSecurityHostTestCases -t android.appsecurity.cts.PermissionsHostTest#testNoPermissionEscalationAfterReboot
Bug: 173531291
Bug: 154505240
Bug: 173530931
Bug: 168319670
Change-Id: I9b6a1a7434b6196375894462aeed5c770fb10af6
Merged-In: I9b6a1a7434b6196375894462aeed5c770fb10af6
diff --git a/hostsidetests/appsecurity/src/android/appsecurity/cts/PermissionsHostTest.java b/hostsidetests/appsecurity/src/android/appsecurity/cts/PermissionsHostTest.java
index 577e128..e8827fc 100644
--- a/hostsidetests/appsecurity/src/android/appsecurity/cts/PermissionsHostTest.java
+++ b/hostsidetests/appsecurity/src/android/appsecurity/cts/PermissionsHostTest.java
@@ -16,6 +16,7 @@
package android.appsecurity.cts;
+import android.platform.test.annotations.SecurityTest;
import android.platform.test.annotations.AppModeFull;
import android.platform.test.annotations.Presubmit;
@@ -350,6 +351,7 @@
"testCannotEscalateNonRuntimePermissionsToRuntime");
}
+ @SecurityTest
public void testNoPermissionEscalationAfterReboot() throws Exception {
assertNull(getDevice().installPackage(mBuildHelper.getTestFile(
APK_DECLARE_NON_RUNTIME_PERMISSIONS), false, false));
diff --git a/hostsidetests/appsecurity/test-apps/DeclareNotRuntimePermissions/Android.mk b/hostsidetests/appsecurity/test-apps/DeclareNotRuntimePermissions/Android.mk
index 6af9e72..3807438 100644
--- a/hostsidetests/appsecurity/test-apps/DeclareNotRuntimePermissions/Android.mk
+++ b/hostsidetests/appsecurity/test-apps/DeclareNotRuntimePermissions/Android.mk
@@ -23,7 +23,7 @@
LOCAL_PACKAGE_NAME := CtsDeclareNonRuntimePermissions
LOCAL_SDK_VERSION := current
-LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests sts
LOCAL_DEX_PREOPT := false
diff --git a/hostsidetests/appsecurity/test-apps/EscalateToRuntimePermissions/Android.mk b/hostsidetests/appsecurity/test-apps/EscalateToRuntimePermissions/Android.mk
index c82648c..858c2cd 100644
--- a/hostsidetests/appsecurity/test-apps/EscalateToRuntimePermissions/Android.mk
+++ b/hostsidetests/appsecurity/test-apps/EscalateToRuntimePermissions/Android.mk
@@ -27,7 +27,7 @@
LOCAL_PACKAGE_NAME := CtsEscalateToRuntimePermissions
LOCAL_SDK_VERSION := current
-LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
+LOCAL_COMPATIBILITY_SUITE := cts vts general-tests sts
LOCAL_PROGUARD_ENABLED := disabled