diff --git a/Android.bp b/Android.bp
index e719cab..7156389 100644
--- a/Android.bp
+++ b/Android.bp
@@ -34,3 +34,10 @@ license {
"NOTICE",
],
}
+
+sh_binary {
+ name: "disable_contaminant_detection.sh",
+ src: "disable_contaminant_detection.sh",
+ vendor: true,
+ sub_dir: "hw",
+}
diff --git a/BoardConfig-common.mk b/BoardConfig-common.mk
index bbb62ca..15f6fcc 100644
--- a/BoardConfig-common.mk
+++ b/BoardConfig-common.mk
@@ -41,6 +41,9 @@ BOARD_KERNEL_CMDLINE += rcupdate.rcu_expedited=1 rcu_nocbs=all
BOARD_KERNEL_CMDLINE += swiotlb=noforce
BOARD_KERNEL_CMDLINE += disable_dma32=on
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
# 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_SWIFTSHADER),true)
$(warning BOARD_USES_SWIFTSHADER set to current target)
-BOARD_VENDOR_SEPOLICY_DIRS += device/google/cuttlefish/shared/angle/sepolicy
TARGET_DISABLE_TRIPLE_BUFFERING := 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)
@@ -209,7 +211,7 @@ BOARD_SUPPORT_MFC_ENC_RGB := true
BOARD_USE_BLOB_ALLOCATOR := false
BOARD_SUPPORT_MFC_ENC_BT2020 := true
BOARD_SUPPORT_FLEXIBLE_P010 := true
-
+BOARD_SUPPORT_MFC_VERSION := 1660
########################
BOARD_SUPER_PARTITION_SIZE := 8531214336
diff --git a/conf/init.zuma.rc b/conf/init.zuma.rc
deleted file mode 100644
index bf61c79..0000000
--- a/conf/init.zuma.rc
+++ /dev/null
@@ -1,1102 +0,0 @@
-import /vendor/etc/init/hw/init.zumapro.usb.rc
-import android.hardware.drm@1.2-service.widevine.rc
-import init.exynos.sensorhub.rc
-
-on early-init
- mount_all /vendor/etc/fstab.persist --early
- write /proc/sys/kernel/sched_pelt_multiplier 1
- write /sys/kernel/mm/lru_gen/enabled n
-
-on init
- # CPU0 cannot be offline
- chmod 0444 /sys/devices/system/cpu/cpu0/online
-
- # Set teo as cpu idle governor
- write /sys/devices/system/cpu/cpuidle/current_governor teo
- # Disable util-awareness for mids and bigs
- write /proc/vendor_sched/teo_util_threshold "2 1024 1024"
-
- # Boot time fs tuning
- write /sys/block/sda/queue/iostats 0
- 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/cam/set_task_group
- chown system system /proc/vendor_sched/groups/fg/set_task_group
- chown system system /proc/vendor_sched/groups/nnapi/set_task_group
- chown system system /proc/vendor_sched/groups/sys/set_task_group
- chown system system /proc/vendor_sched/groups/sys_bg/set_task_group
- chown system system /proc/vendor_sched/groups/ta/set_task_group
- chown system system /proc/vendor_sched/groups/rt/set_task_group
- chown system system /proc/vendor_sched/groups/sf/set_task_group
- chown system system /proc/vendor_sched/groups/dex2oat/set_task_group
- chown system system /proc/vendor_sched/groups/cam_power/set_task_group
- chown system system /proc/vendor_sched/groups/ota/set_task_group
- chown system system /proc/vendor_sched/groups/bg/set_proc_group
- chown system system /proc/vendor_sched/groups/cam/set_proc_group
- chown system system /proc/vendor_sched/groups/fg/set_proc_group
- chown system system /proc/vendor_sched/groups/nnapi/set_proc_group
- chown system system /proc/vendor_sched/groups/sys/set_proc_group
- chown system system /proc/vendor_sched/groups/sys_bg/set_proc_group
- chown system system /proc/vendor_sched/groups/ta/set_proc_group
- chown system system /proc/vendor_sched/groups/rt/set_proc_group
- chown system system /proc/vendor_sched/groups/sf/set_proc_group
- chown system system /proc/vendor_sched/groups/dex2oat/set_proc_group
- chown system system /proc/vendor_sched/groups/cam_power/set_proc_group
- chown system system /proc/vendor_sched/groups/ota/set_proc_group
- chown system system /proc/vendor_sched/prefer_idle_set
- chown system system /proc/vendor_sched/prefer_idle_clear
- chown system system /proc/vendor_sched/pmu_poll_enable
- chown system system /proc/vendor_sched/pmu_poll_time
- chown system system /sys/devices/system/cpu/cpufreq/policy0/sched_pixel/lcpi_threshold
- chown system system /sys/devices/system/cpu/cpufreq/policy0/sched_pixel/spc_threshold
- chown system system /sys/devices/system/cpu/cpufreq/policy0/sched_pixel/limit_frequency
- chown system system /sys/devices/system/cpu/cpufreq/policy0/sched_pixel/pmu_limit_enable
- chown system system /sys/devices/system/cpu/cpufreq/policy4/sched_pixel/lcpi_threshold
- chown system system /sys/devices/system/cpu/cpufreq/policy4/sched_pixel/spc_threshold
- chown system system /sys/devices/system/cpu/cpufreq/policy4/sched_pixel/limit_frequency
- chown system system /sys/devices/system/cpu/cpufreq/policy4/sched_pixel/pmu_limit_enable
- chown system system /sys/devices/system/cpu/cpufreq/policy8/sched_pixel/lcpi_threshold
- chown system system /sys/devices/system/cpu/cpufreq/policy8/sched_pixel/spc_threshold
- chown system system /sys/devices/system/cpu/cpufreq/policy8/sched_pixel/limit_frequency
- chown system system /sys/devices/system/cpu/cpufreq/policy8/sched_pixel/pmu_limit_enable
-
- # FIXME(b/301212469) these nodes missing on zuma pro
- chown system system /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu0_memlat@17000010/memlat_cpuidle_state_aware
- chown system system /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu1_memlat@17000010/memlat_cpuidle_state_aware
- chown system system /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu2_memlat@17000010/memlat_cpuidle_state_aware
- chown system system /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu3_memlat@17000010/memlat_cpuidle_state_aware
- chown system system /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu4_memlat@17000010/memlat_cpuidle_state_aware
- chown system system /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu5_memlat@17000010/memlat_cpuidle_state_aware
- chown system system /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu6_memlat@17000010/memlat_cpuidle_state_aware
- chown system system /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu7_memlat@17000010/memlat_cpuidle_state_aware
- chown system system /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu8_memlat@17000010/memlat_cpuidle_state_aware
-
- chmod 0220 /proc/vendor_sched/groups/bg/set_task_group
- chmod 0220 /proc/vendor_sched/groups/cam/set_task_group
- chmod 0220 /proc/vendor_sched/groups/fg/set_task_group
- chmod 0220 /proc/vendor_sched/groups/nnapi/set_task_group
- chmod 0220 /proc/vendor_sched/groups/sys/set_task_group
- chmod 0220 /proc/vendor_sched/groups/sys_bg/set_task_group
- chmod 0220 /proc/vendor_sched/groups/ta/set_task_group
- chmod 0220 /proc/vendor_sched/groups/rt/set_task_group
- chmod 0220 /proc/vendor_sched/groups/sf/set_task_group
- chmod 0220 /proc/vendor_sched/groups/dex2oat/set_task_group
- chmod 0220 /proc/vendor_sched/groups/cam_power/set_task_group
- chmod 0220 /proc/vendor_sched/groups/ota/set_task_group
- chmod 0220 /proc/vendor_sched/groups/bg/set_proc_group
- chmod 0220 /proc/vendor_sched/groups/cam/set_proc_group
- chmod 0220 /proc/vendor_sched/groups/fg/set_proc_group
- chmod 0220 /proc/vendor_sched/groups/nnapi/set_proc_group
- chmod 0220 /proc/vendor_sched/groups/sys/set_proc_group
- chmod 0220 /proc/vendor_sched/groups/sys_bg/set_proc_group
- chmod 0220 /proc/vendor_sched/groups/ta/set_proc_group
- chmod 0220 /proc/vendor_sched/groups/rt/set_proc_group
- chmod 0220 /proc/vendor_sched/groups/sf/set_proc_group
- chmod 0220 /proc/vendor_sched/groups/dex2oat/set_proc_group
- chmod 0220 /proc/vendor_sched/groups/cam_power/set_proc_group
- chmod 0220 /proc/vendor_sched/groups/ota/set_proc_group
- chmod 0220 /proc/vendor_sched/prefer_idle_set
- chmod 0220 /proc/vendor_sched/prefer_idle_clear
- chmod 0660 /proc/vendor_sched/pmu_poll_enable
- chmod 0220 /proc/vendor_sched/pmu_poll_time
-
- 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
-
- # ZRAM setup
- write /sys/block/zram0/comp_algorithm lz77eh
- write /proc/sys/vm/page-cluster 0
-
- # Some user code relies on ro.boot.hardware.revision
- setprop ro.boot.hardware.revision ${ro.revision}
-
- # Allow PAI targeting per hardware SKU
- setprop ro.oem.key1 ${ro.boot.hardware.sku}
-
- # Property used by vintf for sku specific manifests
- # Property used by NFC for sku specific configurations
- setprop ro.boot.product.hardware.sku ${ro.boot.hardware.sku}
-
- # Support legacy paths
- symlink /data/app /factory
-
- # Apply network parameters for high data performance.
- write /proc/sys/net/core/rmem_default 1310720
- write /proc/sys/net/core/rmem_max 8388608
- write /proc/sys/net/core/wmem_default 327680
- write /proc/sys/net/core/wmem_max 8388608
- write /proc/sys/net/core/optmem_max 20480
- write /proc/sys/net/core/netdev_max_backlog 10000
- write /proc/sys/net/ipv4/tcp_rmem "2097152 4194304 8388608"
- write /proc/sys/net/ipv4/tcp_wmem "262144 524288 8388608"
- write /proc/sys/net/ipv4/tcp_mem "44259 59012 88518"
- write /proc/sys/net/ipv4/udp_mem "88518 118025 177036"
-
- write /sys/class/net/rmnet0/queues/rx-0/rps_cpus fe
- write /sys/class/net/rmnet1/queues/rx-0/rps_cpus fe
- write /sys/class/net/rmnet2/queues/rx-0/rps_cpus fe
- write /sys/class/net/rmnet3/queues/rx-0/rps_cpus fe
- write /sys/class/net/rmnet4/queues/rx-0/rps_cpus fe
- write /sys/class/net/rmnet5/queues/rx-0/rps_cpus fe
- write /sys/class/net/rmnet6/queues/rx-0/rps_cpus fe
- write /sys/class/net/rmnet7/queues/rx-0/rps_cpus fe
-
- # Create UDS structure for base VR services.
- mkdir /dev/socket/pdx 0775 system system
- mkdir /dev/socket/pdx/system 0775 system system
- mkdir /dev/socket/pdx/system/buffer_hub 0775 system system
- mkdir /dev/socket/pdx/system/performance 0775 system system
- mkdir /dev/socket/pdx/system/vr 0775 system system
- mkdir /dev/socket/pdx/system/vr/display 0775 system system
- mkdir /dev/socket/pdx/system/vr/pose 0775 system system
- mkdir /dev/socket/pdx/system/vr/sensors 0775 system system
-
- # Boot time tuning
- # Set uclamp_min to capacity of little core + 1 to avoid little core
- write /proc/vendor_sched/groups/ta/uclamp_min 221
- write /proc/vendor_sched/groups/ta/prefer_idle 1
- write /proc/vendor_sched/groups/fg/uclamp_min 221
- write /proc/vendor_sched/groups/fg/prefer_idle 1
- write /proc/vendor_sched/groups/sys/uclamp_min 221
- write /proc/vendor_sched/groups/sys/prefer_idle 1
-
- # governor setting
- write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor sched_pixel
- write /sys/devices/system/cpu/cpu0/cpufreq/sched_pixel/up_rate_limit_us 500
- write /sys/devices/system/cpu/cpu0/cpufreq/sched_pixel/down_rate_limit_us 5000
- write /sys/devices/system/cpu/cpu0/cpufreq/sched_pixel/down_rate_limit_scale_pow 2
- write /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor sched_pixel
- write /sys/devices/system/cpu/cpu4/cpufreq/sched_pixel/up_rate_limit_us 500
- write /sys/devices/system/cpu/cpu4/cpufreq/sched_pixel/down_rate_limit_us 20000
- write /sys/devices/system/cpu/cpu8/cpufreq/scaling_governor sched_pixel
- write /sys/devices/system/cpu/cpu8/cpufreq/sched_pixel/up_rate_limit_us 500
- write /sys/devices/system/cpu/cpu8/cpufreq/sched_pixel/down_rate_limit_us 20000
-
-
- # memlat cpuidle awareness setting
- # FIXME(b/301212469) these nodes missing on zuma pro
- write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu0_memlat@17000010/memlat_cpuidle_state_aware 2
- write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu1_memlat@17000010/memlat_cpuidle_state_aware 2
- write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu2_memlat@17000010/memlat_cpuidle_state_aware 2
- write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu3_memlat@17000010/memlat_cpuidle_state_aware 2
- write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu4_memlat@17000010/memlat_cpuidle_state_aware 2
- write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu5_memlat@17000010/memlat_cpuidle_state_aware 2
- write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu6_memlat@17000010/memlat_cpuidle_state_aware 2
- write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu7_memlat@17000010/memlat_cpuidle_state_aware 2
- write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu8_memlat@17000010/memlat_cpuidle_state_aware 2
-
- # RT uclamp setting
- write /proc/sys/kernel/sched_util_clamp_min_rt_default 0
-
- # change permissions and default values for camera-daemon cpu controller
- chown system system /dev/cpuctl/camera-daemon/cpu.uclamp.min
- chown system system /dev/cpuctl/camera-daemon/cpu.uclamp.max
- chown root root /dev/cpuctl/camera-daemon/cpu.uclamp.latency_sensitive
- chown system system /dev/cpuctl/camera-daemon/cgroup.procs
-
- mkdir /dev/cpuset/camera-daemon-high-group
- write /dev/cpuset/camera-daemon-high-group/cpus 0-8
- write /dev/cpuset/camera-daemon-high-group/mems 0
- chown system system /dev/cpuset/camera-daemon-high-group/tasks
- chmod 0664 /dev/cpuset/camera-daemon-high-group/tasks
-
- mkdir /dev/cpuset/camera-daemon-mid-group
- write /dev/cpuset/camera-daemon-mid-group/cpus 0-8
- write /dev/cpuset/camera-daemon-mid-group/mems 0
- chown system system /dev/cpuset/camera-daemon-mid-group/tasks
- chmod 0664 /dev/cpuset/camera-daemon-mid-group/tasks
-
- mkdir /dev/cpuset/camera-daemon-mid-high-group
- write /dev/cpuset/camera-daemon-mid-high-group/cpus 0-8
- write /dev/cpuset/camera-daemon-mid-high-group/mems 0
- chown system system /dev/cpuset/camera-daemon-mid-high-group/tasks
- chmod 0664 /dev/cpuset/camera-daemon-mid-high-group/tasks
-
- write /proc/vendor_sched/groups/cam/prefer_idle 1
- write /proc/vendor_sched/groups/cam/uclamp_min 1
-
- chown system system /dev/cpuset/cgroup.procs
-
- # nanohub sensor
- chmod 0664 /dev/nanohub
- chmod 0664 /dev/nanohub_comms
- chown system system /dev/nanohub
- chown system system /dev/nanohub_comms
-
- # Loading common kernel modules in background
- start init_display
-
- # Power Stats HAL
- chown system system /dev/bbd_pwrstat
-
- # Add a boost for NNAPI HAL
- write /proc/vendor_sched/groups/nnapi/prefer_idle 0
- write /proc/vendor_sched/groups/nnapi/uclamp_min 512
-
- # Add memlat governor settings
- # FIXME(b/301212469) these nodes missing on zuma pro
- 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_cpu2_memlat@17000010/polling_interval 10
- write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu3_memlat@17000010/polling_interval 10
- write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu4_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_cpu7_memlat@17000010/polling_interval 10
- write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu8_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_cpu1_memlat@17000010/mem_latency/ratio_ceil 1800
- 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_cpu3_memlat@17000010/mem_latency/ratio_ceil 1800
- 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_cpu5_memlat@17000010/mem_latency/ratio_ceil 3700
- 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_cpu7_memlat@17000010/mem_latency/ratio_ceil 3700
- write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu8_memlat@17000010/mem_latency/ratio_ceil 3400
- 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_cpu2_memlat@17000010/mem_latency/stall_floor 3000
- write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu3_memlat@17000010/mem_latency/stall_floor 3000
- 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_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_cpu8_memlat@17000010/mem_latency/stall_floor 500
-
- # Set boost_adpf_prio, -1 by default
- write /proc/vendor_sched/boost_adpf_prio ${persist.device_config.vendor_system_native_boot.boost_adpf_prio:--1}
-
- # Add dsulat governor settings
- write /sys/class/devfreq/gs_dsulat_devfreq:devfreq_dsu_lat@17000090/dsu_latency/ratio_ceil_cl0 700
- write /sys/class/devfreq/gs_dsulat_devfreq:devfreq_dsu_lat@17000090/dsu_latency/ratio_ceil_cl1 1000
- write /sys/class/devfreq/gs_dsulat_devfreq:devfreq_dsu_lat@17000090/dsu_latency/ratio_ceil_cl2 3000
-
- write /sys/class/devfreq/gs_dsulat_devfreq:devfreq_dsu_lat@17000090/dsu_latency/mem_stall_floor_cl0 1750
- write /sys/class/devfreq/gs_dsulat_devfreq:devfreq_dsu_lat@17000090/dsu_latency/mem_stall_floor_cl1 1750
- write /sys/class/devfreq/gs_dsulat_devfreq:devfreq_dsu_lat@17000090/dsu_latency/mem_stall_floor_cl2 1750
-
- write /sys/class/devfreq/gs_dsulat_devfreq:devfreq_dsu_lat@17000090/dsu_latency/dsulat_cpuidle_state_aware_cl0 2
- write /sys/class/devfreq/gs_dsulat_devfreq:devfreq_dsu_lat@17000090/dsu_latency/dsulat_cpuidle_state_aware_cl1 2
- write /sys/class/devfreq/gs_dsulat_devfreq:devfreq_dsu_lat@17000090/dsu_latency/dsulat_cpuidle_state_aware_cl2 2
-
- # Give pixelstats group access to PCIe link statistics counters
- chown system system /sys/devices/platform/12100000.pcie/link_stats/complete_timeout_irqs
- chown system system /sys/devices/platform/12100000.pcie/link_stats/link_down_irqs
- chown system system /sys/devices/platform/12100000.pcie/link_stats/link_recovery_failures
- chown system system /sys/devices/platform/12100000.pcie/link_stats/link_up_failures
- chown system system /sys/devices/platform/13120000.pcie/link_stats/complete_timeout_irqs
- chown system system /sys/devices/platform/13120000.pcie/link_stats/link_down_irqs
- chown system system /sys/devices/platform/13120000.pcie/link_stats/link_recovery_failures
- chown system system /sys/devices/platform/13120000.pcie/link_stats/link_up_failures
-
- # Change GSA log group for dumpstate
- chown root system /sys/devices/platform/16490000.gsa-ns/log_main
- chown root system /sys/devices/platform/16490000.gsa-ns/log_intermediate
-
-on post-fs
- # Ensure device is ready and start storageproxyd
- wait /dev/sg1
- start storageproxyd
-
-on late-fs
- # Start bootanimation class before mount
- start bootanim
- class_start animation
-
- # Mount RW partitions which need run fsck
- mount_all --late
-
-on post-fs-data
- # Modem temperature driver
- chown radio system /sys/devices/platform/cp-tm1/cp_temp
-
- # Log data folder
- mkdir /data/vendor 0771 radio system
- mkdir /data/vendor/log 0771 radio system
- mkdir /data/vendor/log/cbd 0771 radio system
- mkdir /data/vendor/log/rfsd 0771 radio system
-
- mkdir /data/exynos/log 0771 radio system
- mkdir /data/vendor/rild 0771 radio system
- mkdir /data/vendor/dump 0771 radio system
- mkdir /data/vendor/slog 0771 system system
-
- # PixelLogger log paths.
- mkdir /data/vendor/radio 773 system radio
- mkdir /data/vendor/radio/logs 773 system radio
- mkdir /data/vendor/radio/logs/always-on 777 system radio
-
- # Modem extended log folder
- mkdir /data/vendor/radio/extended_logs 0770 radio system
-
- # Modem MDS log folder
- mkdir /data/vendor/radio/mds 0771 radio system
-
- # Modem SIM log folder
- mkdir /data/vendor/radio/sim 0771 radio system
-
- # Unzipped modem images folder
- mkdir /data/vendor/radio/image 0771 radio system
-
- # Modem stat folder
- mkdir /data/vendor/modem_stat 0771 radio system
- write /data/vendor/modem_stat/debug.txt ""
- chown radio system /data/vendor/modem_stat/debug.txt
- chmod 0664 /data/vendor/modem_stat/debug.txt
-
- # Modem replay folder
- mkdir /mnt/vendor/modem_userdata/replay 0775 radio system
-
- # Write display MIPI frequency from Modem
- chown system system /sys/devices/platform/19440000.drmdsim/hs_clock
- chown system system /sys/devices/platform/19450000.drmdsim/hs_clock
- chmod 0664 /sys/devices/platform/19440000.drmdsim/hs_clock
- chmod 0664 /sys/devices/platform/19450000.drmdsim/hs_clock
-
- # IPSEC PIDDIR for VoWiFi
- mkdir /data/vendor/misc 0771 root system
- mkdir /data/vendor/misc/vpn 0771 root system
-
- # Permissions Camera
- mkdir /data/vendor/camera 0770 system camera
- mkdir /data/vendor/camera/catpipe 0770 system camera
- chmod 0755 /sys/kernel/debug/tracing
- restorecon /sys/kernel/debug/tracing/trace_marker
-
- # ranging sensor
- chown system system /dev/ispolin_ranging
- chmod 0660 /dev/ispolin_ranging
-
- # Factory calibration files
- chmod 0771 /mnt/vendor/persist/camera
- chmod 0771 /mnt/vendor/persist/camera/OTP_calibration
- chmod 0771 /mnt/vendor/persist/camera/pdaf_calibration_data
- mkdir /mnt/vendor/persist/camera/rear 0771 system camera
- chmod 0771 /mnt/vendor/persist/camera/rear
-
- # Audio dump and debug
- mkdir /data/vendor/audio 0770 audio audio
-
- # Create the directories for Darwinn HAL.
- mkdir /data/vendor/hal_neuralnetworks_darwinn 0770 system system
- mkdir /data/vendor/hal_neuralnetworks_darwinn/checksum_cache 0770 system system
- mkdir /data/vendor/edgetpu 0770 system system
- mkdir /data/vendor/edgetpu/cache 0770 system system
-
- # Compatibility path for TPU
- symlink /dev/edgetpu-soc /dev/edgetpu
-
-on zygote-start
- # For PixelLogger configuration file.
- chmod 0771 /data/vendor/wifi
- write /proc/vendor_sched/groups/ta/uclamp_min 1
- write /proc/vendor_sched/groups/fg/uclamp_min 0
- write /proc/vendor_sched/groups/sys/uclamp_min 0
- write /proc/vendor_sched/groups/ta/preferred_idle_mask_low 0x3f
- write /proc/vendor_sched/groups/ta/preferred_idle_mask_mid 0x1f0
- write /proc/vendor_sched/groups/ta/preferred_idle_mask_high 0x1f0
- write /proc/vendor_sched/groups/ta/prefer_idle 1
- write /proc/vendor_sched/groups/fg/preferred_idle_mask_low 0x3f
- write /proc/vendor_sched/groups/fg/preferred_idle_mask_mid 0x1f0
- write /proc/vendor_sched/groups/fg/preferred_idle_mask_high 0x1f0
- write /proc/vendor_sched/groups/fg/prefer_idle 1
- write /proc/vendor_sched/groups/sys/preferred_idle_mask_low 0x3f
- write /proc/vendor_sched/groups/sys/preferred_idle_mask_mid 0x1f0
- write /proc/vendor_sched/groups/sys/preferred_idle_mask_high 0x1f0
- write /proc/vendor_sched/groups/sys/prefer_idle 1
-
- write /proc/vendor_sched/groups/bg/ug 0
- write /proc/vendor_sched/groups/sys_bg/ug 0
- write /proc/vendor_sched/groups/ota/ug 0
- write /proc/vendor_sched/groups/dex2oat/ug 1
- write /proc/vendor_sched/groups/ta/ug 2
- write /proc/vendor_sched/groups/fg/ug 2
- write /proc/vendor_sched/groups/nnapi/ug 2
- write /proc/vendor_sched/groups/rt/ug 2
- write /proc/vendor_sched/groups/sf/ug 2
- write /proc/vendor_sched/groups/sys/ug 2
-
-on post-fs-data
- # Create the directories used by the Wireless subsystem
- mkdir /data/vendor/wifi 0771 wifi wifi
- mkdir /data/vendor/wifi/wpa 0770 wifi wifi
- mkdir /data/vendor/wifi/wpa/sockets 0770 wifi wifi
-
-# Gatekeeper data
- mkdir /data/vendor/gk 0771 system system
-
-# HWC data
- mkdir /data/vendor/log/hwc 0771 system graphics
-
-# Video data
- mkdir /data/vendor/media 0700 mediacodec mediacodec
-
-on post-fs-data
- # GPS
- mkdir /data/vendor/gps 0771 system system
- chown system system /data/vendor/gps
- rm /data/vendor/gps/gps_started
- rm /data/vendor/gps/glonass_started
- rm /data/vendor/gps/beidou_started
- rm /data/vendor/gps/smd_started
- rm /data/vendor/gps/sv_cno.info
-
- chown gps system /sys/devices/platform/111e0000.spi/spi_master/spi21/spi21.0/nstandby
- chmod 0664 /dev/ttyBCM
- chown gps system /dev/ttyBCM
- chmod 0664 /dev/bbd_control
- chown gps system /dev/bbd_control
- chmod 0664 /dev/bbd_patch
- chown gps system /dev/bbd_patch
- chmod 0664 /dev/bbd_sensor
- chown gps system /dev/bbd_sensor
-
-on early-boot
- # Wait for insmod_sh to finish all common modules
- 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
- chown system system /dev/logbuffer_pcie0
- chown system system /dev/logbuffer_pcie1
- chown system system /dev/logbuffer_bd
-
-on boot
-
- # Allow to access debugfs for system:system
- chmod 0755 /sys/kernel/debug
- chown system system /sys/kernel/debug
-
- #setprop ro.radio.noril no
-
- # default country code
- setprop ro.boot.wificountrycode 00
-
- # Set up kernel tracing, but disable it by default
- chmod 0222 /sys/kernel/debug/tracing/trace_marker
- write /sys/kernel/debug/tracing/tracing_on 0
-
- # Trigger TMU to ACPM pi table update
- write /sys/module/gs_thermal/parameters/update_acpm_pi_table 1
-
- # Change permission for A-Box firmware logs file & GPR dump
- chown audioserver system /sys/devices/platform/17c50000.abox/reset
- chown audioserver system /sys/devices/platform/17c50000.abox/service
- chown audioserver system /sys/devices/platform/17c50000.abox/0.abox_debug/gpr
- chown audioserver system /sys/devices/platform/17c50000.abox/0.abox_debug/calliope_sram
- chown audioserver system /sys/devices/platform/17c50000.abox/0.abox_debug/calliope_dram
- chown audioserver system /sys/devices/platform/17c50000.abox/0.abox_debug/calliope_iva
- chown audioserver system /sys/kernel/debug/abox/log-00
-
-# Permission for USB SELECT
- chown system system /sys/class/android_usb/android0/enable
- chmod 0660 /sys/class/android_usb/android0/enable
- chown system system /sys/class/android_usb/android0/idVendor
- chmod 0660 /sys/class/android_usb/android0/idVendor
- chown system system /sys/class/android_usb/android0/idProduct
- chmod 0660 /sys/class/android_usb/android0/idProduct
- chown system system /sys/class/android_usb/android0/f_diag/clients
- chmod 0660 /sys/class/android_usb/android0/f_diag/clients
- chown system system /sys/class/android_usb/android0/functions
- chmod 0660 /sys/class/android_usb/android0/functions
- chown system system /sys/class/android_usb/android0/bDeviceClass
- chmod 0660 /sys/class/android_usb/android0/bDeviceClass
-
-# Permission for UART SWITCH
- chmod 0660 /sys/class/sec/switch/uart_sel
- chown system system /sys/class/sec/switch/uart_sel
-
-# VTS sysfs file permission
- chown audioserver system /sys/devices/platform/13810000.vts/vts_svoice_model
- chown audioserver system /sys/devices/platform/13810000.vts/vts_google_model
- chmod 0660 /sys/devices/platform/13810000.vts/vts_svoice_model
- chmod 0660 /sys/devices/platform/13810000.vts/vts_google_model
-
-on property:persist.vendor.radio.no_modem_board=1
- setprop ro.radio.noril yes
-
-on fs
- mount_all --early
- restorecon_recursive /mnt/vendor/efs
- chown radio system /mnt/vendor/efs
- restorecon_recursive /mnt/vendor/efs_backup
- chown radio system /mnt/vendor/efs_backup
- restorecon_recursive /mnt/vendor/modem_userdata
- chown radio system /mnt/vendor/modem_userdata
-
- # for battery defender
- mkdir /mnt/vendor/persist/battery 0700 system system
-
- # Mount modem partition
- mount_all /vendor/etc/fstab.modem --early
- restorecon_recursive /mnt/vendor/modem_img
-
- restorecon_recursive /mnt/vendor/persist
- restorecon_recursive /mnt/vendor/persist/aoc
- restorecon_recursive /mnt/vendor/persist/audio
- restorecon_recursive /mnt/vendor/persist/sensors
- restorecon_recursive /mnt/vendor/persist/battery
- restorecon_recursive /mnt/vendor/persist/camera
- restorecon_recursive /mnt/vendor/persist/modem
- # Set up display-related directories and permissions
- # Add restorecon_recursive command to make sure the restorecon label is persist_display_file.
- restorecon_recursive /mnt/vendor/persist/display
- mkdir /mnt/vendor/persist/data/sfs 0700 system system
- mkdir /mnt/vendor/persist/data/tz 0700 system system
- mkdir /mnt/vendor/persist/touch 0770 system system
-
-# Permissions for ION
- chmod 0660 /sys/class/ion_cma/ion_video_ext/isolated
- chown system system /sys/class/ion_cma/ion_video_ext/isolated
-
-# Permissions for hwcomposer
- chown system system /sys/class/backlight/panel0-backlight/als_table
- chown system system /sys/class/backlight/panel0-backlight/brightness
- chown system system /sys/class/backlight/panel0-backlight/dimming_on
- chown system system /sys/class/backlight/panel0-backlight/hbm_mode
- chown system system /sys/class/backlight/panel0-backlight/local_hbm_mode
- chown system system /sys/devices/platform/exynos-drm/primary-panel/gamma
- chown system system /sys/devices/platform/exynos-drm/primary-panel/min_vrefresh
- chown system system /sys/devices/platform/exynos-drm/primary-panel/idle_delay_ms
- chown system system /sys/devices/platform/exynos-drm/primary-panel/panel_idle
- chown system system /sys/devices/platform/exynos-drm/primary-panel/panel_need_handle_idle_exit
- chown system system /sys/devices/platform/exynos-drm/primary-panel/op_hz
- chown system system /sys/devices/platform/exynos-drm/primary-panel/refresh_ctrl
- chown system system /sys/module/drm/parameters/vblankoffdelay
- chown system system /sys/module/drm/parameters/debug
- chown system system /sys/class/dqe0/atc/ambient_light
- chown system system /sys/class/dqe0/atc/st
- chown system system /sys/class/dqe0/atc/en
- chown system system /sys/class/dqe0/atc/lt
- chown system system /sys/class/dqe0/atc/ns
- chown system system /sys/class/dqe0/atc/dither
- chown system system /sys/class/dqe0/atc/pl_w1
- chown system system /sys/class/dqe0/atc/pl_w2
- chown system system /sys/class/dqe0/atc/ctmode
- chown system system /sys/class/dqe0/atc/pp_en
- chown system system /sys/class/dqe0/atc/upgrade_on
- chown system system /sys/class/dqe0/atc/tdr_max
- chown system system /sys/class/dqe0/atc/tdr_min
- chown system system /sys/class/dqe0/atc/back_light
- chown system system /sys/class/dqe0/atc/dstep
- chown system system /sys/class/dqe0/atc/scale_mode
- chown system system /sys/class/dqe0/atc/threshold_1
- chown system system /sys/class/dqe0/atc/threshold_2
- chown system system /sys/class/dqe0/atc/threshold_3
- chown system system /sys/class/dqe0/atc/gain_limit
- chown system system /sys/class/dqe0/atc/lt_calc_ab_shift
-
- chown system system /sys/devices/platform/19470000.drmdecon/early_wakeup
- chmod 0660 /sys/devices/platform/19470000.drmdecon/early_wakeup
-
- chown system system /sys/devices/platform/19470000.drmdecon/hibernation
- chmod 0644 /sys/devices/platform/19470000.drmdecon/hibernation
-
-# Copy DRM Key
-# copy /system/app/wv.keys /factory/wv.keys
-
-# Permission for DRM Key
-# chmod 0644 /factory/wv.keys
-
-# Permission for flashlight control for HAL3.3
-# The Istor espresso board does not have the flash led h/w, So the below permission line are blocked.
-# If you want to test the flashlight in board which have the flash led h/w, Enable the below blocked lines.
- chmod 0660 /sys/class/camera/flash/rear_torch_flash
- chown system camera /sys/class/camera/flash/rear_torch_flash
-#load ecd firmware
- write /proc/ecd/load_firmware 1
-
-service abox /vendor/bin/main_abox 17c50000.abox
- class late_start
- user audioserver
- group audioserver
- seclabel u:r:abox:s0
-
-# on userdebug and eng builds, enable kgdb on the serial console
-on property:ro.debuggable=1
- write /sys/module/kgdboc/parameters/kgdboc ttyFIQ1
- write /sys/module/fiq_debugger/parameters/kgdb_enable 1
-
-# Touch
-on property:vendor.device.modules.ready=1
- chown system system /sys/class/spi_master/spi20/spi20.0/stm_fts_cmd
- chown system system /sys/class/spi_master/spi20/spi20.0/glove_mode
- chown system system /sys/devices/virtual/sec/tsp/fw_version
- chown system system /sys/devices/virtual/sec/tsp/cmd
- chown system system /sys/devices/virtual/sec/tsp/cmd_result
- chown system system /sys/devices/virtual/sec/tsp/status
- chown system system /sys/devices/virtual/goog_touch_interface/gti.0/force_active
- chown system system /sys/devices/virtual/goog_touch_interface/gti.0/fw_ver
- chown system system /sys/devices/virtual/goog_touch_interface/gti.0/ms_base
- chown system system /sys/devices/virtual/goog_touch_interface/gti.0/ms_diff
- chown system system /sys/devices/virtual/goog_touch_interface/gti.0/ms_raw
- chown system system /sys/devices/virtual/goog_touch_interface/gti.0/self_test
- 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_raw
- # Allow access to touch
- chown system input /dev/touch_offload
- chmod 660 /dev/touch_offload
-
-# Route touch_sensitivity_mode to persist
-on property:debug.touch_sensitivity_mode=0
- setprop persist.vendor.touch_sensitivity_mode 0
-
-on property:debug.touch_sensitivity_mode=1
- setprop persist.vendor.touch_sensitivity_mode 1
-
-on property:init.svc.vendor.charger=running
- stop keymaster-4-0
-
- setprop sys.usb.configfs 1
- setprop vendor.setup.power 1
-
- # keep one little and one big
- write /sys/devices/system/cpu/cpu1/online 0
- write /sys/devices/system/cpu/cpu2/online 0
- write /sys/devices/system/cpu/cpu3/online 0
- write /sys/devices/system/cpu/cpu4/online 0
- write /sys/devices/system/cpu/cpu5/online 0
- write /sys/devices/system/cpu/cpu7/online 0
-
-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
- swapon_all /vendor/etc/fstab.${ro.board.platform}
- write /proc/sys/vm/swappiness 60
-
- # Set kswapd affinity
- write /sys/kernel/vendor_mm/kswapd_cpu_affinity ff
-
- # Adjust watermark level
- write /proc/sys/vm/watermark_scale_factor 200
-
- # Back to default VM settings
- write /proc/sys/vm/dirty_expire_centisecs 3000
- write /proc/sys/vm/dirty_background_ratio 10
-
- # Enable UFS powersaving
- write /dev/sys/block/bootdevice/clkgate_enable 1
-
- # Cancel boot devfreq
- write /sys/devices/platform/17000010.devfreq_mif/devfreq/17000010.devfreq_mif/exynos_data/cancel_boot_freq 1
-
- # Restore prefer idle
- write /proc/vendor_sched/groups/ta/preferred_idle_mask_low 0x1ff
- write /proc/vendor_sched/groups/ta/preferred_idle_mask_mid 0x1ff
- write /proc/vendor_sched/groups/ta/preferred_idle_mask_high 0x1ff
- write /proc/vendor_sched/groups/fg/preferred_idle_mask_low 0x1ff
- write /proc/vendor_sched/groups/fg/preferred_idle_mask_mid 0x1ff
- write /proc/vendor_sched/groups/fg/preferred_idle_mask_high 0x1ff
- write /proc/vendor_sched/groups/sys/preferred_idle_mask_low 0x1ff
- write /proc/vendor_sched/groups/sys/preferred_idle_mask_mid 0x1ff
- write /proc/vendor_sched/groups/sys/preferred_idle_mask_high 0x1ff
-
- # Setup final cpuset
- write /dev/cpuset/top-app/cpus 0-8
- write /dev/cpuset/foreground/cpus 0-7
- write /dev/cpuset/background/cpus 0-3
- write /dev/cpuset/system-background/cpus 0-3
- write /dev/cpuset/restricted/cpus 0-3
- write /dev/cpuset/camera-daemon/cpus 0-8
- setprop vendor.powerhal.init 1
-
- # Setup final cpu.uclamp
- write /proc/vendor_sched/groups/ta/uclamp_min 1
- write /proc/vendor_sched/groups/fg/uclamp_min 0
- write /proc/vendor_sched/groups/sys/prefer_idle 0
-
- # Set ug group
- write /proc/vendor_sched/groups/bg/ug 0
- write /proc/vendor_sched/groups/sys_bg/ug 0
- write /proc/vendor_sched/groups/ota/ug 0
- write /proc/vendor_sched/groups/dex2oat/ug 1
- write /proc/vendor_sched/groups/ta/ug 1
-
- # Set bg group throttle
- write /proc/vendor_sched/ug_bg_group_throttle ${persist.device_config.vendor_system_native.ug_bg_group_throttle:-308}
-
- # Set uclamp.max for some groups, which could indicate cpu importance used in scheduling
- write /proc/vendor_sched/auto_uclamp_max "130 130 130 130 512 512 512 670"
- write /proc/vendor_sched/groups/bg/uclamp_max 130
- write /proc/vendor_sched/groups/sys_bg/uclamp_max 512
- write /proc/vendor_sched/groups/ota/uclamp_max 512
- write /proc/vendor_sched/groups/dex2oat/uclamp_max -2
-
- write /proc/vendor_sched/uclamp_max_filter_divider 4
- write /proc/vendor_sched/uclamp_max_filter_rt 16
- write /proc/vendor_sched/uclamp_max_filter_enable 1
-
- # Set PMU freq limit parameters
- write /sys/devices/system/cpu/cpufreq/policy0/sched_pixel/lcpi_threshold 0
- write /sys/devices/system/cpu/cpufreq/policy0/sched_pixel/spc_threshold 76
- write /sys/devices/system/cpu/cpufreq/policy0/sched_pixel/limit_frequency 1328000
- write /sys/devices/system/cpu/cpufreq/policy4/sched_pixel/lcpi_threshold 0
- write /sys/devices/system/cpu/cpufreq/policy4/sched_pixel/spc_threshold 73
- write /sys/devices/system/cpu/cpufreq/policy4/sched_pixel/limit_frequency 1836000
- write /sys/devices/system/cpu/cpufreq/policy8/sched_pixel/lcpi_threshold 0
- write /sys/devices/system/cpu/cpufreq/policy8/sched_pixel/spc_threshold 68
- write /sys/devices/system/cpu/cpufreq/policy8/sched_pixel/limit_frequency 2363000
- write /proc/vendor_sched/pmu_poll_time 10
-
- # Disable PMU freq limit
- write /sys/devices/system/cpu/cpufreq/policy0/sched_pixel/pmu_limit_enable 1
- write /sys/devices/system/cpu/cpufreq/policy4/sched_pixel/pmu_limit_enable 1
- write /sys/devices/system/cpu/cpufreq/policy8/sched_pixel/pmu_limit_enable 1
- write /proc/vendor_sched/pmu_poll_enable 0
-
- # Make devices on the critical path for suspend/resume asynchronous
- write /sys/devices/platform/fixedregulator@0/regulator/regulator.2/power/async "enabled"
- write /sys/devices/platform/fixedregulator@0/power/async "enabled"
- write /sys/devices/platform/26040000.clock-controller/power/async "enabled"
- write /sys/devices/platform/10840000.pinctrl/power/async "enabled"
- write /sys/devices/platform/13060000.pinctrl/power/async "enabled"
-
- # Setup cpu.shares to throttle background groups (bg ~ 5% sysbg ~ 5% dex2oat ~2.5%)
- write /dev/cpuctl/background/cpu.shares 1024
- write /dev/cpuctl/system-background/cpu.shares 1024
- write /dev/cpuctl/dex2oat/cpu.shares 512
- write /dev/cpuctl/system/cpu.shares 20480
- # We only have system and background groups holding tasks and the groups below are empty
- write /dev/cpuctl/camera-daemon/cpu.shares 20480
- write /dev/cpuctl/foreground/cpu.shares 20480
- write /dev/cpuctl/nnapi-hal/cpu.shares 20480
- write /dev/cpuctl/rt/cpu.shares 20480
- write /dev/cpuctl/top-app/cpu.shares 20480
-
- # gvotables for dumpstate
- chown system system /sys/kernel/debug/gvotables
-
- # AOC reset permission
- chown root system /sys/devices/platform/19000000.aoc/reset
- chmod 0220 /sys/devices/platform/19000000.aoc/reset
-
- # AOC UDFPS clock compensation permission
- chown system system /sys/devices/platform/17000000.aoc/control/udfps_set_clock_source
- chmod 220 /sys/devices/platform/17000000.aoc/control/udfps_set_clock_source
- chown system system /sys/devices/platform/17000000.aoc/control/udfps_get_osc_freq
- chmod 440 /sys/devices/platform/17000000.aoc/control/udfps_get_osc_freq
- chown system system /sys/devices/platform/17000000.aoc/control/udfps_get_disp_freq
- chmod 440 /sys/devices/platform/17000000.aoc/control/udfps_get_disp_freq
-
- # Disable GPU firmware logging
- write /sys/devices/platform/1f000000.mali/firmware_config/Log\ verbosity/cur 0
-
-#Enable SICD
- write /sys/devices/system/cpu/cpupm/cpupm/sicd 1
-
-on property:sys.boot_completed=1 && property:persist.sys.device_provisioned=1
- write /sys/class/power_supply/battery/first_usage_date 0
-
-# IMS WiFi Calling
- service charonservice /system/vendor/bin/charon
- class main
- user root
- disabled
- seclabel u:r:charonservice:s0
-
-on property:vendor.charon.exec=1
- rm /data/vendor/misc/vpn/charon.pid
- chmod 0666 /dev/tun
- start charonservice
-
-on property:vendor.charon.exec=0
- stop charonservice
- rm /data/vendor/misc/vpn/charon.pid
-
-# charger driver exposes now finer grain control, map demo mode to those properties
-# NOTE: demo mode can only be exit wiping data (which reset the persist properties)
-on property:sys.retaildemo.enabled=1
- setprop persist.vendor.charge.stop.level 35
- setprop persist.vendor.charge.start.level 30
-# Test Harness Mode default battery profile.
-on property:persist.sys.test_harness=1 && property:persist.vendor.testing_battery_profile=0
- setprop persist.vendor.charge.stop.level 70
- setprop persist.vendor.charge.start.level 35
- setprop vendor.battery.defender.disable 1
-
-# Extremely restricted battery profile.
-on property:persist.sys.test_harness=1 && property:persist.vendor.testing_battery_profile=1
- setprop persist.vendor.charge.stop.level 50
- setprop persist.vendor.charge.start.level 35
- setprop vendor.battery.defender.disable 1
-
-# Normal behavior (as if the device was a regular device)
-on property:persist.sys.test_harness=1 && property:persist.vendor.testing_battery_profile=2
- setprop persist.vendor.charge.stop.level 100
- setprop persist.vendor.charge.start.level 0
-
-# Unrestricted, allows charging to 100%
-on property:persist.sys.test_harness=1 && property:persist.vendor.testing_battery_profile=3
- setprop persist.vendor.charge.stop.level 100
- setprop persist.vendor.charge.start.level 0
- setprop vendor.battery.defender.disable 1
-
-# bugreport is triggered by holding down volume down, volume up and power
-service bugreport /system/bin/dumpstate -d -p -z
- class main
- disabled
- oneshot
- keycodes 114 115 116
-
-# Proxy for Secure Storage
-on post-fs-data
- mkdir /data/vendor/rebootescrow 0770 hsm hsm
- mkdir /data/vendor/ss 0770 root system
- mkdir /mnt/vendor/persist/ss 0770 root system
- restorecon_recursive /mnt/vendor/persist/ss
- symlink /mnt/vendor/persist/ss /data/vendor/ss/persist
- chown root system /data/vendor/ss/persist
- chmod 0770 /data/vendor/ss/persist
- symlink /dev/block/platform/13200000\.ufs/by-name/trusty_persist /data/vendor/ss/persist/0
- symlink /dev/block/platform/13200000\.ufs/by-name/trusty_userdata /data/vendor/ss/0
- chown system system /data/vendor/ss/0
- chown system system /data/vendor/ss/persist/0
- chown system system /data/vendor/ss/persist/nsp
-
- restart storageproxyd
-
-service storageproxyd /vendor/bin/storageproxyd -d /dev/trusty-ipc-dev0 \
- -r /dev/sg1 -p /data/vendor/ss -t ufs
- class early_hal
- user system
- group system
- task_profiles MaxPerformance
-
-# Write build info to kdebuginfo
-on property:ro.build.fingerprint=*
- write /sys/module/debug_kinfo/parameters/build_info ${ro.build.fingerprint}
-
-# Bluetooth
-on early-boot
- chown bluetooth system /sys/devices/platform/175b0000.serial/serial0/serial0-0/bluetooth/hci0/rfkill0/state
- chown bluetooth system /sys/devices/platform/odm/odm:btbcm/rfkill/rfkill0/state
- chown bluetooth system /sys/devices/platform/odm/odm:btbcm/rfkill/rfkill2/state
-
-on post-fs-data
- chown bluetooth system /proc/bluetooth/sleep/btwake
- chown bluetooth system /proc/bluetooth/sleep/lpm
- chown bluetooth system /proc/bluetooth/sleep/btwrite
- mkdir /data/vendor/bluetooth 0770 bluetooth system
-
-# ODPM
-on fs
- chown system system /sys/devices/platform/acpm_mfd_bus@18100000/i2c-7/i2c-s2mpg12mfd/s2mpg12-meter/s2mpg12-odpm/iio\:device0/enabled_rails
- chown system system /sys/devices/platform/acpm_mfd_bus@18110000/i2c-8/i2c-s2mpg13mfd/s2mpg13-meter/s2mpg13-odpm/iio\:device1/enabled_rails
-
-on post-fs-data
- mkdir /data/vendor/powerstats 0771 system system
- chown system system /data/vendor/powerstats
- # Thermal Residency Stats (write 1 to 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
-
-on property:vendor.thermal.link_ready=1
- # BCL
- 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/virtual/pmic/mitigation/clock_ratio/tpu_light_clk_ratio 0xfff041c1 #OCP
- write /sys/devices/virtual/pmic/mitigation/clock_ratio/cpu1_heavy_clk_ratio 0xfff041c0 #DFS
- write /sys/devices/virtual/pmic/mitigation/clock_ratio/cpu2_heavy_clk_ratio 0xfff041c0 #DFS
- write /sys/devices/virtual/pmic/mitigation/clock_ratio/gpu_light_clk_ratio 0xfff041c1 #OCP
- write /sys/devices/virtual/pmic/mitigation/clock_ratio/cpu2_light_clk_ratio 0xfff041c3 #OCP
- write /sys/devices/virtual/pmic/mitigation/clock_ratio/gpu_heavy_clk_ratio 0xfff04380 #DFS
- write /sys/devices/virtual/pmic/mitigation/clock_ratio/tpu_heavy_clk_ratio 0xfff041c0 #DFS
- write /sys/devices/virtual/pmic/mitigation/triggered_lvl/smpl_lvl 3000
- write /sys/devices/virtual/pmic/mitigation/triggered_lvl/soft_ocp_cpu2_lvl 12000
- write /sys/devices/virtual/pmic/mitigation/triggered_lvl/soft_ocp_gpu_lvl 9000
- write /sys/devices/virtual/pmic/mitigation/triggered_lvl/soft_ocp_tpu_lvl 8500
- write /sys/devices/virtual/pmic/mitigation/clock_div/tpu_clk_div 0x1
- write /sys/devices/virtual/pmic/mitigation/clock_div/gpu_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_cl2 1 #Enable power down
- 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_hyst
- chown system system /dev/thermal/tz-by-name/vdroop1/trip_point_0_temp
- chown system system /dev/thermal/tz-by-name/vdroop1/trip_point_0_hyst
- chown system system /dev/thermal/tz-by-name/smpl_gm/trip_point_0_temp
- chown system system /dev/thermal/tz-by-name/smpl_gm/trip_point_0_hyst
- chown system system /dev/thermal/tz-by-name/ocp_cpu1/trip_point_0_temp
- chown system system /dev/thermal/tz-by-name/ocp_cpu1/trip_point_0_hyst
- chown system system /dev/thermal/tz-by-name/ocp_cpu2/trip_point_0_temp
- chown system system /dev/thermal/tz-by-name/ocp_cpu2/trip_point_0_hyst
- chown system system /dev/thermal/tz-by-name/ocp_tpu/trip_point_0_temp
- chown system system /dev/thermal/tz-by-name/ocp_tpu/trip_point_0_hyst
- chown system system /dev/thermal/tz-by-name/ocp_gpu/trip_point_0_temp
- chown system system /dev/thermal/tz-by-name/ocp_gpu/trip_point_0_hyst
- chown system system /dev/thermal/tz-by-name/soft_ocp_cpu1/trip_point_0_temp
- chown system system /dev/thermal/tz-by-name/soft_ocp_cpu1/trip_point_0_hyst
- chown system system /dev/thermal/tz-by-name/soft_ocp_cpu2/trip_point_0_temp
- chown system system /dev/thermal/tz-by-name/soft_ocp_cpu2/trip_point_0_hyst
- chown system system /dev/thermal/tz-by-name/soft_ocp_tpu/trip_point_0_temp
- chown system system /dev/thermal/tz-by-name/soft_ocp_tpu/trip_point_0_hyst
- chown system system /dev/thermal/tz-by-name/soft_ocp_gpu/trip_point_0_temp
- chown system system /dev/thermal/tz-by-name/soft_ocp_gpu/trip_point_0_hyst
- chown system system /dev/thermal/tz-by-name/soc/trip_point_0_temp
- chown system system /dev/thermal/tz-by-name/soc/trip_point_0_hyst
- chown system system /dev/thermal/tz-by-name/batoilo/trip_point_0_temp
- chown system system /dev/thermal/tz-by-name/batoilo/trip_point_0_hyst
- # Thermal
- chown system system /dev/thermal/tz-by-name/disp_therm/trip_point_0_temp
- chown system system /dev/thermal/tz-by-name/disp_therm/trip_point_0_hyst
- chown system system /dev/thermal/tz-by-name/north_therm/trip_point_0_temp
- chown system system /dev/thermal/tz-by-name/north_therm/trip_point_0_hyst
- chown system system /dev/thermal/tz-by-name/cam_therm/trip_point_0_temp
- chown system system /dev/thermal/tz-by-name/cam_therm/trip_point_0_hyst
- chown system system /dev/thermal/tz-by-name/charging_therm/trip_point_0_temp
- chown system system /dev/thermal/tz-by-name/charging_therm/trip_point_0_hyst
- chown system system /dev/thermal/tz-by-name/soc_therm/trip_point_0_temp
- chown system system /dev/thermal/tz-by-name/soc_therm/trip_point_0_hyst
- chown system system /dev/thermal/tz-by-name/neutral_therm/trip_point_0_temp
- chown system system /dev/thermal/tz-by-name/neutral_therm/trip_point_0_hyst
- chown system system /dev/thermal/tz-by-name/usb_pwr_therm/trip_point_0_temp
- chown system system /dev/thermal/tz-by-name/usb_pwr_therm/trip_point_0_hyst
- chown system system /dev/thermal/tz-by-name/quiet_therm/trip_point_0_temp
- chown system system /dev/thermal/tz-by-name/quiet_therm/trip_point_0_hyst
- chown system system /dev/thermal/tz-by-name/usb_conn_therm/trip_point_0_temp
- chown system system /dev/thermal/tz-by-name/usb_conn_therm/trip_point_0_hyst
- chown system system /dev/thermal/tz-by-name/btmspkr_therm/trip_point_0_temp
- chown system system /dev/thermal/tz-by-name/btmspkr_therm/trip_point_0_hyst
- chown system system /dev/thermal/tz-by-name/rfpa_therm/trip_point_0_temp
- chown system system /dev/thermal/tz-by-name/rfpa_therm/trip_point_0_hyst
- chown system system /dev/thermal/cdev-by-name/thermal-cpufreq-0/user_vote
- chown system system /dev/thermal/cdev-by-name/thermal-cpufreq-1/user_vote
- chown system system /dev/thermal/cdev-by-name/thermal-cpufreq-2/user_vote
- chown system system /dev/thermal/cdev-by-name/thermal-gpufreq-0/user_vote
- chown system system /dev/thermal/cdev-by-name/gxp-cooling/user_vote
- chown system system /dev/thermal/cdev-by-name/tpu_cooling/user_vote
- chown system system /dev/thermal/cdev-by-name/fcc/cur_state
- chown system system /dev/thermal/cdev-by-name/dc_icl/cur_state
- chown system system /dev/thermal/cdev-by-name/wlc_fcc/cur_state
- chown system system /dev/thermal/cdev-by-name/chg_mdis/cur_state
- chown system system /dev/thermal/cdev-by-name/usbc-port/cur_state
-
-on charger
- # Use charger thermal config
- setprop vendor.thermal.config "thermal_info_config_charge.json"
-
- # Wait for insmod_sh to finish all common modules
- wait_for_prop vendor.common.modules.ready 1
-
- # Create thermal symlink in off charging mode
- mkdir /dev/thermal 0750 system system
- mkdir /dev/thermal/tz-by-name 0750 system system
- mkdir /dev/thermal/cdev-by-name 0750 system system
- start vendor.thermal.symlinks
-
-on property:vendor.disable.bcl.control=1
- write /sys/devices/virtual/pmic/mitigation/instruction/enable_mitigation 0
-
-on property:vendor.disable.bcl.control=0
- write /sys/devices/virtual/pmic/mitigation/instruction/enable_mitigation 1
-
-# UDFPS
-on post-fs-data && property:ro.vendor.factory=1
- # HBM mode for UDFPS factory apk
- chmod 666 /d/dri/0/DSI-1/panel/reg/payload
- chmod 666 /d/dri/0/DSI-1/panel/reg/count
- chmod 666 /d/dri/0/DSI-1/panel/reg/address
- chmod 666 /d/dri/0/DSI-1/panel/hbm_mode
- chmod 666 /sys/class/backlight/panel0-backlight/local_hbm_max_timeout
- chmod 666 /sys/class/backlight/panel0-backlight/local_hbm_mode
- chmod 666 /sys/class/backlight/panel0-backlight/hbm_mode
-
-# UFS
-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
- write /sys/devices/platform/google,charger/dd_state -1
-
-# Haptics
-on property:vendor.all.modules.ready=1
- mkdir /mnt/vendor/persist/haptics 0770 system system
- chmod 770 /mnt/vendor/persist/haptics
- chmod 440 /mnt/vendor/persist/haptics/cs40l26.cal
- chown system system /mnt/vendor/persist/haptics
- chown system system /mnt/vendor/persist/haptics/cs40l26.cal
-
- chown system system /sys/bus/i2c/devices/9-0043/calibration/f0_stored
- chown system system /sys/bus/i2c/devices/9-0043/calibration/q_stored
- chown system system /sys/bus/i2c/devices/9-0043/calibration/redc_stored
- chown system system /sys/bus/i2c/devices/9-0043/default/vibe_state
- chown system system /sys/bus/i2c/devices/9-0043/default/num_waves
- chown system system /sys/bus/i2c/devices/9-0043/default/f0_offset
- chown system system /sys/bus/i2c/devices/9-0043/default/owt_free_space
- chown system system /sys/bus/i2c/devices/9-0043/default/f0_comp_enable
- chown system system /sys/bus/i2c/devices/9-0043/default/redc_comp_enable
- chown system system /sys/bus/i2c/devices/9-0043/default/delay_before_stop_playback_us
- chown system system /sys/bus/i2c/devices/9-0043/dbc/dbc_env_rel_coef
- chown system system /sys/bus/i2c/devices/9-0043/dbc/dbc_rise_headroom
- chown system system /sys/bus/i2c/devices/9-0043/dbc/dbc_fall_headroom
- chown system system /sys/bus/i2c/devices/9-0043/dbc/dbc_enable
- chown system system /sys/bus/i2c/devices/9-0043/dbc/dbc_tx_lvl_thresh_fs
- chown system system /sys/bus/i2c/devices/9-0043/dbc/dbc_tx_lvl_hold_off_ms
- chown system system /sys/bus/i2c/devices/9-0043/default/pm_active_timeout_ms
- enable vendor.vibrator.cs40l26
-
-# MTE
-on property:persist.device_config.runtime_native_boot.mode_override=sync
- # Per-core mode overrides.
- # Little Cores: sync
- write /sys/devices/system/cpu/cpu0/mte_tcf_preferred sync
- write /sys/devices/system/cpu/cpu1/mte_tcf_preferred sync
- write /sys/devices/system/cpu/cpu2/mte_tcf_preferred sync
- write /sys/devices/system/cpu/cpu3/mte_tcf_preferred sync
- # Mid Cores: sync
- write /sys/devices/system/cpu/cpu4/mte_tcf_preferred sync
- write /sys/devices/system/cpu/cpu5/mte_tcf_preferred sync
- write /sys/devices/system/cpu/cpu6/mte_tcf_preferred sync
- write /sys/devices/system/cpu/cpu7/mte_tcf_preferred sync
- # Big Core: sync mode performance is prohibitively bad
- write /sys/devices/system/cpu/cpu8/mte_tcf_preferred asymm
-
-on property:persist.device_config.runtime_native_boot.mode_override=asymm
- # Per-core mode overrides.
- write /sys/devices/system/cpu/cpu0/mte_tcf_preferred asymm
- write /sys/devices/system/cpu/cpu1/mte_tcf_preferred asymm
- write /sys/devices/system/cpu/cpu2/mte_tcf_preferred asymm
- write /sys/devices/system/cpu/cpu3/mte_tcf_preferred asymm
- write /sys/devices/system/cpu/cpu4/mte_tcf_preferred asymm
- write /sys/devices/system/cpu/cpu5/mte_tcf_preferred asymm
- write /sys/devices/system/cpu/cpu6/mte_tcf_preferred asymm
- write /sys/devices/system/cpu/cpu7/mte_tcf_preferred asymm
- write /sys/devices/system/cpu/cpu8/mte_tcf_preferred asymm
diff --git a/conf/init.zumapro.board.rc b/conf/init.zumapro.board.rc
index cd8f5eb..5887039 100644
--- a/conf/init.zumapro.board.rc
+++ b/conf/init.zumapro.board.rc
@@ -18,11 +18,7 @@ on init
write /proc/vendor_sched/teo_util_threshold "2 1024 1024"
# Boot time fs tuning
- write /sys/block/sda/queue/iostats 0
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/cam/set_task_group
@@ -82,15 +78,6 @@ on init
chmod 0660 /proc/vendor_sched/pmu_poll_enable
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
# ZRAM setup
@@ -212,6 +199,9 @@ on late-fs
on post-fs-data
# Modem temperature driver
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
mkdir /data/vendor 0771 radio system
@@ -328,19 +318,11 @@ on early-boot
# Wait for insmod_sh to finish all common modules
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
chown system system /dev/logbuffer_pcie0
chown system system /dev/logbuffer_pcie1
chown system system /dev/logbuffer_bd
+ chown system system /dev/logbuffer_cpif
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_diff
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
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
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
swapon_all /vendor/etc/fstab.${ro.board.platform}
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_background_ratio 10
- # Enable UFS powersaving
- write /dev/sys/block/bootdevice/clkgate_enable 1
-
# Cancel boot devfreq
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
user system
group system
+ task_profiles MaxPerformance
# Write build info to kdebuginfo
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/spmic/stats_reset
-on property:vendor.thermal.link_ready=1
+on property:vendor.all.modules.ready=1
# BCL
write /sys/devices/platform/cpupm/cpupm/cpd_cl1 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/platform/cpupm/cpupm/cpd_cl1 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/vdroop2/trip_point_0_temp
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/hbm_mode
-# UFS
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
write /sys/devices/platform/google,charger/dd_state -1
diff --git a/conf/init.zumapro.soc.rc b/conf/init.zumapro.soc.rc
index 5f6db7b..52205a8 100644
--- a/conf/init.zumapro.soc.rc
+++ b/conf/init.zumapro.soc.rc
@@ -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/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_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
@@ -81,8 +80,6 @@ on init
chmod 0664 /dev/cpuset/camera-daemon-mid-high-group/tasks
# 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_cpu1_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_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_cpu0_memlat@17000010/mem_latency/ratio_ceil 1800
- 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_cpu2_memlat@17000010/mem_latency/ratio_ceil 1800
- 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_cpu4_memlat@17000010/mem_latency/ratio_ceil 3700
- 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_cpu6_memlat@17000010/mem_latency/ratio_ceil 3700
- 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_cpu0_memlat@17000010/mem_latency/ratio_ceil 3800
+ 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 3800
+ 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 3500
+ 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 3500
+ 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_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
@@ -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_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_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
# For PixelLogger configuration file.
diff --git a/conf/init.zumapro.usb.rc b/conf/init.zumapro.usb.rc
index 6e2193d..8f33d1e 100644
--- a/conf/init.zumapro.usb.rc
+++ b/conf/init.zumapro.usb.rc
@@ -71,6 +71,107 @@ on early-boot
# acm function for uwb
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 system system /config/usb_gadget/
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
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
write /sys/module/exynos_drm/parameters/dp_enabled 1
write /sys/class/typec/port0/port0.0/mode1/active "yes"
diff --git a/conf/ueventd.zumapro.rc b/conf/ueventd.zumapro.rc
index 0a3c3e1..ca08579 100644
--- a/conf/ueventd.zumapro.rc
+++ b/conf/ueventd.zumapro.rc
@@ -76,7 +76,7 @@
# jpeg
/dev/m2m1shot_jpeg 0660 media media
-/dev/video12 0660 system system
+/dev/video12 0666 system system
# audio
/dev/seiren 0660 system audio
@@ -94,8 +94,10 @@
/dev/acd-debug 0660 system audio
/dev/acd-audio_tap* 0660 system audio
/dev/acd-audio_dcdoff_ref 0660 system audio
+/dev/acd-mel_processor 0660 system audio
/dev/amcs 0660 system audio
/dev/acd-audio_rtp_* 0660 system radio
+/dev/acd-mc_headpos 0660 system audio
# Secure MEM driver
/dev/s5p-smem 0660 drm drmrpc
diff --git a/default-permissions.xml b/default-permissions.xml
index d0d7e5f..384d66b 100644
--- a/default-permissions.xml
+++ b/default-permissions.xml
@@ -47,11 +47,15 @@
+
+
+
+
@@ -139,5 +143,10 @@
+
+
+
+
diff --git a/device-common.mk b/device-common.mk
index 205689f..b419ba2 100644
--- a/device-common.mk
+++ b/device-common.mk
@@ -27,7 +27,7 @@ PRODUCT_COPY_FILES += \
# Set system properties identifying the chipset
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 += \
persist.vendor.testing_battery_profile=2
@@ -44,6 +44,10 @@ PRODUCT_PRODUCT_PROPERTIES += \
PRODUCT_PRODUCT_PROPERTIES += \
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
# (MISC_MEMTAG_MODE_MEMTAG_ONCE), with the exception of _fullmte products that
# force enable MTE.
diff --git a/device.mk b/device.mk
index c834ceb..90d0470 100644
--- a/device.mk
+++ b/device.mk
@@ -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/bcmbt/dump/dumplog.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/camera/dump.mk
include device/google/gs-common/radio/dump.mk
@@ -76,7 +77,7 @@ PRODUCT_SOONG_NAMESPACES += \
hardware/google/pixel \
device/google/zumapro \
device/google/zumapro/powerstats \
- system/chre/host/hal_generic \
+ vendor/google_devices/common/chre/host/hal \
vendor/google/whitechapel/tools \
vendor/google/interfaces \
vendor/google_devices/common/proprietary/confirmatioui_hal \
@@ -199,7 +200,7 @@ PRODUCT_PRODUCT_PROPERTIES += \
# Carrier configuration default location
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 += \
telephony.active_modems.max_count=2
@@ -209,7 +210,7 @@ PRODUCT_PROPERTY_OVERRIDES += \
persist.vendor.usb.displayport.enabled=1
else
PRODUCT_PROPERTY_OVERRIDES += \
- persist.vendor.usb.displayport.enabled=0
+ persist.vendor.usb.displayport.enabled=1
endif
USE_LASSEN_OEMHOOK := true
@@ -268,14 +269,10 @@ PRODUCT_PACKAGES += \
PRODUCT_VENDOR_PROPERTIES += \
ro.hardware.egl=angle \
ro.hardware.vulkan=pastel
-PRODUCT_VENDOR_PROPERTIES += \
- debug.renderengine.backend=skiaglthreaded
else
PRODUCT_VENDOR_PROPERTIES += \
ro.hardware.egl=mali \
ro.hardware.vulkan=mali
-PRODUCT_VENDOR_PROPERTIES += \
- debug.renderengine.backend=skiaglthreaded
endif
# 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.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.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.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.modem:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.modem
+# Shell scripts
+PRODUCT_PACKAGES += \
+ disable_contaminant_detection.sh
+
include device/google/gs-common/insmod/insmod.mk
# Insmod config files
@@ -396,24 +398,29 @@ PRODUCT_HOST_PACKAGES += \
PRODUCT_PACKAGES += \
messaging
-# Contexthub HAL
-PRODUCT_PACKAGES += \
- android.hardware.contexthub-service.generic
-
-# CHRE tools
+# CHRE
+## tools
ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
PRODUCT_PACKAGES += \
chre_power_test_client \
- chre_test_client
+ chre_test_client \
+ chre_aidl_hal_client
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 += \
frameworks/native/data/etc/android.hardware.context_hub.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.context_hub.xml
## Enable the CHRE Daemon
-CHRE_USF_DAEMON_ENABLED := true
+CHRE_USF_DAEMON_ENABLED := false
PRODUCT_PACKAGES += \
- chre \
preloaded_nanoapps.json
# Filesystem management tools
@@ -490,6 +497,12 @@ PRODUCT_PACKAGES += \
PRODUCT_PACKAGES += \
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
PRODUCT_COPY_FILES += \
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 += \
android.hardware.graphics.mapper@4.0-impl \
- android.hardware.graphics.allocator-V2-service
+ android.hardware.graphics.allocator-V1-service
PRODUCT_PACKAGES += \
- memtrack.$(TARGET_BOARD_PLATFORM) \
+ android.hardware.memtrack-service.pixel \
libion_exynos \
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.frame_rate_multiple_threshold=120
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.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.1.brightness.dimming.usage?=2
-# force to blend in P3 mode
PRODUCT_PROPERTY_OVERRIDES += \
- persist.sys.sf.native_mode=2 \
- persist.sys.sf.color_mode=9
+ persist.sys.sf.native_mode=2
PRODUCT_COPY_FILES += \
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)
# Trusty unit test tool
- PRODUCT_PACKAGES_DEBUG += \
+PRODUCT_PACKAGES_DEBUG += \
trusty-ut-ctrl \
tipc-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
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)
PRODUCT_PACKAGES += \
android.hardware.composer.hwc3-service.pixel \
- libdisplaycolor
+ libdisplaycolor \
+ libdisplaypanel
# Storage: for factory reset protection feature
PRODUCT_PROPERTY_OVERRIDES += \
@@ -914,21 +929,6 @@ PRODUCT_PACKAGES += ShannonIms
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
# Multi SIM(DSDS)
SIM_COUNT := 2
@@ -982,12 +982,21 @@ endif
# modem logging binary/configs
PRODUCT_PACKAGES += modem_logging_control
+# libeomservice_proxy binary/configs
+PRODUCT_PACKAGES += liboemservice_proxy_default
+
# modem logging configs
PRODUCT_COPY_FILES += \
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.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
+# 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
# Vibrator Diag
@@ -1003,7 +1012,7 @@ PRODUCT_PACKAGES += \
# Audio
# 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
else
include device/google/gs-common/audio/hidl_zuma.mk
@@ -1013,7 +1022,7 @@ endif
PRODUCT_SOONG_NAMESPACES += \
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))
#
@@ -1042,7 +1051,8 @@ PRODUCT_PACKAGES += \
aoc_tuning_inft \
mahal_test \
ma_aoc_tuning_test \
- crus_sp_cal
+ crus_sp_cal \
+ pixel_ti_cal
endif
PRODUCT_PACKAGES += \
@@ -1064,6 +1074,14 @@ PRODUCT_PROPERTY_OVERRIDES += persist.vendor.enable.thermal.genl=true
include device/google/gs-common/edgetpu/edgetpu.mk
# Config variables for TPU chip on device.
$(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
PRODUCT_PACKAGES += edgetpu-rio.fw
@@ -1117,7 +1135,7 @@ endif
include hardware/google/pixel/sscoredump/device.mk
# RadioExt Version
-USES_RADIOEXT_V1_6 = true
+USES_RADIOEXT_V1_7 = true
# Wifi ext
include hardware/google/pixel/wifi_ext/device.mk
@@ -1157,9 +1175,19 @@ endif
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
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_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
diff --git a/device_framework_matrix_product.xml b/device_framework_matrix_product.xml
index 4e09b52..eb39013 100644
--- a/device_framework_matrix_product.xml
+++ b/device_framework_matrix_product.xml
@@ -120,20 +120,6 @@
default
-
- com.google.input.algos.spd
-
- IScreenProtectorDetectorService
- default
-
-
-
- com.google.input
-
- ITouchContextService
- default
-
-
hardware.qorvo.uwb
@@ -159,7 +145,7 @@
vendor.google.radioext
- 1.6
+ 1.7
IRadioExt
default
@@ -185,6 +171,7 @@
com.google.pixel.modem.logmasklibrary
+ 1
ILiboemserviceProxy
default
diff --git a/disable_contaminant_detection.sh b/disable_contaminant_detection.sh
new file mode 100644
index 0000000..fde6eb4
--- /dev/null
+++ b/disable_contaminant_detection.sh
@@ -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
diff --git a/dumpstate/dump_power.cpp b/dumpstate/dump_power.cpp
index 524ec6a..b44aa16 100644
--- a/dumpstate/dump_power.cpp
+++ b/dumpstate/dump_power.cpp
@@ -164,7 +164,7 @@ void dumpPowerSupplyStats() {
{"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 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 wireless", "/sys/class/power_supply/wireless/uevent"},
};
@@ -319,6 +319,7 @@ void dumpPdEngine() {
void dumpBatteryHealth() {
const char* batteryHealth [][2] {
{"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"},
{"TTF logbuffer", "/dev/logbuffer_ttf"},
{"TTF details", "/sys/class/power_supply/battery/ttf_details"},
@@ -374,7 +375,7 @@ void dumpBatteryDefend() {
for (auto &file : files) {
fileLocation = std::string(config[1]) + std::string(file);
- if (!android::base::ReadFileToString(fileLocation, &content)) {
+ if (!android::base::ReadFileToString(fileLocation, &content) || content.empty()) {
content = "\n";
}
@@ -420,24 +421,61 @@ void printValuesOfDirectory(const char *directory, std::string debugfs, const ch
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() {
- 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 char *maxFgDir = "/d/maxfg";
const char *maxFgStrMatch = "maxfg";
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 *chgTblDir = "/d/google_battery/chg_raw_profile";
@@ -460,20 +498,6 @@ void dumpChgUserDebug() {
if (isUserBuild())
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);
if (isValidDir(maxFgDir)) {
@@ -603,6 +627,7 @@ void dumpGvoteables() {
void dumpMitigation() {
const char *mitigationList [][2] {
+ {"LastmealCSV" , "/data/vendor/mitigation/lastmeal.csv"},
{"Lastmeal" , "/data/vendor/mitigation/lastmeal.txt"},
{"Thismeal" , "/data/vendor/mitigation/thismeal.txt"},
};
@@ -965,6 +990,7 @@ int main() {
dumpPdEngine();
dumpBatteryHealth();
dumpBatteryDefend();
+ dumpChg();
dumpChgUserDebug();
dumpBatteryEeprom();
dumpChargerStats();
diff --git a/dumpstate/dump_power.rc b/dumpstate/dump_power.rc
index 9bac9fa..125ee4f 100644
--- a/dumpstate/dump_power.rc
+++ b/dumpstate/dump_power.rc
@@ -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_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/swelling_data
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_voltage
diff --git a/manifest.xml b/manifest.xml
index e5c9f76..69a1bcd 100644
--- a/manifest.xml
+++ b/manifest.xml
@@ -12,18 +12,4 @@
android.hardware.boot
IBootControl/default
-
- com.google.input.algos.spd
-
- IScreenProtectorDetectorService
- default
-
-
-
- com.google.input
-
- ITouchContextService
- default
-
-
diff --git a/media_codecs_performance_c2.xml b/media_codecs_performance_c2.xml
index d6768fe..118db0f 100644
--- a/media_codecs_performance_c2.xml
+++ b/media_codecs_performance_c2.xml
@@ -124,8 +124,7 @@
-
-
+
@@ -173,61 +172,63 @@
-
-
-
-
+
+
+
+
-
+
-
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -241,8 +242,8 @@
-
-
+
+
@@ -259,34 +260,34 @@
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
-
-
+
+
+
+
-
+
diff --git a/modem_ml/modem_ml_models_user.conf b/modem_ml/modem_ml_models_user.conf
index 88ab2bc..e442ecf 100644
--- a/modem_ml/modem_ml_models_user.conf
+++ b/modem_ml/modem_ml_models_user.conf
@@ -1,3 +1,4 @@
#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_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
diff --git a/modem_ml/modem_ml_models_userdebug.conf b/modem_ml/modem_ml_models_userdebug.conf
index 640bfeb..6582f88 100644
--- a/modem_ml/modem_ml_models_userdebug.conf
+++ b/modem_ml/modem_ml_models_userdebug.conf
@@ -1,3 +1,4 @@
#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_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
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
index 0596bdb..ffbbf72 100644
--- a/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -299,6 +299,7 @@
- com.zhiliaoapp.musically:0.07
- com.bilibili.app.in:0.07
- com.twitter.android:0.07
+ - com.google.android.youtube:0.07
@@ -322,4 +323,131 @@
true
+
+
+
+ - 1
+ - 2
+ - 3
+ - 4
+ - 8
+ - 12
+ - 15
+ - 20
+ - 33
+ - 55
+ - 90
+ - 148
+ - 245
+ - 403
+ - 665
+ - 1097
+ - 1808
+ - 3000
+ - 6000
+ - 9000
+ - 10000
+ - 14000
+ - 20000
+ - 25000
+ - 31000
+ - 41000
+ - 51000
+ - 61000
+ - 71000
+ - 81000
+ - 91000
+ - 100000
+
+
+
+
+ - 5.139055
+ - 9.962018965
+ - 18.34822964
+ - 21.55068128
+ - 24.0167788
+ - 32.5
+ - 46
+ - 53.26923077
+ - 54.61538462
+ - 58.11538462
+ - 62.1394
+ - 67.13133333
+ - 79.67614115
+ - 98.04727274
+ - 125.1221991
+ - 161.6875093
+ - 208.4885553
+ - 264.8221315
+ - 328.5869521
+ - 627.4315413
+ - 826.8584866
+ - 867.85582302
+ - 1041.39662279
+ - 1227.52633489
+ - 1331.28933608
+ - 1428.421149
+ - 1575.787970
+ - 1703.973078
+ - 1811.651453
+ - 1897.082235
+ - 1958.157391
+ - 1992.433376
+ - 2050
+
+
+
+ 90198
+
+
+ Skylo
+
+
+ com.google.android.apps.stargate
+
+
+
+ - US
+
+
+
+ /vendor/etc/telephony/sats2.dat
+
+
+ 900000
+
+
+ 900000
diff --git a/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml b/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
new file mode 100644
index 0000000..e0c00ab
--- /dev/null
+++ b/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
@@ -0,0 +1,23 @@
+
+
+
+
+ bluetooth,wifi
+
+
diff --git a/pixelstats/pixelstats-vendor.zumapro.rc b/pixelstats/pixelstats-vendor.zumapro.rc
index d324b6a..5993978 100644
--- a/pixelstats/pixelstats-vendor.zumapro.rc
+++ b/pixelstats/pixelstats-vendor.zumapro.rc
@@ -1,6 +1,10 @@
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
-
+on post-fs-data
+ chown system system /sys/kernel/metrics/irq/stats_reset
service vendor.pixelstats_vendor /vendor/bin/pixelstats-vendor
class hal
user system
diff --git a/pixelstats/service.cpp b/pixelstats/service.cpp
index e7148d5..690ac75 100644
--- a/pixelstats/service.cpp
+++ b/pixelstats/service.cpp
@@ -62,6 +62,8 @@ const struct SysfsCollector::SysfsPaths sysfs_paths = {
.AmsRatePath = "/sys/devices/platform/audiometrics/ams_rate_read_once",
.ResumeLatencyMetricsPath = "/sys/kernel/metrics/resume_latency/resume_latency_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 = {
{
"/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",
.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 = {
.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() {
LOG(INFO) << "starting PixelStats";
diff --git a/powerstats/ZumaProCommonDataProviders.cpp b/powerstats/ZumaProCommonDataProviders.cpp
index 46de9e3..31c3b37 100644
--- a/powerstats/ZumaProCommonDataProviders.cpp
+++ b/powerstats/ZumaProCommonDataProviders.cpp
@@ -19,6 +19,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -39,6 +40,7 @@ using aidl::android::hardware::power::stats::AdaptiveDvfsStateResidencyDataProvi
using aidl::android::hardware::power::stats::AocStateResidencyDataProvider;
using aidl::android::hardware::power::stats::CpupmStateResidencyDataProvider;
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::UfsStateResidencyDataProvider;
using aidl::android::hardware::power::stats::EnergyConsumerType;
@@ -325,8 +327,7 @@ void addCPUclusters(std::shared_ptr p) {
std::make_pair("CPU4", "cpu4"),
std::make_pair("CPU5", "cpu5"),
std::make_pair("CPU6", "cpu6"),
- std::make_pair("CPU7", "cpu7"),
- std::make_pair("CPU8", "cpu8")},
+ std::make_pair("CPU7", "cpu7")},
.states = {
std::make_pair("DOWN", "[state1]")}};
@@ -426,9 +427,12 @@ void addGNSS(std::shared_ptr p)
.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> gnssStateHeaders = {
std::make_pair("ON", "GPS_ON:"),
- std::make_pair("OFF", "GPS_OFF:"),
};
std::vector cfgs;
@@ -436,10 +440,7 @@ void addGNSS(std::shared_ptr p)
"GPS", "");
p->addStateResidencyDataProvider(std::make_unique(
- "/dev/bbd_pwrstat", cfgs));
-
- p->addEnergyConsumer(PowerStatsEnergyConsumer::createMeterConsumer(p,
- EnergyConsumerType::GNSS, "GPS", {"L9S_GNSS_CORE"}));
+ "/data/vendor/gps/power_stats", cfgs));
}
void addPCIe(std::shared_ptr p) {
@@ -646,6 +647,15 @@ void addPixelStateResidencyDataProvider(std::shared_ptr p) {
p->addStateResidencyDataProvider(std::move(pixelSdp));
}
+void addDisplayMrrByEntity(std::shared_ptr p, std::string name, std::string path) {
+ p->addStateResidencyDataProvider(std::make_unique(
+ name, path));
+}
+
+void addDisplayMrr(std::shared_ptr p) {
+ addDisplayMrrByEntity(p, "Display", "/sys/class/drm/card0/device/primary-panel/");
+}
+
void addZumaProCommonDataProviders(std::shared_ptr p) {
setEnergyMeter(p);
diff --git a/powerstats/include/ZumaProCommonDataProviders.h b/powerstats/include/ZumaProCommonDataProviders.h
index 5c8d8c7..6e94533 100644
--- a/powerstats/include/ZumaProCommonDataProviders.h
+++ b/powerstats/include/ZumaProCommonDataProviders.h
@@ -23,6 +23,8 @@ using aidl::android::hardware::power::stats::PowerStats;
void addAoC(std::shared_ptr p);
void addCPUclusters(std::shared_ptr p);
void addDevfreq(std::shared_ptr p);
+void addDisplayMrr(std::shared_ptr p);
+void addDisplayMrrByEntity(std::shared_ptr p, std::string name, std::string path);
void addDvfsStats(std::shared_ptr p);
void addGNSS(std::shared_ptr p);
void addGPU(std::shared_ptr p);
diff --git a/radio/config/extensive_logging/Android.bp b/radio/config/extensive_logging/Android.bp
new file mode 100644
index 0000000..b8d7086
--- /dev/null
+++ b/radio/config/extensive_logging/Android.bp
@@ -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"
+}
diff --git a/radio/config/extensive_logging/extensive_logging.conf b/radio/config/extensive_logging/extensive_logging.conf
new file mode 100644
index 0000000..22149dc
--- /dev/null
+++ b/radio/config/extensive_logging/extensive_logging.conf
@@ -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
diff --git a/radio/config/logging.conf b/radio/config/logging.conf
index d57c82a..e852dd5 100644
--- a/radio/config/logging.conf
+++ b/radio/config/logging.conf
@@ -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
\ No newline at end of file
+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
\ No newline at end of file
diff --git a/telephony/sats2.dat b/telephony/sats2.dat
new file mode 100644
index 0000000..0e8ecec
Binary files /dev/null and b/telephony/sats2.dat differ
diff --git a/usb/gadget/UsbGadget.cpp b/usb/gadget/UsbGadget.cpp
index d3b1331..5dbf304 100644
--- a/usb/gadget/UsbGadget.cpp
+++ b/usb/gadget/UsbGadget.cpp
@@ -17,7 +17,6 @@
#define LOG_TAG "android.hardware.usb.gadget.aidl-service"
#include "UsbGadget.h"
-#include
#include
#include
#include
@@ -26,21 +25,33 @@
#include
#include
+#include
+
#include
+#include
namespace aidl {
namespace android {
namespace hardware {
namespace usb {
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;
-constexpr char kHsi2cPath[] = "/sys/devices/platform/108d0000.hsi2c";
-constexpr char kI2CPath[] = "/sys/devices/platform/108d0000.hsi2c/i2c-";
-constexpr char kAccessoryLimitCurrent[] = "-0025/usb_limit_accessory_current";
-constexpr char kAccessoryLimitCurrentEnable[] = "-0025/usb_limit_accessory_enable";
+constexpr char* kHsi2cPaths[] = { (char *) "/sys/devices/platform/108d0000.hsi2c",
+ (char *) "/sys/devices/platform/10cb0000.hsi2c" };
+constexpr char kTcpcDevName[] = "i2c-max77759tcpc";
+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) {
ALOGE("configfs setup not done yet");
abort();
@@ -302,6 +313,28 @@ static Status validateAndSetVidPid(uint64_t functions) {
ret = Status(setVidPid("0x18d1", "0x4eec"));
}
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:
ALOGE("Combination not supported");
ret = Status::CONFIGURATION_NOT_SUPPORTED;
@@ -418,29 +451,6 @@ Status UsbGadget::setupFunctions(long functions,
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,
const shared_ptr &callback,
int64_t timeout,
@@ -448,15 +458,23 @@ ScopedAStatus UsbGadget::setCurrentUsbFunctions(long functions,
std::unique_lock lk(mLockSetCurrentFunction);
std::string current_usb_power_operation_mode, current_usb_type;
std::string usb_limit_sink_enable;
-
- string accessoryCurrentLimitEnablePath, accessoryCurrentLimitPath, path;
+ std::string accessoryCurrentLimitEnablePath, accessoryCurrentLimitPath;
mCurrentUsbFunctions = functions;
mCurrentUsbFunctionsApplied = false;
- getI2cBusHelper(&path);
- accessoryCurrentLimitPath = kI2CPath + path + "/" + path + kAccessoryLimitCurrent;
- accessoryCurrentLimitEnablePath = kI2CPath + path + "/" + path + kAccessoryLimitCurrentEnable;
+ if (mI2cClientPath.empty()) {
+ for (int i = 0; i < NUM_HSI2C_PATHS; i++) {
+ 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()
if (mGadgetIrqPath.empty())
diff --git a/usb/gadget/UsbGadget.h b/usb/gadget/UsbGadget.h
index 4079b01..eac32a4 100644
--- a/usb/gadget/UsbGadget.h
+++ b/usb/gadget/UsbGadget.h
@@ -115,6 +115,8 @@ struct UsbGadget : public BnUsbGadget {
ScopedAStatus setVidPid(const char *vid,const char *pid);
+ std::string mI2cClientPath;
+
private:
Status tearDownGadget();
Status getUsbGadgetIrqPath();
diff --git a/usb/usb/Android.bp b/usb/usb/Android.bp
index 399b810..3be3369 100644
--- a/usb/usb/Android.bp
+++ b/usb/usb/Android.bp
@@ -28,7 +28,6 @@ package {
cc_binary {
name: "android.hardware.usb-service",
relative_install_path: "hw",
- init_rc: ["android.hardware.usb-service.rc"],
vintf_fragments: ["android.hardware.usb-service.xml"],
vendor: true,
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 {
name: "android.hardware.usb.flags-aconfig-c-lib",
vendor: true,
diff --git a/usb/usb/Usb.cpp b/usb/usb/Usb.cpp
index e5c1c06..74686e5 100644
--- a/usb/usb/Usb.cpp
+++ b/usb/usb/Usb.cpp
@@ -42,8 +42,9 @@
#include
#include
-#include
#include
+#include
+#include
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::PixelAtoms::VendorUsbPortOverheat;
using android::hardware::google::pixel::reportUsbPortOverheat;
+using android::hardware::google::pixel::usb::getI2cClientPath;
namespace aidl {
namespace android {
namespace hardware {
namespace usb {
+#define NUM_HSI2C_PATHS 2
+
// Set by the signal handler to destroy the thread
volatile bool destroyThread;
volatile bool destroyDisplayPortThread;
string enabledPath;
-constexpr char kHsi2cPath[] = "/sys/devices/platform/108d0000.hsi2c";
-constexpr char kI2CPath[] = "/sys/devices/platform/108d0000.hsi2c/i2c-";
-constexpr char kContaminantDetectionPath[] = "-0025/contaminant_detection";
+constexpr char *kHsi2cPaths[] = { (char *) "/sys/devices/platform/108d0000.hsi2c",
+ (char *) "/sys/devices/platform/10cb0000.hsi2c" };
+constexpr char kTcpcDevName[] = "i2c-max77759tcpc";
+constexpr char kI2cClientId[] = "0025";
constexpr char kDisplayPortDrmPath[] = "/sys/devices/platform/110f0000.drmdp/drm-displayport/";
constexpr char kDisplayPortUsbPath[] = "/sys/class/typec/port0-partner/";
constexpr char kComplianceWarningsPath[] = "device/non_compliant_reasons";
@@ -77,10 +82,11 @@ constexpr char kComplianceWarningDebugAccessory[] = "debug-accessory";
constexpr char kComplianceWarningMissingRp[] = "missing_rp";
constexpr char kComplianceWarningOther[] = "other";
constexpr char kComplianceWarningInputPowerLimited[] = "input_power_limited";
-constexpr char kStatusPath[] = "-0025/contaminant_detection_status";
-constexpr char kSinkLimitEnable[] = "-0025/usb_limit_sink_enable";
-constexpr char kSourceLimitEnable[] = "-0025/usb_limit_source_enable";
-constexpr char kSinkLimitCurrent[] = "-0025/usb_limit_sink_current";
+constexpr char kContaminantDetectionPath[] = "contaminant_detection";
+constexpr char kStatusPath[] = "contaminant_detection_status";
+constexpr char kSinkLimitEnable[] = "usb_limit_sink_enable";
+constexpr char kSourceLimitEnable[] = "usb_limit_source_enable";
+constexpr char kSinkLimitCurrent[] = "usb_limit_sink_current";
constexpr char kTypecPath[] = "/sys/class/typec";
constexpr char kDisableContatminantDetection[] = "vendor.usb.contaminantdisable";
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 kPogoEnableUsb[] = "/sys/devices/platform/google,pogo/enable_usb";
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[] =
"/devices/platform/11210000.usb/11210000.dwc3/udc/11210000.dwc3";
constexpr char kUdcStatePath[] =
@@ -272,31 +278,9 @@ ScopedAStatus Usb::resetUsbPort(const std::string& in_portName, int64_t in_trans
return ::ndk::ScopedAStatus::ok();
}
-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;
-}
-
-Status queryMoistureDetectionStatus(std::vector *currentPortStatus) {
- string enabled, status, path, DetectedPath;
+Status queryMoistureDetectionStatus(android::hardware::usb::Usb *usb,
+ std::vector *currentPortStatus) {
+ string enabled, status, DetectedPath;
(*currentPortStatus)[0].supportedContaminantProtectionModes
.push_back(ContaminantProtectionMode::FORCE_DISABLE);
@@ -305,8 +289,18 @@ Status queryMoistureDetectionStatus(std::vector *currentPortStatus)
(*currentPortStatus)[0].supportsEnableContaminantPresenceDetection = true;
(*currentPortStatus)[0].supportsEnableContaminantPresenceProtection = false;
- getI2cBusHelper(&path);
- enabledPath = kI2CPath + path + "/" + path + kContaminantDetectionPath;
+ if (usb->mI2cClientPath.empty()) {
+ 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)) {
ALOGE("Failed to open moisture_detection_enabled");
return Status::ERROR;
@@ -314,7 +308,7 @@ Status queryMoistureDetectionStatus(std::vector *currentPortStatus)
enabled = Trim(enabled);
if (enabled == "1") {
- DetectedPath = kI2CPath + path + "/" + path + kStatusPath;
+ DetectedPath = usb->mI2cClientPath + kStatusPath;
if (!ReadFileToString(DetectedPath, &status)) {
ALOGE("Failed to open moisture_detected");
return Status::ERROR;
@@ -533,6 +527,7 @@ Usb::Usb()
ZoneInfo(TemperatureType::UNKNOWN, kThermalZoneForTempReadSecondary2,
ThrottlingSeverity::NONE)}, kSamplingIntervalSec),
mUsbDataEnabled(true),
+ mI2cClientPath(""),
mDisplayPortPollRunning(false),
mDisplayPortPollStarting(false),
mDisplayPortCVLock(PTHREAD_MUTEX_INITIALIZER),
@@ -573,6 +568,11 @@ Usb::Usb()
ALOGE("mDisplayPortActivateTimer timerfd failed: %s", strerror(errno));
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,
@@ -634,12 +634,22 @@ ScopedAStatus Usb::limitPowerTransfer(const string& in_portName, bool in_limit,
int64_t in_transactionId) {
bool sessionFail = false, success;
std::vector currentPortStatus;
- string path, sinkLimitEnablePath, currentLimitPath, sourceLimitEnablePath;
+ string sinkLimitEnablePath, currentLimitPath, sourceLimitEnablePath;
- getI2cBusHelper(&path);
- sinkLimitEnablePath = kI2CPath + path + "/" + path + kSinkLimitEnable;
- currentLimitPath = kI2CPath + path + "/" + path + kSinkLimitCurrent;
- sourceLimitEnablePath = kI2CPath + path + "/" + path + kSourceLimitEnable;
+ if (mI2cClientPath.empty()) {
+ for (int i = 0; i < NUM_HSI2C_PATHS; i++) {
+ mI2cClientPath = getI2cClientPath(kHsi2cPaths[i], kTcpcDevName, kI2cClientId);
+ 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);
if (in_limit) {
@@ -679,11 +689,22 @@ ScopedAStatus Usb::limitPowerTransfer(const string& in_portName, bool in_limit,
return ScopedAStatus::ok();
}
-Status queryPowerTransferStatus(std::vector *currentPortStatus) {
- string limitedPath, enabled, path;
+Status queryPowerTransferStatus(android::hardware::usb::Usb *usb,
+ std::vector *currentPortStatus) {
+ string limitedPath, enabled;
- getI2cBusHelper(&path);
- limitedPath = kI2CPath + path + "/" + path + kSinkLimitEnable;
+ if (usb->mI2cClientPath.empty()) {
+ 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)) {
ALOGE("Failed to open limit_sink_enable");
return Status::ERROR;
@@ -1080,8 +1101,8 @@ void queryVersionHelper(android::hardware::usb::Usb *usb,
pthread_mutex_lock(&usb->mLock);
status = getPortStatusHelper(usb, currentPortStatus);
- queryMoistureDetectionStatus(currentPortStatus);
- queryPowerTransferStatus(currentPortStatus);
+ queryMoistureDetectionStatus(usb, currentPortStatus);
+ queryPowerTransferStatus(usb, currentPortStatus);
queryNonCompliantChargerStatus(currentPortStatus);
pthread_mutex_lock(&usb->mDisplayPortLock);
if (!usb->mDisplayPortFirstSetupDone &&
@@ -1217,6 +1238,16 @@ static void uevent_event(uint32_t /*epevents*/, struct data *payload) {
payload->usb->mPartnerUp = true;
pthread_cond_signal(&payload->usb->mPartnerCV);
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_")) ||
!strncmp(cp, "DRIVER=max77759tcpc",
strlen("DRIVER=max77759tcpc")) ||
@@ -1383,6 +1414,8 @@ ScopedAStatus Usb::setCallback(const shared_ptr& in_callback) {
return ScopedAStatus::ok();
}
+/***** DisplayPort Alt Mode Helpers *****/
+
Status Usb::getDisplayPortUsbPathHelper(string *path) {
DIR *dp;
Status result = Status::ERROR;
@@ -1586,8 +1619,18 @@ void *displayPortPollWork(void *param) {
partnerActivePath = displayPortUsbPath + "../mode1/active";
portActivePath = "/sys/class/typec/port0/port0.0/mode1/active";
- getI2cBusHelper(&tcpcI2cBus);
- irqHpdCountPath = kI2CPath + tcpcI2cBus + "/" + tcpcI2cBus + kIrqHpdCounPath;
+ if (usb->mI2cClientPath.empty()) {
+ 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());
epoll_fd = epoll_create(64);
@@ -1799,6 +1842,7 @@ void Usb::setupDisplayPortPoll() {
int ret;
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
diff --git a/usb/usb/Usb.h b/usb/usb/Usb.h
index 4d9ab53..4ac6a44 100644
--- a/usb/usb/Usb.h
+++ b/usb/usb/Usb.h
@@ -129,6 +129,8 @@ struct Usb : public BnUsb {
float mPluggedTemperatureCelsius;
// Usb Data status
bool mUsbDataEnabled;
+ std::string mI2cClientPath;
+
// True when mDisplayPortPoll pthread is running
volatile bool mDisplayPortPollRunning;
volatile bool mDisplayPortPollStarting;
@@ -156,6 +158,11 @@ struct Usb : public BnUsb {
* eventfd to monitor whether a connection results in DisplayPort Alt Mode activating.
*/
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:
pthread_t mPoll;
diff --git a/usb/usb/UsbDataSessionMonitor.cpp b/usb/usb/UsbDataSessionMonitor.cpp
index 77defb3..bff52f0 100644
--- a/usb/usb/UsbDataSessionMonitor.cpp
+++ b/usb/usb/UsbDataSessionMonitor.cpp
@@ -26,6 +26,7 @@
#include
#include
#include
+#include
#include
#include
@@ -48,6 +49,9 @@ namespace usb {
#define UEVENT_MSG_LEN 2048
#define USB_STATE_MAX_LEN 20
#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 kNotAttachedState[] = "not attached\n";
@@ -115,6 +119,15 @@ UsbDataSessionMonitor::UsbDataSessionMonitor(
if (addEpollFd(epollFd, ueventFd))
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) {
ALOGE("monitor data role failed");
abort();
@@ -139,6 +152,7 @@ UsbDataSessionMonitor::UsbDataSessionMonitor(
mEpollFd = std::move(epollFd);
mUeventFd = std::move(ueventFd);
+ mTimerFd = std::move(timerFd);
mUpdatePortStatusCb = updatePortStatusCb;
if (ReadFileToString(kUdcConfigfsPath, &udc) && !udc.empty())
@@ -150,6 +164,9 @@ UsbDataSessionMonitor::UsbDataSessionMonitor(
ALOGE("pthread creation failed %d", errno);
abort();
}
+
+ ALOGI("feature flag enable_report_usb_data_compliance_warning: %d",
+ usb_flags::enable_report_usb_data_compliance_warning());
}
UsbDataSessionMonitor::~UsbDataSessionMonitor() {}
@@ -223,13 +240,55 @@ void UsbDataSessionMonitor::notifyComplianceWarning() {
void UsbDataSessionMonitor::evaluateComplianceWarning() {
std::set newWarningSet;
+ int elapsedTimeSec;
- // TODO: add heuristics and update newWarningSet
- if (mDataRole == PortDataRole::DEVICE && mUdcBind) {
- } else if (mDataRole == PortDataRole::HOST) {
+ elapsedTimeSec =
+ std::chrono::duration_cast(boot_clock::now() - mDataSessionStart)
+ .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) {
+ std::string newWarningString;
+
+ for (auto e : newWarningSet) {
+ newWarningString += toString(e) + " ";
+ }
+ ALOGI("Usb data compliance warning changed to: %s", newWarningString.c_str());
+
mWarningSet = newWarningSet;
notifyComplianceWarning();
}
@@ -259,6 +318,26 @@ void UsbDataSessionMonitor::handleDeviceStateEvent(struct usbDeviceState *device
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() {
int n;
PortDataRole newDataRole;
@@ -283,17 +362,8 @@ void UsbDataSessionMonitor::handleDataRoleEvent() {
reportUsbDataSessionMetrics();
}
- // Set up for the new data session
- mWarningSet.clear();
mDataRole = newDataRole;
- mDataSessionStart = boot_clock::now();
-
- if (newDataRole == PortDataRole::DEVICE) {
- clearDeviceStateEvents(&mDeviceState);
- } else if (newDataRole == PortDataRole::HOST) {
- clearDeviceStateEvents(&mHost1State);
- clearDeviceStateEvents(&mHost2State);
- }
+ setupNewSession();
}
}
@@ -328,8 +398,7 @@ void UsbDataSessionMonitor::updateUdcBindStatus(const std::string &devname) {
} else if (!mUdcBind && newUdcBind) {
// Gadget soft pullup: reset and start accounting for a new data session.
- clearDeviceStateEvents(&mDeviceState);
- mDataSessionStart = boot_clock::now();
+ setupNewSession();
}
}
@@ -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) {
UsbDataSessionMonitor *monitor = (UsbDataSessionMonitor *)param;
struct epoll_event events[64];
@@ -400,6 +486,8 @@ void *UsbDataSessionMonitor::monitorThread(void *param) {
for (int n = 0; n < nevents; ++n) {
if (events[n].data.fd == monitor->mUeventFd.get()) {
monitor->handleUevent();
+ } else if (events[n].data.fd == monitor->mTimerFd.get()) {
+ monitor->handleTimerEvent();
} else if (events[n].data.fd == monitor->mDataRoleFd.get()) {
monitor->handleDataRoleEvent();
} else if (events[n].data.fd == monitor->mDeviceState.fd.get()) {
diff --git a/usb/usb/UsbDataSessionMonitor.h b/usb/usb/UsbDataSessionMonitor.h
index 596f378..aced8a4 100644
--- a/usb/usb/UsbDataSessionMonitor.h
+++ b/usb/usb/UsbDataSessionMonitor.h
@@ -75,9 +75,11 @@ class UsbDataSessionMonitor {
static void *monitorThread(void *param);
void handleUevent();
+ void handleTimerEvent();
void handleDataRoleEvent();
void handleDeviceStateEvent(struct usbDeviceState *deviceState);
void clearDeviceStateEvents(struct usbDeviceState *deviceState);
+ void setupNewSession();
void reportUsbDataSessionMetrics();
void evaluateComplianceWarning();
void notifyComplianceWarning();
@@ -86,6 +88,7 @@ class UsbDataSessionMonitor {
pthread_t mMonitor;
unique_fd mEpollFd;
unique_fd mUeventFd;
+ unique_fd mTimerFd;
unique_fd mDataRoleFd;
struct usbDeviceState mDeviceState;
struct usbDeviceState mHost1State;
diff --git a/usb/usb/android.hardware.usb-service-i2c11.rc b/usb/usb/android.hardware.usb-service-i2c11.rc
new file mode 100644
index 0000000..76e3e60
--- /dev/null
+++ b/usb/usb/android.hardware.usb-service-i2c11.rc
@@ -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
diff --git a/usb/usb/android.hardware.usb-service-i2c6.rc b/usb/usb/android.hardware.usb-service-i2c6.rc
new file mode 100644
index 0000000..18869e2
--- /dev/null
+++ b/usb/usb/android.hardware.usb-service-i2c6.rc
@@ -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
diff --git a/usb/usb/android.hardware.usb-service.rc b/usb/usb/android.hardware.usb-service.rc
deleted file mode 100644
index 2d8ebc3..0000000
--- a/usb/usb/android.hardware.usb-service.rc
+++ /dev/null
@@ -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
diff --git a/vendor.prop b/vendor.prop
new file mode 100644
index 0000000..2205ad2
--- /dev/null
+++ b/vendor.prop
@@ -0,0 +1 @@
+ro.soc.model=Tensor G4