iPhone 4 Update to iOS 4.2.1 Gone Sour? How to Fix iTunes Error 1013 FYI, I thought there might be some who could use this We were as excited as the rest of you to finally get our hands on iOS 4.2.1 Monday -- that is, until a simple update on our iPhone 4 went horribly awry and several restore attempts also failed. Before the fear washes over you, read on. Weâ€™ve been using the iPhone since day one and itâ€™s been a bit of a hobby to jailbreak it, unlock it and even install other mobile operating systems like Android on it from time to time. Throughout all of that hacking, weâ€™ve never had a situation that couldnâ€™t be resolved with a simple restore -- until this week. What should have been a simple upgrade from iOS 4.1 to iOS 4.2.1 on our iPhone 4 turned into a (nearly) spine-tingling nightmare. The most baffling part is that the device in question had never been hacked in any way -- it was 100 percent stock, and yet during out simple update attempt, iTunes threw up the error above. Worse yet, the update had gone so completely awry that we now had no choice but to restore the iPhone 4. No problem, we figured, having a backup on hand. That is, until the restore also threw up the same error. Appleâ€™s support website was vague on what an error code 1013 is, but the likely culprit was some kind of hardware fail. They suggested trying another dock cable, unplugging other USB devices and trying the restore on another computer. After two more failed restore attempts (the third time is not a charm!) from our late 2008 MacBook Pro 15-inch, it was time to try one last thing before making a Genius Bar appointment and assuming the iPhone 4 had gone to device heaven. We docked the iPhone 4 into a new 11-inch MacBook Air and wouldnâ€™t you know it, the device restored correctly and we were able to move it back to the MacBook Pro to restore from our backup without further incident. As it turns out, we werenâ€™t the only ones being bitten by what appears to be a bug that can potentially affect any iOS device when updating to iOS 4.2.1 -- Appleâ€™s support discussion forums are chock full of complaints about the issue, but also a resolution, which the folks at Redmond Pie typed up for Mac and Windows alike. It requires a trip to the Terminal and a minor edit to your hosts file, but it will assure you donâ€™t get bitten by the update monster like we did. Mac instructions are reprinted below (courtesy of Apple discussion forum member C. Castillo), hit the Redmond Pie website if you need the Windows version. This applies to an iTunes error 1611 also, and in either case youâ€™ll still need to do a firmware restore, so hopefully you have a current backup on hand in iTunes. Step 1. On your Mac, go to your â€œApplicationsâ€ folder. Step 2. Now navigate to the â€œUtilitiesâ€ folder. Step 3. Launch "Terminal". Step 4. Type "sudo nano /etc/hosts" (without quotes) and hit return. Step 5. Enter your password Step 6. Use the down arrow key to find the â€œgs.apple.comâ€ entries. Once the cursor is in front, make sure you comment out the line(s) by entering â€œ#â€ in front of the text. Step 7. Save the file by pressing CONTROL+O. Step 8. Exit the nano editor by pressing CONTROL+X. Step 9. Restore your iDevice.