2
0
mirror of https://github.com/topjohnwu/Magisk synced 2025-09-01 02:55:56 +00:00

Add new util functions for new template version

This commit is contained in:
topjohnwu
2017-08-12 23:15:39 +08:00
parent 0b3c078aeb
commit 6eb7c0b5d6
2 changed files with 5 additions and 1 deletions

View File

@@ -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`