You Are Here: Home » Latest News, Mobility » Fix for iPhone 4 Error Code 1013 on iOS 4.2.1 upgrade

Apple iOS 4.2.1 is already out and people have successfully installed it on their iPhone, iPod touch and iPad. But some iPhone 4 owners are facing an Error Code 1013 when they try to upgrade to iOS 4.2.1 from iTunes. If you are one of them, then you can try the solution below to fix the Error Code 1013 when upgrading to iOS 4.2.1 using iPhone 4. This trick was posted on Apple Support Discussion forum by the user Dave.

The iPhone “iPhone ” could not be restored. An unknown error occurred (1013).

Beware upgrading to iOS 4.2.1 will also upgrade your iPhone 4 baseband to the latest version.

Steps for Fixing Error Code 1013:

Mac users:
Step 1. Go to your “Applications” folder.
Step 2. Then go to “Utilities” folder.
Step 3. Launch “Terminal”.
Step 4. Type the following command in terminal “sudo nano /etc/hosts” and hit enter.
Step 5. Terminal will ask for you password, 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.

Windows users:
Step 1. Start –> Programs –> Accessories
Step 2. Run Notepad
Step 3. Now File->Open in Notepad.
Step 4. Browse to Windows/System32/drivers/etc
Step 5. select all documents in “files of type:”
Step 6. Open “hosts”
Step 7. Delete all lines containing “gs.apple.com” or similar to that
Step 8. Save the file.
Step 9. Restore your device

[Guide | via]


Advertisements


You can get updates by following us on Twitter or become a fan on Facebook. Meanwhile you can also subscribe to our Daily Email Newsletter.



Related Stories

Unlock for iPhone 3G/3Gs BaseBand 05.15.04 and iPhone 4 BaseBand 01.59.00 is completed

iPhone 4 iOS 4.2.1: Update, Jailbreak and Unlock without BaseBand upgrade

iPhone iOS 4.2.1 New Year 2011 alarm clock bug

The innovative 3D Game “Infinity Blade” released for iPhone, iPad and iPod touch

AT&T upgrade eligibility date confirms next iPhone release date

Sony releases PlayStation 3 firmware update 3.42 to patch jailbreak

