1 #marlfish is marlin & sailfish () 2 3 cpubase=/sys/devices/system/cpu 4 5 adb root 6 adb wait-for-device 7 adb shell stop thermal-engine 8 adb shell stop perfd 9 10 # silver cores 11 #307200 384000 460800 537600 614400 691200 768000 844800 902400 979200 12 #1056000 1132800 1209600 1286400 1363200 1440000 1516800 1593600 13 # gold cores 14 #307200 384000 460800 537600 614400 691200 748800 825600 902400 979200 15 #1056000 1132800 1209600 1286400 1363200 1440000 1516800 1593600 1670400 16 #1747200 1824000 1900800 1977600 2054400 2150400 17 18 S=979200 19 cpu=0 20 # Changing governor and frequency in one core will be automatically applied 21 # to other cores in the cluster 22 while [ $((cpu < 3)) -eq 1 ]; do 23 adb shell "echo userspace > $cpubase/cpu2/cpufreq/scaling_governor" 24 echo "Setting cpu ${cpu} & $(($cpu + 1)) cluster to $S hz" 25 adb shell "echo $S > $cpubase/cpu${cpu}/cpufreq/scaling_max_freq" 26 adb shell "echo $S > $cpubase/cpu${cpu}/cpufreq/scaling_min_freq" 27 cpu=$(($cpu + 2)) 28 done 29 30 echo "setting GPU bus and idle timer" 31 adb shell "echo 0 > /sys/class/kgsl/kgsl-3d0/bus_split" 32 adb shell "echo 1 > /sys/class/kgsl/kgsl-3d0/force_clk_on" 33 adb shell "echo 10000 > /sys/class/kgsl/kgsl-3d0/idle_timer" 34 35 #0 762 1144 1525 2288 3143 4173 5195 5859 7759 9887 11863 13763 36 adb shell "echo 13763 > /sys/class/devfreq/soc:qcom,gpubw/min_freq" &> /dev/null 37 38 #133000000 214000000 315000000 401800000 510000000 560000000 624000000 39 echo "performance mode, 315 MHz" 40 adb shell "echo performance > /sys/class/kgsl/kgsl-3d0/devfreq/governor" 41 adb shell "echo 315000000 > /sys/class/kgsl/kgsl-3d0/devfreq/min_freq" 42 adb shell "echo 315000000 > /sys/class/kgsl/kgsl-3d0/devfreq/max_freq" 43 44 adb shell "echo 4 > /sys/class/kgsl/kgsl-3d0/min_pwrlevel" 45 adb shell "echo 4 > /sys/class/kgsl/kgsl-3d0/max_pwrlevel" 46