How to fix error 1004??

Discussion in 'Jailbreaks and iOS Hacks' started by gravytrain84, Nov 4, 2010.

  1. gravytrain84 macrumors 6502a

    gravytrain84

    Joined:
    Jun 24, 2010
    Location:
    LA
    #1
    Can someone please explain how to fix this problem? It's not a major problem having to use TU to kick out of recovery mode but I would like to fix whatever is causing this. I read a few things about editing host files but I have never edited them on this computer.. Thanks in advance. :D
     
  2. dhlizard macrumors G4

    dhlizard

    Joined:
    Mar 16, 2009
    Location:
    The Jailbreak Community
    #2
    You cannot fix it. Since iTunes doesn't get the message the the baseband was updated, it doesn't know the upgrade is complete, therefor it flags an error.

    It has nothing to do with host file.
     
  3. gravytrain84 thread starter macrumors 6502a

    gravytrain84

    Joined:
    Jun 24, 2010
    Location:
    LA
    #3
    I know enough to get by but far from an expert, can you explain this to me lol. The JB causes this?
     
  4. dhlizard macrumors G4

    dhlizard

    Joined:
    Mar 16, 2009
    Location:
    The Jailbreak Community
    #4
    During the upgrade, iTunes looks for a signal that the restore/upgrade is complete, including baseband replacement. When it doesn't get that, it flags the error believing the process failed to complete.
     
  5. gravytrain84 thread starter macrumors 6502a

    gravytrain84

    Joined:
    Jun 24, 2010
    Location:
    LA
    #5
    Thanks for explaining. I was freaking out today, I had an genius bar apt to replace my phone and I could not restore, even with TU.. I eventually got it to work.
     
  6. Cap41 macrumors 6502

    Joined:
    Nov 19, 2008
    #6
    The issue is with your host file. It needs to be edited.

    Once you run TU it comments out #gs.apple.com 127.0.0.1 which is show as the number sign in front of the line. Basically it tells the the computer to skip this operation.
    TU adds a line gs.apple.com. 78.xxx.xxx.xx the number i am not sure. but it is the only other line in the host file that shows gs.apple.com.

    What is happening is on restore Itunes is now pointed to another server. It no longer points to apple to sign off on the new FW.

    You can simply remove the comment. and delete the other line. reboot. your good to go. You can delete both lines if that doesnt work. Because as soon as you us either Itunes, or TU it will add the line back in.

    THere are some instruction on iclarified and here on how to edit your host file. It depends on if you are using a mac or PC.

    on mac go to finder/ menu go/ go to folder/ then type /etc in that folder look for hosts file. open with txt. YOu have to save the amended file to desktop then drag it back into /etc you cannot just edit. It has to be replaced.
     
  7. dhlizard macrumors G4

    dhlizard

    Joined:
    Mar 16, 2009
    Location:
    The Jailbreak Community
    #7
    @gravytrain If this is happening when you are doing a simple restore using only iTunes and a stock Apple IPSW, @Cap41 is correct.

    For some reason, (and it was a bad assumption on my part), I was believing you were using a JB tool when receiving these errors. I guess cause this is the iPhone hacks section after all.

    Sorry if I misled you !
     
  8. nebo1ss macrumors 68030

    Joined:
    Jun 2, 2010
    #8
    Tiny umbrella edited your host files and Tiny Umbrella can put them back to normal. Just open Tiny Umbrella, go to advance mode and uncheck the box where it says set host file to Cydia on exit. Then close Tiny umbrella and bingo everything is back to normal. Unless you do this the host file edit will keep happening everytime you open tiny umbrella.
     
  9. scirica macrumors 68020

    scirica

    Joined:
    May 13, 2008
    Location:
    Dallas, TX
    #9
    I made the same assumption ;)
     
  10. nebo1ss macrumors 68030

    Joined:
    Jun 2, 2010
    #10
    Interesting explanation but wrong. The 1004 error is caused because the baseband needs to be signed and the signing failed.
     
  11. scirica macrumors 68020

    scirica

    Joined:
    May 13, 2008
    Location:
    Dallas, TX
    #11
    I learn something here every day. I didn't realize TU could edit and "unedit" the hosts file!
     
  12. tempusfugit macrumors 65816

    Joined:
    May 21, 2009
    Location:
    Chicago
    #12
    Wow, instead of reading the TU documentation and readme you almost went into an apple store.

    Do you understand the irony? Your laziness almost created a whole lotta work for you.

    It's ridiculous to come here and complain about error 1004 when clearly this is what people want to see when restoring with TU.

    RTFM, seriously.
     
  13. fabian9 macrumors 65816

    fabian9

    Joined:
    Nov 28, 2007
    Location:
    Bristol, UK
    #13
    Unfortunately, I think there is more to the story. I recently tried to restore to 4.1 using iTunes, no jailbreak involved and it keeps giving me this error. I have restored the hosts file but it still does it.

    The only way for me to restore now is to boot into windows and restore there, it's annoying the crap out of me.

    I think I'll have to completely re-install my machine in order to be able to restore my iPhone in OS X again, because it's clearly not just the hosts file and I can't figure out what else might be causing it.
     
  14. nebo1ss macrumors 68030

    Joined:
    Jun 2, 2010
    #14
    You are booting into windows to restore because your host file there has not been edited. Read a few post above about unchecking set host file in tiny umbrella and you will find it solves your problem. Your host file has been modified on the mac a simple check is to open a terminal session on the desk top and type in the following command.

    ping gs.apple.com

    if it comes back saying 127.0.0.1 that is correct for apple
    if it says 74.208.10.249 then you are pointing to cydia.
     
  15. fabian9 macrumors 65816

    fabian9

    Joined:
    Nov 28, 2007
    Location:
    Bristol, UK
    #15
    It says neither, what it says is:

    64 bytes from 17.112.176.11: icmp_seq=0 ttl=239 time=162.678 ms

    I'm trying to restore my iPhone right now to 4.1 just because it bothers me so much that I'm going to a worse OS just to restore. So I'd like to solve this problem… not working at the moment.

    Is the line in the host file with 127.0.0.1 meant to be hashed out or not?
     
  16. dhlizard macrumors G4

    dhlizard

    Joined:
    Mar 16, 2009
    Location:
    The Jailbreak Community
    #16
    Thanks ! I feel less of an urge to slap myself now !
     
  17. fabian9 macrumors 65816

    fabian9

    Joined:
    Nov 28, 2007
    Location:
    Bristol, UK
    #17
    I'll answer that myself, if I unhash the 127.0.0.1 line, iTunes crashes out of restore right away saying that the update server can't be found. So I'm guessing that line has to be hashed out.

    The IP found in my previous message is an apple server, so that seems to be alright. the restore process still doesn't finish though and crashes out after a long long time.
     
  18. nebo1ss, Nov 5, 2010
    Last edited: Nov 5, 2010

    nebo1ss macrumors 68030

    Joined:
    Jun 2, 2010
    #18
    127.0.0.1 is the apple server and should not normally be hashed out. Since you are in the UK maybe you are using a different server.

    Since you say windows work, then the only other suggestion I have is to check the host file on windows and compare with the MAC host file and see what is different. Perhaps windows is using a different apple server.
     
  19. fabian9 macrumors 65816

    fabian9

    Joined:
    Nov 28, 2007
    Location:
    Bristol, UK
    #19
    127.0.0.1 is the IP for localhost as far as I know.

    For the purposes of anybody else coming across this thread, I have worked it out now.

    hosts file should have either no entries to do with gs.apple.com, or both hashed out.

    My problem was not only that the hosts file was messed up, but also that I had wifi-sync installed previously. Uninstalling wifi-sync solved the restore problem.

    thanks for all your input!

    restoring from backup now… :)
     
  20. nebo1ss macrumors 68030

    Joined:
    Jun 2, 2010
    #20
    Well that broad statement might be true in the non-jailbreaking world but in the jailbreaking world we use the HOST file to decide where we want to get the restore from. We point it at apple 127.0.0.1 when we want a standard restore from apple and we point it at Cydia when we want previous versions of software for which Cydia has our SHSH files.
     
  21. gravytrain84, Nov 5, 2010
    Last edited by a moderator: Nov 5, 2010

    gravytrain84 thread starter macrumors 6502a

    gravytrain84

    Joined:
    Jun 24, 2010
    Location:
    LA
    #21
    Wow... Major fail on your part.. I was taking my phone to the apple store before any of this due to hardware issues, which is WHY I needed to restore.
     
  22. Cap41 macrumors 6502

    Joined:
    Nov 19, 2008
    #22
    No need to throw stones. We all come here to be helped, and to help others out. Somethings you find difficult I may find to be rather easy, and vic versa.

    Just help, or stay out of thread. You provide nothing except a waste of bandwidth.
     
  23. fabian9 macrumors 65816

    fabian9

    Joined:
    Nov 28, 2007
    Location:
    Bristol, UK
    #23
    Yes, but 127.0.0.1 is NOT an apple server, it's the IP address for localhost, on just about ANY computer.

    http://en.wikipedia.org/wiki/Localhost

     
  24. gravytrain84 thread starter macrumors 6502a

    gravytrain84

    Joined:
    Jun 24, 2010
    Location:
    LA
    #24
    Should I only do this when needing to restore, and otherwise, leave them as TU has them?
     
  25. Cap41 macrumors 6502

    Joined:
    Nov 19, 2008
    #25
    It really doesnt matter. Just don't forget when restoring.
     

Share This Page