Merge "Add qsee_log to dumpstate" into pi-dev

This commit is contained in:
Andrew LeCain
2018-03-20 00:04:01 +00:00
committed by Android (Google) Code Review
5 changed files with 8 additions and 6 deletions

View File

@@ -261,12 +261,7 @@ Return<void> DumpstateDevice::dumpstateBoard(const hidl_handle& handle) {
DumpFileToFd(fd, "WLAN FW Log Symbol Table", "/vendor/firmware/Data.msc");
DumpTouch(fd);
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"});
/* Check if qsee_logger tool exists */
if (!access("/vendor/bin/qsee_logger", X_OK)) {
RunCommandToFd(fd, "FP LOGS", {"qsee_logger", "-d"});
}
RunCommandToFd(fd, "QSEE logs", {"/vendor/bin/sh", "-c", "cat /d/tzdbg/qsee_log"});
DumpFileToFd(fd, "Battery type", "/sys/class/power_supply/bms/battery_type");
RunCommandToFd(fd, "Battery cycle count", {"/vendor/bin/sh", "-c", "for f in 1 2 3 4 5 6 7 8 ; do echo $f > /sys/class/power_supply/bms/cycle_count_id; count=`cat /sys/class/power_supply/bms/cycle_count`; echo \"$f: $count\"; done"});

View File

@@ -2,3 +2,6 @@ service vendor.dumpstate-1-0 /vendor/bin/hw/android.hardware.dumpstate@1.0-servi
class hal
user system
group system
on boot
chmod 0444 /sys/kernel/debug/tzdbg/qsee_log

View File

@@ -32,6 +32,7 @@ type debugfs_mdp, debugfs_type, fs_type;
type debugfs_icnss, debugfs_type, fs_type;
type debugfs_ufs, debugfs_type, fs_type;
type debugfs_dma_bufinfo, debugfs_type, fs_type;
type debugfs_tzdbg, debugfs_type, fs_type;
# /proc
type proc_wifi_dbg, fs_type;

View File

@@ -98,3 +98,4 @@ genfscon debugfs /icnss u:object_r:debugfs_icnss:s
genfscon debugfs /ufshcd0 u:object_r:debugfs_ufs:s0
genfscon debugfs /dma_buf/bufinfo u:object_r:debugfs_dma_bufinfo:s0
genfscon debugfs /tzdbg u:object_r:debugfs_tzdbg:s0

View File

@@ -19,6 +19,8 @@ userdebug_or_eng(`
allow hal_dumpstate_impl netmgr_data_file:file r_file_perms;
allow hal_dumpstate_impl debugfs_ipc:dir r_dir_perms;
allow hal_dumpstate_impl debugfs_ipc:file r_file_perms;
allow hal_dumpstate_impl debugfs_tzdbg:dir search;
allow hal_dumpstate_impl debugfs_tzdbg:file r_file_perms;
allow hal_dumpstate_impl sysfs_usb_device:dir r_dir_perms;
allow hal_dumpstate_impl sysfs_usb_device:file r_file_perms;
allow hal_dumpstate_impl sysfs_msm_subsys:file write;