My device is already rooted, this is why I'm asking.
Do you need root to monitor the logcat stream on the phone? If I ran the logcat command from within a Terminal on the phone, would that work?
These free apps in the Market claim to be able to display your logcat, and don't make any mention of root. Should only take you a few minutes to try them out:
EDIT: Thanks to @mente for reminding me that these apps will only let you view the full logfile in older versions of Android. Android 4.1 brought in a new security model around logfiles that meant that apps could only read their own logfiles and logfile entries, and can't read logfile entries written by the system or other apps.
There is however still both a way for an app's user to generate a logfile of the app's recent log entries to be sent to a developer, and for a phone's owner to grant permissions to allow an app to read the logfile without full root, but this does require you to use an ADB command, which unfortunately takes it out of the reach of most normal phone users:
If you want the user to give you debugging information, you can have them generate a bug report with power + volume down + volume up which includes the logs and lots of other data, and automatically brings up their e-mail app to sent it all (plus a screenshot). We were just discussing that we should have an easier way to generate these as well, I am going to look at adding something to the settings app.
I also have started introducing the concept of a "development" permission, which read logs is classified as. This allows the app to request the permission, but not get it at install. You can however grant it with an adb shell command once it is installed. At some point later I expect to have a UI in the system for doing this, but we are going to hold off on that to be careful about how we present this.
Excerpt from a post on Google Groups by Dianne Hackborn, Android Framework Engineer. My emphasis.
The mentioned ADB command to grant an application permission to read the logs is:
adb shell pm grant <pkg> android.permission.READ_LOGS
This setting should survive reboots and upgrades of the app (but not uninstalls/reinstalls).
You don't need to root your phone to run
adb logcat with the Android SDK, but I did just test it in my Terminal Emulator and I did have to be root (used the
su command -- my phone is already rooted) to run logcat in the terminal on my phone.
So yes: if you have root on your phone you can run logcat from a terminal on your phone.
No, you don't need root to get logcat information.
To do it, you probably want to download the Android SDK and run "adb logcat", using the adb tool that comes with the SDK. Alternatively, you could install the ADT Eclipse plugin and use its handy streaming Logcat viewer.
No, you don't need root to access logcat. My device (Samsung Galaxy Note, Gingerbread 2.3.6 with stock ROM) is not rooted (yet!) and I have used the following ways to access log on my device:
However, the Terminal app doesn't allow you to run logcat, and gives you "permission denied". I'm not sure why.
It seems you cannot run logcat from Terminal Emulator without having root on your phone. In this case you have to su first. AFAIK, it comes from Android Permissions: Terminal Emulator simply doesn't have enough permissions to view device's log. So the system says Permission denied.
On the other hand, as others said, there are plenty of apps that allow you to view device's log just because they request the permission.
The application Android System Info has the ability to output log info to the screen which as far as I can tell is the same log info as logcat spits out.
Logcat does not need root. Simples - its a de-facto standard across the board in respect to different Android versions and is part of Android irrespective if you're rooted or not, and is a standard means for diagnosing problems as in for example - you install an app, the app force close, you complain to developer of said app, chances are quite high the developer will ask "send over the logcat" regardless if you're rooted or not!
aLogCat is one way of gathering the information, with the option of logging to webpage layout or plain text, bear in mind, if you schedule it to log at a certain frequency such as every 15 minutes, the SDCard will fill up quite quickly.
Another aspect, usage of logcat will be dependent on the kernel in terms of how much it can store - in any kernel that is used by the ROM, the source for the logging from a kernel level, where it reserves the memory for the logcat service can be found in
drivers/staging/android/logger.c using the appropriate defines for example:
DEFINE_LOGGER_DEVICE(log_main, LOGGER_LOG_MAIN, 64*1024) DEFINE_LOGGER_DEVICE(log_events, LOGGER_LOG_EVENTS, 256*1024) DEFINE_LOGGER_DEVICE(log_radio, LOGGER_LOG_RADIO, 64*1024) DEFINE_LOGGER_DEVICE(log_system, LOGGER_LOG_SYSTEM, 64*1024)
Again, mileage will vary, some developers of such ROMs will choose to minimize consumption to reduce memory overheads...