summaryrefslogtreecommitdiff
path: root/init.hardware.rc
diff options
context:
space:
mode:
authorJack Wu <wjack@google.com>2021-03-19 21:51:18 +0800
committerJack Wu <wjack@google.com>2021-03-19 22:01:51 +0800
commit47c462c85ab24fc6a386fa51e4de18b09e3a141f (patch)
tree451761064c5d38fa5fe0619ea89403fba1b97520 /init.hardware.rc
parent5673322f14cc994ada798c94510e9f64834a37b1 (diff)
init: set ownership of cycle_counts_bins at early-boot
Bug: 183127349 Test: no Permission denied for read/write cycle_counts_bins Signed-off-by: Jack Wu <wjack@google.com> Change-Id: I89f0258b4bbfd9e60a06f7dcd55823b68a27ed8c
Diffstat (limited to 'init.hardware.rc')
-rw-r--r--init.hardware.rc12
1 files changed, 6 insertions, 6 deletions
diff --git a/init.hardware.rc b/init.hardware.rc
index 3cc34c71..fd4301df 100644
--- a/init.hardware.rc
+++ b/init.hardware.rc
@@ -398,6 +398,12 @@ on early-boot
chown system system /sys/devices/platform/soc/a88000.i2c/i2c-0/0-0061/txlen
chown system system /sys/devices/platform/soc/a88000.i2c/i2c-0/0-0061/ccreset
+ # FG cycle counts read from dumpstate + backup restore from health HAL
+ chown system system /sys/devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-00/c440000.qcom,spmi:qcom,pm660@0:qpnp,fg/cycle_counts_bins
+
+ # HardwareInfo needs to be able to read CC bins
+ chmod 644 /sys/devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-00/c440000.qcom,spmi:qcom,pm660@0:qpnp,fg/cycle_counts_bins
+
# Permission for Pixelstats
chown system system /sys/devices/platform/soc/7c4000.sdhci/mmc_host/mmc0/slowio_read_cnt
chown system system /sys/devices/platform/soc/7c4000.sdhci/mmc_host/mmc0/slowio_write_cnt
@@ -513,12 +519,6 @@ on property:sys.boot_completed=1
chown system system /d/fg/sram/count
chown system system /d/fg/sram/address
- # Dump QCOM FG cycle counts for dumpstate
- chown system system /sys/devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-00/c440000.qcom,spmi:qcom,pm660@0:qpnp,fg/cycle_counts_bins
-
- # HardwareInfo needs to be able to read CC bins
- chmod 644 /sys/devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-00/c440000.qcom,spmi:qcom,pm660@0:qpnp,fg/cycle_counts_bins
-
# dumpstate needs to read, vendor.health-hal needs to be able to RW
chown system system /sys/devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-00/c440000.qcom,spmi:qcom,pm660@0:qpnp,fg/power_supply/bms/charge_full