Skip to content

Commit

Permalink
ensure min sdk 31
Browse files Browse the repository at this point in the history
  • Loading branch information
5ec1cff committed Jul 16, 2024
1 parent 1a5a95a commit 7e7be3f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Tricky Store

A trick of keystore.
A trick of keystore. **Android 12 or above is required**.

## Usage

Expand Down
4 changes: 3 additions & 1 deletion module/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ val verCode: Int by rootProject.extra
val verName: String by rootProject.extra
val commitHash: String by rootProject.extra
val abiList: List<String> by rootProject.extra
val androidMinSdkVersion: Int by rootProject.extra

val releaseFlags = arrayOf(
"-Oz", "-flto",
Expand Down Expand Up @@ -92,7 +93,8 @@ androidComponents.onVariants { variant ->
val tokens = mapOf(
"DEBUG" to if (buildTypeLowered == "debug") "true" else "false",
"SONAME" to moduleId,
"SUPPORTED_ABIS" to supportedAbis
"SUPPORTED_ABIS" to supportedAbis,
"MIN_SDK" to androidMinSdkVersion.toString()
)
filter<ReplaceTokens>("tokens" to tokens)
filter<FixCrLfFilter>("eol" to FixCrLfFilter.CrLf.newInstance("lf"))
Expand Down
9 changes: 9 additions & 0 deletions module/template/customize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 7e7be3f

Please sign in to comment.