What is my phone doing when the boot takes a long time? I have a Samsung Galaxy S with stock Android 2.3.3 (with carrier modifications, regretfully).

Usually, when I reboot the phone, it shows the boot animation for a few seconds, then goes to the lock screen while it finishes booting.  Every once in a while (though more often lately than it used to), the boot animation screen gets stuck for about 5 minutes before showing me the lock screen.

This happens both on clean boots (i.e. shutting it down from the power button menu and then restarting) as well as when the phone freezes and I restart it, or when it crashes.

What is the phone doing at this time?

Why does it do it sometimes and not at other times?

How can I avoid this?
Download and install the Android SDK.  On your handset's manufacturer website find and download USB drivers for your device, and install them.  On your phone go to Menu -&gt; Settings -&gt; Applications -&gt; Development and enable the USB debugging option.  Now when connect the phone to your PC via USB, you should see the "USB debugging connected" ongoing notification.

On your PC (I'm assuming Windows) start command prompt by going to Start -> Run, typing "cmd" and pressing enter.  Navigate to the "platrofm-tools" sub-folder of where you installed the Android SDK (e.g. "C:\AndroidSDK") by typing the following:


  cd C:\AndroidSDK\platform-tools


and press enter.  Now issue the following command:


  adb devices


and press enter.  If everything was installed correctly, the adb service will start and show your connected handset's serial number:


  * daemon not running. starting it now on port 5037 *
  * daemon started successfully *
  List of devices attached
  HT035xxxxxxxx    device  


You can now issue the adb logcat command to review your handset's logs in real-time.  Reboot while your handset is still plugged into USB (you will need to re-issue the adb logcat command when the phone restarts) and you will be able to see what your phone is doing during those long boot-up sequences.