From 0f6b4560288267b644c49de0fdc538fa30980708 Mon Sep 17 00:00:00 2001 From: Paul Keith Date: Tue, 7 Aug 2018 14:27:25 -0700 Subject: [PATCH] gapps: Fail if there's not enough space --- build/meta/com/google/android/update-binary | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build/meta/com/google/android/update-binary b/build/meta/com/google/android/update-binary index 7018644..2c71110 100644 --- a/build/meta/com/google/android/update-binary +++ b/build/meta/com/google/android/update-binary @@ -81,8 +81,14 @@ fi LOWMEM=1572864 MEM=`grep MemTotal /proc/meminfo | awk '{ print $2 }'` LOW_STORAGE=153600 +REALLY_LOW_STORAGE=92160 STORAGE=`exec_util "df /system" | grep -v Filesystem | awk '{ print $4 }'` +if [ "$STORAGE" -lt "$REALLY_LOW_STORAGE" ]; then + ui_print "Not enough space for GApps! Aborting" + exit 1 +fi + ui_print "Extracting files" cd /tmp unzip -o "$ZIP"