Android.mk 25 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
# Copyright (C) 2007 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

15 16
LOCAL_PATH := $(call my-dir)

17 18 19
ifdef project-path-for
    ifeq ($(LOCAL_PATH),$(call project-path-for,recovery))
        PROJECT_PATH_AGREES := true
Andrea Mennillo's avatar
Andrea Mennillo committed
20
        BOARD_SEPOLICY_DIRS += $(call project-path-for,recovery)/sepolicy
21 22 23 24
    endif
else
    ifeq ($(LOCAL_PATH),bootable/recovery)
        PROJECT_PATH_AGREES := true
25
        BOARD_SEPOLICY_DIRS += bootable/recovery/sepolicy
26
    endif
27 28
endif

29
ifeq ($(PROJECT_PATH_AGREES),true)
30

31
ifneq (,$(filter $(PLATFORM_SDK_VERSION), 21 22))
32
# Make recovery domain permissive for TWRP
that's avatar
that committed
33 34
    BOARD_SEPOLICY_UNION += twrp.te
endif
35

36 37
include $(CLEAR_VARS)

38
TWRES_PATH := /twres/
39 40
TWHTCD_PATH := $(TWRES_PATH)htcd/

Dees_Troy's avatar
Dees_Troy committed
41
TARGET_RECOVERY_GUI := true
42

bigbiff bigbiff's avatar
bigbiff bigbiff committed
43 44 45 46 47 48
ifneq ($(TW_DEVICE_VERSION),)
    LOCAL_CFLAGS += -DTW_DEVICE_VERSION='"-$(TW_DEVICE_VERSION)"'
else
    LOCAL_CFLAGS += -DTW_DEVICE_VERSION='"-0"'
endif

49
LOCAL_SRC_FILES := \
50
    twrp.cpp \
51
    fixContexts.cpp \
52
    twrpTar.cpp \
53
    exclude.cpp \
54
    find_file.cpp \
bigbiff bigbiff's avatar
bigbiff bigbiff committed
55
    infomanager.cpp \
Dees_Troy's avatar
Dees_Troy committed
56 57 58
    data.cpp \
    partition.cpp \
    partitionmanager.cpp \
59
    progresstracking.cpp \
60
    twinstall.cpp \
61
    twrp-functions.cpp \
bigbiff bigbiff's avatar
bigbiff bigbiff committed
62
    twrpDigestDriver.cpp \
Dees_Troy's avatar
Dees_Troy committed
63
    openrecoveryscript.cpp \
64 65
    tarWrite.c \
    twrpAdbBuFifo.cpp
Dees_Troy's avatar
Dees_Troy committed
66

Dees_Troy's avatar
Dees_Troy committed
67
ifneq ($(TARGET_RECOVERY_REBOOT_SRC),)
Dees_Troy's avatar
Dees_Troy committed
68 69 70
  LOCAL_SRC_FILES += $(TARGET_RECOVERY_REBOOT_SRC)
endif

71 72
LOCAL_MODULE := recovery

Dees_Troy's avatar
Dees_Troy committed
73
#LOCAL_FORCE_STATIC_EXECUTABLE := true
74

Ethan Yonker's avatar
Ethan Yonker committed
75
#ifeq ($(TARGET_USERIMAGES_USE_F2FS),true)
76 77 78
#ifeq ($(HOST_OS),linux)
#LOCAL_REQUIRED_MODULES := mkfs.f2fs
#endif
Ethan Yonker's avatar
Ethan Yonker committed
79
#endif
80

81
RECOVERY_API_VERSION := 3
82
RECOVERY_FSTAB_VERSION := 2
83
LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION)
84
LOCAL_CFLAGS += -Wno-unused-parameter
Tao Bao's avatar
Tao Bao committed
85
LOCAL_CLANG := true
86

Dees_Troy's avatar
Dees_Troy committed
87
#LOCAL_STATIC_LIBRARIES := \
Dees_Troy's avatar
Dees_Troy committed
88 89
#    libext4_utils_static \
#    libsparse_static \
Dees_Troy's avatar
Dees_Troy committed
90
#    libminzip \
Dees_Troy's avatar
Dees_Troy committed
91
#    libz \
Dees_Troy's avatar
Dees_Troy committed
92 93 94
#    libmtdutils \
#    libmincrypt \
#    libminadbd \
Dees_Troy's avatar
Dees_Troy committed
95 96 97 98 99 100 101 102 103 104
#    libminui \
#    libpixelflinger_static \
#    libpng \
#    libfs_mgr \
#    libcutils \
#    liblog \
#    libselinux \
#    libstdc++ \
#    libm \
#    libc
Dees_Troy's avatar
Dees_Troy committed
105

Dan Albert's avatar
Dan Albert committed
106 107
LOCAL_C_INCLUDES += \
    system/vold \
Ethan Yonker's avatar
Ethan Yonker committed
108
    system/extras \
Dan Albert's avatar
Dan Albert committed
109
    system/core/adb \
bigbiff's avatar
bigbiff committed
110
    system/core/libsparse \
Ethan Yonker's avatar
Ethan Yonker committed
111 112
    external/zlib \
    $(LOCAL_PATH)/bootloader_message_twrp/include
113

bigbiff bigbiff's avatar
bigbiff bigbiff committed
114
LOCAL_C_INCLUDES += bionic
115
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0)
bigbiff bigbiff's avatar
bigbiff bigbiff committed
116 117
    LOCAL_C_INCLUDES += external/stlport/stlport external/openssl/include
else
Ethan Yonker's avatar
Ethan Yonker committed
118
    LOCAL_C_INCLUDES += external/boringssl/include external/libcxx/include
119
endif
Dees_Troy's avatar
Dees_Troy committed
120 121 122 123

LOCAL_STATIC_LIBRARIES :=
LOCAL_SHARED_LIBRARIES :=

