logd: only copy event-log-tags on sdk < 28
File not present in 9.0 tree
Change-Id: I54c5321813ddabbf11082fffc093efd4a829c185
diff --git a/etc/Android.mk b/etc/Android.mk
index ca549ea..f7bb3d8 100644
--- a/etc/Android.mk
+++ b/etc/Android.mk
@@ -82,19 +82,33 @@
ifeq ($(TWRP_INCLUDE_LOGCAT), true)
ifeq ($(TARGET_USES_LOGD), true)
+ ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 28; echo $$?),0)
+ include $(CLEAR_VARS)
+ LOCAL_MODULE := init.recovery.logd.rc
+ LOCAL_MODULE_TAGS := eng
+ LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
- include $(CLEAR_VARS)
- LOCAL_MODULE := init.recovery.logd.rc
- LOCAL_MODULE_TAGS := eng
- LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
+ # Cannot send to TARGET_RECOVERY_ROOT_OUT since build system wipes init*.rc
+ # during ramdisk creation and only allows init.recovery.*.rc files to be copied
+ # from TARGET_ROOT_OUT thereafter
+ LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
- # Cannot send to TARGET_RECOVERY_ROOT_OUT since build system wipes init*.rc
- # during ramdisk creation and only allows init.recovery.*.rc files to be copied
- # from TARGET_ROOT_OUT thereafter
- LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
+ LOCAL_SRC_FILES := init.recovery.logd27.rc
+ include $(BUILD_PREBUILT)
+ else
+ include $(CLEAR_VARS)
+ LOCAL_MODULE := init.recovery.logd.rc
+ LOCAL_MODULE_TAGS := eng
+ LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
- LOCAL_SRC_FILES := $(LOCAL_MODULE)
- include $(BUILD_PREBUILT)
+ # Cannot send to TARGET_RECOVERY_ROOT_OUT since build system wipes init*.rc
+ # during ramdisk creation and only allows init.recovery.*.rc files to be copied
+ # from TARGET_ROOT_OUT thereafter
+ LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
+
+ LOCAL_SRC_FILES := init.recovery.logd28.rc
+ include $(BUILD_PREBUILT)
+ endif
endif
endif