FORUMS
Remove All Ads from XDA

[BETA 3.2][CF-ROOT]Adrenaline™ CPU Control | 5/4/2012

1,601 posts
Thanks Meter: 3,701
 
Post Reply Email Thread
saigetshu
13th January 2012, 03:09 AM |#11  
Guest
Thanks Meter: 0
 
More
I already have it, lol
 
 
13th January 2012, 01:16 PM |#12  
OP Senior Member
Flag Johor
Thanks Meter: 3,701
 
Donate to Me
More
Quote:
Originally Posted by saigetshu

I already have it, lol

then why dont u share? LOL

Quote:
Originally Posted by -SGA-

Does it only set the CPU frequencies based on the Kernels limitations? ie. CF-Root 3.7-b83 max frequency is 902MHz with OC'ing apps, am I to expect this to be the same....

this script doesn't overclock , it just let u choose those freq and governors that are already INCLUDED in ur kernel
15th January 2012, 10:48 AM |#13  
OP Senior Member
Flag Johor
Thanks Meter: 3,701
 
Donate to Me
More
Quote:
Originally Posted by imbawind

DISCLAIMER: I take no responsible if you brick your phone

I have made a script to change governors , max cpu freq and min cpu freq , SetCPU is not needed once this script is completely done

What you need :
Terminal
Root access (Superuser)
Clockworkmod

How to use:
1.Download the .zip file(flashable) and flash via recovery
2.Check Permission :
/system/bin/clock => rwxrwxrwx
3. Open Terminal
4.Type

Code:
su
clock
** Do NOT Rename The File


Functions
1. Change Governors
2. Change Max Frequency
3. Change Min Frequency
4. Drop System Cache
5. Reboot

**This Script doesn't overclock , you need a modified overclock-able kernel to overclock.** [Script error if u set the freq over 800mhz because I haven't make correspond file yet , will complete this once <set on boot> is done]


After selected option 4 go task manager , hit clear ram and see the ram usage

Code:
#!/system/bin/bash
# Cpu Freq Script
# Alpha 2

if [ -f "/system/xbin/su" ]; then
	busybox mount -o remount,rw -t rootfs /
	echo "Remounted RW !"
else
	echo "ERROR : Failed To mount RW !"
	echo -n " Please Enter Key To Exit... “;
		read enterKey
	exit 0
fi

speed=1
sleep="sleep $speed"

# Current Max Clock Speed
cur_max_file=/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
CUR_MAX=`cat $cur_max_file`

# Current Min Clock Speed
cur_min_file=/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
CUR_MIN=`cat $cur_min_file`

# Current Governor
scal_gov_file=/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
CUR_GOV=`cat $scal_gov_file`

# Available Governor
avail_gov_file=/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
AVAIL_GOV=`cat $avail_gov_file`

# Available Frequencies
avail_freq_file=/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
AVAIL_FREQ=`cat $avail_freq_file`

# ECHO Tell Current Clock Speed
echo -e " You're running from \033[1;32m $CUR_MIN \033[0;36m to \033[1;32m $CUR_MAX \033[0;36m Hz"
echo -e "Current governor is \033[1;32m $CUR_GOV \033[0;36m"
echo ""
echo ""
$sleep

# ECHO Show Available Governor
echo " Available Governor: "
echo "$AVAIL_GOV"
echo ""
$sleep

# ECHO Show Available Freq
echo " Available Frequencies: "
echo "$AVAIL_FREQ"
echo ""
$sleep

echo "               [ Options ] "
echo " 1. Change CPU Governor Profile "
echo " 2. Change Maximum Processor Frequency "
echo " 3. Change Minimum Processor Frequency "
echo " 4. Drop System Caches "
echo " 5. Reboot "
echo " 6. Exit "
echo ""
$sleep
 echo -n " Please Enter Option [1 - 6] : "
 read opt
 echo ""
 $sleep
