diff --git a/changelog.md b/changelog.md index b2b238f..32ee2b3 100644 --- a/changelog.md +++ b/changelog.md @@ -4,6 +4,7 @@ * Tuned the USB period size for SDM845 devices (2500 usec to 2250 usec) * Tuned the USB period size for other devices (to 2250 usec) * Fixed logically wrong selinux prop settings (no meaning for magisk's magic mount mechanism) +* Added checking incompatible Magisk variants # v2.5.4 * Tuned the USB period size for Tensor devices (2625 usec to 2250 usec) diff --git a/customize-functions.sh b/customize-functions.sh index dac641c..d604c35 100644 --- a/customize-functions.sh +++ b/customize-functions.sh @@ -1,5 +1,18 @@ #!/system/bin/sh +# Check whether Magisk magic mount compatible or not +function isMagiskMountCompatible() +{ + local tmp="$(magisk --path)" + if [ -z "$tmp" ]; then + return 1 + elif [ -d "${tmp}/.magisk/mirror/vendor" ]; then + return 0 + else + return 1 + fi +} + # Get the active audio policy configuration fille from the audioserever function getActivePolicyFile() { diff --git a/customize.sh b/customize.sh index 0c2149e..d57002a 100644 --- a/customize.sh +++ b/customize.sh @@ -2,6 +2,10 @@ . "$MODPATH/customize-functions.sh" +if ! isMagiskMountCompatible; then + abort " *** Aborted by an incompatible Magisk variant detection. Try again with pure Magisk! ***" +fi + MAGISKTMP="$(magisk --path)/.magisk" # Note: Don't use "${MAGISKTMP}/mirror/system/vendor/*" instaed of "${MAGISKTMP}/mirror/vendor/*". diff --git a/module.prop b/module.prop index 626e491..c18f1e4 100644 --- a/module.prop +++ b/module.prop @@ -1,6 +1,6 @@ id=hifi-maximizer-mod name=Hifi Maximizer -version=v2.5.4 -versionCode=2504 +version=v2.5.5 +versionCode=2505 author=zyhk description=A module for maximizing the digital audio fidelity by reducing jitters on audio outputs (USB DACs, Bluetooth a2dp, DLNA, etc.)