Snap for 9301516 from 5d35bfc764
to udc-release
Change-Id: I221d54d37b1e3d50a04a4bb9d193c69c1b8cb919
This commit is contained in:
commit
dd40b7b3f5
21 changed files with 183 additions and 51 deletions
|
@ -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)
|
||||
|
|
10
thermal/Android.bp
Normal file
10
thermal/Android.bp
Normal 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
46
thermal/dump_thermal.sh
Normal 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
|
6
thermal/sepolicy/dump_thermal.te
Normal file
6
thermal/sepolicy/dump_thermal.te
Normal 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;
|
1
thermal/sepolicy/file_contexts
Normal file
1
thermal/sepolicy/file_contexts
Normal file
|
@ -0,0 +1 @@
|
|||
/vendor/bin/dump/dump_thermal\.sh u:object_r:dump_thermal_exec:s0
|
3
thermal/sepolicy/genfs_contexts
Normal file
3
thermal/sepolicy/genfs_contexts
Normal 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
3
thermal/thermal.mk
Normal 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
10
touch/lsi/Android.bp
Normal 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
48
touch/lsi/dump_lsi.sh
Normal 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
3
touch/lsi/lsi.mk
Normal file
|
@ -0,0 +1,3 @@
|
|||
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/touch/lsi/sepolicy
|
||||
|
||||
PRODUCT_PACKAGES += dump_lsi.sh
|
5
touch/lsi/sepolicy/dump_lsi.te
Normal file
5
touch/lsi/sepolicy/dump_lsi.te
Normal 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;
|
2
touch/lsi/sepolicy/file_contexts
Normal file
2
touch/lsi/sepolicy/file_contexts
Normal file
|
@ -0,0 +1,2 @@
|
|||
/vendor/bin/dump/dump_lsi\.sh u:object_r:dump_lsi_exec:s0
|
||||
|
2
touch/lsi/sepolicy/genfs_contexts
Normal file
2
touch/lsi/sepolicy/genfs_contexts
Normal file
|
@ -0,0 +1,2 @@
|
|||
genfscon sysfs /devices/virtual/sec/tsp u:object_r:sysfs_touch:s0
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue