Add flag for including additional files built from source in TWRP
Some devices may need additional binaries or libs that TWRP
normally does not need included in /sbin
Use TW_RECOVERY_ADDITIONAL_RELINK_FILES to build them from source
and get them added to the recovery ramdisk.
For example, Nexus 9 needs libc++ included in order to decrypt
the data partition. The following will build it from source and
include it in TWRP:
TARGET_RECOVERY_DEVICE_MODULES := libc++
TW_RECOVERY_ADDITIONAL_RELINK_FILES := \
out/target/product/volantis/system/lib/libc++.so
Change-Id: I147c0d5569c83514d2e50226ecc50e80bf8aac36
diff --git a/prebuilt/Android.mk b/prebuilt/Android.mk
index 7e88da7..7d860b0 100644
--- a/prebuilt/Android.mk
+++ b/prebuilt/Android.mk
@@ -153,6 +153,9 @@
ifneq ($(TW_DISABLE_TTF), true)
RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libft2.so
endif
+ifneq ($(TW_RECOVERY_ADDITIONAL_RELINK_FILES),)
+ RELINK_SOURCE_FILES += $(TW_RECOVERY_ADDITIONAL_RELINK_FILES)
+endif
TWRP_AUTOGEN := $(intermediates)/teamwin