mirror of
https://github.com/kdrag0n/safetynet-fix.git
synced 2024-11-19 11:11:22 +00:00
b3893d32f3
Key attestation was introduced in Android 7.0, but Android 7.x doesn't have InMemoryDexClassLoader so our Zygisk module is incompatible. In general, users on such old versions of Android don't need to bypass hardware-backed attestation (which isn't even applicable on Android 6 and older), so allow them to install the module without the Zygisk part. Closes #156.
15 lines
406 B
Bash
Executable File
15 lines
406 B
Bash
Executable File
#!/system/bin/sh
|
|
|
|
# Android 8.0 or newer
|
|
if [[ "$(getprop ro.build.version.sdk)" -lt 26 ]]; then
|
|
ui_print ""
|
|
ui_print "Functionality is limited on Android 7 and older."
|
|
ui_print "Hardware-backed attestation will not be disabled."
|
|
ui_print ""
|
|
|
|
# Remove Zygisk module, but keep props and scripts
|
|
rm -fr "$MODPATH/zygisk"
|
|
fi
|
|
|
|
chmod 755 "$MODPATH/service.sh" "$MODPATH/post-fs-data.sh"
|