├── system ├── lib64 │ └── libthermalservice.so └── vendor │ ├── bin │ ├── mi_thermald │ ├── thermal-engine │ ├── thermal_factory │ └── thermal-engine-v2 │ └── etc │ ├── init │ └── android.hardware.thermal@1.0-service.rc │ ├── thermal-engine.conf │ ├── thermal-4k.conf │ ├── thermal-map.conf │ ├── thermal-camera.conf │ ├── thermal-cgame.conf │ ├── thermal-class0.conf │ ├── thermal-huanji.conf │ ├── thermal-mgame.conf │ ├── thermal-normal.conf │ ├── thermal-phone.conf │ ├── thermal-tgame.conf │ ├── thermal-video.conf │ ├── thermal-hp-mgame.conf │ ├── thermal-hp-normal.conf │ ├── thermal-nolimits.conf │ ├── thermal-per-cgame.conf │ ├── thermal-per-video.conf │ ├── thermal-videochat.conf │ ├── thermal-yuanshen.conf │ ├── thermal-cclassvideo.conf │ ├── thermal-dolbyvision.conf │ ├── thermal-navigation.conf │ ├── thermal-per-class0.conf │ ├── thermal-per-normal.conf │ ├── thermal-per-navigation.conf │ ├── thermal-per-cclassvideo.conf │ ├── thermal-chg-only.conf │ └── thermald-devices.conf ├── META-INF └── com │ └── google │ └── android │ ├── updater-script │ └── update-binary ├── common ├── system.prop ├── post-fs-data.sh ├── uninstall.sh └── service.sh ├── module.prop ├── version.json ├── CHANGELOG.md ├── .github └── FUNDING.yml ├── README.md └── install.sh /system/lib64/libthermalservice.so: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /system/vendor/bin/mi_thermald: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /system/vendor/bin/thermal-engine: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /system/vendor/bin/thermal_factory: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /system/vendor/bin/thermal-engine-v2: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /META-INF/com/google/android/updater-script: -------------------------------------------------------------------------------- 1 | #MAGISK 2 | -------------------------------------------------------------------------------- /system/vendor/etc/init/android.hardware.thermal@1.0-service.rc: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /system/vendor/etc/thermal-engine.conf: -------------------------------------------------------------------------------- 1 | # File empty by default. 2 | # Replace contents of this file with custom configuration. 3 | -------------------------------------------------------------------------------- /system/vendor/etc/thermal-4k.conf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahisataruna/Kreapic-Disable-Thermal/HEAD/system/vendor/etc/thermal-4k.conf -------------------------------------------------------------------------------- /system/vendor/etc/thermal-map.conf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahisataruna/Kreapic-Disable-Thermal/HEAD/system/vendor/etc/thermal-map.conf -------------------------------------------------------------------------------- /system/vendor/etc/thermal-camera.conf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahisataruna/Kreapic-Disable-Thermal/HEAD/system/vendor/etc/thermal-camera.conf -------------------------------------------------------------------------------- /system/vendor/etc/thermal-cgame.conf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahisataruna/Kreapic-Disable-Thermal/HEAD/system/vendor/etc/thermal-cgame.conf -------------------------------------------------------------------------------- /system/vendor/etc/thermal-class0.conf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahisataruna/Kreapic-Disable-Thermal/HEAD/system/vendor/etc/thermal-class0.conf -------------------------------------------------------------------------------- /system/vendor/etc/thermal-huanji.conf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahisataruna/Kreapic-Disable-Thermal/HEAD/system/vendor/etc/thermal-huanji.conf -------------------------------------------------------------------------------- /system/vendor/etc/thermal-mgame.conf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahisataruna/Kreapic-Disable-Thermal/HEAD/system/vendor/etc/thermal-mgame.conf -------------------------------------------------------------------------------- /system/vendor/etc/thermal-normal.conf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahisataruna/Kreapic-Disable-Thermal/HEAD/system/vendor/etc/thermal-normal.conf -------------------------------------------------------------------------------- /system/vendor/etc/thermal-phone.conf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahisataruna/Kreapic-Disable-Thermal/HEAD/system/vendor/etc/thermal-phone.conf -------------------------------------------------------------------------------- /system/vendor/etc/thermal-tgame.conf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahisataruna/Kreapic-Disable-Thermal/HEAD/system/vendor/etc/thermal-tgame.conf -------------------------------------------------------------------------------- /system/vendor/etc/thermal-video.conf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahisataruna/Kreapic-Disable-Thermal/HEAD/system/vendor/etc/thermal-video.conf -------------------------------------------------------------------------------- /system/vendor/etc/thermal-hp-mgame.conf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahisataruna/Kreapic-Disable-Thermal/HEAD/system/vendor/etc/thermal-hp-mgame.conf -------------------------------------------------------------------------------- /system/vendor/etc/thermal-hp-normal.conf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahisataruna/Kreapic-Disable-Thermal/HEAD/system/vendor/etc/thermal-hp-normal.conf -------------------------------------------------------------------------------- /system/vendor/etc/thermal-nolimits.conf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahisataruna/Kreapic-Disable-Thermal/HEAD/system/vendor/etc/thermal-nolimits.conf -------------------------------------------------------------------------------- /system/vendor/etc/thermal-per-cgame.conf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahisataruna/Kreapic-Disable-Thermal/HEAD/system/vendor/etc/thermal-per-cgame.conf -------------------------------------------------------------------------------- /system/vendor/etc/thermal-per-video.conf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahisataruna/Kreapic-Disable-Thermal/HEAD/system/vendor/etc/thermal-per-video.conf -------------------------------------------------------------------------------- /system/vendor/etc/thermal-videochat.conf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahisataruna/Kreapic-Disable-Thermal/HEAD/system/vendor/etc/thermal-videochat.conf -------------------------------------------------------------------------------- /system/vendor/etc/thermal-yuanshen.conf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahisataruna/Kreapic-Disable-Thermal/HEAD/system/vendor/etc/thermal-yuanshen.conf -------------------------------------------------------------------------------- /system/vendor/etc/thermal-cclassvideo.conf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahisataruna/Kreapic-Disable-Thermal/HEAD/system/vendor/etc/thermal-cclassvideo.conf -------------------------------------------------------------------------------- /system/vendor/etc/thermal-dolbyvision.conf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahisataruna/Kreapic-Disable-Thermal/HEAD/system/vendor/etc/thermal-dolbyvision.conf -------------------------------------------------------------------------------- /system/vendor/etc/thermal-navigation.conf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahisataruna/Kreapic-Disable-Thermal/HEAD/system/vendor/etc/thermal-navigation.conf -------------------------------------------------------------------------------- /system/vendor/etc/thermal-per-class0.conf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahisataruna/Kreapic-Disable-Thermal/HEAD/system/vendor/etc/thermal-per-class0.conf -------------------------------------------------------------------------------- /system/vendor/etc/thermal-per-normal.conf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahisataruna/Kreapic-Disable-Thermal/HEAD/system/vendor/etc/thermal-per-normal.conf -------------------------------------------------------------------------------- /system/vendor/etc/thermal-per-navigation.conf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahisataruna/Kreapic-Disable-Thermal/HEAD/system/vendor/etc/thermal-per-navigation.conf -------------------------------------------------------------------------------- /common/system.prop: -------------------------------------------------------------------------------- 1 | # This file will be read by resetprop 2 | # Kreapic Disable Thermal 3 | 4 | ro.vendor.dfps.enable=false 5 | ro.vendor.smart_dfps.enable=false 6 | -------------------------------------------------------------------------------- /system/vendor/etc/thermal-per-cclassvideo.conf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahisataruna/Kreapic-Disable-Thermal/HEAD/system/vendor/etc/thermal-per-cclassvideo.conf -------------------------------------------------------------------------------- /common/post-fs-data.sh: -------------------------------------------------------------------------------- 1 | #!/system/bin/sh 2 | # Please don't hardcode /magisk/modname/... ; instead, please use $MODDIR/... 3 | # This will make your scripts compatible even if Magisk change its mount point in the future 4 | MODDIR=${0%/*} 5 | 6 | # This script will be executed in post-fs-data mode 7 | # More info in the main Magisk thread 8 | -------------------------------------------------------------------------------- /module.prop: -------------------------------------------------------------------------------- 1 | id=kreapic-disable-thermal-universal 2 | name=Kreapic Disable Thermal Universal 3 | version=1.1 4 | versionCode=101 5 | author=Kreapic X AlgorithmIDN 6 | description=This is a Magisk module that is useful for disabling the thermal of your smartphone. 7 | Use it wisely, and all risks are your own responsibility. 8 | device=Universal 9 | -------------------------------------------------------------------------------- /version.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.1", 3 | "versionCode": 101, 4 | "author" : "AlgorithmIDN", 5 | "update-time": "20241130", 6 | "changelog": "https://github.com/mahisataruna/Kreapic-Disable-Thermal/blob/v1.0/CHANGELOG.md", 7 | "zipUrl": "https://github.com/mahisataruna/Kreapic-Disable-Thermal/releases/tag/v1.0-beta" 8 | } 9 | -------------------------------------------------------------------------------- /common/uninstall.sh: -------------------------------------------------------------------------------- 1 | # Don't modify anything after this 2 | if [ -f $INFO ]; then 3 | while read LINE; do 4 | if [ "$(echo -n $LINE | tail -c 1)" == "~" ]; then 5 | continue 6 | elif [ -f "$LINE~" ]; then 7 | mv -f $LINE~ $LINE 8 | else 9 | rm -f $LINE 10 | while true; do 11 | LINE=$(dirname $LINE) 12 | [ "$(ls -A $LINE 2>/dev/null)" ] && break 1 || rm -rf $LINE 13 | done 14 | fi 15 | done < $INFO 16 | rm -f $INFO 17 | fi -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## [Releases] 4 | 5 | ## [1.1] - 2024-11-30 6 | 7 | ### Changed 8 | - Minor Update `service.sh` 9 | 10 | ### Fixed 11 | - Stabilization system `HOT_ISSUES` 12 | 13 | ## [Unreleased] 14 | 15 | ## [1.0] - 2023-11-17 16 | 17 | ### Added 18 | - Universal Initial Build version 1.0 `BETA` 19 | 20 | [releases]: https://github.com/mahisataruna/Kreapic-Disable-Thermal/releases/tag/v1.1 21 | [1.1]: https://github.com/mahisataruna/Kreapic-Disable-Thermal/tree/16f4fc6054764f0ef60e332a6ae88808b25a3f36 22 | 23 | [unreleased]: https://github.com/mahisataruna/Kreapic-Disable-Thermal/compare/v1.0-beta...v1.1 24 | [1.0]: https://github.com/mahisataruna/Kreapic-Disable-Thermal/tree/fa1810724266f397d4dfaa176753d6d21deb4963 25 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [mahisataruna] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | saweria: AlgorithmDev [https://saweria.co/algorithmdev] 5 | patreon: # Replace with a single Patreon username 6 | open_collective: # Replace with a single Open Collective username 7 | ko_fi: # Replace with a single Ko-fi username 8 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 9 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 10 | liberapay: # Replace with a single Liberapay username 11 | issuehunt: # Replace with a single IssueHunt username 12 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 13 | polar: # Replace with a single Polar username 14 | buy_me_a_coffee: # Replace with a single Buy Me a Coffee username 15 | thanks_dev: # Replace with a single thanks.dev username 16 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 17 | -------------------------------------------------------------------------------- /system/vendor/etc/thermal-chg-only.conf: -------------------------------------------------------------------------------- 1 | [VIRTUAL-SENSOR0] 2 | algo_type Virtual 3 | sensors battery pa_therm0 pa_therm1 quiet_therm charger_therm0 wifi_therm cpu_therm 4 | weight 177 -35 125 529 160 -210 186 5 | polling 1000 6 | weight_sum 1000 7 | compensation 1045 8 | 9 | [CHG-ONLY-MONITOR-SENSOR0] 10 | algo_type monitor 11 | sensor VIRTUAL-SENSOR0 12 | device VIRTUAL-SENSOR0 13 | polling 1000 14 | trig 25000 30000 35000 15 | clr 23000 27000 32000 16 | target 10000 5000 1000 17 | 18 | [CHG-ONLY-SS-CPU4] 19 | algo_type ss 20 | sensor VIRTUAL-SENSOR0 21 | device cpu4 22 | polling 1000 23 | trig 10000 30000 35000 37000 39000 41000 42000 43000 44000 45000 24 | clr 9000 28000 33000 35000 37000 39000 41000 42000 43000 44000 25 | target 2112000 1881600 1766400 1651200 1440000 1324800 1113600 998400 883200 633600 26 | 27 | [CHG-ONLY-SS-CPU7] 28 | algo_type ss 29 | sensor VIRTUAL-SENSOR0 30 | device cpu7 31 | polling 1000 32 | trig 10000 30000 35000 37000 39000 41000 42000 43000 44000 33 | clr 9000 28000 33000 35000 37000 39000 41000 42000 43000 34 | target 2246400 1996800 1881600 1651200 1401600 1171200 1036800 921600 787200 35 | 36 | [CHG-ONLY-MONITOR-BAT] 37 | algo_type monitor 38 | sensor VIRTUAL-SENSOR0 39 | device battery 40 | polling 2000 41 | trig 34000 36500 37500 38500 40000 41000 41800 44000 45000 42 | clr 32000 35000 36500 37500 38500 40000 41000 41800 44000 43 | target 700 802 903 1004 1005 1106 1408 1411 1515 -------------------------------------------------------------------------------- /common/service.sh: -------------------------------------------------------------------------------- 1 | #!/system/bin/sh 2 | sleep 20 3 | 4 | # Universal Thermal Disable 5 | echo disable > /sys/class/thermal/thermal_zone*/mode 6 | 7 | # Stop any thermal feature 8 | echo 0 > /proc/sys/kernel/sched_boost 9 | echo N > /sys/module/msm_thermal/parameters/enabled 10 | echo 0 > /sys/module/msm_thermal/core_control/enabled 11 | echo 0 > /sys/kernel/msm_thermal/enabled 12 | 13 | # Stop statistic storage feature 14 | for queue in /sys/block/sd*/queue 15 | do 16 | echo "0" > "$queue/iostats" 17 | done 18 | 19 | sleep 5 20 | 21 | # Thermal stop method 22 | stop logd 23 | sleep 1 24 | stop android.thermal-hal 25 | sleep 1 26 | stop vendor.thermal-engine 27 | sleep 1 28 | stop vendor.thermal_manager 29 | sleep 1 30 | stop vendor.thermal-manager 31 | sleep 1 32 | stop vendor.thermal-hal-2-0 33 | sleep 1 34 | stop vendor.thermal-symlinks 35 | sleep 1 36 | stop thermal_mnt_hal_service 37 | sleep 1 38 | stop thermal 39 | sleep 1 40 | stop mi_thermald 41 | sleep 1 42 | stop thermald 43 | sleep 1 44 | stop thermalloadalgod 45 | sleep 1 46 | stop thermalservice 47 | sleep 1 48 | stop sec-thermal-1-0 49 | sleep 1 50 | stop debug_pid.sec-thermal-1-0 51 | sleep 1 52 | stop thermal-engine 53 | sleep 1 54 | stop vendor.thermal-hal-1-0 55 | sleep 1 56 | stop vendor-thermal-1-0 57 | sleep 1 58 | stop thermal-hal 59 | sleep 3 60 | 61 | # Setprop thermal disable 62 | setprop init.svc.thermal stopped 63 | setprop init.svc.thermal-managers stopped 64 | setprop init.svc.thermal_manager stopped 65 | setprop init.svc.thermal_mnt_hal_service stopped 66 | setprop init.svc.thermal-engine stopped 67 | setprop init.svc.mi-thermald stopped 68 | setprop init.svc.thermalloadalgod stopped 69 | setprop init.svc.thermalservice stopped 70 | setprop init.svc.thermal-hal stopped 71 | setprop init.svc.vendor.thermal-symlinks 72 | setprop init.svc.android.thermal-hal stopped 73 | setprop init.svc.vendor.thermal-hal stopped 74 | setprop init.svc.thermal-manager stopped 75 | setprop init.svc.vendor-thermal-hal-1-0 stopped 76 | setprop init.svc.vendor.thermal-hal-1-0 stopped 77 | setprop init.svc.vendor.thermal-hal-2-0.mtk stopped 78 | setprop init.svc.vendor.thermal-hal-2-0 stopped -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 9 |

