-
Notifications
You must be signed in to change notification settings - Fork 3
/
config
95 lines (82 loc) · 3.16 KB
/
config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#!/system/bin/sh
# Call variables script
. /data/adb/modules/DroidConsole/system/bin/variables
# Avoid conflict & restore override
[ $(getprop droid.restore) ] && if [ $(getprop droid.restore) == 0 ]; then
[ $(getprop droid.gpu_throttling) ] && if [ $(getprop droid.gpu_throttling) == 1 ]; then
echo "1" > $KGSL/throttling
elif [ $(getprop droid.gpu_throttling) == 0 ]; then
echo "0" > $KGSL/throttling
fi
[ $(getprop droid.cpu_ratelimits) ] && if [ $(getprop droid.cpu_ratelimits) == 1 ]; then
if [ -d $S2 ]; then
droid $S2/up_rate_limit_us "500"
droid $S2/down_rate_limit_us "20000"
elif [ -e $SC ]; then
for cpu in /sys/devices/system/cpu/*/cpufreq/schedutil
do
droid "${cpu}/up_rate_limit_us" "500"
droid "${cpu}/down_rate_limit_us" "20000"
done
fi
fi
[ $(getprop droid.iowait_boost) ] && if [ $(getprop droid.iowait_boost) == 1 ]; then
if [ -d $S2 ]; then
echo "1" > $S2/iowait_boost_enable
elif [ -e $SC ]; then
for cpu in /sys/devices/system/cpu/*/cpufreq/schedutil
do
echo "1" > "${cpu}/iowait_boost_enable"
done
fi
elif [ $(getprop droid.iowait_boost) == 0 ]; then
if [ -d $S2 ]; then
echo "0" > $S2/iowait_boost_enable
elif [ -e $SC ]; then
for cpu in /sys/devices/system/cpu/*/cpufreq/schedutil
do
echo "0" > "${cpu}/iowait_boost_enable"
done
fi
fi
[ $(getprop droid.ram_swap) ] && if [ $(getprop droid.ram_swap) == 1 ]; then
droid $SWP 60
fi
[ $(getprop droid.power_efficient) ] && if [ $(getprop droid.power_efficient) == 1 ]; then
echo "1" > $PWR
elif [ $(getprop droid.power_efficient) == 0 ]; then
echo "0" > $PWR
fi
[ $(getprop droid.gpu_power_lvl) ] && if [ $(getprop droid.gpu_power_lvl) == 1 ]; then
echo "0" > $KGSL/default_pwrlevel
elif [ $(getprop droid.gpu_power_lvl) == 0 ]; then
echo "$MIN_GPU_POWER_LEVEL" > $KGSL/default_pwrlevel
fi
[ $(getprop droid.gpu_power_management) ] && if [ $(getprop droid.gpu_power_management) == 1 ]; then
echo "1" > $KGSL/force_bus_on
echo "1" > $KGSL/force_clk_on
echo "1" > $KGSL/force_no_nap
echo "1" > $KGSL/force_rail_on
elif [ $(getprop droid.gpu_power_management) == 0 ]; then
echo "0" > $KGSL/force_bus_on
echo "0" > $KGSL/force_clk_on
echo "0" > $KGSL/force_no_nap
echo "0" > $KGSL/force_rail_on
fi
[ $(getprop droid.sultan_optimizations) ] && if [ $(getprop droid.sultan_optimizations) == 1 ]; then
echo "Y" > $LYB_TASK/parameters/lyb_sultan_pid
echo "Y" > $LYB_TASK/parameters/lyb_sultan_pid_shrink
elif [ $(getprop droid.sultan_optimizations) == 0 ]; then
echo "N" > $LYB_TASK/parameters/lyb_sultan_pid
echo "N" > $LYB_TASK/parameters/lyb_sultan_pid_shrink
fi
if [ $(getprop droid.floating_bar) -eq 1 ]; then
su -c 'device_config put launcher ENABLE_FLOATING_SEARCH_BAR true'
su -c 'am force-stop com.google.android.apps.nexuslauncher'
elif [ $(getprop droid.floating_bar) -eq 0 ]; then
su -c 'device_config put launcher ENABLE_FLOATING_SEARCH_BAR false'
su -c 'am force-stop com.google.android.apps.nexuslauncher'
fi
elif [ $(getprop droid.restore) == 1 ]; then
restore
fi