ext4crypt: fix include location for recovery-twrp in lineage
Change-Id: Iefa73425fc13f41f5a267cce0c5d4047edc25e9e
(cherry picked from commit 186eb7002d95e28325f2d2e42637c989e08ac618)
diff --git a/Android.mk b/Android.mk
index 8fa5139..1a5782b 100755
--- a/Android.mk
+++ b/Android.mk
@@ -187,7 +187,11 @@
ifeq ($(TARGET_USERIMAGES_USE_EXT4), true)
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 28; echo $$?),0)
LOCAL_CFLAGS += -DUSE_EXT4
- LOCAL_C_INCLUDES += system/extras/ext4_utils
+ endif
+ ifeq ($(shell test $(PLATFORM_SDK_VERSION) -le 28; echo $$?),0)
+ LOCAL_C_INCLUDES += system/extras/ext4_utils \
+ system/extras/ext4_utils/include \
+ $(commands_TWRP_local_path)/crypto/ext4crypt
LOCAL_SHARED_LIBRARIES += libext4_utils
ifneq ($(wildcard external/lz4/Android.mk),)
#LOCAL_STATIC_LIBRARIES += liblz4
diff --git a/gui/Android.mk b/gui/Android.mk
index 9ee54d6..9529735 100755
--- a/gui/Android.mk
+++ b/gui/Android.mk
@@ -58,6 +58,15 @@
LOCAL_SHARED_LIBRARIES += libminzip
LOCAL_CFLAGS += -DUSE_MINZIP
endif
+ifeq ($(TARGET_USERIMAGES_USE_EXT4), true)
+ ifeq ($(shell test $(PLATFORM_SDK_VERSION) -le 28; echo $$?),0)
+ LOCAL_C_INCLUDES += system/extras/ext4_utils \
+ system/extras/ext4_utils/include \
+ $(LOCAL_PATH)/../crypto/ext4crypt
+ LOCAL_SHARED_LIBRARIES += libext4_utils
+ endif
+endif
+
LOCAL_MODULE := libguitwrp
#TWRP_EVENT_LOGGING := true