- Jul 31, 2010
- 139
- 14
- 0
First off, I IN NO WAY TAKE CREDIT FOR THIS METHOD AND/OR FILES!! All the work put into this was done by Elkay at DroidForums.net. The original thread is located here.
As always NEITHER I NOR ELKAY ARE RESPONSIBLE FOR ANY HARM/LOSS OF DATA AS A RESULT OF THE FOLLOWING PROCEDURE. YOU MAY VOID YOUR WARRANTY. IT IS MEANT AS AN OPPORTUNITY TO DISCUSS THE POSSIBILITIES OF YOUR DEVICE AND YOU USE THE FOLLOWING METHOD AT YOUR OWN RISK!
However, I have been undervolting/overclocking my phones for more than two years now and have done so without any problems.
My reason for posting this is more as a guide to those who may be nervous about unleashing the real potential that their phones have. I have tried to make this as simple as possible. That being said, if anyone knows of a better method, by all means lets discuss it.
Ok! On to the undervolting!
1. Obtain the necessary files/programs:
-It is very possible to accomplish the following with only adb shell or a terminal emulator. This is quite difficult however, and requires that one is familiar with command line (chmod, mounting, ect...), and as such is NOT RECOMMENDED for the average user (the target of this how-to).
-Rather, with the help of root explorer, you can issue very simple terminal commands to undervolt/overclock. The Terminal and Root Explorer are here:
-After initial overclock/undervolting is achieved, you may want to take advantage of the the ability to set your own scaling points with user defined voltages. This is optional, but recommended if you goal is to extend your battery. SetCPU is required to enable scaling. This can be found here:
-Next comes the files necessary for the undervolting/overclock. Like I stated before, these were developed by Elkay at DroidForums.net. There are two zips necessary: DX OC Tools.zip and DX OC.zip. These are attached below.
2. Place the files in the correct location and set permissions:
-DX OC.zip contains two files: overclock.ko and overclock.sh
-These two files can be moved onto the sdcard by mounting the card in usb mode, or by extracting within root explorer. Mounting is the easier method.
-Once both files are on the sdcard, open root explorer and navigate to /sdcard.
-Move overclock.ko to the folder /system/lib/modules by long pressing the the file and selecting move from the menu. Pressing move will give two buttons at the bottom of the screen, cancel and paste. Press the hard key BACK to return to / and navigate to /system/lib/modules. Press paste once there.
-Now is time to set the permissions for the overclock.ko. First mount as R/W by pressing the button that says 'Mount R/W'. If not mounted correctly, Root Explorer will return an error saying the file system is read only. Once again long pressing the file and select permissions. Overclock.ko must have its permissions set to User R/W and Group/Others R (644). It will look like this:
-Next, following the same method as described above, place the overclock.sh in the folder /system/bin. Permissions should be set at User R/W/E, Group/Others R/W (755), or like this:
-The remaining two files (setclock.sh and setscaling.sh) from the DX OC Tools.zip should be placed in the same directory as overclock.sh and with the same permissions as overclock.sh (they are all scripts).
3. Set the clock at the desired speed/voltage.
-This is the fun part! But first some information. This is where you can get yourself into trouble if you are not careful. The idea here is to get the highest clock speed with the lowest voltage AND REMAIN STABLE. You don't have to overclock at all, really. Just setting the voltage to lower than stock will give you the battery benefits without the supposed danger to your device.
-The overclock.sh script is et up so that the first value entered will be the clock speed IN HZ, NOT MHZ! i.e. 1150000 is 1150 mhz. The second value is a coefficient in an equation to determine voltage, known as vsel., e.g. 80 vsel is 1.6v, 96 vsel is 1.8v. The stock voltage on the X is 66 at 1 gHz.
-The greater the clock speed you set your phone at, the greater the voltage necessary to maintain stability. Do NOT go above 96 vsel, or you could fry your phone. In fact, I wouldn't go much above the stock 66 at all, as I have tested my phone to be stable at 1.15 gHz and 46 vsel, which is well below stock (and the battery gains are by lowering the voltage anyway).
-Open up terminal emulator, and run the following commands:
-It will look like this:
-Congratulations... you are now overclock/undervolted! ...but we're not done yet.
4. Fine tuning and scaling.
-You might find that after entering a clock speed/voltage, that you phone becomes unresponsive or sluggish. No worries! That is what the setclock.sh script is for.
-Once again open the terminal emulator and enter in the the command:
-This way you can change your voltage or clock speed to something a bit more stable with out the need to reboot.
-Notice this is the same format as the overclock.sh, but if you have already entered in a command using overclock.sh since the last boot, you must use the setclock.sh command to change the clock speed/voltage.
-Once you discover which setting you most like (i.e. at the speed you want and most stable), you can set up the scaling. This will further give you better battery life! This is optional, however, and your phone will run just fine without scaling.
-Once agan open up root explorer and navigate to /system/bin. Make sure you are mounted R/W and long press the file setscaling.sh. Scroll down and select open in text editor. It will look like this:
-Each of the values can be edited so that SetCPU can run your custom operating points.
-The first two lines are the max voltage and max clock speed you want your phone at. The second set of commands are similar to those we have entered in using terminal emulator. Remember- not all values are in the same format! (Hz vs mHz) Maintain the correct number of digits to avoid problems.
The last set of lines is for SetCPU, and are used as the operating point that it will scale to.
-Set as desired.
-After all the values are correctly set, press the menu button and hit Save and Exit.
-Exit Root Explorer and open Terminal Emulator.
-Run the command:
-There will be NO readout after the command.
-To ensure that you values have been entered as desired, stay in Terminal Emulator and enter the following command:
-It will look like this:
-This will help ensure your desired values have taken effect, if you are concerned they haven't.
-After all the values are to you liking, open SetCPU and behold the magic!!
5. Important Notes!!!
-If you phone locks up or reboots, DON'T WORRY!! These don't run on start-up, thus you phone is back to stock when it reboots.
-A faster method of getting the undervolting back after a reboot is through a simple command:
-Once you open SetCPU after these commands, you'll be back to what it was before the reboot.
-Some might say that undervolting hurts your CPU by increasing the amperage... IT DOESN'T! V=IR (Voltage=Current(in amps) x Resistance). We are adjusting the voltage, and the resistance of your processor remains the same no matter what. Thus I=V/R, i.e. current decreases by undervolting resulting in less power used and cooler temps. Everyone wins.
-Feel free to mess around with your values, as long as your voltage is low. A high clock speed that can't be maintained by a chosen voltage will only result in a random reboot. No harm done.
-I have found my phone incredibly stable (5 days and counting) at 1.1 gHz and 32 vsel. This works out to less than HALF the voltage of stock. My battery is awesome- for ex. I unplugged at 7am, and its 8pm here, my battery is at 70%.
-This is currently only for 2.1, though Elkay has mentioned that his is working on a version for Froyo.
-UPDATE: There is one known bug that I had forgotten about. If after running the cat /proc/overclock/mpu_opps command you notice that your voltage didn't stick, run the command setclock.sh <clock speed> <voltage> to fix it. Remeber though that the overclock module must already be loaded after boot for the setclock.sh command to work (the module is loaded either by the overclock.sh or the insmod /system/lib/modules/overclock.ko commands).
Once again I take no credit for the method above, rather I just compiled what I saw as the useful information into one place.
As always NEITHER I NOR ELKAY ARE RESPONSIBLE FOR ANY HARM/LOSS OF DATA AS A RESULT OF THE FOLLOWING PROCEDURE. YOU MAY VOID YOUR WARRANTY. IT IS MEANT AS AN OPPORTUNITY TO DISCUSS THE POSSIBILITIES OF YOUR DEVICE AND YOU USE THE FOLLOWING METHOD AT YOUR OWN RISK!
However, I have been undervolting/overclocking my phones for more than two years now and have done so without any problems.
My reason for posting this is more as a guide to those who may be nervous about unleashing the real potential that their phones have. I have tried to make this as simple as possible. That being said, if anyone knows of a better method, by all means lets discuss it.
Ok! On to the undervolting!
1. Obtain the necessary files/programs:
-It is very possible to accomplish the following with only adb shell or a terminal emulator. This is quite difficult however, and requires that one is familiar with command line (chmod, mounting, ect...), and as such is NOT RECOMMENDED for the average user (the target of this how-to).
-Rather, with the help of root explorer, you can issue very simple terminal commands to undervolt/overclock. The Terminal and Root Explorer are here:


