Merge "Fix BackgroundActivityLaunchTest for TV" into sc-dev
diff --git a/apps/CameraITS/tests/scene1_1/test_ev_compensation_advanced.py b/apps/CameraITS/tests/scene1_1/test_ev_compensation_advanced.py
index e51f4fa..4f589ce 100644
--- a/apps/CameraITS/tests/scene1_1/test_ev_compensation_advanced.py
+++ b/apps/CameraITS/tests/scene1_1/test_ev_compensation_advanced.py
@@ -124,7 +124,10 @@
if cap['metadata']['android.control.aeState'] == LOCKED:
lumas.append(extract_luma_from_capture(cap))
break
- assert cap['metadata']['android.control.aeState'] == LOCKED
+ if caps[THRESH_CONVERGE_FOR_EV-1]['metadata'][
+ 'android.control.aeState'] != LOCKED:
+ raise AssertionError('AE does not reach locked state in '
+ f'{THRESH_CONVERGE_FOR_EV} frames.')
logging.debug('lumas in AE locked captures: %s', str(lumas))
i_mid = len(ev_steps) // 2
@@ -149,8 +152,11 @@
'Max delta between modeled and measured lumas: %.4f', max_diff)
logging.debug(
'Avg delta between modeled and measured lumas: %.4f', avg_diff)
- assert max_diff < LUMA_DELTA_THRESH, 'diff: %.3f, THRESH: %.2f' % (
- max_diff, LUMA_DELTA_THRESH)
+ if max_diff > LUMA_DELTA_THRESH:
+ raise AssertionError(f'Max delta between modeled and measured '
+ f'lumas: {max_diff:.3f}, '
+ f'TOL: {LUMA_DELTA_THRESH}.')
+
if __name__ == '__main__':
test_runner.main()
diff --git a/apps/CameraITS/tests/scene1_1/test_ev_compensation_basic.py b/apps/CameraITS/tests/scene1_1/test_ev_compensation_basic.py
index 5c892c1..379cc11 100644
--- a/apps/CameraITS/tests/scene1_1/test_ev_compensation_basic.py
+++ b/apps/CameraITS/tests/scene1_1/test_ev_compensation_basic.py
@@ -15,6 +15,7 @@
import logging
+import math
import os.path
import matplotlib
from matplotlib import pylab
@@ -69,6 +70,8 @@
props = cam.get_camera_properties()
props = cam.override_with_hidden_physical_camera_props(props)
log_path = self.log_path
+ debug = self.debug_mode
+ test_name_w_path = os.path.join(log_path, NAME)
# check SKIP conditions
camera_properties_utils.skip_unless(
@@ -103,18 +106,24 @@
caps = cam.do_capture([req]*THRESH_CONVERGE_FOR_EV, fmt)
luma_locked = []
for i, cap in enumerate(caps):
+ if debug:
+ img = image_processing_utils.convert_capture_to_rgb_image(
+ cap, props)
+ image_processing_utils.write_image(
+ img, f'{test_name_w_path}_ev{ev}_frame{i}.jpg')
if cap['metadata']['android.control.aeState'] == LOCKED:
luma = extract_luma_from_capture(cap)
luma_locked.append(luma)
if i == THRESH_CONVERGE_FOR_EV-1:
lumas.append(luma)
- msg = 'AE locked lumas: %s, RTOL: %.2f' % (
- str(luma_locked), LUMA_LOCKED_TOL)
- assert np.isclose(min(luma_locked), max(luma_locked),
- rtol=LUMA_LOCKED_TOL), msg
+ if not math.isclose(min(luma_locked), max(luma_locked),
+ rel_tol=LUMA_LOCKED_TOL):
+ raise AssertionError(f'AE locked lumas: {luma_locked}, '
+ f'RTOL: {LUMA_LOCKED_TOL}')
logging.debug('lumas in AE locked captures: %s', str(lumas))
- assert caps[THRESH_CONVERGE_FOR_EV-1]['metadata'][
- 'android.control.aeState'] == LOCKED
+ if caps[THRESH_CONVERGE_FOR_EV-1]['metadata'][
+ 'android.control.aeState'] != LOCKED:
+ raise AssertionError(f'No AE lock by {THRESH_CONVERGE_FOR_EV} frame.')
# Create plot
pylab.figure(NAME)
@@ -122,8 +131,7 @@
pylab.title(NAME)
pylab.xlabel('EV Compensation')
pylab.ylabel('Mean Luma (Normalized)')
- matplotlib.pyplot.savefig(
- '%s_plot_means.png' % os.path.join(log_path, NAME))
+ matplotlib.pyplot.savefig(f'{test_name_w_path}_plot_means.png')
# Trim extra saturated images
while (lumas[-2] >= YUV_SAT_MIN/YUV_FULL_SCALE and
@@ -133,14 +141,18 @@
logging.debug('Removed saturated image.')
# Only allow positive EVs to give saturated image
- e_msg = '>%d unsaturated images needed.' % (NUM_UNSATURATED_EVS-1)
- assert len(lumas) >= NUM_UNSATURATED_EVS, e_msg
+ if len(lumas) < NUM_UNSATURATED_EVS:
+ raise AssertionError(
+ f'>{NUM_UNSATURATED_EVS-1} unsaturated images needed.')
min_luma_diffs = min(np.diff(lumas))
logging.debug('Min of luma value difference between adjacent ev comp: %.3f',
min_luma_diffs)
# Assert unsaturated lumas increasing with increasing ev comp.
- assert min_luma_diffs > 0, 'Luma is not increasing! lumas %s' % str(lumas)
+ if min_luma_diffs <= 0:
+ raise AssertionError('Lumas not increasing with ev comp! '
+ f'EVs: {list(evs)}, lumas: {lumas}')
+
if __name__ == '__main__':
test_runner.main()
diff --git a/apps/CameraITS/tests/scene6/test_zoom.py b/apps/CameraITS/tests/scene6/test_zoom.py
index 777bec6..b899b22 100644
--- a/apps/CameraITS/tests/scene6/test_zoom.py
+++ b/apps/CameraITS/tests/scene6/test_zoom.py
@@ -34,14 +34,72 @@
LINE_THICKNESS = 5
MIN_AREA_RATIO = 0.00015 # based on 2000/(4000x3000) pixels
MIN_CIRCLE_PTS = 25
+MIN_FOCUS_DIST_TOL = 0.80 # allow charts a little closer than min
NAME = os.path.splitext(os.path.basename(__file__))[0]
NUM_STEPS = 10
OFFSET_RTOL = 0.15
RADIUS_RTOL = 0.10
+RADIUS_RTOL_MIN_FD = 0.15
ZOOM_MAX_THRESH = 10.0
ZOOM_MIN_THRESH = 2.0
+def get_test_tols_and_cap_size(cam, props, chart_distance, debug):
+ """Determine the tolerance per camera based on test rig and camera params.
+
+ Cameras are pre-filtered to only include supportable cameras.
+ Supportable cameras are: YUV(RGB)
+
+ Args:
+ cam: camera object
+ props: dict; physical camera properties dictionary
+ chart_distance: float; distance to chart in cm
+ debug: boolean; log additional data
+
+ Returns:
+ dict of TOLs with camera focal length as key
+ largest common size across all cameras
+ """
+ ids = camera_properties_utils.logical_multi_camera_physical_ids(props)
+ physical_props = {}
+ physical_ids = []
+ for i in ids:
+ physical_props[i] = cam.get_camera_properties_by_id(i)
+ # find YUV capable physical cameras
+ if camera_properties_utils.backward_compatible(physical_props[i]):
+ physical_ids.append(i)
+
+ # find physical camera focal lengths that work well with rig
+ chart_distance_m = abs(chart_distance)/100 # convert CM to M
+ test_tols = {}
+ test_yuv_sizes = []
+ for i in physical_ids:
+ min_fd = physical_props[i]['android.lens.info.minimumFocusDistance']
+ focal_l = physical_props[i]['android.lens.info.availableFocalLengths'][0]
+ logging.debug('cam[%s] min_fd: %.3f (diopters), fl: %.2f',
+ i, min_fd, focal_l)
+ yuv_sizes = capture_request_utils.get_available_output_sizes(
+ 'yuv', physical_props[i])
+ test_yuv_sizes.append(yuv_sizes)
+ if debug:
+ logging.debug('cam[%s] yuv sizes: %s', i, str(yuv_sizes))
+
+ # determine if minimum focus distance is less than rig depth
+ if (math.isclose(min_fd, 0.0, rel_tol=1E-6) or # fixed focus
+ 1.0/min_fd < chart_distance_m*MIN_FOCUS_DIST_TOL):
+ test_tols[focal_l] = RADIUS_RTOL
+ else:
+ test_tols[focal_l] = RADIUS_RTOL_MIN_FD
+ logging.debug('loosening RTOL for cam[%s]: '
+ 'min focus distance too large.', i)
+ # find intersection of formats for max common format
+ common_sizes = list(set.intersection(*[set(list) for list in test_yuv_sizes]))
+ if debug:
+ logging.debug('common_fmt: %s', max(common_sizes))
+
+ return test_tols, max(common_sizes)
+
+
def distance(x, y):
return math.sqrt(x**2 + y**2)
@@ -143,9 +201,7 @@
"""
def test_zoom(self):
- z_test_list = []
- fls = []
- circles = []
+ test_data = {}
with its_session_utils.ItsSession(
device_id=self.dut.serial,
camera_id=self.camera_id,
@@ -161,8 +217,6 @@
z_range = props['android.control.zoomRatioRange']
logging.debug('testing zoomRatioRange: %s', str(z_range))
- yuv_size = capture_request_utils.get_largest_yuv_format(props)
- size = [yuv_size['width'], yuv_size['height']]
debug = self.debug_mode
z_min, z_max = float(z_range[0]), float(z_range[1])
@@ -170,19 +224,37 @@
z_list = np.arange(z_min, z_max, float(z_max - z_min) / (NUM_STEPS - 1))
z_list = np.append(z_list, z_max)
+ # set TOLs based on camera and test rig params
+ if camera_properties_utils.logical_multi_camera(props):
+ test_tols, size = get_test_tols_and_cap_size(
+ cam, props, self.chart_distance, debug)
+ else:
+ fl = props['android.lens.info.availableFocalLengths'][0]
+ test_tols = {fl: RADIUS_RTOL}
+ yuv_size = capture_request_utils.get_largest_yuv_format(props)
+ size = [yuv_size['width'], yuv_size['height']]
+ logging.debug('capture size: %s', str(size))
+ logging.debug('test TOLs: %s', str(test_tols))
+
# do captures over zoom range and find circles with cv2
logging.debug('cv2_version: %s', cv2.__version__)
+ cam.do_3a()
req = capture_request_utils.auto_capture_request()
for i, z in enumerate(z_list):
logging.debug('zoom ratio: %.2f', z)
req['android.control.zoomRatio'] = z
- cap = cam.do_capture(req, cam.CAP_YUV)
+ cap = cam.do_capture(
+ req, {'format': 'yuv', 'width': size[0], 'height': size[1]})
img = image_processing_utils.convert_capture_to_rgb_image(
cap, props=props)
img_name = '%s_%s.jpg' % (os.path.join(self.log_path,
NAME), round(z, 2))
image_processing_utils.write_image(img, img_name)
+ # determine radius tolerance of capture
+ cap_fl = cap['metadata']['android.lens.focalLength']
+ radius_tol = test_tols[cap_fl]
+
# convert to [0, 255] images with unsigned integer
img *= 255
img = img.astype(np.uint8)
@@ -195,49 +267,52 @@
if circle_cropped(circle, size):
logging.debug('zoom %.2f is too large! Skip further captures', z)
break
- circles.append(circle)
- z_test_list.append(z)
- fls.append(cap['metadata']['android.lens.focalLength'])
+ test_data[i] = {'z': z, 'circle': circle, 'r_tol': radius_tol,
+ 'fl': cap_fl}
# assert some range is tested before circles get too big
zoom_max_thresh = ZOOM_MAX_THRESH
if z_max < ZOOM_MAX_THRESH:
zoom_max_thresh = z_max
- if z_test_list[-1] < zoom_max_thresh:
- raise AssertionError(f'Max zoom level tested: {z_test_list[-1]}, '
+ test_data_max_z = test_data[max(test_data.keys())]['z']
+ logging.debug('zoom data max: %.2f', test_data_max_z)
+ if test_data_max_z < zoom_max_thresh:
+ raise AssertionError(f'Max zoom ratio tested: {test_data_max_z:.4f}, '
+ f'range advertised min: {z_min}, max: {z_max} '
f'THRESH: {zoom_max_thresh}')
# initialize relative size w/ zoom[0] for diff zoom ratio checks
- radius_0 = float(circles[0][2])
- z_0 = float(z_test_list[0])
+ radius_0 = float(test_data[0]['circle'][2])
+ z_0 = float(test_data[0]['z'])
- for i, z in enumerate(z_test_list):
- logging.debug('Zoom: %.2f, fl: %.2f', z, fls[i])
- offset_abs = [(circles[i][0] - size[0] // 2),
- (circles[i][1] - size[1] // 2)]
- logging.debug('Circle r: %.1f, center offset x, y: %d, %d', circles[i][2],
- offset_abs[0], offset_abs[1])
- z_ratio = z / z_0
+ for i, data in test_data.items():
+ logging.debug('Zoom: %.2f, fl: %.2f', data['z'], data['fl'])
+ offset_abs = [(data['circle'][0] - size[0] // 2),
+ (data['circle'][1] - size[1] // 2)]
+ logging.debug('Circle r: %.1f, center offset x, y: %d, %d',
+ data['circle'][2], offset_abs[0], offset_abs[1])
+ z_ratio = data['z'] / z_0
# check relative size against zoom[0]
- radius_ratio = circles[i][2] / radius_0
+ radius_ratio = data['circle'][2] / radius_0
logging.debug('r ratio req: %.3f, measured: %.3f', z_ratio, radius_ratio)
- if not np.isclose(z_ratio, radius_ratio, rtol=RADIUS_RTOL):
+ if not math.isclose(z_ratio, radius_ratio, rel_tol=data['r_tol']):
raise AssertionError(f'zoom: {z_ratio:.2f}, radius ratio: '
- f'{radius_ratio:.2f}, RTOL: {RADIUS_RTOL}')
+ f"{radius_ratio:.2f}, RTOL: {data['r_tol']}")
# check relative offset against init vals w/ no focal length change
- if i == 0 or fls[i - 1] != fls[i]: # set init values
- z_init = float(z_test_list[i])
- offset_init = [circles[i][0] - size[0]//2, circles[i][1] - size[1]//2]
+ if i == 0 or test_data[i-1]['fl'] != data['fl']: # set init values
+ z_init = float(data['z'])
+ offset_init = [data['circle'][0] - size[0]//2,
+ data['circle'][1] - size[1]//2]
else: # check
- z_ratio = z / z_init
+ z_ratio = data['z'] / z_init
offset_rel = (distance(offset_abs[0], offset_abs[1]) / z_ratio /
distance(offset_init[0], offset_init[1]))
logging.debug('offset_rel: %.3f', offset_rel)
- if not np.isclose(offset_rel, 1.0, rtol=OFFSET_RTOL):
- raise AssertionError(f'zoom: {z:.2f}, offset(rel): {offset_rel:.4f}, '
- f'RTOL: {OFFSET_RTOL}')
+ if not math.isclose(offset_rel, 1.0, rel_tol=OFFSET_RTOL):
+ raise AssertionError(f"zoom: {data['z']:.2f}, offset(rel): "
+ f'{offset_rel:.4f}, RTOL: {OFFSET_RTOL}')
if __name__ == '__main__':
test_runner.main()
diff --git a/apps/CtsVerifier/AndroidManifest.xml b/apps/CtsVerifier/AndroidManifest.xml
index 1931efe..9855e6d 100644
--- a/apps/CtsVerifier/AndroidManifest.xml
+++ b/apps/CtsVerifier/AndroidManifest.xml
@@ -2830,7 +2830,6 @@
android:value="multi_display_mode" />
</activity>
-<!-- Temporary disabled b/c of incorrect assumptions in part of the test: b/160938927
<activity android:name=".usb.device.UsbDeviceTestActivity"
android:label="@string/usb_device_test"
android:exported="true"
@@ -2847,7 +2846,6 @@
<meta-data android:name="display_mode"
android:value="multi_display_mode" />
</activity>
- -->
<activity android:name=".usb.mtp.MtpHostTestActivity" android:label="@string/mtp_host_test"
android:exported="true">
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/notifications/BubblesVerifierActivity.java b/apps/CtsVerifier/src/com/android/cts/verifier/notifications/BubblesVerifierActivity.java
index 5701c90..f249642 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/notifications/BubblesVerifierActivity.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/notifications/BubblesVerifierActivity.java
@@ -178,7 +178,8 @@
mTests.add(new CheckOverflowExists());
mTests.add(new DismissBubbleShowsInOverflow());
mTests.add(new PromoteBubbleFromOverflow());
- mTests.add(new CancelRemovesBubblesInOverflow());
+ // (b/193560795) Enable this in next api bump.
+ //mTests.add(new CancelRemovesBubblesInOverflow());
mTests.add(new TapNotifWithOverflowBubble());
//
// Expanded view appearance
@@ -186,7 +187,7 @@
mTests.add(new PortraitAndLandscape());
mTests.add(new ScrimBehindExpandedView());
mTests.add(new ImeInsetsExpandedView());
- // (b/190560927) Enable this in scv2.
+ // (b/190560927) Enable this in next api bump.
//mTests.add(new MinHeightExpandedView());
mTests.add(new MaxHeightExpandedView());
}
diff --git a/hostsidetests/appsecurity/Android.bp b/hostsidetests/appsecurity/Android.bp
index b25edb2..af53c8e 100644
--- a/hostsidetests/appsecurity/Android.bp
+++ b/hostsidetests/appsecurity/Android.bp
@@ -58,6 +58,11 @@
"CtsCorruptApkTests_Compressed_R",
"CtsCorruptApkTests_Unaligned_Q",
"CtsCorruptApkTests_Unaligned_R",
+ "CtsSignatureQueryService",
+ "CtsSignatureQueryService_v2",
+ "CtsSignatureQueryService_v3",
+ "CtsSignatureQueryServiceTest",
+ "CtsSignatureQueryServiceTest_v2",
],
// Prebuilts of all ABIs.
diff --git a/hostsidetests/appsecurity/src/android/appsecurity/cts/AppSecurityTests.java b/hostsidetests/appsecurity/src/android/appsecurity/cts/AppSecurityTests.java
index 92f4de5..98150c4 100644
--- a/hostsidetests/appsecurity/src/android/appsecurity/cts/AppSecurityTests.java
+++ b/hostsidetests/appsecurity/src/android/appsecurity/cts/AppSecurityTests.java
@@ -24,7 +24,7 @@
import android.platform.test.annotations.AppModeFull;
import android.platform.test.annotations.AppModeInstant;
import android.platform.test.annotations.RestrictedBuildTest;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import com.android.ddmlib.Log;
import com.android.tradefed.device.DeviceNotAvailableException;
@@ -234,7 +234,7 @@
*/
@Test
@AppModeFull(reason = "Only the platform can define permissions obtainable by instant applications")
- @SecurityTest
+ @AsbSecurityTest(cveBugId = 111934948)
public void testPermissionDiffCert() throws Exception {
Log.i(LOG_TAG, "installing app that attempts to use permission of another app");
try {
@@ -265,7 +265,7 @@
*/
@Test
@AppModeFull(reason = "Only full apps can hold INSTALL_PACKAGES")
- @SecurityTest
+ @AsbSecurityTest(cveBugId = 150857253)
public void testCrossPackageDiffCertSetInstaller() throws Exception {
Log.i(LOG_TAG, "installing app that attempts to use permission of another app");
try {
diff --git a/hostsidetests/appsecurity/src/android/appsecurity/cts/DeviceIdentifierTest.java b/hostsidetests/appsecurity/src/android/appsecurity/cts/DeviceIdentifierTest.java
index a27c2a5..b7d6bd5 100644
--- a/hostsidetests/appsecurity/src/android/appsecurity/cts/DeviceIdentifierTest.java
+++ b/hostsidetests/appsecurity/src/android/appsecurity/cts/DeviceIdentifierTest.java
@@ -16,7 +16,7 @@
package android.appsecurity.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import com.android.compatibility.common.tradefed.build.CompatibilityBuildHelper;
import com.android.tradefed.build.IBuildInfo;
import com.android.tradefed.device.DeviceNotAvailableException;
@@ -58,7 +58,7 @@
getDevice().uninstallPackage(DEVICE_IDENTIFIER_PKG);
}
- @SecurityTest(minPatchLevel = "2021-04")
+ @AsbSecurityTest(cveBugId = 173421434)
public void testDeviceIdentifierAccessWithAppOpGranted() throws Exception {
setDeviceIdentifierAccessAppOp(DEVICE_IDENTIFIER_PKG, true);
Utils.runDeviceTestsAsCurrentUser(getDevice(), DEVICE_IDENTIFIER_PKG,
diff --git a/hostsidetests/appsecurity/src/android/appsecurity/cts/DocumentsTest.java b/hostsidetests/appsecurity/src/android/appsecurity/cts/DocumentsTest.java
index b26416a..62e2180 100644
--- a/hostsidetests/appsecurity/src/android/appsecurity/cts/DocumentsTest.java
+++ b/hostsidetests/appsecurity/src/android/appsecurity/cts/DocumentsTest.java
@@ -16,7 +16,7 @@
package android.appsecurity.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import com.android.compatibility.common.tradefed.build.CompatibilityBuildHelper;
import com.android.compatibility.common.util.ApiLevelUtil;
@@ -152,7 +152,7 @@
}
}
- @SecurityTest
+ @AsbSecurityTest(cveBugId = 157474195)
public void testAfterMoveDocumentInStorage_revokeUriPermission() throws Exception {
if (isAtLeastS()) {
runDeviceTests(CLIENT_PKG, ".DocumentsClientTest",
diff --git a/hostsidetests/appsecurity/src/android/appsecurity/cts/EphemeralTest.java b/hostsidetests/appsecurity/src/android/appsecurity/cts/EphemeralTest.java
index 397a7fc..7d8333d 100644
--- a/hostsidetests/appsecurity/src/android/appsecurity/cts/EphemeralTest.java
+++ b/hostsidetests/appsecurity/src/android/appsecurity/cts/EphemeralTest.java
@@ -21,7 +21,7 @@
import static org.junit.Assume.assumeFalse;
import android.platform.test.annotations.AppModeFull;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import com.android.tradefed.log.LogUtil.CLog;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -380,7 +380,7 @@
}
@Test
- @SecurityTest(minPatchLevel = "2020-11")
+ @AsbSecurityTest(cveBugId = 140256621)
public void testInstallPermissionNotGrantedInPackageInfo() throws Exception {
if (mIsUnsupportedDevice) {
return;
@@ -390,7 +390,7 @@
}
@Test
- @SecurityTest(minPatchLevel = "2020-11")
+ @AsbSecurityTest(cveBugId = 140256621)
public void testInstallPermissionGrantedInPackageInfo() throws Exception {
if (mIsUnsupportedDevice) {
return;
diff --git a/hostsidetests/appsecurity/src/android/appsecurity/cts/LocationPolicyTest.java b/hostsidetests/appsecurity/src/android/appsecurity/cts/LocationPolicyTest.java
index e2ff6c6..bb34ce9 100644
--- a/hostsidetests/appsecurity/src/android/appsecurity/cts/LocationPolicyTest.java
+++ b/hostsidetests/appsecurity/src/android/appsecurity/cts/LocationPolicyTest.java
@@ -17,7 +17,7 @@
package android.appsecurity.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
import org.junit.After;
import org.junit.Before;
@@ -42,7 +42,7 @@
}
@Test
- @SecurityTest
+ @AsbSecurityTest(cveBugId = 148414207)
public void testLocationPolicyPermissions() throws Exception {
new InstallMultiple(true).addFile(TEST_APK).run();
Utils.runDeviceTests(
diff --git a/hostsidetests/appsecurity/src/android/appsecurity/cts/PermissionEscalationTest.java b/hostsidetests/appsecurity/src/android/appsecurity/cts/PermissionEscalationTest.java
index e0fe368..8ed9d64 100644
--- a/hostsidetests/appsecurity/src/android/appsecurity/cts/PermissionEscalationTest.java
+++ b/hostsidetests/appsecurity/src/android/appsecurity/cts/PermissionEscalationTest.java
@@ -16,7 +16,7 @@
package android.appsecurity.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import com.android.compatibility.common.tradefed.build.CompatibilityBuildHelper;
import com.android.tradefed.build.IBuildInfo;
import com.android.tradefed.device.DeviceNotAvailableException;
@@ -65,7 +65,7 @@
"testCannotEscalateNonRuntimePermissionsToRuntime");
}
- @SecurityTest
+ @AsbSecurityTest(cveBugId = {154505240, 168319670})
public void testNoPermissionEscalationAfterReboot() throws Exception {
assertNull(getDevice().installPackage(mBuildHelper.getTestFile(
APK_DECLARE_NON_RUNTIME_PERMISSIONS), false, false));
diff --git a/hostsidetests/appsecurity/src/android/appsecurity/cts/PkgInstallSignatureVerificationTest.java b/hostsidetests/appsecurity/src/android/appsecurity/cts/PkgInstallSignatureVerificationTest.java
index c1c2f5c..9172bf0 100644
--- a/hostsidetests/appsecurity/src/android/appsecurity/cts/PkgInstallSignatureVerificationTest.java
+++ b/hostsidetests/appsecurity/src/android/appsecurity/cts/PkgInstallSignatureVerificationTest.java
@@ -16,7 +16,7 @@
package android.appsecurity.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import com.android.compatibility.common.tradefed.build.CompatibilityBuildHelper;
import com.android.tradefed.build.IBuildInfo;
@@ -515,7 +515,7 @@
assertInstallFailsWithError("v2-only-empty.apk", "Unknown failure");
}
- @SecurityTest
+ @AsbSecurityTest(cveBugId = 64211847)
public void testInstallApkWhichDoesNotStartWithZipLocalFileHeaderMagic() throws Exception {
// The APKs below are competely fine except they don't start with ZIP Local File Header
// magic. Thus, these APKs will install just fine unless Package Manager requires that APKs
diff --git a/hostsidetests/appsecurity/src/android/appsecurity/cts/RoleSecurityTest.java b/hostsidetests/appsecurity/src/android/appsecurity/cts/RoleSecurityTest.java
index 838efa4..0c86e107 100644
--- a/hostsidetests/appsecurity/src/android/appsecurity/cts/RoleSecurityTest.java
+++ b/hostsidetests/appsecurity/src/android/appsecurity/cts/RoleSecurityTest.java
@@ -17,7 +17,7 @@
package android.appsecurity.cts;
import android.platform.test.annotations.AppModeFull;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import com.android.compatibility.common.tradefed.build.CompatibilityBuildHelper;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -43,7 +43,7 @@
@Test
@AppModeFull(reason = "Instant apps cannot access role manager")
- @SecurityTest(minPatchLevel = "unknown")
+ @AsbSecurityTest(cveBugId = 177927831)
public void cannotGetSmsRoleHolderForAnotherUser() throws Exception {
final int[] userIds = Utils.prepareMultipleUsers(getDevice(), 2);
assumeTrue(userIds.length == 2);
diff --git a/hostsidetests/appsecurity/test-apps/DeviceIdentifiers/src/android/appsecurity/cts/deviceids/DeviceIdentifierAppOpTest.java b/hostsidetests/appsecurity/test-apps/DeviceIdentifiers/src/android/appsecurity/cts/deviceids/DeviceIdentifierAppOpTest.java
index 753bc2b..e775b59 100644
--- a/hostsidetests/appsecurity/test-apps/DeviceIdentifiers/src/android/appsecurity/cts/deviceids/DeviceIdentifierAppOpTest.java
+++ b/hostsidetests/appsecurity/test-apps/DeviceIdentifiers/src/android/appsecurity/cts/deviceids/DeviceIdentifierAppOpTest.java
@@ -22,7 +22,7 @@
import android.content.Context;
import android.content.pm.PackageManager;
import android.os.Build;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.telephony.SubscriptionInfo;
import android.telephony.SubscriptionManager;
import android.telephony.TelephonyManager;
@@ -46,7 +46,7 @@
+ "granted when invoking %s.";
@Test
- @SecurityTest(minPatchLevel = "2021-04")
+ @AsbSecurityTest(cveBugId = 173421434)
public void testAccessToDeviceIdentifiersWithAppOp() throws Exception {
Context context = InstrumentationRegistry.getContext();
TelephonyManager telephonyManager =
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 30a5767..04603b3 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
@@ -72,7 +72,7 @@
import androidx.test.InstrumentationRegistry;
import androidx.test.runner.AndroidJUnit4;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import com.android.cts.util.TestResult;
@@ -1174,13 +1174,13 @@
}
@Test
- @SecurityTest(minPatchLevel = "2020-11")
+ @AsbSecurityTest(cveBugId = 140256621)
public void testInstallPermissionNotGrantedInPackageInfo() throws Exception {
assertThat(isPermissionGrantedInPackageInfo(Manifest.permission.SET_ALARM), is(false));
}
@Test
- @SecurityTest(minPatchLevel = "2020-11")
+ @AsbSecurityTest(cveBugId = 140256621)
public void testInstallPermissionGrantedInPackageInfo() throws Exception {
assertThat(isPermissionGrantedInPackageInfo(Manifest.permission.INTERNET), is(true));
}
diff --git a/hostsidetests/appsecurity/test-apps/KeyRotationTest/Android.bp b/hostsidetests/appsecurity/test-apps/KeyRotationTest/Android.bp
index 3b7100d..000d13c 100644
--- a/hostsidetests/appsecurity/test-apps/KeyRotationTest/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/KeyRotationTest/Android.bp
@@ -31,6 +31,7 @@
android_test {
name: "CtsSignatureQueryService",
defaults: ["cts_support_defaults"],
+ compile_multilib: "both",
sdk_version: "current",
static_libs: ["cts_signature_query_service"],
certificate: ":cts-ec-p256",
@@ -48,6 +49,7 @@
name: "CtsSignatureQueryService_v2",
defaults: ["cts_support_defaults"],
manifest: "AndroidManifest_v2.xml",
+ compile_multilib: "both",
sdk_version: "current",
static_libs: ["cts_signature_query_service"],
certificate: ":cts-ec-p256_2",
@@ -67,6 +69,7 @@
name: "CtsSignatureQueryService_v3",
defaults: ["cts_support_defaults"],
manifest: "AndroidManifest_v3.xml",
+ compile_multilib: "both",
sdk_version: "current",
static_libs: ["cts_signature_query_service"],
certificate: ":cts-ec-p256_2",
diff --git a/hostsidetests/appsecurity/test-apps/KeyRotationTest/Android.mk b/hostsidetests/appsecurity/test-apps/KeyRotationTest/Android.mk
new file mode 100644
index 0000000..930dd06
--- /dev/null
+++ b/hostsidetests/appsecurity/test-apps/KeyRotationTest/Android.mk
@@ -0,0 +1,18 @@
+# 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.
+
+LOCAL_PATH := $(call my-dir)
+
+# Build the test APKs using their own makefiles
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/hostsidetests/appsecurity/test-apps/KeyRotationTest/ServiceTest/Android.bp b/hostsidetests/appsecurity/test-apps/KeyRotationTest/ServiceTest/Android.bp
index f0ba6a9..f52e817 100644
--- a/hostsidetests/appsecurity/test-apps/KeyRotationTest/ServiceTest/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/KeyRotationTest/ServiceTest/Android.bp
@@ -25,7 +25,7 @@
android_test {
name: "CtsSignatureQueryServiceTest",
defaults: ["cts_support_defaults"],
-
+ compile_multilib: "both",
sdk_version: "current",
srcs: ["src/**/*.java"],
static_libs: [
@@ -55,7 +55,7 @@
android_test {
name: "CtsSignatureQueryServiceTest_v2",
defaults: ["cts_support_defaults"],
-
+ compile_multilib: "both",
sdk_version: "current",
srcs: ["src/**/*.java"],
static_libs: [
diff --git a/hostsidetests/appsecurity/test-apps/LocationPolicyApp/src/android/appsecurity/cts/locationpolicy/LocationPolicyTest.java b/hostsidetests/appsecurity/test-apps/LocationPolicyApp/src/android/appsecurity/cts/locationpolicy/LocationPolicyTest.java
index 51fa279..4087afa 100644
--- a/hostsidetests/appsecurity/test-apps/LocationPolicyApp/src/android/appsecurity/cts/locationpolicy/LocationPolicyTest.java
+++ b/hostsidetests/appsecurity/test-apps/LocationPolicyApp/src/android/appsecurity/cts/locationpolicy/LocationPolicyTest.java
@@ -24,7 +24,7 @@
import android.content.Context;
import android.content.pm.PackageManager;
import android.os.UserManager;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.telephony.TelephonyManager;
import androidx.test.InstrumentationRegistry;
import androidx.test.runner.AndroidJUnit4;
@@ -37,7 +37,7 @@
private final Context mContext = InstrumentationRegistry.getInstrumentation().getContext();
@Test
- @SecurityTest
+ @AsbSecurityTest(cveBugId = 148414207)
public void testLocationPolicyPermissions() throws Exception {
assertNotNull(mContext);
PackageManager pm = mContext.getPackageManager();
diff --git a/hostsidetests/appsecurity/test-apps/RoleSecurityTestApp/Android.bp b/hostsidetests/appsecurity/test-apps/RoleSecurityTestApp/Android.bp
index 400615a..5af5618 100644
--- a/hostsidetests/appsecurity/test-apps/RoleSecurityTestApp/Android.bp
+++ b/hostsidetests/appsecurity/test-apps/RoleSecurityTestApp/Android.bp
@@ -30,6 +30,7 @@
"androidx.test.core",
"androidx.test.rules",
"ctstestrunner-axt",
+ "compatibility-device-util-axt",
],
platform_apis: true,
min_sdk_version: "29",
diff --git a/hostsidetests/appsecurity/test-apps/RoleSecurityTestApp/src/com/android/cts/rolesecuritytest/DeviceTest.java b/hostsidetests/appsecurity/test-apps/RoleSecurityTestApp/src/com/android/cts/rolesecuritytest/DeviceTest.java
index 3788269..25db045 100644
--- a/hostsidetests/appsecurity/test-apps/RoleSecurityTestApp/src/com/android/cts/rolesecuritytest/DeviceTest.java
+++ b/hostsidetests/appsecurity/test-apps/RoleSecurityTestApp/src/com/android/cts/rolesecuritytest/DeviceTest.java
@@ -18,25 +18,42 @@
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assume.*;
+import android.app.Instrumentation;
import android.app.role.RoleManager;
import android.content.Context;
import android.os.Build;
import android.os.UserHandle;
import androidx.test.core.app.ApplicationProvider;
+import androidx.test.InstrumentationRegistry;
import androidx.test.runner.AndroidJUnit4;
+import com.android.compatibility.common.util.mainline.MainlineModule;
+import com.android.compatibility.common.util.mainline.ModuleDetector;
+
import java.lang.reflect.Field;
import java.lang.reflect.Method;
+import org.junit.Before;
import org.junit.runner.RunWith;
import org.junit.Test;
@RunWith(AndroidJUnit4.class)
public class DeviceTest {
+ private Instrumentation mInstrumentation;
+
+ @Before
+ public void setup() {
+ mInstrumentation = InstrumentationRegistry.getInstrumentation();
+ }
+
@Test
public void cannotGetSmsRoleHolderForAnotherUser() throws Exception {
+ assumeFalse(ModuleDetector
+ .moduleIsPlayManaged(getInstrumentation().getContext().getPackageManager(),
+ MainlineModule.PERMISSION_CONTROLLER));
assertNotEquals("This test should be run in a secondary user", UserHandle.USER_SYSTEM,
UserHandle.myUserId());
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) {
@@ -60,4 +77,8 @@
}
assertFalse("Exploit succeeded", exploitSuccessful);
}
+
+ private Instrumentation getInstrumentation() {
+ return mInstrumentation;
+ }
}
diff --git a/hostsidetests/content/src/android/content/cts/InvalidSyncAuthoritiesHostTest.java b/hostsidetests/content/src/android/content/cts/InvalidSyncAuthoritiesHostTest.java
index ebffbe6..6c9684c 100644
--- a/hostsidetests/content/src/android/content/cts/InvalidSyncAuthoritiesHostTest.java
+++ b/hostsidetests/content/src/android/content/cts/InvalidSyncAuthoritiesHostTest.java
@@ -17,7 +17,7 @@
package android.content.cts;
import android.appsecurity.cts.Utils;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import com.android.compatibility.common.tradefed.build.CompatibilityBuildHelper;
import com.android.tradefed.build.IBuildInfo;
@@ -31,7 +31,6 @@
* Otherwise a malicious app can effectively DOS the filesystem and the user can only get out of it
* via a factory reset.
*/
-@SecurityTest
public class InvalidSyncAuthoritiesHostTest extends DeviceTestCase implements IBuildReceiver {
private static final String DEVICE_TEST_PACKAGE = "android.content.sync.cts";
@@ -66,6 +65,7 @@
getDevice().uninstallPackage(DEVICE_TEST_PACKAGE);
}
+ @AsbSecurityTest(cveBugId = 35028827)
public void testInvalidEntriesClearedOnBoot() throws Exception {
runDeviceTests(DEVICE_TEST_PACKAGE, DEVICE_TEST_CLASS, "populateAndTestSyncAutomaticallyBeforeReboot");
getDevice().reboot();
diff --git a/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/DeviceIdentifiersTest.java b/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/DeviceIdentifiersTest.java
index a5a0cc6..e9a3cb3 100644
--- a/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/DeviceIdentifiersTest.java
+++ b/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/DeviceIdentifiersTest.java
@@ -15,7 +15,7 @@
*/
package com.android.cts.deviceowner;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.content.Context;
import android.content.pm.PackageManager;
import android.os.Build;
@@ -34,7 +34,7 @@
"An unexpected value was received by the device owner with the READ_PHONE_STATE "
+ "permission when invoking %s";
- @SecurityTest(minPatchLevel = "2021-04")
+ @AsbSecurityTest(cveBugId = 173421434)
public void testDeviceOwnerCanGetDeviceIdentifiersWithPermission() {
// The device owner with the READ_PHONE_STATE permission should have access to all device
// identifiers. However since the TelephonyManager methods can return null this method
diff --git a/hostsidetests/devicepolicy/app/SeparateProfileChallenge/src/com/android/cts/separateprofilechallenge/SeparateProfileChallengePermissionsTest.java b/hostsidetests/devicepolicy/app/SeparateProfileChallenge/src/com/android/cts/separateprofilechallenge/SeparateProfileChallengePermissionsTest.java
index 1b0378b..e1ce7d6 100644
--- a/hostsidetests/devicepolicy/app/SeparateProfileChallenge/src/com/android/cts/separateprofilechallenge/SeparateProfileChallengePermissionsTest.java
+++ b/hostsidetests/devicepolicy/app/SeparateProfileChallenge/src/com/android/cts/separateprofilechallenge/SeparateProfileChallengePermissionsTest.java
@@ -18,7 +18,7 @@
import android.app.admin.DevicePolicyManager;
import android.content.Context;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.test.AndroidTestCase;
import androidx.test.runner.AndroidJUnitRunner;
diff --git a/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/DeviceOwnerTest.java b/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/DeviceOwnerTest.java
index b2e3bd8..fb4b6ff 100644
--- a/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/DeviceOwnerTest.java
+++ b/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/DeviceOwnerTest.java
@@ -27,7 +27,7 @@
import android.platform.test.annotations.FlakyTest;
import android.platform.test.annotations.LargeTest;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.stats.devicepolicy.EventId;
import com.android.compatibility.common.tradefed.build.CompatibilityBuildHelper;
@@ -634,7 +634,7 @@
}
@Test
- @SecurityTest(minPatchLevel = "2021-04")
+ @AsbSecurityTest(cveBugId = 173421434)
public void testDeviceOwnerCanGetDeviceIdentifiers() throws Exception {
// The Device Owner should have access to all device identifiers.
diff --git a/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/SeparateProfileChallengeTest.java b/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/SeparateProfileChallengeTest.java
index ac20ace..18e8ed9 100644
--- a/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/SeparateProfileChallengeTest.java
+++ b/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/SeparateProfileChallengeTest.java
@@ -18,7 +18,7 @@
import static com.android.cts.devicepolicy.DeviceAdminFeaturesCheckerRule.FEATURE_MANAGED_USERS;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import com.android.cts.devicepolicy.DeviceAdminFeaturesCheckerRule.RequiresAdditionalFeatures;
@@ -52,8 +52,8 @@
super.tearDown();
}
- @SecurityTest
@Test
+ @AsbSecurityTest(cveBugId = 128599668)
public void testSeparateProfileChallengePermissions() throws Exception {
assumeCanCreateOneManagedUser();
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2021-29368/Android.bp b/hostsidetests/securitybulletin/securityPatch/CVE-2021-29368/Android.bp
new file mode 100644
index 0000000..7b410b7
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2021-29368/Android.bp
@@ -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.
+ *
+ */
+
+cc_test {
+ name: "CVE-2021-29368",
+ defaults: ["cts_hostsidetests_securitybulletin_defaults"],
+ srcs: ["poc.cpp",],
+}
diff --git a/hostsidetests/securitybulletin/securityPatch/CVE-2021-29368/poc.cpp b/hostsidetests/securitybulletin/securityPatch/CVE-2021-29368/poc.cpp
new file mode 100644
index 0000000..1b3528c
--- /dev/null
+++ b/hostsidetests/securitybulletin/securityPatch/CVE-2021-29368/poc.cpp
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ */
+
+#if !defined _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+
+#include <err.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/mman.h>
+#include <sys/uio.h>
+#include <sys/wait.h>
+#include <unistd.h>
+
+#include "../includes/common.h"
+
+#define SYSCHK(x) \
+ ({ \
+ typeof(x) __res = (x); \
+ if (__res == (typeof(x)) - 1) err(1, "SYSCHK(" #x ")"); \
+ __res; \
+ })
+
+static char *data;
+
+static int child_fn(void) {
+ int pipe_fds[2];
+ SYSCHK(pipe(pipe_fds));
+ struct iovec iov = {.iov_base = data, .iov_len = 0x1000};
+ SYSCHK(vmsplice(pipe_fds[1], &iov, 1, 0));
+ SYSCHK(munmap(data, 0x1000));
+ sleep(2);
+ char buf[0x1000];
+ SYSCHK(read(pipe_fds[0], buf, 0x1000));
+ printf("read string from child: %s\n", buf);
+
+ // check if buf has been altered by parent process
+ if (strcmp("BORING DATA", buf) == 0) {
+ return EXIT_SUCCESS;
+ }
+ if (strcmp("THIS IS SECRET", buf) == 0) {
+ return EXIT_VULNERABLE;
+ }
+ return EXIT_FAILURE;
+}
+
+int main(void) {
+ if (posix_memalign((void **)&data, 0x1000, 0x1000)) errx(1, "posix_memalign()");
+ strcpy(data, "BORING DATA");
+
+ pid_t child = SYSCHK(fork());
+ if (child == 0) {
+ exit(child_fn());
+ }
+
+ sleep(1);
+ strcpy(data, "THIS IS SECRET");
+
+ int status;
+ SYSCHK(waitpid(child, &status, 0));
+ printf("child WEXITSTATUS(status) => %d\n", WEXITSTATUS(status));
+ return WEXITSTATUS(status);
+}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/Bug_187957589.java b/hostsidetests/securitybulletin/src/android/security/cts/Bug_187957589.java
index 6957ff9..84ae114 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/Bug_187957589.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/Bug_187957589.java
@@ -17,7 +17,7 @@
package android.security.cts;
import static org.junit.Assume.assumeFalse;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -28,8 +28,8 @@
* b/187957589
* Vulnerability Behaviour: out of bounds write in noteAtomLogged for negative atom ids.
*/
- @SecurityTest(minPatchLevel = "unknown")
@Test
+ @AsbSecurityTest(cveBugId = 187957589)
public void testPocBug_187957589() throws Exception {
assumeFalse(moduleIsPlayManaged("com.google.android.os.statsd"));
AdbUtils.runPoc("Bug-187957589", getDevice());
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2016_2182.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2016_2182.java
index e6e1015..4ee8a5e 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2016_2182.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2016_2182.java
@@ -15,7 +15,7 @@
*/
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -29,8 +29,8 @@
* b/32096880
* Vulnerability Behaviour: SIGSEGV in self
*/
- @SecurityTest(minPatchLevel = "2017-03")
@Test
+ @AsbSecurityTest(cveBugId = 32096880)
public void testPocCVE_2016_2182() throws Exception {
assumeFalse(moduleIsPlayManaged("com.google.android.conscrypt"));
String binaryName = "CVE-2016-2182";
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2016_8332.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2016_8332.java
index 9d032cd..462864b 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2016_8332.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2016_8332.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -28,8 +28,8 @@
* b/37761553
* Vulnerability Behaviour: SIGSEGV in self
*/
- @SecurityTest(minPatchLevel = "2017-06")
@Test
+ @AsbSecurityTest(cveBugId = 37761553)
public void testPocCVE_2016_8332() throws Exception {
AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2016-8332", null, 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
index 4dd4b39..0267551 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2017_0684.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2017_0684.java
@@ -15,7 +15,7 @@
*/
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -27,8 +27,8 @@
* b/35421151
* Vulnerability Behaviour: SIGSEGV in media.codec
*/
- @SecurityTest(minPatchLevel = "2017-07")
@Test
+ @AsbSecurityTest(cveBugId = 35421151)
public void testPocCVE_2017_0684() throws Exception {
pocPusher.only32();
String errPattern[] = {"media\\.codec", "omx@\\d+?\\.\\d+?-service"};
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2017_0726.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2017_0726.java
index 5a17589..4f08b71 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2017_0726.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2017_0726.java
@@ -15,7 +15,7 @@
*/
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -27,8 +27,8 @@
* b/36389123
* Vulnerability Behaviour: EXIT_VULNERABLE (113)
*/
- @SecurityTest(minPatchLevel = "2017-08")
@Test
+ @AsbSecurityTest(cveBugId = 36389123)
public void testPocCVE_2017_0726() throws Exception {
pocPusher.only64();
String inputFiles[] = {"cve_2017_0726.mp4"};
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2017_13194.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2017_13194.java
index ab83ce3..62c72f2 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2017_13194.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2017_13194.java
@@ -15,7 +15,7 @@
*/
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -30,8 +30,8 @@
* b/64710201
* Vulnerability Behaviour: SIGSEGV in media.codec
*/
- @SecurityTest(minPatchLevel = "2018-01")
@Test
+ @AsbSecurityTest(cveBugId = 64710201)
public void testPocCVE_2017_13194() throws Exception {
assumeFalse(moduleIsPlayManaged("com.google.android.media.swcodec"));
pocPusher.only64();
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2018_9558.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2018_9558.java
index 6f1c03f..31da488 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2018_9558.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2018_9558.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import com.android.compatibility.common.util.CrashUtils;
import com.android.tradefed.device.ITestDevice;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -30,8 +30,8 @@
* b/112161557
* Vulnerability Behaviour: SIGABRT in self
*/
- @SecurityTest(minPatchLevel = "2018-12")
@Test
+ @AsbSecurityTest(cveBugId = 112161557)
public void testPocCVE_2018_9558() throws Exception {
AdbUtils.assumeHasNfc(getDevice());
pocPusher.only64();
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2018_9561.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2018_9561.java
index ad88bb7..ceeb117 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2018_9561.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2018_9561.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -28,8 +28,8 @@
* b/111660010
* Vulnerability Behaviour: SIGSEGV in self
*/
- @SecurityTest(minPatchLevel = "2019-03")
@Test
+ @AsbSecurityTest(cveBugId = 111660010)
public void testPocCVE_2018_9561() throws Exception {
pocPusher.only64();
AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2018-9561", null, getDevice());
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2018_9563.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2018_9563.java
index 8f8b53d..09d391e 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2018_9563.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2018_9563.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -28,8 +28,8 @@
* b/114237888
* Vulnerability Behaviour: SIGSEGV in self
*/
- @SecurityTest(minPatchLevel = "2019-03")
@Test
+ @AsbSecurityTest(cveBugId = 114237888)
public void testPocCVE_2018_9563() throws Exception {
pocPusher.only64();
AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2018-9563", null, getDevice());
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2018_9584.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2018_9584.java
index 5d68ce6..ab18f52 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2018_9584.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2018_9584.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import com.android.tradefed.device.ITestDevice;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
import org.junit.Test;
@@ -29,8 +29,8 @@
* b/114047681
* Vulnerability Behaviour: SIGSEGV in self
*/
- @SecurityTest(minPatchLevel = "2019-01")
@Test
+ @AsbSecurityTest(cveBugId = 114047681)
public void testPocCVE_2018_9584() throws Exception {
AdbUtils.assumeHasNfc(getDevice());
pocPusher.only64();
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2018_9585.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2018_9585.java
index f5d19e4..4f3a3bf 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2018_9585.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2018_9585.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import com.android.tradefed.device.ITestDevice;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
import org.junit.Test;
@@ -29,8 +29,8 @@
* b/117554809
* Vulnerability Behaviour: SIGSEGV in self
*/
- @SecurityTest(minPatchLevel = "2019-01")
@Test
+ @AsbSecurityTest(cveBugId = 117554809)
public void testPocCVE_2018_9585() throws Exception {
AdbUtils.assumeHasNfc(getDevice());
pocPusher.only64();
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2007.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2007.java
index 718878c..826db69 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2007.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2007.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -28,8 +28,8 @@
* b/120789744
* Vulnerability Behaviour: EXIT_VULNERABLE (113)
*/
- @SecurityTest(minPatchLevel = "2019-03")
@Test
+ @AsbSecurityTest(cveBugId = 120789744)
public void testPocCVE_2019_2007() throws Exception {
AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2019-2007", 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
index f92c876..373703e 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2011.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2011.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -29,8 +29,8 @@
* b/120084106
* Vulnerability Behaviour: SIGSEGV in self
*/
- @SecurityTest(minPatchLevel = "2019-03")
@Test
+ @AsbSecurityTest(cveBugId = 120084106)
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
index d2f60c7..0ac72b2 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2013.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2013.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import com.android.tradefed.device.ITestDevice;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
import org.junit.Test;
@@ -29,8 +29,8 @@
* b/120497583
* Vulnerability Behaviour: SIGSEGV in self
*/
- @SecurityTest(minPatchLevel = "2019-03")
@Test
+ @AsbSecurityTest(cveBugId = 120497583)
public void testPocCVE_2019_2013() throws Exception {
AdbUtils.assumeHasNfc(getDevice());
pocPusher.only64();
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2014.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2014.java
index c70f560..afc7a2b 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2014.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2014.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import com.android.compatibility.common.util.CrashUtils;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
import org.junit.Test;
@@ -29,8 +29,8 @@
* b/120499324
* Vulnerability Behaviour: SIGABRT in self
*/
- @SecurityTest(minPatchLevel = "2019-03")
@Test
+ @AsbSecurityTest(cveBugId = 120499324)
public void testPocCVE_2019_2014() throws Exception {
pocPusher.only64();
String binaryName = "CVE-2019-2014";
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2019.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2019.java
index cd61170..1c5a180 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2019.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2019.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -28,8 +28,8 @@
* b/115635871
* Vulnerability Behaviour: SIGSEGV in self
*/
- @SecurityTest(minPatchLevel = "2019-03")
@Test
+ @AsbSecurityTest(cveBugId = 115635871)
public void testPocCVE_2019_2019() throws Exception {
AdbUtils.assumeHasNfc(getDevice());
pocPusher.only64();
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2021.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2021.java
index ca4c009..8d0d4d6 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2021.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2021.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -28,8 +28,8 @@
* b/120428041
* Vulnerability Behaviour: SIGSEGV in self
*/
- @SecurityTest(minPatchLevel = "2019-03")
@Test
+ @AsbSecurityTest(cveBugId = 120428041)
public void testPocCVE_2019_2021() throws Exception {
AdbUtils.assumeHasNfc(getDevice());
pocPusher.only64();
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2022.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2022.java
index 673c2157..057e937 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2022.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2022.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -28,8 +28,8 @@
* b/120506143
* Vulnerability Behaviour: SIGSEGV in self
*/
- @SecurityTest(minPatchLevel = "2019-03")
@Test
+ @AsbSecurityTest(cveBugId = 120506143)
public void testPocCVE_2019_2022() throws Exception {
AdbUtils.assumeHasNfc(getDevice());
pocPusher.only64();
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2035.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2035.java
index 0ac90e4..8757455 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2035.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2035.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -28,8 +28,8 @@
* b/122320256
* Vulnerability Behaviour: SIGSEGV in self
*/
- @SecurityTest(minPatchLevel = "2019-04")
@Test
+ @AsbSecurityTest(cveBugId = 122320256)
public void testPocCVE_2019_2035() throws Exception {
pocPusher.only64();
AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2019-2035", null, getDevice());
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2038.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2038.java
index 832bfdc..4fe0164 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2038.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2038.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -28,8 +28,8 @@
* b/121259048
* Vulnerability Behaviour: SIGSEGV in self
*/
- @SecurityTest(minPatchLevel = "2019-04")
@Test
+ @AsbSecurityTest(cveBugId = 121259048)
public void testPocCVE_2019_2038() throws Exception {
AdbUtils.assumeHasNfc(getDevice());
pocPusher.only64();
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2039.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2039.java
index 2fc1745..6390340 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2039.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2039.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -28,8 +28,8 @@
* b/121260197
* Vulnerability Behaviour: SIGSEGV in self
*/
- @SecurityTest(minPatchLevel = "2019-04")
@Test
+ @AsbSecurityTest(cveBugId = 121260197)
public void testPocCVE_2019_2039() throws Exception {
AdbUtils.assumeHasNfc(getDevice());
pocPusher.only64();
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2040.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2040.java
index 2619ed9..6c6d239 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2040.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2040.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -28,8 +28,8 @@
* b/122316913
* Vulnerability Behaviour: SIGSEGV in self
*/
- @SecurityTest(minPatchLevel = "2019-04")
@Test
+ @AsbSecurityTest(cveBugId = 122316913)
public void testPocCVE_2019_2040() throws Exception {
AdbUtils.assumeHasNfc(getDevice());
pocPusher.only64();
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2044.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2044.java
index 6072d12..e36c46f 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2044.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2044.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -28,8 +28,8 @@
* b/123701862
* Vulnerability Behaviour: SIGSEGV in self
*/
- @SecurityTest(minPatchLevel = "2019-05")
@Test
+ @AsbSecurityTest(cveBugId = 123701862)
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_2099.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2099.java
index e20bb5c..16487a3 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2099.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2099.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import com.android.tradefed.device.ITestDevice;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
import org.junit.Test;
@@ -29,8 +29,8 @@
* b/123583388
* Vulnerability Behaviour: EXIT_VULNERABLE (113)
**/
- @SecurityTest(minPatchLevel = "2019-06")
@Test
+ @AsbSecurityTest(cveBugId = 123583388)
public void testPocCVE_2019_2099() throws Exception {
AdbUtils.assumeHasNfc(getDevice());
pocPusher.only64();
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2115.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2115.java
index 38c8be0..1f3552c 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2115.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2115.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import com.android.tradefed.device.ITestDevice;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
import org.junit.Test;
@@ -29,8 +29,8 @@
* b/129768470
* Vulnerability Behaviour: EXIT_VULNERABLE (113)
*/
- @SecurityTest(minPatchLevel = "2019-09")
@Test
+ @AsbSecurityTest(cveBugId = 129768470)
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
index 6833243..fe06a73 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2135.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2135.java
@@ -18,7 +18,7 @@
import com.android.tradefed.device.ITestDevice;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -30,8 +30,8 @@
* b/125900276
* Vulnerability Behaviour: SIGSEGV in self
*/
- @SecurityTest(minPatchLevel = "2019-08")
@Test
+ @AsbSecurityTest(cveBugId = 125900276)
public void testPocCVE_2019_2135() throws Exception {
AdbUtils.assumeHasNfc(getDevice());
pocPusher.only64();
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2136.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2136.java
index e4b41cc..91b2000 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2136.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2136.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -29,8 +29,8 @@
* b/132650049
* Vulnerability Behaviour: SIGSEGV in self
*/
- @SecurityTest(minPatchLevel = "2019-08")
@Test
+ @AsbSecurityTest(cveBugId = 132650049)
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_2206.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2206.java
index 20396ac..15fab83 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2206.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2206.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -28,8 +28,8 @@
* b/139188579
* Vulnerability Behaviour: SIGSEGV in self
*/
- @SecurityTest(minPatchLevel = "2019-11")
@Test
+ @AsbSecurityTest(cveBugId = 139188579)
public void testPocCVE_2019_2206() throws Exception {
AdbUtils.assumeHasNfc(getDevice());
pocPusher.only64();
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2207.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2207.java
index 6f4340c..7ce43c7 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2207.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_2207.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -28,8 +28,8 @@
* b/124524315
* Vulnerability Behaviour: SIGSEGV in self
*/
- @SecurityTest(minPatchLevel = "2019-11")
@Test
+ @AsbSecurityTest(cveBugId = 124524315)
public void testPocCVE_2019_2207() throws Exception {
AdbUtils.assumeHasNfc(getDevice());
pocPusher.only64();
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_9247.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_9247.java
index ad9e06f..dbd7cc8 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_9247.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2019_9247.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -29,8 +29,8 @@
* b/120426166
* Vulnerability Behaviour: EXIT_VULNERABLE (113)
*/
- @SecurityTest(minPatchLevel = "2019-09")
@Test
+ @AsbSecurityTest(cveBugId = 120426166)
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
index efd1e54..58a2449 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0006.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0006.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import com.android.tradefed.device.ITestDevice;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
import org.junit.Test;
@@ -29,8 +29,8 @@
* b/139738828
* Vulnerability Behaviour: SIGSEGV in self
*/
- @SecurityTest(minPatchLevel = "2020-01")
@Test
+ @AsbSecurityTest(cveBugId = 139738828)
public void testPocCVE_2020_0006() throws Exception {
AdbUtils.assumeHasNfc(getDevice());
pocPusher.only64();
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0018.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0018.java
index 14001c8..1207d1a 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0018.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0018.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -35,8 +35,8 @@
/**
* b/139945049
*/
- @SecurityTest(minPatchLevel = "2020-02")
@Test
+ @AsbSecurityTest(cveBugId = 139945049)
public void testPocCVE_2020_0018() throws Exception {
ITestDevice device = getDevice();
String debuggable = device.getProperty("ro.debuggable").trim();
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0037.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0037.java
index e62413499..3a87304 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0037.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0037.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.device.ITestDevice;
@@ -29,8 +29,8 @@
* b/143106535
* Vulnerability Behaviour: SIGSEGV in self
*/
- @SecurityTest(minPatchLevel = "2020-03")
@Test
+ @AsbSecurityTest(cveBugId = 143106535)
public void testPocCVE_2020_0037() throws Exception {
AdbUtils.assumeHasNfc(getDevice());
pocPusher.only64();
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0038.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0038.java
index 5731c12..c197972 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0038.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0038.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.device.ITestDevice;
@@ -29,8 +29,8 @@
* b/143109193
* Vulnerability Behaviour: SIGSEGV in self
*/
- @SecurityTest(minPatchLevel = "2020-03")
@Test
+ @AsbSecurityTest(cveBugId = 143109193)
public void testPocCVE_2020_0038() throws Exception {
AdbUtils.assumeHasNfc(getDevice());
pocPusher.only64();
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0039.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0039.java
index 7d5ae37..76ce470 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0039.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0039.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.device.ITestDevice;
@@ -29,8 +29,8 @@
* b/143155861
* Vulnerability Behaviour: SIGSEGV in self
*/
- @SecurityTest(minPatchLevel = "2020-03")
@Test
+ @AsbSecurityTest(cveBugId = 143155861)
public void testPocCVE_2020_0039() throws Exception {
AdbUtils.assumeHasNfc(getDevice());
pocPusher.only64();
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0072.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0072.java
index 4f355d3..6133a87 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0072.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0072.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -28,8 +28,8 @@
* b/147310271
* Vulnerability Behaviour: EXIT_VULNERABLE (113)
*/
- @SecurityTest(minPatchLevel = "2020-04")
@Test
+ @AsbSecurityTest(cveBugId = 147310271)
public void testPocCVE_2020_0072() throws Exception {
AdbUtils.assumeHasNfc(getDevice());
pocPusher.only64();
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0073.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0073.java
index 79826e7..9573b39 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0073.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0073.java
@@ -19,7 +19,7 @@
import com.android.tradefed.device.ITestDevice;
import com.android.compatibility.common.util.CrashUtils;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -31,8 +31,8 @@
* b/147309942
* Vulnerability Behaviour: SIGABRT in self
*/
- @SecurityTest(minPatchLevel = "2020-04")
@Test
+ @AsbSecurityTest(cveBugId = 147309942)
public void testPocCVE_2020_0073() throws Exception {
AdbUtils.assumeHasNfc(getDevice());
pocPusher.only64();
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0226.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0226.java
index 43632ec..614447c 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0226.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0226.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -28,8 +28,8 @@
* b/150226994
* Vulnerability Behaviour: SIGSEGV in surfaceflinger
*/
- @SecurityTest(minPatchLevel = "2020-07")
@Test
+ @AsbSecurityTest(cveBugId = 150226994)
public void testPocCVE_2020_0226() throws Exception {
String processPatternStrings[] = {"surfaceflinger"};
AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2020-0226", null, getDevice(),
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0243.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0243.java
index 4c2b91d..2ba62bf 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0243.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0243.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import com.android.compatibility.common.util.CrashUtils;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
import org.junit.Test;
@@ -29,8 +29,8 @@
* b/151644303
* Vulnerability Behaviour: SIGSEGV in mediaserver
*/
- @SecurityTest(minPatchLevel = "2020-08")
@Test
+ @AsbSecurityTest(cveBugId = 151644303)
public void testPocCVE_2020_0243() throws Exception {
AdbUtils.pocConfig testConfig = new AdbUtils.pocConfig("CVE-2020-0243", getDevice());
testConfig.config = new CrashUtils.Config().setProcessPatterns("mediaserver");
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0381.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0381.java
index 2d5237a..695d8dc 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0381.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0381.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -31,8 +31,8 @@
* b/150159669
* Vulnerability Behaviour: SIGSEGV in self
*/
- @SecurityTest(minPatchLevel = "2020-09")
@Test
+ @AsbSecurityTest(cveBugId = 150159669)
public void testPocCVE_2020_0381() throws Exception {
assumeFalse(moduleIsPlayManaged("com.google.android.media"));
String inputFiles[] = {"cve_2020_0381.xmf", "cve_2020_0381.info"};
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0383.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0383.java
index 2e1ca03..d2a4ca5 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0383.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0383.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -29,8 +29,8 @@
* b/150160279
* Vulnerability Behaviour: SIGSEGV in self
*/
- @SecurityTest(minPatchLevel = "2020-09")
@Test
+ @AsbSecurityTest(cveBugId = 150160279)
public void testPocCVE_2020_0383() throws Exception {
assumeFalse(moduleIsPlayManaged("com.google.android.media"));
String inputFiles[] = {"cve_2020_0383.xmf", "cve_2020_0383.info"};
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0384.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0384.java
index 2f7b5d9..f89ec7d 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0384.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0384.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -31,8 +31,8 @@
* b/150159906
* Vulnerability Behaviour: SIGSEGV in self
*/
- @SecurityTest(minPatchLevel = "2020-09")
@Test
+ @AsbSecurityTest(cveBugId = 150159906)
public void testPocCVE_2020_0384() throws Exception {
assumeFalse(moduleIsPlayManaged("com.google.android.media"));
String inputFiles[] = {"cve_2020_0384.xmf", "cve_2020_0384.info"};
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0385.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0385.java
index e7aefeb..19109b8 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0385.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_0385.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -31,8 +31,8 @@
* b/150160041
* Vulnerability Behaviour: SIGSEGV in self
*/
- @SecurityTest(minPatchLevel = "2020-09")
@Test
+ @AsbSecurityTest(cveBugId = 150160041)
public void testPocCVE_2020_0385() throws Exception {
assumeFalse(moduleIsPlayManaged("com.google.android.media"));
String inputFiles[] = {"cve_2020_0385.xmf", "cve_2020_0385.info"};
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_11164.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_11164.java
index 4132917..e3f6c26 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_11164.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_11164.java
@@ -17,7 +17,7 @@
import static org.junit.Assert.*;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -28,8 +28,8 @@
/**
* CVE-2020-11164
*/
- @SecurityTest(minPatchLevel = "2020-10")
@Test
+ @AsbSecurityTest(cveBugId = 160605595)
public void testPocCVE_2020_11164() throws Exception {
String result =
AdbUtils.runCommandLine("pm list package com.qualcomm.qti.perfdump", getDevice());
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_11173.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_11173.java
index f26c94f..a15335a 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_11173.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_11173.java
@@ -1,19 +1,18 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
import org.junit.Test;
import org.junit.runner.RunWith;
@RunWith(DeviceJUnit4ClassRunner.class)
-@SecurityTest
public class CVE_2020_11173 extends SecurityTestCase {
/**
* CVE-2020-11173
*/
- @SecurityTest(minPatchLevel = "2020-10")
@Test
+ @AsbSecurityTest(cveBugId = 160605709)
public void testPocCVE_2020_11173() throws Exception {
if (containsDriver(getDevice(), "/dev/adsprpc-smd")
&& containsDriver(getDevice(), "/dev/ion")) {
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_11282.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_11282.java
index f54bc72..9664abf 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_11282.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_11282.java
@@ -3,7 +3,7 @@
import static org.junit.Assert.*;
import static org.junit.Assume.*;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -15,7 +15,7 @@
* CVE-2020-11282
*/
@Test
- @SecurityTest(minPatchLevel = "2021-02")
+ @AsbSecurityTest(cveBugId = 161374239)
public void testPocCVE_2020_11282() throws Exception {
assumeTrue(containsDriver(getDevice(), "/dev/kgsl-3d0"));
AdbUtils.runPocAssertExitStatusNotVulnerable("CVE-2020-11282", getDevice(), 60);
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_29661.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_29661.java
index 8e603a6..80de289 100755
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_29661.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2020_29661.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -29,8 +29,8 @@
* b/182917768
*
*/
- @SecurityTest(minPatchLevel = "2021-05")
@Test
+ @AsbSecurityTest(cveBugId = 175451767)
public void testPocCVE_2020_29661() throws Exception {
AdbUtils.runPocNoOutput("CVE-2020-29661", getDevice(),60);
}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2021_0305.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2021_0305.java
index dd2aff8..a6ae4f8 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2021_0305.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2021_0305.java
@@ -19,7 +19,7 @@
import android.platform.test.annotations.AppModeInstant;
import android.platform.test.annotations.AppModeFull;
import android.util.Log;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
import com.android.tradefed.testtype.junit4.BaseHostJUnit4Test;
@@ -49,8 +49,8 @@
}
@Test
- @SecurityTest(minPatchLevel = "2020-09")
@AppModeFull
+ @AsbSecurityTest(cveBugId = 154015447)
public void testRunDeviceTestsPassesFull() throws Exception {
installPackage();
Assert.assertTrue(runDeviceTests(TEST_PKG, TEST_CLASS, "testClick"));
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2021_0313.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2021_0313.java
index 5248019..2cd9f7a 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2021_0313.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2021_0313.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -28,8 +28,8 @@
* b/170968514
* Vulnerability Behaviour: EXIT_VULNERABLE (113)
*/
- @SecurityTest(minPatchLevel = "2021-01")
@Test
+ @AsbSecurityTest(cveBugId = 170968514)
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
index 3d3f4a8..fa4b66b 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2021_0330.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2021_0330.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -29,8 +29,8 @@
* b/170732441
* Vulnerability Behaviour: SIGSEGV in storaged
*/
- @SecurityTest(minPatchLevel = "2021-02")
@Test
+ @AsbSecurityTest(cveBugId = 170732441)
public void testPocCVE_2021_0330() throws Exception {
AdbUtils.pocConfig testConfig = new AdbUtils.pocConfig("CVE-2021-0330", getDevice());
testConfig.config = new CrashUtils.Config().setProcessPatterns("storaged");
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2021_0430.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2021_0430.java
index 935b601..af3503c 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2021_0430.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2021_0430.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -28,8 +28,8 @@
* b/178725766
* Vulnerability Behaviour: SIGSEGV in self
*/
- @SecurityTest(minPatchLevel = "2021-04")
@Test
+ @AsbSecurityTest(cveBugId = 178725766)
public void testPocCVE_2021_0430() throws Exception {
pocPusher.only64();
AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2021-0430", null, getDevice());
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2021_0439.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2021_0439.java
index 25802a0..fb7638c 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2021_0439.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2021_0439.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -28,8 +28,8 @@
* b/174243830
* Vulnerability Behaviour: SIGSEGV in system_server
*/
- @SecurityTest(minPatchLevel = "2021-04")
@Test
+ @AsbSecurityTest(cveBugId = 174243830)
public void testPocCVE_2021_0439() throws Exception {
String processPatternStrings[] = {"system_server"};
AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2021-0439", null, getDevice(),
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2021_0473.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2021_0473.java
index d2dc169..1224dc2 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2021_0473.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2021_0473.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -28,8 +28,8 @@
* b/179687208
* Vulnerability Behavior: EXIT_VULNERABLE (113)
*/
- @SecurityTest(minPatchLevel = "2021-05")
@Test
+ @AsbSecurityTest(cveBugId = 179687208)
public void testPocCVE_2021_0473() throws Exception {
AdbUtils.assumeHasNfc(getDevice());
pocPusher.only64();
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2021_0484.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2021_0484.java
index e07840c..4d2acac 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2021_0484.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2021_0484.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -28,8 +28,8 @@
* b/173720767
* Vulnerability Behavior: EXIT_VULNERABLE (113)
*/
- @SecurityTest(minPatchLevel = "2021-05")
@Test
+ @AsbSecurityTest(cveBugId = 173720767)
public void testPocCVE_2021_0484() throws Exception {
AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2021-0484", null, getDevice());
}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2021_0523.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2021_0523.java
index 905971a..db0a1b2 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2021_0523.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2021_0523.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import com.android.tradefed.device.ITestDevice;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
import java.util.regex.Pattern;
@@ -44,8 +44,8 @@
/**
* b/174047492
*/
- @SecurityTest(minPatchLevel = "2021-06")
@Test
+ @AsbSecurityTest(cveBugId = 174047492)
public void testPocCVE_2021_0523() throws Exception {
final int SLEEP_INTERVAL_MILLISEC = 30 * 1000;
String apkName = "CVE-2021-0523.apk";
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/CVE_2021_29368.java b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2021_29368.java
new file mode 100644
index 0000000..b0f19ad
--- /dev/null
+++ b/hostsidetests/securitybulletin/src/android/security/cts/CVE_2021_29368.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.AsbSecurityTest;
+import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import static org.junit.Assert.*;
+
+@RunWith(DeviceJUnit4ClassRunner.class)
+public class CVE_2021_29368 extends SecurityTestCase {
+
+ /**
+ * b/174738029
+ *
+ */
+ @AsbSecurityTest(cveBugId = 174738029)
+ @Test
+ public void testPocCVE_2021_29368() throws Exception {
+ AdbUtils.runPocAssertExitStatusNotVulnerable("CVE-2021-29368", getDevice(),60);
+ }
+}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/Poc16_04.java b/hostsidetests/securitybulletin/src/android/security/cts/Poc16_04.java
index b0f0ddc..367c766 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/Poc16_04.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/Poc16_04.java
@@ -15,7 +15,7 @@
*/
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -29,7 +29,7 @@
* b/26323455
*/
@Test
- @SecurityTest(minPatchLevel = "2016-04")
+ @AsbSecurityTest(cveBugId = 26323455)
public void testPocCVE_2016_2419() throws Exception {
AdbUtils.runCommandLine("logcat -c" , getDevice());
AdbUtils.runPoc("CVE-2016-2419", getDevice(), 60);
@@ -41,7 +41,7 @@
* b/26324307
*/
@Test
- @SecurityTest(minPatchLevel = "2016-04")
+ @AsbSecurityTest(cveBugId = 26324307)
public void testPocCVE_2016_0844() throws Exception {
AdbUtils.runPoc("CVE-2016-0844", getDevice(), 60);
}
@@ -50,7 +50,7 @@
* b/26593930
*/
@Test
- @SecurityTest(minPatchLevel = "2016-04")
+ @AsbSecurityTest(cveBugId = 26593930)
public void testPocCVE_2016_2412() throws Exception {
AdbUtils.runPocAssertNoCrashes("CVE-2016-2412", getDevice(), "system_server");
}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/Poc16_05.java b/hostsidetests/securitybulletin/src/android/security/cts/Poc16_05.java
index 0895607..f185352 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/Poc16_05.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/Poc16_05.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -29,7 +29,7 @@
* b/27555981
*/
@Test
- @SecurityTest(minPatchLevel = "2016-05")
+ @AsbSecurityTest(cveBugId = 27555981)
public void testPocCVE_2016_2460() throws Exception {
AdbUtils.runCommandLine("logcat -c" , getDevice());
AdbUtils.runPoc("CVE-2016-2460", getDevice(), 60);
@@ -42,7 +42,7 @@
* b/27275324
*/
@Test
- @SecurityTest(minPatchLevel = "2016-05")
+ @AsbSecurityTest(cveBugId = 27275324)
public void testPocCVE_2015_1805() throws Exception {
AdbUtils.runPoc("CVE-2015-1805", getDevice(), TIMEOUT_NONDETERMINISTIC);
}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/Poc16_06.java b/hostsidetests/securitybulletin/src/android/security/cts/Poc16_06.java
index 58c604e..6f7d26b 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/Poc16_06.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/Poc16_06.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -29,7 +29,7 @@
* b/27661749
*/
@Test
- @SecurityTest(minPatchLevel = "2016-06")
+ @AsbSecurityTest(cveBugId = 27661749)
public void testPocCVE_2016_2482() throws Exception {
AdbUtils.runPocAssertNoCrashes("CVE-2016-2482", getDevice(), "mediaserver");
}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/Poc16_07.java b/hostsidetests/securitybulletin/src/android/security/cts/Poc16_07.java
index 835c1cf..d598252 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/Poc16_07.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/Poc16_07.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -29,7 +29,7 @@
* b/28740702
*/
@Test
- @SecurityTest(minPatchLevel = "2016-07")
+ @AsbSecurityTest(cveBugId = 28740702)
public void testPocCVE_2016_3818() throws Exception {
AdbUtils.runPoc("CVE-2016-3818", getDevice(), 60);
}
@@ -38,7 +38,7 @@
* b/27890802
*/
@Test
- @SecurityTest(minPatchLevel = "2016-07")
+ @AsbSecurityTest(cveBugId = 27890802)
public void testPocCVE_2016_3746() throws Exception {
AdbUtils.runPocAssertNoCrashes("CVE-2016-3746", getDevice(), "mediaserver");
}
@@ -47,7 +47,7 @@
* b/28557020
*/
@Test
- @SecurityTest(minPatchLevel = "2016-07")
+ @AsbSecurityTest(cveBugId = 28557020)
public void testPocCVE_2014_9803() throws Exception {
AdbUtils.runPocAssertExitStatusNotVulnerable("CVE-2014-9803", getDevice(), 60);
}
@@ -56,7 +56,7 @@
* b/27903498
*/
@Test
- @SecurityTest(minPatchLevel = "2016-07")
+ @AsbSecurityTest(cveBugId = 27903498)
public void testPocCVE_2016_3747() throws Exception {
AdbUtils.runPocAssertNoCrashes("CVE-2016-3747", getDevice(), "mediaserver");
}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/Poc16_09.java b/hostsidetests/securitybulletin/src/android/security/cts/Poc16_09.java
index a253619..e3f9906 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/Poc16_09.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/Poc16_09.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -29,7 +29,7 @@
* b/27773913
*/
@Test
- @SecurityTest(minPatchLevel = "2016-09")
+ @AsbSecurityTest(cveBugId = 27773913)
public void testPocCVE_2016_2471() throws Exception {
AdbUtils.runPoc("CVE-2016-2471", getDevice(), 60);
}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/Poc16_10.java b/hostsidetests/securitybulletin/src/android/security/cts/Poc16_10.java
index d1550d2..c19333a 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/Poc16_10.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/Poc16_10.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -30,7 +30,7 @@
* b/30204103
*/
@Test
- @SecurityTest(minPatchLevel = "2016-10")
+ @AsbSecurityTest(cveBugId = 30204103)
public void testPocCVE_2016_3913() throws Exception {
AdbUtils.runPocAssertNoCrashes("CVE-2016-3913", getDevice(), "mediaserver");
}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/Poc16_11.java b/hostsidetests/securitybulletin/src/android/security/cts/Poc16_11.java
index 60a15e6..5012920c 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/Poc16_11.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/Poc16_11.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -30,7 +30,7 @@
* b/29149404
*/
@Test
- @SecurityTest(minPatchLevel = "2016-11")
+ @AsbSecurityTest(cveBugId = 72498387)
public void testPocCVE_2012_6702() throws Exception {
AdbUtils.runCommandLine("logcat -c", getDevice());
AdbUtils.runPoc("CVE-2012-6702", getDevice(), 60);
@@ -42,7 +42,7 @@
* b/30904789
*/
@Test
- @SecurityTest(minPatchLevel = "2016-11")
+ @AsbSecurityTest(cveBugId = 30904789)
public void testPocCVE_2016_6730() throws Exception {
if(containsDriver(getDevice(), "/dev/dri/renderD129")) {
AdbUtils.runPoc("CVE-2016-6730", getDevice(), 60);
@@ -53,7 +53,7 @@
* b/30906023
*/
@Test
- @SecurityTest(minPatchLevel = "2016-11")
+ @AsbSecurityTest(cveBugId = 30906023)
public void testPocCVE_2016_6731() throws Exception {
if(containsDriver(getDevice(), "/dev/dri/renderD129")) {
AdbUtils.runPoc("CVE-2016-6731", getDevice(), 60);
@@ -64,7 +64,7 @@
* b/30906599
*/
@Test
- @SecurityTest(minPatchLevel = "2016-11")
+ @AsbSecurityTest(cveBugId = 30906599)
public void testPocCVE_2016_6732() throws Exception {
if(containsDriver(getDevice(), "/dev/dri/renderD129")) {
AdbUtils.runPoc("CVE-2016-6732", getDevice(), 60);
@@ -75,7 +75,7 @@
* b/30906694
*/
@Test
- @SecurityTest(minPatchLevel = "2016-11")
+ @AsbSecurityTest(cveBugId = 30906694)
public void testPocCVE_2016_6733() throws Exception {
if(containsDriver(getDevice(), "/dev/dri/renderD129")) {
AdbUtils.runPoc("CVE-2016-6733", getDevice(), 60);
@@ -86,7 +86,7 @@
* b/30907120
*/
@Test
- @SecurityTest(minPatchLevel = "2016-11")
+ @AsbSecurityTest(cveBugId = 30907120)
public void testPocCVE_2016_6734() throws Exception {
if(containsDriver(getDevice(), "/dev/dri/renderD129")) {
AdbUtils.runPoc("CVE-2016-6734", getDevice(), 60);
@@ -97,7 +97,7 @@
* b/30907701
*/
@Test
- @SecurityTest(minPatchLevel = "2016-11")
+ @AsbSecurityTest(cveBugId = 30907701)
public void testPocCVE_2016_6735() throws Exception {
if(containsDriver(getDevice(), "/dev/dri/renderD129")) {
AdbUtils.runPoc("CVE-2016-6735", getDevice(), 60);
@@ -108,7 +108,7 @@
* b/30953284
*/
@Test
- @SecurityTest(minPatchLevel = "2016-11")
+ @AsbSecurityTest(cveBugId = 30953284)
public void testPocCVE_2016_6736() throws Exception {
if(containsDriver(getDevice(), "/dev/dri/renderD129")) {
AdbUtils.runPoc("CVE-2016-6736", getDevice(), 60);
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/Poc16_12.java b/hostsidetests/securitybulletin/src/android/security/cts/Poc16_12.java
index 4e2031b..392b11a 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/Poc16_12.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/Poc16_12.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -31,7 +31,7 @@
* b/31796940
*/
@Test
- @SecurityTest(minPatchLevel = "2016-12")
+ @AsbSecurityTest(cveBugId = 31796940)
public void testPocCVE_2016_8406() throws Exception {
assertNotKernelPointer(() -> {
String cmd = "ls /sys/kernel/slab 2>/dev/null | grep nf_conntrack";
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/Poc17_01.java b/hostsidetests/securitybulletin/src/android/security/cts/Poc17_01.java
index a7ae370..0773716 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/Poc17_01.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/Poc17_01.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -31,7 +31,7 @@
* b/31797770
*/
@Test
- @SecurityTest(minPatchLevel = "2017-01")
+ @AsbSecurityTest(cveBugId = 31797770)
public void testPocCVE_2016_8425() throws Exception {
if(containsDriver(getDevice(), "/dev/nvhost-vic")) {
AdbUtils.runPoc("CVE-2016-8425", getDevice(), 60);
@@ -42,7 +42,7 @@
* b/31799206
*/
@Test
- @SecurityTest(minPatchLevel = "2017-01")
+ @AsbSecurityTest(cveBugId = 31799206)
public void testPocCVE_2016_8426() throws Exception {
if(containsDriver(getDevice(), "/dev/nvhost-gpu")) {
AdbUtils.runPoc("CVE-2016-8426", getDevice(), 60);
@@ -53,7 +53,7 @@
* b/31799885
*/
@Test
- @SecurityTest(minPatchLevel = "2017-01")
+ @AsbSecurityTest(cveBugId = 31799885)
public void testPocCVE_2016_8427() throws Exception {
if(containsDriver(getDevice(), "/dev/nvhost-gpu") ||
containsDriver(getDevice(), "/dev/nvhost-dbg-gpu")) {
@@ -65,7 +65,7 @@
* b/31993456
*/
@Test
- @SecurityTest(minPatchLevel = "2017-01")
+ @AsbSecurityTest(cveBugId = 31993456)
public void testPocCVE_2016_8428() throws Exception {
if(containsDriver(getDevice(), "/dev/nvmap")) {
AdbUtils.runPoc("CVE-2016-8428", getDevice(), 60);
@@ -76,7 +76,7 @@
* b/32160775
*/
@Test
- @SecurityTest(minPatchLevel = "2017-01")
+ @AsbSecurityTest(cveBugId = 32160775)
public void testPocCVE_2016_8429() throws Exception {
if(containsDriver(getDevice(), "/dev/nvmap")) {
AdbUtils.runPoc("CVE-2016-8429", getDevice(), 60);
@@ -87,7 +87,7 @@
* b/32225180
*/
@Test
- @SecurityTest(minPatchLevel = "2017-01")
+ @AsbSecurityTest(cveBugId = 31801045)
public void testPocCVE_2016_8430() throws Exception {
if(containsDriver(getDevice(), "/dev/nvhost-vic")) {
AdbUtils.runPoc("CVE-2016-8430", getDevice(), 60);
@@ -98,7 +98,7 @@
* b/32402179
*/
@Test
- @SecurityTest(minPatchLevel = "2017-01")
+ @AsbSecurityTest(cveBugId = 32402179)
public void testPocCVE_2016_8431() throws Exception {
if(containsDriver(getDevice(), "/dev/dri/renderD129")) {
AdbUtils.runPoc("CVE-2016-8431", getDevice(), 60);
@@ -109,7 +109,7 @@
* b/32447738
*/
@Test
- @SecurityTest(minPatchLevel = "2017-01")
+ @AsbSecurityTest(cveBugId = 32447738)
public void testPocCVE_2016_8432() throws Exception {
if(containsDriver(getDevice(), "/dev/dri/renderD129")) {
AdbUtils.runPoc("CVE-2016-8432", getDevice(), 60);
@@ -120,7 +120,7 @@
* b/32125137
*/
@Test
- @SecurityTest(minPatchLevel = "2017-01")
+ @AsbSecurityTest(cveBugId = 32125137)
public void testPocCVE_2016_8434() throws Exception {
if(containsDriver(getDevice(), "/dev/kgsl-3d0")) {
// This poc is very verbose so we ignore the output to avoid using a lot of memory.
@@ -132,7 +132,7 @@
* b/31668540
*/
@Test
- @SecurityTest(minPatchLevel = "2017-01")
+ @AsbSecurityTest(cveBugId = 31668540)
public void testPocCVE_2016_8460() throws Exception {
if(containsDriver(getDevice(), "/dev/nvmap")) {
String result = AdbUtils.runPoc("CVE-2016-8460", getDevice(), 60);
@@ -144,7 +144,7 @@
* b/32255299
*/
@Test
- @SecurityTest(minPatchLevel = "2017-01")
+ @AsbSecurityTest(cveBugId = 32255299)
public void testPocCVE_2017_0386() throws Exception {
AdbUtils.runPocAssertExitStatusNotVulnerable("CVE-2017-0386", getDevice(), 60);
}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/Poc17_02.java b/hostsidetests/securitybulletin/src/android/security/cts/Poc17_02.java
index 3f94a62..1fd4bf9 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/Poc17_02.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/Poc17_02.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -29,7 +29,7 @@
* b/32799236
*/
@Test
- @SecurityTest(minPatchLevel = "2017-02")
+ @AsbSecurityTest(cveBugId = 32799236)
public void testPocCVE_2017_0426() throws Exception {
AdbUtils.runCommandLine("logcat -c", getDevice());
AdbUtils.runPoc("CVE-2017-0426", getDevice(), 60);
@@ -41,7 +41,7 @@
* b/32706020
*/
@Test
- @SecurityTest(minPatchLevel = "2017-02")
+ @AsbSecurityTest(cveBugId = 32706020)
public void testPocCVE_2017_0415() throws Exception {
AdbUtils.runPocAssertNoCrashes("CVE-2017-0415", getDevice(), "mediaserver");
}
@@ -50,7 +50,7 @@
* b/31799863
*/
@Test
- @SecurityTest(minPatchLevel = "2017-02")
+ @AsbSecurityTest(cveBugId = 31799863)
public void testPocCVE_2016_8482() throws Exception {
if(containsDriver(getDevice(), "/dev/nvmap")) {
AdbUtils.runPoc("CVE-2016-8482", getDevice(), 60);
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/Poc17_03.java b/hostsidetests/securitybulletin/src/android/security/cts/Poc17_03.java
index 3dacc96..50093b8 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/Poc17_03.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/Poc17_03.java
@@ -18,7 +18,7 @@
import java.util.concurrent.Callable;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -32,7 +32,7 @@
* b/31824853
*/
@Test
- @SecurityTest(minPatchLevel = "2017-03")
+ @AsbSecurityTest(cveBugId = 31824853)
public void testPocCVE_2016_8479() throws Exception {
if (containsDriver(getDevice(), "/dev/kgsl-3d0")) {
AdbUtils.runPocNoOutput("CVE-2016-8479", getDevice(), TIMEOUT_NONDETERMINISTIC);
@@ -46,7 +46,7 @@
* b/33940449
*/
@Test
- @SecurityTest(minPatchLevel = "2017-03")
+ @AsbSecurityTest(cveBugId = 33940449)
public void testPocCVE_2017_0508() throws Exception {
if (containsDriver(getDevice(), "/dev/ion") &&
containsDriver(getDevice(), "/dev/dri/renderD129")) {
@@ -61,7 +61,7 @@
* b/33899363
*/
@Test
- @SecurityTest(minPatchLevel = "2017-03")
+ @AsbSecurityTest(cveBugId = 33899363)
public void testPocCVE_2017_0333() throws Exception {
if (containsDriver(getDevice(), "/dev/dri/renderD128")) {
AdbUtils.runPocNoOutput("CVE-2017-0333", getDevice(), 30);
@@ -74,7 +74,7 @@
* b/33245849
*/
@Test
- @SecurityTest(minPatchLevel = "2017-03")
+ @AsbSecurityTest(cveBugId = 33245849)
public void testPocCVE_2017_0334() throws Exception {
if (containsDriver(getDevice(), "/dev/dri/renderD129")) {
String out = AdbUtils.runPoc("CVE-2017-0334", getDevice());
@@ -104,7 +104,7 @@
* b/32707507
*/
@Test
- @SecurityTest(minPatchLevel = "2017-03")
+ @AsbSecurityTest(cveBugId = 32707507)
public void testPocCVE_2017_0479() throws Exception {
AdbUtils.runPocAssertNoCrashes("CVE-2017-0479", getDevice(), "audioserver");
}
@@ -113,7 +113,7 @@
* b/33178389
*/
@Test
- @SecurityTest(minPatchLevel = "2017-03")
+ @AsbSecurityTest(cveBugId = 33178389)
public void testPocCVE_2017_0490() throws Exception {
String bootCountBefore =
AdbUtils.runCommandLine("settings get global boot_count", getDevice());
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/Poc17_04.java b/hostsidetests/securitybulletin/src/android/security/cts/Poc17_04.java
index f5c8fe3..36f921c 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/Poc17_04.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/Poc17_04.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -30,7 +30,7 @@
* b/32342065
*/
@Test
- @SecurityTest(minPatchLevel = "2017-04")
+ @AsbSecurityTest(cveBugId = 32342065)
public void testPocCVE_2017_0553() throws Exception {
// Error code of 139 represents segmentation fault
getDevice().executeShellCommand("chmod +x /data/local/tmp/CVE-2017-0553");
@@ -42,7 +42,7 @@
* b/72460737
*/
@Test
- @SecurityTest(minPatchLevel = "2017-04")
+ @AsbSecurityTest(cveBugId = 34469585)
public void testPocCVE_2014_3145() throws Exception {
assertFalse("VULNERABLE DEVICE DETECTED",
AdbUtils.runPocCheckExitCode("CVE-2014-3145", getDevice(), 60));
@@ -52,7 +52,7 @@
* b/32813456
*/
@Test
- @SecurityTest(minPatchLevel = "2017-04")
+ @AsbSecurityTest(cveBugId = 32813456)
public void testPocCVE_2016_10229() throws Exception {
String out = AdbUtils.runPoc("CVE-2016-10229", getDevice());
assertNotMatchesMultiLine("OVERWRITE", out);
@@ -62,7 +62,7 @@
* b/33621647
*/
@Test
- @SecurityTest(minPatchLevel = "2017-04")
+ @AsbSecurityTest(cveBugId = 33621647)
public void testPocCVE_2017_0477() throws Exception {
AdbUtils.pushResource("/CVE-2017-0477.gif", "/data/local/tmp/CVE-2017-0477.gif",
getDevice());
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/Poc17_05.java b/hostsidetests/securitybulletin/src/android/security/cts/Poc17_05.java
index 797e58d..fcedfb9 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/Poc17_05.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/Poc17_05.java
@@ -19,7 +19,7 @@
import java.util.Arrays;
import java.util.concurrent.Callable;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -33,7 +33,7 @@
* CVE-2016-5862
*/
@Test
- @SecurityTest(minPatchLevel = "2017-05")
+ @AsbSecurityTest(cveBugId = 35399803)
public void testPocCVE_2016_5862() throws Exception {
if (containsDriver(getDevice(), "/dev/snd/controlC0")) {
AdbUtils.runPocNoOutput("CVE-2016-5862",getDevice(), 60);
@@ -44,7 +44,7 @@
* CVE-2016-5867
*/
@Test
- @SecurityTest(minPatchLevel = "2017-05")
+ @AsbSecurityTest(cveBugId = 35400602)
public void testPocCVE_2016_5867() throws Exception {
if (containsDriver(getDevice(), "/dev/snd/controlC0")) {
AdbUtils.runPocAssertExitStatusNotVulnerable("CVE-2016-5867", getDevice(), 60);
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/Poc17_06.java b/hostsidetests/securitybulletin/src/android/security/cts/Poc17_06.java
index 1f7e5e9..a3609a24 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/Poc17_06.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/Poc17_06.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -30,7 +30,7 @@
* b/36392138
*/
@Test
- @SecurityTest(minPatchLevel = "2017-06")
+ @AsbSecurityTest(cveBugId = 36392138)
public void testPocCVE_2017_0647() throws Exception {
AdbUtils.pushResource("/CVE-2017-0647.zip", "/data/local/tmp/CVE-2017-0647.zip",
getDevice());
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/Poc17_07.java b/hostsidetests/securitybulletin/src/android/security/cts/Poc17_07.java
index d3a086a..f9309e5 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/Poc17_07.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/Poc17_07.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -30,7 +30,7 @@
* b/35443725
**/
@Test
- @SecurityTest(minPatchLevel = "2017-07")
+ @AsbSecurityTest(cveBugId = 35443725)
public void testPocCVE_2016_2109() throws Exception {
assertFalse("Overallocation detected!",
AdbUtils.runPocCheckExitCode("CVE-2016-2109",
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/Poc17_09.java b/hostsidetests/securitybulletin/src/android/security/cts/Poc17_09.java
index de7381e..dbb50bd 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/Poc17_09.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/Poc17_09.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -30,7 +30,7 @@
* b/63852675
*/
@Test
- @SecurityTest(minPatchLevel = "2017-09")
+ @AsbSecurityTest(cveBugId = 63852675)
public void testPocCve_2017_6983() throws Exception {
// Error code of 139 represents segmentation fault
assertFalse("Segfault found",
@@ -64,7 +64,7 @@
* b/36590192
*/
@Test
- @SecurityTest(minPatchLevel = "2017-09")
+ @AsbSecurityTest(cveBugId = 38195738)
public void testPocBug_38195738() throws Exception {
if(containsDriver(getDevice(), "/dev/kgsl-3d0")) {
AdbUtils.runPocNoOutput("Bug-38195738", getDevice(), 60);
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/Poc17_11.java b/hostsidetests/securitybulletin/src/android/security/cts/Poc17_11.java
index e592d0f..1686561 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/Poc17_11.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/Poc17_11.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -30,7 +30,7 @@
* b/36075131
*/
@Test
- @SecurityTest(minPatchLevel = "2017-11")
+ @AsbSecurityTest(cveBugId = 36075131)
public void testPocCVE_2017_0859() throws Exception {
AdbUtils.runCommandLine("logcat -c", getDevice());
AdbUtils.pushResource("/cve_2017_0859.mp4", "/sdcard/cve_2017_0859.mp4", getDevice());
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/Poc17_12.java b/hostsidetests/securitybulletin/src/android/security/cts/Poc17_12.java
index 71607c8..160ec27 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/Poc17_12.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/Poc17_12.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -30,7 +30,7 @@
* b/38045794
*/
@Test
- @SecurityTest(minPatchLevel = "2017-12")
+ @AsbSecurityTest(cveBugId = 38045794)
public void testPocCVE_2017_6262() throws Exception {
if(containsDriver(getDevice(),"/dev/dri/renderD128")) {
AdbUtils.runPocNoOutput("CVE-2017-6262", getDevice(), TIMEOUT_NONDETERMINISTIC);
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/Poc18_02.java b/hostsidetests/securitybulletin/src/android/security/cts/Poc18_02.java
index 377e219..1730fef 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/Poc18_02.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/Poc18_02.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -30,7 +30,7 @@
* b/68953950
*/
@Test
- @SecurityTest(minPatchLevel = "2018-02")
+ @AsbSecurityTest(cveBugId = 68953950)
public void testPocCVE_2017_13232() throws Exception {
AdbUtils.runCommandLine("logcat -c" , getDevice());
AdbUtils.runPocNoOutput("CVE-2017-13232", getDevice(), 60);
@@ -44,7 +44,7 @@
* b/65853158
*/
@Test
- @SecurityTest(minPatchLevel = "2018-02")
+ @AsbSecurityTest(cveBugId = 65853158)
public void testPocCVE_2017_13273() throws Exception {
AdbUtils.runCommandLine("dmesg -c" ,getDevice());
AdbUtils.runCommandLine("setenforce 0",getDevice());
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/Poc18_03.java b/hostsidetests/securitybulletin/src/android/security/cts/Poc18_03.java
index d5e2b90..0899f28 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/Poc18_03.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/Poc18_03.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -30,7 +30,7 @@
* b/71389378
*/
@Test
- @SecurityTest(minPatchLevel = "2018-03")
+ @AsbSecurityTest(cveBugId = 71389378)
public void testPocCVE_2017_13253() throws Exception {
AdbUtils.runPocAssertExitStatusNotVulnerable("CVE-2017-13253", getDevice(), 300);
}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/Poc18_04.java b/hostsidetests/securitybulletin/src/android/security/cts/Poc18_04.java
index dc41d7c..17ada80 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/Poc18_04.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/Poc18_04.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -31,7 +31,7 @@
* a race condition
*/
@Test
- @SecurityTest(minPatchLevel = "2018-04")
+ @AsbSecurityTest(cveBugId = 69683251)
public void testPocCVE_2017_13286() throws Exception {
LaunchSomeWhere.launchSomeWhere("CVE_2017_13286", getDevice());
}
@@ -41,7 +41,7 @@
* Does not require root but must be a hostside test to avoid a race condition
*/
@Test
- @SecurityTest(minPatchLevel = "2018-04")
+ @AsbSecurityTest(cveBugId = 69634768)
public void testPocCVE_2017_13288() throws Exception {
LaunchSomeWhere.launchSomeWhere("CVE_2017_13288", getDevice());
}
@@ -51,7 +51,7 @@
* Does not require root but must be a hostside test to avoid a race condition
*/
@Test
- @SecurityTest(minPatchLevel = "2018-04")
+ @AsbSecurityTest(cveBugId = 70398564)
public void testPocCVE_2017_13289() throws Exception {
LaunchSomeWhere.launchSomeWhere("CVE_2017_13289", getDevice());
}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/Poc18_05.java b/hostsidetests/securitybulletin/src/android/security/cts/Poc18_05.java
index e3128f1..320f997 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/Poc18_05.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/Poc18_05.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -31,7 +31,7 @@
* condition
*/
@Test
- @SecurityTest(minPatchLevel = "2018-05")
+ @AsbSecurityTest(cveBugId = 70721937)
public void testPocCVE_2017_13315() throws Exception {
LaunchSomeWhere.launchSomeWhere("CVE_2017_13315", getDevice());
}
@@ -41,7 +41,7 @@
* Does not require root but must be a hostside test to avoid a race condition
*/
@Test
- @SecurityTest(minPatchLevel = "2018-05")
+ @AsbSecurityTest(cveBugId = 73085795)
public void testPocCVE_2017_13312() throws Exception {
LaunchSomeWhere.launchSomeWhere("CVE_2017_13312", getDevice());
}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/Poc18_06.java b/hostsidetests/securitybulletin/src/android/security/cts/Poc18_06.java
index c0aab3b..63cdf56 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/Poc18_06.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/Poc18_06.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -30,7 +30,7 @@
* CVE-2018-5884
*/
@Test
- @SecurityTest(minPatchLevel = "2018-06")
+ @AsbSecurityTest(cveBugId = 74235510)
public void testPocCVE_2018_5884() throws Exception {
String wfd_service = AdbUtils.runCommandLine(
"pm list package com.qualcomm.wfd.service", getDevice());
@@ -46,7 +46,7 @@
* b/73172817
*/
@Test
- @SecurityTest
+ @AsbSecurityTest(cveBugId = 73172817)
public void testPocCVE_2018_9344() throws Exception {
AdbUtils.runPocAssertNoCrashes("CVE-2018-9344", getDevice(),
"android\\.hardware\\.cas@\\d+?\\.\\d+?-service");
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/Poc18_07.java b/hostsidetests/securitybulletin/src/android/security/cts/Poc18_07.java
index 64929d9..1147658 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/Poc18_07.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/Poc18_07.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -30,7 +30,7 @@
* b/76221123
*/
@Test
- @SecurityTest(minPatchLevel = "2018-07")
+ @AsbSecurityTest(cveBugId = 76221123)
public void testPocCVE_2018_9424() throws Exception {
AdbUtils.runPocAssertNoCrashes(
"CVE-2018-9424", getDevice(), "android\\.hardware\\.drm@\\d\\.\\d-service");
@@ -40,7 +40,7 @@
* CVE-2017-18275
*/
@Test
- @SecurityTest(minPatchLevel = "2018-07")
+ @AsbSecurityTest(cveBugId = 78242049)
public void testPocCVE_2017_18275() throws Exception {
String command =
"am startservice "
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/Poc18_10.java b/hostsidetests/securitybulletin/src/android/security/cts/Poc18_10.java
index 45cb327..a8b9050 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/Poc18_10.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/Poc18_10.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -30,7 +30,7 @@
* b/111641492
*/
@Test
- @SecurityTest(minPatchLevel = "2018-10")
+ @AsbSecurityTest(cveBugId = 111641492)
public void testPocCVE_2018_9515() throws Exception {
AdbUtils.runCommandLine("rm /sdcard/Android/data/CVE-2018-9515", getDevice());
AdbUtils.runCommandLine("mkdir /sdcard/Android/data/CVE-2018-9515", getDevice());
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/Poc18_11.java b/hostsidetests/securitybulletin/src/android/security/cts/Poc18_11.java
index 0abe1bb..e6ca50b 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/Poc18_11.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/Poc18_11.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -30,7 +30,7 @@
* b/113027383
*/
@Test
- @SecurityTest(minPatchLevel = "2018-11")
+ @AsbSecurityTest(cveBugId = 113027383)
public void testPocCVE_2018_9539() throws Exception {
AdbUtils.runPocAssertExitStatusNotVulnerable("CVE-2018-9539", getDevice(), 300);
}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/Poc19_03.java b/hostsidetests/securitybulletin/src/android/security/cts/Poc19_03.java
index 5977b4a..1e56873 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/Poc19_03.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/Poc19_03.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -29,7 +29,7 @@
* b/115739809
*/
@Test
- @SecurityTest(minPatchLevel = "2019-03")
+ @AsbSecurityTest(cveBugId = 115739809)
public void testPocBug_115739809() throws Exception {
assertFalse(AdbUtils.runPocCheckExitCode("Bug-115739809", getDevice(), 30));
}
@@ -38,7 +38,7 @@
* b/116855682
*/
@Test
- @SecurityTest(minPatchLevel = "2019-03")
+ @AsbSecurityTest(cveBugId = 116855682)
public void testPocCVE_2019_2025() throws Exception {
AdbUtils.runPocNoOutput("CVE-2019-2025", getDevice(), 300);
}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/Poc19_05.java b/hostsidetests/securitybulletin/src/android/security/cts/Poc19_05.java
index ae739f5..a22fc97 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/Poc19_05.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/Poc19_05.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -29,7 +29,7 @@
* CVE-2019-2257
*/
@Test
- @SecurityTest(minPatchLevel = "2019-05")
+ @AsbSecurityTest(cveBugId = 112303441)
public void testPocCVE_2019_2257() throws Exception {
String result = AdbUtils.runCommandLine(
"dumpsys package com.qualcomm.qti.telephonyservice", getDevice());
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/Poc19_07.java b/hostsidetests/securitybulletin/src/android/security/cts/Poc19_07.java
index 8ce2804..71cb84d 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/Poc19_07.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/Poc19_07.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -29,7 +29,7 @@
* Bug-137878930
*/
@Test
- @SecurityTest(minPatchLevel = "2019-07")
+ @AsbSecurityTest(cveBugId = 137878930)
public void testPocBug_137878930() throws Exception {
assertFalse("Heap use after free encountered",
AdbUtils.runPocCheckExitCode("Bug-137878930", getDevice(), 300));
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/Poc20_01.java b/hostsidetests/securitybulletin/src/android/security/cts/Poc20_01.java
index 3c6d4b3..5a8f4d7 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/Poc20_01.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/Poc20_01.java
@@ -1,6 +1,6 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -13,7 +13,7 @@
* CVE-2019-14002
*/
@Test
- @SecurityTest(minPatchLevel = "2020-01")
+ @AsbSecurityTest(cveBugId = 142271274)
public void testPocCVE_2019_14002() throws Exception {
String result =
AdbUtils.runCommandLine(
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/Poc20_03.java b/hostsidetests/securitybulletin/src/android/security/cts/Poc20_03.java
index ea944ab1..5b9bb22 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/Poc20_03.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/Poc20_03.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -31,7 +31,7 @@
* b/152874234
*/
@Test
- @SecurityTest(minPatchLevel = "2020-03")
+ @AsbSecurityTest(cveBugId = 147882143)
public void testPocCVE_2020_0069() throws Exception {
if(containsDriver(getDevice(), "/dev/mtk_cmdq") ||
containsDriver(getDevice(), "/proc/mtk_cmdq") ||
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/Poc20_06.java b/hostsidetests/securitybulletin/src/android/security/cts/Poc20_06.java
index bd8f3cd..6ed83c1 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/Poc20_06.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/Poc20_06.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -30,7 +30,7 @@
* CVE-2020-3635
*/
@Test
- @SecurityTest(minPatchLevel = "2020-06")
+ @AsbSecurityTest(cveBugId = 148817146)
public void testPocCVE_2020_3635() throws Exception {
String isApplicable = AdbUtils.runCommandLine("service list", getDevice());
if (isApplicable.contains("com.qualcomm.qti.IPerfManager")) {
@@ -47,7 +47,7 @@
* CVE-2020-3626
*/
@Test
- @SecurityTest(minPatchLevel = "2020-06")
+ @AsbSecurityTest(cveBugId = 150697952)
public void testPocCVE_2020_3626() throws Exception {
String isApplicable =
AdbUtils.runCommandLine("pm list package com.qualcomm.qti.lpa", getDevice());
@@ -62,7 +62,7 @@
* CVE-2020-3628
*/
@Test
- @SecurityTest(minPatchLevel = "2020-06")
+ @AsbSecurityTest(cveBugId = 150695508)
public void testPocCVE_2020_3628() throws Exception {
String result = AdbUtils.runCommandLine(
"pm list package com.qualcomm.qti.logkit",getDevice());
@@ -73,7 +73,7 @@
* CVE-2020-3676
*/
@Test
- @SecurityTest(minPatchLevel = "2020-06")
+ @AsbSecurityTest(cveBugId = 152310294)
public void testPocCVE_2020_3676() throws Exception {
String isApplicable = AdbUtils.runCommandLine("service list", getDevice());
if (isApplicable.contains("com.qualcomm.qti.IPerfManager")) {
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/Poc20_11.java b/hostsidetests/securitybulletin/src/android/security/cts/Poc20_11.java
index 627f098..bd2a761 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/Poc20_11.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/Poc20_11.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -31,7 +31,7 @@
* b/162741784
*/
@Test
- @SecurityTest(minPatchLevel = "2020-11")
+ @AsbSecurityTest(cveBugId = 162741784)
public void testPocCVE_2020_0437() throws Exception {
assumeFalse(moduleIsPlayManaged("com.google.android.cellbroadcast"));
AdbUtils.runCommandLine("logcat -c", getDevice());
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/Poc21_01.java b/hostsidetests/securitybulletin/src/android/security/cts/Poc21_01.java
index 711949aad..e555700 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/Poc21_01.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/Poc21_01.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -31,7 +31,7 @@
* b/168211968
*/
@Test
- @SecurityTest(minPatchLevel = "2021-01")
+ @AsbSecurityTest(cveBugId = 168211968)
public void testPocCVE_2021_0318() throws Exception {
AdbUtils.runPocAssertExitStatusNotVulnerable("CVE-2021-0318", getDevice(), 300);
}
diff --git a/hostsidetests/securitybulletin/src/android/security/cts/TestMedia.java b/hostsidetests/securitybulletin/src/android/security/cts/TestMedia.java
index 05c9749..36bcd0d 100644
--- a/hostsidetests/securitybulletin/src/android/security/cts/TestMedia.java
+++ b/hostsidetests/securitybulletin/src/android/security/cts/TestMedia.java
@@ -20,7 +20,7 @@
import com.android.tradefed.log.LogUtil.CLog;
import com.android.compatibility.common.util.CrashUtils;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
@@ -52,8 +52,8 @@
* b/17769851
* Vulnerability Behaviour: EXIT_VULNERABLE (113)
*/
- @SecurityTest(minPatchLevel = "2015-12")
@Test
+ @AsbSecurityTest(cveBugId = 17769851)
public void testPocCVE_2015_6616() throws Exception {
pocPusher.only64();
String inputFiles[] = {"cve_2015_6616.mp4"};
@@ -65,8 +65,8 @@
* b/37239013
* Vulnerability Behaviour: EXIT_VULNERABLE (113)
*/
- @SecurityTest(minPatchLevel = "2017-07")
@Test
+ @AsbSecurityTest(cveBugId = 37239013)
public void testPocCVE_2017_0697() throws Exception {
String inputFiles[] = {"cve_2017_0697.mp4"};
AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2017-0697",
@@ -77,8 +77,8 @@
* b/127702368
* Vulnerability Behaviour: EXIT_VULNERABLE (113)
*/
- @SecurityTest(minPatchLevel = "2019-08")
@Test
+ @AsbSecurityTest(cveBugId = 127702368)
public void testPocCVE_2019_2126() throws Exception {
AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2019-2126", null, getDevice());
}
@@ -87,8 +87,8 @@
* b/66969349
* Vulnerability Behaviour: SIGSEGV in media.codec
*/
- @SecurityTest(minPatchLevel = "2018-01")
@Test
+ @AsbSecurityTest(cveBugId = 66969349)
public void testPocCVE_2017_13180() throws Exception {
String processPatternStrings[] = {"media\\.codec", "omx@\\d+?\\.\\d+?-service"};
AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2017-13180", null, getDevice(),
@@ -99,8 +99,8 @@
* b/111210196
* Vulnerability Behaviour: EXIT_VULNERABLE (113)
*/
- @SecurityTest(minPatchLevel = "2019-12")
@Test
+ @AsbSecurityTest(cveBugId = 111210196)
public void testPocCVE_2019_2228() throws Exception {
String inputFiles[] = {"cve_2019_2228_ipp.mp4"};
AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2019-2228",
@@ -111,8 +111,8 @@
* b/157650336
* Vulnerability Behaviour: SIGSEGV in self / EXIT_VULNERABLE (113)
*/
- @SecurityTest(minPatchLevel = "2020-11")
@Test
+ @AsbSecurityTest(cveBugId = 157650336)
public void testPocCVE_2020_0450() throws Exception {
AdbUtils.assumeHasNfc(getDevice());
AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2020-0450", null, getDevice());
@@ -122,8 +122,8 @@
* b/156997193
* Vulnerability Behaviour: SIGABRT in self
*/
- @SecurityTest(minPatchLevel = "2020-11")
@Test
+ @AsbSecurityTest(cveBugId = 156997193)
public void testPocCVE_2020_0409() throws Exception {
String signals[] = {CrashUtils.SIGSEGV, CrashUtils.SIGBUS, CrashUtils.SIGABRT};
String binaryName = "CVE-2020-0409";
@@ -137,8 +137,8 @@
* b/161894517
* Vulnerability Behaviour: SIGABRT in self
*/
- @SecurityTest(minPatchLevel = "2020-10")
@Test
+ @AsbSecurityTest(cveBugId = 161894517)
public void testPocCVE_2020_0421() throws Exception {
String signals[] = {CrashUtils.SIGSEGV, CrashUtils.SIGBUS, CrashUtils.SIGABRT};
String binaryName = "CVE-2020-0421";
@@ -152,8 +152,8 @@
* b/132082342
* Vulnerability Behaviour: SIGSEGV in self
*/
- @SecurityTest(minPatchLevel = "2019-08")
@Test
+ @AsbSecurityTest(cveBugId = 132082342)
public void testPocCVE_2019_2133() throws Exception {
AdbUtils.assumeHasNfc(getDevice());
AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2019-2133", null, getDevice());
@@ -163,8 +163,8 @@
* b/132083376
* Vulnerability Behaviour: SIGSEGV in self
*/
- @SecurityTest(minPatchLevel = "2019-08")
@Test
+ @AsbSecurityTest(cveBugId = 132083376)
public void testPocCVE_2019_2134() throws Exception {
AdbUtils.assumeHasNfc(getDevice());
AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2019-2134", null, getDevice());
@@ -174,8 +174,8 @@
* b/31470908
* Vulnerability Behaviour: SIGSEGV in self
*/
- @SecurityTest(minPatchLevel = "2017-04")
@Test
+ @AsbSecurityTest(cveBugId = 31470908)
public void testPocCVE_2016_10244() throws Exception {
String inputFiles[] = {"cve_2016_10244"};
AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2016-10244",
@@ -186,8 +186,8 @@
* b/27793367
* Vulnerability Behaviour: SIGSEGV in media.codec
*/
- @SecurityTest(minPatchLevel = "2016-06")
@Test
+ @AsbSecurityTest(cveBugId = 27793367)
public void testPocCVE_2016_2485() throws Exception {
String inputFiles[] = {"cve_2016_2485.raw"};
String processPatternStrings[] = {"media\\.codec", "omx@\\d+?\\.\\d+?-service"};
@@ -200,8 +200,8 @@
* b/141890807
* Vulnerability Behaviour: EXIT_VULNERABLE (113)
*/
- @SecurityTest(minPatchLevel = "2020-01")
@Test
+ @AsbSecurityTest(cveBugId = 141890807)
public void testPocCVE_2020_0007() throws Exception {
AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2020-0007", null, getDevice());
}
@@ -210,8 +210,8 @@
* b/118372692
* Vulnerability Behaviour: SIGSEGV in self
*/
- @SecurityTest(minPatchLevel = "2019-02")
@Test
+ @AsbSecurityTest(cveBugId = 118372692)
public void testPocCVE_2019_1988() throws Exception {
assumeThat(getDevice().getProperty("ro.config.low_ram"), not(is("true")));
String inputFiles[] = {"cve_2019_1988.mp4"};
@@ -223,8 +223,8 @@
* b/63522430
* Vulnerability Behaviour: SIGSEGV in media.codec
*/
- @SecurityTest(minPatchLevel = "2018-01")
@Test
+ @AsbSecurityTest(cveBugId = 63522430)
public void testPocCVE_2017_0817() throws Exception {
String processPatternStrings[] = {"media\\.codec", "omx@\\d+?\\.\\d+?-service"};
AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2017-0817", null, getDevice(),
@@ -235,8 +235,8 @@
* b/36104177
* Vulnerability Behaviour: EXIT_VULNERABLE (113)
*/
- @SecurityTest(minPatchLevel = "2017-09")
@Test
+ @AsbSecurityTest(cveBugId = 36104177)
public void testPocCVE_2017_0670() throws Exception {
AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2017-0670", null, getDevice());
}
@@ -245,8 +245,8 @@
* b/68159767
* Vulnerability Behaviour: EXIT_VULNERABLE (113)
*/
- @SecurityTest(minPatchLevel = "2018-02")
@Test
+ @AsbSecurityTest(cveBugId = 68159767)
public void testPocCVE_2017_13234() throws Exception {
String inputFiles[] = { "cve_2017_13234.xmf" };
AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2017-13234",
@@ -257,8 +257,8 @@
* b/64340921
* Vulnerability Behaviour: SIGABRT in audioserver
*/
- @SecurityTest(minPatchLevel = "2018-02")
@Test
+ @AsbSecurityTest(cveBugId = 64340921)
public void testPocCVE_2017_0837() throws Exception {
String signals[] = {CrashUtils.SIGSEGV, CrashUtils.SIGBUS, CrashUtils.SIGABRT};
AdbUtils.pocConfig testConfig = new AdbUtils.pocConfig("CVE-2017-0837", getDevice());
@@ -274,7 +274,7 @@
* Vulnerability Behaviour: SIGABRT by -fstack-protector
*/
@Test
- @SecurityTest(minPatchLevel = "2018-09")
+ @AsbSecurityTest(cveBugId = 62151041)
public void testPocCVE_2018_9466_CVE_2017_9047() throws Exception {
String binaryName = "CVE-2018-9466-CVE-2017-9047";
String signals[] = {CrashUtils.SIGSEGV, CrashUtils.SIGBUS, CrashUtils.SIGABRT};
@@ -288,7 +288,7 @@
* Vulnerability Behaviour: SIGABRT by -fstack-protector
*/
@Test
- @SecurityTest(minPatchLevel = "2018-09")
+ @AsbSecurityTest(cveBugId = 62151041)
public void testPocCVE_2018_9466_CVE_2017_9048() throws Exception {
String binaryName = "CVE-2018-9466-CVE-2017-9048";
String signals[] = {CrashUtils.SIGSEGV, CrashUtils.SIGBUS, CrashUtils.SIGABRT};
@@ -302,7 +302,7 @@
* Vulnerability Behaviour: SIGSEGV in self
*/
@Test
- @SecurityTest(minPatchLevel = "2018-09")
+ @AsbSecurityTest(cveBugId = 62151041)
public void testPocCVE_2018_9466_CVE_2017_9049() throws Exception {
String binaryName = "CVE-2018-9466-CVE-2017-9049";
String inputFiles[] = {"cve_2018_9466_cve_2017_9049.xml"};
@@ -320,7 +320,7 @@
* Vulnerability Behaviour: SIGSEGV in self
*/
@Test
- @SecurityTest(minPatchLevel = "2018-09")
+ @AsbSecurityTest(cveBugId = 62151041)
public void testPocCVE_2018_9466_CVE_2017_9050() throws Exception {
String binaryName = "CVE-2018-9466-CVE-2017-9049";
String inputFiles[] = {"cve_2018_9466_cve_2017_9050.xml"};
@@ -338,8 +338,8 @@
* b/23247055
* Vulnerability Behaviour: SIGABRT in self
*/
- @SecurityTest(minPatchLevel = "2015-10")
@Test
+ @AsbSecurityTest(cveBugId = 20674086)
public void testPocCVE_2015_3873() throws Exception {
String inputFiles[] = {"cve_2015_3873.mp4"};
String binaryName = "CVE-2015-3873";
@@ -357,8 +357,8 @@
* b/62948670
* Vulnerability Behaviour: SIGSEGV in media.codec
*/
- @SecurityTest(minPatchLevel = "2017-11")
@Test
+ @AsbSecurityTest(cveBugId = 62948670)
public void testPocCVE_2017_0840() throws Exception {
pocPusher.only32();
String processPatternStrings[] = {"media\\.codec", "omx@\\d+?\\.\\d+?-service"};
@@ -370,8 +370,8 @@
* b/69065651
* Vulnerability Behaviour: SIGSEGV in media.codec
*/
- @SecurityTest(minPatchLevel = "2018-02")
@Test
+ @AsbSecurityTest(cveBugId = 69065651)
public void testPocCVE_2017_13241() throws Exception {
pocPusher.only32();
String processPatternStrings[] = {"media\\.codec", "omx@\\d+?\\.\\d+?-service"};
@@ -383,8 +383,8 @@
* b/111603051
* Vulnerability Behaviour: SIGSEGV in self
*/
- @SecurityTest(minPatchLevel = "2018-10")
@Test
+ @AsbSecurityTest(cveBugId = 111603051)
public void testPocCVE_2018_9491() throws Exception {
AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2018-9491", null, getDevice());
}
@@ -393,8 +393,8 @@
* b/79662501
* Vulnerability Behaviour: EXIT_VULNERABLE (113)
*/
- @SecurityTest(minPatchLevel = "2018-09")
@Test
+ @AsbSecurityTest(cveBugId = 79662501)
public void testPocCVE_2018_9472() throws Exception {
AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2018-9472", null, getDevice());
}
@@ -403,8 +403,8 @@
* b/36554207
* Vulnerability Behaviour: SIGSEGV in self
**/
- @SecurityTest(minPatchLevel = "2017-06")
@Test
+ @AsbSecurityTest(cveBugId = 36554207)
public void testPocCVE_2016_4658() throws Exception {
String inputFiles[] = {"cve_2016_4658.xml"};
AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2016-4658",
@@ -416,8 +416,8 @@
* b/36554209
* Vulnerability Behaviour: SIGSEGV in self
**/
- @SecurityTest(minPatchLevel = "2017-06")
@Test
+ @AsbSecurityTest(cveBugId = 36554209)
public void testPocCVE_2016_5131() throws Exception {
String inputFiles[] = {"cve_2016_5131.xml"};
AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2016-5131",
@@ -429,8 +429,8 @@
* b/62800140
* Vulnerability Behaviour: SIGSEGV in self
*/
- @SecurityTest(minPatchLevel = "2017-10")
@Test
+ @AsbSecurityTest(cveBugId = 62800140)
public void testPocCVE_2017_0814() throws Exception {
AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2017-0814", null, getDevice());
}
@@ -439,8 +439,8 @@
* b/65540999
* Vulnerability Behaviour: Assert failure
**/
- @SecurityTest(minPatchLevel = "2017-11")
@Test
+ @AsbSecurityTest(cveBugId = 65540999)
public void testPocCVE_2017_0847() throws Exception {
String cmdOut = AdbUtils.runCommandLine("ps -eo cmd,gid | grep mediametrics", getDevice());
if (cmdOut.length() > 0) {
@@ -457,8 +457,8 @@
* b/112005441
* Vulnerability Behaviour: EXIT_VULNERABLE (113)
*/
- @SecurityTest(minPatchLevel = "2019-09")
@Test
+ @AsbSecurityTest(cveBugId = 112005441)
public void testPocCVE_2019_9313() throws Exception {
AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2019-9313", null, getDevice());
}
@@ -467,8 +467,8 @@
* b/112159345
* Vulnerability Behaviour: SIGSEGV in self
**/
- @SecurityTest(minPatchLevel = "2018-01")
@Test
+ @AsbSecurityTest(cveBugId = 112159345)
public void testPocCVE_2018_9527() throws Exception {
AdbUtils.runPocAssertNoCrashesNotVulnerable("CVE-2018-9527", null, getDevice());
}
@@ -482,8 +482,8 @@
* b/158762825
* Vulnerability Behaviour: SIGABRT in self
*/
- @SecurityTest(minPatchLevel = "2020-11")
@Test
+ @AsbSecurityTest(cveBugId = 158762825)
public void testPocCVE_2020_0451() throws Exception {
assumeFalse(moduleIsPlayManaged("com.google.android.media.swcodec"));
String inputFiles[] = {"cve_2020_0451.aac"};
@@ -503,8 +503,8 @@
* Vulnerability Behaviour: SIGSEGV in self (Android P),
* SIGABRT in self (Android Q onward)
*/
- @SecurityTest(minPatchLevel = "2018-11")
@Test
+ @AsbSecurityTest(cveBugId = 112891564)
public void testPocCVE_2018_9537() throws Exception {
String binaryName = "CVE-2018-9537";
String signals[] = {CrashUtils.SIGSEGV, CrashUtils.SIGBUS, CrashUtils.SIGABRT};
@@ -527,8 +527,8 @@
* b/143464314
* Vulnerability Behaviour: SIGSEGV in self / EXIT_VULNERABLE (113)
*/
- @SecurityTest(minPatchLevel = "2020-10")
@Test
+ @AsbSecurityTest(cveBugId = 143464314)
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"};
@@ -541,8 +541,8 @@
* b/166268541
* Vulnerability Behaviour: SIGSEGV in media.swcodec
*/
- @SecurityTest(minPatchLevel = "2020-12")
@Test
+ @AsbSecurityTest(cveBugId = 166268541)
public void testPocCVE_2020_0470() throws Exception {
String inputFiles[] = {"cve_2020_0470.mp4"};
String processPatternStrings[] = {"media\\.swcodec"};
@@ -555,8 +555,8 @@
* b/120426980
* Vulnerability Behaviour: SIGABRT in self
*/
- @SecurityTest(minPatchLevel = "2019-09")
@Test
+ @AsbSecurityTest(cveBugId = 120426980)
public void testPocCVE_2019_9362() throws Exception {
String signals[] = {CrashUtils.SIGSEGV, CrashUtils.SIGBUS, CrashUtils.SIGABRT};
String binaryName = "CVE-2019-9362";
@@ -570,8 +570,8 @@
* b/112661742
* Vulnerability Behaviour: SIGABRT in self
*/
- @SecurityTest(minPatchLevel = "2019-09")
@Test
+ @AsbSecurityTest(cveBugId = 112661742)
public void testPocCVE_2019_9308() throws Exception {
String inputFiles[] = {"cve_2019_9308.mp4"};
String binaryName = "CVE-2019-9308";
@@ -589,8 +589,8 @@
* b/112662995
* Vulnerability Behaviour: SIGABRT in self
*/
- @SecurityTest(minPatchLevel = "2019-09")
@Test
+ @AsbSecurityTest(cveBugId = 112662995)
public void testPocCVE_2019_9357() throws Exception {
String signals[] = {CrashUtils.SIGSEGV, CrashUtils.SIGBUS, CrashUtils.SIGABRT};
String binaryName = "CVE-2019-9357";
@@ -604,8 +604,8 @@
* b/109891727
* Vulnerability Behaviour: SIGSEGV in media.codec
*/
- @SecurityTest(minPatchLevel = "2019-09")
@Test
+ @AsbSecurityTest(cveBugId = 109891727)
public void testPocCVE_2019_9347() throws Exception {
pocPusher.only32();
String processPatternStrings[] = {"media\\.codec", "omx@\\d+?\\.\\d+?-service"};
diff --git a/tests/app/src/android/app/cts/ActivityManagerFgsBgStartTest.java b/tests/app/src/android/app/cts/ActivityManagerFgsBgStartTest.java
index 33f6907..74728a1 100644
--- a/tests/app/src/android/app/cts/ActivityManagerFgsBgStartTest.java
+++ b/tests/app/src/android/app/cts/ActivityManagerFgsBgStartTest.java
@@ -57,7 +57,7 @@
import android.os.PowerExemptionManager;
import android.os.SystemClock;
import android.permission.cts.PermissionUtils;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.provider.DeviceConfig;
import android.provider.Settings;
@@ -464,7 +464,7 @@
* @throws Exception
*/
@Test
- @SecurityTest(minPatchLevel = "2021-03")
+ @AsbSecurityTest(cveBugId = 173516292)
public void testFgsLocationStartFromBGWithBind() throws Exception {
ApplicationInfo app1Info = mContext.getPackageManager().getApplicationInfo(
PACKAGE_NAME_APP1, 0);
diff --git a/tests/autofillservice/src/android/autofillservice/cts/augmented/AugmentedLoginActivityTest.java b/tests/autofillservice/src/android/autofillservice/cts/augmented/AugmentedLoginActivityTest.java
index 4c1776e..47db989 100644
--- a/tests/autofillservice/src/android/autofillservice/cts/augmented/AugmentedLoginActivityTest.java
+++ b/tests/autofillservice/src/android/autofillservice/cts/augmented/AugmentedLoginActivityTest.java
@@ -312,17 +312,13 @@
// Trigger autofill
mActivity.onUsername(View::requestFocus);
sReplier.assertOnFillRequestNotCalled();
- final AugmentedFillRequest request = sAugmentedReplier.getNextFillRequest();
-
- // Assert request
- assertBasicRequestInfo(request, mActivity, expectedFocusedId, expectedFocusedValue);
-
- // Make sure standard Autofill UI is not shown.
- mUiBot.assertNoDatasetsEver();
-
// Make sure Augmented Autofill UI is not shown.
mAugmentedUiBot.assertUiNeverShown();
+ // Assert request
+ final AugmentedFillRequest request = sAugmentedReplier.getNextFillRequest();
+ assertBasicRequestInfo(request, mActivity, expectedFocusedId, expectedFocusedValue);
+
// Try again with reply this time on password
sReplier.addResponse(new CannedFillResponse.Builder()
.setRequiredSavableIds(SAVE_DATA_TYPE_PASSWORD, ID_USERNAME, ID_PASSWORD)
@@ -332,34 +328,14 @@
.setPresentation(createPresentation("The Dude"))
.build())
.build());
- mActivity.expectAutoFill("dude", "sweet");
-
// Trigger autofill on password instead
mActivity.onPassword(View::requestFocus);
- final FillRequest fillRequest = sReplier.getNextFillRequest();
+ sReplier.getNextFillRequest();
mAugmentedUiBot.assertUiNeverShown();
+ mActivity.expectAutoFill("dude", "sweet");
mUiBot.selectDataset("The Dude");
mActivity.assertAutoFilled();
-
- // Now force save to make sure the values changes are notified
- mActivity.onUsername((v) -> v.setText("malkovich"));
- mActivity.onPassword((v) -> v.setText("malkovich"));
- final String expectedMessage = getWelcomeMessage("malkovich");
- final String actualMessage = mActivity.tapLogin();
- assertWithMessage("Wrong welcome msg").that(actualMessage).isEqualTo(expectedMessage);
-
- // Assert the snack bar is shown and tap "Save".
- mUiBot.updateForAutofill(true, SAVE_DATA_TYPE_PASSWORD);
- final SaveRequest saveRequest = sReplier.getNextSaveRequest();
- sReplier.assertNoUnhandledSaveRequests();
- assertThat(saveRequest.datasetIds).isNull();
-
- // Assert value of expected fields - should not be sanitized.
- final ViewNode usernameNode = findNodeByResourceId(saveRequest.structure, ID_USERNAME);
- assertTextAndValue(usernameNode, "malkovich");
- final ViewNode passwordNode = findNodeByResourceId(saveRequest.structure, ID_PASSWORD);
- assertTextAndValue(passwordNode, "malkovich");
}
@Presubmit
diff --git a/tests/camera/src/android/hardware/camera2/cts/CameraExtensionSessionTest.java b/tests/camera/src/android/hardware/camera2/cts/CameraExtensionSessionTest.java
index 1b69165..d181f9e 100644
--- a/tests/camera/src/android/hardware/camera2/cts/CameraExtensionSessionTest.java
+++ b/tests/camera/src/android/hardware/camera2/cts/CameraExtensionSessionTest.java
@@ -191,25 +191,18 @@
List<Size> extensionSizes = extensionChars.getExtensionSupportedSizes(extension,
mSurfaceTexture.getClass());
Size maxSize = CameraTestUtils.getMaxSize(extensionSizes.toArray(new Size[0]));
- ImageReader privateReader = CameraTestUtils.makeImageReader(maxSize,
- ImageFormat.PRIVATE, /*maxImages*/ 3, new ImageDropperListener(),
- mTestRule.getHandler());
- OutputConfiguration privateOutput = new OutputConfiguration(
- OutputConfiguration.SURFACE_GROUP_ID_NONE, privateReader.getSurface());
- List<OutputConfiguration> outputConfigs = new ArrayList<>();
- outputConfigs.add(privateOutput);
- BlockingSessionCallback regularSessionListener = new BlockingSessionCallback(
- mock(CameraCaptureSession.StateCallback.class));
- SessionConfiguration regularConfiguration = new SessionConfiguration(
- SessionConfiguration.SESSION_REGULAR, outputConfigs,
- new HandlerExecutor(mTestRule.getHandler()), regularSessionListener);
-
mSurfaceTexture.setDefaultBufferSize(maxSize.getWidth(), maxSize.getHeight());
Surface repeatingSurface = new Surface(mSurfaceTexture);
OutputConfiguration textureOutput = new OutputConfiguration(
OutputConfiguration.SURFACE_GROUP_ID_NONE, repeatingSurface);
List<OutputConfiguration> outputs = new ArrayList<>();
outputs.add(textureOutput);
+ BlockingSessionCallback regularSessionListener = new BlockingSessionCallback(
+ mock(CameraCaptureSession.StateCallback.class));
+ SessionConfiguration regularConfiguration = new SessionConfiguration(
+ SessionConfiguration.SESSION_REGULAR, outputs,
+ new HandlerExecutor(mTestRule.getHandler()), regularSessionListener);
+
BlockingExtensionSessionCallback sessionListener =
new BlockingExtensionSessionCallback(mock(
CameraExtensionSession.StateCallback.class));
@@ -242,7 +235,6 @@
SESSION_CLOSE_TIMEOUT_MS);
} finally {
mTestRule.closeDevice(id);
- mTestRule.closeImageReader(privateReader);
}
}
}
@@ -266,25 +258,18 @@
List<Size> extensionSizes = extensionChars.getExtensionSupportedSizes(extension,
mSurfaceTexture.getClass());
Size maxSize = CameraTestUtils.getMaxSize(extensionSizes.toArray(new Size[0]));
- ImageReader privateReader = CameraTestUtils.makeImageReader(maxSize,
- ImageFormat.PRIVATE, /*maxImages*/ 3, new ImageDropperListener(),
- mTestRule.getHandler());
- OutputConfiguration privateOutput = new OutputConfiguration(
- OutputConfiguration.SURFACE_GROUP_ID_NONE, privateReader.getSurface());
- List<OutputConfiguration> outputConfigs = new ArrayList<>();
- outputConfigs.add(privateOutput);
- BlockingSessionCallback regularSessionListener = new BlockingSessionCallback(
- mock(CameraCaptureSession.StateCallback.class));
- SessionConfiguration regularConfiguration = new SessionConfiguration(
- SessionConfiguration.SESSION_REGULAR, outputConfigs,
- new HandlerExecutor(mTestRule.getHandler()), regularSessionListener);
-
mSurfaceTexture.setDefaultBufferSize(maxSize.getWidth(), maxSize.getHeight());
Surface surface = new Surface(mSurfaceTexture);
OutputConfiguration textureOutput = new OutputConfiguration(
OutputConfiguration.SURFACE_GROUP_ID_NONE, surface);
List<OutputConfiguration> outputs = new ArrayList<>();
outputs.add(textureOutput);
+ BlockingSessionCallback regularSessionListener = new BlockingSessionCallback(
+ mock(CameraCaptureSession.StateCallback.class));
+ SessionConfiguration regularConfiguration = new SessionConfiguration(
+ SessionConfiguration.SESSION_REGULAR, outputs,
+ new HandlerExecutor(mTestRule.getHandler()), regularSessionListener);
+
BlockingExtensionSessionCallback sessionListener =
new BlockingExtensionSessionCallback(mock(
CameraExtensionSession.StateCallback.class));
@@ -313,7 +298,6 @@
BlockingSessionCallback.SESSION_CLOSED, SESSION_CLOSE_TIMEOUT_MS);
} finally {
mTestRule.closeDevice(id);
- mTestRule.closeImageReader(privateReader);
}
}
}
diff --git a/tests/camera/src/android/hardware/camera2/cts/ZoomCaptureTest.java b/tests/camera/src/android/hardware/camera2/cts/ZoomCaptureTest.java
index 9fb12d3..61dde71 100644
--- a/tests/camera/src/android/hardware/camera2/cts/ZoomCaptureTest.java
+++ b/tests/camera/src/android/hardware/camera2/cts/ZoomCaptureTest.java
@@ -26,6 +26,7 @@
import android.hardware.camera2.CaptureResult;
import android.media.Image;
import android.media.ImageReader;
+import android.os.Build;
import android.os.ConditionVariable;
import android.util.Log;
import android.util.Size;
@@ -35,6 +36,8 @@
import java.util.List;
import java.util.Set;
+import com.android.compatibility.common.util.PropertyUtil;
+
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.Test;
@@ -121,6 +124,8 @@
outputConfigs, CameraDevice.TEMPLATE_PREVIEW);
Set<String> activePhysicalIdsSeen = new HashSet<String>();
+ boolean checkActivePhysicalIdConsistency =
+ PropertyUtil.getFirstApiLevel() >= Build.VERSION_CODES.S;
for (Float zoomRatio : candidateZoomRatios) {
if (VERBOSE) {
Log.v(TAG, "Testing format " + format + " zoomRatio " + zoomRatio +
@@ -146,17 +151,20 @@
CaptureResult result = listener.getCaptureResult(CAPTURE_RESULT_TIMEOUT_MS);
String activePhysicalId = result.get(
CaptureResult.LOGICAL_MULTI_CAMERA_ACTIVE_PHYSICAL_ID);
- assertNotNull("Camera " + mCamera.getId() + " result metadata must contain " +
- "ACTIVE_PHYSICAL_ID", activePhysicalId);
- assertTrue("Camera " + mCamera.getId() + " must be logical " +
- "camera if activePhysicalId exists in capture result",
- physicalCameraIds != null && physicalCameraIds.size() != 0);
- mCollector.expectTrue("Camera " + mCamera.getId() + " activePhysicalId " +
- activePhysicalId + "must be among valid physical Ids " +
- physicalCameraIds.toString(),
- physicalCameraIds.contains(activePhysicalId));
+ if (checkActivePhysicalIdConsistency) {
+ assertNotNull("Camera " + mCamera.getId() +
+ " result metadata must contain ACTIVE_PHYSICAL_ID",
+ activePhysicalId);
+ assertTrue("Camera " + mCamera.getId() + " must be logical " +
+ "camera if activePhysicalId exists in capture result",
+ physicalCameraIds != null && physicalCameraIds.size() != 0);
+ mCollector.expectTrue("Camera " + mCamera.getId() + " activePhysicalId " +
+ activePhysicalId + "must be among valid physical Ids " +
+ physicalCameraIds.toString(),
+ physicalCameraIds.contains(activePhysicalId));
- activePhysicalIdsSeen.add(activePhysicalId);
+ activePhysicalIdsSeen.add(activePhysicalId);
+ }
}
}
// stop capture.
diff --git a/tests/framework/base/windowmanager/app/AndroidManifest.xml b/tests/framework/base/windowmanager/app/AndroidManifest.xml
index e808184..72a5aac 100755
--- a/tests/framework/base/windowmanager/app/AndroidManifest.xml
+++ b/tests/framework/base/windowmanager/app/AndroidManifest.xml
@@ -612,6 +612,7 @@
android:exported="true"
android:theme="@style/BadBlurryDialog"/>
+ <!-- Splash Screen Test Activities -->
<activity android:name=".HandleSplashScreenExitActivity"
android:theme="@style/ShowBrandingTheme"
android:configChanges="uiMode"
diff --git a/tests/framework/base/windowmanager/app/res/values/styles.xml b/tests/framework/base/windowmanager/app/res/values/styles.xml
index ced732b..0c9df63 100644
--- a/tests/framework/base/windowmanager/app/res/values/styles.xml
+++ b/tests/framework/base/windowmanager/app/res/values/styles.xml
@@ -85,6 +85,7 @@
</style>
<style name="ShowBrandingTheme" parent="@android:style/Theme.Material.NoActionBar">
<item name="android:windowSplashScreenBrandingImage">@drawable/branding</item>
+ <item name="android:windowSplashScreenAnimatedIcon">@drawable/start</item>
<item name="android:windowSplashScreenIconBackgroundColor">@drawable/blue</item>
</style>
diff --git a/tests/framework/base/windowmanager/app/src/android/server/wm/app/HandleSplashScreenExitActivity.java b/tests/framework/base/windowmanager/app/src/android/server/wm/app/HandleSplashScreenExitActivity.java
index 0812067..c8e2140 100644
--- a/tests/framework/base/windowmanager/app/src/android/server/wm/app/HandleSplashScreenExitActivity.java
+++ b/tests/framework/base/windowmanager/app/src/android/server/wm/app/HandleSplashScreenExitActivity.java
@@ -32,14 +32,20 @@
import android.app.UiModeManager;
import android.content.Context;
import android.content.res.Configuration;
+import android.graphics.Bitmap;
+import android.graphics.Color;
+import android.graphics.drawable.BitmapDrawable;
+import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.server.wm.TestJournalProvider;
+import android.util.Log;
import android.window.SplashScreen;
public class HandleSplashScreenExitActivity extends Activity {
private SplashScreen mSSM;
private UiModeManager mUiModeManager;
private boolean mReportSplashScreenNightMode;
+
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -62,7 +68,14 @@
final boolean containsCenter = view.getIconView() != null;
final boolean containsBranding = view.getBrandingView() != null
&& view.getBrandingView().getBackground() != null;
- final int iconBackground = view.getIconBackgroundColor();
+ Drawable background = view.getIconView().getBackground();
+ final int iconBackground;
+ if (background != null) {
+ Bitmap bitmap = ((BitmapDrawable) background).getBitmap();
+ iconBackground = bitmap.getPixel(bitmap.getWidth() / 2, bitmap.getHeight() / 2);
+ } else {
+ iconBackground = Color.TRANSPARENT;
+ }
TestJournalProvider.putExtras(baseContext, HANDLE_SPLASH_SCREEN_EXIT, bundle -> {
bundle.putBoolean(RECEIVE_SPLASH_SCREEN_EXIT, true);
bundle.putBoolean(CONTAINS_CENTER_VIEW, containsCenter);
diff --git a/tests/framework/base/windowmanager/src/android/server/wm/CompatChangeTests.java b/tests/framework/base/windowmanager/src/android/server/wm/CompatChangeTests.java
index 6fa58b6..3e42a42 100644
--- a/tests/framework/base/windowmanager/src/android/server/wm/CompatChangeTests.java
+++ b/tests/framework/base/windowmanager/src/android/server/wm/CompatChangeTests.java
@@ -31,6 +31,7 @@
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
+import static org.junit.Assume.assumeFalse;
import android.app.Activity;
import android.compat.testing.PlatformCompatChangeRule;
@@ -614,9 +615,15 @@
* Resize the display and ensure configuration changes are complete.
*/
private void resizeDisplay(ComponentName activity, double sizeRatio) {
+ Size originalDisplaySize = mDisplayMetricsSession.getInitialDisplayMetrics().getSize();
final Rect originalTaskBounds = mWmState.getTaskByActivity(activity).getBounds();
mDisplayMetricsSession.changeDisplayMetrics(sizeRatio, /* densityRatio= */ 1);
mWmState.computeState(new WaitForValidActivityState(activity));
+
+ Size currentDisplaySize = mDisplayMetricsSession.getDisplayMetrics().getSize();
+ assumeFalse("If a display size is capped, resizing may be a no-op",
+ originalDisplaySize.equals(currentDisplaySize));
+
// Ensure configuration changes are complete after resizing the display.
waitForTaskBoundsChanged(activity, originalTaskBounds);
}
diff --git a/tests/framework/base/windowmanager/src/android/server/wm/MultiDisplayTestBase.java b/tests/framework/base/windowmanager/src/android/server/wm/MultiDisplayTestBase.java
index e145c52..13c6055 100644
--- a/tests/framework/base/windowmanager/src/android/server/wm/MultiDisplayTestBase.java
+++ b/tests/framework/base/windowmanager/src/android/server/wm/MultiDisplayTestBase.java
@@ -182,12 +182,16 @@
private static final Pattern OVERRIDE_DENSITY =
Pattern.compile("Override density: (\\d+)");
+ /** The size of the physical display. */
@NonNull
final Size physicalSize;
+ /** The density of the physical display. */
final int physicalDensity;
+ /** The pre-existing size override applied to a logical display. */
@Nullable
final Size overrideSize;
+ /** The pre-existing density override applied to a logical display. */
@Nullable
final Integer overrideDensity;
@@ -300,8 +304,21 @@
}
void changeDisplayMetrics(double sizeRatio, double densityRatio) {
- final Size originalSize = mInitialDisplayMetrics.physicalSize;
- final int density = mInitialDisplayMetrics.physicalDensity;
+ // Given a display may already have an override applied before the test is begun,
+ // resize based upon the override.
+ final Size originalSize;
+ final int density;
+ if (mInitialDisplayMetrics.overrideSize != null) {
+ originalSize = mInitialDisplayMetrics.overrideSize;
+ } else {
+ originalSize = mInitialDisplayMetrics.physicalSize;
+ }
+
+ if (mInitialDisplayMetrics.overrideDensity != null) {
+ density = mInitialDisplayMetrics.overrideDensity;
+ } else {
+ density = mInitialDisplayMetrics.physicalDensity;
+ }
final Size overrideSize = new Size((int)(originalSize.getWidth() * sizeRatio),
(int)(originalSize.getHeight() * sizeRatio));
diff --git a/tests/framework/base/windowmanager/src/android/server/wm/PinnedStackTests.java b/tests/framework/base/windowmanager/src/android/server/wm/PinnedStackTests.java
index 881aab8..aa17c5e 100644
--- a/tests/framework/base/windowmanager/src/android/server/wm/PinnedStackTests.java
+++ b/tests/framework/base/windowmanager/src/android/server/wm/PinnedStackTests.java
@@ -106,7 +106,7 @@
import android.os.Looper;
import android.os.RemoteCallback;
import android.platform.test.annotations.Presubmit;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.provider.Settings;
import android.server.wm.CommandSession.ActivityCallback;
import android.server.wm.CommandSession.SizeInfo;
@@ -286,7 +286,7 @@
}
@Test
- @SecurityTest(minPatchLevel="2021-03")
+ @AsbSecurityTest(cveBugId = 174302616)
public void testEnterPipWithTinyMinimalSize() {
// Launch a PiP activity with minimal size specified and smaller than allowed minimum
launchActivity(PIP_ACTIVITY_WITH_TINY_MINIMAL_SIZE, extraString(EXTRA_ENTER_PIP, "true"));
diff --git a/tests/framework/base/windowmanager/src/android/server/wm/SplashscreenTests.java b/tests/framework/base/windowmanager/src/android/server/wm/SplashscreenTests.java
index 94f0a68..bd70052 100644
--- a/tests/framework/base/windowmanager/src/android/server/wm/SplashscreenTests.java
+++ b/tests/framework/base/windowmanager/src/android/server/wm/SplashscreenTests.java
@@ -319,6 +319,7 @@
assumeFalse(isLeanBack());
launchRuntimeHandleExitAnimationActivity(false, true, false, true);
}
+
@Test
public void testHandleExitAnimationCancel() throws Exception {
assumeFalse(isLeanBack());
@@ -339,12 +340,17 @@
mWmState.assertVisibility(HANDLE_SPLASH_SCREEN_EXIT_ACTIVITY, true);
final TestJournalProvider.TestJournal journal =
TestJournalProvider.TestJournalContainer.get(HANDLE_SPLASH_SCREEN_EXIT);
- TestUtils.waitUntil("Waiting for runtime onSplashScreenExit", 5 /* timeoutSecond */,
- () -> expectResult == journal.extras.getBoolean(RECEIVE_SPLASH_SCREEN_EXIT));
- assertEquals(expectResult, journal.extras.getBoolean(CONTAINS_CENTER_VIEW));
- assertEquals(expectResult, journal.extras.getBoolean(CONTAINS_BRANDING_VIEW));
- assertEquals(expectResult ? Color.BLUE : Color.TRANSPARENT,
- journal.extras.getInt(ICON_BACKGROUND_COLOR));
+ if (expectResult) {
+ TestUtils.waitUntil("Waiting for runtime onSplashScreenExit", 5 /* timeoutSecond */,
+ () -> journal.extras.getBoolean(RECEIVE_SPLASH_SCREEN_EXIT));
+ assertTrue("No entry for CONTAINS_CENTER_VIEW",
+ journal.extras.containsKey(CONTAINS_CENTER_VIEW));
+ assertTrue("No entry for CONTAINS_BRANDING_VIEW",
+ journal.extras.containsKey(CONTAINS_BRANDING_VIEW));
+ assertTrue("Center View shouldn't be null", journal.extras.getBoolean(CONTAINS_CENTER_VIEW));
+ assertTrue(journal.extras.getBoolean(CONTAINS_BRANDING_VIEW));
+ assertEquals(Color.BLUE, journal.extras.getInt(ICON_BACKGROUND_COLOR, Color.YELLOW));
+ }
}
@Test
diff --git a/tests/libcore/okhttp/Android.bp b/tests/libcore/okhttp/Android.bp
index 2857328..b481dd5 100644
--- a/tests/libcore/okhttp/Android.bp
+++ b/tests/libcore/okhttp/Android.bp
@@ -16,8 +16,8 @@
default_applicable_licenses: ["Android-Apache-2.0"],
}
-android_test {
- name: "CtsLibcoreOkHttpTestCases",
+java_defaults {
+ name: "libcore_okhttp_test_cases_defaults",
defaults: ["cts_support_defaults"],
platform_apis: true,
min_sdk_version: "29",
@@ -40,10 +40,28 @@
// Include both the 32 and 64 bit versions of libjavacoretests,
// where applicable.
compile_multilib: "both",
+}
+
+// Tests used in CTS and in Conscrypt MTS.
+android_test {
+ name: "CtsLibcoreOkHttpTestCases",
+ defaults: ["libcore_okhttp_test_cases_defaults"],
// Tag this module as a cts test artifact
test_suites: [
"cts",
"general-tests",
"mts-conscrypt",
],
+ test_config: "CtsLibcoreOkHttpTestCases.xml"
+}
+
+// Tests used in ART MTS.
+android_test {
+ name: "MtsLibcoreOkHttpTestCases",
+ defaults: ["libcore_okhttp_test_cases_defaults"],
+ test_suites: [
+ "general-tests",
+ "mts-art",
+ ],
+ test_config: "MtsLibcoreOkHttpTestCases.xml"
}
diff --git a/tests/libcore/okhttp/AndroidTest.xml b/tests/libcore/okhttp/CtsLibcoreOkHttpTestCases.xml
similarity index 100%
rename from tests/libcore/okhttp/AndroidTest.xml
rename to tests/libcore/okhttp/CtsLibcoreOkHttpTestCases.xml
diff --git a/tests/libcore/okhttp/MtsLibcoreOkHttpTestCases.xml b/tests/libcore/okhttp/MtsLibcoreOkHttpTestCases.xml
new file mode 100644
index 0000000..8219e38c
--- /dev/null
+++ b/tests/libcore/okhttp/MtsLibcoreOkHttpTestCases.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+<configuration description="Config for MTS Libcore OkHttp test cases">
+ <option name="config-descriptor:metadata" key="component" value="libcore" />
+ <option name="config-descriptor:metadata" key="parameter" value="multi_abi" />
+ <!-- Test is eligible to run on Android Multiuser users other than SYSTEM.
+ See source.android.com/devices/tech/admin/multi-user#user_types -->
+ <option name="config-descriptor:metadata" key="parameter" value="secondary_user" />
+ <option name="config-descriptor:metadata" key="parameter" value="not_instant_app" />
+ <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
+ <!-- This MTS test module requires wifi, ensure wifi is on -->
+ <option name="run-command" value="settings put global wifi_on 1" />
+ <option name="run-command" value="svc wifi enable" />
+ <option name="run-command" value="mkdir -p /data/local/tmp/ctslibcore/java.io.tmpdir" />
+ <option name="run-command" value="mkdir -p /data/local/tmp/ctslibcore/user.home" />
+ <option name="teardown-command" value="rm -rf /data/local/tmp/ctslibcore" />
+ </target_preparer>
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
+ <option name="cleanup-apks" value="true" />
+ <!-- this has just the instrumentation which acts as the tests we want to run -->
+ <option name="test-file-name" value="MtsLibcoreOkHttpTestCases.apk" />
+ </target_preparer>
+ <test class="com.android.compatibility.testtype.LibcoreTest" >
+ <option name="package" value="android.libcore.cts.okhttp" />
+ <option name="instrumentation-arg" key="filter"
+ value="com.android.cts.core.runner.ExpectationBasedFilter" />
+ <option name="core-expectation" value="/knownfailures.txt" />
+ <option name="runtime-hint" value="15m"/>
+ <!-- 20x default timeout of 600sec -->
+ <option name="shell-timeout" value="12000000"/>
+ <option name="hidden-api-checks" value="false"/>
+ </test>
+
+ <object type="module_controller" class="com.android.tradefed.testtype.suite.module.TestFailureModuleController">
+ <option name="screenshot-on-failure" value="false" />
+ </object>
+
+ <!-- When this test is run in a Mainline context (e.g. with `mts-tradefed`), only enable it if
+ one of the Mainline modules below is present on the device used for testing. -->
+ <object type="module_controller" class="com.android.tradefed.testtype.suite.module.MainlineTestModuleController">
+ <!-- ART Mainline Module (internal version). -->
+ <option name="mainline-module-package-name" value="com.google.android.art" />
+ <!-- ART Mainline Module (external (AOSP) version). -->
+ <option name="mainline-module-package-name" value="com.android.art" />
+ </object>
+</configuration>
diff --git a/tests/tests/car/AndroidTest.xml b/tests/tests/car/AndroidTest.xml
index ddbc16a..35acd99 100644
--- a/tests/tests/car/AndroidTest.xml
+++ b/tests/tests/car/AndroidTest.xml
@@ -26,8 +26,9 @@
<target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
<option name="cleanup-apks" value="true"/>
<option name="test-file-name" value="CtsCarTestCases.apk"/>
- <option name="test-file-name" value="CtsCarPermissionCarInfoTest.apk"/>
<option name="test-file-name" value="CtsCarNoPropertyPermissionsTest.apk"/>
+ <option name="test-file-name" value="CtsCarPermissionCarInfoTest.apk"/>
+ <option name="test-file-name" value="CtsCarPermissionCarEnergyTest.apk"/>
</target_preparer>
<test class="com.android.tradefed.testtype.AndroidJUnitTest">
@@ -43,4 +44,9 @@
<option name="class"
value="android.car.cts.permissioncarinfo.PermissionCarInfoTest"/>
</test>
+ <test class="com.android.tradefed.testtype.AndroidJUnitTest">
+ <option name="package" value="android.car.cts.permissioncarenergy"/>
+ <option name="class"
+ value="android.car.cts.permissioncarenergy.PermissionCarEnergyTest"/>
+ </test>
</configuration>
diff --git a/tests/tests/permission4/AppThatAccessesMic/Android.bp b/tests/tests/car/PermissionCarEnergy/Android.bp
similarity index 71%
copy from tests/tests/permission4/AppThatAccessesMic/Android.bp
copy to tests/tests/car/PermissionCarEnergy/Android.bp
index f56600d..36f4a0a 100644
--- a/tests/tests/permission4/AppThatAccessesMic/Android.bp
+++ b/tests/tests/car/PermissionCarEnergy/Android.bp
@@ -1,5 +1,4 @@
-//
-// Copyright (C) 2020 The Android Open Source Project
+// 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.
@@ -12,30 +11,30 @@
// 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: "CtsAppThatAccessesMicPermission",
+ name: "CtsCarPermissionCarEnergyTest",
defaults: ["cts_defaults"],
- sdk_version: "test_current",
+ sdk_version: "current",
+ srcs: [
+ "src/**/*.java",
+ ],
// Tag this module as a cts test artifact
test_suites: [
"cts",
- "vts10",
"general-tests",
],
-
static_libs: [
- "androidx.test.rules",
- "kotlin-stdlib",
- "kotlinx-coroutines-android",
+ "compatibility-device-util-axt",
+ "truth-prebuilt",
+ "ctstestrunner-axt",
],
-
- srcs: [
- "src/**/*.kt"
+ libs: [
+ "android.test.base",
+ "android.car-test-stubs",
],
-}
+}
\ No newline at end of file
diff --git a/tests/tests/car/PermissionCarEnergy/AndroidManifest.xml b/tests/tests/car/PermissionCarEnergy/AndroidManifest.xml
new file mode 100644
index 0000000..d1c2423
--- /dev/null
+++ b/tests/tests/car/PermissionCarEnergy/AndroidManifest.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ 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.
+ -->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="android.car.cts.permissioncarenergy">
+ <application android:label="PermissionCarEnergy">
+ <uses-library android:name="android.test.runner"/>
+ </application>
+
+ <instrumentation android:name="androidx.test.runner.AndroidJUnitRunner"
+ android:functionalTest="true"
+ android:label="Permission CAR_ENERGY Test"
+ android:targetPackage="android.car.cts.permissioncarenergy">
+ </instrumentation>
+
+ <uses-feature android:name="android.hardware.type.automotive"/>
+
+ <uses-permission android:name="android.car.permission.CAR_ENERGY"/>
+</manifest>
\ No newline at end of file
diff --git a/tests/tests/car/PermissionCarEnergy/src/android/car/cts/permissioncarenergy/PermissionCarEnergyTest.java b/tests/tests/car/PermissionCarEnergy/src/android/car/cts/permissioncarenergy/PermissionCarEnergyTest.java
new file mode 100644
index 0000000..151d78c
--- /dev/null
+++ b/tests/tests/car/PermissionCarEnergy/src/android/car/cts/permissioncarenergy/PermissionCarEnergyTest.java
@@ -0,0 +1,68 @@
+/*
+ * 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.car.cts.permissioncarenergy;
+
+import static com.google.common.truth.Truth.assertThat;
+import static com.google.common.truth.Truth.assertWithMessage;
+
+import android.car.Car;
+import android.car.VehiclePropertyIds;
+import android.car.hardware.CarPropertyConfig;
+import android.car.hardware.property.CarPropertyManager;
+import android.platform.test.annotations.AppModeFull;
+import android.platform.test.annotations.RequiresDevice;
+
+import androidx.test.platform.app.InstrumentationRegistry;
+import androidx.test.runner.AndroidJUnit4;
+
+import com.google.common.collect.ImmutableList;
+
+import org.junit.Test;
+import org.junit.Before;
+import org.junit.runner.RunWith;
+
+@RequiresDevice
+@RunWith(AndroidJUnit4.class)
+@AppModeFull(reason = "Instant apps cannot get car related permissions.")
+public final class PermissionCarEnergyTest {
+ private static final ImmutableList<Integer> PERMISSION_CAR_ENERGY_PROPERTIES =
+ ImmutableList.<Integer>builder().add(
+ VehiclePropertyIds.FUEL_LEVEL, VehiclePropertyIds.EV_BATTERY_LEVEL,
+ VehiclePropertyIds.EV_BATTERY_INSTANTANEOUS_CHARGE_RATE,
+ VehiclePropertyIds.RANGE_REMAINING, VehiclePropertyIds.FUEL_LEVEL_LOW)
+ .build();
+
+ private CarPropertyManager mCarPropertyManager;
+
+ @Before
+ public void setUp() {
+ mCarPropertyManager =
+ (CarPropertyManager) Car.createCar(
+ InstrumentationRegistry.getInstrumentation().getContext()).getCarManager(
+ Car.PROPERTY_SERVICE);
+ assertThat(mCarPropertyManager).isNotNull();
+ }
+
+ @Test
+ public void testPermissionCarEnergyGranted() {
+ for (CarPropertyConfig<?> carPropertyConfig : mCarPropertyManager.getPropertyList()) {
+ assertWithMessage("%s",
+ VehiclePropertyIds.toString(carPropertyConfig.getPropertyId())).that(
+ carPropertyConfig.getPropertyId()).isIn(PERMISSION_CAR_ENERGY_PROPERTIES);
+ }
+ }
+}
\ No newline at end of file
diff --git a/tests/tests/car/src/android/car/cts/CarPropertyManagerTest.java b/tests/tests/car/src/android/car/cts/CarPropertyManagerTest.java
index 7b3a795..09bf76c 100644
--- a/tests/tests/car/src/android/car/cts/CarPropertyManagerTest.java
+++ b/tests/tests/car/src/android/car/cts/CarPropertyManagerTest.java
@@ -28,12 +28,15 @@
import android.car.VehicleAreaSeat;
import android.car.VehicleAreaType;
import android.car.VehicleAreaWheel;
+import android.car.VehicleGear;
import android.car.VehiclePropertyIds;
import android.car.cts.utils.VehiclePropertyVerifier;
import android.car.hardware.CarPropertyConfig;
import android.car.hardware.CarPropertyValue;
import android.car.hardware.property.CarPropertyManager;
import android.car.hardware.property.CarPropertyManager.CarPropertyEventCallback;
+import android.car.hardware.property.VehicleElectronicTollCollectionCardStatus;
+import android.car.hardware.property.VehicleElectronicTollCollectionCardType;
import android.platform.test.annotations.AppModeFull;
import android.platform.test.annotations.RequiresDevice;
import android.test.suitebuilder.annotation.SmallTest;
@@ -73,6 +76,15 @@
PortLocationType.FRONT_LEFT, PortLocationType.FRONT_RIGHT,
PortLocationType.REAR_RIGHT, PortLocationType.REAR_LEFT,
PortLocationType.FRONT, PortLocationType.REAR).build();
+ private static final ImmutableSet<Integer> VEHICLE_GEARS =
+ ImmutableSet.<Integer>builder().add(VehicleGear.GEAR_UNKNOWN,
+ VehicleGear.GEAR_NEUTRAL, VehicleGear.GEAR_REVERSE,
+ VehicleGear.GEAR_PARK, VehicleGear.GEAR_DRIVE,
+ VehicleGear.GEAR_FIRST, VehicleGear.GEAR_SECOND,
+ VehicleGear.GEAR_THIRD, VehicleGear.GEAR_FOURTH,
+ VehicleGear.GEAR_FIFTH, VehicleGear.GEAR_SIXTH,
+ VehicleGear.GEAR_SEVENTH, VehicleGear.GEAR_EIGHTH,
+ VehicleGear.GEAR_NINTH).build();
/** contains property Ids for the properties required by CDD */
private final ArraySet<Integer> mPropertyIds = new ArraySet<>();
private CarPropertyManager mCarPropertyManager;
@@ -196,10 +208,18 @@
VehicleAreaType.VEHICLE_AREA_TYPE_GLOBAL,
CarPropertyConfig.VEHICLE_PROPERTY_CHANGE_MODE_ONCHANGE,
Integer.class).requireProperty().setConfigArrayVerifier(
- configArray -> assertWithMessage(
- "GEAR_SELECTION config array must specify supported gears")
- .that(configArray.size())
- .isGreaterThan(0)).setCarPropertyValueVerifier(
+ configArray -> {
+ assertWithMessage(
+ "GEAR_SELECTION config array must specify supported gears")
+ .that(configArray.size())
+ .isGreaterThan(0);
+ for (Integer supportedGear : configArray) {
+ assertWithMessage(
+ "GEAR_SELECTION config array value must be a defined gear: "
+ + supportedGear).that(
+ supportedGear).isIn(VEHICLE_GEARS);
+ }
+ }).setCarPropertyValueVerifier(
(carPropertyConfig, carPropertyValue) -> assertWithMessage(
"GEAR_SELECTION Integer value must be listed as supported gear in "
+ "configArray")
@@ -458,7 +478,7 @@
public void testInfoDriverSeatIfSupported() {
VehiclePropertyVerifier.newBuilder(VehiclePropertyIds.INFO_DRIVER_SEAT,
CarPropertyConfig.VEHICLE_PROPERTY_ACCESS_READ,
- VehicleAreaType.VEHICLE_AREA_TYPE_GLOBAL,
+ VehicleAreaType.VEHICLE_AREA_TYPE_SEAT,
CarPropertyConfig.VEHICLE_PROPERTY_CHANGE_MODE_STATIC,
Integer.class).setCarPropertyValueVerifier(
(carPropertyConfig, carPropertyValue) -> {
@@ -495,6 +515,54 @@
}
@Test
+ public void testElectronicTollCollectionCardTypeIfSupported() {
+ VehiclePropertyVerifier.newBuilder(
+ VehiclePropertyIds.ELECTRONIC_TOLL_COLLECTION_CARD_TYPE,
+ CarPropertyConfig.VEHICLE_PROPERTY_ACCESS_READ,
+ VehicleAreaType.VEHICLE_AREA_TYPE_GLOBAL,
+ CarPropertyConfig.VEHICLE_PROPERTY_CHANGE_MODE_ONCHANGE,
+ Integer.class).setCarPropertyValueVerifier(
+ (carPropertyConfig, carPropertyValue) -> {
+ Integer electronicTollCollectionCardType =
+ (Integer) carPropertyValue.getValue();
+ assertWithMessage(
+ "ELECTRONIC_TOLL_COLLECTION_CARD_TYPE value must be a valid "
+ + "VehicleElectronicTollCollectionCardType").that(
+ electronicTollCollectionCardType).isIn(ImmutableSet.builder().add(
+ VehicleElectronicTollCollectionCardType.UNKNOWN,
+ VehicleElectronicTollCollectionCardType.
+ JP_ELECTRONIC_TOLL_COLLECTION_CARD,
+ VehicleElectronicTollCollectionCardType.
+ JP_ELECTRONIC_TOLL_COLLECTION_CARD_V2).build());
+ }).build().verify(mCarPropertyManager);
+ }
+
+ @Test
+ public void testElectronicTollCollectionCardStatusIfSupported() {
+ VehiclePropertyVerifier.newBuilder(
+ VehiclePropertyIds.ELECTRONIC_TOLL_COLLECTION_CARD_STATUS,
+ CarPropertyConfig.VEHICLE_PROPERTY_ACCESS_READ,
+ VehicleAreaType.VEHICLE_AREA_TYPE_GLOBAL,
+ CarPropertyConfig.VEHICLE_PROPERTY_CHANGE_MODE_ONCHANGE,
+ Integer.class).setCarPropertyValueVerifier(
+ (carPropertyConfig, carPropertyValue) -> {
+ Integer electronicTollCollectionCardStatus =
+ (Integer) carPropertyValue.getValue();
+ assertWithMessage(
+ "ELECTRONIC_TOLL_COLLECTION_CARD_STATUS value must be a valid "
+ + "VehicleElectronicTollCollectionCardStatus").that(
+ electronicTollCollectionCardStatus).isIn(ImmutableSet.builder().add(
+ VehicleElectronicTollCollectionCardStatus.UNKNOWN,
+ VehicleElectronicTollCollectionCardStatus.
+ ELECTRONIC_TOLL_COLLECTION_CARD_VALID,
+ VehicleElectronicTollCollectionCardStatus.
+ ELECTRONIC_TOLL_COLLECTION_CARD_INVALID,
+ VehicleElectronicTollCollectionCardStatus.
+ ELECTRONIC_TOLL_COLLECTION_CARD_NOT_INSERTED).build());
+ }).build().verify(mCarPropertyManager);
+ }
+
+ @Test
public void testEnvOutsideTemperatureIfSupported() {
VehiclePropertyVerifier.newBuilder(VehiclePropertyIds.ENV_OUTSIDE_TEMPERATURE,
CarPropertyConfig.VEHICLE_PROPERTY_ACCESS_READ,
@@ -510,10 +578,18 @@
VehicleAreaType.VEHICLE_AREA_TYPE_GLOBAL,
CarPropertyConfig.VEHICLE_PROPERTY_CHANGE_MODE_ONCHANGE,
Integer.class).setConfigArrayVerifier(
- configArray -> assertWithMessage(
- "CURRENT_GEAR config array must specify supported gears")
- .that(configArray.size())
- .isGreaterThan(0)).setCarPropertyValueVerifier(
+ configArray -> {
+ assertWithMessage(
+ "CURRENT_GEAR config array must specify supported gears")
+ .that(configArray.size())
+ .isGreaterThan(0);
+ for (Integer supportedGear : configArray) {
+ assertWithMessage(
+ "CURRENT_GEAR config array value must be a defined gear: "
+ + supportedGear).that(
+ supportedGear).isIn(VEHICLE_GEARS);
+ }
+ }).setCarPropertyValueVerifier(
(carPropertyConfig, carPropertyValue) -> assertWithMessage(
"CURRENT_GEAR Integer value must be listed as supported gear in "
+ "configArray")
diff --git a/tests/tests/car/src/android/car/cts/utils/VehiclePropertyVerifier.java b/tests/tests/car/src/android/car/cts/utils/VehiclePropertyVerifier.java
index cb713d4..40222dd 100644
--- a/tests/tests/car/src/android/car/cts/utils/VehiclePropertyVerifier.java
+++ b/tests/tests/car/src/android/car/cts/utils/VehiclePropertyVerifier.java
@@ -29,8 +29,13 @@
import com.google.common.collect.ImmutableSet;
+import java.util.ArrayList;
+import java.util.Arrays;
import java.util.List;
import java.util.Optional;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.Collectors;
public class VehiclePropertyVerifier<T> {
private final int mPropertyId;
@@ -122,7 +127,37 @@
}
verifyCarPropertyConfig(carPropertyConfig);
- verifyCarPropertyValue(carPropertyConfig, carPropertyManager);
+ verifyCarPropertyValueGetter(carPropertyConfig, carPropertyManager);
+ verifyCarPropertyValueCallback(carPropertyConfig, carPropertyManager);
+ }
+
+ private void verifyCarPropertyValueCallback(CarPropertyConfig<?> carPropertyConfig,
+ CarPropertyManager carPropertyManager) {
+ if (mChangeMode == CarPropertyConfig.VEHICLE_PROPERTY_CHANGE_MODE_STATIC
+ || mChangeMode == CarPropertyConfig.VEHICLE_PROPERTY_CHANGE_MODE_ONCHANGE) {
+ NonContinuousCarPropertyValueCallback nonContinuousCarPropertyValueCallback =
+ new NonContinuousCarPropertyValueCallback(mPropertyName,
+ carPropertyConfig.getAreaIds().length);
+ assertWithMessage("Failed to register callback for " + mPropertyName).that(
+ carPropertyManager.registerCallback(nonContinuousCarPropertyValueCallback,
+ mPropertyId, CarPropertyManager.SENSOR_RATE_ONCHANGE)).isTrue();
+ List<CarPropertyValue<?>> carPropertyValues =
+ nonContinuousCarPropertyValueCallback.getCarPropertyValues();
+ carPropertyManager.unregisterCallback(nonContinuousCarPropertyValueCallback,
+ mPropertyId);
+
+ for (CarPropertyValue<?> carPropertyValue : carPropertyValues) {
+ verifyCarPropertyValue(carPropertyConfig, carPropertyValue,
+ carPropertyValue.getAreaId(), "Callback");
+ }
+ assertWithMessage(mPropertyName
+ + " callback values did not cover all the property's area IDs").that(
+ carPropertyValues.stream().map(CarPropertyValue::getAreaId).collect(
+ Collectors.toList())
+ ).containsExactlyElementsIn(
+ Arrays.stream(carPropertyConfig.getAreaIds()).boxed().collect(
+ Collectors.toList()));
+ }
}
private void verifyCarPropertyConfig(CarPropertyConfig<?> carPropertyConfig) {
@@ -186,43 +221,55 @@
.that(carPropertyConfig.getMinSampleRate()).isEqualTo(0);
}
- private void verifyCarPropertyValue(CarPropertyConfig<?> carPropertyConfig,
+ private void verifyCarPropertyValueGetter(CarPropertyConfig<?> carPropertyConfig,
CarPropertyManager carPropertyManager) {
for (int areaId : carPropertyConfig.getAreaIds()) {
CarPropertyValue<?> carPropertyValue =
carPropertyManager.getProperty(
mPropertyId, areaId);
- long afterElapsedTimestampNanos = SystemClock.elapsedRealtimeNanos();
- assertWithMessage(
- mPropertyName + " - areaId: " + areaId + " value must have correct property ID")
- .that(carPropertyValue.getPropertyId()).isEqualTo(mPropertyId);
- assertWithMessage(
- mPropertyName + " - areaId: " + areaId + " value must have correct area id: "
- + areaId)
- .that(carPropertyValue.getAreaId())
- .isEqualTo(areaId);
- assertWithMessage(
- mPropertyName + " - areaId: " + areaId + " value's status must be valid")
- .that(carPropertyValue.getStatus()).isIn(
- ImmutableSet.of(CarPropertyValue.STATUS_AVAILABLE,
- CarPropertyValue.STATUS_UNAVAILABLE, CarPropertyValue.STATUS_ERROR));
- assertWithMessage(mPropertyName + " - areaId: " + areaId +
- " timestamp must use the SystemClock.elapsedRealtimeNanos() time base")
- .that(carPropertyValue.getTimestamp()).isAtLeast(0);
- assertWithMessage(mPropertyName + " - areaId: " + areaId +
- " timestamp must use the SystemClock.elapsedRealtimeNanos() time base")
- .that(carPropertyValue.getTimestamp()).isLessThan(afterElapsedTimestampNanos);
- assertWithMessage(
- mPropertyName + " - areaId: " + areaId + " must return " + mPropertyType
- + " type value")
- .that(carPropertyValue.getValue().getClass()).isEqualTo(mPropertyType);
- mCarPropertyValueVerifier.ifPresent(
- propertyValueVerifier -> propertyValueVerifier.verify(carPropertyConfig,
- carPropertyValue));
+ verifyCarPropertyValue(carPropertyConfig, carPropertyValue, areaId, "Getter");
}
}
+ private void verifyCarPropertyValue(CarPropertyConfig<?> carPropertyConfig,
+ CarPropertyValue<?> carPropertyValue, int areaId, String source) {
+ assertWithMessage(
+ mPropertyName + " - areaId: " + areaId + " - source: " + source
+ + " value must have correct property ID")
+ .that(carPropertyValue.getPropertyId()).isEqualTo(mPropertyId);
+ assertWithMessage(
+ mPropertyName + " - areaId: " + areaId + " - source: " + source
+ + " value must have correct area id: "
+ + areaId)
+ .that(carPropertyValue.getAreaId())
+ .isEqualTo(areaId);
+ assertWithMessage(
+ mPropertyName + " - areaId: " + areaId + " - source: " + source
+ + " value's status must be valid")
+ .that(carPropertyValue.getStatus()).isIn(
+ ImmutableSet.of(CarPropertyValue.STATUS_AVAILABLE,
+ CarPropertyValue.STATUS_UNAVAILABLE, CarPropertyValue.STATUS_ERROR));
+ assertWithMessage(mPropertyName + " - areaId: " + areaId +
+ " - source: " + source
+ + " timestamp must use the SystemClock.elapsedRealtimeNanos() time base")
+ .that(carPropertyValue.getTimestamp()).isAtLeast(0);
+ assertWithMessage(mPropertyName + " - areaId: " + areaId +
+ " - source: " + source
+ + " timestamp must use the SystemClock.elapsedRealtimeNanos() time base")
+ .that(carPropertyValue.getTimestamp()).isLessThan(
+ SystemClock.elapsedRealtimeNanos());
+ assertWithMessage(
+ mPropertyName + " - areaId: " + areaId + " - source: " + source + " must return "
+ + mPropertyType
+ + " type value")
+ .that(carPropertyValue.getValue().getClass()).isEqualTo(mPropertyType);
+
+ mCarPropertyValueVerifier.ifPresent(
+ propertyValueVerifier -> propertyValueVerifier.verify(carPropertyConfig,
+ carPropertyValue));
+ }
+
public interface ConfigArrayVerifier {
void verify(List<Integer> configArray);
}
@@ -272,4 +319,45 @@
mRequiredProperty, mConfigArrayVerifier, mCarPropertyValueVerifier);
}
}
+
+ private static class NonContinuousCarPropertyValueCallback implements
+ CarPropertyManager.CarPropertyEventCallback {
+ private final String mPropertyName;
+ private final int mTotalAreaIds;
+ private final CountDownLatch mCountDownLatch;
+ private final List<CarPropertyValue<?>> mCarPropertyValues = new ArrayList<>();
+
+ public NonContinuousCarPropertyValueCallback(String propertyName, int totalAreaIds) {
+ mPropertyName = propertyName;
+ mTotalAreaIds = totalAreaIds;
+ mCountDownLatch = new CountDownLatch(totalAreaIds);
+ }
+
+ public List<CarPropertyValue<?>> getCarPropertyValues() {
+ try {
+ assertWithMessage("Never received " + mTotalAreaIds + " onChangeEvent(s) for "
+ + mPropertyName
+ + " callback before 1500ms timeout").that(
+ mCountDownLatch.await(1500, TimeUnit.MILLISECONDS)).isTrue();
+ } catch (InterruptedException e) {
+ assertWithMessage("Waiting for onChangeEvent callback(s) for " + mPropertyName
+ + " threw an exception: " + e).fail();
+ }
+ return mCarPropertyValues;
+ }
+
+ @Override
+ public void onChangeEvent(CarPropertyValue value) {
+ mCarPropertyValues.add(value);
+ mCountDownLatch.countDown();
+ }
+
+ @Override
+ public void onErrorEvent(int propId, int zone) {
+ }
+
+ @Override
+ public void onErrorEvent(int propId, int areaId, int errorCode) {
+ }
+ }
}
diff --git a/tests/tests/contactsprovider/src/android/provider/cts/contacts/CallLogProviderTest.java b/tests/tests/contactsprovider/src/android/provider/cts/contacts/CallLogProviderTest.java
index 648c500..c85a89b 100644
--- a/tests/tests/contactsprovider/src/android/provider/cts/contacts/CallLogProviderTest.java
+++ b/tests/tests/contactsprovider/src/android/provider/cts/contacts/CallLogProviderTest.java
@@ -23,7 +23,7 @@
import android.database.ContentObserver;
import android.database.Cursor;
import android.net.Uri;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.provider.CallLog;
import android.provider.CallLog.Calls;
import android.test.InstrumentationTestCase;
@@ -45,7 +45,7 @@
mProvider = mContentResolver.acquireContentProviderClient(CallLog.AUTHORITY);
}
- @SecurityTest(minPatchLevel="2021-05")
+ @AsbSecurityTest(cveBugId = 143230980)
public void testNoSubqueries() throws Exception {
// Add a single call just to make sure the call log has something inside
ContentValues values = new ContentValues();
diff --git a/tests/tests/content/src/android/content/cts/ContentProviderCursorWindowTest.java b/tests/tests/content/src/android/content/cts/ContentProviderCursorWindowTest.java
index 5cfd532..80f0fad 100644
--- a/tests/tests/content/src/android/content/cts/ContentProviderCursorWindowTest.java
+++ b/tests/tests/content/src/android/content/cts/ContentProviderCursorWindowTest.java
@@ -20,17 +20,17 @@
import android.database.CursorWindowAllocationException;
import android.database.sqlite.SQLiteException;
import android.net.Uri;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.test.AndroidTestCase;
import android.util.Log;
/**
* Test {@link CursorWindowContentProvider} .
*/
-@SecurityTest
public class ContentProviderCursorWindowTest extends AndroidTestCase {
private static final String TAG = "ContentProviderCursorWindowTest";
+ @AsbSecurityTest(cveBugId = 34128677)
public void testQuery() {
// First check if the system has a patch for enforcing protected Parcel data
Cursor cursor;
diff --git a/tests/tests/display/src/android/display/cts/VirtualDisplayTest.java b/tests/tests/display/src/android/display/cts/VirtualDisplayTest.java
index 051ad1a..30cfa99 100644
--- a/tests/tests/display/src/android/display/cts/VirtualDisplayTest.java
+++ b/tests/tests/display/src/android/display/cts/VirtualDisplayTest.java
@@ -42,7 +42,7 @@
import android.os.HandlerThread;
import android.os.Looper;
import android.os.SystemClock;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.provider.Settings;
import android.util.DisplayMetrics;
import android.util.Log;
@@ -155,8 +155,8 @@
* Ensures that an application can create a private virtual display and show
* its own windows on it.
*/
- @SecurityTest
@Test
+ @AsbSecurityTest(cveBugId = 141745510)
public void testPrivateVirtualDisplay() throws Exception {
VirtualDisplay virtualDisplay = mDisplayManager.createVirtualDisplay(NAME,
WIDTH, HEIGHT, DENSITY, mSurface, 0);
@@ -180,8 +180,8 @@
* Ensures that an application can create a private presentation virtual display and show
* its own windows on it.
*/
- @SecurityTest
@Test
+ @AsbSecurityTest(cveBugId = 141745510)
public void testPrivatePresentationVirtualDisplay() throws Exception {
VirtualDisplay virtualDisplay = mDisplayManager.createVirtualDisplay(NAME,
WIDTH, HEIGHT, DENSITY, mSurface,
@@ -206,8 +206,8 @@
* 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
@Test
+ @AsbSecurityTest(cveBugId = 141745510)
public void testPrivateVirtualDisplayWithDynamicSurface() throws Exception {
VirtualDisplay virtualDisplay = mDisplayManager.createVirtualDisplay(NAME,
WIDTH, HEIGHT, DENSITY, null, 0);
@@ -240,7 +240,6 @@
* be clear if an application creates an virtual display without the
* flag {@link DisplayManager#VIRTUAL_DISPLAY_FLAG_TRUSTED}.
*/
- @SecurityTest
@Test
public void testUntrustedSysDecorVirtualDisplay() throws Exception {
VirtualDisplay virtualDisplay = mDisplayManager.createVirtualDisplay(NAME,
@@ -268,7 +267,6 @@
* Ensures that throws {@link SecurityException} when an application creates a trusted virtual
* display without holding the permission {@code ADD_TRUSTED_DISPLAY}.
*/
- @SecurityTest
@Test
public void testTrustedVirtualDisplay() throws Exception {
try {
diff --git a/tests/tests/os/src/android/os/cts/ParcelTest.java b/tests/tests/os/src/android/os/cts/ParcelTest.java
index b8b7abc..46a4b0a 100644
--- a/tests/tests/os/src/android/os/cts/ParcelTest.java
+++ b/tests/tests/os/src/android/os/cts/ParcelTest.java
@@ -42,7 +42,7 @@
import android.os.Parcel;
import android.os.ParcelFileDescriptor;
import android.os.Parcelable;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.test.AndroidTestCase;
import android.util.Log;
import android.util.SparseArray;
@@ -3442,7 +3442,7 @@
assertNotNull("Service should have started without crashing.", connection.get());
}
- @SecurityTest(minPatchLevel="2020-02")
+ @AsbSecurityTest(cveBugId = 140419401)
public void testObjectResize() throws Exception {
Parcel p;
IBinder b1 = new Binder();
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 ce7878f..daec088 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
@@ -35,7 +35,7 @@
import android.os.Handler;
import android.os.Looper;
import android.platform.test.annotations.AppModeFull;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.support.test.uiautomator.By;
import android.support.test.uiautomator.UiDevice;
import android.support.test.uiautomator.UiObject2;
@@ -106,8 +106,8 @@
mContext.startActivity(intent);
}
- @SecurityTest
@Test
+ @AsbSecurityTest(cveBugId = 171221302)
public void overlaysAreSuppressedWhenConfirmingUninstall() throws Exception {
AppOpsUtils.setOpMode(mContext.getPackageName(), "SYSTEM_ALERT_WINDOW", MODE_ALLOWED);
diff --git a/tests/tests/permission/src/android/permission/cts/DuplicatePermissionDefinitionsTest.kt b/tests/tests/permission/src/android/permission/cts/DuplicatePermissionDefinitionsTest.kt
index ff18a05..66f3ad7 100644
--- a/tests/tests/permission/src/android/permission/cts/DuplicatePermissionDefinitionsTest.kt
+++ b/tests/tests/permission/src/android/permission/cts/DuplicatePermissionDefinitionsTest.kt
@@ -20,7 +20,7 @@
import android.content.pm.PermissionGroupInfo
import android.content.pm.PermissionInfo
import android.platform.test.annotations.AppModeFull
-import android.platform.test.annotations.SecurityTest
+import android.platform.test.annotations.AsbSecurityTest
import androidx.test.InstrumentationRegistry
import androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner
import com.android.compatibility.common.util.ShellUtils.runShellCommand
@@ -125,8 +125,8 @@
assertThat(groupAInfo.packageName).isEqualTo(APP_DEFINING_PERM_A)
}
- @SecurityTest
@Test
+ @AsbSecurityTest(cveBugId = [146211400])
fun cannotInstallAppsDefiningSamePermissionGroupWhenDifferentCert() {
install(APK_DEFINING_PERM_A)
install(APK_ALSO_DEFINING_PERM_GROUP_A_DIFFERENT_CERT)
@@ -161,8 +161,8 @@
assertThat(permAInfo.group).isEqualTo(INVALID_GROUP)
}
- @SecurityTest
@Test(expected = PackageManager.NameNotFoundException::class)
+ @AsbSecurityTest(cveBugId = [146211400])
fun cannotInstallAppsDefiningPermissionWithInvalidGroup() {
install(APK_DEFINING_PERM_WITH_INVALID_GROUP)
diff --git a/tests/tests/permission/src/android/permission/cts/LocationAccessCheckTest.java b/tests/tests/permission/src/android/permission/cts/LocationAccessCheckTest.java
index 6545c0c..a1c0bd1 100644
--- a/tests/tests/permission/src/android/permission/cts/LocationAccessCheckTest.java
+++ b/tests/tests/permission/src/android/permission/cts/LocationAccessCheckTest.java
@@ -66,7 +66,7 @@
import android.os.Looper;
import android.permission.cts.appthataccesseslocation.IAccessLocationOnCommand;
import android.platform.test.annotations.AppModeFull;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.platform.test.annotations.SystemUserOnly;
import android.provider.DeviceConfig;
import android.provider.Settings;
@@ -663,7 +663,7 @@
}
@Test
- @SecurityTest(minPatchLevel = "2019-12-01")
+ @AsbSecurityTest(cveBugId = 141028068)
public void notificationIsShownOnlyOnce() throws Throwable {
assumeNotPlayManaged();
@@ -680,7 +680,7 @@
@SystemUserOnly(reason = "b/172259935")
@Test
- @SecurityTest(minPatchLevel = "2019-12-01")
+ @AsbSecurityTest(cveBugId = 141028068)
public void notificationIsShownAgainAfterClear() throws Throwable {
assumeNotPlayManaged();
accessLocation();
@@ -725,7 +725,7 @@
}
@Test
- @SecurityTest(minPatchLevel = "2019-12-01")
+ @AsbSecurityTest(cveBugId = 141028068)
public void removeNotificationOnUninstall() throws Throwable {
assumeNotPlayManaged();
@@ -767,7 +767,7 @@
}
@Test
- @SecurityTest(minPatchLevel = "2019-12-01")
+ @AsbSecurityTest(cveBugId = 141028068)
public void noNotificationIfFeatureDisabled() throws Throwable {
assumeNotPlayManaged();
@@ -780,7 +780,7 @@
}
@Test
- @SecurityTest(minPatchLevel = "2019-12-01")
+ @AsbSecurityTest(cveBugId = 141028068)
public void notificationOnlyForAccessesSinceFeatureWasEnabled() throws Throwable {
assumeNotPlayManaged();
@@ -810,7 +810,7 @@
}
@Test
- @SecurityTest(minPatchLevel = "2019-12-01")
+ @AsbSecurityTest(cveBugId = 141028068)
public void noNotificationIfBlamerNotSystemOrLocationProvider() throws Throwable {
assumeNotPlayManaged();
@@ -826,7 +826,7 @@
}
@Test
- @SecurityTest(minPatchLevel = "2019-12-01")
+ @AsbSecurityTest(cveBugId = 141028068)
public void testOpeningLocationSettingsDoesNotTriggerAccess() throws Throwable {
assumeNotPlayManaged();
diff --git a/tests/tests/permission/src/android/permission/cts/NearbyDevicesPermissionTest.java b/tests/tests/permission/src/android/permission/cts/NearbyDevicesPermissionTest.java
index f7a1824..93920a5 100644
--- a/tests/tests/permission/src/android/permission/cts/NearbyDevicesPermissionTest.java
+++ b/tests/tests/permission/src/android/permission/cts/NearbyDevicesPermissionTest.java
@@ -47,6 +47,8 @@
import androidx.test.filters.SdkSuppress;
import androidx.test.runner.AndroidJUnit4;
+import com.android.compatibility.common.util.CddTest;
+
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -108,12 +110,14 @@
}
@Test
+ @CddTest(requirement="7.4.3/C-6-1")
public void testRequestBluetoothPermission30_Default() throws Throwable {
install(APK_BLUETOOTH_30);
assertScanBluetoothResult(Result.EMPTY);
}
@Test
+ @CddTest(requirement="7.4.3/C-6-1")
public void testRequestBluetoothPermission30_GrantLocation() throws Throwable {
install(APK_BLUETOOTH_30);
grantPermission(TEST_APP_PKG, ACCESS_FINE_LOCATION);
@@ -122,12 +126,14 @@
}
@Test
+ @CddTest(requirement="7.4.3/C-6-1")
public void testRequestBluetoothPermission31_Default() throws Throwable {
install(APK_BLUETOOTH_31);
assertScanBluetoothResult(Result.EXCEPTION);
}
@Test
+ @CddTest(requirement="7.4.3/C-6-1")
public void testRequestBluetoothPermission31_GrantNearby() throws Throwable {
install(APK_BLUETOOTH_31);
grantPermission(TEST_APP_PKG, BLUETOOTH_CONNECT);
@@ -136,6 +142,7 @@
}
@Test
+ @CddTest(requirement="7.4.3/C-6-1")
public void testRequestBluetoothPermission31_GrantLocation() throws Throwable {
install(APK_BLUETOOTH_31);
grantPermission(TEST_APP_PKG, ACCESS_FINE_LOCATION);
@@ -144,6 +151,7 @@
}
@Test
+ @CddTest(requirement="7.4.3/C-6-1")
public void testRequestBluetoothPermission31_GrantNearby_GrantLocation() throws Throwable {
install(APK_BLUETOOTH_31);
grantPermission(TEST_APP_PKG, BLUETOOTH_CONNECT);
@@ -154,12 +162,14 @@
}
@Test
+ @CddTest(requirement="7.4.3/C-6-1")
public void testRequestBluetoothPermissionNeverForLocation31_Default() throws Throwable {
install(APK_BLUETOOTH_NEVER_FOR_LOCATION_31);
assertScanBluetoothResult(Result.EXCEPTION);
}
@Test
+ @CddTest(requirement="7.4.3/C-6-1")
public void testRequestBluetoothPermissionNeverForLocation31_GrantNearby() throws Throwable {
install(APK_BLUETOOTH_NEVER_FOR_LOCATION_31);
grantPermission(TEST_APP_PKG, BLUETOOTH_CONNECT);
@@ -168,6 +178,7 @@
}
@Test
+ @CddTest(requirement="7.4.3/C-6-1")
public void testRequestBluetoothPermissionNeverForLocation31_GrantLocation() throws Throwable {
install(APK_BLUETOOTH_NEVER_FOR_LOCATION_31);
grantPermission(TEST_APP_PKG, ACCESS_FINE_LOCATION);
@@ -176,6 +187,7 @@
}
@Test
+ @CddTest(requirement="7.4.3/C-6-1")
public void testRequestBluetoothPermissionNeverForLocation31_GrantNearby_GrantLocation()
throws Throwable {
install(APK_BLUETOOTH_NEVER_FOR_LOCATION_31);
diff --git a/tests/tests/permission/src/android/permission/cts/NearbyDevicesRenouncePermissionTest.java b/tests/tests/permission/src/android/permission/cts/NearbyDevicesRenouncePermissionTest.java
index 85717de..f7b77e8 100644
--- a/tests/tests/permission/src/android/permission/cts/NearbyDevicesRenouncePermissionTest.java
+++ b/tests/tests/permission/src/android/permission/cts/NearbyDevicesRenouncePermissionTest.java
@@ -21,20 +21,26 @@
import static androidx.test.core.app.ApplicationProvider.getApplicationContext;
-import static com.android.compatibility.common.util.SystemUtil.runShellCommand;
+import static com.android.compatibility.common.util.SystemUtil.runShellCommandOrThrow;
import static com.google.common.truth.Truth.assertThat;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assume.assumeTrue;
+
import android.app.AppOpsManager;
import android.app.AsyncNotedAppOp;
import android.app.SyncNotedAppOp;
+import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothManager;
+import android.bluetooth.cts.BTAdapterUtils;
import android.bluetooth.le.BluetoothLeScanner;
import android.bluetooth.le.ScanCallback;
import android.bluetooth.le.ScanResult;
import android.content.AttributionSource;
import android.content.Context;
import android.content.ContextParams;
+import android.content.pm.PackageManager;
import android.os.Process;
import android.os.SystemClock;
import android.platform.test.annotations.AppModeFull;
@@ -42,12 +48,12 @@
import android.util.Base64;
import android.util.Log;
+import androidx.test.InstrumentationRegistry;
+
import com.android.compatibility.common.util.SystemUtil;
import org.junit.After;
-import org.junit.AfterClass;
import org.junit.Before;
-import org.junit.BeforeClass;
import org.junit.Test;
import java.util.HashSet;
@@ -65,6 +71,9 @@
private AppOpsManager mAppOpsManager;
private int mLocationNoteCount;
private int mScanNoteCount;
+ private Context mContext = InstrumentationRegistry.getInstrumentation().getContext();
+ private BluetoothAdapter mBluetoothAdapter;
+ private boolean mBluetoothAdapterWasEnabled;
private enum Result {
UNKNOWN, EXCEPTION, EMPTY, FILTERED, FULL
@@ -74,16 +83,22 @@
DEFAULT, RENOUNCE, RENOUNCE_MIDDLE, RENOUNCE_END
}
- @BeforeClass
- public static void enableTestMode() {
- runShellCommand("dumpsys activity service"
- + " com.android.bluetooth/.btservice.AdapterService set-test-mode enabled");
+ @Before
+ public void enableBluetooth() {
+ assumeTrue(supportsBluetooth());
+ mBluetoothAdapter = mContext.getSystemService(BluetoothManager.class).getAdapter();
+ mBluetoothAdapterWasEnabled = mBluetoothAdapter.isEnabled();
+ assertTrue(BTAdapterUtils.enableAdapter(mBluetoothAdapter, mContext));
+ enableTestMode();
}
- @AfterClass
- public static void disableTestMode() {
- runShellCommand("dumpsys activity service"
- + " com.android.bluetooth/.btservice.AdapterService set-test-mode disabled");
+ @After
+ public void disableBluetooth() {
+ assumeTrue(supportsBluetooth());
+ disableTestMode();
+ if (!mBluetoothAdapterWasEnabled) {
+ assertTrue(BTAdapterUtils.disableAdapter(mBluetoothAdapter, mContext));
+ }
}
@Before
@@ -241,4 +256,19 @@
}
}
+
+ private boolean supportsBluetooth() {
+ return mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH);
+ }
+
+ private void enableTestMode() {
+ runShellCommandOrThrow("dumpsys activity service"
+ + " com.android.bluetooth/.btservice.AdapterService set-test-mode enabled");
+ }
+
+ private void disableTestMode() {
+ runShellCommandOrThrow("dumpsys activity service"
+ + " com.android.bluetooth/.btservice.AdapterService set-test-mode disabled");
+ }
+
}
diff --git a/tests/tests/permission/src/android/permission/cts/PermissionGroupChange.java b/tests/tests/permission/src/android/permission/cts/PermissionGroupChange.java
index 8661f2e..368d280 100644
--- a/tests/tests/permission/src/android/permission/cts/PermissionGroupChange.java
+++ b/tests/tests/permission/src/android/permission/cts/PermissionGroupChange.java
@@ -32,7 +32,7 @@
import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.platform.test.annotations.AppModeFull;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.support.test.uiautomator.By;
import android.support.test.uiautomator.UiDevice;
import android.support.test.uiautomator.UiScrollable;
@@ -163,9 +163,9 @@
runShellCommand("pm uninstall android.permission.cts.appthatrequestpermission");
}
- @SecurityTest
@Test
@AppModeFull
+ @AsbSecurityTest(cveBugId = 72710897)
public void permissionGroupShouldNotBeAutoGrantedIfNewMember() throws Throwable {
installApp("CtsAppThatRequestsPermissionAandB");
diff --git a/tests/tests/permission/src/android/permission/cts/RemovePermissionTest.java b/tests/tests/permission/src/android/permission/cts/RemovePermissionTest.java
index d252d2d..3dc5f03 100644
--- a/tests/tests/permission/src/android/permission/cts/RemovePermissionTest.java
+++ b/tests/tests/permission/src/android/permission/cts/RemovePermissionTest.java
@@ -29,7 +29,7 @@
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.platform.test.annotations.AppModeFull;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import androidx.test.InstrumentationRegistry;
@@ -150,8 +150,8 @@
pkg, permission);
}
- @SecurityTest(minPatchLevel = "2020-02")
@Test
+ @AsbSecurityTest(cveBugId = 67319274)
public void runtimePermissionShouldBeRevokedIfRemoved() throws Throwable {
installApp(ADVERSARIAL_PERMISSION_DEFINER_APK_NAME);
installApp(ADVERSARIAL_PERMISSION_USER_APK_NAME);
@@ -199,8 +199,8 @@
assertFalse(permissionGranted(ADVERSARIAL_PERMISSION_USER_PKG_NAME, TEST_PERMISSION));
}
- @SecurityTest(minPatchLevel = "2021-01")
@Test
+ @AsbSecurityTest(cveBugId = 155648771)
public void installPermissionShouldBeRevokedIfRemoved() throws Throwable {
installApp(INSTALL_PERMISSION_DEFINER_APK_NAME);
installApp(INSTALL_PERMISSION_USER_APK_NAME);
diff --git a/tests/tests/permission2/res/raw/android_manifest.xml b/tests/tests/permission2/res/raw/android_manifest.xml
index cec3e60..5ff702f 100644
--- a/tests/tests/permission2/res/raw/android_manifest.xml
+++ b/tests/tests/permission2/res/raw/android_manifest.xml
@@ -3496,7 +3496,7 @@
use by third party apps.
@hide -->
<permission android:name="android.permission.UPDATE_APP_OPS_STATS"
- android:protectionLevel="signature|privileged|installer" />
+ android:protectionLevel="signature|privileged|installer|role" />
<!-- @SystemApi Allows an application to update the user app op restrictions.
Not for use by third party apps.
diff --git a/tests/tests/permission4/AppThatAccessesMic/Android.bp b/tests/tests/permission3/AccessMicrophoneApp/Android.bp
similarity index 72%
rename from tests/tests/permission4/AppThatAccessesMic/Android.bp
rename to tests/tests/permission3/AccessMicrophoneApp/Android.bp
index f56600d..76d8c12 100644
--- a/tests/tests/permission4/AppThatAccessesMic/Android.bp
+++ b/tests/tests/permission3/AccessMicrophoneApp/Android.bp
@@ -19,20 +19,12 @@
}
android_test_helper_app {
- name: "CtsAppThatAccessesMicPermission",
- defaults: ["cts_defaults"],
- sdk_version: "test_current",
- // Tag this module as a cts test artifact
- test_suites: [
- "cts",
- "vts10",
- "general-tests",
- ],
+ name: "CtsAccessMicrophoneApp",
+ defaults: ["mts-target-sdk-version-current"],
+ min_sdk_version: "31",
static_libs: [
- "androidx.test.rules",
"kotlin-stdlib",
- "kotlinx-coroutines-android",
],
srcs: [
diff --git a/tests/tests/permission4/AppThatAccessesMic/AndroidManifest.xml b/tests/tests/permission3/AccessMicrophoneApp/AndroidManifest.xml
similarity index 94%
rename from tests/tests/permission4/AppThatAccessesMic/AndroidManifest.xml
rename to tests/tests/permission3/AccessMicrophoneApp/AndroidManifest.xml
index c9064e7..4876733 100644
--- a/tests/tests/permission4/AppThatAccessesMic/AndroidManifest.xml
+++ b/tests/tests/permission3/AccessMicrophoneApp/AndroidManifest.xml
@@ -16,7 +16,7 @@
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="android.permission4.cts.appthataccessesmic"
+ package="android.permission3.cts.accessmicrophoneapp"
android:versionCode="1">
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
diff --git a/tests/tests/permission4/AppThatAccessesMic/src/android/permission4/cts/appthataccessesmic/AccessMicActivity.kt b/tests/tests/permission3/AccessMicrophoneApp/src/android/permission3/cts/accessmicrophoneapp/AccessMicActivity.kt
similarity index 86%
rename from tests/tests/permission4/AppThatAccessesMic/src/android/permission4/cts/appthataccessesmic/AccessMicActivity.kt
rename to tests/tests/permission3/AccessMicrophoneApp/src/android/permission3/cts/accessmicrophoneapp/AccessMicActivity.kt
index cefc2cc..a5c7bfd 100644
--- a/tests/tests/permission4/AppThatAccessesMic/src/android/permission4/cts/appthataccessesmic/AccessMicActivity.kt
+++ b/tests/tests/permission3/AccessMicrophoneApp/src/android/permission3/cts/accessmicrophoneapp/AccessMicActivity.kt
@@ -14,16 +14,14 @@
* limitations under the License.
*/
-package android.permission4.cts.appthataccessesmic
+package android.permission3.cts.accessmicrophoneapp
import android.app.Activity
import android.app.AppOpsManager
import android.media.AudioFormat
import android.media.AudioRecord
import android.media.MediaRecorder
-import kotlinx.coroutines.GlobalScope
-import kotlinx.coroutines.delay
-import kotlinx.coroutines.launch
+import android.os.Handler
private const val USE_DURATION_MS = 10000L
private const val SAMPLE_RATE_HZ = 44100
@@ -56,9 +54,6 @@
recorder = AudioRecord(MediaRecorder.AudioSource.MIC, SAMPLE_RATE_HZ,
AudioFormat.CHANNEL_IN_MONO, AudioFormat.ENCODING_PCM_16BIT, minSize)
recorder?.startRecording()
- GlobalScope.launch {
- delay(USE_DURATION_MS)
- finish()
- }
+ Handler().postDelayed({ finish() }, USE_DURATION_MS)
}
}
\ No newline at end of file
diff --git a/tests/tests/permission4/AppThatAccessesMic/Android.bp b/tests/tests/permission3/AccessMicrophoneApp2/Android.bp
similarity index 72%
copy from tests/tests/permission4/AppThatAccessesMic/Android.bp
copy to tests/tests/permission3/AccessMicrophoneApp2/Android.bp
index f56600d..5a74220 100644
--- a/tests/tests/permission4/AppThatAccessesMic/Android.bp
+++ b/tests/tests/permission3/AccessMicrophoneApp2/Android.bp
@@ -19,20 +19,12 @@
}
android_test_helper_app {
- name: "CtsAppThatAccessesMicPermission",
- defaults: ["cts_defaults"],
- sdk_version: "test_current",
- // Tag this module as a cts test artifact
- test_suites: [
- "cts",
- "vts10",
- "general-tests",
- ],
+ name: "CtsAccessMicrophoneApp2",
+ defaults: ["mts-target-sdk-version-current"],
+ min_sdk_version: "31",
static_libs: [
- "androidx.test.rules",
"kotlin-stdlib",
- "kotlinx-coroutines-android",
],
srcs: [
diff --git a/tests/tests/permission4/AppThatAccessesMic/AndroidManifest.xml b/tests/tests/permission3/AccessMicrophoneApp2/AndroidManifest.xml
similarity index 82%
copy from tests/tests/permission4/AppThatAccessesMic/AndroidManifest.xml
copy to tests/tests/permission3/AccessMicrophoneApp2/AndroidManifest.xml
index c9064e7..b387701 100644
--- a/tests/tests/permission4/AppThatAccessesMic/AndroidManifest.xml
+++ b/tests/tests/permission3/AccessMicrophoneApp2/AndroidManifest.xml
@@ -16,16 +16,16 @@
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="android.permission4.cts.appthataccessesmic"
+ package="android.permission3.cts.accessmicrophoneapp2"
android:versionCode="1">
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
- <application android:label="CtsMicAccess">
- <activity android:name=".AccessMicActivity"
+ <application android:label="CtsMicAccess2">
+ <activity android:name=".AccessMicActivity2"
android:exported="true">
<intent-filter>
- <action android:name="test.action.USE_MIC" />
+ <action android:name="test.action.USE_MIC_2" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
diff --git a/tests/tests/permission4/AppThatAccessesMic/src/android/permission4/cts/appthataccessesmic/AccessMicActivity.kt b/tests/tests/permission3/AccessMicrophoneApp2/src/android/permission3/cts/accessmicrophoneapp2/AccessMicActivity2.kt
similarity index 84%
copy from tests/tests/permission4/AppThatAccessesMic/src/android/permission4/cts/appthataccessesmic/AccessMicActivity.kt
copy to tests/tests/permission3/AccessMicrophoneApp2/src/android/permission3/cts/accessmicrophoneapp2/AccessMicActivity2.kt
index cefc2cc..1bd11c5 100644
--- a/tests/tests/permission4/AppThatAccessesMic/src/android/permission4/cts/appthataccessesmic/AccessMicActivity.kt
+++ b/tests/tests/permission3/AccessMicrophoneApp2/src/android/permission3/cts/accessmicrophoneapp2/AccessMicActivity2.kt
@@ -14,21 +14,19 @@
* limitations under the License.
*/
-package android.permission4.cts.appthataccessesmic
+package android.permission3.cts.accessmicrophoneapp2
import android.app.Activity
import android.app.AppOpsManager
import android.media.AudioFormat
import android.media.AudioRecord
import android.media.MediaRecorder
-import kotlinx.coroutines.GlobalScope
-import kotlinx.coroutines.delay
-import kotlinx.coroutines.launch
+import android.os.Handler
private const val USE_DURATION_MS = 10000L
private const val SAMPLE_RATE_HZ = 44100
-class AccessMicActivity : Activity() {
+class AccessMicActivity2 : Activity() {
private var recorder: AudioRecord? = null
private var appOpsManager: AppOpsManager? = null
@@ -56,9 +54,6 @@
recorder = AudioRecord(MediaRecorder.AudioSource.MIC, SAMPLE_RATE_HZ,
AudioFormat.CHANNEL_IN_MONO, AudioFormat.ENCODING_PCM_16BIT, minSize)
recorder?.startRecording()
- GlobalScope.launch {
- delay(USE_DURATION_MS)
- finish()
- }
+ Handler().postDelayed({ finish() }, USE_DURATION_MS)
}
}
\ No newline at end of file
diff --git a/tests/tests/permission3/Android.bp b/tests/tests/permission3/Android.bp
index e9fbf37..3d91b81 100644
--- a/tests/tests/permission3/Android.bp
+++ b/tests/tests/permission3/Android.bp
@@ -50,6 +50,8 @@
":CtsUsePermissionAppLatest",
":CtsUsePermissionAppLatestNone",
":CtsUsePermissionAppWithOverlay",
+ ":CtsAccessMicrophoneApp",
+ ":CtsAccessMicrophoneApp2",
],
test_suites: [
"cts",
diff --git a/tests/tests/permission3/AndroidTest.xml b/tests/tests/permission3/AndroidTest.xml
index 2f4bcae..1458439 100644
--- a/tests/tests/permission3/AndroidTest.xml
+++ b/tests/tests/permission3/AndroidTest.xml
@@ -36,6 +36,8 @@
<target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
<option name="cleanup-apks" value="true" />
<option name="test-file-name" value="CtsPermission3TestCases.apk" />
+ <option name="test-file-name" value="CtsAccessMicrophoneApp.apk" />
+ <option name="test-file-name" value="CtsAccessMicrophoneApp2.apk" />
</target_preparer>
<target_preparer class="com.android.compatibility.common.tradefed.targetprep.FilePusher">
diff --git a/tests/tests/permission3/src/android/permission3/cts/PermissionHistoryTest.kt b/tests/tests/permission3/src/android/permission3/cts/PermissionHistoryTest.kt
new file mode 100644
index 0000000..be77666
--- /dev/null
+++ b/tests/tests/permission3/src/android/permission3/cts/PermissionHistoryTest.kt
@@ -0,0 +1,101 @@
+/*
+ * 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.permission3.cts
+
+import android.Manifest
+import android.content.Intent
+import android.os.Build
+import android.support.test.uiautomator.By
+import androidx.test.filters.SdkSuppress
+import com.android.compatibility.common.util.SystemUtil
+import org.junit.Test
+
+private const val APP_LABEL_1 = "CtsMicAccess"
+private const val APP_LABEL_2 = "CtsMicAccess2"
+private const val INTENT_ACTION_1 = "test.action.USE_MIC"
+private const val INTENT_ACTION_2 = "test.action.USE_MIC_2"
+private const val PERMISSION_CONTROLLER_PACKAGE_ID_PREFIX = "com.android.permissioncontroller:id/"
+private const val HISTORY_PREFERENCE_ICON = "permission_history_icon"
+private const val HISTORY_PREFERENCE_TIME = "permission_history_time"
+private const val SHOW_SYSTEM = "Show system"
+private const val MORE_OPTIONS = "More options"
+
+@SdkSuppress(minSdkVersion = Build.VERSION_CODES.S, codeName = "S")
+class PermissionHistoryTest : BasePermissionTest() {
+ private val micLabel = packageManager.getPermissionGroupInfo(
+ Manifest.permission_group.MICROPHONE, 0).loadLabel(packageManager).toString()
+
+ @Test
+ fun testToggleSystemApps() {
+ // I had some hard time mocking a system app.
+ // Hence here I am only testing if the toggle is there.
+ // Will comeback and add the system app for testing if we
+ // need the line coverage for this. - theianchen@
+ openMicrophoneApp(INTENT_ACTION_1)
+ waitFindObject(By.textContains(APP_LABEL_1))
+
+ openMicrophoneTimeline()
+ val menuView = waitFindObject(By.descContains(MORE_OPTIONS))
+ menuView.click()
+
+ waitFindObject(By.text(SHOW_SYSTEM))
+ uiDevice.pressBack()
+ }
+
+ @Test
+ fun testMicrophoneTimelineWithOneApp() {
+ openMicrophoneApp(INTENT_ACTION_1)
+ waitFindObject(By.textContains(APP_LABEL_1))
+
+ openMicrophoneTimeline()
+ waitFindObject(By.descContains(micLabel))
+ waitFindObject(By.textContains(APP_LABEL_1))
+ waitFindObject(By.res(
+ PERMISSION_CONTROLLER_PACKAGE_ID_PREFIX + HISTORY_PREFERENCE_ICON))
+ waitFindObject(By.res(
+ PERMISSION_CONTROLLER_PACKAGE_ID_PREFIX + HISTORY_PREFERENCE_TIME))
+ }
+
+ @Test
+ fun testCameraTimelineWithMultipleApps() {
+ openMicrophoneApp(INTENT_ACTION_1)
+ waitFindObject(By.textContains(APP_LABEL_1))
+
+ openMicrophoneApp(INTENT_ACTION_2)
+ waitFindObject(By.textContains(APP_LABEL_2))
+
+ openMicrophoneTimeline()
+ waitFindObject(By.descContains(micLabel))
+ waitFindObject(By.textContains(APP_LABEL_1))
+ waitFindObject(By.textContains(APP_LABEL_2))
+ }
+
+ private fun openMicrophoneApp(intentAction: String) {
+ context.startActivity(Intent(intentAction).apply {
+ addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
+ })
+ }
+
+ private fun openMicrophoneTimeline() {
+ SystemUtil.runWithShellPermissionIdentity {
+ context.startActivity(Intent(Intent.ACTION_REVIEW_PERMISSION_HISTORY).apply {
+ putExtra(Intent.EXTRA_PERMISSION_GROUP_NAME, Manifest.permission_group.MICROPHONE)
+ addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
+ })
+ }
+ }
+}
\ No newline at end of file
diff --git a/tests/tests/permission4/AndroidTest.xml b/tests/tests/permission4/AndroidTest.xml
index 8aec540..71353aa 100644
--- a/tests/tests/permission4/AndroidTest.xml
+++ b/tests/tests/permission4/AndroidTest.xml
@@ -31,7 +31,6 @@
<option name="cleanup-apks" value="true" />
<option name="test-file-name" value="CtsPermission4TestCases.apk" />
<option name="test-file-name" value="CtsAppThatAccessesMicAndCameraPermission.apk" />
- <option name="test-file-name" value="CtsAppThatAccessesMicPermission.apk" />
</target_preparer>
<test class="com.android.tradefed.testtype.AndroidJUnitTest" >
diff --git a/tests/tests/permission4/src/android/permission4/cts/PermissionDetailsFragmentTest.kt b/tests/tests/permission4/src/android/permission4/cts/PermissionDetailsFragmentTest.kt
deleted file mode 100644
index 08451ce..0000000
--- a/tests/tests/permission4/src/android/permission4/cts/PermissionDetailsFragmentTest.kt
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
- * 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.permission4.cts
-
-import android.Manifest
-import android.app.Instrumentation
-import android.content.Context
-import android.content.Intent
-import android.content.pm.PackageManager
-import android.provider.Settings
-import android.support.test.uiautomator.By
-import android.support.test.uiautomator.UiDevice
-import android.support.test.uiautomator.UiSelector
-import androidx.test.platform.app.InstrumentationRegistry
-import com.android.compatibility.common.util.SystemUtil
-import org.junit.After
-import org.junit.Assert
-import org.junit.Before
-import org.junit.Test
-
-private const val APP_LABEL_1 = "CtsCameraMicAccess"
-private const val APP_LABEL_2 = "CtsMicAccess"
-private const val USE_CAMERA = "use_camera"
-private const val USE_MICROPHONE = "use_microphone"
-private const val USE_HOTWORD = "use_hotword"
-private const val INTENT_ACTION_1 = "test.action.USE_CAMERA_OR_MIC"
-private const val INTENT_ACTION_2 = "test.action.USE_MIC"
-private const val PERMISSION_CONTROLLER_PACKAGE_ID_PREFIX = "com.android.permissioncontroller:id/"
-private const val HISTORY_PREFERENCE_ICON = "permission_history_icon"
-private const val HISTORY_PREFERENCE_TIME = "permission_history_time"
-private const val SHOW_SYSTEM = "Show system"
-private const val MORE_OPTIONS = "More options"
-
-class PermissionDetailsFragmentTest {
-
- private val instrumentation: Instrumentation = InstrumentationRegistry.getInstrumentation()
- private val context: Context = instrumentation.context
- private val uiDevice: UiDevice = UiDevice.getInstance(instrumentation)
- private var screenTimeoutBeforeTest: Long = 0L
- private val packageManager: PackageManager = context.packageManager
- private val micLabel = packageManager.getPermissionGroupInfo(
- Manifest.permission_group.MICROPHONE, 0).loadLabel(packageManager).toString()
-
- @Before
- fun setup() {
- SystemUtil.runWithShellPermissionIdentity {
- screenTimeoutBeforeTest = Settings.System.getLong(
- context.contentResolver, Settings.System.SCREEN_OFF_TIMEOUT
- )
- Settings.System.putLong(
- context.contentResolver, Settings.System.SCREEN_OFF_TIMEOUT, 1800000L
- )
- }
-
- uiDevice.wakeUp()
- SystemUtil.runShellCommand(instrumentation, "wm dismiss-keyguard")
- uiDevice.findObject(By.text("Close"))?.click()
- }
-
- @After
- fun tearDown() {
- SystemUtil.runWithShellPermissionIdentity {
- Settings.System.putLong(
- context.contentResolver, Settings.System.SCREEN_OFF_TIMEOUT,
- screenTimeoutBeforeTest
- )
- }
-
- Thread.sleep(3000)
- }
-
- @Test
- fun testToggleSystemApps() {
- // I had some hard time mocking a system app.
- // Hence here I am only testing if the toggle is there.
- // Will comeback and add the system app for testing if we
- // need the line coverage for this. - theianchen@
- openMicrophoneOrCameraApp()
- SystemUtil.eventually {
- val appView = uiDevice.findObject(UiSelector().textContains(APP_LABEL_1))
- Assert.assertTrue("View with text $APP_LABEL_1 not found", appView.exists())
- }
-
- openMicrophoneTimeline()
- SystemUtil.eventually {
- val menuView = uiDevice.findObject(UiSelector().descriptionContains(MORE_OPTIONS))
- Assert.assertTrue("View with description $MORE_OPTIONS not found", menuView.exists())
- menuView.click()
-
- val showSystemView = uiDevice.findObject(By.text(SHOW_SYSTEM))
- Assert.assertNotNull("View with description $SHOW_SYSTEM not found", showSystemView)
- uiDevice.pressBack()
- }
-
- uiDevice.pressHome()
- }
-
- @Test
- fun testMicrophoneTimelineWithOneApp() {
- openMicrophoneOrCameraApp()
- SystemUtil.eventually {
- val appView = uiDevice.findObject(UiSelector().textContains(APP_LABEL_1))
- Assert.assertTrue("View with text $APP_LABEL_1 not found", appView.exists())
- }
-
- openMicrophoneTimeline()
- SystemUtil.eventually {
- val timelineView = uiDevice.findObject(UiSelector().descriptionContains(micLabel))
- Assert.assertTrue("View with description $micLabel not found",
- timelineView.exists())
-
- val appView = uiDevice.findObject(UiSelector().textContains(APP_LABEL_1))
- Assert.assertTrue("View with text $APP_LABEL_1 not found", appView.exists())
-
- val iconView = uiDevice.findObject(By.res(
- PERMISSION_CONTROLLER_PACKAGE_ID_PREFIX + HISTORY_PREFERENCE_ICON))
- Assert.assertNotNull("View with description $HISTORY_PREFERENCE_ICON not found",
- iconView)
-
- val timestampView = uiDevice.findObject(By.res(
- PERMISSION_CONTROLLER_PACKAGE_ID_PREFIX + HISTORY_PREFERENCE_TIME))
- Assert.assertNotNull("View with description $HISTORY_PREFERENCE_TIME not found",
- timestampView)
- }
-
- uiDevice.pressHome()
- }
-
- @Test
- fun testCameraTimelineWithMultipleApps() {
- openMicrophoneOrCameraApp()
- SystemUtil.eventually {
- val appView = uiDevice.findObject(UiSelector().textContains(APP_LABEL_1))
- Assert.assertTrue("View with text $APP_LABEL_1 not found", appView.exists())
- }
-
- openMicrophoneApp()
- SystemUtil.eventually {
- val appView = uiDevice.findObject(UiSelector().textContains(APP_LABEL_2))
- Assert.assertTrue("View with text $APP_LABEL_2 not found", appView.exists())
- }
-
- openMicrophoneTimeline()
- SystemUtil.eventually {
- val timelineView = uiDevice.findObject(UiSelector().descriptionContains(micLabel))
- Assert.assertTrue("View with description $micLabel not found",
- timelineView.exists())
-
- val app1View = uiDevice.findObject(UiSelector().textContains(APP_LABEL_1))
- Assert.assertTrue("View with text $APP_LABEL_1 not found", app1View.exists())
-
- val app2View = uiDevice.findObject(UiSelector().textContains(APP_LABEL_2))
- Assert.assertTrue("View with text $APP_LABEL_2 not found", app2View.exists())
- }
-
- uiDevice.pressHome()
- }
-
- private fun openMicrophoneOrCameraApp() {
- context.startActivity(Intent(INTENT_ACTION_1).apply {
- putExtra(USE_MICROPHONE, true)
- putExtra(USE_CAMERA, false)
- putExtra(USE_HOTWORD, false)
- addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
- })
- }
-
- private fun openMicrophoneApp() {
- context.startActivity(Intent(INTENT_ACTION_2).apply {
- addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
- })
- }
-
- private fun openMicrophoneTimeline() {
- SystemUtil.runWithShellPermissionIdentity {
- context.startActivity(Intent(Intent.ACTION_REVIEW_PERMISSION_HISTORY).apply {
- putExtra(Intent.EXTRA_PERMISSION_GROUP_NAME, Manifest.permission_group.MICROPHONE)
- addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
- })
- }
- }
-}
\ No newline at end of file
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 24332de..3e6165f 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
@@ -38,7 +38,7 @@
import android.os.FileUtils;
import android.os.ParcelFileDescriptor;
import android.os.storage.StorageManager;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.provider.MediaStore;
import android.provider.MediaStore.Files.FileColumns;
import android.provider.MediaStore.Video.Media;
@@ -258,8 +258,8 @@
}
}
- @SecurityTest
@Test
+ @AsbSecurityTest(cveBugId = 134155286)
public void testIsoLocationRedaction() throws Exception {
// These videos have all had their ISO location metadata (in the (c)xyz box) artificially
// modified to +58.0000+011.0000 (middle of Skagerrak).
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 16d595f..2fc25b8 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
@@ -27,7 +27,7 @@
import android.database.Cursor;
import android.net.Uri;
import android.os.SystemClock;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.provider.Settings;
import android.provider.Settings.SettingNotFoundException;
import android.provider.Settings.System;
@@ -143,8 +143,8 @@
/**
* Verifies that the invalid values for the font scale setting are rejected.
*/
- @SecurityTest(minPatchLevel = "2021-02")
@Test
+ @AsbSecurityTest(cveBugId = 156260178)
public void testSystemSettingsRejectInvalidFontSizeScale() throws SettingNotFoundException {
final ContentResolver cr = InstrumentationRegistry.getTargetContext().getContentResolver();
// First put in a valid value
diff --git a/tests/tests/security/src/android/security/cts/ARTBootASLRTest.java b/tests/tests/security/src/android/security/cts/ARTBootASLRTest.java
index f085f20..2175bf0 100644
--- a/tests/tests/security/src/android/security/cts/ARTBootASLRTest.java
+++ b/tests/tests/security/src/android/security/cts/ARTBootASLRTest.java
@@ -17,7 +17,6 @@
package android.security.cts;
import android.test.AndroidTestCase;
-import android.platform.test.annotations.SecurityTest;
import junit.framework.TestCase;
@@ -29,7 +28,6 @@
/**
* Verify that the boot.art isn't mapped out of the system partition.
*/
-@SecurityTest
public class ARTBootASLRTest extends AndroidTestCase {
public void testARTASLR() throws Exception {
FileInputStream ins = new FileInputStream("/proc/self/maps");
diff --git a/tests/tests/security/src/android/security/cts/ActivityManagerTest.java b/tests/tests/security/src/android/security/cts/ActivityManagerTest.java
index 59d965d..9480251 100644
--- a/tests/tests/security/src/android/security/cts/ActivityManagerTest.java
+++ b/tests/tests/security/src/android/security/cts/ActivityManagerTest.java
@@ -19,7 +19,7 @@
import android.app.ApplicationExitInfo;
import android.content.Context;
import android.os.IBinder;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.util.Log;
import androidx.test.InstrumentationRegistry;
@@ -27,7 +27,6 @@
import java.lang.reflect.InvocationTargetException;
-@SecurityTest
public class ActivityManagerTest extends TestCase {
@Override
@@ -35,7 +34,7 @@
super.setUp();
}
- @SecurityTest(minPatchLevel = "2015-03")
+ @AsbSecurityTest(cveBugId = 19394591)
public void testActivityManager_injectInputEvents() throws ClassNotFoundException {
try {
/*
@@ -53,7 +52,7 @@
}
// b/144285917
- @SecurityTest(minPatchLevel = "2020-05")
+ @AsbSecurityTest(cveBugId = 144285917)
public void testActivityManager_attachNullApplication() {
SecurityException securityException = null;
Exception unexpectedException = null;
@@ -81,7 +80,7 @@
}
// b/166667403
- @SecurityTest(minPatchLevel = "2021-01")
+ @AsbSecurityTest(cveBugId = 166667403)
public void testActivityManager_appExitReasonPackageNames() {
final String mockPackage = "com.foo.bar";
final String realPackage = "com.android.compatibility.common.deviceinfo";
diff --git a/tests/tests/security/src/android/security/cts/AllocatePixelRefIntOverflowTest.java b/tests/tests/security/src/android/security/cts/AllocatePixelRefIntOverflowTest.java
index df1018a..5d297c6 100644
--- a/tests/tests/security/src/android/security/cts/AllocatePixelRefIntOverflowTest.java
+++ b/tests/tests/security/src/android/security/cts/AllocatePixelRefIntOverflowTest.java
@@ -18,21 +18,20 @@
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.test.AndroidTestCase;
import java.io.InputStream;
import android.security.cts.R;
-@SecurityTest
public class AllocatePixelRefIntOverflowTest extends AndroidTestCase {
/**
* Verifies that the device is not vulnerable to ANDROID-19270126: Android
* BitmapFactory.decodeStream JPG allocPixelRef integer overflow
*/
- @SecurityTest(minPatchLevel = "2015-03")
+ @AsbSecurityTest(cveBugId = 19394591)
public void testAllocateJavaPixelRefIntOverflow() {
InputStream exploitImage = mContext.getResources().openRawResource(
R.raw.cve_2015_1531_b_19270126);
diff --git a/tests/tests/security/src/android/security/cts/AmbiguousBundlesTest.java b/tests/tests/security/src/android/security/cts/AmbiguousBundlesTest.java
index 99b2ab7..73536e3 100644
--- a/tests/tests/security/src/android/security/cts/AmbiguousBundlesTest.java
+++ b/tests/tests/security/src/android/security/cts/AmbiguousBundlesTest.java
@@ -33,7 +33,7 @@
import java.util.Random;
import android.security.cts.R;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
public class AmbiguousBundlesTest extends AndroidTestCase {
@@ -41,7 +41,7 @@
* b/140417434
* Vulnerability Behaviour: Failure via Exception
*/
- @SecurityTest(minPatchLevel = "2020-04")
+ @AsbSecurityTest(cveBugId = 140417434)
public void test_android_CVE_2020_0082() throws Exception {
Ambiguator ambiguator = new Ambiguator() {
@@ -179,7 +179,7 @@
/*
* b/71992105
*/
- @SecurityTest(minPatchLevel = "2018-05")
+ @AsbSecurityTest(cveBugId = 71992105)
public void test_android_CVE_2017_13310() throws Exception {
Ambiguator ambiguator = new Ambiguator() {
@@ -269,7 +269,7 @@
/*
* b/71508348
*/
- @SecurityTest(minPatchLevel = "2018-06")
+ @AsbSecurityTest(cveBugId = 71508348)
public void test_android_CVE_2018_9339() throws Exception {
Ambiguator ambiguator = new Ambiguator() {
@@ -372,7 +372,7 @@
/*
* b/62998805
*/
- @SecurityTest(minPatchLevel = "2017-10")
+ @AsbSecurityTest(cveBugId = 62998805)
public void test_android_CVE_2017_0806() throws Exception {
Ambiguator ambiguator = new Ambiguator() {
@Override
@@ -435,7 +435,7 @@
/*
* b/73252178
*/
- @SecurityTest(minPatchLevel = "2018-05")
+ @AsbSecurityTest(cveBugId = 73252178)
public void test_android_CVE_2017_13311() throws Exception {
Ambiguator ambiguator = new Ambiguator() {
@Override
@@ -529,7 +529,7 @@
/*
* b/71714464
*/
- @SecurityTest(minPatchLevel = "2018-04")
+ @AsbSecurityTest(cveBugId = 71714464)
public void test_android_CVE_2017_13287() throws Exception {
Ambiguator ambiguator = new Ambiguator() {
@Override
diff --git a/tests/tests/security/src/android/security/cts/AndroidFutureTest.java b/tests/tests/security/src/android/security/cts/AndroidFutureTest.java
new file mode 100644
index 0000000..7b26ff0
--- /dev/null
+++ b/tests/tests/security/src/android/security/cts/AndroidFutureTest.java
@@ -0,0 +1,80 @@
+/*
+ * 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.Intent;
+import android.os.BaseBundle;
+import android.os.Bundle;
+import android.os.Parcel;
+import android.platform.test.annotations.AsbSecurityTest;
+
+import androidx.test.core.app.ApplicationProvider;
+import androidx.test.runner.AndroidJUnit4;
+
+import static org.junit.Assert.assertFalse;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import java.io.File;
+import java.lang.reflect.Field;
+
+@RunWith(AndroidJUnit4.class)
+public class AndroidFutureTest {
+
+ @AsbSecurityTest(cveBugId = 186530450)
+ @Test
+ public void testAndroidFutureReadThrowable() throws Exception {
+ String filePath = "/data/system/" + System.currentTimeMillis();
+ String argAfterNewLine = "%h" + filePath.replaceFirst("^/+", "");
+ Bundle bundle = createBundle("java.util.logging.FileHandler", "", argAfterNewLine);
+ sendBundleToSystem(bundle);
+ assertFalse(filePath + " should not be created", new File(filePath).exists());
+ }
+
+ private Bundle createBundle(String className, String argBeforeNewLine,
+ String argAfterNewLine) throws Exception {
+ Parcel data = Parcel.obtain();
+ data.writeInt(1);
+ data.writeString("a");
+ data.writeInt(4);
+ data.writeString("com.android.internal.infra.AndroidFuture");
+ data.writeBoolean(true);
+ data.writeBoolean(true);
+ data.writeBoolean(true);
+ data.writeBoolean(false);
+ data.writeString(className);
+ data.writeString(argBeforeNewLine);
+ data.writeString(argAfterNewLine);
+
+ Bundle bundle = new Bundle();
+ Field parcelledDataField = BaseBundle.class.getDeclaredField("mParcelledData");
+ parcelledDataField.setAccessible(true);
+ parcelledDataField.set(bundle, data);
+ return bundle;
+ }
+
+ private void sendBundleToSystem(Bundle theBundle) throws Exception {
+ Context context = ApplicationProvider.getApplicationContext();
+ Context.class
+ .getMethod("sendBroadcast",
+ Intent.class,
+ String.class,
+ Bundle.class)
+ .invoke(context, new Intent("DUMMY_BROADCAST"), null, theBundle);
+ }
+}
diff --git a/tests/tests/security/src/android/security/cts/AslrTest.java b/tests/tests/security/src/android/security/cts/AslrTest.java
index f248a40..8a5eeca 100644
--- a/tests/tests/security/src/android/security/cts/AslrTest.java
+++ b/tests/tests/security/src/android/security/cts/AslrTest.java
@@ -21,7 +21,6 @@
import android.os.ParcelFileDescriptor;
import android.platform.test.annotations.AppModeFull;
-import android.platform.test.annotations.SecurityTest;
import android.util.Log;
import java.io.BufferedReader;
import java.io.File;
@@ -39,7 +38,6 @@
/**
* Verify that ASLR is properly enabled on Android Compatible devices.
*/
-@SecurityTest
public class AslrTest extends InstrumentationTestCase {
private static final int aslrMinEntropyBits = 8;
diff --git a/tests/tests/security/src/android/security/cts/AssetManagerTest.java b/tests/tests/security/src/android/security/cts/AssetManagerTest.java
index 27b6021..10e1c20 100644
--- a/tests/tests/security/src/android/security/cts/AssetManagerTest.java
+++ b/tests/tests/security/src/android/security/cts/AssetManagerTest.java
@@ -18,15 +18,14 @@
import android.content.res.AssetManager;
import android.content.res.XmlResourceParser;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import com.android.compatibility.common.util.CtsAndroidTestCase;
-@SecurityTest
public class AssetManagerTest extends CtsAndroidTestCase {
// b/144028297
- @SecurityTest(minPatchLevel = "2020-04")
+ @AsbSecurityTest(cveBugId = 144028297)
public void testCloseThenFinalize() throws Exception {
final XmlResourceParser[] parser = {null};
final AssetManager[] assetManager = {AssetManager.class.newInstance()};
diff --git a/tests/tests/security/src/android/security/cts/AudioSecurityTest.java b/tests/tests/security/src/android/security/cts/AudioSecurityTest.java
index 56cff46..1e1878d 100644
--- a/tests/tests/security/src/android/security/cts/AudioSecurityTest.java
+++ b/tests/tests/security/src/android/security/cts/AudioSecurityTest.java
@@ -20,7 +20,7 @@
import android.media.AudioTrack;
import android.media.audiofx.AudioEffect;
import android.media.audiofx.Equalizer;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.util.Log;
import com.android.compatibility.common.util.CtsAndroidTestCase;
@@ -30,7 +30,6 @@
import java.util.Arrays;
import java.util.UUID;
-@SecurityTest
public class AudioSecurityTest extends CtsAndroidTestCase {
private static final String TAG = "AudioSecurityTest";
@@ -90,7 +89,7 @@
}
// b/28173666
- @SecurityTest(minPatchLevel = "2016-07")
+ @AsbSecurityTest(cveBugId = 28173666)
public void testAllEffectsGetParameterAttemptOffload_CVE_2016_3745() throws Exception {
testAllEffects("get parameter attempt offload",
new TestEffect() {
@@ -104,7 +103,7 @@
// b/32438594
// b/32624850
// b/32635664
- @SecurityTest(minPatchLevel = "2017-03")
+ @AsbSecurityTest(cveBugId = 32438594)
public void testAllEffectsGetParameter2AttemptOffload_CVE_2017_0398() throws Exception {
testAllEffects("get parameter2 attempt offload",
new TestEffect() {
@@ -116,7 +115,7 @@
}
// b/30204301
- @SecurityTest(minPatchLevel = "2016-10")
+ @AsbSecurityTest(cveBugId = 30204301)
public void testAllEffectsSetParameterAttemptOffload_CVE_2016_3924() throws Exception {
testAllEffects("set parameter attempt offload",
new TestEffect() {
@@ -128,7 +127,7 @@
}
// b/37536407
- @SecurityTest(minPatchLevel = "2017-01")
+ @AsbSecurityTest(cveBugId = 32448258)
public void testAllEffectsEqualizer_CVE_2017_0401() throws Exception {
testAllEffects("equalizer get parameter name",
new TestEffect() {
@@ -355,7 +354,7 @@
private static final int VISUALIZER_PARAM_CAPTURE_SIZE = 0;
// b/31781965
- @SecurityTest(minPatchLevel = "2017-03")
+ @AsbSecurityTest(cveBugId = 31781965)
public void testVisualizerCapture_CVE_2017_0396() throws Exception {
// Capture params
final int CAPTURE_SIZE = 1 << 24; // 16MB seems to be large enough to cause a SEGV.
diff --git a/tests/tests/security/src/android/security/cts/BannedFilesTest.java b/tests/tests/security/src/android/security/cts/BannedFilesTest.java
index 8847a84..d4ae7d9 100644
--- a/tests/tests/security/src/android/security/cts/BannedFilesTest.java
+++ b/tests/tests/security/src/android/security/cts/BannedFilesTest.java
@@ -17,7 +17,6 @@
package android.security.cts;
import android.platform.test.annotations.RestrictedBuildTest;
-import android.platform.test.annotations.SecurityTest;
import com.android.compatibility.common.util.FileUtils;
@@ -29,7 +28,6 @@
import java.io.IOException;
import java.io.UnsupportedEncodingException;
-@SecurityTest
public class BannedFilesTest extends TestCase {
/**
diff --git a/tests/tests/security/src/android/security/cts/BigRleTest.java b/tests/tests/security/src/android/security/cts/BigRleTest.java
index bcfb1df..20ac03a 100644
--- a/tests/tests/security/src/android/security/cts/BigRleTest.java
+++ b/tests/tests/security/src/android/security/cts/BigRleTest.java
@@ -22,7 +22,7 @@
import java.io.InputStream;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.security.cts.R;
public class BigRleTest extends AndroidTestCase {
@@ -32,7 +32,7 @@
* This image reports that its encoded length is over 4 gigs. Prior to fixing issue 33251605,
* we attempted to allocate space for all the encoded data at once, resulting in OOM.
*/
- @SecurityTest(minPatchLevel = "2017-04")
+ @AsbSecurityTest(cveBugId = 33251605)
public void test_android_bug_33251605() {
InputStream exploitImage = mContext.getResources().openRawResource(R.raw.bug_33251605);
Bitmap bitmap = BitmapFactory.decodeStream(exploitImage);
diff --git a/tests/tests/security/src/android/security/cts/BinderExploitTest.java b/tests/tests/security/src/android/security/cts/BinderExploitTest.java
index abb0370..7516e5b 100644
--- a/tests/tests/security/src/android/security/cts/BinderExploitTest.java
+++ b/tests/tests/security/src/android/security/cts/BinderExploitTest.java
@@ -42,7 +42,7 @@
import static org.junit.Assert.assertTrue;
import android.test.AndroidTestCase;
import androidx.test.InstrumentationRegistry;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import java.util.ArrayList;
import android.util.Log;
@@ -97,7 +97,6 @@
public native void runxpl(String pipedir);
}
-@SecurityTest
public class BinderExploitTest extends AndroidTestCase {
static final String TAG = BinderExploitTest.class.getSimpleName();
@@ -115,7 +114,7 @@
/**
* b/141496757
*/
- @SecurityTest(minPatchLevel = "2019-11")
+ @AsbSecurityTest(cveBugId = 133758011)
public void testPoc_cve_2019_2213() throws Exception {
Log.i(TAG, String.format("%s", "testPoc_cve_2019_2213 start..."));
diff --git a/tests/tests/security/src/android/security/cts/BitmapFactoryDecodeStreamTest.java b/tests/tests/security/src/android/security/cts/BitmapFactoryDecodeStreamTest.java
index ce28a7a..444b110 100644
--- a/tests/tests/security/src/android/security/cts/BitmapFactoryDecodeStreamTest.java
+++ b/tests/tests/security/src/android/security/cts/BitmapFactoryDecodeStreamTest.java
@@ -17,7 +17,7 @@
package android.security.cts;
import android.graphics.BitmapFactory;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.test.AndroidTestCase;
import android.security.cts.R;
@@ -25,7 +25,6 @@
import java.io.BufferedInputStream;
import java.io.InputStream;
-@SecurityTest
public class BitmapFactoryDecodeStreamTest extends AndroidTestCase {
/*
* This test case reproduces the bug in CVE-2015-1532.
@@ -33,7 +32,7 @@
* to heap corruption by trying to open a crafted PNG image with incorrect
* npTc chunk.
*/
- @SecurityTest(minPatchLevel = "2015-01")
+ @AsbSecurityTest(cveBugId = 19151999)
public void testNinePatchHeapOverflow() throws Exception {
InputStream inStream = new BufferedInputStream(mContext.getResources().openRawResource(
R.raw.cve_2015_1532));
@@ -41,14 +40,14 @@
}
- @SecurityTest(minPatchLevel = "2017-07")
+ @AsbSecurityTest(cveBugId = 36724453)
public void testPocCVE_2017_0691() throws Exception {
InputStream exploitImage = new BufferedInputStream(mContext.getResources().openRawResource(
R.raw.cve_2017_0691));
BitmapFactory.decodeStream(exploitImage);
}
- @SecurityTest(minPatchLevel = "2017-12")
+ @AsbSecurityTest(cveBugId = 65290323)
public void test_b65290323() throws Exception {
InputStream exploitImage = new BufferedInputStream(mContext.getResources().openRawResource(
R.raw.b65290323));
diff --git a/tests/tests/security/src/android/security/cts/BitmapFactorySecurityTests.java b/tests/tests/security/src/android/security/cts/BitmapFactorySecurityTests.java
index f463855..b1de686 100644
--- a/tests/tests/security/src/android/security/cts/BitmapFactorySecurityTests.java
+++ b/tests/tests/security/src/android/security/cts/BitmapFactorySecurityTests.java
@@ -18,7 +18,7 @@
import android.graphics.BitmapFactory;
import android.os.ParcelFileDescriptor;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.test.AndroidTestCase;
import java.io.File;
@@ -30,7 +30,6 @@
import android.security.cts.R;
-@SecurityTest
public class BitmapFactorySecurityTests extends AndroidTestCase {
private FileDescriptor getResource(int resId) {
try {
@@ -58,7 +57,7 @@
/**
* Verifies that decoding a corrupt ICO does crash.
*/
- @SecurityTest(minPatchLevel = "2017-09")
+ @AsbSecurityTest(cveBugId = 38116746)
public void test_android_bug_38116746() {
FileDescriptor exploitImage = getResource(R.raw.bug_38116746);
try {
@@ -74,7 +73,7 @@
/**
* Verifies that decoding a corrupt BMP does crash.
*/
- @SecurityTest(minPatchLevel = "2017-08")
+ @AsbSecurityTest(cveBugId = 37627194)
public void test_android_bug_37627194() {
FileDescriptor exploitImage = getResource(R.raw.bug_37627194);
try {
@@ -84,7 +83,7 @@
}
}
- @SecurityTest
+ @AsbSecurityTest(cveBugId = 156261521)
public void test_android_bug_156261521() {
// Previously decoding this would crash.
FileDescriptor exploitImage = getResource(R.raw.bug_156261521);
diff --git a/tests/tests/security/src/android/security/cts/BitmapTest.java b/tests/tests/security/src/android/security/cts/BitmapTest.java
index e7a326fe..40cb139 100644
--- a/tests/tests/security/src/android/security/cts/BitmapTest.java
+++ b/tests/tests/security/src/android/security/cts/BitmapTest.java
@@ -17,14 +17,13 @@
package android.security.cts;
import android.graphics.Bitmap;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
-@SecurityTest
@RunWith(AndroidJUnit4.class)
public class BitmapTest {
/**
@@ -34,7 +33,7 @@
* OOME is more appropriate.
*/
@Test(expected=OutOfMemoryError.class)
- @SecurityTest(minPatchLevel = "2018-01")
+ @AsbSecurityTest(cveBugId = 33846679)
public void test_33846679() {
// This size is based on the max size possible in a GIF file,
// which might be passed to createBitmap from a Java decoder.
diff --git a/tests/tests/security/src/android/security/cts/BluetoothIntentsTest.java b/tests/tests/security/src/android/security/cts/BluetoothIntentsTest.java
index 6a4990f..4810703 100644
--- a/tests/tests/security/src/android/security/cts/BluetoothIntentsTest.java
+++ b/tests/tests/security/src/android/security/cts/BluetoothIntentsTest.java
@@ -19,15 +19,14 @@
import android.content.ComponentName;
import android.content.Intent;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.test.AndroidTestCase;
-@SecurityTest
public class BluetoothIntentsTest extends AndroidTestCase {
/**
* b/35258579
*/
- @SecurityTest
+ @AsbSecurityTest(cveBugId = 35258579)
public void testAcceptIntent() {
genericIntentTest("ACCEPT");
}
@@ -35,7 +34,7 @@
/**
* b/35258579
*/
- @SecurityTest
+ @AsbSecurityTest(cveBugId = 35258579)
public void testDeclineIntent() {
genericIntentTest("DECLINE");
}
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
index 0a533bb..6625c9e 100644
--- a/tests/tests/security/src/android/security/cts/CVE_2020_0294.java
+++ b/tests/tests/security/src/android/security/cts/CVE_2020_0294.java
@@ -23,7 +23,7 @@
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import androidx.test.InstrumentationRegistry;
import androidx.test.runner.AndroidJUnit4;
@@ -34,7 +34,6 @@
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";
@@ -43,7 +42,7 @@
* b/170661753
*/
@Test
- @SecurityTest(minPatchLevel = "2020-12")
+ @AsbSecurityTest(cveBugId = 154915372)
public void testPocCVE_2020_0294() throws Exception {
Instrumentation instrumentation = InstrumentationRegistry.getInstrumentation();
ActivityManager activityManager = (ActivityManager) instrumentation.getContext()
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
index 3f39a0e..deb7c40 100644
--- a/tests/tests/security/src/android/security/cts/CVE_2021_0309.java
+++ b/tests/tests/security/src/android/security/cts/CVE_2021_0309.java
@@ -26,7 +26,7 @@
import android.content.Intent;
import android.os.Bundle;
import android.os.RemoteException;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import androidx.test.InstrumentationRegistry;
import androidx.test.runner.AndroidJUnit4;
@@ -42,8 +42,8 @@
/**
* b/159145361
*/
- @SecurityTest(minPatchLevel = "2021-01")
@Test
+ @AsbSecurityTest(cveBugId = 158480899)
public void testPocCVE_2021_0309() {
/**
* Output of adb shell pm list packages --user 0 -U com.android.providers.media
diff --git a/tests/tests/security/src/android/security/cts/CVE_2021_0327/CVE_2021_0327.java b/tests/tests/security/src/android/security/cts/CVE_2021_0327/CVE_2021_0327.java
index 56408ee..13076ba 100644
--- a/tests/tests/security/src/android/security/cts/CVE_2021_0327/CVE_2021_0327.java
+++ b/tests/tests/security/src/android/security/cts/CVE_2021_0327/CVE_2021_0327.java
@@ -19,7 +19,7 @@
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.test.AndroidTestCase;
import android.util.Log;
import androidx.test.runner.AndroidJUnit4;
@@ -29,7 +29,6 @@
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
-@SecurityTest
@RunWith(AndroidJUnit4.class)
public class CVE_2021_0327 {
@@ -51,7 +50,7 @@
* b/175817081
*/
@Test
- @SecurityTest
+ @AsbSecurityTest(cveBugId = 172935267)
public void testPocCVE_2021_0327() throws Exception {
Log.d(TAG, "test start");
testActivityCreated=false;
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
index a59d749..13b320f 100644
--- a/tests/tests/security/src/android/security/cts/CVE_2021_0339.java
+++ b/tests/tests/security/src/android/security/cts/CVE_2021_0339.java
@@ -26,7 +26,7 @@
import android.os.Bundle;
import android.os.RemoteCallback;
import android.os.SystemClock;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.test.AndroidTestCase;
import android.util.Log;
import androidx.test.InstrumentationRegistry;
@@ -37,7 +37,6 @@
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.TimeUnit;
-@SecurityTest
@RunWith(AndroidJUnit4.class)
public class CVE_2021_0339 {
@@ -63,7 +62,7 @@
* start the first activity and get the result from the remote callback
*/
@Test
- @SecurityTest
+ @AsbSecurityTest(cveBugId = 145728687)
public void testPocCVE_2021_0339() throws Exception {
CompletableFuture<Integer> callbackReturn = new CompletableFuture<>();
RemoteCallback cb = new RemoteCallback((Bundle result) ->
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
index 6d504f6..571c293 100644
--- a/tests/tests/security/src/android/security/cts/CVE_2021_0394.java
+++ b/tests/tests/security/src/android/security/cts/CVE_2021_0394.java
@@ -16,7 +16,7 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import androidx.test.filters.RequiresDevice;
import androidx.test.runner.AndroidJUnit4;
import org.junit.runner.RunWith;
@@ -32,11 +32,11 @@
/**
* b/172655291
*/
- @SecurityTest(minPatchLevel = "2021-03")
@Test
@RequiresDevice
// emulators always have checkJNI enabled which causes the test
// to abort the VM while passing invalid input to NewStringUTF
+ @AsbSecurityTest(cveBugId = 172655291)
public void testPocCVE_2021_0394() throws Exception {
assertFalse(poc());
}
diff --git a/tests/tests/security/src/android/security/cts/ConscryptIntermediateVerificationTest.java b/tests/tests/security/src/android/security/cts/ConscryptIntermediateVerificationTest.java
index 3178616..3022b6ce 100644
--- a/tests/tests/security/src/android/security/cts/ConscryptIntermediateVerificationTest.java
+++ b/tests/tests/security/src/android/security/cts/ConscryptIntermediateVerificationTest.java
@@ -17,7 +17,7 @@
package android.security.cts;
import android.content.Context;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.test.AndroidTestCase;
import java.io.InputStream;
import java.security.KeyStore;
@@ -32,7 +32,6 @@
import javax.net.ssl.TrustManagerFactory;
import javax.net.ssl.X509TrustManager;
-@SecurityTest
public class ConscryptIntermediateVerificationTest extends AndroidTestCase {
private X509Certificate[] loadCertificates(int resource) throws Exception {
@@ -76,6 +75,7 @@
return null;
}
+ @AsbSecurityTest(cveBugId = 26232830)
public void testIntermediateVerification() throws Exception {
X509TrustManager tm = getTrustManager();
X509Certificate[] validChain = loadCertificates(R.raw.intermediate_test_valid);
diff --git a/tests/tests/security/src/android/security/cts/DecodeTest.java b/tests/tests/security/src/android/security/cts/DecodeTest.java
index 3314166..26ab802 100644
--- a/tests/tests/security/src/android/security/cts/DecodeTest.java
+++ b/tests/tests/security/src/android/security/cts/DecodeTest.java
@@ -18,7 +18,7 @@
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.test.AndroidTestCase;
import java.io.InputStream;
@@ -32,7 +32,7 @@
* Prior to fixing bug 34778578, decoding this file would crash. Instead, it should fail to
* decode.
*/
- @SecurityTest(minPatchLevel = "2017-07")
+ @AsbSecurityTest(cveBugId = 34778578)
public void test_android_bug_34778578() {
InputStream exploitImage = mContext.getResources().openRawResource(R.raw.bug_34778578);
Bitmap bitmap = BitmapFactory.decodeStream(exploitImage);
@@ -45,7 +45,7 @@
* Prior to fixing bug 67381469, decoding this file would crash. Instead, it should fail to
* decode.
*/
- @SecurityTest(minPatchLevel = "2017-12")
+ @AsbSecurityTest(cveBugId = 67381469)
public void test_android_bug_67381469() {
InputStream exploitImage = mContext.getResources().openRawResource(R.raw.bug_67381469);
Bitmap bitmap = BitmapFactory.decodeStream(exploitImage);
diff --git a/tests/tests/security/src/android/security/cts/EffectBundleTest.java b/tests/tests/security/src/android/security/cts/EffectBundleTest.java
index d1baf37..5aef702 100644
--- a/tests/tests/security/src/android/security/cts/EffectBundleTest.java
+++ b/tests/tests/security/src/android/security/cts/EffectBundleTest.java
@@ -21,7 +21,7 @@
import android.media.audiofx.Equalizer;
import android.media.audiofx.PresetReverb;
import android.media.MediaPlayer;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.test.InstrumentationTestCase;
import android.util.Log;
@@ -31,7 +31,6 @@
import java.util.Arrays;
import java.util.UUID;
-@SecurityTest
public class EffectBundleTest extends InstrumentationTestCase {
private static final String TAG = "EffectBundleTest";
private static final int[] INVALID_BAND_ARRAY = {Integer.MIN_VALUE, -10000, -100, -2, -1};
@@ -48,7 +47,7 @@
private static final int intSize = 4;
//Testing security bug: 32436341
- @SecurityTest(minPatchLevel = "2017-01")
+ @AsbSecurityTest(cveBugId = 32436341)
public void testEqualizer_getParamCenterFreq() throws Exception {
if (!hasEqualizer()) {
return;
@@ -58,7 +57,7 @@
}
//Testing security bug: 32588352
- @SecurityTest(minPatchLevel = "2017-01")
+ @AsbSecurityTest(cveBugId = 32588352)
public void testEqualizer_getParamCenterFreq_long() throws Exception {
if (!hasEqualizer()) {
return;
@@ -67,7 +66,7 @@
}
//Testing security bug: 32438598
- @SecurityTest(minPatchLevel = "2017-01")
+ @AsbSecurityTest(cveBugId = 32438598)
public void testEqualizer_getParamBandLevel() throws Exception {
if (!hasEqualizer()) {
return;
@@ -76,7 +75,7 @@
}
//Testing security bug: 32584034
- @SecurityTest(minPatchLevel = "2017-01")
+ @AsbSecurityTest(cveBugId = 32584034)
public void testEqualizer_getParamBandLevel_long() throws Exception {
if (!hasEqualizer()) {
return;
@@ -85,7 +84,7 @@
}
//Testing security bug: 32247948
- @SecurityTest(minPatchLevel = "2017-01")
+ @AsbSecurityTest(cveBugId = 32247948)
public void testEqualizer_getParamFreqRange() throws Exception {
if (!hasEqualizer()) {
return;
@@ -95,7 +94,7 @@
}
//Testing security bug: 32588756
- @SecurityTest(minPatchLevel = "2017-01")
+ @AsbSecurityTest(cveBugId = 32588756)
public void testEqualizer_getParamFreqRange_long() throws Exception {
if (!hasEqualizer()) {
return;
@@ -105,7 +104,7 @@
}
//Testing security bug: 32448258
- @SecurityTest(minPatchLevel = "2017-01")
+ @AsbSecurityTest(cveBugId = 32448258)
public void testEqualizer_getParamPresetName() throws Exception {
if (!hasEqualizer()) {
return;
@@ -114,7 +113,7 @@
}
//Testing security bug: 32588016
- @SecurityTest(minPatchLevel = "2017-01")
+ @AsbSecurityTest(cveBugId = 32588016)
public void testEqualizer_getParamPresetName_long() throws Exception {
if (!hasEqualizer()) {
return;
@@ -155,7 +154,7 @@
}
//testing security bug: 32095626
- @SecurityTest(minPatchLevel = "2017-01")
+ @AsbSecurityTest(cveBugId = 32095626)
public void testEqualizer_setParamBandLevel() throws Exception {
if (!hasEqualizer()) {
return;
@@ -171,7 +170,7 @@
}
//testing security bug: 32585400
- @SecurityTest(minPatchLevel = "2017-01")
+ @AsbSecurityTest(cveBugId = 32585400)
public void testEqualizer_setParamBandLevel_long() throws Exception {
if (!hasEqualizer()) {
return;
@@ -187,7 +186,7 @@
}
//testing security bug: 32705438
- @SecurityTest(minPatchLevel = "2017-02")
+ @AsbSecurityTest(cveBugId = 32705438)
public void testEqualizer_getParamFreqRangeCommand_short() throws Exception {
if (!hasEqualizer()) {
return;
@@ -197,7 +196,7 @@
}
//testing security bug: 32703959
- @SecurityTest(minPatchLevel = "2017-02")
+ @AsbSecurityTest(cveBugId = 32703959)
public void testEqualizer_getParamFreqRangeCommand_long() throws Exception {
if (!hasEqualizer()) {
return;
@@ -207,7 +206,7 @@
}
//testing security bug: 37563371 (short media)
- @SecurityTest(minPatchLevel = "2017-09")
+ @AsbSecurityTest(cveBugId = 37563371)
public void testEqualizer_setParamProperties_short() throws Exception {
if (!hasEqualizer()) {
return;
@@ -217,7 +216,7 @@
}
//testing security bug: 37563371 (long media)
- @SecurityTest(minPatchLevel = "2017-09")
+ @AsbSecurityTest(cveBugId = 37563371)
public void testEqualizer_setParamProperties_long() throws Exception {
if (!hasEqualizer()) {
return;
@@ -227,7 +226,7 @@
}
//Testing security bug: 63662938
- @SecurityTest(minPatchLevel = "2017-10")
+ @AsbSecurityTest(cveBugId = 63662938)
public void testDownmix_setParameter() throws Exception {
verifyZeroPVSizeRejectedForSetParameter(
EFFECT_TYPE_DOWNMIX, new int[] { DOWNMIX_PARAM_TYPE });
@@ -243,7 +242,7 @@
private static final int DOWNMIX_PARAM_TYPE = 0;
//Testing security bug: 63526567
- @SecurityTest(minPatchLevel = "2017-10")
+ @AsbSecurityTest(cveBugId = 63526567)
public void testEnvironmentalReverb_setParameter() throws Exception {
verifyZeroPVSizeRejectedForSetParameter(
AudioEffect.EFFECT_TYPE_ENV_REVERB, new int[] {
@@ -263,7 +262,7 @@
}
//Testing security bug: 67647856
- @SecurityTest(minPatchLevel = "2018-01")
+ @AsbSecurityTest(cveBugId = 67647856)
public void testPresetReverb_setParameter() throws Exception {
verifyZeroPVSizeRejectedForSetParameter(
AudioEffect.EFFECT_TYPE_PRESET_REVERB, new int[] {
diff --git a/tests/tests/security/src/android/security/cts/EncryptionTest.java b/tests/tests/security/src/android/security/cts/EncryptionTest.java
index f2a3ad8..79a5e70 100644
--- a/tests/tests/security/src/android/security/cts/EncryptionTest.java
+++ b/tests/tests/security/src/android/security/cts/EncryptionTest.java
@@ -23,7 +23,6 @@
import android.content.pm.PackageManager;
import android.os.Build;
import android.platform.test.annotations.AppModeFull;
-import android.platform.test.annotations.SecurityTest;
import android.util.Log;
import androidx.test.platform.app.InstrumentationRegistry;
@@ -37,7 +36,6 @@
import org.junit.Test;
import org.junit.runner.RunWith;
-@SecurityTest
@RunWith(AndroidJUnit4.class)
public class EncryptionTest {
static {
diff --git a/tests/tests/security/src/android/security/cts/FileIntegrityManagerTest.java b/tests/tests/security/src/android/security/cts/FileIntegrityManagerTest.java
index bd08ec7..f011f50 100644
--- a/tests/tests/security/src/android/security/cts/FileIntegrityManagerTest.java
+++ b/tests/tests/security/src/android/security/cts/FileIntegrityManagerTest.java
@@ -24,7 +24,6 @@
import android.content.pm.PackageManager;
import android.platform.test.annotations.AppModeFull;
import android.platform.test.annotations.RestrictedBuildTest;
-import android.platform.test.annotations.SecurityTest;
import android.security.FileIntegrityManager;
import androidx.test.platform.app.InstrumentationRegistry;
@@ -47,7 +46,6 @@
@AppModeFull
-@SecurityTest
@RunWith(AndroidJUnit4.class)
public class FileIntegrityManagerTest {
diff --git a/tests/tests/security/src/android/security/cts/HwRngTest.java b/tests/tests/security/src/android/security/cts/HwRngTest.java
index 175b305..b6469d4 100644
--- a/tests/tests/security/src/android/security/cts/HwRngTest.java
+++ b/tests/tests/security/src/android/security/cts/HwRngTest.java
@@ -17,7 +17,6 @@
package android.security.cts;
import android.platform.test.annotations.AppModeFull;
-import android.platform.test.annotations.SecurityTest;
import com.android.compatibility.common.util.CtsAndroidTestCase;
import com.android.compatibility.common.util.DeviceReportLog;
@@ -38,7 +37,6 @@
/**
* Tests for hardware random number generator device {@code /dev/hw_random}.
*/
-@SecurityTest
public class HwRngTest extends CtsAndroidTestCase {
// The block of constants below is from hw_random framework documentation and source code:
diff --git a/tests/tests/security/src/android/security/cts/IntentSenderRemovalTest.java b/tests/tests/security/src/android/security/cts/IntentSenderRemovalTest.java
index 1925781..00f4762 100644
--- a/tests/tests/security/src/android/security/cts/IntentSenderRemovalTest.java
+++ b/tests/tests/security/src/android/security/cts/IntentSenderRemovalTest.java
@@ -16,7 +16,6 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
import android.content.Context;
import android.content.Intent;
@@ -28,7 +27,6 @@
* Make sure the DebugIntentSender activity, which allows privilege escalation of intent caller
* to system uid, has been removed from the system.
*/
-@SecurityTest
public class IntentSenderRemovalTest extends AndroidTestCase {
/**
diff --git a/tests/tests/security/src/android/security/cts/IsolatedProcessTest.java b/tests/tests/security/src/android/security/cts/IsolatedProcessTest.java
index 2be37bb..60b329f 100644
--- a/tests/tests/security/src/android/security/cts/IsolatedProcessTest.java
+++ b/tests/tests/security/src/android/security/cts/IsolatedProcessTest.java
@@ -22,7 +22,7 @@
import android.os.IBinder;
import android.os.Process;
import android.os.RemoteException;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.security.cts.IIsolatedService;
import android.security.cts.IsolatedService;
import android.test.AndroidTestCase;
@@ -74,7 +74,7 @@
mLatch.await(BIND_SERVICE_TIMEOUT, TimeUnit.MILLISECONDS));
}
- @SecurityTest
+ @AsbSecurityTest(cveBugId = 30202228)
public void testGetCachedServicesFromIsolatedService() throws RemoteException {
String[] cachedServices = mService.getCachedSystemServices();
for (String serviceName : cachedServices) {
@@ -83,7 +83,7 @@
}
}
- @SecurityTest
+ @AsbSecurityTest(cveBugId = 30202228)
public void testGetServiceFromIsolatedService() throws RemoteException {
for (String serviceName : RESTRICTED_SERVICES_TO_TEST) {
IBinder service = mService.getSystemService(serviceName);
diff --git a/tests/tests/security/src/android/security/cts/IsolatedService.java b/tests/tests/security/src/android/security/cts/IsolatedService.java
index 0245105..094f689 100644
--- a/tests/tests/security/src/android/security/cts/IsolatedService.java
+++ b/tests/tests/security/src/android/security/cts/IsolatedService.java
@@ -20,7 +20,6 @@
import android.content.Intent;
import android.os.IBinder;
import android.os.Process;
-import android.platform.test.annotations.SecurityTest;
import android.util.Log;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
@@ -28,7 +27,6 @@
import java.util.HashMap;
import java.util.Map;
-@SecurityTest
public class IsolatedService extends Service {
private static final String TAG = IsolatedService.class.getSimpleName();
diff --git a/tests/tests/security/src/android/security/cts/LinuxRngTest.java b/tests/tests/security/src/android/security/cts/LinuxRngTest.java
index 9289e5a..e8712ce 100644
--- a/tests/tests/security/src/android/security/cts/LinuxRngTest.java
+++ b/tests/tests/security/src/android/security/cts/LinuxRngTest.java
@@ -16,13 +16,11 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
import junit.framework.TestCase;
import java.io.IOException;
-@SecurityTest
public class LinuxRngTest extends TestCase {
static {
System.loadLibrary("ctssecurity_jni");
diff --git a/tests/tests/security/src/android/security/cts/MMapExecutableTest.java b/tests/tests/security/src/android/security/cts/MMapExecutableTest.java
index 6ba1120..bc2e115 100644
--- a/tests/tests/security/src/android/security/cts/MMapExecutableTest.java
+++ b/tests/tests/security/src/android/security/cts/MMapExecutableTest.java
@@ -15,14 +15,12 @@
*/
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
import android.test.AndroidTestCase;
/**
* Verify that we can mmap executable code from an APK.
* Prevent regression on: b/16727210 and b/16076402.
*/
-@SecurityTest
public class MMapExecutableTest extends AndroidTestCase {
public MMapExecutableTest() {}
diff --git a/tests/tests/security/src/android/security/cts/MediaMetadataRetrieverTest.java b/tests/tests/security/src/android/security/cts/MediaMetadataRetrieverTest.java
index dbe784a..ecf8acc 100644
--- a/tests/tests/security/src/android/security/cts/MediaMetadataRetrieverTest.java
+++ b/tests/tests/security/src/android/security/cts/MediaMetadataRetrieverTest.java
@@ -21,12 +21,11 @@
import android.content.res.AssetFileDescriptor;
import android.content.res.Resources;
import android.media.MediaMetadataRetriever;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.test.AndroidTestCase;
import java.io.IOException;
-@SecurityTest
public class MediaMetadataRetrieverTest extends AndroidTestCase {
protected Resources mResources;
protected MediaMetadataRetriever mRetriever;
@@ -54,6 +53,7 @@
}
}
+ @AsbSecurityTest(cveBugId = 24623447)
public void testID3v2EmbeddedPicture() {
setDataSourceFd(R.raw.id3v2_3_extended_header_overflow_padding);
diff --git a/tests/tests/security/src/android/security/cts/MediaRecorderInfoLeakTest.java b/tests/tests/security/src/android/security/cts/MediaRecorderInfoLeakTest.java
index af62105..b427516 100644
--- a/tests/tests/security/src/android/security/cts/MediaRecorderInfoLeakTest.java
+++ b/tests/tests/security/src/android/security/cts/MediaRecorderInfoLeakTest.java
@@ -16,20 +16,19 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.media.MediaRecorder;
import android.test.AndroidTestCase;
import android.util.Log;
import java.io.File;
-@SecurityTest
public class MediaRecorderInfoLeakTest extends AndroidTestCase {
/**
* b/27855172
*/
- @SecurityTest(minPatchLevel = "2016-06")
+ @AsbSecurityTest(cveBugId = 27855172)
public void test_cve_2016_2499() throws Exception {
MediaRecorder mediaRecorder = null;
long end = System.currentTimeMillis() + 600_000; // 10 minutes from now
diff --git a/tests/tests/security/src/android/security/cts/MediaServerCrashTest.java b/tests/tests/security/src/android/security/cts/MediaServerCrashTest.java
index 382a95f..2d2e084 100644
--- a/tests/tests/security/src/android/security/cts/MediaServerCrashTest.java
+++ b/tests/tests/security/src/android/security/cts/MediaServerCrashTest.java
@@ -23,7 +23,7 @@
import android.os.ConditionVariable;
import android.os.Environment;
import android.os.ParcelFileDescriptor;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.test.AndroidTestCase;
import android.util.Log;
@@ -38,7 +38,6 @@
import android.security.cts.R;
-@SecurityTest
public class MediaServerCrashTest extends AndroidTestCase {
private static final String TAG = "MediaServerCrashTest";
@@ -90,6 +89,7 @@
new File(mFlFilePath).delete();
}
+ @AsbSecurityTest(cveBugId = 25070434)
public void testInvalidMidiNullPointerAccess() throws Exception {
testIfMediaServerDied(R.raw.midi_crash);
}
@@ -115,6 +115,7 @@
}
}
+ @AsbSecurityTest(cveBugId = 25070434)
public void testDrmManagerClientReset() throws Exception {
checkIfMediaServerDiedForDrm(R.raw.drm_uaf);
}
diff --git a/tests/tests/security/src/android/security/cts/Movie33897722.java b/tests/tests/security/src/android/security/cts/Movie33897722.java
index efc050f..2ce1610 100644
--- a/tests/tests/security/src/android/security/cts/Movie33897722.java
+++ b/tests/tests/security/src/android/security/cts/Movie33897722.java
@@ -23,14 +23,13 @@
import android.graphics.Paint;
import android.graphics.PorterDuff;
import android.graphics.PorterDuffXfermode;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.test.AndroidTestCase;
import java.io.InputStream;
import android.security.cts.R;
-@SecurityTest
public class Movie33897722 extends AndroidTestCase {
/**
* Verifies that decoding a particular GIF file does not read out out of bounds.
@@ -39,7 +38,7 @@
* larger than 2. Ensure that we do not attempt to read colors from beyond the end of the
* color map, which would be reading memory that we do not control, and may be uninitialized.
*/
- @SecurityTest(minPatchLevel = "2017-06")
+ @AsbSecurityTest(cveBugId = 33897722)
public void test_android_bug_33897722() {
// The image has a 10 x 10 frame on top of a transparent background. Only test the
// 10 x 10 frame, since the original bug would never have used uninitialized memory
@@ -47,6 +46,7 @@
test_movie(R.raw.bug_33897722, 600, 752, 10, 10);
}
+ @AsbSecurityTest(cveBugId = 37662286)
public void test_android_bug_37662286() {
// The image has a background color that is out of range. Arbitrarily test
// the upper left corner. (Most of the image is transparent.)
diff --git a/tests/tests/security/src/android/security/cts/NanoAppBundleTest.java b/tests/tests/security/src/android/security/cts/NanoAppBundleTest.java
index a324fd7..4f5754c 100644
--- a/tests/tests/security/src/android/security/cts/NanoAppBundleTest.java
+++ b/tests/tests/security/src/android/security/cts/NanoAppBundleTest.java
@@ -17,7 +17,7 @@
package android.security.cts;
import android.test.AndroidTestCase;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import androidx.test.InstrumentationRegistry;
import android.content.pm.ActivityInfo;
@@ -53,7 +53,6 @@
import static org.junit.Assert.assertTrue;
@AppModeFull
-@SecurityTest
public class NanoAppBundleTest extends AndroidTestCase {
private static final String TAG = "NanoAppBundleTest";
@@ -93,7 +92,7 @@
/**
* b/113527124
*/
- @SecurityTest(minPatchLevel = "2018-09")
+ @AsbSecurityTest(cveBugId = 77599679)
public void testPoc_cve_2018_9471() throws Exception {
try {
diff --git a/tests/tests/security/src/android/security/cts/NativeCodeTest.java b/tests/tests/security/src/android/security/cts/NativeCodeTest.java
index bb77ca9..c5a9bac 100644
--- a/tests/tests/security/src/android/security/cts/NativeCodeTest.java
+++ b/tests/tests/security/src/android/security/cts/NativeCodeTest.java
@@ -16,18 +16,17 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import junit.framework.TestCase;
-@SecurityTest
public class NativeCodeTest extends TestCase {
static {
System.loadLibrary("ctssecurity_jni");
}
- @SecurityTest
+ @AsbSecurityTest(cveBugId = 22300191)
public void testSysVipc() throws Exception {
assertTrue("Android does not support Sys V IPC, it must "
+ "be removed from the kernel. In the kernel config: "
diff --git a/tests/tests/security/src/android/security/cts/NetdTest.java b/tests/tests/security/src/android/security/cts/NetdTest.java
index 5ebd141..14623fd 100644
--- a/tests/tests/security/src/android/security/cts/NetdTest.java
+++ b/tests/tests/security/src/android/security/cts/NetdTest.java
@@ -18,7 +18,7 @@
import android.os.Binder;
import android.os.IBinder;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import junit.framework.TestCase;
@@ -26,7 +26,6 @@
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
-@SecurityTest
public class NetdTest extends TestCase {
/**
@@ -34,6 +33,7 @@
* Based on jsharkey PoC in b/5758556
* serv.setInterfaceThrottle("foo; reboot; echo ", -1, -1);
*/
+ @AsbSecurityTest(cveBugId = 5758556)
public void testThrottleSanitization() {
try {
diff --git a/tests/tests/security/src/android/security/cts/OutputConfigurationTest.java b/tests/tests/security/src/android/security/cts/OutputConfigurationTest.java
index d1b263f..f810817 100644
--- a/tests/tests/security/src/android/security/cts/OutputConfigurationTest.java
+++ b/tests/tests/security/src/android/security/cts/OutputConfigurationTest.java
@@ -19,7 +19,7 @@
import android.graphics.SurfaceTexture;
import android.hardware.camera2.params.OutputConfiguration;
import android.os.Parcel;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.test.AndroidTestCase;
import android.util.Size;
import android.view.Surface;
@@ -28,8 +28,8 @@
/**
* Verify that OutputConfiguration's fields propagate through parcel properly.
*/
-@SecurityTest
public class OutputConfigurationTest extends AndroidTestCase {
+ @AsbSecurityTest(cveBugId = 69683251)
public void testSharedSurfaceOutputConfigurationBasic() throws Exception {
SurfaceTexture outputTexture = new SurfaceTexture(/* random texture ID */ 5);
Surface surface = new Surface(outputTexture);
diff --git a/tests/tests/security/src/android/security/cts/PackageInstallerTest.java b/tests/tests/security/src/android/security/cts/PackageInstallerTest.java
index b87b36b..887538b 100644
--- a/tests/tests/security/src/android/security/cts/PackageInstallerTest.java
+++ b/tests/tests/security/src/android/security/cts/PackageInstallerTest.java
@@ -18,7 +18,7 @@
import android.Manifest;
import android.platform.test.annotations.AppModeFull;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import androidx.test.platform.app.InstrumentationRegistry;
@@ -36,7 +36,6 @@
import java.util.concurrent.TimeUnit;
@RunWith(JUnit4.class)
-@SecurityTest
@AppModeFull
public class PackageInstallerTest {
@@ -65,6 +64,7 @@
}
@Test
+ @AsbSecurityTest(cveBugId = 138650665)
public void verificationCanNotBeDisabledByInstaller() throws Exception {
Install.single(TEST_APP).addInstallFlags(
0x00080000 /* PackageManager.INSTALL_DISABLE_VERIFICATION */).commit();
diff --git a/tests/tests/security/src/android/security/cts/PackageSignatureTest.java b/tests/tests/security/src/android/security/cts/PackageSignatureTest.java
index cbed06d..4bfe8fe 100644
--- a/tests/tests/security/src/android/security/cts/PackageSignatureTest.java
+++ b/tests/tests/security/src/android/security/cts/PackageSignatureTest.java
@@ -22,7 +22,6 @@
import android.content.pm.Signature;
import android.content.res.Resources.NotFoundException;
import android.platform.test.annotations.RestrictedBuildTest;
-import android.platform.test.annotations.SecurityTest;
import android.test.AndroidTestCase;
import android.util.Log;
@@ -38,7 +37,6 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-@SecurityTest
public class PackageSignatureTest extends AndroidTestCase {
private static final String TAG = PackageSignatureTest.class.getSimpleName();
diff --git a/tests/tests/security/src/android/security/cts/ParcelableExceptionTest.java b/tests/tests/security/src/android/security/cts/ParcelableExceptionTest.java
index a024e50..5b4e530 100644
--- a/tests/tests/security/src/android/security/cts/ParcelableExceptionTest.java
+++ b/tests/tests/security/src/android/security/cts/ParcelableExceptionTest.java
@@ -17,7 +17,7 @@
package android.security.cts;
import android.test.AndroidTestCase;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.security.cts.R;
import android.content.Context;
@@ -30,10 +30,9 @@
import java.io.File;
import java.lang.reflect.Field;
-@SecurityTest
public class ParcelableExceptionTest extends AndroidTestCase {
- @SecurityTest(minPatchLevel = "2017-12")
+ @AsbSecurityTest(cveBugId = 65281159)
public void test_CVE_2017_0871() throws Exception {
String filePath = "/data/system/" + System.currentTimeMillis();
File file = new File(filePath);
diff --git a/tests/tests/security/src/android/security/cts/PutOverflowTest.java b/tests/tests/security/src/android/security/cts/PutOverflowTest.java
index 6f7e8da..2bf7a85 100644
--- a/tests/tests/security/src/android/security/cts/PutOverflowTest.java
+++ b/tests/tests/security/src/android/security/cts/PutOverflowTest.java
@@ -16,13 +16,12 @@
package android.security.cts;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.test.AndroidTestCase;
import java.lang.reflect.Method;
-@SecurityTest
public class PutOverflowTest extends AndroidTestCase {
- @SecurityTest(minPatchLevel = "2015-02")
+ @AsbSecurityTest(cveBugId = 22802399)
public void testCrash() throws Exception {
try {
Class<?> keystoreClass = Class.forName("android.security.KeyStore");
diff --git a/tests/tests/security/src/android/security/cts/RunningAppProcessInfoTest.java b/tests/tests/security/src/android/security/cts/RunningAppProcessInfoTest.java
index 65ce85f..8405acc 100644
--- a/tests/tests/security/src/android/security/cts/RunningAppProcessInfoTest.java
+++ b/tests/tests/security/src/android/security/cts/RunningAppProcessInfoTest.java
@@ -18,12 +18,11 @@
import android.app.ActivityManager;
import android.content.Context;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.test.AndroidTestCase;
import java.util.List;
-@SecurityTest
public class RunningAppProcessInfoTest extends AndroidTestCase {
/*
* This test verifies severity vulnerability: apps can bypass the L restrictions in
@@ -31,6 +30,7 @@
* the test if it is not able to get other process information.
*/
+ @AsbSecurityTest(cveBugId = 20034603)
public void testRunningAppProcessInfo() {
ActivityManager amActivityManager =
(ActivityManager) mContext.getSystemService(Context.ACTIVITY_SERVICE);
diff --git a/tests/tests/security/src/android/security/cts/SQLiteTest.java b/tests/tests/security/src/android/security/cts/SQLiteTest.java
index 55e731d..a3a14d4 100644
--- a/tests/tests/security/src/android/security/cts/SQLiteTest.java
+++ b/tests/tests/security/src/android/security/cts/SQLiteTest.java
@@ -26,7 +26,7 @@
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.net.Uri;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.provider.VoicemailContract;
import android.test.AndroidTestCase;
@@ -35,7 +35,6 @@
import java.io.File;
import java.io.FileInputStream;
-@SecurityTest
public class SQLiteTest extends AndroidTestCase {
private static final String DATABASE_FILE_NAME = "database_test.db";
@@ -62,7 +61,7 @@
/**
* b/139186193
*/
- @SecurityTest(minPatchLevel = "2019-11")
+ @AsbSecurityTest(cveBugId = 139186193)
public void test_android_cve_2019_2195() {
Uri uri = VoicemailContract.Voicemails.CONTENT_URI;
uri = uri.buildUpon().appendQueryParameter("source_package", mPackageName).build();
@@ -99,7 +98,7 @@
/**
* b/153352319
*/
- @SecurityTest(minPatchLevel = "2021-06")
+ @AsbSecurityTest(cveBugId = 153352319)
public void test_android_float_to_text_conversion_overflow() {
String create_cmd = "select (printf('%.2147483647G',0.01));";
try (Cursor c = mDatabase.rawQuery(create_cmd, null)) {
diff --git a/tests/tests/security/src/android/security/cts/STKFrameworkTest.java b/tests/tests/security/src/android/security/cts/STKFrameworkTest.java
index e431a6c..7e6fb7c 100644
--- a/tests/tests/security/src/android/security/cts/STKFrameworkTest.java
+++ b/tests/tests/security/src/android/security/cts/STKFrameworkTest.java
@@ -17,12 +17,11 @@
import android.content.ComponentName;
import android.content.Intent;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.test.AndroidTestCase;
import android.content.pm.PackageManager;
import android.test.AndroidTestCase;
-@SecurityTest
public class STKFrameworkTest extends AndroidTestCase {
private boolean mHasTelephony;
@@ -42,6 +41,7 @@
* Verifies commands Intercepting which has been sent from SIM card to Telephony using
* zero-permission malicious application
*/
+ @AsbSecurityTest(cveBugId = 21697171)
public void testInterceptedSIMCommandsToTelephony() {
if (!mHasTelephony) {
return;
diff --git a/tests/tests/security/src/android/security/cts/SkiaICORecursiveDecodingTest.java b/tests/tests/security/src/android/security/cts/SkiaICORecursiveDecodingTest.java
index 16f01eb..4a9802f 100644
--- a/tests/tests/security/src/android/security/cts/SkiaICORecursiveDecodingTest.java
+++ b/tests/tests/security/src/android/security/cts/SkiaICORecursiveDecodingTest.java
@@ -18,28 +18,27 @@
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.test.AndroidTestCase;
import java.io.InputStream;
import android.security.cts.R;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
-@SecurityTest
public class SkiaICORecursiveDecodingTest extends AndroidTestCase {
- @SecurityTest(minPatchLevel = "2018-05")
+ @AsbSecurityTest(cveBugId = 73782357)
public void testAndroid_cve_2017_13318() {
doSkiaIcoRecursiveDecodingTest(R.raw.cve_2017_13318);
}
- @SecurityTest
+ @AsbSecurityTest(cveBugId = 17262540)
public void test_android_bug_17262540() {
doSkiaIcoRecursiveDecodingTest(R.raw.bug_17262540);
}
- @SecurityTest
+ @AsbSecurityTest(cveBugId = 17265466)
public void test_android_bug_17265466() {
doSkiaIcoRecursiveDecodingTest(R.raw.bug_17265466);
}
diff --git a/tests/tests/security/src/android/security/cts/StagefrightTest.java b/tests/tests/security/src/android/security/cts/StagefrightTest.java
index 8c086c4..725cdbf 100644
--- a/tests/tests/security/src/android/security/cts/StagefrightTest.java
+++ b/tests/tests/security/src/android/security/cts/StagefrightTest.java
@@ -42,7 +42,7 @@
import android.os.SystemClock;
import android.platform.test.annotations.AppModeFull;
import android.os.Parcel;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.util.Log;
import android.view.Surface;
import android.webkit.cts.CtsTestServer;
@@ -144,206 +144,206 @@
***********************************************************/
@Test
- @SecurityTest(minPatchLevel = "2019-04")
+ @AsbSecurityTest(cveBugId = 122472139)
public void testStagefright_cve_2019_2244() throws Exception {
doStagefrightTestRawBlob(R.raw.cve_2019_2244, "video/mpeg2", 320, 420);
}
@Test
- @SecurityTest(minPatchLevel = "2017-07")
+ @AsbSecurityTest(cveBugId = 36725407)
public void testStagefright_bug_36725407() throws Exception {
doStagefrightTest(R.raw.bug_36725407);
}
@Test
- @SecurityTest(minPatchLevel = "2016-08")
+ @AsbSecurityTest(cveBugId = 29023649)
public void testStagefright_cve_2016_3829() throws Exception {
doStagefrightTest(R.raw.cve_2016_3829, new CrashUtils.Config().checkMinAddress(false));
}
@Test
- @SecurityTest(minPatchLevel = "2017-06")
+ @AsbSecurityTest(cveBugId = 35645051)
public void testStagefright_cve_2017_0643() throws Exception {
doStagefrightTest(R.raw.cve_2017_0643, new CrashUtils.Config().checkMinAddress(false));
}
@Test
- @SecurityTest(minPatchLevel = "2017-08")
+ @AsbSecurityTest(cveBugId = 37469795)
public void testStagefright_cve_2017_0728() throws Exception {
doStagefrightTest(R.raw.cve_2017_0728, new CrashUtils.Config().checkMinAddress(false));
}
@Test
- @SecurityTest(minPatchLevel = "2017-10")
+ @AsbSecurityTest(cveBugId = 62187433)
public void testStagefright_bug_62187433() throws Exception {
doStagefrightTest(R.raw.bug_62187433);
}
@Test
- @SecurityTest(minPatchLevel = "2017-09")
+ @AsbSecurityTest(cveBugId = 62673844)
public void testStagefrightANR_bug_62673844() throws Exception {
doStagefrightTestANR(R.raw.bug_62673844);
}
@Test
- @SecurityTest(minPatchLevel = "2017-09")
+ @AsbSecurityTest(cveBugId = 37079296)
public void testStagefright_bug_37079296() throws Exception {
doStagefrightTest(R.raw.bug_37079296);
}
@Test
- @SecurityTest(minPatchLevel = "2017-09")
+ @AsbSecurityTest(cveBugId = 38342499)
public void testStagefright_bug_38342499() throws Exception {
doStagefrightTest(R.raw.bug_38342499);
}
@Test
- @SecurityTest(minPatchLevel = "2015-10")
+ @AsbSecurityTest(cveBugId = 22771132)
public void testStagefright_bug_22771132() throws Exception {
doStagefrightTest(R.raw.bug_22771132);
}
@Test
- @SecurityTest(minPatchLevel = "2015-10")
+ @AsbSecurityTest(cveBugId = 21443020)
public void testStagefright_bug_21443020() throws Exception {
doStagefrightTest(R.raw.bug_21443020_webm);
}
@Test
- @SecurityTest(minPatchLevel = "2018-03")
+ @AsbSecurityTest(cveBugId = 34360591)
public void testStagefright_bug_34360591() throws Exception {
doStagefrightTest(R.raw.bug_34360591);
}
@Test
- @SecurityTest(minPatchLevel = "2017-06")
+ @AsbSecurityTest(cveBugId = 35763994)
public void testStagefright_bug_35763994() throws Exception {
doStagefrightTest(R.raw.bug_35763994, new CrashUtils.Config().checkMinAddress(false));
}
@Test
- @SecurityTest(minPatchLevel = "2017-03")
+ @AsbSecurityTest(cveBugId = 33137046)
public void testStagefright_bug_33137046() throws Exception {
doStagefrightTest(R.raw.bug_33137046);
}
@Test
- @SecurityTest(minPatchLevel = "2017-07")
+ @AsbSecurityTest(cveBugId = 28532266)
public void testStagefright_cve_2016_2507() throws Exception {
doStagefrightTest(R.raw.cve_2016_2507, new CrashUtils.Config().checkMinAddress(false));
}
@Test
- @SecurityTest(minPatchLevel = "2017-03")
+ @AsbSecurityTest(cveBugId = 31647370)
public void testStagefright_bug_31647370() throws Exception {
doStagefrightTest(R.raw.bug_31647370);
}
@Test
- @SecurityTest(minPatchLevel = "2017-01")
+ @AsbSecurityTest(cveBugId = 32577290)
public void testStagefright_bug_32577290() throws Exception {
doStagefrightTest(R.raw.bug_32577290);
}
@Test
- @SecurityTest(minPatchLevel = "2017-07")
+ @AsbSecurityTest(cveBugId = 20139950)
public void testStagefright_cve_2015_1538_1() throws Exception {
doStagefrightTest(R.raw.cve_2015_1538_1);
}
@Test
- @SecurityTest(minPatchLevel = "2017-07")
+ @AsbSecurityTest(cveBugId = 20139950)
public void testStagefright_cve_2015_1538_2() throws Exception {
doStagefrightTest(R.raw.cve_2015_1538_2);
}
@Test
- @SecurityTest(minPatchLevel = "2017-07")
+ @AsbSecurityTest(cveBugId = 20139950)
public void testStagefright_cve_2015_1538_3() throws Exception {
doStagefrightTest(R.raw.cve_2015_1538_3);
}
@Test
- @SecurityTest(minPatchLevel = "2017-07")
+ @AsbSecurityTest(cveBugId = 20139950)
public void testStagefright_cve_2015_1538_4() throws Exception {
doStagefrightTest(R.raw.cve_2015_1538_4);
}
@Test
- @SecurityTest(minPatchLevel = "2017-07")
+ @AsbSecurityTest(cveBugId = 20139950)
public void testStagefright_cve_2015_1539() throws Exception {
doStagefrightTest(R.raw.cve_2015_1539);
}
@Test
- @SecurityTest(minPatchLevel = "2015-01")
+ @AsbSecurityTest(cveBugId = 21468251)
public void testStagefright_cve_2015_3824() throws Exception {
doStagefrightTest(R.raw.cve_2015_3824);
}
@Test
- @SecurityTest(minPatchLevel = "2015-01")
+ @AsbSecurityTest(cveBugId = 21467632)
public void testStagefright_cve_2015_3826() throws Exception {
doStagefrightTest(R.raw.cve_2015_3826);
}
@Test
- @SecurityTest(minPatchLevel = "2015-01")
+ @AsbSecurityTest(cveBugId = 21468053)
public void testStagefright_cve_2015_3827() throws Exception {
doStagefrightTest(R.raw.cve_2015_3827);
}
@Test
- @SecurityTest(minPatchLevel = "2015-01")
+ @AsbSecurityTest(cveBugId = 21467634)
public void testStagefright_cve_2015_3828() throws Exception {
doStagefrightTest(R.raw.cve_2015_3828);
}
@Test
- @SecurityTest(minPatchLevel = "2015-01")
+ @AsbSecurityTest(cveBugId = 21467767)
public void testStagefright_cve_2015_3829() throws Exception {
doStagefrightTest(R.raw.cve_2015_3829);
}
@Test
- @SecurityTest(minPatchLevel = "2015-01")
+ @AsbSecurityTest(cveBugId = 21132860)
public void testStagefright_cve_2015_3836() throws Exception {
doStagefrightTest(R.raw.cve_2015_3836);
}
@Test
- @SecurityTest(minPatchLevel = "2015-01")
+ @AsbSecurityTest(cveBugId = 23034759)
public void testStagefright_cve_2015_3864() throws Exception {
doStagefrightTest(R.raw.cve_2015_3864);
}
@Test
- @SecurityTest(minPatchLevel = "2015-01")
+ @AsbSecurityTest(cveBugId = 23034759)
public void testStagefright_cve_2015_3864_b23034759() throws Exception {
doStagefrightTest(R.raw.cve_2015_3864_b23034759);
}
@Test
- @SecurityTest(minPatchLevel = "2015-10")
+ @AsbSecurityTest(cveBugId = 23306638)
public void testStagefright_cve_2015_6598() throws Exception {
doStagefrightTest(R.raw.cve_2015_6598);
}
@Test
- @SecurityTest(minPatchLevel = "2016-12")
+ @AsbSecurityTest(cveBugId = 31318219)
public void testStagefright_cve_2016_6766() throws Exception {
doStagefrightTest(R.raw.cve_2016_6766);
}
@Test
- @SecurityTest(minPatchLevel = "2017-02")
+ @AsbSecurityTest(cveBugId = 27211885)
public void testStagefright_cve_2016_2429_b_27211885() throws Exception {
doStagefrightTest(R.raw.cve_2016_2429_b_27211885,
new CrashUtils.Config().checkMinAddress(false));
}
@Test
- @SecurityTest(minPatchLevel = "2017-08")
+ @AsbSecurityTest(cveBugId = 34031018)
public void testStagefright_bug_34031018() throws Exception {
doStagefrightTest(R.raw.bug_34031018_32bit, new CrashUtils.Config().checkMinAddress(false));
doStagefrightTest(R.raw.bug_34031018_64bit, new CrashUtils.Config().checkMinAddress(false));
@@ -355,38 +355,38 @@
***********************************************************/
@Test
- @SecurityTest(minPatchLevel = "2018-01")
+ @AsbSecurityTest(cveBugId = 65123471)
public void testStagefright_bug_65123471() throws Exception {
doStagefrightTest(R.raw.bug_65123471);
}
@Test
- @SecurityTest(minPatchLevel = "2018-04")
+ @AsbSecurityTest(cveBugId = 72165027)
public void testStagefright_bug_72165027() throws Exception {
doStagefrightTest(R.raw.bug_72165027);
}
@Test
- @SecurityTest(minPatchLevel = "2018-06")
+ @AsbSecurityTest(cveBugId = 65483665)
public void testStagefright_bug_65483665() throws Exception {
doStagefrightTest(R.raw.bug_65483665);
}
@Test
- @SecurityTest(minPatchLevel = "2018-01")
+ @AsbSecurityTest(cveBugId = 62815506)
public void testStagefright_cve_2017_0852_b_62815506() throws Exception {
doStagefrightTest(R.raw.cve_2017_0852_b_62815506,
new CrashUtils.Config().checkMinAddress(false));
}
@Test
- @SecurityTest(minPatchLevel = "2018-02")
+ @AsbSecurityTest(cveBugId = 68160703)
public void testStagefright_cve_2017_13229() throws Exception {
doStagefrightTest(R.raw.cve_2017_13229);
}
@Test
- @SecurityTest(minPatchLevel = "2017-09")
+ @AsbSecurityTest(cveBugId = 62534693)
public void testStagefright_cve_2017_0763() throws Exception {
doStagefrightTest(R.raw.cve_2017_0763);
}
@@ -397,92 +397,92 @@
***********************************************************/
@Test
- @SecurityTest(minPatchLevel = "2018-06")
+ @AsbSecurityTest(cveBugId = 73965890)
public void testBug_73965890() throws Exception {
int[] frameSizes = getFrameSizes(R.raw.bug_73965890_framelen);
doStagefrightTestRawBlob(R.raw.bug_73965890_hevc, "video/hevc", 320, 240, frameSizes);
}
@Test
- @SecurityTest(minPatchLevel = "2016-10")
+ @AsbSecurityTest(cveBugId = 30744884)
public void testStagefright_cve_2016_3920() throws Exception {
doStagefrightTest(R.raw.cve_2016_3920, new CrashUtils.Config().checkMinAddress(false));
}
@Test
- @SecurityTest(minPatchLevel = "2017-09")
+ @AsbSecurityTest(cveBugId = 38448381)
public void testStagefright_bug_38448381() throws Exception {
doStagefrightTest(R.raw.bug_38448381);
}
@Test
- @SecurityTest(minPatchLevel = "2016-08")
+ @AsbSecurityTest(cveBugId = 28166152)
public void testStagefright_cve_2016_3821() throws Exception {
doStagefrightTest(R.raw.cve_2016_3821, new CrashUtils.Config().checkMinAddress(false));
}
@Test
- @SecurityTest(minPatchLevel = "2018-04")
+ @AsbSecurityTest(cveBugId = 70897454)
public void testStagefright_bug_70897454() throws Exception {
doStagefrightTestRawBlob(R.raw.b70897454_avc, "video/avc", 320, 420);
}
@Test
- @SecurityTest(minPatchLevel = "2016-07")
+ @AsbSecurityTest(cveBugId = 28165659)
public void testStagefright_cve_2016_3742_b_28165659() throws Exception {
doStagefrightTest(R.raw.cve_2016_3742_b_28165659);
}
@Test
- @SecurityTest(minPatchLevel = "2017-05")
+ @AsbSecurityTest(cveBugId = 35039946)
public void testStagefright_bug_35039946() throws Exception {
doStagefrightTestRawBlob(R.raw.bug_35039946_hevc, "video/hevc", 320, 420);
}
@Test
- @SecurityTest(minPatchLevel = "2017-09")
+ @AsbSecurityTest(cveBugId = 38115076)
public void testStagefright_bug_38115076() throws Exception {
doStagefrightTest(R.raw.bug_38115076, new CrashUtils.Config().checkMinAddress(false));
}
@Test
- @SecurityTest(minPatchLevel = "2017-05")
+ @AsbSecurityTest(cveBugId = 34618607)
public void testStagefright_bug_34618607() throws Exception {
doStagefrightTest(R.raw.bug_34618607, new CrashUtils.Config().checkMinAddress(false));
}
@Test
- @SecurityTest(minPatchLevel = "2018-02")
+ @AsbSecurityTest(cveBugId = 69478425)
public void testStagefright_bug_69478425() throws Exception {
doStagefrightTest(R.raw.bug_69478425);
}
@Test
- @SecurityTest(minPatchLevel = "2018-01")
+ @AsbSecurityTest(cveBugId = 65735716)
public void testStagefright_bug_65735716() throws Exception {
doStagefrightTestRawBlob(R.raw.bug_65735716_avc, "video/avc", 320, 240);
}
@Test
- @SecurityTest(minPatchLevel = "2017-12")
+ @AsbSecurityTest(cveBugId = 65717533)
public void testStagefright_bug_65717533() throws Exception {
doStagefrightTest(R.raw.bug_65717533_header_corrupt);
}
@Test
- @SecurityTest(minPatchLevel = "2017-08")
+ @AsbSecurityTest(cveBugId = 38239864)
public void testStagefright_bug_38239864() throws Exception {
doStagefrightTest(R.raw.bug_38239864, (4 * 60 * 1000));
}
@Test
- @SecurityTest(minPatchLevel = "2017-05")
+ @AsbSecurityTest(cveBugId = 35269635)
public void testStagefright_cve_2017_0600() throws Exception {
doStagefrightTest(R.raw.cve_2017_0600, new CrashUtils.Config().checkMinAddress(false));
}
@Test
- @SecurityTest(minPatchLevel = "2017-08")
+ @AsbSecurityTest(cveBugId = 38014992)
public void testBug_38014992() throws Exception {
int[] frameSizes = getFrameSizes(R.raw.bug_38014992_framelen);
doStagefrightTestRawBlob(R.raw.bug_38014992_avc, "video/avc", 640, 480, frameSizes,
@@ -490,35 +490,35 @@
}
@Test
- @SecurityTest(minPatchLevel = "2017-07")
+ @AsbSecurityTest(cveBugId = 35584425)
public void testBug_35584425() throws Exception {
int[] frameSizes = getFrameSizes(R.raw.bug_35584425_framelen);
doStagefrightTestRawBlob(R.raw.bug_35584425_avc, "video/avc", 352, 288, frameSizes);
}
@Test
- @SecurityTest(minPatchLevel = "2016-11")
+ @AsbSecurityTest(cveBugId = 31092462)
public void testBug_31092462() throws Exception {
int[] frameSizes = getFrameSizes(R.raw.bug_31092462_framelen);
doStagefrightTestRawBlob(R.raw.bug_31092462_avc, "video/avc", 1280, 1024, frameSizes);
}
@Test
- @SecurityTest(minPatchLevel = "2017-04")
+ @AsbSecurityTest(cveBugId = 34097866)
public void testBug_34097866() throws Exception {
int[] frameSizes = getFrameSizes(R.raw.bug_34097866_frame_len);
doStagefrightTestRawBlob(R.raw.bug_34097866_avc, "video/avc", 352, 288, frameSizes);
}
@Test
- @SecurityTest(minPatchLevel = "2017-03")
+ @AsbSecurityTest(cveBugId = 33862021)
public void testBug_33862021() throws Exception {
int[] frameSizes = getFrameSizes(R.raw.bug_33862021_frame_len);
doStagefrightTestRawBlob(R.raw.bug_33862021_hevc, "video/hevc", 160, 96, frameSizes);
}
@Test
- @SecurityTest(minPatchLevel = "2017-03")
+ @AsbSecurityTest(cveBugId = 33387820)
public void testBug_33387820() throws Exception {
int[] frameSizes = {45, 3202, 430, 2526};
doStagefrightTestRawBlob(R.raw.bug_33387820_avc, "video/avc", 320, 240, frameSizes,
@@ -526,42 +526,42 @@
}
@Test
- @SecurityTest(minPatchLevel = "2017-07")
+ @AsbSecurityTest(cveBugId = 37008096)
public void testBug_37008096() throws Exception {
int[] frameSizes = {245, 12, 33, 140, 164};
doStagefrightTestRawBlob(R.raw.bug_37008096_avc, "video/avc", 320, 240, frameSizes);
}
@Test
- @SecurityTest(minPatchLevel = "2017-07")
+ @AsbSecurityTest(cveBugId = 34231163)
public void testStagefright_bug_34231163() throws Exception {
int[] frameSizes = {22, 357, 217, 293, 175};
doStagefrightTestRawBlob(R.raw.bug_34231163_mpeg2, "video/mpeg2", 320, 240, frameSizes);
}
@Test
- @SecurityTest(minPatchLevel = "2017-04")
+ @AsbSecurityTest(cveBugId = 33933140)
public void testStagefright_bug_33933140() throws Exception {
int[] frameSizes = getFrameSizes(R.raw.bug_33933140_framelen);
doStagefrightTestRawBlob(R.raw.bug_33933140_avc, "video/avc", 320, 240, frameSizes);
}
@Test
- @SecurityTest(minPatchLevel = "2017-04")
+ @AsbSecurityTest(cveBugId = 34097915)
public void testStagefright_bug_34097915() throws Exception {
int[] frameSizes = {4140, 593, 0, 15495};
doStagefrightTestRawBlob(R.raw.bug_34097915_avc, "video/avc", 320, 240, frameSizes);
}
@Test
- @SecurityTest(minPatchLevel = "2017-03")
+ @AsbSecurityTest(cveBugId = 34097213)
public void testStagefright_bug_34097213() throws Exception {
int[] frameSizes = {2571, 210, 33858};
doStagefrightTestRawBlob(R.raw.bug_34097213_avc, "video/avc", 320, 240, frameSizes);
}
@Test
- @SecurityTest(minPatchLevel = "2016-08")
+ @AsbSecurityTest(cveBugId = 28816956)
public void testBug_28816956() throws Exception {
int[] frameSizes = getFrameSizes(R.raw.bug_28816956_framelen);
doStagefrightTestRawBlob(
@@ -570,7 +570,7 @@
}
@Test
- @SecurityTest(minPatchLevel = "2017-03")
+ @AsbSecurityTest(cveBugId = 33818500)
public void testBug_33818500() throws Exception {
int[] frameSizes = getFrameSizes(R.raw.bug_33818500_framelen);
doStagefrightTestRawBlob(R.raw.bug_33818500_avc, "video/avc", 64, 32, frameSizes,
@@ -578,114 +578,114 @@
}
@Test
- @SecurityTest(minPatchLevel = "2018-01")
+ @AsbSecurityTest(cveBugId = 64784973)
public void testBug_64784973() throws Exception {
int[] frameSizes = getFrameSizes(R.raw.bug_64784973_framelen);
doStagefrightTestRawBlob(R.raw.bug_64784973_hevc, "video/hevc", 1280, 720, frameSizes);
}
@Test
- @SecurityTest(minPatchLevel = "2017-07")
+ @AsbSecurityTest(cveBugId = 34231231)
public void testBug_34231231() throws Exception {
int[] frameSizes = getFrameSizes(R.raw.bug_34231231_framelen);
doStagefrightTestRawBlob(R.raw.bug_34231231_mpeg2, "video/mpeg2", 352, 288, frameSizes);
}
@Test
- @SecurityTest(minPatchLevel = "2017-10")
+ @AsbSecurityTest(cveBugId = 63045918)
public void testBug_63045918() throws Exception {
int[] frameSizes = getFrameSizes(R.raw.bug_63045918_framelen);
doStagefrightTestRawBlob(R.raw.bug_63045918_hevc, "video/hevc", 352, 288, frameSizes);
}
@Test
- @SecurityTest(minPatchLevel = "2017-03")
+ @AsbSecurityTest(cveBugId = 33298089)
public void testBug_33298089() throws Exception {
int[] frameSizes = {3247, 430, 221, 2305};
doStagefrightTestRawBlob(R.raw.bug_33298089_avc, "video/avc", 32, 64, frameSizes);
}
@Test
- @SecurityTest(minPatchLevel = "2017-05")
+ @AsbSecurityTest(cveBugId = 34672748)
public void testStagefright_cve_2017_0599() throws Exception {
doStagefrightTest(R.raw.cve_2017_0599, new CrashUtils.Config().checkMinAddress(false));
}
@Test
- @SecurityTest(minPatchLevel = "2017-09")
+ @AsbSecurityTest(cveBugId = 36492741)
public void testStagefright_bug_36492741() throws Exception {
doStagefrightTest(R.raw.bug_36492741);
}
@Test
- @SecurityTest(minPatchLevel = "2017-08")
+ @AsbSecurityTest(cveBugId = 38487564)
public void testStagefright_bug_38487564() throws Exception {
doStagefrightTest(R.raw.bug_38487564, (4 * 60 * 1000));
}
@Test
- @SecurityTest(minPatchLevel = "2017-09")
+ @AsbSecurityTest(cveBugId = 37237396)
public void testStagefright_bug_37237396() throws Exception {
doStagefrightTest(R.raw.bug_37237396);
}
@Test
- @SecurityTest(minPatchLevel = "2017-09")
+ @AsbSecurityTest(cveBugId = 25818142)
public void testStagefright_cve_2016_0842() throws Exception {
doStagefrightTest(R.raw.cve_2016_0842);
}
@Test
- @SecurityTest(minPatchLevel = "2017-11")
+ @AsbSecurityTest(cveBugId = 63121644)
public void testStagefright_bug_63121644() throws Exception {
doStagefrightTest(R.raw.bug_63121644);
}
@Test
- @SecurityTest(minPatchLevel = "2017-09")
+ @AsbSecurityTest(cveBugId = 30593752)
public void testStagefright_cve_2016_6712() throws Exception {
doStagefrightTest(R.raw.cve_2016_6712, new CrashUtils.Config().checkMinAddress(false));
}
@Test
- @SecurityTest(minPatchLevel = "2017-04")
+ @AsbSecurityTest(cveBugId = 34097231)
public void testStagefright_bug_34097231() throws Exception {
doStagefrightTestRawBlob(R.raw.bug_34097231_avc, "video/avc", 320, 240);
}
@Test
- @SecurityTest(minPatchLevel = "2017-05")
+ @AsbSecurityTest(cveBugId = 34097672)
public void testStagefright_bug_34097672() throws Exception {
doStagefrightTest(R.raw.bug_34097672);
}
@Test
- @SecurityTest(minPatchLevel = "2017-03")
+ @AsbSecurityTest(cveBugId = 33751193)
public void testStagefright_bug_33751193() throws Exception {
doStagefrightTestRawBlob(R.raw.bug_33751193_avc, "video/avc", 320, 240);
}
@Test
- @SecurityTest(minPatchLevel = "2017-07")
+ @AsbSecurityTest(cveBugId = 36993291)
public void testBug_36993291() throws Exception {
doStagefrightTestRawBlob(R.raw.bug_36993291_avc, "video/avc", 320, 240);
}
@Test
- @SecurityTest(minPatchLevel = "2017-06")
+ @AsbSecurityTest(cveBugId = 33818508)
public void testStagefright_bug_33818508() throws Exception {
doStagefrightTest(R.raw.bug_33818508, new CrashUtils.Config().checkMinAddress(false));
}
@Test
- @SecurityTest(minPatchLevel = "2017-08")
+ @AsbSecurityTest(cveBugId = 32873375)
public void testStagefright_bug_32873375() throws Exception {
doStagefrightTest(R.raw.bug_32873375, new CrashUtils.Config().checkMinAddress(false));
}
@Test
- @SecurityTest(minPatchLevel = "2018-02")
+ @AsbSecurityTest(cveBugId = 63522067)
public void testStagefright_bug_63522067() throws Exception {
doStagefrightTestRawBlob(R.raw.bug_63522067_1_hevc, "video/hevc", 320, 420);
doStagefrightTestRawBlob(R.raw.bug_63522067_2_hevc, "video/hevc", 320, 420);
@@ -694,79 +694,79 @@
}
@Test
- @SecurityTest(minPatchLevel = "2016-03")
+ @AsbSecurityTest(cveBugId = 25765591)
public void testStagefright_bug_25765591() throws Exception {
doStagefrightTest(R.raw.bug_25765591);
}
@Test
- @SecurityTest(minPatchLevel = "2017-09")
+ @AsbSecurityTest(cveBugId = 62673179)
public void testStagefright_bug_62673179() throws Exception {
doStagefrightTest(R.raw.bug_62673179_ts, (4 * 60 * 1000));
}
@Test
- @SecurityTest(minPatchLevel = "2018-03")
+ @AsbSecurityTest(cveBugId = 69269702)
public void testStagefright_bug_69269702() throws Exception {
doStagefrightTest(R.raw.bug_69269702);
}
@Test
- @SecurityTest(minPatchLevel = "2015-10")
+ @AsbSecurityTest(cveBugId = 23213430)
public void testStagefright_cve_2015_3867() throws Exception {
doStagefrightTest(R.raw.cve_2015_3867);
}
@Test
- @SecurityTest(minPatchLevel = "2018-01")
+ @AsbSecurityTest(cveBugId = 65398821)
public void testStagefright_bug_65398821() throws Exception {
doStagefrightTest(R.raw.bug_65398821, ( 4 * 60 * 1000 ) );
}
@Test
- @SecurityTest(minPatchLevel = "2015-10")
+ @AsbSecurityTest(cveBugId = 23036083)
public void testStagefright_cve_2015_3869() throws Exception {
doStagefrightTest(R.raw.cve_2015_3869);
}
@Test
- @SecurityTest(minPatchLevel = "2016-03")
+ @AsbSecurityTest(cveBugId = 23452792)
public void testStagefright_bug_23452792() throws Exception {
doStagefrightTest(R.raw.bug_23452792);
}
@Test
- @SecurityTest(minPatchLevel = "2016-08")
+ @AsbSecurityTest(cveBugId = 28673410)
public void testStagefright_cve_2016_3820() throws Exception {
doStagefrightTest(R.raw.cve_2016_3820);
}
@Test
- @SecurityTest(minPatchLevel = "2016-07")
+ @AsbSecurityTest(cveBugId = 28165661)
public void testStagefright_cve_2016_3741() throws Exception {
doStagefrightTest(R.raw.cve_2016_3741);
}
@Test
- @SecurityTest(minPatchLevel = "2016-07")
+ @AsbSecurityTest(cveBugId = 28175045)
public void testStagefright_cve_2016_2506() throws Exception {
doStagefrightTest(R.raw.cve_2016_2506);
}
@Test
- @SecurityTest(minPatchLevel = "2016-06")
+ @AsbSecurityTest(cveBugId = 26751339)
public void testStagefright_cve_2016_2428() throws Exception {
doStagefrightTest(R.raw.cve_2016_2428, new CrashUtils.Config().checkMinAddress(false));
}
@Test
- @SecurityTest(minPatchLevel = "2016-07")
+ @AsbSecurityTest(cveBugId = 28556125)
public void testStagefright_cve_2016_3756() throws Exception {
doStagefrightTest(R.raw.cve_2016_3756);
}
@Test
- @SecurityTest(minPatchLevel = "2017-07")
+ @AsbSecurityTest(cveBugId = 36592202)
public void testStagefright_bug_36592202() throws Exception {
Resources resources = getInstrumentation().getContext().getResources();
AssetFileDescriptor fd = resources.openRawResourceFd(R.raw.bug_36592202);
@@ -816,165 +816,165 @@
}
@Test
- @SecurityTest(minPatchLevel = "2016-11")
+ @AsbSecurityTest(cveBugId = 30822755)
public void testStagefright_bug_30822755() throws Exception {
doStagefrightTest(R.raw.bug_30822755);
}
@Test
- @SecurityTest(minPatchLevel = "2017-06")
+ @AsbSecurityTest(cveBugId = 32322258)
public void testStagefright_bug_32322258() throws Exception {
doStagefrightTest(R.raw.bug_32322258, new CrashUtils.Config().checkMinAddress(false));
}
@Test
- @SecurityTest(minPatchLevel = "2015-10")
+ @AsbSecurityTest(cveBugId = 23248776)
public void testStagefright_cve_2015_3873_b_23248776() throws Exception {
doStagefrightTest(R.raw.cve_2015_3873_b_23248776);
}
@Test
- @SecurityTest(minPatchLevel = "2017-06")
+ @AsbSecurityTest(cveBugId = 35472997)
public void testStagefright_bug_35472997() throws Exception {
doStagefrightTest(R.raw.bug_35472997);
}
@Test
- @SecurityTest(minPatchLevel = "2015-10")
+ @AsbSecurityTest(cveBugId = 20718524)
public void testStagefright_cve_2015_3873_b_20718524() throws Exception {
doStagefrightTest(R.raw.cve_2015_3873_b_20718524);
}
@Test
- @SecurityTest(minPatchLevel = "2017-07")
+ @AsbSecurityTest(cveBugId = 34896431)
public void testStagefright_bug_34896431() throws Exception {
doStagefrightTest(R.raw.bug_34896431);
}
@Test
- @SecurityTest(minPatchLevel = "2017-04")
+ @AsbSecurityTest(cveBugId = 33641588)
public void testBug_33641588() throws Exception {
doStagefrightTestRawBlob(R.raw.bug_33641588_avc, "video/avc", 320, 240);
}
@Test
- @SecurityTest(minPatchLevel = "2015-10")
+ @AsbSecurityTest(cveBugId = 22954006)
public void testStagefright_cve_2015_3862_b_22954006() throws Exception {
doStagefrightTest(R.raw.cve_2015_3862_b_22954006,
new CrashUtils.Config().checkMinAddress(false));
}
@Test
- @SecurityTest(minPatchLevel = "2015-10")
+ @AsbSecurityTest(cveBugId = 23213430)
public void testStagefright_cve_2015_3867_b_23213430() throws Exception {
doStagefrightTest(R.raw.cve_2015_3867_b_23213430);
}
@Test
- @SecurityTest(minPatchLevel = "2015-10")
+ @AsbSecurityTest(cveBugId = 21814993)
public void testStagefright_cve_2015_3873_b_21814993() throws Exception {
doStagefrightTest(R.raw.cve_2015_3873_b_21814993);
}
@Test
- @SecurityTest(minPatchLevel = "2016-04")
+ @AsbSecurityTest(cveBugId = 25812590)
public void testStagefright_bug_25812590() throws Exception {
doStagefrightTest(R.raw.bug_25812590);
}
@Test
- @SecurityTest(minPatchLevel = "2015-10")
+ @AsbSecurityTest(cveBugId = 22882938)
public void testStagefright_cve_2015_6600() throws Exception {
doStagefrightTest(R.raw.cve_2015_6600);
}
@Test
- @SecurityTest(minPatchLevel = "2015-10")
+ @AsbSecurityTest(cveBugId = 23227354)
public void testStagefright_cve_2015_6603() throws Exception {
doStagefrightTest(R.raw.cve_2015_6603);
}
@Test
- @SecurityTest(minPatchLevel = "2015-10")
+ @AsbSecurityTest(cveBugId = 23129786)
public void testStagefright_cve_2015_6604() throws Exception {
doStagefrightTest(R.raw.cve_2015_6604);
}
@Test
- @SecurityTest(minPatchLevel = "2015-12")
+ @AsbSecurityTest(cveBugId = 24157524)
public void testStagefright_bug_24157524() throws Exception {
doStagefrightTestMediaCodec(R.raw.bug_24157524);
}
@Test
- @SecurityTest(minPatchLevel = "2015-10")
+ @AsbSecurityTest(cveBugId = 23031033)
public void testStagefright_cve_2015_3871() throws Exception {
doStagefrightTest(R.raw.cve_2015_3871);
}
@Test
- @SecurityTest(minPatchLevel = "2016-04")
+ @AsbSecurityTest(cveBugId = 26070014)
public void testStagefright_bug_26070014() throws Exception {
doStagefrightTest(R.raw.bug_26070014);
}
@Test
- @SecurityTest(minPatchLevel = "2017-03")
+ @AsbSecurityTest(cveBugId = 32915871)
public void testStagefright_bug_32915871() throws Exception {
doStagefrightTest(R.raw.bug_32915871);
}
@Test
- @SecurityTest(minPatchLevel = "2016-07")
+ @AsbSecurityTest(cveBugId = 28333006)
public void testStagefright_bug_28333006() throws Exception {
doStagefrightTest(R.raw.bug_28333006);
}
@Test
- @SecurityTest(minPatchLevel = "2015-11")
+ @AsbSecurityTest(cveBugId = 14388161)
public void testStagefright_bug_14388161() throws Exception {
doStagefrightTestMediaPlayer(R.raw.bug_14388161);
}
@Test
- @SecurityTest(minPatchLevel = "2016-07")
+ @AsbSecurityTest(cveBugId = 28470138)
public void testStagefright_cve_2016_3755() throws Exception {
doStagefrightTest(R.raw.cve_2016_3755, new CrashUtils.Config().checkMinAddress(false));
}
@Test
- @SecurityTest(minPatchLevel = "2016-09")
+ @AsbSecurityTest(cveBugId = 29493002)
public void testStagefright_cve_2016_3878_b_29493002() throws Exception {
doStagefrightTest(R.raw.cve_2016_3878_b_29493002,
new CrashUtils.Config().checkMinAddress(false));
}
@Test
- @SecurityTest(minPatchLevel = "2017-08")
+ @AsbSecurityTest(cveBugId = 36819262)
public void testBug_36819262() throws Exception {
doStagefrightTestRawBlob(R.raw.bug_36819262_mpeg2, "video/mpeg2", 640, 480);
}
@Test
- @SecurityTest(minPatchLevel = "2015-11")
+ @AsbSecurityTest(cveBugId = 23680780)
public void testStagefright_cve_2015_6608_b_23680780() throws Exception {
doStagefrightTest(R.raw.cve_2015_6608_b_23680780);
}
@Test
- @SecurityTest(minPatchLevel = "2017-09")
+ @AsbSecurityTest(cveBugId = 36715268)
public void testStagefright_bug_36715268() throws Exception {
doStagefrightTest(R.raw.bug_36715268);
}
@Test
- @SecurityTest(minPatchLevel = "2016-06")
+ @AsbSecurityTest(cveBugId = 27855419)
public void testStagefright_bug_27855419_CVE_2016_2463() throws Exception {
doStagefrightTest(R.raw.bug_27855419, new CrashUtils.Config().checkMinAddress(false));
}
@Test
- @SecurityTest(minPatchLevel = "2015-11")
+ @AsbSecurityTest(cveBugId = 19779574)
public void testStagefright_bug_19779574() throws Exception {
doStagefrightTest(R.raw.bug_19779574, new CrashUtils.Config().checkMinAddress(false));
}
@@ -985,20 +985,20 @@
***********************************************************/
@Test
- @SecurityTest(minPatchLevel = "2017-03")
+ @AsbSecurityTest(cveBugId = 33090864)
public void testBug_33090864() throws Exception {
int[] frameSizes = getFrameSizes(R.raw.bug_33090864_framelen);
doStagefrightTestRawBlob(R.raw.bug_33090864_avc, "video/avc", 320, 240, frameSizes);
}
@Test
- @SecurityTest(minPatchLevel = "2017-07")
+ @AsbSecurityTest(cveBugId = 36279112)
public void testStagefright_bug_36279112() throws Exception {
doStagefrightTest(R.raw.bug_36279112, new CrashUtils.Config().checkMinAddress(false));
}
@Test
- @SecurityTest(minPatchLevel = "2017-06")
+ @AsbSecurityTest(cveBugId = 33129467)
public void testStagefright_cve_2017_0640() throws Exception {
int[] frameSizes = {21, 4};
doStagefrightTestRawBlob(R.raw.cve_2017_0640_avc, "video/avc", 640, 480,
@@ -1006,33 +1006,33 @@
}
@Test
- @SecurityTest(minPatchLevel = "2017-08")
+ @AsbSecurityTest(cveBugId = 37203196)
public void testBug_37203196() throws Exception {
int[] frameSizes = getFrameSizes(R.raw.bug_37203196_framelen);
doStagefrightTestRawBlob(R.raw.bug_37203196_mpeg2, "video/mpeg2", 48, 48, frameSizes);
}
@Test
- @SecurityTest(minPatchLevel = "2018-06")
+ @AsbSecurityTest(cveBugId = 73552574)
public void testBug_73552574() throws Exception {
int[] frameSizes = getFrameSizes(R.raw.bug_73552574_framelen);
doStagefrightTestRawBlob(R.raw.bug_73552574_avc, "video/avc", 320, 240, frameSizes);
}
@Test
- @SecurityTest(minPatchLevel = "2015-09")
+ @AsbSecurityTest(cveBugId = 23285192)
public void testStagefright_bug_23285192() throws Exception {
doStagefrightTest(R.raw.bug_23285192);
}
@Test
- @SecurityTest(minPatchLevel = "2016-03")
+ @AsbSecurityTest(cveBugId = 25928803)
public void testStagefright_bug_25928803() throws Exception {
doStagefrightTest(R.raw.bug_25928803);
}
@Test
- @SecurityTest(minPatchLevel = "2016-04")
+ @AsbSecurityTest(cveBugId = 26399350)
public void testBug_26399350() throws Exception {
int[] frameSizes = {657, 54930};
doStagefrightTestRawBlob(R.raw.bug_26399350_avc, "video/avc", 640, 480,
@@ -1040,13 +1040,13 @@
}
@Test
- @SecurityTest(minPatchLevel = "2018-12")
+ @AsbSecurityTest(cveBugId = 113260892)
public void testBug_113260892() throws Exception {
doStagefrightTestRawBlob(R.raw.bug_113260892_hevc, "video/hevc", 320, 240);
}
@Test
- @SecurityTest(minPatchLevel = "2018-02")
+ @AsbSecurityTest(cveBugId = 68342866)
public void testStagefright_bug_68342866() throws Exception {
NetworkSecurityPolicy policy = NetworkSecurityPolicy.getInstance();
policy.setCleartextTrafficPermitted(true);
@@ -1120,74 +1120,74 @@
}
@Test
- @SecurityTest(minPatchLevel = "2018-05")
+ @AsbSecurityTest(cveBugId = 74114680)
public void testStagefright_bug_74114680() throws Exception {
doStagefrightTest(R.raw.bug_74114680_ts, (10 * 60 * 1000));
}
@Test
- @SecurityTest(minPatchLevel = "2018-03")
+ @AsbSecurityTest(cveBugId = 70239507)
public void testStagefright_bug_70239507() throws Exception {
doStagefrightTestExtractorSeek(R.raw.bug_70239507,1311768465173141112L);
}
@Test
- @SecurityTest(minPatchLevel = "2017-03")
+ @AsbSecurityTest(cveBugId = 33250932)
public void testBug_33250932() throws Exception {
int[] frameSizes = {65, 11, 102, 414};
doStagefrightTestRawBlob(R.raw.bug_33250932_avc, "video/avc", 640, 480, frameSizes);
}
@Test
- @SecurityTest(minPatchLevel = "2017-08")
+ @AsbSecurityTest(cveBugId = 37430213)
public void testStagefright_bug_37430213() throws Exception {
doStagefrightTest(R.raw.bug_37430213);
}
@Test
- @SecurityTest(minPatchLevel = "2018-11")
+ @AsbSecurityTest(cveBugId = 68664359)
public void testStagefright_bug_68664359() throws Exception {
doStagefrightTest(R.raw.bug_68664359, 60000);
}
@Test
- @SecurityTest(minPatchLevel = "2018-11")
+ @AsbSecurityTest(cveBugId = 110435401)
public void testStagefright_bug_110435401() throws Exception {
doStagefrightTest(R.raw.bug_110435401, 60000);
}
@Test
- @SecurityTest(minPatchLevel = "2017-03")
+ @AsbSecurityTest(cveBugId = 32589224)
public void testStagefright_cve_2017_0474() throws Exception {
doStagefrightTest(R.raw.cve_2017_0474, 120000);
}
@Test
- @SecurityTest(minPatchLevel = "2017-09")
+ @AsbSecurityTest(cveBugId = 62872863)
public void testStagefright_cve_2017_0765() throws Exception {
doStagefrightTest(R.raw.cve_2017_0765);
}
@Test
- @SecurityTest(minPatchLevel = "2018-04")
+ @AsbSecurityTest(cveBugId = 70637599)
public void testStagefright_cve_2017_13276() throws Exception {
doStagefrightTest(R.raw.cve_2017_13276);
}
@Test
- @SecurityTest(minPatchLevel = "2016-12")
+ @AsbSecurityTest(cveBugId = 31681434)
public void testStagefright_cve_2016_6764() throws Exception {
doStagefrightTest(R.raw.cve_2016_6764, new CrashUtils.Config().checkMinAddress(false));
}
@Test
- @SecurityTest(minPatchLevel = "2018-01")
+ @AsbSecurityTest(cveBugId = 38495900)
public void testStagefright_cve_2017_13214() throws Exception {
doStagefrightTest(R.raw.cve_2017_13214);
}
@Test
- @SecurityTest(minPatchLevel = "2017-06")
+ @AsbSecurityTest(cveBugId = 35467107)
public void testStagefright_bug_35467107() throws Exception {
doStagefrightTest(R.raw.bug_35467107, new CrashUtils.Config().checkMinAddress(false));
}
@@ -1197,13 +1197,13 @@
before any existing test methods
***********************************************************/
@Test
- @SecurityTest(minPatchLevel = "2020-11")
+ @AsbSecurityTest(cveBugId = 162756352)
public void testStagefright_cve_2020_11184() throws Exception {
doStagefrightTest(R.raw.cve_2020_11184);
}
@Test
- @SecurityTest(minPatchLevel = "2019-07")
+ @AsbSecurityTest(cveBugId = 130024844)
public void testStagefright_cve_2019_2107() throws Exception {
assumeFalse(ModuleDetector.moduleIsPlayManaged(
getInstrumentation().getContext().getPackageManager(),
@@ -1214,85 +1214,85 @@
}
@Test
- @SecurityTest(minPatchLevel = "2019-04")
+ @AsbSecurityTest(cveBugId = 122473145)
public void testStagefright_cve_2019_2245() throws Exception {
doStagefrightTest(R.raw.cve_2019_2245);
}
@Test
- @SecurityTest(minPatchLevel = "2019-04")
+ @AsbSecurityTest(cveBugId = 120483842)
public void testStagefright_cve_2018_13925() throws Exception {
doStagefrightTest(R.raw.cve_2018_13925);
}
@Test
- @SecurityTest(minPatchLevel = "2020-12")
+ @AsbSecurityTest(cveBugId = 157905659)
public void testStagefright_cve_2020_11139() throws Exception {
doStagefrightTest(R.raw.cve_2020_11139);
}
@Test
- @SecurityTest(minPatchLevel = "2020-06")
+ @AsbSecurityTest(cveBugId = 150697436)
public void testStagefright_cve_2020_3663() throws Exception {
doStagefrightTest(R.raw.cve_2020_3663);
}
@Test
- @SecurityTest(minPatchLevel = "2020-08")
+ @AsbSecurityTest(cveBugId = 155653312)
public void testStagefright_cve_2020_11122() throws Exception {
doStagefrightTest(R.raw.cve_2020_11122);
}
@Test
- @SecurityTest(minPatchLevel = "2020-07")
+ @AsbSecurityTest(cveBugId = 153345450)
public void testStagefright_cve_2020_3688() throws Exception {
doStagefrightTest(R.raw.cve_2020_3688);
}
@Test
- @SecurityTest(minPatchLevel = "2020-11")
+ @AsbSecurityTest(cveBugId = 162756122)
public void testStagefright_cve_2020_11168() throws Exception {
doStagefrightTest(R.raw.cve_2020_11168);
}
@Test
- @SecurityTest(minPatchLevel = "2020-06")
+ @AsbSecurityTest(cveBugId = 150697838)
public void testStagefright_cve_2020_3658() throws Exception {
doStagefrightTest(R.raw.cve_2020_3658);
}
@Test
- @SecurityTest(minPatchLevel = "2020-05")
+ @AsbSecurityTest(cveBugId = 148816216)
public void testStagefright_cve_2020_3633() throws Exception {
doStagefrightTest(R.raw.cve_2020_3633);
}
@Test
- @SecurityTest(minPatchLevel = "2020-06")
+ @AsbSecurityTest(cveBugId = 150695050)
public void testStagefright_cve_2020_3660() throws Exception {
doStagefrightTest(R.raw.cve_2020_3660);
}
@Test
- @SecurityTest(minPatchLevel = "2020-06")
+ @AsbSecurityTest(cveBugId = 150695169)
public void testStagefright_cve_2020_3661() throws Exception {
doStagefrightTest(R.raw.cve_2020_3661);
}
@Test
- @SecurityTest(minPatchLevel = "2020-01")
+ @AsbSecurityTest(cveBugId = 142271944)
public void testStagefright_cve_2019_14013() throws Exception {
doStagefrightTest(R.raw.cve_2019_14013);
}
@Test
- @SecurityTest(minPatchLevel = "2020-06")
+ @AsbSecurityTest(cveBugId = 150696661)
public void testStagefright_cve_2020_3662() throws Exception {
doStagefrightTest(R.raw.cve_2020_3662);
}
@Test
- @SecurityTest(minPatchLevel = "2021-01")
+ @AsbSecurityTest(cveBugId = 170583712)
public void testStagefright_cve_2021_0312() throws Exception {
assumeFalse(ModuleDetector.moduleIsPlayManaged(
getInstrumentation().getContext().getPackageManager(),
@@ -1302,7 +1302,7 @@
}
@Test
- @SecurityTest(minPatchLevel = "2018-09")
+ @AsbSecurityTest(cveBugId = 77600398)
public void testStagefright_cve_2018_9474() throws Exception {
MediaPlayer mp = new MediaPlayer();
RenderTarget renderTarget = RenderTarget.create();
@@ -1339,7 +1339,7 @@
}
@Test
- @SecurityTest(minPatchLevel = "2019-09")
+ @AsbSecurityTest(cveBugId = 130025324)
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,
@@ -1347,7 +1347,7 @@
}
@Test
- @SecurityTest(minPatchLevel = "2016-09")
+ @AsbSecurityTest(cveBugId = 25747670)
public void testStagefright_cve_2016_3880() throws Exception {
Thread server = new Thread() {
@Override
@@ -1423,7 +1423,7 @@
}
@Test
- @SecurityTest(minPatchLevel = "2021-01")
+ @AsbSecurityTest(cveBugId = 170240631)
public void testStagefright_bug170240631() throws Exception {
assumeFalse(ModuleDetector.moduleIsPlayManaged(
getInstrumentation().getContext().getPackageManager(),
@@ -1432,133 +1432,133 @@
}
@Test
- @SecurityTest(minPatchLevel = "2020-05")
+ @AsbSecurityTest(cveBugId = 148816624)
public void testStagefright_cve_2020_3641() throws Exception {
doStagefrightTest(R.raw.cve_2020_3641);
}
@Test
- @SecurityTest(minPatchLevel = "2020-04")
+ @AsbSecurityTest(cveBugId = 147103871)
public void testStagefright_cve_2019_14127() throws Exception {
doStagefrightTest(R.raw.cve_2019_14127);
}
@Test
- @SecurityTest(minPatchLevel = "2020-04")
+ @AsbSecurityTest(cveBugId = 147104052)
public void testStagefright_cve_2019_14132() throws Exception {
doStagefrightTest(R.raw.cve_2019_14132);
}
@Test
- @SecurityTest(minPatchLevel = "2020-03")
+ @AsbSecurityTest(cveBugId = 145545283)
public void testStagefright_cve_2019_10591() throws Exception {
doStagefrightTest(R.raw.cve_2019_10591);
}
@Test
- @SecurityTest(minPatchLevel = "2020-02")
+ @AsbSecurityTest(cveBugId = 143903858)
public void testStagefright_cve_2019_10590() throws Exception {
doStagefrightTest(R.raw.cve_2019_10590);
}
@Test
- @SecurityTest(minPatchLevel = "2020-01")
+ @AsbSecurityTest(cveBugId = 142271848)
public void testStagefright_cve_2019_14004() throws Exception {
doStagefrightTest(R.raw.cve_2019_14004);
}
@Test
- @SecurityTest(minPatchLevel = "2020-01")
+ @AsbSecurityTest(cveBugId = 142271498)
public void testStagefright_cve_2019_14003() throws Exception {
doStagefrightTest(R.raw.cve_2019_14003);
}
@Test
- @SecurityTest(minPatchLevel = "2020-02")
+ @AsbSecurityTest(cveBugId = 143903018)
public void testStagefright_cve_2019_14057() throws Exception {
doStagefrightTest(R.raw.cve_2019_14057);
}
@Test
- @SecurityTest(minPatchLevel = "2020-01")
+ @AsbSecurityTest(cveBugId = 142271634)
public void testStagefright_cve_2019_10532() throws Exception {
doStagefrightTest(R.raw.cve_2019_10532);
}
@Test
- @SecurityTest(minPatchLevel = "2020-01")
+ @AsbSecurityTest(cveBugId = 142268949)
public void testStagefright_cve_2019_10578() throws Exception {
doStagefrightTest(R.raw.cve_2019_10578);
}
@Test
- @SecurityTest(minPatchLevel = "2020-03")
+ @AsbSecurityTest(cveBugId = 145545758)
public void testStagefright_cve_2019_14061() throws Exception {
doStagefrightTest(R.raw.cve_2019_14061, 180000);
}
@Test
- @SecurityTest(minPatchLevel = "2020-01")
+ @AsbSecurityTest(cveBugId = 142271615)
public void testStagefright_cve_2019_10611() throws Exception {
doStagefrightTest(R.raw.cve_2019_10611);
}
@Test
- @SecurityTest(minPatchLevel = "2019-08")
+ @AsbSecurityTest(cveBugId = 132108754)
public void testStagefright_cve_2019_10489() throws Exception {
doStagefrightTest(R.raw.cve_2019_10489);
}
@Test
- @SecurityTest(minPatchLevel = "2020-03")
+ @AsbSecurityTest(cveBugId = 145545282)
public void testStagefright_cve_2019_14048() throws Exception {
doStagefrightTest(R.raw.cve_2019_14048);
}
@Test
- @SecurityTest(minPatchLevel = "2019-07")
+ @AsbSecurityTest(cveBugId = 129766432)
public void testStagefright_cve_2019_2253() throws Exception {
doStagefrightTest(R.raw.cve_2019_2253);
}
@Test
- @SecurityTest(minPatchLevel = "2020-01")
+ @AsbSecurityTest(cveBugId = 142271692)
public void testStagefright_cve_2019_10579() throws Exception {
doStagefrightTestANR(R.raw.cve_2019_10579);
}
@Test
- @SecurityTest(minPatchLevel = "2020-01")
+ @AsbSecurityTest(cveBugId = 142271965)
public void testStagefright_cve_2019_14005() throws Exception {
doStagefrightTest(R.raw.cve_2019_14005);
}
@Test
- @SecurityTest(minPatchLevel = "2020-01")
+ @AsbSecurityTest(cveBugId = 142271827)
public void testStagefright_cve_2019_14006() throws Exception {
doStagefrightTest(R.raw.cve_2019_14006);
}
@Test
- @SecurityTest(minPatchLevel = "2020-01")
+ @AsbSecurityTest(cveBugId = 142270646)
public void testStagefright_CVE_2019_14016() throws Exception {
doStagefrightTest(R.raw.cve_2019_14016);
}
@Test
- @SecurityTest(minPatchLevel = "2020-01")
+ @AsbSecurityTest(cveBugId = 142271515)
public void testStagefright_CVE_2019_14017() throws Exception {
doStagefrightTest(R.raw.cve_2019_14017);
}
@Test
- @SecurityTest(minPatchLevel = "2018-07")
+ @AsbSecurityTest(cveBugId = 78029004)
public void testStagefright_cve_2018_9412() throws Exception {
doStagefrightTest(R.raw.cve_2018_9412, 180000);
}
@Test
- @SecurityTest(minPatchLevel = "Unknown")
+ @AsbSecurityTest(cveBugId = 142641801)
public void testStagefright_bug_142641801() throws Exception {
assumeFalse(ModuleDetector.moduleIsPlayManaged(
getInstrumentation().getContext().getPackageManager(),
@@ -1567,32 +1567,32 @@
}
@Test
- @SecurityTest(minPatchLevel = "2019-09")
+ @AsbSecurityTest(cveBugId = 134437379)
public void testStagefright_cve_2019_10534() throws Exception {
doStagefrightTest(R.raw.cve_2019_10534);
}
@Test
- @SecurityTest(minPatchLevel = "2019-09")
+ @AsbSecurityTest(cveBugId = 134437210)
public void testStagefright_cve_2019_10533() throws Exception {
doStagefrightTest(R.raw.cve_2019_10533);
}
@Test
- @SecurityTest(minPatchLevel = "2019-09")
+ @AsbSecurityTest(cveBugId = 134437115)
public void testStagefright_cve_2019_10541() throws Exception {
doStagefrightTest(R.raw.cve_2019_10541);
}
@Test
- @SecurityTest(minPatchLevel = "2018-02")
+ @AsbSecurityTest(cveBugId = 62851602)
public void testStagefright_cve_2017_13233() throws Exception {
doStagefrightTestRawBlob(R.raw.cve_2017_13233_hevc, "video/hevc", 640,
480);
}
@Test
- @SecurityTest(minPatchLevel = "2019-07")
+ @AsbSecurityTest(cveBugId = 130023983)
public void testStagefright_cve_2019_2106() throws Exception {
int[] frameSizes = {943, 3153};
doStagefrightTestRawBlob(R.raw.cve_2019_2106_hevc, "video/hevc", 320,
@@ -1600,105 +1600,105 @@
}
@Test
- @SecurityTest(minPatchLevel = "2017-06")
+ @AsbSecurityTest(cveBugId = 34064500)
public void testStagefright_cve_2017_0637() throws Exception {
doStagefrightTest(R.raw.cve_2017_0637, 2 * 72000);
}
@Test
- @SecurityTest(minPatchLevel = "2018-09")
+ @AsbSecurityTest(cveBugId = 109678380)
public void testStagefright_cve_2018_11287() throws Exception {
doStagefrightTest(R.raw.cve_2018_11287, 180000);
}
@Test
- @SecurityTest(minPatchLevel = "2019-07")
+ @AsbSecurityTest(cveBugId = 129766125)
public void testStagefright_cve_2019_2327() throws Exception {
doStagefrightTest(R.raw.cve_2019_2327);
}
@Test
- @SecurityTest(minPatchLevel = "2019-07")
+ @AsbSecurityTest(cveBugId = 129766496)
public void testStagefright_cve_2019_2322() throws Exception {
doStagefrightTest(R.raw.cve_2019_2322);
}
@Test
- @SecurityTest(minPatchLevel = "2019-07")
+ @AsbSecurityTest(cveBugId = 129766099)
public void testStagefright_cve_2019_2334() throws Exception {
doStagefrightTest(R.raw.cve_2019_2334);
}
@Test
- @SecurityTest(minPatchLevel = "2018-01")
+ @AsbSecurityTest(cveBugId = 64380237)
public void testStagefright_cve_2017_13204() throws Exception {
int[] frameSizes = getFrameSizes(R.raw.cve_2017_13204_framelen);
doStagefrightTestRawBlob(R.raw.cve_2017_13204_avc, "video/avc", 16, 16, frameSizes);
}
@Test
- @SecurityTest(minPatchLevel = "2018-03")
+ @AsbSecurityTest(cveBugId = 70221445)
public void testStagefright_cve_2017_17773() throws Exception {
doStagefrightTest(R.raw.cve_2017_17773);
}
@Test
- @SecurityTest(minPatchLevel = "2018-04")
+ @AsbSecurityTest(cveBugId = 68326816)
public void testStagefright_cve_2017_18074() throws Exception {
doStagefrightTest(R.raw.cve_2017_18074);
}
@Test
- @SecurityTest(minPatchLevel = "2018-06")
+ @AsbSecurityTest(cveBugId = 74236854)
public void testStagefright_cve_2018_5894() throws Exception {
doStagefrightTest(R.raw.cve_2018_5894);
}
@Test
- @SecurityTest(minPatchLevel = "2018-07")
+ @AsbSecurityTest(cveBugId = 77485139)
public void testStagefright_cve_2018_5874() throws Exception {
doStagefrightTest(R.raw.cve_2018_5874);
}
@Test
- @SecurityTest(minPatchLevel = "2018-07")
+ @AsbSecurityTest(cveBugId = 77485183)
public void testStagefright_cve_2018_5875() throws Exception {
doStagefrightTest(R.raw.cve_2018_5875);
}
@Test
- @SecurityTest(minPatchLevel = "2018-07")
+ @AsbSecurityTest(cveBugId = 77485022)
public void testStagefright_cve_2018_5876() throws Exception {
doStagefrightTest(R.raw.cve_2018_5876);
}
@Test
- @SecurityTest(minPatchLevel = "2018-07")
+ @AsbSecurityTest(cveBugId = 77483830)
public void testStagefright_cve_2018_5882() throws Exception {
doStagefrightTest(R.raw.cve_2018_5882);
}
@Test
- @SecurityTest(minPatchLevel = "2017-12")
+ @AsbSecurityTest(cveBugId = 65186291)
public void testBug_65186291() throws Exception {
int[] frameSizes = getFrameSizes(R.raw.bug_65186291_framelen);
doStagefrightTestRawBlob(R.raw.bug_65186291_hevc, "video/hevc", 1920, 1080, frameSizes);
}
@Test
- @SecurityTest(minPatchLevel = "2018-01")
+ @AsbSecurityTest(cveBugId = 67737022)
public void testBug_67737022() throws Exception {
doStagefrightTest(R.raw.bug_67737022);
}
@Test
- @SecurityTest(minPatchLevel = "2017-07")
+ @AsbSecurityTest(cveBugId = 37093318)
public void testStagefright_bug_37093318() throws Exception {
doStagefrightTest(R.raw.bug_37093318, (4 * 60 * 1000));
}
@Test
- @SecurityTest(minPatchLevel = "2018-05")
+ @AsbSecurityTest(cveBugId = 73172046)
public void testStagefright_bug_73172046() throws Exception {
doStagefrightTest(R.raw.bug_73172046);
@@ -1711,55 +1711,55 @@
}
@Test
- @SecurityTest(minPatchLevel = "2016-03")
+ @AsbSecurityTest(cveBugId = 25765591)
public void testStagefright_cve_2016_0824() throws Exception {
doStagefrightTest(R.raw.cve_2016_0824);
}
@Test
- @SecurityTest(minPatchLevel = "2016-03")
+ @AsbSecurityTest(cveBugId = 26365349)
public void testStagefright_cve_2016_0815() throws Exception {
doStagefrightTest(R.raw.cve_2016_0815);
}
@Test
- @SecurityTest(minPatchLevel = "2016-05")
+ @AsbSecurityTest(cveBugId = 26221024)
public void testStagefright_cve_2016_2454() throws Exception {
doStagefrightTest(R.raw.cve_2016_2454);
}
@Test
- @SecurityTest(minPatchLevel = "2016-12")
+ @AsbSecurityTest(cveBugId = 31449945)
public void testStagefright_cve_2016_6765() throws Exception {
doStagefrightTest(R.raw.cve_2016_6765, new CrashUtils.Config().checkMinAddress(false));
}
@Test
- @SecurityTest(minPatchLevel = "2016-07")
+ @AsbSecurityTest(cveBugId = 28799341)
public void testStagefright_cve_2016_2508() throws Exception {
doStagefrightTest(R.raw.cve_2016_2508, new CrashUtils.Config().checkMinAddress(false));
}
@Test
- @SecurityTest(minPatchLevel = "2016-11")
+ @AsbSecurityTest(cveBugId = 31373622)
public void testStagefright_cve_2016_6699() throws Exception {
doStagefrightTest(R.raw.cve_2016_6699);
}
@Test
- @SecurityTest(minPatchLevel = "2018-06")
+ @AsbSecurityTest(cveBugId = 66734153)
public void testStagefright_cve_2017_18155() throws Exception {
doStagefrightTest(R.raw.cve_2017_18155);
}
@Test
- @SecurityTest(minPatchLevel = "2018-07")
+ @AsbSecurityTest(cveBugId = 77599438)
public void testStagefright_cve_2018_9423() throws Exception {
doStagefrightTest(R.raw.cve_2018_9423);
}
@Test
- @SecurityTest(minPatchLevel = "2016-09")
+ @AsbSecurityTest(cveBugId = 29770686)
public void testStagefright_cve_2016_3879() throws Exception {
doStagefrightTest(R.raw.cve_2016_3879, new CrashUtils.Config().checkMinAddress(false));
}
@@ -1770,13 +1770,13 @@
***********************************************************/
@Test
- @SecurityTest(minPatchLevel = "2020-11")
+ @AsbSecurityTest(cveBugId = 162756960)
public void testStagefright_cve_2020_11196() throws Exception {
doStagefrightTest(R.raw.cve_2020_11196);
}
@Test
- @SecurityTest(minPatchLevel = "2018-11")
+ @AsbSecurityTest(cveBugId = 112661641)
public void testStagefright_cve_2018_9531() throws Exception {
assumeFalse(ModuleDetector.moduleIsPlayManaged(
getInstrumentation().getContext().getPackageManager(),
@@ -1789,7 +1789,7 @@
}
@Test
- @SecurityTest(minPatchLevel = "2019-12")
+ @AsbSecurityTest(cveBugId = 140322595)
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.
@@ -1810,7 +1810,7 @@
***********************************************************/
@Test
- @SecurityTest(minPatchLevel = "2019-12")
+ @AsbSecurityTest(cveBugId = 140692129)
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.
@@ -1822,7 +1822,7 @@
}
@Test
- @SecurityTest(minPatchLevel = "2019-03")
+ @AsbSecurityTest(cveBugId = 118399205)
public void testStagefright_cve_2019_1989() throws Exception {
Object obj[] = getFrameInfo(R.raw.cve_2019_1989_info);
int[] isHeader = (int[])obj [0];
@@ -2166,7 +2166,7 @@
* b/135207745
*/
@Test
- @SecurityTest(minPatchLevel = "2019-08")
+ @AsbSecurityTest(cveBugId = 124781927)
public void testStagefright_cve_2019_2129() throws Exception {
final int rid = R.raw.cve_2019_2129;
String name = getInstrumentation().getContext().getResources().getResourceEntryName(rid);
@@ -2514,94 +2514,94 @@
}
@Test
- @SecurityTest(minPatchLevel = "2017-07")
+ @AsbSecurityTest(cveBugId = 36215950)
public void testBug36215950() throws Exception {
doStagefrightTestRawBlob(R.raw.bug_36215950, "video/hevc", 320, 240);
}
@Test
- @SecurityTest(minPatchLevel = "2017-08")
+ @AsbSecurityTest(cveBugId = 36816007)
public void testBug36816007() throws Exception {
doStagefrightTestRawBlob(R.raw.bug_36816007, "video/avc", 320, 240,
new CrashUtils.Config().checkMinAddress(false));
}
@Test
- @SecurityTest(minPatchLevel = "2017-05")
+ @AsbSecurityTest(cveBugId = 36895511)
public void testBug36895511() throws Exception {
doStagefrightTestRawBlob(R.raw.bug_36895511, "video/hevc", 320, 240,
new CrashUtils.Config().checkMinAddress(false));
}
@Test
- @SecurityTest(minPatchLevel = "2017-11")
+ @AsbSecurityTest(cveBugId = 64836894)
public void testBug64836894() throws Exception {
doStagefrightTestRawBlob(R.raw.bug_64836894, "video/avc", 320, 240);
}
@Test
- @SecurityTest(minPatchLevel = "2017-08")
+ @AsbSecurityTest(cveBugId = 35583675)
public void testCve_2017_0687() throws Exception {
doStagefrightTestRawBlob(R.raw.cve_2017_0687, "video/avc", 320, 240);
}
@Test
- @SecurityTest(minPatchLevel = "2017-07")
+ @AsbSecurityTest(cveBugId = 37207120)
public void testCve_2017_0696() throws Exception {
doStagefrightTestRawBlob(R.raw.cve_2017_0696, "video/avc", 320, 240);
}
@Test
- @SecurityTest(minPatchLevel = "2018-01")
+ @AsbSecurityTest(cveBugId = 37930177)
public void testBug_37930177() throws Exception {
doStagefrightTestRawBlob(R.raw.bug_37930177_hevc, "video/hevc", 320, 240);
}
@Test
- @SecurityTest(minPatchLevel = "2017-08")
+ @AsbSecurityTest(cveBugId = 37712181)
public void testBug_37712181() throws Exception {
doStagefrightTestRawBlob(R.raw.bug_37712181_hevc, "video/hevc", 320, 240);
}
@Test
- @SecurityTest(minPatchLevel = "2018-04")
+ @AsbSecurityTest(cveBugId = 70897394)
public void testBug_70897394() throws Exception {
doStagefrightTestRawBlob(R.raw.bug_70897394_avc, "video/avc", 320, 240,
new CrashUtils.Config().checkMinAddress(false));
}
@Test
- @SecurityTest(minPatchLevel = "Unknown")
+ @AsbSecurityTest(cveBugId = 123700383)
public void testBug_123700383() throws Exception {
assertExtractorDoesNotHang(R.raw.bug_123700383);
}
@Test
- @SecurityTest(minPatchLevel = "Unknown")
+ @AsbSecurityTest(cveBugId = 127310810)
public void testBug_127310810() throws Exception {
assertExtractorDoesNotHang(R.raw.bug_127310810);
}
@Test
- @SecurityTest(minPatchLevel = "Unknown")
+ @AsbSecurityTest(cveBugId = 127312550)
public void testBug_127312550() throws Exception {
assertExtractorDoesNotHang(R.raw.bug_127312550);
}
@Test
- @SecurityTest(minPatchLevel = "Unknown")
+ @AsbSecurityTest(cveBugId = 127313223)
public void testBug_127313223() throws Exception {
assertExtractorDoesNotHang(R.raw.bug_127313223);
}
@Test
- @SecurityTest(minPatchLevel = "Unknown")
+ @AsbSecurityTest(cveBugId = 127313537)
public void testBug_127313537() throws Exception {
assertExtractorDoesNotHang(R.raw.bug_127313537);
}
@Test
- @SecurityTest(minPatchLevel = "Unknown")
+ @AsbSecurityTest(cveBugId = 127313764)
public void testBug_127313764() throws Exception {
assertExtractorDoesNotHang(R.raw.bug_127313764);
}
diff --git a/tests/tests/security/src/android/security/cts/VisualizerEffectTest.java b/tests/tests/security/src/android/security/cts/VisualizerEffectTest.java
index d0afec0..3be7534 100644
--- a/tests/tests/security/src/android/security/cts/VisualizerEffectTest.java
+++ b/tests/tests/security/src/android/security/cts/VisualizerEffectTest.java
@@ -18,7 +18,7 @@
import junit.framework.TestCase;
import android.content.Context;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.media.audiofx.AudioEffect;
import android.media.MediaPlayer;
import android.media.audiofx.Visualizer;
@@ -30,7 +30,6 @@
import java.util.UUID;
-@SecurityTest
public class VisualizerEffectTest extends AndroidTestCase {
private String TAG = "VisualizerEffectTest";
@Override
@@ -39,7 +38,7 @@
}
//Testing security bug: 30229821
- @SecurityTest(minPatchLevel = "2017-03")
+ @AsbSecurityTest(cveBugId = 30229821)
public void testVisualizer_MalformedConstructor() throws Exception {
final String VISUALIZER_TYPE = "e46b26a0-dddd-11db-8afd-0002a5d5c51b";
final int VISUALIZER_CMD_MEASURE = 0x10001;
diff --git a/tests/tests/security/src/android/security/cts/VoldExploitTest.java b/tests/tests/security/src/android/security/cts/VoldExploitTest.java
index a68d5d0..248579c 100644
--- a/tests/tests/security/src/android/security/cts/VoldExploitTest.java
+++ b/tests/tests/security/src/android/security/cts/VoldExploitTest.java
@@ -18,10 +18,8 @@
import android.content.Context;
import android.os.storage.StorageManager;
-import android.platform.test.annotations.SecurityTest;
import android.test.AndroidTestCase;
-@SecurityTest
public class VoldExploitTest extends AndroidTestCase {
/**
diff --git a/tests/tests/security/src/android/security/cts/X509CertChainBuildingTest.java b/tests/tests/security/src/android/security/cts/X509CertChainBuildingTest.java
index 76449fa..70e345d 100644
--- a/tests/tests/security/src/android/security/cts/X509CertChainBuildingTest.java
+++ b/tests/tests/security/src/android/security/cts/X509CertChainBuildingTest.java
@@ -18,7 +18,6 @@
import android.content.res.AssetManager;
import android.net.http.X509TrustManagerExtensions;
-import android.platform.test.annotations.SecurityTest;
import android.test.AndroidTestCase;
import java.io.File;
@@ -41,7 +40,6 @@
* {@link X509TrustManagerExtensions#checkServerTrusted(X509Certificate[], String, String)} when
* multiple possible certificate paths exist.
*/
-@SecurityTest
public class X509CertChainBuildingTest extends AndroidTestCase {
private static final String CERT_ASSET_DIR = "path_building";
diff --git a/tests/tests/security/src/android/security/cts/ZeroHeightTiffTest.java b/tests/tests/security/src/android/security/cts/ZeroHeightTiffTest.java
index 5368e93..5cc4fe5 100644
--- a/tests/tests/security/src/android/security/cts/ZeroHeightTiffTest.java
+++ b/tests/tests/security/src/android/security/cts/ZeroHeightTiffTest.java
@@ -18,14 +18,13 @@
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.test.AndroidTestCase;
import java.io.InputStream;
import android.security.cts.R;
-@SecurityTest
public class ZeroHeightTiffTest extends AndroidTestCase {
/**
* Verifies that the device fails to decode a zero height tiff file.
@@ -33,7 +32,7 @@
* Prior to fixing bug 33300701, decoding resulted in undefined behavior (divide by zero).
* With the fix, decoding will fail, without dividing by zero.
*/
- @SecurityTest(minPatchLevel = "2017-03")
+ @AsbSecurityTest(cveBugId = 33300701)
public void test_android_bug_33300701() {
InputStream exploitImage = mContext.getResources().openRawResource(R.raw.bug_33300701);
Bitmap bitmap = BitmapFactory.decodeStream(exploitImage);
diff --git a/tests/tests/shortcutmanager/src/android/content/pm/cts/shortcutmanager/ShortcutManagerFakingPublisherTest.java b/tests/tests/shortcutmanager/src/android/content/pm/cts/shortcutmanager/ShortcutManagerFakingPublisherTest.java
index ed737b0..92f14a4 100644
--- a/tests/tests/shortcutmanager/src/android/content/pm/cts/shortcutmanager/ShortcutManagerFakingPublisherTest.java
+++ b/tests/tests/shortcutmanager/src/android/content/pm/cts/shortcutmanager/ShortcutManagerFakingPublisherTest.java
@@ -24,7 +24,7 @@
import android.content.Intent;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.pm.ShortcutInfo;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.test.suitebuilder.annotation.SmallTest;
import androidx.test.InstrumentationRegistry;
@@ -33,7 +33,6 @@
* CTS for b/109824443.
*/
@SmallTest
-@SecurityTest
public class ShortcutManagerFakingPublisherTest extends ShortcutManagerCtsTestsBase {
private static final String ANOTHER_PACKAGE =
"android.content.pm.cts.shortcutmanager.packages.package4";
@@ -55,6 +54,7 @@
+ "icon_quality=100";
}
+ @AsbSecurityTest(cveBugId = 109824443)
public void testSpoofingPublisher() {
final Context myContext = getTestContext();
final Context anotherContext;
diff --git a/tests/tests/simphonebookprovider/src/android/provider/cts/simphonebook/SimPhonebookContract_SimRecordsMultiSimTest.java b/tests/tests/simphonebookprovider/src/android/provider/cts/simphonebook/SimPhonebookContract_SimRecordsMultiSimTest.java
index df7a20b..0782b88 100644
--- a/tests/tests/simphonebookprovider/src/android/provider/cts/simphonebook/SimPhonebookContract_SimRecordsMultiSimTest.java
+++ b/tests/tests/simphonebookprovider/src/android/provider/cts/simphonebook/SimPhonebookContract_SimRecordsMultiSimTest.java
@@ -88,7 +88,7 @@
Cursor sim2Cursor = query(SimRecords.getContentUri(mSubscriptionId2, EF_ADN),
projection)) {
assertThat(sim1Cursor).hasCount(1);
- assertThat(sim1Cursor).hasSingleRow("Name1 Adn1", 5550101);
+ assertThat(sim1Cursor).hasSingleRow(mSubscriptionId1, EF_ADN, "Name1 Adn1", "5550101");
assertThat(sim2Cursor).hasCount(3);
assertThat(sim2Cursor).atRow(0)
@@ -119,8 +119,8 @@
};
try (Cursor sim1Cursor = query(uriSim1, projection);
Cursor sim2Cursor = query(uriSim2, projection)) {
- assertThat(sim1Cursor).hasSingleRow(mSubscriptionId1, "Name Sim1");
- assertThat(sim2Cursor).hasSingleRow(mSubscriptionId2, "Name Sim2");
+ assertThat(sim1Cursor).hasSingleRow(mSubscriptionId1, "5550101");
+ assertThat(sim2Cursor).hasSingleRow(mSubscriptionId2, "5550102");
}
}
diff --git a/tests/tests/slice/src/android/slice/cts/SliceProviderTest.kt b/tests/tests/slice/src/android/slice/cts/SliceProviderTest.kt
index e2fd053..e6c621a 100644
--- a/tests/tests/slice/src/android/slice/cts/SliceProviderTest.kt
+++ b/tests/tests/slice/src/android/slice/cts/SliceProviderTest.kt
@@ -21,7 +21,7 @@
import android.net.Uri
import android.os.Bundle
-import android.platform.test.annotations.SecurityTest
+import android.platform.test.annotations.AsbSecurityTest
import androidx.test.rule.ActivityTestRule
import androidx.test.runner.AndroidJUnit4
import org.junit.Before
@@ -62,7 +62,7 @@
}
@Test
- @SecurityTest(minPatchLevel = "2019-11-01")
+ @AsbSecurityTest(cveBugId = [138441555])
fun testCallSliceUri_ValidAuthority() {
assumeFalse(isSlicesDisabled)
@@ -70,7 +70,7 @@
}
@Test(expected = SecurityException::class)
- @SecurityTest(minPatchLevel = "2019-11-01")
+ @AsbSecurityTest(cveBugId = [138441555])
fun testCallSliceUri_ShadyAuthority() {
assumeFalse(isSlicesDisabled)
diff --git a/tests/tests/telephony/current/src/android/telephony/cts/CarrierConfigManagerTest.java b/tests/tests/telephony/current/src/android/telephony/cts/CarrierConfigManagerTest.java
index f9175be..e62adc5 100644
--- a/tests/tests/telephony/current/src/android/telephony/cts/CarrierConfigManagerTest.java
+++ b/tests/tests/telephony/current/src/android/telephony/cts/CarrierConfigManagerTest.java
@@ -45,7 +45,7 @@
import android.content.pm.PackageManager;
import android.os.Looper;
import android.os.PersistableBundle;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.telephony.CarrierConfigManager;
import android.telephony.SubscriptionManager;
import android.telephony.SubscriptionManager.OnSubscriptionsChangedListener;
@@ -201,8 +201,8 @@
checkConfig(config);
}
- @SecurityTest
@Test
+ @AsbSecurityTest(cveBugId = 73136824)
public void testRevokePermission() {
if (!mPackageManager.hasSystemFeature(PackageManager.FEATURE_TELEPHONY)) {
return;
diff --git a/tests/tests/telephony3/src/android/telephony3/cts/TelephonyManagerTest.java b/tests/tests/telephony3/src/android/telephony3/cts/TelephonyManagerTest.java
index b1f4a52..c57ed64 100644
--- a/tests/tests/telephony3/src/android/telephony3/cts/TelephonyManagerTest.java
+++ b/tests/tests/telephony3/src/android/telephony3/cts/TelephonyManagerTest.java
@@ -23,7 +23,7 @@
import android.content.Context;
import android.content.pm.PackageManager;
import android.os.Build;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.telephony.SubscriptionInfo;
import android.telephony.SubscriptionManager;
import android.telephony.TelephonyManager;
@@ -53,7 +53,7 @@
}
@Test
- @SecurityTest(minPatchLevel = "2021-04")
+ @AsbSecurityTest(cveBugId = 173421434)
public void testDeviceIdentifiersAreNotAccessible() throws Exception {
// Apps with the READ_PHONE_STATE permission should no longer have access to device
// identifiers. If an app's target SDK is less than Q and it has been granted the
diff --git a/tests/tests/text/src/android/text/cts/StaticLayoutTest.java b/tests/tests/text/src/android/text/cts/StaticLayoutTest.java
index 12a4271..456ca78 100644
--- a/tests/tests/text/src/android/text/cts/StaticLayoutTest.java
+++ b/tests/tests/text/src/android/text/cts/StaticLayoutTest.java
@@ -33,7 +33,7 @@
import android.graphics.Paint.FontMetricsInt;
import android.graphics.Typeface;
import android.os.LocaleList;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.text.Editable;
import android.text.Layout;
import android.text.Layout.Alignment;
@@ -1684,8 +1684,8 @@
}
// This is for b/140755449
- @SecurityTest
@Test
+ @AsbSecurityTest(cveBugId = 140632678)
public void testBidiVisibleEnd() {
TextPaint paint = new TextPaint();
// The default text size is too small and not useful for handling line breaks.
diff --git a/tests/tests/text/src/android/text/util/cts/LinkifyTest.java b/tests/tests/text/src/android/text/util/cts/LinkifyTest.java
index 56b9c6e..c30f9ca 100644
--- a/tests/tests/text/src/android/text/util/cts/LinkifyTest.java
+++ b/tests/tests/text/src/android/text/util/cts/LinkifyTest.java
@@ -23,7 +23,7 @@
import static org.junit.Assert.assertTrue;
import android.content.Context;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.telephony.TelephonyManager;
import android.text.Spannable;
import android.text.SpannableString;
@@ -985,8 +985,8 @@
domain.length(), email);
}
- @SecurityTest(minPatchLevel = "2019-03")
@Test
+ @AsbSecurityTest(cveBugId = 116321860)
public void testAddLinks_unsupportedCharacters() {
String url = "moc.diordna.com";
verifyAddLinksWithWebUrlSucceeds(url + " should be linkified", url);
diff --git a/tests/tests/vcn/src/android/net/vcn/cts/VcnManagerTest.java b/tests/tests/vcn/src/android/net/vcn/cts/VcnManagerTest.java
index 95eaff6..33df595 100644
--- a/tests/tests/vcn/src/android/net/vcn/cts/VcnManagerTest.java
+++ b/tests/tests/vcn/src/android/net/vcn/cts/VcnManagerTest.java
@@ -31,6 +31,7 @@
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
import static org.junit.Assert.fail;
import static org.junit.Assume.assumeTrue;
@@ -530,9 +531,21 @@
throws Exception {
mVcnManager.clearVcnConfig(subGrp);
- // Expect VCN Network to disappear after VcnConfig is cleared
- final Network lostVcnNetwork = cellNetworkCb.waitForLost();
- assertEquals(vcnNetwork, lostVcnNetwork);
+ // Expect VCN Network to disappear after VcnConfig is cleared.
+ if (mConnectivityManager.getNetworkCapabilities(vcnNetwork) != null) {
+
+ // If not already torn down, wait for teardown. In the event that the underlying network
+ // has already regained the NOT_VCN_MANAGED bit (before the VCN's NetworkAgent teardown)
+ // the VCN network MAY be immediately replaced with the underlying Cell, which only
+ // fires an onAvailable for the new network, as opposed to an onLost() for the VCN
+ // network. In that case, check that the VCN network has been unregistered.
+ final Network lostVcnNetwork = cellNetworkCb.waitForLost();
+ if (lostVcnNetwork != null) {
+ assertEquals(vcnNetwork, lostVcnNetwork);
+ } else {
+ assertNull(mConnectivityManager.getNetworkCapabilities(vcnNetwork));
+ }
+ } // Else already torn down, pass.
}
@Test
diff --git a/tests/tests/widget/src/android/widget/cts/TextViewTest.java b/tests/tests/widget/src/android/widget/cts/TextViewTest.java
index 26c59ff..c24510a 100644
--- a/tests/tests/widget/src/android/widget/cts/TextViewTest.java
+++ b/tests/tests/widget/src/android/widget/cts/TextViewTest.java
@@ -4971,6 +4971,11 @@
public void testSetLineHeight() {
mTextView = new TextView(mActivity);
mTextView.setText("This is some random text");
+
+ // The line height of RobotoFont is (1900 + 500) / 2048 em.
+ // Not to accidentally divide the line height into half, use the small text size.
+ mTextView.setTextSize(10f);
+
final float lineSpacingExtra = 50;
final float lineSpacingMultiplier = 0.2f;
mTextView.setLineSpacing(lineSpacingExtra, lineSpacingMultiplier);
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 7cb6c17..374efee 100644
--- a/tests/tests/wifi/src/android/net/wifi/cts/WifiManagerTest.java
+++ b/tests/tests/wifi/src/android/net/wifi/cts/WifiManagerTest.java
@@ -77,7 +77,7 @@
import android.os.SystemClock;
import android.os.UserHandle;
import android.platform.test.annotations.AppModeFull;
-import android.platform.test.annotations.SecurityTest;
+import android.platform.test.annotations.AsbSecurityTest;
import android.provider.Settings;
import android.support.test.uiautomator.UiDevice;
import android.telephony.TelephonyManager;
@@ -2738,7 +2738,7 @@
* Tests {@link WifiManager#forget(int, WifiManager.ActionListener)} by adding/removing a new
* network.
*/
- @SecurityTest
+ @AsbSecurityTest(cveBugId = 159373687)
public void testForget() throws Exception {
if (!WifiFeature.isWifiSupported(getContext())) {
// skip the test if WiFi is not supported
diff --git a/tools/cts-tradefed/res/config/cts-exclude.xml b/tools/cts-tradefed/res/config/cts-exclude.xml
index b338399..5ea30e2 100644
--- a/tools/cts-tradefed/res/config/cts-exclude.xml
+++ b/tools/cts-tradefed/res/config/cts-exclude.xml
@@ -32,6 +32,6 @@
<option name="compatibility:test-arg" value="com.android.compatibility.common.tradefed.testtype.JarHostTest:exclude-annotation:com.android.compatibility.common.util.CtsDownstreamingTest" />
<!-- Exclude @SecurityTest tests from CTS. These are tested in STS. b/180417031-->
- <option name="compatibility:test-arg" value="com.android.tradefed.testtype.AndroidJUnitTest:exclude-annotation:android.platform.test.annotations.SecurityTest" />
- <option name="compatibility:test-arg" value="com.android.compatibility.common.tradefed.testtype.JarHostTest:exclude-annotation:android.platform.test.annotations.SecurityTest" />
+ <option name="compatibility:test-arg" value="com.android.tradefed.testtype.AndroidJUnitTest:exclude-annotation:android.platform.test.annotations.AsbSecurityTest" />
+ <option name="compatibility:test-arg" value="com.android.compatibility.common.tradefed.testtype.JarHostTest:exclude-annotation:android.platform.test.annotations.AsbSecurityTest" />
</configuration>
diff --git a/tools/cts-tradefed/res/config/cts-known-failures.xml b/tools/cts-tradefed/res/config/cts-known-failures.xml
index 835abfd..dadcd1bc 100644
--- a/tools/cts-tradefed/res/config/cts-known-failures.xml
+++ b/tools/cts-tradefed/res/config/cts-known-failures.xml
@@ -136,6 +136,7 @@
<!-- b/192313064 , b/192984235 -->
<option name="compatibility:exclude-filter" value="CtsNativeMediaAAudioTestCases android.nativemedia.aaudio.AAudioTests#test_aaudio_mmap_testBasicMmapOutput" />
+ <option name="compatibility:exclude-filter" value="CtsNativeMediaAAudioTestCases[instant] android.nativemedia.aaudio.AAudioTests#test_aaudio_mmap_testBasicMmapOutput" />
<!-- b/134654621 -->
<option name="compatibility:exclude-filter" value="CtsWindowManagerDeviceTestCases android.server.wm.AppConfigurationTests#testTaskCloseRestoreFreeOrientation" />
@@ -222,4 +223,7 @@
<!-- b/135533962 -->
<option name="compatibility:exclude-filter" value="arm64-v8a CtsWrapWrapDebugMallocDebugTestCases" />
+
+ <!-- b/192916298, b/192013761, b/193544088 CtsAppCloningHostTest from cts-on-gsi -->
+ <option name="compatibility:exclude-filter" value="CtsAppCloningHostTest android.scopedstorage.cts.host.AppCloningHostTest#testCreateCloneUserFile" />
</configuration>
diff --git a/tools/cts-tradefed/res/config/cts-on-gsi-exclude.xml b/tools/cts-tradefed/res/config/cts-on-gsi-exclude.xml
index b60c486..bd00687 100644
--- a/tools/cts-tradefed/res/config/cts-on-gsi-exclude.xml
+++ b/tools/cts-tradefed/res/config/cts-on-gsi-exclude.xml
@@ -80,4 +80,11 @@
<!-- b/183636777 Remove CtsShortcutManagerPackage4 from cts-on-gsi -->
<option name="compatibility:exclude-filter" value="CtsShortcutManagerPackage4" />
+ <!-- b/185451791. Can't have single overlay package for both AOSP version and Google-signed mainline modules -->
+ <option name="compatibility:exclude-filter" value="CtsWifiTestCases android.net.wifi.cts.ConcurrencyTest#testPersistentGroupOperation" />
+ <option name="compatibility:exclude-filter" value="CtsWifiTestCases android.net.wifi.cts.ConcurrencyTest#testRequestNetworkInfo" />
+
+ <!-- b/192916298, b/192013761, b/193544088 CtsAppCloningHostTest from cts-on-gsi -->
+ <option name="compatibility:exclude-filter" value="CtsAppCloningHostTest android.scopedstorage.cts.host.AppCloningHostTest#testCreateCloneUserFile" />
+
</configuration>
diff --git a/tools/cts-tradefed/res/config/cts-validation.xml b/tools/cts-tradefed/res/config/cts-validation.xml
index 662d7ea..fa8a666 100644
--- a/tools/cts-tradefed/res/config/cts-validation.xml
+++ b/tools/cts-tradefed/res/config/cts-validation.xml
@@ -16,7 +16,6 @@
<configuration description="Runs a subset of CTS tests using a general kernel image (GKI)">
<option name="plan" value="cts-validation" />
<option name="result-attribute" key="GKI" value="1" />
- <option name="result-attribute" key="camera_apex" value="1" />
<include name="cts-on-gsi" />
<include name="cts-validation-exclude" />
</configuration>
diff --git a/tools/cts-tradefed/res/config/security-bulletin.xml b/tools/cts-tradefed/res/config/security-bulletin.xml
deleted file mode 100644
index 02175a9..0000000
--- a/tools/cts-tradefed/res/config/security-bulletin.xml
+++ /dev/null
@@ -1,31 +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.
--->
-<configuration description="Runs Security Patch test cases">
-
- <option name="plan" value="security-bulletin" />
-
- <include name="cts"/>
-
- <option name="compatibility:include-filter" value="CtsSecurityTestCases" />
-
- <option name="compatibility:include-filter" value="CtsSecurityHostTestCases" />
-
- <!-- Only run tests with @SecurityTest annotation. -->
- <option name="compatibility:module-arg" value="CtsSecurityHostTestCases:include-annotation:android.platform.test.annotations.SecurityTest"/>
-
- <option name="compatibility:test-arg" value="com.android.tradefed.testtype.AndroidJUnitTest:include-annotation:android.platform.test.annotations.SecurityTest" />
-
-</configuration>