dumpstate: eeprom and fix the permission problem
Bug: 200119012 Change-Id: I753ab06c819f6b1c739a87f27785bcdab05282b6 Signed-off-by: Ted Lin <tedlin@google.com>
This commit is contained in:
parent
184fe31622
commit
270a005cb4
2 changed files with 5 additions and 1 deletions
|
@ -405,10 +405,13 @@ void DumpstateDevice::dumpPowerSection(int fd) {
|
|||
/* EEPROM State */
|
||||
if (!stat("/sys/devices/platform/10970000.hsi2c/i2c-4/4-0050/eeprom", &buffer)) {
|
||||
RunCommandToFd(fd, "Battery EEPROM", {"/vendor/bin/sh", "-c", "xxd /sys/devices/platform/10970000.hsi2c/i2c-4/4-0050/eeprom"});
|
||||
} else {
|
||||
} else if (!stat("/sys/devices/platform/10970000.hsi2c/i2c-5/5-0050/eeprom", &buffer)) {
|
||||
RunCommandToFd(fd, "Battery EEPROM", {"/vendor/bin/sh", "-c", "xxd /sys/devices/platform/10970000.hsi2c/i2c-5/5-0050/eeprom"});
|
||||
} else if (!stat("/sys/devices/platform/10da0000.hsi2c/i2c-6/6-0050/eeprom", &buffer)) {
|
||||
RunCommandToFd(fd, "Battery EEPROM", {"/vendor/bin/sh", "-c", "xxd /sys/devices/platform/10da0000.hsi2c/i2c-6/6-0050/eeprom"});
|
||||
}
|
||||
|
||||
|
||||
DumpFileToFd(fd, "Charger Stats", "/sys/class/power_supply/battery/charge_details");
|
||||
if (!PropertiesHelper::IsUserBuild()) {
|
||||
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