Konova

Monday, April 4, 2011

[HOW-TO] - Fix iTunes Error 1013 When Updating iPhone 4 to iOS 4.3.1 [SOLVED]

I was trying to Jailbreak my iPhone iOS 4.3.1 today but encountered a big problem when it cannot exit from the Recovery Mode. I tried several methods to kick out of Recovery Mode using Tiny Umbrella and Fix Recovery but failed. The error 1013 kept appearing after restoring the iOS 4.3.1.

Finally, I found a simple solution shown below;

If you have tried updating to the recently released iOS 4.3.1 update on iPhone 4 and encountered Error Code 1013 or Error Code 1611, then you are a not alone. This has been a common issue across all iOS devices updating to iOS 4.3.1 and Apple Support Discussion forums are full of users complaining about this issue.
iTunes-Error-1013-2011-04-4-21-51-2011-04-4-21-51.jpg
This bug has apparently been reported to Apple but if you don’t fancy waiting for an official fix, you can follow this guide to try and successfully update your iOS device to 4.3.1.

Update (April 11, 2011) - Read this article regarding Apple official statement regarding the problem - "Unauthorized modification of iOS has been a major source of instability, disruption of services, and other issues"

Before doing so, you may also like to try and restore using a different computer.
Warning Note: This will result in your iPhone 4 baseband being upgraded to the latest version.
How to Fix Error Code 1013:

Mac OS X:
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.



Windows:
Step 1. Start --> Programs --> Accessories
Step 2. Run Notepad or WordPad 

Step 3. Click “Open..” from File menu.
Step 4. Browse to Windows/System32/drivers/etc 

Step 5. In “files of type:” select all documents
Step 6. Open “hosts”
Step 7. Delete all line that has “gs.apple.com” or something like that 

Step 8. Hit Save
Step 9. Restore your device

[@Gustasn0w for Windows steps | Tech-Exclusive for Mac steps]

UPDATE (April 6, 2011)
Also try to check out this Tip from Karthik.

Screen-shot-2011-03-14-at-10.20.57-PM-2011-04-4-21-51.png

  • In TinyUmbrella, go to Advanced tab and make sure you uncheck “Set Hosts to Cydia on Exit” option.
  • As a double check, make sure you don’t have an entry in hosts file in your computer for gs.apple.com. If you do, comment it out and try the restore process again.

[UPDATE - April 11, 2011] - Someone posted and claimed that this error only happens to people who have tried Jailbreaking previously. Also checked another post here which stated:

"Well, another case of hurting the good, while trying to go after the bad. What the issue is apparently Apple put in a check point feature around version 4.2.1 that checks for users who are redirecting their connections to gs.appl.com. If the itunes process suspects this, your phone firmware management process stays in recovery mode. You get error 1013 which says you have a hardware error and list numerous hardware related things for you to check. So my iphone sat on my dresser for two months under the belief that I had a hard ware issue. Well the fact of the matter is that there was nothing wrong with my phone. Apparently there are users who jail brake their iphone to run other apps, and for those users, they have an entry in their hosts file that redirects gs.apple.com to a website that is set up to assists jail break users. all this not endorsed by apple. The checkpoint feature that apple put in to detect this uses a timer and waits for a response between your system and gs.apple.com. If the timer threashold elapses, an assumption is made that you are redirecting your gs.apple.com connection, and are a jail break user. Your phone gets put into recovery mode. Problem with this is that there are ligitimet users who have host files that are ligitemt and does not redirect their connections to gs.apple.com. In my case I use a 60,000 line hosts file to redirect adware, malware, and other vulnabilary type sites. The lenth of time for my PC to search thru this file exceeds the threashold period involved in the checkpoint process, and even though the gs.apple.com entry does not appear in my hosts file, an assumption was made that I was a redirection of gs.apple.com user, and my phone was put into recovery mode. to fix my problem I tempoaryily used the default hosts file of 


##

Host Database
#
localhost is used to configure the loopback interface
when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
I have no reason to prevent my system from talking to gs.apple.com. It just takes a little longer to do so. There are thousands of iphone users right now who have iphones locked into recovery mode, probably because they are on a slow internet connection and their threashold is being exceeded. These folks are innocent victims of of the pursuit of the jail break users. Apple needs to figure out another way to do this with out impacting loyal customers. Apple. shame on you. "

