blob: 07687ad127589bc29acf41be8b2e3fef68430b57 [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
theimpulsond95dcd22020-03-23 18:27:29 +00009LOCAL_MODULE_TAGS := optional
Dees_Troy51a0e822012-09-05 15:24:24 -040010LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
bigbiffad58e1b2020-07-06 20:24:34 -040011LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/
Dees_Troy51a0e822012-09-05 15:24:24 -040012
Matt Mowerfb1c4ff2014-04-16 13:43:36 -050013# Manage list
bigbiffad58e1b2020-07-06 20:24:34 -040014RECOVERY_BINARY_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/system/bin/dump_image
15RECOVERY_BINARY_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/system/bin/flash_image
16RECOVERY_BINARY_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/system/bin/erase_image
17RECOVERY_BINARY_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/system/bin/bu
bigbiff416fe3a2020-03-28 13:46:48 -040018
bigbiffad58e1b2020-07-06 20:24:34 -040019RECOVERY_BINARY_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/system/bin/sh
20
21LOCAL_POST_INSTALL_CMD += $(hide) if [ -e "$(TARGET_RECOVERY_ROOT_OUT)/system/bin/egrep" ]; then \
22 rm $(TARGET_RECOVERY_ROOT_OUT)/system/bin/egrep; fi; ln -s $(TARGET_RECOVERY_ROOT_OUT)/system/bin/grep $(TARGET_RECOVERY_ROOT_OUT)/system/bin/egrep; \
23 if [ -e "$(TARGET_RECOVERY_ROOT_OUT)/system/bin/fgrep" ]; then \
24 rm $(TARGET_RECOVERY_ROOT_OUT)/system/bin/fgrep; fi; ln -s $(TARGET_RECOVERY_ROOT_OUT)/system/bin/grep $(TARGET_RECOVERY_ROOT_OUT)/system/bin/fgrep;
25
26ifneq ($(wildcard external/zip/Android.mk),)
27 RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_OPTIONAL_EXECUTABLES)/zip
bigbiff416fe3a2020-03-28 13:46:48 -040028endif
bigbiffad58e1b2020-07-06 20:24:34 -040029ifneq ($(wildcard external/unzip/Android.mk),)
30 RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_OPTIONAL_EXECUTABLES)/unzip
31endif
32ifneq ($(wildcard system/core/libziparchive/Android.bp),)
33 RECOVERY_BINARY_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/system/bin/unzip
34endif
35ifneq ($(wildcard external/one-true-awk/Android.bp),)
36 RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/awk
Ethan Yonker5c933692014-04-04 11:26:32 -050037endif
bigbiff416fe3a2020-03-28 13:46:48 -040038
bigbiffad58e1b2020-07-06 20:24:34 -040039RECOVERY_BINARY_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/system/bin/adbd
40RECOVERY_BINARY_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/system/bin/fastbootd
41RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/e2fsck
42RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/e2fsdroid
43RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/mke2fs
44RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/tune2fs
45RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/resize2fs
46
bigbiff bigbiffc7eee6f2014-09-02 18:59:01 -040047#RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/twrpmtp
bigbiffad58e1b2020-07-06 20:24:34 -040048RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/system/lib64/android.hardware.fastboot@1.0.so
49RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/system/lib64/android.hardware.health@1.0.so
50RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/system/lib64/android.hardware.health@2.0.so
51RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/system/lib64/ld-android.so
52RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/system/lib64/libc.so
53RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/system/lib64/libdl.so
54RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/system/lib64/libm.so
55RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/system/lib64/libfs_mgr.so
56RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/system/lib64/libfscrypt.so
57RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/system/lib64/libgsi.so
58RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/system/lib64/libkeyutils.so
59RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/system/lib64/liblogwrap.so
60RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/system/lib64/liblp.so
61RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/system/lib64/libprocessgroup.so
62RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/system/lib64/libprocessgroup_setup.so
63RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/system/lib64/libadbd.so
64RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/system/lib64/libadbd_services.so
65RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/system/lib64/libcap.so
66RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/system/lib64/libminijail.so
67RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/system/lib64/libunwindstack.so
68RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/system/lib64/libasyncio.so
69RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/system/lib64/libbinderthreadstate.so
70RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/system/lib64/libmdnssd.so
Captain Throwback12673e22020-10-20 11:46:39 -040071RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libinit.so
72RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libdl_android.so
73RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libprotobuf-cpp-lite.so
74RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libbinder.so
75RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libchrome.so
76RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libevent.so
77RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/keystore
78RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/keystore_cli_v2
79RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/hwservicemanager
80RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/servicemanager
81RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/vold_prepare_subdirs
Captain Throwback49df5472020-10-19 11:13:53 -040082RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_VENDOR_EXECUTABLES)/hw/android.hardware.boot@1.0-service
Captain Throwback12673e22020-10-20 11:46:39 -040083RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_VENDOR_EXECUTABLES)/vndservicemanager
84RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/toybox
bigbiffdf8436b2020-08-30 16:22:34 -040085RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_VENDOR_EXECUTABLES)/hw/android.hardware.health@2.0-service
bigbiff20edca82020-07-03 09:55:28 -040086RECOVERY_BINARY_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/system/bin/charger
bigbiffad58e1b2020-07-06 20:24:34 -040087RECOVERY_BINARY_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/system/bin/ueventd
88RECOVERY_BINARY_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/system/bin/watchdogd
bigbiff1f9e4842020-10-31 11:33:15 -040089RECOVERY_BINARY_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/system/bin/minadbd
bigbiffad58e1b2020-07-06 20:24:34 -040090
91RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcutils.so
92RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrecovery.so
93RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libusbhost.so
94RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libutils.so
95RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_com_err.so
96RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_e2p.so
97RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2fs.so
98RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_profile.so
99RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_uuid.so
100RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_misc.so
Ethan Yonker38c2ff82014-12-09 13:42:10 -0600101ifneq ($(wildcard external/e2fsprogs/lib/quota/Android.mk),)
bigbiffad58e1b2020-07-06 20:24:34 -0400102 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_quota.so
Ethan Yonker38c2ff82014-12-09 13:42:10 -0600103endif
Ethan Yonkerfefe5912017-09-30 22:22:13 -0500104ifneq ($(wildcard external/e2fsprogs/lib/ext2fs/Android.*),)
bigbiffad58e1b2020-07-06 20:24:34 -0400105 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2fs.so
Ethan Yonkerbcff1462015-01-04 22:01:33 -0600106endif
Ethan Yonkerfefe5912017-09-30 22:22:13 -0500107ifneq ($(wildcard external/e2fsprogs/lib/blkid/Android.*),)
bigbiffad58e1b2020-07-06 20:24:34 -0400108 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_blkid.so
Ethan Yonkerbcff1462015-01-04 22:01:33 -0600109endif
bigbiffad58e1b2020-07-06 20:24:34 -0400110RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libpng.so
111RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/liblog.so
112RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libstdc++.so
113RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libminuitwrp.so
114RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libminadbd.so
115RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libz.so
116RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libmtdutils.so
117RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libtar.so
118RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libtwadbbu.so
119RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libtwrpdigest.so
120RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libutil-linux.so
121RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libblkid.so
122RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libmmcutils.so
123RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libbmlutils.so
124RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libflashutils.so
125RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libfusesideload.so
bigbiffdf8436b2020-08-30 16:22:34 -0400126RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libbootloader_message.so
D. Andrei Măceșb29a5e22016-12-22 06:19:44 -0500127
bigbiffad58e1b2020-07-06 20:24:34 -0400128RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrypto.so \
129$(if $(WITH_CRYPTO_UTILS),$(TARGET_OUT_SHARED_LIBRARIES)/libcrypto_utils.so)
bigbiffdf8436b2020-08-30 16:22:34 -0400130
bigbiffad58e1b2020-07-06 20:24:34 -0400131RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/system/lib64/libbacktrace.so
132RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libunwind.so
133RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libbase.so
134RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libc++.so
135RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libnetd_client.so
136
Captain Throwback12673e22020-10-20 11:46:39 -0400137RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/toolbox
bigbiffad58e1b2020-07-06 20:24:34 -0400138
bigbiff bigbiffaf32bb92018-12-18 18:39:53 -0500139
Ethan Yonker03a42f62014-08-08 11:03:51 -0500140ifneq ($(TW_OEM_BUILD),true)
bigbiffad58e1b2020-07-06 20:24:34 -0400141 RECOVERY_BINARY_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/system/bin/twrp
bigbiff bigbiffc7eee6f2014-09-02 18:59:01 -0400142else
143 TW_EXCLUDE_MTP := true
144endif
bigbiff bigbiffaf32bb92018-12-18 18:39:53 -0500145
bigbiffad58e1b2020-07-06 20:24:34 -0400146RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libtwrpmtp-ffs.so
147RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext4_utils.so
148RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libaosprecovery.so
Greg Wallaceace76232016-01-27 17:15:51 -0500149ifneq ($(TW_INCLUDE_JPEG),)
bigbiffad58e1b2020-07-06 20:24:34 -0400150 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libjpeg.so
Greg Wallaceace76232016-01-27 17:15:51 -0500151endif
bigbiffad58e1b2020-07-06 20:24:34 -0400152RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libselinux.so
153
Dees_Troyb05ddee2013-01-28 20:24:50 +0000154ifneq ($(TW_NO_EXFAT), true)
bigbiffad58e1b2020-07-06 20:24:34 -0400155 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libexfat_twrp.so
Dees Troyb4bd6972014-10-09 18:47:00 +0000156else
Captain Throwback6a1acf22014-09-18 12:46:35 -0400157 TW_NO_EXFAT_FUSE := true
158endif
bigbiffad58e1b2020-07-06 20:24:34 -0400159
Dees_Troy51a0e822012-09-05 15:24:24 -0400160ifeq ($(TW_INCLUDE_CRYPTO), true)
Captain Throwback12673e22020-10-20 11:46:39 -0400161 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcryptfsfde.so
162 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libdexfile_support.so
163 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libf2fs_sparseblock.so
164 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libhardware.so
165 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/android.hardware.authsecret@1.0.so
166 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/android.hardware.oemlock@1.0.so
167 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_VENDOR_SHARED_LIBRARIES)/libnos_transport.so
168 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_VENDOR_SHARED_LIBRARIES)/libnos_datagram.so
bigbiffad58e1b2020-07-06 20:24:34 -0400169 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/android.hardware.keymaster@3.0.so
170 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libgpt_twrp.so
Dees Troyc657cc02015-01-16 22:48:47 +0000171 ifeq ($(TARGET_HW_DISK_ENCRYPTION),true)
Ethan Yonkerdcd9f3f2017-06-05 09:23:34 -0500172 ifeq ($(TARGET_CRYPTFS_HW_PATH),)
bigbiffad58e1b2020-07-06 20:24:34 -0400173 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_VENDOR_SHARED_LIBRARIES)/libcryptfs_hw.so
Ethan Yonkerdcd9f3f2017-06-05 09:23:34 -0500174 else
bigbiffad58e1b2020-07-06 20:24:34 -0400175 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcryptfs_hw.so
Ethan Yonkerdcd9f3f2017-06-05 09:23:34 -0500176 endif
Dees Troyc657cc02015-01-16 22:48:47 +0000177 endif
Ethan Yonkerbd7492d2016-12-07 13:55:01 -0600178 # FBE files
179 ifeq ($(TW_INCLUDE_CRYPTO_FBE), true)
Captain Throwback12673e22020-10-20 11:46:39 -0400180 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libtwrpfscrypt.so
bigbiffad58e1b2020-07-06 20:24:34 -0400181 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libgatekeeper.so
182 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libkeymaster_messages.so
183 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libkeystore_binder.so
184 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libbinder.so
185 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libprotobuf-cpp-lite.so
186 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libsoftkeymasterdevice.so
187 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/android.hardware.gatekeeper@1.0.so
bigbiffad58e1b2020-07-06 20:24:34 -0400188 RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/avbctl
189 RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/keystore
190 RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/keystore_cli
bigbiffad58e1b2020-07-06 20:24:34 -0400191 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/android.system.wifi.keystore@1.0.so
192 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/android.hardware.vibrator@1.0.so
193 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/android.hardware.vibrator@1.1.so
194 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/android.hardware.vibrator@1.2.so
Mohd Farazbc576cd2020-05-30 21:06:32 +0530195
bigbiffad58e1b2020-07-06 20:24:34 -0400196 ifneq ($(wildcard system/keymaster/keymaster_stl.cpp),)
197 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libkeymaster_portable.so
198 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libkeymaster_staging.so
Ethan Yonkerfefe5912017-09-30 22:22:13 -0500199 endif
bigbiffad58e1b2020-07-06 20:24:34 -0400200 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libwifikeystorehal.so
201 ifneq ($(wildcard hardware/interfaces/weaver/Android.bp),)
202 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/android.hardware.weaver@1.0.so
Ethan Yonker58f21322018-08-24 11:17:36 -0500203 endif
bigbiffad58e1b2020-07-06 20:24:34 -0400204 ifneq ($(wildcard hardware/interfaces/weaver/1.0/Android.bp),)
205 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/android.hardware.weaver@1.0.so
206 endif
207 ifneq ($(wildcard hardware/interfaces/confirmationui/1.0/Android.bp),)
208 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/android.hardware.confirmationui@1.0.so
209 endif
210 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libsoftkeymaster.so
211 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/android.hardware.keymaster@4.0.so
212 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libkeymaster4support.so
213 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libkeystore_aidl.so
214 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libkeystore_parcelables.so
215 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libutilscallstack.so
216 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libdexfile.so
217 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libservices.so
218 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libkeymaster_portable.so
Ethan Yonker93382822018-11-01 15:25:31 -0500219 # lshal can be useful for seeing if you have things like the keymaster working properly, but it isn't needed for TWRP to work
bigbiffad58e1b2020-07-06 20:24:34 -0400220 #RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/lshal
221 #RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/liblshal.so
222 #RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libssl.so
223 #RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libhidl-gen-hash.so
Ethan Yonkerbd7492d2016-12-07 13:55:01 -0600224 endif
Ethan Yonker4eca40d2014-11-11 14:52:28 -0600225endif
Ethan Yonker1b190162016-12-05 15:25:19 -0600226ifeq ($(AB_OTA_UPDATER), true)
bigbiffad58e1b2020-07-06 20:24:34 -0400227 RECOVERY_BINARY_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/system/bin/update_engine_sideload
228 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/android.hardware.boot@1.0.so
229 RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/bootctl
Ethan Yonker1b190162016-12-05 15:25:19 -0600230endif
bigbiffad58e1b2020-07-06 20:24:34 -0400231
Ethan Yonkerfefe5912017-09-30 22:22:13 -0500232ifneq ($(wildcard system/core/libsparse/Android.*),)
bigbiffad58e1b2020-07-06 20:24:34 -0400233 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libsparse.so
Dees_Troy4546fe72013-01-10 14:33:27 +0000234endif
Dees_Troy83bd4832013-05-04 12:39:56 +0000235ifneq ($(TW_EXCLUDE_ENCRYPTED_BACKUPS), true)
bigbiffad58e1b2020-07-06 20:24:34 -0400236 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libopenaes.so
Dees_Troy83bd4832013-05-04 12:39:56 +0000237endif
Dees_Troye5017042013-08-29 16:38:55 +0000238ifeq ($(TARGET_USERIMAGES_USE_F2FS), true)
bigbiffad58e1b2020-07-06 20:24:34 -0400239 RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/make_f2fs
Captain Throwback57db2cc2020-09-09 15:38:13 -0400240 RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/fsck.f2fs
bigbiffad58e1b2020-07-06 20:24:34 -0400241 RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/sload_f2fs
Dees_Troye5017042013-08-29 16:38:55 +0000242endif
Ethan Yonkerfefe5912017-09-30 22:22:13 -0500243ifneq ($(wildcard system/core/reboot/Android.*),)
bigbiffad58e1b2020-07-06 20:24:34 -0400244 RECOVERY_BINARY_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/system/bin/reboot
Dees Troy0226cd52013-11-04 14:12:35 +0000245endif
Vojtech Bocek76ee9032014-09-07 15:01:56 +0200246ifneq ($(TW_DISABLE_TTF), true)
bigbiffad58e1b2020-07-06 20:24:34 -0400247 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libft2.so
Vojtech Bocek76ee9032014-09-07 15:01:56 +0200248endif
bigbiffad58e1b2020-07-06 20:24:34 -0400249ifneq ($(TW_RECOVERY_ADDITIONAL_RELINK_BINARY_FILES),)
250 RECOVERY_BINARY_SOURCE_FILES += $(TW_RECOVERY_ADDITIONAL_RELINK_BINARY_FILES)
251endif
252ifneq ($(TW_RECOVERY_ADDITIONAL_RELINK_LIBRARY_FILES),)
253 RECOVERY_LIBRARY_SOURCE_FILES += $(TW_RECOVERY_ADDITIONAL_RELINK_LIBRARY_FILES)
Ethan Yonker0e678372014-11-18 12:17:06 -0600254endif
Dees Troye176a652015-01-20 19:35:21 +0000255ifneq ($(wildcard external/pcre/Android.mk),)
bigbiffad58e1b2020-07-06 20:24:34 -0400256 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libpcre.so
Dees Troye176a652015-01-20 19:35:21 +0000257endif
Ethan Yonkerb81d9052015-07-09 13:20:53 -0500258ifeq ($(TW_INCLUDE_NTFS_3G),true)
bigbiffad58e1b2020-07-06 20:24:34 -0400259 RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/mount.ntfs
260 RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/fsck.ntfs
261 RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/mkfs.ntfs
262 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libntfs-3g.so
263 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libfuse-lite.so
Greg Wallaceb39e6c62015-12-29 00:55:26 -0500264else
bigbiffad58e1b2020-07-06 20:24:34 -0400265 RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/ntfs-3g
266 RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/ntfsfix
267 RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/mkntfs
Greg Wallaceb39e6c62015-12-29 00:55:26 -0500268endif
Ethan Yonker483e9f42016-01-11 22:21:18 -0600269ifeq ($(BOARD_HAS_NO_REAL_SDCARD),)
bigbiffad58e1b2020-07-06 20:24:34 -0400270 RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/sgdisk
Ethan Yonker483e9f42016-01-11 22:21:18 -0600271endif
Captain Throwback1f127752016-01-19 17:30:20 -0500272ifeq ($(TWRP_INCLUDE_LOGCAT), true)
Captain Throwback12673e22020-10-20 11:46:39 -0400273 RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/logcat
Ethan Yonkere5a288c2016-02-15 09:23:57 -0600274 ifeq ($(TARGET_USES_LOGD), true)
Captain Throwback12673e22020-10-20 11:46:39 -0400275 RECOVERY_BINARY_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/logd
bigbiffad58e1b2020-07-06 20:24:34 -0400276 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libsysutils.so
277 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libnl.so
Ethan Yonkere5a288c2016-02-15 09:23:57 -0600278 endif
bigbiffad58e1b2020-07-06 20:24:34 -0400279 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libpcrecpp.so
280 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/liblogcat.so
281 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcap.so
Captain Throwback1f127752016-01-19 17:30:20 -0500282endif
bigbiffad58e1b2020-07-06 20:24:34 -0400283RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libvndksupport.so
284RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libhidlbase.so
285RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libhidltransport.so
286RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/android.frameworks.stats@1.0.so
287RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libziparchive.so
288RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_blkid.so
289RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_quota.so
290RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libhidl-gen-utils.so
291RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libvintf.so
292RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libtinyxml2.so
293RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/android.hidl.token@1.0.so
294ifneq ($(wildcard system/core/libkeyutils/Android.bp),)
295 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libkeyutils.so
Ethan Yonker8373cfe2017-09-08 06:50:54 -0500296endif
bigbiffad58e1b2020-07-06 20:24:34 -0400297ifeq ($(wildcard system/libhidl/transport/HidlTransportUtils.cpp),)
298 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/android.hidl.base@1.0.so
Ethan Yonker58f21322018-08-24 11:17:36 -0500299endif
bigbiffad58e1b2020-07-06 20:24:34 -0400300ifeq ($(TARGET_ARCH), arm64)
301 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libclang_rt.ubsan_standalone-aarch64-android.so
302endif
303ifeq ($(TARGET_ARCH), arm)
304 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libclang_rt.ubsan_standalone-arm-android.so
305endif
306ifeq ($(TARGET_ARCH), x86_64)
307 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libclang_rt.ubsan_standalone-x86_64-android.so
308endif
309ifeq ($(TARGET_ARCH), x86)
310 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libclang_rt.ubsan_standalone-i686-android.so
311endif
312ifeq ($(TARGET_ARCH), mips)
313 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libclang_rt.ubsan_standalone-mips-android.so
314endif
315ifeq ($(TARGET_ARCH), mips64)
316 RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libclang_rt.ubsan_standalone-mips64-android.so
317endif
318RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/liblogwrap.so
319RECOVERY_LIBRARY_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_misc.so
Ethan Yonker58f21322018-08-24 11:17:36 -0500320
Ethan Yonkerc798c9c2015-10-09 11:15:26 -0500321include $(CLEAR_VARS)
bigbiffad58e1b2020-07-06 20:24:34 -0400322LOCAL_MODULE := relink_libraries
bigbiffd58ba182020-03-23 10:02:29 -0400323LOCAL_MODULE_TAGS := optional
Ethan Yonkerc798c9c2015-10-09 11:15:26 -0500324LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
bigbiffad58e1b2020-07-06 20:24:34 -0400325LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/
326LOCAL_POST_INSTALL_CMD += $(RELINK) $(TARGET_RECOVERY_ROOT_OUT)/system/lib64 $(RECOVERY_LIBRARY_SOURCE_FILES)
327TARGET_LIBRARY_RELINK_FILES := $(notdir $(RECOVERY_LIBRARY_SOURCE_FILES))
328TARGET_BASE_LIBRARY_RELINK_MODULES := $(basename $(TARGET_LIBRARY_RELINK_FILES))
329TARGET_RELINK_LIBRARY_MODULES := $(filter-out libdexfile, $(TARGET_BASE_LIBRARY_RELINK_MODULES))
330LOCAL_REQUIRED_MODULES += $(TARGET_RELINK_LIBRARY_MODULES)
bigbiffd58ba182020-03-23 10:02:29 -0400331include $(BUILD_PHONY_PACKAGE)
332
bigbiffad58e1b2020-07-06 20:24:34 -0400333
334include $(CLEAR_VARS)
335LOCAL_MODULE := relink_binaries
336LOCAL_MODULE_TAGS := optional
337LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
338LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/
339LOCAL_POST_INSTALL_CMD += $(RELINK) $(TARGET_RECOVERY_ROOT_OUT)/system/bin $(RECOVERY_BINARY_SOURCE_FILES)
Mohd Faraza791d122020-09-27 16:06:42 +0530340TARGET_BINARY_RELINK_FILES := $(filter-out bu, $(notdir $(RECOVERY_BINARY_SOURCE_FILES)))
bigbiffad58e1b2020-07-06 20:24:34 -0400341LOCAL_REQUIRED_MODULES += $(TARGET_BINARY_RELINK_FILES)
342include $(BUILD_PHONY_PACKAGE)
343
344#build out TWRP ramdisk
bigbiffd58ba182020-03-23 10:02:29 -0400345include $(CLEAR_VARS)
bigbiff7ba75002020-04-11 20:47:09 -0400346LOCAL_MODULE := twrp_ramdisk
bigbiffd58ba182020-03-23 10:02:29 -0400347LOCAL_MODULE_TAGS := optional
348LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
349LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)
bigbiffad58e1b2020-07-06 20:24:34 -0400350LOCAL_POST_INSTALL_CMD += \
351 mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/sbin; ln -sf /system/bin/sh $(TARGET_RECOVERY_ROOT_OUT)/sbin/sh && \
bigbiff7ba75002020-04-11 20:47:09 -0400352 mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/system/etc/selinux/ && \
Captain Throwback8bd1ac52020-10-19 13:09:17 -0400353 mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/vendor/etc/selinux/ && \
354 cp $(TARGET_OUT_ETC)/selinux/plat_service_contexts $(TARGET_RECOVERY_ROOT_OUT)/system/etc/selinux/plat_service_contexts && \
355 cp $(TARGET_OUT_ETC)/selinux/plat_hwservice_contexts $(TARGET_RECOVERY_ROOT_OUT)/system/etc/selinux/plat_hwservice_contexts && \
356 cp $(TARGET_OUT_VENDOR_ETC)/selinux/vndservice_contexts $(TARGET_RECOVERY_ROOT_OUT)/vendor/etc/selinux/vndservice_contexts && \
357 cp $(TARGET_OUT_VENDOR_ETC)/selinux/vendor_hwservice_contexts $(TARGET_RECOVERY_ROOT_OUT)/vendor/etc/selinux/vendor_hwservice_contexts
358 ifeq ($(TARGET_USES_MKE2FS), true)
359 LOCAL_POST_INSTALL_CMD += \
360 && cp $(TARGET_OUT_ETC)/mke2fs.conf $(TARGET_RECOVERY_ROOT_OUT)/system/etc/mke2fs.conf
361 endif
bigbiffad58e1b2020-07-06 20:24:34 -0400362LOCAL_REQUIRED_MODULES += init_second_stage.recovery reboot.recovery plat_service_contexts plat_hardware_contexts vndservice_contexts
bigbiffd58ba182020-03-23 10:02:29 -0400363include $(BUILD_PHONY_PACKAGE)
Ethan Yonkerc798c9c2015-10-09 11:15:26 -0500364
Dees_Troy83bd4832013-05-04 12:39:56 +0000365# copy license file for OpenAES
366ifneq ($(TW_EXCLUDE_ENCRYPTED_BACKUPS), true)
bigbiffad58e1b2020-07-06 20:24:34 -0400367 include $(CLEAR_VARS)
368 LOCAL_MODULE := openaes_license
369 LOCAL_MODULE_TAGS := optional
370 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
371 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/license/openaes
372 LOCAL_SRC_FILES := ../openaes/LICENSE
373 include $(BUILD_PREBUILT)
Dees_Troy83bd4832013-05-04 12:39:56 +0000374endif
375
Dees_Troy51a0e822012-09-05 15:24:24 -0400376ifeq ($(TW_INCLUDE_DUMLOCK), true)
bigbiffad58e1b2020-07-06 20:24:34 -0400377 #htcdumlock for /system for dumlock
378 include $(CLEAR_VARS)
379 LOCAL_MODULE := htcdumlocksys
380 LOCAL_MODULE_TAGS := optional
381 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
382 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)$(TWHTCD_PATH)
383 LOCAL_SRC_FILES := $(LOCAL_MODULE)
384 include $(BUILD_PREBUILT)
Dees_Troy51a0e822012-09-05 15:24:24 -0400385
bigbiffad58e1b2020-07-06 20:24:34 -0400386 #flash_image for /system for dumlock
387 include $(CLEAR_VARS)
388 LOCAL_MODULE := flash_imagesys
389 LOCAL_MODULE_TAGS := optional
390 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
391 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)$(TWHTCD_PATH)
392 LOCAL_SRC_FILES := $(LOCAL_MODULE)
393 include $(BUILD_PREBUILT)
Dees_Troy51a0e822012-09-05 15:24:24 -0400394
bigbiffad58e1b2020-07-06 20:24:34 -0400395 #dump_image for /system for dumlock
396 include $(CLEAR_VARS)
397 LOCAL_MODULE := dump_imagesys
398 LOCAL_MODULE_TAGS := optional
399 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
400 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)$(TWHTCD_PATH)
401 LOCAL_SRC_FILES := $(LOCAL_MODULE)
402 include $(BUILD_PREBUILT)
Dees_Troy51a0e822012-09-05 15:24:24 -0400403
bigbiffad58e1b2020-07-06 20:24:34 -0400404 #libbmlutils for /system for dumlock
405 include $(CLEAR_VARS)
406 LOCAL_MODULE := libbmlutils.so
407 LOCAL_MODULE_TAGS := optional
408 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
409 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)$(TWHTCD_PATH)
410 LOCAL_SRC_FILES := $(LOCAL_MODULE)
411 include $(BUILD_PREBUILT)
Dees_Troy51a0e822012-09-05 15:24:24 -0400412
bigbiffad58e1b2020-07-06 20:24:34 -0400413 #libflashutils for /system for dumlock
414 include $(CLEAR_VARS)
415 LOCAL_MODULE := libflashutils.so
416 LOCAL_MODULE_TAGS := optional
417 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
418 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)$(TWHTCD_PATH)
419 LOCAL_SRC_FILES := $(LOCAL_MODULE)
420 include $(BUILD_PREBUILT)
Dees_Troy51a0e822012-09-05 15:24:24 -0400421
bigbiffad58e1b2020-07-06 20:24:34 -0400422 #libmmcutils for /system for dumlock
423 include $(CLEAR_VARS)
424 LOCAL_MODULE := libmmcutils.so
425 LOCAL_MODULE_TAGS := optional
426 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
427 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)$(TWHTCD_PATH)
428 LOCAL_SRC_FILES := $(LOCAL_MODULE)
429 include $(BUILD_PREBUILT)
Dees_Troy51a0e822012-09-05 15:24:24 -0400430
bigbiffad58e1b2020-07-06 20:24:34 -0400431 #libmtdutils for /system for dumlock
432 include $(CLEAR_VARS)
433 LOCAL_MODULE := libmtdutils.so
434 LOCAL_MODULE_TAGS := optional
435 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
436 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)$(TWHTCD_PATH)
437 LOCAL_SRC_FILES := $(LOCAL_MODULE)
438 include $(BUILD_PREBUILT)
Dees_Troy51a0e822012-09-05 15:24:24 -0400439
bigbiffad58e1b2020-07-06 20:24:34 -0400440 #HTCDumlock.apk
441 include $(CLEAR_VARS)
442 LOCAL_MODULE := HTCDumlock.apk
443 LOCAL_MODULE_TAGS := optional
444 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
445 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)$(TWHTCD_PATH)
446 LOCAL_SRC_FILES := $(LOCAL_MODULE)
447 include $(BUILD_PREBUILT)
Dees_Troy51a0e822012-09-05 15:24:24 -0400448endif
Dees_Troy6ef66352013-02-21 08:26:57 -0600449
bigbiff416fe3a2020-03-28 13:46:48 -0400450ifeq ($(TW_USE_TOOLBOX), true)
451 include $(CLEAR_VARS)
452 LOCAL_MODULE := mkshrc_twrp
453 LOCAL_MODULE_STEM := mkshrc
454 LOCAL_MODULE_TAGS := optional
455 LOCAL_MODULE_CLASS := ETC
bigbiffad58e1b2020-07-06 20:24:34 -0400456 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/system/etc
bigbiff416fe3a2020-03-28 13:46:48 -0400457 LOCAL_SRC_FILES := $(LOCAL_MODULE)
458 include $(BUILD_PREBUILT)
459endif
Captain Throwback5ab59642019-02-07 17:22:49 -0500460
Ethan Yonkerb4bff5e2016-12-16 07:47:58 -0600461#TWRP App "placeholder"
462include $(CLEAR_VARS)
463LOCAL_MODULE := me.twrp.twrpapp.apk
theimpulsond95dcd22020-03-23 18:27:29 +0000464LOCAL_MODULE_TAGS := optional
Ethan Yonkerb4bff5e2016-12-16 07:47:58 -0600465LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
bigbiffad58e1b2020-07-06 20:24:34 -0400466LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/system/bin
Ethan Yonkerb4bff5e2016-12-16 07:47:58 -0600467LOCAL_SRC_FILES := $(LOCAL_MODULE)
468include $(BUILD_PREBUILT)
nijel82c821a82018-12-29 04:56:41 -0500469
Stefan Tauner6ad14572020-01-11 22:28:53 +0100470#TWRP App permissions for Android 9+
471include $(CLEAR_VARS)
472LOCAL_MODULE := privapp-permissions-twrpapp.xml
bigbifff654e842020-06-05 21:03:23 -0400473LOCAL_MODULE_TAGS := optional
Stefan Tauner6ad14572020-01-11 22:28:53 +0100474LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
bigbiffad58e1b2020-07-06 20:24:34 -0400475LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/system/bin
Stefan Tauner6ad14572020-01-11 22:28:53 +0100476LOCAL_SRC_FILES := $(LOCAL_MODULE)
477include $(BUILD_PREBUILT)
478
nijel82c821a82018-12-29 04:56:41 -0500479ifeq ($(TW_INCLUDE_CRYPTO), true)
480 ifneq ($(TW_CRYPTO_USE_SYSTEM_VOLD),)
bigbiffad58e1b2020-07-06 20:24:34 -0400481 # Prebuilt vdc_pie for pre-Pie SDK Platforms
482 include $(CLEAR_VARS)
483 LOCAL_MODULE := vdc_pie
484 LOCAL_MODULE_TAGS := optional
485 LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES
486 LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/system/bin
487 LOCAL_SRC_FILES := vdc_pie-$(TARGET_ARCH)
488 include $(BUILD_PREBUILT)
nijel82c821a82018-12-29 04:56:41 -0500489 endif
490endif
Ethan Yonker53796e72019-01-11 22:49:52 -0600491
Chaosmaster461e39f2020-02-07 01:48:13 +0100492ifneq (,$(filter $(TW_INCLUDE_REPACKTOOLS) $(TW_INCLUDE_RESETPROP) $(TW_INCLUDE_LIBRESETPROP), true))
Ethan Yonker53796e72019-01-11 22:49:52 -0600493 ifeq ($(wildcard external/magisk-prebuilt/Android.mk),)
mauronofrio76ef9f32019-12-23 20:29:24 +0100494 $(warning Magisk prebuilt tools not found!)
Ethan Yonker53796e72019-01-11 22:49:52 -0600495 $(warning Please place https://github.com/TeamWin/external_magisk-prebuilt)
496 $(warning into external/magisk-prebuilt)
497 $(error magiskboot prebuilts not present; exiting)
498 endif
499endif