Discuss Workaround for 2.0.x stuck at apple logo after installing apps at the PwnageTool - Hackint0sh.org; Hi All,
I wanted to email this to someone from the iphone dev team for ...
Workaround for 2.0.x stuck at apple logo after installing apps
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/ /
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/
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.
Last edited by Mandrake; 08-19-2008 at 08:22 AM.
I have been able to recover from being stuck at the Apple screen after a Cydia install by repeatedly rebooting the device whilst connected to iTunes. Plug it in and switch it on, it will sit there for a while vibrating every now and then, then it will dim to the half brightness Apple logo. When this happens force another reboot by holding home and sleep and repeat the process. It takes a couple of cycles but this usually gets me back to the lock screen after a while.
The important thing seems to be that it is plugged into iTunes, I have tried this method without and got nowhere.
Edit: This method just worked again - I was stuck on the Apple logo after installing scrobble, it took 4 or 5 boot cycles but it broke out of the loop again.
Last edited by ximon; 08-19-2008 at 04:16 PM.
Originally Posted by ximon
I tried this all night - doesn't work!
Of course is not Cydia, jailed iPhones have similar problems with AppStore apps
Originally Posted by Mandrake
Pwned OOTB 1.1.1 iPhone 8 Gb
FW 3.1.2, Jailbroken, Neutered, Unlocked (on AT&T)
Mac OSX 10.6.3, iTunes 9.1.1
Thank you so much
This worked perfectly. Thank you so much. I can finally customize my phone and now I have a way to fix the apple freeze if it happens without having to restore. Thanks again. Your the man!!!
That sometimes works for me, sometimes doesn't. If you have a lot of Appstore apps installed it no longer works.
Originally Posted by ximon
Yeah I understand that - I was mentioning it because I've seen threads of people talking about Cydia freezing, but it's actually this problem that triggers it...
Originally Posted by Marco60
Glad to be of help - I've recovered my ipod touch probably close to 30 times this way successfully without having to do a restore, because I have a lot of Appstore Apps installed, some of them very big like Super Monkey Ball, I can't seem to install or uninstall apps without running into problems at least 50% of the time.
Originally Posted by jberk17
If I never add or remove apps the device is nice and stable, but trying to install an app especially via the built in Appstore application is like spinning a roulette wheel, as to whether I'll end up stuck on an Apple Logo or not.
Also I'm now running 2.0.2 - it does NOT fix this issue. From what I'm hearing it wont be fixed until 2.1 at the earliest, some time in September.
This is not really surprising as there are a whole slew of design flaws related to app install/uninstall that interact with each other to cause crashes and corruption of apps - and they really need to redesign the app install/uninstall framework to solve all the issues, it's not just a matter of fixing a couple of bugs.
I've also discovered that the freeze that occurs after Cydia installs a new app, and also the freeze that occurs when stuck on the apple logo (where the screen dims) is actually a Kernel Panic, Argh.....
Unfortunately 2.0 may as well have been called a Beta, it's that buggy, even in 2.0.2, and either Apple's Q&A department missed obvious flaws, or they were rushing right up to the wire to release on July 11th when they knew the software wasn't ready yet...
PS does anyone know how to enable verbose boot mode in 2.0 ? In 1.1.x you could just do nvram boot-args="-v" to enable verbose boot mode which would scroll kernel messages up the screen during bootup etc - this also works on a Mac, but it seems to have been disabled in 2.0 ?
Last edited by Mandrake; 08-29-2008 at 03:15 AM.
Here is a copy of my post over at modmyifone referencing this issue:
I want to thank DaveiPhone for sharing that link above. (this tread) When I read it, the post described my problem in such precise terms it was uncanny. I have spent the last 3 days trying to resolve this. I am lucky I am retired because I have spent all of my awake hours each of the last 3 days dealing with this problem. I took this problem and escalated it a number of times with Apple Customer support level 2. Finally, I found a representative who was really tech savvy and could understand the significance of this problem.
Please understand......EVERYONE who has system 2.0 or above is affected by this problem. That is, if they have many applications and/or very large applications the problem is a very real one. No installation procedure being as careful as you want to be will solve this problem. The only option we now have is either the work around discussed in the link OR we are limited to the number of applications we can install. We also are limited by the size of the applications. So if you, like me, had 83 applications you would be doomed to eventual unsuccessful rebooting. If you had Super Monkey Ball and other large programs installed in addition to the large numbers I had, then you are doubly doomed. A user can not fix this problem. It can only be fixed either by Apple for those who do not jailbreak or by the software development team if you jailbreak your phone. But currently, as far as I know we do not have a fix for this issue.
Personally, I have not jailbroken my iPhone 3G. I have reduced the number of installed apps to 32 for now (down from 83). I have not installed Super Monkey Ball even knowing my wife will kill me once she finds out. But I also know she wants a reliable device so I know she will ultimately understand.
I have shared the above thead the link refers to with Apple and hopefully Apple will understand that this is no small issue. This affects each user currently. The tech savvy representative I spoke with understands the importance of this and is going to immediately escalate this to engineering fully describing why this is an important issue.
Thank gawd for the people here who share good knowledge. I just hope we get a fix soon. Then we can start to see the potential for the iPhone to take off. (added: currently it is painful for those of us who have purchased many apps in the app store)
Errmmm... I have never seen this issue, and I have LOADS of apps. And I mean LOADS. I have Monkey Ball, Cro-Mag rally, BeatMaker, Chess Classics (naming the biggest ones) on my iPhone and they are all well over 100Mb each.
Originally Posted by three60guy
By trapper in forum Free Toolchain Software
Last Post: 07-07-2010, 01:49 AM
By zoro66 in forum Free Toolchain Software
Last Post: 08-04-2008, 07:49 PM
Last Post: 06-28-2008, 04:03 AM
By kikass122 in forum Free Toolchain Software
Last Post: 06-18-2008, 03:51 PM
Last Post: 11-06-2007, 04:54 PM