10 | 11 |

12 | 13 |

Kreapic Disable Thermal Universal

14 | 15 |
16 | 17 | 18 |

19 | This is Magisk module to disabling smartphone thermal engine. 20 |

21 |
22 | 23 | ## Description 24 | 25 | This is a Magisk module that is useful for disabling the thermal of your smartphone. 26 | Use it wisely, and all risks are your own responsibility. 27 | 28 | ## Function 29 | This module functions to disable your smartphone's thermal engine. Please note, when you turn off thermal, your device will overheat and it is not recommended to charge devices that use this module while playing. 30 | 31 | ## Requirement 32 | 33 | - Magisk v23.0 or higher 34 | 35 | ## Changelog 36 | 37 | - Check out what's new [here](https://github.com/mahisataruna/Kreapic-Disable-Thermal/blob/v1.0/CHANGELOG.md) 38 | 39 | ## Download 40 | 41 | Download [Github](https://github.com/mahisataruna/Kreapic-Disable-Thermal/releases/tag/v1.1) 42 | 43 | [![Github](https://img.shields.io/badge/Github-Releases-48C21A.svg?style=flat&logo=github)](https://github.com/mahisataruna/Kreapic-Disable-Thermal/releases/tag/v1.1) 44 | 45 | 46 | ## Note 47 | 48 | Please use this module wisely. I am not responsible for any damage caused by this module. All risks are your own. 49 | 50 | 51 |

