diff options
-rwxr-xr-x | dumpstate/DumpstateDevice.cpp | 6 | ||||
-rw-r--r-- | dumpstate/android.hardware.dumpstate@1.0-service.crosshatch.rc | 3 | ||||
-rw-r--r-- | sepolicy/vendor/file.te | 1 | ||||
-rw-r--r-- | sepolicy/vendor/genfs_contexts | 1 | ||||
-rw-r--r-- | sepolicy/vendor/hal_dumpstate_impl.te | 2 |
5 files changed, 8 insertions, 5 deletions
diff --git a/dumpstate/DumpstateDevice.cpp b/dumpstate/DumpstateDevice.cpp index bb298c82..05bbbee7 100755 --- a/dumpstate/DumpstateDevice.cpp +++ b/dumpstate/DumpstateDevice.cpp @@ -286,11 +286,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"}); return Void(); }; diff --git a/dumpstate/android.hardware.dumpstate@1.0-service.crosshatch.rc b/dumpstate/android.hardware.dumpstate@1.0-service.crosshatch.rc index 4acaeee3..72976ca7 100644 --- a/dumpstate/android.hardware.dumpstate@1.0-service.crosshatch.rc +++ b/dumpstate/android.hardware.dumpstate@1.0-service.crosshatch.rc @@ -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 diff --git a/sepolicy/vendor/file.te b/sepolicy/vendor/file.te index 461d2ed7..e45661f1 100644 --- a/sepolicy/vendor/file.te +++ b/sepolicy/vendor/file.te @@ -35,6 +35,7 @@ type debugfs_mdp, debugfs_type, fs_type; type debugfs_icnss, debugfs_type, fs_type; type debugfs_f2fs, 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; diff --git a/sepolicy/vendor/genfs_contexts b/sepolicy/vendor/genfs_contexts index 15b88425..c77160be 100644 --- a/sepolicy/vendor/genfs_contexts +++ b/sepolicy/vendor/genfs_contexts @@ -97,5 +97,6 @@ genfscon debugfs /mdp u:object_r:debugfs_mdp:s0 genfscon debugfs /rmt_storage u:object_r:debugfs_rmt_storage:s0 genfscon debugfs /icnss u:object_r:debugfs_icnss:s0 genfscon debugfs /f2fs u:object_r:debugfs_f2fs:s0 +genfscon debugfs /tzdbg u:object_r:debugfs_tzdbg:s0 genfscon debugfs /dma_buf/bufinfo u:object_r:debugfs_dma_bufinfo:s0 diff --git a/sepolicy/vendor/hal_dumpstate_impl.te b/sepolicy/vendor/hal_dumpstate_impl.te index 3391fdd8..2edc914f 100644 --- a/sepolicy/vendor/hal_dumpstate_impl.te +++ b/sepolicy/vendor/hal_dumpstate_impl.te @@ -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 ssr_log_file:dir search; |