summaryrefstree
path: root/vendor/etc/qti-logkit/qti_logkit_command.xml
blob: 7e5485c24a0c5c5d19afeed59d9f346aed21ca24 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2016 Qualcomm Technologies, Inc.
All rights reserved.
Confidential and Proprietary - Qualcomm Technologies, Inc.
-->

<!--
   LogKit 3 Commands file
-->

<!--
     Version must be in format [MAJOR].[MINOR] where MAJOR and MINOR
     are integers. If client detects downgrade, prefs will revert to
     default values as backwards compatibility is not supported.

     Config and Command Versions are incremented along with client.
     Name can be changed to differentiate configs for a given version.
-->

<LogKitCommands Name="Qualcomm Technologies, Inc. Phase 2" Version="0.9">
   <!--                       Commands Table

      Commands are uniquely identified by Name and referenced by UIElements

      There are multiple types of commands:

         HLOSCommand: any command issued by Android HLOS
            Name: unique name used to identify command
            Command: actual command to be called
            Type: "streaming" or "oneshot"
            Extension: log file extension (e.g. ".txt")

         DiagSendCommand: diag command
            Name: unique name used to identify command
            Command: hex string to send.  E.g. "01ab02cd03ef05"

         EnumeratedCommand: command enumerated, rather than syntax
            Name: unique name used to identify command
            Enum: valid values:
               TCPDump_rmnet,  // "tcpdump -i rmnet0 -nnXSs 96 -w -"
               TCPDump_wlan,   // "tcpdump -i wlan0 -nnXSs 96 -w -"
               TCPDump_all,    // "tcpdump -i any -nnXSs 96 -w -"
               Bluetooth,      // bt snoop logs

         AnalyticsCommand: analytics command
            Name: unique name used to identify command
            Enum: valid values:
               Battery
               CPU
               Memory
            Frequency: time interval (in minutes) to retrieve this metric

         MonitorFileClose: Enable monitoring of a directory for file close
         MonitorFileMoveTo: Enable monitoring of a directory for file being
                            moved to.
            Name:    unique name used to identify event monitor
            Path:    path to directory to monitor
            bDelete: (optional) delete the file after collecting (boolean)
                     if not set, default to false

            NOTE: The name 'SSRNotification' uses special handling, it should
                  not be re-used at this time

            Typically the MonitorFileClose should be used for detecting file
            creation/modification of a file.
         todo: Only supported from config settings for phase 3

         CrashCollection: When crash is detected, copy into a package

            Name: unique name used to identify crash notification
         FWRNotification: When FWR is detected, collect the corresponding log
         DropboxNotification: When a dropbox entry is created with the provied
                              tag, collect the corresponding log

            Name: unique name used to identify each notification
            Tag: name of tag to register for
            Path: file to send upon notification
   -->

   <HLOSCommand
      Name="logcat"
      Command="logcat -v time"
      Type="streaming"
      Extension=".txt"/>
   <HLOSCommand
      Name="kmesg"
      Command="logcat -v time -b kernel"
      Type="streaming"
      Extension=".txt"/>
   <HLOSCommand
      Name="bug_report"
      Command="bugreport"
      Type="oneshot"
      Extension=".txt"/>
   <HLOSCommand
      Name="surface_flinger"
      Command="dumpsys SurfaceFlinger"
      Type="oneshot"
      Extension=".txt"/>

   <!-- demo purposes, get NV item 1810 -->
   <DiagSendCommand
      Name="diag_test"
      Command="26120700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
      Type="oneshot"/>

   <!-- demo purposes, sample health command -->
   <DiagSendCommand
      Name="health"
      Type="oneshot"
      Command="4b0c5200"/>

   <!-- demo purposes, oneshot commands -->
   <HLOSCommand
      Name="eHLOSCommand_CrashLogcatEvents"
      Command="logcat -b events -v time -d"
      Type="oneshot"
      Extension=".txt"/>
   <HLOSCommand
      Name="eHLOSCommand_CrashLogcatRadio"
      Command="logcat -b radio -v time -d"
      Type="oneshot"
      Extension=".txt"/>
   <HLOSCommand
      Name="eHLOSCommand_CrashLogcatMain"
      Command="logcat -v time -d"
      Type="oneshot"
      Extension=".txt"/>
   <HLOSCommand
      Name="eHLOSCommand_CrashDmesg"
      Command="logcat -v time -b kernel -d"
      Type="oneshot"
      Extension=".txt"/>
   <HLOSCommand
      Name="eHLOSCommand_CrashTop"
      Command="top -n 1 -d 1 -m 30 -t"
      Type="oneshot"
      Extension=".txt"/>
   <HLOSCommand
      Name="eHLOSCommand_CrashPsParent"
      Command="ps -P"
      Type="oneshot"
      Extension=".txt"/>
   <HLOSCommand
      Name="eHLOSCommand_CrashPsThread"
      Command="ps -t -p"
      Type="oneshot"
      Extension=".txt"/>
   <HLOSCommand
      Name="eHLOSCommand_SystemCrash"
      Command="echo c \> /proc/sysrq-trigger"
      Type="oneshot"
      Extension=".txt"/>
   <HLOSCommand
      Name="eHLOSCommand_Platform"
      Command="getprop ro.board.platform"
      Type="oneshot"
      Extension=".txt"/>
   <HLOSCommand
      Name="eHLOSCommand_BuildDesc"
      Command="getprop ro.build.description"
      Type="oneshot"
      Extension=".txt"/>
   <HLOSCommand
      Name="eHLOSCommand_DevInfoGetProp"
      Command="getprop"
      Type="oneshot"
      Extension=".txt"/>
   <HLOSCommand
      Name="eHLOSCommand_CrashDumpSys"
      Command="dumpsys"
      Type="oneshot"
      Extension=".txt"/>
   <HLOSCommand
      Name="eHLOSCommand_CatStat"
      Command="cat /d/mdp/stat"
      Type="oneshot"
      Extension=".txt"/>
   <HLOSCommand
      Name="eHLOSCommand_CatRPMStats"
      Command="cat /sys/kernel/debug/rpm_stats"
      Type="oneshot"
      Extension=".txt"/>
   <HLOSCommand
      Name="eHLOSCommand_CatRPMMaster"
      Command="cat /sys/kernel/debug/rpm_master_stats"
      Type="oneshot"
      Extension=".txt"/>
   <HLOSCommand
      Name="eHLOSCommand_DumpSurfaceFlinger"
      Command="dumpsys SurfaceFlinger"
      Type="oneshot"
      Extension=".txt"/>
   <HLOSCommand
      Name="eHLOSCommand_CatMemInfo"
      Command="cat /proc/meminfo"
      Type="oneshot"
      Extension=".txt"/>
   <HLOSCommand
      Name="eHLOSCommand_ProcRank"
      Command="procrank"
      Type="oneshot"
      Extension=".txt"/>
   <HLOSCommand
      Name="eHLOSCommand_CatHeaps"
      Command="cat /d/ion/heaps/system"
      Type="oneshot"
      Extension=".txt"/>
   <HLOSCommand
      Name="eHLOSCommand_DumpPower"
      Command="dumpsys power"
      Type="oneshot"
      Extension=".txt"/>
   <HLOSCommand
      Name="eHLOSCommand_ListOpenFiles"
      Command="lsof"
      Type="oneshot"
      Extension=".txt"/>
   <HLOSCommand
      Name="eHLOSCommand_Mount"
      Command="mount"
      Type="oneshot"
      Extension=".txt"/>
   <HLOSCommand
      Name="eHLOSCommand_DiskSpace"
      Command="df"
      Type="oneshot"
      Extension=".txt"/>
   <HLOSCommand
      Name="eHLOSCommand_DumpBattery"
      Command="dumpsys battery"
      Type="oneshot"
      Extension=".txt"/>
   <HLOSCommand
      Name="eHLOSCommand_DumpCamera"
      Command="dumpsys media.camera"
      Type="oneshot"
      Extension=".txt"/>
   <HLOSCommand
      Name="eHLOSCommand_PS"
      Command="ps"
      Type="oneshot"
      Extension=".txt"/>
   <HLOSCommand
      Name="eHLOSCommand_Iwconfig"
      Command="iwconfig wlan0"
      Type="oneshot"
      Extension=".txt"/>
   <HLOSCommand
      Name="eHLOSCommand_Uptime"
      Command="uptime"
      Type="oneshot"
      Extension=".txt"/>
   <HLOSCommand
      Name="eHLOSCommand_Bugreport"
      Command="bugreport"
      Type="oneshot"
      Extension=".txt"/>

   <!-- demo purposes, streaming commands -->
   <HLOSCommand
      Name="eHLOSCommand_CpuTop"
      Command="top -d 60"
      Type="streaming"
      Extension=".txt"/>
   <HLOSCommand
      Name="eHLOSCommand_ContLogcat"
      Command="logcat -v time -b main -b system"
      Type="streaming"
      Extension=".txt"/>
   <HLOSCommand
      Name="eHLOSCommand_ContLogcatRadio"
      Command="logcat -v time -b radio"
      Type="streaming"
      Extension=".txt"/>
   <HLOSCommand
      Name="eHLOSCommand_ContLogcatEvents"
      Command="logcat -v time -b events"
      Type="streaming"
      Extension=".txt"/>
   <HLOSCommand
      Name="eHLOSCommand_ContKmsg"
      Command="logcat -v time -b kernel"
      Type="streaming"
      Extension=".txt"/>
   <HLOSCommand
      Name="eHLOSCommand_ContLogcatThread"
      Command="logcat -v threadtime"
      Type="streaming"
      Extension=".txt"/>
   <HLOSCommand
      Name="eHLOSCommand_CatQDSSTmcEtr"
      Command="cat /dev/coresight-tmc-etr-stream"
      Type="streaming"
      Extension=".txt"/>

   <!-- Enumerated commands -->
   <EnumeratedCommand
      Name="eHLOSCommand_ContTCP"
      Enum="TCPDump_rmnet"/>
   <EnumeratedCommand
      Name="eHLOSCommand_ContWlanTCP"
      Enum="TCPDump_wlan"/>
   <EnumeratedCommand
      Name="eHLOSCommand_ContAllTCP"
      Enum="TCPDump_all"/>
   <EnumeratedCommand
      Name="eHLOSCommand_ContBluetooth"
      Enum="Bluetooth"/>

   <!-- demo purposes, analytics -->
   <AnalyticsCommand
      Name="eAnalyticsCommand_Battery"
      Enum="Battery"
      Frequency="1"/>
   <AnalyticsCommand
      Name="eAnalyticsCommand_CPU"
      Enum="CPU"
      Frequency="1"/>
   <AnalyticsCommand
      Name="eAnalyticsCommand_Memory"
      Enum="Memory"
      Frequency="1"/>

   <!-- Monitor File Events -->
   <!-- Tombstone file copied when file closed. -->
   <MonitorFileClose
      Name="Tombstone"
      Path="/data/tombstones/"/>
   <!-- SSR file copied when file closed. -->
   <MonitorFileClose
      Name="SSRNotification"
      Path="/data/ramdump/"/>

   <!-- MST csv files -->
   <MonitorFileClose
      Name="MyFTPVoiceNotes"
      Path="/storage/sdcard0/MyFTPVoiceNotes.csv"
      bDelete="true"/>
   <MonitorFileClose
      Name="SmarTestLogs"
      Path="/storage/sdcard0/SmarTestLogs/"
      bDelete="true"/>

   <!-- Monitor for FWR files -->
   <FWRNotification Name="FWRNotification"/>
   <!-- Collect crash files -->
   <CrashCollection Name="CrashCollection"/>

   <!-- Monitor for "Dropbox entry" files -->
   <DropboxNotification
      Name="ANR-Data"
      Tag="data_app_anr"
      Path="/data/anr/traces.txt"/>

   <DropboxNotification
      Name="ANR-System"
      Tag="system_app_anr"
      Path="/data/anr/traces.txt"/>

</LogKitCommands>