blob: b63935ab50cc57984c7a0bbe2d75216a88df29d2 [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)
bigbiffce8f83c2015-12-12 18:30:21 -05007
Dees_Troy51a0e822012-09-05 15:24:24 -04008LOCAL_MODULE := teamwin
9LOCAL_MODULE_TAGS := eng
10LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
11LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
12
Matt Mowerfb1c4ff2014-04-16 13:43:36 -050013# Manage list
Dees_Troy51a0e822012-09-05 15:24:24 -040014RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/dump_image
15RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/flash_image
16RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/erase_image
bigbiffce8f83c2015-12-12 18:30:21 -050017RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/bu
Ethan Yonker5c933692014-04-04 11:26:32 -050018ifneq ($(TW_USE_TOOLBOX), true)
Ethan Yonker93382822018-11-01 15:25:31 -050019 RELINK_SOURCE_FILES += $(TARGET_OUT_OPTIONAL_EXECUTABLES)/busybox
Ethan Yonker5c933692014-04-04 11:26:32 -050020else
Ethan Yonker93382822018-11-01 15:25:31 -050021 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/sh
22 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrypto.so
23 ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 23; echo $$?),0)
Captain Throwback3c565b52019-04-25 12:03:27 -040024 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/grep
25 LOCAL_POST_INSTALL_CMD += $(hide) if [ -e "$(TARGET_RECOVERY_ROOT_OUT)/sbin/egrep" ]; then \
26 rm $(TARGET_RECOVERY_ROOT_OUT)/sbin/egrep; fi; ln -sr $(TARGET_RECOVERY_ROOT_OUT)/sbin/grep $(TARGET_RECOVERY_ROOT_OUT)/sbin/egrep; \
27 if [ -e "$(TARGET_RECOVERY_ROOT_OUT)/sbin/fgrep" ]; then \
28 rm $(TARGET_RECOVERY_ROOT_OUT)/sbin/fgrep; fi; ln -sr $(TARGET_RECOVERY_ROOT_OUT)/sbin/grep $(TARGET_RECOVERY_ROOT_OUT)/sbin/fgrep;
Ethan Yonker93382822018-11-01 15:25:31 -050029 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/toybox
30 ifneq ($(wildcard external/zip/Android.mk),)
31 RELINK_SOURCE_FILES += $(TARGET_OUT_OPTIONAL_EXECUTABLES)/zip
32 endif
33 ifneq ($(wildcard external/unzip/Android.mk),)
34 RELINK_SOURCE_FILES += $(TARGET_OUT_OPTIONAL_EXECUTABLES)/unzip
35 endif
36 ifneq ($(wildcard system/core/libziparchive/Android.bp),)
37 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/unzip
38 endif
39 endif
Ethan Yonker5c933692014-04-04 11:26:32 -050040endif
Dees_Troy51a0e822012-09-05 15:24:24 -040041RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/pigz
Matt Mower18794c82015-11-11 16:22:45 -060042RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/fsck.fat
43RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/fatlabel
44RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/mkfs.fat
nkk7135764fd2017-12-19 12:39:08 +020045ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 27; echo $$?),0)
46 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/adbd
47endif
Dees_Troy51a0e822012-09-05 15:24:24 -040048RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/e2fsck
dianlujitao4879b372018-12-03 18:45:47 +080049ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 28; echo $$?),0)
50 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/e2fsdroid
51endif
Dees_Troy51a0e822012-09-05 15:24:24 -040052RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/mke2fs
53RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/tune2fs
Ethan Yonkera2719152015-05-28 09:44:41 -050054RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/resize2fs
HashBanged974bb2016-01-30 14:20:09 -050055RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/simg2img
Ethan Yonker4f6a9762015-03-09 13:58:54 -050056ifneq ($(TARGET_ARCH), x86_64)
57 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/linker
58endif
59ifeq ($(TARGET_ARCH), x86_64)
60 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/linker64
61endif
Ethan Yonker1902c792014-12-03 16:48:36 -060062ifeq ($(TARGET_ARCH), arm64)
63 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/linker64
64endif
bigbiff bigbiffc7eee6f2014-09-02 18:59:01 -040065#RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/twrpmtp
Dees_Troy51a0e822012-09-05 15:24:24 -040066RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libc.so
67RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcutils.so
Ethan Yonkerbcc502c2014-11-10 11:22:10 -060068RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrecovery.so
bigbiff bigbiffc7eee6f2014-09-02 18:59:01 -040069RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libusbhost.so
bigbiff bigbiffc7eee6f2014-09-02 18:59:01 -040070RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libutils.so
Dees_Troy51a0e822012-09-05 15:24:24 -040071RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libdl.so
Dees_Troy51a0e822012-09-05 15:24:24 -040072RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_com_err.so
73RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_e2p.so
74RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2fs.so
75RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_profile.so
76RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_uuid.so
Vladimir Oltean47802862018-07-22 13:31:57 +030077ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 27; echo $$?),0)
78 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_misc.so
79endif
Ethan Yonker38c2ff82014-12-09 13:42:10 -060080ifneq ($(wildcard external/e2fsprogs/lib/quota/Android.mk),)
81 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_quota.so
82endif
Ethan Yonkerfefe5912017-09-30 22:22:13 -050083ifneq ($(wildcard external/e2fsprogs/lib/ext2fs/Android.*),)
Ethan Yonkerbcff1462015-01-04 22:01:33 -060084 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2fs.so
85endif
Ethan Yonkerfefe5912017-09-30 22:22:13 -050086ifneq ($(wildcard external/e2fsprogs/lib/blkid/Android.*),)
Ethan Yonkerbcff1462015-01-04 22:01:33 -060087 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_blkid.so
88endif
Vojtech Bocek76ee9032014-09-07 15:01:56 +020089RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libpng.so
Dees_Troy51a0e822012-09-05 15:24:24 -040090RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/liblog.so
91RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libm.so
92RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libstdc++.so
93RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libz.so
Dees_Troy2673cec2013-04-02 20:22:16 +000094RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libminuitwrp.so
95RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libminadbd.so
96RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libminzip.so
97RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libmtdutils.so
bigbiff bigbiff9c754052013-01-09 09:09:08 -050098RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libtar.so
bigbiffce8f83c2015-12-12 18:30:21 -050099RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libtwadbbu.so
bigbiff bigbiff56cf5642016-08-19 17:43:45 -0400100RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libtwrpdigest.so
bigbiff7b4c7a62015-01-01 19:44:14 -0500101RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libutil-linux.so
Vojtech Bocek7cc278b2013-02-24 01:40:19 +0100102RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libblkid.so
Dees_Troy51a0e822012-09-05 15:24:24 -0400103RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libmmcutils.so
104RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libbmlutils.so
105RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libflashutils.so
Ethan Yonker67eb72a2014-11-07 10:44:37 -0600106RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libfusesideload.so
Ethan Yonker8373cfe2017-09-08 06:50:54 -0500107RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libbootloader_message_twrp.so
108ifeq ($(PLATFORM_SDK_VERSION), 22)
109 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libc++.so
110endif
Ethan Yonker34ae4832016-08-24 15:32:18 -0500111ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0)
Ethan Yonkerc798c9c2015-10-09 11:15:26 -0500112 # These libraries are no longer present in M
113 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libstlport.so
114 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libgccdemangle.so
115endif
Ethan Yonker534d4e02016-08-26 10:05:03 -0500116ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 23; echo $$?),0)
D. Andrei Măceșb29a5e22016-12-22 06:19:44 -0500117
118 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrypto.so \
119 $(if $(WITH_CRYPTO_UTILS),$(TARGET_OUT_SHARED_LIBRARIES)/libcrypto_utils.so)
Ethan Yonker34ae4832016-08-24 15:32:18 -0500120 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libpackagelistparser.so
121 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/liblzma.so
122endif
mar-v-in41424082015-03-10 19:06:16 +0100123ifneq (,$(filter $(PLATFORM_SDK_VERSION), 21 22))
Ethan Yonker75bf0412014-11-21 13:54:27 -0600124 # libraries from lollipop
125 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libbacktrace.so
126 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libunwind.so
127 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libunwind-ptrace.so
Vojtech Bocek41ae1242015-01-04 21:57:50 +0100128 # Dynamically loaded by lollipop libc and may prevent unmounting system if it is not present in sbin
129 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libnetd_client.so
Ethan Yonker75bf0412014-11-21 13:54:27 -0600130else
Ethan Yonker34ae4832016-08-24 15:32:18 -0500131 ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 23; echo $$?),0)
Ethan Yonkerc798c9c2015-10-09 11:15:26 -0500132 # Android M libraries
133 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libbacktrace.so
134 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libunwind.so
135 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libbase.so
136 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libc++.so
137 # Dynamically loaded by libc and may prevent unmounting system if it is not present in sbin
138 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libnetd_client.so
139 else
140 # Not available in lollipop
141 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcorkscrew.so
142 endif
Ethan Yonker75bf0412014-11-21 13:54:27 -0600143endif
Ethan Yonkerf1179622016-08-25 15:32:21 -0500144ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 24; echo $$?),0)
145 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libmincrypttwrp.so
146endif
147RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/toolbox
bigbiff bigbiffaf32bb92018-12-18 18:39:53 -0500148
Ethan Yonker03a42f62014-08-08 11:03:51 -0500149ifneq ($(TW_OEM_BUILD),true)
150 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/twrp
bigbiff bigbiffc7eee6f2014-09-02 18:59:01 -0400151else
152 TW_EXCLUDE_MTP := true
153endif
bigbiff bigbiffaf32bb92018-12-18 18:39:53 -0500154
155ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 28; echo $$?),0)
bigbiff bigbiffc7eee6f2014-09-02 18:59:01 -0400156ifneq ($(TW_EXCLUDE_MTP), true)
bigbiff bigbiffaf32bb92018-12-18 18:39:53 -0500157 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libtwrpmtp-ffs.so
158 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libasyncio.so
Ethan Yonker03a42f62014-08-08 11:03:51 -0500159endif
bigbiff bigbiffaf32bb92018-12-18 18:39:53 -0500160else
161ifneq ($(TW_EXCLUDE_MTP), true)
162 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libtwrpmtp-legacy.so
163endif
164endif
165
Matt Mower87413642017-01-17 21:14:46 -0600166RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext4_utils.so
Dees_Troy2673cec2013-04-02 20:22:16 +0000167RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libaosprecovery.so
Greg Wallaceace76232016-01-27 17:15:51 -0500168ifneq ($(TW_INCLUDE_JPEG),)
169 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libjpeg.so
170endif
Matt Mower87413642017-01-17 21:14:46 -0600171RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libselinux.so
Vojtech Bocek7cc278b2013-02-24 01:40:19 +0100172ifeq ($(BUILD_ID), GINGERBREAD)
173 TW_NO_EXFAT := true
174endif
Dees_Troyb05ddee2013-01-28 20:24:50 +0000175ifneq ($(TW_NO_EXFAT), true)
Dees_Troyb05ddee2013-01-28 20:24:50 +0000176 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/mkexfatfs
Matt Mower80f7b362015-12-12 15:38:01 -0600177 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/fsck.exfat
Ethan Yonkerdc3bc462015-12-08 15:12:40 -0600178 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libexfat_twrp.so
Dees Troyb4bd6972014-10-09 18:47:00 +0000179else
Captain Throwback6a1acf22014-09-18 12:46:35 -0400180 TW_NO_EXFAT_FUSE := true
181endif
182ifneq ($(TW_NO_EXFAT_FUSE), true)
183 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/exfat-fuse
bigbiff bigbiff9c754052013-01-09 09:09:08 -0500184endif
Dees_Troy51a0e822012-09-05 15:24:24 -0400185ifeq ($(TW_INCLUDE_BLOBPACK), true)
186 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/blobpack
187endif
188ifeq ($(TW_INCLUDE_INJECTTWRP), true)
189 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/injecttwrp
190endif
191ifeq ($(TW_INCLUDE_DUMLOCK), true)
192 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/htcdumlock
193endif
194ifeq ($(TW_INCLUDE_CRYPTO), true)
Ethan Yonker98661c12018-10-17 08:39:28 -0500195 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcryptfsfde.so
Ethan Yonker4eca40d2014-11-11 14:52:28 -0600196 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrypto.so
Ethan Yonker4eca40d2014-11-11 14:52:28 -0600197 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libhardware.so
Ethan Yonker66a19492015-12-10 10:19:45 -0600198 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libgpt_twrp.so
Dees Troyc657cc02015-01-16 22:48:47 +0000199 ifeq ($(TARGET_HW_DISK_ENCRYPTION),true)
Ethan Yonkerdcd9f3f2017-06-05 09:23:34 -0500200 ifeq ($(TARGET_CRYPTFS_HW_PATH),)
201 RELINK_SOURCE_FILES += $(TARGET_OUT_VENDOR_SHARED_LIBRARIES)/libcryptfs_hw.so
202 else
203 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcryptfs_hw.so
204 endif
Dees Troyc657cc02015-01-16 22:48:47 +0000205 endif
Ethan Yonkerbd7492d2016-12-07 13:55:01 -0600206 # FBE files
207 ifeq ($(TW_INCLUDE_CRYPTO_FBE), true)
208 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libe4crypt.so
209 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libgatekeeper.so
Ethan Yonkerbd7492d2016-12-07 13:55:01 -0600210 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libkeymaster_messages.so
211 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libkeystore_binder.so
212 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libbinder.so
213 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libprotobuf-cpp-lite.so
214 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libsoftkeymasterdevice.so
Ethan Yonkerfefe5912017-09-30 22:22:13 -0500215 ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 25; echo $$?),0)
216 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/android.hardware.gatekeeper@1.0.so
217 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/hwservicemanager
218 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/avbctl
Ethan Yonkerfefe5912017-09-30 22:22:13 -0500219 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/keystore
220 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/keystore_cli
221 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/servicemanager
222 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/android.system.wifi.keystore@1.0.so
Ethan Yonker31344a32017-11-29 12:13:41 -0600223 ifneq ($(wildcard system/keymaster/keymaster_stl.cpp),)
224 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libkeymaster_portable.so
225 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libkeymaster_staging.so
226 endif
Ethan Yonkerfefe5912017-09-30 22:22:13 -0500227 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libwifikeystorehal.so
Ethan Yonker31344a32017-11-29 12:13:41 -0600228 ifneq ($(wildcard hardware/interfaces/weaver/Android.bp),)
229 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/android.hardware.weaver@1.0.so
230 endif
Ethan Yonker6b3bdfd2018-12-21 11:54:26 -0600231 ifneq ($(wildcard hardware/interfaces/weaver/1.0/Android.bp),)
232 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/android.hardware.weaver@1.0.so
233 endif
Ethan Yonkerfefe5912017-09-30 22:22:13 -0500234 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libhardware_legacy.so
235 else
236 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libkeymaster1.so
237 endif
Ethan Yonker58f21322018-08-24 11:17:36 -0500238 ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 28; echo $$?),0)
239 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libsoftkeymaster.so
240 endif
Ethan Yonkere9afc3d2018-08-30 15:16:27 -0500241 ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 28; echo $$?),0)
242 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/android.hardware.keymaster@4.0.so
243 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libkeymaster4support.so
244 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libkeystore_aidl.so
245 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libkeystore_parcelables.so
246 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libutilscallstack.so
247 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libunwindstack.so
248 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libdexfile.so
249 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libservices.so
250 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libkeymaster_portable.so
251 endif
Ethan Yonker93382822018-11-01 15:25:31 -0500252 # lshal can be useful for seeing if you have things like the keymaster working properly, but it isn't needed for TWRP to work
253 #RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/lshal
254 #RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/liblshal.so
255 #RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libssl.so
256 #RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libhidl-gen-hash.so
Ethan Yonkerbd7492d2016-12-07 13:55:01 -0600257 endif
Ethan Yonker4eca40d2014-11-11 14:52:28 -0600258endif
Ethan Yonker1b190162016-12-05 15:25:19 -0600259ifeq ($(AB_OTA_UPDATER), true)
bigbiff bigbiffc630cee2019-01-03 20:14:06 -0500260 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/android.hardware.boot@1.0.so
Ethan Yonker1b190162016-12-05 15:25:19 -0600261 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/bootctl
262 ifneq ($(TW_INCLUDE_CRYPTO), true)
263 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libhardware.so
264 endif
265endif
Dees_Troy38bd7602012-09-14 13:33:53 -0400266ifeq ($(TARGET_USERIMAGES_USE_EXT4), true)
Ethan Yonker58f21322018-08-24 11:17:36 -0500267 ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 28; echo $$?),0)
268 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/make_ext4fs
269 endif
Dees_Troy38bd7602012-09-14 13:33:53 -0400270endif
Ethan Yonkerfefe5912017-09-30 22:22:13 -0500271ifneq ($(wildcard system/core/libsparse/Android.*),)
Dees_Troy4546fe72013-01-10 14:33:27 +0000272 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libsparse.so
273endif
Dees_Troy83bd4832013-05-04 12:39:56 +0000274ifneq ($(TW_EXCLUDE_ENCRYPTED_BACKUPS), true)
275 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/openaes
276 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libopenaes.so
277endif
Dees_Troye5017042013-08-29 16:38:55 +0000278ifeq ($(TARGET_USERIMAGES_USE_F2FS), true)
Matt Mower58294912015-12-10 11:54:28 -0600279 ifeq ($(shell test $(CM_PLATFORM_SDK_VERSION) -ge 4; echo $$?),0)
280 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/mkfs.f2fs
281 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libf2fs.so
nkk7104ec0952017-10-25 14:09:37 +0300282 else ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 26; echo $$?),0)
283 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/mkfs.f2fs
Ethan Yonker93382822018-11-01 15:25:31 -0500284 ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 28; echo $$?),0)
285 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/sload.f2fs
286 endif
TheStrix09e86932017-02-22 04:48:25 +0530287 else ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 24; echo $$?),0)
288 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/mkfs.f2fs
289 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libf2fs.so
maxwene7c88562017-01-23 18:36:35 +0100290 else ifeq ($(shell test $(PLATFORM_SDK_VERSION) -eq 23; echo $$?),0)
Ethan Yonker5235f552015-10-09 14:46:47 -0500291 RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/mkfs.f2fs
Matt Mower58294912015-12-10 11:54:28 -0600292 else ifneq (,$(filter $(PLATFORM_SDK_VERSION), 21 22))
293 RELINK_SOURCE_FILES += $(TARGET_ROOT_OUT_SBIN)/mkfs.f2fs
Ethan Yonker75bf0412014-11-21 13:54:27 -0600294 else
Matt Mower58294912015-12-10 11:54:28 -0600295 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/mkfs.f2fs
Ethan Yonker75bf0412014-11-21 13:54:27 -0600296 endif
Dees_Troye5017042013-08-29 16:38:55 +0000297 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/fsck.f2fs
Dees_Troye5017042013-08-29 16:38:55 +0000298endif
Ethan Yonkerfefe5912017-09-30 22:22:13 -0500299ifneq ($(wildcard system/core/reboot/Android.*),)
Dees Troy0226cd52013-11-04 14:12:35 +0000300 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/reboot
301endif
Vojtech Bocek76ee9032014-09-07 15:01:56 +0200302ifneq ($(TW_DISABLE_TTF), true)
303 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libft2.so
304endif
Ethan Yonker0e678372014-11-18 12:17:06 -0600305ifneq ($(TW_RECOVERY_ADDITIONAL_RELINK_FILES),)
306 RELINK_SOURCE_FILES += $(TW_RECOVERY_ADDITIONAL_RELINK_FILES)
307endif
Dees Troye176a652015-01-20 19:35:21 +0000308ifneq ($(wildcard external/pcre/Android.mk),)
309 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libpcre.so
310endif
Ethan Yonkerb81d9052015-07-09 13:20:53 -0500311ifeq ($(TW_INCLUDE_NTFS_3G),true)
Jason Riordan6c28ee82016-05-12 09:06:57 -0400312ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 22; echo $$?),0)
Greg Wallaceb39e6c62015-12-29 00:55:26 -0500313 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/mount.ntfs
314 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/fsck.ntfs
315 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/mkfs.ntfs
316 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libntfs-3g.so
317 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libfuse.so
318else
Ethan Yonkerb81d9052015-07-09 13:20:53 -0500319 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/ntfs-3g
320 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/ntfsfix
321 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/mkntfs
322endif
Greg Wallaceb39e6c62015-12-29 00:55:26 -0500323endif
Ethan Yonker483e9f42016-01-11 22:21:18 -0600324ifeq ($(BOARD_HAS_NO_REAL_SDCARD),)
325 ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 22; echo $$?),0)
326 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/sgdisk
327 endif
328endif
Captain Throwback1f127752016-01-19 17:30:20 -0500329ifeq ($(TWRP_INCLUDE_LOGCAT), true)
330 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/logcat
Ethan Yonkere5a288c2016-02-15 09:23:57 -0600331 ifeq ($(TARGET_USES_LOGD), true)
332 RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/logd
333 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libsysutils.so
334 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libnl.so
335 endif
Ethan Yonker534d4e02016-08-26 10:05:03 -0500336 ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 24; echo $$?),0)
337 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libpcrecpp.so
338 endif
Ethan Yonkerd9918b72017-09-15 08:17:42 -0500339 ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 26; echo $$?),0)
340 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/liblogcat.so
341 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcap.so
342 endif
Captain Throwback1f127752016-01-19 17:30:20 -0500343endif
Ethan Yonker8373cfe2017-09-08 06:50:54 -0500344ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 25; echo $$?),0)
345 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libpcre2.so
346 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libvndksupport.so
347 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libhwbinder.so
348 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libhidlbase.so
349 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libhidltransport.so
350 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/android.hardware.keymaster@3.0.so
Ethan Yonker8373cfe2017-09-08 06:50:54 -0500351 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libziparchive.so
Ethan Yonkerc3c0e642017-09-11 21:39:57 -0500352 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_blkid.so
353 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_quota.so
Ethan Yonkerfefe5912017-09-30 22:22:13 -0500354
355 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libhidl-gen-utils.so
356 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libvintf.so
357 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libtinyxml2.so
358 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/android.hidl.token@1.0.so
Ethan Yonker31344a32017-11-29 12:13:41 -0600359 ifneq ($(wildcard system/core/libkeyutils/Android.bp),)
360 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libkeyutils.so
361 endif
Ethan Yonkeraac05c22017-12-12 07:04:05 -0600362 ifeq ($(wildcard system/libhidl/transport/HidlTransportUtils.cpp),)
363 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/android.hidl.base@1.0.so
364 endif
Ethan Yonker8373cfe2017-09-08 06:50:54 -0500365endif
Ethan Yonker58f21322018-08-24 11:17:36 -0500366ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 27; echo $$?),0)
lambdadroideff335d2018-09-26 22:42:05 +0200367 ifeq ($(TARGET_ARCH), arm64)
368 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libclang_rt.ubsan_standalone-aarch64-android.so
369 endif
Simon Shie6825982019-03-09 00:57:04 +0800370 ifeq ($(TARGET_ARCH), arm)
371 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libclang_rt.ubsan_standalone-arm-android.so
372 endif
373 ifeq ($(TARGET_ARCH), x86_64)
374 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libclang_rt.ubsan_standalone-x86_64-android.so
375 endif
376 ifeq ($(TARGET_ARCH), x86)
377 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libclang_rt.ubsan_standalone-i686-android.so
378 endif
379 ifeq ($(TARGET_ARCH), mips)
380 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libclang_rt.ubsan_standalone-mips-android.so
381 endif
382 ifeq ($(TARGET_ARCH), mips64)
383 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libclang_rt.ubsan_standalone-mips64-android.so
384 endif
Ethan Yonker58f21322018-08-24 11:17:36 -0500385 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/liblogwrap.so
Ethan Yonker93382822018-11-01 15:25:31 -0500386 RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_misc.so
Ethan Yonker58f21322018-08-24 11:17:36 -0500387endif
388
389TW_BB_SYMLINKS :=
390ifneq ($(TW_USE_TOOLBOX), true)
391 TW_BB_SYMLINKS := busybox_symlinks
392endif
Ethan Yonker8373cfe2017-09-08 06:50:54 -0500393
Dees_Troy51a0e822012-09-05 15:24:24 -0400394TWRP_AUTOGEN := $(intermediates)/teamwin
Dees_Troy51a0e822012-09-05 15:24:24 -0400395GEN := $(intermediates)/teamwin
Ethan Yonkere9afc3d2018-08-30 15:16:27 -0500396$(GEN): $(RELINK) $(TW_BB_SYMLINKS) toolbox_symlinks
Ethan Yonker34ae4832016-08-24 15:32:18 -0500397$(GEN): $(RELINK_SOURCE_FILES) $(call intermediates-dir-for,EXECUTABLES,init)/init
Dees_Troy51a0e822012-09-05 15:24:24 -0400398 $(RELINK) $(TARGET_RECOVERY_ROOT_OUT)/sbin $(RELINK_SOURCE_FILES)
Dees_Troy51a0e822012-09-05 15:24:24 -0400399
400LOCAL_GENERATED_SOURCES := $(GEN)
401LOCAL_SRC_FILES := teamwin $(GEN)
402include $(BUILD_PREBUILT)
403
Ethan Yonkerc798c9c2015-10-09 11:15:26 -0500404#permissive.sh
405include $(CLEAR_VARS)
406LOCAL_MODULE := permissive.sh
407LOCAL_MODULE_TAGS := eng
408LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
409LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
410LOCAL_SRC_FILES := $(LOCAL_MODULE)
411include $(BUILD_PREBUILT)
412
Dees_Troy51a0e822012-09-05 15:24:24 -0400413#mke2fs.conf
Michael Bestas9bb7c222018-07-13 23:12:29 +0300414ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 26; echo $$?),0)
415 include $(CLEAR_VARS)
416 LOCAL_MODULE := mke2fs.conf
417 LOCAL_MODULE_TAGS := eng
418 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
419 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/etc
420 LOCAL_SRC_FILES := $(LOCAL_MODULE)
421 include $(BUILD_PREBUILT)
422endif
Dees_Troy51a0e822012-09-05 15:24:24 -0400423
424ifeq ($(BOARD_HAS_NO_REAL_SDCARD),)
Ethan Yonker483e9f42016-01-11 22:21:18 -0600425 ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0)
426 #prebuilt, static sgdisk
427 include $(CLEAR_VARS)
428 LOCAL_MODULE := sgdisk_static
429 LOCAL_MODULE_STEM := sgdisk
430 LOCAL_MODULE_TAGS := eng
431 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
432 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
433 LOCAL_SRC_FILES := $(LOCAL_MODULE)
434 include $(BUILD_PREBUILT)
435 endif
Dees_Troy51a0e822012-09-05 15:24:24 -0400436 #parted
Ethan Yonker483e9f42016-01-11 22:21:18 -0600437 #include $(CLEAR_VARS)
438 #LOCAL_MODULE := parted
439 #LOCAL_MODULE_TAGS := eng
440 #LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
441 #LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
442 #LOCAL_SRC_FILES := $(LOCAL_MODULE)
443 #include $(BUILD_PREBUILT)
Dees_Troy51a0e822012-09-05 15:24:24 -0400444endif
445
Dees_Troy83bd4832013-05-04 12:39:56 +0000446# copy license file for OpenAES
447ifneq ($(TW_EXCLUDE_ENCRYPTED_BACKUPS), true)
448 include $(CLEAR_VARS)
Ethan Yonker34ae4832016-08-24 15:32:18 -0500449 LOCAL_MODULE := openaes_license
Dees_Troy83bd4832013-05-04 12:39:56 +0000450 LOCAL_MODULE_TAGS := eng
451 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
452 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/license/openaes
Ethan Yonker34ae4832016-08-24 15:32:18 -0500453 LOCAL_SRC_FILES := ../openaes/LICENSE
Dees_Troy83bd4832013-05-04 12:39:56 +0000454 include $(BUILD_PREBUILT)
455endif
456
Dees_Troy51a0e822012-09-05 15:24:24 -0400457ifeq ($(TW_INCLUDE_DUMLOCK), true)
458 #htcdumlock for /system for dumlock
459 include $(CLEAR_VARS)
460 LOCAL_MODULE := htcdumlocksys
461 LOCAL_MODULE_TAGS := eng
462 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
Dees Troy3454ade2015-01-20 19:21:04 +0000463 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)$(TWHTCD_PATH)
Dees_Troy51a0e822012-09-05 15:24:24 -0400464 LOCAL_SRC_FILES := $(LOCAL_MODULE)
465 include $(BUILD_PREBUILT)
466
467 #flash_image for /system for dumlock
468 include $(CLEAR_VARS)
469 LOCAL_MODULE := flash_imagesys
470 LOCAL_MODULE_TAGS := eng
471 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
Dees Troy3454ade2015-01-20 19:21:04 +0000472 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)$(TWHTCD_PATH)
Dees_Troy51a0e822012-09-05 15:24:24 -0400473 LOCAL_SRC_FILES := $(LOCAL_MODULE)
474 include $(BUILD_PREBUILT)
475
476 #dump_image for /system for dumlock
477 include $(CLEAR_VARS)
478 LOCAL_MODULE := dump_imagesys
479 LOCAL_MODULE_TAGS := eng
480 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
Dees Troy3454ade2015-01-20 19:21:04 +0000481 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)$(TWHTCD_PATH)
Dees_Troy51a0e822012-09-05 15:24:24 -0400482 LOCAL_SRC_FILES := $(LOCAL_MODULE)
483 include $(BUILD_PREBUILT)
484
485 #libbmlutils for /system for dumlock
486 include $(CLEAR_VARS)
487 LOCAL_MODULE := libbmlutils.so
488 LOCAL_MODULE_TAGS := eng
489 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
Dees Troy3454ade2015-01-20 19:21:04 +0000490 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)$(TWHTCD_PATH)
Dees_Troy51a0e822012-09-05 15:24:24 -0400491 LOCAL_SRC_FILES := $(LOCAL_MODULE)
492 include $(BUILD_PREBUILT)
493
494 #libflashutils for /system for dumlock
495 include $(CLEAR_VARS)
496 LOCAL_MODULE := libflashutils.so
497 LOCAL_MODULE_TAGS := eng
498 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
Dees Troy3454ade2015-01-20 19:21:04 +0000499 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)$(TWHTCD_PATH)
Dees_Troy51a0e822012-09-05 15:24:24 -0400500 LOCAL_SRC_FILES := $(LOCAL_MODULE)
501 include $(BUILD_PREBUILT)
502
503 #libmmcutils for /system for dumlock
504 include $(CLEAR_VARS)
505 LOCAL_MODULE := libmmcutils.so
506 LOCAL_MODULE_TAGS := eng
507 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
Dees Troy3454ade2015-01-20 19:21:04 +0000508 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)$(TWHTCD_PATH)
Dees_Troy51a0e822012-09-05 15:24:24 -0400509 LOCAL_SRC_FILES := $(LOCAL_MODULE)
510 include $(BUILD_PREBUILT)
511
512 #libmtdutils for /system for dumlock
513 include $(CLEAR_VARS)
514 LOCAL_MODULE := libmtdutils.so
515 LOCAL_MODULE_TAGS := eng
516 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
Dees Troy3454ade2015-01-20 19:21:04 +0000517 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)$(TWHTCD_PATH)
Dees_Troy51a0e822012-09-05 15:24:24 -0400518 LOCAL_SRC_FILES := $(LOCAL_MODULE)
519 include $(BUILD_PREBUILT)
520
521 #HTCDumlock.apk
522 include $(CLEAR_VARS)
523 LOCAL_MODULE := HTCDumlock.apk
524 LOCAL_MODULE_TAGS := eng
525 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
Dees Troy3454ade2015-01-20 19:21:04 +0000526 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)$(TWHTCD_PATH)
Dees_Troy51a0e822012-09-05 15:24:24 -0400527 LOCAL_SRC_FILES := $(LOCAL_MODULE)
528 include $(BUILD_PREBUILT)
529endif
Dees_Troy6ef66352013-02-21 08:26:57 -0600530
Captain Throwback5ab59642019-02-07 17:22:49 -0500531ifeq ($(TW_USE_TOOLBOX), true)
532 include $(CLEAR_VARS)
533 LOCAL_MODULE := mkshrc_twrp
534 LOCAL_MODULE_TAGS := eng
535 LOCAL_MODULE_CLASS := ETC
536 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/etc
537 LOCAL_SRC_FILES := $(LOCAL_MODULE)
538 LOCAL_POST_INSTALL_CMD := \
539 $(hide) mv $(TARGET_RECOVERY_ROOT_OUT)/etc/mkshrc_twrp $(TARGET_RECOVERY_ROOT_OUT)/etc/mkshrc
540 include $(BUILD_PREBUILT)
541endif
542
Ethan Yonkerb4bff5e2016-12-16 07:47:58 -0600543#TWRP App "placeholder"
544include $(CLEAR_VARS)
545LOCAL_MODULE := me.twrp.twrpapp.apk
546LOCAL_MODULE_TAGS := eng
547LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
548LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
549LOCAL_SRC_FILES := $(LOCAL_MODULE)
550include $(BUILD_PREBUILT)
nijel82c821a82018-12-29 04:56:41 -0500551
552ifeq ($(TW_INCLUDE_CRYPTO), true)
553 ifneq ($(TW_CRYPTO_USE_SYSTEM_VOLD),)
554 ifneq ($(shell test $(PLATFORM_SDK_VERSION) -ge 28; echo $$?),0)
555 # Prebuilt vdc_pie for pre-Pie SDK Platforms
556 include $(CLEAR_VARS)
557 LOCAL_MODULE := vdc_pie
558 LOCAL_MODULE_TAGS := eng
559 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
560 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
561 LOCAL_SRC_FILES := vdc_pie-$(TARGET_ARCH)
562 include $(BUILD_PREBUILT)
563 endif
564 endif
565endif
Ethan Yonker53796e72019-01-11 22:49:52 -0600566
567ifeq ($(TW_INCLUDE_REPACKTOOLS), true)
568 ifeq ($(wildcard external/magisk-prebuilt/Android.mk),)
569 $(warning Magisk repacking tools not found!)
570 $(warning Please place https://github.com/TeamWin/external_magisk-prebuilt)
571 $(warning into external/magisk-prebuilt)
572 $(error magiskboot prebuilts not present; exiting)
573 endif
574endif