Эх сурвалжийг харах

gapps: Fail if there's not enough space

Paul Keith 7 жил өмнө
parent
commit
0f6b456028

+ 6 - 0
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"