build: switch over to file_contexts.bin only
Change all uses of the file_contexts file to use the
file_contexts.bin file instead.
Depends on
I75a781100082c23536f70ce3603f7de42408b5ba
I43806d564b83d57f05f5c36c8eba7b1ff4831b04
Id560d093440a2aba99cef28c20133b35feebf950
I15660f4b3e4c5cb8ae0ec1498c74d6fcbb9a0400
Change-Id: Iaf8c4b2e420f610425a07f48db7af32bda3f5b3a
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py
index 9112108..f484c13 100644
--- a/tools/releasetools/common.py
+++ b/tools/releasetools/common.py
@@ -151,16 +151,16 @@
# are doing repacking. Redirect those properties to the actual files in the
# unzipped directory.
if input_dir is not None:
- # We carry a copy of file_contexts under META/. If not available, search
- # BOOT/RAMDISK/. Note that sometimes we may need a different file_contexts
+ # We carry a copy of file_contexts.bin under META/. If not available,
+ # search BOOT/RAMDISK/. Note that sometimes we may need a different file
# to build images than the one running on device, such as when enabling
# system_root_image. In that case, we must have the one for image
# generation copied to META/.
- fc_config = os.path.join(input_dir, "META", "file_contexts")
+ fc_config = os.path.join(input_dir, "META", "file_contexts.bin")
if d.get("system_root_image") == "true":
assert os.path.exists(fc_config)
if not os.path.exists(fc_config):
- fc_config = os.path.join(input_dir, "BOOT", "RAMDISK", "file_contexts")
+ fc_config = os.path.join(input_dir, "BOOT", "RAMDISK", "file_contexts.bin")
if not os.path.exists(fc_config):
fc_config = None
diff --git a/tools/releasetools/ota_from_target_files.py b/tools/releasetools/ota_from_target_files.py
index 69987ab..9080159 100755
--- a/tools/releasetools/ota_from_target_files.py
+++ b/tools/releasetools/ota_from_target_files.py
@@ -588,8 +588,8 @@
if HasVendorPartition(input_zip):
system_progress -= 0.1
- # Place a copy of file_contexts into the OTA package which will be used by
- # the recovery program.
+ # Place a copy of file_contexts.bin into the OTA package which will be used
+ # by the recovery program.
if "selinux_fc" in OPTIONS.info_dict:
WritePolicyConfig(OPTIONS.info_dict["selinux_fc"], output_zip)