How-To: Downgrade iPhone OS 4 to iPhone 3.1.3

Today we are going to cover how to successfully downgrade the iPhone from OS 4 beta (iPhone 4.0) back to iPhone 3.1.3. If you're a small developer who installed the iPhone OS 4 beta then realized you had to troubleshoot problems for an existing app under 3.1, it can sometimes come down to this or having to quickly go shopping for a second iPhone or iPod touch. Luckily, downgrading can be done pretty easily a majority of the time, even though things sometimes go downhill, like DFU loops, errors, etc.. We will cover these scenarios right now and hopefully get a lot of people where they need to be.  I'll show you two ways to downgrade, through XCode (Mac only) and through iTunes (Mac and PC).

And as always, if you are even a little scared you may mess up your phone during this process, stop right now.  What you do to your phone is always on you.  These guides are there for your convenience, but we hold no responsibility for any bricked iDevices of any kind.

If that didn't scare the pants off of you, hit the jump for screenshots, a written walk-through, and a video!

First of all, we need to differentiate between firmware and a baseband as a lot of people seem to get those confused.  Firmware is the actual software your phone is running, which in most cases can be downgraded easily.  A baseband however can NOT be downgraded as easy.  This is part of what makes a phone unlockable (when the baseband is cracked).

Currently, iPhone firmware 3.1.3 and above can not be unlocked as the baseband version changed.  So if you are trying to downgrade in order to get your unlock back, don't bother with this process.  Your baseband will currently remain at the 4.0 baseband.  Even when you downgrade successfully, your baseband will remain the same, ruining your chances at having your unlock back.

What I'm getting at here is, do not downgrade in hopes of getting an unlock back.  If you've installed 3.1.3 and higher, there is no unlock released.  The only way you can unlock 3.1.3 is to have an older bootrom that was not upgraded (meaning you upgraded to 3.1.3 from a custom firmware ipsw, not the official 3.1.3).

XCode Downgrade

The easiest way to downgrade is going to be to go through XCode on a Mac.  If you're just going through XCode, simply choose 3.1.3 from your available firmwares, and voila, your phone will restore.  If you are a licensed dev, you should have no problem going this route. No errors, nothing.  You will not need the packages listed above (at least you shouldn't). Open XCode and go to Organizer...

Then choose 3.1.3...

If you do get stuck in a DFU loop or get an error, jump down to the iTunes directions and continue from there (typically error 1015 or a DFU loop, which is where you need iRecovery - covered below and in video).  I did not include an XCode walkthrough in the video as it's extremely simple and painless if done correctly.

iTunes Downgrade (Mac and PC)

Even though I am covering a PC downgrade, you should NEVER ever install a beta OS through a PC. That is not the way they were meant to be installed. Betas should NEVER be installed through iTunes, always through XCode on a Mac. Especially with 4.0. The file system changed and iTunes will install the old way, creating crashes and all kinds of other nastiness. Even though I am giving instructions for PC downgrade, I have no way to test them, if there are issues, please let me know so I can correct them.

Alright, now on to what you'll need to have beforehand -

Here is what you need to download to your computer (to your desktop is easiest):

