diff options
-rwxr-xr-x | Android.mk | 70 | ||||
-rw-r--r-- | crypto/ext4crypt/Android.mk | 6 | ||||
-rw-r--r-- | crypto/scrypt/Scrypt.mk | 12 | ||||
-rw-r--r-- | fb2png/fb.c | 1 | ||||
-rw-r--r-- | fb2png/img_process.c | 16 | ||||
-rw-r--r-- | fb2png/log.h | 4 | ||||
-rw-r--r-- | minui/Android.mk | 6 | ||||
-rw-r--r-- | minuitwrp/Android.mk | 6 | ||||
-rw-r--r-- | partition.cpp | 2 |
9 files changed, 76 insertions, 47 deletions
diff --git a/Android.mk b/Android.mk index a25224428..7ffcd70aa 100755 --- a/Android.mk +++ b/Android.mk @@ -190,7 +190,7 @@ LOCAL_SHARED_LIBRARIES += libselinux ifeq ($(AB_OTA_UPDATER),true) LOCAL_CFLAGS += -DAB_OTA_UPDATER=1 LOCAL_SHARED_LIBRARIES += libhardware android.hardware.boot@1.0 - LOCAL_REQUIRED_MODULES += libhardware + TWRP_REQUIRED_MODULES += libhardware endif LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin @@ -398,7 +398,7 @@ endif ifneq ($(TW_CLOCK_OFFSET),) LOCAL_CFLAGS += -DTW_CLOCK_OFFSET=$(TW_CLOCK_OFFSET) endif -LOCAL_REQUIRED_MODULES += \ +TWRP_REQUIRED_MODULES += \ dump_image \ erase_image \ flash_image \ @@ -433,72 +433,72 @@ ifneq ($(TW_USE_TOOLBOX), true) endif else ifneq ($(wildcard external/toybox/Android.mk),) - LOCAL_REQUIRED_MODULES += toybox_symlinks + TWRP_REQUIRED_MODULES += toybox_symlinks endif ifneq ($(wildcard external/zip/Android.mk),) - LOCAL_REQUIRED_MODULES += zip + TWRP_REQUIRED_MODULES += zip endif ifneq ($(wildcard external/unzip/Android.mk),) - LOCAL_REQUIRED_MODULES += unzip + TWRP_REQUIRED_MODULES += unzip endif endif ifneq ($(TW_NO_EXFAT), true) - LOCAL_REQUIRED_MODULES += mkexfatfs fsckexfat + TWRP_REQUIRED_MODULES += mkexfatfs fsckexfat ifneq ($(TW_NO_EXFAT_FUSE), true) - LOCAL_REQUIRED_MODULES += exfat-fuse + TWRP_REQUIRED_MODULES += exfat-fuse endif endif ifeq ($(BOARD_HAS_NO_REAL_SDCARD),) ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 22; echo $$?),0) - LOCAL_REQUIRED_MODULES += sgdisk + TWRP_REQUIRED_MODULES += sgdisk else - LOCAL_REQUIRED_MODULES += sgdisk_static + TWRP_REQUIRED_MODULES += sgdisk_static endif endif ifneq ($(TW_EXCLUDE_ENCRYPTED_BACKUPS), true) - LOCAL_REQUIRED_MODULES += openaes openaes_license + TWRP_REQUIRED_MODULES += openaes openaes_license endif ifeq ($(TW_INCLUDE_DUMLOCK), true) - LOCAL_REQUIRED_MODULES += \ + TWRP_REQUIRED_MODULES += \ htcdumlock htcdumlocksys flash_imagesys dump_imagesys libbmlutils.so \ libflashutils.so libmmcutils.so libmtdutils.so HTCDumlock.apk endif ifeq ($(TW_INCLUDE_FB2PNG), true) - LOCAL_REQUIRED_MODULES += fb2png + TWRP_REQUIRED_MODULES += fb2png endif ifneq ($(TW_OEM_BUILD),true) - LOCAL_REQUIRED_MODULES += orscmd + TWRP_REQUIRED_MODULES += orscmd endif ifeq ($(BOARD_USES_BML_OVER_MTD),true) - LOCAL_REQUIRED_MODULES += bml_over_mtd + TWRP_REQUIRED_MODULES += bml_over_mtd endif ifeq ($(TW_INCLUDE_INJECTTWRP), true) - LOCAL_REQUIRED_MODULES += injecttwrp + TWRP_REQUIRED_MODULES += injecttwrp endif ifneq ($(TW_EXCLUDE_DEFAULT_USB_INIT), true) - LOCAL_REQUIRED_MODULES += init.recovery.usb.rc + TWRP_REQUIRED_MODULES += init.recovery.usb.rc endif ifeq ($(TWRP_INCLUDE_LOGCAT), true) - LOCAL_REQUIRED_MODULES += logcat + TWRP_REQUIRED_MODULES += logcat ifeq ($(TARGET_USES_LOGD), true) - LOCAL_REQUIRED_MODULES += logd libsysutils libnl init.recovery.logd.rc + TWRP_REQUIRED_MODULES += logd libsysutils libnl init.recovery.logd.rc endif endif # Allow devices to specify device-specific recovery dependencies ifneq ($(TARGET_RECOVERY_DEVICE_MODULES),) - LOCAL_REQUIRED_MODULES += $(TARGET_RECOVERY_DEVICE_MODULES) + TWRP_REQUIRED_MODULES += $(TARGET_RECOVERY_DEVICE_MODULES) endif LOCAL_CFLAGS += -DTWRES=\"$(TWRES_PATH)\" LOCAL_CFLAGS += -DTWHTCD_PATH=\"$(TWHTCD_PATH)\" ifeq ($(TW_INCLUDE_NTFS_3G),true) ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 22; echo $$?),0) - LOCAL_REQUIRED_MODULES += \ + TWRP_REQUIRED_MODULES += \ mount.ntfs \ fsck.ntfs \ mkfs.ntfs else - LOCAL_REQUIRED_MODULES += \ + TWRP_REQUIRED_MODULES += \ ntfs-3g \ ntfsfix \ mkntfs @@ -506,23 +506,29 @@ endif endif ifeq ($(TARGET_USERIMAGES_USE_F2FS), true) ifeq ($(shell test $(CM_PLATFORM_SDK_VERSION) -ge 3; echo $$?),0) - LOCAL_REQUIRED_MODULES += \ + TWRP_REQUIRED_MODULES += \ fsck.f2fs \ mkfs.f2fs endif ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 28; echo $$?),0) - LOCAL_REQUIRED_MODULES += sload.f2fs + TWRP_REQUIRED_MODULES += sload.f2fs endif endif -ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 26; echo $$?),0) - LOCAL_REQUIRED_MODULES += file_contexts_text -else ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 25; echo $$?),0) - LOCAL_ADDITIONAL_DEPENDENCIES += file_contexts_text +ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 25; echo $$?),0) + TWRP_REQUIRED_MODULES += file_contexts_text +endif + +ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 24; echo $$?),0) + ifeq ($(BOARD_CACHEIMAGE_PARTITION_SIZE),) + TWRP_REQUIRED_MODULES += recovery-persist recovery-refresh + endif endif -ifeq ($(BOARD_CACHEIMAGE_PARTITION_SIZE),) -LOCAL_REQUIRED_MODULES += recovery-persist recovery-refresh +ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 28; echo $$?),0) + LOCAL_REQUIRED_MODULES += $(TWRP_REQUIRED_MODULES) +else + LOCAL_ADDITIONAL_DEPENDENCIES += $(TWRP_REQUIRED_MODULES) endif include $(BUILD_EXECUTABLE) @@ -532,7 +538,11 @@ include $(CLEAR_VARS) LOCAL_MODULE := file_contexts_text LOCAL_MODULE_TAGS := optional -LOCAL_REQUIRED_MODULES := file_contexts.bin +ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 28; echo $$?),0) + LOCAL_REQUIRED_MODULES := file_contexts.bin +else + LOCAL_ADDITIONAL_DEPENDENCIES := file_contexts.bin +endif LOCAL_POST_INSTALL_CMD := \ $(hide) cp -f $(PRODUCT_OUT)/obj/ETC/file_contexts.bin_intermediates/file_contexts.concat.tmp $(TARGET_RECOVERY_ROOT_OUT)/file_contexts diff --git a/crypto/ext4crypt/Android.mk b/crypto/ext4crypt/Android.mk index 8e77cdf30..0c6ef5b56 100644 --- a/crypto/ext4crypt/Android.mk +++ b/crypto/ext4crypt/Android.mk @@ -45,7 +45,11 @@ ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 26; echo $$?),0) LOCAL_SHARED_LIBRARIES += libkeyutils endif endif - LOCAL_REQUIRED_MODULES := keystore_auth + ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 28; echo $$?),0) + LOCAL_REQUIRED_MODULES := keystore_auth + else + LOCAL_ADDITIONAL_DEPENDENCIES := keystore_auth + endif else #7.x rules LOCAL_SRC_FILES += Ext4Crypt.cpp Keymaster.cpp KeyStorage.cpp diff --git a/crypto/scrypt/Scrypt.mk b/crypto/scrypt/Scrypt.mk index baa41eca6..67e73c80f 100644 --- a/crypto/scrypt/Scrypt.mk +++ b/crypto/scrypt/Scrypt.mk @@ -27,7 +27,11 @@ LOCAL_CFLAGS += $(target_c_flags) LOCAL_C_INCLUDES += $(target_c_includes) $(commands_recovery_local_path)/crypto/scrypt/lib/util LOCAL_MODULE_TAGS := optional LOCAL_MODULE:= libscrypttwrp_static -LOCAL_ADDITIONAL_DEPENDENCIES := $(local_additional_dependencies) +ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 28; echo $$?),0) + LOCAL_REQUIRED_MODULES := $(local_additional_dependencies) +else + LOCAL_ADDITIONAL_DEPENDENCIES := $(local_additional_dependencies) +endif include $(BUILD_STATIC_LIBRARY) ######################################## @@ -42,5 +46,9 @@ LOCAL_C_INCLUDES += $(host_c_includes) $(commands_recovery_local_path)/crypto/sc LOCAL_LDLIBS += -ldl LOCAL_MODULE_TAGS := optional LOCAL_MODULE:= libscrypttwrp_static -LOCAL_ADDITIONAL_DEPENDENCIES := $(local_additional_dependencies) +ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 28; echo $$?),0) + LOCAL_REQUIRED_MODULES := $(local_additional_dependencies) +else + LOCAL_ADDITIONAL_DEPENDENCIES := $(local_additional_dependencies) +endif include $(BUILD_HOST_STATIC_LIBRARY) diff --git a/fb2png/fb.c b/fb2png/fb.c index 2ed478902..a17f801df 100644 --- a/fb2png/fb.c +++ b/fb2png/fb.c @@ -48,7 +48,6 @@ static int fb_get_format(const struct fb *fb) { int ao = fb->alpha_offset; int ro = fb->red_offset; - int go = fb->green_offset; int bo = fb->blue_offset; #define FB_FORMAT_UNKNOWN 0 diff --git a/fb2png/img_process.c b/fb2png/img_process.c index eb75e9a21..535ec2287 100644 --- a/fb2png/img_process.c +++ b/fb2png/img_process.c @@ -32,7 +32,7 @@ int rgb565_to_rgb888(const char* src, char* dst, size_t pixel) from = (struct rgb565 *) src; to = (struct rgb888 *) dst; - int i = 0; + size_t i = 0; /* traverse pixel of the row */ while(i++ < pixel) { @@ -53,7 +53,7 @@ int rgb565_to_rgb888(const char* src, char* dst, size_t pixel) int argb8888_to_rgb888(const char* src, char* dst, size_t pixel) { - int i; + size_t i; struct argb8888 *from; struct rgb888 *to; @@ -77,7 +77,7 @@ int argb8888_to_rgb888(const char* src, char* dst, size_t pixel) int abgr8888_to_rgb888(const char* src, char* dst, size_t pixel) { - int i; + size_t i; struct abgr8888 *from; struct rgb888 *to; @@ -101,7 +101,7 @@ int abgr8888_to_rgb888(const char* src, char* dst, size_t pixel) int bgra8888_to_rgb888(const char* src, char* dst, size_t pixel) { - int i; + size_t i; struct bgra8888 *from; struct rgb888 *to; @@ -125,7 +125,7 @@ int bgra8888_to_rgb888(const char* src, char* dst, size_t pixel) int rgba8888_to_rgb888(const char* src, char* dst, size_t pixel) { - int i; + size_t i; struct rgba8888 *from; struct rgb888 *to; @@ -164,19 +164,19 @@ stdio_write_func (png_structp png, png_bytep data, png_size_t size) } static void -png_simple_output_flush_fn (png_structp png_ptr) +png_simple_output_flush_fn (__attribute__((unused)) png_structp png_ptr) { } static void -png_simple_error_callback (png_structp png, +png_simple_error_callback (__attribute__((unused)) png_structp png, png_const_charp error_msg) { E("png error: %s\n", error_msg); } static void -png_simple_warning_callback (png_structp png, +png_simple_warning_callback (__attribute__((unused)) png_structp png, png_const_charp error_msg) { fprintf(stderr, "png warning: %s\n", error_msg); diff --git a/fb2png/log.h b/fb2png/log.h index 2b7cf8cec..a2e3f5f54 100644 --- a/fb2png/log.h +++ b/fb2png/log.h @@ -57,7 +57,7 @@ #endif -static void +__attribute__((unused)) static void D(const char *msg, ...) { va_list ap; @@ -69,7 +69,7 @@ D(const char *msg, ...) fflush(stdout); } -static void +__attribute__((unused)) static void E(const char *msg, ...) { va_list ap; diff --git a/minui/Android.mk b/minui/Android.mk index ddec62bf9..824eec659 100644 --- a/minui/Android.mk +++ b/minui/Android.mk @@ -32,7 +32,11 @@ ifeq ($(TW_TARGET_USES_QCOM_BSP), true) LOCAL_CFLAGS += -DMSM_BSP LOCAL_SRC_FILES += graphics_overlay.cpp ifeq ($(TARGET_PREBUILT_KERNEL),) - LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr + ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 28; echo $$?),0) + LOCAL_REQUIRED_MODULES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr + else + LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr + endif LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include else ifeq ($(TARGET_CUSTOM_KERNEL_HEADERS),) diff --git a/minuitwrp/Android.mk b/minuitwrp/Android.mk index 3356402ba..2ca2091e1 100644 --- a/minuitwrp/Android.mk +++ b/minuitwrp/Android.mk @@ -21,7 +21,11 @@ ifeq ($(TW_TARGET_USES_QCOM_BSP), true) LOCAL_CFLAGS += -DMSM_BSP LOCAL_SRC_FILES += graphics_overlay.cpp ifeq ($(TARGET_PREBUILT_KERNEL),) - LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr + ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 28; echo $$?),0) + LOCAL_REQUIRED_MODULES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr + else + LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr + endif LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include else ifeq ($(TARGET_CUSTOM_KERNEL_HEADERS),) diff --git a/partition.cpp b/partition.cpp index e00322b52..c4c9927dc 100644 --- a/partition.cpp +++ b/partition.cpp @@ -2479,7 +2479,7 @@ bool TWPartition::Backup_Tar(PartitionSettings *part_settings, pid_t *tar_fork_p if (!Mount(true)) return false; - TWFunc::GUI_Operation_Text(TW_BACKUP_TEXT, Backup_Display_Name, "Backing Up"); + TWFunc::GUI_Operation_Text(TW_BACKUP_TEXT, Backup_Display_Name, gui_parse_text("{@backing}")); gui_msg(Msg("backing_up=Backing up {1}...")(Backup_Display_Name)); DataManager::GetValue(TW_USE_COMPRESSION_VAR, tar.use_compression); |