Ethan Yonker's avatar
Ethan Yonker committed
124
LOCAL_STATIC_LIBRARIES += libguitwrp
Ethan Yonker's avatar
Ethan Yonker committed
125 126
LOCAL_SHARED_LIBRARIES += libaosprecovery libz libc libcutils libstdc++ libtar libblkid libminuitwrp libminadbd libmtdutils libtwadbbu libbootloader_message_twrp
LOCAL_SHARED_LIBRARIES += libcrecovery libtwadbbu libtwrpdigest libc++
127

128
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0)
129
    LOCAL_SHARED_LIBRARIES += libstlport
bigbiff bigbiff's avatar
bigbiff bigbiff committed
130
    LOCAL_CFLAGS += -DTW_NO_SHA2_LIBRARY
131 132 133
endif
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 24; echo $$?),0)
    LOCAL_SHARED_LIBRARIES += libmincrypttwrp
134 135
    LOCAL_C_INCLUDES += $(LOCAL_PATH)/libmincrypt/includes
    LOCAL_CFLAGS += -DUSE_OLD_VERIFIER
136
else
Ethan Yonker's avatar
Ethan Yonker committed
137
    LOCAL_SHARED_LIBRARIES += libcrypto
138 139 140 141
endif

ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 24; echo $$?),0)
    LOCAL_SHARED_LIBRARIES += libbase
142
endif
143

Ethan Yonker's avatar
Ethan Yonker committed
144 145 146 147 148 149 150
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 26; echo $$?),0)
   LOCAL_SHARED_LIBRARIES += libziparchive
else
    LOCAL_SHARED_LIBRARIES += libminzip
    LOCAL_CFLAGS += -DUSE_MINZIP
endif

Dees_Troy's avatar
Dees_Troy committed
151 152 153 154
ifneq ($(wildcard system/core/libsparse/Android.mk),)
LOCAL_SHARED_LIBRARIES += libsparse
endif

Ethan Yonker's avatar
Ethan Yonker committed
155 156 157 158 159
ifeq ($(TW_OEM_BUILD),true)
    LOCAL_CFLAGS += -DTW_OEM_BUILD
    BOARD_HAS_NO_REAL_SDCARD := true
    TW_USE_TOOLBOX := true
    TW_EXCLUDE_SUPERSU := true
bigbiff bigbiff's avatar
bigbiff bigbiff committed
160
    TW_EXCLUDE_MTP := true
Ethan Yonker's avatar
Ethan Yonker committed
161
endif
162

163
ifeq ($(TARGET_USERIMAGES_USE_EXT4), true)
164 165
    LOCAL_CFLAGS += -DUSE_EXT4
    LOCAL_C_INCLUDES += system/extras/ext4_utils
Dees_Troy's avatar
Dees_Troy committed
166
    LOCAL_SHARED_LIBRARIES += libext4_utils
167
    ifneq ($(wildcard external/lz4/Android.mk),)
168
        #LOCAL_STATIC_LIBRARIES += liblz4
169
    endif
170
endif
171 172
LOCAL_C_INCLUDES += external/libselinux/include
LOCAL_SHARED_LIBRARIES += libselinux
Ethan Yonker's avatar
Ethan Yonker committed
173 174 175 176 177 178 179 180
#ifneq ($(TARGET_USERIMAGES_USE_EXT4), true)
#    LOCAL_CFLAGS += -DUSE_EXT4
#    LOCAL_C_INCLUDES += system/extras/ext4_utils
#    LOCAL_SHARED_LIBRARIES += libext4_utils
#    ifneq ($(wildcard external/lz4/Android.mk),)
#        LOCAL_STATIC_LIBRARIES += liblz4
#    endif
#endif
181

182 183
ifeq ($(AB_OTA_UPDATER),true)
    LOCAL_CFLAGS += -DAB_OTA_UPDATER=1
Ethan Yonker's avatar
Ethan Yonker committed
184 185
    LOCAL_SHARED_LIBRARIES += libhardware
    LOCAL_ADDITIONAL_DEPENDENCIES += libhardware
186 187
endif

188
LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
189

Dees_Troy's avatar
Dees_Troy committed
190
#ifeq ($(TARGET_RECOVERY_UI_LIB),)
191
#  LOCAL_SRC_FILES += default_device.cpp
Dees_Troy's avatar
Dees_Troy committed
192 193 194
#else
#  LOCAL_STATIC_LIBRARIES += $(TARGET_RECOVERY_UI_LIB)
#endif
195

196 197
LOCAL_C_INCLUDES += system/extras/ext4_utils

198 199 200 201 202 203
tw_git_revision := $(shell git -C $(LOCAL_PATH) rev-parse --short=8 HEAD 2>/dev/null)
ifeq ($(shell git -C $(LOCAL_PATH) diff --quiet; echo $$?),1)
    tw_git_revision := $(tw_git_revision)-dirty
endif
LOCAL_CFLAGS += -DTW_GIT_REVISION='"$(tw_git_revision)"'

Dees_Troy's avatar
Dees_Troy committed
204
#TWRP Build Flags
bigbiff bigbiff's avatar
bigbiff bigbiff committed
205 206 207 208
ifeq ($(TW_EXCLUDE_MTP),)
    LOCAL_SHARED_LIBRARIES += libtwrpmtp
    LOCAL_CFLAGS += -DTW_HAS_MTP
endif
Ricardo Gomez's avatar
Ricardo Gomez committed
209 210 211
ifneq ($(TW_NO_SCREEN_TIMEOUT),)
    LOCAL_CFLAGS += -DTW_NO_SCREEN_TIMEOUT
endif
Dees_Troy's avatar
Dees_Troy committed
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235
ifeq ($(BOARD_HAS_NO_REAL_SDCARD), true)
    LOCAL_CFLAGS += -DBOARD_HAS_NO_REAL_SDCARD
endif
ifneq ($(RECOVERY_SDCARD_ON_DATA),)
	LOCAL_CFLAGS += -DRECOVERY_SDCARD_ON_DATA
endif
ifneq ($(TW_INCLUDE_DUMLOCK),)
	LOCAL_CFLAGS += -DTW_INCLUDE_DUMLOCK
