iPod Touch - 3.1.2 Overclock

Discussion in 'iPod touch Firmware 3.0' started by 0xChromatica, Dec 16, 2009.

  1. 0xChromatica

    0xChromatica New Member

    Joined:
    Dec 16, 2009
    Messages:
    8
    Likes Received:
    0
    Device:
    iPod touch
    Alright, I've read quite a few threads on people attempting to create a working CPU overclock for the iPod Touch (ipt) and all I really have to say is that most of them are going about it entirely wrong. I've seen a few of them attempting to modify the physical sysctl command located at : "/usr/sbin/sysctl" and I can guarantee this is wrong. So, I'm posting this thread to attempt to get some help with developing a working overclock. I'm going to provide all of the information I've managed to figure out through both research and testing.

    But first, some troll poison : I don't care if overclocking may damage my device, I don't care if it will cause overheating. Not only are you incorrect in saying it will damage it, since it's factory under-clocked by default, but it really doesn't matter. The goal is to get it done, not worry about the consequences of doing it.

    Next, a little bit of progress : When/if we finish, I'm hoping to create a physical application making use of this. The application will be in Python and run from terminal, this will be handled entirely on me. The only thing to worry about is that the over all goal is to remove the read-only OIDs. This means that the following command will execute properly when the goal is complete :
    sysctl -w hw.cpufrequency=X​

    Now to share my knowledge so far...
    First some of the basics, OS X uses a UNIX-based Kernel known as Darwin. This kernel is decent and the version ported to the iPhoneOS is almost identical but has many features locked out. Darwin, being part of the POSIX family, uses terminals to execute certain commands. "sysctl" is an extremely powerful command to allow you to modify various system values. Sysctl can be configured in /etc/sysctl.conf, /etc/loader.conf, and /etc/sysctl.d/... All of these exist on iPhoneOS. Now, I'll throw in some probably new knowledge. If you looked, you're probably wondering why I said they exist. They certainly don't appear. Don't go checking hidden files, you won't find them. Hidden files on UNIX have the first character "." and would appear in an SSH client. So, why exactly is it that these files "don't exist?" The truth is, iPhoneOS consists of two partitions. One partition is root and the other is /private/var and together they form iPhoneOS as we know it. As a decent representation, try looking at /etc/fstab, it starts up two different partitions. Now, in fstab you CAN execute commands, however my tests reported negative when I tried to modify hw.cpufrequency before the firmware started. This means that the firmware actually reconfigures this value. According to the tests of someone else, removal of sysctl doesn't stop you from booting with the 412 Mhz processing power, thus proving that the firmware uses another method. Due to a countermeasure put in by Apple, you cannot copy the kernel from a 2g down to a 1g ipsw and expect it to work. This leaves us with two solutions. We can modify the kernel and recompile or we can figure out a way to remove the OIDs. Now, I mentioned those two partitions before. These "hidden" files are actually stored on the inaccessible firmware partition. I managed to find them on Ubuntu Linux 9.10 Karmic Koala by connecting via SSH/SFTP and running a search for "sysctl." Unfortunately, these files are read-only and I am obviously not the owner of said files. The solution? We need to figure out how we can assume root (super user) and access files on the firmware partition. As every good POSIX user knows, there is a backdoor in everything. Nothing is completely locked, only the front door. Assuming root user is extremely easy on most POSIX systems however. On Linux, users usually use "sudo" to perform a single action with super user privileges. On OS X, it is common to use "su" to take on root as a whole. Thus, we will use "su" to become root. After hitting su, it will request a password. The default password is "alpine" although you may have modified it. Enter your password, and you just became root. The only problem now, getting to that second partition. Once on the second partition, simply use chmod 777 on /etc/loader.conf or /etc/sysctl.conf and modify it. Essentially, there's only a single step missing. Getting that second/other partition. I'm working on it as we speak, but one person can only go so far.

    In Summary :
    1. su
    2. alpine
    3. *get to the second partition*
    4. chmod 777 /etc/loader.conf OR chmod 777 /etc/sysctl.conf
    5. Modify the line that sets 'hw.cpufrequency' as read-only, may take a few tries to locate it in the files.
    6. Reboot and be happy! You can now overclock/underclock!

    It's all up to us guys, we're extremely close as is. I'm working on finding that line that makes hw.cpufrequency read-only. If I cannot find it, it is safe to assume that it is in the kernel, and this will require a whole lot of extra work.

    P.S. Sorry about the wall of text, trying to give as much information as possible here to those who don't fully understand UNIX/POSIX.
  2. picklejw

    picklejw Member

    Joined:
    Oct 20, 2008
    Messages:
    875
    Likes Received:
    0
    Device:
    iPad
    I think its located in the kernal, im not sure how to edit a kernal if someone can point me in the right direction i can see what i can do, i took a linux admin class recently so i can frind my way thorough fairly easy

    Please Register or Log in to view images


    ------------------double post merged------------------
    whats the second partition? do we have to mount it?
    ------------------double post merged------------------
    http://lists.freebsd.org/pipermail/freebsd-doc/2005-April/007692.html
    http://lists.freebsd.org/pipermail/freebsd-questions/2005-August/095010.html
    http://www.daemon-systems.org/man/sysctl.8.html

    I dont have time to look at these if you got time take a quick look, this is for BSD (Linux) but its a identical problem... if you can get this you will be a hero, i need my ipt 1st gen upgraded

    Please Register or Log in to view images

    good luck!
  3. stewidre1

    stewidre1 Member

    Joined:
    Feb 21, 2009
    Messages:
    58
    Likes Received:
    0
    Device:
    iPod touch
    Good luck on this
  4. red_5

    red_5 Member

    Joined:
    Nov 19, 2008
    Messages:
    756
    Likes Received:
    0
    Subscribed. Anyone got some test results? Battery drain? Performance increase?
  5. GeorgeJQ

    GeorgeJQ Member

    Joined:
    Feb 23, 2009
    Messages:
    405
    Likes Received:
    0
    Device:
    4G iPod touch
    this would be pretty epic.. and if it works, im definately gonna do it.
    if my ipod breaks, that just gives me another reason to ask for a new one

    Please Register or Log in to view images

  6. picklejw

    picklejw Member

    Joined:
    Oct 20, 2008
    Messages:
    875
    Likes Received:
    0
    Device:
    iPad
    what do we need to mount? all the drives to mount are in "/dev" which one is it?
  7. Hexane

    Hexane New Member

    Joined:
    Feb 8, 2009
    Messages:
    526
    Likes Received:
    0
    Device:
    4G iPod touch
    Did I ever mention..... hw.cpufrequency isn't linked to any hardware anymore, hence it being a endless cause.
  8. picklejw

    picklejw Member

    Joined:
    Oct 20, 2008
    Messages:
    875
    Likes Received:
    0
    Device:
    iPad
    why is it not linked anymore? there must still be a way to edit this, a re-modifyed "sysctl" command?
  9. dweng95

    dweng95 Member

    Joined:
    Sep 1, 2009
    Messages:
    52
    Likes Received:
    0
    Device:
    iPhone 4 (Black)
    there is no follow up on this?
    would it be safe to overlock a second generation touch?
  10. picklejw

    picklejw Member

    Joined:
    Oct 20, 2008
    Messages:
    875
    Likes Received:
    0
    Device:
    iPad
    I wish there were tech people that knew how to do this stuff

    Please Register or Log in to view images

    i really need this for my first gen iPod touch, my mom took my 3gs and 1st gen is SO SLOW! please give me anything to work with thanks

Share This Page