Logcat is the command to view the internal logs of the Android system. Viewing logs is often the best way to diagnose a problem, and is required for many issues. This way you'll find out what apps are doing in the background without you noticing.

How do I install it?

  1. 1. Make sure you've enabled on USB debugging on your phone in Settings -> Application -> Development
  2. 2. Get the Android SDK here: Android SDK | Android Developers
  3. 3. Extract the folder to C:\Android\ (using this path in this example, you can extract it where you would like)
  4. 4. Download this file: RapidShare: 1-CLICK Web hosting - Easy Filehosting and extract the 'usb_driver' folder to C:\Android\
  5. 5. Connect the phone with the USB cable
  6. 6. Windows will ask for the drivers
    If you have WinXP follow these steps: USB Driver for Windows | Android Developers
    If you have Win7 or Vista follow these steps: USB Driver for Windows | Android Developers

    The folder you need to browse to for the driver is C:\Android\usb_driver

Everything installed? Continuing...

Now how to actually access the log, everything in italic are commands you need to enter.

  1. 1. Open the 'run' dialog by pressing the 'Windows' + 'r' buttons on your keyboard (minimize the browser & other non-windows programs)
  2. 2. cmd (this will open a DOS prompt)
  3. 3. cd c:\Android\tools (go to the directory where you extracted the SDK)
  4. 4. adb shell
  5. 5. Now you'll see just a '$'
  6. 6. logcat

You can now just press the power button on your phone to see what happens. It displays everything the device is doing.

So the thing is: leave your device connected for a while and see what is actually going on when you're not using it.

I'm seeing all sort of things I don't really understand...

Here are 2 little examples to clarify things a bit more:
1. My phone was a sleep and the Google weather widget was set to refresh every 30min

And then the same process repeated 30min laters which means my phone isn't doing anything I don't want it to.

2. Twidroid auto refreshing my Tweets
If you're seeing apps that are constantly busy when they shouldn't that means they're draining battery because of bugs in the app/ bad coding/ ...

Example of a buggy app:

As you can see the app (BeautifulWidgets) was constantly trying to remove the same updates and thus draining my battery for no reason. This was happening every 10seconds (!!).

Uninstalling those crappy apps should help your battery life (and hope a future update of that app fixes it)

The less you see in the logcat the better

Starting with a fresh log

If you want to clear the log and only see what's happening on your phone from now on, go to adb shell (step 4) and then type logcat -c. This clears the log and then type logcat