Project

General

Profile

GettingLogs » History » Version 7

Wolfgang Wiedmeyer, 04/06/2017 03:27 PM
encrypting logs for submission

1 4 Paul Kocialkowski
h1. Getting logs
2 1 Paul Kocialkowski
3
When some component misbehaves or stops working on Replicant, it is recommended to:
4
# Get logs showing the issue
5 7 Wolfgang Wiedmeyer
# Open a ticket on our tracker to report the issue (*New issue* tab) or submit the logs to an existing issue that already describes the same misbehavior (*Update* at the bottom of the issue)
6 1 Paul Kocialkowski
7 4 Paul Kocialkowski
h2. Buffers
8 1 Paul Kocialkowski
9
The Android logging subsystem uses different log buffers: @events@, @main@, @radio@ and @system@.
10
Generally speaking, when the issue you encountered concerned telephony, including data (3G), the buffer you want is @radio@. In any other case, that's the @main@ buffer you want.
11
12 6 Wolfgang Wiedmeyer
In some cases, the information provided by the Android log buffers is not sufficient and the message buffer of the Linux kernel is additionally required for investigating the issue.
13 1 Paul Kocialkowski
14 6 Wolfgang Wiedmeyer
There are various ways to obtain the logs:
15
16 1 Paul Kocialkowski
h2. Using ADB
17 3 Paul Kocialkowski
18 6 Wolfgang Wiedmeyer
First, you need to [[ToolsInstallation#ADB|install ADB]].
19 1 Paul Kocialkowski
20 6 Wolfgang Wiedmeyer
h3. Retrieving a buffer from the Android logging subsystem
21
22
Display a buffer from the Android logging subsystem:
23
24 3 Paul Kocialkowski
<pre>
25 1 Paul Kocialkowski
adb logcat -b [BUFFER]
26 5 Wolfgang Wiedmeyer
</pre>
27
28
To prepare a new issue report, you need to save the output to a file:
29
30
<pre>
31 1 Paul Kocialkowski
adb logcat -b [BUFFER] -d > path/to/file
32
</pre>
33 6 Wolfgang Wiedmeyer
34
h3. Retrieving the kernel message buffer
35
36
Display the kernel message buffer:
37
38
<pre>
39
adb shell dmesg
40
</pre>
41
42
To prepare a new issue report, you need to save the output to a file:
43
44
<pre>
45
adb shell dmesg > path/to/file
46
</pre>
47
48 1 Paul Kocialkowski
49 4 Paul Kocialkowski
h2. Using aLogcat
50 1 Paul Kocialkowski
51
aLogcat is a (free) Android app that will collect logs and save them to a file, either regularly or when you press the *Save* button from the app menu.
52
You can set the desired buffer from the @Preferences@.
53
54
After saving the log, you can get it from a file stored in the @alogcat@ folder on the root of storage.
55 7 Wolfgang Wiedmeyer
56
h2. Submitting the logs
57
58
You can simply attach the log file to the issue report. Logs from the radio buffer can contain privacy-sensitive information. If you don't want to have this information publicly available on the issue tracker, you can encrypt the log, so only Replicant developers can view it.
59
60
h3. Encrypting logs
61
62
First, you need to retrieve the GPG keys of the active Replicant developers. They are listed on the [[People]] page. It is recommended to retrieve them using
63
<pre>
64
gpg --recv-keys KEY_ID
65
</pre>
66
67
and replacing @KEY_ID@ with the listed key ids. If you have issues retrieving a key of a developer, you can still continue and encrypt the log for the other developers.
68
69
Then, you can encrypt the log file:
70
<pre>
71
gpg --recipient KEY_ID_1 --recipient KEY_ID_2 ... --encrypt LOG_FILE
72
</pre>
73
74
Replace @KEY_ID_1@ and @KEY_ID_2@ with the key ids of the developers and add more @--recipient@ options replacing @...@ until the key ids of all active developers are listed. Replace @LOG_FILE@ with the path to the log file you want to encrypt. The command should produce a file with the same name as your log file, but with the file ending @gpg@. This is the encrypted log file. Attach this file to the issue report.
75
76
Replicant developers will not share publicly entire unencrypted logs, but they might include unencrypted snippets of the logs in the issue discussion if it helps to fix the issue. The developers will make sure that these snippets do not contain privacy-sensitive information or that all privacy-sensitive information was removed.