How to fix an iPod/iPhone, stuck on the boot logo, with no white boxes!!!

Discussion in 'iPod touch' started by P0150N0U5 F15)-(, Sep 1, 2008.

  1. P0150N0U5 F15)-(

    P0150N0U5 F15)-( Banned

    Joined:
    Dec 21, 2007
    Messages:
    852
    Likes Received:
    7
    How to fix a 2.0 - 2.02 iPod/iPhone, stuck on the boot logo, with no white boxes!!!

    I found this on Hackintosh, and it make for a very interesting read. If not for the the fix, but for the huge bug itself!

    ---

    Hi All,

    I wanted to email this to someone from the iphone dev team for some feedback and discussion before posting but as I don't know how to contact them I'll post my findings to date here, and hopefully anyone else working on this problem can share their findings too.

    Until Apple fixes it properly, I think I have a workaround for the infamous "Hangs on Apple Logo after installing/updating apps and needs restore" and an explanation of the root cause.

    This is the problem where after a crash or restart during app install/update/uninstall the device will get stuck on the Apple (or pineapple ) boot screen and either spontaneously reboot after a while, or "freeze" requiring a two fingered reboot. On my ipod touch when this freeze occurs the display dims to half brightness and the unit is no longer pingable over wifi.

    Usually you get stuck in a loop where no amount of forcibly rebooting will recover the device and you have to restore.

    Here's the explanation: When the 3rd party application state changes, Springboard "regenerates the application map" which you can see clearly if you watch the system log with the iPhone Configuration Utility.

    (Available here: http://www.apple.com/downloads/macos...formacosx.html )

    This can take some time. The more and/or bigger applications you have installed, the longer this takes. This regeneration process happens ANY time a change to installed applications occurs.

    Here's the problem - Springboard is watched by a watchdog process which is handled by configd. The location of the watchdog and it's configuration files is /System/Library/SystemConfiguration/mobilewatchdog.bundle

    The watchdog constantly monitors Springboard, and if it doesn't respond at least once every 2 minutes, it is killed and forcibly restarted. If this happens approximately 4 times, the watchdog will attempt to reboot the device, but it usually just freezes the system with the half brightness apple logo.

    The problem occurs when the number and/or size of applications installed causes a regeneration of the application map to take longer than 2 minutes - it becomes impossible for Sprinboard to complete the task before it is forcibly killed by the watchdog. It will try again the next time and run out of time and be killed again. Hence stuck at the boot screen until doing a restore.

    It is unbelievable that Apple allowed this design flaw, yes design flaw, not bug go out into the wild and it still hasn't fixed it in 2.0.1. Clearly the watchdog arrangement was put in place before 3rd party application support, and none of the programmers considered the possibility of Springboard taking more than 2 minutes to regenerate the application map.

    So, how to recover from being stuck at the apple logo without doing a full restore wiping everything ? If you have openssh installed so you can log in remotely you can fix it quite easily, as you get nearly 2 minutes of ssh access during the apple logo before the system freezes where you can log in for "emergency surgery".

    If you don't have OpenSSH already installed then sorry, it's restore time...

    As the device is trying to boot up but still at the apple logo, try to log in as root using ssh. You should find you are able to log in soon after the device is pingable on your wifi network, and you have a few minutes to complete the following steps in time.

    For example from a mac, log in with:

    ssh -l root 192.168.1.103

    Where your iphone/ipods own ip address is substituted.

    First we will disable the watchdog timer (by temporarily moving its files elsewhere) and then reboot:

    mv /System/Library/SystemConfiguration/mobilewatchdog.bundle/ /
    reboot

    After a few seconds the device will start to reboot, and after approximately 3-6 minutes (depending on how many apps you have installed) you will reach the lock screen as normal, when that happens we now have to re-enable the watchdog timer, and reboot again, so again log in with ssh, and type:

    mv /mobilewatchdog.bundle /System/Library/SystemConfiguration/
    reboot

    You should find your iphone / ipod touch will reboot normally a second time.

    The reason this is a workaround is because you CAN'T leave the watchdog disabled, because as well as monitoring Springboard and killing/restarting it, the watchdog also has to periodically reset the HARDWARE watchdog, if this doesn't happen the device will spontaneously reboot. The hardware watchdog is 10 and a bit minutes, so without the watchdog installed and working your device will reboot itself every 10 minutes.

    If anyone knows how to contact or draw this message to the attention of the dev team I have an idea for a simple patch that they could apply to the watchdog as part of the Pwning process (or as a Cydia package) that would for all intents and purposes solve this problem until Apple gets around to fixing it properly. Please send me a PM.

    I see Firmware 2.0.2 has just come out so it is possible it has fixed this problem, but my gut feeling is that they probably haven't and I won't be trying 2.0.2 to find out until it is Pwnable

    Note: This same issue is the reason why after installing apps with Cydia the system will sometimes freeze. As far as I can tell Cydia is NOT to blame - what Cydia does is tells Springboard to regenerate the application map, and it is that application map regeneration that triggers the problem - Springboard becomes unresponsive for extended periods of time, the watchdog process starts trying to kill Springboard, and all hell breaks loose...this procedure will also recover from that situation.

    The reason Installer.app doesn't trigger this problem is it doesn't tell Springboard to regenerate the application map - it just kills Springboard and allows it to launch again.

    ---

    The bottom line, is that you should only install stuff at home, when you are free to shh!

    Notes: If you lose the folder altogether, then you are probably rebooting before the move has taken place. It may be overkill, but allow 15 seconds after commands before rebooting!

    ZOMFG, my thread is on !!!TUAW!!!

    IF you want to install something when away from acces to ssh, then I suggest moving the file before you leave, and then getting TouchCMD, made by Gojohhnyboi, which can save terminal commands and execute them. Enter the movement command for both ways, and then, if you crash and reboot, just move it back, reboot, move it again, and then you are set up again for future crashes. Make sure you enter the command very carefully, as TouchCMD doesn't display error messages, and it may move it to a directory that you can't find later!
  2. Parrappa

    Parrappa New Member

    Joined:
    Oct 21, 2007
    Messages:
    624
    Likes Received:
    3
    I don't have OpenSSH Installed because I'm on an unjailbroken 2.02. I'm stuck at the Boot Screen after trying to install an app via the App Store. If I have to restore one more time, I'm going to lose it. I can't even believe I purchased a device from Apple that renders itself useless. This is complete BS.
  3. ricardofelix95

    ricardofelix95 Banned

    Joined:
    Mar 16, 2008
    Messages:
    2,702
    Likes Received:
    4
  4. 10teamb

    10teamb New Member

    Joined:
    Apr 27, 2008
    Messages:
    8
    Likes Received:
    0
    wow this is a great guide. really in depth. the only problem i have is that i run your first command and it moves it. i think. and i reboot and it goes to lockscreen. then i ssh again and run your second command, and it says something about not being able to find watchdog. wtf?

    EDIT: I retried it and everything seemed to work, i even checked that it moved the watchdogbundle and to my lockscreen, but after i moved it back im stuck on my boot logo again...im quite frustrated

    Please Register or Log in to view images

    Please Register or Log in to view images

    Please Register or Log in to view images

    Please Register or Log in to view images

    Please Register or Log in to view images

    Please Register or Log in to view images

    Please Register or Log in to view images

    Please Register or Log in to view images

  5. tareeko

    tareeko New Member

    Joined:
    Feb 23, 2008
    Messages:
    1
    Likes Received:
    0
    It works!... only when disabling. However, when I reenable (step 2 of your fix) it gets stuck again. So I can only use my iPhone in 10 minute intervals

    I'm very impressed with this solution though and I hope you could find a way to make it work for us.
  6. Ryan

    Ryan Well-Known Member

    Joined:
    Jan 19, 2008
    Messages:
    4,129
    Likes Received:
    28
    Device:
    Nexus 4
    hmm problem is... my ipod changes ip adress every time it connects... so im gunna have to go though finding it on the wifi then?
  7. P0150N0U5 F15)-(

    P0150N0U5 F15)-( Banned

    Joined:
    Dec 21, 2007
    Messages:
    852
    Likes Received:
    7
    I will try and answer all your problems. I have had the same problem as tareeko and 10teamb. I think it may be easier to do it via a visual ssh viewer, and keep a second backup on another directory. Looking at it, I see no reason for the file to get lost in the transfer. If any of you need the file I can upload it here. As for thehitman, just go into setings, wifi, touch the blue circle and chevron to the right of the network SSID, and when you scroll down, you can change it to 'static'. This stops the ip from changing. Alternatively, you can login to your router probably via 192.168.0.1 . You will then be able to check the ips currently registered on the network, narrowing down the choices.

    I got the impression that some of you thought I wrote the Guide, however, it was written by Mandrake, from Hackint0sh.
  8. Steaps

    Steaps New Member

    Joined:
    Oct 24, 2007
    Messages:
    5,074
    Likes Received:
    41
    Device:
    iPod touch
    Woooo! We got on TUAW!
  9. Numb

    Numb Member

    Joined:
    Feb 18, 2008
    Messages:
    946
    Likes Received:
    14
    Device:
    iPhone 5 (Black)
    wow this needs to be stickied! thanks man
  10. brisingr

    brisingr New Member

    Joined:
    Jun 25, 2008
    Messages:
    1,290
    Likes Received:
    0
    shame apple. shame.
    -steve jobs

Share This Page