-After initial overclock/undervolting is achieved, you may want to take advantage of the the ability to set your own scaling points with user defined voltages. This is optional, but recommended if you goal is to extend your battery. SetCPU is required to enable scaling. This can be found here:

-Next comes the files necessary for the undervolting/overclock. Like I stated before, these were developed by Elkay at DroidForums.net. There are two zips necessary: DX OC Tools.zip and DX OC.zip. These are attached below.
2. Place the files in the correct location and set permissions:
-DX OC.zip contains two files: overclock.ko and overclock.sh
-These two files can be moved onto the sdcard by mounting the card in usb mode, or by extracting within root explorer. Mounting is the easier method.
-Once both files are on the sdcard, open root explorer and navigate to /sdcard.
-Move overclock.ko to the folder /system/lib/modules by long pressing the the file and selecting move from the menu. Pressing move will give two buttons at the bottom of the screen, cancel and paste. Press the hard key BACK to return to / and navigate to /system/lib/modules. Press paste once there.
-Now is time to set the permissions for the overclock.ko. First mount as R/W by pressing the button that says 'Mount R/W'. If not mounted correctly, Root Explorer will return an error saying the file system is read only. Once again long pressing the file and select permissions. Overclock.ko must have its permissions set to User R/W and Group/Others R (644). It will look like this:

-Next, following the same method as described above, place the overclock.sh in the folder /system/bin. Permissions should be set at User R/W/E, Group/Others R/W (755), or like this:

-The remaining two files (setclock.sh and setscaling.sh) from the DX OC Tools.zip should be placed in the same directory as overclock.sh and with the same permissions as overclock.sh (they are all scripts).
3. Set the clock at the desired speed/voltage.
-This is the fun part! But first some information. This is where you can get yourself into trouble if you are not careful. The idea here is to get the highest clock speed with the lowest voltage AND REMAIN STABLE. You don't have to overclock at all, really. Just setting the voltage to lower than stock will give you the battery benefits without the supposed danger to your device.
-The overclock.sh script is et up so that the first value entered will be the clock speed IN HZ, NOT MHZ! i.e. 1150000 is 1150 mhz. The second value is a coefficient in an equation to determine voltage, known as vsel., e.g. 80 vsel is 1.6v, 96 vsel is 1.8v. The stock voltage on the X is 66 at 1 gHz.
-The greater the clock speed you set your phone at, the greater the voltage necessary to maintain stability. Do NOT go above 96 vsel, or you could fry your phone. In fact, I wouldn't go much above the stock 66 at all, as I have tested my phone to be stable at 1.15 gHz and 46 vsel, which is well below stock (and the battery gains are by lowering the voltage anyway).
-Open up terminal emulator, and run the following commands:
Code:
su
overclock.sh <desired clock speed> <desired voltage>

-Congratulations... you are now overclock/undervolted! ...but we're not done yet.
4. Fine tuning and scaling.
-You might find that after entering a clock speed/voltage, that you phone becomes unresponsive or sluggish. No worries! That is what the setclock.sh script is for.
-Once again open the terminal emulator and enter in the the command:
Code:
su
setclock.sh <desired clock speed> <desired voltage>
-Notice this is the same format as the overclock.sh, but if you have already entered in a command using overclock.sh since the last boot, you must use the setclock.sh command to change the clock speed/voltage.
-Once you discover which setting you most like (i.e. at the speed you want and most stable), you can set up the scaling. This will further give you better battery life! This is optional, however, and your phone will run just fine without scaling.
-Once agan open up root explorer and navigate to /system/bin. Make sure you are mounted R/W and long press the file setscaling.sh. Scroll down and select open in text editor. It will look like this:

-Each of the values can be edited so that SetCPU can run your custom operating points.
-The first two lines are the max voltage and max clock speed you want your phone at. The second set of commands are similar to those we have entered in using terminal emulator. Remember- not all values are in the same format! (Hz vs mHz) Maintain the correct number of digits to avoid problems.
The last set of lines is for SetCPU, and are used as the operating point that it will scale to.
-Set as desired.
-After all the values are correctly set, press the menu button and hit Save and Exit.
-Exit Root Explorer and open Terminal Emulator.
-Run the command:
Code:
su
setscaling.sh
-To ensure that you values have been entered as desired, stay in Terminal Emulator and enter the following command:
Code:
su
cat /proc/overclock/mpu_opps

-This will help ensure your desired values have taken effect, if you are concerned they haven't.
-After all the values are to you liking, open SetCPU and behold the magic!!
5. Important Notes!!!
-If you phone locks up or reboots, DON'T WORRY!! These don't run on start-up, thus you phone is back to stock when it reboots.
-A faster method of getting the undervolting back after a reboot is through a simple command:
Code:
su
insmod /system/lib/modules/overclock.ko
setscaling.sh
-Some might say that undervolting hurts your CPU by increasing the amperage... IT DOESN'T! V=IR (Voltage=Current(in amps) x Resistance). We are adjusting the voltage, and the resistance of your processor remains the same no matter what. Thus I=V/R, i.e. current decreases by undervolting resulting in less power used and cooler temps. Everyone wins.
-Feel free to mess around with your values, as long as your voltage is low. A high clock speed that can't be maintained by a chosen voltage will only result in a random reboot. No harm done.
-I have found my phone incredibly stable (5 days and counting) at 1.1 gHz and 32 vsel. This works out to less than HALF the voltage of stock. My battery is awesome- for ex. I unplugged at 7am, and its 8pm here, my battery is at 70%.
-This is currently only for 2.1, though Elkay has mentioned that his is working on a version for Froyo.
-UPDATE: There is one known bug that I had forgotten about. If after running the cat /proc/overclock/mpu_opps command you notice that your voltage didn't stick, run the command setclock.sh <clock speed> <voltage> to fix it. Remeber though that the overclock module must already be loaded after boot for the setclock.sh command to work (the module is loaded either by the overclock.sh or the insmod /system/lib/modules/overclock.ko commands).
Once again I take no credit for the method above, rather I just compiled what I saw as the useful information into one place.
Last edited: