aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2019-06-12 12:51:18 +0200
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2019-07-01 17:01:27 +0200
commit15d3b53fcfcf9ea9cbfbffd5432823a9e88ea84b (patch)
tree0b26f32165f0cd8e8b2407ccb6844d5e2c0466e5
parent04013562138917f619d0d4f222ae76844e87346d (diff)
downloaddevice_samsung_i9300-15d3b53fcfcf9ea9cbfbffd5432823a9e88ea84b.tar.gz
device_samsung_i9300-15d3b53fcfcf9ea9cbfbffd5432823a9e88ea84b.tar.bz2
device_samsung_i9300-15d3b53fcfcf9ea9cbfbffd5432823a9e88ea84b.zip
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 <GNUtoo@cyberdimension.org>
-rw-r--r--device.mk3
-rw-r--r--init.smdk4x12.rc6
-rw-r--r--resize2fs_partitions.sh2
3 files changed, 11 insertions, 0 deletions
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