[Huawei Ascend P6, Mate] HSD-Pilot:
Hey, just use this Script through init. d or let it run with SManager (With SU Rights)

#!/system/bin/sh

LOG_FILE=/data/00_init.d_control_log/01Init.d_Control.log

echo ">>> CPU / GPU Lock" | tee -a $LOG_FILE;

#---------------------------------------------#

# Configure your Values #

#---------------------------------------------#

# Lock active CPU Cores

# 0 - 4

# Stock 0

CPU_LOCK=0

#---------------------------------------------#

# Lock CPU Frequency

# 200000 400000 600000 800000 1000000 1200000 1399000 1400000 1500000

# Stock 0

CPU_FREQ=0

#---------------------------------------------#

# Lock GPU Frequency

# 58000 120000 240000 360000 480000

# Stock 0

GPU_FREQ=480000

#---------------------------------------------#

# Lock DDR Frequency

# 58000 120000 360000 450000

# Stock 0

DDR_FREQ=450000

#---------------------------------------------#

# Apply Configuration #

#---------------------------------------------#

# Lock active CPU Cores

if [ -e /sys/devices/system/cpu/cpu0/cpufreq/scaling_cpu_lock_num ]; then

echo $CPU_LOCK > /sys/devices/system/cpu/cpu0/cpufreq/scaling_cpu_lock_num; else

echo "- Unable to set CPU LOCK. File NOT found!" | tee -a $LOG_FILE;

fi;

if [ -e /sys/devices/system/cpu/cpu1/cpufreq/scaling_cpu_lock_num ]; then

echo $CPU_LOCK > /sys/devices/system/cpu/cpu1/cpufreq/scaling_cpu_lock_num;

fi;

if [ -e /sys/devices/system/cpu/cpu2/cpufreq/scaling_cpu_lock_num ]; then

echo $CPU_LOCK > /sys/devices/system/cpu/cpu2/cpufreq/scaling_cpu_lock_num;

fi;

if [ -e /sys/devices/system/cpu/cpu3/cpufreq/scaling_cpu_lock_num ]; then

echo $CPU_LOCK > /sys/devices/system/cpu/cpu3/cpufreq/scaling_cpu_lock_num;

fi;

sleep 1

if [ /sys/devices/system/cpu/cpu0/cpufreq/scaling_cpu_lock_num=$CPU_LOCK ]; then

echo "+ $CPU_LOCK active Cores locked" | tee -a $LOG_FILE; else

echo "- CPU Cores NOT locked" | tee -a $LOG_FILE;

fi;

#---------------------------------------------#

# Lock CPU Frequency

if [ -e /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_block_freq ]; then

echo $CPU_FREQ > /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_block_freq; else

echo "- Unable to set CPU LOCK. File NOT found!" | tee -a $LOG_FILE;

fi;

if [ -e /sys/devices/system/cpu/cpu1/cpufreq/cpuinfo_block_freq ]; then

echo $CPU_FREQ > /sys/devices/system/cpu/cpu1/cpufreq/cpuinfo_block_freq;

fi;

if [ -e /sys/devices/system/cpu/cpu2/cpufreq/cpuinfo_block_freq ]; then

echo $CPU_FREQ > /sys/devices/system/cpu/cpu2/cpufreq/cpuinfo_block_freq;

fi;

if [ -e /sys/devices/system/cpu/cpu3/cpufreq/cpuinfo_block_freq ]; then

echo $CPU_FREQ > /sys/devices/system/cpu/cpu3/cpufreq/cpuinfo_block_freq;

fi;

sleep 1

if [ /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_block_freq=$CPU_FREQ ]; then

echo "+ CPU Frequency locked @ $CPU_FREQ" | tee -a $LOG_FILE; else

echo "- CPU Frequency NOT locked" | tee -a $LOG_FILE;

fi;

#---------------------------------------------#

# Lock GPU Frequency

if [ -e /sys/devices/system/cpu/cpu0/cpufreq/scaling_gpu_block_freq ]; then

echo $GPU_FREQ > /sys/devices/system/cpu/cpu0/cpufreq/scaling_gpu_block_freq; else

echo "- Unable to lock GPU Frequency. File NOT found!" | tee -a $LOG_FILE;

fi;

if [ -e /sys/devices/system/cpu/cpu1/cpufreq/scaling_gpu_block_freq ]; then

echo $GPU_FREQ > /sys/devices/system/cpu/cpu1/cpufreq/scaling_gpu_block_freq;

fi;

if [ -e /sys/devices/system/cpu/cpu2/cpufreq/scaling_gpu_block_freq ]; then

echo $GPU_FREQ > /sys/devices/system/cpu/cpu2/cpufreq/scaling_gpu_block_freq;

fi;

if [ -e /sys/devices/system/cpu/cpu3/cpufreq/scaling_gpu_block_freq ]; then

echo $GPU_FREQ > /sys/devices/system/cpu/cpu3/cpufreq/scaling_gpu_block_freq;

fi;

sleep 1

if [ /sys/devices/system/cpu/cpu0/cpufreq/scaling_gpu_block_freq=$GPU_FREQ ]; then

echo "+ GPU Frequency locked @ $GPU_FREQ" | tee -a $LOG_FILE; else

echo "- GPU Frequency NOT locked" | tee -a $LOG_FILE;

fi;

#---------------------------------------------#

# Lock DDR Frequency

if [ -e /sys/devices/system/cpu/cpu0/cpufreq/scaling_ddr_block_freq ]; then

echo $DDR_FREQ > /sys/devices/system/cpu/cpu0/cpufreq/scaling_ddr_block_freq; else

echo "- Unable to lock DDR Frequency. File NOT found!" | tee -a $LOG_FILE;

fi;

if [ -e /sys/devices/system/cpu/cpu1/cpufreq/scaling_ddr_block_freq ]; then

echo $DDR_FREQ > /sys/devices/system/cpu/cpu1/cpufreq/scaling_ddr_block_freq;

fi;

if [ -e /sys/devices/system/cpu/cpu2/cpufreq/scaling_ddr_block_freq ]; then

echo $DDR_FREQ > /sys/devices/system/cpu/cpu2/cpufreq/scaling_ddr_block_freq;

fi;

if [ -e /sys/devices/system/cpu/cpu3/cpufreq/scaling_ddr_block_freq ]; then

echo $DDR_FREQ > /sys/devices/system/cpu/cpu3/cpufreq/scaling_ddr_block_freq;

fi;

sleep 1

if [ /sys/devices/system/cpu/cpu0/cpufreq/scaling_ddr_block_freq=$DDR_FREQ ]; then

echo "+ DDR Frequency locked @ $DDR_FREQ" | tee -a $LOG_FILE; else

echo "- DDR Frequency NOT locked" | tee -a $LOG_FILE;

fi;

#---------------------------------------------#

echo "@ $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE;

echo " " | tee -a $LOG_FILE;

Gesendet von meinem P6-U06 mit Tapatalk