case $opt in
  1) echo " [Option 1] Change CPU Governor Profile "
		echo ""
		echo ""
		echo -e " Current Governor: $CUR_GOV"
		echo ""
		$sleep
		echo " Available Governors: "
		echo "$AVAIL_GOV"
		echo ""
		$sleep
		echo " Insert your desired governor: "
		echo -n " Your Governor: ";read GOV
		echo $GOV > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
		echo " Complete "
NEW_GOV_FILE=`cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor`
NEW_GOV=$NEW_GOV_FILE
		rm -f /system/etc/init.d/smartass
		rm -f /system/etc/init.d/interactiveX
		rm -f /system/etc/init.d/interactive
		rm -f /system/etc/init.d/conservative
		rm -f /system/etc/init.d/userspace
		rm -f /system/etc/init.d/powersave
		rm -f /system/etc/init.d/performance
		rm -f /system/etc/init.d/ondemand
		cp /system/etc/clock/governors/$GOV /system/etc/init.d;
		chmod 777 /system/etc/init.d/$GOV
		echo ""
		echo ""
		$sleep
		echo -e " Current Governor: $NEW_GOV"
		echo ""
		echo ""
		$sleep
		echo -n " Press Enter Key To Continue... ";
		read enterKey
		opt=0
		clock;;
  2) echo " [Option 2] Change Maximum Processor Frequency "
		echo ""
		echo ""
		$sleep
		echo -e " Current Maximum Frequency: $CUR_MAX "
		echo ""
		$sleep
		echo " Available Frequency: "
		echo "$AVAIL_FREQ "
		echo ""
		echo ""
		$sleep
		echo -n " Insert Your Frequency: ";read HFREQ
		echo $HFREQ > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 
		echo " Changed Successfully "
NEW_CUR_MAX=`cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq`
NEW_MAX=$NEW_CUR_MAX
		echo ""
		echo ""
		rm -f /system/etc/init.d/122880
		rm -f /system/etc/init.d/245760
		rm -f /system/etc/init.d/320000
		rm -f /system/etc/init.d/480000
		rm -f /system/etc/init.d/800000
		cp /system/etc/clock/max_freq/$HFREQ /system/etc/init.d;
		chmod 777 /system/etc/init.d/$HFREQ
		$sleep
		echo -e " Current Processor Maximum Frequency: $NEW_MAX "
		echo ""
		echo ""
		$sleep
		echo -n " Press Enter Key To Continue... ";
		read enterKey
		opt=0
		clock;;
  3) echo " [Option 3] Change Minimum Processor Frequency "
		echo ""
		$sleep
		echo -e " Current Minimum CPU Frequency: $CUR_MIN "
		echo ""
		$sleep
		echo " Available Frequency: "
		echo "$AVAIL_FREQ "
		echo ""
		echo ""
		$sleep
		echo -n " Insert Your Frequency: ";read LFREQ
		echo $LFREQ > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
		echo " Changed Successfully "
NEW_MIN_FILE=`cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq`
NEW_MIN=$NEW_MIN_FILE
		echo ""
		echo ""
		$sleep
		echo -e " Current Processor Minimum Frequency: $NEW_MIN "
		echo ""
		echo ""
		$sleep
		echo -n " Press Enter Key To Continue... ";
		read enterKey
		opt=0
		clock;;
  4) echo "3" > /proc/sys/vm/drop_caches
	 echo "1" > /proc/sys/vm/drop_caches
		echo " Ram Dropped "
		echo ""
		echo ""
		$sleep
		echo -n " Press Enter Key To Continue... ";
		read enterKey
		opt=0
		clock;;
  5) echo " Rebooting... "
		$sleep
		reboot;;
  6) echo " Exit "
		$sleep
		exit 0;;
  *) echo " Invalid Option "
		echo ""
		$sleep
		echo " Please try again "
		echo ""
		$sleep
		echo -n " Please Enter Key To Continue... ";
		read enterKey
		opt=0
		clock;;
	esac

Updated to Alpha 2 , Experts needed
15th January 2012, 11:55 AM |#14  
Recognized Developer
Flag Bekasi
Thanks Meter: 14,097
 
