Skip to content

Commit

Permalink
Merge "dumpstate: Support dump TEMP/TRICKLE/DWELL-DEFEND setting" int…
Browse files Browse the repository at this point in the history
…o rvc-qpr-dev
  • Loading branch information
Jenny Ho authored and Android (Google) Code Review committed Dec 11, 2020
2 parents a577bc8 + 3ac2362 commit abaf36f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dumpstate/DumpstateDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,9 @@ Return<DumpstateStatus> DumpstateDevice::dumpstateBoard_1_1(const hidl_handle& h
DumpFileToFd(fd, "TCPM logs", "/d/tcpm/usbpd0");
DumpFileToFd(fd, "PD Engine", "/d/logbuffer/usbpd");
DumpFileToFd(fd, "ipc-local-ports", "/d/msm_ipc_router/dump_local_ports");
RunCommandToFd(fd, "TRICKLE-DEFEND Config", {"/vendor/bin/sh", "-c", " cd /sys/devices/platform/soc/soc:google,battery/power_supply/battery/; echo \"bd_trickle_enable: `cat bd_trickle_enable`\"; echo \"bd_trickle_cnt: `cat bd_trickle_cnt`\"; echo \"bd_trickle_recharge_soc: `cat bd_trickle_recharge_soc`\"; echo \"bd_trickle_dry_run: `cat bd_trickle_dry_run`\";"});
RunCommandToFd(fd, "DWELL-DEFEND Config", {"/vendor/bin/sh", "-c", " cd /sys/devices/platform/soc/soc:google,charger/; for f in `ls charge_s*` ; do echo \"$f: `cat $f`\" ; done"});
RunCommandToFd(fd, "TEMP-DEFEND Config", {"/vendor/bin/sh", "-c", " cd /sys/devices/platform/soc/soc:google,charger/; for f in `ls bd_*` ; do echo \"$f: `cat $f`\" ; done"});
RunCommandToFd(fd, "USB Device Descriptors", {"/vendor/bin/sh", "-c", "cd /sys/bus/usb/devices/1-1 && cat product && cat bcdDevice; cat descriptors | od -t x1 -w16 -N96"});
RunCommandToFd(fd, "Power supply properties", {"/vendor/bin/sh", "-c", "for f in `ls /sys/class/power_supply/*/uevent` ; do echo \"------ $f\\n`cat $f`\\n\" ; done"});
RunCommandToFd(fd, "PMIC Votables", {"/vendor/bin/sh", "-c", "cat /sys/kernel/debug/pmic-votable/*/status"});
Expand Down
16 changes: 16 additions & 0 deletions init.hardware.rc
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,22 @@ on init && property:vendor.skip.init=0
# Battery Defender
chown system system /sys/devices/platform/soc/soc:google,charger/charge_stop_level
chown system system /sys/devices/platform/soc/soc:google,charger/charge_start_level
chown system system /sys/devices/platform/soc/soc:google,charger/bd_drainto_soc
chown system system /sys/devices/platform/soc/soc:google,charger/bd_recharge_soc
chown system system /sys/devices/platform/soc/soc:google,charger/bd_recharge_voltage
chown system system /sys/devices/platform/soc/soc:google,charger/bd_resume_abs_temp
chown system system /sys/devices/platform/soc/soc:google,charger/bd_resume_soc
chown system system /sys/devices/platform/soc/soc:google,charger/bd_resume_temp
chown system system /sys/devices/platform/soc/soc:google,charger/bd_resume_time
chown system system /sys/devices/platform/soc/soc:google,charger/bd_trigger_temp
chown system system /sys/devices/platform/soc/soc:google,charger/bd_trigger_time
chown system system /sys/devices/platform/soc/soc:google,charger/bd_trigger_voltage
chown system system /sys/devices/platform/soc/soc:google,charger/bd_temp_enable
chown system system /sys/devices/platform/soc/soc:google,charger/bd_temp_dry_run
chown system system /sys/devices/platform/soc/soc:google,battery/power_supply/battery/bd_trickle_enable
chown system system /sys/devices/platform/soc/soc:google,battery/power_supply/battery/bd_trickle_recharge_soc
chown system system /sys/devices/platform/soc/soc:google,battery/power_supply/battery/bd_trickle_cnt
chown system system /sys/devices/platform/soc/soc:google,battery/power_supply/battery/bd_trickle_dry_run

# Charge stats (write 0)
chown system system /sys/class/power_supply/battery/charge_stats
Expand Down

0 comments on commit abaf36f

Please sign in to comment.