mirror of
https://github.com/kdrag0n/safetynet-fix.git
synced 2024-11-19 11:11:22 +00:00
7c27b7744b
Android 12's SDK is now versioned as 31, so it no longer needs to be special-cased.
28 lines
767 B
Bash
Executable File
28 lines
767 B
Bash
Executable File
#!/sbin/sh
|
|
|
|
# We check the native ABI instead of all supported ABIs because this is a system
|
|
# service, and underlying AIDL/HIDL ABIs may not match. We also link against other
|
|
# system libraries.
|
|
arch="$(getprop ro.product.cpu.abi)"
|
|
if [[ "$arch" != "arm64-v8a" ]]; then
|
|
ui_print "Unsupported CPU architecture: $arch"
|
|
exit 1
|
|
fi
|
|
|
|
sdk="$(getprop ro.build.version.sdk)"
|
|
version="$(getprop ro.vendor.build.version.release)"
|
|
|
|
# Initial version check; version can be changed later.
|
|
if [[ ! -d "$MODPATH/system_sdk$sdk" ]]; then
|
|
ui_print "Android $version (SDK $sdk) is not supported!"
|
|
rm -fr "$MODPATH"
|
|
exit 1
|
|
fi
|
|
|
|
# Set executable permissions
|
|
for sdk in $MODPATH/system_sdk*
|
|
do
|
|
set_perm_recursive $sdk/bin 0 0 0755 0755
|
|
done
|
|
chmod 755 $MODPATH/*.sh
|