52 | 53 | 54 |
55 | AlgorithmIDN © 2024 56 |

57 | -------------------------------------------------------------------------------- /system/vendor/etc/thermald-devices.conf: -------------------------------------------------------------------------------- 1 | #Device discribe config 2 | 3 | #GPU 4 | [ 5 | name:gpu 6 | cooling_name:gpu 7 | def_target:0 8 | select_higher:1 9 | ] 10 | 11 | #battery 12 | [ 13 | name:battery 14 | cooling_name:battery 15 | def_target:0 16 | select_higher:1 17 | ] 18 | 19 | #backlight-clone 20 | [ 21 | name:backlight-clone 22 | cooling_name:brightness0-clone 23 | def_target:200 24 | select_higher:0 25 | ] 26 | 27 | #temp_state 28 | [ 29 | name:temp_state 30 | path:/sys/class/thermal/thermal_message/temp_state 31 | def_target:0 32 | select_higher:1 33 | ] 34 | 35 | #hbm 36 | [ 37 | name:thermal_hbm_disabled 38 | path:/sys/class/drm/card0-DSI-1/thermal_hbm_disabled 39 | def_target:0 40 | select_higher:1 41 | ] 42 | 43 | #wireless charge 44 | [ 45 | name:wireless_charge 46 | path:/sys/class/qcom-battery/wlscharge_control_limit 47 | def_target:0 48 | select_higher:1 49 | ] 50 | 51 | #modem uplink 52 | [ 53 | name:modem_ul 54 | cooling_name:modem_pa 55 | def_target:0 56 | select_higher:1 57 | ] 58 | 59 | #modem downlink 60 | [ 61 | name:modem_dl 62 | cooling_name:modem_tj 63 | def_target:0 64 | select_higher:1 65 | ] 66 | 67 | #debug_current 68 | [ 69 | name:thermal_fcc_override 70 | path:/sys/class/power_supply/battery/constant_charge_current 71 | def_target:22000000 72 | select_higher:0 73 | ] 74 | 75 | #modem_limit 76 | [ 77 | name:modem_limit 78 | path:/sys/class/thermal/thermal_message/modem_limit 79 | def_target:0 80 | select_higher:1 81 | ] 82 | 83 | #market_download_limit 84 | [ 85 | name:market_download_limit 86 | path:/sys/class/thermal/thermal_message/market_download_limit 87 | def_target:0 88 | select_higher:1 89 | ] 90 | 91 | #cpu4 92 | [ 93 | name:lmh_cpu4 94 | cooling_name:cpu4 95 | def_target:0 96 | select_higher:1 97 | ] 98 | 99 | #cpu7 100 | [ 101 | name:lmh_cpu7 102 | cooling_name:cpu7 103 | def_target:0 104 | select_higher:1 105 | ] 106 | 107 | #modem_pa_nr 108 | [ 109 | name:modem_pa_nr 110 | cooling_name:pa_nr_sdr1_scg_dsc 111 | def_target:0 112 | select_higher:1 113 | ] 114 | 115 | #modem downlink 116 | [ 117 | name:modem_pa_lte 118 | cooling_name:pa_lte_sdr1_dsc 119 | def_target:0 120 | select_higher:1 121 | ] 122 | 123 | #poor_modem_limit 124 | [ 125 | name:poor_modem_limit 126 | path:/sys/class/thermal/thermal_message/poor_modem_limit 127 | def_target:0 128 | select_higher:1 129 | ] 130 | 131 | #wifi_limit 132 | [ 133 | name:wifi_limit 134 | path:/sys/class/thermal/thermal_message/wifi_limit 135 | def_target:0 136 | select_higher:1 137 | ] 138 | 139 | #pause cpu7 140 | [ 141 | name:hotplug_cpu7 142 | cooling_name:pause-cpu7 143 | def_target:0 144 | select_higher:1 145 | ] 146 | -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | ########################################################################################## 2 | # 3 | # Magisk Module Template Config Script 4 | # by topjohnwu 5 | # 6 | ########################################################################################## 7 | ########################################################################################## 8 | # 9 | # Instructions: 10 | # 11 | # 1. Place your files into system folder (delete the placeholder file) 12 | # 2. Fill in your module's info into module.prop 13 | # 3. Configure the settings in this file (config.sh) 14 | # 4. If you need boot scripts, add them into common/post-fs-data.sh or common/service.sh 15 | # 5. Add your additional or modified system properties into common/system.prop 16 | # 17 | ########################################################################################## 18 | 19 | SKIPMOUNT=false 20 | 21 | PROPFILE=true 22 | 23 | POSTFSDATA=true 24 | 25 | LATESTARTSERVICE=true 26 | 27 | REPLACE_EXAMPLE=" 28 | /system/app/Youtube 29 | /system/priv-app/SystemUI 30 | /system/priv-app/Settings 31 | /system/framework 32 | " 33 | 34 | 35 | REPLACE=" 36 | " 37 | 38 | print_modname() { 39 | ui_print " Kreapic Disable Thermal Version 1.1 " 40 | busybox sleep 1 41 | ui_print " " 42 | busybox sleep 1 43 | ui_print " By : Kreapic x AlgorithmIDN " 44 | busybox sleep 1 45 | ui_print " Install BusyBox" 46 | busybox sleep 5 47 | ui_print " " 48 | busybox sleep 1 49 | ui_print " Please wait.. " 50 | ui_print " " 51 | busybox sleep 1 52 | ui_print " Loading..." 53 | busybox sleep 1 54 | ui_print " Installing..." 55 | ui_print " Wait.." 56 | busybox sleep 1 57 | ui_print " Installing success " 58 | busybox sleep 1 59 | ui_print " Reboot Your Device " 60 | } 61 | 62 | 63 | # Copy/extract your module files into $MODPATH in on_install. 64 | 65 | on_install() { 66 | # The following is the default implementation: extract $ZIPFILE/system to $MODPATH 67 | # Extend/change the logic to whatever you want 68 | ui_print "- Extracting module files" 69 | unzip -o "$ZIPFILE" 'system/*' -d $MODPATH >&2 70 | } 71 | 72 | # Only some special files require specific permissions 73 | # This function will be called after on_install is done 74 | # The default permissions should be good enough for most cases 75 | 76 | set_permissions() { 77 | # The following is the default rule, DO NOT remove 78 | set_perm_recursive $MODPATH 0 0 0755 0644 79 | set_perm $MODPATH/system/bin/P0 0 0 0755 0755 80 | set_perm $MODPATH/system/bin/P1 0 0 0755 0755 81 | 82 | # Here are some examples: 83 | # set_perm_recursive $MODPATH/system/lib 0 0 0755 0644 84 | # set_perm $MODPATH/system/bin/app_process32 0 2000 0755 u:object_r:zygote_exec:s0 85 | # set_perm $MODPATH/system/bin/dex2oat 0 2000 0755 u:object_r:dex2oat_exec:s0 86 | # set_perm $MODPATH/system/lib/libart.so 0 0 0644 87 | } 88 | 89 | # You can add more functions to assist your custom script code 90 | -------------------------------------------------------------------------------- /META-INF/com/google/android/update-binary: -------------------------------------------------------------------------------- 1 | #!/sbin/sh 2 | 3 | TMPDIR=/dev/tmp 4 | MOUNTPATH=/dev/magisk_img 5 | 6 | # Default permissions 7 | umask 022 8 | 9 | # Initial cleanup 10 | rm -rf $TMPDIR 2>/dev/null 11 | mkdir -p $TMPDIR 12 | 13 | # echo before loading util_functions 14 | ui_print() { echo "$1"; } 15 | 16 | require_new_magisk() { 17 | ui_print "***********************************" 18 | ui_print " Please install the latest Magisk! " 19 | ui_print "***********************************" 20 | exit 1 21 | } 22 | 23 | imageless_magisk() { 24 | [ $MAGISK_VER_CODE -gt 18100 ] 25 | return $? 26 | } 27 | 28 | ########################################################################################## 29 | # Environment 30 | ########################################################################################## 31 | 32 | OUTFD=$2 33 | ZIPFILE=$3 34 | 35 | mount /data 2>/dev/null 36 | 37 | # Load utility functions 38 | if [ -f /data/adb/magisk/util_functions.sh ]; then 39 | . /data/adb/magisk/util_functions.sh 40 | NVBASE=/data/adb 41 | else 42 | require_new_magisk 43 | fi 44 | 45 | # Preperation for flashable zips 46 | setup_flashable 47 | 48 | # Mount partitions 49 | mount_partitions 50 | 51 | # Detect version and architecture 52 | api_level_arch_detect 53 | 54 | # Setup busybox and binaries 55 | $BOOTMODE && boot_actions || recovery_actions 56 | 57 | ########################################################################################## 58 | # Preparation 59 | ########################################################################################## 60 | 61 | # Extract common files 62 | unzip -oj "$ZIPFILE" module.prop install.sh uninstall.sh 'common/*' -d $TMPDIR >&2 63 | 64 | [ ! -f $TMPDIR/install.sh ] && abort "! Unable to extract zip file!" 65 | # Load install script 66 | . $TMPDIR/install.sh 67 | 68 | if imageless_magisk; then 69 | $BOOTMODE && MODDIRNAME=modules_update || MODDIRNAME=modules 70 | MODULEROOT=$NVBASE/$MODDIRNAME 71 | else 72 | $BOOTMODE && IMGNAME=magisk_merge.img || IMGNAME=magisk.img 73 | IMG=$NVBASE/$IMGNAME 74 | request_zip_size_check "$ZIPFILE" 75 | mount_magisk_img 76 | MODULEROOT=$MOUNTPATH 77 | fi 78 | 79 | MODID=`grep_prop id $TMPDIR/module.prop` 80 | MODPATH=$MODULEROOT/$MODID 81 | 82 | print_modname 83 | 84 | ui_print "******************************" 85 | ui_print "Powered by Magisk (@topjohnwu)" 86 | ui_print "******************************" 87 | 88 | ########################################################################################## 89 | # Install 90 | ########################################################################################## 91 | 92 | # Create mod paths 93 | rm -rf $MODPATH 2>/dev/null 94 | mkdir -p $MODPATH 95 | 96 | on_install 97 | 98 | # Remove placeholder 99 | rm -f $MODPATH/system/placeholder 2>/dev/null 100 | 101 | # Custom uninstaller 102 | [ -f $TMPDIR/uninstall.sh ] && cp -af $TMPDIR/uninstall.sh $MODPATH/uninstall.sh 103 | 104 | # Auto Mount 105 | if imageless_magisk; then 106 | $SKIPMOUNT && touch $MODPATH/skip_mount 107 | else 108 | $SKIPMOUNT || touch $MODPATH/auto_mount 109 | fi 110 | 111 | # prop files 112 | $PROPFILE && cp -af $TMPDIR/system.prop $MODPATH/system.prop 113 | 114 | # Module info 115 | cp -af $TMPDIR/module.prop $MODPATH/module.prop 116 | if $BOOTMODE; then 117 | # Update info for Magisk Manager 118 | if imageless_magisk; then 119 | mktouch $NVBASE/modules/$MODID/update 120 | cp -af $TMPDIR/module.prop $NVBASE/modules/$MODID/module.prop 121 | else 122 | mktouch /sbin/.magisk/img/$MODID/update 123 | cp -af $TMPDIR/module.prop /sbin/.magisk/img/$MODID/module.prop 124 | fi 125 | fi 126 | 127 | # post-fs-data mode scripts 128 | $POSTFSDATA && cp -af $TMPDIR/post-fs-data.sh $MODPATH/post-fs-data.sh 129 | 130 | # service mode scripts 131 | $LATESTARTSERVICE && cp -af $TMPDIR/service.sh $MODPATH/service.sh 132 | 133 | # Handle replace folders 134 | for TARGET in $REPLACE; do 135 | mktouch $MODPATH$TARGET/.replace 136 | done 137 | 138 | ui_print "- Setting permissions" 139 | set_permissions 140 | 141 | ########################################################################################## 142 | # Finalizing 143 | ########################################################################################## 144 | 145 | cd / 146 | imageless_magisk || unmount_magisk_img 147 | $BOOTMODE || recovery_cleanup 148 | rm -rf $TMPDIR $MOUNTPATH 149 | 150 | ui_print " Module Instalizing " 151 | ui_print " Kreapic Disable Thermal version 1.0 " 152 | ui_print "- Done" 153 | exit 0 --------------------------------------------------------------------------------