[automerger skipped] Merge 24Q4 (ab/12406339) into aosp-main-future am: 61302f297c -s ours

am skip reason: Merged-In Idd70cf3d846fad1a25060ebfb6ae6a99599fd861 with SHA-1 d43a6e1c5a is already in history

Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs-common/+/30284589

Change-Id: I323ceafb8b8140a941b906990b0cb63e3c941515
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/aoc/aoc.mk b/aoc/aoc.mk
index 136bb42..9ee4517 100644
--- a/aoc/aoc.mk
+++ b/aoc/aoc.mk
@@ -4,12 +4,6 @@
 		    aocd \
 		    aocxd
 
-ifeq (,$(filter aosp_%,$(TARGET_PRODUCT)))
-# IAudioMetricExt HIDL
-PRODUCT_PACKAGES += \
-    vendor.google.audiometricext@1.0-service-vendor
-endif
-
 # If AoC Daemon is not present on this build, load firmware at boot via rc
 ifeq ($(wildcard vendor/google/whitechapel/aoc/aocd),)
 PRODUCT_COPY_FILES += \
diff --git a/aoc/sepolicy/file_contexts b/aoc/sepolicy/file_contexts
index 73293f7..778de0c 100644
--- a/aoc/sepolicy/file_contexts
+++ b/aoc/sepolicy/file_contexts
@@ -34,6 +34,9 @@
 /dev/acd-chre_bt_offload_ctl        u:object_r:aoc_device:s0
 /dev/acd-chre_bt_offload_data_tx    u:object_r:aoc_device:s0
 /dev/acd-chre_bt_offload_data_rx    u:object_r:aoc_device:s0
+/dev/acd-chre_ctl                   u:object_r:aoc_device:s0
+/dev/acd-chre_data_tx               u:object_r:aoc_device:s0
+/dev/acd-chre_data_rx               u:object_r:aoc_device:s0
 
 # AoC vendor binaries
 /vendor/bin/aocd                    u:object_r:aocd_exec:s0
diff --git a/audio/aidl.mk b/audio/aidl.mk
index e06ac0b..7dd56bc 100644
--- a/audio/aidl.mk
+++ b/audio/aidl.mk
@@ -27,4 +27,11 @@
 PRODUCT_SYSTEM_EXT_PROPERTIES += \
        ro.audio.ihaladaptervendorextension_enabled=true
 
+ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
+$(call soong_config_set,aoc_audio_func,dump_usecase_data,true)
+$(call soong_config_set,aoc_audio_func,hal_socket_control,true)
+$(call soong_config_set,aoc_audio_func,record_tuning_keys,true)
+$(call soong_config_set,aoc_audio_func,aidl_command_interface,true)
+endif
+
 $(call soong_config_set,pixel_audio_hal_type,aidl_build,true)
diff --git a/audio/aidl/device_framework_matrix_product.xml b/audio/aidl/device_framework_matrix_product.xml
index 0e7e998..570c5d4 100644
--- a/audio/aidl/device_framework_matrix_product.xml
+++ b/audio/aidl/device_framework_matrix_product.xml
@@ -1,15 +1,7 @@
 <compatibility-matrix version="1.0" type="framework">
-    <hal format="hidl">
-       <name>vendor.google.audiometricext</name>
-       <version>1.0</version>
-       <interface>
-           <name>IAudioMetricExt</name>
-           <instance>default</instance>
-       </interface>
-    </hal>
     <hal format="aidl">
         <name>vendor.google.whitechapel.audio.extension</name>
-        <version>3</version>
+        <version>4</version>
         <interface>
             <name>IAudioExtension</name>
             <instance>default</instance>
diff --git a/audio/aidl/manifest.xml b/audio/aidl/manifest.xml
index 237aa4a..daeb1c4 100644
--- a/audio/aidl/manifest.xml
+++ b/audio/aidl/manifest.xml
@@ -1,11 +1,2 @@
 <manifest version="1.0" type="device">
-    <hal format="hidl">
-       <name>vendor.google.audiometricext</name>
-       <transport>hwbinder</transport>
-       <version>1.0</version>
-       <interface>
-           <name>IAudioMetricExt</name>
-           <instance>default</instance>
-       </interface>
-    </hal>
 </manifest>
diff --git a/audio/hidl_gs101.mk b/audio/hidl_gs101.mk
index f764e7a..4ccbbfb 100644
--- a/audio/hidl_gs101.mk
+++ b/audio/hidl_gs101.mk
@@ -32,8 +32,14 @@
 	libamcsextfile \
 	audio_amcs_ext \
 
+ifeq (,$(filter aosp_%,$(TARGET_PRODUCT)))
+# IAudioMetricExt HIDL
+PRODUCT_PACKAGES += \
+	vendor.google.audiometricext@1.0-service-vendor
+endif
+
 BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/audio/sepolicy/hidl
 
 include device/google/gs-common/audio/common.mk
 
-DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE += device/google/gs-common/audio/hidl/device_framework_matrix_product_gs101.xml
+DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE += device/google/gs-common/audio/hidl/device_framework_matrix_product_gs101.xml
\ No newline at end of file
diff --git a/audio/hidl_gs201.mk b/audio/hidl_gs201.mk
index 1438b27..c183b9a 100644
--- a/audio/hidl_gs201.mk
+++ b/audio/hidl_gs201.mk
@@ -32,6 +32,12 @@
 	audio_spk_35l41 \
 	sound_trigger.primary.$(TARGET_BOARD_PLATFORM)
 
+ifeq (,$(filter aosp_%,$(TARGET_PRODUCT)))
+# IAudioMetricExt HIDL
+PRODUCT_PACKAGES += \
+	vendor.google.audiometricext@1.0-service-vendor
+endif
+
 BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/audio/sepolicy/hidl
 
 include device/google/gs-common/audio/common.mk
diff --git a/audio/hidl_zuma.mk b/audio/hidl_zuma.mk
index 41dd02a..6fb3449 100644
--- a/audio/hidl_zuma.mk
+++ b/audio/hidl_zuma.mk
@@ -35,6 +35,12 @@
 	audio_hdmi_aoc \
 	sound_trigger.primary.$(TARGET_BOARD_PLATFORM)
 
+ifeq (,$(filter aosp_%,$(TARGET_PRODUCT)))
+# IAudioMetricExt HIDL
+PRODUCT_PACKAGES += \
+	vendor.google.audiometricext@1.0-service-vendor
+endif
+
 BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/audio/sepolicy/hidl
 BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/audio/sepolicy/hdmi_audio
 
diff --git a/audio/sepolicy/common/hal_audio_default.te b/audio/sepolicy/common/hal_audio_default.te
index f6e0e5d..e917b73 100644
--- a/audio/sepolicy/common/hal_audio_default.te
+++ b/audio/sepolicy/common/hal_audio_default.te
@@ -15,6 +15,7 @@
 allow hal_audio_default sysfs_pixelstats:file rw_file_perms;
 allow hal_audio_default sysfs_extcon:dir search;
 allow hal_audio_default sysfs_extcon:file r_file_perms;
+allow hal_audio_default vendor_usb_debugfs:dir search;
 
 #allow access to aoc and kernel boottime
 allow hal_audio_default sysfs_aoc:dir { search };
diff --git a/battery_mitigation/sepolicy/vendor/dumpstate.te b/battery_mitigation/sepolicy/vendor/dumpstate.te
index bb84ff2..b3bb1d4 100644
--- a/battery_mitigation/sepolicy/vendor/dumpstate.te
+++ b/battery_mitigation/sepolicy/vendor/dumpstate.te
@@ -1,21 +1,3 @@
 # To call battery_mitigation hal
 allow dumpstate hal_battery_mitigation_service:service_manager find;
 binder_call(dumpstate, battery_mitigation);
