Quellcode durchsuchen

gapps: Fail if there's not enough space

Paul Keith vor 7 Jahren
Ursprung
Commit
0f6b456028
1 geänderte Dateien mit 6 neuen und 0 gelöschten Zeilen
  1. 6 0
      build/meta/com/google/android/update-binary

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