storefix: initial commit
Signed-off-by: Cuynu <cuynu@proton.me>
This commit is contained in:
commit
ae3656df3e
8 changed files with 113 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
.zip
|
||||
33
META-INF/com/google/android/update-binary
Normal file
33
META-INF/com/google/android/update-binary
Normal 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 0
|
||||
1
META-INF/com/google/android/updater-script
Normal file
1
META-INF/com/google/android/updater-script
Normal file
|
|
@ -0,0 +1 @@
|
|||
#MAGISK
|
||||
21
README.md
Normal file
21
README.md
Normal file
|
|
@ -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.
|
||||
12
createmodule.sh
Executable file
12
createmodule.sh
Executable file
|
|
@ -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
|
||||
|
||||
|
||||
|
||||
38
customize.sh
Executable file
38
customize.sh
Executable file
|
|
@ -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
|
||||
|
||||
|
||||
BIN
fix.bin
Normal file
BIN
fix.bin
Normal file
Binary file not shown.
7
module.prop
Executable file
7
module.prop
Executable file
|
|
@ -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=
|
||||
Loading…
Reference in a new issue