mirror of
https://github.com/Evolution-X-Devices/device_google_wahoo
synced 2026-02-01 07:50:47 +00:00
dumpstate: Add battery cycle count to bugreport
Bug: 63841211 Test: Verify cycle count metrics are present in bugreport Change-Id: I7c6a3af3ef687c99f88de5ee1c4d7433b618772e
This commit is contained in:
@@ -207,6 +207,7 @@ Return<void> DumpstateDevice::dumpstateBoard(const hidl_handle& handle) {
|
||||
RunCommandToFd(fd, "FP LOGS", {"qsee_logger", "-d"});
|
||||
}
|
||||
|
||||
RunCommandToFd(fd, "Battery cycle count", {"/vendor/bin/sh", "-c", "for f in 1 2 3 4 5 6 7 8 ; do echo $f > /sys/class/power_supply/bms/cycle_count_id; count=`cat /sys/class/power_supply/bms/cycle_count`; echo \"$f: $count\"; done"});
|
||||
return Void();
|
||||
};
|
||||
|
||||
|
||||
@@ -437,6 +437,10 @@ on boot
|
||||
# Wifi firmware reload path
|
||||
chown wifi wifi /sys/module/wlan/parameters/fwpath
|
||||
|
||||
# Allow system to write to cycle_count_id to iterate and get stats
|
||||
chown system system /sys/class/power_supply/bms/cycle_count_id
|
||||
chmod 0660 /sys/class/power_supply/bms/cycle_count_id
|
||||
|
||||
# default country code
|
||||
setprop ro.boot.wificountrycode 00
|
||||
|
||||
|
||||
1
sepolicy/vendor/hal_dumpstate_impl.te
vendored
1
sepolicy/vendor/hal_dumpstate_impl.te
vendored
@@ -23,6 +23,7 @@ userdebug_or_eng(`
|
||||
allow hal_dumpstate_impl debugfs_ipc:file r_file_perms;
|
||||
allow hal_dumpstate_impl sysfs_usb_device:dir r_dir_perms;
|
||||
allow hal_dumpstate_impl sysfs_usb_device:file r_file_perms;
|
||||
allow hal_dumpstate_impl sysfs_msm_subsys:file write;
|
||||
|
||||
set_prop(hal_dumpstate_impl, modem_diag_prop)
|
||||
')
|
||||
|
||||
Reference in New Issue
Block a user