endif
ifneq ($(TW_INTERNAL_STORAGE_PATH),)
	LOCAL_CFLAGS += -DTW_INTERNAL_STORAGE_PATH=$(TW_INTERNAL_STORAGE_PATH)
endif
ifneq ($(TW_INTERNAL_STORAGE_MOUNT_POINT),)
	LOCAL_CFLAGS += -DTW_INTERNAL_STORAGE_MOUNT_POINT=$(TW_INTERNAL_STORAGE_MOUNT_POINT)
endif
ifneq ($(TW_EXTERNAL_STORAGE_PATH),)
	LOCAL_CFLAGS += -DTW_EXTERNAL_STORAGE_PATH=$(TW_EXTERNAL_STORAGE_PATH)
endif
ifneq ($(TW_EXTERNAL_STORAGE_MOUNT_POINT),)
	LOCAL_CFLAGS += -DTW_EXTERNAL_STORAGE_MOUNT_POINT=$(TW_EXTERNAL_STORAGE_MOUNT_POINT)
endif
ifeq ($(TW_HAS_NO_RECOVERY_PARTITION), true)
    LOCAL_CFLAGS += -DTW_HAS_NO_RECOVERY_PARTITION
endif
236 237 238
ifeq ($(TW_HAS_NO_BOOT_PARTITION), true)
    LOCAL_CFLAGS += -DTW_HAS_NO_BOOT_PARTITION
endif
Dees_Troy's avatar
Dees_Troy committed
239 240 241 242 243 244 245 246 247
ifeq ($(TW_NO_REBOOT_BOOTLOADER), true)
    LOCAL_CFLAGS += -DTW_NO_REBOOT_BOOTLOADER
endif
ifeq ($(TW_NO_REBOOT_RECOVERY), true)
    LOCAL_CFLAGS += -DTW_NO_REBOOT_RECOVERY
endif
ifeq ($(TW_NO_BATT_PERCENT), true)
    LOCAL_CFLAGS += -DTW_NO_BATT_PERCENT
endif
Jenkins's avatar
Jenkins committed
248 249 250
ifeq ($(TW_NO_CPU_TEMP), true)
    LOCAL_CFLAGS += -DTW_NO_CPU_TEMP
endif
Dees_Troy's avatar
Dees_Troy committed
251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280
ifneq ($(TW_CUSTOM_POWER_BUTTON),)
	LOCAL_CFLAGS += -DTW_CUSTOM_POWER_BUTTON=$(TW_CUSTOM_POWER_BUTTON)
endif
ifeq ($(TW_ALWAYS_RMRF), true)
    LOCAL_CFLAGS += -DTW_ALWAYS_RMRF
endif
ifeq ($(TW_NEVER_UNMOUNT_SYSTEM), true)
    LOCAL_CFLAGS += -DTW_NEVER_UNMOUNT_SYSTEM
endif
ifeq ($(TW_NO_USB_STORAGE), true)
    LOCAL_CFLAGS += -DTW_NO_USB_STORAGE
endif
ifeq ($(TW_INCLUDE_INJECTTWRP), true)
    LOCAL_CFLAGS += -DTW_INCLUDE_INJECTTWRP
endif
ifeq ($(TW_INCLUDE_BLOBPACK), true)
    LOCAL_CFLAGS += -DTW_INCLUDE_BLOBPACK
endif
ifneq ($(TARGET_USE_CUSTOM_LUN_FILE_PATH),)
    LOCAL_CFLAGS += -DCUSTOM_LUN_FILE=\"$(TARGET_USE_CUSTOM_LUN_FILE_PATH)\"
endif
ifneq ($(BOARD_UMS_LUNFILE),)
    LOCAL_CFLAGS += -DCUSTOM_LUN_FILE=\"$(BOARD_UMS_LUNFILE)\"
endif
#ifeq ($(TW_FLASH_FROM_STORAGE), true) Making this the default behavior
    LOCAL_CFLAGS += -DTW_FLASH_FROM_STORAGE
#endif
ifeq ($(TW_HAS_DOWNLOAD_MODE), true)
    LOCAL_CFLAGS += -DTW_HAS_DOWNLOAD_MODE
endif
bigbiff bigbiff's avatar
bigbiff bigbiff committed
281 282 283
ifeq ($(TW_NO_SCREEN_BLANK), true)
    LOCAL_CFLAGS += -DTW_NO_SCREEN_BLANK
endif
Dees_Troy's avatar
Dees_Troy committed
284 285 286
ifeq ($(TW_SDEXT_NO_EXT4), true)
    LOCAL_CFLAGS += -DTW_SDEXT_NO_EXT4
endif
287 288 289
ifeq ($(TW_FORCE_CPUINFO_FOR_DEVICE_ID), true)
    LOCAL_CFLAGS += -DTW_FORCE_CPUINFO_FOR_DEVICE_ID
endif
Dees_Troy's avatar
Dees_Troy committed
290 291 292
ifeq ($(TW_NO_EXFAT_FUSE), true)
    LOCAL_CFLAGS += -DTW_NO_EXFAT_FUSE
endif
Dees_Troy's avatar
Dees_Troy committed
293
ifeq ($(TW_INCLUDE_JB_CRYPTO), true)
294
    TW_INCLUDE_CRYPTO := true
Dees_Troy's avatar
Dees_Troy committed
295
endif
Ethan Yonker's avatar
Ethan Yonker committed
296
ifeq ($(TW_INCLUDE_L_CRYPTO), true)
297 298 299
    TW_INCLUDE_CRYPTO := true
endif
ifeq ($(TW_INCLUDE_CRYPTO), true)
Ethan Yonker's avatar
Ethan Yonker committed
300
    LOCAL_CFLAGS += -DTW_INCLUDE_CRYPTO
Ethan Yonker's avatar
Ethan Yonker committed
301
    LOCAL_SHARED_LIBRARIES += libcryptfslollipop libgpt_twrp
302
    LOCAL_C_INCLUDES += external/boringssl/src/include