TOP [How-To] Tips 

74 comments:

  1. thx im tring now, and yes its working

    ReplyDelete
  2. Hi,

    It still dosent work for me:(

    ReplyDelete
  3. In Step (9) If you are using Mac, use Option+Restore from iTunes and select the right firmware.

    ReplyDelete
  4. This works!!! Tks...

    ReplyDelete
  5. My Terminal says 'command not found' :¬( ..can anyone help?

    ReplyDelete
  6. Quick note to windows users, close iTunes before editing your host file, it appears iTunes reads this find on launch only, I have tested this with a bad entry in my hosts file, launching itunes and attempting a restore.

    I get the 1013 error.

    I leave iTunes open, modify the host file, verify the entry is not there with a ping test, but iTunes cached the entry and will not work until you close out and restart it. I would even go as far as to suggest a reboot.

    ReplyDelete
  7. This isnt working for me.... I deleted gs.apple.com from host, still doest work

    ReplyDelete
  8. I don't understand. ctrl+O is open and its telling me i am not allowed to save this file when i hit "ctrl+s". Also, when it say's to put a "#" in front of the gs.apple thing, does it mean in front of the entire line or just that specific text?

    ReplyDelete
  9. Bonjour, qu'elle est le mot de passe ?
    car celui que je connaissais étais alpine.
    Merci.
    lotfi13000@yahoo.fr

    ReplyDelete
  10. I don't have that line in my file “gs.apple.com”

    so what now ??

    ReplyDelete
  11. Le mot de passe est votre mot de passe et de ne pas Mabook alpine.

    You need to use your Macbook password when login the Terminal (as a superuser or root).

    Check this screenshot.
    http://img203.imageshack.us/img203/9830/screenshot01em.jpg

    ReplyDelete
  12. Quick tip, If on windows, Open note pad as Administrator (Right click, Open as Administrator)

    ReplyDelete
  13. I cant find the windows/system32/drivers/etc file once in Word Pad and I open a file

    help please!

    ReplyDelete
  14. Thanks a lot, it worked like a charm !

    ReplyDelete
  15. This works ONLY if you have hacked your phone in the past. Programs that hack the iPhone corrupt the hosts file. Despite what the OP said, this is not an Apple problem; it is a side effect of hacking the phone.

    ReplyDelete
  16. You are my God!!!

    Thank you, my iPhone 4 finally came back from hell with your Hosts thing tip.

    ReplyDelete
  17. Yes but people who have never jailbroke their phone are getting the problem too, it is an apple problem.

    ReplyDelete
  18. That is really a shameful for Apple to do, the end result will be the same, people will do whatever they want to a phone they paid over $500 for. Its a communist approach to US commerce, I also blame the government for this.

    Anyhow sorry for the rant, after 2 days I fixed my phone using the last method, somehow removing the gs.apple.com kept reappearing in the host file, I added the 255.255.255.0 broadcast and it worked. Mine needed to end in (0)

    ReplyDelete
  19. ive been trying everything and your the only help ive found, apple needs to get on top of this!

    ReplyDelete
  20. This is absolutely funtastic info, it worked for me.

    ReplyDelete
  21. Its great to hear that it helps a lot of fellow iPhone owners! ;-)

    ReplyDelete
  22. Thx, its working perfect. My iPhone 4 now living!

    ReplyDelete
  23. Thank you soooo much... I was getting so nervous... but I got it to work like a champ.. life saved:)

    ReplyDelete
  24. I can't get any of this to work. I still get error 1013 or i get told my phone is not eligible for this upgrade.

    Any help please???

    ReplyDelete
  25. Hi Jason - May I know whether which iphone are you using and which firmware that you are trying to upgrade?
    Currently, you can only upgrade to 4.3.3.

    ReplyDelete
  26. Hi Edoras

    I managed to figure out the problem and find a solution. When wanting to restore my iPhone 4 to 4.3.2 I kept being left in an infinite recovery mode loop and iTunes giving me the error 1013. I thought this was a TinyUmbrella error but it wasn't. After I got the recovery mode fix and ran it, my phone finally booted and all was right with the world. lol. Thanks though as I appreciate wanting to help :)

    ReplyDelete
  27. Hi Jason - Can you tell us more, how did you fix the recovery mode? In my case, Tiny umbrella did not help.

    ReplyDelete
  28. Hey...

    All I used was the recovery fix for iOS 4.3 from the TinyUmbrella website. It took its time to work but it worked. You just have to put your phone into DFU mode and then run the .exe file and it will work eventually (Really, it takes awhile, just let it run for about 15 minutes).

    ReplyDelete
  29. Thanks for sharing the tip, Jason.
    But 15 minutes is really a long time...

    ReplyDelete
  30. OMG!!! It worked! you are a life saver!! My life is mostly my phone so yea. Thank you so much. I did both of the things and I had a jailbroken 4.3.1 and wanted to restore to a 4.3.3, and this worked amazingly!!! I LOVE YOU!!!!!!!!!!! :D

    ReplyDelete
  31. I was on 4.3.2 jailbroken. When i tried to update to 4.3.3 with 4.3.3 IPSW file already downloaded on my computer. I press "shift" and click on Restore, initially its work, but at the end of process, Itunes pop up 1013 error. By using trojan removal, I edit hosts file to the default windows setting. The result, no (gs.apple.com) at the last line. Then I can update by online. TQ for share info. From there, I learn something that "gs.apple.com" will lead your itunes to refer to cydia server. delete the line, will solve the error and you can update smoothly.

    ReplyDelete
  32. Thank you very much, it worked perfect !

    ReplyDelete
  33. i try to edit the file but it wont let me save it because it says i dont have administrator access when im on my own aptops only user which is administrator. how do i fix this so i can change the file so i can restore my phone?

    ReplyDelete
  34. You need to key in your admin password.

    ReplyDelete
  35. hey please respond, there is no gs.apple.com line in my terminal! What do i do?

    ReplyDelete
  36. Its OK of you don't have gs.apple.com.
    Even if you have that line, you need to delete it.

    ReplyDelete
  37. I have iphone 4 factory unlocked on firmware 4.3.4, trying to downgrade it to 4.3.3,but i am facing 1013 error.To remove that error i edit host file and change the server address but still its not working, what i am making mistake tell me.

    ReplyDelete
  38. I have the same Issue, there is no gs.apple.com line. What do you mean even if you don't have it, delete it?

    ReplyDelete
  39. And how do you delete it? using what controls? help Please!

    ReplyDelete
  40. OK. So I've tried adding the gs.apple line with my ip address infront(CTRL O-X). Still doesn't work, Still get the same error. I try deleting the line after... nothing either.
    So, I'm attempting to download ispw. file 4.3.3 and making a custum firmware But don't know if I should use the ipad baseband again used to jailbreak last time with pwnagetool.
    Does anyone else know if this works.
    From what I've researched on google, these are the two ways, including; the method from this fourm and a custom 4.3.3 restore file. Are these the only possible ways? Because I'm having trouble with both. Don't know what I'm doing wrong.

    ReplyDelete
  41. I don't think you can use 4.3.3 custom restore if you don't have 4.3.3 SHSH blobs saved much earlier.

    And if you don't have "gs.apple.com" line, then its good..

    ReplyDelete
  42. WOW omg people keep saying "it's fine if you don't have the gs.apple.com line" BUT ITS NOT FREAKING FINE!!! ALL YOU PEOPLE WHO DO HAVE THE LINE CAN EASILY FIX THE ERROR BY DELETING IT. BUT WHAT IF YOU DON'T HAVE THE LINE TO DELETE??!! THEN HOW THE HELL DO WE FIX THE ERROR HOLY CRAP....

    ReplyDelete
  43. As a double check, make sure you don’t have an entry in hosts file in your computer for gs.apple.com. If you do, comment it out and try the restore process again.

    ReplyDelete
  44. Did you save the 4.3.3 SHSH Blob?

    ReplyDelete
  45. I am glad it helps most of you guys. But I am not sure why others failed...

    ReplyDelete
  46. It worked for me too. I tried to upgrade my JB 4.3.2 to 4.3.5. Some said adding below line with or without "#" at front. Never worked from me.

    74.208.10.249 gs.apple.com
    74.208.105.171 gs.apple.com

    But after I tried to applied "#" on the default "#127.0.0.1 gs.apple.com" , and follow your guideline. I can restore my iphone.

    Thanks for your posting.

    Geng

    ReplyDelete
  47. Damm maan its not working..there is no such gs.apple in my host ....i have an iphon4 trying to update to ios 4.3.5 now i am stuck in dfu mode...my iphones is dead now!!

    ReplyDelete
  48. For those who have problems, please specify your steps and what other measures have you tried. Thanks.

    ReplyDelete
  49. Hello there..

    I have a problem here. Well, i should tell the story from beginning. I have iphone 4 and accidently update it to firmware 4.3.5. And i've been trying to downgrade the firmware to 4.3.3, and i did exactly as what any other web told me to, and left me with this error message. Firstly it says the phone can not be restore cause it's not eligible. and secondly now it says that i have error 1013.

    for that error 1013, i tried to use fix recovery as well as deleting the line 74.105 something, still it's in the recovery state. When i check with tiny umbrella, it says that my iphone still in 4.3.5 firmware, WTH ?

    Can you help me please, since my iphone is a software unlock. It was a jailbreak 4.2.1 before.

    ReplyDelete
  50. same here i too have an iphone 4 while updating to ios 4.3.5 in dfu mode end up with 1013 error..there is no such file as gs.apple in my host .....very tensed now..!!

    ReplyDelete
  51. ok here it goes...i was trying to update to new is 4.3.5 but when the bar in iphone reaced its end it popped out an error 1013...i tried to edit my host file but there was no such file as gs.apple.....

    ReplyDelete
  52. Rahul - are you sure its in DFU mode? or is it Recovery Mode? http://www.ihackintosh.com/2009/06/recovery-mode-and-dfu-mode/

    ReplyDelete
  53. I have almost the exact problem... my iohone 3gs is a unjailbroken, un gs apple, updated to 4.3.5, hasnt been hacked to my knowledge and keeps on getting the 1013 error..... plz help

    ReplyDelete
  54. I can't save it. It'll say "Cannot create the C:\Windows\System32\drivers\etc\hosts file.

    Make sure the path and file name are correct."

    can you help me on this? Thanks.

    ReplyDelete
  55. Adam - did you try Step 4. Type “sudo nano /etc/hosts” (without quotes) and hit return.

    ReplyDelete
  56. Every time I restored iTunes gave error 1013, and the option in TinyUmbrella "Exit Restore Mode" or "Fix Restore Mode" would not work. So eventually I reinstalled iOS4.1 since the Cydia server had my SHSH for it. (being a downgrade from the previous version restored unsuccessfully, DFU mode is required) iTunes still fails with the error 1013, but with iOS4.1 the button EXIT RESTORE MODE in the application TinyUmbrella *DOES* work (unlike with iOS4.3.3 and iOS4.2.1 where the exit restore mode button fails) and my phone is back as it was.

    ReplyDelete
  57. problem....in order to avoid error 3194 i use tinyumbrella, but it adds
    127.0.0.1 gs.apple.com
    #74.208.10.249 gs.apple.com to the host in order to get past the error. Since itunes only reads the host on startup apparently, i either get hit with 1013 error because of my gs.apple in the host or i get hit with the 3194 error. Any fixes?

    ReplyDelete
  58. not success for me anyone can help me on my yahoo id malik_imran_h@yahoo.com

    ReplyDelete
  59. I also faced error 3259 , but i fixed both errors. thanks for sharing this information.

    ReplyDelete
  60. Thanks for sharing this blog, i have been searching solution over this problems and i have tried this and its working.

    ReplyDelete
  61. Great post with nice details. I appreciate you for sharing this valuable information with us through this blog. Thanks. iphone 4 ucuz

    ReplyDelete

ShareThis

LinkWithin

Related Posts Plugin for WordPress, Blogger...