Promote aosp-main-future to aosp-main-with-phones

Bug: 346855327
Merged-In: Idaeb420a5033290e0a57f9cc0c6c68c3ac5eb918
Change-Id: Ia1111cd6dc15b54bc980da83dbfb6ceb9219eb3d
This commit is contained in:
Xin Li 2024-06-13 14:51:40 -07:00
commit 95cb6589a0
39 changed files with 955 additions and 1585 deletions

View file

@ -34,3 +34,10 @@ license {
"NOTICE", "NOTICE",
], ],
} }
sh_binary {
name: "disable_contaminant_detection.sh",
src: "disable_contaminant_detection.sh",
vendor: true,
sub_dir: "hw",
}

View file

@ -41,6 +41,9 @@ BOARD_KERNEL_CMDLINE += rcupdate.rcu_expedited=1 rcu_nocbs=all
BOARD_KERNEL_CMDLINE += swiotlb=noforce BOARD_KERNEL_CMDLINE += swiotlb=noforce
BOARD_KERNEL_CMDLINE += disable_dma32=on BOARD_KERNEL_CMDLINE += disable_dma32=on
BOARD_KERNEL_CMDLINE += sysctl.kernel.sched_pelt_multiplier=4 BOARD_KERNEL_CMDLINE += sysctl.kernel.sched_pelt_multiplier=4
ifeq (,$(filter %_fullmte,$(TARGET_PRODUCT)))
BOARD_KERNEL_CMDLINE += kasan=off
endif
BOARD_BOOTCONFIG += androidboot.boot_devices=13200000.ufs BOARD_BOOTCONFIG += androidboot.boot_devices=13200000.ufs
# Enable KUnit for userdebug and eng builds # Enable KUnit for userdebug and eng builds
@ -122,7 +125,6 @@ BOARD_USES_SWIFTSHADER ?= false
ifeq ($(BOARD_USES_EXYNOS_GRALLOC_VERSION),4) ifeq ($(BOARD_USES_EXYNOS_GRALLOC_VERSION),4)
ifeq ($(BOARD_USES_SWIFTSHADER),true) ifeq ($(BOARD_USES_SWIFTSHADER),true)
$(warning BOARD_USES_SWIFTSHADER set to current target) $(warning BOARD_USES_SWIFTSHADER set to current target)
BOARD_VENDOR_SEPOLICY_DIRS += device/google/cuttlefish/shared/angle/sepolicy
TARGET_DISABLE_TRIPLE_BUFFERING := true TARGET_DISABLE_TRIPLE_BUFFERING := true
$(call soong_config_set,arm_gralloc,gralloc_arm_no_external_afbc,true) $(call soong_config_set,arm_gralloc,gralloc_arm_no_external_afbc,true)
$(call soong_config_set,arm_gralloc,mali_gpu_support_afbc_basic,false) $(call soong_config_set,arm_gralloc,mali_gpu_support_afbc_basic,false)
@ -209,7 +211,7 @@ BOARD_SUPPORT_MFC_ENC_RGB := true
BOARD_USE_BLOB_ALLOCATOR := false BOARD_USE_BLOB_ALLOCATOR := false
BOARD_SUPPORT_MFC_ENC_BT2020 := true BOARD_SUPPORT_MFC_ENC_BT2020 := true
BOARD_SUPPORT_FLEXIBLE_P010 := true BOARD_SUPPORT_FLEXIBLE_P010 := true
BOARD_SUPPORT_MFC_VERSION := 1660
######################## ########################
BOARD_SUPER_PARTITION_SIZE := 8531214336 BOARD_SUPER_PARTITION_SIZE := 8531214336

File diff suppressed because it is too large Load diff

View file

@ -18,11 +18,7 @@ on init
write /proc/vendor_sched/teo_util_threshold "2 1024 1024" write /proc/vendor_sched/teo_util_threshold "2 1024 1024"
# Boot time fs tuning # Boot time fs tuning
write /sys/block/sda/queue/iostats 0
write /sys/block/sda/queue/scheduler mq-deadline write /sys/block/sda/queue/scheduler mq-deadline
write /sys/block/sda/queue/nr_requests 256
write /dev/sys/fs/by-name/userdata/data_io_flag 56
write /dev/sys/fs/by-name/userdata/node_io_flag 56
chown system system /proc/vendor_sched/groups/bg/set_task_group 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/cam/set_task_group
@ -82,15 +78,6 @@ on init
chmod 0660 /proc/vendor_sched/pmu_poll_enable chmod 0660 /proc/vendor_sched/pmu_poll_enable
chmod 0220 /proc/vendor_sched/pmu_poll_time chmod 0220 /proc/vendor_sched/pmu_poll_time
wait /dev/block/platform/${ro.boot.boot_devices}
symlink /dev/block/platform/${ro.boot.boot_devices} /dev/block/bootdevice
# to access UFS/eMMC sysfs directly
symlink /sys/devices/platform/${ro.boot.boot_devices} /dev/sys/block/bootdevice
# Disable UFS powersaving
write /dev/sys/block/bootdevice/clkgate_enable 0
start vendor.keymaster-4-0 start vendor.keymaster-4-0
# ZRAM setup # ZRAM setup
@ -212,6 +199,9 @@ on late-fs
on post-fs-data on post-fs-data
# Modem temperature driver # Modem temperature driver
chown radio system /sys/devices/platform/cp-tm1/cp_temp chown radio system /sys/devices/platform/cp-tm1/cp_temp
chown radio system /sys/devices/platform/cpif/dynamic_pcie_spd/tp_threshold
chown radio system /sys/devices/platform/cpif/dynamic_pcie_spd/tp_hysteresis
chown radio system /sys/devices/platform/cpif/dynamic_pcie_spd/dynamic_spd_enable
# Log data folder # Log data folder
mkdir /data/vendor 0771 radio system mkdir /data/vendor 0771 radio system
@ -328,19 +318,11 @@ on early-boot
# Wait for insmod_sh to finish all common modules # Wait for insmod_sh to finish all common modules
wait_for_prop vendor.common.modules.ready 1 wait_for_prop vendor.common.modules.ready 1
# Permission for Health Storage HAL
chown system system /dev/sys/block/bootdevice/manual_gc
# Permission for Pixelstats
chown system system /dev/sys/block/bootdevice/slowio_read_cnt
chown system system /dev/sys/block/bootdevice/slowio_write_cnt
chown system system /dev/sys/block/bootdevice/slowio_unmap_cnt
chown system system /dev/sys/block/bootdevice/slowio_sync_cnt
# logbuffer # logbuffer
chown system system /dev/logbuffer_pcie0 chown system system /dev/logbuffer_pcie0
chown system system /dev/logbuffer_pcie1 chown system system /dev/logbuffer_pcie1
chown system system /dev/logbuffer_bd chown system system /dev/logbuffer_bd
chown system system /dev/logbuffer_cpif
on boot on boot
@ -515,9 +497,6 @@ on property:vendor.device.modules.ready=1
chown system system /sys/devices/virtual/goog_touch_interface/gti.0/ss_base chown system system /sys/devices/virtual/goog_touch_interface/gti.0/ss_base
chown system system /sys/devices/virtual/goog_touch_interface/gti.0/ss_diff chown system system /sys/devices/virtual/goog_touch_interface/gti.0/ss_diff
chown system system /sys/devices/virtual/goog_touch_interface/gti.0/ss_raw chown system system /sys/devices/virtual/goog_touch_interface/gti.0/ss_raw
# Allow access to touch
chown system input /dev/touch_offload
chmod 660 /dev/touch_offload
# Route touch_sensitivity_mode to persist # Route touch_sensitivity_mode to persist
on property:debug.touch_sensitivity_mode=0 on property:debug.touch_sensitivity_mode=0
@ -527,23 +506,6 @@ on property:debug.touch_sensitivity_mode=1
setprop persist.vendor.touch_sensitivity_mode 1 setprop persist.vendor.touch_sensitivity_mode 1
on property:sys.boot_completed=1 on property:sys.boot_completed=1
# Runtime fs tuning
write /sys/block/sda/queue/nr_requests 128
write /sys/block/sda/queue/iostats 1
write /dev/sys/fs/by-name/userdata/data_io_flag 8
write /dev/sys/fs/by-name/userdata/node_io_flag 8
# Permission for Pixelstats
chown system system /dev/sys/fs/by-name/userdata/compr_written_block
chown system system /dev/sys/fs/by-name/userdata/compr_saved_block
chown system system /dev/sys/fs/by-name/userdata/compr_new_inode
chown system system /dev/sys/fs/by-name/userdata/gc_segment_mode
chown system system /dev/sys/fs/by-name/userdata/gc_reclaimed_segments
chown system system /dev/sys/fs/by-name/userdata/peak_atomic_write
chown system system /dev/sys/fs/by-name/userdata/committed_atomic_block
chown system system /dev/sys/fs/by-name/userdata/revoked_atomic_block
# Enable ZRAM on boot_complete # Enable ZRAM on boot_complete
swapon_all /vendor/etc/fstab.${ro.board.platform} swapon_all /vendor/etc/fstab.${ro.board.platform}
write /proc/sys/vm/swappiness 60 write /proc/sys/vm/swappiness 60
@ -555,9 +517,6 @@ on property:sys.boot_completed=1
write /proc/sys/vm/dirty_expire_centisecs 3000 write /proc/sys/vm/dirty_expire_centisecs 3000
write /proc/sys/vm/dirty_background_ratio 10 write /proc/sys/vm/dirty_background_ratio 10
# Enable UFS powersaving
write /dev/sys/block/bootdevice/clkgate_enable 1
# Cancel boot devfreq # Cancel boot devfreq
write /sys/devices/platform/17000010.devfreq_mif/devfreq/17000010.devfreq_mif/exynos_data/cancel_boot_freq 1 write /sys/devices/platform/17000010.devfreq_mif/devfreq/17000010.devfreq_mif/exynos_data/cancel_boot_freq 1
@ -703,6 +662,7 @@ service storageproxyd /vendor/bin/storageproxyd -d /dev/trusty-ipc-dev0 \
class early_hal class early_hal
user system user system
group system group system
task_profiles MaxPerformance
# Write build info to kdebuginfo # Write build info to kdebuginfo
on property:ro.build.fingerprint=* on property:ro.build.fingerprint=*
@ -732,7 +692,7 @@ on post-fs-data
chown system system /sys/kernel/metrics/thermal/tr_by_group/tmu/stats_reset chown system system /sys/kernel/metrics/thermal/tr_by_group/tmu/stats_reset
chown system system /sys/kernel/metrics/thermal/tr_by_group/spmic/stats_reset chown system system /sys/kernel/metrics/thermal/tr_by_group/spmic/stats_reset
on property:vendor.thermal.link_ready=1 on property:vendor.all.modules.ready=1
# BCL # BCL
write /sys/devices/platform/cpupm/cpupm/cpd_cl1 0 #Disable power down write /sys/devices/platform/cpupm/cpupm/cpd_cl1 0 #Disable power down
write /sys/devices/platform/cpupm/cpupm/cpd_cl2 0 #Disable power down write /sys/devices/platform/cpupm/cpupm/cpd_cl2 0 #Disable power down
@ -754,6 +714,8 @@ on property:vendor.thermal.link_ready=1
write /sys/devices/virtual/pmic/mitigation/clock_div/cpu2_clk_div 0x1 write /sys/devices/virtual/pmic/mitigation/clock_div/cpu2_clk_div 0x1
write /sys/devices/platform/cpupm/cpupm/cpd_cl1 1 #Enable power down write /sys/devices/platform/cpupm/cpupm/cpd_cl1 1 #Enable power down
write /sys/devices/platform/cpupm/cpupm/cpd_cl2 1 #Enable power down write /sys/devices/platform/cpupm/cpupm/cpd_cl2 1 #Enable power down
on property:vendor.thermal.link_ready=1
chown system system /dev/thermal/tz-by-name/soc/mode chown system system /dev/thermal/tz-by-name/soc/mode
chown system system /dev/thermal/tz-by-name/vdroop2/trip_point_0_temp chown system system /dev/thermal/tz-by-name/vdroop2/trip_point_0_temp
chown system system /dev/thermal/tz-by-name/vdroop2/trip_point_0_hyst chown system system /dev/thermal/tz-by-name/vdroop2/trip_point_0_hyst
@ -848,10 +810,7 @@ on post-fs-data && property:ro.vendor.factory=1
chmod 666 /sys/class/backlight/panel0-backlight/local_hbm_mode chmod 666 /sys/class/backlight/panel0-backlight/local_hbm_mode
chmod 666 /sys/class/backlight/panel0-backlight/hbm_mode chmod 666 /sys/class/backlight/panel0-backlight/hbm_mode
# UFS
on property:ro.boot.mode=charger && property:init.svc.vendor.charger=running on property:ro.boot.mode=charger && property:init.svc.vendor.charger=running
# Enable UFS powersaving in Off Mode Charger
write /dev/sys/block/bootdevice/clkgate_enable 1
# Disable dock-defend in Off Mode Charger # Disable dock-defend in Off Mode Charger
write /sys/devices/platform/google,charger/dd_state -1 write /sys/devices/platform/google,charger/dd_state -1

View file

@ -12,8 +12,7 @@ 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/limit_frequency
chown system system /sys/devices/system/cpu/cpufreq/policy7/sched_pixel/pmu_limit_enable chown system system /sys/devices/system/cpu/cpufreq/policy7/sched_pixel/pmu_limit_enable
# FIXME(b/301212469) these nodes missing on zuma pro
# TODO(b/308973423) these values need to be tuned
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_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_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 chown system system /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu2_memlat@17000010/memlat_cpuidle_state_aware
@ -81,8 +80,6 @@ on init
chmod 0664 /dev/cpuset/camera-daemon-mid-high-group/tasks chmod 0664 /dev/cpuset/camera-daemon-mid-high-group/tasks
# Add memlat governor settings # Add memlat governor settings
# FIXME(b/301212469) these nodes missing on zuma pro
# TODO(b/308973423) these values need to be tuned
write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu0_memlat@17000010/polling_interval 10 write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu0_memlat@17000010/polling_interval 10
write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu1_memlat@17000010/polling_interval 10 write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu1_memlat@17000010/polling_interval 10
write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu2_memlat@17000010/polling_interval 10 write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu2_memlat@17000010/polling_interval 10
@ -91,14 +88,14 @@ on init
write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu5_memlat@17000010/polling_interval 10 write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu5_memlat@17000010/polling_interval 10
write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu6_memlat@17000010/polling_interval 10 write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu6_memlat@17000010/polling_interval 10
write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu7_memlat@17000010/polling_interval 10 write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu7_memlat@17000010/polling_interval 10
write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu0_memlat@17000010/mem_latency/ratio_ceil 1800 write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu0_memlat@17000010/mem_latency/ratio_ceil 3800
write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu1_memlat@17000010/mem_latency/ratio_ceil 1800 write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu1_memlat@17000010/mem_latency/ratio_ceil 3800
write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu2_memlat@17000010/mem_latency/ratio_ceil 1800 write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu2_memlat@17000010/mem_latency/ratio_ceil 3800
write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu3_memlat@17000010/mem_latency/ratio_ceil 1800 write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu3_memlat@17000010/mem_latency/ratio_ceil 3800
write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu4_memlat@17000010/mem_latency/ratio_ceil 3700 write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu4_memlat@17000010/mem_latency/ratio_ceil 3500
write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu5_memlat@17000010/mem_latency/ratio_ceil 3700 write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu5_memlat@17000010/mem_latency/ratio_ceil 3500
write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu6_memlat@17000010/mem_latency/ratio_ceil 3700 write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu6_memlat@17000010/mem_latency/ratio_ceil 3500
write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu7_memlat@17000010/mem_latency/ratio_ceil 3700 write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu7_memlat@17000010/mem_latency/ratio_ceil 4800
write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu0_memlat@17000010/mem_latency/stall_floor 3000 write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu0_memlat@17000010/mem_latency/stall_floor 3000
write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu1_memlat@17000010/mem_latency/stall_floor 3000 write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu1_memlat@17000010/mem_latency/stall_floor 3000
write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu2_memlat@17000010/mem_latency/stall_floor 3000 write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu2_memlat@17000010/mem_latency/stall_floor 3000
@ -106,7 +103,7 @@ on init
write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu4_memlat@17000010/mem_latency/stall_floor 2400 write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu4_memlat@17000010/mem_latency/stall_floor 2400
write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu5_memlat@17000010/mem_latency/stall_floor 2400 write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu5_memlat@17000010/mem_latency/stall_floor 2400
write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu6_memlat@17000010/mem_latency/stall_floor 2400 write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu6_memlat@17000010/mem_latency/stall_floor 2400
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_cpu7_memlat@17000010/mem_latency/stall_floor 500
on zygote-start on zygote-start
# For PixelLogger configuration file. # For PixelLogger configuration file.

View file

