blob: 3ecf02fbfdf1a2b64b86d0cef66908268e7fb90f [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 Yonker5c933692014-04-04 11:26:32 -050021endif
Dees_Troy51a0e822012-09-05 15:24:24 -040022RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/pigz
Ethan Yonker2d11d492014-12-12 11:43:21 -060023RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/dosfsck
24RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/dosfslabel
25RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/mkdosfs
Dees_Troy51a0e822012-09-05 15:24:24 -040026RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/e2fsck
27RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/mke2fs
28RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/tune2fs
Ethan Yonkera2719152015-05-28 09:44:41 -050029RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/resize2fs
Ethan Yonker4f6a9762015-03-09 13:58:54 -050030ifneq ($(TARGET_ARCH), x86_64)
31 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/linker
32endif
33ifeq ($(TARGET_ARCH), x86_64)
34 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/linker64
35endif
Ethan Yonker1902c792014-12-03 16:48:36 -060036ifeq ($(TARGET_ARCH), arm64)
37 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/linker64
38endif
bigbiff bigbiffc7eee6f2014-09-02 18:59:01 -040039#RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/twrpmtp
Dees_Troy51a0e822012-09-05 15:24:24 -040040RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libc.so
41RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcutils.so
Ethan Yonkerbcc502c2014-11-10 11:22:10 -060042RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrecovery.so
bigbiff bigbiffc7eee6f2014-09-02 18:59:01 -040043RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libusbhost.so
44RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libgccdemangle.so
45RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libutils.so
Dees_Troy51a0e822012-09-05 15:24:24 -040046RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libdl.so
Dees_Troy51a0e822012-09-05 15:24:24 -040047RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_com_err.so
48RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_e2p.so
49RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2fs.so
50RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_profile.so
51RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_uuid.so
Ethan Yonker38c2ff82014-12-09 13:42:10 -060052ifneq ($(wildcard external/e2fsprogs/lib/quota/Android.mk),)
53 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_quota.so
54endif
Ethan Yonkerbcff1462015-01-04 22:01:33 -060055ifneq ($(wildcard external/e2fsprogs/lib/ext2fs/Android.mk),)
56 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2fs.so
57endif
58ifneq ($(wildcard external/e2fsprogs/lib/blkid/Android.mk),)
59 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_blkid.so
60endif
Vojtech Bocek76ee9032014-09-07 15:01:56 +020061RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libpng.so
Dees_Troy51a0e822012-09-05 15:24:24 -040062RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/liblog.so
63RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libm.so
64RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libstdc++.so
65RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libz.so
Dees_Troy2673cec2013-04-02 20:22:16 +000066RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libminuitwrp.so
67RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libminadbd.so
68RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libminzip.so
69RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libmtdutils.so
bigbiff bigbiff9c754052013-01-09 09:09:08 -050070RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libtar.so
bigbiff7b4c7a62015-01-01 19:44:14 -050071RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libutil-linux.so
Vojtech Bocek7cc278b2013-02-24 01:40:19 +010072RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libblkid.so
Dees_Troy51a0e822012-09-05 15:24:24 -040073RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libmmcutils.so
74RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libbmlutils.so
75RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libflashutils.so
76RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libstlport.so
Ethan Yonker67eb72a2014-11-07 10:44:37 -060077RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libfusesideload.so
mar-v-in41424082015-03-10 19:06:16 +010078ifneq (,$(filter $(PLATFORM_SDK_VERSION), 21 22))
Ethan Yonker75bf0412014-11-21 13:54:27 -060079 # libraries from lollipop
80 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libbacktrace.so
81 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libunwind.so
82 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libunwind-ptrace.so
Vojtech Bocek41ae1242015-01-04 21:57:50 +010083 # Dynamically loaded by lollipop libc and may prevent unmounting system if it is not present in sbin
84 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libnetd_client.so
Ethan Yonker75bf0412014-11-21 13:54:27 -060085else
86 # Not available in lollipop
87 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcorkscrew.so
88endif
Ethan Yonker560e65f2014-11-17 11:37:00 -060089RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libmincrypttwrp.so
Dees Troy8d66f8b2013-10-08 14:04:55 +000090RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/toolbox
Ethan Yonker03a42f62014-08-08 11:03:51 -050091ifneq ($(TW_OEM_BUILD),true)
92 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/twrp
bigbiff bigbiffc7eee6f2014-09-02 18:59:01 -040093else
94 TW_EXCLUDE_MTP := true
95endif
96ifneq ($(TW_EXCLUDE_MTP), true)
97 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libtwrpmtp.so
Ethan Yonker03a42f62014-08-08 11:03:51 -050098endif
Dees_Troya95f55c2013-08-17 13:14:43 +000099ifeq ($(TARGET_USERIMAGES_USE_EXT4), true)
100 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext4_utils.so
101endif
Dees_Troy2673cec2013-04-02 20:22:16 +0000102RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libaosprecovery.so
Dees_Troy930bf012013-08-10 22:19:03 +0000103RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libjpeg.so
Dees Troy4bf3b0d2013-09-11 19:12:49 +0000104ifeq ($(TWHAVE_SELINUX), true)
Dees_Troyf2280ff2013-08-06 18:01:12 +0000105 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libselinux.so
Dees_Troye3850a32013-08-29 18:33:47 +0000106 ifneq ($(TARGET_USERIMAGES_USE_EXT4), true)
107 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext4_utils.so
108 endif
Dees_Troyf2280ff2013-08-06 18:01:12 +0000109endif
Vojtech Bocek7cc278b2013-02-24 01:40:19 +0100110ifeq ($(BUILD_ID), GINGERBREAD)
111 TW_NO_EXFAT := true
112endif
Dees_Troyb05ddee2013-01-28 20:24:50 +0000113ifneq ($(TW_NO_EXFAT), true)
Dees_Troyb05ddee2013-01-28 20:24:50 +0000114 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/mkexfatfs
Vojtech Bocek7cc278b2013-02-24 01:40:19 +0100115 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libexfat.so
Dees Troyb4bd6972014-10-09 18:47:00 +0000116else
Captain Throwback6a1acf22014-09-18 12:46:35 -0400117 TW_NO_EXFAT_FUSE := true
118endif
119ifneq ($(TW_NO_EXFAT_FUSE), true)
120 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/exfat-fuse
bigbiff bigbiff9c754052013-01-09 09:09:08 -0500121endif
Dees_Troy51a0e822012-09-05 15:24:24 -0400122ifeq ($(TW_INCLUDE_BLOBPACK), true)
123 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/blobpack
124endif
125ifeq ($(TW_INCLUDE_INJECTTWRP), true)
126 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/injecttwrp
127endif
128ifeq ($(TW_INCLUDE_DUMLOCK), true)
129 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/htcdumlock
130endif
131ifeq ($(TW_INCLUDE_CRYPTO), true)
Ethan Yonker4eca40d2014-11-11 14:52:28 -0600132 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcryptfslollipop.so
133 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrypto.so
Ethan Yonker4eca40d2014-11-11 14:52:28 -0600134 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libhardware.so
Dees Troyc657cc02015-01-16 22:48:47 +0000135 ifeq ($(TARGET_HW_DISK_ENCRYPTION),true)
136 RELINK_SOURCE_FILES += $(TARGET_OUT)/vendor/lib/libcryptfs_hw.so
137 endif
Ethan Yonker4eca40d2014-11-11 14:52:28 -0600138endif
Dees_Troy38bd7602012-09-14 13:33:53 -0400139ifeq ($(TARGET_USERIMAGES_USE_EXT4), true)
140 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/make_ext4fs
141endif
Dees_Troy4546fe72013-01-10 14:33:27 +0000142ifneq ($(wildcard system/core/libsparse/Android.mk),)
143 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libsparse.so
144endif
Dees_Troy83bd4832013-05-04 12:39:56 +0000145ifneq ($(TW_EXCLUDE_ENCRYPTED_BACKUPS), true)
146 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/openaes
147 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libopenaes.so
148endif
Dees_Troye5017042013-08-29 16:38:55 +0000149ifeq ($(TARGET_USERIMAGES_USE_F2FS), true)
mar-v-in41424082015-03-10 19:06:16 +0100150 ifneq (,$(filter $(PLATFORM_SDK_VERSION), 21 22))
Ethan Yonker75bf0412014-11-21 13:54:27 -0600151 RELINK_SOURCE_FILES += $(TARGET_ROOT_OUT_SBIN)/mkfs.f2fs
Ethan Yonker75bf0412014-11-21 13:54:27 -0600152 else
153 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/mkfs.f2fs
Ethan Yonker75bf0412014-11-21 13:54:27 -0600154 endif
Dees_Troye5017042013-08-29 16:38:55 +0000155 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/fsck.f2fs
Dees_Troye5017042013-08-29 16:38:55 +0000156endif
Dees Troy0226cd52013-11-04 14:12:35 +0000157ifneq ($(wildcard system/core/reboot/Android.mk),)
158 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/reboot
159endif
Vojtech Bocek76ee9032014-09-07 15:01:56 +0200160ifneq ($(TW_DISABLE_TTF), true)
161 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libft2.so
162endif
Ethan Yonker0e678372014-11-18 12:17:06 -0600163ifneq ($(TW_RECOVERY_ADDITIONAL_RELINK_FILES),)
164 RELINK_SOURCE_FILES += $(TW_RECOVERY_ADDITIONAL_RELINK_FILES)
165endif
Dees Troye176a652015-01-20 19:35:21 +0000166ifneq ($(wildcard external/pcre/Android.mk),)
167 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libpcre.so
168endif
Dees_Troy51a0e822012-09-05 15:24:24 -0400169
170TWRP_AUTOGEN := $(intermediates)/teamwin
171
172GEN := $(intermediates)/teamwin
173$(GEN): $(RELINK)
174$(GEN): $(RELINK_SOURCE_FILES) $(call intermediates-dir-for,EXECUTABLES,recovery)/recovery
175 $(RELINK) $(TARGET_RECOVERY_ROOT_OUT)/sbin $(RELINK_SOURCE_FILES)
Dees_Troy51a0e822012-09-05 15:24:24 -0400176
177LOCAL_GENERATED_SOURCES := $(GEN)
178LOCAL_SRC_FILES := teamwin $(GEN)
179include $(BUILD_PREBUILT)
180
Dees_Troy51a0e822012-09-05 15:24:24 -0400181#fix_permissions
182include $(CLEAR_VARS)
183LOCAL_MODULE := fix_permissions.sh
184LOCAL_MODULE_TAGS := eng
185LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
186LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
187LOCAL_SRC_FILES := $(LOCAL_MODULE)
188include $(BUILD_PREBUILT)
189
Dees_Troy51a0e822012-09-05 15:24:24 -0400190#mke2fs.conf
191include $(CLEAR_VARS)
192LOCAL_MODULE := mke2fs.conf
193LOCAL_MODULE_TAGS := eng
194LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
195LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/etc
196LOCAL_SRC_FILES := $(LOCAL_MODULE)
197include $(BUILD_PREBUILT)
198
199ifeq ($(BOARD_HAS_NO_REAL_SDCARD),)
200 #parted
201 include $(CLEAR_VARS)
202 LOCAL_MODULE := parted
203 LOCAL_MODULE_TAGS := eng
204 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
205 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
206 LOCAL_SRC_FILES := $(LOCAL_MODULE)
207 include $(BUILD_PREBUILT)
Dees_Troy51a0e822012-09-05 15:24:24 -0400208endif
209
Dees_Troy83bd4832013-05-04 12:39:56 +0000210# copy license file for OpenAES
211ifneq ($(TW_EXCLUDE_ENCRYPTED_BACKUPS), true)
212 include $(CLEAR_VARS)
213 LOCAL_MODULE := ../openaes/LICENSE
214 LOCAL_MODULE_TAGS := eng
215 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
216 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/license/openaes
217 LOCAL_SRC_FILES := $(LOCAL_MODULE)
218 include $(BUILD_PREBUILT)
219endif
220
Dees_Troy51a0e822012-09-05 15:24:24 -0400221ifeq ($(TW_INCLUDE_DUMLOCK), true)
222 #htcdumlock for /system for dumlock
223 include $(CLEAR_VARS)
224 LOCAL_MODULE := htcdumlocksys
225 LOCAL_MODULE_TAGS := eng
226 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
Dees Troy3454ade2015-01-20 19:21:04 +0000227 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)$(TWHTCD_PATH)
Dees_Troy51a0e822012-09-05 15:24:24 -0400228 LOCAL_SRC_FILES := $(LOCAL_MODULE)
229 include $(BUILD_PREBUILT)
230
231 #flash_image for /system for dumlock
232 include $(CLEAR_VARS)
233 LOCAL_MODULE := flash_imagesys
234 LOCAL_MODULE_TAGS := eng
235 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
Dees Troy3454ade2015-01-20 19:21:04 +0000236 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)$(TWHTCD_PATH)
Dees_Troy51a0e822012-09-05 15:24:24 -0400237 LOCAL_SRC_FILES := $(LOCAL_MODULE)
238 include $(BUILD_PREBUILT)
239
240 #dump_image for /system for dumlock
241 include $(CLEAR_VARS)
242 LOCAL_MODULE := dump_imagesys
243 LOCAL_MODULE_TAGS := eng
244 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
Dees Troy3454ade2015-01-20 19:21:04 +0000245 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)$(TWHTCD_PATH)
Dees_Troy51a0e822012-09-05 15:24:24 -0400246 LOCAL_SRC_FILES := $(LOCAL_MODULE)
247 include $(BUILD_PREBUILT)
248
249 #libbmlutils for /system for dumlock
250 include $(CLEAR_VARS)
251 LOCAL_MODULE := libbmlutils.so
252 LOCAL_MODULE_TAGS := eng
253 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
Dees Troy3454ade2015-01-20 19:21:04 +0000254 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)$(TWHTCD_PATH)
Dees_Troy51a0e822012-09-05 15:24:24 -0400255 LOCAL_SRC_FILES := $(LOCAL_MODULE)
256 include $(BUILD_PREBUILT)
257
258 #libflashutils for /system for dumlock
259 include $(CLEAR_VARS)
260 LOCAL_MODULE := libflashutils.so
261 LOCAL_MODULE_TAGS := eng
262 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
Dees Troy3454ade2015-01-20 19:21:04 +0000263 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)$(TWHTCD_PATH)
Dees_Troy51a0e822012-09-05 15:24:24 -0400264 LOCAL_SRC_FILES := $(LOCAL_MODULE)
265 include $(BUILD_PREBUILT)
266
267 #libmmcutils for /system for dumlock
268 include $(CLEAR_VARS)
269 LOCAL_MODULE := libmmcutils.so
270 LOCAL_MODULE_TAGS := eng
271 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
Dees Troy3454ade2015-01-20 19:21:04 +0000272 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)$(TWHTCD_PATH)
Dees_Troy51a0e822012-09-05 15:24:24 -0400273 LOCAL_SRC_FILES := $(LOCAL_MODULE)
274 include $(BUILD_PREBUILT)
275
276 #libmtdutils for /system for dumlock
277 include $(CLEAR_VARS)
278 LOCAL_MODULE := libmtdutils.so
279 LOCAL_MODULE_TAGS := eng
280 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
Dees Troy3454ade2015-01-20 19:21:04 +0000281 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)$(TWHTCD_PATH)
Dees_Troy51a0e822012-09-05 15:24:24 -0400282 LOCAL_SRC_FILES := $(LOCAL_MODULE)
283 include $(BUILD_PREBUILT)
284
285 #HTCDumlock.apk
286 include $(CLEAR_VARS)
287 LOCAL_MODULE := HTCDumlock.apk
288 LOCAL_MODULE_TAGS := eng
289 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
Dees Troy3454ade2015-01-20 19:21:04 +0000290 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)$(TWHTCD_PATH)
Dees_Troy51a0e822012-09-05 15:24:24 -0400291 LOCAL_SRC_FILES := $(LOCAL_MODULE)
292 include $(BUILD_PREBUILT)
293endif
Dees_Troy6ef66352013-02-21 08:26:57 -0600294
295ifneq ($(TW_EXCLUDE_SUPERSU), true)
Ethan Yonkere3e88292014-12-10 16:17:55 -0600296 ifeq ($(TARGET_ARCH), arm)
297 #chattr.pie
298 include $(CLEAR_VARS)
299 LOCAL_MODULE := chattr.pie
300 LOCAL_MODULE_TAGS := eng
301 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
302 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
303 LOCAL_SRC_FILES := $(LOCAL_MODULE)
304 include $(BUILD_PREBUILT)
Dees_Troy6ef66352013-02-21 08:26:57 -0600305
Ethan Yonkere3e88292014-12-10 16:17:55 -0600306 #libsupol.so
307 include $(CLEAR_VARS)
308 LOCAL_MODULE := libsupol.so
309 LOCAL_MODULE_TAGS := eng
310 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
311 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
312 LOCAL_SRC_FILES := $(LOCAL_MODULE)
313 include $(BUILD_PREBUILT)
314
315 #su binary
316 include $(CLEAR_VARS)
317 LOCAL_MODULE := su
318 LOCAL_MODULE_TAGS := eng
319 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
320 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
321 LOCAL_SRC_FILES := $(LOCAL_MODULE)
322 include $(BUILD_PREBUILT)
323
324 #supolicy
325 include $(CLEAR_VARS)
326 LOCAL_MODULE := supolicy
327 LOCAL_MODULE_TAGS := eng
328 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
329 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
330 LOCAL_SRC_FILES := $(LOCAL_MODULE)
331 include $(BUILD_PREBUILT)
332 endif
333 ifeq ($(TARGET_ARCH), arm64)
334 #libsupol.so
335 include $(CLEAR_VARS)
336 LOCAL_MODULE := libsupol.soarm64
337 LOCAL_MODULE_STEM := libsupol.so
338 LOCAL_MODULE_TAGS := eng
339 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
340 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
341 LOCAL_SRC_FILES := $(LOCAL_MODULE)
342 include $(BUILD_PREBUILT)
343
344 #su binary
345 include $(CLEAR_VARS)
346 LOCAL_MODULE := suarm64
347 LOCAL_MODULE_STEM := su
348 LOCAL_MODULE_TAGS := eng
349 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
350 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
351 LOCAL_SRC_FILES := $(LOCAL_MODULE)
352 include $(BUILD_PREBUILT)
353
354 #supolicy
355 include $(CLEAR_VARS)
356 LOCAL_MODULE := supolicyarm64
357 LOCAL_MODULE_STEM := supolicy
358 LOCAL_MODULE_TAGS := eng
359 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
360 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
361 LOCAL_SRC_FILES := $(LOCAL_MODULE)
362 include $(BUILD_PREBUILT)
363 endif
364
365 #install-recovery.sh
Dees_Troya7939bb2013-08-29 20:21:12 +0000366 include $(CLEAR_VARS)
367 LOCAL_MODULE := install-recovery.sh
368 LOCAL_MODULE_TAGS := eng
369 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
370 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
371 LOCAL_SRC_FILES := $(LOCAL_MODULE)
372 include $(BUILD_PREBUILT)
373
Ethan Yonkere3e88292014-12-10 16:17:55 -0600374 #install-supersu.sh
375 include $(CLEAR_VARS)
376 LOCAL_MODULE := install-supersu.sh
377 LOCAL_MODULE_TAGS := eng
378 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
379 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
380 LOCAL_SRC_FILES := $(LOCAL_MODULE)
381 include $(BUILD_PREBUILT)
382
383 #99SuperSUDaemon
Dees_Troya7939bb2013-08-29 20:21:12 +0000384 include $(CLEAR_VARS)
385 LOCAL_MODULE := 99SuperSUDaemon
386 LOCAL_MODULE_TAGS := eng
387 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
388 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
389 LOCAL_SRC_FILES := $(LOCAL_MODULE)
390 include $(BUILD_PREBUILT)
391
Dees_Troy6ef66352013-02-21 08:26:57 -0600392 #SuperSU special installer APK
393 include $(CLEAR_VARS)
394 LOCAL_MODULE := Superuser.apk
395 LOCAL_MODULE_TAGS := eng
396 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
jt1134113ee732013-02-22 23:26:10 -0600397 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu
Dees_Troy6ef66352013-02-21 08:26:57 -0600398 LOCAL_SRC_FILES := $(LOCAL_MODULE)
399 include $(BUILD_PREBUILT)
jt1134113ee732013-02-22 23:26:10 -0600400endif