108 Comments

  1. Dhanish says:

    THANKS A MILLION…………………………..

  2. Troglodite! says:

    Finally! Someone who knows something!!

  3. jj says:

    my hosts file don’t have any gs.apple.com running on windows 7 ultimate mine has the following :

    # 102.54.94.97 rhino.acme.com # source server
    # 38.25.63.10 x.acme.com # x client host

    # localhost name resolution is handled within DNS itself.
    # 127.0.0.1 localhost
    # ::1 localhost

    and still stuck with error 1013

  4. justin says:

    @jj

    i changed host and i got same 1013, but i uninstaled and instaled iTunes
    and that helped:)

  5. PH says:

    I Tried updating my iPhone 4 to the new iOS version 4.3 and got an error code 1013, then i tried to restore and it did not work either (same error code)
    This trick didn’t work for me. I’ve tried tiny umbrella and that didn’t work, my mac running on the latest system and my itunes is updated as well.

    Please help me, if there is another way!

  6. Hamad says:

    Thanks man, that worked with me…. I just update my iPhone 4 to 4.3.

    btw, I used mac, and I had to create new account and give it the admin permission and then I did the steps above. in case that may help anyone.

  7. Lomarica says:

    Thank you, thank you, thankyou!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    Worked like a charm.

  8. Jan-Erik says:

    Worked fine for me :’D
    I did it using newest update of Mac and iTunes.. and I updated to 4.3 (8F190)

    Thanks for the help…. :P

  9. PeerSientje says:

    Thanks a lot; your solution works also with update iPhone 3Gs (from 4.2.1) to 4.3 and error 3194.

  10. DaveRenegade says:

    iPhone4
    Upgrading Software from 4.2 to 4.3
    Computer Crashed and after that I got restore error code 1013

    So heres what worked for me:

    Closed out iTunes and restarted computer.
    (On Phone) Held down Home button, Volume up, and Power Button for 15 seconds(all while connected to Computer)
    Next restore was cake…

    • Daniel says:

      Thank you DaveRenegade!
      I followed the guide but it still didn’t work, but after trying your tip it worked! *hug* :-)

  11. joe says:

    thanks a lot!!! seems like a toothpick, works like a charm!

  12. Ronnie says:

    This worked for me, too! Mac OSX Snow Leopard, iPhone 4 with iOS 4.1 to 4.3 upgrade consistently failing. Changed the /etc/hosts file and worked the next restore!

  13. Ashley says:

    Thanks for that. Didn’t work quite like that for me, I had to delete the hosts file as it would not allow me to safe the changes. Once deleted it restored straight away. Cheers ;-)

  14. AM says:

    Worked GREAT for me! thank you for the help..

    • gurjeet says:

      hey it didnt work for me ..plz help..i am so pissed of i feel like pulling my hair…i removed all the lines as told above but it didnt work out for me…plz suggest

  15. gurjeet says:

    i have tried it atleast 20-30 times but it’s ot working .it’s been 3 months since i bought this phone…don know what to do…

  16. wingkchan says:

    Thanks for the tip. I deleted the entry in hosts file, but for me, it also required me to reboot my machine before it could successfully restored. Thank you!

  17. G says:

    The correct terminal command for Mac is sudo nano /etc/hosts

  18. Richie says:

    IMPORTANT You NEED to Reboot PC !! and phone after you’ve made the host file changes. This is Fix is working,

  19. Brooke says:

    Wow! Thank you! I thought my brand new iPhone 4 was doomed and started to pannick.

    You are the best, thank you!

  20. mick says:

    great trick. thanks a million. experienced this issue taking new iPhone 4 from 4.2 to 4.3.1

  21. aaron says:

    I tried doing that but when I go to delete the line, it says “Cannot create Windows/System32/drivers/etc hosts file.
    Make sure that the path and file name are correct.”

    Please help!!

  22. STW says:

    Thank you very much for posting this. I was going from 4.2.1 to 4.3.1 on my iphone4 (at&t version), on windows 7 64bit. Editing the hosts file took care of the problem…yea, verily, and there was much happiness.

  23. Deed says:

    Thanks, the trick is when using Windows, delete the apple entries in the host file and reboot the computer. I deleted the apple entries, uninstalled itunes, rebooted the computer and reinstalled itunes and it worked.

    Thanks a bunch!!!

  24. saka says:

    Hi. I ve tried it. But in my mac there is no such as gs.apple.com.
    still giving error 1013. what else i can do?

  25. ChrisL says:

    Thanks! Worked great updating my iPhone 4 from 4.1 to 4.3.1. Had the same Error 1013

  26. Gene says:

    I was running 4.2.1 with gp jailbreak, saw the new 4.3 jailbreak came out had to restore before upgrading to 4.3. Had the 1013 error where it wouldn’t restore and stayed in recovery mode, as soon as i followed these steps i was able to get out of recovery mode and restore. Thanks man

  27. Mick says:

    Worked for me, though I found a backup hosts file first that DIDN’T have the entry, and threw me off for a few minutes.

  28. Noel says:

    Holy cow!! I tried everything under the sun for the last 4 hours! even tinyumbrella was installed on my machine! Thanks a million!!

  29. Sokla says:

    Great job, Thank you very much. All the best,

  30. dara says:

    Thank YOu Very mUch it work for me ! after i change host file and then restart My Pc

  31. scorpenez says:

    thanks .. it work for me. follow the instruction + restart my pc.

  32. Earnest says:

    It was so surprised that it can solve this problem. Thank you very much for this solution. At the first time I meet the problem I fear that I can’t use iphone

    • Brandon says:

      im on a windows computer and when i go into my hosts file and try to delete the stuff that has “gs.apple.com” it says that it could not creat and my check to see if the path and file name are right… >.> help?

  33. Roko says:

    THANKS!!!! It worked with Mac :)

  34. Mujeeb says:

    Its really Works…!!!!!!!!!!! Thanks a lot

  35. Chrismo says:

    I fixed my problem by switching computers… It didn’t work on one mac at work – but it did on another. Weird. Normal Update from itunes.

  36. vihann says:

    wow – as simple as that! Thank you SO MUCH!!

  37. Arti says:

    im downloadin iphone 4 4.3.2 i hope this works!!!

  38. Markw says:

    Another happy one here! Removed apple from hosts file

  39. Mau says:

    OMG!! it worked just fine, thanks!

  40. nadir says:

    Teşekkürler. Çalıştı.

  41. lnhntr says:

    running windows xp new i4 32g tried to do update to 4.3.3 phone is f#&%!@ can anyone help me im not too good with computers obviously
    thanks

  42. Sawan says:

    Guys pls help me…
    I removed the entry from host file…restarted the system …reinstalled itunes…but still getting same error

  43. Chad says:

    Worked like a champ. Thanks for the excellent info!!!

Leave a Reply

© 2010 NewsDen · Subscribe:NewsComments