Skip to content

Commit

Permalink
magisk: Allow limited installation on Android 7 and older
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kdrag0n committed Mar 13, 2022
1 parent db27e80 commit b3893d3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions magisk/customize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

# Android 8.0 or newer
if [[ "$(getprop ro.build.version.sdk)" -lt 26 ]]; then
ui_print "This module only supports Android 8.0 and newer."
ui_print ""
ui_print "Functionality is limited on Android 7 and older."
ui_print "Hardware-backed attestation will not be disabled."
ui_print ""

# Abort install and clean up
rm -fr "$TMPDIR" "$MODPATH"
exit 1
# Remove Zygisk module, but keep props and scripts

This comment has been minimized.

Copy link
@MlgmXyysd

This comment has been minimized.

Copy link
@kdrag0n

kdrag0n Mar 13, 2022

Author Owner

Nice catch. post-fs-data should probably add GMS to the DenyList instead on Android <8.

This comment has been minimized.

Copy link
@MlgmXyysd

MlgmXyysd Mar 13, 2022

So I removed this script along with the PR #165.

rm -fr "$MODPATH/zygisk"
fi

chmod 755 "$MODPATH/service.sh" "$MODPATH/post-fs-data.sh"

0 comments on commit b3893d3

Please sign in to comment.