Difference between revisions of "How to capture a log with adb logcat"

From dmfswiki
Jump to: navigation, search
(Created page with "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 origin...")
 
Line 5: Line 5:
 
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".
 
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.) Connect your smartphone via USB to your machine
+
3.) Connect your smartphone via USB to your machine
  
3.) Run "adb logcat > logfile" in the commandline. Note: this overwrites "logfile" if it already exists.
+
4.) Run "adb logcat > logfile" in the commandline. Note: this overwrites "logfile" if it already exists.
  
4.) Reproduce the original issue e.g. by starting a synchronisation on your smartphone.
+
5.) Reproduce the original issue e.g. by starting a synchronisation on your smartphone.
  
5.) Afterwards kill adb by pressing the combination "Ctrl + c" in the commandline window.
+
6.) Afterwards kill adb by pressing the combination "Ctrl + c" in the commandline window.
  
6.) Forward the file "logfile" to us.
+
7.) Forward the file "logfile" to us.

Revision as of 08:40, 17 January 2016

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".

3.) Connect your smartphone via USB to your machine

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

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

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

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