Snap for 9301516 from 5d35bfc764 to udc-release

Change-Id: I221d54d37b1e3d50a04a4bb9d193c69c1b8cb919
This commit is contained in:
Android Build Coastguard Worker 2022-11-17 02:07:19 +00:00
commit dd40b7b3f5
21 changed files with 183 additions and 51 deletions

View file

@ -4,88 +4,88 @@ on property:vendor.thermal.link_ready=1
start vendor.battery_mitigation start vendor.battery_mitigation
on property:ro.boot.bootreason=reboot,uvlo,pmic,if 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 service vendor.battery_mitigation /vendor/bin/hw/battery_mitigation
user system user system

View file

@ -1,6 +1,5 @@
PRODUCT_PACKAGES += battery_mitigation PRODUCT_PACKAGES += battery_mitigation \
BrownoutDetection
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/battery_mitigation/sepolicy BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/battery_mitigation/sepolicy
PRODUCT_SOONG_NAMESPACES += device/google/gs-common/battery_mitigation PRODUCT_SOONG_NAMESPACES += device/google/gs-common/battery_mitigation
# BetterBug is included in /vendor/google/products/pixel_experience_2017_and_newer.mk

View file

@ -2,7 +2,6 @@ type battery_mitigation, domain;
type battery_mitigation_exec, exec_type, vendor_file_type, file_type; type battery_mitigation_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(battery_mitigation) init_daemon_domain(battery_mitigation)
get_prop(battery_mitigation, boot_status_prop) get_prop(battery_mitigation, boot_status_prop)
get_prop(battery_mitigation, vendor_startup_bugreport_requested_prop)
set_prop(battery_mitigation, vendor_mitigation_ready_prop) set_prop(battery_mitigation, vendor_mitigation_ready_prop)
hal_client_domain(battery_mitigation, hal_thermal); hal_client_domain(battery_mitigation, hal_thermal);

View file

@ -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)
')

View 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)
')

View file

@ -1,3 +1,3 @@
# Battery Mitigation # Battery Mitigation
vendor_internal_prop(vendor_mitigation_ready_prop) vendor_internal_prop(vendor_mitigation_ready_prop)
vendor_public_prop(vendor_startup_bugreport_requested_prop) vendor_public_prop(vendor_brownout_reason_prop)

View file

@ -1,3 +1,3 @@
# Battery Mitigation # Battery Mitigation
vendor.brownout.mitigation.ready u:object_r:vendor_mitigation_ready_prop:s0 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

View file

@ -1,3 +1,2 @@
# BetterBug # BrownoutDetection
user=_app isPrivApp=true name=com.google.android.apps.internal.betterbug domain=better_bug_app type=app_data_file levelFrom=all user=_app isPrivApp=true name=com.google.android.brownoutdetection domain=brownout_detection_app type=app_data_file levelFrom=all

View file

@ -1,2 +1,2 @@
# Battery Mitigation # Battery Mitigation
set_prop(vendor_init, vendor_startup_bugreport_requested_prop) set_prop(vendor_init, vendor_brownout_reason_prop)

10
thermal/Android.bp Normal file
View file

@ -0,0 +1,10 @@
package {
default_applicable_licenses: ["Android-Apache-2.0"],
}
sh_binary {
name: "dump_thermal.sh",
src: "dump_thermal.sh",
vendor: true,
sub_dir: "dump",
}

46
thermal/dump_thermal.sh Normal file
View file

@ -0,0 +1,46 @@
#!/vendor/bin/sh
echo "Temperatures"
for f in /sys/class/thermal/thermal* ; do
printf "%s: %s\n" `cat $f/type` `cat $f/temp`
done
echo "Cooling Device Current State"
for f in /sys/class/thermal/cooling* ; do
printf "%s: %s\n" `cat $f/type` `cat $f/cur_state`
done
echo "Cooling Device User Vote State"
for f in /sys/class/thermal/cooling* ; do
if [ ! -f $f/user_vote ]; then continue; fi;
printf "%s: %s\n" `cat $f/type` `cat $f/user_vote`
done
echo "Cooling Device Time in State"
for f in /sys/class/thermal/cooling* ; do
printf "%s: %s\n" `cat $f/type` `cat $f/stats/time_in_state_ms`
done
echo "Cooling Device Trans Table"
for f in /sys/class/thermal/cooling* ; do
printf "%s: %s\n" `cat $f/type` `cat $f/stats/trans_table`
done
echo "Cooling Device State2Power Table"
for f in /sys/class/thermal/cooling* ; do
if [ ! -f $f/state2power_table ]; then continue; fi;
printf "%s: %s\n" `cat $f/type` `cat $f/state2power_table`
done
echo "TMU state:"
cat /sys/module/gs_thermal/parameters/tmu_reg_dump_state
echo "TMU current temperature:"
cat /sys/module/gs_thermal/parameters/tmu_reg_dump_current_temp
echo "TMU_TOP rise thresholds:"
cat /sys/module/gs_thermal/parameters/tmu_top_reg_dump_rise_thres
echo "TMU_TOP fall thresholds:"
cat /sys/module/gs_thermal/parameters/tmu_top_reg_dump_fall_thres
echo "TMU_SUB rise thresholds:"
cat /sys/module/gs_thermal/parameters/tmu_sub_reg_dump_rise_thres
echo "TMU_SUB fall thresholds:"
cat /sys/module/gs_thermal/parameters/tmu_sub_reg_dump_fall_thres

