Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

michaeldk5000

macrumors newbie
Original poster
Nov 5, 2007
28
0
Hello,

I was jailbroken on an iPhone 4 running iOS 4.1, but I wanted to unjailbrake the phone and upgrade to iOS 4.2, so I just plugged my phone into iTunes and tried to restore, but got the 1031 error message. Tried restoring several more times without luck, and tried this http://www.maclife.com/article/howtos/iphone_4_update_ios_421_gone_sour_how_fix_itunes_error_1013 guide where you use terminal to edit the host files, but that didn't work either. (Btw, not sure if I was doing it right, on step 6 of the link above, where you enter the # key, is all you do enter it in front of that bunch of numbers? That seemed to work, and so did pressing CONTROL+O to save, but then when I pressed CONTROL+X it didn't seem to do anything.. Am I doing something wrong?

Sorry for being such a noob at this.

Any help is much appreciated.

Thanks,
Michael.
 
Sorry, I forgot to say that I was on a Mac, Snow Leopard

Thanks,
Michael.

Open terminal, Ping to gs.apple.com, post what iP you see on the results.

if you get anything like 74.208.10.249, your host file is pointing to Cydia...YOu need to edit it back to normal.

You should see an IP like 17.151.36.30 or something on that range, which is Apple.

You can Download the MOST recent version of Tiny Umbrella, go to "Advanced" tab and uncheck the box that reads "Set Host to Cydia on Exit.."
 
Thanks...

Attached is a screenshot of terminal..

I have the latest version of tiny umbrella and have unticked that box.. tried restoring again but same message : S

Thanks,
Michael.
 

Attachments

  • Screen shot 2010-12-02 at 19.34.40.png
    Screen shot 2010-12-02 at 19.34.40.png
    25.3 KB · Views: 63
Thanks...

Attached is a screenshot of terminal..

I have the latest version of tiny umbrella and have unticked that box.. tried restoring again but same message : S

Thanks,
Michael.

Well that SS shows that your host files is pointing to 74.208.10.249. you need to commend that.

I really wanted to see te result of a ping to gs.apple.com

Code:
ping -c 4 gs.apple.com

but with that host file I am pretty sure your result will look like this..


PING gs.apple.com (74.208.10.249): 56 data bytes
64 bytes from 74.208.10.249: icmp_seq=0 ttl=46 time=52.360 ms
64 bytes from 74.208.10.249: icmp_seq=1 ttl=46 time=57.741 ms
64 bytes from 74.208.10.249: icmp_seq=2 ttl=46 time=52.283 ms


What you want is to look like this:


PING gs.apple.com.akadns.net (17.151.36.30): 56 data bytes
64 bytes from 17.151.36.30: icmp_seq=0 ttl=238 time=69.578 ms
64 bytes from 17.151.36.30: icmp_seq=1 ttl=238 time=71.189 ms
64 bytes from 17.151.36.30: icmp_seq=2 ttl=238 time=70.360 ms

removing that last line in your host file will do the trick. (tiny Umbrella took care of mine, I just tested it, but maybe you got something else going on holding your host file ranson)
 
Thanks, when you say that Tinyumbrella did the trick, after you unchecked that box, what exactly did you do?

Thanks a lot,
Michael.
 
Restore your iPhone on another computer.

Wow, this is quite the solution when the only problem is one line in a file. Reminds me when my gramps tried to convince me his TV was broken because it was stuck on the wrong input.

Open /etc/hosts in TextEdit and remove any line that contains "gs.apple.com"

or:

Open Terminal

Type: "sudo nano /etc/hosts"

Enter your user password

Use the arrow keys to scroll down to the gs.apple.com line.

Hold down the CONTROL key and tap the K key

Hold down the CONTROL key and tap the X key

Push "Y"

Tap ENTER

Quit terminal
 
Last edited:
This is what worked for me too.

Yes it will work since the other computer won't have the host file change, but is not a solution.

Thanks, when you say that Tinyumbrella did the trick, after you unchecked that box, what exactly did you do?

Thanks a lot,
Michael.

I close it, the checkbox read, set host file "on Exit"

I just tried it again and it seen to work flawlessly, I open TU, check that box, close it and my ping point to Cydia, open TU again, uncheck the box, close it and my ping is back to Apple. It should work for you as i said unless you got another program running that is holding your Host file open
 
Thank you for all of your help everyone, I guess I successfully managed to change that line in terminal in the end. Just restoring all of my data in iTunes now.

Thank you again!
Really appreciate it.

Michael.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.