Skip to content

Commit

Permalink
dumpstate: add battery eeprom to dumpstate
Browse files Browse the repository at this point in the history
Bug: 149979769
Test: trigger dumpstate and check battery eeprom data
Change-Id: I390bcf599fd232371963b8a3b2cfb282dca05808
Signed-off-by: Wasb Liu <[email protected]>
  • Loading branch information
Wasb Liu committed Feb 21, 2020
1 parent cb72401 commit 06f1f3b
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 06f1f3b

Please sign in to comment.