Ethan Yonker's avatar
Ethan Yonker committed
303 304 305 306 307
    ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 24; echo $$?),0)
        TW_INCLUDE_CRYPTO_FBE := true
        LOCAL_CFLAGS += -DTW_INCLUDE_FBE
        LOCAL_SHARED_LIBRARIES += libe4crypt
    endif
308 309 310 311 312 313
    ifneq ($(TW_CRYPTO_USE_SYSTEM_VOLD),)
    ifneq ($(TW_CRYPTO_USE_SYSTEM_VOLD),false)
        LOCAL_CFLAGS += -DTW_CRYPTO_USE_SYSTEM_VOLD
        LOCAL_STATIC_LIBRARIES += libvolddecrypt
    endif
    endif
Ethan Yonker's avatar
Ethan Yonker committed
314
endif
315
WITH_CRYPTO_UTILS := \
Ethan Yonker's avatar
Ethan Yonker committed
316
    $(if $(wildcard system/core/libcrypto_utils/android_pubkey.c),true)
317 318 319
ifeq ($(TW_USE_MODEL_HARDWARE_ID_FOR_DEVICE_ID), true)
    LOCAL_CFLAGS += -DTW_USE_MODEL_HARDWARE_ID_FOR_DEVICE_ID
endif
320 321 322
ifneq ($(TW_BRIGHTNESS_PATH),)
	LOCAL_CFLAGS += -DTW_BRIGHTNESS_PATH=$(TW_BRIGHTNESS_PATH)
endif
323 324 325
ifneq ($(TW_SECONDARY_BRIGHTNESS_PATH),)
	LOCAL_CFLAGS += -DTW_SECONDARY_BRIGHTNESS_PATH=$(TW_SECONDARY_BRIGHTNESS_PATH)
endif
326 327 328
ifneq ($(TW_MAX_BRIGHTNESS),)
	LOCAL_CFLAGS += -DTW_MAX_BRIGHTNESS=$(TW_MAX_BRIGHTNESS)
endif
329 330 331
ifneq ($(TW_DEFAULT_BRIGHTNESS),)
	LOCAL_CFLAGS += -DTW_DEFAULT_BRIGHTNESS=$(TW_DEFAULT_BRIGHTNESS)
endif
332 333 334
ifneq ($(TW_CUSTOM_BATTERY_PATH),)
	LOCAL_CFLAGS += -DTW_CUSTOM_BATTERY_PATH=$(TW_CUSTOM_BATTERY_PATH)
endif
Jenkins's avatar
Jenkins committed
335 336 337
ifneq ($(TW_CUSTOM_CPU_TEMP_PATH),)
	LOCAL_CFLAGS += -DTW_CUSTOM_CPU_TEMP_PATH=$(TW_CUSTOM_CPU_TEMP_PATH)
endif
Dees_Troy's avatar
Dees_Troy committed
338 339 340 341 342
ifneq ($(TW_EXCLUDE_ENCRYPTED_BACKUPS), true)
    LOCAL_SHARED_LIBRARIES += libopenaes
else
    LOCAL_CFLAGS += -DTW_EXCLUDE_ENCRYPTED_BACKUPS
endif
343
ifeq ($(TARGET_RECOVERY_QCOM_RTC_FIX),)
344 345 346
  ifneq ($(filter msm8226 msm8x26 msm8610 msm8974 msm8x74 msm8084 msm8x84 apq8084 msm8909 msm8916 msm8992 msm8994 msm8952 msm8996 msm8937 msm8953 msm8998,$(TARGET_BOARD_PLATFORM)),)
    LOCAL_CFLAGS += -DQCOM_RTC_FIX
  else ifeq ($(TARGET_CPU_VARIANT),krait)
347 348 349 350 351
    LOCAL_CFLAGS += -DQCOM_RTC_FIX
  endif
else ifeq ($(TARGET_RECOVERY_QCOM_RTC_FIX),true)
    LOCAL_CFLAGS += -DQCOM_RTC_FIX
endif
352 353 354
ifneq ($(TW_NO_LEGACY_PROPS),)
	LOCAL_CFLAGS += -DTW_NO_LEGACY_PROPS
endif
355 356 357
ifneq ($(wildcard bionic/libc/include/sys/capability.h),)
    LOCAL_CFLAGS += -DHAVE_CAPABILITIES
endif
358 359 360
ifneq ($(TARGET_RECOVERY_INITRC),)
    TW_EXCLUDE_DEFAULT_USB_INIT := true
endif
361 362 363
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 22; echo $$?),0)
    LOCAL_CFLAGS += -DTW_USE_NEW_MINADBD
endif
Ethan Yonker's avatar
Ethan Yonker committed
364 365 366 367 368
ifneq ($(TW_DEFAULT_LANGUAGE),)
    LOCAL_CFLAGS += -DTW_DEFAULT_LANGUAGE=$(TW_DEFAULT_LANGUAGE)
else
    LOCAL_CFLAGS += -DTW_DEFAULT_LANGUAGE=en
endif
369

Ethan Yonker's avatar
Ethan Yonker committed
370
LOCAL_ADDITIONAL_DEPENDENCIES += \
371 372 373 374 375 376
    dump_image \
    erase_image \
    flash_image \
    mke2fs.conf \
    pigz \
    teamwin \
377
    toolbox_symlinks \
378
    twrp \
Matt Mower's avatar
Matt Mower committed
379 380 381
    fsck.fat \
    fatlabel \
    mkfs.fat \
HashBang's avatar
HashBang committed
382
    permissive.sh \
383
    simg2img_twrp \
Ethan Yonker's avatar
Ethan Yonker committed
384 385
    libbootloader_message_twrp \
    init.recovery.hlthchrg.rc \
386
    init.recovery.service.rc
387

Ethan Yonker's avatar
Ethan Yonker committed
388
ifneq ($(TARGET_ARCH), arm64)
389 390 391 392 393
    ifneq ($(TARGET_ARCH), x86_64)
        LOCAL_LDFLAGS += -Wl,-dynamic-linker,/sbin/linker
    else
        LOCAL_LDFLAGS += -Wl,-dynamic-linker,/sbin/linker64
    endif