@ -71,6 +71,107 @@ on early-boot
# acm function for uwb # acm function for uwb
mkdir /config/usb_gadget/g1/functions/acm.uwb0 mkdir /config/usb_gadget/g1/functions/acm.uwb0
# uvc function
mkdir /config/usb_gadget/g1/functions/uvc.0
write /config/usb_gadget/g1/functions/uvc.0/function_name "Android Webcam"
write /config/usb_gadget/g1/functions/uvc.0/streaming_maxpacket 3072
# write /config/usb_gadget/g1/functions/uvc.0/streaming_maxburst 5
# write /config/usb_gadget/g1/functions/uvc.0/streaming_interval 2
# setup control params
mkdir /config/usb_gadget/g1/functions/uvc.0/control/header/h
symlink /config/usb_gadget/g1/functions/uvc.0/control/header/h /config/usb_gadget/g1/functions/uvc.0/control/class/fs/h
symlink /config/usb_gadget/g1/functions/uvc.0/control/header/h /config/usb_gadget/g1/functions/uvc.0/control/class/ss/h
mkdir /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m
# advertise 360p resolution for webcam encoded as mjpeg
mkdir /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/360p
write /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/360p/wHeight 360
write /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/360p/wWidth 640
write /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/360p/dwMaxVideoFrameBufferSize 460800
write /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/360p/dwDefaultFrameInterval 333333
write /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/360p/dwFrameInterval "166666
333333
416666
666666"
# advertise 480p resolution for webcam encoded as mjpeg
mkdir /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/480p
write /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/480p/wHeight 480
write /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/480p/wWidth 640
write /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/480p/dwMaxVideoFrameBufferSize 614400
write /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/480p/dwDefaultFrameInterval 333333
write /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/480p/dwFrameInterval "166666
333333
416666
666666"
# advertise 720p resolution for webcam encoded as mjpeg
mkdir /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/720p
write /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/720p/wHeight 720
write /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/720p/wWidth 1280
write /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/720p/dwMaxVideoFrameBufferSize 1843200
write /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/720p/dwDefaultFrameInterval 333333
write /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/720p/dwFrameInterval "166666
333333
416666
666666"
# advertise 1080p resolution for webcam encoded as mjpeg
mkdir /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/1080p
write /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/1080p/wHeight 1080
write /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/1080p/wWidth 1920
write /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/1080p/dwMaxVideoFrameBufferSize 4147200
write /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/1080p/dwDefaultFrameInterval 333333
write /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/1080p/dwFrameInterval "166666
333333
416666
666666"
# TODO: Add uncompressed streams
# setup streaming params
mkdir /config/usb_gadget/g1/functions/uvc.0/streaming/header/h
symlink /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m /config/usb_gadget/g1/functions/uvc.0/streaming/header/h/m
symlink /config/usb_gadget/g1/functions/uvc.0/streaming/header/h /config/usb_gadget/g1/functions/uvc.0/streaming/class/fs/h
symlink /config/usb_gadget/g1/functions/uvc.0/streaming/header/h /config/usb_gadget/g1/functions/uvc.0/streaming/class/hs/h
symlink /config/usb_gadget/g1/functions/uvc.0/streaming/header/h /config/usb_gadget/g1/functions/uvc.0/streaming/class/ss/h
# remove write permissions for 'others'
chmod 664 /config/usb_gadget/g1/functions/uvc.0/control/header/h/bcdUVC
chmod 664 /config/usb_gadget/g1/functions/uvc.0/control/header/h/dwClockFrequency
chmod 664 /config/usb_gadget/g1/functions/uvc.0/control/terminal/output/default/bSourceID
chmod 664 /config/usb_gadget/g1/functions/uvc.0/function_name
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming_interval
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming_maxburst
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming_maxpacket
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/1080p/bmCapabilities
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/1080p/dwDefaultFrameInterval
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/1080p/dwFrameInterval
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/1080p/dwMaxBitRate
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/1080p/dwMaxVideoFrameBufferSize
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/1080p/dwMinBitRate
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/1080p/wHeight
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/1080p/wWidth
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/360p/bmCapabilities
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/360p/dwDefaultFrameInterval
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/360p/dwFrameInterval
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/360p/dwMaxBitRate
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/360p/dwMaxVideoFrameBufferSize
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/360p/dwMinBitRate
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/360p/wHeight
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/360p/wWidth
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/480p/bmCapabilities
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/480p/dwDefaultFrameInterval
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/480p/dwFrameInterval
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/480p/dwMaxBitRate
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/480p/dwMaxVideoFrameBufferSize
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/480p/dwMinBitRate
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/480p/wHeight
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/480p/wWidth
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/720p/bmCapabilities
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/720p/dwDefaultFrameInterval
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/720p/dwFrameInterval
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/720p/dwMaxBitRate
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/720p/dwMaxVideoFrameBufferSize
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/720p/dwMinBitRate
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/720p/wHeight
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/720p/wWidth
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/bDefaultFrameIndex
chmod 664 /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/bmaControls
# chown file/folder permission # chown file/folder permission
chown system system /config/usb_gadget/ chown system system /config/usb_gadget/
chown system system /config/usb_gadget/g1 chown system system /config/usb_gadget/g1
@ -195,6 +296,9 @@ on property:sys.usb.config=charger && property:sys.usb.configfs=1
on property:ro.bootmode=usbuwb on property:ro.bootmode=usbuwb
setprop persist.vendor.usb.usbradio.config uwb_acm setprop persist.vendor.usb.usbradio.config uwb_acm
on property:vendor.usb.contaminantdisable=true
exec /vendor/bin/hw/disable_contaminant_detection.sh
on property:persist.vendor.usb.displayport.enabled=1 on property:persist.vendor.usb.displayport.enabled=1
write /sys/module/exynos_drm/parameters/dp_enabled 1 write /sys/module/exynos_drm/parameters/dp_enabled 1
write /sys/class/typec/port0/port0.0/mode1/active "yes" write /sys/class/typec/port0/port0.0/mode1/active "yes"

View file

@ -76,7 +76,7 @@
# jpeg # jpeg
/dev/m2m1shot_jpeg 0660 media media /dev/m2m1shot_jpeg 0660 media media
/dev/video12 0660 system system /dev/video12 0666 system system
# audio # audio
/dev/seiren 0660 system audio /dev/seiren 0660 system audio
@ -94,8 +94,10 @@
/dev/acd-debug 0660 system audio /dev/acd-debug 0660 system audio
/dev/acd-audio_tap* 0660 system audio /dev/acd-audio_tap* 0660 system audio
/dev/acd-audio_dcdoff_ref 0660 system audio /dev/acd-audio_dcdoff_ref 0660 system audio
/dev/acd-mel_processor 0660 system audio
/dev/amcs 0660 system audio /dev/amcs 0660 system audio
/dev/acd-audio_rtp_* 0660 system radio /dev/acd-audio_rtp_* 0660 system radio
/dev/acd-mc_headpos 0660 system audio
# Secure MEM driver # Secure MEM driver
/dev/s5p-smem 0660 drm drmrpc /dev/s5p-smem 0660 drm drmrpc

View file

@ -47,11 +47,15 @@
<!-- Location --> <!-- Location -->
<permission name="android.permission.ACCESS_FINE_LOCATION" fixed="false"/> <permission name="android.permission.ACCESS_FINE_LOCATION" fixed="false"/>
<permission name="android.permission.ACCESS_BACKGROUND_LOCATION" fixed="false"/> <permission name="android.permission.ACCESS_BACKGROUND_LOCATION" fixed="false"/>
<!-- Battery Widget -->
<permission name="android.permission.BLUETOOTH_CONNECT" fixed="false"/>
</exception> </exception>
<exception package="com.google.android.apps.camera.services"> <exception package="com.google.android.apps.camera.services">
<!-- Camera --> <!-- Camera -->
<permission name="android.permission.CAMERA" fixed="false"/> <permission name="android.permission.CAMERA" fixed="false"/>
<!-- Camera Connectivity -->
<permission name="android.permission.ACCESS_FINE_LOCATION" fixed="false"/>
<permission name="android.permission.POST_NOTIFICATIONS" fixed="false"/> <permission name="android.permission.POST_NOTIFICATIONS" fixed="false"/>
<permission name="android.permission.BLUETOOTH_CONNECT" fixed="false"/> <permission name="android.permission.BLUETOOTH_CONNECT" fixed="false"/>
<permission name="android.permission.BLUETOOTH_SCAN" fixed="false"/> <permission name="android.permission.BLUETOOTH_SCAN" fixed="false"/>
@ -139,5 +143,10 @@
<!-- Notifications --> <!-- Notifications -->
<permission name="android.permission.POST_NOTIFICATIONS" fixed="false"/> <permission name="android.permission.POST_NOTIFICATIONS" fixed="false"/>
</exception> </exception>
<exception
package="com.google.android.euicc">
<!-- Notifications -->
<permission name="android.permission.POST_NOTIFICATIONS" fixed="false"/>
</exception>
</exceptions> </exceptions>

View file

@ -27,7 +27,7 @@ PRODUCT_COPY_FILES += \
# Set system properties identifying the chipset # Set system properties identifying the chipset
PRODUCT_VENDOR_PROPERTIES += ro.soc.manufacturer=Google PRODUCT_VENDOR_PROPERTIES += ro.soc.manufacturer=Google
PRODUCT_VENDOR_PROPERTIES += ro.soc.model=ZUMAPRO TARGET_VENDOR_PROP += device/google/zumapro/vendor.prop
PRODUCT_PRODUCT_PROPERTIES += \ PRODUCT_PRODUCT_PROPERTIES += \
persist.vendor.testing_battery_profile=2 persist.vendor.testing_battery_profile=2
@ -44,6 +44,10 @@ PRODUCT_PRODUCT_PROPERTIES += \
PRODUCT_PRODUCT_PROPERTIES += \ PRODUCT_PRODUCT_PROPERTIES += \
ro.thermal_warmreset = true ro.thermal_warmreset = true
# Generic zram size setting, can be overridden in project-specific device.mk
PRODUCT_VENDOR_PROPERTIES += \
vendor.zram.size?=50p
# Indicate that the bootloader supports the MTE developer option switch # Indicate that the bootloader supports the MTE developer option switch
# (MISC_MEMTAG_MODE_MEMTAG_ONCE), with the exception of _fullmte products that # (MISC_MEMTAG_MODE_MEMTAG_ONCE), with the exception of _fullmte products that
# force enable MTE. # force enable MTE.

112
device.mk
View file

@ -31,6 +31,7 @@ include device/google/gs-common/soc/freq.mk
include device/google/gs-common/gps/dump/log.mk include device/google/gs-common/gps/dump/log.mk
include device/google/gs-common/bcmbt/dump/dumplog.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.mk
include device/google/gs-common/display_logbuffer/dump.mk
include device/google/gs-common/gxp/gxp.mk include device/google/gs-common/gxp/gxp.mk
include device/google/gs-common/camera/dump.mk include device/google/gs-common/camera/dump.mk
include device/google/gs-common/radio/dump.mk include device/google/gs-common/radio/dump.mk
@ -76,7 +77,7 @@ PRODUCT_SOONG_NAMESPACES += \
hardware/google/pixel \ hardware/google/pixel \
device/google/zumapro \ device/google/zumapro \
device/google/zumapro/powerstats \ device/google/zumapro/powerstats \
system/chre/host/hal_generic \ vendor/google_devices/common/chre/host/hal \
vendor/google/whitechapel/tools \ vendor/google/whitechapel/tools \
vendor/google/interfaces \ vendor/google/interfaces \
vendor/google_devices/common/proprietary/confirmatioui_hal \ vendor/google_devices/common/proprietary/confirmatioui_hal \
@ -199,7 +200,7 @@ PRODUCT_PRODUCT_PROPERTIES += \
# Carrier configuration default location # Carrier configuration default location
PRODUCT_PROPERTY_OVERRIDES += \ PRODUCT_PROPERTY_OVERRIDES += \
persist.vendor.radio.config.carrier_config_dir=/mnt/vendor/modem_img/images/default/confpack persist.vendor.radio.config.carrier_config_dir=/vendor/firmware/carrierconfig
PRODUCT_PROPERTY_OVERRIDES += \ PRODUCT_PROPERTY_OVERRIDES += \
telephony.active_modems.max_count=2 telephony.active_modems.max_count=2
@ -209,7 +210,7 @@ PRODUCT_PROPERTY_OVERRIDES += \
persist.vendor.usb.displayport.enabled=1 persist.vendor.usb.displayport.enabled=1
else else
PRODUCT_PROPERTY_OVERRIDES += \ PRODUCT_PROPERTY_OVERRIDES += \
persist.vendor.usb.displayport.enabled=0 persist.vendor.usb.displayport.enabled=1
endif endif
USE_LASSEN_OEMHOOK := true USE_LASSEN_OEMHOOK := true
@ -268,14 +269,10 @@ PRODUCT_PACKAGES += \
PRODUCT_VENDOR_PROPERTIES += \ PRODUCT_VENDOR_PROPERTIES += \
ro.hardware.egl=angle \ ro.hardware.egl=angle \
ro.hardware.vulkan=pastel ro.hardware.vulkan=pastel
PRODUCT_VENDOR_PROPERTIES += \
debug.renderengine.backend=skiaglthreaded
else else
PRODUCT_VENDOR_PROPERTIES += \ PRODUCT_VENDOR_PROPERTIES += \
ro.hardware.egl=mali \ ro.hardware.egl=mali \
ro.hardware.vulkan=mali ro.hardware.vulkan=mali
PRODUCT_VENDOR_PROPERTIES += \
debug.renderengine.backend=skiaglthreaded
endif endif
# b/295257834 Add HDR shaders to SurfaceFlinger's pre-warming cache # b/295257834 Add HDR shaders to SurfaceFlinger's pre-warming cache
@ -295,6 +292,7 @@ PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.vulkan.version-1_3.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.version.xml \ frameworks/native/data/etc/android.hardware.vulkan.version-1_3.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.version.xml \
frameworks/native/data/etc/android.hardware.vulkan.level-1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.level.xml \ frameworks/native/data/etc/android.hardware.vulkan.level-1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.level.xml \
frameworks/native/data/etc/android.hardware.vulkan.compute-0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.compute.xml \ frameworks/native/data/etc/android.hardware.vulkan.compute-0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.compute.xml \
frameworks/native/data/etc/android.software.contextualsearch.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.contextualsearch.xml \
frameworks/native/data/etc/android.software.vulkan.deqp.level-2023-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.vulkan.deqp.level.xml \ frameworks/native/data/etc/android.software.vulkan.deqp.level-2023-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.vulkan.deqp.level.xml \
frameworks/native/data/etc/android.software.opengles.deqp.level-2023-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.opengles.deqp.level.xml frameworks/native/data/etc/android.software.opengles.deqp.level-2023-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.opengles.deqp.level.xml
@ -383,6 +381,10 @@ PRODUCT_COPY_FILES += \
device/google/$(TARGET_BOARD_PLATFORM)/conf/fstab.persist:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.persist \ device/google/$(TARGET_BOARD_PLATFORM)/conf/fstab.persist:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.persist \
device/google/$(TARGET_BOARD_PLATFORM)/conf/fstab.modem:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.modem device/google/$(TARGET_BOARD_PLATFORM)/conf/fstab.modem:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.modem
# Shell scripts
PRODUCT_PACKAGES += \
disable_contaminant_detection.sh
include device/google/gs-common/insmod/insmod.mk include device/google/gs-common/insmod/insmod.mk
# Insmod config files # Insmod config files
@ -396,24 +398,29 @@ PRODUCT_HOST_PACKAGES += \
PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \
messaging messaging
# Contexthub HAL # CHRE
PRODUCT_PACKAGES += \ ## tools
android.hardware.contexthub-service.generic
# CHRE tools
ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \
chre_power_test_client \ chre_power_test_client \
chre_test_client chre_test_client \
chre_aidl_hal_client
endif endif
# PCIe
ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
PRODUCT_PACKAGES += \
factory_pcie
endif
## hal
include device/google/gs-common/chre/hal.mk
PRODUCT_COPY_FILES += \ PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.context_hub.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.context_hub.xml frameworks/native/data/etc/android.hardware.context_hub.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.context_hub.xml
## Enable the CHRE Daemon ## Enable the CHRE Daemon
CHRE_USF_DAEMON_ENABLED := true CHRE_USF_DAEMON_ENABLED := false
PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \
chre \
preloaded_nanoapps.json preloaded_nanoapps.json
# Filesystem management tools # Filesystem management tools
@ -490,6 +497,12 @@ PRODUCT_PACKAGES += \
PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \
android.hardware.usb.gadget-service android.hardware.usb.gadget-service
ifneq (,$(filter ripcurrentpro, $(TARGET_PRODUCT)))
PRODUCT_PACKAGES += usb_service_init_rc_i2c11
else
PRODUCT_PACKAGES += usb_service_init_rc_i2c6
endif
# MIDI feature # MIDI feature
PRODUCT_COPY_FILES += \ PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.software.midi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.midi.xml frameworks/native/data/etc/android.software.midi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.midi.xml
@ -557,10 +570,10 @@ PRODUCT_PACKAGES += \
PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \
android.hardware.graphics.mapper@4.0-impl \ android.hardware.graphics.mapper@4.0-impl \
android.hardware.graphics.allocator-V2-service android.hardware.graphics.allocator-V1-service
PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \
memtrack.$(TARGET_BOARD_PLATFORM) \ android.hardware.memtrack-service.pixel \
libion_exynos \ libion_exynos \
libion libion
@ -698,6 +711,8 @@ PRODUCT_DEFAULT_PROPERTY_OVERRIDES += debug.sf.earlyGl.sf.duration=16600000
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += debug.sf.earlyGl.app.duration=16600000 PRODUCT_DEFAULT_PROPERTY_OVERRIDES += debug.sf.earlyGl.app.duration=16600000
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += debug.sf.frame_rate_multiple_threshold=120 PRODUCT_DEFAULT_PROPERTY_OVERRIDES += debug.sf.frame_rate_multiple_threshold=120
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += debug.sf.treat_170m_as_sRGB=1 PRODUCT_DEFAULT_PROPERTY_OVERRIDES += debug.sf.treat_170m_as_sRGB=1
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += debug.sf.hwc_hotplug_error_via_neg_vsync=1
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += debug.sf.hwc_hdcp_via_neg_vsync=1
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.enable_layer_caching=true PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.enable_layer_caching=true
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.set_idle_timer_ms?=80 PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.set_idle_timer_ms?=80
@ -723,10 +738,8 @@ PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.display_update_imminent
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += vendor.display.0.brightness.dimming.usage?=2 PRODUCT_DEFAULT_PROPERTY_OVERRIDES += vendor.display.0.brightness.dimming.usage?=2
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += vendor.display.1.brightness.dimming.usage?=2 PRODUCT_DEFAULT_PROPERTY_OVERRIDES += vendor.display.1.brightness.dimming.usage?=2
# force to blend in P3 mode
PRODUCT_PROPERTY_OVERRIDES += \ PRODUCT_PROPERTY_OVERRIDES += \
persist.sys.sf.native_mode=2 \ persist.sys.sf.native_mode=2
persist.sys.sf.color_mode=9
PRODUCT_COPY_FILES += \ PRODUCT_COPY_FILES += \
device/google/zumapro/display/display_colordata_cal0.pb:$(TARGET_COPY_OUT_VENDOR)/etc/display_colordata_cal0.pb device/google/zumapro/display/display_colordata_cal0.pb:$(TARGET_COPY_OUT_VENDOR)/etc/display_colordata_cal0.pb
@ -823,12 +836,13 @@ $(call inherit-product, system/core/trusty/trusty-storage.mk)
$(call inherit-product, system/core/trusty/trusty-base.mk) $(call inherit-product, system/core/trusty/trusty-base.mk)
# Trusty unit test tool # Trusty unit test tool
PRODUCT_PACKAGES_DEBUG += \ PRODUCT_PACKAGES_DEBUG += \
trusty-ut-ctrl \ trusty-ut-ctrl \
tipc-test \ tipc-test \
trusty_stats_test \ trusty_stats_test \
include device/google/gs101/confirmationui/confirmationui.mk # Remove confirmation UI (b/316160738)
# include device/google/gs101/confirmationui/confirmationui.mk
# Trusty Metrics Daemon # Trusty Metrics Daemon
PRODUCT_SOONG_NAMESPACES += \ PRODUCT_SOONG_NAMESPACES += \
@ -842,7 +856,8 @@ $(warning displaycolor_platform set to zuma on zumapro target)
$(call soong_config_set,google_displaycolor,displaycolor_platform,zuma) $(call soong_config_set,google_displaycolor,displaycolor_platform,zuma)
PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \
android.hardware.composer.hwc3-service.pixel \ android.hardware.composer.hwc3-service.pixel \
libdisplaycolor libdisplaycolor \
libdisplaypanel
# Storage: for factory reset protection feature # Storage: for factory reset protection feature
PRODUCT_PROPERTY_OVERRIDES += \ PRODUCT_PROPERTY_OVERRIDES += \
@ -914,21 +929,6 @@ PRODUCT_PACKAGES += ShannonIms
PRODUCT_PACKAGES += ShannonRcs PRODUCT_PACKAGES += ShannonRcs
ifeq (,$(filter aosp_% factory_%,$(TARGET_PRODUCT)))
#ImsMediaAoc library
FEATURE_TYPE := oem_audio
SOONG_CONFIG_NAMESPACES += audio_lib
SOONG_CONFIG_audio_lib += \
audio_type
SOONG_CONFIG_audio_lib_audio_type := $(FEATURE_TYPE)
endif
# ImsMedia
PRODUCT_PACKAGES += \
ImsMediaService \
libimsmedia
# Exynos RIL and telephony # Exynos RIL and telephony
# Multi SIM(DSDS) # Multi SIM(DSDS)
SIM_COUNT := 2 SIM_COUNT := 2
@ -982,12 +982,21 @@ endif
# modem logging binary/configs # modem logging binary/configs
PRODUCT_PACKAGES += modem_logging_control PRODUCT_PACKAGES += modem_logging_control
# libeomservice_proxy binary/configs
PRODUCT_PACKAGES += liboemservice_proxy_default
# modem logging configs # modem logging configs
PRODUCT_COPY_FILES += \ PRODUCT_COPY_FILES += \
device/google/zumapro/radio/config/logging.conf:$(TARGET_COPY_OUT_VENDOR)/etc/modem/logging.conf \ device/google/zumapro/radio/config/logging.conf:$(TARGET_COPY_OUT_VENDOR)/etc/modem/logging.conf \
device/google/zumapro/radio/config/default.cfg:$(TARGET_COPY_OUT_VENDOR)/etc/modem/default.cfg \ device/google/zumapro/radio/config/default.cfg:$(TARGET_COPY_OUT_VENDOR)/etc/modem/default.cfg \
device/google/zumapro/radio/config/default.nprf:$(TARGET_COPY_OUT_VENDOR)/etc/modem/default.nprf \ device/google/zumapro/radio/config/default.nprf:$(TARGET_COPY_OUT_VENDOR)/etc/modem/default.nprf \
device/google/zumapro/radio/config/default_metrics.xml:$(TARGET_COPY_OUT_VENDOR)/etc/modem/default_metrics.xml device/google/zumapro/radio/config/default_metrics.xml:$(TARGET_COPY_OUT_VENDOR)/etc/modem/default_metrics.xml
# modem extensive logging config
PRODUCT_PACKAGES += \
extensive_logging.conf
# Vendor modem extensive logging default property
PRODUCT_PROPERTY_OVERRIDES += \
persist.vendor.modem.extensive_logging_enabled=false
endif endif
# Vibrator Diag # Vibrator Diag
@ -1003,7 +1012,7 @@ PRODUCT_PACKAGES += \
# Audio # Audio
# Audio HAL Server & Default Implementations # Audio HAL Server & Default Implementations
ifeq ($(RELEASE_PIXEL_AIDL_AUDIO_HAL),true) ifeq ($(USE_AUDIO_HAL_AIDL),true)
include device/google/gs-common/audio/aidl.mk include device/google/gs-common/audio/aidl.mk
else else
include device/google/gs-common/audio/hidl_zuma.mk include device/google/gs-common/audio/hidl_zuma.mk
@ -1013,7 +1022,7 @@ endif
PRODUCT_SOONG_NAMESPACES += \ PRODUCT_SOONG_NAMESPACES += \
vendor/google/whitechapel/aoc vendor/google/whitechapel/aoc
$(call soong_config_set,aoc,target_soc,zuma) $(call soong_config_set,aoc,target_soc,zumapro)
$(call soong_config_set,aoc,target_product,$(TARGET_PRODUCT)) $(call soong_config_set,aoc,target_product,$(TARGET_PRODUCT))
# #
@ -1042,7 +1051,8 @@ PRODUCT_PACKAGES += \
aoc_tuning_inft \ aoc_tuning_inft \
mahal_test \ mahal_test \
ma_aoc_tuning_test \ ma_aoc_tuning_test \
crus_sp_cal crus_sp_cal \
pixel_ti_cal
endif endif
PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \
@ -1064,6 +1074,14 @@ PRODUCT_PROPERTY_OVERRIDES += persist.vendor.enable.thermal.genl=true
include device/google/gs-common/edgetpu/edgetpu.mk include device/google/gs-common/edgetpu/edgetpu.mk
# Config variables for TPU chip on device. # Config variables for TPU chip on device.
$(call soong_config_set,edgetpu_config,chip,rio_pro) $(call soong_config_set,edgetpu_config,chip,rio_pro)
# Include the edgetpu targets defined the namespaces below into the final image.
PRODUCT_SOONG_NAMESPACES += \
vendor/google_devices/zumapro/proprietary/gchips/tpu/metrics \
vendor/google_devices/zumapro/proprietary/gchips/tpu/tflite_delegate \
vendor/google_devices/zumapro/proprietary/gchips/tpu/darwinn_logging_service \
vendor/google_devices/zumapro/proprietary/gchips/tpu/nnapi_stable_aidl \
vendor/google_devices/zumapro/proprietary/gchips/tpu/aidl \
vendor/google_devices/zumapro/proprietary/gchips/tpu/hal
# TPU firmware # TPU firmware
PRODUCT_PACKAGES += edgetpu-rio.fw PRODUCT_PACKAGES += edgetpu-rio.fw
@ -1117,7 +1135,7 @@ endif
include hardware/google/pixel/sscoredump/device.mk include hardware/google/pixel/sscoredump/device.mk
# RadioExt Version # RadioExt Version
USES_RADIOEXT_V1_6 = true USES_RADIOEXT_V1_7 = true
# Wifi ext # Wifi ext
include hardware/google/pixel/wifi_ext/device.mk include hardware/google/pixel/wifi_ext/device.mk
@ -1157,9 +1175,19 @@ endif
SUPPORT_VENDOR_SATELLITE_SERVICE := true SUPPORT_VENDOR_SATELLITE_SERVICE := true
# Telephony satellite geofence data file
PRODUCT_COPY_FILES += \
device/google/zumapro/telephony/sats2.dat:$(TARGET_COPY_OUT_VENDOR)/etc/telephony/sats2.dat
# Touch service # Touch service
include hardware/google/pixel/input/twoshay.mk include hardware/google/pixel/input/twoshay.mk
include device/google/gs-common/touch/twoshay/aidl_zuma.mk
PRODUCT_CHECK_VENDOR_SEAPP_VIOLATIONS := true PRODUCT_CHECK_VENDOR_SEAPP_VIOLATIONS := true
PRODUCT_CHECK_DEV_TYPE_VIOLATIONS := true PRODUCT_CHECK_DEV_TYPE_VIOLATIONS := true
# Enable Android Messages satellite conversation feature.
# TODO(b/322518837): Remove the property override once the flag is launched.
PRODUCT_PROPERTY_OVERRIDES += \
debug.bugle.enable_emergency_satellite_messaging=true

View file

@ -120,20 +120,6 @@
<instance>default</instance> <instance>default</instance>
</interface> </interface>
</hal> </hal>
<hal format="aidl" optional="true">
<name>com.google.input.algos.spd</name>
<interface>
<name>IScreenProtectorDetectorService</name>
<instance>default</instance>
</interface>
</hal>
<hal format="aidl" optional="true">
<name>com.google.input</name>
<interface>
<name>ITouchContextService</name>
<instance>default</instance>
</interface>
</hal>
<hal format="aidl" optional="true"> <hal format="aidl" optional="true">
<name>hardware.qorvo.uwb</name> <name>hardware.qorvo.uwb</name>
<interface> <interface>
@ -159,7 +145,7 @@
</hal> </hal>
<hal format="hidl" optional="true"> <hal format="hidl" optional="true">
<name>vendor.google.radioext</name> <name>vendor.google.radioext</name>
<version>1.6</version> <version>1.7</version>
<interface> <interface>
<name>IRadioExt</name> <name>IRadioExt</name>
<instance>default</instance> <instance>default</instance>
@ -185,6 +171,7 @@
</hal> </hal>
<hal format="aidl" optional="true"> <hal format="aidl" optional="true">
<name>com.google.pixel.modem.logmasklibrary</name> <name>com.google.pixel.modem.logmasklibrary</name>
<version>1</version>
<interface> <interface>
<name>ILiboemserviceProxy</name> <name>ILiboemserviceProxy</name>
<instance>default</instance> <instance>default</instance>

View file

@ -0,0 +1,7 @@
#!/vendor/bin/sh
for f in /sys/devices/platform/108d0000.hsi2c/i2c-*/*-0025; do
if [ -d $f ]; then
echo 0 > $f/contaminant_detection;
fi
done

View file

@ -164,7 +164,7 @@ void dumpPowerSupplyStats() {
{"Power supply property gcpm_pps", "/sys/class/power_supply/gcpm_pps/uevent"}, {"Power supply property gcpm_pps", "/sys/class/power_supply/gcpm_pps/uevent"},
{"Power supply property main-charger", "/sys/class/power_supply/main-charger/uevent"}, {"Power supply property main-charger", "/sys/class/power_supply/main-charger/uevent"},
{"Power supply property dc-mains", "/sys/class/power_supply/dc-mains/uevent"}, {"Power supply property dc-mains", "/sys/class/power_supply/dc-mains/uevent"},
{"Power supply property tcpm", "/sys/class/power_supply/tcpm-source-psy-8-0025/uevent"}, {"Power supply property tcpm", "/sys/class/power_supply/tcpm-source-psy-i2c-max77759tcpc/uevent"},
{"Power supply property usb", "/sys/class/power_supply/usb/uevent"}, {"Power supply property usb", "/sys/class/power_supply/usb/uevent"},
{"Power supply property wireless", "/sys/class/power_supply/wireless/uevent"}, {"Power supply property wireless", "/sys/class/power_supply/wireless/uevent"},
}; };
@ -319,6 +319,7 @@ void dumpPdEngine() {
void dumpBatteryHealth() { void dumpBatteryHealth() {
const char* batteryHealth [][2] { const char* batteryHealth [][2] {
{"Battery Health", "/sys/class/power_supply/battery/health_index_stats"}, {"Battery Health", "/sys/class/power_supply/battery/health_index_stats"},
{"Battery Health SoC Residency", "/sys/class/power_supply/battery/swelling_data"},
{"BMS logbuffer", "/dev/logbuffer_ssoc"}, {"BMS logbuffer", "/dev/logbuffer_ssoc"},
{"TTF logbuffer", "/dev/logbuffer_ttf"}, {"TTF logbuffer", "/dev/logbuffer_ttf"},
{"TTF details", "/sys/class/power_supply/battery/ttf_details"}, {"TTF details", "/sys/class/power_supply/battery/ttf_details"},
@ -374,7 +375,7 @@ void dumpBatteryDefend() {
for (auto &file : files) { for (auto &file : files) {
fileLocation = std::string(config[1]) + std::string(file); fileLocation = std::string(config[1]) + std::string(file);
if (!android::base::ReadFileToString(fileLocation, &content)) { if (!android::base::ReadFileToString(fileLocation, &content) || content.empty()) {
content = "\n"; content = "\n";
} }
@ -420,24 +421,61 @@ void printValuesOfDirectory(const char *directory, std::string debugfs, const ch
files.clear(); files.clear();
} }
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";
const char* chgConfig [][2] {
{"DC_registers dump", "/sys/class/power_supply/dc-mains/device/registers_dump"},
};
std::string chg_name;
std::string pmic_name;
std::string pmic_reg_dump;
printf("\n");
int ret = android::base::ReadFileToString(chg_name_file, &chg_name);
if (ret && !chg_name.empty()) {
chg_name.erase(chg_name.length() - 1); // remove new line
const std::string chg_reg_dump_title = chg_name + reg_dump_str;
/* CHG reg dump */
dumpFileContent(chg_reg_dump_title.c_str(), chg_reg_dump_file);
}
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()) {
pmic_name.erase(pmic_name.length() - 1); // remove new line
const std::string pmic_reg_dump_title = pmic_name + reg_dump_str;
/* PMIC reg dump */
dumpFileContent(pmic_reg_dump_title.c_str(), pmic_reg_dump.c_str());
}
for (auto &config : chgConfig) {
dumpFileContent(config[0], config[1]);
}
}
void dumpChgUserDebug() { void dumpChgUserDebug() {
const char *chgDebugMax77759 [][2] {
{"max77759_chg registers dump", "/d/max77759_chg/registers"},
{"max77729_pmic registers dump", "/d/max77729_pmic/registers"},
};
const char *chgDebugMax77779 [][2] {
{"max77779_chg registers dump", "/d/max77779_chg/registers"},
{"max77779_pmic registers dump", "/d/max77779_pmic/registers"},
};
const std::string debugfs = "/d/"; const std::string debugfs = "/d/";
const char *maxFgDir = "/d/maxfg"; const char *maxFgDir = "/d/maxfg";
const char *maxFgStrMatch = "maxfg"; const char *maxFgStrMatch = "maxfg";
const char *maxFg77779StrMatch = "max77779fg"; const char *maxFg77779StrMatch = "max77779fg";
const char *baseChgDir = "/d/max77759_chg";
const char *dcRegName = "DC_registers dump";
const char *dcRegDir = "/sys/class/power_supply/dc-mains/device/registers_dump";
const char *chgTblName = "Charging table dump"; const char *chgTblName = "Charging table dump";
const char *chgTblDir = "/d/google_battery/chg_raw_profile"; const char *chgTblDir = "/d/google_battery/chg_raw_profile";
@ -460,20 +498,6 @@ void dumpChgUserDebug() {
if (isUserBuild()) if (isUserBuild())
return; return;
if (isValidFile(dcRegDir)) {
dumpFileContent(dcRegName, dcRegDir);
}
if (isValidDir(baseChgDir)) {
for (auto &row : chgDebugMax77759) {
dumpFileContent(row[0], row[1]);
}
} else {
for (auto &row : chgDebugMax77779) {
dumpFileContent(row[0], row[1]);
}
}
dumpFileContent(chgTblName, chgTblDir); dumpFileContent(chgTblName, chgTblDir);
if (isValidDir(maxFgDir)) { if (isValidDir(maxFgDir)) {
@ -603,6 +627,7 @@ void dumpGvoteables() {
void dumpMitigation() { void dumpMitigation() {
const char *mitigationList [][2] { const char *mitigationList [][2] {
{"LastmealCSV" , "/data/vendor/mitigation/lastmeal.csv"},
{"Lastmeal" , "/data/vendor/mitigation/lastmeal.txt"}, {"Lastmeal" , "/data/vendor/mitigation/lastmeal.txt"},
{"Thismeal" , "/data/vendor/mitigation/thismeal.txt"}, {"Thismeal" , "/data/vendor/mitigation/thismeal.txt"},
}; };
@ -965,6 +990,7 @@ int main() {
dumpPdEngine(); dumpPdEngine();
dumpBatteryHealth(); dumpBatteryHealth();
dumpBatteryDefend(); dumpBatteryDefend();
dumpChg();
dumpChgUserDebug(); dumpChgUserDebug();
dumpBatteryEeprom(); dumpBatteryEeprom();
dumpChargerStats(); dumpChargerStats();

View file

@ -57,6 +57,7 @@ on init
chown system system /sys/devices/platform/google,battery/power_supply/battery/bd_trickle_reset_sec chown system system /sys/devices/platform/google,battery/power_supply/battery/bd_trickle_reset_sec
chown system system /sys/devices/platform/google,battery/power_supply/battery/bd_clear chown system system /sys/devices/platform/google,battery/power_supply/battery/bd_clear
chown system system /sys/devices/platform/google,battery/power_supply/battery/health_safety_margin chown system system /sys/devices/platform/google,battery/power_supply/battery/health_safety_margin
chown system system /sys/devices/platform/google,battery/power_supply/battery/swelling_data
chown system system /sys/devices/platform/google,charger/bd_drainto_soc chown system system /sys/devices/platform/google,charger/bd_drainto_soc
chown system system /sys/devices/platform/google,charger/bd_recharge_soc chown system system /sys/devices/platform/google,charger/bd_recharge_soc
chown system system /sys/devices/platform/google,charger/bd_recharge_voltage chown system system /sys/devices/platform/google,charger/bd_recharge_voltage

View file

@ -12,18 +12,4 @@
<name>android.hardware.boot</name> <name>android.hardware.boot</name>
<fqname>IBootControl/default</fqname> <fqname>IBootControl/default</fqname>
</hal> </hal>
<hal format="aidl">
<name>com.google.input.algos.spd</name>
<interface>
<name>IScreenProtectorDetectorService</name>
<instance>default</instance>
</interface>
</hal>
<hal format="aidl">
<name>com.google.input</name>
<interface>
<name>ITouchContextService</name>
<instance>default</instance>
</interface>
</hal>
</manifest> </manifest>

View file

@ -124,8 +124,7 @@
<Limit name="measured-frame-rate-1920x1080" range="25-26" /> <!-- v90%=1.0 --> <Limit name="measured-frame-rate-1920x1080" range="25-26" /> <!-- v90%=1.0 -->
</MediaCodec> </MediaCodec>
<MediaCodec name="c2.android.hevc.decoder" type="video/hevc" update="true"> <MediaCodec name="c2.android.hevc.decoder" type="video/hevc" update="true">
<!-- measured 90%:295-301 med:296 N=2 --> <Limit name="measured-frame-rate-352x288" range="583-674" />
<Limit name="measured-frame-rate-352x288" range="295-298" /> <!-- v90%=1.0 -->
<!-- measured 90%:196-207 med:196 N=2 --> <!-- measured 90%:196-207 med:196 N=2 -->
<Limit name="measured-frame-rate-640x360" range="196-201" /> <!-- v90%=1.0 --> <Limit name="measured-frame-rate-640x360" range="196-201" /> <!-- v90%=1.0 -->
<!-- measured 90%:177-180 med:178 N=2 --> <!-- measured 90%:177-180 med:178 N=2 -->
@ -173,61 +172,63 @@
<Limit name="measured-frame-rate-1280x720" range="44-54" /> <Limit name="measured-frame-rate-1280x720" range="44-54" />
</MediaCodec> </MediaCodec>
<MediaCodec name="c2.android.av1-dav1d.decoder" type="video/av01" update="true"> <MediaCodec name="c2.android.av1-dav1d.decoder" type="video/av01" update="true">
<Limit name="measured-frame-rate-352x288" range="233-315" /> <Limit name="measured-frame-rate-352x288" range="689-881" />
<Limit name="measured-frame-rate-640x360" range="114-247" /> <Limit name="measured-frame-rate-640x360" range="763-845" />
<Limit name="measured-frame-rate-720x480" range="47-189" /> <Limit name="measured-frame-rate-720x480" range="727-746" />
<Limit name="measured-frame-rate-1280x720" range="44-54" /> <Limit name="measured-frame-rate-1280x720" range="348-358" />
</MediaCodec> </MediaCodec>
</Decoders> </Decoders>
<Encoders> <Encoders>
<MediaCodec name="c2.exynos.h264.encoder" type="video/avc" update="true"> <MediaCodec name="c2.exynos.h264.encoder" type="video/avc" update="true">
<Limit name="measured-frame-rate-320x240" range="372-551" /> <Limit name="measured-frame-rate-320x240" range="372-551" />
<Limit name="measured-frame-rate-720x480" range="221-308" /> <Limit name="measured-frame-rate-720x480" range="161-308" />
<Limit name="measured-frame-rate-1280x720" range="151-190" /> <Limit name="measured-frame-rate-1280x720" range="151-190" />
<Limit name="measured-frame-rate-1920x1080" range="58-99" /> <Limit name="measured-frame-rate-1920x1080" range="58-99" />
</MediaCodec> </MediaCodec>
<MediaCodec name="c2.exynos.hevc.encoder" type="video/hevc" update="true"> <MediaCodec name="c2.exynos.hevc.encoder" type="video/hevc" update="true">
<Limit name="measured-frame-rate-320x240" range="371-553" /> <Limit name="measured-frame-rate-320x240" range="371-553" />
<Limit name="measured-frame-rate-720x480" range="214-305" /> <Limit name="measured-frame-rate-720x480" range="162-305" />
<Limit name="measured-frame-rate-1280x720" range="154-198" /> <Limit name="measured-frame-rate-1280x720" range="154-198" />
<Limit name="measured-frame-rate-1920x1080" range="46-97" /> <Limit name="measured-frame-rate-1920x1080" range="46-97" />
</MediaCodec> </MediaCodec>
<MediaCodec name="c2.exynos.mpeg4.encoder" type="video/mp4v-es" update="true"> <MediaCodec name="c2.exynos.mpeg4.encoder" type="video/mp4v-es" update="true">
<!-- measured 90%:575-670 med:575 N=2 --> <!-- measured 90%:240-242 med:241 N=2 -->
<Limit name="measured-frame-rate-176x144" range="575-620" /> <!-- v90%=1.1 --> <Limit name="measured-frame-rate-176x144" range="240-241" /> <!-- v90%=1.0 -->
<!-- measured 90%:222-283 med:222 SLOW N=2 --> <!-- measured 90%:168-172 med:169 N=2 -->
<Limit name="measured-frame-rate-352x288" range="222-250" /> <!-- v90%=1.1 --> <Limit name="measured-frame-rate-352x288" range="168-170" /> <!-- v90%=1.0 -->
<!-- measured 90%:123-124 med:124 N=2 --> <!-- measured 90%:85-86 med:85 N=2 -->
<Limit name="measured-frame-rate-640x480" range="123-124" /> <!-- v90%=1.0 --> <Limit name="measured-frame-rate-640x480" range="85-85" /> <!-- v90%=1.0 -->
</MediaCodec> </MediaCodec>
<MediaCodec name="c2.exynos.h263.encoder" type="video/3gpp" update="true"> <MediaCodec name="c2.exynos.h263.encoder" type="video/3gpp" update="true">
<!-- measured 90%:626-686 med:627 N=2 --> <!-- measured 90%:244-248 med:244 N=2 -->
<Limit name="measured-frame-rate-176x144" range="626-656" /> <!-- v90%=1.0 --> <Limit name="measured-frame-rate-176x144" range="244-246" /> <!-- v90%=1.0 -->
<!-- measured 90%:295-300 med:296 N=2 --> <!-- measured 90%:166-170 med:166 N=2 -->
<Limit name="measured-frame-rate-352x288" range="295-298" /> <!-- v90%=1.0 --> <Limit name="measured-frame-rate-352x288" range="166-168" /> <!-- v90%=1.0 -->
<!-- measured 90%:95-97 med:96 N=2 --> <!-- measured 90%:67-68 med:67 N=2 -->
<Limit name="measured-frame-rate-704x576" range="95-96" /> <!-- v90%=1.0 --> <Limit name="measured-frame-rate-704x576" range="67-67" /> <!-- v90%=1.0 -->
</MediaCodec> </MediaCodec>
<MediaCodec name="c2.exynos.vp8.encoder" type="video/x-vnd.on2.vp8" update="true"> <MediaCodec name="c2.exynos.vp8.encoder" type="video/x-vnd.on2.vp8" update="true">
<!-- measured 90%:478-498 med:479 N=2 --> <!-- measured 90%:256-259 med:256 N=2 -->
<Limit name="measured-frame-rate-320x180" range="478-488" /> <!-- v90%=1.0 --> <Limit name="measured-frame-rate-320x180" range="256-257" /> <!-- v90%=1.0 -->
<!-- measured 90%:334-347 med:334 N=2 --> <!-- measured 90%:165-167 med:165 N=2 -->
<Limit name="measured-frame-rate-640x360" range="334-341" /> <!-- v90%=1.0 --> <Limit name="measured-frame-rate-640x360" range="165-166" /> <!-- v90%=1.0 -->
<!-- measured 90%:142-143 med:142 N=2 --> <!-- measured 90%:89-92 med:90 N=2 -->
<Limit name="measured-frame-rate-1280x720" range="142-142" /> <!-- v90%=1.0 --> <Limit name="measured-frame-rate-1280x720" range="89-90" /> <!-- v90%=1.0 -->
<!-- measured 90%:69-70 med:69 N=2 --> <!-- measured 90%:78-80 med:79 N=2 -->
<Limit name="measured-frame-rate-1920x1080" range="69-69" /> <!-- v90%=1.0 --> <Limit name="measured-frame-rate-1920x1080" range="78-79" /> <!-- v90%=1.0 -->
</MediaCodec> </MediaCodec>
<MediaCodec name="c2.exynos.vp9.encoder" type="video/x-vnd.on2.vp9" update="true"> <MediaCodec name="c2.exynos.vp9.encoder" type="video/x-vnd.on2.vp9" update="true">
<!-- measured 90%:474-485 med:474 N=2 --> <!-- measured 90%:281-285 med:281 N=2 -->
<Limit name="measured-frame-rate-320x180" range="474-479" /> <!-- v90%=1.0 --> <Limit name="measured-frame-rate-320x180" range="281-283" /> <!-- v90%=1.0 -->
<!-- measured 90%:192-267 med:193 SLOW N=2 --> <!-- measured 90%:230-233 med:231 N=2 -->
<Limit name="measured-frame-rate-640x360" range="192-227" /> <!-- v90%=1.2 --> <Limit name="measured-frame-rate-640x360" range="230-231" /> <!-- v90%=1.0 -->
<!-- measured 90%:95-96 med:96 N=2 --> <!-- measured 90%:122-124 med:123 N=2 -->
<Limit name="measured-frame-rate-1280x720" range="95-96" /> <!-- v90%=1.0 --> <Limit name="measured-frame-rate-1280x720" range="122-123" /> <!-- v90%=1.0 -->
<!-- measured 90%:84-86 med:85 N=2 --> <!-- measured 90%:72-73 med:73 N=2 -->
<Limit name="measured-frame-rate-1920x1080" range="84-85" /> <!-- v90%=1.0 --> <Limit name="measured-frame-rate-1920x1080" range="72-73" /> <!-- v90%=1.0 -->
<!-- measured 90%:45-47 med:46 N=2 -->
<Limit name="measured-frame-rate-3840x2160" range="45-46" /> <!-- v90%=1.0 -->
</MediaCodec> </MediaCodec>
<MediaCodec name="c2.google.av1.encoder" type="video/av01" update="true"> <MediaCodec name="c2.google.av1.encoder" type="video/av01" update="true">
<!-- measured 90%:292-307 med:292 N=2 --> <!-- measured 90%:292-307 med:292 N=2 -->
@ -241,8 +242,8 @@
</MediaCodec> </MediaCodec>
<MediaCodec name="c2.android.h263.encoder" type="video/3gpp" update="true"> <MediaCodec name="c2.android.h263.encoder" type="video/3gpp" update="true">
<!-- measured 90%:868-1433 med:869 SLOW N=2 --> <!-- measured 90%:399-837 med:399 SLOW N=2 -->
<Limit name="measured-frame-rate-176x144" range="868-1116" /> <!-- v90%=1.3 --> <Limit name="measured-frame-rate-176x144" range="399-880" /> <!-- v90%=1.4 -->
</MediaCodec> </MediaCodec>
<MediaCodec name="c2.android.avc.encoder" type="video/avc" update="true"> <MediaCodec name="c2.android.avc.encoder" type="video/avc" update="true">
<!-- measured 90%:357-443 med:427 N=4 --> <!-- measured 90%:357-443 med:427 N=4 -->
@ -259,34 +260,34 @@
<Limit name="measured-frame-rate-320x240" range="43-44" /> <!-- v90%=1.0 --> <Limit name="measured-frame-rate-320x240" range="43-44" /> <!-- v90%=1.0 -->
</MediaCodec> </MediaCodec>
<MediaCodec name="c2.android.mpeg4.encoder" type="video/mp4v-es" update="true"> <MediaCodec name="c2.android.mpeg4.encoder" type="video/mp4v-es" update="true">
<!-- measured 90%:1426-1471 med:1427 N=2 --> <!-- measured 90%:451-1716 med:451 SLOW N=2 -->
<Limit name="measured-frame-rate-176x144" range="1426-1448" /> <!-- v90%=1.0 --> <Limit name="measured-frame-rate-176x144" range="451-880" /> <!-- v90%=2.0 -->
</MediaCodec> </MediaCodec>
<MediaCodec name="c2.android.vp8.encoder" type="video/x-vnd.on2.vp8" update="true"> <MediaCodec name="c2.android.vp8.encoder" type="video/x-vnd.on2.vp8" update="true">
<!-- measured 90%:392-448 med:392 N=2 --> <!-- measured 90%:392-448 med:392 N=2 -->
<Limit name="measured-frame-rate-320x180" range="392-419" /> <!-- v90%=1.1 --> <Limit name="measured-frame-rate-320x180" range="180-419" /> <!-- v90%=1.1 -->
<!-- measured 90%:213-226 med:214 N=2 --> <!-- measured 90%:213-226 med:214 N=2 -->
<Limit name="measured-frame-rate-640x360" range="213-219" /> <!-- v90%=1.0 --> <Limit name="measured-frame-rate-640x360" range="102-219" /> <!-- v90%=1.0 -->
<!-- measured 90%:48-54 med:49 N=2 --> <!-- measured 90%:48-54 med:49 N=2 -->
<Limit name="measured-frame-rate-1280x720" range="48-51" /> <!-- v90%=1.1 --> <Limit name="measured-frame-rate-1280x720" range="48-51" /> <!-- v90%=1.1 -->
<!-- measured 90%:35-37 med:36 N=2 --> <!-- measured 90%:35-37 med:36 N=2 -->
<Limit name="measured-frame-rate-1920x1080" range="35-36" /> <!-- v90%=1.0 --> <Limit name="measured-frame-rate-1920x1080" range="12-36" /> <!-- v90%=1.0 -->
</MediaCodec> </MediaCodec>
<MediaCodec name="c2.android.vp9.encoder" type="video/x-vnd.on2.vp9" update="true"> <MediaCodec name="c2.android.vp9.encoder" type="video/x-vnd.on2.vp9" update="true">
<!-- measured 90%:304-378 med:304 SLOW N=2 --> <!-- measured 90%:304-378 med:304 SLOW N=2 -->
<Limit name="measured-frame-rate-320x180" range="304-339" /> <!-- v90%=1.1 --> <Limit name="measured-frame-rate-320x180" range="180-339" /> <!-- v90%=1.1 -->
<!-- measured 90%:103-106 med:104 N=2 --> <!-- measured 90%:103-106 med:104 N=2 -->
<Limit name="measured-frame-rate-640x360" range="103-104" /> <!-- v90%=1.0 --> <Limit name="measured-frame-rate-640x360" range="52-104" /> <!-- v90%=1.0 -->
<!-- measured 90%:20-24 med:21 N=2 --> <!-- measured 90%:20-24 med:21 N=2 -->
<Limit name="measured-frame-rate-1280x720" range="20-22" /> <!-- v90%=1.1 --> <Limit name="measured-frame-rate-1280x720" range="7-22" /> <!-- v90%=1.1 -->
</MediaCodec> </MediaCodec>
<MediaCodec name="c2.android.av1.encoder" type="video/av01" update="true"> <MediaCodec name="c2.android.av1.encoder" type="video/av01" update="true">
<!-- measured 90%:367-372 med:367 N=2 --> <!-- measured 90%:198-374 med:199 SLOW N=2 -->
<Limit name="measured-frame-rate-320x240" range="367-369" /> <!-- v90%=1.0 --> <Limit name="measured-frame-rate-320x240" range="91-272" /> <!-- v90%=1.4 -->
<!-- measured 90%:66-78 med:67 N=2 --> <!-- measured 90%:16-67 med:17 SLOW N=2 FLAKY(8 - 68) variance:2.0 -->
<Limit name="measured-frame-rate-720x480" range="66-72" /> <!-- v90%=1.1 --> <Limit name="measured-frame-rate-720x480" range="32-72" />
<!-- measured 90%:23-28 med:23 N=2 --> <!-- measured 90%:23-28 med:23 N=2 -->
<Limit name="measured-frame-rate-1280x720" range="23-25" /> <!-- v90%=1.1 --> <Limit name="measured-frame-rate-1280x720" range="7-25" /> <!-- v90%=1.1 -->
</MediaCodec> </MediaCodec>
</Encoders> </Encoders>

View file

@ -1,3 +1,4 @@
#name,version,ml_type,compute_enable,compute_timer,train_enable,train_timer,monitor_enable_monitor_timer,execution_type,execution_timer #name,version,ml_type,compute_enable,compute_timer,train_enable,train_timer,monitor_enable_monitor_timer,execution_type,execution_timer
fr2_bps_ml_model,0,LEGACY,true,0,false,0,false,0,SYNCHRONOUS_REGULAR,5000
sample_linear_reg,0,LEGACY,true,5000,false,0,false,0,SYNCHRONOUS_REGULAR,5000 sample_linear_reg,0,LEGACY,true,5000,false,0,false,0,SYNCHRONOUS_REGULAR,5000
sample_fully_conn,0,LEGACY,true,5000,false,0,false,0,SYNCHRONOUS_REGULAR,5000 sample_fully_conn,88,LEGACY,true,5000,false,0,false,0,SYNCHRONOUS_REGULAR,5000

View file

@ -1,3 +1,4 @@
#name,version,ml_type,compute_enable,compute_timer,train_enable,train_timer,monitor_enable_monitor_timer,execution_type,execution_timer #name,version,ml_type,compute_enable,compute_timer,train_enable,train_timer,monitor_enable_monitor_timer,execution_type,execution_timer
fr2_bps_ml_model,0,LEGACY,true,0,false,0,false,0,SYNCHRONOUS_REGULAR,5000
sample_linear_reg,0,LEGACY,true,5000,true,5000,true,5000,SYNCHRONOUS_REGULAR,5000 sample_linear_reg,0,LEGACY,true,5000,true,5000,true,5000,SYNCHRONOUS_REGULAR,5000
sample_fully_conn,0,LEGACY,true,5000,true,5000,true,5000,SYNCHRONOUS_REGULAR,5000 sample_fully_conn,88,LEGACY,true,5000,true,5000,true,5000,SYNCHRONOUS_REGULAR,5000

View file

@ -299,6 +299,7 @@
<item>com.zhiliaoapp.musically:0.07</item> <item>com.zhiliaoapp.musically:0.07</item>
<item>com.bilibili.app.in:0.07</item> <item>com.bilibili.app.in:0.07</item>
<item>com.twitter.android:0.07</item> <item>com.twitter.android:0.07</item>
<item>com.google.android.youtube:0.07</item>
</string-array> </string-array>
<!-- Pre-scale volume at volume step 1 for Absolute Volume --> <!-- Pre-scale volume at volume step 1 for Absolute Volume -->
@ -322,4 +323,131 @@
<!-- Boolean indicating if restoring network selection should be skipped --> <!-- Boolean indicating if restoring network selection should be skipped -->
<!-- The restoring is handled by modem if it is true --> <!-- The restoring is handled by modem if it is true -->
<bool translatable="false" name="skip_restoring_network_selection">true</bool> <bool translatable="false" name="skip_restoring_network_selection">true</bool>
<!-- Array of light sensor LUX values to define our levels for auto backlight brightness support.
The N entries of this array define N 1 zones as follows:
Zone 0: 0 <= LUX < array[0]
Zone 1: array[0] <= LUX < array[1]
...
Zone N: array[N - 1] <= LUX < array[N]
Zone N + 1 array[N] <= LUX < infinity
Must be overridden in platform specific overlays -->
<integer-array name="config_autoBrightnessLevels">
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>8</item>
<item>12</item>
<item>15</item>
<item>20</item>
<item>33</item>
<item>55</item>
<item>90</item>
<item>148</item>
<item>245</item>
<item>403</item>
<item>665</item>
<item>1097</item>
<item>1808</item>
<item>3000</item>
<item>6000</item>
<item>9000</item>
<item>10000</item>
<item>14000</item>
<item>20000</item>
<item>25000</item>
<item>31000</item>
<item>41000</item>
<item>51000</item>
<item>61000</item>
<item>71000</item>
<item>81000</item>
<item>91000</item>
<item>100000</item>
</integer-array>
<!-- Array of desired screen brightness in nits corresponding to the lux values
in the config_autoBrightnessLevels array. As with config_screenBrightnessMinimumNits and
config_screenBrightnessMaximumNits, the display brightness is defined as the measured
brightness of an all-white image.
If this is defined then:
- config_autoBrightnessLcdBacklightValues should not be defined
- config_screenBrightnessNits must be defined
- config_screenBrightnessBacklight must be defined
This array should have size one greater than the size of the config_autoBrightnessLevels
array. The brightness values must be non-negative and non-decreasing. This must be
overridden in platform specific overlays -->
<array name="config_autoBrightnessDisplayValuesNits">
<item>5.139055</item> <!-- 0 - 1 -->
<item>9.962018965</item> <!-- 1 - 2 -->
<item>18.34822964</item> <!-- 2 - 3 -->
<item>21.55068128</item> <!-- 3 - 4 -->
<item>24.0167788</item> <!-- 4 - 8 -->
<item>32.5</item> <!-- 8 - 12 -->
<item>46</item> <!-- 12 - 15 -->
<item>53.26923077</item> <!-- 15 - 20 -->
<item>54.61538462</item> <!-- 20 - 33 -->
<item>58.11538462</item> <!-- 33 - 55 -->
<item>62.1394</item> <!-- 55 - 90 -->
<item>67.13133333</item> <!-- 90 - 148 -->
<item>79.67614115</item> <!-- 148 - 245 -->
<item>98.04727274</item> <!-- 245 - 403 -->
<item>125.1221991</item> <!-- 403 - 665 -->
<item>161.6875093</item> <!-- 665 - 1097 -->
<item>208.4885553</item> <!-- 1097 - 1808 -->
<item>264.8221315</item> <!-- 1808 - 3000 -->
<item>328.5869521</item> <!-- 3000 - 6000 -->
<item>627.4315413</item> <!-- 6000 - 9000 -->
<item>826.8584866</item> <!-- 9000 - 10000 -->
<item>867.85582302</item> <!-- 10000 - 14000 -->
<item>1041.39662279</item> <!-- 14000 - 20000 -->
<item>1227.52633489</item> <!-- 20000 - 25000 -->
<item>1331.28933608</item> <!-- 25000 - 31000 -->
<item>1428.421149</item> <!-- 31000 - 41000 -->
<item>1575.787970</item> <!-- 41000 - 51000 -->
<item>1703.973078</item> <!-- 51000 - 61000 -->
<item>1811.651453</item> <!-- 61000 - 71000 -->
<item>1897.082235</item> <!-- 71000 - 81000 -->
<item>1958.157391</item> <!-- 81000 - 91000 -->
<item>1992.433376</item> <!-- 91000 - 100000 -->
<item>2050</item> <!-- 100000+ -->
</array>
<!-- The identifier of the satellite's SIM profile. The identifier is composed of MCC and MNC
of the satellite PLMN with the format "mccmnc". -->
<string name="config_satellite_sim_plmn_identifier">90198</string>
<!-- The identifier for the satellite's SIM profile. The identifier is the service provider name
(spn) from the profile metadata. -->
<string name="config_satellite_sim_spn_identifier">Skylo</string>
<!-- Telephony satellite gateway service package name to bind to by default. -->
<string name="config_satellite_gateway_service_package">com.google.android.apps.stargate</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>
</string-array>
<!-- The file storing S2-cell-based satellite access restriction of the countries defined by
config_oem_enabled_satellite_countries. -->
<string name="config_oem_enabled_satellite_s2cell_file">/vendor/etc/telephony/sats2.dat</string>
<!-- The time duration in millis after which cellular scanning will be enabled and satellite
will move to IDLE state. This timeout duration is used for satellite with NB IOT radio
technologies.
-->
<integer name="config_satellite_nb_iot_inactivity_timeout_millis">900000</integer>
<!-- The time duration in millis after which Telephony will abort the datagram sending requests.
Telephony starts a timer when receiving a datagram sending request in either OFF, IDLE, or
NOT_CONNECTED state. In NOT_CONNECTED, the duration of the timer is given by this config.
In OFF or IDLE state, the duration of the timer is the sum of this config and the
config_satellite_modem_image_switching_duration_millis.
-->
<integer name="config_datagram_wait_for_connected_state_timeout_millis">900000</integer>
</resources> </resources>

View file

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/**
* Copyright (c) 2024, 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>
<!-- disable bluetooth and wifi during satellite -->
<string name="def_satellite_mode_radios">bluetooth,wifi</string>
</resources>

View file

@ -1,6 +1,10 @@
on property:sys.boot_completed=1 on property:sys.boot_completed=1
chown system system /sys/class/power_supply/max77779fg/fg_learning_events
chown system system /sys/class/power_supply/maxfg_base/fg_learning_events
chown system system /sys/devices/platform/maxim,max77779fwu/update_stats
start vendor.pixelstats_vendor start vendor.pixelstats_vendor
on post-fs-data
chown system system /sys/kernel/metrics/irq/stats_reset
service vendor.pixelstats_vendor /vendor/bin/pixelstats-vendor service vendor.pixelstats_vendor /vendor/bin/pixelstats-vendor
class hal class hal
user system user system

View file

@ -62,6 +62,8 @@ const struct SysfsCollector::SysfsPaths sysfs_paths = {
.AmsRatePath = "/sys/devices/platform/audiometrics/ams_rate_read_once", .AmsRatePath = "/sys/devices/platform/audiometrics/ams_rate_read_once",
.ResumeLatencyMetricsPath = "/sys/kernel/metrics/resume_latency/resume_latency_metrics", .ResumeLatencyMetricsPath = "/sys/kernel/metrics/resume_latency/resume_latency_metrics",
.LongIRQMetricsPath = "/sys/kernel/metrics/irq/long_irq_metrics", .LongIRQMetricsPath = "/sys/kernel/metrics/irq/long_irq_metrics",
.StormIRQMetricsPath = "/sys/kernel/metrics/irq/storm_irq_metrics",
.IRQStatsResetPath = "/sys/kernel/metrics/irq/stats_reset",
.TempResidencyAndResetPaths = { .TempResidencyAndResetPaths = {
{ {
"/sys/kernel/metrics/thermal/tr_by_group/tmu/stats", "/sys/kernel/metrics/thermal/tr_by_group/tmu/stats",
@ -74,12 +76,36 @@ const struct SysfsCollector::SysfsPaths sysfs_paths = {
}, },
.ModemPcieLinkStatsPath = "/sys/devices/platform/12100000.pcie/link_stats", .ModemPcieLinkStatsPath = "/sys/devices/platform/12100000.pcie/link_stats",
.WifiPcieLinkStatsPath = "/sys/devices/platform/13120000.pcie/link_stats", .WifiPcieLinkStatsPath = "/sys/devices/platform/13120000.pcie/link_stats",
.GMSRPath = "/sys/class/power_supply/max77779fg/gmsr" .GMSRPath = {
"/sys/class/power_supply/max77779fg/gmsr",
"/sys/class/power_supply/maxfg_base/gmsr",
},
.PDMStatePath = "/sys/devices/platform/audiometrics/pdm_state",
.WavesPath = "/sys/devices/platform/audiometrics/waves",
.AdaptedInfoCountPath = "/sys/devices/platform/audiometrics/adapted_info_active_count",
.AdaptedInfoDurationPath = "/sys/devices/platform/audiometrics/adapted_info_active_duration",
.CCARatePath = "/sys/devices/platform/audiometrics/cca_count_read_once",
.PcmLatencyPath = "/sys/devices/platform/audiometrics/pcm_latency",
.PcmCountPath = "/sys/devices/platform/audiometrics/pcm_count",
.TotalCallCountPath = "/sys/devices/platform/audiometrics/call_count",
.OffloadEffectsIdPath = "/sys/devices/platform/audiometrics/offload_effects_id",
.OffloadEffectsDurationPath = "/sys/devices/platform/audiometrics/offload_effects_duration",
.BluetoothAudioUsagePath = "/sys/devices/platform/audiometrics/bt_usage"
}; };
const struct UeventListener::UeventPaths ueventPaths = { const struct UeventListener::UeventPaths ueventPaths = {
.AudioUevent = "/devices/virtual/amcs/amcs", .AudioUevent = "/devices/virtual/amcs/amcs",
.TypeCPartnerUevent = "PRODUCT_TYPE="}; .TypeCPartnerUevent = "PRODUCT_TYPE=",
.FGLearningPath = {
"/sys/class/power_supply/max77779fg/fg_learning_events",
"/sys/class/power_supply/maxfg_base/fg_learning_events"
},
.FwUpdatePath = "/sys/devices/platform/maxim,max77779fwu/update_stats",
.FGModelLoadingPath = {
"/sys/class/power_supply/max77779fg/model_state",
"/sys/class/power_supply/maxfg_base/model_state"
}
};
int main() { int main() {
LOG(INFO) << "starting PixelStats"; LOG(INFO) << "starting PixelStats";

View file

@ -19,6 +19,7 @@
#include <AocStateResidencyDataProvider.h> #include <AocStateResidencyDataProvider.h>
#include <CpupmStateResidencyDataProvider.h> #include <CpupmStateResidencyDataProvider.h>
#include <DevfreqStateResidencyDataProvider.h> #include <DevfreqStateResidencyDataProvider.h>
#include <DisplayMrrStateResidencyDataProvider.h>
#include <AdaptiveDvfsStateResidencyDataProvider.h> #include <AdaptiveDvfsStateResidencyDataProvider.h>
#include <TpuDvfsStateResidencyDataProvider.h> #include <TpuDvfsStateResidencyDataProvider.h>
#include <UfsStateResidencyDataProvider.h> #include <UfsStateResidencyDataProvider.h>
@ -39,6 +40,7 @@ using aidl::android::hardware::power::stats::AdaptiveDvfsStateResidencyDataProvi
using aidl::android::hardware::power::stats::AocStateResidencyDataProvider; using aidl::android::hardware::power::stats::AocStateResidencyDataProvider;
using aidl::android::hardware::power::stats::CpupmStateResidencyDataProvider; using aidl::android::hardware::power::stats::CpupmStateResidencyDataProvider;
using aidl::android::hardware::power::stats::DevfreqStateResidencyDataProvider; using aidl::android::hardware::power::stats::DevfreqStateResidencyDataProvider;
using aidl::android::hardware::power::stats::DisplayMrrStateResidencyDataProvider;
using aidl::android::hardware::power::stats::DvfsStateResidencyDataProvider; using aidl::android::hardware::power::stats::DvfsStateResidencyDataProvider;
using aidl::android::hardware::power::stats::UfsStateResidencyDataProvider; using aidl::android::hardware::power::stats::UfsStateResidencyDataProvider;
using aidl::android::hardware::power::stats::EnergyConsumerType; using aidl::android::hardware::power::stats::EnergyConsumerType;
@ -325,8 +327,7 @@ void addCPUclusters(std::shared_ptr<PowerStats> p) {
std::make_pair("CPU4", "cpu4"), std::make_pair("CPU4", "cpu4"),
std::make_pair("CPU5", "cpu5"), std::make_pair("CPU5", "cpu5"),
std::make_pair("CPU6", "cpu6"), std::make_pair("CPU6", "cpu6"),
std::make_pair("CPU7", "cpu7"), std::make_pair("CPU7", "cpu7")},
std::make_pair("CPU8", "cpu8")},
.states = { .states = {
std::make_pair("DOWN", "[state1]")}}; std::make_pair("DOWN", "[state1]")}};
@ -426,9 +427,12 @@ void addGNSS(std::shared_ptr<PowerStats> p)
.lastEntryTransform = gnssUsToMs, .lastEntryTransform = gnssUsToMs,
}; };
// External GNSS power stats are controlled by GPS chip side. The power stats
// would not update while GPS chip is down. This means that GPS OFF state
// residency won't reflect the elapsed off time. So only GPS ON state
// residency is present.
const std::vector<std::pair<std::string, std::string>> gnssStateHeaders = { const std::vector<std::pair<std::string, std::string>> gnssStateHeaders = {
std::make_pair("ON", "GPS_ON:"), std::make_pair("ON", "GPS_ON:"),
std::make_pair("OFF", "GPS_OFF:"),
}; };
std::vector<GenericStateResidencyDataProvider::PowerEntityConfig> cfgs; std::vector<GenericStateResidencyDataProvider::PowerEntityConfig> cfgs;
@ -436,10 +440,7 @@ void addGNSS(std::shared_ptr<PowerStats> p)
"GPS", ""); "GPS", "");
p->addStateResidencyDataProvider(std::make_unique<GenericStateResidencyDataProvider>( p->addStateResidencyDataProvider(std::make_unique<GenericStateResidencyDataProvider>(
"/dev/bbd_pwrstat", cfgs)); "/data/vendor/gps/power_stats", cfgs));
p->addEnergyConsumer(PowerStatsEnergyConsumer::createMeterConsumer(p,
EnergyConsumerType::GNSS, "GPS", {"L9S_GNSS_CORE"}));
} }
void addPCIe(std::shared_ptr<PowerStats> p) { void addPCIe(std::shared_ptr<PowerStats> p) {
@ -646,6 +647,15 @@ void addPixelStateResidencyDataProvider(std::shared_ptr<PowerStats> p) {
p->addStateResidencyDataProvider(std::move(pixelSdp)); p->addStateResidencyDataProvider(std::move(pixelSdp));
} }
void addDisplayMrrByEntity(std::shared_ptr<PowerStats> p, std::string name, std::string path) {
p->addStateResidencyDataProvider(std::make_unique<DisplayMrrStateResidencyDataProvider>(
name, path));
}
void addDisplayMrr(std::shared_ptr<PowerStats> p) {
addDisplayMrrByEntity(p, "Display", "/sys/class/drm/card0/device/primary-panel/");
}
void addZumaProCommonDataProviders(std::shared_ptr<PowerStats> p) { void addZumaProCommonDataProviders(std::shared_ptr<PowerStats> p) {
setEnergyMeter(p); setEnergyMeter(p);

View file

@ -23,6 +23,8 @@ using aidl::android::hardware::power::stats::PowerStats;
void addAoC(std::shared_ptr<PowerStats> p); void addAoC(std::shared_ptr<PowerStats> p);
void addCPUclusters(std::shared_ptr<PowerStats> p); void addCPUclusters(std::shared_ptr<PowerStats> p);
void addDevfreq(std::shared_ptr<PowerStats> p); void addDevfreq(std::shared_ptr<PowerStats> p);
void addDisplayMrr(std::shared_ptr<PowerStats> p);
void addDisplayMrrByEntity(std::shared_ptr<PowerStats> p, std::string name, std::string path);
void addDvfsStats(std::shared_ptr<PowerStats> p); void addDvfsStats(std::shared_ptr<PowerStats> p);
void addGNSS(std::shared_ptr<PowerStats> p); void addGNSS(std::shared_ptr<PowerStats> p);
void addGPU(std::shared_ptr<PowerStats> p); void addGPU(std::shared_ptr<PowerStats> p);

View file

@ -0,0 +1,33 @@
//
// Copyright (C) 2023 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.
package {
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "//device/google/zumapro:device_google_zumapro_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: [
"//device/google/zumapro:device_google_zumapro_license",
],
}
prebuilt_etc {
name: "extensive_logging.conf",
vendor: true,
proprietary: true,
src: "extensive_logging.conf",
relative_install_path: "modem"
}

View file

@ -0,0 +1 @@
modem_logging_control START -o /data/vendor/radio/logs/always-on -n 50 -s 50 -i 0 --enable_exmetric --enable_exmetric_internal --enable_dsp

View file

@ -1 +1 @@
modem_logging_control START -o /data/vendor/radio/logs/always-on -n 10 -s 20 -m /vendor/etc/modem/default.cfg --enable_exmetric --enable_exmetric_internal modem_logging_control START -o /data/vendor/radio/logs/always-on -n 50 -s 50 -m /vendor/etc/modem/default.cfg --enable_exmetric --enable_exmetric_internal

BIN
telephony/sats2.dat Normal file

Binary file not shown.

View file

@ -17,7 +17,6 @@
#define LOG_TAG "android.hardware.usb.gadget.aidl-service" #define LOG_TAG "android.hardware.usb.gadget.aidl-service"
#include "UsbGadget.h" #include "UsbGadget.h"
#include <dirent.h>
#include <fcntl.h> #include <fcntl.h>
#include <stdio.h> #include <stdio.h>
#include <sys/inotify.h> #include <sys/inotify.h>
@ -26,21 +25,33 @@
#include <sys/types.h> #include <sys/types.h>
#include <unistd.h> #include <unistd.h>
#include<android-base/properties.h>
#include <aidl/android/frameworks/stats/IStats.h> #include <aidl/android/frameworks/stats/IStats.h>
#include <pixelusb/I2cHelper.h>
namespace aidl { namespace aidl {
namespace android { namespace android {
namespace hardware { namespace hardware {
namespace usb { namespace usb {
namespace gadget { namespace gadget {
#define NUM_HSI2C_PATHS 2
using ::android::hardware::google::pixel::usb::getI2cClientPath;
using ::android::base::GetBoolProperty;
using ::android::hardware::google::pixel::usb::kUvcEnabled;
string enabledPath; string enabledPath;
constexpr char kHsi2cPath[] = "/sys/devices/platform/108d0000.hsi2c"; constexpr char* kHsi2cPaths[] = { (char *) "/sys/devices/platform/108d0000.hsi2c",
constexpr char kI2CPath[] = "/sys/devices/platform/108d0000.hsi2c/i2c-"; (char *) "/sys/devices/platform/10cb0000.hsi2c" };
constexpr char kAccessoryLimitCurrent[] = "-0025/usb_limit_accessory_current"; constexpr char kTcpcDevName[] = "i2c-max77759tcpc";
constexpr char kAccessoryLimitCurrentEnable[] = "-0025/usb_limit_accessory_enable"; constexpr char kI2cClientId[] = "0025";
constexpr char kAccessoryLimitCurrent[] = "usb_limit_accessory_current";
constexpr char kAccessoryLimitCurrentEnable[] = "usb_limit_accessory_enable";
UsbGadget::UsbGadget() : mGadgetIrqPath("") { UsbGadget::UsbGadget() : mGadgetIrqPath(""),
mI2cClientPath("") {
if (access(OS_DESC_PATH, R_OK) != 0) { if (access(OS_DESC_PATH, R_OK) != 0) {
ALOGE("configfs setup not done yet"); ALOGE("configfs setup not done yet");
abort(); abort();
@ -302,6 +313,28 @@ static Status validateAndSetVidPid(uint64_t functions) {
ret = Status(setVidPid("0x18d1", "0x4eec")); ret = Status(setVidPid("0x18d1", "0x4eec"));
} }
break; break;
case GadgetFunction::UVC:
if (!(vendorFunctions == "user" || vendorFunctions == "")) {
ALOGE("Invalid vendorFunctions set: %s", vendorFunctions.c_str());
ret = Status::CONFIGURATION_NOT_SUPPORTED;
} else if (!GetBoolProperty(kUvcEnabled, false)) {
ALOGE("UVC function not enabled by config");
ret = Status::CONFIGURATION_NOT_SUPPORTED;
} else {
ret = Status(setVidPid("0x18d1", "0x4eed"));
}
break;
case GadgetFunction::ADB | GadgetFunction::UVC:
if (!(vendorFunctions == "user" || vendorFunctions == "")) {
ALOGE("Invalid vendorFunctions set: %s", vendorFunctions.c_str());
ret = Status::CONFIGURATION_NOT_SUPPORTED;
} else if (!GetBoolProperty(kUvcEnabled, false)) {
ALOGE("UVC function not enabled by config");
ret = Status::CONFIGURATION_NOT_SUPPORTED;
} else {
ret = Status(setVidPid("0x18d1", "0x4eee"));
}
break;
default: default:
ALOGE("Combination not supported"); ALOGE("Combination not supported");
ret = Status::CONFIGURATION_NOT_SUPPORTED; ret = Status::CONFIGURATION_NOT_SUPPORTED;
@ -418,29 +451,6 @@ Status UsbGadget::setupFunctions(long functions,
return Status::SUCCESS; return Status::SUCCESS;
} }
Status getI2cBusHelper(string *name) {
DIR *dp;
dp = opendir(kHsi2cPath);
if (dp != NULL) {
struct dirent *ep;
while ((ep = readdir(dp))) {
if (ep->d_type == DT_DIR) {
if (string::npos != string(ep->d_name).find("i2c-")) {
std::strtok(ep->d_name, "-");
*name = std::strtok(NULL, "-");
}
}
}
closedir(dp);
return Status::SUCCESS;
}
ALOGE("Failed to open %s", kHsi2cPath);
return Status::ERROR;
}
ScopedAStatus UsbGadget::setCurrentUsbFunctions(long functions, ScopedAStatus UsbGadget::setCurrentUsbFunctions(long functions,
const shared_ptr<IUsbGadgetCallback> &callback, const shared_ptr<IUsbGadgetCallback> &callback,
int64_t timeout, int64_t timeout,
@ -448,15 +458,23 @@ ScopedAStatus UsbGadget::setCurrentUsbFunctions(long functions,
std::unique_lock<std::mutex> lk(mLockSetCurrentFunction); std::unique_lock<std::mutex> lk(mLockSetCurrentFunction);
std::string current_usb_power_operation_mode, current_usb_type; std::string current_usb_power_operation_mode, current_usb_type;
std::string usb_limit_sink_enable; std::string usb_limit_sink_enable;
std::string accessoryCurrentLimitEnablePath, accessoryCurrentLimitPath;
string accessoryCurrentLimitEnablePath, accessoryCurrentLimitPath, path;
mCurrentUsbFunctions = functions; mCurrentUsbFunctions = functions;
mCurrentUsbFunctionsApplied = false; mCurrentUsbFunctionsApplied = false;
getI2cBusHelper(&path); if (mI2cClientPath.empty()) {
accessoryCurrentLimitPath = kI2CPath + path + "/" + path + kAccessoryLimitCurrent; for (int i = 0; i < NUM_HSI2C_PATHS; i++) {
accessoryCurrentLimitEnablePath = kI2CPath + path + "/" + path + kAccessoryLimitCurrentEnable; mI2cClientPath = getI2cClientPath(kHsi2cPaths[i], kTcpcDevName, kI2cClientId);
if (mI2cClientPath.empty()) {
ALOGE("%s: Unable to locate i2c bus node", __func__);
} else {
break;
}
}
}
accessoryCurrentLimitPath = mI2cClientPath + kAccessoryLimitCurrent;
accessoryCurrentLimitEnablePath = mI2cClientPath + kAccessoryLimitCurrentEnable;
// Get the gadget IRQ number before tearDownGadget() // Get the gadget IRQ number before tearDownGadget()
if (mGadgetIrqPath.empty()) if (mGadgetIrqPath.empty())

View file

@ -115,6 +115,8 @@ struct UsbGadget : public BnUsbGadget {
ScopedAStatus setVidPid(const char *vid,const char *pid); ScopedAStatus setVidPid(const char *vid,const char *pid);
std::string mI2cClientPath;
private: private:
Status tearDownGadget(); Status tearDownGadget();
Status getUsbGadgetIrqPath(); Status getUsbGadgetIrqPath();

View file

@ -28,7 +28,6 @@ package {
cc_binary { cc_binary {
name: "android.hardware.usb-service", name: "android.hardware.usb-service",
relative_install_path: "hw", relative_install_path: "hw",
init_rc: ["android.hardware.usb-service.rc"],
vintf_fragments: ["android.hardware.usb-service.xml"], vintf_fragments: ["android.hardware.usb-service.xml"],
vendor: true, vendor: true,
srcs: [ srcs: [
@ -68,6 +67,22 @@ cc_binary {
], ],
} }
prebuilt_etc {
name: "usb_service_init_rc_i2c6",
vendor: true,
filename: "android.hardware.usb-service-i2c6.rc",
src: "android.hardware.usb-service-i2c6.rc",
sub_dir: "init",
}
prebuilt_etc {
name: "usb_service_init_rc_i2c11",
vendor: true,
filename: "android.hardware.usb-service-i2c11.rc",
src: "android.hardware.usb-service-i2c11.rc",
sub_dir: "init",
}
cc_aconfig_library { cc_aconfig_library {
name: "android.hardware.usb.flags-aconfig-c-lib", name: "android.hardware.usb.flags-aconfig-c-lib",
vendor: true, vendor: true,

View file

@ -42,8 +42,9 @@
#include <aidl/android/frameworks/stats/IStats.h> #include <aidl/android/frameworks/stats/IStats.h>
#include <android_hardware_usb_flags.h> #include <android_hardware_usb_flags.h>
#include <pixelusb/UsbGadgetAidlCommon.h>
#include <pixelstats/StatsHelper.h> #include <pixelstats/StatsHelper.h>
#include <pixelusb/I2cHelper.h>
#include <pixelusb/UsbGadgetAidlCommon.h>
namespace usb_flags = android::hardware::usb::flags; namespace usb_flags = android::hardware::usb::flags;
@ -56,19 +57,23 @@ using android::base::Trim;
using android::hardware::google::pixel::getStatsService; using android::hardware::google::pixel::getStatsService;
using android::hardware::google::pixel::PixelAtoms::VendorUsbPortOverheat; using android::hardware::google::pixel::PixelAtoms::VendorUsbPortOverheat;
using android::hardware::google::pixel::reportUsbPortOverheat; using android::hardware::google::pixel::reportUsbPortOverheat;
using android::hardware::google::pixel::usb::getI2cClientPath;
namespace aidl { namespace aidl {
namespace android { namespace android {
namespace hardware { namespace hardware {
namespace usb { namespace usb {
#define NUM_HSI2C_PATHS 2
// Set by the signal handler to destroy the thread // Set by the signal handler to destroy the thread
volatile bool destroyThread; volatile bool destroyThread;
volatile bool destroyDisplayPortThread; volatile bool destroyDisplayPortThread;
string enabledPath; string enabledPath;
constexpr char kHsi2cPath[] = "/sys/devices/platform/108d0000.hsi2c"; constexpr char *kHsi2cPaths[] = { (char *) "/sys/devices/platform/108d0000.hsi2c",
constexpr char kI2CPath[] = "/sys/devices/platform/108d0000.hsi2c/i2c-"; (char *) "/sys/devices/platform/10cb0000.hsi2c" };
constexpr char kContaminantDetectionPath[] = "-0025/contaminant_detection"; constexpr char kTcpcDevName[] = "i2c-max77759tcpc";
constexpr char kI2cClientId[] = "0025";
constexpr char kDisplayPortDrmPath[] = "/sys/devices/platform/110f0000.drmdp/drm-displayport/"; constexpr char kDisplayPortDrmPath[] = "/sys/devices/platform/110f0000.drmdp/drm-displayport/";
constexpr char kDisplayPortUsbPath[] = "/sys/class/typec/port0-partner/"; constexpr char kDisplayPortUsbPath[] = "/sys/class/typec/port0-partner/";
constexpr char kComplianceWarningsPath[] = "device/non_compliant_reasons"; constexpr char kComplianceWarningsPath[] = "device/non_compliant_reasons";
@ -77,10 +82,11 @@ constexpr char kComplianceWarningDebugAccessory[] = "debug-accessory";
constexpr char kComplianceWarningMissingRp[] = "missing_rp"; constexpr char kComplianceWarningMissingRp[] = "missing_rp";
constexpr char kComplianceWarningOther[] = "other"; constexpr char kComplianceWarningOther[] = "other";
constexpr char kComplianceWarningInputPowerLimited[] = "input_power_limited"; constexpr char kComplianceWarningInputPowerLimited[] = "input_power_limited";
constexpr char kStatusPath[] = "-0025/contaminant_detection_status"; constexpr char kContaminantDetectionPath[] = "contaminant_detection";
constexpr char kSinkLimitEnable[] = "-0025/usb_limit_sink_enable"; constexpr char kStatusPath[] = "contaminant_detection_status";
constexpr char kSourceLimitEnable[] = "-0025/usb_limit_source_enable"; constexpr char kSinkLimitEnable[] = "usb_limit_sink_enable";
constexpr char kSinkLimitCurrent[] = "-0025/usb_limit_sink_current"; constexpr char kSourceLimitEnable[] = "usb_limit_source_enable";
constexpr char kSinkLimitCurrent[] = "usb_limit_sink_current";
constexpr char kTypecPath[] = "/sys/class/typec"; constexpr char kTypecPath[] = "/sys/class/typec";
constexpr char kDisableContatminantDetection[] = "vendor.usb.contaminantdisable"; constexpr char kDisableContatminantDetection[] = "vendor.usb.contaminantdisable";
constexpr char kOverheatStatsPath[] = "/sys/devices/platform/google,usbc_port_cooling_dev/"; constexpr char kOverheatStatsPath[] = "/sys/devices/platform/google,usbc_port_cooling_dev/";
@ -92,7 +98,7 @@ constexpr char kThermalZoneForTempReadSecondary2[] = "qi_therm";
constexpr char kPogoUsbActive[] = "/sys/devices/platform/google,pogo/pogo_usb_active"; constexpr char kPogoUsbActive[] = "/sys/devices/platform/google,pogo/pogo_usb_active";
constexpr char kPogoEnableUsb[] = "/sys/devices/platform/google,pogo/enable_usb"; constexpr char kPogoEnableUsb[] = "/sys/devices/platform/google,pogo/enable_usb";
constexpr char kPowerSupplyUsbType[] = "/sys/class/power_supply/usb/usb_type"; constexpr char kPowerSupplyUsbType[] = "/sys/class/power_supply/usb/usb_type";
constexpr char kIrqHpdCounPath[] = "-0025/irq_hpd_count"; constexpr char kIrqHpdCount[] = "irq_hpd_count";
constexpr char kUdcUeventRegex[] = constexpr char kUdcUeventRegex[] =
"/devices/platform/11210000.usb/11210000.dwc3/udc/11210000.dwc3"; "/devices/platform/11210000.usb/11210000.dwc3/udc/11210000.dwc3";
constexpr char kUdcStatePath[] = constexpr char kUdcStatePath[] =
@ -272,31 +278,9 @@ ScopedAStatus Usb::resetUsbPort(const std::string& in_portName, int64_t in_trans
return ::ndk::ScopedAStatus::ok(); return ::ndk::ScopedAStatus::ok();
} }
Status getI2cBusHelper(string *name) { Status queryMoistureDetectionStatus(android::hardware::usb::Usb *usb,
DIR *dp; std::vector<PortStatus> *currentPortStatus) {
string enabled, status, DetectedPath;
dp = opendir(kHsi2cPath);
if (dp != NULL) {
struct dirent *ep;
while ((ep = readdir(dp))) {
if (ep->d_type == DT_DIR) {
if (string::npos != string(ep->d_name).find("i2c-")) {
std::strtok(ep->d_name, "-");
*name = std::strtok(NULL, "-");
}
}
}
closedir(dp);
return Status::SUCCESS;
}
ALOGE("Failed to open %s", kHsi2cPath);
return Status::ERROR;
}
Status queryMoistureDetectionStatus(std::vector<PortStatus> *currentPortStatus) {
string enabled, status, path, DetectedPath;
(*currentPortStatus)[0].supportedContaminantProtectionModes (*currentPortStatus)[0].supportedContaminantProtectionModes
.push_back(ContaminantProtectionMode::FORCE_DISABLE); .push_back(ContaminantProtectionMode::FORCE_DISABLE);
@ -305,8 +289,18 @@ Status queryMoistureDetectionStatus(std::vector<PortStatus> *currentPortStatus)
(*currentPortStatus)[0].supportsEnableContaminantPresenceDetection = true; (*currentPortStatus)[0].supportsEnableContaminantPresenceDetection = true;
(*currentPortStatus)[0].supportsEnableContaminantPresenceProtection = false; (*currentPortStatus)[0].supportsEnableContaminantPresenceProtection = false;
getI2cBusHelper(&path); if (usb->mI2cClientPath.empty()) {
enabledPath = kI2CPath + path + "/" + path + kContaminantDetectionPath; for (int i = 0; i < NUM_HSI2C_PATHS; i++) {
usb->mI2cClientPath = getI2cClientPath(kHsi2cPaths[i], kTcpcDevName, kI2cClientId);
if (usb->mI2cClientPath.empty()) {
ALOGE("%s: Unable to locate i2c bus node", __func__);
} else {
break;
}
}
}
enabledPath = usb->mI2cClientPath + kContaminantDetectionPath;
if (!ReadFileToString(enabledPath, &enabled)) { if (!ReadFileToString(enabledPath, &enabled)) {
ALOGE("Failed to open moisture_detection_enabled"); ALOGE("Failed to open moisture_detection_enabled");
return Status::ERROR; return Status::ERROR;
@ -314,7 +308,7 @@ Status queryMoistureDetectionStatus(std::vector<PortStatus> *currentPortStatus)
enabled = Trim(enabled); enabled = Trim(enabled);
if (enabled == "1") { if (enabled == "1") {
DetectedPath = kI2CPath + path + "/" + path + kStatusPath; DetectedPath = usb->mI2cClientPath + kStatusPath;
if (!ReadFileToString(DetectedPath, &status)) { if (!ReadFileToString(DetectedPath, &status)) {
ALOGE("Failed to open moisture_detected"); ALOGE("Failed to open moisture_detected");
return Status::ERROR; return Status::ERROR;
@ -533,6 +527,7 @@ Usb::Usb()
ZoneInfo(TemperatureType::UNKNOWN, kThermalZoneForTempReadSecondary2, ZoneInfo(TemperatureType::UNKNOWN, kThermalZoneForTempReadSecondary2,
ThrottlingSeverity::NONE)}, kSamplingIntervalSec), ThrottlingSeverity::NONE)}, kSamplingIntervalSec),
mUsbDataEnabled(true), mUsbDataEnabled(true),
mI2cClientPath(""),
mDisplayPortPollRunning(false), mDisplayPortPollRunning(false),
mDisplayPortPollStarting(false), mDisplayPortPollStarting(false),
mDisplayPortCVLock(PTHREAD_MUTEX_INITIALIZER), mDisplayPortCVLock(PTHREAD_MUTEX_INITIALIZER),
@ -573,6 +568,11 @@ Usb::Usb()
ALOGE("mDisplayPortActivateTimer timerfd failed: %s", strerror(errno)); ALOGE("mDisplayPortActivateTimer timerfd failed: %s", strerror(errno));
abort(); abort();
} }
ALOGI("feature flag enable_usb_data_compliance_warning: %d",
usb_flags::enable_usb_data_compliance_warning());
ALOGI("feature flag enable_input_power_limited_warning: %d",
usb_flags::enable_input_power_limited_warning());
} }
ScopedAStatus Usb::switchRole(const string& in_portName, const PortRole& in_role, ScopedAStatus Usb::switchRole(const string& in_portName, const PortRole& in_role,
@ -634,12 +634,22 @@ ScopedAStatus Usb::limitPowerTransfer(const string& in_portName, bool in_limit,
int64_t in_transactionId) { int64_t in_transactionId) {
bool sessionFail = false, success; bool sessionFail = false, success;
std::vector<PortStatus> currentPortStatus; std::vector<PortStatus> currentPortStatus;
string path, sinkLimitEnablePath, currentLimitPath, sourceLimitEnablePath; string sinkLimitEnablePath, currentLimitPath, sourceLimitEnablePath;
getI2cBusHelper(&path); if (mI2cClientPath.empty()) {
sinkLimitEnablePath = kI2CPath + path + "/" + path + kSinkLimitEnable; for (int i = 0; i < NUM_HSI2C_PATHS; i++) {
currentLimitPath = kI2CPath + path + "/" + path + kSinkLimitCurrent; mI2cClientPath = getI2cClientPath(kHsi2cPaths[i], kTcpcDevName, kI2cClientId);
sourceLimitEnablePath = kI2CPath + path + "/" + path + kSourceLimitEnable; if (mI2cClientPath.empty()) {
ALOGE("%s: Unable to locate i2c bus node", __func__);
} else {
break;
}
}
}
sinkLimitEnablePath = mI2cClientPath + kSinkLimitEnable;
currentLimitPath = mI2cClientPath + kSinkLimitCurrent;
sourceLimitEnablePath = mI2cClientPath + kSourceLimitEnable;
pthread_mutex_lock(&mLock); pthread_mutex_lock(&mLock);
if (in_limit) { if (in_limit) {
@ -679,11 +689,22 @@ ScopedAStatus Usb::limitPowerTransfer(const string& in_portName, bool in_limit,
return ScopedAStatus::ok(); return ScopedAStatus::ok();
} }
Status queryPowerTransferStatus(std::vector<PortStatus> *currentPortStatus) { Status queryPowerTransferStatus(android::hardware::usb::Usb *usb,
string limitedPath, enabled, path; std::vector<PortStatus> *currentPortStatus) {
string limitedPath, enabled;
getI2cBusHelper(&path); if (usb->mI2cClientPath.empty()) {
limitedPath = kI2CPath + path + "/" + path + kSinkLimitEnable; for (int i = 0; i < NUM_HSI2C_PATHS; i++) {
usb->mI2cClientPath = getI2cClientPath(kHsi2cPaths[i], kTcpcDevName, kI2cClientId);
if (usb->mI2cClientPath.empty()) {
ALOGE("%s: Unable to locate i2c bus node", __func__);
} else {
break;
}
}
}
limitedPath = usb->mI2cClientPath + kSinkLimitEnable;
if (!ReadFileToString(limitedPath, &enabled)) { if (!ReadFileToString(limitedPath, &enabled)) {
ALOGE("Failed to open limit_sink_enable"); ALOGE("Failed to open limit_sink_enable");
return Status::ERROR; return Status::ERROR;
@ -1080,8 +1101,8 @@ void queryVersionHelper(android::hardware::usb::Usb *usb,
pthread_mutex_lock(&usb->mLock); pthread_mutex_lock(&usb->mLock);
status = getPortStatusHelper(usb, currentPortStatus); status = getPortStatusHelper(usb, currentPortStatus);
queryMoistureDetectionStatus(currentPortStatus); queryMoistureDetectionStatus(usb, currentPortStatus);
queryPowerTransferStatus(currentPortStatus); queryPowerTransferStatus(usb, currentPortStatus);
queryNonCompliantChargerStatus(currentPortStatus); queryNonCompliantChargerStatus(currentPortStatus);
pthread_mutex_lock(&usb->mDisplayPortLock); pthread_mutex_lock(&usb->mDisplayPortLock);
if (!usb->mDisplayPortFirstSetupDone && if (!usb->mDisplayPortFirstSetupDone &&
@ -1217,6 +1238,16 @@ static void uevent_event(uint32_t /*epevents*/, struct data *payload) {
payload->usb->mPartnerUp = true; payload->usb->mPartnerUp = true;
pthread_cond_signal(&payload->usb->mPartnerCV); pthread_cond_signal(&payload->usb->mPartnerCV);
pthread_mutex_unlock(&payload->usb->mPartnerLock); pthread_mutex_unlock(&payload->usb->mPartnerLock);
} else if (std::regex_match(cp, std::regex("(remove)(.*)(-partner)"))) {
string drmDisconnectPath = string(kDisplayPortDrmPath) + "usbc_cable_disconnect";
if (payload->usb->mPartnerSupportsDisplayPort) {
ALOGI("displayport partner removed");
if (!WriteStringToFile("1", drmDisconnectPath)) {
ALOGE("Failed to signal disconnect to drm");
}
payload->usb->mPartnerSupportsDisplayPort = false;
}
} else if (!strncmp(cp, "DEVTYPE=typec_", strlen("DEVTYPE=typec_")) || } else if (!strncmp(cp, "DEVTYPE=typec_", strlen("DEVTYPE=typec_")) ||
!strncmp(cp, "DRIVER=max77759tcpc", !strncmp(cp, "DRIVER=max77759tcpc",
strlen("DRIVER=max77759tcpc")) || strlen("DRIVER=max77759tcpc")) ||
@ -1383,6 +1414,8 @@ ScopedAStatus Usb::setCallback(const shared_ptr<IUsbCallback>& in_callback) {
return ScopedAStatus::ok(); return ScopedAStatus::ok();
} }
/***** DisplayPort Alt Mode Helpers *****/
Status Usb::getDisplayPortUsbPathHelper(string *path) { Status Usb::getDisplayPortUsbPathHelper(string *path) {
DIR *dp; DIR *dp;
Status result = Status::ERROR; Status result = Status::ERROR;
@ -1586,8 +1619,18 @@ void *displayPortPollWork(void *param) {
partnerActivePath = displayPortUsbPath + "../mode1/active"; partnerActivePath = displayPortUsbPath + "../mode1/active";
portActivePath = "/sys/class/typec/port0/port0.0/mode1/active"; portActivePath = "/sys/class/typec/port0/port0.0/mode1/active";
getI2cBusHelper(&tcpcI2cBus); if (usb->mI2cClientPath.empty()) {
irqHpdCountPath = kI2CPath + tcpcI2cBus + "/" + tcpcI2cBus + kIrqHpdCounPath; for (int i = 0; i < NUM_HSI2C_PATHS; i++) {
usb->mI2cClientPath = getI2cClientPath(kHsi2cPaths[i], kTcpcDevName, kI2cClientId);
if (usb->mI2cClientPath.empty()) {
ALOGE("%s: Unable to locate i2c bus node", __func__);
} else {
break;
}
}
}
irqHpdCountPath = usb->mI2cClientPath + kIrqHpdCount;
ALOGI("usbdp: worker: irqHpdCountPath:%s", irqHpdCountPath.c_str()); ALOGI("usbdp: worker: irqHpdCountPath:%s", irqHpdCountPath.c_str());
epoll_fd = epoll_create(64); epoll_fd = epoll_create(64);
@ -1799,6 +1842,7 @@ void Usb::setupDisplayPortPoll() {
int ret; int ret;
ALOGI("usbdp: setup: beginning setup for displayport poll thread"); ALOGI("usbdp: setup: beginning setup for displayport poll thread");
mPartnerSupportsDisplayPort = true;
/* /*
* If thread is currently starting, then it hasn't setup DisplayPort fd's, and we can abandon * If thread is currently starting, then it hasn't setup DisplayPort fd's, and we can abandon

View file

@ -129,6 +129,8 @@ struct Usb : public BnUsb {
float mPluggedTemperatureCelsius; float mPluggedTemperatureCelsius;
// Usb Data status // Usb Data status
bool mUsbDataEnabled; bool mUsbDataEnabled;
std::string mI2cClientPath;
// True when mDisplayPortPoll pthread is running // True when mDisplayPortPoll pthread is running
volatile bool mDisplayPortPollRunning; volatile bool mDisplayPortPollRunning;
volatile bool mDisplayPortPollStarting; volatile bool mDisplayPortPollStarting;
@ -156,6 +158,11 @@ struct Usb : public BnUsb {
* eventfd to monitor whether a connection results in DisplayPort Alt Mode activating. * eventfd to monitor whether a connection results in DisplayPort Alt Mode activating.
*/ */
int mDisplayPortActivateTimer; int mDisplayPortActivateTimer;
/*
* Indicates whether or not port partner supports DisplayPort, and is used to
* communicate to the drm when the port partner physically disconnects.
*/
bool mPartnerSupportsDisplayPort;
private: private:
pthread_t mPoll; pthread_t mPoll;

View file

@ -26,6 +26,7 @@
#include <pixelstats/StatsHelper.h> #include <pixelstats/StatsHelper.h>
#include <pixelusb/CommonUtils.h> #include <pixelusb/CommonUtils.h>
#include <sys/epoll.h> #include <sys/epoll.h>
#include <sys/timerfd.h>
#include <utils/Log.h> #include <utils/Log.h>
#include <regex> #include <regex>
@ -48,6 +49,9 @@ namespace usb {
#define UEVENT_MSG_LEN 2048 #define UEVENT_MSG_LEN 2048
#define USB_STATE_MAX_LEN 20 #define USB_STATE_MAX_LEN 20
#define DATA_ROLE_MAX_LEN 10 #define DATA_ROLE_MAX_LEN 10
#define WARNING_SURFACE_DELAY_SEC 5
#define ENUM_FAIL_DEFAULT_COUNT_THRESHOLD 3
#define DEVICE_FLAKY_CONNECTION_CONFIGURED_COUNT_THRESHOLD 5
constexpr char kUdcConfigfsPath[] = "/config/usb_gadget/g1/UDC"; constexpr char kUdcConfigfsPath[] = "/config/usb_gadget/g1/UDC";
constexpr char kNotAttachedState[] = "not attached\n"; constexpr char kNotAttachedState[] = "not attached\n";
@ -115,6 +119,15 @@ UsbDataSessionMonitor::UsbDataSessionMonitor(
if (addEpollFd(epollFd, ueventFd)) if (addEpollFd(epollFd, ueventFd))
abort(); abort();
unique_fd timerFd(timerfd_create(CLOCK_BOOTTIME, TFD_NONBLOCK));
if (timerFd.get() == -1) {
ALOGE("create timerFd failed");
abort();
}
if (addEpollFd(epollFd, timerFd))
abort();
if (addEpollFile(epollFd.get(), dataRolePath, mDataRoleFd) != 0) { if (addEpollFile(epollFd.get(), dataRolePath, mDataRoleFd) != 0) {
ALOGE("monitor data role failed"); ALOGE("monitor data role failed");
abort(); abort();
@ -139,6 +152,7 @@ UsbDataSessionMonitor::UsbDataSessionMonitor(
mEpollFd = std::move(epollFd); mEpollFd = std::move(epollFd);
mUeventFd = std::move(ueventFd); mUeventFd = std::move(ueventFd);
mTimerFd = std::move(timerFd);
mUpdatePortStatusCb = updatePortStatusCb; mUpdatePortStatusCb = updatePortStatusCb;
if (ReadFileToString(kUdcConfigfsPath, &udc) && !udc.empty()) if (ReadFileToString(kUdcConfigfsPath, &udc) && !udc.empty())
@ -150,6 +164,9 @@ UsbDataSessionMonitor::UsbDataSessionMonitor(
ALOGE("pthread creation failed %d", errno); ALOGE("pthread creation failed %d", errno);
abort(); abort();
} }
ALOGI("feature flag enable_report_usb_data_compliance_warning: %d",
usb_flags::enable_report_usb_data_compliance_warning());
} }
UsbDataSessionMonitor::~UsbDataSessionMonitor() {} UsbDataSessionMonitor::~UsbDataSessionMonitor() {}
@ -223,13 +240,55 @@ void UsbDataSessionMonitor::notifyComplianceWarning() {
void UsbDataSessionMonitor::evaluateComplianceWarning() { void UsbDataSessionMonitor::evaluateComplianceWarning() {
std::set<ComplianceWarning> newWarningSet; std::set<ComplianceWarning> newWarningSet;
int elapsedTimeSec;
// TODO: add heuristics and update newWarningSet elapsedTimeSec =
if (mDataRole == PortDataRole::DEVICE && mUdcBind) { std::chrono::duration_cast<std::chrono::seconds>(boot_clock::now() - mDataSessionStart)
} else if (mDataRole == PortDataRole::HOST) { .count();
if (elapsedTimeSec >= WARNING_SURFACE_DELAY_SEC) {
if (mDataRole == PortDataRole::DEVICE && mUdcBind) {
int configuredCount = std::count(mDeviceState.states.begin(),
mDeviceState.states.end(), kConfiguredState);
int defaultCount =
std::count(mDeviceState.states.begin(), mDeviceState.states.end(), kDefaultState);
if (configuredCount == 0 && defaultCount > ENUM_FAIL_DEFAULT_COUNT_THRESHOLD)
newWarningSet.insert(ComplianceWarning::ENUMERATION_FAIL);
if (configuredCount > DEVICE_FLAKY_CONNECTION_CONFIGURED_COUNT_THRESHOLD)
newWarningSet.insert(ComplianceWarning::FLAKY_CONNECTION);
} else if (mDataRole == PortDataRole::HOST) {
int host1StateCount = mHost1State.states.size();
int host1ConfiguredCount =
std::count(mHost1State.states.begin(), mHost1State.states.end(), kConfiguredState);
int host1DefaultCount =
std::count(mHost1State.states.begin(), mHost1State.states.end(), kDefaultState);
int host2StateCount = mHost2State.states.size();
int host2ConfiguredCount =
std::count(mHost2State.states.begin(), mHost2State.states.end(), kConfiguredState);
int host2DefaultCount =
std::count(mHost2State.states.begin(), mHost2State.states.end(), kDefaultState);
if (host1ConfiguredCount == 0 && host2ConfiguredCount == 0 &&
(host1DefaultCount > ENUM_FAIL_DEFAULT_COUNT_THRESHOLD ||
host2DefaultCount > ENUM_FAIL_DEFAULT_COUNT_THRESHOLD))
newWarningSet.insert(ComplianceWarning::ENUMERATION_FAIL);
if (host1StateCount == 1 && mHost1State.states.front() == kNotAttachedState &&
host2StateCount == 1 && mHost2State.states.front() == kNotAttachedState)
newWarningSet.insert(ComplianceWarning::MISSING_DATA_LINES);
}
} }
if (newWarningSet != mWarningSet) { if (newWarningSet != mWarningSet) {
std::string newWarningString;
for (auto e : newWarningSet) {
newWarningString += toString(e) + " ";
}
ALOGI("Usb data compliance warning changed to: %s", newWarningString.c_str());
mWarningSet = newWarningSet; mWarningSet = newWarningSet;
notifyComplianceWarning(); notifyComplianceWarning();
} }
@ -259,6 +318,26 @@ void UsbDataSessionMonitor::handleDeviceStateEvent(struct usbDeviceState *device
evaluateComplianceWarning(); evaluateComplianceWarning();
} }
void UsbDataSessionMonitor::setupNewSession() {
mWarningSet.clear();
mDataSessionStart = boot_clock::now();
if (mDataRole == PortDataRole::DEVICE) {
clearDeviceStateEvents(&mDeviceState);
} else if (mDataRole == PortDataRole::HOST) {
clearDeviceStateEvents(&mHost1State);
clearDeviceStateEvents(&mHost2State);
}
if (mDataRole != PortDataRole::NONE) {
struct itimerspec delay = itimerspec();
delay.it_value.tv_sec = WARNING_SURFACE_DELAY_SEC;
int ret = timerfd_settime(mTimerFd.get(), 0, &delay, NULL);
if (ret < 0)
ALOGE("timerfd_settime failed err:%d", errno);
}
}
void UsbDataSessionMonitor::handleDataRoleEvent() { void UsbDataSessionMonitor::handleDataRoleEvent() {
int n; int n;
PortDataRole newDataRole; PortDataRole newDataRole;
@ -283,17 +362,8 @@ void UsbDataSessionMonitor::handleDataRoleEvent() {
reportUsbDataSessionMetrics(); reportUsbDataSessionMetrics();
} }
// Set up for the new data session
mWarningSet.clear();
mDataRole = newDataRole; mDataRole = newDataRole;
mDataSessionStart = boot_clock::now(); setupNewSession();
if (newDataRole == PortDataRole::DEVICE) {
clearDeviceStateEvents(&mDeviceState);
} else if (newDataRole == PortDataRole::HOST) {
clearDeviceStateEvents(&mHost1State);
clearDeviceStateEvents(&mHost2State);
}
} }
} }
@ -328,8 +398,7 @@ void UsbDataSessionMonitor::updateUdcBindStatus(const std::string &devname) {
} else if (!mUdcBind && newUdcBind) { } else if (!mUdcBind && newUdcBind) {
// Gadget soft pullup: reset and start accounting for a new data session. // Gadget soft pullup: reset and start accounting for a new data session.
clearDeviceStateEvents(&mDeviceState); setupNewSession();
mDataSessionStart = boot_clock::now();
} }
} }
@ -383,6 +452,23 @@ void UsbDataSessionMonitor::handleUevent() {
} }
} }
void UsbDataSessionMonitor::handleTimerEvent() {
int byteRead;
uint64_t numExpiration;
byteRead = read(mTimerFd.get(), &numExpiration, sizeof(numExpiration));
if (byteRead != sizeof(numExpiration)) {
ALOGE("incorrect read size");
}
if (numExpiration != 1) {
ALOGE("incorrect expiration count");
}
evaluateComplianceWarning();
}
void *UsbDataSessionMonitor::monitorThread(void *param) { void *UsbDataSessionMonitor::monitorThread(void *param) {
UsbDataSessionMonitor *monitor = (UsbDataSessionMonitor *)param; UsbDataSessionMonitor *monitor = (UsbDataSessionMonitor *)param;
struct epoll_event events[64]; struct epoll_event events[64];
@ -400,6 +486,8 @@ void *UsbDataSessionMonitor::monitorThread(void *param) {
for (int n = 0; n < nevents; ++n) { for (int n = 0; n < nevents; ++n) {
if (events[n].data.fd == monitor->mUeventFd.get()) { if (events[n].data.fd == monitor->mUeventFd.get()) {
monitor->handleUevent(); monitor->handleUevent();
} else if (events[n].data.fd == monitor->mTimerFd.get()) {
monitor->handleTimerEvent();
} else if (events[n].data.fd == monitor->mDataRoleFd.get()) { } else if (events[n].data.fd == monitor->mDataRoleFd.get()) {
monitor->handleDataRoleEvent(); monitor->handleDataRoleEvent();
} else if (events[n].data.fd == monitor->mDeviceState.fd.get()) { } else if (events[n].data.fd == monitor->mDeviceState.fd.get()) {

View file

@ -75,9 +75,11 @@ class UsbDataSessionMonitor {
static void *monitorThread(void *param); static void *monitorThread(void *param);
void handleUevent(); void handleUevent();
void handleTimerEvent();
void handleDataRoleEvent(); void handleDataRoleEvent();
void handleDeviceStateEvent(struct usbDeviceState *deviceState); void handleDeviceStateEvent(struct usbDeviceState *deviceState);
void clearDeviceStateEvents(struct usbDeviceState *deviceState); void clearDeviceStateEvents(struct usbDeviceState *deviceState);
void setupNewSession();
void reportUsbDataSessionMetrics(); void reportUsbDataSessionMetrics();
void evaluateComplianceWarning(); void evaluateComplianceWarning();
void notifyComplianceWarning(); void notifyComplianceWarning();
@ -86,6 +88,7 @@ class UsbDataSessionMonitor {
pthread_t mMonitor; pthread_t mMonitor;
unique_fd mEpollFd; unique_fd mEpollFd;
unique_fd mUeventFd; unique_fd mUeventFd;
unique_fd mTimerFd;
unique_fd mDataRoleFd; unique_fd mDataRoleFd;
struct usbDeviceState mDeviceState; struct usbDeviceState mDeviceState;
struct usbDeviceState mHost1State; struct usbDeviceState mHost1State;

View file

@ -0,0 +1,49 @@
service vendor.usb /vendor/bin/hw/android.hardware.usb-service
class hal
user system
group system shell wakelock
capabilities WAKE_ALARM BLOCK_SUSPEND
on post-fs
chown root system /sys/class/typec/port0/power_role
chown root system /sys/class/typec/port0/data_role
chown root system /sys/class/typec/port0/port_type
chown root system /sys/class/typec/port0/port0.0/mode1/active
chown root system /sys/devices/platform/10cb0000.hsi2c/i2c-11/11-0025/contaminant_detection
chown root system /sys/devices/platform/10cb0000.hsi2c/i2c-11/11-0025/usb_limit_accessory_current
chown root system /sys/devices/platform/10cb0000.hsi2c/i2c-11/11-0025/usb_limit_accessory_enable
chown root system /sys/devices/platform/10cb0000.hsi2c/i2c-11/11-0025/usb_limit_sink_current
chown root system /sys/devices/platform/10cb0000.hsi2c/i2c-11/11-0025/usb_limit_sink_enable
chown root system /sys/devices/platform/10cb0000.hsi2c/i2c-11/11-0025/usb_limit_source_enable
chown root graphics /sys/devices/platform/110f0000.drmdp/drm-displayport/dp_hotplug_error_code
chown root system /sys/devices/platform/110f0000.drmdp/drm-displayport/hpd
chown root system /sys/devices/platform/110f0000.drmdp/drm-displayport/irq_hpd
chown root system /sys/devices/platform/110f0000.drmdp/drm-displayport/orientation
chown root system /sys/devices/platform/110f0000.drmdp/drm-displayport/pin_assignment
chown root system /sys/devices/platform/110f0000.drmdp/drm-displayport/link_status
chown root system /sys/devices/platform/110f0000.drmdp/drm-displayport/usbc_cable_disconnect
chown root system /sys/devices/platform/11110000.usb/dwc3_exynos_otg_b_sess
chown root system /sys/devices/platform/11110000.usb/dwc3_exynos_otg_id
chown root system /sys/devices/platform/11110000.usb/usb_data_enabled
chown root system /sys/devices/platform/google,pogo/enable_usb
chmod 664 /sys/class/typec/port0/power_role
chmod 664 /sys/class/typec/port0/data_role
chmod 664 /sys/class/typec/port0/port_type
chmod 664 /sys/class/typec/port0/port0.0/mode1/active
chmod 664 /sys/devices/platform/11110000.usb/dwc3_exynos_otg_b_sess
chmod 664 /sys/devices/platform/11110000.usb/dwc3_exynos_otg_id
chmod 664 /sys/devices/platform/11110000.usb/usb_data_enabled
chmod 664 /sys/devices/platform/10cb0000.hsi2c/i2c-11/11-0025/contaminant_detection
chmod 664 /sys/devices/platform/10cb0000.hsi2c/i2c-11/11-0025/usb_limit_accessory_current
chmod 664 /sys/devices/platform/10cb0000.hsi2c/i2c-11/11-0025/usb_limit_accessory_enable
chmod 664 /sys/devices/platform/10cb0000.hsi2c/i2c-11/11-0025/usb_limit_sink_current
chmod 664 /sys/devices/platform/10cb0000.hsi2c/i2c-11/11-0025/usb_limit_sink_enable
chmod 664 /sys/devices/platform/10cb0000.hsi2c/i2c-11/11-0025/usb_limit_source_enable
chmod 664 /sys/devices/platform/110f0000.drmdp/drm-displayport/dp_hotplug_error_code
chmod 664 /sys/devices/platform/110f0000.drmdp/drm-displayport/hpd
chmod 664 /sys/devices/platform/110f0000.drmdp/drm-displayport/irq_hpd
chmod 664 /sys/devices/platform/110f0000.drmdp/drm-displayport/orientation
chmod 664 /sys/devices/platform/110f0000.drmdp/drm-displayport/pin_assignment
chmod 664 /sys/devices/platform/110f0000.drmdp/drm-displayport/link_status
chmod 664 /sys/devices/platform/110f0000.drmdp/drm-displayport/usbc_cable_disconnect
chmod 664 /sys/devices/platform/google,pogo/enable_usb

View file

@ -0,0 +1,49 @@
service vendor.usb /vendor/bin/hw/android.hardware.usb-service
class hal
user system
group system shell wakelock
capabilities WAKE_ALARM BLOCK_SUSPEND
on post-fs
chown root system /sys/class/typec/port0/power_role
chown root system /sys/class/typec/port0/data_role
chown root system /sys/class/typec/port0/port_type
chown root system /sys/class/typec/port0/port0.0/mode1/active
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-6/6-0025/contaminant_detection
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-6/6-0025/usb_limit_accessory_current
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-6/6-0025/usb_limit_accessory_enable
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-6/6-0025/usb_limit_sink_current
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-6/6-0025/usb_limit_sink_enable
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-6/6-0025/usb_limit_source_enable
chown root graphics /sys/devices/platform/110f0000.drmdp/drm-displayport/dp_hotplug_error_code
chown root system /sys/devices/platform/110f0000.drmdp/drm-displayport/hpd
chown root system /sys/devices/platform/110f0000.drmdp/drm-displayport/irq_hpd
chown root system /sys/devices/platform/110f0000.drmdp/drm-displayport/orientation
chown root system /sys/devices/platform/110f0000.drmdp/drm-displayport/pin_assignment
chown root system /sys/devices/platform/110f0000.drmdp/drm-displayport/link_status
chown root system /sys/devices/platform/110f0000.drmdp/drm-displayport/usbc_cable_disconnect
chown root system /sys/devices/platform/11110000.usb/dwc3_exynos_otg_b_sess
chown root system /sys/devices/platform/11110000.usb/dwc3_exynos_otg_id
chown root system /sys/devices/platform/11110000.usb/usb_data_enabled
chown root system /sys/devices/platform/google,pogo/enable_usb
chmod 664 /sys/class/typec/port0/power_role
chmod 664 /sys/class/typec/port0/data_role
chmod 664 /sys/class/typec/port0/port_type
chmod 664 /sys/class/typec/port0/port0.0/mode1/active
chmod 664 /sys/devices/platform/11110000.usb/dwc3_exynos_otg_b_sess
chmod 664 /sys/devices/platform/11110000.usb/dwc3_exynos_otg_id
chmod 664 /sys/devices/platform/11110000.usb/usb_data_enabled
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-6/6-0025/contaminant_detection
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-6/6-0025/usb_limit_accessory_current
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-6/6-0025/usb_limit_accessory_enable
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-6/6-0025/usb_limit_sink_current
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-6/6-0025/usb_limit_sink_enable
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-6/6-0025/usb_limit_source_enable
chmod 664 /sys/devices/platform/110f0000.drmdp/drm-displayport/dp_hotplug_error_code
chmod 664 /sys/devices/platform/110f0000.drmdp/drm-displayport/hpd
chmod 664 /sys/devices/platform/110f0000.drmdp/drm-displayport/irq_hpd
chmod 664 /sys/devices/platform/110f0000.drmdp/drm-displayport/orientation
chmod 664 /sys/devices/platform/110f0000.drmdp/drm-displayport/pin_assignment
chmod 664 /sys/devices/platform/110f0000.drmdp/drm-displayport/link_status
chmod 664 /sys/devices/platform/110f0000.drmdp/drm-displayport/usbc_cable_disconnect
chmod 664 /sys/devices/platform/google,pogo/enable_usb

View file

@ -1,153 +0,0 @@
service vendor.usb /vendor/bin/hw/android.hardware.usb-service
class hal
user system
group system shell wakelock
capabilities WAKE_ALARM BLOCK_SUSPEND
on post-fs
chown root system /sys/class/typec/port0/power_role
chown root system /sys/class/typec/port0/data_role
chown root system /sys/class/typec/port0/port_type
chown root system /sys/class/typec/port0/port0.0/mode1/active
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-0/0-0025/contaminant_detection
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-1/1-0025/contaminant_detection
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-2/2-0025/contaminant_detection
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-3/3-0025/contaminant_detection
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-4/4-0025/contaminant_detection
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-5/5-0025/contaminant_detection
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-6/6-0025/contaminant_detection
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-7/7-0025/contaminant_detection
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-8/8-0025/contaminant_detection
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-9/9-0025/contaminant_detection
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-0/0-0025/usb_limit_accessory_current
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-1/1-0025/usb_limit_accessory_current
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-2/2-0025/usb_limit_accessory_current
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-3/3-0025/usb_limit_accessory_current
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-4/4-0025/usb_limit_accessory_current
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-5/5-0025/usb_limit_accessory_current
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-6/6-0025/usb_limit_accessory_current
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-7/7-0025/usb_limit_accessory_current
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-8/8-0025/usb_limit_accessory_current
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-9/9-0025/usb_limit_accessory_current
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-0/0-0025/usb_limit_accessory_enable
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-1/1-0025/usb_limit_accessory_enable
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-2/2-0025/usb_limit_accessory_enable
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-3/3-0025/usb_limit_accessory_enable
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-4/4-0025/usb_limit_accessory_enable
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-5/5-0025/usb_limit_accessory_enable
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-6/6-0025/usb_limit_accessory_enable
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-7/7-0025/usb_limit_accessory_enable
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-8/8-0025/usb_limit_accessory_enable
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-9/9-0025/usb_limit_accessory_enable
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-0/0-0025/usb_limit_sink_current
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-1/1-0025/usb_limit_sink_current
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-2/2-0025/usb_limit_sink_current
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-3/3-0025/usb_limit_sink_current
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-4/4-0025/usb_limit_sink_current
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-5/5-0025/usb_limit_sink_current
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-6/6-0025/usb_limit_sink_current
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-7/7-0025/usb_limit_sink_current
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-8/8-0025/usb_limit_sink_current
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-9/9-0025/usb_limit_sink_current
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-0/0-0025/usb_limit_sink_enable
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-1/1-0025/usb_limit_sink_enable
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-2/2-0025/usb_limit_sink_enable
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-3/3-0025/usb_limit_sink_enable
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-4/4-0025/usb_limit_sink_enable
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-5/5-0025/usb_limit_sink_enable
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-6/6-0025/usb_limit_sink_enable
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-7/7-0025/usb_limit_sink_enable
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-8/8-0025/usb_limit_sink_enable
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-9/9-0025/usb_limit_sink_enable
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-0/0-0025/usb_limit_source_enable
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-1/1-0025/usb_limit_source_enable
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-2/2-0025/usb_limit_source_enable
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-3/3-0025/usb_limit_source_enable
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-4/4-0025/usb_limit_source_enable
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-5/5-0025/usb_limit_source_enable
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-6/6-0025/usb_limit_source_enable
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-7/7-0025/usb_limit_source_enable
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-8/8-0025/usb_limit_source_enable
chown root system /sys/devices/platform/108d0000.hsi2c/i2c-9/9-0025/usb_limit_source_enable
chown root system /sys/devices/platform/110f0000.drmdp/drm-displayport/hpd
chown root system /sys/devices/platform/110f0000.drmdp/drm-displayport/irq_hpd
chown root system /sys/devices/platform/110f0000.drmdp/drm-displayport/orientation
chown root system /sys/devices/platform/110f0000.drmdp/drm-displayport/pin_assignment
chown root system /sys/devices/platform/110f0000.drmdp/drm-displayport/link_status
chown root system /sys/devices/platform/11110000.usb/dwc3_exynos_otg_b_sess
chown root system /sys/devices/platform/11110000.usb/dwc3_exynos_otg_id
chown root system /sys/devices/platform/11110000.usb/usb_data_enabled
chown root system /sys/devices/platform/google,pogo/enable_usb
chmod 664 /sys/class/typec/port0/power_role
chmod 664 /sys/class/typec/port0/data_role
chmod 664 /sys/class/typec/port0/port_type
chmod 664 /sys/class/typec/port0/port0.0/mode1/active
chmod 664 /sys/devices/platform/11110000.usb/dwc3_exynos_otg_b_sess
chmod 664 /sys/devices/platform/11110000.usb/dwc3_exynos_otg_id
chmod 664 /sys/devices/platform/11110000.usb/usb_data_enabled
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-0/0-0025/contaminant_detection
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-1/1-0025/contaminant_detection
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-2/2-0025/contaminant_detection
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-3/3-0025/contaminant_detection
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-4/4-0025/contaminant_detection
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-5/5-0025/contaminant_detection
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-6/6-0025/contaminant_detection
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-7/7-0025/contaminant_detection
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-8/8-0025/contaminant_detection
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-9/9-0025/contaminant_detection
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-0/0-0025/usb_limit_accessory_current
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-1/1-0025/usb_limit_accessory_current
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-2/2-0025/usb_limit_accessory_current
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-3/3-0025/usb_limit_accessory_current
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-4/4-0025/usb_limit_accessory_current
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-5/5-0025/usb_limit_accessory_current
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-6/6-0025/usb_limit_accessory_current
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-7/7-0025/usb_limit_accessory_current
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-8/8-0025/usb_limit_accessory_current
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-9/9-0025/usb_limit_accessory_current
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-0/0-0025/usb_limit_accessory_enable
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-1/1-0025/usb_limit_accessory_enable
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-2/2-0025/usb_limit_accessory_enable
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-3/3-0025/usb_limit_accessory_enable
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-4/4-0025/usb_limit_accessory_enable
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-5/5-0025/usb_limit_accessory_enable
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-6/6-0025/usb_limit_accessory_enable
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-7/7-0025/usb_limit_accessory_enable
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-8/8-0025/usb_limit_accessory_enable
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-9/9-0025/usb_limit_accessory_enable
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-0/0-0025/usb_limit_sink_current
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-1/1-0025/usb_limit_sink_current
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-2/2-0025/usb_limit_sink_current
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-3/3-0025/usb_limit_sink_current
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-4/4-0025/usb_limit_sink_current
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-5/5-0025/usb_limit_sink_current
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-6/6-0025/usb_limit_sink_current
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-7/7-0025/usb_limit_sink_current
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-8/8-0025/usb_limit_sink_current
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-9/9-0025/usb_limit_sink_current
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-0/0-0025/usb_limit_sink_enable
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-1/1-0025/usb_limit_sink_enable
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-2/2-0025/usb_limit_sink_enable
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-3/3-0025/usb_limit_sink_enable
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-4/4-0025/usb_limit_sink_enable
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-5/5-0025/usb_limit_sink_enable
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-6/6-0025/usb_limit_sink_enable
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-7/7-0025/usb_limit_sink_enable
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-8/8-0025/usb_limit_sink_enable
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-9/9-0025/usb_limit_sink_enable
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-0/0-0025/usb_limit_source_enable
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-1/1-0025/usb_limit_source_enable
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-2/2-0025/usb_limit_source_enable
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-3/3-0025/usb_limit_source_enable
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-4/4-0025/usb_limit_source_enable
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-5/5-0025/usb_limit_source_enable
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-6/6-0025/usb_limit_source_enable
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-7/7-0025/usb_limit_source_enable
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-8/8-0025/usb_limit_source_enable
chmod 664 /sys/devices/platform/108d0000.hsi2c/i2c-9/9-0025/usb_limit_source_enable
chmod 664 /sys/devices/platform/110f0000.drmdp/drm-displayport/hpd
chmod 664 /sys/devices/platform/110f0000.drmdp/drm-displayport/irq_hpd
chmod 664 /sys/devices/platform/110f0000.drmdp/drm-displayport/orientation
chmod 664 /sys/devices/platform/110f0000.drmdp/drm-displayport/pin_assignment
chmod 664 /sys/devices/platform/110f0000.drmdp/drm-displayport/link_status
chmod 664 /sys/devices/platform/google,pogo/enable_usb

1
vendor.prop Normal file
View file

@ -0,0 +1 @@
ro.soc.model=Tensor G4