From 08b489e6b10c0ffb40fc5f7dbde7627ce398c351 Mon Sep 17 00:00:00 2001 From: Cuynu Date: Sun, 1 Feb 2026 11:37:13 +0700 Subject: [PATCH] feat: customize.sh: check for already bypassed app app comes with zimperium bypass patches does not need to install this module since it is useless anyway for prebulit users, it's called FullTest variant. Signed-off-by: Cuynu --- module_new/zdefend-fix/customize.sh | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/module_new/zdefend-fix/customize.sh b/module_new/zdefend-fix/customize.sh index 681b596..c581709 100644 --- a/module_new/zdefend-fix/customize.sh +++ b/module_new/zdefend-fix/customize.sh @@ -6,9 +6,25 @@ ANDROIDSDK="$(getprop ro.build.version.sdk)" INSTALLVI="https://git.disroot.org/mbcp/info_vi/wiki/mbcpinstall" INSTALLEN="https://git.disroot.org/mbcp/info_en/wiki/mbcpinstall" +# Get base.apk path +dumpsys package com.mbmobile | grep path: > /data/local/tmp/path.txt +sed -i 's| path: ||g' /data/local/tmp/path.txt + +APKPATH="$(cat /data/local/tmp/path.txt)" + +echo "APK Path: $APKPATH" + # Clear old iptables iptables -t nat -F +alreadybypassed() { + echo "Current MBCP app comes with Zimperium bypass patches" + echo "There is no need to install this module." + echo "If you want to install this module, do not apply Zimperium bypass patch or use Minimal variant." + rm -rf /data/local/tmp/path.txt + exit 1 +} + nonfosskitsune() { echo "Proprietary Kitsune found! Your data might be at risk!" echo "Consider install older FOSS Kitsune Mask to protect your data!" @@ -110,8 +126,10 @@ fi # The module does NOT work with original unpatched app. It's pointless to remove the check. You think it works with original app? Nah. for library in $(find /data/app -name libvvb2060.so | grep com.mbmobile) ; do notmbcp ; done -# Grant permission for MB/MBCP app +# Check for bypassed app +unzip -l $APKPATH | grep remove_new_zimperium_check* && alreadybypassed +# Grant permission for MB/MBCP app if [ $ANDROIDSDK -gt 33 ]; then echo "Granting MB/MBCP app permission..."