Ethan Yonker's avatar
Ethan Yonker committed
394 395
else
    LOCAL_LDFLAGS += -Wl,-dynamic-linker,/sbin/linker64
Ethan Yonker's avatar
Ethan Yonker committed
396 397 398
endif
ifneq ($(TW_USE_TOOLBOX), true)
    LOCAL_ADDITIONAL_DEPENDENCIES += busybox_symlinks
399 400 401 402 403
    ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 24; echo $$?),0)
        LOCAL_POST_INSTALL_CMD := \
            $(hide) mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/sbin && \
            ln -sf /sbin/busybox $(TARGET_RECOVERY_ROOT_OUT)/sbin/sh
    endif
404
else
405 406 407
    ifneq ($(wildcard external/toybox/Android.mk),)
        LOCAL_ADDITIONAL_DEPENDENCIES += toybox_symlinks
    endif
408 409 410 411 412 413
    ifneq ($(wildcard external/zip/Android.mk),)
        LOCAL_ADDITIONAL_DEPENDENCIES += zip
    endif
    ifneq ($(wildcard external/unzip/Android.mk),)
        LOCAL_ADDITIONAL_DEPENDENCIES += unzip
    endif
Ethan Yonker's avatar
Ethan Yonker committed
414
endif
415

416
ifneq ($(TW_NO_EXFAT), true)
417
    LOCAL_ADDITIONAL_DEPENDENCIES += mkexfatfs fsckexfat
Ethan Yonker's avatar
Ethan Yonker committed
418 419 420
    ifneq ($(TW_NO_EXFAT_FUSE), true)
        LOCAL_ADDITIONAL_DEPENDENCIES += exfat-fuse
    endif
421
endif
422
ifeq ($(BOARD_HAS_NO_REAL_SDCARD),)
423 424 425 426 427
    ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 22; echo $$?),0)
        LOCAL_ADDITIONAL_DEPENDENCIES += sgdisk
    else
        LOCAL_ADDITIONAL_DEPENDENCIES += sgdisk_static
    endif
428 429
endif
ifneq ($(TW_EXCLUDE_ENCRYPTED_BACKUPS), true)
Ethan Yonker's avatar
Ethan Yonker committed
430
    LOCAL_ADDITIONAL_DEPENDENCIES += openaes openaes_license
431 432 433 434 435 436 437 438
endif
ifeq ($(TW_INCLUDE_DUMLOCK), true)
    LOCAL_ADDITIONAL_DEPENDENCIES += \
        htcdumlock htcdumlocksys flash_imagesys dump_imagesys libbmlutils.so \
        libflashutils.so libmmcutils.so libmtdutils.so HTCDumlock.apk
endif
ifneq ($(TW_EXCLUDE_SUPERSU), true)
    LOCAL_ADDITIONAL_DEPENDENCIES += \
439 440 441 442 443 444 445 446 447
        install-recovery.sh 99SuperSUDaemon Superuser.apk
    ifeq ($(TARGET_ARCH), arm)
        LOCAL_ADDITIONAL_DEPENDENCIES += \
            chattr.pie libsupol.so suarm supolicy
    endif
    ifeq ($(TARGET_ARCH), arm64)
        LOCAL_ADDITIONAL_DEPENDENCIES += \
            libsupol.soarm64 suarm64 supolicyarm64
    endif
448 449 450 451 452 453 454 455 456 457 458 459 460
endif
ifeq ($(TW_INCLUDE_FB2PNG), true)
    LOCAL_ADDITIONAL_DEPENDENCIES += fb2png
endif
ifneq ($(TW_OEM_BUILD),true)
    LOCAL_ADDITIONAL_DEPENDENCIES += orscmd
endif
ifeq ($(BOARD_USES_BML_OVER_MTD),true)
    LOCAL_ADDITIONAL_DEPENDENCIES += bml_over_mtd
endif
ifeq ($(TW_INCLUDE_INJECTTWRP), true)
    LOCAL_ADDITIONAL_DEPENDENCIES += injecttwrp
endif
461 462 463
ifneq ($(TW_EXCLUDE_DEFAULT_USB_INIT), true)
    LOCAL_ADDITIONAL_DEPENDENCIES += init.recovery.usb.rc
endif
464 465
ifeq ($(TWRP_INCLUDE_LOGCAT), true)
    LOCAL_ADDITIONAL_DEPENDENCIES += logcat
Ethan Yonker's avatar
Ethan Yonker committed
466 467 468
    ifeq ($(TARGET_USES_LOGD), true)
        LOCAL_ADDITIONAL_DEPENDENCIES += logd libsysutils libnl init.recovery.logd.rc
    endif
469
endif
470 471 472 473
# Allow devices to specify device-specific recovery dependencies
ifneq ($(TARGET_RECOVERY_DEVICE_MODULES),)
    LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_RECOVERY_DEVICE_MODULES)
endif
474 475
LOCAL_CFLAGS += -DTWRES=\"$(TWRES_PATH)\"
LOCAL_CFLAGS += -DTWHTCD_PATH=\"$(TWHTCD_PATH)\"
Ethan Yonker's avatar
Ethan Yonker committed
476
ifeq ($(TW_INCLUDE_NTFS_3G),true)
477
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 22; echo $$?),0)
478 479 480 481 482
    LOCAL_ADDITIONAL_DEPENDENCIES += \
        mount.ntfs \
        fsck.ntfs \
        mkfs.ntfs
else
Ethan Yonker's avatar
Ethan Yonker committed
483 484 485 486 487
    LOCAL_ADDITIONAL_DEPENDENCIES += \
        ntfs-3g \
        ntfsfix \
        mkntfs
endif
488
endif
489 490 491 492 493 494 495
ifeq ($(TARGET_USERIMAGES_USE_F2FS), true)
ifeq ($(shell test $(CM_PLATFORM_SDK_VERSION) -ge 3; echo $$?),0)
    LOCAL_ADDITIONAL_DEPENDENCIES += \
        fsck.f2fs \
        mkfs.f2fs
endif
endif
496

