Skip to content

Commit be37df4

Browse files
authored
Merge pull request #1 from CGT-Software/0514
4.0.0514
2 parents b5859f8 + 9b7a0f2 commit be37df4

File tree

8 files changed

+33
-32
lines changed

8 files changed

+33
-32
lines changed

3.1.0127/customize.sh

Lines changed: 0 additions & 21 deletions
This file was deleted.

3.1.0127/module.prop

Lines changed: 0 additions & 7 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# MIUI-Flash-Freely
22
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.
33
Also available @ https://pan.cgtsoft.com/2%20MIUI%20Flash%20Freely
4-
Since v3.1.0127, if you have Magisk v24+ installed, you can always check and install the latest version in Magisk Manager.
5-
注意!如果已经有了内测权限,请停用此模块,否则将无法正常检查更新。
4+
Since v3.1.0127, if you have Magisk v24+ installed, you can always check and install the latest version in Magisk Manager.

customize.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
ui_print "- Checking if specific path exists"
2+
CHECK="/product/etc
3+
/vendor/etc"
4+
SUPPORT="0"
5+
for path in $CHECK; do
6+
if [[ -d $path/device_features ]]; then
7+
ui_print "- Found specific path"
8+
SUPPORT="1"
9+
break
10+
else
11+
ui_print "! Path $path/device_features was not found"
12+
ui_print "- Trying another possible one."
13+
fi
14+
done
15+
if [[ $SUPPORT == "0" ]]; then
16+
abort "! Error: Unsupported device!"
17+
else
18+
ui_print "- A reboot is needed to check the status."
19+
fi

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=v4.0.0514
4+
versionCode=6
5+
author=siergtc
6+
description=Only for V-A/B device. View https://github.com/ianchb/MIUI-Flash-Freely for more.
7+
updateJson=https://test.cgtsoft.com/mff_update
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,16 @@ CHECK="/product/etc
55
for path in $CHECK; do
66
if [[ -d $path/device_features ]]; then
77
TARGET_PATH="$path/device_features"
8+
sed -i 's/description=/description=[🥰]Working. This module is just right for you! /g' $MODDIR/module.prop
89
break
910
fi
1011
done
12+
if [ $TARGET_PATH="" ]; then
13+
sed -i 's/description=/description=[🤨]Your device is unsupported. This module will NOT work for you! /g' $MODDIR/module.prop
14+
exit
15+
fi
1116
CHANGE=$MODDIR/system/$TARGET_PATH
1217
mkdir -p $CHANGE
1318
rm $CHANGE/*
1419
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.**"
20+
sed -i 's/"support_ota_validate">true</"support_ota_validate">false</g' $CHANGE/*.xml

0 commit comments

Comments
 (0)