Skip to content

Commit e778e35

Browse files
authored
Add files via upload
Version 0102
1 parent 088ccbd commit e778e35

File tree

10 files changed

+128
-0
lines changed

10 files changed

+128
-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

1.1.x/customize.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
ui_print "**************************"
2+
ui_print "MIUI Flash Freely v1.1.0102"
3+
ui_print "- HEY! If you are using MIUI13"
4+
ui_print "- and the module does not work,"
5+
ui_print "- Please try v2.1.x version!"
6+
ui_print "**************************"
7+
CHECK="/vendor/etc"
8+
for path in $CHECK; do
9+
if [[ -d $path/device_features ]]; then
10+
ui_print "- Specific Directory Found!"
11+
else
12+
ui_print "- Error: Directory Not Found. Unsupported device?"
13+
abort "- Notice: Please try v2.1.x version!"
14+
exit
15+
fi
16+
done

1.1.x/module.prop

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
id=MIUI_Flash_Freely
2+
name=MIUI Flash Freely
3+
version=v1.1.0102
4+
versionCode=3
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 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.

1.1.x/post-fs-data.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
MODDIR=${0%/*}
2+
TARGET_PATH="/vendor/etc/device_features"
3+
CHANGE=$MODDIR/system/$TARGET_PATH
4+
mkdir -p $CHANGE
5+
rm $CHANGE/*
6+
cp -f $TARGET_PATH/* $CHANGE/
7+
sed -i 's/"support_ota_validate">true</"support_ota_validate">false</g' $CHANGE/*.xml
8+
ui_print "**Key support_ota_validate changed successfully.**"
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

2.1.x/customize.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
ui_print "**************************"
2+
ui_print "MIUI Flash Freely v2.1.0102"
3+
ui_print "- HEY! If you are using MIUI12/12.5"
4+
ui_print "- and the module does not work,"
5+
ui_print "- Please try v1.1.x version!"
6+
ui_print "**************************"
7+
CHECK="/product/etc"
8+
for path in $CHECK; do
9+
if [[ -d $path/device_features ]]; then
10+
ui_print "- Specific Directory Found!"
11+
else
12+
ui_print "- Error: Directory Not Found. Unsupported device?"
13+
abort "- Notice: Please try v1.1.x version!"
14+
exit
15+
fi
16+
done

2.1.x/module.prop

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
id=MIUI_Flash_Freely
2+
name=MIUI Flash Freely
3+
version=v2.1.0102
4+
versionCode=3
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 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.

2.1.x/post-fs-data.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
MODDIR=${0%/*}
2+
TARGET_PATH="/product/etc/device_features"
3+
CHANGE=$MODDIR/system/$TARGET_PATH
4+
mkdir -p $CHANGE
5+
rm $CHANGE/*
6+
cp -f $TARGET_PATH/* $CHANGE/
7+
sed -i 's/"support_ota_validate">true</"support_ota_validate">false</g' $CHANGE/*.xml
8+
ui_print "**Key support_ota_validate changed successfully.**"

0 commit comments

Comments
 (0)