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

mavis

macrumors 601
Original poster
Jul 30, 2007
4,734
1,452
Tokyo, Japan
As many of you know, I've been suffering with ALoD (Apple Logo of Death) issues since July 11th. I've finally discovered the root cause of this problem, as well as a solution. I'm pasting a quote below from "Mandrake" on another forum which explains in some detail why this problem occurs, how it actually can affect ANYONE running 2.0 software, and how jailbreaking is the only known way to recover.

Mandrake said:
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.

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.

After suffering through 40 restores (due to ALoDs) between July 11th and August 15-ish, I haven't had to do a single one since - the reason? I finally got up the nerve to PWN my new iPhone 3G. With OpenSSH installed, recovering from an ALoD event takes just a few minutes, with no data loss or settings lost, nothing - it's VERY easy.

Ironic, isn't it? The only way to avoid having to spend 3-4 hours restoring your phone every time an ALoD occurs is to jailbreak. Put another way: in this situation, the only way to have a functional phone is to void the warranty.

Good job, Apple. :rolleyes:
 

VTMac

macrumors 6502
Jun 9, 2008
270
0
Great explanation, but it's not even close to a design flaw. A design flaw would require redesign and recoding to fix. This will require them to increase the time allowed and/or implement a simple shared synchronization mechanism. It is incredible that it hasn't been fixed in the first to point releases. This should only take someone a day or two at max to fix.
 

mavis

macrumors 601
Original poster
Jul 30, 2007
4,734
1,452
Tokyo, Japan
It is incredible that it hasn't been fixed in the first to point releases. This should only take someone a day or two at max to fix.
Yeah, 'incredible' is a good way to put it. They've had two chances to make this simple fix since July 11th, and yet the problem remains. Apparently they're more concerned about adding new features than fixing major flaws (yes, I'd call any design flaw that renders a mobile phone COMPLETELY UNUSABLE a "major flaw") ...
 

rwd hero

macrumors 6502
Aug 6, 2008
311
0
Baltimore, Maryland
I have never had this problem, actualy now that i think about it i dont have any problems people complain about. No light leak, no dust under the screen, nothing. I must have gotten one that was built on a monday...
 

mavis

macrumors 601
Original poster
Jul 30, 2007
4,734
1,452
Tokyo, Japan
I have never had this problem, actualy now that i think about it i dont have any problems people complain about. No light leak, no dust under the screen, nothing. I must have gotten one that was built on a monday...
No, you DO have this problem. Every iPhone/iPod running 2.0 software has this problem. ;)

If you want to experience it for yourself, make sure your mail is set to either push or fetch, then try installing 50+ apps. When you're done, try deleting one of them (hold the icon until it starts moving, and then press the X in the corner) ... Have fun!
 

PNutts

macrumors 601
Jul 24, 2008
4,874
357
Pacific Northwest, US
Actually, you DO have this problem. Every iPhone/iPod running 2.0 software has this problem. ;)

If you want to experience it for yourself, see above ... Have fun!

Not true. I have seven pages of apps (16*7=112) not counting page 1 of native apps and have occasionally deleted just one. Mail is always set as you specified.

Since there are two million+ phones out there and you claim hundreds have the problem, IMHO since you missed your opportunity to cancel and walk away you should take advantage of some warranty service. (Yes, I'm making more assumptions than usual, but sheeeeeesh.)
 

mavis

macrumors 601
Original poster
Jul 30, 2007
4,734
1,452
Tokyo, Japan
Wirelessly posted (iPhone 3G (white): Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_0_2 like Mac OS X; en-us) AppleWebKit/525.18.1 (KHTML, like Gecko) Version/3.1.1 Mobile/5C1 Safari/525.20)

PNutts said:
Actually, you DO have this problem. Every iPhone/iPod running 2.0 software has this problem. ;)

If you want to experience it for yourself, see above ... Have fun!

Not true. I have seven pages of apps (16*7=112) not counting page 1 of native apps and have occasionally deleted just one. Mail is always set as you specified.

