IF YOUR IPHONE COMPLETELY STOPS RESPONDING AND WON'T TURN ON AT ANY POINT, DON'T WORRY.PLUG IT INTO THE USB PORT, HOLD POWER AND HOME FOR EXACTLY 10 SECONDS, THEN RELEASE THE POWER BUTTON AND CONTINUE HOLDING THE HOME BUTTON. THEN RESTORE!!
Thanks to http://linuxoniphone.blogspot.com for discovering this! Please donate to them if it works for you! I am currently writing this to make it as user friendly as possible.
THIS IS HIGHLY EXPERIMENTAL AND FOR THE 2G ONLY, PROCEED AT OWN RISK BLAH BLAH BLAH.
1) Download this package
If anyone can host a mirror, please twitter me and I will add a link here! Thanks
Whilst you are downloading, Set an Ubuntu LIVE CD to download too:
Extract the iPhone.zip folder to the desktop.
2) Jailbreak your iPhone, I will write a tutorial for this another time, for now just Google it. If you have software version 3.1.3 then check out my other tutorial: http://masseymasseymassey.blogspot.com/2010/04/how-to-jailbreak-iphone-3g-313-firmware.html
3) From your iPhone, open Cydia and install OpenSHH and BossPrefs. Turn all the BossPrefs options on. OpenSHH won't add an icon, don't worry. After this go into the iPhone settings - General- Auto Lock. Set Auto Lock to Never. Connect to your home WiFi and note the IP address by clicking the small arrow next to the network name on the iPhone.
4) Download Filezilla on your PC. Open it and click on File - Site Manager. Create a new site and make sure you have sftp: selected. Type your iPhone IP address and the username "root", password is "alpine".
5) Transfer the contents of "Put on iPhone" to the /private/var directory on your iPhone using Filezilla. This will take ages so go and grab a beer or something.
6) Boot up an Ubuntu LIVE CD. Make sure you have libusb-1.0-0 installed - You will have a later version installed so you need to uninstall it and then reinstall version 1.0-0. To do this use the System - Admin - Package Manager tool. Whilst you are there install "libreadline5" too.
7) Put your iPhone into restore mode. To do this you first need to unplug it and turn it off. Hold the home button and plug it back into the USB port. Continue holding the home button until you see a picture of a USB cable and the iTunes symbol on screen.
8)copy "loadibec" "openiboot.img3" and "oibc" from the other folder in the zip to your "home folder" in linux. Open a command prompt.
-) sudo su
-) sudo ./loadibec openiboot.img3
-) Tap power button to select iBoot.
-) Push Home button
-) Type "sudo ./oibc" into the terminal
-) Type "install"
-) Type "reboot" once the install has finished!
-) Once you see the bootloader, hold the home button for more than 2 seconds to boot Android.
Once booted, if you are using WiFi change your DNS settings to:
If you just tap the home button then it will go back into the linux loader. To get out of this type ./oibc again and then type reboot.
If you get "./loadibec: error while loading shared libraries: libusb-1.0.so.0:" then go into the linux package manager and install libusb 1.0
If you get "./oibc: error while loading shared libraries: libreadline.so.5" then again go into the limux package manager and install libreadline 5