| || |
[How-To] Overclock/Undervolt Your X in the Big 2.2
First off, I IN NO WAY TAKE CREDIT FOR THIS METHOD AND/OR FILES!! The hack is a compilation of work put in by Mirage for the original hack on the Milestone, nadlabak for adding support for 2.2, and FreeWELL at AndroidForums for the port to the X. The original thread is located here.
As always NEITHER I NOR FreeWELL NOR ANYONE ELSE 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 three 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.
Older users of the X might recognize that the method is largely unchanged from 2.1 to 2.2. There are, however a few VERY important differences that require attention. Thus, please read the WHOLE How-To unless you are very comfortable with the inner workings of your phone.
Ok! On to the undervolting!
1. Obtain the necessary files/programs.
2. Place files/set permissions.
3. Set clock speed/voltage/scaling.
4. Important notes.
5. Set on Boot. DANGER! (Due to character limits this section is in a separate post further down this page.)
1. Obtain the necessary files/programs:
- It is very possible to accomplish the following with only adb shell or a terminal emulator. This can be 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, and requires almost no extra effort. 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 FreeWELL at AndroidForums.com. There is only one zip necessary: droidx_22_oc.zip. This is attached below.
2. Place the files in the correct location and set permissions:
- droidx_22_oc.zip contains two files we need: overclock.ko and setscaling.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 setscaling.sh in the folder /system/xbin. Permissions should be set at User R/W/E, Group/Others R/W (755), or like this:
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 clock speed values to be entered WILL VARY IN FORMAT from from Hz to kHz! 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.1 gHz and 48 vsel, which is well below stock (and the battery gains are by lowering the voltage anyway).
- Open Root Explorer and navigate to setscaling.sh that you already placed (/system/xbin).
- Mount the system as R/W.
- Long press setscaling.sh and scroll down to 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 used to set sclock speed and voltage points. 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.
- Open up terminal emulator, and run the following commands:
- As a note, every time you reboot, you must enter this set of commands to achieve overclocking/undervolting. Yes, you phone returns to stock on reboot.
- Congratulations... you are now overclock/undervolted! ...but we're not done yet.
- To ensure that you values have been entered as desired, stay in Terminal Emulator and enter the following command:
- It will look like this: (yes, I did enter the command wrong the first time... stupid big thumbs...)
- This, amongst other things, will show both the stock (vseld) and the applied (vsel) voltages and and the applied clock speeds.
- Open SetCPU and behold the magic!
4. 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.
- 'Turtle Mode' - Each phone has different tolerances due to small differences physically (making the chips isn't always a !00% duplicate). Sometimes your phone will REALLY dislike a clock speed/vsel combination and will slow WAY down (hence turtle mode). All this means is that the combo is outside of your phones tolerance. Don't worry! Just reboot and try a new combination: e.g. my phone wouldn't stick at all at 1.2 gHz no matter the vsel, but I can run it just fine at 1.25 and 59 vsel:
- 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.
- Thus far 2.2 seems MUCH more sensitive to changes in voltage. Here are a list of lowest semi-stable (I say semi due to lack of time testing) clock/voltage pairs I have found:
- As all who have read the main thread now, there is a file included (install-recovery.sh) to apply the hack at boot. As I have not had enough time to verify stable values, I have decided to refrain from adding this step to the how-to. This will be added later when at least a few days without issues is achieved. If know how to fix this if there is a problem, you probably don't need this tutorial anyway! =)
- One note, I'm not sure if I just haven't had good luck, but every time I have tried to adjust setscaling.sh after having run the command, my phone has locked up. I think the only way to adjust the values AFTER entering the command is to reboot and then edit setscaling.sh in root explorer.
- I'm sure that this How-To will evolve as more experienced is gained, but please feel free to add any comments- they help us all out!
Once again I take no credit for the method above, rather I just compiled what I saw as the useful information into one place.