View file

@ -0,0 +1,6 @@
pixel_bugreport(dump_thermal)
allow dump_thermal sysfs_thermal:dir r_dir_perms;
allow dump_thermal sysfs_thermal:file r_file_perms;
allow dump_thermal sysfs_thermal:lnk_file r_file_perms;
allow dump_thermal vendor_toolbox_exec:file execute_no_trans;

View file

@ -0,0 +1 @@
/vendor/bin/dump/dump_thermal\.sh u:object_r:dump_thermal_exec:s0

View file

@ -0,0 +1,3 @@
# thermal sysfs files
genfscon sysfs /module/gs_thermal/parameters u:object_r:sysfs_thermal:s0

3
thermal/thermal.mk Normal file
View file

@ -0,0 +1,3 @@
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/thermal/sepolicy
PRODUCT_PACKAGES += dump_thermal.sh

10
touch/lsi/Android.bp Normal file
View file

@ -0,0 +1,10 @@
package {
default_applicable_licenses: ["Android-Apache-2.0"],
}
sh_binary {
name: "dump_lsi.sh",
src: "dump_lsi.sh",
vendor: true,
sub_dir: "dump",
}

48
touch/lsi/dump_lsi.sh Normal file
View file

@ -0,0 +1,48 @@
#!/vendor/bin/sh
path="/sys/devices/virtual/sec/tsp"
echo "--- Force Touch Active ---"
echo "force_touch_active,2,1" > $path/cmd && cat $path/cmd_result
echo "--- LSI firmware version ---"
cat $path/fw_version
echo "--- LSI touch status ---"
cat $path/status
echo "--- Calibration info ---"
echo "get_mis_cal_info" > $path/cmd && cat $path/cmd_result
echo "--- Mutual Strength ---"
echo "run_delta_read_all" > $path/cmd && cat $path/cmd_result
echo "--- Self Strength ---"
echo "run_self_delta_read_all" > $path/cmd && cat $path/cmd_result
echo "--- TYPE_AMBIENT_DATA ---"
echo "run_rawdata_read_type,3" > $path/cmd && cat $path/cmd_result
echo "--- TYPE_DECODED_DATA ---"
echo "run_rawdata_read_type,5" > $path/cmd && cat $path/cmd_result
echo "--- TYPE_OFFSET_DATA_SEC ---"
echo "run_rawdata_read_type,19" > $path/cmd && cat $path/cmd_result
echo "--- TYPE_NOI_P2P_MIN ---"
echo "run_rawdata_read_type,30" > $path/cmd && cat $path/cmd_result
echo "--- TYPE_NOI_P2P_MAX ---"
echo "run_rawdata_read_type,31" > $path/cmd && cat $path/cmd_result
echo "--- Mutual Raw Cap ---"
echo "run_rawcap_read_all" > $path/cmd && cat $path/cmd_result
echo "--- Self Raw Cap ---"
echo "run_self_rawcap_read_all" > $path/cmd && cat $path/cmd_result
echo "--- CM2 ---"
echo "run_rawcap_high_freq_read_all" > $path/cmd && cat $path/cmd_result
echo "--- Force Touch Active ---"
echo force_touch_active,2,0 > $path/cmd && cat $path/cmd_result

3
touch/lsi/lsi.mk Normal file
View file

@ -0,0 +1,3 @@
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/touch/lsi/sepolicy
PRODUCT_PACKAGES += dump_lsi.sh

View file

@ -0,0 +1,5 @@
pixel_bugreport(dump_lsi)
allow dump_lsi sysfs_touch:dir r_dir_perms;
allow dump_lsi sysfs_touch:file rw_file_perms;
allow dump_lsi vendor_toolbox_exec:file execute_no_trans;

View file

@ -0,0 +1,2 @@
/vendor/bin/dump/dump_lsi\.sh u:object_r:dump_lsi_exec:s0

View file

@ -0,0 +1,2 @@
genfscon sysfs /devices/virtual/sec/tsp u:object_r:sysfs_touch:s0