From 483e9f45b71458b84ccbbaf658449b58f029a63b Mon Sep 17 00:00:00 2001 From: Ethan Yonker Date: Mon, 11 Jan 2016 22:21:18 -0600 Subject: Improve sdcard partitioning process -Improve code for partitioning sdcards -Allow user to select a device for partitioning (must be removable) -Use sgdisk to partition sdcards -Set default sizes for ext and swap to 0 -Change increments for ext to 256MB and swap to 64MB Note: sgdisk is included in 6.0. I have included a static prebuilt sgdisk for trees that do not have sgdisk, however the prebuilt sgdisk is a decent bit larger than the old parted binary. The old parted binary is quite old at this point and we only have it for armv7a. sgdisk should be maintained by AOSP and can be built from source so it should work across architectures. Change-Id: Ib80882d9b5776e5e9358b11340fba392e6f1ae09 --- prebuilt/Android.mk | 30 +++++++++++++++++++++++------- prebuilt/sgdisk_static | Bin 0 -> 489732 bytes 2 files changed, 23 insertions(+), 7 deletions(-) create mode 100755 prebuilt/sgdisk_static (limited to 'prebuilt') diff --git a/prebuilt/Android.mk b/prebuilt/Android.mk index df14bbdac..81954257c 100644 --- a/prebuilt/Android.mk +++ b/prebuilt/Android.mk @@ -201,6 +201,11 @@ else RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/mkntfs endif endif +ifeq ($(BOARD_HAS_NO_REAL_SDCARD),) + ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 22; echo $$?),0) + RELINK_SOURCE_FILES += $(TARGET_OUT_EXECUTABLES)/sgdisk + endif +endif TWRP_AUTOGEN := $(intermediates)/teamwin @@ -241,14 +246,25 @@ LOCAL_SRC_FILES := $(LOCAL_MODULE) include $(BUILD_PREBUILT) ifeq ($(BOARD_HAS_NO_REAL_SDCARD),) + ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0) + #prebuilt, static sgdisk + include $(CLEAR_VARS) + LOCAL_MODULE := sgdisk_static + LOCAL_MODULE_STEM := sgdisk + LOCAL_MODULE_TAGS := eng + LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES + LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin + LOCAL_SRC_FILES := $(LOCAL_MODULE) + include $(BUILD_PREBUILT) + endif #parted - include $(CLEAR_VARS) - LOCAL_MODULE := parted - LOCAL_MODULE_TAGS := eng - LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES - LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin - LOCAL_SRC_FILES := $(LOCAL_MODULE) - include $(BUILD_PREBUILT) + #include $(CLEAR_VARS) + #LOCAL_MODULE := parted + #LOCAL_MODULE_TAGS := eng + #LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES + #LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin + #LOCAL_SRC_FILES := $(LOCAL_MODULE) + #include $(BUILD_PREBUILT) endif # copy license file for OpenAES diff --git a/prebuilt/sgdisk_static b/prebuilt/sgdisk_static new file mode 100755 index 000000000..eb8a129ce Binary files /dev/null and b/prebuilt/sgdisk_static differ -- cgit v1.2.3