From ee8a113e55f1a6bbf2cbf1d18e3c24a3691809de Mon Sep 17 00:00:00 2001 From: Cuynu Date: Fri, 26 Dec 2025 12:23:17 +0700 Subject: [PATCH] feat: proper darwin support Signed-off-by: Cuynu --- MBCPApp/mbcpapp.sh | 22 ++++++++++++++++++---- README.md | 2 +- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/MBCPApp/mbcpapp.sh b/MBCPApp/mbcpapp.sh index 69ed832..9936021 100755 --- a/MBCPApp/mbcpapp.sh +++ b/MBCPApp/mbcpapp.sh @@ -30,14 +30,14 @@ fi # Check if java exists if ! java -version ; then err "Java not found !!!" - info "Please install Java for your Linux distribution ! " + info "Please install Java for your system ! " exit 127 fi # Check if wget exists if ! wget --version ; then err "wget not found !!!" - info "Please install wget for your Linux distribution !" + info "Please install wget for your system !" exit 127 fi @@ -69,6 +69,20 @@ download_tools() { cd .. } +darwindeps() { + PATH="$HOMEBREW_PREFIX/opt/gnu-sed/libexec/gnubin:$PATH" +} + +darwin() { + [ $(brew list | grep gnu-sed) ] && echo "gnu-sed is installed!" && darwindeps || echo "gnu-sed is not installed. Please install it!" +} + +if uname -a | grep -i Darwin ; then + info "You have macOS environment :)" + darwin + clear +fi + copy_assets() { adb shell su -c cp -rf "/data/data/com.mbmobile/files/$1" /sdcard/assets } @@ -97,7 +111,7 @@ mb_apk_exist() { } unpack_mbcp() { - local - ; set -e + [ $(uname -a | grep Linux) ] && local - ; set -e { apkeditor_exist && mb_apk_exist ; } || return 1 rm -rf 'mbapk/mbapk_unpacked' rm -rf 'mbapk/*.apks' @@ -218,7 +232,7 @@ check_mbshield() { } convert_apks() { - local - ; set -e + [ $(uname -a | grep Linux) ] && local - ; set -e ls "$DIRPATH"/mbapk/*.apks >/dev/null 2>&1 || { err "APKs missing, cannot continue !" return 1 diff --git a/README.md b/README.md index 0b8522f..60d5116 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Lightweight **AI-free, human-written** open source tool for patching MB Bank (An ## Introduction - This project was made to remove or limit annoying features & root detection & accessibility detection that implemented by the development team of "MB Bank" Android app with additional features such as custom themes ability,etc. **It's not PoC (Proof of Concept) project at all.**. - [MBCP](https://t.me/mbcposs) are closed source before, and many people don't like it because concern about privacy & security issues. -- In order to support community and allow other devs to improve the project, I spend days to rewritten `MBCP` patches in Bash and open source it so you can patch yourself from original app on (Bare metal, not WSL) Linux environment +- In order to support community and allow other devs to improve the project, I spend days to rewritten `MBCP` patches in Bash and open source it so you can patch yourself from original app on Linux or Darwin (macOS) environment - Note : MBCP are "MBBank CorePatch" but shorter and `MBCP` / `MBCPApp` are the same thing as `MBCP`. ## DISCLAIMER