George Lee 66547716ae gs-common: Add BrownoutDetection app
This app files bugreport for user-debug build with reboot reason = ocp
or uvlo.  Removed the dependency on BetterBug.

Bug: 237287659
Test: Ensure bugreport is generated under user-debug build with reboot
reason = ocp or uvlo.
Change-Id: Ieaa4d02ea10413b3b7c0e314b5deb07d38d98a80
Signed-off-by: George Lee <geolee@google.com>
2022-11-15 02:57:48 +00:00

94 lines
3.0 KiB
Plaintext

on property:vendor.thermal.link_ready=1
mkdir /data/vendor/mitigation 0755 system system
chown system system /data/vendor/mitigation
start vendor.battery_mitigation
on property:ro.boot.bootreason=reboot,uvlo,pmic,if
setprop vendor.brownout_reason "uvlo,pmic,if"
on property:ro.boot.bootreason=reboot,ocp,pmic,if
setprop vendor.brownout_reason "ocp,pmic,if"
on property:ro.boot.bootreason=reboot,uvlo,pmic,main
setprop vendor.brownout_reason "uvlo,pmic,main"
on property:ro.boot.bootreason=reboot,uvlo,pmic,sub
setprop vendor.brownout_reason "uvlo,pmic,sub"
on property:ro.boot.bootreason=reboot,ocp,buck1m
setprop vendor.brownout_reason "ocp,buck1m"
on property:ro.boot.bootreason=reboot,ocp,buck2m
setprop vendor.brownout_reason "ocp,buck2m"
on property:ro.boot.bootreason=reboot,ocp,buck3m
setprop vendor.brownout_reason "ocp,buck3m"
on property:ro.boot.bootreason=reboot,ocp,buck4m
setprop vendor.brownout_reason "ocp,buck4m"
on property:ro.boot.bootreason=reboot,ocp,buck5m
setprop vendor.brownout_reason "ocp,buck5m"
on property:ro.boot.bootreason=reboot,ocp,buck6m
setprop vendor.brownout_reason "ocp,buck6m"
on property:ro.boot.bootreason=reboot,ocp,buck7m
setprop vendor.brownout_reason "ocp,buck7m"
on property:ro.boot.bootreason=reboot,ocp,buck8m
setprop vendor.brownout_reason "ocp,buck8m"
on property:ro.boot.bootreason=reboot,ocp,buck9m
setprop vendor.brownout_reason "ocp,buck9m"
on property:ro.boot.bootreason=reboot,ocp,buck10m
setprop vendor.brownout_reason "ocp,buck10m"
on property:ro.boot.bootreason=reboot,ocp,buck1s
setprop vendor.brownout_reason "ocp,buck1s"
on property:ro.boot.bootreason=reboot,ocp,buck2s
setprop vendor.brownout_reason "ocp,buck2s"
on property:ro.boot.bootreason=reboot,ocp,buck3s
setprop vendor.brownout_reason "ocp,buck3s"
on property:ro.boot.bootreason=reboot,ocp,buck4s
setprop vendor.brownout_reason "ocp,buck4s"
on property:ro.boot.bootreason=reboot,ocp,buck5s
setprop vendor.brownout_reason "ocp,buck5s"
on property:ro.boot.bootreason=reboot,ocp,buck6s
setprop vendor.brownout_reason "ocp,buck6s"
on property:ro.boot.bootreason=reboot,ocp,buck7s
setprop vendor.brownout_reason "ocp,buck7s"
on property:ro.boot.bootreason=reboot,ocp,buck8s
setprop vendor.brownout_reason "ocp,buck8s"
on property:ro.boot.bootreason=reboot,ocp,buck9s
setprop vendor.brownout_reason "ocp,buck9s"
on property:ro.boot.bootreason=reboot,ocp,buck10s
setprop vendor.brownout_reason "ocp,buck10s"
on property:ro.boot.bootreason=reboot,ocp,buckds
setprop vendor.brownout_reason "ocp,buckds"
on property:ro.boot.bootreason=reboot,ocp,buckas
setprop vendor.brownout_reason "ocp,buckas"
on property:ro.boot.bootreason=reboot,ocp,buckcs
setprop vendor.brownout_reason "ocp,buckcs"
on property:ro.boot.bootreason=reboot,ocp,buckbs
setprop vendor.brownout_reason "ocp,buckbs"
service vendor.battery_mitigation /vendor/bin/hw/battery_mitigation
user system
group system
capabilities WAKE_ALARM BLOCK_SUSPEND