blob: ea83286c1175406c13855ac05a6fd75d9c7971a7 [file] [log] [blame]
Dees_Troy51a0e822012-09-05 15:24:24 -04001LOCAL_PATH := $(call my-dir)
2
3RELINK := $(LOCAL_PATH)/relink.sh
4
5#dummy file to trigger required modules
6include $(CLEAR_VARS)
7LOCAL_MODULE := teamwin
8LOCAL_MODULE_TAGS := eng
9LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
10LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
11
Matt Mowerfb1c4ff2014-04-16 13:43:36 -050012# Manage list
Dees_Troy51a0e822012-09-05 15:24:24 -040013RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/dump_image
14RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/flash_image
15RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/erase_image
Ethan Yonker5c933692014-04-04 11:26:32 -050016ifneq ($(TW_USE_TOOLBOX), true)
17 RELINK_SOURCE_FILES += $(TARGET_OUT_OPTIONAL_EXECUTABLES)/busybox
18else
Ethan Yonkerbcc502c2014-11-10 11:22:10 -060019 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/sh
20 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrypto.so
Ethan Yonkerc798c9c2015-10-09 11:15:26 -050021 ifneq (,$(filter $(PLATFORM_SDK_VERSION), 23))
22 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/toybox
dianlujitaoce608ab2015-12-28 23:51:19 +080023 ifneq ($(wildcard external/zip/Android.mk),)
24 RELINK_SOURCE_FILES += $(TARGET_OUT_OPTIONAL_EXECUTABLES)/zip
25 endif
26 ifneq ($(wildcard external/unzip/Android.mk),)
27 RELINK_SOURCE_FILES += $(TARGET_OUT_OPTIONAL_EXECUTABLES)/unzip
28 endif
Ethan Yonkerc798c9c2015-10-09 11:15:26 -050029 endif
Ethan Yonker5c933692014-04-04 11:26:32 -050030endif
Dees_Troy51a0e822012-09-05 15:24:24 -040031RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/pigz
Matt Mower18794c82015-11-11 16:22:45 -060032RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/fsck.fat
33RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/fatlabel
34RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/mkfs.fat
Dees_Troy51a0e822012-09-05 15:24:24 -040035RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/e2fsck
36RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/mke2fs
37RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/tune2fs
Ethan Yonkera2719152015-05-28 09:44:41 -050038RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/resize2fs
Ethan Yonker4f6a9762015-03-09 13:58:54 -050039ifneq ($(TARGET_ARCH), x86_64)
40 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/linker
41endif
42ifeq ($(TARGET_ARCH), x86_64)
43 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/linker64
44endif
Ethan Yonker1902c792014-12-03 16:48:36 -060045ifeq ($(TARGET_ARCH), arm64)
46 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/linker64
47endif
bigbiff bigbiffc7eee6f2014-09-02 18:59:01 -040048#RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/twrpmtp
Dees_Troy51a0e822012-09-05 15:24:24 -040049RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libc.so
50RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcutils.so
Ethan Yonkerbcc502c2014-11-10 11:22:10 -060051RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrecovery.so
bigbiff bigbiffc7eee6f2014-09-02 18:59:01 -040052RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libusbhost.so
bigbiff bigbiffc7eee6f2014-09-02 18:59:01 -040053RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libutils.so
Dees_Troy51a0e822012-09-05 15:24:24 -040054RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libdl.so
Dees_Troy51a0e822012-09-05 15:24:24 -040055RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_com_err.so
56RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_e2p.so
57RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2fs.so
58RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_profile.so
59RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_uuid.so
Ethan Yonker38c2ff82014-12-09 13:42:10 -060060ifneq ($(wildcard external/e2fsprogs/lib/quota/Android.mk),)
61 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_quota.so
62endif
Ethan Yonkerbcff1462015-01-04 22:01:33 -060063ifneq ($(wildcard external/e2fsprogs/lib/ext2fs/Android.mk),)
64 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2fs.so
65endif
66ifneq ($(wildcard external/e2fsprogs/lib/blkid/Android.mk),)
67 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_blkid.so
68endif
Vojtech Bocek76ee9032014-09-07 15:01:56 +020069RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libpng.so
Dees_Troy51a0e822012-09-05 15:24:24 -040070RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/liblog.so
71RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libm.so
72RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libstdc++.so
73RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libz.so
Dees_Troy2673cec2013-04-02 20:22:16 +000074RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libminuitwrp.so
75RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libminadbd.so
76RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libminzip.so
77RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libmtdutils.so
bigbiff bigbiff9c754052013-01-09 09:09:08 -050078RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libtar.so
bigbiff7b4c7a62015-01-01 19:44:14 -050079RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libutil-linux.so
Vojtech Bocek7cc278b2013-02-24 01:40:19 +010080RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libblkid.so
Dees_Troy51a0e822012-09-05 15:24:24 -040081RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libmmcutils.so
82RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libbmlutils.so
83RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libflashutils.so
Ethan Yonker67eb72a2014-11-07 10:44:37 -060084RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libfusesideload.so
Ethan Yonkerc798c9c2015-10-09 11:15:26 -050085ifeq (,$(filter $(PLATFORM_SDK_VERSION), 23))
86 # These libraries are no longer present in M
87 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libstlport.so
88 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libgccdemangle.so
89endif
mar-v-in41424082015-03-10 19:06:16 +010090ifneq (,$(filter $(PLATFORM_SDK_VERSION), 21 22))
Ethan Yonker75bf0412014-11-21 13:54:27 -060091 # libraries from lollipop
92 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libbacktrace.so
93 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libunwind.so
94 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libunwind-ptrace.so
Vojtech Bocek41ae1242015-01-04 21:57:50 +010095 # Dynamically loaded by lollipop libc and may prevent unmounting system if it is not present in sbin
96 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libnetd_client.so
Ethan Yonker75bf0412014-11-21 13:54:27 -060097else
Ethan Yonkerc798c9c2015-10-09 11:15:26 -050098 ifneq (,$(filter $(PLATFORM_SDK_VERSION), 23))
99 # Android M libraries
100 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libbacktrace.so
101 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libunwind.so
102 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libbase.so
103 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libc++.so
104 # Dynamically loaded by libc and may prevent unmounting system if it is not present in sbin
105 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libnetd_client.so
106 else
107 # Not available in lollipop
108 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcorkscrew.so
109 endif
Ethan Yonker75bf0412014-11-21 13:54:27 -0600110endif
Ethan Yonker560e65f2014-11-17 11:37:00 -0600111RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libmincrypttwrp.so
Dees Troy8d66f8b2013-10-08 14:04:55 +0000112RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/toolbox
Ethan Yonker03a42f62014-08-08 11:03:51 -0500113ifneq ($(TW_OEM_BUILD),true)
114 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/twrp
bigbiff bigbiffc7eee6f2014-09-02 18:59:01 -0400115else
116 TW_EXCLUDE_MTP := true
117endif
118ifneq ($(TW_EXCLUDE_MTP), true)
119 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libtwrpmtp.so
Ethan Yonker03a42f62014-08-08 11:03:51 -0500120endif
Dees_Troya95f55c2013-08-17 13:14:43 +0000121ifeq ($(TARGET_USERIMAGES_USE_EXT4), true)
122 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext4_utils.so
123endif
Dees_Troy2673cec2013-04-02 20:22:16 +0000124RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libaosprecovery.so
Dees_Troy930bf012013-08-10 22:19:03 +0000125RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libjpeg.so
Dees Troy4bf3b0d2013-09-11 19:12:49 +0000126ifeq ($(TWHAVE_SELINUX), true)
Dees_Troyf2280ff2013-08-06 18:01:12 +0000127 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libselinux.so
Dees_Troye3850a32013-08-29 18:33:47 +0000128 ifneq ($(TARGET_USERIMAGES_USE_EXT4), true)
129 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext4_utils.so
130 endif
Dees_Troyf2280ff2013-08-06 18:01:12 +0000131endif
Vojtech Bocek7cc278b2013-02-24 01:40:19 +0100132ifeq ($(BUILD_ID), GINGERBREAD)
133 TW_NO_EXFAT := true
134endif
Dees_Troyb05ddee2013-01-28 20:24:50 +0000135ifneq ($(TW_NO_EXFAT), true)
Dees_Troyb05ddee2013-01-28 20:24:50 +0000136 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/mkexfatfs
Matt Mower80f7b362015-12-12 15:38:01 -0600137 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/fsck.exfat
Ethan Yonkerdc3bc462015-12-08 15:12:40 -0600138 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libexfat_twrp.so
Dees Troyb4bd6972014-10-09 18:47:00 +0000139else
Captain Throwback6a1acf22014-09-18 12:46:35 -0400140 TW_NO_EXFAT_FUSE := true
141endif
142ifneq ($(TW_NO_EXFAT_FUSE), true)
143 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/exfat-fuse
bigbiff bigbiff9c754052013-01-09 09:09:08 -0500144endif
Dees_Troy51a0e822012-09-05 15:24:24 -0400145ifeq ($(TW_INCLUDE_BLOBPACK), true)
146 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/blobpack
147endif
148ifeq ($(TW_INCLUDE_INJECTTWRP), true)
149 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/injecttwrp
150endif
151ifeq ($(TW_INCLUDE_DUMLOCK), true)
152 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/htcdumlock
153endif
154ifeq ($(TW_INCLUDE_CRYPTO), true)
Ethan Yonker4eca40d2014-11-11 14:52:28 -0600155 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcryptfslollipop.so
156 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrypto.so
Ethan Yonker4eca40d2014-11-11 14:52:28 -0600157 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libhardware.so
Dees Troyc657cc02015-01-16 22:48:47 +0000158 ifeq ($(TARGET_HW_DISK_ENCRYPTION),true)
Captain Throwback7fe1b392015-06-29 09:19:32 -0400159 RELINK_SOURCE_FILES += $(TARGET_OUT_VENDOR_SHARED_LIBRARIES)/libcryptfs_hw.so
Dees Troyc657cc02015-01-16 22:48:47 +0000160 endif
Ethan Yonker4eca40d2014-11-11 14:52:28 -0600161endif
Dees_Troy38bd7602012-09-14 13:33:53 -0400162ifeq ($(TARGET_USERIMAGES_USE_EXT4), true)
163 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/make_ext4fs
164endif
Dees_Troy4546fe72013-01-10 14:33:27 +0000165ifneq ($(wildcard system/core/libsparse/Android.mk),)
166 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libsparse.so
167endif
Dees_Troy83bd4832013-05-04 12:39:56 +0000168ifneq ($(TW_EXCLUDE_ENCRYPTED_BACKUPS), true)
169 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/openaes
170 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libopenaes.so
171endif
Dees_Troye5017042013-08-29 16:38:55 +0000172ifeq ($(TARGET_USERIMAGES_USE_F2FS), true)
Matt Mower58294912015-12-10 11:54:28 -0600173 ifeq ($(shell test $(CM_PLATFORM_SDK_VERSION) -ge 4; echo $$?),0)
174 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/mkfs.f2fs
175 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libf2fs.so
176 else ifneq (,$(filter $(PLATFORM_SDK_VERSION), 23))
Ethan Yonker5235f552015-10-09 14:46:47 -0500177 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/mkfs.f2fs
Matt Mower58294912015-12-10 11:54:28 -0600178 else ifneq (,$(filter $(PLATFORM_SDK_VERSION), 21 22))
179 RELINK_SOURCE_FILES += $(TARGET_ROOT_OUT_SBIN)/mkfs.f2fs
Ethan Yonker75bf0412014-11-21 13:54:27 -0600180 else
Matt Mower58294912015-12-10 11:54:28 -0600181 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/mkfs.f2fs
Ethan Yonker75bf0412014-11-21 13:54:27 -0600182 endif
Dees_Troye5017042013-08-29 16:38:55 +0000183 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/fsck.f2fs
Dees_Troye5017042013-08-29 16:38:55 +0000184endif
Dees Troy0226cd52013-11-04 14:12:35 +0000185ifneq ($(wildcard system/core/reboot/Android.mk),)
186 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/reboot
187endif
Vojtech Bocek76ee9032014-09-07 15:01:56 +0200188ifneq ($(TW_DISABLE_TTF), true)
189 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libft2.so
190endif
Ethan Yonker0e678372014-11-18 12:17:06 -0600191ifneq ($(TW_RECOVERY_ADDITIONAL_RELINK_FILES),)
192 RELINK_SOURCE_FILES += $(TW_RECOVERY_ADDITIONAL_RELINK_FILES)
193endif
Dees Troye176a652015-01-20 19:35:21 +0000194ifneq ($(wildcard external/pcre/Android.mk),)
195 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libpcre.so
196endif
Ethan Yonkerb81d9052015-07-09 13:20:53 -0500197ifeq ($(TW_INCLUDE_NTFS_3G),true)
Greg Wallaceb39e6c62015-12-29 00:55:26 -0500198ifeq ($(shell test $(CM_PLATFORM_SDK_VERSION) -ge 4; echo $$?),0)
199 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/mount.ntfs
200 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/fsck.ntfs
201 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/mkfs.ntfs
202 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libntfs-3g.so
203 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libfuse.so
204else
Ethan Yonkerb81d9052015-07-09 13:20:53 -0500205 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/ntfs-3g
206 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/ntfsfix
207 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/mkntfs
208endif
Greg Wallaceb39e6c62015-12-29 00:55:26 -0500209endif
Ethan Yonker483e9f42016-01-11 22:21:18 -0600210ifeq ($(BOARD_HAS_NO_REAL_SDCARD),)
211 ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 22; echo $$?),0)
212 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/sgdisk
213 endif
214endif
Dees_Troy51a0e822012-09-05 15:24:24 -0400215
216TWRP_AUTOGEN := $(intermediates)/teamwin
217
218GEN := $(intermediates)/teamwin
219$(GEN): $(RELINK)
220$(GEN): $(RELINK_SOURCE_FILES) $(call intermediates-dir-for,EXECUTABLES,recovery)/recovery
221 $(RELINK) $(TARGET_RECOVERY_ROOT_OUT)/sbin $(RELINK_SOURCE_FILES)
Dees_Troy51a0e822012-09-05 15:24:24 -0400222
223LOCAL_GENERATED_SOURCES := $(GEN)
224LOCAL_SRC_FILES := teamwin $(GEN)
225include $(BUILD_PREBUILT)
226
Ethan Yonkerc798c9c2015-10-09 11:15:26 -0500227#permissive.sh
228include $(CLEAR_VARS)
229LOCAL_MODULE := permissive.sh
230LOCAL_MODULE_TAGS := eng
231LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
232LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
233LOCAL_SRC_FILES := $(LOCAL_MODULE)
234include $(BUILD_PREBUILT)
235
Dees_Troy51a0e822012-09-05 15:24:24 -0400236#fix_permissions
237include $(CLEAR_VARS)
238LOCAL_MODULE := fix_permissions.sh
239LOCAL_MODULE_TAGS := eng
240LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
241LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
242LOCAL_SRC_FILES := $(LOCAL_MODULE)
243include $(BUILD_PREBUILT)
244
Dees_Troy51a0e822012-09-05 15:24:24 -0400245#mke2fs.conf
246include $(CLEAR_VARS)
247LOCAL_MODULE := mke2fs.conf
248LOCAL_MODULE_TAGS := eng
249LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
250LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/etc
251LOCAL_SRC_FILES := $(LOCAL_MODULE)
252include $(BUILD_PREBUILT)
253
254ifeq ($(BOARD_HAS_NO_REAL_SDCARD),)
Ethan Yonker483e9f42016-01-11 22:21:18 -0600255 ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0)
256 #prebuilt, static sgdisk
257 include $(CLEAR_VARS)
258 LOCAL_MODULE := sgdisk_static
259 LOCAL_MODULE_STEM := sgdisk
260 LOCAL_MODULE_TAGS := eng
261 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
262 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
263 LOCAL_SRC_FILES := $(LOCAL_MODULE)
264 include $(BUILD_PREBUILT)
265 endif
Dees_Troy51a0e822012-09-05 15:24:24 -0400266 #parted
Ethan Yonker483e9f42016-01-11 22:21:18 -0600267 #include $(CLEAR_VARS)
268 #LOCAL_MODULE := parted
269 #LOCAL_MODULE_TAGS := eng
270 #LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
271 #LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
272 #LOCAL_SRC_FILES := $(LOCAL_MODULE)
273 #include $(BUILD_PREBUILT)
Dees_Troy51a0e822012-09-05 15:24:24 -0400274endif
275
Dees_Troy83bd4832013-05-04 12:39:56 +0000276# copy license file for OpenAES
277ifneq ($(TW_EXCLUDE_ENCRYPTED_BACKUPS), true)
278 include $(CLEAR_VARS)
279 LOCAL_MODULE := ../openaes/LICENSE
280 LOCAL_MODULE_TAGS := eng
281 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
282 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/license/openaes
283 LOCAL_SRC_FILES := $(LOCAL_MODULE)
284 include $(BUILD_PREBUILT)
285endif
286
Dees_Troy51a0e822012-09-05 15:24:24 -0400287ifeq ($(TW_INCLUDE_DUMLOCK), true)
288 #htcdumlock for /system for dumlock
289 include $(CLEAR_VARS)
290 LOCAL_MODULE := htcdumlocksys
291 LOCAL_MODULE_TAGS := eng
292 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
Dees Troy3454ade2015-01-20 19:21:04 +0000293 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)$(TWHTCD_PATH)
Dees_Troy51a0e822012-09-05 15:24:24 -0400294 LOCAL_SRC_FILES := $(LOCAL_MODULE)
295 include $(BUILD_PREBUILT)
296
297 #flash_image for /system for dumlock
298 include $(CLEAR_VARS)
299 LOCAL_MODULE := flash_imagesys
300 LOCAL_MODULE_TAGS := eng
301 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
Dees Troy3454ade2015-01-20 19:21:04 +0000302 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)$(TWHTCD_PATH)
Dees_Troy51a0e822012-09-05 15:24:24 -0400303 LOCAL_SRC_FILES := $(LOCAL_MODULE)
304 include $(BUILD_PREBUILT)
305
306 #dump_image for /system for dumlock
307 include $(CLEAR_VARS)
308 LOCAL_MODULE := dump_imagesys
309 LOCAL_MODULE_TAGS := eng
310 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
Dees Troy3454ade2015-01-20 19:21:04 +0000311 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)$(TWHTCD_PATH)
Dees_Troy51a0e822012-09-05 15:24:24 -0400312 LOCAL_SRC_FILES := $(LOCAL_MODULE)
313 include $(BUILD_PREBUILT)
314
315 #libbmlutils for /system for dumlock
316 include $(CLEAR_VARS)
317 LOCAL_MODULE := libbmlutils.so
318 LOCAL_MODULE_TAGS := eng
319 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
Dees Troy3454ade2015-01-20 19:21:04 +0000320 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)$(TWHTCD_PATH)
Dees_Troy51a0e822012-09-05 15:24:24 -0400321 LOCAL_SRC_FILES := $(LOCAL_MODULE)
322 include $(BUILD_PREBUILT)
323
324 #libflashutils for /system for dumlock
325 include $(CLEAR_VARS)
326 LOCAL_MODULE := libflashutils.so
327 LOCAL_MODULE_TAGS := eng
328 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
Dees Troy3454ade2015-01-20 19:21:04 +0000329 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)$(TWHTCD_PATH)
Dees_Troy51a0e822012-09-05 15:24:24 -0400330 LOCAL_SRC_FILES := $(LOCAL_MODULE)
331 include $(BUILD_PREBUILT)
332
333 #libmmcutils for /system for dumlock
334 include $(CLEAR_VARS)
335 LOCAL_MODULE := libmmcutils.so
336 LOCAL_MODULE_TAGS := eng
337 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
Dees Troy3454ade2015-01-20 19:21:04 +0000338 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)$(TWHTCD_PATH)
Dees_Troy51a0e822012-09-05 15:24:24 -0400339 LOCAL_SRC_FILES := $(LOCAL_MODULE)
340 include $(BUILD_PREBUILT)
341
342 #libmtdutils for /system for dumlock
343 include $(CLEAR_VARS)
344 LOCAL_MODULE := libmtdutils.so
345 LOCAL_MODULE_TAGS := eng
346 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
Dees Troy3454ade2015-01-20 19:21:04 +0000347 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)$(TWHTCD_PATH)
Dees_Troy51a0e822012-09-05 15:24:24 -0400348 LOCAL_SRC_FILES := $(LOCAL_MODULE)
349 include $(BUILD_PREBUILT)
350
351 #HTCDumlock.apk
352 include $(CLEAR_VARS)
353 LOCAL_MODULE := HTCDumlock.apk
354 LOCAL_MODULE_TAGS := eng
355 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
Dees Troy3454ade2015-01-20 19:21:04 +0000356 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)$(TWHTCD_PATH)
Dees_Troy51a0e822012-09-05 15:24:24 -0400357 LOCAL_SRC_FILES := $(LOCAL_MODULE)
358 include $(BUILD_PREBUILT)
359endif
Dees_Troy6ef66352013-02-21 08:26:57 -0600360
361ifneq ($(TW_EXCLUDE_SUPERSU), true)
Ethan Yonkere3e88292014-12-10 16:17:55 -0600362 ifeq ($(TARGET_ARCH), arm)
363 #chattr.pie
364 include $(CLEAR_VARS)
365 LOCAL_MODULE := chattr.pie
366 LOCAL_MODULE_TAGS := eng
367 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
368 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
369 LOCAL_SRC_FILES := $(LOCAL_MODULE)
370 include $(BUILD_PREBUILT)
Dees_Troy6ef66352013-02-21 08:26:57 -0600371
Ethan Yonkere3e88292014-12-10 16:17:55 -0600372 #libsupol.so
373 include $(CLEAR_VARS)
374 LOCAL_MODULE := libsupol.so
375 LOCAL_MODULE_TAGS := eng
376 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
377 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
378 LOCAL_SRC_FILES := $(LOCAL_MODULE)
379 include $(BUILD_PREBUILT)
380
381 #su binary
382 include $(CLEAR_VARS)
Ethan Yonkerb82422a2016-01-20 08:48:49 -0600383 LOCAL_MODULE := suarm
384 LOCAL_MODULE_STEM := su
Ethan Yonkere3e88292014-12-10 16:17:55 -0600385 LOCAL_MODULE_TAGS := eng
386 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
387 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
388 LOCAL_SRC_FILES := $(LOCAL_MODULE)
389 include $(BUILD_PREBUILT)
390
391 #supolicy
392 include $(CLEAR_VARS)
393 LOCAL_MODULE := supolicy
394 LOCAL_MODULE_TAGS := eng
395 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
396 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
397 LOCAL_SRC_FILES := $(LOCAL_MODULE)
398 include $(BUILD_PREBUILT)
399 endif
400 ifeq ($(TARGET_ARCH), arm64)
401 #libsupol.so
402 include $(CLEAR_VARS)
403 LOCAL_MODULE := libsupol.soarm64
404 LOCAL_MODULE_STEM := libsupol.so
405 LOCAL_MODULE_TAGS := eng
406 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
407 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
408 LOCAL_SRC_FILES := $(LOCAL_MODULE)
409 include $(BUILD_PREBUILT)
410
411 #su binary
412 include $(CLEAR_VARS)
413 LOCAL_MODULE := suarm64
414 LOCAL_MODULE_STEM := su
415 LOCAL_MODULE_TAGS := eng
416 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
417 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
418 LOCAL_SRC_FILES := $(LOCAL_MODULE)
419 include $(BUILD_PREBUILT)
420
421 #supolicy
422 include $(CLEAR_VARS)
423 LOCAL_MODULE := supolicyarm64
424 LOCAL_MODULE_STEM := supolicy
425 LOCAL_MODULE_TAGS := eng
426 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
427 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
428 LOCAL_SRC_FILES := $(LOCAL_MODULE)
429 include $(BUILD_PREBUILT)
430 endif
431
432 #install-recovery.sh
Dees_Troya7939bb2013-08-29 20:21:12 +0000433 include $(CLEAR_VARS)
434 LOCAL_MODULE := install-recovery.sh
435 LOCAL_MODULE_TAGS := eng
436 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
437 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
438 LOCAL_SRC_FILES := $(LOCAL_MODULE)
439 include $(BUILD_PREBUILT)
440
Ethan Yonkere3e88292014-12-10 16:17:55 -0600441 #install-supersu.sh
442 include $(CLEAR_VARS)
443 LOCAL_MODULE := install-supersu.sh
444 LOCAL_MODULE_TAGS := eng
445 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
446 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
447 LOCAL_SRC_FILES := $(LOCAL_MODULE)
448 include $(BUILD_PREBUILT)
449
450 #99SuperSUDaemon
Dees_Troya7939bb2013-08-29 20:21:12 +0000451 include $(CLEAR_VARS)
452 LOCAL_MODULE := 99SuperSUDaemon
453 LOCAL_MODULE_TAGS := eng
454 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
455 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
456 LOCAL_SRC_FILES := $(LOCAL_MODULE)
457 include $(BUILD_PREBUILT)
458
Dees_Troy6ef66352013-02-21 08:26:57 -0600459 #SuperSU special installer APK
460 include $(CLEAR_VARS)
461 LOCAL_MODULE := Superuser.apk
462 LOCAL_MODULE_TAGS := eng
463 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
jt1134113ee732013-02-22 23:26:10 -0600464 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
Dees_Troy6ef66352013-02-21 08:26:57 -0600465 LOCAL_SRC_FILES := $(LOCAL_MODULE)
466 include $(BUILD_PREBUILT)
jt1134113ee732013-02-22 23:26:10 -0600467endif