How to create a CatLog for Android App?


#1

My phone is not rooted and it runs Android 6.0.1

I found a way to create a CatLog for k9 Mail on there GitHub site:
adb logcat -d -v time k9:V ‘*:S’ AndroidRuntime:E > k9-log.txt
Is it possible adapt this to Kontalk?

Thank you


#2

Sorry that can’t work because Kontalk doesn’t use the same tag for all its logging. You need to track the process:

adb logcat -d | grep `adb shell ps | grep org.kontalk | cut -c10-15` >kontalk-log.txt

It should work on any Android version (hopefully; tested on 5.1).


#3

OK, it works. So I will create a Log if https://github.com/kontalk/androidclient/issues/873 is happens again if I’m on my PC

Thank you


#4

I’ve added the one-liner to the issue template on GitHub for future reference.


#5

Where can I run this command? I’m using Cyanogenmod with my phone and the terminal tells me that ADB is not installed. I also don’t know how to install ADB as apt-get is installed neither… :confused:


#6

I assume you have Windows? You’ll need Minimal ADB and Fastboot then.


#7

Hi, maybe this instruction by K9 mail developer can also help


#8

Thanks @webratte! Would you mind drafting a wiki page in the androidclient repo about how to get a logcat for Kontalk, including a link to that page (or even better copy its content and credit the K-9 team)?
If you’re unsure about your English don’t worry: I’ll give it a check. Also please don’t translate it to other language since it’s a strictly techinical page.


#9

No problem,
I will ask the k9 team if it’s OK to use there description adapted to Kontalk.
But I think that will be OK.


#10

Hi everybody,

I have just written a description how to create a catlog.

https://github.com/kontalk/androidclient/wiki/How-to-create-a-CatLog

I have tried to make it as easy as possible so also non tech users like me can follow this steps.

Your welcome to optimize grammar, spelling and content. If you have no GitHub account please let me know what is wrong or could be optimized.

@daniele_athome The K-9 people have not answered yet. So I have first linked there description for installing ADB.
Is there a commend in markdown to open a link in new window?


#11

grep doesn’t work on Windows, so we need to come up with something else.


#12

Thanks @webratte! I fixed a few things here and there on the wiki page.

Actually I was thinking of writing an internal logging system that can produce a log file without requiring root nor adb. I’ve opened an issue some time ago but did not begin working on it.
I’ve moved the issue to milestone 4.0.0 since this could greatly help debugging stuff especially in group chats. I’ll try to make it on time. In the meantime, sorry this procedure is for Linux-based systems only (or Unix-based since they are all commands available on Mac as well I suppose).


#13

I will see if Grep for Windows works for me.


#14

For what it’s worth, F-Droid uses ACRA, but I’m not sure how useful it is in these cases when no real crash occurs.