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>
This commit is contained in:
parent
30b4bba516
commit
66547716ae
@ -4,88 +4,88 @@ on property:vendor.thermal.link_ready=1
|
||||
start vendor.battery_mitigation
|
||||
|
||||
on property:ro.boot.bootreason=reboot,uvlo,pmic,if
|
||||
setprop vendor.startup_bugreport_requested 1
|
||||
setprop vendor.brownout_reason "uvlo,pmic,if"
|
||||
|
||||
on property:ro.boot.bootreason=reboot,ocp,pmic,if
|
||||
setprop vendor.startup_bugreport_requested 1
|
||||
setprop vendor.brownout_reason "ocp,pmic,if"
|
||||
|
||||
on property:ro.boot.bootreason=reboot,uvlo,pmic,main
|
||||
setprop vendor.startup_bugreport_requested 1
|
||||
setprop vendor.brownout_reason "uvlo,pmic,main"
|
||||
|
||||
on property:ro.boot.bootreason=reboot,uvlo,pmic,sub
|
||||
setprop vendor.startup_bugreport_requested 1
|
||||
setprop vendor.brownout_reason "uvlo,pmic,sub"
|
||||
|
||||
on property:ro.boot.bootreason=reboot,ocp,buck1m
|
||||
setprop vendor.startup_bugreport_requested 1
|
||||
setprop vendor.brownout_reason "ocp,buck1m"
|
||||
|
||||
on property:ro.boot.bootreason=reboot,ocp,buck2m
|
||||
setprop vendor.startup_bugreport_requested 1
|
||||
setprop vendor.brownout_reason "ocp,buck2m"
|
||||
|
||||
on property:ro.boot.bootreason=reboot,ocp,buck3m
|
||||
setprop vendor.startup_bugreport_requested 1
|
||||
setprop vendor.brownout_reason "ocp,buck3m"
|
||||
|
||||
on property:ro.boot.bootreason=reboot,ocp,buck4m
|
||||
setprop vendor.startup_bugreport_requested 1
|
||||
setprop vendor.brownout_reason "ocp,buck4m"
|
||||
|
||||
on property:ro.boot.bootreason=reboot,ocp,buck5m
|
||||
setprop vendor.startup_bugreport_requested 1
|
||||
setprop vendor.brownout_reason "ocp,buck5m"
|
||||
|
||||
on property:ro.boot.bootreason=reboot,ocp,buck6m
|
||||
setprop vendor.startup_bugreport_requested 1
|
||||
setprop vendor.brownout_reason "ocp,buck6m"
|
||||
|
||||
on property:ro.boot.bootreason=reboot,ocp,buck7m
|
||||
setprop vendor.startup_bugreport_requested 1
|
||||
setprop vendor.brownout_reason "ocp,buck7m"
|
||||
|
||||
on property:ro.boot.bootreason=reboot,ocp,buck8m
|
||||
setprop vendor.startup_bugreport_requested 1
|
||||
setprop vendor.brownout_reason "ocp,buck8m"
|
||||
|
||||
on property:ro.boot.bootreason=reboot,ocp,buck9m
|
||||
setprop vendor.startup_bugreport_requested 1
|
||||
setprop vendor.brownout_reason "ocp,buck9m"
|
||||
|
||||
on property:ro.boot.bootreason=reboot,ocp,buck10m
|
||||
setprop vendor.startup_bugreport_requested 1
|
||||
setprop vendor.brownout_reason "ocp,buck10m"
|
||||
|
||||
on property:ro.boot.bootreason=reboot,ocp,buck1s
|
||||
setprop vendor.startup_bugreport_requested 1
|
||||
setprop vendor.brownout_reason "ocp,buck1s"
|
||||
|
||||
on property:ro.boot.bootreason=reboot,ocp,buck2s
|
||||
setprop vendor.startup_bugreport_requested 1
|
||||
setprop vendor.brownout_reason "ocp,buck2s"
|
||||
|
||||
on property:ro.boot.bootreason=reboot,ocp,buck3s
|
||||
setprop vendor.startup_bugreport_requested 1
|
||||
setprop vendor.brownout_reason "ocp,buck3s"
|
||||
|
||||
on property:ro.boot.bootreason=reboot,ocp,buck4s
|
||||
setprop vendor.startup_bugreport_requested 1
|
||||
setprop vendor.brownout_reason "ocp,buck4s"
|
||||
|
||||
on property:ro.boot.bootreason=reboot,ocp,buck5s
|
||||
setprop vendor.startup_bugreport_requested 1
|
||||
setprop vendor.brownout_reason "ocp,buck5s"
|
||||
|
||||
on property:ro.boot.bootreason=reboot,ocp,buck6s
|
||||
setprop vendor.startup_bugreport_requested 1
|
||||
setprop vendor.brownout_reason "ocp,buck6s"
|
||||
|
||||
on property:ro.boot.bootreason=reboot,ocp,buck7s
|
||||
setprop vendor.startup_bugreport_requested 1
|
||||
setprop vendor.brownout_reason "ocp,buck7s"
|
||||
|
||||
on property:ro.boot.bootreason=reboot,ocp,buck8s
|
||||
setprop vendor.startup_bugreport_requested 1
|
||||
setprop vendor.brownout_reason "ocp,buck8s"
|
||||
|
||||
on property:ro.boot.bootreason=reboot,ocp,buck9s
|
||||
setprop vendor.startup_bugreport_requested 1
|
||||
setprop vendor.brownout_reason "ocp,buck9s"
|
||||
|
||||
on property:ro.boot.bootreason=reboot,ocp,buck10s
|
||||
setprop vendor.startup_bugreport_requested 1
|
||||
setprop vendor.brownout_reason "ocp,buck10s"
|
||||
|
||||
on property:ro.boot.bootreason=reboot,ocp,buckds
|
||||
setprop vendor.startup_bugreport_requested 1
|
||||
setprop vendor.brownout_reason "ocp,buckds"
|
||||
|
||||
on property:ro.boot.bootreason=reboot,ocp,buckas
|
||||
setprop vendor.startup_bugreport_requested 1
|
||||
setprop vendor.brownout_reason "ocp,buckas"
|
||||
|
||||
on property:ro.boot.bootreason=reboot,ocp,buckcs
|
||||
setprop vendor.startup_bugreport_requested 1
|
||||
setprop vendor.brownout_reason "ocp,buckcs"
|
||||
|
||||
on property:ro.boot.bootreason=reboot,ocp,buckbs
|
||||
setprop vendor.startup_bugreport_requested 1
|
||||
setprop vendor.brownout_reason "ocp,buckbs"
|
||||
|
||||
service vendor.battery_mitigation /vendor/bin/hw/battery_mitigation
|
||||
user system
|
||||
|
@ -1,6 +1,5 @@
|
||||
PRODUCT_PACKAGES += battery_mitigation
|
||||
PRODUCT_PACKAGES += battery_mitigation \
|
||||
BrownoutDetection
|
||||
|
||||
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/battery_mitigation/sepolicy
|
||||
PRODUCT_SOONG_NAMESPACES += device/google/gs-common/battery_mitigation
|
||||
|
||||
# BetterBug is included in /vendor/google/products/pixel_experience_2017_and_newer.mk
|
||||
|
@ -2,7 +2,6 @@ type battery_mitigation, domain;
|
||||
type battery_mitigation_exec, exec_type, vendor_file_type, file_type;
|
||||
init_daemon_domain(battery_mitigation)
|
||||
get_prop(battery_mitigation, boot_status_prop)
|
||||
get_prop(battery_mitigation, vendor_startup_bugreport_requested_prop)
|
||||
set_prop(battery_mitigation, vendor_mitigation_ready_prop)
|
||||
|
||||
hal_client_domain(battery_mitigation, hal_thermal);
|
||||
|
@ -1,13 +0,0 @@
|
||||
type better_bug_app, domain, coredomain;
|
||||
|
||||
userdebug_or_eng(`
|
||||
app_domain(better_bug_app)
|
||||
net_domain(better_bug_app)
|
||||
allow better_bug_app shell_data_file:file read;
|
||||
allow better_bug_app app_api_service:service_manager find;
|
||||
allow better_bug_app system_api_service:service_manager find;
|
||||
allow better_bug_app privapp_data_file:file execute;
|
||||
allow better_bug_app mediaserver_service:service_manager find;
|
||||
get_prop(better_bug_app, default_prop);
|
||||
get_prop(better_bug_app, vendor_startup_bugreport_requested_prop)
|
||||
')
|
9
battery_mitigation/sepolicy/brownout_detection_app.te
Normal file
9
battery_mitigation/sepolicy/brownout_detection_app.te
Normal file
@ -0,0 +1,9 @@
|
||||
type brownout_detection_app, domain, coredomain;
|
||||
|
||||
userdebug_or_eng(`
|
||||
app_domain(brownout_detection_app)
|
||||
net_domain(brownout_detection_app)
|
||||
allow brownout_detection_app app_api_service:service_manager find;
|
||||
allow brownout_detection_app system_api_service:service_manager find;
|
||||
get_prop(brownout_detection_app, vendor_brownout_reason_prop)
|
||||
')
|
@ -1,3 +1,3 @@
|
||||
# Battery Mitigation
|
||||
vendor_internal_prop(vendor_mitigation_ready_prop)
|
||||
vendor_public_prop(vendor_startup_bugreport_requested_prop)
|
||||
vendor_public_prop(vendor_brownout_reason_prop)
|
||||
|
@ -1,3 +1,3 @@
|
||||
# Battery Mitigation
|
||||
vendor.brownout.mitigation.ready u:object_r:vendor_mitigation_ready_prop:s0
|
||||
vendor.startup_bugreport_requested u:object_r:vendor_startup_bugreport_requested_prop:s0
|
||||
vendor.brownout_reason u:object_r:vendor_brownout_reason_prop:s0
|
||||
|
@ -1,3 +1,2 @@
|
||||
# BetterBug
|
||||
user=_app isPrivApp=true name=com.google.android.apps.internal.betterbug domain=better_bug_app type=app_data_file levelFrom=all
|
||||
|
||||
# BrownoutDetection
|
||||
user=_app isPrivApp=true name=com.google.android.brownoutdetection domain=brownout_detection_app type=app_data_file levelFrom=all
|
||||
|
@ -1,2 +1,2 @@
|
||||
# Battery Mitigation
|
||||
set_prop(vendor_init, vendor_startup_bugreport_requested_prop)
|
||||
set_prop(vendor_init, vendor_brownout_reason_prop)
|
||||
|
Loading…
x
Reference in New Issue
Block a user