How to capture a log with adb logcat

From dmfswiki
Revision as of 08:45, 17 January 2016 by Yannic (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Usually a full sync log is sufficient to find out what's wrong when the synchronisation fails. However, in some cases a full *system* log is necessary to track down the original cause. If the device is rooted "CatLog" is the weapon of choice. If it's not we need to resort to a tool called 'adb logcat'.

Note that you need to have a Linux machine or Mac for this.

1.) Download or install the Android-SDK (http://developer.android.com/sdk/index.html#Other). If you're using Ubuntu you can also run "sudo apt-get install android-tools-adb".

2.) Enable the "developer mode" on your device. Take a look at the following guide for the instructions: http://web.archive.org/web/20160114105932/http://www.greenbot.com/article/2457986/how-to-enable-developer-options-on-your-android-phone-or-tablet.html

3.) A new menu item called "developer options" pops up. In it, enable the "USB debugging" option.

4.) Connect your smartphone via USB to your machine

5.) Run "adb logcat > logfile" in the commandline. Note: this overwrites "logfile" if it already exists.

6.) Reproduce the original issue e.g. by starting a synchronisation on your smartphone.

7.) Afterwards kill adb by pressing the combination "Ctrl + c" in the commandline window.

8.) Forward the file "logfile" to us.