Merge "Move adb_keys to product partition" into main
diff --git a/contexts/plat_file_contexts_test b/contexts/plat_file_contexts_test
index 3e95ff8..e88b955 100644
--- a/contexts/plat_file_contexts_test
+++ b/contexts/plat_file_contexts_test
@@ -3,7 +3,7 @@
# It can be passed to checkfc to confirm that the regular expressions in
# file_contexts are matching the intended paths.
/ rootfs
-/adb_keys adb_keys_file
+/adb_keys system_file
/build.prop rootfs
/default.prop rootfs
/fstab.persist rootfs
@@ -724,6 +724,9 @@
/system/product/lib64 system_lib_file
/system/product/lib64/does_not_exist system_lib_file
+/product/etc/security/adb_keys adb_keys_file
+/system/product/etc/security/adb_keys adb_keys_file
+
/system_ext system_file
/system_ext/does_not_exist system_file
/system/system_ext system_file
diff --git a/private/file_contexts b/private/file_contexts
index 394d3b7..25ed6e8 100644
--- a/private/file_contexts
+++ b/private/file_contexts
@@ -24,7 +24,7 @@
/ u:object_r:rootfs:s0
# Data files
-/adb_keys u:object_r:adb_keys_file:s0
+/adb_keys u:object_r:system_file:s0
/build\.prop u:object_r:rootfs:s0
/default\.prop u:object_r:rootfs:s0
/fstab\..* u:object_r:rootfs:s0
@@ -507,6 +507,8 @@
/(product|system/product)/lib(64)?(/.*)? u:object_r:system_lib_file:s0
+/(product|system/product)/etc/security/adb_keys u:object_r:adb_keys_file:s0
+
#############################
# SystemExt files
#
diff --git a/tests/sepolicy_tests.py b/tests/sepolicy_tests.py
index af47938..bc3ed3d 100644
--- a/tests/sepolicy_tests.py
+++ b/tests/sepolicy_tests.py
@@ -44,6 +44,10 @@
"/system/product/vendor_overlay/",
"/system/system_ext/overlay/",
"/system_ext/overlay/",
+
+ # adb_keys_file hasn't been a system_file_type
+ "/product/etc/security/adb_keys",
+ "/system/product/etc/security/adb_keys",
]
return pol.AssertPathTypesHaveAttr(partitions, exceptions, "system_file_type")