From 80f7b361f090d66fbbdf13e6dc589cebb49abeca Mon Sep 17 00:00:00 2001 From: Matt Mower Date: Sat, 12 Dec 2015 15:38:01 -0600 Subject: exfat: Build fsck and update path to mkfs * Usage of fsck.exfat is already included in partition.cpp, but the tool is missing. * Update the path to mkexfatfs so the button is available when changing filesystem. Change-Id: I5f4e27357c6b5a8606043d1bdc2488cc83e55d90 --- Android.mk | 3 ++- exfat/fsck/Android.mk | 16 ++++++++++++++++ gui/action.cpp | 2 +- prebuilt/Android.mk | 1 + 4 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 exfat/fsck/Android.mk diff --git a/Android.mk b/Android.mk index 6e7478c4e..5d70c1856 100644 --- a/Android.mk +++ b/Android.mk @@ -368,7 +368,7 @@ else endif endif ifneq ($(TW_NO_EXFAT), true) - LOCAL_ADDITIONAL_DEPENDENCIES += mkexfatfs + LOCAL_ADDITIONAL_DEPENDENCIES += mkexfatfs fsckexfat endif ifeq ($(BOARD_HAS_NO_REAL_SDCARD),) LOCAL_ADDITIONAL_DEPENDENCIES += parted @@ -570,6 +570,7 @@ ifeq ($(BUILD_ID), GINGERBREAD) endif ifneq ($(TW_NO_EXFAT), true) include $(commands_recovery_local_path)/exfat/mkfs/Android.mk \ + $(commands_recovery_local_path)/exfat/fsck/Android.mk \ $(commands_recovery_local_path)/fuse/Android.mk \ $(commands_recovery_local_path)/exfat/libexfat/Android.mk endif diff --git a/exfat/fsck/Android.mk b/exfat/fsck/Android.mk new file mode 100644 index 000000000..2cada95f5 --- /dev/null +++ b/exfat/fsck/Android.mk @@ -0,0 +1,16 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_MODULE := fsckexfat +LOCAL_MODULE_STEM := fsck.exfat +LOCAL_MODULE_TAGS := optional +LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin +LOCAL_CFLAGS = -D_FILE_OFFSET_BITS=64 +LOCAL_SRC_FILES = main.c +LOCAL_C_INCLUDES += $(LOCAL_PATH) \ + $(commands_recovery_local_path)/exfat/libexfat \ + $(commands_recovery_local_path)/fuse/include +LOCAL_SHARED_LIBRARIES += libexfat_twrp + +include $(BUILD_EXECUTABLE) diff --git a/gui/action.cpp b/gui/action.cpp index 3e27dbb44..0101a3778 100644 --- a/gui/action.cpp +++ b/gui/action.cpp @@ -868,7 +868,7 @@ int GUIAction::getpartitiondetails(std::string arg __unused) DataManager::SetValue("tw_partition_vfat", 1); else DataManager::SetValue("tw_partition_vfat", 0); - if (TWFunc::Path_Exists("/sbin/mkfs.exfat")) + if (TWFunc::Path_Exists("/sbin/mkexfatfs")) DataManager::SetValue("tw_partition_exfat", 1); else DataManager::SetValue("tw_partition_exfat", 0); diff --git a/prebuilt/Android.mk b/prebuilt/Android.mk index 216057372..068367c83 100644 --- a/prebuilt/Android.mk +++ b/prebuilt/Android.mk @@ -128,6 +128,7 @@ ifeq ($(BUILD_ID), GINGERBREAD) endif ifneq ($(TW_NO_EXFAT), true) RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/mkexfatfs + RELINK_SOURCE_FILES += $(TARGET_RECOVERY_ROOT_OUT)/sbin/fsck.exfat RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libexfat_twrp.so else TW_NO_EXFAT_FUSE := true -- cgit v1.2.3