Skip to content

Commit

Permalink
exfat: Build fsck and update path to mkfs
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
mdmower authored and Dees-Troy committed Dec 22, 2015
1 parent 2d50cad commit 80f7b36
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
16 changes: 16 additions & 0 deletions exfat/fsck/Android.mk
Original file line number Diff line number Diff line change
@@ -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)
2 changes: 1 addition & 1 deletion gui/action.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions prebuilt/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 80f7b36

Please sign in to comment.