• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2016 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #define LOG_TAG "dumpstate"
18 
19 #include "DumpstateDevice.h"
20 
21 #include <android-base/properties.h>
22 #include <android-base/unique_fd.h>
23 #include <cutils/properties.h>
24 #include <hidl/HidlBinderSupport.h>
25 
26 #include <log/log.h>
27 #include <string.h>
28 
29 #define _SVID_SOURCE
30 #include <dirent.h>
31 
32 #include "DumpstateUtil.h"
33 
34 #define MODEM_LOG_PREFIX_PROPERTY "ro.radio.log_prefix"
35 #define MODEM_LOG_LOC_PROPERTY "ro.radio.log_loc"
36 #define MODEM_LOGGING_SWITCH "persist.radio.smlog_switch"
37 
38 #define DIAG_MDLOG_PERSIST_PROPERTY "persist.vendor.sys.modem.diag.mdlog"
39 #define DIAG_MDLOG_PROPERTY "vendor.sys.modem.diag.mdlog"
40 #define DIAG_MDLOG_STATUS_PROPERTY "vendor.sys.modem.diag.mdlog_on"
41 
42 #define DIAG_MDLOG_NUMBER_BUGREPORT "persist.vendor.sys.modem.diag.mdlog_br_num"
43 
44 #define UFS_BOOTDEVICE "ro.boot.bootdevice"
45 
46 #define TCPDUMP_NUMBER_BUGREPORT "persist.vendor.tcpdump.log.br_num"
47 #define TCPDUMP_PERSIST_PROPERTY "persist.vendor.tcpdump.log.alwayson"
48 
49 using android::os::dumpstate::CommandOptions;
50 using android::os::dumpstate::DumpFileToFd;
51 using android::os::dumpstate::PropertiesHelper;
52 using android::os::dumpstate::RunCommandToFd;
53 
54 namespace android {
55 namespace hardware {
56 namespace dumpstate {
57 namespace V1_0 {
58 namespace implementation {
59 
60 #define DIAG_LOG_PREFIX "diag_log_"
61 #define TCPDUMP_LOG_PREFIX "tcpdump"
62 #define EXTENDED_LOG_PREFIX "extended_log_"
63 
dumpLogs(int fd,std::string srcDir,std::string destDir,int maxFileNum,const char * logPrefix)64 void DumpstateDevice::dumpLogs(int fd, std::string srcDir, std::string destDir,
65                                int maxFileNum, const char *logPrefix) {
66     struct dirent **dirent_list = NULL;
67     int num_entries = scandir(srcDir.c_str(),
68                               &dirent_list,
69                               0,
70                               (int (*)(const struct dirent **, const struct dirent **)) alphasort);
71     if (!dirent_list) {
72         return;
73     } else if (num_entries <= 0) {
74         return;
75     }
76 
77     int copiedFiles = 0;
78 
79     for (int i = num_entries - 1; i >= 0; i--) {
80         ALOGD("Found %s\n", dirent_list[i]->d_name);
81 
82         if (0 != strncmp(dirent_list[i]->d_name, logPrefix, strlen(logPrefix))) {
83             continue;
84         }
85 
86         if ((copiedFiles >= maxFileNum) && (maxFileNum != -1)) {
87             ALOGD("Skipped %s\n", dirent_list[i]->d_name);
88             continue;
89         }
90 
91         copiedFiles++;
92 
93         CommandOptions options = CommandOptions::WithTimeout(120).Build();
94         std::string srcLogFile = srcDir + "/" + dirent_list[i]->d_name;
95         std::string destLogFile = destDir + "/" + dirent_list[i]->d_name;
96 
97         std::string copyCmd = "/vendor/bin/cp " + srcLogFile + " " + destLogFile;
98 
99         ALOGD("Copying %s to %s\n", srcLogFile.c_str(), destLogFile.c_str());
100         RunCommandToFd(fd, "CP DIAG LOGS", { "/vendor/bin/sh", "-c", copyCmd.c_str() }, options);
101     }
102 
103     while (num_entries--) {
104         free(dirent_list[num_entries]);
105     }
106 
107     free(dirent_list);
108 }
109 
dumpModem(int fd,int fdModem)110 void DumpstateDevice::dumpModem(int fd, int fdModem)
111 {
112     std::string modemLogDir = android::base::GetProperty(MODEM_LOG_LOC_PROPERTY, "");
113     if (modemLogDir.empty()) {
114         ALOGD("No modem log place is set");
115         return;
116     }
117 
118     std::string filePrefix = android::base::GetProperty(MODEM_LOG_PREFIX_PROPERTY, "");
119 
120     if (filePrefix.empty()) {
121         ALOGD("Modem log prefix is not set");
122         return;
123     }
124 
125     const std::string modemLogCombined = modemLogDir + "/" + filePrefix + "all.tar";
126     const std::string modemLogAllDir = modemLogDir + "/modem_log";
127 
128     RunCommandToFd(fd, "MKDIR MODEM LOG", {"/vendor/bin/mkdir", "-p", modemLogAllDir.c_str()}, CommandOptions::WithTimeout(2).Build());
129 
130     if (!PropertiesHelper::IsUserBuild()) {
131         RunCommandToFd(fd, "MODEM RFS INFO", {"/vendor/bin/find /data/vendor/rfs/mpss/OEMFI/"}, CommandOptions::WithTimeout(2).Build());
132         RunCommandToFd(fd, "MODEM DIAG SYSTEM PROPERTIES", {"/vendor/bin/getprop | grep vendor.sys.modem.diag"}, CommandOptions::WithTimeout(2).Build());
133 
134         const std::string diagLogDir = "/data/vendor/radio/diag_logs/logs";
135         const std::string tcpdumpLogDir = "/data/vendor/tcpdump_logger/logs";
136         const std::string extendedLogDir = "/data/vendor/radio/extended_logs";
137         const std::vector<std::string> rilAndNetmgrLogs{
138             "/data/vendor/radio/ril_log0",
139             "/data/vendor/radio/ril_log0_old",
140             "/data/vendor/radio/ril_log1",
141             "/data/vendor/radio/ril_log1_old",
142             "/data/vendor/radio/imsdatadaemon_log",
143             "/data/vendor/radio/imsdatadaemon_log_old",
144             "/data/vendor/radio/qmi_fw_log",
145             "/data/vendor/radio/qmi_fw_log_old",
146             "/data/vendor/netmgr/netmgr_log",
147             "/data/vendor/netmgr/netmgr_log_old",
148             "/data/vendor/radio/power_anomaly_data.txt",
149             "/data/vendor/radio/diag_logs/diag_trace.txt",
150             "/data/vendor/radio/diag_logs/diag_trace_old.txt",
151             "/data/vendor/radio/diag_logs/logs/diag_poweron_log.qmdl",
152             "/data/vendor/radio/metrics_data",
153             "/data/vendor/ssrlog/ssr_log.txt",
154             "/data/vendor/ssrlog/ssr_log_old.txt",
155             "/data/vendor/rfs/mpss/modem_efs",
156         };
157 
158         bool smlogEnabled = android::base::GetBoolProperty(MODEM_LOGGING_SWITCH, false) && !access("/vendor/bin/smlog_dump", X_OK);
159         bool diagLogEnabled = android::base::GetBoolProperty(DIAG_MDLOG_PERSIST_PROPERTY, false);
160         bool tcpdumpEnabled = android::base::GetBoolProperty(TCPDUMP_PERSIST_PROPERTY, false);
161 
162         if (smlogEnabled) {
163             RunCommandToFd(fd, "SMLOG DUMP", {"smlog_dump", "-d", "-o", modemLogAllDir.c_str()}, CommandOptions::WithTimeout(10).Build());
164         } else if (diagLogEnabled) {
165             bool diagLogStarted = android::base::GetBoolProperty( DIAG_MDLOG_STATUS_PROPERTY, false);
166 
167             if (diagLogStarted) {
168                 android::base::SetProperty(DIAG_MDLOG_PROPERTY, "false");
169                 ALOGD("Stopping diag_mdlog...\n");
170                 if (android::base::WaitForProperty(DIAG_MDLOG_STATUS_PROPERTY, "false", std::chrono::seconds(20))) {
171                     ALOGD("diag_mdlog exited");
172                 } else {
173                     ALOGE("Waited mdlog timeout after 20 second");
174                 }
175             } else {
176                 ALOGD("diag_mdlog is not running");
177             }
178 
179             dumpLogs(fd, diagLogDir, modemLogAllDir, android::base::GetIntProperty(DIAG_MDLOG_NUMBER_BUGREPORT, 100), DIAG_LOG_PREFIX);
180 
181             if (diagLogStarted) {
182                 ALOGD("Restarting diag_mdlog...");
183                 android::base::SetProperty(DIAG_MDLOG_PROPERTY, "true");
184             }
185         }
186 
187         if (tcpdumpEnabled) {
188             dumpLogs(fd, tcpdumpLogDir, modemLogAllDir, android::base::GetIntProperty(TCPDUMP_NUMBER_BUGREPORT, 5), TCPDUMP_LOG_PREFIX);
189         }
190 
191         for (const auto& logFile : rilAndNetmgrLogs) {
192             RunCommandToFd(fd, "CP MODEM LOG", {"/vendor/bin/cp", logFile.c_str(), modemLogAllDir.c_str()}, CommandOptions::WithTimeout(2).Build());
193         }
194 
195         dumpLogs(fd, extendedLogDir, modemLogAllDir, 100, EXTENDED_LOG_PREFIX);
196     }
197 
198     RunCommandToFd(fd, "TAR LOG", {"/vendor/bin/tar", "cvf", modemLogCombined.c_str(), "-C", modemLogAllDir.c_str(), "."}, CommandOptions::WithTimeout(120).Build());
199     RunCommandToFd(fd, "CHG PERM", {"/vendor/bin/chmod", "a+w", modemLogCombined.c_str()}, CommandOptions::WithTimeout(2).Build());
200 
201     std::vector<uint8_t> buffer(65536);
202     android::base::unique_fd fdLog(TEMP_FAILURE_RETRY(open(modemLogCombined.c_str(), O_RDONLY | O_CLOEXEC | O_NONBLOCK)));
203 
204     if (fdLog >= 0) {
205         while (1) {
206             ssize_t bytes_read = TEMP_FAILURE_RETRY(read(fdLog, buffer.data(), buffer.size()));
207 
208             if (bytes_read == 0) {
209                 break;
210             } else if (bytes_read < 0) {
211                 ALOGD("read(%s): %s\n", modemLogCombined.c_str(), strerror(errno));
212                 break;
213             }
214 
215             ssize_t result = TEMP_FAILURE_RETRY(write(fdModem, buffer.data(), bytes_read));
216 
217             if (result != bytes_read) {
218                 ALOGD("Failed to write %ld bytes, actually written: %ld", bytes_read, result);
219                 break;
220             }
221         }
222     }
223 
224     RunCommandToFd(fd, "RM MODEM DIR", { "/vendor/bin/rm", "-r", modemLogAllDir.c_str()}, CommandOptions::WithTimeout(2).Build());
225     RunCommandToFd(fd, "RM LOG", { "/vendor/bin/rm", modemLogCombined.c_str()}, CommandOptions::WithTimeout(2).Build());
226 }
227 
DumpTouch(int fd)228 static void DumpTouch(int fd) {
229     if (!access("/sys/devices/virtual/sec/tsp", R_OK)) {
230         DumpFileToFd(fd, "LSI touch firmware version",
231                      "/sys/devices/virtual/sec/tsp/fw_version");
232         DumpFileToFd(fd, "LSI touch status",
233                      "/sys/devices/virtual/sec/tsp/status");
234         RunCommandToFd(fd, "Mutual Raw Data",
235                        {"/vendor/bin/sh", "-c",
236                         "echo run_rawdata_read_all > /sys/devices/virtual/sec/tsp/cmd"
237                         " && cat /sys/devices/virtual/sec/tsp/cmd_result"});
238         RunCommandToFd(fd, "Mutual Raw Cap",
239                        {"/vendor/bin/sh", "-c",
240                         "echo run_rawcap_read_all > /sys/devices/virtual/sec/tsp/cmd"
241                         " && cat /sys/devices/virtual/sec/tsp/cmd_result"});
242         RunCommandToFd(fd, "Mutual Strength",
243                        {"/vendor/bin/sh", "-c",
244                         "echo run_delta_read_all > /sys/devices/virtual/sec/tsp/cmd"
245                         " && cat /sys/devices/virtual/sec/tsp/cmd_result"});
246         RunCommandToFd(fd, "Self Raw",
247                        {"/vendor/bin/sh", "-c",
248                         "echo run_self_rawcap_read_all > /sys/devices/virtual/sec/tsp/cmd"
249                         " && cat /sys/devices/virtual/sec/tsp/cmd_result"});
250         RunCommandToFd(fd, "Self Strength",
251                        {"/vendor/bin/sh", "-c",
252                         "echo run_self_delta_read_all > /sys/devices/virtual/sec/tsp/cmd"
253                         " && cat /sys/devices/virtual/sec/tsp/cmd_result"});
254     }
255     if (!access("/sys/devices/platform/soc/888000.i2c/i2c-2/2-0049", R_OK)) {
256         DumpFileToFd(fd, "STM touch firmware version",
257                      "/sys/devices/platform/soc/888000.i2c/i2c-2/2-0049/appid");
258         DumpFileToFd(fd, "STM touch status",
259                      "/sys/devices/platform/soc/888000.i2c/i2c-2/2-0049/status");
260         RunCommandToFd(fd, "Mutual Raw",
261                        {"/vendor/bin/sh", "-c",
262                         "echo 13 00 > /sys/devices/platform/soc/888000.i2c/i2c-2/2-0049/stm_fts_cmd"
263                         " && cat /sys/devices/platform/soc/888000.i2c/i2c-2/2-0049/stm_fts_cmd"});
264         RunCommandToFd(fd, "Mutual Strength",
265                        {"/vendor/bin/sh", "-c",
266                         "echo 17 > /sys/devices/platform/soc/888000.i2c/i2c-2/2-0049/stm_fts_cmd"
267                         " && cat /sys/devices/platform/soc/888000.i2c/i2c-2/2-0049/stm_fts_cmd"});
268         RunCommandToFd(fd, "Self Raw",
269                        {"/vendor/bin/sh", "-c",
270                         "echo 15 00 > /sys/devices/platform/soc/888000.i2c/i2c-2/2-0049/stm_fts_cmd"
271                         " && cat /sys/devices/platform/soc/888000.i2c/i2c-2/2-0049/stm_fts_cmd"});
272     }
273 }
274 
DumpF2FS(int fd)275 static void DumpF2FS(int fd) {
276     DumpFileToFd(fd, "F2FS", "/sys/kernel/debug/f2fs/status");
277     DumpFileToFd(fd, "F2FS - fragmentation", "/proc/fs/f2fs/dm-6/segment_info");
278 }
279 
DumpUFS(int fd)280 static void DumpUFS(int fd) {
281     DumpFileToFd(fd, "UFS model", "/sys/block/sda/device/model");
282     DumpFileToFd(fd, "UFS rev", "/sys/block/sda/device/rev");
283     DumpFileToFd(fd, "UFS size", "/sys/block/sda/size");
284     DumpFileToFd(fd, "UFS show_hba", "/sys/kernel/debug/ufshcd0/show_hba");
285     DumpFileToFd(fd, "UFS err_stats", "/sys/kernel/debug/ufshcd0/stats/err_stats");
286     DumpFileToFd(fd, "UFS io_stats", "/sys/kernel/debug/ufshcd0/stats/io_stats");
287     DumpFileToFd(fd, "UFS req_stats", "/sys/kernel/debug/ufshcd0/stats/req_stats");
288 
289     std::string bootdev = android::base::GetProperty(UFS_BOOTDEVICE, "");
290     if (!bootdev.empty()) {
291         DumpFileToFd(fd, "UFS Slow IO Read", "/sys/devices/platform/soc/" + bootdev + "/slowio_read_cnt");
292         DumpFileToFd(fd, "UFS Slow IO Write", "/sys/devices/platform/soc/" + bootdev + "/slowio_write_cnt");
293         DumpFileToFd(fd, "UFS Slow IO Unmap", "/sys/devices/platform/soc/" + bootdev + "/slowio_unmap_cnt");
294         DumpFileToFd(fd, "UFS Slow IO Sync", "/sys/devices/platform/soc/" + bootdev + "/slowio_sync_cnt");
295 
296         std::string ufs_health = "for f in $(find /sys/devices/platform/soc/" + bootdev + "/health -type f); do if [[ -r $f && -f $f ]]; then echo --- $f; cat $f; echo ''; fi; done";
297         RunCommandToFd(fd, "UFS health", {"/vendor/bin/sh", "-c", ufs_health.c_str()});
298     }
299 }
300 
DumpVibrator(int fd)301 static void DumpVibrator(int fd) {
302     const std::string dir = "/sys/class/leds/vibrator/device/";
303     const std::vector<std::string> files {
304         "comp_enable",
305         "cp_dig_scale",
306         "cp_trigger_index",
307         "cp_trigger_queue",
308         "dig_scale",
309         "f0_stored",
310         "heartbeat",
311         "leds/vibrator/activate",
312         "leds/vibrator/duration",
313         "leds/vibrator/state",
314         "num_waves",
315         "redc_stored",
316         "standby_timeout",
317     };
318 
319     for (const auto &file : files) {
320         DumpFileToFd(fd, "Vibrator", dir+file);
321     }
322 }
323 
324 // Methods from ::android::hardware::dumpstate::V1_0::IDumpstateDevice follow.
dumpstateBoard(const hidl_handle & handle)325 Return<void> DumpstateDevice::dumpstateBoard(const hidl_handle& handle) {
326     // Exit when dump is completed since this is a lazy HAL.
327     addPostCommandTask([]() {
328         exit(0);
329     });
330 
331     if (handle == nullptr || handle->numFds < 1) {
332         ALOGE("no FDs\n");
333         return Void();
334     }
335 
336     int fd = handle->data[0];
337     if (fd < 0) {
338         ALOGE("invalid FD: %d\n", handle->data[0]);
339         return Void();
340     }
341 
342     RunCommandToFd(fd, "Notify modem", {"/vendor/bin/modem_svc", "-s"}, CommandOptions::WithTimeout(1).Build());
343     RunCommandToFd(fd, "VENDOR PROPERTIES", {"/vendor/bin/getprop"});
344     DumpFileToFd(fd, "SoC serial number", "/sys/devices/soc0/serial_number");
345     DumpFileToFd(fd, "CPU present", "/sys/devices/system/cpu/present");
346     DumpFileToFd(fd, "CPU online", "/sys/devices/system/cpu/online");
347     DumpTouch(fd);
348 
349     DumpF2FS(fd);
350     DumpUFS(fd);
351 
352     DumpFileToFd(fd, "INTERRUPTS", "/proc/interrupts");
353     DumpFileToFd(fd, "Sleep Stats", "/sys/power/system_sleep/stats");
354     DumpFileToFd(fd, "Power Management Stats", "/sys/power/rpmh_stats/master_stats");
355     DumpFileToFd(fd, "WLAN Power Stats", "/d/wlan0/power_stats");
356     DumpFileToFd(fd, "LL-Stats", "/d/wlan0/ll_stats");
357     DumpFileToFd(fd, "WLAN Connect Info", "/d/wlan0/connect_info");
358     DumpFileToFd(fd, "WLAN Offload Info", "/d/wlan0/offload_info");
359     DumpFileToFd(fd, "WLAN Roaming Stats", "/d/wlan0/roam_stats");
360     DumpFileToFd(fd, "ICNSS Stats", "/d/icnss/stats");
361     DumpFileToFd(fd, "SMD Log", "/d/ipc_logging/smd/log");
362     RunCommandToFd(fd, "ION HEAPS", {"/vendor/bin/sh", "-c", "for d in $(ls -d /d/ion/*); do for f in $(ls $d); do echo --- $d/$f; cat $d/$f; done; done"});
363     DumpFileToFd(fd, "dmabuf info", "/d/dma_buf/bufinfo");
364     RunCommandToFd(fd, "Temperatures", {"/vendor/bin/sh", "-c", "for f in /sys/class/thermal/thermal* ; do type=`cat $f/type` ; temp=`cat $f/temp` ; echo \"$type: $temp\" ; done"});
365     RunCommandToFd(fd, "Cooling Device Current State", {"/vendor/bin/sh", "-c", "for f in /sys/class/thermal/cooling* ; do type=`cat $f/type` ; temp=`cat $f/cur_state` ; echo \"$type: $temp\" ; done"});
366     RunCommandToFd(
367         fd, "LMH info",
368         {"/vendor/bin/sh", "-c",
369          "for f in /sys/bus/platform/drivers/msm_lmh_dcvs/*qcom,limits-dcvs@*/lmh_freq_limit; do "
370          "state=`cat $f` ; echo \"$f: $state\" ; done"});
371     RunCommandToFd(fd, "CPU time-in-state", {"/vendor/bin/sh", "-c", "for cpu in /sys/devices/system/cpu/cpu*; do f=$cpu/cpufreq/stats/time_in_state; if [ ! -f $f ]; then continue; fi; echo $f:; cat $f; done"});
372     RunCommandToFd(fd, "CPU cpuidle", {"/vendor/bin/sh", "-c", "for cpu in /sys/devices/system/cpu/cpu*; do for d in $cpu/cpuidle/state*; do if [ ! -d $d ]; then continue; fi; echo \"$d: `cat $d/name` `cat $d/desc` `cat $d/time` `cat $d/usage`\"; done; done"});
373     RunCommandToFd(fd, "Easel debug info", {"/vendor/bin/sh", "-c", "for f in `ls /sys/devices/platform/soc/a88000.i2c/i2c-0/0-0066/@(*curr|temperature|vbat|total_power)`; do echo \"$f: `cat $f`\" ; done; file=/sys/devices/virtual/misc/mnh_sm/state; echo \"$file: `cat $file`\""});
374     DumpFileToFd(fd, "MDP xlogs", "/data/vendor/display/mdp_xlog");
375     DumpFileToFd(fd, "TCPM logs", "/d/tcpm/usbpd0");
376     DumpFileToFd(fd, "PD Engine", "/d/logbuffer/usbpd");
377     DumpFileToFd(fd, "smb-lib", "/d/logbuffer/smblib");
378     DumpFileToFd(fd, "ipc-local-ports", "/d/msm_ipc_router/dump_local_ports");
379     DumpFileToFd(fd, "ipc-servers", "/d/msm_ipc_router/dump_servers");
380     RunCommandToFd(fd, "ipc-logs",
381                    {"/vendor/bin/sh", "-c",
382                     "for f in `ls /d/ipc_logging/*_IPCRTR/log` ; do echo \"------ $f\\n`cat "
383                     "$f`\\n\" ; done"});
384     RunCommandToFd(fd, "USB Device Descriptors", {"/vendor/bin/sh", "-c", "cd /sys/bus/usb/devices/1-1 && cat product && cat bcdDevice; cat descriptors | od -t x1 -w16 -N96"});
385     RunCommandToFd(fd, "Power supply properties", {"/vendor/bin/sh", "-c", "for f in `ls /sys/class/power_supply/*/uevent` ; do echo \"------ $f\\n`cat $f`\\n\" ; done"});
386     RunCommandToFd(fd, "PMIC Votables", {"/vendor/bin/sh", "-c", "cat /sys/kernel/debug/pmic-votable/*/status"});
387     DumpFileToFd(fd, "Battery cycle count", "/sys/class/power_supply/bms/device/cycle_counts_bins");
388     DumpFileToFd(fd, "FG cycle count", "/sys/class/power_supply/maxfg/cycle_counts_bins");
389     DumpFileToFd(fd, "Maxim FG History", "/dev/maxfg_history");
390     DumpFileToFd(fd, "Maxim FG registers", "/d/regmap/4-0036/registers");
391     DumpFileToFd(fd, "Maxim FG NV RAM", "/d/regmap/4-000b/registers");
392     RunCommandToFd(fd, "QCOM FG SRAM", {"/vendor/bin/sh", "-c", "echo 0 > /d/fg/sram/address ; echo 500 > /d/fg/sram/count ; cat /d/fg/sram/data"});
393     DumpFileToFd(fd, "WLC VER", "/sys/devices/platform/soc/a88000.i2c/i2c-0/0-0061/version");
394     DumpFileToFd(fd, "WLC STATUS", "/sys/devices/platform/soc/a88000.i2c/i2c-0/0-0061/status");
395 
396     RunCommandToFd(fd, "eSIM Status", {"/vendor/bin/sh", "-c", "od -t x1 /sys/firmware/devicetree/base/chosen/cdt/cdb2/esim"});
397     DumpFileToFd(fd, "Modem Stat", "/data/vendor/modem_stat/debug.txt");
398     DumpFileToFd(fd, "Pixel trace", "/d/tracing/instances/pixel-trace/trace");
399 
400     // Slower dump put later in case stuck the rest of dump
401     // Timeout after 3s as TZ log missing EOF
402     RunCommandToFd(fd, "QSEE logs", {"/vendor/bin/sh", "-c", "/vendor/bin/timeout 3 cat /d/tzdbg/qsee_log"});
403     if (handle->numFds < 2) {
404         ALOGE("no FD for modem\n");
405     } else {
406         int fdModem = handle->data[1];
407         dumpModem(fd, fdModem);
408     }
409 
410     // Citadel info (only enabled on -eng and -userdebug builds)
411     if (!PropertiesHelper::IsUserBuild()) {
412         RunCommandToFd(fd, "Citadel ID", {"/vendor/bin/hw/citadel_updater", "--id"});
413         RunCommandToFd(fd, "Citadel VER", {"/vendor/bin/hw/citadel_updater", "-lv"});
414         RunCommandToFd(fd, "Citadel SELFTEST", {"/vendor/bin/hw/citadel_updater", "--selftest"});
415     }
416 
417     DumpVibrator(fd);
418 
419     // Dump various events in WiFi data path
420     DumpFileToFd(fd, "WLAN DP Trace", "/d/wlan/dpt_stats/dump_set_dpt_logs");
421 
422     // Keep this at the end as very long on not for humans
423     DumpFileToFd(fd, "WLAN FW Log Symbol Table", "/vendor/firmware/Data.msc");
424 
425     return Void();
426 }
427 
428 }  // namespace implementation
429 }  // namespace V1_0
430 }  // namespace dumpstate
431 }  // namespace hardware
432 }  // namespace android
433