According to the sepolicy project README (
http://androidxref.com/5.1.0_r1/xref/external/sepolicy/README), the build system will only union/replace a single file from the provided dirs with the base policy:
"If you have BOARD_SEPOLICY_UNION += widget.te and have 2 instances of widget.te files on BOARD_SEPOLICY_DIRS search path. The first one found (at the first search dir containing the file) gets processed first."
If we are extending an existing board target (which already has additional policies to add) and need to add our own on top of this, how can we achieve it without copying the files? For example, if we have the following in BoardConfig.mk:
# Provided definitions from parent board target
BOARD_SEPOLICY_DIRS += device/manufacturer/common/sepolicy
BOARD_SEPOLICY_UNION += service_contexts
# Our extra definitions
BOARD_SEPOLICY_DIRS += $(TARGET_DEVICE_DIR)/sepolicy
BOARD_SEPOLICY_UNION += service_contexts
Is there a way we can get the policies from both files unioned into the base without creating a copy of the first file to manually augment with the policies from the second?
Thanks!
--
Dave Smith, PE
@devunwired