Fix iPhone Error 1013

By , Mar 12, 2011

Yesterday Tina decided it was time to update her iPhone firmware. It was probably the first software update she did since she got her iPhone 4, months ago. Because she doesn’t need or even care about a jailbreak, her iPhone is clean. No jailbreak.

I was watching South Park when I heard her voice from upstairs: “honey, I have a problem, it’s saying something about error 1013“. Damn you, iPhone, for disturbing me while watching disturbing TV shows!

I had had this error 1013 before so I was confident it would be a one-minute fix…

As expected, iTunes was throwing the following error message: The iPhone “Tina’s iPhone” could not be updated. An unknown error occurred (1013). Just to make sure, I go through the restore process one more time, which takes 5-10 minutes and end up with the same error message.

Next step was downloading iReb, which didn’t do anything. Next step was downloading TinyUmbrealla, which didn’t do anything either. Without anymore ideas, I decided to Google the error, which took me to this thread on Apple’s forums.

After following the simple instructions detailed below, I was able to finally restore Tina’s iPhone.

On Mac:

  1. Open Finder
  2. Hold down COMMAND + SHIFT keys and press ‘G’
  3. Enter “/private/etc/” in the field and press “Go”
  4. Find “hosts” file in the directory
  5. Drag the file to your desktop
  6. Open it in a text editor
  7. Remove the line that has gs.apple.com entirely or put a # at the beginning of it to comment it out
  8. Save the file
  9. Drag it back to the /private/etc/ folder.

On Windows:

Locate the hosts file in one of the following directories:

Windows 95/98/Me c:\windows\hosts
Windows NT/2000/XP Pro c:\winnt\system32\drivers\etc\hosts
Windows XP, Vista, 7 c:\windows\system32\drivers\etc\hosts

  1. Right click and click on “Open With…” and then click on “Notepad” on the list.
  2. Remove the line that has gs.apple.com completely and save the file.

This whole operation took me a good 30 minutes, but most importantly, I missed one of my favorite South Park episodes, the one with the Dog Whisperer.

