From 0cbbb8381eff4de5288bd11684b501600cf1029c Mon Sep 17 00:00:00 2001 From: Jeff Vander Stoep Date: Wed, 8 Mar 2017 15:17:21 -0800 Subject: [PATCH] Build split file_contexts on TREBLE builds Build file_contexts.bin on legacy builds. Test: Marlin and Bullhead build and boot with no new denials. Test: Marlin and Bullhead recovery boots with no new denials. Test: Bullhead boots with file_contexts.bin in / Test: Marlin boot with /system/etc/selinux/plat_file_contexts and /vendor/etc/selinux/nonplat_file_contexts. Bug: 36002414 Change-Id: I66f138fc3ad808df0480e0467cee03fd40177f31 --- init/Android.mk | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/init/Android.mk b/init/Android.mk index 5bcfb7bc9..1a47eb441 100644 --- a/init/Android.mk +++ b/init/Android.mk @@ -120,7 +120,9 @@ LOCAL_REQUIRED_MODULES += \ nonplat_sepolicy.cil \ plat_sepolicy.cil \ plat_sepolicy.cil.sha256 \ - secilc + secilc \ + nonplat_file_contexts \ + plat_file_contexts # Include precompiled policy, unless told otherwise ifneq ($(PRODUCT_PRECOMPILED_SEPOLICY),false) @@ -129,7 +131,8 @@ endif else # Use monolithic SELinux policy -LOCAL_REQUIRED_MODULES += sepolicy +LOCAL_REQUIRED_MODULES += sepolicy \ + file_contexts.bin endif # Create symlinks.