file_contexts: remove symlink to binary file and use text version instead

Some older update binaries can't read the binary file_contexts, so include
the text version of the file to prevent errors. This removes the symlink
to the binary version of the file and uses the concatenated file_contexts
from the OUT build folder.

Change-Id: Ia57c9b47c95945721d3dfa1ec8e18c4bb199adff
This commit is contained in:
Captain Throwback
2017-03-07 12:07:40 -05:00
parent 201d4b21bc
commit 3184b2f739
+4 -4
View File
@@ -485,7 +485,7 @@ endif
endif
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 25; echo $$?),0)
LOCAL_ADDITIONAL_DEPENDENCIES += file_contexts_symlink
LOCAL_ADDITIONAL_DEPENDENCIES += file_contexts_text
endif
ifeq ($(BOARD_CACHEIMAGE_PARTITION_SIZE),)
@@ -497,11 +497,11 @@ include $(BUILD_EXECUTABLE)
# Symlink for file_contexts
include $(CLEAR_VARS)
LOCAL_MODULE := file_contexts_symlink
LOCAL_MODULE := file_contexts_text
LOCAL_MODULE_TAGS := optional
LOCAL_REQUIRED_MODULES := file_contexts.bin
LOCAL_POST_INSTALL_CMD := \
$(hide) mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/sbin && \
ln -sf /file_contexts.bin $(TARGET_RECOVERY_ROOT_OUT)/file_contexts
$(hide) cp -f $(OUT)/obj/ETC/file_contexts.bin_intermediates/file_contexts.concat.tmp $(TARGET_RECOVERY_ROOT_OUT)/file_contexts
include $(BUILD_PHONY_PACKAGE)