Project

General

Profile

GettingLogs » History » Version 15

Denis 'GNUtoo' Carikli, 11/28/2019 10:54 PM
fix toolsinstallation link

1 4 Paul Kocialkowski
h1. Getting logs
2 1 Paul Kocialkowski
3 9 Wolfgang Wiedmeyer
{{>toc}}
4
5 1 Paul Kocialkowski
When some component misbehaves or stops working on Replicant, it is recommended to:
6
# Get logs showing the issue
7 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)
8 1 Paul Kocialkowski
9 4 Paul Kocialkowski
h2. Buffers
10 1 Paul Kocialkowski
11
The Android logging subsystem uses different log buffers: @events@, @main@, @radio@ and @system@.
12
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.
13
14 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.
15 1 Paul Kocialkowski
16 6 Wolfgang Wiedmeyer
There are various ways to obtain the logs:
17
18 1 Paul Kocialkowski
h2. Using ADB
19 3 Paul Kocialkowski
20 15 Denis 'GNUtoo' Carikli
First you need to had adb installed.
21
22
If you don't you can follow the [[ToolsInstallation]] page to install it.
23 1 Paul Kocialkowski
24 6 Wolfgang Wiedmeyer
h3. Retrieving a buffer from the Android logging subsystem
25
26
Display a buffer from the Android logging subsystem:
27
28 3 Paul Kocialkowski
<pre>
29 13 Wolfgang Wiedmeyer
adb logcat -b BUFFER
30 5 Wolfgang Wiedmeyer
</pre>
31
32
To prepare a new issue report, you need to save the output to a file:
33
34
<pre>
35 13 Wolfgang Wiedmeyer
adb logcat -b BUFFER -d > path/to/file
36 1 Paul Kocialkowski
</pre>
37 6 Wolfgang Wiedmeyer
38
h3. Retrieving the kernel message buffer
39
40
Display the kernel message buffer:
41
42
<pre>
43
adb shell dmesg
44
</pre>
45
46
To prepare a new issue report, you need to save the output to a file:
47
48
<pre>
49
adb shell dmesg > path/to/file
50
</pre>
51
52 1 Paul Kocialkowski
53 4 Paul Kocialkowski
h2. Using aLogcat
54 1 Paul Kocialkowski
55
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.
56
You can set the desired buffer from the @Preferences@.
57
58
After saving the log, you can get it from a file stored in the @alogcat@ folder on the root of storage.
59 7 Wolfgang Wiedmeyer
60
h2. Submitting the logs
61
62 10 Wolfgang Wiedmeyer
You can simply attach the log file to the issue report. 
63
64 14 Wolfgang Wiedmeyer
h3. Encrypting radio logs
65 1 Paul Kocialkowski
66 14 Wolfgang Wiedmeyer
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 radio log, so only Replicant developers can view it. 
67
68
Encrypting logs has the disadvantage that very likely no other contributors besides the main Replicant developers will be able to help in order to solve the issue.
69 7 Wolfgang Wiedmeyer
70
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
71
<pre>
72
gpg --recv-keys KEY_ID
73
</pre>
74
75 12 Wolfgang Wiedmeyer
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.
76 7 Wolfgang Wiedmeyer
77
Then, you can encrypt the log file:
78
<pre>
79
gpg --recipient KEY_ID_1 --recipient KEY_ID_2 ... --encrypt LOG_FILE
80
</pre>
81
82 12 Wolfgang Wiedmeyer
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.
83 7 Wolfgang Wiedmeyer
84
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.