Since there are two million+ phones out there and you claim hundreds have the problem, IMHO since you missed your opportunity to cancel and walk away you should take advantage of some warranty service. (Yes, I'm making more assumptions than usual, but sheeeeeesh.)

Warranty service won't do anything to correct an underlying flaw in the iPhone's OS. Besides, that's one of the first things I tried back in July. ;)
 

PNutts

macrumors 601
Jul 24, 2008
4,874
357
Pacific Northwest, US
Warranty service won't do anything to correct an underlying flaw in the iPhone's OS. Besides, that's one of the first things I tried back in July. ;)


Cool. I thought you might have before going through that much pain. I hope an upcoming update resolves the issue for you.
 

mavis

macrumors 601
Original poster
Jul 30, 2007
4,734
1,452
Tokyo, Japan
Cool. I thought you might have before going through that much pain. I hope an upcoming update resolves the issue for you.
Thanks, but I'm actually not really that stressed about it anymore. Now that I've got OpenSSH installed, I can recover from an ALoD in about three-four minutes with no data loss. I've had enough of Apple dragging their feet on this one. ;)

That said, apparently SJ is aware of the problem and has once again promised a fix. We'll see how it goes.
 

xUKHCx

Administrator emeritus
Jan 15, 2006
12,583
9
The Kop
Thanks for the information, I have been having major problems with this recently having to do it almost constantly and trying different things to get it to to work.

I guess I will have to restore my phone once more so I get openSSH back onto the device so I can use this repair.

At least I now have a slimmed down back up so it should only take an hour to do this time.
 

mavis

macrumors 601
Original poster
Jul 30, 2007
4,734
1,452
Tokyo, Japan
Thanks for the information, I have been having major problems with this recently having to do it almost constantly and trying different things to get it to to work.

I guess I will have to restore my phone once more so I get openSSH back onto the device so I can use this repair.

At least I now have a slimmed down back up so it should only take an hour to do this time.
Glad I could help someone ... ;)

OpenSSH should be the very first thing you install - once that's installed, you can finally put your mind at ease about installing anything else - no more having to restore from ALoDs!! It's very liberating.
 

snverhallen

macrumors 6502a
Oct 17, 2007
566
0
Thanks for all the info, a very interesting read! Yet another but to add to the 2.1 fix list

snverhallen
 

alFR

macrumors 68030
Aug 10, 2006
2,834
1,069
I've finally discovered the root cause of this problem, as well as a solution.

I assume you have submitted this as feedback to Apple?

Ironic, isn't it? The only way to avoid having to spend 3-4 hours restoring your phone every time an ALoD occurs is to jailbreak. Put another way: in this situation, the only way to have a functional phone is to void the warranty.

Good job, Apple. :rolleyes:

Or simply install less apps so Springboard completes on time until they issue a firmware fix. Still, it's more satisfying to have a good rant than to just do something simple to work around the problem, isn't it?
 

xUKHCx

Administrator emeritus
Jan 15, 2006
12,583
9
The Kop
Glad I could help someone ... ;)

OpenSSH should be the very first thing you install - once that's installed, you can finally put your mind at ease about installing anything else - no more having to restore from ALoDs!! It's very liberating.

Well in the things I was try was not having cydia / installer / any non app store apps. So I had to do a restore to get cydia and OpenSSH back on but because the iPhones backup process is quite buggy it has taken about 6 hours to get a working version with everything back on for me to test this out. I really hope it works as it will save me a very long time. I got to the point where my phone was unuseable with any apps on it at all.

Or simply install less apps so Springboard completes on time until they issue a firmware fix. Still, it's more satisfying to have a good rant than to just do something simple to work around the problem, isn't it?

That is not a work around that is just not using the app store and as I said above it was happening with only one app on my phone. And even before it got that bad I had it down to only ~25 apps installed including the factory apps.
 

mavis

macrumors 601
Original poster
Jul 30, 2007
4,734
1,452
Tokyo, Japan
Wirelessly posted (iPhone 3G (white): Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_0_2 like Mac OS X; en-us) AppleWebKit/525.18.1 (KHTML, like Gecko) Version/3.1.1 Mobile/5C1 Safari/525.20)

If you've got OpenSSH installed, you might consider using iBaReS to backup, rather than iTunes. The only disadvantage is that once you're using it, you're kind of locked into it - but it's faster and more reliable than iTunes. ;)

@aIFR: you bet! I've submitted this not only to Apple (through their feedback page) but also directly to Steve Jobs. :D
 

xUKHCx

Administrator emeritus
Jan 15, 2006
12,583
9
The Kop
Finally got to the stage where I could test this out and thankfully it worked; considering how easy it was to trip it up. No more 5 hour restore crap just a 8 minute job. :):):):)
 

vandy1997

macrumors regular
Aug 15, 2007
160
0
Thank you for that fix!! I have had this problem and I know two other people who have had this problem. Those who say that they have no issues are either Apple fanboys or they have not downloaded enough apps directly onto their phones through the AppStore. Your explanation seems reasonable, and since your solution works, that is likely the cause. I thought that it might be due to buggy apps. Thank you for that solution. It will rid me of major headaches and tons of time restoring the phone and reloading the apps! You should send this to Apple and directly to Steve Jobs, because this is a major oversight. This software is way too buggy, but I hope that most of these issues will be fixed with firmare 2.1! (fingers crossed)
 

mavis

macrumors 601
Original poster
Jul 30, 2007
4,734
1,452
Tokyo, Japan
Wirelessly posted (iPhone 3G (white): Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_0_2 like Mac OS X; en-us) AppleWebKit/525.18.1 (KHTML, like Gecko) Version/3.1.1 Mobile/5C1 Safari/525.20)

