mirror of
https://github.com/Evolution-X-Devices/device_google_wahoo
synced 2026-02-01 03:40:35 +00:00
Merge "dumpstate: Add battery cycle count to bugreport" into oc-dr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
6149ab3aea
@@ -231,6 +231,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();
|
||||
};
|
||||
|
||||
|
||||
@@ -452,6 +452,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