ensure min sdk 31

This commit is contained in:
5ec1cff
2024-07-16 19:30:38 +08:00
parent 1a5a95af23
commit 7e7be3f72f
3 changed files with 13 additions and 2 deletions

View File

@@ -4,6 +4,7 @@ SKIPUNZIP=1
DEBUG=@DEBUG@
SONAME=@SONAME@
SUPPORTED_ABIS="@SUPPORTED_ABIS@"
MIN_SDK=@MIN_SDK@
if [ "$BOOTMODE" ] && [ "$KSU" ]; then
ui_print "- Installing from KernelSU app"
@@ -40,6 +41,14 @@ else
ui_print "- Device platform: $ARCH"
fi
# check android
if [ "$API" -lt $MIN_SDK ]; then
ui_print "! Unsupported sdk: $API"
abort "! Minimal supported sdk is $MIN_SDK"
else
ui_print "- Device sdk: $API"
fi
ui_print "- Extracting verify.sh"
unzip -o "$ZIPFILE" 'verify.sh' -d "$TMPDIR" >&2
if [ ! -f "$TMPDIR/verify.sh" ]; then