Instructions for MAC / WIN
Firmware 4.0 Downgrade to 3.1.3
We suggest reading this how-to in its entirety before proceeding with this process. We successfully downgraded our device from 4.0 to 3.1.2 on multiple iPhone 3GS models, but haven’t tried this process on an iPhone 3G or iPod touch.
What You Need For MAC:
- An iPhone Running OS 4.0
- A Mac
- iRecovery v. 1.3 for Mac
- Libusb Library
What You Need For WIN:

Step 1 - Download iRecovery and Libusb
You’ll need two pieces of software in order to downgrade your device from OS 4.0 back to OS 3.1.3. You can download iRecovery from above. You can download Libusb from above.
You can install Libusb by unzipping and running the installer. Unzip and place the iRecovery script on your Desktop.
Step 2 - Sync Your iPhone
The first part of any OS restore should be to backup and sync your iPhone data. Connect your device to iTunes and click the lovely Sync button. Depending on how many changes you have, this could take a while so get a snack and watch the status bar climb to the finish line.
iPhone OS 4.0 doesn’t allow you to backup your device, so anything that’s not synced over to iTunes will be lost.
Step 3 - Start The Restore
Connect your iPhone to your computer.
Turn iPhone off.
Start iTunes.
Hold Power and Home buttons together for 10 seconds or so.
Release Power button but keep holding the Home button until your computer recognizes a new USB device.
iTunes will now recognize your iPhone.
Press alt/option and click the Restore button in iTunes. This will bring up a dialog that will allow you to manually select your iPhone OS firmware. Navigate to User/Library/iTunes/iPhone Software Updates/ and select “iPhone2,1_3.1.3_7E18_Restore.ipsw”. Click Choose and the OS restore process will begin.

If you don’t have this version of the iPhone OS software, then you’ll need to download it by clicking your version below. Then repeat this process by navigating to the download location and selecting it. Click Choose and the OS restore process will begin.
Download iPhone OS 3.1.3 for iPhone 3G
Download iPhone OS 3.1.3 for iPhone 3GS

Your device will most likely show the error "1015" when it is restoring the firmware. Ignore this error as we will take care of it in the next step.

Step 4 FOR MAC - Use iRecovery to complete restore
Now we’re going to use iRecovery to complete the restore process and get around the firmware upgrade problem that we encountered in the previous step.
copy and unzip irecovery to your desktop
To do this, launch Terminal (Applications/Utilities) and type in the following commands:
cd Desktop
./iRecovery -s
setenv auto-boot true
saveenv
fsboot
exit
After a few seconds, you can disconnect your iPhone and power it off manually by pressing the power and home buttons simultaneously. Now when you power up your iPhone, you should see the standard connect to iTunes image.
You can now safely connect your iPhone to iTunes.
Now we’re going to use iRecovery to complete the restore process and get around the firmware upgrade problem that we encountered in the previous step.
copy and unextract irecovery to your desktop
Install “libusb-win32-filter-bin-0.1.12.1.exe” and keep the file on the desktop.
Launch Command Prompt (start menu / programs / accessories / ) and type in the following commands:
cd Desktop
./iRecovery -s
setenv auto-boot true
saveenv
fsboot
exit
After a few seconds, you can disconnect your iPhone and power it off manually by pressing the power and home buttons simultaneously. Now when you power up your iPhone, you should see the standard connect to iTunes image.
You can now safely connect your iPhone to iTunes.