But, the best part of it was that I became the “hero” who once again fixed the iPhone.

  • Share:
  • Follow:
  • Chucks

    WHEN DO YOU DO THIS BEFORE YOU START THE UPGRADE OR WHEN IT HANGS UP?????

  • Kevin

    Hi, I have the same 1013 error, I have used TinyUmbrella and iREB to kick it out of recovery loop or 1013 error, nothing is fixed, I even follow your instruction to edit the host file without gs.apple.com line, it also comes with the same error message. Please help.

  • KakiPerempuan

    Kevin : transfer temporary Original “hosts” file @ desktop..
    and .. transfer temporary Copy “hosts” (notepad) to etc folder.

  • Kevin

    It did not work or make any difference by doing that, I was able to restore using custom 4.2.1 IOS but the weirdest thing is I cannot upgrade to the custom IOS 4.3.1 or above that, even though I already add gs.apple.com and have it point to saurik server. Any idea how to upgrade the firmware w/o upgrade the baseband?

  • Peter

    I love you man, thanks!

  • Barl3y

    I can’t thank you enough,

    I’m working away from my family for a few years and we rely on having FaceTime to talk to each other.
    I nearly had a heart attack when my phone stopped working.

    It is now restoring everything and is back to working order.

    You are a lifesaver my friend……

  • Tommy Godbold

    You are the man….Yeah!!!!!!!!Worked like a champ….Love ya….

  • taylor

    Im having the same problem. can not get past the error message in itunes. keeps telling me that this iphone could not be restored. this device isn’t eligible for the requested build. I tried doing the finder thing could not find the file. what to do?

    • kelly

      Hey I’m having the same problem, can’t seem to find the host file. Were u able to fix your phone? mine is frozen at loader screen.

      I’ve been without my phone for 3 days now. help me =)

    • http://N/A **AzN_NiNjA01**

      read my post and you will be set

  • Trevor

    F’ing life saver. Thank you!

  • http://www.iphonekingz.com/ GAROURO

    bro what if mi file has two .gs.apple.com files

    • http://uscomputergeek.com Kevin nguyen

      Delete one of the gs.apple.com line or put a # in front of it to comment it out. Otherwise try to use custom IOS, it should works.

  • http://www.iphonekingz.com/ GAROURO

    Yo bro it didnt work for me, any advice on that?

  • Michael

    I had the same problem, trying to update to 4.3.3 from a jailbroken 4.2 on my iPhone 4.

    Your instructions where the only thing that worked for me!

  • Chuck

    When do you you alter the file, before upgrade or after it hangs up someone answer please
    Chuck

    • http://uscomputergeek.com Kevin nguyen

      You alter before install any IOS.

    • Chuck

      Thank you!!!!

  • mike

    Thank you very much!! you saved my iphone!!

  • kelly

    When I get to text edit host it doesnt have the gs.apple.com.file, It shows

    ##
    # host database

    etc etc.

    What should do?

    Please Help!!

  • kelly

    When I get to text edit host it doesnt have the gs.apple.com.file, It shows

    ##
    # host database

    etc etc.

    What should do?

    Please Help!!

  • Caroline

    Kelly,
    The “hosts” file is in a directory called
    C:\WINDOWS\system32\drivers\etc
    or
    C:\WINXP\system32\drivers\etc
    or something alike.

    you can edit it with notepad. Start notepad and drag “hosts” into it.
    It is sufficient if there is one uncomment in it like:

    127.0.0.1 localhost

    All other lines may be commented by preceding it with a #

    Then update your iPhone. That should work.

  • Nebo1ss

    I said it before in an earlier post and I will say it again. No need to mess with host files, fix the problem at it’s source.
    Your host file is messed up because you ran Tiny Umbrella. Use TU to fix the problem as follows.

    Open Tiny Umbrella, go to advance mode, uncheck the box that says “leave host file to Cydia on exit” close Tiny Umbrella.

    That will put your host file back to normal, and is a better long term solution. Modifying the host file directly will only be good until you next run TU,

  • edi

    I am sorry its not working at all

  • Kalie

    What if there is no gs.apple line

    • Aaron

      Hi are u able to solve your problem?
      i got the same problem as u… and i dun have any gs.apple line

  • Nebo1ss

    Then you don’t have this problem. You have some other problem.

  • Alyah

    You saved my life! Thank you!

  • Fabian

    Yes, was some where in my Mind, but i found You.
    Thanks

    PS:
    Allways needs to be checked after System-Updates

  • wink

    omg thanks man it worked

  • OMAR

    downgrade to 4.2.1
    recovery screen will appear
    jailbreak using GREENPOIS0N !!!

    NOTHING ELSE WORKED !

  • iphonefixer

    hey man i had d same problem you will have to first run tinyumbrella dont launch the server and make sure u uncheck set host to cydia on exit and request shsh from cydia than run ur ipad in dfu mode once in dfu mode run itunes and slect shift plus restore option it will install and if it gives error 1013 thats k dont worry abt it, if u get 1013 error selct ur ipad or iphone from tinnyumbrella and click on exit recovery mode it will keep on asking u to connect to itunes just dont run itunes just use the redsnow 0.9.6rc16 untethered jailbreak and choose only install cydia option just follow the instruction on the jailbreak once it starts installing jailbreak it will hang on green progress bar rite close to the end just press power and home button together and then it should restart and if it doesnt just hold the power button it will power up and there u go ur ipad or iphone will run with a fresh new firmware you will have to coonect it to itunes again to setup for first use

    • Frank

      You’re awesome.

      Mine was stuck with the itunes (after getting error 1013). Since i’ve the ssh saved for 4.3.1
      I kept trying to get it into Recovery Mode. and with redsnow 09.6rc16 after 3 tries. it worked and it began installing (the running pineapple came into view).
      Got stuck in Installing Activation Bundles but i’m told this is normal. I’ve to wait for 10-20 minutes, and it’ll be in recovery mode. then I’ll kick it out using tinyumberla and it should be fine.

      Thanks a bunch

  • Steven

    I have restored just hitting the restore in itunes. I tried all of the above and nothing, please help!

  • GoogleMan

    Thanks man, I love you sooooooooooo much. It Fixed my problem ;)

    I appreciate your good work

  • zost23

    i did all the above, but i cannot fix it
    still error 1013
    redsnow cannot recognise specified ipsw

  • AB

    i did exactly step by step but the gs.iphone line is keep coming in the host file and it giving the erorr 1013…
    Please need help

  • Davill

    Your a blessing man! worked

  • dave

    Hi all.

    I had the 1013 error, have never Jailbroken my phone.

    Udating the firmware casued it to go into recovery mode and got stuck in the 1013 error loop.

    Tried editing the Host file, new computer, itunes re-install, different USB port, anti-virus off etc, NOTHING was working.

    Just as I was tempted to launch it at some unwitting object/person, cancel my contract and defacate on Apple’s porch, I managed to sort it purely by restoring my phone without the sim card in.

    No idea why, dont know why i havnt seen it mentioned before either. Hopefully it may help some of you in the same situation.

    Thanks

  • http://idownloadblog.com Steve Jobs

    Thx I’ll try it out

  • http://idownloadblog.com Steve Jobs

    I have two gs.apple.com stuff

  • rahul

    the sim card thing didnt wiork for me…was updating iphon4 in dfu mode..now ends up with 1013 error no such gs file in my host..!!

  • nofx1900

    WORKS!! THANKS!

  • Graham

    Thank the lord for people like you. Very smart. I thought I lost my $650 iPhone… Until now! Noice!

  • Mon

    Hi bro, I have the same problem, but my host file do not have the line gs.apple.com
    So what should I do? Thanks

  • iPhone Wrecker

    Perrrrrrrfect!!!!!! Much obliged!!!! You’re great!!

  • Gmaine

    beautiful, this work for me.

    ok here is what to do if you guys come across this
    right click notepad and run administrative mode
    then go to C:/ > windows > windows32 > drivers > etc > host
    drag host into the notepad

    you will see this

    # Copyright (c) 1993-2009 Microsoft Corp.
    #
    # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
    #
    # This file contains the mappings of IP addresses to host names. Each
    # entry should be kept on an individual line. The IP address should
    # be placed in the first column followed by the corresponding host name.
    # The IP address and the host name should be separated by at least one
    # space.
    #
    # Additionally, comments (such as these) may be inserted on individual
    # lines or following the machine name denoted by a ‘#’ symbol.
    #
    # For example:
    #
    # 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
    74.208.10.249 gs.apple.com

    just delete gs.apple.com and do the restore
    this is what i did and it fixed the problem

  • http://N/A **AzN_NiNjA01**

    Forget everything about restoring to factory. If you are using Tinnyumbrella, make sure to go to advanced and check the update baseband to current. Of course it will update the baseband but you will have 4.3.3 firmware and jailbreak it using jailbreakme.com This works 100% had tried it on three iphone 4 and it all works with the update baseband checked, if you don’t, you will get the error 1013!!

  • http://www.fixiphone.me iPhone

    you can ob windows by iReb

  • ImKX

    yeah!…it’s work perfectly!

  • bananamonkey

    THANK YOU THANK YOU THANK YOU.

  • http://elcarter.com Carter Barrett

    theres no host folder in mine. help. (windows xp) i went to C:\WINDOWS\system32\drivers and there was no hosts file.

  • tee

    Thank You, I was about to throw my at the wall.

  • Angel

    Thank you a gazillion. it worked. you just saved my new iphone

  • http://www.facebook.com/knile.yo Knile Tkisla Kkre

    and I get 3194 error