-
-allow hal_dumpstate_default sysfs_acpm_stats:dir { read open search };
-allow hal_dumpstate_default sysfs_acpm_stats:file { read open getattr };
-allow hal_dumpstate_default sysfs_cpu:file { read open getattr };
-allow hal_dumpstate_default sysfs_batteryinfo:dir { read open search };
-allow hal_dumpstate_default sysfs_batteryinfo:file { read open getattr };
-allow hal_dumpstate_default logbuffer_device:chr_file { read open getattr };
-allow hal_dumpstate_default mitigation_vendor_data_file:file { read open getattr };
-allow hal_dumpstate_default mitigation_vendor_data_file:dir { search };
-allow hal_dumpstate_default sysfs_bcl:dir { read open search };
-allow hal_dumpstate_default sysfs_bcl:file { read open getattr };
-allow hal_dumpstate_default vendor_file:file { execute_no_trans };
-allow hal_dumpstate_default battery_history_device:chr_file { read };
-
-
-userdebug_or_eng(`
-  allow hal_dumpstate_default vendor_pm_genpd_debugfs:file { read open getattr };
-')
diff --git a/bluetooth/bluetooth.mk b/bluetooth/bluetooth.mk
new file mode 100644
index 0000000..29ddb9c
--- /dev/null
+++ b/bluetooth/bluetooth.mk
@@ -0,0 +1,16 @@
+PRODUCT_SOONG_NAMESPACES += vendor/google/connectivity/bluetooth/common
+PRODUCT_PACKAGES += \
+       android.hardware.bluetooth-V1-ndk.so \
+       android.hardware.bluetooth.finder-V1-ndk.so \
+       android.hardware.bluetooth.ranging-V1-ndk.so \
+       android.hardware.bluetooth-service.pixel \
+       vendor.google.bluetooth_ext-V1-ndk.so \
+       bt_vendor.conf \
+       android.hardware.bluetooth.prebuilt.xml \
+       android.hardware.bluetooth_le.prebuilt.xml
+
+BOARD_SEPOLICY_DIRS += device/google/gs-common/bluetooth/sepolicy
+BOARD_SEPOLICY_DIRS += hardware/google/pixel-sepolicy/powerstats
+
+DEVICE_MANIFEST_FILE += device/google/gs-common/bluetooth/manifest_bluetooth.xml
+DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE += device/google/gs-common/bluetooth/compatibility_matrix.xml
diff --git a/bluetooth/compatibility_matrix.xml b/bluetooth/compatibility_matrix.xml
new file mode 100644
index 0000000..65b0c6d
--- /dev/null
+++ b/bluetooth/compatibility_matrix.xml
@@ -0,0 +1,30 @@
+<compatibility-matrix version="1.0" type="framework">
+    <hal format="aidl" optional="true">
+        <name>vendor.google.bluetooth_ext</name>
+        <version>1</version>
+        <interface>
+            <name>IBluetoothFinder</name>
+            <instance>default</instance>
+        </interface>
+        <interface>
+            <name>IBluetoothCcc</name>
+            <instance>default</instance>
+        </interface>
+        <interface>
+            <name>IBTChannelAvoidance</name>
+            <instance>default</instance>
+        </interface>
+        <interface>
+            <name>IBluetoothSar</name>
+            <instance>default</instance>
+        </interface>
+        <interface>
+            <name>IBluetoothExt</name>
+            <instance>default</instance>
+        </interface>
+        <interface>
+            <name>IBluetoothEwp</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
+</compatibility-matrix>
diff --git a/bluetooth/dump/Android.bp b/bluetooth/dump/Android.bp
new file mode 100644
index 0000000..72e83b4
--- /dev/null
+++ b/bluetooth/dump/Android.bp
@@ -0,0 +1,20 @@
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
+cc_binary {
+    name: "dump_bt",
+    srcs: ["dump.cpp"],
+    cflags: [
+        "-Wall",
+        "-Wextra",
+        "-Werror",
+    ],
+    shared_libs: [
+        "libbase",
+        "libdump",
+        "liblog",
+    ],
+    vendor: true,
+    relative_install_path: "dump",
+}
diff --git a/bluetooth/dump/dump.cpp b/bluetooth/dump/dump.cpp
new file mode 100644
index 0000000..db92c3c
--- /dev/null
+++ b/bluetooth/dump/dump.cpp
@@ -0,0 +1,44 @@
+/*
+ * Copyright 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.
+ */
+#include <dump/pixel_dump.h>
+#include <android-base/file.h>
+
+#define PIXELBT_ACTIVITY_LOG_DIRECTORY "/data/vendor/bluetooth"
+#define PIXELBT_SNOOP_LOG_DIRECTORY "/data/vendor/bluetooth"
+#define PIXELBT_FW_LOG_DIRECTORY "/data/vendor/ssrdump/coredump"
+#define PIXELBT_SNOOP_LOG_PREFIX "btsnoop_hci_vnd"
+#define PIXELBT_BACKUP_SNOOP_LOG_PREFIX "backup_btsnoop_hci_vnd"
+#define PIXELBT_FW_DUMP_LOG_PREFIX "coredump_bt_socdump_"
+#define PIXELBT_CHRE_DUMP_LOG_PREFIX "coredump_bt_chredump_"
+#define PIXELBT_HAL_DUMP_LOG_PREFIX "coredump_bt_"
+#define PIXELBT_ACTIVITY_LOG_PREFIX "bt_activity_"
+
+int main() {
+    std::string outputDir = concatenatePath(BUGREPORT_PACKING_DIR, "bt");
+    if (mkdir(outputDir.c_str(), 0777) == -1) {
+        printf("Unable to create folder: %s\n", outputDir.c_str());
+        return 0;
+    }
+
+    dumpLogs(PIXELBT_SNOOP_LOG_DIRECTORY, outputDir.c_str(), 4,
+             PIXELBT_SNOOP_LOG_PREFIX);
+    dumpLogs(PIXELBT_SNOOP_LOG_DIRECTORY, outputDir.c_str(), 2, PIXELBT_BACKUP_SNOOP_LOG_PREFIX);
+    dumpLogs(PIXELBT_FW_LOG_DIRECTORY, outputDir.c_str(), 10, PIXELBT_FW_DUMP_LOG_PREFIX);
+    dumpLogs(PIXELBT_FW_LOG_DIRECTORY, outputDir.c_str(), 10, PIXELBT_CHRE_DUMP_LOG_PREFIX);
+    dumpLogs(PIXELBT_FW_LOG_DIRECTORY, outputDir.c_str(), 10, PIXELBT_HAL_DUMP_LOG_PREFIX);
+    dumpLogs(PIXELBT_ACTIVITY_LOG_DIRECTORY, outputDir.c_str(), 10, PIXELBT_ACTIVITY_LOG_PREFIX);
+    return 0;
+}
diff --git a/bluetooth/dump/dumplog.mk b/bluetooth/dump/dumplog.mk
new file mode 100644
index 0000000..51c3b3c
--- /dev/null
+++ b/bluetooth/dump/dumplog.mk
@@ -0,0 +1,3 @@
+BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/bluetooth/dump/sepolicy/
+
+PRODUCT_PACKAGES_DEBUG += dump_bt
diff --git a/bluetooth/dump/sepolicy/dump.te b/bluetooth/dump/sepolicy/dump.te
new file mode 100644
index 0000000..fdd123e
--- /dev/null
+++ b/bluetooth/dump/sepolicy/dump.te
@@ -0,0 +1,12 @@
+# pixel bluetooth common hal service
+pixel_bugreport(dump_bt)
+
+allow hal_dumpstate_default vendor_bt_data_file:dir { open read search };
+allow hal_dumpstate_default vendor_bt_data_file:file read;
+allow dump_bt radio_vendor_data_file:dir create_dir_perms;
+allow dump_bt radio_vendor_data_file:file create_file_perms;
+allow dump_bt vendor_bt_data_file:dir r_dir_perms;
+allow dump_bt vendor_bt_data_file:file r_file_perms;
+allow dump_bt sscoredump_vendor_data_crashinfo_file:dir search;
+allow dump_bt sscoredump_vendor_data_coredump_file:dir r_dir_perms;
+allow dump_bt sscoredump_vendor_data_coredump_file:file r_file_perms;
diff --git a/bluetooth/dump/sepolicy/file_contexts b/bluetooth/dump/sepolicy/file_contexts
new file mode 100644
index 0000000..da28d10
--- /dev/null
+++ b/bluetooth/dump/sepolicy/file_contexts
@@ -0,0 +1,2 @@
+# bt common hal dump_bt service
+/vendor/bin/dump/dump_bt           u:object_r:dump_bt_exec:s0
diff --git a/bluetooth/manifest_bluetooth.xml b/bluetooth/manifest_bluetooth.xml
new file mode 100644
index 0000000..a72f1c9
--- /dev/null
+++ b/bluetooth/manifest_bluetooth.xml
@@ -0,0 +1,27 @@
+<manifest version="1.0" type="device">
+    <hal format="aidl">
+        <name>android.hardware.bluetooth</name>
+        <version>1</version>
+        <fqname>IBluetoothHci/default</fqname>
+    </hal>
+    <hal format="aidl">
+        <name>android.hardware.bluetooth.finder</name>
+        <version>1</version>
+        <fqname>IBluetoothFinder/default</fqname>
+    </hal>
+    <hal format="aidl">
+        <name>android.hardware.bluetooth.ranging</name>
+        <version>1</version>
+        <fqname>IBluetoothChannelSounding/default</fqname>
+    </hal>
+    <hal format="aidl">
+        <name>vendor.google.bluetooth_ext</name>
+        <version>1</version>
+        <fqname>IBTChannelAvoidance/default</fqname>
+        <fqname>IBluetoothCcc/default</fqname>
+        <fqname>IBluetoothEwp/default</fqname>
+        <fqname>IBluetoothExt/default</fqname>
+        <fqname>IBluetoothFinder/default</fqname>
+        <fqname>IBluetoothSar/default</fqname>
+    </hal>
+</manifest>
diff --git a/bluetooth/sepolicy/device.te b/bluetooth/sepolicy/device.te
new file mode 100644
index 0000000..a256332
--- /dev/null
+++ b/bluetooth/sepolicy/device.te
@@ -0,0 +1,3 @@
+# Bt Wifi Coexistence device
+type wb_coexistence_dev, dev_type;
+
diff --git a/bluetooth/sepolicy/file_contexts b/bluetooth/sepolicy/file_contexts
new file mode 100644
index 0000000..e7c2617
--- /dev/null
+++ b/bluetooth/sepolicy/file_contexts
@@ -0,0 +1,6 @@
+# Bluetooth
+/vendor/bin/hw/android\.hardware\.bluetooth-service\.pixel    u:object_r:hal_bluetooth_btlinux_exec:s0
+
+/dev/wbrc                           u:object_r:wb_coexistence_dev:s0
+/dev/ttySAC16                       u:object_r:hci_attach_dev:s0
+
diff --git a/bluetooth/sepolicy/genfs_contexts b/bluetooth/sepolicy/genfs_contexts
new file mode 100644
index 0000000..899041b
--- /dev/null
+++ b/bluetooth/sepolicy/genfs_contexts
@@ -0,0 +1,8 @@
+# Bluetooth pin control device node
+genfscon sysfs /devices/platform/odm/odm:btbcm/rfkill/rfkill0/state                             u:object_r:sysfs_bluetooth_writable:s0
+genfscon sysfs /devices/platform/odm/odm:btbcm/rfkill/rfkill2/state                             u:object_r:sysfs_bluetooth_writable:s0
+genfscon proc /bluetooth/sleep/lpm                                                              u:object_r:proc_bluetooth_writable:s0
+genfscon proc /bluetooth/sleep/btwrite                                                          u:object_r:proc_bluetooth_writable:s0
+genfscon proc /bluetooth/sleep/btwake                                                           u:object_r:proc_bluetooth_writable:s0
+genfscon proc /bluetooth/timesync                                                               u:object_r:proc_bluetooth_writable:s0
+
diff --git a/bluetooth/sepolicy/hal_bluetooth_btlinux.te b/bluetooth/sepolicy/hal_bluetooth_btlinux.te
new file mode 100644
index 0000000..0c85cb0
--- /dev/null
+++ b/bluetooth/sepolicy/hal_bluetooth_btlinux.te
@@ -0,0 +1,19 @@
+# coexistence device file node
+add_hwservice(hal_bluetooth_btlinux, hal_bluetooth_coexistence_hwservice);
+add_service(hal_bluetooth_btlinux, hal_bluetooth_coexistence_service);
+allow hal_bluetooth_btlinux wb_coexistence_dev:chr_file rw_file_perms;
+
+# power stats
+allow hal_bluetooth_btlinux hal_power_stats_vendor_service:service_manager find;
+binder_call(hal_bluetooth_btlinux, hal_power_stats_default)
+
+# bt firmware dump
+allow hal_bluetooth_btlinux aconfig_storage_metadata_file:dir search;
+allow hal_bluetooth_btlinux sscoredump_vendor_data_crashinfo_file:dir rw_dir_perms;
+allow hal_bluetooth_btlinux sscoredump_vendor_data_crashinfo_file:file rw_file_perms;
+
+userdebug_or_eng(`
+  allow hal_bluetooth_btlinux sscoredump_vendor_data_coredump_file:dir create_dir_perms;
+  allow hal_bluetooth_btlinux sscoredump_vendor_data_coredump_file:file create_file_perms;
+  allow hal_bluetooth_btlinux logbuffer_device:chr_file r_file_perms;
+')
diff --git a/bluetooth/sepolicy/hwservice.te b/bluetooth/sepolicy/hwservice.te
new file mode 100644
index 0000000..5e36cd0
--- /dev/null
+++ b/bluetooth/sepolicy/hwservice.te
@@ -0,0 +1,3 @@
+# Bluetooth HAL extension
+type hal_bluetooth_coexistence_hwservice, hwservice_manager_type, vendor_hwservice_type;
+
diff --git a/bluetooth/sepolicy/hwservice_contexts b/bluetooth/sepolicy/hwservice_contexts
new file mode 100644
index 0000000..8480b4e
--- /dev/null
+++ b/bluetooth/sepolicy/hwservice_contexts
@@ -0,0 +1,6 @@
+# Bluetooth HAL extension
+hardware.google.bluetooth.bt_channel_avoidance::IBTChannelAvoidance   u:object_r:hal_bluetooth_coexistence_hwservice:s0
+hardware.google.bluetooth.sar::IBluetoothSar                          u:object_r:hal_bluetooth_coexistence_hwservice:s0
+hardware.google.bluetooth.ccc::IBluetoothCcc                          u:object_r:hal_bluetooth_coexistence_hwservice:s0
+hardware.google.bluetooth.ewp::IBluetoothEwp                          u:object_r:hal_bluetooth_coexistence_hwservice:s0
+hardware.google.bluetooth.ext::IBluetoothExt                          u:object_r:hal_bluetooth_coexistence_hwservice:s0
diff --git a/bluetooth/sepolicy/service.te b/bluetooth/sepolicy/service.te
new file mode 100644
index 0000000..b8403da
--- /dev/null
+++ b/bluetooth/sepolicy/service.te
@@ -0,0 +1,2 @@
+# Bluetooth HAL extension
+type hal_bluetooth_coexistence_service, hal_service_type, service_manager_type;
diff --git a/bluetooth/sepolicy/service_contexts b/bluetooth/sepolicy/service_contexts
new file mode 100644
index 0000000..4aecc90
--- /dev/null
+++ b/bluetooth/sepolicy/service_contexts
@@ -0,0 +1,7 @@
+# Bluetooth HAL extension
+vendor.google.bluetooth_ext.IBTChannelAvoidance/default                      u:object_r:hal_bluetooth_coexistence_service:s0
+vendor.google.bluetooth_ext.IBluetoothSar/default                            u:object_r:hal_bluetooth_coexistence_service:s0
+vendor.google.bluetooth_ext.IBluetoothCcc/default                            u:object_r:hal_bluetooth_coexistence_service:s0
+vendor.google.bluetooth_ext.IBluetoothEwp/default                            u:object_r:hal_bluetooth_coexistence_service:s0
+vendor.google.bluetooth_ext.IBluetoothExt/default                            u:object_r:hal_bluetooth_coexistence_service:s0
+vendor.google.bluetooth_ext.IBluetoothFinder/default                         u:object_r:hal_bluetooth_coexistence_service:s0
diff --git a/dauntless/gsc.mk b/dauntless/gsc.mk
index c1cf0e0..b563cc4 100644
--- a/dauntless/gsc.mk
+++ b/dauntless/gsc.mk
@@ -1,6 +1,6 @@
 # Dauntless
 BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/dauntless/sepolicy
-ifneq ($(wildcard vendor),)
+ifneq ($(wildcard vendor/google_nos),)
 PRODUCT_SOONG_NAMESPACES += vendor/google_nos/init/dauntless
 
 PRODUCT_PACKAGES += \
@@ -92,4 +92,4 @@
 $(call dist-for-goals,droid,vendor/google_nos/prebuilts/dauntless/intermediate_images/d3m2_intermediate.ec.bin)
 endif
 
-endif # $(wildcard vendor)
+endif # $(wildcard vendor/google_nos)
diff --git a/display/dump_display.cpp b/display/dump_display.cpp
index 2df6b4b..f57a134 100644
--- a/display/dump_display.cpp
+++ b/display/dump_display.cpp
@@ -16,15 +16,15 @@
 #include <dump/pixel_dump.h>
 #include <android-base/file.h>
 
-
 int main() {
     setbuf(stdout, NULL);
     dumpFileContent("DECON-0 counters /sys/class/drm/card0/device/decon0/counters", "/sys/class/drm/card0/device/decon0/counters");
     dumpFileContent("CRTC-0 event log", "/sys/kernel/debug/dri/0/crtc-0/event");
     runCommand("libdisplaycolor", "/vendor/bin/dumpsys displaycolor -v");
-    dumpFileContent("Primary panel name", "/sys/devices/platform/exynos-drm/primary-panel/panel_name");
-    dumpFileContent("Primary panel extra info", "/sys/devices/platform/exynos-drm/primary-panel/panel_extinfo");
-    dumpFileContent("Primary panel power Vreg", "/sys/devices/platform/exynos-drm/primary-panel/panel_pwr_vreg");
-    dumpFileContent("Primary panel power mode register", "/sys/devices/platform/exynos-drm/primary-panel/power_mode");
+
+    dumpFileContent("Primary panel name", "/sys/class/drm/card0/device/primary-panel/panel_name");
+    dumpFileContent("Primary panel extra info", "/sys/class/drm/card0/device/primary-panel/panel_extinfo");
+    dumpFileContent("Primary panel power Vreg", "/sys/class/drm/card0/device/primary-panel/panel_pwr_vreg");
+    dumpFileContent("Primary panel power mode register", "/sys/class/drm/card0/device/primary-panel/power_mode");
     return 0;
-}
\ No newline at end of file
+}
diff --git a/display/dump_display_userdebug.sh b/display/dump_display_userdebug.sh
index b66a4fe..84b7311 100644
--- a/display/dump_display_userdebug.sh
+++ b/display/dump_display_userdebug.sh
@@ -1,4 +1,8 @@
 #!/vendor/bin/sh
+display_trace_path="/sys/kernel/tracing/instances/pixel-display/trace"
+echo "------ Display Trace ($display_trace_path)------"
+cat $display_trace_path
+
 echo "------ HWC Fence States ------"
 for f in $(ls /data/vendor/log/hwc/*_hwc_fence_state*.txt)
 do
diff --git a/display/dump_second_display.cpp b/display/dump_second_display.cpp
index 80ea909..9590c7f 100644
--- a/display/dump_second_display.cpp
+++ b/display/dump_second_display.cpp
@@ -18,9 +18,9 @@
 int main() {
     dumpFileContent("DECON-1 counters /sys/class/drm/card0/device/decon1/counters", "/sys/class/drm/card0/device/decon1/counters");
     dumpFileContent("CRTC-1 event log", "/sys/kernel/debug/dri/0/crtc-1/event");
-    dumpFileContent("Secondary panel name", "/sys/devices/platform/exynos-drm/secondary-panel/panel_name");
-    dumpFileContent("Secondary panel extra info", "/sys/devices/platform/exynos-drm/secondary-panel/panel_extinfo");
-    dumpFileContent("Secondary panel power mode register", "/sys/devices/platform/exynos-drm/secondary-panel/power_mode");
+
+    dumpFileContent("Secondary panel name", "/sys/class/drm/card0/device/secondary-panel/panel_name");
+    dumpFileContent("Secondary panel extra info", "/sys/class/drm/card0/device/secondary-panel/panel_extinfo");
+    dumpFileContent("Secondary panel power mode register", "/sys/class/drm/card0/device/secondary-panel/power_mode");
     return 0;
 }
-
diff --git a/display/sepolicy/dump_display.te b/display/sepolicy/dump_display.te
index b8fd1b8..3e2cb69 100644
--- a/display/sepolicy/dump_display.te
+++ b/display/sepolicy/dump_display.te
@@ -1,3 +1,4 @@
+# Display (dump for bugreport)
 pixel_bugreport(dump_display)
 
 allow dump_display sysfs_display:file r_file_perms;
diff --git a/display/sepolicy/dump_display_userdebug.te b/display/sepolicy/dump_display_userdebug.te
index a3f83bb..c08fb29 100644
--- a/display/sepolicy/dump_display_userdebug.te
+++ b/display/sepolicy/dump_display_userdebug.te
@@ -1,3 +1,4 @@
+# Display eng/userdebug (dump for bugreport)
 pixel_bugreport(dump_display_userdebug)
 
 userdebug_or_eng(`
@@ -5,4 +6,6 @@
   allow dump_display_userdebug vendor_log_file:dir search;
   allow dump_display_userdebug vendor_hwc_log_file:dir r_dir_perms;
   allow dump_display_userdebug vendor_hwc_log_file:file r_file_perms;
+  allow dump_display_userdebug debugfs_tracing_instances:dir search;
+  allow dump_display_userdebug debugfs_tracing_instances:file r_file_perms;
 ')
diff --git a/dump_chip_info/Android.bp b/dump_chip_info/Android.bp
new file mode 100644
index 0000000..4a13160
--- /dev/null
+++ b/dump_chip_info/Android.bp
@@ -0,0 +1,20 @@
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
+cc_binary {
+    name: "dump_chip_info",
+    srcs: ["dump_chip_info.cpp"],
+    cflags: [
+        "-Wall",
+        "-Wextra",
+        "-Werror",
+    ],
+    shared_libs: [
+        "libbase",
+        "libdump",
+        "liblog",
+    ],
+    vendor: true,
+    relative_install_path: "dump",
+}
diff --git a/dump_chip_info/chip_info.mk b/dump_chip_info/chip_info.mk
new file mode 100644
index 0000000..a0d8317
--- /dev/null
+++ b/dump_chip_info/chip_info.mk
@@ -0,0 +1,3 @@
+BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/dump_chip_info/sepolicy
+
+PRODUCT_PACKAGES += dump_chip_info
diff --git a/dump_chip_info/dump_chip_info.cpp b/dump_chip_info/dump_chip_info.cpp
new file mode 100644
index 0000000..dd83743
--- /dev/null
+++ b/dump_chip_info/dump_chip_info.cpp
@@ -0,0 +1,24 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include <dump/pixel_dump.h>
+#include <android-base/file.h>
+
+int main() {
+    dumpFileContent("ap_rom_patch_ver", "/sys/devices/system/goog-chip-info/ap_rom_patch_ver");
+    dumpFileContent("gpcm_asic_id", "/sys/devices/system/goog-chip-info/gpcm_asic_id");
+
+    return 0;
+}
diff --git a/dump_chip_info/sepolicy/dump_chip_info.te b/dump_chip_info/sepolicy/dump_chip_info.te
new file mode 100644
index 0000000..936d425
--- /dev/null
+++ b/dump_chip_info/sepolicy/dump_chip_info.te
@@ -0,0 +1,3 @@
+#
+pixel_bugreport(dump_chip_info)
+allow dump_chip_info sysfs_chip_info:file r_file_perms;
diff --git a/dump_chip_info/sepolicy/file.te b/dump_chip_info/sepolicy/file.te
new file mode 100644
index 0000000..80900b0
--- /dev/null
+++ b/dump_chip_info/sepolicy/file.te
@@ -0,0 +1,2 @@
+#
+type sysfs_chip_info, sysfs_type, fs_type;
diff --git a/dump_chip_info/sepolicy/file_contexts b/dump_chip_info/sepolicy/file_contexts
new file mode 100644
index 0000000..b9f4b21
--- /dev/null
+++ b/dump_chip_info/sepolicy/file_contexts
@@ -0,0 +1 @@
+/vendor/bin/dump/dump_chip_info     u:object_r:dump_chip_info_exec:s0
diff --git a/dump_chip_info/sepolicy/genfs_contexts b/dump_chip_info/sepolicy/genfs_contexts
new file mode 100644
index 0000000..3fda2de
--- /dev/null
+++ b/dump_chip_info/sepolicy/genfs_contexts
@@ -0,0 +1,2 @@
+genfscon sysfs /devices/system/goog-chip-info/ap_rom_patch_ver u:object_r:sysfs_chip_info:s0
+genfscon sysfs /devices/system/goog-chip-info/gpcm_asic_id     u:object_r:sysfs_chip_info:s0
diff --git a/edgetpu/edgetpu.mk b/edgetpu/edgetpu.mk
index feb728f..9f7e1de 100644
--- a/edgetpu/edgetpu.mk
+++ b/edgetpu/edgetpu.mk
@@ -19,10 +19,6 @@
 # TPU TFlite Delegate
 PRODUCT_PACKAGES += \
         libedgetpu_util
-# TPU DBA AIDL HAL service
-PRODUCT_PACKAGES += com.google.edgetpu.dba-service
-# TPU DBA C API library
-PRODUCT_PACKAGES += libedgetpu_dba.google
 # TPU Tachyon HAL service
 PRODUCT_PACKAGES += com.google.edgetpu.tachyon-service
 # TPU Tachyon C API library
diff --git a/esim/init.esim-gs.rc b/esim/init.esim-gs.rc
index 291f9ee..ce27334 100644
--- a/esim/init.esim-gs.rc
+++ b/esim/init.esim-gs.rc
@@ -2,6 +2,10 @@
 on property:ro.build.type=user && property:ro.boot.flash.locked=0
     setprop setupwizard.feature.provisioning_profile_mode false
 
+# Disable bootstrap for UGS devices
+on property:ro.boot.warranty.sku=UGS
+    setprop setupwizard.feature.provisioning_profile_mode false
+
 # Disable bootstrap for DVT devices shipping to non-US carriers
 on property:ro.boot.warranty.sku=BOF
     setprop setupwizard.feature.provisioning_profile_mode false
diff --git a/esim/sepolicy/system_ext/private/gmscore_app.te b/esim/sepolicy/system_ext/private/gmscore_app.te
index 90bc371..4dc1639 100644
--- a/esim/sepolicy/system_ext/private/gmscore_app.te
+++ b/esim/sepolicy/system_ext/private/gmscore_app.te
@@ -1,2 +1,2 @@
 # Allow to read setupwizard_feature_prop
-get_prop(priv_app, setupwizard_feature_prop)
+get_prop(gmscore_app, setupwizard_feature_prop)
diff --git a/fingerprint/sepolicy/service_contexts b/fingerprint/sepolicy/service_contexts
new file mode 100644
index 0000000..4cc220f
--- /dev/null
+++ b/fingerprint/sepolicy/service_contexts
@@ -0,0 +1,2 @@
+# Fingerprint HAL extension
+vendor.goodix.hardware.biometrics.fingerprint.IGoodixFingerprintDaemon/default  u:object_r:hal_fingerprint_service:s0
diff --git a/gcam_app/sepolicy/product/private/debug_camera_app.te b/gcam_app/sepolicy/product/private/debug_camera_app.te
index 4402e55..9d4643d 100644
--- a/gcam_app/sepolicy/product/private/debug_camera_app.te
+++ b/gcam_app/sepolicy/product/private/debug_camera_app.te
@@ -1,28 +1,16 @@
 # GCANext and GCAEng.
-# b/363018500
 typeattribute debug_camera_app coredomain;
 
 userdebug_or_eng(`
 	app_domain(debug_camera_app)
 	net_domain(debug_camera_app)
 
-	allow debug_camera_app activity_service:service_manager find;
-	allow debug_camera_app activity_task_service:service_manager find;
+	allow debug_camera_app app_api_service:service_manager find;
 	allow debug_camera_app audioserver_service:service_manager find;
-	allow debug_camera_app batterystats_service:service_manager find;
 	allow debug_camera_app cameraserver_service:service_manager find;
-	allow debug_camera_app device_policy_service:service_manager find;
-	allow debug_camera_app device_state_service:service_manager find;
-	allow debug_camera_app gpu_service:service_manager find;
 	allow debug_camera_app mediaextractor_service:service_manager find;
 	allow debug_camera_app mediametrics_service:service_manager find;
 	allow debug_camera_app mediaserver_service:service_manager find;
-	allow debug_camera_app powerstats_service:service_manager find;
-	allow debug_camera_app sensorservice_service:service_manager find;
-	allow debug_camera_app thermal_service:service_manager find;
-	allow debug_camera_app trust_service:service_manager find;
-	allow debug_camera_app vibrator_manager_service:service_manager find;
-	allow debug_camera_app virtual_device_native_service:service_manager find;
 
 	# Allows GCA_Eng & GCA-Next to access the PowerHAL.
 	hal_client_domain(debug_camera_app, hal_power)
diff --git a/gcam_app/sepolicy/product/private/google_camera_app.te b/gcam_app/sepolicy/product/private/google_camera_app.te
index a4c7a79..2d3d73c 100644
--- a/gcam_app/sepolicy/product/private/google_camera_app.te
+++ b/gcam_app/sepolicy/product/private/google_camera_app.te
@@ -3,12 +3,12 @@
 app_domain(google_camera_app)
 net_domain(google_camera_app)
 
-#allow google_camera_app app_api_service:service_manager find;
-#allow google_camera_app audioserver_service:service_manager find;
-#allow google_camera_app cameraserver_service:service_manager find;
-#allow google_camera_app mediaextractor_service:service_manager find;
-#allow google_camera_app mediametrics_service:service_manager find;
-#allow google_camera_app mediaserver_service:service_manager find;
+allow google_camera_app app_api_service:service_manager find;
+allow google_camera_app audioserver_service:service_manager find;
+allow google_camera_app cameraserver_service:service_manager find;
+allow google_camera_app mediaextractor_service:service_manager find;
+allow google_camera_app mediametrics_service:service_manager find;
+allow google_camera_app mediaserver_service:service_manager find;
 
 # Allows GCA to access the PowerHAL.
 hal_client_domain(google_camera_app, hal_power)
diff --git a/gcam_app/sepolicy/product/public/debug_camera_app.te b/gcam_app/sepolicy/product/public/debug_camera_app.te
deleted file mode 100644
index 0572eee..0000000
--- a/gcam_app/sepolicy/product/public/debug_camera_app.te
+++ /dev/null
@@ -1,2 +0,0 @@
-# GCA-Eng and GCA-Next
-type debug_camera_app, domain;
diff --git a/gcam_app/sepolicy/product/public/google_camera_app.te b/gcam_app/sepolicy/product/public/google_camera_app.te
deleted file mode 100644
index a8d6512..0000000
--- a/gcam_app/sepolicy/product/public/google_camera_app.te
+++ /dev/null
@@ -1,2 +0,0 @@
-# GCA-Release and GCA-Dogfood
-type google_camera_app, domain;
diff --git a/gcam_app/sepolicy/vendor/google_camera_app.te b/gcam_app/sepolicy/vendor/google_camera_app.te
index 81f91ac..a1c3ddb 100644
--- a/gcam_app/sepolicy/vendor/google_camera_app.te
+++ b/gcam_app/sepolicy/vendor/google_camera_app.te
@@ -1,12 +1,12 @@
 # GCARelease and GCADogfood.
 
 # Allows GCA to acccess the GXP device & properties.
-#allow google_camera_app gxp_device:chr_file rw_file_perms;
+allow google_camera_app gxp_device:chr_file rw_file_perms;
 get_prop(google_camera_app, vendor_gxp_prop)
 
 # Allows GCA to find and access the EdgeTPU.
-#allow google_camera_app edgetpu_app_service:service_manager find;
-#allow google_camera_app edgetpu_device:chr_file { getattr read write ioctl map };
+allow google_camera_app edgetpu_app_service:service_manager find;
+allow google_camera_app edgetpu_device:chr_file { read write ioctl };
 
 # Allows GCA to access the hw_jpeg /dev/video12.
 #allow google_camera_app hw_jpg_device:chr_file rw_file_perms;
diff --git a/gear/dumpstate/sepolicy/hal_dumpstate_default.te b/gear/dumpstate/sepolicy/hal_dumpstate_default.te
index 06ebb75..e0f0b09 100644
--- a/gear/dumpstate/sepolicy/hal_dumpstate_default.te
+++ b/gear/dumpstate/sepolicy/hal_dumpstate_default.te
@@ -5,3 +5,8 @@
 allow hal_dumpstate_default shell_data_file:file getattr;
 set_prop(hal_dumpstate_default, vendor_logger_prop)
 
+# All dumps that are executed via hal_dumpstate_default should use their
+# own domain to request their permissions to achieve compartmentalization.
+# go/pixel-bugreport has examples on how to do that.
+neverallow hal_dumpstate_default { vendor_file_type -vendor_toolbox_exec }:file execute_no_trans;
+
diff --git a/gps/dump/dump_gps.cpp b/gps/dump/dump_gps.cpp
index 62f69f8..e073732 100644
--- a/gps/dump/dump_gps.cpp
+++ b/gps/dump/dump_gps.cpp
@@ -13,13 +13,16 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#include <unistd.h>
-#include <dump/pixel_dump.h>
-#include <android-base/properties.h>
 #include <android-base/file.h>
+#include <android-base/properties.h>
+#include <dirent.h>
+#include <dump/pixel_dump.h>
+#include <sys/stat.h>
+#include <unistd.h>
 
 #define GPS_LOG_NUMBER_PROPERTY "persist.vendor.gps.aol.log_num"
 #define GPS_LOG_DIRECTORY "/data/vendor/gps/logs"
+#define GPS_RESOURCE_DIRECTORY "/data/vendor/gps/resource"
 #define GPS_TMP_LOG_DIRECTORY "/data/vendor/gps/logs/.tmp"
 #define GPS_LOG_PREFIX "gl-"
 #define GPS_MCU_LOG_PREFIX "esw-"
@@ -29,6 +32,40 @@
 #define GPS_RAWLOG_PREFIX "rawbin"
 #define GPS_MEMDUMP_LOG_PREFIX "memdump_"
 
+static void copyDirectory(const std::string &source,
+                          const std::string &outputDir) {
+  DIR *dir = opendir(source.c_str());
+  if (dir == nullptr) {
+    return;
+  }
+
+  if (mkdir(outputDir.c_str(), 0777) == -1) {
+    closedir(dir);
+    return;
+  }
+
+  struct dirent *entry;
+  while ((entry = readdir(dir)) != nullptr) {
+    std::string entryName = entry->d_name;
+    if (entryName == "." || entryName == "..") {
+      continue;
+    }
+
+    std::string sourcePath = source + "/" + entryName;
+    std::string destPath = outputDir + "/" + entryName;
+
+    struct stat st;
+    if (stat(sourcePath.c_str(), &st) == 0) {
+      if (S_ISDIR(st.st_mode))
+        copyDirectory(sourcePath, destPath);
+      else
+        copyFile(sourcePath.c_str(), destPath.c_str());
+    }
+  }
+  closedir(dir);
+  return;
+}
+
 int main() {
     if(!::android::base::GetBoolProperty("vendor.gps.aol.enabled", false)) {
         printf("vendor.gps.aol.enabled is false. gps logging is not running.\n");
@@ -50,6 +87,7 @@
     }
     dumpLogs(GPS_LOG_DIRECTORY, outputDir.c_str(), maxFileNum, GPS_RAWLOG_PREFIX);
     dumpLogs(GPS_LOG_DIRECTORY, outputDir.c_str(), 18, GPS_MEMDUMP_LOG_PREFIX);
+    copyDirectory(GPS_RESOURCE_DIRECTORY, concatenatePath(outputDir.c_str(), "resource"));
     return 0;
 }
 
diff --git a/gril/hidl/1.7/sepolicy/grilservice_app.te b/gril/hidl/1.7/sepolicy/grilservice_app.te
index 3a170b8..fd20fb4 100644
--- a/gril/hidl/1.7/sepolicy/grilservice_app.te
+++ b/gril/hidl/1.7/sepolicy/grilservice_app.te
@@ -2,3 +2,5 @@
 allow grilservice_app hal_radio_ext_service:service_manager find;
 # allow grilservice_app to binder call hal_radioext_default
 binder_call(grilservice_app, hal_radioext_default)
+# allow grilservice_app to binder call twoshay
+binder_call(grilservice_app, twoshay)
diff --git a/gxp/sepolicy/dump_gxp.te b/gxp/sepolicy/dump_gxp.te
index 8d285c5..322a01f 100644
--- a/gxp/sepolicy/dump_gxp.te
+++ b/gxp/sepolicy/dump_gxp.te
@@ -1,3 +1,4 @@
+# Dump GXP logs to bugreport.
 pixel_bugreport(dump_gxp)
 
 userdebug_or_eng(`
@@ -7,7 +8,5 @@
   allow dump_gxp sscoredump_vendor_data_coredump_file:file r_file_perms;
   allow dump_gxp sscoredump_vendor_data_crashinfo_file:dir r_dir_perms;
   allow dump_gxp sscoredump_vendor_data_crashinfo_file:file r_file_perms;
-  # Allow dump_gxp to access gxp properties.
-  get_prop(google_camera_app, vendor_gxp_prop)
 ')
 
diff --git a/insmod/insmod.sh b/insmod/insmod.sh
index 8cac37e..dfc4fdd 100755
--- a/insmod/insmod.sh
+++ b/insmod/insmod.sh
@@ -1,11 +1,11 @@
 #!/vendor/bin/sh
 
-#############################################################
-### init.insmod.cfg format:                               ###
-### ----------------------------------------------------- ###
-### [insmod|setprop|enable/moprobe|wait] [path|prop name] ###
-### ...                                                   ###
-#############################################################
+###################################################################
+### init.insmod.cfg format:                                     ###
+### ----------------------------------------------------------- ###
+### [insmod|setprop|enable|moprobe|rmmod|wait] [path|prop name] ###
+### ...                                                         ###
+###################################################################
 
 modules_dir=
 system_modules_dir=
@@ -96,6 +96,7 @@
           modprobe -a -d "${modules_dir}" $arg
         fi
         ;;
+      "rmmod") rmmod $arg ;;
       "wait") wait_for_file $arg ;;
     esac
   done < $cfg_file
diff --git a/mailbox/Android.bp b/mailbox/Android.bp
new file mode 100644
index 0000000..6969685
--- /dev/null
+++ b/mailbox/Android.bp
@@ -0,0 +1,21 @@
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
+cc_binary {
+    name: "dump_mailbox",
+    srcs: ["dump/dump_mailbox.cpp"],
+    init_rc: ["init.mailbox.rc"],
+    cflags: [
+        "-Wall",
+        "-Wextra",
+        "-Werror",
+    ],
+    shared_libs: [
+        "libbase",
+        "libdump",
+        "liblog",
+    ],
+    vendor: true,
+    relative_install_path: "dump",
+}
diff --git a/mailbox/dump/dump_mailbox.cpp b/mailbox/dump/dump_mailbox.cpp
new file mode 100644
index 0000000..8f63b30
--- /dev/null
+++ b/mailbox/dump/dump_mailbox.cpp
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2024 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include <dump/pixel_dump.h>
+#include <android-base/file.h>
+
+int main() {
+    std::string outputDir = concatenatePath(BUGREPORT_PACKING_DIR, "mailbox");
+    if (mkdir(outputDir.c_str(), 0777) == -1) {
+        printf("Unable to create folder: %s\n", outputDir.c_str());
+        return 0;
+    }
+
+    copyFile("/sys/kernel/tracing/instances/goog_cpm_mailbox/trace",
+             concatenatePath(outputDir.c_str(), "goog_cpm_mailbox_trace").c_str());
+    copyFile("/sys/kernel/tracing/instances/goog_nq_mailbox/trace",
+             concatenatePath(outputDir.c_str(), "goog_nq_mailbox_trace").c_str());
+
+    return 0;
+}
diff --git a/mailbox/dump/sepolicy/dump_mailbox.te b/mailbox/dump/sepolicy/dump_mailbox.te
new file mode 100644
index 0000000..64f184c
--- /dev/null
+++ b/mailbox/dump/sepolicy/dump_mailbox.te
@@ -0,0 +1,7 @@
+#
+pixel_bugreport(dump_mailbox)
+allow dump_mailbox radio_vendor_data_file:dir create_dir_perms;
+allow dump_mailbox radio_vendor_data_file:file create_file_perms;
+allow dump_mailbox debugfs_tracing_instances:file r_file_perms;
+allow dump_mailbox debugfs_tracing_instances:dir search;
+allow dump_mailbox debugfs_tracing_instances_mailbox:file r_file_perms;
diff --git a/mailbox/dump/sepolicy/file.te b/mailbox/dump/sepolicy/file.te
new file mode 100644
index 0000000..5bb7bc4
--- /dev/null
+++ b/mailbox/dump/sepolicy/file.te
@@ -0,0 +1,2 @@
+#
+type debugfs_tracing_instances_mailbox, sysfs_type, fs_type;
diff --git a/mailbox/dump/sepolicy/file_contexts b/mailbox/dump/sepolicy/file_contexts
new file mode 100644
index 0000000..b9bea15
--- /dev/null
+++ b/mailbox/dump/sepolicy/file_contexts
@@ -0,0 +1 @@
+/vendor/bin/dump/dump_mailbox     u:object_r:dump_mailbox_exec:s0
diff --git a/mailbox/dump/sepolicy/genfs_contexts b/mailbox/dump/sepolicy/genfs_contexts
new file mode 100644
index 0000000..0bac5e8
--- /dev/null
+++ b/mailbox/dump/sepolicy/genfs_contexts
@@ -0,0 +1,2 @@
+genfscon tracefs /instances/goog_cpm_mailbox/trace u:object_r:debugfs_tracing_instances_mailbox:s0
+genfscon tracefs /instances/goog_nq_mailbox/trace  u:object_r:debugfs_tracing_instances_mailbox:s0
diff --git a/mailbox/init.mailbox.rc b/mailbox/init.mailbox.rc
new file mode 100644
index 0000000..7659290
--- /dev/null
+++ b/mailbox/init.mailbox.rc
@@ -0,0 +1,8 @@
+on property:sys.boot_completed=1
+    chown system system /sys/kernel/tracing/instances/goog_cpm_mailbox
+    chown system system /sys/kernel/tracing/instances/goog_cpm_mailbox/trace
+    write /sys/kernel/tracing/instances/goog_cpm_mailbox/buffer_size_kb 512
+
+    chown system system /sys/kernel/tracing/instances/goog_nq_mailbox
+    chown system system /sys/kernel/tracing/instances/goog_nq_mailbox/trace
+    write /sys/kernel/tracing/instances/goog_nq_mailbox/buffer_size_kb 512
diff --git a/mailbox/mailbox.mk b/mailbox/mailbox.mk
new file mode 100644
index 0000000..aeefb9a
--- /dev/null
+++ b/mailbox/mailbox.mk
@@ -0,0 +1,3 @@
+BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/mailbox/dump/sepolicy
+
+PRODUCT_PACKAGES += dump_mailbox
diff --git a/mediacodec/vpu/mediacodec_google.mk b/mediacodec/vpu/mediacodec_google.mk
index 8c1e974..3984501 100644
--- a/mediacodec/vpu/mediacodec_google.mk
+++ b/mediacodec/vpu/mediacodec_google.mk
@@ -7,10 +7,12 @@
 	libgc2_vdi_vpu \
 	libgc2_log \
 	libgc2_utils \
+	libgc2_dec \
 	libgc2_av1_dec \
 	libgc2_vp9_dec \
 	libgc2_hevc_dec \
 	libgc2_avc_dec \
+	libgc2_enc \
 	libgc2_av1_enc \
 	libgc2_hevc_enc \
 	libgc2_avc_enc \
diff --git a/mediacodec/vpu/sepolicy/mediacodec_google.te b/mediacodec/vpu/sepolicy/mediacodec_google.te
index 8022675..99a3c8d 100644
--- a/mediacodec/vpu/sepolicy/mediacodec_google.te
+++ b/mediacodec/vpu/sepolicy/mediacodec_google.te
@@ -1,3 +1,4 @@
+# Google Mediacodec
 type mediacodec_google, domain;
 type mediacodec_google_exec, exec_type, vendor_file_type, file_type;
 
@@ -8,6 +9,7 @@
 hal_client_domain(mediacodec_google, hal_graphics_allocator)
 
 add_service(mediacodec_google, eco_service)
+binder_call(mediacodec_google, hal_camera_default)
 
 allow mediacodec_google dmabuf_system_heap_device:chr_file r_file_perms;
 allow mediacodec_google video_device:chr_file { read write open ioctl map };
diff --git a/ramdump_and_coredump/sepolicy/ramdump_app.te b/ramdump_and_coredump/sepolicy/ramdump_app.te
index 85d4bfd..9eebc98 100644
--- a/ramdump_and_coredump/sepolicy/ramdump_app.te
+++ b/ramdump_and_coredump/sepolicy/ramdump_app.te
@@ -1,8 +1,12 @@
+# SEpolicy for com.android.ramdump
 type ramdump_app, domain;
 
 userdebug_or_eng(`
   app_domain(ramdump_app)
 
+  # For using Firebase Cloud Firestore
+  net_domain(ramdump_app)
+
   allow ramdump_app app_api_service:service_manager find;
 
   allow ramdump_app ramdump_vendor_data_file:file create_file_perms;
diff --git a/storage/dump_storage.cpp b/storage/dump_storage.cpp
index e6b3e4c..272b1ee 100644
--- a/storage/dump_storage.cpp
+++ b/storage/dump_storage.cpp
@@ -221,14 +221,23 @@
                         read_buffer(18, 131072, "kioxia_12_ufs_err_history.dat");
                         break;
                       case 0x1AD: //SKhynix
-                        read_buffer(0, 4096, "hynix_00_ufs_err_history.dat");
-                        read_buffer(16, 131072, "skhynix_10_ufs_err_history.dat");
-                        read_buffer(17, 131072, "skhynix_11_ufs_err_history.dat");
-                        read_buffer(18, 131072, "skhynix_12_ufs_err_history.dat");
-                        read_buffer(19, 131072, "skhynix_13_ufs_err_history.dat");
+                        if (!strcmp(ufs_ver.c_str(), "0x0310")) {
+                            read_buffer(0, 4096, "skhynix_00_ufs_err_history.dat");
+                            read_buffer(16, 131072, "skhynix_10_ufs_err_history.dat");
+                            read_buffer(17, 131072, "skhynix_11_ufs_err_history.dat");
+                            read_buffer(18, 131072, "skhynix_12_ufs_err_history.dat");
+                            read_buffer(19, 131072, "skhynix_13_ufs_err_history.dat");
+                        } else {
+                            read_buffer(0, 4096, "skhynix_00_ufs_err_history.dat");
+                            read_buffer(16, 8388608, "skhynix_10_ufs_err_history.dat");
+                            read_buffer(17, 8388608, "skhynix_11_ufs_err_history.dat");
+                        }
                         break;
                       case 0x1CE: //SAMSUNG
-                        read_buffer(16, 8404992, "samsung_10_ufs_err_history.dat");
+                        if (!strcmp(ufs_ver.c_str(), "0x0310"))
+                            read_buffer(16, 8404992, "samsung_10_ufs_err_history.dat");
+                        else
+                            read_buffer(16, 12599296, "samsung_10_ufs_err_history.dat");
                         break;
                       default:
                         break;
diff --git a/touch/focaltech/Android.bp b/touch/focaltech/Android.bp
index ebaa308..0b53132 100644
--- a/touch/focaltech/Android.bp
+++ b/touch/focaltech/Android.bp
@@ -9,3 +9,11 @@
     vendor: true,
     sub_dir: "dump",
 }
+
+sh_binary {
+    name: "predump_focaltech.sh",
+    src: "dump_focaltech.sh",
+    init_rc: ["init.touch.rc"],
+    vendor: true,
+    sub_dir: "dump_touch",
+}
diff --git a/touch/focaltech/predump_focaltech.mk b/touch/focaltech/predump_focaltech.mk
new file mode 100644
index 0000000..aff76bc
--- /dev/null
+++ b/touch/focaltech/predump_focaltech.mk
@@ -0,0 +1,3 @@
+BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/touch/focaltech/predump_sepolicy
+
+PRODUCT_PACKAGES += predump_focaltech.sh
diff --git a/touch/focaltech/predump_sepolicy/file.te b/touch/focaltech/predump_sepolicy/file.te
new file mode 100644
index 0000000..696f244
--- /dev/null
+++ b/touch/focaltech/predump_sepolicy/file.te
@@ -0,0 +1,2 @@
+# touch predump script
+type proc_touch, proc_type, fs_type;
diff --git a/touch/focaltech/predump_sepolicy/file_contexts b/touch/focaltech/predump_sepolicy/file_contexts
new file mode 100644
index 0000000..517895b
--- /dev/null
+++ b/touch/focaltech/predump_sepolicy/file_contexts
@@ -0,0 +1,2 @@
+/vendor/bin/dump/predump_focaltech\.sh      u:object_r:predump_touch_exec:s0
+
diff --git a/touch/focaltech/predump_sepolicy/genfs_contexts b/touch/focaltech/predump_sepolicy/genfs_contexts
new file mode 100644
index 0000000..2ac9314
--- /dev/null
+++ b/touch/focaltech/predump_sepolicy/genfs_contexts
@@ -0,0 +1,3 @@
+genfscon proc  /focaltech_touch                                                u:object_r:proc_touch:s0
+
+
diff --git a/touch/focaltech/predump_sepolicy/predump_touch.te b/touch/focaltech/predump_sepolicy/predump_touch.te
new file mode 100644
index 0000000..c34ba49
--- /dev/null
+++ b/touch/focaltech/predump_sepolicy/predump_touch.te
@@ -0,0 +1,3 @@
+# touch predump script
+allow predump_touch proc_touch:dir search;
+allow predump_touch proc_touch:file rw_file_perms;
diff --git a/touch/gti/sepolicy/hal_sensors_default.te b/touch/gti/sepolicy/hal_sensors_default.te
new file mode 100644
index 0000000..37b93fd
--- /dev/null
+++ b/touch/gti/sepolicy/hal_sensors_default.te
@@ -0,0 +1,2 @@
+# Support SW_LID event from SensorHAL to configure touch input and gesture
+set_prop(hal_sensors_default, vendor_gti_prop)
diff --git a/touch/stm/Android.bp b/touch/stm/Android.bp
index 1727f07..0d64fd6 100644
--- a/touch/stm/Android.bp
+++ b/touch/stm/Android.bp
@@ -8,3 +8,10 @@
     vendor: true,
     sub_dir: "dump",
 }
+
+sh_binary {
+    name: "predump_stm.sh",
+    src: "dump_stm.sh",
+    vendor: true,
+    sub_dir: "dump_touch",
+}
diff --git a/touch/stm/predump_sepolicy/file.te b/touch/stm/predump_sepolicy/file.te
new file mode 100644
index 0000000..7f298c3
--- /dev/null
+++ b/touch/stm/predump_sepolicy/file.te
@@ -0,0 +1,3 @@
+# touch predump script
+type proc_touch, proc_type, fs_type;
+type sysfs_touch, sysfs_type, fs_type;
diff --git a/touch/stm/predump_sepolicy/file_contexts b/touch/stm/predump_sepolicy/file_contexts
new file mode 100644
index 0000000..2667543
--- /dev/null
+++ b/touch/stm/predump_sepolicy/file_contexts
@@ -0,0 +1,2 @@
+/vendor/bin/dump_touch/predump_stm\.sh      u:object_r:predump_touch_exec:s0
+
diff --git a/touch/stm/predump_sepolicy/genfs_contexts b/touch/stm/predump_sepolicy/genfs_contexts
new file mode 100644
index 0000000..2ed8978
--- /dev/null
+++ b/touch/stm/predump_sepolicy/genfs_contexts
@@ -0,0 +1,7 @@
+genfscon sysfs /devices/platform/111d0000.spi/spi_master/spi20/spi20.0  u:object_r:sysfs_touch:s0
+genfscon sysfs /devices/platform/10d40000.spi/spi_master/spi11/spi11.0  u:object_r:sysfs_touch:s0
+genfscon sysfs /devices/platform/10950000.spi/spi_master/spi6/spi6.0    u:object_r:sysfs_touch:s0
+
+genfscon proc  /fts/driver_test                                         u:object_r:proc_touch:s0
+genfscon proc  /fts_ext/driver_test                                     u:object_r:proc_touch:s0
+
diff --git a/touch/stm/predump_sepolicy/predump_touch.te b/touch/stm/predump_sepolicy/predump_touch.te
new file mode 100644
index 0000000..f0f458c
--- /dev/null
+++ b/touch/stm/predump_sepolicy/predump_touch.te
@@ -0,0 +1,6 @@
+# touch predump script
+allow predump_touch proc_touch:file rw_file_perms;
+allow predump_touch sysfs_touch:dir search;
+allow predump_touch sysfs_touch:file rw_file_perms;
+
+get_prop(predump_touch vendor_touch_dump_path_prop)
diff --git a/touch/stm/predump_sepolicy/property.te b/touch/stm/predump_sepolicy/property.te
new file mode 100644
index 0000000..612c855
--- /dev/null
+++ b/touch/stm/predump_sepolicy/property.te
@@ -0,0 +1,2 @@
+# touch predump script
+vendor_internal_prop(vendor_touch_dump_path_prop)
diff --git a/touch/stm/predump_sepolicy/property_contexts b/touch/stm/predump_sepolicy/property_contexts
new file mode 100644
index 0000000..db9fd5a
--- /dev/null
+++ b/touch/stm/predump_sepolicy/property_contexts
@@ -0,0 +1,2 @@
+ro.vendor.touch.dump. u:object_r:vendor_touch_dump_path_prop:s0
+
diff --git a/touch/stm/predump_sepolicy/vendor_init.te b/touch/stm/predump_sepolicy/vendor_init.te
new file mode 100644
index 0000000..9017c5b
--- /dev/null
+++ b/touch/stm/predump_sepolicy/vendor_init.te
@@ -0,0 +1,2 @@
+# touch predump script
+set_prop(vendor_init, vendor_touch_dump_path_prop)
diff --git a/touch/stm/predump_stm20.mk b/touch/stm/predump_stm20.mk
new file mode 100644
index 0000000..cdf3e35
--- /dev/null
+++ b/touch/stm/predump_stm20.mk
@@ -0,0 +1,6 @@
+PRODUCT_VENDOR_PROPERTIES += ro.vendor.touch.dump.sys=/sys/class/spi_master/spi20/spi20.0
+PRODUCT_VENDOR_PROPERTIES += ro.vendor.touch.dump.proc=/proc/fts/driver_test
+
+BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/touch/stm/predump_sepolicy
+
+PRODUCT_PACKAGES += predump_stm.sh
diff --git a/touch/stm/predump_stm6.mk b/touch/stm/predump_stm6.mk
new file mode 100644
index 0000000..2cbde2c
--- /dev/null
+++ b/touch/stm/predump_stm6.mk
@@ -0,0 +1,6 @@
+PRODUCT_VENDOR_PROPERTIES += ro.vendor.touch.dump.sys=/sys/class/spi_master/spi6/spi6.0
+PRODUCT_VENDOR_PROPERTIES += ro.vendor.touch.dump.proc=/proc/fts_ext/driver_test
+
+BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/touch/stm/predump_sepolicy
+
+PRODUCT_PACKAGES += predump_stm.sh
diff --git a/vibrator/flags/Android.bp b/vibrator/flags/Android.bp
new file mode 100644
index 0000000..0b36aee
--- /dev/null
+++ b/vibrator/flags/Android.bp
@@ -0,0 +1,43 @@
+//
+// Copyright (C) 2024 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
+aconfig_declarations {
+    name: "VibratorFlagsL26",
+    package: "vendor.vibrator.hal.flags",
+    container: "vendor",
+    exportable: true,
+    srcs: ["VibratorFlags.aconfig"],
+}
+
+cc_aconfig_library {
+    name: "PixelVibratorFlagsL26",
+    aconfig_declarations: "VibratorFlagsL26",
+    vendor_available: true,
+    visibility: [
+        "//vendor:__subpackages__",
+        "//device/google/felix:__subpackages__",
+    ],
+}
+
+java_aconfig_library {
+    name: "PixelVibratorFlagsL26_java",
+    aconfig_declarations: "VibratorFlagsL26",
+    mode: "exported",
+    visibility: ["//vendor:__subpackages__"],
+}
diff --git a/vibrator/flags/VibratorFlags.aconfig b/vibrator/flags/VibratorFlags.aconfig
new file mode 100644
index 0000000..3e0a6fd
--- /dev/null
+++ b/vibrator/flags/VibratorFlags.aconfig
@@ -0,0 +1,18 @@
+package: "vendor.vibrator.hal.flags"
+container: "vendor"
+
+flag {
+  name: "remove_capo"
+  namespace: "vibrator"
+  is_exported: true
+  description: "This flag controls the removal of utilizing Capo at the HAL level"
+  bug: "290223630"
+}
+
+flag {
+  name: "enable_pwle_v2"
+  namespace: "vibrator"
+  is_exported: true
+  description: "This flag enables the PWLE V2 APIs guarded by the CAP_COMPOSE_PWLE_EFFECTS_V2 compatability"
+  bug: "346570576"
+}
\ No newline at end of file
diff --git a/widevine/sepolicy/hal_drm_widevine.te b/widevine/sepolicy/hal_drm_widevine.te
index 9b4792e..98b49e6 100644
--- a/widevine/sepolicy/hal_drm_widevine.te
+++ b/widevine/sepolicy/hal_drm_widevine.te
@@ -10,4 +10,5 @@
 allow hal_drm_widevine mediadrm_vendor_data_file:dir create_dir_perms;
 
 #L1
-#TODO(snehalreddy@) : Add L1 permissions
+allow hal_drm_widevine dmabuf_system_heap_device:chr_file r_file_perms;
+