Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Error 1004 while trying to restore my iPhone 4

So I wanted to restore my iPhone 4 cause it wouldnt sync my apps and now every time I connect my phone to the itunes it keeps giving me the error 1004 during the restore."The iphone "Iphone" could not be restored. An unknown error occured (1004)." 😟 does anyone know what should I do?

iPhone 4, iOS 4

Posted on Jun 26, 2010 12:23 PM

Reply
68 replies

Jun 27, 2010 9:17 AM in response to KGeeOne

That's exactly why you're having an issue. At some point you modified your HOSTS file and you don't even remember. Or someone else did it for you. Regardless, that line with gs.apple.com should not be there.

- Drag the file to your desktop
- Open it in text editor
- Remove the line entirely or put a # at the beginning of it to comment it out
- Save the file
- Drag it back to the /private/etc/ folder.
- You'd need to enter your username and password to authenticate the move

Try restoring now.

Jun 27, 2010 10:06 AM in response to KianABC

KianABC, YOU BE DA MAN!!! I did exactly what you posted and it worked and my phone is back. I'm new to all of this and thank you so much for even answering my post. If you are ever in the southern California area, email me and I'll buy you a coffee or a beer. You are a life saver. Thank you very very much. No where could I get information on this. I know there are others out there with new iPhones going through the same exact thing. Phew!!!

Jul 1, 2010 2:45 PM in response to KianABC

More complete solution for those not knowing where to find the file:

On Mac:
* Open Finder
* Hold down COMMAND + SHIFT keys and press 'G'
* Enter "/private/etc/" in the field and press "Go"
* Find "hosts" file in the directory
* Drag the file to your desktop
* Open it in text editor
* Remove the line that has gs.apple.com entirely or put a # at the beginning of it to comment it out
* Save the file
* Drag it back to the /private/etc/ folder.
* You'd need to enter your username and password to authenticate the move

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
* Right click and click on "Open With..." and then click on "Notepad" on the list.
* Remove the line that has gs.apple.com completely and save the file.


This should work fine.

Kian

Jul 1, 2010 2:48 PM in response to KianABC

What if my hosts file looks like this? I have my phone all setup, but I'm willing to lose it all just to be able to restore from my 3GS backup...I really want the field test dB meter instead of the reception bars.

##
# 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
127.0.0.1 activate.adobe.com
127.0.0.1 practivate.adobe.com
127.0.0.1 ereg.adobe.com
127.0.0.1 activate.wip3.adobe.com
127.0.0.1 wip3.adobe.com
127.0.0.1 3dns-3.adobe.com
127.0.0.1 3dns-2.adobe.com
127.0.0.1 adobe-dns.adobe.com
127.0.0.1 adobe-dns-2.adobe.com
127.0.0.1 adobe-dns-3.adobe.com
127.0.0.1 ereg.wip3.adobe.com
127.0.0.1 activate-sea.adobe.com
127.0.0.1 wwis-dubc1-vip60.adobe.com
127.0.0.1 activate-sjc0.adobe.com
::1 localhost
fe80::1%lo0 localhost


192.168.1.2 ethan.ethan.com myhost
127.0.0.1 localhost ethan.ethan.com

Jul 16, 2010 11:17 AM in response to salar Barekatain

This did not solve the issue for me. I am trying to update to 4.0.1

My hosts file says

# 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

I also tried it with the second to last line completely removed, so it was

# 127.0.0.1 localhost
# ::1 localhost

Any other thoughts?

Error 1004 while trying to restore my iPhone 4

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.