Skip to content

Commit

Permalink
Merge "dumpstate: add battery eeprom to dumpstate" into qt-qpr1-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
TreeHugger Robot authored and Android (Google) Code Review committed Feb 25, 2020
2 parents 5e04973 + 06f1f3b commit 97ba9dc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions dumpstate/DumpstateDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,7 @@ Return<void> DumpstateDevice::dumpstateBoard(const hidl_handle& handle) {
RunCommandToFd(fd, "PMIC Votables", {"/vendor/bin/sh", "-c", "cat /sys/kernel/debug/pmic-votable/*/status"});
RunCommandToFd(fd, "Google Charger", {"/vendor/bin/sh", "-c", "cd /d/google_charger/; for f in `ls pps_*` ; do echo \"$f: `cat $f`\" ; done"});
RunCommandToFd(fd, "Google Battery", {"/vendor/bin/sh", "-c", "cd /d/google_battery/; for f in `ls ssoc_*` ; do echo \"$f: `cat $f`\" ; done"});
RunCommandToFd(fd, "Battery EEPROM", {"/vendor/bin/sh", "-c", "xxd /sys/devices/platform/soc/a8c000.i2c/i2c-2/2-0050/2-00500/nvmem"});
DumpFileToFd(fd, "BMS", "/d/logbuffer/ssoc");
DumpFileToFd(fd, "smblib", "/d/logbuffer/smblib");
DumpFileToFd(fd, "TTF", "/d/logbuffer/ttf");
Expand Down
4 changes: 4 additions & 0 deletions init.hardware.rc
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,10 @@ on early-boot
# FG cycle count read from dumpstate + backup restore from health HAL (and pixelstats)
chown system system /sys/class/power_supply/maxfg/cycle_counts_bins

# Permission for battery eeprom
chown system system /sys/devices/platform/soc/a8c000.i2c/i2c-2/2-0050/2-00500/nvmem
chmod 0640 /sys/devices/platform/soc/a8c000.i2c/i2c-2/2-0050/2-00500/nvmem

# Permission for Pixelstats
chown system system /sys/class/misc/msm_cirrus_playback/resistance_left_right
chown system system /sys/devices/platform/soc/${ro.boot.bootdevice}/slowio_read_cnt
Expand Down

0 comments on commit 97ba9dc

Please sign in to comment.