SHARE
TWEET

Untitled

a guest Oct 20th, 2017 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/system/bin/sh
  2. # ==============================================
  3. # Dual-core CPU script for Android Revolution HD
  4. # ==============================================
  5. echo script started
  6. chmod 777 /sys/devices/system/cpu/cpu1/online
  7. (while [ 1 ]
  8. do
  9. chmod 777 /sys/devices/system/cpu/cpu1/online
  10.     AWAKE=`cat /sys/power/wait_for_fb_wake`
  11.     if [ "$AWAKE" = "awake" ]
  12.     then
  13.     chmod 777 /sys/devices/system/cpu/cpu1/online
  14.     echo 1 > /sys/devices/system/cpu/cpu1/online
  15.     chmod 777 /sys/devices/system/cpu/cpu1/online
  16.     echo 1188000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
  17.     echo 1188000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
  18.     echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
  19.     echo ondemand > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
  20.     echo awake
  21.  
  22. fi
  23.  
  24.     SLEEPING=`cat /sys/power/wait_for_fb_sleep`
  25.     if [ "$SLEEPING" = "sleeping" ]
  26.     then
  27.     i=1
  28.     (while [ $i <4 ]
  29.     do
  30.     echo 384000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
  31.     echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
  32.     chmod 777 /sys/devices/system/cpu/cpu1/online
  33.     echo 0 > /sys/devices/system/cpu/cpu1/online
  34.     chmod 777 /sys/devices/system/cpu/cpu1/online
  35.     echo sleeping
  36.     i=$i+1
  37.     done &)
  38. fi
  39. chmod 777 /sys/devices/system/cpu/cpu1/online
  40. done &)
RAW Paste Data
Top