Originally Posted by zehkaiser
So I have my DX overclocked, but I wanted to be able to change the clock while away from my PC if something goes wrong. Currently on boot it sets the CPU to whatever I had it on before powering the phone off. Now I have all setscaling.sh files on my SD card and can't get a script to copy the files over. I can do this long hand in Terminal. These commands are exactly what I typed into Terminal to get the clock rate to change, but when I throw them into a script exactly as typed below I get all kinds of errors, starting with not being able to mount my SD card.
mount -o rw,remount -t ext3 /dev/block/mcblk1p21 /system
cp /sdcard/setscaling.sh /system/xbin/setscaling.sh
mount -o ro,remount -t ext3 /dev/block/mcblk1p21 /system
So I did a little testing, and it looks like even if I mount the system before running the copy command and setscaling.sh they still don't work. Is this just an anti terminal thing, or what? If I type each command by hand they work, but any of them in a script and it either gives me an error, or doesn't. Either way it doesn't do what I want.
Here's what i did after reading the original thread.
1. Go to the market and get "Gscript lite".
2. Run Gscript.
3. Press your hard menu button.
4. Press "Add script"
5. Name it anything in the name field.
6. Make sure "Needs SU" has the green check mark.
7. Ignore "Load file"
8. Enter your script in the field...
do not start your script with "su" or "sh" and do not end with either of those. Of course if your file is named "setscaling.sh" then enter that name in the script.
10. Optional and handy - go to home screen. Long press. Add shortcut. Scroll to Gscript. Select it. Select the script you created to place a shortcut on your home screen.
11. When ever you reboot- hit the shortcut and it will start you overclocking.
If you want to check that the script executed properly - using "android terminal" from market you can enter...
it will lest your clock speeds for you. You can also use gscript to create a script for this. Leave out "su" and enter only the "cat" line.