IOS – How to restore the iphone

iosiphoneitunesrestorewindows

I tried to upgrade my iphone 3GS to iOS 5 today, but the upgrade failed saying 'an unknown error occurred'. Now my phone is in a weird state where you can't turn it on properly, it just goes to a screen with a picture of a USB cable pointing into an itunes logo.

I plug it into itunes and I go through this sad sequence of events:

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

I have tried 3 times now and always the restore fails with this same error. What are my options now? Losing all my media and other data was bad enough, but now not even having a working phone is kind of crippling.

I am using the latest version of iTunes, and my phone has never been jailbroken.

Here is the logfile of the updater:

2011-10-20 03:54:17.989 [3428:c84]: restore library built Sep 14 2011 at 01:30:07
2011-10-20 03:54:17.989 [3428:c84]: iTunes: iTunes 10.5.0.142
2011-10-20 03:54:17.989 [3428:c84]: iTunes: Software payload version: 9A334
2011-10-20 03:57:10.377 [3428:ca8]: iTunes: Specifying UOI boot image
2011-10-20 03:57:10.377 [3428:ca8]: requested restore behavior: Erase
2011-10-20 03:57:10.377 [3428:ca8]: *** UUID F6CEBD39-04E6-F24D-BE04-F81322BED4FB ***
2011-10-20 03:57:10.397 [3428:ca8]: amai: AMAuthInstallDebugWriteObject: debug object written: C:\DOCUME~1\wim\LOCALS~1\Temp\Per8.tmp\amai\debug\tss-request.plist
2011-10-20 03:57:11.258 [3428:ca8]: amai: tss_submit_job: HttpQueryInfo returned 200
2011-10-20 03:57:11.639 [3428:ca8]: amai: AMAuthInstallRequestSendSync: received tss response (server version: 2.0.0)
2011-10-20 03:57:11.689 [3428:ca8]: amai: AMAuthInstallDebugWriteObject: debug object written: C:\DOCUME~1\wim\LOCALS~1\Temp\Per8.tmp\amai\debug\tss-response.plist
2011-10-20 03:57:13.091 [3428:ca8]: amai: _AMAuthInstallBundleInstallPersonalizedEntry: entry "KernelCache" has been previously personalized; skipping it
2011-10-20 03:57:13.091 [3428:ca8]: amai: _AMAuthInstallBundleInstallPersonalizedEntry: entry "DeviceTree" has been previously personalized; skipping it
2011-10-20 03:57:13.101 [3428:ca8]: amai: _AMAuthInstallBundleInstallPersonalizedEntry: entry "AppleLogo" has been previously personalized; skipping it
2011-10-20 03:57:13.281 [3428:af8]: iBoot build-version = iBoot-1072.61
2011-10-20 03:57:13.281 [3428:af8]: iBoot build-style = RELEASE
2011-10-20 03:57:13.281 [3428:af8]: AMDeviceIoControl: GetOverlappedResult failed
2011-10-20 03:57:13.281 [3428:af8]: AMDeviceIoControl: pipe stall
2011-10-20 03:57:13.281 [3428:af8]: USBControlTransfer: error 31, usbd status c0000004
2011-10-20 03:57:13.281 [3428:af8]: command device request for 'getenv radio-error' failed: 2008
2011-10-20 03:57:13.281 [3428:af8]: radio-error not set
2011-10-20 03:57:13.281 [3428:af8]: unable to open device_map.txt: No such file or directory
2011-10-20 03:57:13.281 [3428:af8]: <Recovery Mode Device 065B72A8>: production fused device
2011-10-20 03:57:13.281 [3428:af8]: interface has 1 endpoints, file pipe = 1

2011-10-20 03:57:13.281 [3428:af8]: <Recovery Mode Device 065B72A8>: operation 4 progress -1
2011-10-20 03:57:13.371 [3428:af8]: bootstrapping restore with iBEC
2011-10-20 03:57:13.431 [3428:af8]: <Recovery Mode Device 065B72A8>: operation 31 progress -1
2011-10-20 03:57:14.443 [3428:af8]: <Recovery Mode Device 065B72A8>: Recovery mode succeeded
2011-10-20 03:57:14.773 [3428:c10]: WinAMRestore::OnInterfaceRemoval: \\?\USB#VID_05AC&PID_1281#{ED82A167-D61A-4AF6-9AB6-11E52236C576}\IB0000#b1499fd1
2011-10-20 03:57:14.773 [3428:c10]: WinAMRestore::ProcessDevNodesChanges: device: 0x06598068, notify: 2, connected: 1
2011-10-20 03:57:14.773 [3428:c10]: AppleDevice::NotifyDisconnect: IBOOT, IBOOT \\?\USB#VID_05AC&PID_1281#{ED82A167-D61A-4AF6-9AB6-11E52236C576}\IB0000#b1499fd1, inst: 0x6598068
2011-10-20 03:57:14.773 [3428:c10]:                                IBOOT, DFU \\?\USB#VID_05AC&PID_1281#{B8085869-FEB9-404B-8CB1-1E5C14FA8C54}\0000#b1499fd1, inst: 0x6598068
2011-10-20 03:57:14.773 [3428:c10]: _AMRecoveryModeDeviceFinalize: 065B72A8
2011-10-20 03:57:14.783 [3428:c10]: WinAMRestore::OnInterfaceRemoval: \\?\USB#VID_05AC&PID_1281#{B8085869-FEB9-404B-8CB1-1E5C14FA8C54}\0000#b1499fd1
2011-10-20 03:57:14.783 [3428:c10]: WinAMRestore::ProcessDevNodesChanges: device: 0x06598068, notify: 2, connected: 0
2011-10-20 04:02:14.787 [3428:c84]: iTunes: Restore error 1604

Best Answer

@patrix's answer is right.

I had this error as well. It turned out to be faulty USB hardware. I used a different computer to restore iOS, then returned to the original computer. I unplugged every USB device except for the mouse, keyboard and wifi. I restarted the PC, plugged in the iPhone, started iTunes, and restored from backup. This got it going perfectly and now I just use wifi syncing rather than use the faulty USB ports.