diff --git a/Android.mk b/Android.mk
index 725b731effd58997ce4193a08106936a7cfe0e3e..54fcfd05d21e074ec64e96f64cbc078e12b0d662 100644
--- a/Android.mk
+++ b/Android.mk
@@ -216,7 +216,6 @@ LOCAL_REQUIRED_MODULES += \
     nonplat_mac_permissions.xml \
     nonplat_property_contexts \
     nonplat_seapp_contexts \
-    nonplat_service_contexts \
     nonplat_hwservice_contexts \
     plat_file_contexts \
     plat_mac_permissions.xml \
@@ -226,6 +225,10 @@ LOCAL_REQUIRED_MODULES += \
     plat_hwservice_contexts \
     vndservice_contexts \
 
+ifneq ($(PRODUCT_FULL_TREBLE),true)
+LOCAL_REQUIRED_MODULES += nonplat_service_contexts
+endif
+
 include $(BUILD_PHONY_PACKAGE)
 
 ##################################
@@ -947,16 +950,15 @@ plat_svcfiles :=
 plat_service_contexts.tmp :=
 
 ##################################
+# nonplat_service_contexts is only allowed on non-full-treble devices
+ifneq ($(PRODUCT_FULL_TREBLE),true)
+
 include $(CLEAR_VARS)
 
 LOCAL_MODULE := nonplat_service_contexts
 LOCAL_MODULE_CLASS := ETC
 LOCAL_MODULE_TAGS := optional
-ifeq ($(PRODUCT_FULL_TREBLE),true)
-LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc/selinux
-else
 LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
-endif
 
 include $(BUILD_SYSTEM)/base_rules.mk
 
@@ -979,6 +981,8 @@ built_nonplat_svc := $(LOCAL_BUILT_MODULE)
 nonplat_svcfiles :=
 nonplat_service_contexts.tmp :=
 
+endif
+
 ##################################
 include $(CLEAR_VARS)
 
diff --git a/CleanSpec.mk b/CleanSpec.mk
index 09331156f4246bed7754dc0b126b512286d29a29..42d451c963ca8f388bfc5f7711c9816bc5c1568f 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -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)/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)/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)