497
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 25; echo $$?),0)
498
    LOCAL_ADDITIONAL_DEPENDENCIES += file_contexts_text
499 500
endif

501 502 503 504
ifeq ($(BOARD_CACHEIMAGE_PARTITION_SIZE),)
LOCAL_REQUIRED_MODULES := recovery-persist recovery-refresh
endif

505 506
include $(BUILD_EXECUTABLE)

507 508 509
# Symlink for file_contexts
include $(CLEAR_VARS)

510
LOCAL_MODULE := file_contexts_text
511
LOCAL_MODULE_TAGS := optional
512
LOCAL_REQUIRED_MODULES := file_contexts.bin
513
LOCAL_POST_INSTALL_CMD := \
514
    $(hide) cp -f $(OUT)/obj/ETC/file_contexts.bin_intermediates/file_contexts.concat.tmp $(TARGET_RECOVERY_ROOT_OUT)/file_contexts
515 516 517

include $(BUILD_PHONY_PACKAGE)

518
ifneq ($(TW_USE_TOOLBOX), true)
519 520 521
include $(CLEAR_VARS)
# Create busybox symlinks... gzip and gunzip are excluded because those need to link to pigz instead
BUSYBOX_LINKS := $(shell cat external/busybox/busybox-full.links)
Matt Mower's avatar
Matt Mower committed
522
exclude := tune2fs mke2fs mkdosfs mkfs.vfat gzip gunzip
523

524 525 526 527 528 529 530 531 532 533
# Having /sbin/modprobe present on 32 bit devices with can cause a massive
# performance problem if the kernel has CONFIG_MODULES=y
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 22; echo $$?),0)
    ifneq ($(TARGET_ARCH), arm64)
        ifneq ($(TARGET_ARCH), x86_64)
            exclude += modprobe
        endif
    endif
endif

534 535
# If busybox does not have restorecon, assume it does not have SELinux support.
# Then, let toolbox provide 'ls' so -Z is available to list SELinux contexts.
536 537
ifeq ($(filter restorecon, $(notdir $(BUSYBOX_LINKS))),)
    exclude += ls
Dees Troy's avatar
Dees Troy committed
538
endif
539 540 541

RECOVERY_BUSYBOX_TOOLS := $(filter-out $(exclude), $(notdir $(BUSYBOX_LINKS)))
RECOVERY_BUSYBOX_SYMLINKS := $(addprefix $(TARGET_RECOVERY_ROOT_OUT)/sbin/, $(RECOVERY_BUSYBOX_TOOLS))
542 543 544 545 546 547 548
$(RECOVERY_BUSYBOX_SYMLINKS): BUSYBOX_BINARY := busybox
$(RECOVERY_BUSYBOX_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
	@echo "Symlink: $@ -> $(BUSYBOX_BINARY)"
	@mkdir -p $(dir $@)
	@rm -rf $@
	$(hide) ln -sf $(BUSYBOX_BINARY) $@

549 550 551 552
include $(CLEAR_VARS)
LOCAL_MODULE := busybox_symlinks
LOCAL_MODULE_TAGS := optional
LOCAL_ADDITIONAL_DEPENDENCIES := $(RECOVERY_BUSYBOX_SYMLINKS)
553 554 555
ifneq (,$(filter $(PLATFORM_SDK_VERSION),16 17 18))
ALL_DEFAULT_INSTALLED_MODULES += $(RECOVERY_BUSYBOX_SYMLINKS)
endif
556 557 558
include $(BUILD_PHONY_PACKAGE)
RECOVERY_BUSYBOX_SYMLINKS :=
endif # !TW_USE_TOOLBOX
559

560 561
# recovery-persist (system partition dynamic executable run after /data mounts)
# ===============================
562 563
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 24; echo $$?),0)
    include $(CLEAR_VARS)
Ethan Yonker's avatar
Ethan Yonker committed
564 565 566
    LOCAL_SRC_FILES := \
        recovery-persist.cpp \
        rotate_logs.cpp
567 568 569 570 571 572
    LOCAL_MODULE := recovery-persist
    LOCAL_SHARED_LIBRARIES := liblog libbase
    LOCAL_CFLAGS := -Werror
    LOCAL_INIT_RC := recovery-persist.rc
    include $(BUILD_EXECUTABLE)
endif
573

574 575
# recovery-refresh (system partition dynamic executable run at init)
# ===============================
576 577
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 24; echo $$?),0)
    include $(CLEAR_VARS)
Ethan Yonker's avatar
Ethan Yonker committed
578 579 580
    LOCAL_SRC_FILES := \
        recovery-refresh.cpp \
        rotate_logs.cpp
581
    LOCAL_MODULE := recovery-refresh
Ethan Yonker's avatar
Ethan Yonker committed
582
    LOCAL_SHARED_LIBRARIES := liblog libbase
583 584 585 586
    LOCAL_CFLAGS := -Werror
    LOCAL_INIT_RC := recovery-refresh.rc
    include $(BUILD_EXECUTABLE)
endif
587

Ethan Yonker's avatar
Ethan Yonker committed
588 589 590 591 592
# shared libfusesideload
# ===============================
include $(CLEAR_VARS)
LOCAL_SRC_FILES := fuse_sideload.cpp
LOCAL_CLANG := true
593 594
LOCAL_CFLAGS := -O2 -g -DADB_HOST=0 -Wall -Wno-unused-parameter
LOCAL_CFLAGS += -D_XOPEN_SOURCE -D_GNU_SOURCE
Ethan Yonker's avatar
Ethan Yonker committed
595

596
LOCAL_MODULE_TAGS := optional
597
LOCAL_MODULE := libfusesideload
598
LOCAL_SHARED_LIBRARIES := libcutils libc
599
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 24; echo $$?),0)
600 601 602 603 604 605
    LOCAL_C_INCLUDES := $(LOCAL_PATH)/libmincrypt/includes
    LOCAL_SHARED_LIBRARIES += libmincrypttwrp
    LOCAL_CFLAGS += -DUSE_MINCRYPT
