Update Android 12 support for stable SDK 31

Android 12's SDK is now versioned as 31, so it no longer needs to be
special-cased.
This commit is contained in:
Danny Lin 2021-07-23 19:11:16 -07:00
parent 36cc32c507
commit 7c27b7744b
No known key found for this signature in database
GPG Key ID: 1988FAA1797EE5AC
5 changed files with 2 additions and 9 deletions

View File

@ -11,10 +11,6 @@ fi
sdk="$(getprop ro.build.version.sdk)"
version="$(getprop ro.vendor.build.version.release)"
if getprop ro.build.id | grep -q SPB2; then
sdk=31-b2
version="12 Beta 2"
fi
# Initial version check; version can be changed later.
if [[ ! -d "$MODPATH/system_sdk$sdk" ]]; then

View File

@ -5,10 +5,6 @@ MODPATH="/data/adb/modules/safetynet-fix"
# Get runtime version
sdk="$(getprop ro.build.version.sdk)"
version="$(getprop ro.vendor.build.version.release)"
if getprop ro.build.id | grep -q SPB2; then
sdk=31-b2
version="12 Beta 2"
fi
# Prepare to update version
rm -fr "$MODPATH/system"

View File

@ -2,7 +2,8 @@
# Keystore v2 starts before Magisk on Android 12, so it needs to be restarted.
# Do this in service.sh to make sure that files have been mounted already.
if getprop ro.build.id | grep -q SPB2; then
sdk="$(getprop ro.build.version.sdk)"
if [[ "$sdk" -ge 31 ]]; then
stop keystore2
start keystore2
fi