Logcat using adb

1. Try to setup ADB (Android Debugging Bridge) to use command “adb” in command line.

Please read this post

2. Open console (cmd) then start to using logcat with command “adb“.

[adb] logcat [<option>] ... [<filter-spec>] ...

Example:

c:\> adb logcat *:I

c:\> adb logcat *:D

c:\> adb logcat *:E

logcatE

c:\> adb logcat -d

If you want to write the log into a file, you can try the following command:

c:\>adb shell logcat -f /mnt/sdcard/logcat.txt

This command will write the log into a file (logcat.txt) then save the file into your sdcard in your device.

When you use the option “-f”, you should write log into a writable area. if not, an error found like “couldn’t open output file: Read-only file system

Or simple way to save your log into your PC: 

c:\> adb logcat >logfile.txt

c:\> adb logcat -d >logfile.txt

Refer to the following link to know more: 

http://developer.android.com/tools/debugging/debugging-log.html

Happy logcatting 🙂

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s