else
    LOCAL_SHARED_LIBRARIES += libcrypto
endif
606 607
include $(BUILD_SHARED_LIBRARY)

608 609 610 611 612 613 614 615 616
# libmounts (static library)
# ===============================
include $(CLEAR_VARS)
LOCAL_SRC_FILES := mounts.cpp
LOCAL_CLANG := true
LOCAL_CFLAGS := -Wall -Wno-unused-parameter -Werror
LOCAL_MODULE := libmounts
include $(BUILD_STATIC_LIBRARY)

617 618 619 620 621 622 623
# librecovery (static library)
# ===============================
include $(CLEAR_VARS)
LOCAL_SRC_FILES := \
    install.cpp
LOCAL_CFLAGS := -Wno-unused-parameter -Werror
LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION)
624 625 626 627 628

ifeq ($(AB_OTA_UPDATER),true)
    LOCAL_CFLAGS += -DAB_OTA_UPDATER=1
endif

629 630 631
LOCAL_MODULE := librecovery
LOCAL_STATIC_LIBRARIES := \
    libminui \
632
    libvintf_recovery \
633 634 635 636 637 638
    libcrypto_utils \
    libcrypto \
    libbase

include $(BUILD_STATIC_LIBRARY)

Ethan Yonker's avatar
Ethan Yonker committed
639 640
# shared libaosprecovery for Apache code
# ===============================
641 642 643
include $(CLEAR_VARS)

LOCAL_MODULE := libaosprecovery
Matt Mower's avatar
Matt Mower committed
644
LOCAL_MODULE_TAGS := eng optional
645
LOCAL_CFLAGS := -std=gnu++0x
Ethan Yonker's avatar
Ethan Yonker committed
646
LOCAL_SRC_FILES := adb_install.cpp legacy_property_service.cpp set_metadata.cpp tw_atomic.cpp installcommand.cpp zipwrap.cpp
Ethan Yonker's avatar
Ethan Yonker committed
647 648
LOCAL_SHARED_LIBRARIES += libc liblog libcutils libmtdutils libfusesideload libselinux libminzip
LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION)
649
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0)
650
    LOCAL_SHARED_LIBRARIES += libstdc++ libstlport
Ethan Yonker's avatar
Ethan Yonker committed
651
    LOCAL_C_INCLUDES += bionic external/stlport/stlport
652 653 654 655 656
else
    LOCAL_SHARED_LIBRARIES += libc++
endif
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 24; echo $$?),0)
    LOCAL_SHARED_LIBRARIES += libmincrypttwrp
Ethan Yonker's avatar
Ethan Yonker committed
657
    LOCAL_C_INCLUDES += $(LOCAL_PATH)/libmincrypt/includes
Ethan Yonker's avatar
Ethan Yonker committed
658
    LOCAL_SRC_FILES += verifier24/verifier.cpp verifier24/asn1_decoder.cpp
659 660
    LOCAL_CFLAGS += -DUSE_OLD_VERIFIER
else
Ethan Yonker's avatar
Ethan Yonker committed
661
    LOCAL_SHARED_LIBRARIES += libcrypto libbase
Ethan Yonker's avatar
Ethan Yonker committed
662
    LOCAL_SRC_FILES += verifier.cpp asn1_decoder.cpp
663
endif
Ethan Yonker's avatar
Ethan Yonker committed
664 665 666
ifeq ($(AB_OTA_UPDATER),true)
    LOCAL_CFLAGS += -DAB_OTA_UPDATER=1
endif
Ethan Yonker's avatar
Ethan Yonker committed
667 668 669 670 671
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 26; echo $$?),0)
    LOCAL_SRC_FILES += otautil/ZipUtil.cpp otautil/SysUtil.cpp
    LOCAL_SHARED_LIBRARIES += libziparchive libext4_utils libcrypto libcrypto_utils
    LOCAL_STATIC_LIBRARIES += libvintf_recovery libfs_mgr liblogwrap libavb libvintf libtinyxml2 libz
    LOCAL_WHOLE_STATIC_LIBRARIES +=
672
else
Ethan Yonker's avatar
Ethan Yonker committed
673
    LOCAL_CFLAGS += -DUSE_MINZIP
674
endif
675 676 677

include $(BUILD_SHARED_LIBRARY)

678 679
# All the APIs for testing
include $(CLEAR_VARS)
Tao Bao's avatar
Tao Bao committed
680
LOCAL_CLANG := true
681 682 683 684
LOCAL_MODULE := libverifier
LOCAL_MODULE_TAGS := tests
LOCAL_SRC_FILES := \
    asn1_decoder.cpp \
685 686
    verifier.cpp \
    ui.cpp
687
LOCAL_STATIC_LIBRARIES := libcrypto_static
688
include $(BUILD_STATIC_LIBRARY)
689

Dees_Troy's avatar
Dees_Troy committed
690
commands_recovery_local_path := $(LOCAL_PATH)
691
include $(LOCAL_PATH)/tests/Android.mk \
692 693
    $(LOCAL_PATH)/tools/Android.mk \
    $(LOCAL_PATH)/edify/Android.mk \
694
    $(LOCAL_PATH)/otafault/Android.mk \
Ethan Yonker's avatar
Ethan Yonker committed
695
    $(LOCAL_PATH)/bootloader_message/Android.mk \
Ethan Yonker's avatar
Ethan Yonker committed
696
    $(LOCAL_PATH)/bootloader_message_twrp/Android.mk \
697
    $(LOCAL_PATH)/updater/Android.mk \
698
    $(LOCAL_PATH)/update_verifier/Android.mk \
699
    $(LOCAL_PATH)/applypatch/Android.mk
Dees_Troy's avatar
Dees_Troy committed
700

701 702 703 704
ifeq ($(wildcard system/core/uncrypt/Android.mk),)
    include $(commands_recovery_local_path)/uncrypt/Android.mk
endif