Donate to Me
More
On CF-Rooted ROM, your settings will be overwitten by /system/etc/init.cfroot.post_boot.sh .
The Following 2 Users Say Thank You to ketut.kumajaya For This Useful Post: [ View ]
15th January 2012, 12:29 PM |#15  
CallMeVentus's Avatar
Senior Member
Flag Singapore
Thanks Meter: 2,876
 
Donate to Me
More
Quote:
Originally Posted by ketut.kumajaya

On CF-Rooted ROM, your settings will be overwitten by /system/etc/init.cfroot.post_boot.sh .

imbawind , listen to him .
He is the kernel expert around here .
15th January 2012, 12:43 PM |#16  
Senior Member
127.0.0.1
Thanks Meter: 422
 
More
if ketut says this then might need to modify that init script itself
15th January 2012, 12:45 PM |#17  
OP Senior Member
Flag Johor
Thanks Meter: 3,701
 
Donate to Me
More
Quote:
Originally Posted by EmoBoiix3

imbawind , listen to him .
He is the kernel expert around here .

yea, I know, thanks

Quote:
Originally Posted by ketut.kumajaya

On CF-Rooted ROM, your settings will be overwitten by /system/etc/init.cfroot.post_boot.sh .

Can I delete that file or delete all the words inside?
I saw
Code:
if [ $(propget $TWEAK_GOVERNOR_CONSERVATIVE] = "enabled" ]; then
  echo conservative >/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
Isit mean that if there is a line in build.prop called
Code:
TWEAK_GOVERNOR_CONSERVATIVE=enabled
then init.cfroot.post_boot.sh will set the governor to conservative?

If I create a file with these setting :
Code:
#!/system/bin/bash
setprop TWEAK_GOVERNOR_CONSERVATIVE enabled
Will it enable the 'conservative'?
15th January 2012, 12:57 PM |#18  
OP Senior Member
Flag Johor
Thanks Meter: 3,701
 
Donate to Me
More
Code:
#!/system/bin/bash
setprop TWEAK_GOVERNOR_CONSERVATIVE enabled
and

Code:
#!/system/bin/bash
setprop TWEAK_GOVERNOR_CONSERVATIVE=enabled
both not working , any idea?

or can i just delete those words which interrupt my init.d script inside the init.cfroot.post_boot.sh?
15th January 2012, 01:11 PM |#19  
Recognized Developer
Flag Bekasi
Thanks Meter: 14,097
 
Donate to Me
More
Galaxy Ace have a very limited property. Use my propset/propget script to store/restore your own settings, like I have done on CF-Root and Darktremor apps2sd. Now or later setprop will make your brain hot with some strange issue (bluetooth, GPS, wifi, etc).
The Following User Says Thank You to ketut.kumajaya For This Useful Post: [ View ]
15th January 2012, 01:23 PM |#20  
OP Senior Member
Flag Johor
Thanks Meter: 3,701
 
Donate to Me
More
Quote:
Originally Posted by ketut.kumajaya

Galaxy Ace have a very limited property. Use my propset/propget script to store/restore your own settings, like I have done on CF-Root and Darktremor apps2sd. Now or later setprop will make your brain hot with some strange issue (bluetooth, GPS, wifi, etc).

what are these "propset/propget/setprop“ mean?
15th January 2012, 01:31 PM |#21  
xdaboy122's Avatar
Senior Member
Flag punjab
Thanks Meter: 78
 
More
Talking
Quote:
Originally Posted by ketut.kumajaya

Galaxy Ace have a very limited property. Use my propset/propget script to store/restore your own settings, like I have done on CF-Root and Darktremor apps2sd. Now or later setprop will make your brain hot with some strange issue (bluetooth, GPS, wifi, etc).

hey ketut did u applied for recognized developers batch ??????
u are best here
Post Reply Subscribe to Thread

Tags
adrenaline, cf root, control, no frills, set cpu

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes