From 19bfdcde75f0e55e71a0b957449edcdbc2681158 Mon Sep 17 00:00:00 2001 From: kierancyphus Date: Tue, 28 Nov 2023 14:16:34 +0800 Subject: [PATCH 01/89] logmasklibrary: update version info and freeze api The versions were originally not specified in the device manifest and compatibility matrices. This is changed here to fix the broken vts tests. Bug: 310109332 Test: atest vts_treble_vintf_vendor_test -- --abi arm64-v8a Change-Id: Ie9edde4d0b8c430f730f14cf90d39ad98cd8e5d7 --- device_framework_matrix_product.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/device_framework_matrix_product.xml b/device_framework_matrix_product.xml index 4e09b52..10416a2 100644 --- a/device_framework_matrix_product.xml +++ b/device_framework_matrix_product.xml @@ -185,6 +185,7 @@ com.google.pixel.modem.logmasklibrary + 1 ILiboemserviceProxy default From 39c864b17b6e6140b78f5eecb71f05f5421057ab Mon Sep 17 00:00:00 2001 From: RD Babiera Date: Thu, 26 Oct 2023 21:35:30 +0000 Subject: [PATCH 02/89] usb: report displayport capable port partner disconnect to drm On port-partner remove, write to drm's usbc_cable_disconnect node if setupDisplayPortPoll() had run previously in the connection, flagged by mPartnerSupportsDisplayPort. Test: manual test on device Bug: 303820069 Change-Id: I3478f2f027540972647044716a1a3e832ae1b152 Signed-off-by: RD Babiera (cherry picked from commit 3082aa7f4877e737f06f2fb170778dac56fb7d0a) --- usb/usb/Usb.cpp | 13 +++++++++++++ usb/usb/Usb.h | 5 +++++ usb/usb/android.hardware.usb-service.rc | 2 ++ 3 files changed, 20 insertions(+) diff --git a/usb/usb/Usb.cpp b/usb/usb/Usb.cpp index e5c1c06..6d44513 100644 --- a/usb/usb/Usb.cpp +++ b/usb/usb/Usb.cpp @@ -1217,6 +1217,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 +1393,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; @@ -1799,6 +1811,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..6006451 100644 --- a/usb/usb/Usb.h +++ b/usb/usb/Usb.h @@ -156,6 +156,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/android.hardware.usb-service.rc b/usb/usb/android.hardware.usb-service.rc index 2d8ebc3..b99b6c2 100644 --- a/usb/usb/android.hardware.usb-service.rc +++ b/usb/usb/android.hardware.usb-service.rc @@ -74,6 +74,7 @@ on post-fs 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 @@ -150,4 +151,5 @@ on post-fs 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 From 64ac4b2c8687838fe9ed2695a1617dcdcc272aaf Mon Sep 17 00:00:00 2001 From: Zheng Pan Date: Thu, 14 Dec 2023 12:05:49 -0800 Subject: [PATCH 03/89] Remove unused init.zuma.rc init.zuma.soc.rc is added Bug: 311016628 Test: Flash and boot on KM4 Change-Id: I3b5e3e3a879c8745f7eb5e60ce4aa4f9cea77de3 --- conf/init.zuma.rc | 1102 --------------------------------------------- 1 file changed, 1102 deletions(-) delete mode 100644 conf/init.zuma.rc 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 From 37ab4eee9e23ec5c0027444574e64dacb5252e96 Mon Sep 17 00:00:00 2001 From: Darren Hsu Date: Fri, 15 Dec 2023 10:35:04 +0800 Subject: [PATCH 04/89] powerstats: update CPU core configurations Bug: 316437592 Test: vts-tradefed run vts -m VtsHalPowerStatsTargetTest Change-Id: Ia49f8aec7c6ec208583414a80d4e852081435c0a Signed-off-by: Darren Hsu --- powerstats/ZumaProCommonDataProviders.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/powerstats/ZumaProCommonDataProviders.cpp b/powerstats/ZumaProCommonDataProviders.cpp index 46de9e3..249a7ab 100644 --- a/powerstats/ZumaProCommonDataProviders.cpp +++ b/powerstats/ZumaProCommonDataProviders.cpp @@ -325,8 +325,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]")}}; From e4ceff9023e5969824f0c337b32bc3d54d9670f9 Mon Sep 17 00:00:00 2001 From: samou Date: Fri, 15 Dec 2023 14:39:17 +0000 Subject: [PATCH 05/89] bcl: add lastmeal.csv into dumpstate Test: ./dump_power Bug: 293899466 Change-Id: I0ff03baf459fe4a2ae57a2837f4181b04d764e7b Signed-off-by: samou --- dumpstate/dump_power.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/dumpstate/dump_power.cpp b/dumpstate/dump_power.cpp index 524ec6a..ff6aa1e 100644 --- a/dumpstate/dump_power.cpp +++ b/dumpstate/dump_power.cpp @@ -603,6 +603,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"}, }; From bcd94dd67caaf8434ce4b17c9bd75be7badd450c Mon Sep 17 00:00:00 2001 From: Mike McTernan Date: Mon, 18 Dec 2023 14:33:56 +0000 Subject: [PATCH 06/89] APC/TUI: remove confirmationui HAL and support packages Test: lunch aosp_ak*-trunk_staging-eng && m Bug: 316160738 Change-Id: Ib940112ef5fc270c1220a33c1a7f95df2f2225bc --- device.mk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/device.mk b/device.mk index c834ceb..d4b3d5f 100644 --- a/device.mk +++ b/device.mk @@ -823,12 +823,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 += \ From dc84962c846c132de6a39e2c4d98a722bb5c7469 Mon Sep 17 00:00:00 2001 From: Wilson Sung Date: Tue, 19 Dec 2023 03:09:44 +0000 Subject: [PATCH 07/89] Remove unknown sepolicy source Bug: 312322769 Test: make sepolicy Change-Id: I357d014aaca9748f1e104ebffd05ced036bd108f --- BoardConfig-common.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/BoardConfig-common.mk b/BoardConfig-common.mk index bbb62ca..c1b5edb 100644 --- a/BoardConfig-common.mk +++ b/BoardConfig-common.mk @@ -122,7 +122,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) From 02bf1ad57d58eaaffee05aef6714887e68ef4db7 Mon Sep 17 00:00:00 2001 From: Ziyi Cui Date: Tue, 19 Dec 2023 16:47:16 -0800 Subject: [PATCH 08/89] zumapro: Add path reading for StormIRQ Bug: 279486693 Test: Verified the existence of atom and correctness of atom stats adb shell cmd stats print-logs && logcat -b all | grep -i 105043 Signed-off-by: Ziyi Cui Change-Id: I84f4c1fdf9564c5c2ddc85ff84e271d0e4a55b97 --- pixelstats/pixelstats-vendor.zumapro.rc | 3 ++- pixelstats/service.cpp | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pixelstats/pixelstats-vendor.zumapro.rc b/pixelstats/pixelstats-vendor.zumapro.rc index d324b6a..70d875e 100644 --- a/pixelstats/pixelstats-vendor.zumapro.rc +++ b/pixelstats/pixelstats-vendor.zumapro.rc @@ -1,6 +1,7 @@ on property:sys.boot_completed=1 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 85b0b46..249652b 100644 --- a/pixelstats/service.cpp +++ b/pixelstats/service.cpp @@ -61,6 +61,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", From 44465c41c670e033dedda7b9f59f57014e83c4b8 Mon Sep 17 00:00:00 2001 From: samou Date: Wed, 20 Dec 2023 05:04:58 +0000 Subject: [PATCH 09/89] bm: add build flag for battery_mitigation Bug: 313831851 Change-Id: I44dae04e86e8fe34f5d2aa17dc72882a19a2810f Signed-off-by: samou --- device.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/device.mk b/device.mk index d4b3d5f..8dcae29 100644 --- a/device.mk +++ b/device.mk @@ -611,7 +611,9 @@ PRODUCT_PACKAGES += \ android.hardware.health.storage-service.default # Battery Mitigation +ifeq ($(RELEASE_PIXEL_AIDL_BATTERY_MITIGATION_HAL), true) include device/google/gs-common/battery_mitigation/bcl.mk +endif # storage pixelstats -include hardware/google/pixel/pixelstats/device.mk From 41ac0a2050d15cadc4c512a03ae77a466bfa923d Mon Sep 17 00:00:00 2001 From: Carter Hsu Date: Wed, 20 Dec 2023 13:42:02 +0800 Subject: [PATCH 10/89] audio: add acd-mel-processor to system/audio Bug: 315915954 Test: build pass Change-Id: Id7fa6975ebf3ee4a927355449053a75a14d853b0 Signed-off-by: Carter Hsu --- conf/ueventd.zumapro.rc | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/ueventd.zumapro.rc b/conf/ueventd.zumapro.rc index 0a3c3e1..69f042b 100644 --- a/conf/ueventd.zumapro.rc +++ b/conf/ueventd.zumapro.rc @@ -94,6 +94,7 @@ /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 From 3d2be07a50dd9accc4c446c17d70b7ea28d03504 Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Wed, 20 Dec 2023 09:34:57 -0800 Subject: [PATCH 11/89] Migrate to gs-common/storage/init.storage.rc Bug: 311655524 Change-Id: I084717957a3bdf0bcbdca06502867d8e108ac139 Signed-off-by: Jaegeuk Kim --- conf/init.zumapro.board.rc | 45 -------------------------------------- 1 file changed, 45 deletions(-) diff --git a/conf/init.zumapro.board.rc b/conf/init.zumapro.board.rc index cd8f5eb..7e6b07a 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 @@ -328,15 +315,6 @@ 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 @@ -527,23 +505,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 +516,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 @@ -848,10 +806,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 From d1fc30327579db4ffa081bb4de4557a7f0de8977 Mon Sep 17 00:00:00 2001 From: Lei Ju Date: Wed, 20 Dec 2023 11:43:51 -0800 Subject: [PATCH 12/89] [zumapro] Use common settings for chre HAL Bug: 248615564 Test: compilation Change-Id: I4ddb726d5c73a69f4a9319f680b8945b3fc96a72 --- device.mk | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/device.mk b/device.mk index d4b3d5f..56ebf5c 100644 --- a/device.mk +++ b/device.mk @@ -396,17 +396,16 @@ 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 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 From d2f43a4b34dcaa63fa503a1cde79193dfc5ef18a Mon Sep 17 00:00:00 2001 From: Alan Chen Date: Thu, 21 Dec 2023 18:27:32 +0800 Subject: [PATCH 13/89] Add extensive logging config Bug: 302417853 Test: manual - file shows on device Change-Id: I983ca64aef0d53c166a70cd587d0db4464cd4dc0 --- device.mk | 6 ++++ radio/config/extensive_logging/Android.bp | 33 +++++++++++++++++++ .../extensive_logging/extensive_logging.conf | 1 + 3 files changed, 40 insertions(+) create mode 100644 radio/config/extensive_logging/Android.bp create mode 100644 radio/config/extensive_logging/extensive_logging.conf diff --git a/device.mk b/device.mk index c834ceb..8cfa1df 100644 --- a/device.mk +++ b/device.mk @@ -988,6 +988,12 @@ PRODUCT_COPY_FILES += \ 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 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 From ce1aaad6e2ace31b3ba25521f8390b265e04617f Mon Sep 17 00:00:00 2001 From: Roy Luo Date: Wed, 20 Dec 2023 21:34:37 +0000 Subject: [PATCH 14/89] usb: implement heuristics to flag data compliance warnings Support flagging enum failure and flaky connection in device mode, flagging enum failure and missing data lines in host mode. No warning would be flagged until 5 secs after the data session starts to give ample time for the connection to stabilize, a timer is added to support it. Bug: 296119135 Test: manually trigger the warnings Change-Id: I25f08657e328913946add192b5ecb9ee50c3a1a8 (cherry picked from commit 42020dc4585442bd7ca88f183ba29a18834af197) --- usb/usb/UsbDataSessionMonitor.cpp | 125 ++++++++++++++++++++++++++---- usb/usb/UsbDataSessionMonitor.h | 3 + 2 files changed, 113 insertions(+), 15 deletions(-) diff --git a/usb/usb/UsbDataSessionMonitor.cpp b/usb/usb/UsbDataSessionMonitor.cpp index 77defb3..a2ccbaf 100644 --- a/usb/usb/UsbDataSessionMonitor.cpp +++ b/usb/usb/UsbDataSessionMonitor.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -48,6 +49,14 @@ 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 +/* + * Typically a smooth and successful enumeration in device mode would go through 5 states at + * maximum: not attached -> default -> default -> addressed -> configured + */ +#define DEVICE_STATE_TRANSITION_PER_ENUMERATION 5 constexpr char kUdcConfigfsPath[] = "/config/usb_gadget/g1/UDC"; constexpr char kNotAttachedState[] = "not attached\n"; @@ -115,6 +124,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 +157,7 @@ UsbDataSessionMonitor::UsbDataSessionMonitor( mEpollFd = std::move(epollFd); mUeventFd = std::move(ueventFd); + mTimerFd = std::move(timerFd); mUpdatePortStatusCb = updatePortStatusCb; if (ReadFileToString(kUdcConfigfsPath, &udc) && !udc.empty()) @@ -223,13 +242,60 @@ 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 stateCount = mDeviceState.states.size(); + 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 && + stateCount > configuredCount * DEVICE_STATE_TRANSITION_PER_ENUMERATION) { + ALOGI("Detected flaky connection: state count %d, configured count %d", + stateCount, configuredCount); + 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 +325,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 +369,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 +405,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 +459,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 +493,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; From aa0edc38fbf080bf47a6771ee8286dbc74e7ffb2 Mon Sep 17 00:00:00 2001 From: Roy Luo Date: Tue, 26 Dec 2023 20:45:34 +0000 Subject: [PATCH 15/89] usb: adjust heuristics for flaky connection warning The state count requirement is very specific to the case where the signal integrity is the culprit of flaky connection. However, there could be other cases such as bad receptacles causing data pins to disconnect randomly. Remove the state count requirement to cover more cases. Bug: 296119135 Test: manually trigger the warnings Change-Id: Ic2ae376ad6062d9930614381503f44e4a5ac760f (cherry picked from commit 5e14ba01be9acc31d3df0f506b4287eea0bf9583) --- usb/usb/UsbDataSessionMonitor.cpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/usb/usb/UsbDataSessionMonitor.cpp b/usb/usb/UsbDataSessionMonitor.cpp index a2ccbaf..bae261d 100644 --- a/usb/usb/UsbDataSessionMonitor.cpp +++ b/usb/usb/UsbDataSessionMonitor.cpp @@ -52,11 +52,6 @@ namespace usb { #define WARNING_SURFACE_DELAY_SEC 5 #define ENUM_FAIL_DEFAULT_COUNT_THRESHOLD 3 #define DEVICE_FLAKY_CONNECTION_CONFIGURED_COUNT_THRESHOLD 5 -/* - * Typically a smooth and successful enumeration in device mode would go through 5 states at - * maximum: not attached -> default -> default -> addressed -> configured - */ -#define DEVICE_STATE_TRANSITION_PER_ENUMERATION 5 constexpr char kUdcConfigfsPath[] = "/config/usb_gadget/g1/UDC"; constexpr char kNotAttachedState[] = "not attached\n"; @@ -250,7 +245,6 @@ void UsbDataSessionMonitor::evaluateComplianceWarning() { if (elapsedTimeSec >= WARNING_SURFACE_DELAY_SEC) { if (mDataRole == PortDataRole::DEVICE && mUdcBind) { - int stateCount = mDeviceState.states.size(); int configuredCount = std::count(mDeviceState.states.begin(), mDeviceState.states.end(), kConfiguredState); int defaultCount = @@ -259,12 +253,8 @@ void UsbDataSessionMonitor::evaluateComplianceWarning() { if (configuredCount == 0 && defaultCount > ENUM_FAIL_DEFAULT_COUNT_THRESHOLD) newWarningSet.insert(ComplianceWarning::ENUMERATION_FAIL); - if (configuredCount > DEVICE_FLAKY_CONNECTION_CONFIGURED_COUNT_THRESHOLD && - stateCount > configuredCount * DEVICE_STATE_TRANSITION_PER_ENUMERATION) { - ALOGI("Detected flaky connection: state count %d, configured count %d", - stateCount, configuredCount); + 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 = From 439e931b7a9ec8a41eeb93017521c50427e01114 Mon Sep 17 00:00:00 2001 From: Jagrut Desai Date: Wed, 27 Dec 2023 17:01:51 +0000 Subject: [PATCH 16/89] Revert "bm: add build flag for battery_mitigation" Revert submission 25697219-bm_enable_build_flag Reason for revert: DroidMonitor: Potential culprit for Bug b/317869992 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted. Reverted changes: /q/submissionid:25697219-bm_enable_build_flag Change-Id: Ic2be8f44e812b0486076eb2676bb2477eb065f34 --- device.mk | 2 -- 1 file changed, 2 deletions(-) diff --git a/device.mk b/device.mk index 8dcae29..d4b3d5f 100644 --- a/device.mk +++ b/device.mk @@ -611,9 +611,7 @@ PRODUCT_PACKAGES += \ android.hardware.health.storage-service.default # Battery Mitigation -ifeq ($(RELEASE_PIXEL_AIDL_BATTERY_MITIGATION_HAL), true) include device/google/gs-common/battery_mitigation/bcl.mk -endif # storage pixelstats -include hardware/google/pixel/pixelstats/device.mk From 1257aa5cdd688534d7353b5786c4df7bc5197efe Mon Sep 17 00:00:00 2001 From: Jenny Ho Date: Thu, 28 Dec 2023 11:35:08 +0800 Subject: [PATCH 17/89] Handle empty read from file. Test: run /vendor/bin/dump/dump_power Bug: 317934817 Change-Id: Ia4453483fdfaba838a1ffb3d38b243dceb9628e7 Signed-off-by: Jenny Ho --- dumpstate/dump_power.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dumpstate/dump_power.cpp b/dumpstate/dump_power.cpp index ff6aa1e..c473074 100644 --- a/dumpstate/dump_power.cpp +++ b/dumpstate/dump_power.cpp @@ -374,7 +374,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"; } From 98e06b3aa42c786e9983cd702fd81fd3c8b965d7 Mon Sep 17 00:00:00 2001 From: Alan Chen Date: Tue, 26 Dec 2023 16:27:40 +0800 Subject: [PATCH 18/89] Add RadioExt HIDL v1.7 Bug: 317743257 Test: manual Change-Id: Ic7f56190d2de278972477b63f86a002ea15e37d7 --- device.mk | 2 +- device_framework_matrix_product.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/device.mk b/device.mk index 00fdc8b..b272078 100644 --- a/device.mk +++ b/device.mk @@ -1123,7 +1123,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 diff --git a/device_framework_matrix_product.xml b/device_framework_matrix_product.xml index 10416a2..d2e6071 100644 --- a/device_framework_matrix_product.xml +++ b/device_framework_matrix_product.xml @@ -159,7 +159,7 @@ vendor.google.radioext - 1.6 + 1.7 IRadioExt default From 0ded8d1e2ca9fb33d89c055f30dc8c1ced8f2a5f Mon Sep 17 00:00:00 2001 From: Jasmine Cha Date: Tue, 2 Jan 2024 16:39:07 +0800 Subject: [PATCH 19/89] audio: check USE_AUDIO_HAL_AIDL instead of trunk flag Bug: 317745810 Test: manual test b/317745810#comment3 Change-Id: I223aaff717e4b84940640b1e5cff57decddaf111 Signed-off-by: Jasmine Cha --- device.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/device.mk b/device.mk index 00fdc8b..a68200f 100644 --- a/device.mk +++ b/device.mk @@ -1009,7 +1009,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 From c02735cbf9615a981b47ba13a664a31e5aae727d Mon Sep 17 00:00:00 2001 From: WeiChung Chang Date: Thu, 28 Dec 2023 23:32:31 +0000 Subject: [PATCH 20/89] add libdisplaypanel for zumapro platform Bug: 317522061 Test: build, flash and check libdisplaypanel works well Change-Id: I1137543214ccc50b9367bf5a939d9c491f52a3e8 --- device.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/device.mk b/device.mk index 00fdc8b..078d079 100644 --- a/device.mk +++ b/device.mk @@ -842,7 +842,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 += \ From a4a92ded54d2320151ac603892775ed223836bfc Mon Sep 17 00:00:00 2001 From: samou Date: Thu, 4 Jan 2024 04:02:38 +0000 Subject: [PATCH 21/89] bm: move to bcl-aidl Put build flag conditional inside bcl-aidl.mk to handle new battery mitigation service. Bug: 317869347 Change-Id: Ic2d781e5afbc1994fdf1a08528f4659fff929fed Signed-off-by: samou --- device.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/device.mk b/device.mk index 00fdc8b..ff0d472 100644 --- a/device.mk +++ b/device.mk @@ -610,7 +610,7 @@ PRODUCT_PACKAGES += \ android.hardware.health.storage-service.default # Battery Mitigation -include device/google/gs-common/battery_mitigation/bcl.mk +include device/google/gs-common/battery_mitigation/bcl-aidl.mk # storage pixelstats -include hardware/google/pixel/pixelstats/device.mk From dbf1927043c990f3e462b3eaacb4ab6ddf6cd97e Mon Sep 17 00:00:00 2001 From: Lei Ju Date: Wed, 20 Dec 2023 14:50:24 -0800 Subject: [PATCH 22/89] Enable multiclient hal on zumapro Test: Various tests are done on zuma devices given which has been in production for a while. Tests done on zumapro devices include: - flashed a zumapro device and observed that the device boots up successfully. - Checking the bugreport and didn't see anything suspicious. - Verify that there is not any sepolicy violation related to the multiclient HAL. Bug: 247124878 Change-Id: Iaae483761c8163a34aaeb86651e1b9f6f51dfb5a --- device.mk | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/device.mk b/device.mk index 00fdc8b..137b4ed 100644 --- a/device.mk +++ b/device.mk @@ -76,7 +76,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 \ @@ -401,7 +401,8 @@ PRODUCT_PACKAGES += \ ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) PRODUCT_PACKAGES += \ chre_power_test_client \ - chre_test_client + chre_test_client \ + chre_aidl_hal_client endif ## hal @@ -410,9 +411,8 @@ 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 From 2e8150ddc1045441173e6f6f4034d65821627aa2 Mon Sep 17 00:00:00 2001 From: Mahesh Kallelil Date: Sat, 6 Jan 2024 08:11:43 -0800 Subject: [PATCH 23/89] Set owner as system for logbuffer_cpif Setting the owner of /dev/logbuffer_cpif as system to allow the dump_modem script to read the logs as part of bugreport Test: Tested bugreport on device Bug: 318949647 Change-Id: I402049e9b7b42b31f6fd07e8bf3a9cafefdc6526 Signed-off-by: Mahesh Kallelil --- conf/init.zumapro.board.rc | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/init.zumapro.board.rc b/conf/init.zumapro.board.rc index 7e6b07a..34a4960 100644 --- a/conf/init.zumapro.board.rc +++ b/conf/init.zumapro.board.rc @@ -319,6 +319,7 @@ on early-boot 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 From a2c21e7ee2b853ff5e96733528300f28c7702326 Mon Sep 17 00:00:00 2001 From: Robert Lee Date: Mon, 8 Jan 2024 03:54:00 +0000 Subject: [PATCH 24/89] Add pixel_ti_cal binary for ti speaker calibration Bug: 313341617 Test: builds Change-Id: Idea02aaa2eef7c2d50daf0cb93bda67e19465e75 Signed-off-by: Robert Lee --- device.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/device.mk b/device.mk index 420d446..3886948 100644 --- a/device.mk +++ b/device.mk @@ -1040,7 +1040,8 @@ PRODUCT_PACKAGES += \ aoc_tuning_inft \ mahal_test \ ma_aoc_tuning_test \ - crus_sp_cal + crus_sp_cal \ + pixel_ti_cal endif PRODUCT_PACKAGES += \ From 61695f5536f114fee337025d3f566828a7ecc92b Mon Sep 17 00:00:00 2001 From: George Lee Date: Mon, 8 Jan 2024 20:31:43 +0000 Subject: [PATCH 25/89] bm: Remove thermal dependency Bug: 319136643 Test: Confirm battery_mitigation loaded Change-Id: Idfe17e6f41c3642a2dac4aec560318ee6f05c101 Signed-off-by: George Lee --- conf/init.zumapro.board.rc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/conf/init.zumapro.board.rc b/conf/init.zumapro.board.rc index 7e6b07a..126bd96 100644 --- a/conf/init.zumapro.board.rc +++ b/conf/init.zumapro.board.rc @@ -690,7 +690,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 @@ -712,6 +712,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 From 80db9c48cc64543140232a22ebf7c339d82a4d99 Mon Sep 17 00:00:00 2001 From: Bryan Lavrich Date: Tue, 9 Jan 2024 13:59:14 -0800 Subject: [PATCH 26/89] Add zumapro soong config for aocd Bug: 319303080 Change-Id: I2424bea111593f9e9e771f3d7ec457e5e5c813e7 --- device.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/device.mk b/device.mk index 0f8b418..e0f6674 100644 --- a/device.mk +++ b/device.mk @@ -1020,7 +1020,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)) # From 088d7944e47b85fbdfd566693d9b3586b16d058b Mon Sep 17 00:00:00 2001 From: Devika Krishnadas Date: Tue, 9 Jan 2024 23:23:10 +0000 Subject: [PATCH 27/89] Revert^3 "Use graphics allocator 2" 60257881adf1b6b4ec5b342a0210cbb6e3fff97f Reverting to comply with the Allocator VTS for 24Q1, do not merge to main. Bug: 310046460 Test: VtsHalGraphicsAllocatorAidl_TargetTest Change-Id: I47f69b046c798ea15eb48debdc55c3a7273ac007 --- device.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/device.mk b/device.mk index 4b5309f..a62e995 100644 --- a/device.mk +++ b/device.mk @@ -554,7 +554,7 @@ 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) \ From a18b7da15645d608c12e5f14344fa3f6b52e3aaf Mon Sep 17 00:00:00 2001 From: Sam Ou Date: Wed, 10 Jan 2024 03:16:12 +0000 Subject: [PATCH 28/89] Revert "bm: move to bcl-aidl" This reverts commit a4a92ded54d2320151ac603892775ed223836bfc. Reason for revert: move the conditional to bcl.mk and battery_mitigation to avoide haveing 2 versions of mk. Change-Id: I87a0c7270960ccd4e4bb01ecf58e787defcc50b9 --- device.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/device.mk b/device.mk index ff0d472..00fdc8b 100644 --- a/device.mk +++ b/device.mk @@ -610,7 +610,7 @@ PRODUCT_PACKAGES += \ android.hardware.health.storage-service.default # Battery Mitigation -include device/google/gs-common/battery_mitigation/bcl-aidl.mk +include device/google/gs-common/battery_mitigation/bcl.mk # storage pixelstats -include hardware/google/pixel/pixelstats/device.mk From 340d840cfe05b65e1f2baab3f16b7705b2a743c0 Mon Sep 17 00:00:00 2001 From: Roy Luo Date: Thu, 4 Jan 2024 01:15:16 +0000 Subject: [PATCH 29/89] usb: dump flag value in the constructor Dump flag value in the construtor for easier debugging. Feature flags are not expected to change in runtime, dumping the value once should be enough. Bug: 296119135 Test: manual test Change-Id: Ie5aca2dff23e59704fb306833cde0e592b9f430d (cherry picked from commit 9164eae7cdee032381d8bf045fbbed33f62b00bf) --- usb/usb/Usb.cpp | 5 +++++ usb/usb/UsbDataSessionMonitor.cpp | 3 +++ 2 files changed, 8 insertions(+) diff --git a/usb/usb/Usb.cpp b/usb/usb/Usb.cpp index e5c1c06..338b9ff 100644 --- a/usb/usb/Usb.cpp +++ b/usb/usb/Usb.cpp @@ -573,6 +573,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, diff --git a/usb/usb/UsbDataSessionMonitor.cpp b/usb/usb/UsbDataSessionMonitor.cpp index bae261d..bff52f0 100644 --- a/usb/usb/UsbDataSessionMonitor.cpp +++ b/usb/usb/UsbDataSessionMonitor.cpp @@ -164,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() {} From 0e4c410042aaae3fcf373af6dc72565558267e78 Mon Sep 17 00:00:00 2001 From: Mingguang Xu Date: Wed, 10 Jan 2024 23:22:09 +0000 Subject: [PATCH 30/89] zumapro: Add Twoshay's IGrilAntennaTuningService to manifest Bug: 268562469 Test: manual Change-Id: I39c61fe53768b2bd2cbbe236505c98f98d4fc8ae Signed-off-by: Mingguang Xu --- device_framework_matrix_product.xml | 8 ++++++++ manifest.xml | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/device_framework_matrix_product.xml b/device_framework_matrix_product.xml index 10416a2..2005f2d 100644 --- a/device_framework_matrix_product.xml +++ b/device_framework_matrix_product.xml @@ -127,6 +127,14 @@ default + + com.google.input.algos.gril + 2 + + IGrilAntennaTuningService + default + + com.google.input diff --git a/manifest.xml b/manifest.xml index e5c9f76..64b1764 100644 --- a/manifest.xml +++ b/manifest.xml @@ -19,6 +19,14 @@ default + + com.google.input.algos.gril + 2 + + IGrilAntennaTuningService + default + + com.google.input From 3ae69cc295dfca61595e2cee6f50889c996d8d83 Mon Sep 17 00:00:00 2001 From: Kyle Lin Date: Mon, 11 Dec 2023 18:47:27 +0800 Subject: [PATCH 31/89] rc: adjust memlat parameters Increased performance and reduced power consumption. Improved benchmarks as well. Bug: 308973423 Test: benchmakrs Change-Id: I35380bf2dbde1953aa09e0e6059bc2876b383169 --- conf/init.zumapro.soc.rc | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) 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. From cd3ca664161709dd4a71e3946b9fc0935673fade Mon Sep 17 00:00:00 2001 From: Utku Utkan Date: Fri, 12 Jan 2024 00:18:26 +0000 Subject: [PATCH 32/89] Pregrant ACCESS_FINE_LOCATION as default permission to PCS on ZumaPro Bug: 309676824 Test: m && flashall + pair & connect to remote device Wi-Fi AP Change-Id: I5eee9450565b119849f56814359f1a55acb4c41f --- default-permissions.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/default-permissions.xml b/default-permissions.xml index d0d7e5f..97628d2 100644 --- a/default-permissions.xml +++ b/default-permissions.xml @@ -52,6 +52,8 @@ + + From 1c753f658b6e7522bed92fd85beff19627cb988e Mon Sep 17 00:00:00 2001 From: Angela Wu Date: Wed, 10 Jan 2024 07:12:32 +0000 Subject: [PATCH 33/89] Change /dev/video12's permission to 666 for hardware JPG encoder for zumapro. This change is the zumapro version of ag/23052928. Bug: b/296330134 Test: https://android-build.corp.google.com/builds/abtd/run/L22000030001255046 Change-Id: Ic16b954a0e434bb64a5566822b40097afb49f1ce --- conf/ueventd.zumapro.rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/ueventd.zumapro.rc b/conf/ueventd.zumapro.rc index 2242efe..2bdaff2 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 From d85330398406b342427415fe42b0c761be6f7254 Mon Sep 17 00:00:00 2001 From: Wendly Li Date: Fri, 12 Jan 2024 09:45:15 +0000 Subject: [PATCH 34/89] init: move offload settings to device's init.rc Bug: 273163806 Test: twoshay launched successfully. Change-Id: I5fd2135f070425106fdd48cf5acf2b5137c33b4e Signed-off-by: Wendly Li --- conf/init.zumapro.board.rc | 3 --- 1 file changed, 3 deletions(-) diff --git a/conf/init.zumapro.board.rc b/conf/init.zumapro.board.rc index 9cd0122..a5dbd4f 100644 --- a/conf/init.zumapro.board.rc +++ b/conf/init.zumapro.board.rc @@ -494,9 +494,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 From 9a87a52bb755d97c23d70ce8bcbb6ae170d06020 Mon Sep 17 00:00:00 2001 From: "donghwa.kwon" Date: Thu, 11 Jan 2024 10:52:05 +0900 Subject: [PATCH 35/89] zumapro: add supported mfc version Bug: 315920627 Task: ADVCHAL-220 Test: build pass Change-Id: I4789c5ece68235cc444545a56cdd2d8c72c109b6 Signed-off-by: donghwa.kwon --- BoardConfig-common.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BoardConfig-common.mk b/BoardConfig-common.mk index c1b5edb..a1ef4f6 100644 --- a/BoardConfig-common.mk +++ b/BoardConfig-common.mk @@ -208,7 +208,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 From 824f1c1200c5c2b2aa78d74f677a4f6031f29abc Mon Sep 17 00:00:00 2001 From: pajacechen Date: Tue, 16 Jan 2024 20:04:13 +0800 Subject: [PATCH 36/89] Fix battery widget cannot show bluetooth device issue Root cause: The permission "android.permission.BLUETOOTH_CONNECT" is missed for settingsintelligence on zumapro Solution: pre-grant the permission "android.permission.BLUETOOTH_CONNECT" for settingsintelligence on zumapro Fix: 320409645 Test: Manual Test Flag: NA Change-Id: I104a0e9a7e30fc1e530ee0e9baaab3972d6a992b --- default-permissions.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/default-permissions.xml b/default-permissions.xml index 97628d2..be8d691 100644 --- a/default-permissions.xml +++ b/default-permissions.xml @@ -47,6 +47,8 @@ + + From 7ba2d8ed6a59feb671ea0193ce15bff1d67e3abe Mon Sep 17 00:00:00 2001 From: peroulas Date: Mon, 11 Dec 2023 15:24:55 -0800 Subject: [PATCH 37/89] modem_ml: Adds FR2 BPS model Bug: 315882669 Test: Tested on a phone connected to a gNB. Change-Id: Ic845c682f616f555361ac32e39284e69da530d90 --- modem_ml/modem_ml_models_user.conf | 3 ++- modem_ml/modem_ml_models_userdebug.conf | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) 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 From 9980fe69a895f4a09bbcd97fe7c0b40903d37191 Mon Sep 17 00:00:00 2001 From: Kai Chang Date: Thu, 18 Jan 2024 05:28:24 +0000 Subject: [PATCH 38/89] Add task_profiles MaxPerformance for storageproxyd It adds the storageproxyd to top-app group. Bug: 307643740 Test: build and test on fingerprint enroll Change-Id: I6a10a0084ace6e2b71b8a6ed368c1ae296c52ac8 --- conf/init.zumapro.board.rc | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/init.zumapro.board.rc b/conf/init.zumapro.board.rc index a5dbd4f..f89fc1a 100644 --- a/conf/init.zumapro.board.rc +++ b/conf/init.zumapro.board.rc @@ -659,6 +659,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=* From 2b8ea11884449aee78b91fe4426da7a37a331896 Mon Sep 17 00:00:00 2001 From: Ken Lin Date: Thu, 18 Jan 2024 09:05:45 +0000 Subject: [PATCH 39/89] init: dump display logbuffer on zumapro devices Bug: 294852108 Test: adb root; adb shell dumpsys android.hardware.dumpstate.IDumpstateDevice/default dump_display_logbuffer Change-Id: I74eaa7b3cdd8101909044f173512d41b065a2599 Signed-off-by: Ken Lin --- device.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/device.mk b/device.mk index e0f6674..0f2b772 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 From d321a9da6b8d3ee32814f35c57e80b8c9ad6b482 Mon Sep 17 00:00:00 2001 From: Gary Jian Date: Fri, 19 Jan 2024 07:00:34 +0000 Subject: [PATCH 40/89] Add Satellite SIM profile and gatway service package configs for Zuma Pro Bug: 321159001 Test: config change Change-Id: Ie4e15e865d0128d6eec19119bc1b65fb27cbd117 --- .../frameworks/base/core/res/res/values/config.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml index 0596bdb..83da7bd 100644 --- a/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -322,4 +322,15 @@ true + + + 90198 + + + Skylo + + + com.google.android.apps.stargate From b7046b2dced1f8700c1be84e667c08960dd25fe1 Mon Sep 17 00:00:00 2001 From: Scott Wiest Date: Fri, 19 Jan 2024 11:19:21 -0800 Subject: [PATCH 41/89] UsbGadget: Add support for webcam on zumapro Bug: 318801643 Test: Manual Change-Id: I77a97a13779452f75b5d73300904a1c2825b1ba3 --- conf/init.zumapro.usb.rc | 101 +++++++++++++++++++++++++++++++++++++++ usb/gadget/UsbGadget.cpp | 27 +++++++++++ 2 files changed, 128 insertions(+) diff --git a/conf/init.zumapro.usb.rc b/conf/init.zumapro.usb.rc index 6e2193d..322e530 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 diff --git a/usb/gadget/UsbGadget.cpp b/usb/gadget/UsbGadget.cpp index d3b1331..14f65b7 100644 --- a/usb/gadget/UsbGadget.cpp +++ b/usb/gadget/UsbGadget.cpp @@ -26,6 +26,8 @@ #include #include +#include + #include namespace aidl { @@ -34,6 +36,9 @@ namespace hardware { namespace usb { namespace gadget { +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-"; @@ -302,6 +307,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; From 09ddcecb8d364edc0a75c77e3911ca02069cf2c2 Mon Sep 17 00:00:00 2001 From: Poomarin Phloyphisut Date: Mon, 22 Jan 2024 04:43:20 +0000 Subject: [PATCH 42/89] pixelstats: copy audiometric sysfs_paths from Zuma. Bug: 321610140 Test: Local Test Change-Id: I41e7559e879cd5c7d5e9860088993d70a66cfc06 --- pixelstats/service.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pixelstats/service.cpp b/pixelstats/service.cpp index 9b0794f..e220a04 100644 --- a/pixelstats/service.cpp +++ b/pixelstats/service.cpp @@ -76,7 +76,18 @@ 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", + .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 = { From 3af9989f00667ef1dce82d94f5c017d430dd0417 Mon Sep 17 00:00:00 2001 From: derickhong Date: Thu, 18 Jan 2024 15:32:29 +0800 Subject: [PATCH 43/89] display: zumapro: update Adaptive Brightness Curve update config "config_autoBrightnessDisplayValuesNits" Bug: 298738593 Test: adb shell dumpsys display | grep mBrightnessLevelsNits Change-Id: I8977632dc15d40141fb34ae1307fd9858bbcff71 Signed-off-by: derickhong --- .../base/core/res/res/values/config.xml | 92 +++++++++++++++++++ 1 file changed, 92 insertions(+) diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml index 83da7bd..c7d64ca 100644 --- a/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -323,6 +323,98 @@ 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 + 2000 + + 90198 From c4c265ea450453f058ccd5cb7ad34aba0475225c Mon Sep 17 00:00:00 2001 From: Spade Lee Date: Mon, 22 Jan 2024 16:43:35 +0000 Subject: [PATCH 44/89] dumpstate: add SoC residency dump Bug: 319536756 Test: SoC residency was correctly shown in dumpstate board Change-Id: I20bf91393efcf0edb6c458f55e228a227f930ee5 Signed-off-by: Spade Lee --- dumpstate/dump_power.cpp | 1 + dumpstate/dump_power.rc | 1 + 2 files changed, 2 insertions(+) diff --git a/dumpstate/dump_power.cpp b/dumpstate/dump_power.cpp index c473074..07a27dc 100644 --- a/dumpstate/dump_power.cpp +++ b/dumpstate/dump_power.cpp @@ -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"}, 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 From a76e4d937271a592edb6f117dedb2ddd82642771 Mon Sep 17 00:00:00 2001 From: Darren Hsu Date: Tue, 23 Jan 2024 17:35:00 +0800 Subject: [PATCH 45/89] powerstats: expose display MRR state residency data provider Bug: 321871433 Test: vts-tradefed run vts -m VtsHalPowerStatsTargetTest Change-Id: If556198f4334eacda88e8a6f76efdb01b8e838f5 Signed-off-by: Darren Hsu --- powerstats/ZumaProCommonDataProviders.cpp | 11 +++++++++++ powerstats/include/ZumaProCommonDataProviders.h | 2 ++ 2 files changed, 13 insertions(+) diff --git a/powerstats/ZumaProCommonDataProviders.cpp b/powerstats/ZumaProCommonDataProviders.cpp index 249a7ab..1f2c9f2 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; @@ -645,6 +647,15 @@ void addPixelStateResidencyDataProvider(std::shared_ptr p) { p->addStateResidencyDataProvider(std::move(pixelSdp)); } +void addDisplayMrrByPath(std::shared_ptr p, std::string path) { + p->addStateResidencyDataProvider(std::make_unique( + "Display", path)); +} + +void addDisplayMrr(std::shared_ptr p) { + addDisplayMrrByPath(p, "/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..8ef17cf 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 addDisplayMrrByPath(std::shared_ptr p, std::string path); void addDvfsStats(std::shared_ptr p); void addGNSS(std::shared_ptr p); void addGPU(std::shared_ptr p); From ce9fbc05aa148344226ebf344b650dd0e2aff38c Mon Sep 17 00:00:00 2001 From: kierancyphus Date: Wed, 24 Jan 2024 15:44:45 +0800 Subject: [PATCH 46/89] liboemservice_proxy: Include in build Previously, `Liboemservice_proxy` was included as a part of DMD, and so didn't need to be included on its own. However, since these two have been decoupled, we need to explicitly include the build target here for it to execute on device. Test: Build and check logs to ensure service starts up on boot Bug: 321867236 Change-Id: I9a03a5f7dffc91e4760472a79d510e23eacca564 --- device.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/device.mk b/device.mk index 3531ca6..c4db697 100644 --- a/device.mk +++ b/device.mk @@ -983,6 +983,9 @@ 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 \ From ed6dd51cd66acc0fd83f2063e93c68f71f25e3bf Mon Sep 17 00:00:00 2001 From: Gary Jian Date: Wed, 24 Jan 2024 09:25:33 +0000 Subject: [PATCH 47/89] Add geofencing configs for Zuma Pro Bug: 322044968 Bug: 321712825 Test: config change Change-Id: I63a2bab8f1dcb5b12276adff7209a9a2a7aa0317 --- device.mk | 4 ++++ .../base/core/res/res/values/config.xml | 10 ++++++++++ telephony/sats2.dat | Bin 0 -> 73548 bytes 3 files changed, 14 insertions(+) create mode 100644 telephony/sats2.dat diff --git a/device.mk b/device.mk index f890c70..6dadb95 100644 --- a/device.mk +++ b/device.mk @@ -1165,6 +1165,10 @@ 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 diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml index c7d64ca..d83c58f 100644 --- a/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -425,4 +425,14 @@ com.google.android.apps.stargate + + + + US + + + + /vendor/etc/telephony/sats2.dat diff --git a/telephony/sats2.dat b/telephony/sats2.dat new file mode 100644 index 0000000000000000000000000000000000000000..0e8ecec87d851e654adf54448f0cb020fbe2c091 GIT binary patch literal 73548 zcmeFa2Urx@y8hcJP7dviI*vN#95E+Cp_mf}%mK5a0+MqVh&f@-iXuwRIkq_~3YY_C z3=4*S1n?|b(-=iYP9oLqo8x3K!NdaDK`Kd4=zCWBfZY8m_<7}YUR9TR`2g1YDY>Il{H5saz zAZ^uTP?JGT2DJ=S98hIl{H5sazAZ^uT zP?JGT2DJ=S98h!@U}Dn$nlsB&!7;Q2nh+t5jeM z$!hKBflVr;CjCR8c5yX16sqFdNmdIy_;qzr8gEtL5y@&5c__CUtlp{t$q#Cm{HK$l z790QYu8xY0KT1{$Jlw6iYT08IXz;h-k>7b-S1y5{AFZ#I(^ExVRcfKiSx>Us-~bgO zr9Z3F)4Cd~ldQ`5TC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vX&Y`nAZ$;3AUzjXZ52uLL`g`i}DlL$#fOdvF#usHsc$3I0YP%fu<8LFj} zc%okNe5vSBCZi0>9pM#{VDyw5MZq*eZW1K3C|G1z!0HIINkR`#?!7#@_3+eZn4*tB z-^ud6dU?M;brmN&18fYmGRVSUGef#?Hq9COe?H{DJs)!LVVQ7P;z%q2V1< zaSr0UNwAY>Bgsm#g%mTXU8I>vHXri!@B0b6mitAD7 zD5*nTi>8LsYRal8ucShYwt~uXs>-M?rA9-onz|BnD(Z`AP@*rQv5=+$4EZ$Y(UMDR z4sF@AXVH;KX9mV}OlfqbVot%5j5P^cBK8Ej<8ky@o+r?I^g{3c6cMJs1t&8Dx)^9; zkdeWi4C%nR{h#=mxiCU6A1PxbjB+r#n=y9A+8AeLyoEQ+Oz2{wi8qbB)ydl(ywlFR zZA@zAy%yeY<^uyCHZi#oL61uVQ|kFhhie^EYmZFR%cskjj(nCNy2)^3s=FlkMJW6q yx7W=MkX-Xcu}E}P%1}bF164OAcGNaB)@h}ZRBflmMy-`Pi<3?e8U#@ Date: Wed, 24 Jan 2024 12:36:55 +0000 Subject: [PATCH 48/89] radio: change default max size and max file number - Max file size: 20MB -> 50MB - Max file count: 10 -> 50 files Bug: 322142305 Test: Flash the build and check always-on logging settings Change-Id: I16f07b4736d261cca755a5e6cc68ff9b3bcb436c --- radio/config/logging.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From a3c3ccc7d37644c0c23cfb5a2122405f1d75b621 Mon Sep 17 00:00:00 2001 From: Darren Hsu Date: Thu, 25 Jan 2024 17:13:10 +0800 Subject: [PATCH 49/89] powerstats: support adding MRR stats by entity info Bug: 321871758 Test: vts-tradefed run vts -m VtsHalPowerStatsTargetTest Change-Id: I52ddbe65606d7289faf9a2b186d8e81ff69e9a4b Signed-off-by: Darren Hsu --- powerstats/ZumaProCommonDataProviders.cpp | 6 +++--- powerstats/include/ZumaProCommonDataProviders.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/powerstats/ZumaProCommonDataProviders.cpp b/powerstats/ZumaProCommonDataProviders.cpp index 1f2c9f2..1d00a99 100644 --- a/powerstats/ZumaProCommonDataProviders.cpp +++ b/powerstats/ZumaProCommonDataProviders.cpp @@ -647,13 +647,13 @@ void addPixelStateResidencyDataProvider(std::shared_ptr p) { p->addStateResidencyDataProvider(std::move(pixelSdp)); } -void addDisplayMrrByPath(std::shared_ptr p, std::string path) { +void addDisplayMrrByEntity(std::shared_ptr p, std::string name, std::string path) { p->addStateResidencyDataProvider(std::make_unique( - "Display", path)); + name, path)); } void addDisplayMrr(std::shared_ptr p) { - addDisplayMrrByPath(p, "/sys/class/drm/card0/device/primary-panel/"); + addDisplayMrrByEntity(p, "Display", "/sys/class/drm/card0/device/primary-panel/"); } void addZumaProCommonDataProviders(std::shared_ptr p) { diff --git a/powerstats/include/ZumaProCommonDataProviders.h b/powerstats/include/ZumaProCommonDataProviders.h index 8ef17cf..6e94533 100644 --- a/powerstats/include/ZumaProCommonDataProviders.h +++ b/powerstats/include/ZumaProCommonDataProviders.h @@ -24,7 +24,7 @@ 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 addDisplayMrrByPath(std::shared_ptr p, std::string path); +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); From 0e9aa0e019d3b31b0a443da09a161305168cf2a7 Mon Sep 17 00:00:00 2001 From: Jerry Huang Date: Thu, 25 Jan 2024 12:16:23 +0000 Subject: [PATCH 50/89] zumapro: update c2.android.av1-dav1d.decoder performance point c2.android.av1-dav1d.decoder performance has been improved with CL "C2SoftDav1dDec: Fix performance issues in frame parallel multi-threading" More detail in b/315828433 Bug: 315828433 Test: run cts -m CtsMediaDecoderTestCases -a arm64-v8a -t android.media.decoder.cts.VideoDecoderPerfTest --module-arg CtsMediaDecoderTestCases:instrumentation-arg:codec-prefix:=c2.android.av1-dav1d.decoder Change-Id: Ie2aaccc9f89127b2d9e11e7ddb71455f6d75b50c --- media_codecs_performance_c2.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/media_codecs_performance_c2.xml b/media_codecs_performance_c2.xml index d6768fe..049f8db 100644 --- a/media_codecs_performance_c2.xml +++ b/media_codecs_performance_c2.xml @@ -173,10 +173,10 @@ - - - - + + + + From af8a6de86d0c2fde813648851681eeb97f8a838f Mon Sep 17 00:00:00 2001 From: Leon Scroggins III Date: Thu, 25 Jan 2024 15:20:13 -0500 Subject: [PATCH 51/89] zumapro: Remove sysprop forcing renderengine to skiaglthreaded This is already the default, so no need to set via sysprop. Moving forward, we will set this using flags, unless a particular category of device needs to override the flag. Bug: 293371537 Test: NA Change-Id: I6b149c2ee198a28a306540f4670edaa560533f48 --- device.mk | 4 ---- 1 file changed, 4 deletions(-) diff --git a/device.mk b/device.mk index f890c70..de23fcb 100644 --- a/device.mk +++ b/device.mk @@ -269,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 From ddf585b320cd59faa9b5050090e6f2b3b01a825e Mon Sep 17 00:00:00 2001 From: Sajid Dalvi Date: Thu, 25 Jan 2024 14:00:27 -0600 Subject: [PATCH 52/89] zumapro: Add pcie ltssm utility to eng and userdebug builds It is useful to know the PCIe LTSSM state residencies in various scenarios. The pcie binary that provides this is availaable in factory builds. This change also makes it available for eng and userdebug builds. Bug: 322357593 Change-Id: I5a8513063f232124a82f81ecc2a5e2e6d84d7459 Signed-off-by: Sajid Dalvi --- device.mk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/device.mk b/device.mk index f890c70..84d44c5 100644 --- a/device.mk +++ b/device.mk @@ -406,6 +406,12 @@ PRODUCT_PACKAGES += \ 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 += \ From 72febf940a1a02cabaad3ca6e7514067ce7f13f5 Mon Sep 17 00:00:00 2001 From: timtmlin Date: Fri, 26 Jan 2024 15:31:22 +0800 Subject: [PATCH 53/89] disable wifi during satellite Bug: 322444575 Test: wifi on and enter satellite mode Change-Id: I5031a6bce251588c29506bbf1a1bd028e66ac18c --- .../SettingsProvider/res/values/defaults.xml | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml 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 + + From 70e4e1e6586f8818c954f20963af48fae3f4def4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Fer=C4=99c?= Date: Fri, 26 Jan 2024 19:02:19 +0000 Subject: [PATCH 54/89] Add override for emergency conversation feature in Android Messages Bug: 322518837 Change-Id: Icbee440c10c81046ed858fb3207b90c49bd0f875 --- device.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/device.mk b/device.mk index cc2e796..337de05 100644 --- a/device.mk +++ b/device.mk @@ -1181,3 +1181,8 @@ include hardware/google/pixel/input/twoshay.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 From c451487f8ffc1f720523249257a53ba737ff73bd Mon Sep 17 00:00:00 2001 From: Ankit Goyal Date: Mon, 29 Jan 2024 09:23:56 -0800 Subject: [PATCH 55/89] Add memtrack SE policies are already there. Probably policies were copied properly from the previous project but device files were not. Bug: 321899122 Test: `adb shell dumpsys meminfo surfaceflinger` shows data for graphics Change-Id: I72deafef9e2b6c49360f73ef4c71642dddd2e2f8 --- device.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/device.mk b/device.mk index 337de05..abf68b9 100644 --- a/device.mk +++ b/device.mk @@ -566,7 +566,7 @@ PRODUCT_PACKAGES += \ android.hardware.graphics.allocator-V1-service PRODUCT_PACKAGES += \ - memtrack.$(TARGET_BOARD_PLATFORM) \ + android.hardware.memtrack-service.pixel \ libion_exynos \ libion From 49c8e473974f9ba9de8b8bd7d4db095cdc7cbedc Mon Sep 17 00:00:00 2001 From: wenchangliu Date: Tue, 23 Jan 2024 10:32:47 +0000 Subject: [PATCH 56/89] Update media_codecs_performance_c2.xml 1. Update media_codecs_performance_c2.xml from zuma 2. fine tune value for c2.exynos.vp9.encoder 3840x2160 Bug: 321187030 Test: run cts -m CtsVideoTestCases Change-Id: I4b943f5c134e26f352cc5e14d837ba50347baa32 --- media_codecs_performance_c2.xml | 95 +++++++++++++++++---------------- 1 file changed, 48 insertions(+), 47 deletions(-) diff --git a/media_codecs_performance_c2.xml b/media_codecs_performance_c2.xml index 049f8db..118db0f 100644 --- a/media_codecs_performance_c2.xml +++ b/media_codecs_performance_c2.xml @@ -124,8 +124,7 @@ - - + @@ -183,51 +182,53 @@ - + - + - - - - - - + + + + + + - - - - - - + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + + + @@ -241,8 +242,8 @@ - - + + @@ -259,34 +260,34 @@ - - + + - + - + - + - + - + - + - - - - + + + + - + From f1140a12b1e80af364fe16ae5889a2fef475cdaa Mon Sep 17 00:00:00 2001 From: RD Babiera Date: Tue, 16 Jan 2024 20:55:10 +0000 Subject: [PATCH 57/89] usb: Runtime search the i2c path The paths of sysfs nodes are different across kernel versions and i2c bus assignement. Runtime search the correct ones. Test: Manual test on device. Confirm that file reads related to file path error do not trigger error. Bug: 318820040 Change-Id: I1217fcea012865cebe12c935917f12903003fd5b (ported from commit 0b768c8fbe1e59a4b9efa7b5f7b6a017a81d46fb) Signed-off-by: RD Babiera --- usb/gadget/UsbGadget.cpp | 59 ++++++++---------- usb/gadget/UsbGadget.h | 2 + usb/usb/Usb.cpp | 126 +++++++++++++++++++++++---------------- usb/usb/Usb.h | 2 + 4 files changed, 105 insertions(+), 84 deletions(-) diff --git a/usb/gadget/UsbGadget.cpp b/usb/gadget/UsbGadget.cpp index 14f65b7..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 @@ -29,23 +28,30 @@ #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(); @@ -445,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, @@ -475,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/Usb.cpp b/usb/usb/Usb.cpp index 473e9c3..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), @@ -639,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) { @@ -684,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; @@ -1085,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 && @@ -1603,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); diff --git a/usb/usb/Usb.h b/usb/usb/Usb.h index 6006451..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; From 92f2eb594a18239097a865470693d3eca160a9e3 Mon Sep 17 00:00:00 2001 From: RD Babiera Date: Tue, 16 Jan 2024 21:03:30 +0000 Subject: [PATCH 58/89] usb: select usb-service rc files based on device type i2c paths for 5.15 and 6.1 kernels are statically assigned, so delete variations that do not exist from init rc file. Depending on the device either i2c bus 6 or 11 are used, so create permissions for both in separate init rc files. Put the correct rc file to the vendor partition based on target product. Test: Manual test on device. Confirm that file reads related to file path error do not trigger error. Bug: 318820040 Change-Id: I4cb67bcbba99ef32a5ddfb2487b92ee196563b90 Signed-off-by: RD Babiera --- device.mk | 6 + usb/usb/Android.bp | 17 +- usb/usb/android.hardware.usb-service-i2c11.rc | 47 ++++++ usb/usb/android.hardware.usb-service-i2c6.rc | 47 ++++++ usb/usb/android.hardware.usb-service.rc | 155 ------------------ 5 files changed, 116 insertions(+), 156 deletions(-) create mode 100644 usb/usb/android.hardware.usb-service-i2c11.rc create mode 100644 usb/usb/android.hardware.usb-service-i2c6.rc delete mode 100644 usb/usb/android.hardware.usb-service.rc diff --git a/device.mk b/device.mk index f3a5044..329976a 100644 --- a/device.mk +++ b/device.mk @@ -496,6 +496,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 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/android.hardware.usb-service-i2c11.rc b/usb/usb/android.hardware.usb-service-i2c11.rc new file mode 100644 index 0000000..753ccfa --- /dev/null +++ b/usb/usb/android.hardware.usb-service-i2c11.rc @@ -0,0 +1,47 @@ +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 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/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..a6fcd7d --- /dev/null +++ b/usb/usb/android.hardware.usb-service-i2c6.rc @@ -0,0 +1,47 @@ +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 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/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 b99b6c2..0000000 --- a/usb/usb/android.hardware.usb-service.rc +++ /dev/null @@ -1,155 +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/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-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/110f0000.drmdp/drm-displayport/usbc_cable_disconnect - chmod 664 /sys/devices/platform/google,pogo/enable_usb From d4b137f42c02c5f765ae5adbc10eafea073bf142 Mon Sep 17 00:00:00 2001 From: Joen Chen Date: Wed, 31 Jan 2024 14:54:02 +0000 Subject: [PATCH 59/89] zumapro: enable dynamic color mode Enable dynamic color mode to reduce the power overhead of color space conversion when GPU composition exists. Bug: 315787778 Test: check "dumpsys SurfaceFlinger" and state of display color service when playing SDR/HDR video Change-Id: Ie9e87091385ab5247141bf956fbaba3275cc6811 --- device.mk | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/device.mk b/device.mk index f3a5044..d97ad67 100644 --- a/device.mk +++ b/device.mk @@ -729,10 +729,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 From 1a63a3b45a46ee915199eaacf6466e466c3b4b06 Mon Sep 17 00:00:00 2001 From: Petri Gynther Date: Wed, 31 Jan 2024 11:12:47 -0800 Subject: [PATCH 60/89] zumapro: enable DisplayPort on -user images Bug: 319509617 Change-Id: I3ef8f738dbb6fdaf0bb949f641c510cf1948f6a5 --- device.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/device.mk b/device.mk index f3a5044..eea5f8c 100644 --- a/device.mk +++ b/device.mk @@ -210,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 From b55ab1d86f48b19f67637b82c9767e9d88f9b052 Mon Sep 17 00:00:00 2001 From: timtmlin Date: Fri, 2 Feb 2024 10:21:20 +0800 Subject: [PATCH 61/89] extend inactivity timeout to 10-min Bug: 323301557 Test: try not attach NTN in 10-min Change-Id: I2717fa7cdd009b82a87ce4e84fccb7815af44d74 --- overlay/frameworks/base/core/res/res/values/config.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml index d83c58f..1f89dc4 100644 --- a/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -435,4 +435,10 @@ /vendor/etc/telephony/sats2.dat + + + 600000 From 453a29320a97e24a1e4bd43d9712c32d0973f14e Mon Sep 17 00:00:00 2001 From: Kuen-Han Tsai Date: Fri, 2 Feb 2024 13:46:41 +0800 Subject: [PATCH 62/89] usb: add disable_contanimant_detection This patch adds the disable_contaminant_detection script, providing a command-based method to bypass moisture detection. Bug: 295127978 Test: disable moisture detection by 'setprop vendor.usb.contaminantdisable true' Change-Id: I035d656401aedf11a9a5390504bec46b3c4e2634 Signed-off-by: Kuen-Han Tsai --- Android.bp | 7 +++++++ conf/init.zumapro.usb.rc | 3 +++ device.mk | 4 ++++ disable_contaminant_detection.sh | 7 +++++++ 4 files changed, 21 insertions(+) create mode 100644 disable_contaminant_detection.sh 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/conf/init.zumapro.usb.rc b/conf/init.zumapro.usb.rc index 322e530..8f33d1e 100644 --- a/conf/init.zumapro.usb.rc +++ b/conf/init.zumapro.usb.rc @@ -296,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/device.mk b/device.mk index aea5c16..ca0e409 100644 --- a/device.mk +++ b/device.mk @@ -380,6 +380,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 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 From 4a865f66f8fd007e2d047dad9421f24a052eaf52 Mon Sep 17 00:00:00 2001 From: Richard Hsu Date: Mon, 5 Feb 2024 15:07:44 -0800 Subject: [PATCH 63/89] [Refactor] Include edgetpu targets in final image Make the EdgeTPU targets defined in /proprietary visible by product packages included in edgetpu.mk. Bug: 323601370 Tested: No functionality change. Edgetpu services still work. Change-Id: Ia8846b929b21e9fbcfd1f091779c57d4fed3da0b --- device.mk | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/device.mk b/device.mk index 8309a09..bff7fce 100644 --- a/device.mk +++ b/device.mk @@ -1081,6 +1081,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 From 5f4d31c8c686749c4601a10dbc6bdfef3a163139 Mon Sep 17 00:00:00 2001 From: Mark Chang Date: Wed, 31 Jan 2024 12:53:05 +0000 Subject: [PATCH 64/89] Move manifest entries to gs-common. Bug: 322914403 Bug: 323110919 Bug: 324214410 Test: build succeeds on all devices, failing tests pass. Change-Id: If12963ae26f2c228310ab9c865ac342f65cc192e Signed-off-by: Mark Chang --- device.mk | 1 + device_framework_matrix_product.xml | 22 ---------------------- manifest.xml | 22 ---------------------- 3 files changed, 1 insertion(+), 44 deletions(-) diff --git a/device.mk b/device.mk index df3769d..e85ee1a 100644 --- a/device.mk +++ b/device.mk @@ -1184,6 +1184,7 @@ PRODUCT_COPY_FILES += \ # 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 diff --git a/device_framework_matrix_product.xml b/device_framework_matrix_product.xml index c20d40e..eb39013 100644 --- a/device_framework_matrix_product.xml +++ b/device_framework_matrix_product.xml @@ -120,28 +120,6 @@ default - - com.google.input.algos.spd - - IScreenProtectorDetectorService - default - - - - com.google.input.algos.gril - 2 - - IGrilAntennaTuningService - default - - - - com.google.input - - ITouchContextService - default - - hardware.qorvo.uwb diff --git a/manifest.xml b/manifest.xml index 64b1764..69a1bcd 100644 --- a/manifest.xml +++ b/manifest.xml @@ -12,26 +12,4 @@ android.hardware.boot IBootControl/default - - com.google.input.algos.spd - - IScreenProtectorDetectorService - default - - - - com.google.input.algos.gril - 2 - - IGrilAntennaTuningService - default - - - - com.google.input - - ITouchContextService - default - - From 3cc79349b01a006a7bfcc9a59e4cd45f4d0543ca Mon Sep 17 00:00:00 2001 From: Yong Zhang Date: Wed, 7 Feb 2024 16:54:21 +0000 Subject: [PATCH 65/89] Add Youtube back in MRR Small Area Detection Allowlist Bug: 324132231 Test: Make Pixel builds to verify Allowlist Change-Id: I5a3156640197596a52187806bfbdd753a67a98ca --- overlay/frameworks/base/core/res/res/values/config.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml index 1f89dc4..71ca865 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 From 9ede436718ec6ae85329e395d1f93aac1921b17a Mon Sep 17 00:00:00 2001 From: Sergey Volk Date: Tue, 13 Feb 2024 20:09:15 +0000 Subject: [PATCH 66/89] Fix permissions for dp_hotplug_error_code sysfs node DisplayPort kernel driver passes error code/status to hardware composer via the dp_hotplug_error_code sysfs file. When HWC receives/consumes the error, it will write "0" into that file to reset the error code. So this file must be readable and writable by the HWC code running with "system" user/group permissions. Bug: 324953626 Test: checked that SYSFS dp_hotplug_error_code has correct permissions Change-Id: Idb7d44f8e9f22fc61e8df432aa72281daddb15ef --- usb/usb/android.hardware.usb-service-i2c11.rc | 2 ++ usb/usb/android.hardware.usb-service-i2c6.rc | 2 ++ 2 files changed, 4 insertions(+) diff --git a/usb/usb/android.hardware.usb-service-i2c11.rc b/usb/usb/android.hardware.usb-service-i2c11.rc index 753ccfa..76e3e60 100644 --- a/usb/usb/android.hardware.usb-service-i2c11.rc +++ b/usb/usb/android.hardware.usb-service-i2c11.rc @@ -15,6 +15,7 @@ on post-fs 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 @@ -38,6 +39,7 @@ on post-fs 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 diff --git a/usb/usb/android.hardware.usb-service-i2c6.rc b/usb/usb/android.hardware.usb-service-i2c6.rc index a6fcd7d..18869e2 100644 --- a/usb/usb/android.hardware.usb-service-i2c6.rc +++ b/usb/usb/android.hardware.usb-service-i2c6.rc @@ -15,6 +15,7 @@ on post-fs 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 @@ -38,6 +39,7 @@ on post-fs 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 From 9127fefa9a6782a94c8e279fbc6be93c945d701c Mon Sep 17 00:00:00 2001 From: Sergey Volk Date: Thu, 15 Feb 2024 00:43:35 +0000 Subject: [PATCH 67/89] Add missing sysprops for zumapro We need to set sysprops debug.sf.hwc_hotplug_error_via_neg_vsync and debug.sf.hwc_hdcp_via_neg_vsync on zumapro devices so SurfaceFlinger would properly handle specially-crafted onVsync calls with negative parameter values that HWC makes to pass hotplug error info and HDCP status info. Bug: 324953626 Test: tested DisplayPort error propagation Change-Id: Ice36756154a9091419a41019dc51b187205e9187 --- device.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/device.mk b/device.mk index 22d6529..7d2095b 100644 --- a/device.mk +++ b/device.mk @@ -710,6 +710,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 From f59161aafbfd07411678de6ce3ed2fcffbfe2d04 Mon Sep 17 00:00:00 2001 From: Saifuddin Date: Fri, 16 Feb 2024 06:46:11 +0000 Subject: [PATCH 68/89] Remove default PixelSatelliteService package name Revert of ag/25239847 Bug: 325557745 Test: manual Change-Id: I0ebebb96103aff7b2bc417103cbe751f55145099 --- overlay/frameworks/base/core/res/res/values/config.xml | 3 --- 1 file changed, 3 deletions(-) diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml index 71ca865..5b8ebf1 100644 --- a/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -311,9 +311,6 @@ 100% - - com.google.android.satellite - com.google.android.apps.scone From 3c01f2056c762c77d74918faa6b1e795317d6fb2 Mon Sep 17 00:00:00 2001 From: Will McVicker Date: Fri, 16 Feb 2024 15:14:02 -0800 Subject: [PATCH 69/89] Update tcpm i2c path with new device name The new names fix uninformative kernel wakelock names. Bug: 315190967 Bug: 323447554 Change-Id: I9f2d55b532f9a0f9692a0d613727893b588e600a --- dumpstate/dump_power.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dumpstate/dump_power.cpp b/dumpstate/dump_power.cpp index 07a27dc..9928b66 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"}, }; From bb47f85b044f4efde0531e94faafe3733775f757 Mon Sep 17 00:00:00 2001 From: Daniel Okazaki Date: Thu, 15 Feb 2024 23:11:54 +0000 Subject: [PATCH 70/89] dumpstate: moving charger nodes to user build Bug: 323415060 Test: adb bugreport Change-Id: Iabc4c810641acf54e2bebf5e441423bc341b54c8 Signed-off-by: Daniel Okazaki --- dumpstate/dump_power.cpp | 78 ++++++++++++++++++++++++++-------------- 1 file changed, 51 insertions(+), 27 deletions(-) diff --git a/dumpstate/dump_power.cpp b/dumpstate/dump_power.cpp index 07a27dc..039d31b 100644 --- a/dumpstate/dump_power.cpp +++ b/dumpstate/dump_power.cpp @@ -421,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"; @@ -461,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)) { @@ -967,6 +990,7 @@ int main() { dumpPdEngine(); dumpBatteryHealth(); dumpBatteryDefend(); + dumpChg(); dumpChgUserDebug(); dumpBatteryEeprom(); dumpChargerStats(); From f5f7a90578ff6cdc6e1ac0c4aa6fc279f40d8ad9 Mon Sep 17 00:00:00 2001 From: Darren Hsu Date: Mon, 19 Feb 2024 16:29:19 +0800 Subject: [PATCH 71/89] powerstats: add GNSS power stats for ZP devices Bug: 309876364 Test: dumpsys android.hardware.power.stats.IPowerStats/default Change-Id: I22cefaf0762e0c125ad4a1b6c0f0b11847df44a3 Signed-off-by: Darren Hsu --- powerstats/ZumaProCommonDataProviders.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/powerstats/ZumaProCommonDataProviders.cpp b/powerstats/ZumaProCommonDataProviders.cpp index 1d00a99..31c3b37 100644 --- a/powerstats/ZumaProCommonDataProviders.cpp +++ b/powerstats/ZumaProCommonDataProviders.cpp @@ -427,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; @@ -437,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) { From 9adf37d6fed1dc761d0bfb75c7c020d8e3209cc1 Mon Sep 17 00:00:00 2001 From: timtmlin Date: Wed, 21 Feb 2024 11:13:29 +0800 Subject: [PATCH 72/89] extend inactivity timeout and datagram sending timeout config_satellite_nb_iot_inactivity_timeout_millis extend to 15-min as per POR mentioned in b/323211209#comment7 config_datagram_wait_for_connected_state_timeout_millis extend to 15-min to improve sending at intermittent cellular scan Bug: 323211209 Bug: 323301557 Test: make Change-Id: Icf3a2ca4b62d65db7812e32669befeffa08f556a --- overlay/frameworks/base/core/res/res/values/config.xml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml index 5b8ebf1..1282bd1 100644 --- a/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -438,5 +438,13 @@ will move to IDLE state. This timeout duration is used for satellite with NB IOT radio technologies. --> - 600000 + 900000 + + + 900000 From 49808d049da3fb5605917e7fb6ccacf087921da3 Mon Sep 17 00:00:00 2001 From: Robin Peng Date: Wed, 21 Feb 2024 04:29:04 +0000 Subject: [PATCH 73/89] Update ro.soc.model Bug: 320613426 Change-Id: I97680796efc9f1cfc3fcb6c44e6d782dfa44aba9 --- device-common.mk | 2 +- vendor.prop | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 vendor.prop diff --git a/device-common.mk b/device-common.mk index 205689f..390e506 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 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 From dac0b4846343c8aa6048334cf2f1625fa0203c62 Mon Sep 17 00:00:00 2001 From: Mahesh Kallelil Date: Tue, 20 Feb 2024 22:59:44 -0800 Subject: [PATCH 74/89] init: Change owner to radio for PCIe dyn speed sysfs nodes Allow modem_svc to write to the cpif sysfs files for PCIe dynamic speed feature control. Test: Tested with property toggle on device Bug: 256247132 Change-Id: Ic8a7648657e23f13d31472aafd3150c990cf127f Signed-off-by: Mahesh Kallelil --- conf/init.zumapro.board.rc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/conf/init.zumapro.board.rc b/conf/init.zumapro.board.rc index a5dbd4f..b8d3c79 100644 --- a/conf/init.zumapro.board.rc +++ b/conf/init.zumapro.board.rc @@ -199,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 From 540332bbe1d0bc7312626763a45444e6652eb413 Mon Sep 17 00:00:00 2001 From: David Li Date: Wed, 21 Feb 2024 20:01:06 +0800 Subject: [PATCH 75/89] audio: add /dev/acd-mc_headpos to ueventd.zumapro.rc Bug: 307842941 Test: mm Change-Id: I3d1a988449197cbd8fe8e728560b90d7d43d06c7 --- conf/ueventd.zumapro.rc | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/ueventd.zumapro.rc b/conf/ueventd.zumapro.rc index 54a05c1..ca08579 100644 --- a/conf/ueventd.zumapro.rc +++ b/conf/ueventd.zumapro.rc @@ -97,6 +97,7 @@ /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 From af739912ac2a577c7d7c2e1bfc20c4fc5ffb5e5b Mon Sep 17 00:00:00 2001 From: Richard Chang Date: Wed, 21 Feb 2024 08:48:15 +0000 Subject: [PATCH 76/89] zumapro: move zram size setting to common mk file Bug: 316995456 Test: perfwbs Change-Id: Ic726070e0378c558c6893b7cc7c95e01ee7ef64f --- device-common.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/device-common.mk b/device-common.mk index 205689f..76e8129 100644 --- a/device-common.mk +++ b/device-common.mk @@ -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. From f24353cf98bb156a9310ed4ef8118b44d4f2710b Mon Sep 17 00:00:00 2001 From: Syed Saifuddin Khazi Date: Fri, 23 Feb 2024 03:03:38 +0000 Subject: [PATCH 77/89] Revert "Remove default PixelSatelliteService package name" This reverts commit f59161aafbfd07411678de6ce3ed2fcffbfe2d04. Reason for revert: Enable and disable controlled through requestIsSatelliteSupported Change-Id: Ic84463fcb9c9f7ba4e1f01f0f88f605cae752a0a --- overlay/frameworks/base/core/res/res/values/config.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml index 5b8ebf1..71ca865 100644 --- a/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -311,6 +311,9 @@ 100% + + com.google.android.satellite + com.google.android.apps.scone From e702d6fe371983f3c583b7d4e9d2939f84ae571b Mon Sep 17 00:00:00 2001 From: Muralidhar Reddy Date: Fri, 3 Nov 2023 04:43:27 +0000 Subject: [PATCH 78/89] [LPA][Zumapro] Add notification pregrant Bug: 326561036 Test: build Change-Id: I1cf20adea590fe128e451c21ce5387bb1717c94d --- default-permissions.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/default-permissions.xml b/default-permissions.xml index be8d691..384d66b 100644 --- a/default-permissions.xml +++ b/default-permissions.xml @@ -143,5 +143,10 @@ + + + + From 01d91decf89b9a9ca1abd0da1f4cfd1ffb33864b Mon Sep 17 00:00:00 2001 From: Evgenii Stepanov Date: Fri, 23 Feb 2024 11:18:12 -0800 Subject: [PATCH 79/89] Disable KASan in non-fullmte builds. Bug: 326616235 Test: cat /proc/cmdline | grep kasan=off Change-Id: Icb71416f242863de8307b0021fc898e7ab4df084 --- BoardConfig-common.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/BoardConfig-common.mk b/BoardConfig-common.mk index a1ef4f6..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 From f7c376cd9642d83efa71dd701f28dfa77b122cad Mon Sep 17 00:00:00 2001 From: Hongyang Jiao Date: Fri, 23 Feb 2024 19:38:43 +0000 Subject: [PATCH 80/89] Add betterbug mk to zumapro Bug: 322543833 Test: local test, recorded in http://shortn/_iEz9DTCHgo Change-Id: I41ba5ae1a3147aeb8528ab9513242c76b48f1f27 --- device.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/device.mk b/device.mk index df3769d..b7442df 100644 --- a/device.mk +++ b/device.mk @@ -41,6 +41,7 @@ include device/google/gs-common/sota_app/factoryota.mk include device/google/gs-common/misc_writer/misc_writer.mk include device/google/gs-common/gyotaku_app/gyotaku.mk include device/google/gs-common/bootctrl/bootctrl_aidl.mk +include device/google/gs-common/betterbug/betterbug.mk include device/google/zumapro/dumpstate/item.mk From 154ec866ddb7580271aabf5a66f70fa4ef7c6815 Mon Sep 17 00:00:00 2001 From: derickhong Date: Mon, 26 Feb 2024 12:22:52 +0800 Subject: [PATCH 81/89] display: zumapro: update Adaptive Brightness Curve change max value from 2000 to 2050 Bug: 298738593 Test: adb shell dumpsys display | grep mBrightnessLevelsNits Change-Id: I2c0f1d978e7d38c07e78e8246d9708a3f9d5ccfa --- overlay/frameworks/base/core/res/res/values/config.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml index 1282bd1..6120d77 100644 --- a/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -410,7 +410,7 @@ 1897.082235 1958.157391 1992.433376 - 2000 + 2050