mirror of
https://github.com/Evolution-X-Devices/device_google_wahoo
synced 2026-02-01 07:50:47 +00:00
Add UFS health information into board specific dumpstate
am: 4fa2c7c8b8
Change-Id: Ia7496398aacb537200ed1751950a80d3ff52aac0
This commit is contained in:
@@ -185,6 +185,7 @@ Return<void> DumpstateDevice::dumpstateBoard(const hidl_handle& handle) {
|
||||
DumpFileToFd(fd, "UFS model", "/sys/block/sda/device/model");
|
||||
DumpFileToFd(fd, "UFS rev", "/sys/block/sda/device/rev");
|
||||
DumpFileToFd(fd, "UFS size", "/sys/block/sda/size");
|
||||
RunCommandToFd(fd, "UFS health", {"/vendor/bin/sh", "-c", "for f in $(find /sys/kernel/debug/ufshcd0 -type f); do if [[ -r $f && -f $f ]]; then echo --- $f; cat $f; fi; done"});
|
||||
DumpFileToFd(fd, "INTERRUPTS", "/proc/interrupts");
|
||||
DumpFileToFd(fd, "RPM Stats", "/d/rpm_stats");
|
||||
DumpFileToFd(fd, "Power Management Stats", "/d/rpm_master_stats");
|
||||
|
||||
@@ -583,6 +583,19 @@ on property:sys.boot_completed=1
|
||||
write /dev/cpuset/application/background/cpus 0-1
|
||||
write /dev/cpuset/application/cpus 0-1,4-5
|
||||
|
||||
# UFS health
|
||||
chmod 755 /sys/kernel/debug/ufshcd0
|
||||
chown 644 /sys/kernel/debug/ufshcd0/err_state
|
||||
chmod 644 /sys/kernel/debug/ufshcd0/power_mode
|
||||
chmod 644 /sys/kernel/debug/ufshcd0/host_regs
|
||||
chmod 644 /sys/kernel/debug/ufshcd0/show_hba
|
||||
chmod 644 /sys/kernel/debug/ufshcd0/dump_device_desc
|
||||
chmod 644 /sys/kernel/debug/ufshcd0/dump_health_desc
|
||||
chmod 755 /sys/kernel/debug/ufshcd0/stats
|
||||
chmod 644 /sys/kernel/debug/ufshcd0/stats/req_stats
|
||||
chmod 644 /sys/kernel/debug/ufshcd0/stats/query_stats
|
||||
chmod 644 /sys/kernel/debug/ufshcd0/stats/err_stats
|
||||
|
||||
on property:init.svc.per_mgr=running
|
||||
start per_proxy
|
||||
|
||||
|
||||
1
sepolicy/vendor/file.te
vendored
1
sepolicy/vendor/file.te
vendored
@@ -27,6 +27,7 @@ type debugfs_usb, debugfs_type, fs_type;
|
||||
type debugfs_wlan, debugfs_type, fs_type;
|
||||
type debugfs_mdp, debugfs_type, fs_type;
|
||||
type debugfs_icnss, debugfs_type, fs_type;
|
||||
type debugfs_ufs, debugfs_type, fs_type;
|
||||
|
||||
# /proc
|
||||
type proc_wifi_dbg, fs_type;
|
||||
|
||||
1
sepolicy/vendor/genfs_contexts
vendored
1
sepolicy/vendor/genfs_contexts
vendored
@@ -85,3 +85,4 @@ genfscon debugfs /msm_ipc_router u:object_r:debugfs_ipc:s0
|
||||
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 /ufshcd0 u:object_r:debugfs_ufs:s0
|
||||
|
||||
2
sepolicy/vendor/hal_dumpstate_impl.te
vendored
2
sepolicy/vendor/hal_dumpstate_impl.te
vendored
@@ -45,6 +45,8 @@ allow hal_dumpstate_impl debugfs_icnss:dir r_dir_perms;
|
||||
allow hal_dumpstate_impl debugfs_icnss:file r_file_perms;
|
||||
allow hal_dumpstate_impl debugfs_ipc:file r_file_perms;
|
||||
allow hal_dumpstate_impl proc_stat:file r_file_perms;
|
||||
allow hal_dumpstate_impl debugfs_ufs:dir r_dir_perms;
|
||||
allow hal_dumpstate_impl debugfs_ufs:file r_file_perms;
|
||||
|
||||
# Access to files for dumping
|
||||
allow hal_dumpstate_impl sysfs:dir r_dir_perms;
|
||||
|
||||
Reference in New Issue
Block a user