After you have downloaded the files above, install libusb and iRecovery (PC, you don't install iRecovery, you run it through command prompt).  Then plug in your iPhone.  Open iTunes and hold down alt/option and click restore (ctrl click on a PC).  Now navigate to where you saved your firmware like below (I have a folder on my desktop called iPhone firmwares).

Wait for your phone to go through the restore process (I would normally of told you to backup before doing any of this, but as 4.0 does not support backups yet, that isn't possible. Hopefully you backed up your data before 4.0 so you can restore from that).

Your phone will not complete the downgrade, it will give you an error like below, that's OK.

Next, open iRecovery.  There are 2 versions of iRecovery.  One you have to manually enter commands, the other, fast version is a button click.  So for Mac users, open the faster iRecovery and click the button.  iRecovery will reboot your phone and you "should" be done and able to sync and restore like normal through iTunes (you are done if you have a screen showing "Slide for Emergency", if you still have "Connect to iTunes", skip to the section titled "Still Stuck").  For PCs who need to enter commands into your command prompt, type the commands in this order:

  • iRecovery -s
  • satenv auto-boot true
  • saveenv
  • reboot (by holding home and power down until you see Apple logo - about 10 seconds)

If you are still stuck in DFU, continue, if you have "Slide for emergency" (below), you are done, sync like normal. "Connect to iTunes" (below) is bad, so continue on...

Here is what you don't want (but may get)...

Still Stuck

When I decided to downgrade, my phone was stuck in a hopeless loop of DFU fail.  I found a way around this with blackra1n.

First, download blackra1n to your computer.  Launch it, and click "make it ra1n".  Wait about 30 seconds, your screen should be black but not off.

UNPLUG your phone and hard reboot it.  When it comes back on, you should now have "Slide for Emergency" and be able to sync like normal. blackra1n will not jailbreak your phone, so if you want a Jailbreak, use Spirit afterwards (see my Spirit Jailbreak for iPhone 3.1.3 walkthrough).  But it will get your phone out of DFU mode.

That's it!

Just a side not: Anytime you restore you may have to repeat this process as a clean restore may still fail (at least until 4.0 official drops and you upgrade to that).  Forcing your iPhone out of DFU mode can cause restores to act funky, so just save these steps for further reference.  You should now be able to backup and sync like normal though.

Questions, problems? Let us know in the comments or in the TiPb Jailbreak Forum!


YouTube link

Allyson Kazmucha

Senior editor for iMore. I can take apart an iPhone in less than 6 minutes. I also like coffee and Harry Potter more than anyone really should.

More Posts

 

-
loading...
-
loading...
-
loading...
-
loading...

← Previously

AT&T rolling back upgrade eligibility dates for next iPhone?

Next up →

UPDATE: Second iPhone HD/iPhone 4G prototype, A4 chipset show up in pictures, teardown, video

Reader comments

How-To: Downgrade iPhone OS 4 to iPhone 3.1.3

41 Comments

Already a few hours late in reporting about that New iPhone Prototype that showed up in Vietnam

Downgraded successfully, but then encountered a problem that iTunes does not want to synchronse saying that version of OS on the iPhone is too old. Presumably, the backup already contains information about version 4.
Is there any way to downgrade a backup from iTunes now?

Dmitry - I've never had that issue before, you downgraded to 3.1.3 correct? When is it giving you the error? Just when you try and sync?

@Geo why would a firmware link be illegal? You can also get the firmware out of a folder in iTunes if you choose. No one is charging for it. It's just a convenience in case you need an older version.

Dimitry... is it possible you backed up before you tried to do the downgrade? When you try to load your backup, choose the next most recent date. Your most recent backup is not going to work BECAUSE it has 4.0 info in it.

@Dimitry and @ViolentA79
I may be wrong on this (I'm not sure what beta 2 and 3 fixed, I downgraded after the first one), but was the backup functionality restored? As far as I knew, 4.0 would not even create a backup, it would just fail as the file system changed. But Dmitry, try as Violent suggests and choose the NEXT most recent backup, see if that fixes it and let us know.

Just to quickly point out, Shift-click is the windows equivalent of the mac's Option-click for selecting the firmware for restoring. Nevertheless, thanks for the nice, concise, yet still thorough article!

Thank you, this just saved my ass. I installed 4.0 and my developer code didn't come through. My phone was a paperweight. Nothing worked. I used Blackrain and then iRecovery. Saved my ass.

I cant seem to get mine to work on a pc. When I do the command it says it cant recognize the command or find anything. what should I do?

omg can someone help me! i run the irecover using command prompt (cd C:\\ whatever thingy...) and then when i put "irecovery -s" it says “got usb
no iphone/ipod found” help please! i installed libusb thingy correctly

guys.... i did upgrade to OS4 but my 3G is no longer providing internet, i'm using 3Gs, Du network (UAE) and i'm lost coz i'm unable to downgrade my OS to 3.1.3 ....
i contacted Du for this, it seems like they have no idea of the official release of OS4, i can use Wifi very nicely even much better than before in terms of speed, but 3G (logo is there) doesn't provide internet anymore

Great, this article just saved my life after a hellishly frustrating week of vain attempts to rid my 3G of that 4.0 stinkware. Everything works fine again, if only a little slower than before. Kudos for Allyson! NEVER going to blindly trust Apple again with their so-called upgrades...
Just two remarks to the article, for fellow-victims to benefit from.
1. The XCode option does not work if you register as a developer and download XCode only after you have upgraded to 4.0: the only iPhone-firmware a fresh download of XCode will find is 4.0...
2. I found out on the fly that, rather than downloading, installing and running Faster iRecovery instead of plain iRecovery, you should install and run both (in addition to libusb and the 3.1.3 firmware), as in fact faster iRecovery prompts you to do. Omitting to download and run plain iRecovery in addition to Faster iRecovery may keep you in DFU fail.

This didn't work for me at first - but I figured it out. There must be some trick to using the faster iRecovery. I followed the instructions, but kept getting "iRecovery not found" in the terminal window. So I downloaded BOTH versions of iRecovery, then ran the fast iRecovery app - Bingo! Went without a hitch from there.
Thanks!!!

I have a 3gs and I got a different error- 3194 and couldn't even get to the point of the software installing enough to use irecovery or blackra1n. Do you have a solution for this?

hi my itunes says an error when verifying with apple when ive clicked on the 3.1.3 file-
"the iphone could not be restored, the device is not eligable for the requested build".
please help
thanks

I naively figured the hosts of the offical Apple forums would be happy to learn about this great downgrading solution, since there are so many people there complaining about 4.0...
Oops. Big, big mistake.
For your learning & entertainment, here's the response of Apple's Secret Police (Gestapplo), who removed my post instantly and sent me the following message in e-mail.
'Dear Marck (Marck1967),
Recently you made a post to Apple Discussions that discussed inappropriate activities. We have removed your post titled "Re: 3G upgrade to 4.0: how do I downgrade back to 3.x?", which is included for your reference below.
Please take a moment to read your post as well as the Apple Discussions Use Agreement at http://discussions.apple.com/help.jspa. We encourage you to use these forums as a resource, however we insist that you keep your post within the terms of the Use Agreement.
Thank you,
Apple Discussions staff'
Fascinating, eh?
Since they sent this from a no-reply account, I had to conclude that they wanted me to reply in public... So I tried my luck a second time on the forum with the following reply:
'Dear Gestapplo,
Last time I checked, I was the customer who payed several hundred Euros for an expensive device, and Apple was the vendor who killed it with a piece of software it carelessly 'encouraged' me to install - a problem that no Apple-retailer has been able to solve for me, and which has eventually cost me several days of work to solve myself, in addition to the aggravation of weeks without a functioning iPhone.
Did I overlook something here?
No, I don't think so either.
So before infringing upon my 5th amendment rights or whatever else something as basic as freedom of speech is called on your side of the Atlantic, and before arrogantly accusing me of 'inappropriate activities', you would have done a lot better to consider the following.
I have been turned from a devoted fan into a seriously disappointed customer, to put it mildly, by the described experience.
There are tens on this forum, and tens of thousands out there, like me.
In view of our personal experiences, NONE of us gives a rat's *ss what Apple, or you, or whoever else 'insists' regarding the sharing of a method that restores the damage that Apple has inflicted upon us. In fact, Apple's chances of avoiding legal action for damages or, probably more important, keeping its fanbase and customers, are diminishing daily.
It is hence beyond me where you found the nerve for your offensive interference with my attempt to help fellow-customers that Apple left helpless. You certainly don't know the first thing about how to deal with customers, let alone with their communities.
Still, you may want to enlighten us all in answering a question that's not answered in your Use Agreement: how the heck, in your view of the universe, are we supposed to make these forums a useful resource for each-other, if all we are allowed to say here is what Apple, in its apparent incompetence, endorses?
Or, perhaps more to-the-point: when did the likes of Joseph Stalin, Bill Gates and the Pope take over Steve's Job(s)?
Best,
Marck1967'
Can't wait to see what happens next...

Well, this is what happened: they have already removed it. We're back in the USSR for good with Apple...

Up until now, I haven't been able to get past the DFU part. THANK YOU so much for the info!!!!!!

I'm having a problem, I selected install other firmware from Xcode since it had 3.1.3 greyed out, and it installs the firmware, but then it runs int an error and says it can't downgrade the baseband. I need to downgrade this device, how can I get around this error.

Just wanted to add this to the mix. When I attempted to run blackra1n, I received an error message saying that the ASL.dll was missing
The solution for this is simple, you will need to place the Blackra1n executables in the Apple folder under Common files in Program Files. The folder would be located in the following locations:
32 Bit – C:\Program Files\Common Files\Apple\Apple Application Support
64 Bit – C:\Program Files (x86)\Common Files\Apple\Apple Application Support
Once you copy the blackra1n executable to the above folder, create a shortcut for it on the desktop and double-click it to run it as usual.
Read more: How To Fix Missing ASL.dll While Running Blackra1n http://techie-buzz.com/how-to/how-to-fix-missing-asl-dll-while-running-b...

Just successfully downgraded from 4.0.1 to 3.1.3 - the iPhone now works 3 times faster than on OS 4. I could not restore to a backup that was made while I was on OS4, but I easily restored to a backup made before I installed to OS4 (when restoring it gave me a drop down menu allowing me to restore to an earlier point). I also encountered the "connect to itunes" problem, but this was easily solved with the above instructions. GOOD WORK! VERY HELPFUL!

firmware is greyed out. i cant seem to select the file. how do i sort this out? any help would be much appreciated
also tried the x code method but no joy cause it prompts with an error
saying it can’t downgrade the baseband
pls can anyone help
thank you so much for your time
cheers

after i downgraded to 3.1.3 my bluetooth isn't working. i have an unlocked version of 3G and it used to connect fine with my car's bluetooth in OS4. After i downgraded it doesn't. now i upgraded back to 4.1.2 but it still doesn't work. And it also won't let me use a SIM with PIN code. Any ideas on how o fix these probs? thanks.

i i just wonted to no as there been rumors going about that i could downgrade my iphone4 4.0.2 brand new out the box to 4.0.1 by using xcode but when i try with my 3gs i just keep getting message device isnt eligible for requested build ??? im using xcode 3.2.3 please reply

Everytime i try to downgrade and restore i get error 3004 anybody have any idea what that is or how to fix it?

Hi,I wish to downgrade my iPhone from 4.0.2 to 3.1.3 using Xcode.hw long it take and is it v easy to do??