705
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 22; echo $$?),0)
Ethan Yonker's avatar
Ethan Yonker committed
706 707 708 709
    ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 26; echo $$?),0)
        TARGET_GLOBAL_CFLAGS += -DTW_USE_MINUI_WITH_DATA
        CLANG_TARGET_GLOBAL_CFLAGS += -DTW_USE_MINUI_WITH_DATA
    endif
710 711 712
    include $(commands_recovery_local_path)/minadbd/Android.mk \
        $(commands_recovery_local_path)/minui/Android.mk
else
Ethan Yonker's avatar
Ethan Yonker committed
713 714 715
    TARGET_GLOBAL_CFLAGS += -DTW_USE_MINUI_21
    include $(commands_recovery_local_path)/minadbd21/Android.mk \
        $(commands_recovery_local_path)/minui21/Android.mk
716 717
endif

Dees_Troy's avatar
Dees_Troy committed
718
#includes for TWRP
719
include $(commands_recovery_local_path)/injecttwrp/Android.mk \
Dees_Troy's avatar
Dees_Troy committed
720 721 722 723 724 725
    $(commands_recovery_local_path)/htcdumlock/Android.mk \
    $(commands_recovery_local_path)/gui/Android.mk \
    $(commands_recovery_local_path)/mmcutils/Android.mk \
    $(commands_recovery_local_path)/bmlutils/Android.mk \
    $(commands_recovery_local_path)/prebuilt/Android.mk \
    $(commands_recovery_local_path)/mtdutils/Android.mk \
726
    $(commands_recovery_local_path)/flashutils/Android.mk \
Dees_Troy's avatar
Dees_Troy committed
727
    $(commands_recovery_local_path)/pigz/Android.mk \
728
    $(commands_recovery_local_path)/libtar/Android.mk \
Dees_Troy's avatar
Dees_Troy committed
729
    $(commands_recovery_local_path)/libcrecovery/Android.mk \
730
    $(commands_recovery_local_path)/libblkid/Android.mk \
Dees_Troy's avatar
Dees_Troy committed
731
    $(commands_recovery_local_path)/minuitwrp/Android.mk \
Ethan Yonker's avatar
Ethan Yonker committed
732
    $(commands_recovery_local_path)/otautil/Android.mk \
Dees Troy's avatar
Dees Troy committed
733
    $(commands_recovery_local_path)/openaes/Android.mk \
734
    $(commands_recovery_local_path)/toolbox/Android.mk \
bigbiff bigbiff's avatar
bigbiff bigbiff committed
735
    $(commands_recovery_local_path)/twrpTarMain/Android.mk \
Ethan Yonker's avatar
Ethan Yonker committed
736
    $(commands_recovery_local_path)/mtp/Android.mk \
737
    $(commands_recovery_local_path)/minzip/Android.mk \
738
    $(commands_recovery_local_path)/dosfstools/Android.mk \
739 740
    $(commands_recovery_local_path)/etc/Android.mk \
    $(commands_recovery_local_path)/toybox/Android.mk \
HashBang's avatar
HashBang committed
741
    $(commands_recovery_local_path)/simg2img/Android.mk \
bigbiff's avatar
bigbiff committed
742
    $(commands_recovery_local_path)/adbbu/Android.mk \
743
    $(commands_recovery_local_path)/libpixelflinger/Android.mk \
bigbiff bigbiff's avatar
bigbiff bigbiff committed
744
    $(commands_recovery_local_path)/twrpDigest/Android.mk \
745
    $(commands_recovery_local_path)/attr/Android.mk
Ethan Yonker's avatar
Ethan Yonker committed
746

747
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 24; echo $$?),0)
748 749 750
    include $(commands_recovery_local_path)/libmincrypt/Android.mk
endif

751
ifeq ($(TW_INCLUDE_CRYPTO), true)
Ethan Yonker's avatar
Ethan Yonker committed
752
    include $(commands_recovery_local_path)/crypto/lollipop/Android.mk
753
    include $(commands_recovery_local_path)/crypto/scrypt/Android.mk
Ethan Yonker's avatar
Ethan Yonker committed
754 755 756
    ifeq ($(TW_INCLUDE_CRYPTO_FBE), true)
        include $(commands_recovery_local_path)/crypto/ext4crypt/Android.mk
    endif
757 758 759 760 761
    ifneq ($(TW_CRYPTO_USE_SYSTEM_VOLD),)
    ifneq ($(TW_CRYPTO_USE_SYSTEM_VOLD),false)
        include $(commands_recovery_local_path)/crypto/vold_decrypt/Android.mk
    endif
    endif
Ethan Yonker's avatar
Ethan Yonker committed
762
    include $(commands_recovery_local_path)/gpt/Android.mk
Ethan Yonker's avatar
Ethan Yonker committed
763
endif
764 765 766
ifeq ($(BUILD_ID), GINGERBREAD)
    TW_NO_EXFAT := true
endif
Dees_Troy's avatar
Dees_Troy committed
767
ifneq ($(TW_NO_EXFAT), true)
Captain Throwback's avatar
Captain Throwback committed
768
    include $(commands_recovery_local_path)/exfat/mkfs/Android.mk \
769
            $(commands_recovery_local_path)/exfat/fsck/Android.mk \
Dees_Troy's avatar
Dees_Troy committed
770 771
            $(commands_recovery_local_path)/fuse/Android.mk \
            $(commands_recovery_local_path)/exfat/libexfat/Android.mk
Ethan Yonker's avatar
Ethan Yonker committed
772 773 774
    ifneq ($(TW_NO_EXFAT_FUSE), true)
        include $(commands_recovery_local_path)/exfat/fuse/Android.mk
    endif
Captain Throwback's avatar
Captain Throwback committed
775
endif
Ethan Yonker's avatar
Ethan Yonker committed
776 777 778
ifneq ($(TW_OEM_BUILD),true)
    include $(commands_recovery_local_path)/orscmd/Android.mk
endif
779

Talustus's avatar
Talustus committed
780 781 782 783
# FB2PNG
ifeq ($(TW_INCLUDE_FB2PNG), true)
    include $(commands_recovery_local_path)/fb2png/Android.mk
endif
784 785 786 787

commands_recovery_local_path :=

endif