safetynet-fix/service.sh
Danny Lin 7c27b7744b
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.
2021-07-23 19:11:16 -07:00

10 lines
284 B
Bash
Executable File

#!/usr/bin/env bash
# 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.
sdk="$(getprop ro.build.version.sdk)"
if [[ "$sdk" -ge 31 ]]; then
stop keystore2
start keystore2
fi