Skip to content

Commit

Permalink
Systemlessly disable mi_thermald
Browse files Browse the repository at this point in the history
  • Loading branch information
VR-25 committed Jul 18, 2022
1 parent deb4736 commit d74a647
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
11 changes: 11 additions & 0 deletions META-INF/com/google/android/update-binary
Original file line number Diff line number Diff line change
Expand Up @@ -286,4 +286,15 @@ rm $data_dir/${id}-uninstaller.zip $data_dir/logs/*.tar.gz $data_dir/curr 2>/dev
# initialize $id
/data/adb/$domain/$id/service.sh --init

# disable mi_thermald
miThermald=/vendor/bin/mi_thermald
miThermald_=$miThermald
if [ -f $miThermald ] && [ -f $magiskModDir/$id/module.prop ]; then
miThermald=$magiskModDir/$id/system$miThermald
mkdir -p ${miThermald%/*}
echo "#dummy" > $miThermald
magisk --clone-attr $miThermald_ $miThermald 2>/dev/null
grep -q "^#dummy$" $miThermald_ || printf "\nmi_thermald has been disabled. Reboot to apply change.\n"
fi

exit 0
11 changes: 11 additions & 0 deletions customize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -286,4 +286,15 @@ rm $data_dir/${id}-uninstaller.zip $data_dir/logs/*.tar.gz $data_dir/curr 2>/dev
# initialize $id
/data/adb/$domain/$id/service.sh --init

# disable mi_thermald
miThermald=/vendor/bin/mi_thermald
miThermald_=$miThermald
if [ -f $miThermald ] && [ -f $magiskModDir/$id/module.prop ]; then
miThermald=$magiskModDir/$id/system$miThermald
mkdir -p ${miThermald%/*}
echo "#dummy" > $miThermald
magisk --clone-attr $miThermald_ $miThermald 2>/dev/null
grep -q "^#dummy$" $miThermald_ || printf "\nmi_thermald has been disabled. Reboot to apply change.\n"
fi

exit 0
11 changes: 11 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -286,4 +286,15 @@ rm $data_dir/${id}-uninstaller.zip $data_dir/logs/*.tar.gz $data_dir/curr 2>/dev
# initialize $id
/data/adb/$domain/$id/service.sh --init

# disable mi_thermald
miThermald=/vendor/bin/mi_thermald
miThermald_=$miThermald
if [ -f $miThermald ] && [ -f $magiskModDir/$id/module.prop ]; then
miThermald=$magiskModDir/$id/system$miThermald
mkdir -p ${miThermald%/*}
echo "#dummy" > $miThermald
magisk --clone-attr $miThermald_ $miThermald 2>/dev/null
grep -q "^#dummy$" $miThermald_ || printf "\nmi_thermald has been disabled. Reboot to apply change.\n"
fi

exit 0

0 comments on commit d74a647

Please sign in to comment.