xUKHCx said:
Finally got to the stage where I could test this out and thankfully it worked; considering how easy it was to trip it up. No more 5 hour restore crap just a 8 minute job. :):):):)

It's a relief, isn't it? Knowing that you can completely recover in less than ten minutes, with no data loss or other I'll effects ... Until Apple fixes this problem, i'm recommending to all my friends that they jailbreak. Just do it in expert mode without that stupid pineapple, and no one (read: Apple) would be any wiser, even if you had to take it in to the shop for some reason.
 

mavis

macrumors 601
Original poster
Jul 30, 2007
4,734
1,452
Tokyo, Japan
Wirelessly posted (iPhone 3G (16GB, 2.0.2 JB'd): Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_0_2 like Mac OS X; en-us) AppleWebKit/525.18.1 (KHTML, like Gecko) Version/3.1.1 Mobile/5C1 Safari/525.20)

vandy1997 said:
Thank you for that fix!! I have had this problem and I know two other people who have had this problem. Those who say that they have no issues are either Apple fanboys or they have not downloaded enough apps directly onto their phones through the AppStore. Your explanation seems reasonable, and since your solution works, that is likely the cause. I thought that it might be due to buggy apps. Thank you for that solution. It will rid me of major headaches and tons of time restoring the phone and reloading the apps! You should send this to Apple and directly to Steve Jobs, because this is a major oversight. This software is way too buggy, but I hope that most of these issues will be fixed with firmare 2.1! (fingers crossed)

I'm glad this was helpful! :)

Has anyone else been able to use this method to recover from an ALoD?
 

Mikey B

macrumors 65816
Jan 4, 2008
1,314
0
the island
Wirelessly posted (iPhone 3G (16GB, 2.0.2 JB'd): Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_0_2 like Mac OS X; en-us) AppleWebKit/525.18.1 (KHTML, like Gecko) Version/3.1.1 Mobile/5C1 Safari/525.20)



I'm glad this was helpful! :)

Has anyone else been able to use this method to recover from an ALoD?

great post. i haven't tried it yet, but an ALoD is always lurking around the corner so i'm sure i'll get the chance!

side note- have you noticed openSSH affecting your battery life much? i remember thinking it was pretty taxing on my 1st gen.
 

xUKHCx

Administrator emeritus
Jan 15, 2006
12,583
9
The Kop
I have successfully used this 3 times already :D

great post. i haven't tried it yet, but an ALoD is always lurking around the corner so i'm sure i'll get the chance!

side note- have you noticed openSSH affecting your battery life much? i remember thinking it was pretty taxing on my 1st gen.

Having only had it installed less than a day I can't give a full answer however in that time it has not decreased by anything more than it normally would. Also when I was on 1.x.x et al. I did not notice any effect on battery life either.
 

mavis

macrumors 601
Original poster
Jul 30, 2007
4,734
1,452
Tokyo, Japan
Wirelessly posted (iPhone 3G (16GB, 2.0.2 JB'd): Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_0_2 like Mac OS X; en-us) AppleWebKit/525.18.1 (KHTML, like Gecko) Version/3.1.1 Mobile/5C1 Safari/525.20)

Mikey B said:
Wirelessly posted (iPhone 3G (16GB, 2.0.2 JB'd): Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_0_2 like Mac OS X; en-us) AppleWebKit/525.18.1 (KHTML, like Gecko) Version/3.1.1 Mobile/5C1 Safari/525.20)



I'm glad this was helpful! :)

Has anyone else been able to use this method to recover from an ALoD?

great post. i haven't tried it yet, but an ALoD is always lurking around the corner so i'm sure i'll get the chance!

side note- have you noticed openSSH affecting your battery life much? i remember thinking it was pretty taxing on my 1st gen.

Actually, no - I haven't noticed any unusual drain since installing OpenSSH, although I wish I could disable wifi during the day when I'm out, since I never use it. But I know that as soon as I turn wifi off, I'll get an ALoD and then my OpenSSH safety net will be worthless. :(
 

mbaran

macrumors regular
Jun 10, 2008
139
15
Wirelessly posted (iPhone 3G (16GB, 2.0.2 JB'd): Mozilla/5.0 (iPhone; U; CPU iPhone OS 2_0_2 like Mac OS X; en-us) AppleWebKit/525.18.1 (KHTML, like Gecko) Version/3.1.1 Mobile/5C1 Safari/525.20)



Actually, no - I haven't noticed any unusual drain since installing OpenSSH, although I wish I could disable wifi during the day when I'm out, since I never use it. But I know that as soon as I turn wifi off, I'll get an ALoD and then my OpenSSH safety net will be worthless. :(

Not true. Download a program called iphone_tunnel.exe. It will allow you to SSH into the iPhone without WiFi using the iTunes mobile device support.

It creates a USB/IP tunnel. It's very neat software.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.