feat: zdefend-fix(action.sh): handle folk mount API for folkpatch

built-in mount API (which is magic mount) is enabled in case of no metamodule for folkpatch users.

Signed-off-by: Cuynu <cuynu@proton.me>
This commit is contained in:
Cuynu 2026-10-14 01:13:55 +07:00
commit daab5f1f1b
Notes: Cuynu 2026-10-14 01:16:12 +07:00
*tested with folkpatch

View file

@ -101,6 +101,17 @@ checkmetamodule() {
[ ! -d /data/adb/metamodule ] && nometamodule [ ! -d /data/adb/metamodule ] && nometamodule
} }
folkmetamodulecheck() {
[ ! -d /data/adb/metamodule ] && folkHandle
}
folkHandle() {
# enable built-in meta magic mount folk mount api
touch /data/adb/.magic_mount_enable
echo "This module requires metamodule, but you don't have any installed"
echo "So we enabled built-in [Folk Mount API] instead. Please reboot and run action again."
exit 1
}
zimperiumpresent() { zimperiumpresent() {
echo "Zimperium still present! Cannot continue :(" echo "Zimperium still present! Cannot continue :("
@ -108,6 +119,8 @@ zimperiumpresent() {
[ -f /data/adb/modules/mountify ] && echo "You are using [Mountify] metamodule!" && echo "Please install [bindhosts] module and use MBZDefend-Fix bindhosts variant or use custom DNS with host blocking instead!" && exit 1 [ -f /data/adb/modules/mountify ] && echo "You are using [Mountify] metamodule!" && echo "Please install [bindhosts] module and use MBZDefend-Fix bindhosts variant or use custom DNS with host blocking instead!" && exit 1
[ -f /data/adb/metamodule/disable ] && echo "Current installed metamodule is disabled, enabling again!" && rm -f /data/adb/metamodule/disable && echo "Reboot and try again?" && exit 1 [ -f /data/adb/metamodule/disable ] && echo "Current installed metamodule is disabled, enabling again!" && rm -f /data/adb/metamodule/disable && echo "Reboot and try again?" && exit 1
[ -f /data/adb/ksud ] && cat /data/adb/ksud | grep -q ksud::metamodule && checkmetamodule [ -f /data/adb/ksud ] && cat /data/adb/ksud | grep -q ksud::metamodule && checkmetamodule
# check for folkpatch before apatch
[ -f /data/adb/apd ] && cat /data/adb/apd | grep -q FolkPatch && folkmetamodulecheck
[ -f /data/adb/apd ] && cat /data/adb/apd | grep -q apd::metamodule && checkmetamodule [ -f /data/adb/apd ] && cat /data/adb/apd | grep -q apd::metamodule && checkmetamodule
echo "Please remove any module override hosts, or use alternative DNS with zimperium host blocking!" echo "Please remove any module override hosts, or use alternative DNS with zimperium host blocking!"
exit 1 exit 1