@@ -26,16 +26,9 @@ CONFIGPATH="/data/adb/.config/AZenith"
2626list_logger=" logd traced statsd tcpdump cnss_diag subsystem_ramdump charge_logger wlan_logging"
2727curprofile=$( < " $CONFIGPATH /API/current_profile" )
2828POLICIES=$( ls /sys/devices/system/cpu/cpufreq | grep policy)
29- BYPASSPATHLIST="
30- MTK_BYPASS_CHARGER:/sys/devices/platform/charger/bypass_charger
31- MTK_CURRENT_CMD:/proc/mtk_battery_cmd/current_cmd
32- TRAN_AICHG:/sys/devices/platform/charger/tran_aichg_disable_charger
33- MTK_DISABLE_CHARGER:/sys/devices/platform/mt-battery/disable_charger
34- "
3529
3630# Properties
3731LIMITER=$( getprop persist.sys.azenithconf.freqoffset | sed -e ' s/Disabled/100/' -e ' s/%//g' )
38- DND_STATE=" $( getprop persist.sys.azenithconf.dnd) "
3932LOGD_STATE=" $( getprop persist.sys.azenithconf.logd) "
4033DEBUGMODE=" $( getprop persist.sys.azenith.debugmode) "
4134DTHERMAL_STATE=" $( getprop persist.sys.azenithconf.DThermal) "
@@ -47,7 +40,7 @@ JUSTINTIME_STATE="$(getprop persist.sys.azenithconf.justintime)"
4740BYPASSCHG_STATE=" $( getprop persist.sys.azenithconf.bypasschg) "
4841DISTRACE_STATE=" $( getprop persist.sys.azenithconf.disabletrace) "
4942CLEARAPPS=" $( getprop persist.sys.azenithconf.clearbg) "
50- LITEMODE=" $( getprop persist.sys.azenithconf.cpulimit ) "
43+ LITEMODE=" $( getprop persist.sys.azenithconf.litemode ) "
5144VSYNCVALUE=" $( getprop persist.sys.azenithconf.vsync) "
5245BYPASSPROPS=" persist.sys.azenithconf.bypasspath"
5346BYPASSPATH=" $( getprop persist.sys.azenithconf.bypasspath) "
@@ -1099,12 +1092,7 @@ performance_profile() {
10991092 else
11001093 setsGPUMali " $default_maligov " && dlog " Applying GPU Mali Governor to : $default_maligov "
11011094 fi
1102- fi
1103-
1104- # Set DND Mode
1105- if [ " $DND_STATE " -eq 1 ]; then
1106- cmd notification set_dnd priority && dlog " DND enabled" || dlog " Failed to enable DND"
1107- fi
1095+ fi
11081096
11091097 # Bypass Charge
11101098 if [ " $BYPASSCHG_STATE " -eq 1 ]; then
@@ -1260,12 +1248,7 @@ balanced_profile() {
12601248 default_maligov=$( load_default_gpumaligov)
12611249 setsGPUMali " $default_maligov " && dlog " Applying GPU Mali Governor to : $default_maligov "
12621250 fi
1263-
1264- # Disable DND
1265- if [ " $DND_STATE " -eq 1 ]; then
1266- cmd notification set_dnd off && dlog " DND disabled" || dlog " Failed to disable DND"
1267- fi
1268-
1251+
12691252 # Bypass Charge
12701253 if [ " $BYPASSCHG_STATE " -eq 1 ]; then
12711254 sys.azenith-utilityconf disableBypass
@@ -1343,15 +1326,14 @@ balanced_profile() {
13431326 zeshia TTWU_QUEUE /sys/kernel/debug/sched_features
13441327 fi
13451328
1346- if [ " $LITEMODE " -eq 0 ]; then
1347- case " $( getprop persist.sys.azenithdebug.soctype) " in
1348- 1) mediatek_balance ;;
1349- 2) snapdragon_balance ;;
1350- 3) exynos_balance ;;
1351- 4) unisoc_balance ;;
1352- 5) tensor_balance ;;
1353- esac
1354- fi
1329+ case " $( getprop persist.sys.azenithdebug.soctype) " in
1330+ 1) mediatek_balance ;;
1331+ 2) snapdragon_balance ;;
1332+ 3) exynos_balance ;;
1333+ 4) unisoc_balance ;;
1334+ 5) tensor_balance ;;
1335+ esac
1336+
13551337
13561338 AZLog " Balanced Profile applied successfully!"
13571339
@@ -1406,11 +1388,6 @@ eco_mode() {
14061388 setfreq
14071389 fi
14081390 dlog " Set CPU freq to low Frequencies"
1409-
1410- # Disable DND
1411- if [ " $DND_STATE " -eq 1 ]; then
1412- cmd notification set_dnd off && dlog " DND disabled" || dlog " Failed to disable DND"
1413- fi
14141391
14151392 # Bypass Charge
14161393 if [ " $BYPASSCHG_STATE " -eq 1 ]; then
@@ -2191,29 +2168,7 @@ initialize() {
21912168 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
21922169 # INITIALIZE BYPASS CHARGING PATH
21932170 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
2194- if [ -z " $BYPASSPATH " ]; then
2195- supported=0
2196- while IFS=" :" read -r name path; do
2197- [ -z " $name " ] && continue
2198-
2199- name=" ${name// [[:space:]]/ } "
2200- path=" ${path// [[:space:]]/ } "
2201-
2202- if [ -e " $path " ]; then
2203- setprop " $BYPASSPROPS " " $name "
2204- dlog " Detected Bypass Charging path: $name "
2205- supported=1
2206- break
2207- fi
2208- done <<< " $BYPASSPATHLIST"
2209-
2210- if [ " $supported " -eq 0 ]; then
2211- dlog " Bypass Charging unsupported: no valid path found"
2212- setprop " $BYPASSPROPS " " UNSUPPORTED"
2213- fi
2214- else
2215- dlog " Bypass Charging path set: $BYPASSPATH "
2216- fi
2171+ sys.azenith-utilityconf checkBypass
22172172
22182173 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
22192174 # APPLY DISABLE VSYNC IF AVAILABLE
0 commit comments