feat: mbtombcp: init

Signed-off-by: Cuynu <cuynu@proton.me>
This commit is contained in:
Cuynu 2025-08-22 04:38:58 +07:00
commit 719dec222b
8 changed files with 118 additions and 0 deletions

View file

@ -0,0 +1,33 @@
#!/sbin/sh
#################
# Initialization
#################
umask 022
# echo before loading util_functions
ui_print() { echo "$1"; }
require_new_magisk() {
ui_print "*******************************"
ui_print " Please install Magisk v20.4+! "
ui_print "*******************************"
exit 1
}
#########################
# Load util_functions.sh
#########################
OUTFD=$2
ZIPFILE=$3
mount /data 2>/dev/null
[ -f /data/adb/magisk/util_functions.sh ] || require_new_magisk
. /data/adb/magisk/util_functions.sh
[ $MAGISK_VER_CODE -lt 20400 ] && require_new_magisk
install_module
exit 0x

View file

@ -0,0 +1 @@
#MAGISK

6
README.md Normal file
View file

@ -0,0 +1,6 @@
# MB to MBCP Fix
- This module are only used for who used MBZDefend-Fix module before with original app.
- It will re-enable UnderlyingVcl provider which allow app to working properly.
# [Download from releases](https://git.disroot.org/mbcp/mbtombcp/releases)

28
action.sh Executable file
View file

@ -0,0 +1,28 @@
#!/system/bin/sh
# Check if users trying to install this module under KernelSU/Next/RKSU/APatch
[[ -f /data/adb/apd ]] && echo "APatch detected!" && echo "Enabling provider..." && pm enable com.mbmobile/androidx.UnderlyingVcl && for library in $(find /data/app -name libweneedfreedom.so | grep com.mbmobile) ; do am start -n com.mbmobile/io.flutter.plugins.MainActivity ; done && exit 0
[[ -f /data/adb/ksud ]] && echo "KernelSU/Next/RKSU detected!" && echo "Enabling provider..." && pm enable com.mbmobile/androidx.UnderlyingVcl && for library in $(find /data/app -name libweneedfreedom.so | grep com.mbmobile) ; do am start -n com.mbmobile/io.flutter.plugins.MainActivity ; done && exit 0
# Magisk related code (should not be used for other root solution)
# Delete /data/magisk if it exists so MB doesnt failling when eKYC with error code EKYC3002-MS6998 for Magisk users
echo "Deleting /data/magisk if it exists..."
[[ -d /data/magisk ]] && rm -r /data/magisk
find /data -name 'magisk_backup*' -delete
# Enable bulit-in zygisk
echo "Enabling bulit-in zygisk..."
magisk --sqlite 'insert into settings (key,value) values("zygisk","1");'
# Bulit-in zygisk is enough for MBCP...
echo "Deleting ZygiskNext/ReZygisk..."
rm -rf /data/adb/modules/zygisksu
rm -rf /data/adb/modules/rezygisk
echo "Enabling Denylist..."
magisk --denylist enable
magisk --denylist add com.mbmobile
echo "Use this only if you are replaced official app with MBCP"
echo "But also used MBZDefend-Fix module before!"
pm enable com.mbmobile/androidx.UnderlyingVcl
echo "Finding for MBCP app..."
for library in $(find /data/app -name libweneedfreedom.so | grep com.mbmobile) ; do am start -n com.mbmobile/io.flutter.plugins.MainActivity ; done
exit 0

12
createmodule.sh Executable file
View file

@ -0,0 +1,12 @@
#!/bin/bash
echo "Creating module (*.zip)..."
rm MBtoMBCP_fix.zip
zip -r MBtoMBCP_fix.zip *.sh *.prop META-INF
if [ -f MBtoMBCP_fix.zip ]; then
echo "Module saved to [MBtoMBCP_fix.zip], try to flash it :>"
else
echo "Where is [MBtoMBCP_fix.zip] ?"
echo "Did module actually created yet... Try fetch repo and use command again!"
echo "If your system doesn't have [zip], pls install it"
fi

28
customize.sh Executable file
View file

@ -0,0 +1,28 @@
#!/system/bin/sh
# Delete old MBZDefend-Fix module
rm -rf /data/adb/modules/zdefend-fix
# Check if users trying to install this module under KernelSU/Next/RKSU/APatch
[[ -f /data/adb/apd ]] && echo "APatch detected!" && echo "Enabling provider..." && pm enable com.mbmobile/androidx.UnderlyingVcl && for library in $(find /data/app -name libweneedfreedom.so | grep com.mbmobile) ; do am start -n com.mbmobile/io.flutter.plugins.MainActivity ; done && exit 0
[[ -f /data/adb/ksud ]] && echo "KernelSU/Next/RKSU detected!" && echo "Enabling provider..." && pm enable com.mbmobile/androidx.UnderlyingVcl && for library in $(find /data/app -name libweneedfreedom.so | grep com.mbmobile) ; do am start -n com.mbmobile/io.flutter.plugins.MainActivity ; done && exit 0
# Magisk related code
# Delete /data/magisk if it exists so MB doesnt failling when eKYC with error code EKYC3002-MS6998 for Magisk users
echo "Deleting /data/magisk if it exists..."
[[ -d /data/magisk ]] && rm -r /data/magisk
find /data -name 'magisk_backup*' -delete
# Enable bulit-in zygisk
echo "Enabling bulit-in zygisk..."
magisk --sqlite 'insert into settings (key,value) values("zygisk","1");'
# Bulit-in zygisk is enough for MBCP...
echo "Deleting ZygiskNext/ReZygisk..."
rm -rf /data/adb/modules/zygisksu
rm -rf /data/adb/modules/rezygisk
echo "Enabling Denylist..."
magisk --denylist enable
magisk --denylist add com.mbmobile
echo "Use this only if you are replaced official app with MBCP"
echo "But also used MBZDefend-Fix module before!"
pm enable com.mbmobile/androidx.UnderlyingVcl
echo "Finding for MBCP app..."
for library in $(find /data/app -name libweneedfreedom.so | grep com.mbmobile) ; do am start -n com.mbmobile/io.flutter.plugins.MainActivity ; done
exit 0

7
module.prop Executable file
View file

@ -0,0 +1,7 @@
id=mbcp-fix
name=MB-to-MBCP Fix
version=v1.1-mbcp
versionCode=11
author=cuynu
description=Fixes device not secure issue after install MBCP from original MB with MBZDefend-Fix
updateJson=

3
service.sh Executable file
View file

@ -0,0 +1,3 @@
#!/system/bin/sh
pm enable com.mbmobile/androidx.UnderlyingVcl