Skip to content

Commit b5859f8

Browse files
authored
Add files via upload
3.1.0127
1 parent e560fe7 commit b5859f8

File tree

5 files changed

+78
-0
lines changed

5 files changed

+78
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/sbin/sh
2+
3+
#################
4+
# Initialization
5+
#################
6+
7+
umask 022
8+
9+
# echo before loading util_functions
10+
ui_print() { echo "$1"; }
11+
12+
require_new_magisk() {
13+
ui_print "********************************"
14+
ui_print "Magisk v20.4+ is required! "
15+
ui_print "********************************"
16+
exit 1
17+
}
18+
19+
#########################
20+
# Load util_functions.sh
21+
#########################
22+
23+
OUTFD=$2
24+
ZIPFILE=$3
25+
26+
mount /data 2>/dev/null
27+
28+
[ -f /data/adb/magisk/util_functions.sh ] || require_new_magisk
29+
. /data/adb/magisk/util_functions.sh
30+
[ $MAGISK_VER_CODE -lt 20400 ] && require_new_magisk
31+
32+
install_module
33+
exit 0
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#MAGISK

3.1.0127/customize.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
ui_print "**************************"
2+
ui_print "MIUI Flash Freely v3.1.0127"
3+
ui_print "**************************"
4+
CHECK="/vendor/etc
5+
/product/etc"
6+
SUPPORT="0"
7+
for path in $CHECK; do
8+
if [[ -d $path/device_features ]]; then
9+
ui_print "- Specific Directory Found!"
10+
SUPPORT="1"
11+
break
12+
else
13+
ui_print "! Warning: Directory $path/device_features Not Found."
14+
ui_print "- Trying another one."
15+
fi
16+
done
17+
if [[ $SUPPORT == "0" ]]; then
18+
abort "! Error: Unsupported device!"
19+
else
20+
ui_print "- Completed successfully!"
21+
fi

3.1.0127/module.prop

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
id=MIUI_Flash_Freely
2+
name=MIUI Flash Freely
3+
version=v3.1.0127
4+
versionCode=5
5+
author=siergtc @ cgtsoft.com
6+
description=By changing the "support_ota_validate" value in the device_features file of any available Xiaomi or Redmi phone running MIUI 12/12.5/13 to "false", it is possible to freely select the .zip package in the System Update App and flash it, even the package is in alpha.
7+
updateJson=https://test.cgtsoft.com/mff_update

3.1.0127/post-fs-data.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
MODDIR=${0%/*}
2+
TARGET_PATH=""
3+
CHECK="/product/etc
4+
/vendor/etc"
5+
for path in $CHECK; do
6+
if [[ -d $path/device_features ]]; then
7+
TARGET_PATH="$path/device_features"
8+
break
9+
fi
10+
done
11+
CHANGE=$MODDIR/system/$TARGET_PATH
12+
mkdir -p $CHANGE
13+
rm $CHANGE/*
14+
cp -f $TARGET_PATH/* $CHANGE/
15+
sed -i 's/"support_ota_validate">true</"support_ota_validate">false</g' $CHANGE/*.xml
16+
ui_print "**Key support_ota_validate changed successfully.**"

0 commit comments

Comments
 (0)