dumpstate: update dump eeprom path
avoid using * for sysfs permission Bug: 182531832 Signed-off-by: Jenny Ho <hsiufangho@google.com> Change-Id: I8346bc09e82811a9006aae6d1b2d83d31a7e0a62
This commit is contained in:
parent
a27563b2f4
commit
3d46be281d
1 changed files with 6 additions and 5 deletions
|
@ -358,11 +358,12 @@ void DumpstateDevice::dumpPowerSection(int fd) {
|
||||||
"regs=`cat $f/registers`; echo $f: ;"
|
"regs=`cat $f/registers`; echo $f: ;"
|
||||||
"echo \"$regs\"; done"});
|
"echo \"$regs\"; done"});
|
||||||
|
|
||||||
/* Nvmem State */
|
/* EEPROM State */
|
||||||
RunCommandToFd(fd, "nvmem dump", {"/vendor/bin/sh", "-c",
|
if (!stat("/sys/devices/platform/10970000.hsi2c/i2c-4/4-0050/eeprom", &buffer)) {
|
||||||
"for f in /sys/devices/platform/10970000.hsi2c/i2c-*/*-0050 ; do "
|
RunCommandToFd(fd, "Battery EEPROM", {"/vendor/bin/sh", "-c", "xxd /sys/devices/platform/10970000.hsi2c/i2c-4/4-0050/eeprom"});
|
||||||
"regs=`cat $f/eeprom | xxd`; echo $f: ;"
|
} else {
|
||||||
"echo \"$regs\"; done"});
|
RunCommandToFd(fd, "Battery EEPROM", {"/vendor/bin/sh", "-c", "xxd /sys/devices/platform/10970000.hsi2c/i2c-5/5-0050/eeprom"});
|
||||||
|
}
|
||||||
|
|
||||||
DumpFileToFd(fd, "Charger Stats", "/sys/class/power_supply/battery/charge_details");
|
DumpFileToFd(fd, "Charger Stats", "/sys/class/power_supply/battery/charge_details");
|
||||||
RunCommandToFd(fd, "Google Charger", {"/vendor/bin/sh", "-c", "cd /sys/kernel/debug/google_charger/; "
|
RunCommandToFd(fd, "Google Charger", {"/vendor/bin/sh", "-c", "cd /sys/kernel/debug/google_charger/; "
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue