blob: 1b4cb07516ea4a37849ec87593937558f1c3fb5f [file] [log] [blame]
Joe Onorato6396e702012-05-31 23:21:46 -07001# Copyright (C) 2007 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080014
Joe Onorato6396e702012-05-31 23:21:46 -070015LOCAL_PATH := $(call my-dir)
16
Motorhead199175b6f662014-06-12 15:58:33 -070017include $(CLEAR_VARS)
18
Dees_Troy51a0e822012-09-05 15:24:24 -040019TARGET_RECOVERY_GUI := true
Joe Onorato6396e702012-05-31 23:21:46 -070020
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080021LOCAL_SRC_FILES := \
Dees_Troy2673cec2013-04-02 20:22:16 +000022 twrp.cpp \
bigbiff bigbiffa0f8a592012-10-09 21:01:03 -040023 fixPermissions.cpp \
bigbiff bigbiff9c754052013-01-09 09:09:08 -050024 twrpTar.cpp \
bigbiff bigbiff34684ff2013-12-01 21:03:45 -050025 twrpDU.cpp \
bigbiff bigbiffcdcfee42013-02-27 21:11:26 -050026 twrpDigest.cpp \
Ethan Yonker00028b42014-04-09 14:29:02 -050027 find_file.cpp
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080028
Dees_Troy51a0e822012-09-05 15:24:24 -040029LOCAL_SRC_FILES += \
Dees_Troy51a0e822012-09-05 15:24:24 -040030 data.cpp \
Dees_Troy51a0e822012-09-05 15:24:24 -040031 partition.cpp \
32 partitionmanager.cpp \
Dees_Troy32c8eb82012-09-11 15:28:06 -040033 twinstall.cpp \
Dees_Troy812660f2012-09-20 09:55:17 -040034 twrp-functions.cpp \
Dees_Troye34c1332013-02-06 19:13:00 +000035 openrecoveryscript.cpp \
36 tarWrite.c
Dees_Troy51a0e822012-09-05 15:24:24 -040037
Dees_Troya58bead2012-09-27 09:49:29 -040038ifneq ($(TARGET_RECOVERY_REBOOT_SRC),)
Dees_Troy51a0e822012-09-05 15:24:24 -040039 LOCAL_SRC_FILES += $(TARGET_RECOVERY_REBOOT_SRC)
40endif
41
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080042LOCAL_MODULE := recovery
43
Dees_Troy51a0e822012-09-05 15:24:24 -040044#LOCAL_FORCE_STATIC_EXECUTABLE := true
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080045
Doug Zongkere08991e2010-02-02 13:09:52 -080046RECOVERY_API_VERSION := 3
Ken Sumrallf35d1ce2013-02-13 12:59:35 -080047RECOVERY_FSTAB_VERSION := 2
Doug Zongkerfb2e3af2009-06-17 17:29:40 -070048LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION)
49
Dees_Troy51a0e822012-09-05 15:24:24 -040050#LOCAL_STATIC_LIBRARIES := \
Dees_Troy1669f892013-09-04 18:35:08 +000051# libext4_utils_static \
52# libsparse_static \
Dees_Troy51a0e822012-09-05 15:24:24 -040053# libminzip \
Dees_Troy1669f892013-09-04 18:35:08 +000054# libz \
Dees_Troy51a0e822012-09-05 15:24:24 -040055# libmtdutils \
56# libmincrypt \
57# libminadbd \
Dees_Troy1669f892013-09-04 18:35:08 +000058# libminui \
59# libpixelflinger_static \
60# libpng \
61# libfs_mgr \
62# libcutils \
63# liblog \
64# libselinux \
65# libstdc++ \
66# libm \
67# libc
Dees_Troy51a0e822012-09-05 15:24:24 -040068
69LOCAL_C_INCLUDES += bionic external/stlport/stlport
70
71LOCAL_STATIC_LIBRARIES :=
72LOCAL_SHARED_LIBRARIES :=
73
Dees_Troy2673cec2013-04-02 20:22:16 +000074LOCAL_STATIC_LIBRARIES += libcrecovery libguitwrp
Dees_Troya95f55c2013-08-17 13:14:43 +000075LOCAL_SHARED_LIBRARIES += libz libc libstlport libcutils libstdc++ libtar libblkid libminuitwrp libminadbd libmtdutils libminzip libaosprecovery
Doug Zongker49c73a72010-06-29 17:36:28 -070076
Dees_Troy4546fe72013-01-10 14:33:27 +000077ifneq ($(wildcard system/core/libsparse/Android.mk),)
78LOCAL_SHARED_LIBRARIES += libsparse
79endif
80
Ethan Yonker7af51ce2014-04-04 13:33:30 -050081ifeq ($(TW_OEM_BUILD),true)
82 LOCAL_CFLAGS += -DTW_OEM_BUILD
83 BOARD_HAS_NO_REAL_SDCARD := true
84 TW_USE_TOOLBOX := true
85 TW_EXCLUDE_SUPERSU := true
86endif
Doug Zongker49c73a72010-06-29 17:36:28 -070087ifeq ($(TARGET_USERIMAGES_USE_EXT4), true)
Joe Onorato6396e702012-05-31 23:21:46 -070088 LOCAL_CFLAGS += -DUSE_EXT4
89 LOCAL_C_INCLUDES += system/extras/ext4_utils
Dees_Troya95f55c2013-08-17 13:14:43 +000090 LOCAL_SHARED_LIBRARIES += libext4_utils
Doug Zongker49c73a72010-06-29 17:36:28 -070091endif
Dees Troy4bf3b0d2013-09-11 19:12:49 +000092ifneq ($(wildcard external/libselinux/Android.mk),)
93 TWHAVE_SELINUX := true
94endif
95ifeq ($(TWHAVE_SELINUX), true)
Dees_Troy2673cec2013-04-02 20:22:16 +000096 #LOCAL_C_INCLUDES += external/libselinux/include
97 #LOCAL_STATIC_LIBRARIES += libselinux
98 #LOCAL_CFLAGS += -DHAVE_SELINUX -g
Stephen Smalley1a114492012-01-13 07:59:51 -050099endif # HAVE_SELINUX
Dees Troy4bf3b0d2013-09-11 19:12:49 +0000100ifeq ($(TWHAVE_SELINUX), true)
Dees_Troyf2280ff2013-08-06 18:01:12 +0000101 LOCAL_C_INCLUDES += external/libselinux/include
Dees_Troya95f55c2013-08-17 13:14:43 +0000102 LOCAL_SHARED_LIBRARIES += libselinux
Dees_Troyf2280ff2013-08-06 18:01:12 +0000103 LOCAL_CFLAGS += -DHAVE_SELINUX -g
Dees_Troya95f55c2013-08-17 13:14:43 +0000104 ifneq ($(TARGET_USERIMAGES_USE_EXT4), true)
105 LOCAL_CFLAGS += -DUSE_EXT4
106 LOCAL_C_INCLUDES += system/extras/ext4_utils
107 LOCAL_SHARED_LIBRARIES += libext4_utils
108 endif
Dees_Troyf2280ff2013-08-06 18:01:12 +0000109endif
Doug Zongker49c73a72010-06-29 17:36:28 -0700110
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -0800111# This binary is in the recovery ramdisk, which is otherwise a copy of root.
112# It gets copied there in config/Makefile. LOCAL_MODULE_TAGS suppresses
113# a (redundant) copy of the binary in /system/bin for user builds.
114# TODO: Build the ramdisk image in a more principled way.
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -0800115LOCAL_MODULE_TAGS := eng
116
Dees_Troy1669f892013-09-04 18:35:08 +0000117#ifeq ($(TARGET_RECOVERY_UI_LIB),)
Doug Zongkerdaefc1d2011-10-31 09:34:15 -0700118 LOCAL_SRC_FILES += default_device.cpp
Dees_Troy1669f892013-09-04 18:35:08 +0000119#else
120# LOCAL_STATIC_LIBRARIES += $(TARGET_RECOVERY_UI_LIB)
121#endif
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -0800122
Doug Zongkercc8cd3f2010-09-20 12:16:13 -0700123LOCAL_C_INCLUDES += system/extras/ext4_utils
124
Dees_Troy51a0e822012-09-05 15:24:24 -0400125#TWRP Build Flags
Ricardo Gomezc9ecd442013-07-05 16:13:52 -0700126ifneq ($(TW_NO_SCREEN_TIMEOUT),)
127 LOCAL_CFLAGS += -DTW_NO_SCREEN_TIMEOUT
128endif
Dees_Troy51a0e822012-09-05 15:24:24 -0400129ifeq ($(BOARD_HAS_NO_REAL_SDCARD), true)
130 LOCAL_CFLAGS += -DBOARD_HAS_NO_REAL_SDCARD
131endif
132ifneq ($(SP1_NAME),)
133 LOCAL_CFLAGS += -DSP1_NAME=$(SP1_NAME) -DSP1_BACKUP_METHOD=$(SP1_BACKUP_METHOD) -DSP1_MOUNTABLE=$(SP1_MOUNTABLE)
134endif
135ifneq ($(SP1_DISPLAY_NAME),)
136 LOCAL_CFLAGS += -DSP1_DISPLAY_NAME=$(SP1_DISPLAY_NAME)
137endif
138ifneq ($(SP2_NAME),)
139 LOCAL_CFLAGS += -DSP2_NAME=$(SP2_NAME) -DSP2_BACKUP_METHOD=$(SP2_BACKUP_METHOD) -DSP2_MOUNTABLE=$(SP2_MOUNTABLE)
140endif
141ifneq ($(SP2_DISPLAY_NAME),)
142 LOCAL_CFLAGS += -DSP2_DISPLAY_NAME=$(SP2_DISPLAY_NAME)
143endif
144ifneq ($(SP3_NAME),)
145 LOCAL_CFLAGS += -DSP3_NAME=$(SP3_NAME) -DSP3_BACKUP_METHOD=$(SP3_BACKUP_METHOD) -DSP3_MOUNTABLE=$(SP3_MOUNTABLE)
146endif
147ifneq ($(SP3_DISPLAY_NAME),)
148 LOCAL_CFLAGS += -DSP3_DISPLAY_NAME=$(SP3_DISPLAY_NAME)
149endif
150ifneq ($(RECOVERY_SDCARD_ON_DATA),)
151 LOCAL_CFLAGS += -DRECOVERY_SDCARD_ON_DATA
152endif
153ifneq ($(TW_INCLUDE_DUMLOCK),)
154 LOCAL_CFLAGS += -DTW_INCLUDE_DUMLOCK
155endif
156ifneq ($(TW_INTERNAL_STORAGE_PATH),)
157 LOCAL_CFLAGS += -DTW_INTERNAL_STORAGE_PATH=$(TW_INTERNAL_STORAGE_PATH)
158endif
159ifneq ($(TW_INTERNAL_STORAGE_MOUNT_POINT),)
160 LOCAL_CFLAGS += -DTW_INTERNAL_STORAGE_MOUNT_POINT=$(TW_INTERNAL_STORAGE_MOUNT_POINT)
161endif
162ifneq ($(TW_EXTERNAL_STORAGE_PATH),)
163 LOCAL_CFLAGS += -DTW_EXTERNAL_STORAGE_PATH=$(TW_EXTERNAL_STORAGE_PATH)
164endif
165ifneq ($(TW_EXTERNAL_STORAGE_MOUNT_POINT),)
166 LOCAL_CFLAGS += -DTW_EXTERNAL_STORAGE_MOUNT_POINT=$(TW_EXTERNAL_STORAGE_MOUNT_POINT)
167endif
168ifeq ($(TW_HAS_NO_RECOVERY_PARTITION), true)
169 LOCAL_CFLAGS += -DTW_HAS_NO_RECOVERY_PARTITION
170endif
ChampionSwimmercf33e4d2013-02-03 13:59:22 +0530171ifeq ($(TW_HAS_NO_BOOT_PARTITION), true)
172 LOCAL_CFLAGS += -DTW_HAS_NO_BOOT_PARTITION
173endif
Dees_Troy51a0e822012-09-05 15:24:24 -0400174ifeq ($(TW_NO_REBOOT_BOOTLOADER), true)
175 LOCAL_CFLAGS += -DTW_NO_REBOOT_BOOTLOADER
176endif
177ifeq ($(TW_NO_REBOOT_RECOVERY), true)
178 LOCAL_CFLAGS += -DTW_NO_REBOOT_RECOVERY
179endif
180ifeq ($(TW_NO_BATT_PERCENT), true)
181 LOCAL_CFLAGS += -DTW_NO_BATT_PERCENT
182endif
183ifneq ($(TW_CUSTOM_POWER_BUTTON),)
184 LOCAL_CFLAGS += -DTW_CUSTOM_POWER_BUTTON=$(TW_CUSTOM_POWER_BUTTON)
185endif
186ifeq ($(TW_ALWAYS_RMRF), true)
187 LOCAL_CFLAGS += -DTW_ALWAYS_RMRF
188endif
189ifeq ($(TW_NEVER_UNMOUNT_SYSTEM), true)
190 LOCAL_CFLAGS += -DTW_NEVER_UNMOUNT_SYSTEM
191endif
192ifeq ($(TW_NO_USB_STORAGE), true)
193 LOCAL_CFLAGS += -DTW_NO_USB_STORAGE
194endif
195ifeq ($(TW_INCLUDE_INJECTTWRP), true)
196 LOCAL_CFLAGS += -DTW_INCLUDE_INJECTTWRP
197endif
198ifeq ($(TW_INCLUDE_BLOBPACK), true)
199 LOCAL_CFLAGS += -DTW_INCLUDE_BLOBPACK
200endif
201ifeq ($(TW_DEFAULT_EXTERNAL_STORAGE), true)
202 LOCAL_CFLAGS += -DTW_DEFAULT_EXTERNAL_STORAGE
203endif
204ifneq ($(TARGET_USE_CUSTOM_LUN_FILE_PATH),)
205 LOCAL_CFLAGS += -DCUSTOM_LUN_FILE=\"$(TARGET_USE_CUSTOM_LUN_FILE_PATH)\"
206endif
207ifneq ($(BOARD_UMS_LUNFILE),)
208 LOCAL_CFLAGS += -DCUSTOM_LUN_FILE=\"$(BOARD_UMS_LUNFILE)\"
209endif
210#ifeq ($(TW_FLASH_FROM_STORAGE), true) Making this the default behavior
211 LOCAL_CFLAGS += -DTW_FLASH_FROM_STORAGE
212#endif
213ifeq ($(TW_HAS_DOWNLOAD_MODE), true)
214 LOCAL_CFLAGS += -DTW_HAS_DOWNLOAD_MODE
215endif
bigbiff bigbiff87940362013-03-09 09:58:50 -0500216ifeq ($(TW_NO_SCREEN_BLANK), true)
217 LOCAL_CFLAGS += -DTW_NO_SCREEN_BLANK
218endif
Dees_Troy51a0e822012-09-05 15:24:24 -0400219ifeq ($(TW_SDEXT_NO_EXT4), true)
220 LOCAL_CFLAGS += -DTW_SDEXT_NO_EXT4
221endif
Dees_Troyfdf5fcc2012-09-11 10:27:01 -0400222ifeq ($(TW_FORCE_CPUINFO_FOR_DEVICE_ID), true)
223 LOCAL_CFLAGS += -DTW_FORCE_CPUINFO_FOR_DEVICE_ID
224endif
Dees_Troy3f5c4e82013-02-01 15:16:59 +0000225ifeq ($(TW_NO_EXFAT_FUSE), true)
226 LOCAL_CFLAGS += -DTW_NO_EXFAT_FUSE
227endif
Dees_Troy51a0e822012-09-05 15:24:24 -0400228ifeq ($(TW_INCLUDE_CRYPTO), true)
229 LOCAL_CFLAGS += -DTW_INCLUDE_CRYPTO
230 LOCAL_CFLAGS += -DCRYPTO_FS_TYPE=\"$(TW_CRYPTO_FS_TYPE)\"
231 LOCAL_CFLAGS += -DCRYPTO_REAL_BLKDEV=\"$(TW_CRYPTO_REAL_BLKDEV)\"
232 LOCAL_CFLAGS += -DCRYPTO_MNT_POINT=\"$(TW_CRYPTO_MNT_POINT)\"
233 LOCAL_CFLAGS += -DCRYPTO_FS_OPTIONS=\"$(TW_CRYPTO_FS_OPTIONS)\"
234 LOCAL_CFLAGS += -DCRYPTO_FS_FLAGS=\"$(TW_CRYPTO_FS_FLAGS)\"
235 LOCAL_CFLAGS += -DCRYPTO_KEY_LOC=\"$(TW_CRYPTO_KEY_LOC)\"
a39552696ff55ce2013-01-08 16:14:56 +0000236ifeq ($(TW_INCLUDE_CRYPTO_SAMSUNG), true)
237 LOCAL_CFLAGS += -DTW_INCLUDE_CRYPTO_SAMSUNG=\"$(TW_INCLUDE_CRYPTO_SAMSUNG)\"
238 ifdef TW_CRYPTO_SD_REAL_BLKDEV
239 LOCAL_CFLAGS += -DCRYPTO_SD_REAL_BLKDEV=\"$(TW_CRYPTO_SD_REAL_BLKDEV)\"
240 LOCAL_CFLAGS += -DCRYPTO_SD_FS_TYPE=\"$(TW_CRYPTO_SD_FS_TYPE)\"
241 endif
242 #LOCAL_LDFLAGS += -L$(TARGET_OUT_SHARED_LIBRARIES) -lsec_km
243 LOCAL_LDFLAGS += -ldl
244 LOCAL_STATIC_LIBRARIES += libcrypt_samsung
245endif
Dees_Troy2673cec2013-04-02 20:22:16 +0000246 LOCAL_SHARED_LIBRARIES += libcryptfsics
247 #LOCAL_SRC_FILES += crypto/ics/cryptfs.c
248 #LOCAL_C_INCLUDES += system/extras/ext4_utils external/openssl/include
Dees_Troy51a0e822012-09-05 15:24:24 -0400249endif
250ifeq ($(TW_INCLUDE_JB_CRYPTO), true)
251 LOCAL_CFLAGS += -DTW_INCLUDE_CRYPTO
252 LOCAL_CFLAGS += -DTW_INCLUDE_JB_CRYPTO
Dees_Troy2673cec2013-04-02 20:22:16 +0000253 LOCAL_SHARED_LIBRARIES += libcryptfsjb
254 #LOCAL_SRC_FILES += crypto/jb/cryptfs.c
255 #LOCAL_C_INCLUDES += system/extras/ext4_utils external/openssl/include
Dees_Troy51a0e822012-09-05 15:24:24 -0400256endif
Anatoly Smaznov10c11f62013-02-12 13:33:40 +0700257ifeq ($(TW_USE_MODEL_HARDWARE_ID_FOR_DEVICE_ID), true)
258 LOCAL_CFLAGS += -DTW_USE_MODEL_HARDWARE_ID_FOR_DEVICE_ID
259endif
Dees_Troy2f9117a2013-02-17 19:52:09 -0600260ifneq ($(TW_BRIGHTNESS_PATH),)
261 LOCAL_CFLAGS += -DTW_BRIGHTNESS_PATH=$(TW_BRIGHTNESS_PATH)
262endif
263ifneq ($(TW_MAX_BRIGHTNESS),)
264 LOCAL_CFLAGS += -DTW_MAX_BRIGHTNESS=$(TW_MAX_BRIGHTNESS)
265endif
Dees_Troyf33b4902013-03-01 00:51:39 +0000266ifneq ($(TW_CUSTOM_BATTERY_PATH),)
267 LOCAL_CFLAGS += -DTW_CUSTOM_BATTERY_PATH=$(TW_CUSTOM_BATTERY_PATH)
268endif
Dees_Troy83bd4832013-05-04 12:39:56 +0000269ifneq ($(TW_EXCLUDE_ENCRYPTED_BACKUPS), true)
270 LOCAL_SHARED_LIBRARIES += libopenaes
271else
272 LOCAL_CFLAGS += -DTW_EXCLUDE_ENCRYPTED_BACKUPS
273endif
Vojtech Bocekd0e38bc2014-02-03 23:36:57 +0100274ifeq ($(TARGET_RECOVERY_QCOM_RTC_FIX),)
275 ifeq ($(TARGET_CPU_VARIANT),krait)
276 LOCAL_CFLAGS += -DQCOM_RTC_FIX
277 endif
278else ifeq ($(TARGET_RECOVERY_QCOM_RTC_FIX),true)
279 LOCAL_CFLAGS += -DQCOM_RTC_FIX
280endif
Matt Mower6883d732014-03-20 17:28:13 -0500281ifneq ($(TW_NO_LEGACY_PROPS),)
282 LOCAL_CFLAGS += -DTW_NO_LEGACY_PROPS
283endif
Dees Troy4159aed2014-02-28 17:24:43 +0000284ifneq ($(wildcard bionic/libc/include/sys/capability.h),)
285 LOCAL_CFLAGS += -DHAVE_CAPABILITIES
286endif
Sergey 'Jin' Bostandzhyan80a90ed2013-01-04 02:29:03 +0100287
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -0800288include $(BUILD_EXECUTABLE)
289
Ethan Yonker5c933692014-04-04 11:26:32 -0500290ifneq ($(TW_USE_TOOLBOX), true)
Doug Zongker73ae31c2009-12-09 17:01:45 -0800291include $(CLEAR_VARS)
Dees_Troyc04dcf72012-10-02 10:46:37 -0400292# Create busybox symlinks... gzip and gunzip are excluded because those need to link to pigz instead
293BUSYBOX_LINKS := $(shell cat external/busybox/busybox-full.links)
294exclude := tune2fs mke2fs mkdosfs gzip gunzip
Dees Troy8d66f8b2013-10-08 14:04:55 +0000295ifeq ($(TWHAVE_SELINUX), true)
296 exclude += ls
297 # toolbox will provide ls support with ls -Z capability for listing SELinux contexts
298endif
Dees_Troyc04dcf72012-10-02 10:46:37 -0400299RECOVERY_BUSYBOX_SYMLINKS := $(addprefix $(TARGET_RECOVERY_ROOT_OUT)/sbin/,$(filter-out $(exclude),$(notdir $(BUSYBOX_LINKS))))
300$(RECOVERY_BUSYBOX_SYMLINKS): BUSYBOX_BINARY := busybox
301$(RECOVERY_BUSYBOX_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
302 @echo "Symlink: $@ -> $(BUSYBOX_BINARY)"
303 @mkdir -p $(dir $@)
304 @rm -rf $@
305 $(hide) ln -sf $(BUSYBOX_BINARY) $@
306
307ALL_DEFAULT_INSTALLED_MODULES += $(RECOVERY_BUSYBOX_SYMLINKS)
Ethan Yonker5c933692014-04-04 11:26:32 -0500308endif
Dees_Troyc04dcf72012-10-02 10:46:37 -0400309
310include $(CLEAR_VARS)
Doug Zongkerdaefc1d2011-10-31 09:34:15 -0700311LOCAL_MODULE := verifier_test
Doug Zongkerdaefc1d2011-10-31 09:34:15 -0700312LOCAL_FORCE_STATIC_EXECUTABLE := true
Doug Zongkerdaefc1d2011-10-31 09:34:15 -0700313LOCAL_MODULE_TAGS := tests
Dees Troyd63c7642013-11-03 13:03:55 +0000314LOCAL_C_INCLUDES := bootable/recovery/libmincrypt/includes
Joe Onorato6396e702012-05-31 23:21:46 -0700315LOCAL_SRC_FILES := \
316 verifier_test.cpp \
317 verifier.cpp \
318 ui.cpp
319LOCAL_STATIC_LIBRARIES := \
Dees Troyd63c7642013-11-03 13:03:55 +0000320 libmincrypttwrp \
Joe Onorato6396e702012-05-31 23:21:46 -0700321 libminui \
322 libcutils \
323 libstdc++ \
324 libc
Doug Zongkerdaefc1d2011-10-31 09:34:15 -0700325include $(BUILD_EXECUTABLE)
Doug Zongker73ae31c2009-12-09 17:01:45 -0800326
Dees_Troy2673cec2013-04-02 20:22:16 +0000327include $(CLEAR_VARS)
328
329LOCAL_MODULE := libaosprecovery
330LOCAL_MODULE_TAGS := eng
331LOCAL_MODULES_TAGS = optional
Dees Troybb4c0cb2013-11-02 20:25:14 +0000332LOCAL_C_INCLUDES := bootable/recovery/libmincrypt/includes
that7e303cf2014-03-06 07:57:43 +0100333LOCAL_SRC_FILES = adb_install.cpp bootloader.cpp verifier.cpp mtdutils/mtdutils.c legacy_property_service.c
Dees_Troy2673cec2013-04-02 20:22:16 +0000334LOCAL_SHARED_LIBRARIES += libc liblog libcutils libmtdutils
Dees Troybb4c0cb2013-11-02 20:25:14 +0000335LOCAL_STATIC_LIBRARIES += libmincrypttwrp
Dees_Troy2673cec2013-04-02 20:22:16 +0000336
337include $(BUILD_SHARED_LIBRARY)
338
Dees_Troy51a0e822012-09-05 15:24:24 -0400339commands_recovery_local_path := $(LOCAL_PATH)
Joe Onorato6396e702012-05-31 23:21:46 -0700340include $(LOCAL_PATH)/minui/Android.mk \
341 $(LOCAL_PATH)/minelf/Android.mk \
Joe Onorato6396e702012-05-31 23:21:46 -0700342 $(LOCAL_PATH)/minadbd/Android.mk \
Joe Onorato6396e702012-05-31 23:21:46 -0700343 $(LOCAL_PATH)/tools/Android.mk \
344 $(LOCAL_PATH)/edify/Android.mk \
345 $(LOCAL_PATH)/updater/Android.mk \
346 $(LOCAL_PATH)/applypatch/Android.mk
Dees_Troy51a0e822012-09-05 15:24:24 -0400347
348#includes for TWRP
Dees_Troy930bf012013-08-10 22:19:03 +0000349include $(commands_recovery_local_path)/injecttwrp/Android.mk \
Dees_Troy51a0e822012-09-05 15:24:24 -0400350 $(commands_recovery_local_path)/htcdumlock/Android.mk \
Dees_Troy51a0e822012-09-05 15:24:24 -0400351 $(commands_recovery_local_path)/gui/Android.mk \
352 $(commands_recovery_local_path)/mmcutils/Android.mk \
353 $(commands_recovery_local_path)/bmlutils/Android.mk \
Dees_Troy51a0e822012-09-05 15:24:24 -0400354 $(commands_recovery_local_path)/prebuilt/Android.mk \
355 $(commands_recovery_local_path)/mtdutils/Android.mk \
bigbiff bigbiff9c754052013-01-09 09:09:08 -0500356 $(commands_recovery_local_path)/flashutils/Android.mk \
Dees_Troy51a0e822012-09-05 15:24:24 -0400357 $(commands_recovery_local_path)/pigz/Android.mk \
bigbiff bigbiff9c754052013-01-09 09:09:08 -0500358 $(commands_recovery_local_path)/dosfstools/Android.mk \
359 $(commands_recovery_local_path)/libtar/Android.mk \
Dees_Troy51a0e822012-09-05 15:24:24 -0400360 $(commands_recovery_local_path)/crypto/cryptsettings/Android.mk \
a39552696ff55ce2013-01-08 16:14:56 +0000361 $(commands_recovery_local_path)/crypto/cryptfs/Android.mk \
Dees_Troyb9d88ac2012-09-14 14:34:19 -0400362 $(commands_recovery_local_path)/libcrecovery/Android.mk \
Dees_Troy2673cec2013-04-02 20:22:16 +0000363 $(commands_recovery_local_path)/libblkid/Android.mk \
Dees_Troy83bd4832013-05-04 12:39:56 +0000364 $(commands_recovery_local_path)/minuitwrp/Android.mk \
Dees Troy8d66f8b2013-10-08 14:04:55 +0000365 $(commands_recovery_local_path)/openaes/Android.mk \
Dees Troybb4c0cb2013-11-02 20:25:14 +0000366 $(commands_recovery_local_path)/toolbox/Android.mk \
Ethan Yonker50381972014-02-11 11:44:06 -0600367 $(commands_recovery_local_path)/libmincrypt/Android.mk \
368 $(commands_recovery_local_path)/twrpTarMain/Android.mk
Dees_Troyb9d88ac2012-09-14 14:34:19 -0400369
a39552696ff55ce2013-01-08 16:14:56 +0000370ifeq ($(TW_INCLUDE_CRYPTO_SAMSUNG), true)
371 include $(commands_recovery_local_path)/crypto/libcrypt_samsung/Android.mk
372endif
Dees_Troy51a0e822012-09-05 15:24:24 -0400373
374ifeq ($(TW_INCLUDE_JB_CRYPTO), true)
Dees_Troy2673cec2013-04-02 20:22:16 +0000375 include $(commands_recovery_local_path)/crypto/jb/Android.mk
Dees_Troy51a0e822012-09-05 15:24:24 -0400376 include $(commands_recovery_local_path)/crypto/fs_mgr/Android.mk
Dees Troy4dff2e62013-11-10 04:11:43 +0000377 include $(commands_recovery_local_path)/crypto/logwrapper/Android.mk
378 include $(commands_recovery_local_path)/crypto/scrypt/Android.mk
Dees Troy89310072013-11-11 15:14:14 +0000379 include $(commands_recovery_local_path)/crypto/crypttools/Android.mk
Dees_Troy51a0e822012-09-05 15:24:24 -0400380endif
Ethan Yonker3d2baac2014-01-27 22:03:00 -0600381ifeq ($(TWHAVE_SELINUX), true)
Dees Troyb7ae0982013-09-10 20:47:35 +0000382 include $(commands_recovery_local_path)/minzip/Android.mk
383else
384 include $(commands_recovery_local_path)/minzipold/Android.mk
385endif
Vojtech Bocek7cc278b2013-02-24 01:40:19 +0100386ifeq ($(BUILD_ID), GINGERBREAD)
387 TW_NO_EXFAT := true
388endif
Dees_Troyb05ddee2013-01-28 20:24:50 +0000389ifneq ($(TW_NO_EXFAT), true)
390 include $(commands_recovery_local_path)/exfat/exfat-fuse/Android.mk \
391 $(commands_recovery_local_path)/exfat/mkfs/Android.mk \
392 $(commands_recovery_local_path)/fuse/Android.mk \
393 $(commands_recovery_local_path)/exfat/libexfat/Android.mk
bigbiff bigbiff9c754052013-01-09 09:09:08 -0500394endif
Dees_Troy2673cec2013-04-02 20:22:16 +0000395ifeq ($(TW_INCLUDE_CRYPTO), true)
396 include $(commands_recovery_local_path)/crypto/ics/Android.mk
397endif
bigbiff bigbiff9c754052013-01-09 09:09:08 -0500398
Talustus3019a912013-04-06 11:50:07 +0200399# FB2PNG
400ifeq ($(TW_INCLUDE_FB2PNG), true)
401 include $(commands_recovery_local_path)/fb2png/Android.mk
402endif
403
Dees_Troy51a0e822012-09-05 15:24:24 -0400404commands_recovery_local_path :=