Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 1 | LOCAL_PATH := $(call my-dir) |
| 2 | |
| 3 | RELINK := $(LOCAL_PATH)/relink.sh |
| 4 | |
| 5 | #dummy file to trigger required modules |
| 6 | include $(CLEAR_VARS) |
| 7 | LOCAL_MODULE := teamwin |
| 8 | LOCAL_MODULE_TAGS := eng |
| 9 | LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES |
| 10 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin |
| 11 | |
Matt Mower | fb1c4ff | 2014-04-16 13:43:36 -0500 | [diff] [blame] | 12 | # Manage list |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 13 | RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/dump_image |
| 14 | RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/flash_image |
| 15 | RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/erase_image |
Ethan Yonker | 5c93369 | 2014-04-04 11:26:32 -0500 | [diff] [blame] | 16 | ifneq ($(TW_USE_TOOLBOX), true) |
| 17 | RELINK_SOURCE_FILES += $(TARGET_OUT_OPTIONAL_EXECUTABLES)/busybox |
| 18 | else |
Ethan Yonker | bcc502c | 2014-11-10 11:22:10 -0600 | [diff] [blame] | 19 | RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/sh |
| 20 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrypto.so |
Ethan Yonker | c798c9c | 2015-10-09 11:15:26 -0500 | [diff] [blame] | 21 | ifneq (,$(filter $(PLATFORM_SDK_VERSION), 23)) |
| 22 | RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/toybox |
dianlujitao | ce608ab | 2015-12-28 23:51:19 +0800 | [diff] [blame] | 23 | 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 Yonker | c798c9c | 2015-10-09 11:15:26 -0500 | [diff] [blame] | 29 | endif |
Ethan Yonker | 5c93369 | 2014-04-04 11:26:32 -0500 | [diff] [blame] | 30 | endif |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 31 | RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/pigz |
Matt Mower | 18794c8 | 2015-11-11 16:22:45 -0600 | [diff] [blame] | 32 | RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/fsck.fat |
| 33 | RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/fatlabel |
| 34 | RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/mkfs.fat |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 35 | RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/e2fsck |
| 36 | RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/mke2fs |
| 37 | RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/tune2fs |
Ethan Yonker | a271915 | 2015-05-28 09:44:41 -0500 | [diff] [blame] | 38 | RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/resize2fs |
Ethan Yonker | 4f6a976 | 2015-03-09 13:58:54 -0500 | [diff] [blame] | 39 | ifneq ($(TARGET_ARCH), x86_64) |
| 40 | RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/linker |
| 41 | endif |
| 42 | ifeq ($(TARGET_ARCH), x86_64) |
| 43 | RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/linker64 |
| 44 | endif |
Ethan Yonker | 1902c79 | 2014-12-03 16:48:36 -0600 | [diff] [blame] | 45 | ifeq ($(TARGET_ARCH), arm64) |
| 46 | RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/linker64 |
| 47 | endif |
bigbiff bigbiff | c7eee6f | 2014-09-02 18:59:01 -0400 | [diff] [blame] | 48 | #RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/twrpmtp |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 49 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libc.so |
| 50 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcutils.so |
Ethan Yonker | bcc502c | 2014-11-10 11:22:10 -0600 | [diff] [blame] | 51 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrecovery.so |
bigbiff bigbiff | c7eee6f | 2014-09-02 18:59:01 -0400 | [diff] [blame] | 52 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libusbhost.so |
bigbiff bigbiff | c7eee6f | 2014-09-02 18:59:01 -0400 | [diff] [blame] | 53 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libutils.so |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 54 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libdl.so |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 55 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_com_err.so |
| 56 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_e2p.so |
| 57 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2fs.so |
| 58 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_profile.so |
| 59 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_uuid.so |
Ethan Yonker | 38c2ff8 | 2014-12-09 13:42:10 -0600 | [diff] [blame] | 60 | ifneq ($(wildcard external/e2fsprogs/lib/quota/Android.mk),) |
| 61 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_quota.so |
| 62 | endif |
Ethan Yonker | bcff146 | 2015-01-04 22:01:33 -0600 | [diff] [blame] | 63 | ifneq ($(wildcard external/e2fsprogs/lib/ext2fs/Android.mk),) |
| 64 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2fs.so |
| 65 | endif |
| 66 | ifneq ($(wildcard external/e2fsprogs/lib/blkid/Android.mk),) |
| 67 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext2_blkid.so |
| 68 | endif |
Vojtech Bocek | 76ee903 | 2014-09-07 15:01:56 +0200 | [diff] [blame] | 69 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libpng.so |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 70 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/liblog.so |
| 71 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libm.so |
| 72 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libstdc++.so |
| 73 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libz.so |
Dees_Troy | 2673cec | 2013-04-02 20:22:16 +0000 | [diff] [blame] | 74 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libminuitwrp.so |
| 75 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libminadbd.so |
| 76 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libminzip.so |
| 77 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libmtdutils.so |
bigbiff bigbiff | 9c75405 | 2013-01-09 09:09:08 -0500 | [diff] [blame] | 78 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libtar.so |
bigbiff | 7b4c7a6 | 2015-01-01 19:44:14 -0500 | [diff] [blame] | 79 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libutil-linux.so |
Vojtech Bocek | 7cc278b | 2013-02-24 01:40:19 +0100 | [diff] [blame] | 80 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libblkid.so |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 81 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libmmcutils.so |
| 82 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libbmlutils.so |
| 83 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libflashutils.so |
Ethan Yonker | 67eb72a | 2014-11-07 10:44:37 -0600 | [diff] [blame] | 84 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libfusesideload.so |
Ethan Yonker | c798c9c | 2015-10-09 11:15:26 -0500 | [diff] [blame] | 85 | ifeq (,$(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 |
| 89 | endif |
mar-v-in | 4142408 | 2015-03-10 19:06:16 +0100 | [diff] [blame] | 90 | ifneq (,$(filter $(PLATFORM_SDK_VERSION), 21 22)) |
Ethan Yonker | 75bf041 | 2014-11-21 13:54:27 -0600 | [diff] [blame] | 91 | # 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 Bocek | 41ae124 | 2015-01-04 21:57:50 +0100 | [diff] [blame] | 95 | # 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 Yonker | 75bf041 | 2014-11-21 13:54:27 -0600 | [diff] [blame] | 97 | else |
Ethan Yonker | c798c9c | 2015-10-09 11:15:26 -0500 | [diff] [blame] | 98 | 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 Yonker | 75bf041 | 2014-11-21 13:54:27 -0600 | [diff] [blame] | 110 | endif |
Ethan Yonker | 560e65f | 2014-11-17 11:37:00 -0600 | [diff] [blame] | 111 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libmincrypttwrp.so |
Dees Troy | 8d66f8b | 2013-10-08 14:04:55 +0000 | [diff] [blame] | 112 | RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/toolbox |
Ethan Yonker | 03a42f6 | 2014-08-08 11:03:51 -0500 | [diff] [blame] | 113 | ifneq ($(TW_OEM_BUILD),true) |
| 114 | RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/twrp |
bigbiff bigbiff | c7eee6f | 2014-09-02 18:59:01 -0400 | [diff] [blame] | 115 | else |
| 116 | TW_EXCLUDE_MTP := true |
| 117 | endif |
| 118 | ifneq ($(TW_EXCLUDE_MTP), true) |
| 119 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libtwrpmtp.so |
Ethan Yonker | 03a42f6 | 2014-08-08 11:03:51 -0500 | [diff] [blame] | 120 | endif |
Dees_Troy | a95f55c | 2013-08-17 13:14:43 +0000 | [diff] [blame] | 121 | ifeq ($(TARGET_USERIMAGES_USE_EXT4), true) |
| 122 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext4_utils.so |
| 123 | endif |
Dees_Troy | 2673cec | 2013-04-02 20:22:16 +0000 | [diff] [blame] | 124 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libaosprecovery.so |
Dees_Troy | 930bf01 | 2013-08-10 22:19:03 +0000 | [diff] [blame] | 125 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libjpeg.so |
Dees Troy | 4bf3b0d | 2013-09-11 19:12:49 +0000 | [diff] [blame] | 126 | ifeq ($(TWHAVE_SELINUX), true) |
Dees_Troy | f2280ff | 2013-08-06 18:01:12 +0000 | [diff] [blame] | 127 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libselinux.so |
Dees_Troy | e3850a3 | 2013-08-29 18:33:47 +0000 | [diff] [blame] | 128 | ifneq ($(TARGET_USERIMAGES_USE_EXT4), true) |
| 129 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext4_utils.so |
| 130 | endif |
Dees_Troy | f2280ff | 2013-08-06 18:01:12 +0000 | [diff] [blame] | 131 | endif |
Vojtech Bocek | 7cc278b | 2013-02-24 01:40:19 +0100 | [diff] [blame] | 132 | ifeq ($(BUILD_ID), GINGERBREAD) |
| 133 | TW_NO_EXFAT := true |
| 134 | endif |
Dees_Troy | b05ddee | 2013-01-28 20:24:50 +0000 | [diff] [blame] | 135 | ifneq ($(TW_NO_EXFAT), true) |
Dees_Troy | b05ddee | 2013-01-28 20:24:50 +0000 | [diff] [blame] | 136 | RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/mkexfatfs |
Matt Mower | 80f7b36 | 2015-12-12 15:38:01 -0600 | [diff] [blame] | 137 | RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/fsck.exfat |
Ethan Yonker | dc3bc46 | 2015-12-08 15:12:40 -0600 | [diff] [blame] | 138 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libexfat_twrp.so |
Dees Troy | b4bd697 | 2014-10-09 18:47:00 +0000 | [diff] [blame] | 139 | else |
Captain Throwback | 6a1acf2 | 2014-09-18 12:46:35 -0400 | [diff] [blame] | 140 | TW_NO_EXFAT_FUSE := true |
| 141 | endif |
| 142 | ifneq ($(TW_NO_EXFAT_FUSE), true) |
| 143 | RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/exfat-fuse |
bigbiff bigbiff | 9c75405 | 2013-01-09 09:09:08 -0500 | [diff] [blame] | 144 | endif |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 145 | ifeq ($(TW_INCLUDE_BLOBPACK), true) |
| 146 | RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/blobpack |
| 147 | endif |
| 148 | ifeq ($(TW_INCLUDE_INJECTTWRP), true) |
| 149 | RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/injecttwrp |
| 150 | endif |
| 151 | ifeq ($(TW_INCLUDE_DUMLOCK), true) |
| 152 | RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/htcdumlock |
| 153 | endif |
| 154 | ifeq ($(TW_INCLUDE_CRYPTO), true) |
Ethan Yonker | 4eca40d | 2014-11-11 14:52:28 -0600 | [diff] [blame] | 155 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcryptfslollipop.so |
| 156 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libcrypto.so |
Ethan Yonker | 4eca40d | 2014-11-11 14:52:28 -0600 | [diff] [blame] | 157 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libhardware.so |
Dees Troy | c657cc0 | 2015-01-16 22:48:47 +0000 | [diff] [blame] | 158 | ifeq ($(TARGET_HW_DISK_ENCRYPTION),true) |
Captain Throwback | 7fe1b39 | 2015-06-29 09:19:32 -0400 | [diff] [blame] | 159 | RELINK_SOURCE_FILES += $(TARGET_OUT_VENDOR_SHARED_LIBRARIES)/libcryptfs_hw.so |
Dees Troy | c657cc0 | 2015-01-16 22:48:47 +0000 | [diff] [blame] | 160 | endif |
Ethan Yonker | 4eca40d | 2014-11-11 14:52:28 -0600 | [diff] [blame] | 161 | endif |
Dees_Troy | 38bd760 | 2012-09-14 13:33:53 -0400 | [diff] [blame] | 162 | ifeq ($(TARGET_USERIMAGES_USE_EXT4), true) |
| 163 | RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/make_ext4fs |
| 164 | endif |
Dees_Troy | 4546fe7 | 2013-01-10 14:33:27 +0000 | [diff] [blame] | 165 | ifneq ($(wildcard system/core/libsparse/Android.mk),) |
| 166 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libsparse.so |
| 167 | endif |
Dees_Troy | 83bd483 | 2013-05-04 12:39:56 +0000 | [diff] [blame] | 168 | ifneq ($(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 |
| 171 | endif |
Dees_Troy | e501704 | 2013-08-29 16:38:55 +0000 | [diff] [blame] | 172 | ifeq ($(TARGET_USERIMAGES_USE_F2FS), true) |
Matt Mower | 5829491 | 2015-12-10 11:54:28 -0600 | [diff] [blame] | 173 | 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 Yonker | 5235f55 | 2015-10-09 14:46:47 -0500 | [diff] [blame] | 177 | RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/mkfs.f2fs |
Matt Mower | 5829491 | 2015-12-10 11:54:28 -0600 | [diff] [blame] | 178 | else ifneq (,$(filter $(PLATFORM_SDK_VERSION), 21 22)) |
| 179 | RELINK_SOURCE_FILES += $(TARGET_ROOT_OUT_SBIN)/mkfs.f2fs |
Ethan Yonker | 75bf041 | 2014-11-21 13:54:27 -0600 | [diff] [blame] | 180 | else |
Matt Mower | 5829491 | 2015-12-10 11:54:28 -0600 | [diff] [blame] | 181 | RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/mkfs.f2fs |
Ethan Yonker | 75bf041 | 2014-11-21 13:54:27 -0600 | [diff] [blame] | 182 | endif |
Dees_Troy | e501704 | 2013-08-29 16:38:55 +0000 | [diff] [blame] | 183 | RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/fsck.f2fs |
Dees_Troy | e501704 | 2013-08-29 16:38:55 +0000 | [diff] [blame] | 184 | endif |
Dees Troy | 0226cd5 | 2013-11-04 14:12:35 +0000 | [diff] [blame] | 185 | ifneq ($(wildcard system/core/reboot/Android.mk),) |
| 186 | RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/reboot |
| 187 | endif |
Vojtech Bocek | 76ee903 | 2014-09-07 15:01:56 +0200 | [diff] [blame] | 188 | ifneq ($(TW_DISABLE_TTF), true) |
| 189 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libft2.so |
| 190 | endif |
Ethan Yonker | 0e67837 | 2014-11-18 12:17:06 -0600 | [diff] [blame] | 191 | ifneq ($(TW_RECOVERY_ADDITIONAL_RELINK_FILES),) |
| 192 | RELINK_SOURCE_FILES += $(TW_RECOVERY_ADDITIONAL_RELINK_FILES) |
| 193 | endif |
Dees Troy | e176a65 | 2015-01-20 19:35:21 +0000 | [diff] [blame] | 194 | ifneq ($(wildcard external/pcre/Android.mk),) |
| 195 | RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libpcre.so |
| 196 | endif |
Ethan Yonker | b81d905 | 2015-07-09 13:20:53 -0500 | [diff] [blame] | 197 | ifeq ($(TW_INCLUDE_NTFS_3G),true) |
Greg Wallace | b39e6c6 | 2015-12-29 00:55:26 -0500 | [diff] [blame] | 198 | ifeq ($(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 |
| 204 | else |
Ethan Yonker | b81d905 | 2015-07-09 13:20:53 -0500 | [diff] [blame] | 205 | RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/ntfs-3g |
| 206 | RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/ntfsfix |
| 207 | RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/mkntfs |
| 208 | endif |
Greg Wallace | b39e6c6 | 2015-12-29 00:55:26 -0500 | [diff] [blame] | 209 | endif |
Ethan Yonker | 483e9f4 | 2016-01-11 22:21:18 -0600 | [diff] [blame] | 210 | ifeq ($(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 |
| 214 | endif |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 215 | |
| 216 | TWRP_AUTOGEN := $(intermediates)/teamwin |
| 217 | |
| 218 | GEN := $(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_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 222 | |
| 223 | LOCAL_GENERATED_SOURCES := $(GEN) |
| 224 | LOCAL_SRC_FILES := teamwin $(GEN) |
| 225 | include $(BUILD_PREBUILT) |
| 226 | |
Ethan Yonker | c798c9c | 2015-10-09 11:15:26 -0500 | [diff] [blame] | 227 | #permissive.sh |
| 228 | include $(CLEAR_VARS) |
| 229 | LOCAL_MODULE := permissive.sh |
| 230 | LOCAL_MODULE_TAGS := eng |
| 231 | LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES |
| 232 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin |
| 233 | LOCAL_SRC_FILES := $(LOCAL_MODULE) |
| 234 | include $(BUILD_PREBUILT) |
| 235 | |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 236 | #fix_permissions |
| 237 | include $(CLEAR_VARS) |
| 238 | LOCAL_MODULE := fix_permissions.sh |
| 239 | LOCAL_MODULE_TAGS := eng |
| 240 | LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES |
| 241 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin |
| 242 | LOCAL_SRC_FILES := $(LOCAL_MODULE) |
| 243 | include $(BUILD_PREBUILT) |
| 244 | |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 245 | #mke2fs.conf |
| 246 | include $(CLEAR_VARS) |
| 247 | LOCAL_MODULE := mke2fs.conf |
| 248 | LOCAL_MODULE_TAGS := eng |
| 249 | LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES |
| 250 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/etc |
| 251 | LOCAL_SRC_FILES := $(LOCAL_MODULE) |
| 252 | include $(BUILD_PREBUILT) |
| 253 | |
| 254 | ifeq ($(BOARD_HAS_NO_REAL_SDCARD),) |
Ethan Yonker | 483e9f4 | 2016-01-11 22:21:18 -0600 | [diff] [blame] | 255 | 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_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 266 | #parted |
Ethan Yonker | 483e9f4 | 2016-01-11 22:21:18 -0600 | [diff] [blame] | 267 | #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_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 274 | endif |
| 275 | |
Dees_Troy | 83bd483 | 2013-05-04 12:39:56 +0000 | [diff] [blame] | 276 | # copy license file for OpenAES |
| 277 | ifneq ($(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) |
| 285 | endif |
| 286 | |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 287 | ifeq ($(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 Troy | 3454ade | 2015-01-20 19:21:04 +0000 | [diff] [blame] | 293 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)$(TWHTCD_PATH) |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 294 | 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 Troy | 3454ade | 2015-01-20 19:21:04 +0000 | [diff] [blame] | 302 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)$(TWHTCD_PATH) |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 303 | 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 Troy | 3454ade | 2015-01-20 19:21:04 +0000 | [diff] [blame] | 311 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)$(TWHTCD_PATH) |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 312 | 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 Troy | 3454ade | 2015-01-20 19:21:04 +0000 | [diff] [blame] | 320 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)$(TWHTCD_PATH) |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 321 | 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 Troy | 3454ade | 2015-01-20 19:21:04 +0000 | [diff] [blame] | 329 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)$(TWHTCD_PATH) |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 330 | 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 Troy | 3454ade | 2015-01-20 19:21:04 +0000 | [diff] [blame] | 338 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)$(TWHTCD_PATH) |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 339 | 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 Troy | 3454ade | 2015-01-20 19:21:04 +0000 | [diff] [blame] | 347 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)$(TWHTCD_PATH) |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 348 | 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 Troy | 3454ade | 2015-01-20 19:21:04 +0000 | [diff] [blame] | 356 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)$(TWHTCD_PATH) |
Dees_Troy | 51a0e82 | 2012-09-05 15:24:24 -0400 | [diff] [blame] | 357 | LOCAL_SRC_FILES := $(LOCAL_MODULE) |
| 358 | include $(BUILD_PREBUILT) |
| 359 | endif |
Dees_Troy | 6ef6635 | 2013-02-21 08:26:57 -0600 | [diff] [blame] | 360 | |
| 361 | ifneq ($(TW_EXCLUDE_SUPERSU), true) |
Ethan Yonker | e3e8829 | 2014-12-10 16:17:55 -0600 | [diff] [blame] | 362 | 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_Troy | 6ef6635 | 2013-02-21 08:26:57 -0600 | [diff] [blame] | 371 | |
Ethan Yonker | e3e8829 | 2014-12-10 16:17:55 -0600 | [diff] [blame] | 372 | #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 Yonker | b82422a | 2016-01-20 08:48:49 -0600 | [diff] [blame] | 383 | LOCAL_MODULE := suarm |
| 384 | LOCAL_MODULE_STEM := su |
Ethan Yonker | e3e8829 | 2014-12-10 16:17:55 -0600 | [diff] [blame] | 385 | 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_Troy | a7939bb | 2013-08-29 20:21:12 +0000 | [diff] [blame] | 433 | 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 Yonker | e3e8829 | 2014-12-10 16:17:55 -0600 | [diff] [blame] | 441 | #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_Troy | a7939bb | 2013-08-29 20:21:12 +0000 | [diff] [blame] | 451 | 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_Troy | 6ef6635 | 2013-02-21 08:26:57 -0600 | [diff] [blame] | 459 | #SuperSU special installer APK |
| 460 | include $(CLEAR_VARS) |
| 461 | LOCAL_MODULE := Superuser.apk |
| 462 | LOCAL_MODULE_TAGS := eng |
| 463 | LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES |
jt1134 | 113ee73 | 2013-02-22 23:26:10 -0600 | [diff] [blame] | 464 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/supersu |
Dees_Troy | 6ef6635 | 2013-02-21 08:26:57 -0600 | [diff] [blame] | 465 | LOCAL_SRC_FILES := $(LOCAL_MODULE) |
| 466 | include $(BUILD_PREBUILT) |
jt1134 | 113ee73 | 2013-02-22 23:26:10 -0600 | [diff] [blame] | 467 | endif |