diff --git a/scripts/flash_script.sh b/scripts/flash_script.sh index e0f53c5c6..4d7099217 100644 --- a/scripts/flash_script.sh +++ b/scripts/flash_script.sh @@ -184,7 +184,7 @@ if ! $BOOTMODE; then recovery_cleanup fi -# rm -rf $TMPDIR +rm -rf $TMPDIR ui_print "- Done" exit 0 diff --git a/scripts/util_functions.sh b/scripts/util_functions.sh index 1f252018b..d54c31b70 100644 --- a/scripts/util_functions.sh +++ b/scripts/util_functions.sh @@ -191,6 +191,10 @@ request_size_check() { reqSizeM=$((reqSizeM / 1024 + 1)) } +request_zip_size_check() { + reqSizeM=`unzip -l "$1" | tail -n 1 | awk '{ print int($1 / 1048567 + 1) }'` +} + image_size_check() { SIZE="`$MAGISKBIN/magisk --imgsize $IMG`" curUsedM=`echo "$SIZE" | cut -d" " -f1`