Skip to content
Snippets Groups Projects
Commit ff2107f8 authored by Hung-ying Tyan's avatar Hung-ying Tyan
Browse files

Don't create nonplat_service_contexts on full_treble devices

On full Treble devices, servicemanager should only host services
served from processes on /system; nonplat_service_contexts
should not be created at all in this case.

Bug: 36866029
Test: Build marlin and walleye and make sure nonplat_service_contexts
      is not created.

Change-Id: Id02c314abbb98fc69884198779488c52231d22c3
parent 3107fa1a
No related branches found
No related tags found
No related merge requests found
...@@ -216,7 +216,6 @@ LOCAL_REQUIRED_MODULES += \ ...@@ -216,7 +216,6 @@ LOCAL_REQUIRED_MODULES += \
nonplat_mac_permissions.xml \ nonplat_mac_permissions.xml \
nonplat_property_contexts \ nonplat_property_contexts \
nonplat_seapp_contexts \ nonplat_seapp_contexts \
nonplat_service_contexts \
nonplat_hwservice_contexts \ nonplat_hwservice_contexts \
plat_file_contexts \ plat_file_contexts \
plat_mac_permissions.xml \ plat_mac_permissions.xml \
...@@ -227,6 +226,10 @@ LOCAL_REQUIRED_MODULES += \ ...@@ -227,6 +226,10 @@ LOCAL_REQUIRED_MODULES += \
searchpolicy.py \ searchpolicy.py \
vndservice_contexts \ vndservice_contexts \
ifneq ($(PRODUCT_FULL_TREBLE),true)
LOCAL_REQUIRED_MODULES += nonplat_service_contexts
endif
ifneq ($(with_asan),true) ifneq ($(with_asan),true)
LOCAL_REQUIRED_MODULES += \ LOCAL_REQUIRED_MODULES += \
sepolicy_tests \ sepolicy_tests \
...@@ -954,16 +957,15 @@ plat_svcfiles := ...@@ -954,16 +957,15 @@ plat_svcfiles :=
plat_service_contexts.tmp := plat_service_contexts.tmp :=
################################## ##################################
# nonplat_service_contexts is only allowed on non-full-treble devices
ifneq ($(PRODUCT_FULL_TREBLE),true)
include $(CLEAR_VARS) include $(CLEAR_VARS)
LOCAL_MODULE := nonplat_service_contexts LOCAL_MODULE := nonplat_service_contexts
LOCAL_MODULE_CLASS := ETC LOCAL_MODULE_CLASS := ETC
LOCAL_MODULE_TAGS := optional LOCAL_MODULE_TAGS := optional
ifeq ($(PRODUCT_FULL_TREBLE),true)
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc/selinux
else
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
endif
include $(BUILD_SYSTEM)/base_rules.mk include $(BUILD_SYSTEM)/base_rules.mk
...@@ -986,6 +988,8 @@ built_nonplat_svc := $(LOCAL_BUILT_MODULE) ...@@ -986,6 +988,8 @@ built_nonplat_svc := $(LOCAL_BUILT_MODULE)
nonplat_svcfiles := nonplat_svcfiles :=
nonplat_service_contexts.tmp := nonplat_service_contexts.tmp :=
endif
################################## ##################################
include $(CLEAR_VARS) include $(CLEAR_VARS)
......
...@@ -71,3 +71,6 @@ $(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/selinux/mapping_sepolicy ...@@ -71,3 +71,6 @@ $(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/selinux/mapping_sepolicy
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/selinux/plat_sepolicy.cil.sha256) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/selinux/plat_sepolicy.cil.sha256)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/selinux/precompiled_sepolicy.plat.sha256) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/selinux/precompiled_sepolicy.plat.sha256)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/selinux/mapping_sepolicy.cil) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/selinux/mapping_sepolicy.cil)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/selinux/nonplat_service_contexts)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/ETC/nonplat_service_contexts_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/NOTICE_FILES/src/vendor/etc/selinux/nonplat_service_contexts.txt)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment