commit ae3656df3e6daca9ba8ae3471aac191d83e62427 Author: Cuynu Date: Sun Mar 29 08:51:41 2026 +0700 storefix: initial commit Signed-off-by: Cuynu diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a5c7d3a --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.zip diff --git a/META-INF/com/google/android/update-binary b/META-INF/com/google/android/update-binary new file mode 100644 index 0000000..28b48e5 --- /dev/null +++ b/META-INF/com/google/android/update-binary @@ -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 0 diff --git a/META-INF/com/google/android/updater-script b/META-INF/com/google/android/updater-script new file mode 100644 index 0000000..11d5c96 --- /dev/null +++ b/META-INF/com/google/android/updater-script @@ -0,0 +1 @@ +#MAGISK diff --git a/README.md b/README.md new file mode 100644 index 0000000..801202d --- /dev/null +++ b/README.md @@ -0,0 +1,21 @@ +# StoreFix for MB Flutter +- Fixes download issues from MB Theme Store after install customized theme modules + +# Creation + +``` +git clone https://git.disroot.org/mbcp/storefix +cd storefix +./createmodule.sh +``` + +# Usage +- Download from releases +- Flash as Magisk module +- Note that all of your current installed theme (except builit-in theme) will be lost. +- Now you can download themes from MB Store normally, and install customized theme modules as usual. +- Reflash the module everytime you delete the app, clear data app. + +# Other workaround +- Before you install any customized theme modules, go to app once, download 01 random themes from MB Store Themes, then install customized module themes, so the MB Store Theme won't refuse to download any it's store theme. +- If you installed customized theme modules before download any theme from MB Store Theme, clear app data, or remove `/data/data/com.mbmobile/app_flutter/app_theme` folder and then do as above. diff --git a/createmodule.sh b/createmodule.sh new file mode 100755 index 0000000..bb8a572 --- /dev/null +++ b/createmodule.sh @@ -0,0 +1,12 @@ +#/usr/bin/env bash + +[ ! $(zip -v) ] && echo "[zip] not found! Cannot continue!" + +# Remove old module +rm -rf *.zip + +echo "Creating module [storefix.zip]..." +zip -r storefix.zip META-INF customize.sh module.prop fix.bin + + + diff --git a/customize.sh b/customize.sh new file mode 100755 index 0000000..3bdf99e --- /dev/null +++ b/customize.sh @@ -0,0 +1,38 @@ +#/system/bin/sh + +echo "This module will fix store theme download issues for who installed customized module themes." + +tmpfix() { + echo "Applying fixes..." + rm -rf '/data/data/com.mbmobile/app_flutter/app_theme' + unzip -o "$ZIPFILE" 'fix.bin' + unzip fix.bin -o -d '/data/data/com.mbmobile/app_flutter/' + echo "Opening app..." + am force-stop com.mbmobile + am start -n com.mbmobile/io.flutter.plugins.MainActivity + echo "This is not a real module. It only supposed to fix store theme download issues." + echo "Your root manager should refuse to complete module installation." + exit 169 +} + +appnotinit() { + echo "App not initialized or too old. Cannot continue" + echo "This fix is only needed to run after the app is opened once." + exit 169 +} + +no_oldtheme() { + echo "Applying fixes..." + rm -rf '/data/data/com.mbmobile/app_flutter/app_theme' + unzip -o "$ZIPFILE" 'fix.bin' + unzip fix.bin -o -d '/data/data/com.mbmobile/app_flutter/' + echo "This is not a real module. It only supposed to fix store theme download issues." + echo "Your root manager should refuse to complete module installation." + exit 169 +} + +[ ! -d /data/data/com.mbmobile/app_flutter ] && appnotinit + +[ -d /data/data/com.mbmobile/app_flutter ] && tmpfix + + diff --git a/fix.bin b/fix.bin new file mode 100644 index 0000000..5d6884f Binary files /dev/null and b/fix.bin differ diff --git a/module.prop b/module.prop new file mode 100755 index 0000000..aca1c34 --- /dev/null +++ b/module.prop @@ -0,0 +1,7 @@ +id=storefix +name=MB StoreFix module +version=v1.0-storefix +versionCode=1 +author=cuynu +description=Fix downloading issues from theme Store after installed some customized theme modules for MB (Flutter). +updateJson=