Snap for 12872597 from a9f23022a2
to mainline-tzdata6-release
Change-Id: Ifb06f79e55e25b0d50726204dc1d82817cdea183
This commit is contained in:
commit
3e4b430601
25 changed files with 529 additions and 311 deletions
|
@ -41,9 +41,15 @@ BOARD_KERNEL_CMDLINE += swiotlb=noforce
|
|||
BOARD_KERNEL_CMDLINE += disable_dma32=on
|
||||
BOARD_KERNEL_CMDLINE += sysctl.kernel.sched_pelt_multiplier=4
|
||||
|
||||
# Normal (non-_fullmte) builds should disable kasan
|
||||
ifeq (,$(filter %_fullmte,$(TARGET_PRODUCT)))
|
||||
ifneq (,$(filter eng,$(TARGET_BUILD_VARIANT)))
|
||||
BOARD_KERNEL_CMDLINE += kasan=off
|
||||
endif
|
||||
|
||||
# Enable a limited subset of MTE for "normal" (non-_fullmte) eng builds.
|
||||
# Don't touch any settings for _fullmte builds. They are set somewhere else.
|
||||
ifeq (,$(filter %_fullmte,$(TARGET_PRODUCT)))
|
||||
ifeq ($(TARGET_BUILD_VARIANT),eng)
|
||||
BOARD_KERNEL_CMDLINE += bootloader.pixel.MTE_FORCE_ON
|
||||
ifeq ($(filter memtag_heap,$(SANITIZE_TARGET)),)
|
||||
SANITIZE_TARGET := $(strip $(SANITIZE_TARGET) memtag_heap)
|
||||
|
@ -79,7 +85,7 @@ TARGET_RECOVERY_FSTAB_GENRULE := gen_fstab.zumapro-sw-encrypt
|
|||
TARGET_RECOVERY_PIXEL_FORMAT := ABGR_8888
|
||||
TARGET_RECOVERY_UI_MARGIN_HEIGHT := 165
|
||||
TARGET_RECOVERY_UI_LIB := \
|
||||
librecovery_ui_pixel \
|
||||
//hardware/google/pixel/recovery:librecovery_ui_pixel \
|
||||
libfstab
|
||||
|
||||
AB_OTA_UPDATER := true
|
||||
|
@ -217,6 +223,17 @@ BOARD_USE_BLOB_ALLOCATOR := false
|
|||
BOARD_SUPPORT_MFC_ENC_BT2020 := true
|
||||
BOARD_SUPPORT_FLEXIBLE_P010 := true
|
||||
BOARD_SUPPORT_MFC_VERSION := 1660
|
||||
$(call soong_config_set,video_codec,target_soc_name,$(TARGET_SOC_NAME))
|
||||
$(call soong_config_set_bool,video_codec,board_use_codec2_hidl_1_2,$(BOARD_USE_CODEC2_HIDL_1_2))
|
||||
$(call soong_config_set_bool,video_codec,board_use_csc_filter,$(BOARD_USE_CSC_FILTER))
|
||||
$(call soong_config_set_bool,video_codec,board_use_dec_sw_csc,$(BOARD_USE_DEC_SW_CSC))
|
||||
$(call soong_config_set_bool,video_codec,board_use_enc_sw_csc,$(BOARD_USE_ENC_SW_CSC))
|
||||
$(call soong_config_set_bool,video_codec,board_support_mfc_enc_rgb,$(BOARD_SUPPORT_MFC_ENC_RGB))
|
||||
$(call soong_config_set_bool,video_codec,board_use_blob_allocator,$(BOARD_USE_BLOB_ALLOCATOR))
|
||||
$(call soong_config_set_bool,video_codec,board_support_mfc_enc_bt2020,$(BOARD_SUPPORT_MFC_ENC_BT2020))
|
||||
$(call soong_config_set_bool,video_codec,board_support_flexible_p010,$(BOARD_SUPPORT_FLEXIBLE_P010))
|
||||
$(call soong_config_set_bool,video_codec,board_use_codec2_aidl,$(if $(BOARD_USE_CODEC2_AIDL),true,false))
|
||||
$(call soong_config_set,video_codec,board_support_mfc_version,$(BOARD_SUPPORT_MFC_VERSION))
|
||||
########################
|
||||
|
||||
BOARD_SUPER_PARTITION_SIZE := 8531214336
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
/dev/block/platform/13200000.ufs/by-name/userdata /data f2fs noatime,nosuid,nodev,discard,reserve_root=32768,resgid=1065,fsync_mode=nobarrier,compress_extension=apk,compress_extension=so,compress_extension=vdex,compress_extension=odex,@inlinecrypt@,atgc,checkpoint_merge,compress_cache latemount,wait,check,quota,formattable,sysfs_path=/dev/sys/block/bootdevice,checkpoint=fs,reservedsize=128M,fscompress,readahead_size_kb=128,@fileencryption@,@metadata_encryption@,keydirectory=/metadata/vold/metadata_encryption,device=zoned:/dev/block/by-name/zoned_device
|
||||
/dev/block/platform/13200000.ufs/by-name/userdata /data ext4 noatime,nosuid,nodev,@inlinecrypt@ latemount,wait,check,quota,formattable,reservedsize=128M,readahead_size_kb=128,@fileencryption@,@metadata_encryption@,keydirectory=/metadata/vold/metadata_encryption
|
||||
/dev/block/platform/13200000.ufs/by-name/metadata /metadata f2fs noatime,nosuid,nodev,sync wait,check,formattable,first_stage_mount
|
||||
/dev/block/platform/13200000.ufs/by-name/metadata /metadata ext4 noatime,nosuid,nodev,data=journal,commit=1 wait,check,first_stage_mount,metadata_csum
|
||||
/dev/block/platform/13200000.ufs/by-name/metadata /metadata ext4 noatime,nosuid,nodev,data=journal,commit=1 wait,check,formattable,first_stage_mount,metadata_csum
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# This RC file is used for:
|
||||
# - 16kb Developer option
|
||||
# - 16kb Developer option which can boot with 4kb/16kb page size.
|
||||
# - 16kb targets only
|
||||
|
||||
service copy_efs_files_to_data /vendor/bin/copy_efs_files_to_data
|
||||
|
@ -20,12 +20,3 @@ on post-fs-data && property:ro.boot.hardware.cpu.pagesize=16384
|
|||
|
||||
on late-fs && property:ro.boot.hardware.cpu.pagesize=4096
|
||||
mount_all /vendor/etc/fstab.efs --early
|
||||
|
||||
on property:ro.vendor.persist.status=mounted
|
||||
# for modem related functions
|
||||
restorecon_recursive /mnt/vendor/efs
|
||||
chown radio system /mnt/vendor/efs
|
||||
restorecon_recursive /mnt/vendor/efs_backup
|
||||
chown radio system /mnt/vendor/efs_backup
|
||||
restorecon_recursive /mnt/vendor/modem_userdata
|
||||
chown radio system /mnt/vendor/modem_userdata
|
||||
|
|
|
@ -1,11 +1,2 @@
|
|||
on late-fs
|
||||
mount_all /vendor/etc/fstab.efs --early
|
||||
|
||||
on property:ro.vendor.persist.status=mounted
|
||||
# for modem related functions
|
||||
restorecon_recursive /mnt/vendor/efs
|
||||
chown radio system /mnt/vendor/efs
|
||||
restorecon_recursive /mnt/vendor/efs_backup
|
||||
chown radio system /mnt/vendor/efs_backup
|
||||
restorecon_recursive /mnt/vendor/modem_userdata
|
||||
chown radio system /mnt/vendor/modem_userdata
|
||||
|
|
|
@ -3,6 +3,14 @@ on early-init && property:ro.boot.hardware.cpu.pagesize=4096
|
|||
setprop ro.vendor.persist.status mounted
|
||||
|
||||
on property:ro.vendor.persist.status=mounted
|
||||
# for modem related functions
|
||||
restorecon_recursive /mnt/vendor/efs
|
||||
chown radio system /mnt/vendor/efs
|
||||
restorecon_recursive /mnt/vendor/efs_backup
|
||||
chown radio system /mnt/vendor/efs_backup
|
||||
restorecon_recursive /mnt/vendor/modem_userdata
|
||||
chown radio system /mnt/vendor/modem_userdata
|
||||
|
||||
# for battery defender
|
||||
mkdir /mnt/vendor/persist/battery 0700 system system
|
||||
|
||||
|
@ -36,6 +44,7 @@ on property:ro.fstype.data=* && property:ro.vendor.persist.status=mounted
|
|||
symlink /mnt/vendor/persist/ss /data/vendor/ss/persist
|
||||
chown root system /data/vendor/ss/persist
|
||||
chmod 0770 /data/vendor/ss/persist
|
||||
symlink /dev/block/platform/13200000\.ufs/by-name/trusty_persist /data/vendor/ss/persist/0
|
||||
chown system system /data/vendor/ss/0
|
||||
chown system system /data/vendor/ss/persist/0
|
||||
chown system system /data/vendor/ss/persist/nsp
|
||||
|
|
|
@ -34,14 +34,11 @@ on init
|
|||
# governor setting
|
||||
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor sched_pixel
|
||||
write /sys/devices/system/cpu/cpu0/cpufreq/sched_pixel/up_rate_limit_us 500
|
||||
write /sys/devices/system/cpu/cpu0/cpufreq/sched_pixel/down_rate_limit_us 5000
|
||||
write /sys/devices/system/cpu/cpu0/cpufreq/sched_pixel/down_rate_limit_scale_pow 2
|
||||
write /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor sched_pixel
|
||||
write /sys/devices/system/cpu/cpu4/cpufreq/sched_pixel/up_rate_limit_us 500
|
||||
write /sys/devices/system/cpu/cpu4/cpufreq/sched_pixel/down_rate_limit_us 20000
|
||||
write /sys/devices/system/cpu/cpu8/cpufreq/scaling_governor sched_pixel
|
||||
write /sys/devices/system/cpu/cpu8/cpufreq/sched_pixel/up_rate_limit_us 500
|
||||
write /sys/devices/system/cpu/cpu8/cpufreq/sched_pixel/down_rate_limit_us 20000
|
||||
|
||||
# memlat cpuidle awareness setting
|
||||
write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu0_memlat@17000010/memlat_cpuidle_state_aware 2
|
||||
|
@ -107,6 +104,11 @@ on init
|
|||
write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu7_memlat@17000010/mem_latency/stall_floor 2400
|
||||
write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu8_memlat@17000010/mem_latency/stall_floor 500
|
||||
|
||||
on late-init
|
||||
write /sys/devices/system/cpu/cpu0/cpufreq/sched_pixel/down_rate_limit_us 5000
|
||||
write /sys/devices/system/cpu/cpu4/cpufreq/sched_pixel/down_rate_limit_us 20000
|
||||
write /sys/devices/system/cpu/cpu8/cpufreq/sched_pixel/down_rate_limit_us 20000
|
||||
|
||||
on zygote-start
|
||||
# For PixelLogger configuration file.
|
||||
chmod 0771 /data/vendor/wifi
|
||||
|
|
|
@ -21,72 +21,6 @@ on init
|
|||
# Boot time fs tuning
|
||||
write /sys/block/sda/queue/scheduler mq-deadline
|
||||
|
||||
chown system system /proc/vendor_sched/groups/bg/set_task_group
|
||||
chown system system /proc/vendor_sched/groups/cam/set_task_group
|
||||
chown system system /proc/vendor_sched/groups/fg/set_task_group
|
||||
chown system system /proc/vendor_sched/groups/nnapi/set_task_group
|
||||
chown system system /proc/vendor_sched/groups/sys/set_task_group
|
||||
chown system system /proc/vendor_sched/groups/sys_bg/set_task_group
|
||||
chown system system /proc/vendor_sched/groups/ta/set_task_group
|
||||
chown system system /proc/vendor_sched/groups/rt/set_task_group
|
||||
chown system system /proc/vendor_sched/groups/sf/set_task_group
|
||||
chown system system /proc/vendor_sched/groups/dex2oat/set_task_group
|
||||
chown system system /proc/vendor_sched/groups/cam_power/set_task_group
|
||||
chown system system /proc/vendor_sched/groups/ota/set_task_group
|
||||
chown system system /proc/vendor_sched/groups/fg_wi/set_task_group
|
||||
chown system system /proc/vendor_sched/groups/bg/set_proc_group
|
||||
chown system system /proc/vendor_sched/groups/cam/set_proc_group
|
||||
chown system system /proc/vendor_sched/groups/fg/set_proc_group
|
||||
chown system system /proc/vendor_sched/groups/nnapi/set_proc_group
|
||||
chown system system /proc/vendor_sched/groups/sys/set_proc_group
|
||||
chown system system /proc/vendor_sched/groups/sys_bg/set_proc_group
|
||||
chown system system /proc/vendor_sched/groups/ta/set_proc_group
|
||||
chown system system /proc/vendor_sched/groups/rt/set_proc_group
|
||||
chown system system /proc/vendor_sched/groups/sf/set_proc_group
|
||||
chown system system /proc/vendor_sched/groups/dex2oat/set_proc_group
|
||||
chown system system /proc/vendor_sched/groups/cam_power/set_proc_group
|
||||
chown system system /proc/vendor_sched/groups/ota/set_proc_group
|
||||
chown system system /proc/vendor_sched/groups/fg_wi/set_proc_group
|
||||
chown system system /proc/vendor_sched/prefer_idle_set
|
||||
chown system system /proc/vendor_sched/prefer_idle_clear
|
||||
chown system system /proc/vendor_sched/pmu_poll_enable
|
||||
chown system system /proc/vendor_sched/pmu_poll_time
|
||||
chown system system /proc/vendor_sched/uclamp_fork_reset_clear
|
||||
chown system system /proc/vendor_sched/uclamp_fork_reset_set
|
||||
|
||||
chmod 0220 /proc/vendor_sched/groups/bg/set_task_group
|
||||
chmod 0220 /proc/vendor_sched/groups/cam/set_task_group
|
||||
chmod 0220 /proc/vendor_sched/groups/fg/set_task_group
|
||||
chmod 0220 /proc/vendor_sched/groups/nnapi/set_task_group
|
||||
chmod 0220 /proc/vendor_sched/groups/sys/set_task_group
|
||||
chmod 0220 /proc/vendor_sched/groups/sys_bg/set_task_group
|
||||
chmod 0220 /proc/vendor_sched/groups/ta/set_task_group
|
||||
chmod 0220 /proc/vendor_sched/groups/rt/set_task_group
|
||||
chmod 0220 /proc/vendor_sched/groups/sf/set_task_group
|
||||
chmod 0220 /proc/vendor_sched/groups/dex2oat/set_task_group
|
||||
chmod 0220 /proc/vendor_sched/groups/cam_power/set_task_group
|
||||
chmod 0220 /proc/vendor_sched/groups/ota/set_task_group
|
||||
chmod 0220 /proc/vendor_sched/groups/fg_wi/set_task_group
|
||||
chmod 0220 /proc/vendor_sched/groups/bg/set_proc_group
|
||||
chmod 0220 /proc/vendor_sched/groups/cam/set_proc_group
|
||||
chmod 0220 /proc/vendor_sched/groups/fg/set_proc_group
|
||||
chmod 0220 /proc/vendor_sched/groups/nnapi/set_proc_group
|
||||
chmod 0220 /proc/vendor_sched/groups/sys/set_proc_group
|
||||
chmod 0220 /proc/vendor_sched/groups/sys_bg/set_proc_group
|
||||
chmod 0220 /proc/vendor_sched/groups/ta/set_proc_group
|
||||
chmod 0220 /proc/vendor_sched/groups/rt/set_proc_group
|
||||
chmod 0220 /proc/vendor_sched/groups/sf/set_proc_group
|
||||
chmod 0220 /proc/vendor_sched/groups/dex2oat/set_proc_group
|
||||
chmod 0220 /proc/vendor_sched/groups/cam_power/set_proc_group
|
||||
chmod 0220 /proc/vendor_sched/groups/ota/set_proc_group
|
||||
chmod 0220 /proc/vendor_sched/groups/fg_wi/set_proc_group
|
||||
chmod 0220 /proc/vendor_sched/prefer_idle_set
|
||||
chmod 0220 /proc/vendor_sched/prefer_idle_clear
|
||||
chmod 0660 /proc/vendor_sched/pmu_poll_enable
|
||||
chmod 0220 /proc/vendor_sched/pmu_poll_time
|
||||
chmod 0220 /proc/vendor_sched/uclamp_fork_reset_clear
|
||||
chmod 0220 /proc/vendor_sched/uclamp_fork_reset_set
|
||||
|
||||
start vendor.keymaster-4-0
|
||||
|
||||
# ZRAM setup
|
||||
|
@ -389,8 +323,8 @@ on fs
|
|||
chown system system /sys/devices/platform/exynos-drm/primary-panel/te2_option
|
||||
chown system system /sys/devices/platform/exynos-drm/primary-panel/power_state
|
||||
chown system system /sys/devices/platform/exynos-drm/primary-panel/frame_rate
|
||||
chown system system /sys/devices/platform/exynos-drm/primary-panel/frame_interval
|
||||
chown system system /sys/devices/platform/exynos-drm/primary-panel/expected_present_time
|
||||
chown system system /sys/devices/platform/exynos-drm/primary-panel/frame_interval_ns
|
||||
chown system system /sys/devices/platform/exynos-drm/primary-panel/expected_present_time_ns
|
||||
chown system system /sys/module/drm/parameters/vblankoffdelay
|
||||
chown system system /sys/module/drm/parameters/debug
|
||||
chown system system /sys/class/dqe0/atc/ambient_light
|
||||
|
@ -639,6 +573,7 @@ on post-fs-data
|
|||
chown bluetooth system /proc/bluetooth/sleep/btwake
|
||||
chown bluetooth system /proc/bluetooth/sleep/lpm
|
||||
chown bluetooth system /proc/bluetooth/sleep/btwrite
|
||||
chown bluetooth system /sys/devices/platform/155d0000.serial/uart_dbg
|
||||
mkdir /data/vendor/bluetooth 0770 bluetooth system
|
||||
|
||||
# ODPM
|
||||
|
@ -744,6 +679,7 @@ on property:vendor.all.modules.ready=1
|
|||
chown system system /sys/bus/i2c/devices/9-0043/default/braking_time_ms
|
||||
chown system system /sys/bus/i2c/devices/9-0043/default/f0_offset
|
||||
chown system system /sys/bus/i2c/devices/9-0043/default/owt_free_space
|
||||
chown system system /sys/bus/i2c/devices/9-0043/default/owt_lib_compat
|
||||
chown system system /sys/bus/i2c/devices/9-0043/default/f0_comp_enable
|
||||
chown system system /sys/bus/i2c/devices/9-0043/default/redc_comp_enable
|
||||
chown system system /sys/bus/i2c/devices/9-0043/default/delay_before_stop_playback_us
|
||||
|
|
|
@ -9,7 +9,6 @@ on init
|
|||
chown system system /sys/devices/system/cpu/cpufreq/policy7/sched_pixel/limit_frequency
|
||||
chown system system /sys/devices/system/cpu/cpufreq/policy7/sched_pixel/pmu_limit_enable
|
||||
|
||||
|
||||
chown system system /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu0_memlat@17000010/memlat_cpuidle_state_aware
|
||||
chown system system /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu1_memlat@17000010/memlat_cpuidle_state_aware
|
||||
chown system system /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu2_memlat@17000010/memlat_cpuidle_state_aware
|
||||
|
@ -60,17 +59,6 @@ on init
|
|||
write /proc/vendor_sched/groups/sys_bg/disable_util_est 1
|
||||
write /proc/vendor_sched/groups/ta/disable_util_est 0
|
||||
|
||||
# governor setting
|
||||
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor sched_pixel
|
||||
write /sys/devices/system/cpu/cpu0/cpufreq/sched_pixel/up_rate_limit_us 500
|
||||
write /sys/devices/system/cpu/cpu0/cpufreq/sched_pixel/down_rate_limit_us 500
|
||||
write /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor sched_pixel
|
||||
write /sys/devices/system/cpu/cpu4/cpufreq/sched_pixel/up_rate_limit_us 500
|
||||
write /sys/devices/system/cpu/cpu4/cpufreq/sched_pixel/down_rate_limit_us 500
|
||||
write /sys/devices/system/cpu/cpu7/cpufreq/scaling_governor sched_pixel
|
||||
write /sys/devices/system/cpu/cpu7/cpufreq/sched_pixel/up_rate_limit_us 500
|
||||
write /sys/devices/system/cpu/cpu7/cpufreq/sched_pixel/down_rate_limit_us 500
|
||||
|
||||
# memlat cpuidle awareness setting
|
||||
# FIXME(b/301212469) these nodes missing on zuma pro
|
||||
# TODO(b/308973423) these values need to be tuned
|
||||
|
@ -143,71 +131,6 @@ on init
|
|||
write /sys/devices/system/cpu/cpu6/mte_tcf_preferred asymm
|
||||
write /sys/devices/system/cpu/cpu7/mte_tcf_preferred asymm
|
||||
|
||||
# Change permission of sched qos nodes
|
||||
chown system system /proc/vendor_sched/sched_qos/adpf_set
|
||||
chown system system /proc/vendor_sched/sched_qos/adpf_clear
|
||||
chown system system /proc/vendor_sched/sched_qos/auto_uclamp_max_set
|
||||
chown system system /proc/vendor_sched/sched_qos/auto_uclamp_max_clear
|
||||
chown system system /proc/vendor_sched/sched_qos/boost_prio_set
|
||||
chown system system /proc/vendor_sched/sched_qos/boost_prio_clear
|
||||
chown system system /proc/vendor_sched/sched_qos/preempt_wakeup_set
|
||||
chown system system /proc/vendor_sched/sched_qos/preempt_wakeup_clear
|
||||
chown system system /proc/vendor_sched/sched_qos/prefer_fit_set
|
||||
chown system system /proc/vendor_sched/sched_qos/prefer_fit_clear
|
||||
chown system system /proc/vendor_sched/sched_qos/prefer_high_cap_set
|
||||
chown system system /proc/vendor_sched/sched_qos/prefer_high_cap_clear
|
||||
chown system system /proc/vendor_sched/sched_qos/prefer_idle_set
|
||||
chown system system /proc/vendor_sched/sched_qos/prefer_idle_clear
|
||||
|
||||
chmod 0220 /proc/vendor_sched/sched_qos/adpf_set
|
||||
chmod 0220 /proc/vendor_sched/sched_qos/adpf_clear
|
||||
chmod 0220 /proc/vendor_sched/sched_qos/auto_uclamp_max_set
|
||||
chmod 0220 /proc/vendor_sched/sched_qos/auto_uclamp_max_clear
|
||||
chmod 0220 /proc/vendor_sched/sched_qos/boost_prio_set
|
||||
chmod 0220 /proc/vendor_sched/sched_qos/boost_prio_clear
|
||||
chmod 0220 /proc/vendor_sched/sched_qos/preempt_wakeup_set
|
||||
chmod 0220 /proc/vendor_sched/sched_qos/preempt_wakeup_clear
|
||||
chmod 0220 /proc/vendor_sched/sched_qos/prefer_fit_set
|
||||
chmod 0220 /proc/vendor_sched/sched_qos/prefer_fit_clear
|
||||
chmod 0220 /proc/vendor_sched/sched_qos/prefer_high_cap_set
|
||||
chmod 0220 /proc/vendor_sched/sched_qos/prefer_high_cap_clear
|
||||
chmod 0220 /proc/vendor_sched/sched_qos/prefer_idle_set
|
||||
chmod 0220 /proc/vendor_sched/sched_qos/prefer_idle_clear
|
||||
|
||||
# Enable sched_qos for some groups
|
||||
write /proc/vendor_sched/groups/ta/qos_adpf_enable 1
|
||||
write /proc/vendor_sched/groups/ta/qos_auto_uclamp_max_enable 1
|
||||
write /proc/vendor_sched/groups/ta/qos_boost_prio_enable 1
|
||||
write /proc/vendor_sched/groups/ta/qos_preempt_wakeup_enable 1
|
||||
write /proc/vendor_sched/groups/ta/qos_prefer_fit_enable 1
|
||||
write /proc/vendor_sched/groups/ta/qos_prefer_high_cap_enable 1
|
||||
write /proc/vendor_sched/groups/ta/qos_prefer_idle_enable 1
|
||||
write /proc/vendor_sched/groups/fg/qos_adpf_enable 1
|
||||
write /proc/vendor_sched/groups/fg/qos_auto_uclamp_max_enable 1
|
||||
write /proc/vendor_sched/groups/fg/qos_boost_prio_enable 1
|
||||
write /proc/vendor_sched/groups/fg/qos_preempt_wakeup_enable 1
|
||||
write /proc/vendor_sched/groups/fg/qos_prefer_fit_enable 1
|
||||
write /proc/vendor_sched/groups/fg/qos_prefer_high_cap_enable 1
|
||||
write /proc/vendor_sched/groups/fg/qos_prefer_idle_enable 1
|
||||
write /proc/vendor_sched/groups/fg_wi/qos_adpf_enable 1
|
||||
write /proc/vendor_sched/groups/fg_wi/qos_auto_uclamp_max_enable 1
|
||||
write /proc/vendor_sched/groups/fg_wi/qos_boost_prio_enable 1
|
||||
write /proc/vendor_sched/groups/fg_wi/qos_preempt_wakeup_enable 1
|
||||
write /proc/vendor_sched/groups/fg_wi/qos_prefer_fit_enable 1
|
||||
write /proc/vendor_sched/groups/fg_wi/qos_prefer_high_cap_enable 1
|
||||
write /proc/vendor_sched/groups/fg_wi/qos_prefer_idle_enable 1
|
||||
write /proc/vendor_sched/groups/cam/qos_adpf_enable 1
|
||||
write /proc/vendor_sched/groups/cam/qos_auto_uclamp_max_enable 1
|
||||
write /proc/vendor_sched/groups/cam/qos_prefer_fit_enable 1
|
||||
write /proc/vendor_sched/groups/cam/qos_prefer_high_cap_enable 1
|
||||
write /proc/vendor_sched/groups/cam/qos_prefer_idle_enable 1
|
||||
write /proc/vendor_sched/groups/cam_power/qos_adpf_enable 1
|
||||
write /proc/vendor_sched/groups/cam_power/qos_auto_uclamp_max_enable 1
|
||||
write /proc/vendor_sched/groups/cam_power/qos_prefer_fit_enable 1
|
||||
write /proc/vendor_sched/groups/cam_power/qos_prefer_high_cap_enable 1
|
||||
write /proc/vendor_sched/groups/cam_power/qos_prefer_idle_enable 1
|
||||
write /proc/vendor_sched/groups/rt/qos_adpf_enable 1
|
||||
write /proc/vendor_sched/groups/sf/qos_adpf_enable 1
|
||||
|
||||
on zygote-start
|
||||
# For PixelLogger configuration file.
|
||||
|
|
|
@ -173,5 +173,9 @@
|
|||
<!-- Notifications -->
|
||||
<permission name="android.permission.POST_NOTIFICATIONS" fixed="false"/>
|
||||
</exception>
|
||||
<exception
|
||||
package="com.google.android.apps.privacy.wildlife">
|
||||
<permission name="android.permission.READ_PHONE_STATE" fixed="false"/>
|
||||
</exception>
|
||||
</exceptions>
|
||||
|
||||
|
|
83
device.mk
83
device.mk
|
@ -31,7 +31,7 @@ include device/google/gs-common/pixel_metrics/pixel_metrics.mk
|
|||
include device/google/gs-common/soc/freq.mk
|
||||
include device/google/gs-common/gps/dump/log.mk
|
||||
include device/google/gs-common/bcmbt/dump/dumplog.mk
|
||||
include device/google/gs-common/display/dump.mk
|
||||
include device/google/gs-common/display/dump_exynos_display.mk
|
||||
include device/google/gs-common/display_logbuffer/dump.mk
|
||||
include device/google/gs-common/gxp/gxp.mk
|
||||
include device/google/gs-common/camera/dump.mk
|
||||
|
@ -75,6 +75,7 @@ PRODUCT_SOONG_NAMESPACES += \
|
|||
hardware/google/gchips/gralloc4 \
|
||||
hardware/google/graphics/common \
|
||||
hardware/google/graphics/zuma \
|
||||
hardware/google/graphics/zumapro/libhwc2.1 \
|
||||
hardware/google/interfaces \
|
||||
hardware/google/pixel \
|
||||
device/google/zumapro \
|
||||
|
@ -176,30 +177,34 @@ PRODUCT_PROPERTY_OVERRIDES += \
|
|||
# MAJOR_CLASS: 0x42 -> 66 (Phone)
|
||||
# MINOR_CLASS: 0x0C -> 12 (Smart Phone)
|
||||
PRODUCT_PRODUCT_PROPERTIES += \
|
||||
bluetooth.device.class_of_device=90,66,12
|
||||
bluetooth.device.class_of_device?=90,66,12
|
||||
|
||||
# Set supported Bluetooth profiles to enabled
|
||||
PRODUCT_PRODUCT_PROPERTIES += \
|
||||
bluetooth.profile.asha.central.enabled=true \
|
||||
bluetooth.profile.a2dp.source.enabled=true \
|
||||
bluetooth.profile.avrcp.target.enabled=true \
|
||||
bluetooth.profile.bap.unicast.client.enabled=true \
|
||||
bluetooth.profile.bas.client.enabled=true \
|
||||
bluetooth.profile.csip.set_coordinator.enabled=true \
|
||||
bluetooth.profile.gatt.enabled=true \
|
||||
bluetooth.profile.hap.client.enabled=true \
|
||||
bluetooth.profile.hfp.ag.enabled=true \
|
||||
bluetooth.profile.hid.device.enabled=true \
|
||||
bluetooth.profile.hid.host.enabled=true \
|
||||
bluetooth.profile.map.server.enabled=true \
|
||||
bluetooth.profile.mcp.server.enabled=true \
|
||||
bluetooth.profile.opp.enabled=true \
|
||||
bluetooth.profile.pan.nap.enabled=true \
|
||||
bluetooth.profile.pan.panu.enabled=true \
|
||||
bluetooth.profile.pbap.server.enabled=true \
|
||||
bluetooth.profile.sap.server.enabled=true \
|
||||
bluetooth.profile.ccp.server.enabled=true \
|
||||
bluetooth.profile.vcp.controller.enabled=true
|
||||
bluetooth.profile.asha.central.enabled?=true \
|
||||
bluetooth.profile.a2dp.source.enabled?=true \
|
||||
bluetooth.profile.avrcp.target.enabled?=true \
|
||||
bluetooth.profile.bap.unicast.client.enabled?=true \
|
||||
bluetooth.profile.bas.client.enabled?=true \
|
||||
bluetooth.profile.csip.set_coordinator.enabled?=true \
|
||||
bluetooth.profile.gatt.enabled?=true \
|
||||
bluetooth.profile.hap.client.enabled?=true \
|
||||
bluetooth.profile.hfp.ag.enabled?=true \
|
||||
bluetooth.profile.hid.device.enabled?=true \
|
||||
bluetooth.profile.hid.host.enabled?=true \
|
||||
bluetooth.profile.map.server.enabled?=true \
|
||||
bluetooth.profile.mcp.server.enabled?=true \
|
||||
bluetooth.profile.opp.enabled?=true \
|
||||
bluetooth.profile.pan.nap.enabled?=true \
|
||||
bluetooth.profile.pan.panu.enabled?=true \
|
||||
bluetooth.profile.pbap.server.enabled?=true \
|
||||
bluetooth.profile.sap.server.enabled?=true \
|
||||
bluetooth.profile.ccp.server.enabled?=true \
|
||||
bluetooth.profile.vcp.controller.enabled?=true
|
||||
|
||||
# Override default HCI command timeout value for BT stack
|
||||
PRODUCT_PRODUCT_PROPERTIES += \
|
||||
bluetooth.hci.timeout_milliseconds=5000
|
||||
|
||||
# Carrier configuration default location
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
|
@ -290,10 +295,13 @@ BOARD_SEPOLICY_DIRS += hardware/google/pixel-sepolicy/logger_app
|
|||
endif # ifneq ($(BOARD_WITHOUT_RADIO),true)
|
||||
|
||||
# Shared Modem Platform
|
||||
include device/google/gs-common/modem/shared_modem_platform/shared_modem_platform.mk
|
||||
include device/google/gs-common/modem/modem_svc_sit/shared_modem_platform.mk
|
||||
|
||||
# Use for GRIL
|
||||
USES_LASSEN_MODEM := true
|
||||
ifneq ($(BOARD_WITHOUT_RADIO),true)
|
||||
$(call soong_config_set_bool,grilservice,use_google_qns,true)
|
||||
endif
|
||||
|
||||
ifeq ($(USES_GOOGLE_DIALER_CARRIER_SETTINGS),true)
|
||||
USE_GOOGLE_DIALER := true
|
||||
|
@ -374,6 +382,14 @@ PRODUCT_VENDOR_PROPERTIES += \
|
|||
ro.hardware.vulkan=mali
|
||||
endif
|
||||
|
||||
# SurfaceFlinger / RenderEngine
|
||||
ifeq ($(TARGET_USES_VULKAN),true)
|
||||
# b/293371537 Opt in to RE-Graphite's aconfig-based preview rollout
|
||||
PRODUCT_VENDOR_PROPERTIES += debug.renderengine.graphite_preview_optin=true
|
||||
else
|
||||
$(warning TARGET_USES_VULKAN == false, cannot opt in to RE-Graphite rollout in SurfaceFlinger)
|
||||
PRODUCT_VENDOR_PROPERTIES += debug.renderengine.graphite_preview_optin=false
|
||||
endif
|
||||
# b/295257834 Add HDR shaders to SurfaceFlinger's pre-warming cache
|
||||
PRODUCT_VENDOR_PROPERTIES += ro.surface_flinger.prime_shader_cache.ultrahdr=1
|
||||
|
||||
|
@ -613,6 +629,10 @@ PRODUCT_PACKAGES += \
|
|||
PRODUCT_COPY_FILES += \
|
||||
frameworks/native/data/etc/android.hardware.touchscreen.multitouch.jazzhand.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml
|
||||
|
||||
ifneq (,$(filter ripcurrentpro, $(TARGET_PRODUCT)))
|
||||
include device/google/gs-common/touch/gti/gti.mk
|
||||
endif
|
||||
|
||||
# Sensors
|
||||
PRODUCT_COPY_FILES += \
|
||||
frameworks/native/data/etc/android.hardware.sensor.accelerometer.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.accelerometer.xml \
|
||||
|
@ -803,6 +823,12 @@ PRODUCT_COPY_FILES += \
|
|||
frameworks/native/data/etc/android.hardware.wifi.passpoint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.passpoint.xml \
|
||||
frameworks/native/data/etc/android.hardware.wifi.rtt.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.rtt.xml
|
||||
|
||||
# Bluetooth channel sounding
|
||||
ifneq (,$(RELEASE_RANGING_STACK))
|
||||
PRODUCT_COPY_FILES += \
|
||||
frameworks/native/data/etc/android.hardware.bluetooth_le.channel_sounding.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth_le.channel_sounding.xml
|
||||
endif
|
||||
|
||||
PRODUCT_COPY_FILES += \
|
||||
frameworks/native/data/etc/android.hardware.usb.host.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.host.xml \
|
||||
frameworks/native/data/etc/android.hardware.usb.accessory.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.accessory.xml
|
||||
|
@ -1229,6 +1255,10 @@ PRODUCT_PACKAGES += \
|
|||
# pKVM
|
||||
$(call inherit-product, packages/modules/Virtualization/apex/product_packages.mk)
|
||||
PRODUCT_BUILD_PVMFW_IMAGE := true
|
||||
ifeq ($(RELEASE_AVF_ENABLE_LLPVM_CHANGES),true)
|
||||
# Set the environment variable to enable the Secretkeeper HAL service.
|
||||
SECRETKEEPER_ENABLED := true
|
||||
endif
|
||||
|
||||
# Enable to build standalone vendor_kernel_boot image.
|
||||
PRODUCT_BUILD_VENDOR_KERNEL_BOOT_IMAGE := true
|
||||
|
@ -1289,12 +1319,17 @@ endif
|
|||
|
||||
# Telephony satellite geofence data file
|
||||
PRODUCT_COPY_FILES += \
|
||||
device/google/zumapro/telephony/sats2.dat:$(TARGET_COPY_OUT_VENDOR)/etc/telephony/sats2.dat
|
||||
device/google/zumapro/telephony/sats2.dat:$(TARGET_COPY_OUT_VENDOR)/etc/telephony/sats2.dat \
|
||||
device/google/zumapro/telephony/satellite_access_config.json:$(TARGET_COPY_OUT_VENDOR)/etc/telephony/satellite_access_config.json
|
||||
|
||||
# Touch service
|
||||
include device/google/gs-common/touch/twoshay/aidl_zuma.mk
|
||||
include device/google/gs-common/touch/twoshay/twoshay.mk
|
||||
|
||||
ifeq ($(RELEASE_PIXEL_GIA_ENABLED),true)
|
||||
include device/google/gs-common/input/gia/gia.mk
|
||||
endif
|
||||
|
||||
PRODUCT_CHECK_VENDOR_SEAPP_VIOLATIONS := true
|
||||
|
||||
PRODUCT_CHECK_DEV_TYPE_VIOLATIONS := true
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
</hal>
|
||||
<hal format="aidl" optional="true">
|
||||
<name>android.hardware.vibrator</name>
|
||||
<version>2</version>
|
||||
<version>2-3</version>
|
||||
<interface>
|
||||
<name>IVibrator</name>
|
||||
<instance>dual</instance>
|
||||
|
@ -114,7 +114,7 @@
|
|||
</hal>
|
||||
<hal format="aidl" optional="true">
|
||||
<name>com.google.hardware.pixel.display</name>
|
||||
<version>13</version>
|
||||
<version>13-14</version>
|
||||
<interface>
|
||||
<name>IDisplay</name>
|
||||
<instance>default</instance>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
</hal>
|
||||
<hal format="aidl" optional="true">
|
||||
<name>android.hardware.vibrator</name>
|
||||
<version>2</version>
|
||||
<version>2-3</version>
|
||||
<interface>
|
||||
<name>IVibrator</name>
|
||||
<instance>dual</instance>
|
||||
|
@ -114,7 +114,7 @@
|
|||
</hal>
|
||||
<hal format="aidl" optional="true">
|
||||
<name>com.google.hardware.pixel.display</name>
|
||||
<version>13</version>
|
||||
<version>13-14</version>
|
||||
<interface>
|
||||
<name>IDisplay</name>
|
||||
<instance>default</instance>
|
||||
|
|
|
@ -177,7 +177,7 @@ void dumpPowerSupplyStats() {
|
|||
void dumpMaxFg() {
|
||||
const char *maxfgLoc = "/sys/class/power_supply/maxfg";
|
||||
const char *max77779fgDir = "/sys/class/power_supply/max77779fg";
|
||||
|
||||
const char *maxfgDualLoc = "/sys/class/power_supply/maxfg_base";
|
||||
const char *maxfg [][2] = {
|
||||
{"Power supply property maxfg", "/sys/class/power_supply/maxfg/uevent"},
|
||||
{"maxfg registers", "/sys/class/power_supply/maxfg/registers_dump"},
|
||||
|
@ -194,16 +194,17 @@ void dumpMaxFg() {
|
|||
{"max77779fg_monitor logbuffer", "/dev/logbuffer_max77779fg_monitor"},
|
||||
};
|
||||
|
||||
const char *maxfgSecondary [][2] = {
|
||||
const char *maxfgDual [][2] = {
|
||||
{"Power supply property maxfg_base", "/sys/class/power_supply/maxfg_base/uevent"},
|
||||
{"Power supply property maxfg_secondary", "/sys/class/power_supply/maxfg_secondary/uevent"},
|
||||
{"maxfg_base registers", "/sys/class/power_supply/maxfg_base/registers_dump"},
|
||||
{"maxfg_secondary registers", "/sys/class/power_supply/maxfg_secondary/registers_dump"},
|
||||
{"model_state", "/sys/class/power_supply/maxfg_base/model_state"},
|
||||
{"maxfg_base", "/dev/logbuffer_maxfg_base"},
|
||||
{"maxfg_secondary", "/dev/logbuffer_maxfg_secondary"},
|
||||
{"maxfg_base logbuffer", "/dev/logbuffer_maxfg_base"},
|
||||
{"maxfg_secondary logbuffer", "/dev/logbuffer_maxfg_secondary"},
|
||||
{"maxfg_base_monitor logbuffer", "/dev/logbuffer_maxfg_base_monitor"},
|
||||
{"maxfg_secondary_monitor logbuffer", "/dev/logbuffer_maxfg_secondary_monitor"},
|
||||
{"dual_batt logbuffer", "/dev/logbuffer_dual_batt"},
|
||||
};
|
||||
|
||||
const char *maxfgHistoryName = "Maxim FG History";
|
||||
|
@ -220,14 +221,13 @@ void dumpMaxFg() {
|
|||
for (const auto &row : max77779fgFiles) {
|
||||
dumpFileContent(row[0], row[1]);
|
||||
}
|
||||
} else {
|
||||
for (const auto &row : maxfgSecondary) {
|
||||
} else if (isValidDir(maxfgDualLoc)){
|
||||
for (const auto &row : maxfgDual) {
|
||||
dumpFileContent(row[0], row[1]);
|
||||
}
|
||||
}
|
||||
|
||||
if (isValidFile(maxfgHistoryDir)) {
|
||||
dumpFileContent(maxfgHistoryName, maxfgHistoryDir);
|
||||
if (isValidFile(maxfgHistoryDir)) {
|
||||
dumpFileContent(maxfgHistoryName, maxfgHistoryDir);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -317,7 +317,9 @@ void dumpPdEngine() {
|
|||
{"TCPC logbuffer", "/dev/logbuffer_usbpd"},
|
||||
{"pogo_transport logbuffer", "/dev/logbuffer_pogo_transport"},
|
||||
{"PPS-google_cpm logbuffer", "/dev/logbuffer_cpm"},
|
||||
{"PPS-dc logbuffer", "/dev/logbuffer_dc_mains"}
|
||||
{"PPS-pca9468 logbuffer", "/dev/logbuffer_pca9468"},
|
||||
{"PPS-ln8411 logbuffer", "/dev/logbuffer_ln8411"},
|
||||
{"PPS-dc_mains logbuffer", "/dev/logbuffer_dc_mains"}
|
||||
};
|
||||
|
||||
for (const auto &row : pdEngine) {
|
||||
|
@ -354,7 +356,7 @@ void dumpBatteryHealth() {
|
|||
}
|
||||
|
||||
void dumpBatteryDefend() {
|
||||
const char* defendConfig [][4] {
|
||||
const char* defendConfig [][3] {
|
||||
{"TRICKLE-DEFEND Config",
|
||||
"/sys/devices/platform/google,battery/power_supply/battery/", "bd_"},
|
||||
{"DWELL-DEFEND Config", "/sys/devices/platform/google,charger/", "charge_s"},
|
||||
|
@ -399,6 +401,57 @@ void dumpBatteryDefend() {
|
|||
}
|
||||
}
|
||||
|
||||
void dumpBatteryCaretaker() {
|
||||
const char* aacpConfig [][3] {
|
||||
{"AACP Version",
|
||||
"/sys/devices/platform/google,battery/power_supply/battery/", "aacp_"},
|
||||
{"AACR Config",
|
||||
"/sys/devices/platform/google,battery/power_supply/battery/", "aacr_"},
|
||||
{"AAFV Config",
|
||||
"/sys/devices/platform/google,battery/power_supply/battery/", "aafv_"},
|
||||
{"AACT Config",
|
||||
"/sys/devices/platform/google,battery/power_supply/battery/", "aact_"},
|
||||
{"AACC",
|
||||
"/sys/devices/platform/google,battery/power_supply/battery/", "aacc"},
|
||||
};
|
||||
|
||||
std::vector<std::string> files;
|
||||
struct dirent *entry;
|
||||
std::string content;
|
||||
std::string fileLocation;
|
||||
|
||||
for (auto &config : aacpConfig) {
|
||||
DIR *dir = opendir(config[1]);
|
||||
if (dir == NULL)
|
||||
continue;
|
||||
|
||||
printTitle(config[0]);
|
||||
while ((entry = readdir(dir)) != NULL) {
|
||||
if (std::string(entry->d_name).find(config[2]) != std::string::npos &&
|
||||
strncmp(config[2], entry->d_name, strlen(config[2])) == 0) {
|
||||
files.push_back(entry->d_name);
|
||||
}
|
||||
}
|
||||
closedir(dir);
|
||||
|
||||
sort(files.begin(), files.end());
|
||||
|
||||
for (auto &file : files) {
|
||||
fileLocation = std::string(config[1]) + std::string(file);
|
||||
if (!android::base::ReadFileToString(fileLocation, &content) || content.empty()) {
|
||||
content = "\n";
|
||||
}
|
||||
|
||||
printf("%s: %s", file.c_str(), content.c_str());
|
||||
|
||||
if (content.back() != '\n')
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
files.clear();
|
||||
}
|
||||
}
|
||||
|
||||
void printValuesOfDirectory(const char *directory, std::string debugfs, const char *strMatch) {
|
||||
std::vector<std::string> files;
|
||||
auto info = directory;
|
||||
|
@ -433,11 +486,8 @@ void printValuesOfDirectory(const char *directory, std::string debugfs, const ch
|
|||
|
||||
void dumpChg() {
|
||||
const std::string pmic_bus = "/sys/devices/platform/108d0000.hsi2c/i2c-6/6-0066";
|
||||
const std::string pmic_bus_dev = "/sys/devices/platform/10cb0000.hsi2c/i2c-11/11-0066";
|
||||
const char* chg_reg_dump_file = "/sys/class/power_supply/main-charger/device/registers_dump";
|
||||
const std::string chg_name_file = "/sys/class/power_supply/main-charger/device/name";
|
||||
const std::string pmic_name_file_dev = pmic_bus_dev + "/name";
|
||||
const std::string pmic_reg_dump_dev_file = pmic_bus_dev + "/registers_dump";
|
||||
const std::string pmic_name_file = pmic_bus + "/name";
|
||||
const std::string pmic_reg_dump_file = pmic_bus + "/registers_dump";
|
||||
const std::string reg_dump_str = " registers dump";
|
||||
|
@ -462,10 +512,6 @@ void dumpChg() {
|
|||
if (isValidDir(pmic_bus.c_str())) {
|
||||
ret = android::base::ReadFileToString(pmic_name_file, &pmic_name);
|
||||
pmic_reg_dump = pmic_reg_dump_file;
|
||||
} else {
|
||||
/* DEV device */
|
||||
ret = android::base::ReadFileToString(pmic_name_file_dev, &pmic_name);
|
||||
pmic_reg_dump = pmic_reg_dump_dev_file;
|
||||
}
|
||||
|
||||
if (ret && !pmic_name.empty()) {
|
||||
|
@ -483,36 +529,16 @@ void dumpChg() {
|
|||
|
||||
void dumpChgUserDebug() {
|
||||
const std::string debugfs = "/d/";
|
||||
const char *maxFgDir = "/d/maxfg";
|
||||
const char *maxFgStrMatch = "maxfg";
|
||||
const char *maxBaseFgDir = "/d/maxfg_base";
|
||||
const char *maxBaseFgStrMatch = "maxfg_base";
|
||||
const char *maxSecFgDir = "/d/maxfg_secondary";
|
||||
const char *maxSecFgStrMatch = "maxfg_secondary";
|
||||
const char *max77779FgDir = "/d/max77779fg";
|
||||
const char *maxFg77779StrMatch = "max77779fg";
|
||||
const char *chgTblName = "Charging table dump";
|
||||
const char *chgTblDir = "/d/google_battery/chg_raw_profile";
|
||||
|
||||
const char *maxFgInfo [] {
|
||||
"fg_model",
|
||||
"algo_ver",
|
||||
"model_ok",
|
||||
"registers",
|
||||
"nv_registers",
|
||||
};
|
||||
|
||||
const char *max77779FgInfo [] {
|
||||
"fg_model",
|
||||
"algo_ver",
|
||||
"model_ok",
|
||||
"registers",
|
||||
"debug_registers",
|
||||
};
|
||||
|
||||
const char *max1720xFgInfo [] {
|
||||
"registers",
|
||||
"nv_registers",
|
||||
};
|
||||
|
||||
if (isUserBuild())
|
||||
|
@ -520,11 +546,7 @@ void dumpChgUserDebug() {
|
|||
|
||||
dumpFileContent(chgTblName, chgTblDir);
|
||||
|
||||
if (isValidDir(maxFgDir)) {
|
||||
for (auto & directory : maxFgInfo) {
|
||||
printValuesOfDirectory(directory, debugfs, maxFgStrMatch);
|
||||
}
|
||||
} else if (isValidDir(max77779FgDir)) {
|
||||
if (isValidDir(max77779FgDir)) {
|
||||
for (auto & directory : max77779FgInfo) {
|
||||
printValuesOfDirectory(directory, debugfs, maxFg77779StrMatch);
|
||||
}
|
||||
|
@ -532,11 +554,6 @@ void dumpChgUserDebug() {
|
|||
for (auto & directory : max77779FgInfo) {
|
||||
printValuesOfDirectory(directory, debugfs, maxBaseFgStrMatch);
|
||||
}
|
||||
if (isValidDir(maxSecFgDir)) {
|
||||
for (auto & directory : max1720xFgInfo) {
|
||||
printValuesOfDirectory(directory, debugfs, maxSecFgStrMatch);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1106,6 +1123,7 @@ int main() {
|
|||
dumpPdEngine();
|
||||
dumpBatteryHealth();
|
||||
dumpBatteryDefend();
|
||||
dumpBatteryCaretaker();
|
||||
dumpChg();
|
||||
dumpChgUserDebug();
|
||||
dumpScratchpad();
|
||||
|
|
|
@ -97,6 +97,7 @@ on early-boot
|
|||
chown system system /dev/logbuffer_maxfg_secondary
|
||||
chown system system /dev/logbuffer_maxfg_base_monitor
|
||||
chown system system /dev/logbuffer_maxfg_secondary_monitor
|
||||
chown system system /dev/logbuffer_dual_batt
|
||||
chown system system /dev/logbuffer_maxq
|
||||
chown system system /dev/logbuffer_rtx
|
||||
chown system system /dev/logbuffer_ssoc
|
||||
|
@ -105,6 +106,8 @@ on early-boot
|
|||
chown system system /dev/logbuffer_usbpd
|
||||
chown system system /dev/logbuffer_pogo_transport
|
||||
chown system system /dev/logbuffer_wireless
|
||||
chown system system /dev/logbuffer_pca9468
|
||||
chown system system /dev/logbuffer_ln8411
|
||||
chown system system /dev/logbuffer_dc_mains
|
||||
chown system system /dev/logbuffer_cpm
|
||||
chown system system /dev/logbuffer_wc68
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<manifest version="1.0" type="device">
|
||||
<hal format="aidl">
|
||||
<name>android.hardware.health</name>
|
||||
<version>3</version>
|
||||
<version>4</version>
|
||||
<fqname>IHealth/default</fqname>
|
||||
</hal>
|
||||
</manifest>
|
||||
|
|
|
@ -492,10 +492,44 @@
|
|||
<!-- Telephony satellite gateway service package name to bind to by default. -->
|
||||
<string name="config_satellite_gateway_service_package">com.google.android.apps.stargate</string>
|
||||
|
||||
<!-- The class name to receive the intent for provisioning. -->
|
||||
<string name="config_satellite_carrier_roaming_esos_provisioned_class">com.google.android.apps.stargate.registration.RegistrationReceiver_Receiver</string>
|
||||
|
||||
<!-- List of country codes where oem-enabled satellite services are either allowed or disallowed
|
||||
by the device. Each country code is a lowercase 2 character ISO-3166-1 alpha-2. -->
|
||||
<string-array name="config_oem_enabled_satellite_country_codes">
|
||||
<item>US</item>
|
||||
<item>US</item>
|
||||
<item>PR</item>
|
||||
<item>CA</item>
|
||||
<item>AT</item>
|
||||
<item>BE</item>
|
||||
<item>BG</item>
|
||||
<item>HR</item>
|
||||
<item>CY</item>
|
||||
<item>CZ</item>
|
||||
<item>DK</item>
|
||||
<item>EE</item>
|
||||
<item>FI</item>
|
||||
<item>FR</item>
|
||||
<item>DE</item>
|
||||
<item>GR</item>
|
||||
<item>HU</item>
|
||||
<item>IE</item>
|
||||
<item>IT</item>
|
||||
<item>LV</item>
|
||||
<item>LT</item>
|
||||
<item>LU</item>
|
||||
<item>NL</item>
|
||||
<item>NO</item>
|
||||
<item>PL</item>
|
||||
<item>PT</item>
|
||||
<item>RO</item>
|
||||
<item>SK</item>
|
||||
<item>SI</item>
|
||||
<item>ES</item>
|
||||
<item>SE</item>
|
||||
<item>CH</item>
|
||||
<item>GB</item>
|
||||
</string-array>
|
||||
|
||||
<!-- The file storing S2-cell-based satellite access restriction of the countries defined by
|
||||
|
@ -536,4 +570,32 @@
|
|||
|
||||
<!-- The receiver class of the intent action to start satellite non-emergency mode -->
|
||||
<string name="config_satellite_carrier_roaming_non_emergency_session_class">com.google.android.apps.stargate.sessionmanager.SessionManagerReceiver_Receiver</string>
|
||||
|
||||
<!-- Whether to show the system notification to users whenever there is a change
|
||||
in the satellite availability state at the current location. -->
|
||||
<bool name="config_satellite_should_notify_availability">false</bool>
|
||||
|
||||
<!-- The absolute path to the satellite config file. -->
|
||||
<string name="satellite_access_config_file">/vendor/etc/telephony/satellite_access_config.json</string>
|
||||
|
||||
<!-- Whether to allow check message datagrams to be sent even when the satellite modem is in
|
||||
not connected state. -->
|
||||
<bool name="config_satellite_allow_check_message_in_not_connected">true</bool>
|
||||
|
||||
<!-- Whether to allow TN scanning during satellite session. -->
|
||||
<bool name="config_satellite_allow_tn_scanning_during_satellite_session">false</bool>
|
||||
|
||||
<!-- A string defines the NIDD (Non-IP Data Delivery) APN to be used for satellite attachment. For more on NIDD,
|
||||
see 3GPP TS 29.542. This config is used for an NTN-only subscription, which requires activation before being used.
|
||||
-->
|
||||
<string name="config_satellite_nidd_apn_name">pixel.ntn</string>
|
||||
|
||||
<!-- Whether to enable usb state update via udc sysfs. -->
|
||||
<bool name="config_enableUdcSysfsUsbStateUpdate">true</bool>
|
||||
|
||||
<!-- List of integer tag Ids representing VZW satellite coverage. -->
|
||||
<integer-array name="config_verizon_satellite_enabled_tagids">
|
||||
<item>1001</item>
|
||||
</integer-array>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/**
|
||||
* Copyright (c) 2020, The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
-->
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<!-- Content description of the data connection type 5G UW. [CHAR LIMIT=NONE] -->
|
||||
<string name="data_connection_5g_plus" translatable="false">5G UW</string>
|
||||
</resources>
|
|
@ -1,22 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/**
|
||||
* Copyright (c) 2020, The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
-->
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<!-- Content description of the data connection type 5G UW. [CHAR LIMIT=NONE] -->
|
||||
<string name="data_connection_5g_plus" translatable="false">5G UW</string>
|
||||
</resources>
|
|
@ -488,6 +488,19 @@
|
|||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "HighestCfsPrioScheduling",
|
||||
"Actions": [
|
||||
{
|
||||
"Name": "SetSchedulerPolicy",
|
||||
"Params":
|
||||
{
|
||||
"Policy": "SCHED_OTHER",
|
||||
"Nice": "-20"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
|
@ -500,10 +513,6 @@
|
|||
"Name": "OtaProfiles",
|
||||
"Profiles": [ "OtaPerformance", "ServiceCapacityLow", "LowIoPriority", "TimerSlackHigh" ]
|
||||
},
|
||||
{
|
||||
"Name": "InputPolicy",
|
||||
"Profiles": [ "MaxPerformance", "ResetUclampGrp", "PreferIdleSet" ]
|
||||
},
|
||||
{
|
||||
"Name": "SCHED_QOS_SENSITIVE_EXTREME_SET",
|
||||
"Profiles": [ "AdpfSet", "PreferIdleSet", "PreferFitSet", "BoostPrioSet", "PreemptWakeupSet" ]
|
||||
|
@ -519,6 +528,18 @@
|
|||
{
|
||||
"Name": "SCHED_QOS_SENSITIVE_STANDARD_CLEAR",
|
||||
"Profiles": [ "AdpfClear", "PreferIdleClear", "PreferFitClear" ]
|
||||
},
|
||||
{
|
||||
"Name": "SCHED_QOS_POWER_EFFICIENCY_SET",
|
||||
"Profiles": [ "AutoUclampMaxSet" ]
|
||||
},
|
||||
{
|
||||
"Name": "SCHED_QOS_POWER_EFFICIENCY_CLEAR",
|
||||
"Profiles": [ "AutoUclampMaxClear" ]
|
||||
},
|
||||
{
|
||||
"Name": "InputPolicy",
|
||||
"Profiles": [ "HighestCfsPrioScheduling", "MaxPerformance", "SCHED_QOS_SENSITIVE_EXTREME_SET" ]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
195
telephony/satellite_access_config.json
Normal file
195
telephony/satellite_access_config.json
Normal file
|
@ -0,0 +1,195 @@
|
|||
{
|
||||
"access_control_configs": [
|
||||
{
|
||||
"config_id": 0,
|
||||
"satellite_infos": [
|
||||
{
|
||||
"satellite_id": "967f8e86-fc27-4673-9343-a820280a14dd",
|
||||
"satellite_position": {
|
||||
"longitude": 10.25,
|
||||
"altitude": 35793.1
|
||||
},
|
||||
"bands": [
|
||||
256
|
||||
],
|
||||
"earfcn_ranges": [
|
||||
{
|
||||
"start_earfcn": 229360,
|
||||
"end_earfcn": 229360
|
||||
},
|
||||
{
|
||||
"start_earfcn": 229362,
|
||||
"end_earfcn": 229362
|
||||
},
|
||||
{
|
||||
"start_earfcn": 229364,
|
||||
"end_earfcn": 229364
|
||||
},
|
||||
{
|
||||
"start_earfcn": 229366,
|
||||
"end_earfcn": 229366
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"tag_ids": [
|
||||
101
|
||||
]
|
||||
},
|
||||
{
|
||||
"config_id": 1,
|
||||
"satellite_infos": [
|
||||
{
|
||||
"satellite_id": "c9d78ffa-ffa5-4d41-a81b-34693b33b496",
|
||||
"satellite_position": {
|
||||
"longitude": -101.3,
|
||||
"altitude": 35786.0
|
||||
},
|
||||
"bands": [
|
||||
255
|
||||
],
|
||||
"earfcn_ranges": [
|
||||
{
|
||||
"start_earfcn": 229011,
|
||||
"end_earfcn": 229011
|
||||
},
|
||||
{
|
||||
"start_earfcn": 229013,
|
||||
"end_earfcn": 229013
|
||||
},
|
||||
{
|
||||
"start_earfcn": 229015,
|
||||
"end_earfcn": 229015
|
||||
},
|
||||
{
|
||||
"start_earfcn": 229017,
|
||||
"end_earfcn": 229017
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"tag_ids": [
|
||||
11,
|
||||
1001
|
||||
]
|
||||
},
|
||||
{
|
||||
"config_id": 2,
|
||||
"satellite_infos": [
|
||||
{
|
||||
"satellite_id": "62de127d-ead1-481f-8524-b58e2664103a",
|
||||
"satellite_position": {
|
||||
"longitude": -98.0,
|
||||
"altitude": 35775.1
|
||||
},
|
||||
"bands": [
|
||||
255
|
||||
],
|
||||
"earfcn_ranges": [
|
||||
{
|
||||
"start_earfcn": 228837,
|
||||
"end_earfcn": 228837
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"tag_ids": [
|
||||
11,
|
||||
1001
|
||||
]
|
||||
},
|
||||
{
|
||||
"config_id": 3,
|
||||
"satellite_infos": [
|
||||
{
|
||||
"satellite_id": "62de127d-ead1-481f-8524-b58e2664103a",
|
||||
"satellite_position": {
|
||||
"longitude": -98.0,
|
||||
"altitude": 35775.1
|
||||
},
|
||||
"bands": [
|
||||
255
|
||||
],
|
||||
"earfcn_ranges": [
|
||||
{
|
||||
"start_earfcn": 228909,
|
||||
"end_earfcn": 228909
|
||||
},
|
||||
{
|
||||
"start_earfcn": 228919,
|
||||
"end_earfcn": 228919
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"tag_ids": [
|
||||
11
|
||||
]
|
||||
},
|
||||
{
|
||||
"config_id": 4,
|
||||
"satellite_infos": [
|
||||
{
|
||||
"satellite_id": "c9d78ffa-ffa5-4d41-a81b-34693b33b496",
|
||||
"satellite_position": {
|
||||
"longitude": -101.3,
|
||||
"altitude": 35786.0
|
||||
},
|
||||
"bands": [
|
||||
255
|
||||
],
|
||||
"earfcn_ranges": [
|
||||
{
|
||||
"start_earfcn": 229011,
|
||||
"end_earfcn": 229011
|
||||
},
|
||||
{
|
||||
"start_earfcn": 229013,
|
||||
"end_earfcn": 229013
|
||||
},
|
||||
{
|
||||
"start_earfcn": 229015,
|
||||
"end_earfcn": 229015
|
||||
},
|
||||
{
|
||||
"start_earfcn": 229017,
|
||||
"end_earfcn": 229017
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"tag_ids": [
|
||||
12
|
||||
]
|
||||
},
|
||||
{
|
||||
"config_id": 5,
|
||||
"satellite_infos": [
|
||||
{
|
||||
"satellite_id": "62de127d-ead1-481f-8524-b58e2664103a",
|
||||
"satellite_position": {
|
||||
"longitude": -98.0,
|
||||
"altitude": 35775.1
|
||||
},
|
||||
"bands": [
|
||||
255
|
||||
],
|
||||
"earfcn_ranges": [
|
||||
{
|
||||
"start_earfcn": 228919,
|
||||
"end_earfcn": 228919
|
||||
},
|
||||
{
|
||||
"start_earfcn": 228909,
|
||||
"end_earfcn": 228909
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"tag_ids": [
|
||||
11,
|
||||
1001
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
Binary file not shown.
|
@ -117,6 +117,12 @@ constexpr char kHost1StatePath[] = "/sys/bus/usb/devices/usb1/1-0:1.0/usb1-port1
|
|||
constexpr char kHost2UeventRegex[] =
|
||||
"/devices/platform/11210000.usb/11210000.dwc3/xhci-hcd-exynos.[0-9].auto/usb2/2-0:1.0";
|
||||
constexpr char kHost2StatePath[] = "/sys/bus/usb/devices/usb2/2-0:1.0/usb2-port1/state";
|
||||
constexpr char kHubHost1UeventRegex[] =
|
||||
"/devices/platform/11210000.usb/11210000.dwc3/xhci-hcd-exynos.[0-9].auto/usb1/1-1/1-1:1.0";
|
||||
constexpr char kHubHost1StatePath[] = "/sys/bus/usb/devices/usb1/1-1/1-1:1.0/1-1-port1/state";
|
||||
constexpr char kHubHost2UeventRegex[] =
|
||||
"/devices/platform/11210000.usb/11210000.dwc3/xhci-hcd-exynos.[0-9].auto/usb1/1-1/1-1:1.0";
|
||||
constexpr char kHubHost2StatePath[] = "/sys/bus/usb/devices/usb1/1-1/1-1:1.0/1-1-port2/state";
|
||||
constexpr char kDataRolePath[] = "/sys/devices/platform/11210000.usb/new_data_role";
|
||||
constexpr int kSamplingIntervalSec = 5;
|
||||
void queryVersionHelper(android::hardware::usb::Usb *usb,
|
||||
|
@ -536,10 +542,9 @@ static int getInternalHubUniqueId() {
|
|||
return internalHubUniqueId;
|
||||
}
|
||||
|
||||
static Status tuneInternalHub(const char *devname, void* client_data) {
|
||||
static Status tuneInternalHub(const char *devname, android::hardware::usb::Usb *usb) {
|
||||
uint16_t vendorId, productId;
|
||||
struct usb_device *device;
|
||||
::aidl::android::hardware::usb::Usb *usb;
|
||||
int value, index;
|
||||
|
||||
device = usb_device_open(devname);
|
||||
|
@ -548,7 +553,6 @@ static Status tuneInternalHub(const char *devname, void* client_data) {
|
|||
return Status::ERROR;
|
||||
}
|
||||
|
||||
usb = (::aidl::android::hardware::usb::Usb *)client_data;
|
||||
value = usb->mUsbHubVendorCmdValue;
|
||||
index = usb->mUsbHubVendorCmdIndex;
|
||||
|
||||
|
@ -571,20 +575,46 @@ static Status tuneInternalHub(const char *devname, void* client_data) {
|
|||
}
|
||||
|
||||
static int usbDeviceRemoved(const char *devname, void* client_data) {
|
||||
string pogoEnableHub;
|
||||
::aidl::android::hardware::usb::Usb *usb;
|
||||
|
||||
usb = (::aidl::android::hardware::usb::Usb *)client_data;
|
||||
|
||||
if (usb->mIntHubEnabled == true && ReadFileToString(kPogoEnableHub, &pogoEnableHub)
|
||||
&& Trim(pogoEnableHub) == "0") {
|
||||
ALOGI("Internal hub disabled");
|
||||
usb->mIntHubEnabled = false;
|
||||
usb->mUsbDataSessionMonitor.reset(new UsbDataSessionMonitor(kUdcUeventRegex, kUdcStatePath,
|
||||
kHost1UeventRegex, kHost1StatePath, kHost2UeventRegex,
|
||||
kHost2StatePath, kDataRolePath,
|
||||
std::bind(&updatePortStatus, usb)));
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int usbDeviceAdded(const char *devname, void* client_data) {
|
||||
string pogoEnableHub;
|
||||
int uniqueId = 0;
|
||||
::aidl::android::hardware::usb::Usb *usb;
|
||||
|
||||
usb = (::aidl::android::hardware::usb::Usb *)client_data;
|
||||
|
||||
// Enable hub tuning when the pogo dock is connected.
|
||||
if (ReadFileToString(kPogoEnableHub, &pogoEnableHub) && Trim(pogoEnableHub) == "1") {
|
||||
// If enable_hub is set to 1, the internal hub is the first enumearted device on bus 1 and
|
||||
// port 1.
|
||||
uniqueId = usb_device_get_unique_id_from_name(devname);
|
||||
if (uniqueId == getInternalHubUniqueId())
|
||||
tuneInternalHub(devname, client_data);
|
||||
if (uniqueId == getInternalHubUniqueId()) {
|
||||
ALOGI("Internal hub enabled");
|
||||
usb->mIntHubEnabled = true;
|
||||
tuneInternalHub(devname, usb);
|
||||
usb->mUsbDataSessionMonitor.reset(new UsbDataSessionMonitor(kUdcUeventRegex,
|
||||
kUdcStatePath, kHubHost1UeventRegex,
|
||||
kHubHost1StatePath, kHubHost2UeventRegex,
|
||||
kHubHost2StatePath, kDataRolePath,
|
||||
std::bind(&updatePortStatus, usb)));
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -612,9 +642,9 @@ Usb::Usb()
|
|||
mRoleSwitchLock(PTHREAD_MUTEX_INITIALIZER),
|
||||
mPartnerLock(PTHREAD_MUTEX_INITIALIZER),
|
||||
mPartnerUp(false),
|
||||
mUsbDataSessionMonitor(kUdcUeventRegex, kUdcStatePath, kHost1UeventRegex, kHost1StatePath,
|
||||
kHost2UeventRegex, kHost2StatePath, kDataRolePath,
|
||||
std::bind(&updatePortStatus, this)),
|
||||
mUsbDataSessionMonitor(new UsbDataSessionMonitor(kUdcUeventRegex, kUdcStatePath,
|
||||
kHost1UeventRegex, kHost1StatePath, kHost2UeventRegex,
|
||||
kHost2StatePath, kDataRolePath, std::bind(&updatePortStatus, this))),
|
||||
mOverheat(ZoneInfo(TemperatureType::USB_PORT, kThermalZoneForTrip,
|
||||
ThrottlingSeverity::CRITICAL),
|
||||
{ZoneInfo(TemperatureType::UNKNOWN, kThermalZoneForTempReadPrimary,
|
||||
|
@ -1200,7 +1230,7 @@ void queryUsbDataSession(android::hardware::usb::Usb *usb,
|
|||
std::vector<PortStatus> *currentPortStatus) {
|
||||
std::vector<ComplianceWarning> warnings;
|
||||
|
||||
usb->mUsbDataSessionMonitor.getComplianceWarnings(
|
||||
usb->mUsbDataSessionMonitor->getComplianceWarnings(
|
||||
(*currentPortStatus)[0].currentDataRole, &warnings);
|
||||
(*currentPortStatus)[0].complianceWarnings.insert(
|
||||
(*currentPortStatus)[0].complianceWarnings.end(),
|
||||
|
|
|
@ -126,7 +126,8 @@ struct Usb : public BnUsb {
|
|||
bool mPartnerUp;
|
||||
|
||||
// Report usb data session event and data incompliance warnings
|
||||
UsbDataSessionMonitor mUsbDataSessionMonitor;
|
||||
std::unique_ptr<UsbDataSessionMonitor> mUsbDataSessionMonitor;
|
||||
bool mIntHubEnabled;
|
||||
// Usb Overheat object for push suez event
|
||||
UsbOverheatEvent mOverheat;
|
||||
// Temperature when connected
|
||||
|
|
|
@ -102,6 +102,7 @@ UsbDataSessionMonitor::UsbDataSessionMonitor(
|
|||
const std::string &dataRolePath, std::function<void()> updatePortStatusCb) {
|
||||
struct epoll_event ev;
|
||||
std::string udc;
|
||||
int pipefds[2];
|
||||
|
||||
unique_fd epollFd(epoll_create(8));
|
||||
if (epollFd.get() == -1) {
|
||||
|
@ -133,19 +134,28 @@ UsbDataSessionMonitor::UsbDataSessionMonitor(
|
|||
abort();
|
||||
}
|
||||
|
||||
pipe(pipefds);
|
||||
mPipefd0.reset(pipefds[0]);
|
||||
mPipefd1.reset(pipefds[1]);
|
||||
if (addEpollFd(epollFd, mPipefd0))
|
||||
abort();
|
||||
|
||||
/*
|
||||
* The device state file could be absent depending on the current data role
|
||||
* and driver architecture. It's ok for addEpollFile to fail here, the file
|
||||
* will be monitored later when its presence is detected by uevent.
|
||||
*/
|
||||
mDeviceState.name = "udc";
|
||||
mDeviceState.filePath = deviceStatePath;
|
||||
mDeviceState.ueventRegex = deviceUeventRegex;
|
||||
addEpollFile(epollFd.get(), mDeviceState.filePath, mDeviceState.fd);
|
||||
|
||||
mHost1State.name = "host1";
|
||||
mHost1State.filePath = host1StatePath;
|
||||
mHost1State.ueventRegex = host1UeventRegex;
|
||||
addEpollFile(epollFd.get(), mHost1State.filePath, mHost1State.fd);
|
||||
|
||||
mHost2State.name = "host2";
|
||||
mHost2State.filePath = host2StatePath;
|
||||
mHost2State.ueventRegex = host2UeventRegex;
|
||||
addEpollFile(epollFd.get(), mHost2State.filePath, mHost2State.fd);
|
||||
|
@ -169,7 +179,15 @@ UsbDataSessionMonitor::UsbDataSessionMonitor(
|
|||
usb_flags::enable_report_usb_data_compliance_warning());
|
||||
}
|
||||
|
||||
UsbDataSessionMonitor::~UsbDataSessionMonitor() {}
|
||||
UsbDataSessionMonitor::~UsbDataSessionMonitor() {
|
||||
/*
|
||||
* Write a character to the pipe to signal the monitor thread to exit.
|
||||
* The character is not important, it can be any value.
|
||||
*/
|
||||
int c = 'q';
|
||||
write(mPipefd1, &c, 1);
|
||||
pthread_join(mMonitor, NULL);
|
||||
}
|
||||
|
||||
void UsbDataSessionMonitor::reportUsbDataSessionMetrics() {
|
||||
std::vector<VendorUsbDataSessionEvent> events;
|
||||
|
@ -307,11 +325,11 @@ void UsbDataSessionMonitor::handleDeviceStateEvent(struct usbDeviceState *device
|
|||
n = read(deviceState->fd.get(), &state, USB_STATE_MAX_LEN);
|
||||
|
||||
if (kValidStates.find(state) == kValidStates.end()) {
|
||||
ALOGE("Invalid state %s", state);
|
||||
ALOGE("Invalid state %s: %s", deviceState->name.c_str(), state);
|
||||
return;
|
||||
}
|
||||
|
||||
ALOGI("Update USB device state: %s", state);
|
||||
ALOGI("Update device state %s: %s", deviceState->name.c_str(), state);
|
||||
|
||||
deviceState->states.push_back(state);
|
||||
deviceState->timestamps.push_back(boot_clock::now());
|
||||
|
@ -484,7 +502,9 @@ void *UsbDataSessionMonitor::monitorThread(void *param) {
|
|||
}
|
||||
|
||||
for (int n = 0; n < nevents; ++n) {
|
||||
if (events[n].data.fd == monitor->mUeventFd.get()) {
|
||||
if (events[n].data.fd == monitor->mPipefd0.get()) {
|
||||
return NULL;
|
||||
} else if (events[n].data.fd == monitor->mUeventFd.get()) {
|
||||
monitor->handleUevent();
|
||||
} else if (events[n].data.fd == monitor->mTimerFd.get()) {
|
||||
monitor->handleTimerEvent();
|
||||
|
|
|
@ -64,6 +64,8 @@ class UsbDataSessionMonitor {
|
|||
|
||||
private:
|
||||
struct usbDeviceState {
|
||||
// The name of the usb device, e.g. udc, host1, host2.
|
||||
std::string name;
|
||||
unique_fd fd;
|
||||
std::string filePath;
|
||||
std::string ueventRegex;
|
||||
|
@ -86,6 +88,8 @@ class UsbDataSessionMonitor {
|
|||
void updateUdcBindStatus(const std::string &devname);
|
||||
|
||||
pthread_t mMonitor;
|
||||
unique_fd mPipefd0;
|
||||
unique_fd mPipefd1;
|
||||
unique_fd mEpollFd;
|
||||
unique_fd mUeventFd;
|
||||
unique_fd mTimerFd;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue