From 15d3b53fcfcf9ea9cbfbffd5432823a9e88ea84b Mon Sep 17 00:00:00 2001 From: Denis 'GNUtoo' Carikli Date: Wed, 12 Jun 2019 12:51:18 +0200 Subject: Add support for flashing through heimdall The images built are smaller than the partition sizes. This enables to flash them faster and reduce the probability of failing the flashing. The downside is that, for the data partition, the space available is not enough to complete boot: # df -h Filesystem Size Used Avail Use% Mounted on [...] /dev/block/mmcblk2p16 6.4M 6.1M 308K 96% /data The resizing is not done automatically because it's supposed to happpen during the installation of the zip file. This makes sures that the data partition is resized during boot. Signed-off-by: Denis 'GNUtoo' Carikli --- device.mk | 3 +++ init.smdk4x12.rc | 6 ++++++ resize2fs_partitions.sh | 2 ++ 3 files changed, 11 insertions(+) create mode 100644 resize2fs_partitions.sh diff --git a/device.mk b/device.mk index 574cf21..d863c45 100644 --- a/device.mk +++ b/device.mk @@ -134,3 +134,6 @@ PRODUCT_PROPERTY_OVERRIDES += \ # Hack to get a working GateKeeper PRODUCT_PACKAGES += gatekeeper.default + +# Enable flashing through heimdall +PRODUCT_COPY_FILES += device/samsung/i9305/resize2fs_partitions.sh:system/bin/resize2fs_partitions.sh diff --git a/init.smdk4x12.rc b/init.smdk4x12.rc index 2584a24..dd4a29b 100644 --- a/init.smdk4x12.rc +++ b/init.smdk4x12.rc @@ -53,3 +53,9 @@ on init on post-fs-data setprop vold.post_fs_data_done 1 + start resize2fs_partitions + +service resize2fs_partitions /system/bin/resize2fs_partitions.sh + class main + oneshot + disabled diff --git a/resize2fs_partitions.sh b/resize2fs_partitions.sh new file mode 100644 index 0000000..aa84e0b --- /dev/null +++ b/resize2fs_partitions.sh @@ -0,0 +1,2 @@ +#!/system/bin/sh +resize2fs /dev/block/platform/soc/12550000.mmc/by-name/USERDATA -- cgit v1.2.3