Snap for 11224086 from ac51743c23bc7ddeb01f890d6a3af0dd17ea4fb3 to mainline-tzdata5-release

Change-Id: Ibc591fc9773ad03ab625266dd82140d3a3050c94
diff --git a/64bitonly/product/arm64-vendor.mk b/64bitonly/product/arm64-vendor.mk
index bb14396..f6a9896 100644
--- a/64bitonly/product/arm64-vendor.mk
+++ b/64bitonly/product/arm64-vendor.mk
@@ -6,8 +6,7 @@
 PRODUCT_PROPERTY_OVERRIDES += \
     ro.crypto.dm_default_key.options_format.version=2
 
-PRODUCT_SHIPPING_API_LEVEL := 33
-PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS := false
+PRODUCT_SHIPPING_API_LEVEL := 34
 TARGET_USES_MKE2FS := true
 
 # Note: the following lines need to stay at the beginning so that it can
diff --git a/64bitonly/product/emulator64_vendor.mk b/64bitonly/product/emulator64_vendor.mk
index 37c2659..254425a 100644
--- a/64bitonly/product/emulator64_vendor.mk
+++ b/64bitonly/product/emulator64_vendor.mk
@@ -28,7 +28,11 @@
 PRODUCT_PACKAGES += \
     vndk-sp
 
+ifeq ($(EMULATOR_DISABLE_RADIO),true)
+DEVICE_PACKAGE_OVERLAYS += device/generic/goldfish/tablet/overlay
+else
 DEVICE_PACKAGE_OVERLAYS := device/generic/goldfish/overlay
+endif
 
 PRODUCT_CHARACTERISTICS := emulator
 
diff --git a/64bitonly/product/install_mediafiles.mk b/64bitonly/product/install_mediafiles.mk
deleted file mode 100644
index 919c654..0000000
--- a/64bitonly/product/install_mediafiles.mk
+++ /dev/null
@@ -1,18 +0,0 @@
-# This is to speed up presubmit of media related tests by asking emulator
-# to run the media.adb script upon boot complete to copy those media files
-# to sdcard/test
-
-PRODUCT_COPY_FILES += \
-    device/generic/goldfish/data/media/test/media.adb:data/adbscripts/media.adb
-
-PRODUCT_COPY_FILES += \
-    device/generic/goldfish/data/media/test/swirl_136x144_mpeg4.mp4:data/media/0/test/CtsMediaTestCases-1.4/swirl_136x144_mpeg4.mp4 \
-    device/generic/goldfish/data/media/test/swirl_132x130_mpeg4.mp4:data/media/0/test/CtsMediaTestCases-1.4/swirl_132x130_mpeg4.mp4 \
-    device/generic/goldfish/data/media/test/swirl_130x132_mpeg4.mp4:data/media/0/test/CtsMediaTestCases-1.4/swirl_130x132_mpeg4.mp4 \
-    device/generic/goldfish/data/media/test/swirl_144x136_mpeg4.mp4:data/media/0/test/CtsMediaTestCases-1.4/swirl_144x136_mpeg4.mp4 \
-    device/generic/goldfish/data/media/test/swirl_128x128_mpeg4.mp4:data/media/0/test/CtsMediaTestCases-1.4/swirl_128x128_mpeg4.mp4
-
-
-PRODUCT_COPY_FILES += \
-    device/generic/goldfish/data/etc/empty_data_disk:data/empty_data_disk
-
diff --git a/64bitonly/product/sdk_phone64_arm64.mk b/64bitonly/product/sdk_phone64_arm64.mk
index 0af17b1..7fcb2fd 100644
--- a/64bitonly/product/sdk_phone64_arm64.mk
+++ b/64bitonly/product/sdk_phone64_arm64.mk
@@ -22,6 +22,10 @@
 
 PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := relaxed
 
+# 1.5G + 8M
+BOARD_SUPER_PARTITION_SIZE := 1619001344
+BOARD_EMULATOR_DYNAMIC_PARTITIONS_SIZE := 1610612736
+
 #
 # All components inherited here go to system image
 #
@@ -42,6 +46,9 @@
 PRODUCT_SDK_ADDON_SYS_IMG_SOURCE_PROP := \
     development/sys-img/images_arm64-v8a_source.prop_template
 
+PRODUCT_PACKAGES += \
+    GoldfishSkinConfig
+
 #
 # All components inherited here go to vendor or vendor_boot image
 #
@@ -52,5 +59,5 @@
 # Overrides
 PRODUCT_BRAND := Android
 PRODUCT_NAME := sdk_phone64_arm64
-PRODUCT_DEVICE := emulator64_arm64
+PRODUCT_DEVICE := emu64a
 PRODUCT_MODEL := Android SDK built for arm64
diff --git a/64bitonly/product/sdk_phone64_x86_64.mk b/64bitonly/product/sdk_phone64_x86_64.mk
index a2b4677..89821fa 100644
--- a/64bitonly/product/sdk_phone64_x86_64.mk
+++ b/64bitonly/product/sdk_phone64_x86_64.mk
@@ -15,6 +15,10 @@
 #
 PRODUCT_USE_DYNAMIC_PARTITIONS := true
 
+# 1.5G + 8M
+BOARD_SUPER_PARTITION_SIZE := 1619001344
+BOARD_EMULATOR_DYNAMIC_PARTITIONS_SIZE := 1610612736
+
 #
 # All components inherited here go to system image
 #
@@ -40,6 +44,9 @@
 PRODUCT_SDK_ADDON_SYS_IMG_SOURCE_PROP := \
     development/sys-img/images_x86_64_source.prop_template
 
+PRODUCT_PACKAGES += \
+    GoldfishSkinConfig
+
 #
 # All components inherited here go to vendor image
 #
@@ -50,5 +57,5 @@
 # Overrides
 PRODUCT_BRAND := Android
 PRODUCT_NAME := sdk_phone64_x86_64
-PRODUCT_DEVICE := emulator64_x86_64
+PRODUCT_DEVICE := emu64x
 PRODUCT_MODEL := Android SDK built for x86_64
diff --git a/64bitonly/product/sdk_tablet_arm64.mk b/64bitonly/product/sdk_tablet_arm64.mk
new file mode 100644
index 0000000..9644096
--- /dev/null
+++ b/64bitonly/product/sdk_tablet_arm64.mk
@@ -0,0 +1,99 @@
+#
+# 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.
+#
+PRODUCT_USE_DYNAMIC_PARTITIONS := true
+EMULATOR_DISABLE_RADIO := true
+
+# 1.5G + 8M
+BOARD_SUPER_PARTITION_SIZE := 1619001344
+BOARD_EMULATOR_DYNAMIC_PARTITIONS_SIZE := 1610612736
+
+PRODUCT_COPY_FILES += \
+    device/generic/goldfish/tablet/data/etc/display_settings.xml:$(TARGET_COPY_OUT_VENDOR)/etc/display_settings.xml \
+    device/generic/goldfish/data/etc/advancedFeatures.ini.tablet:advancedFeatures.ini \
+    device/generic/goldfish/data/etc/config.ini.nexus7tab:config.ini
+
+PRODUCT_COPY_FILES+= \
+        device/generic/goldfish/data/etc/tablet_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml
+
+PRODUCT_COPY_FILES += device/generic/goldfish/tablet/data/etc/tablet.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/tablet.xml
+
+PRODUCT_CHARACTERISTICS := tablet,nosdcard
+
+
+#
+# All components inherited here go to system image
+#
+$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit_only.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/generic_system.mk)
+
+# Enable mainline checking for excat this product name
+PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := relaxed
+
+
+#
+# All components inherited here go to system_ext image
+#
+$(call inherit-product, $(SRC_TARGET_DIR)/product/handheld_system_ext.mk)
+
+#
+# All components inherited here go to product image
+#
+# Includes all AOSP product packages
+$(call inherit-product, $(SRC_TARGET_DIR)/product/handheld_product.mk)
+
+# Default AOSP sounds
+$(call inherit-product-if-exists, frameworks/base/data/sounds/AllAudio.mk)
+
+# Additional settings used in all AOSP builds
+PRODUCT_PRODUCT_PROPERTIES += \
+    ro.config.ringtone?=Ring_Synth_04.ogg \
+    ro.config.notification_sound?=pixiedust.ogg \
+
+
+# More AOSP packages
+PRODUCT_PACKAGES += \
+    initial-package-stopped-states-aosp.xml \
+    PhotoTable \
+    preinstalled-packages-platform-aosp-product.xml \
+    WallpaperPicker \
+
+
+# Window Extensions
+$(call inherit-product, $(SRC_TARGET_DIR)/product/window_extensions.mk)
+
+# Other packages for virtual device testing.
+PRODUCT_PACKAGES += \
+    LargeScreenSettingsProviderOverlay \
+    curl \
+
+PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST += system/bin/curl
+
+PRODUCT_SDK_ADDON_SYS_IMG_SOURCE_PROP := \
+    device/generic/goldfish/64bitonly/product/tablet_images_arm64-v8a_source.prop_template
+
+#
+# All components inherited here go to vendor image
+#
+$(call inherit-product, device/generic/goldfish/arm64-vendor.mk)
+$(call inherit-product, device/generic/goldfish/64bitonly/product/emulator64_vendor.mk)
+$(call inherit-product, device/generic/goldfish/emulator64_arm64/device.mk)
+
+# Overrides
+PRODUCT_BRAND := Android
+PRODUCT_NAME := sdk_tablet_arm64
+PRODUCT_DEVICE := emu64a
+PRODUCT_MODEL := Android SDK Tablet for arm64
+
diff --git a/64bitonly/product/sdk_tablet_x86_64.mk b/64bitonly/product/sdk_tablet_x86_64.mk
index bbc6cca..271d24b 100644
--- a/64bitonly/product/sdk_tablet_x86_64.mk
+++ b/64bitonly/product/sdk_tablet_x86_64.mk
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2021 The Android Open Source Project
+# 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.
@@ -16,29 +16,74 @@
 PRODUCT_USE_DYNAMIC_PARTITIONS := true
 EMULATOR_DISABLE_RADIO := true
 
+# 1.5G + 8M
+BOARD_SUPER_PARTITION_SIZE := 1619001344
+BOARD_EMULATOR_DYNAMIC_PARTITIONS_SIZE := 1610612736
+
+
 PRODUCT_COPY_FILES += \
+    device/generic/goldfish/tablet/data/etc/display_settings.xml:$(TARGET_COPY_OUT_VENDOR)/etc/display_settings.xml \
     device/generic/goldfish/data/etc/advancedFeatures.ini.tablet:advancedFeatures.ini \
     device/generic/goldfish/data/etc/config.ini.nexus7tab:config.ini
 
+PRODUCT_COPY_FILES+= \
+        device/generic/goldfish/data/etc/tablet_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml
+
+PRODUCT_COPY_FILES += device/generic/goldfish/tablet/data/etc/tablet.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/tablet.xml
+
 PRODUCT_CHARACTERISTICS := tablet,nosdcard
 
+
 #
 # All components inherited here go to system image
 #
 $(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit_only.mk)
-$(call inherit-product, $(SRC_TARGET_DIR)/product/generic_no_telephony.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/generic_system.mk)
 
 # Enable mainline checking for excat this product name
-ifeq (sdk_tablet_x86_64,$(TARGET_PRODUCT))
 PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := relaxed
-endif
+
+
+#
+# All components inherited here go to system_ext image
+#
+$(call inherit-product, $(SRC_TARGET_DIR)/product/handheld_system_ext.mk)
 
 #
 # All components inherited here go to product image
 #
+# Includes all AOSP product packages
+$(call inherit-product, $(SRC_TARGET_DIR)/product/handheld_product.mk)
+
+# Default AOSP sounds
+$(call inherit-product-if-exists, frameworks/base/data/sounds/AllAudio.mk)
+
+# Additional settings used in all AOSP builds
+PRODUCT_PRODUCT_PROPERTIES += \
+    ro.config.ringtone?=Ring_Synth_04.ogg \
+    ro.config.notification_sound?=pixiedust.ogg \
+
+
+# More AOSP packages
+PRODUCT_PACKAGES += \
+    initial-package-stopped-states-aosp.xml \
+    PhotoTable \
+    preinstalled-packages-platform-aosp-product.xml \
+    WallpaperPicker \
+
+
+# Window Extensions
+$(call inherit-product, $(SRC_TARGET_DIR)/product/window_extensions.mk)
+
+# Other packages for virtual device testing.
+PRODUCT_PACKAGES += \
+    LargeScreenSettingsProviderOverlay \
+    curl \
+
+PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST += system/bin/curl
 
 PRODUCT_SDK_ADDON_SYS_IMG_SOURCE_PROP := \
-    development/sys-img/images_x86_64_source.prop_template
+    device/generic/goldfish/64bitonly/product/tablet_images_x86_64_source.prop_template
 
 #
 # All components inherited here go to vendor image
@@ -47,9 +92,9 @@
 $(call inherit-product, device/generic/goldfish/64bitonly/product/emulator64_vendor.mk)
 $(call inherit-product, device/generic/goldfish/emulator64_x86_64/device.mk)
 
-
 # Overrides
 PRODUCT_BRAND := Android
 PRODUCT_NAME := sdk_tablet_x86_64
-PRODUCT_DEVICE := emulator64_x86_64
-PRODUCT_MODEL := Android SDK built for x86_64
+PRODUCT_DEVICE := emu64x
+PRODUCT_MODEL := Android SDK Tablet for x86_64
+
diff --git a/64bitonly/product/tablet_images_arm64-v8a_source.prop_template b/64bitonly/product/tablet_images_arm64-v8a_source.prop_template
new file mode 100644
index 0000000..5463d6a
--- /dev/null
+++ b/64bitonly/product/tablet_images_arm64-v8a_source.prop_template
@@ -0,0 +1,12 @@
+Pkg.Desc=Tablet Android SDK System Image
+Pkg.UserSrc=false
+Pkg.Revision=1
+Pkg.Dependencies=emulator#29.1.11
+AndroidVersion.ApiLevel=${PLATFORM_SDK_VERSION}
+AndroidVersion.CodeName=${PLATFORM_VERSION_CODENAME}
+AndroidVersion.ExtensionLevel=${PLATFORM_SDK_EXTENSION_VERSION}
+AndroidVersion.IsBaseSdk=${PLATFORM_IS_BASE_SDK}
+SystemImage.Abi=arm64-v8a
+SystemImage.GpuSupport=true
+SystemImage.TagId=aosp_tablet
+SystemImage.TagDisplay=Tablet Default Android System Image
diff --git a/64bitonly/product/tablet_images_x86_64_source.prop_template b/64bitonly/product/tablet_images_x86_64_source.prop_template
new file mode 100644
index 0000000..722d085
--- /dev/null
+++ b/64bitonly/product/tablet_images_x86_64_source.prop_template
@@ -0,0 +1,12 @@
+Pkg.Desc=Tablet Android SDK System Image
+Pkg.UserSrc=false
+Pkg.Revision=1
+Pkg.Dependencies=emulator#29.1.11
+AndroidVersion.ApiLevel=${PLATFORM_SDK_VERSION}
+AndroidVersion.CodeName=${PLATFORM_VERSION_CODENAME}
+AndroidVersion.ExtensionLevel=${PLATFORM_SDK_EXTENSION_VERSION}
+AndroidVersion.IsBaseSdk=${PLATFORM_IS_BASE_SDK}
+SystemImage.Abi=x86_64
+SystemImage.GpuSupport=true
+SystemImage.TagId=aosp_tablet
+SystemImage.TagDisplay=Tablet Default Android System Image
diff --git a/64bitonly/product/vendor.mk b/64bitonly/product/vendor.mk
index 4b6146d..7144efd 100644
--- a/64bitonly/product/vendor.mk
+++ b/64bitonly/product/vendor.mk
@@ -13,304 +13,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-#
-# This file is to configure vendor/data partitions of emulator-related products
-#
-$(call inherit-product-if-exists, frameworks/native/build/phone-xhdpi-2048-dalvik-heap.mk)
-
-# Enable Scoped Storage related
-$(call inherit-product, $(SRC_TARGET_DIR)/product/emulated_storage.mk)
-
-DEVICE_MANIFEST_FILE += device/generic/goldfish/manifest.xml
-
-PRODUCT_SOONG_NAMESPACES += \
-    device/generic/goldfish \
-    device/generic/goldfish-opengl
-
-PRODUCT_VENDOR_PROPERTIES += \
-    ro.control_privapp_permissions=enforce \
-    ro.crypto.volume.filenames_mode=aes-256-cts \
-    ro.hardware.audio.tinyalsa.period_count=4 \
-    ro.hardware.audio.tinyalsa.period_size_multiplier=4 \
-    ro.hardware.audio.tinyalsa.host_latency_ms=30 \
-    ro.hardware.power=ranchu \
-    ro.hardware.vulkan=ranchu \
-    ro.incremental.enable=yes \
-    ro.logd.size=1M \
-    ro.kernel.qemu=1 \
-    ro.soc.manufacturer=AOSP \
-    ro.soc.model=ranchu \
-    ro.surface_flinger.supports_background_blur=1 \
-    ro.zygote.disable_gl_preload=1 \
-    debug.sf.vsync_reactor_ignore_present_fences=true \
-    debug.stagefright.c2inputsurface=-1 \
-    debug.stagefright.ccodec=4 \
-    graphics.gpu.profiler.support=true \
-    persist.sys.zram_enabled=1 \
-    wifi.direct.interface=p2p-dev-wlan0 \
-    wifi.interface=wlan0 \
-
-# Device modules
-PRODUCT_PACKAGES += \
-    android.hardware.drm-service-lazy.clearkey \
-    android.hardware.gatekeeper@1.0-service.software \
-    android.hardware.usb-service.example \
-    vulkan.ranchu \
-    libandroidemu \
-    libOpenglCodecCommon \
-    libOpenglSystemCommon \
-    qemu-export-property \
-    qemu-props \
-    stagefright \
-    android.hardware.graphics.allocator@3.0-service.ranchu \
-    android.hardware.graphics.mapper@3.0-impl-ranchu \
-    android.hardware.graphics.composer3-service.ranchu \
-    toybox_vendor \
-    android.hardware.wifi-service \
-    android.hardware.media.c2@1.0-service-goldfish \
-    libcodec2_goldfish_vp8dec \
-    libcodec2_goldfish_vp9dec \
-    libcodec2_goldfish_avcdec \
-    libcodec2_goldfish_hevcdec \
-    sh_vendor \
-    local_time.default \
-    SdkSetup \
-    goldfish_overlay_connectivity_gsi \
-    MultiDisplayProvider \
-    libGoldfishProfiler \
-    dlkm_loader
-
-ifneq ($(EMULATOR_DISABLE_RADIO),true)
-PRODUCT_PACKAGES += \
-    libcuttlefish-ril-2 \
-    libgoldfish-rild \
-    EmulatorRadioConfig \
-    EmulatorTetheringConfigOverlay
-
-DEVICE_MANIFEST_FILE += device/generic/goldfish/manifest.radio.xml
-DISABLE_RILD_OEM_HOOK := true
-endif
-
-ifneq ($(EMULATOR_VENDOR_NO_BIOMETRICS), true)
-PRODUCT_PACKAGES += \
-    android.hardware.biometrics.fingerprint-service.ranchu \
-    android.hardware.biometrics.face-service.example \
-
-PRODUCT_COPY_FILES += \
-    frameworks/native/data/etc/android.hardware.fingerprint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.fingerprint.xml \
-    frameworks/native/data/etc/android.hardware.biometrics.face.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.biometrics.face.xml \
-
-endif
-
-ifneq ($(BUILD_EMULATOR_OPENGL),false)
-PRODUCT_PACKAGES += \
-    libGLESv1_CM_emulation \
-    lib_renderControl_enc \
-    libEGL_emulation \
-    libGLESv2_enc \
-    libvulkan_enc \
-    libGLESv2_emulation \
-    libGLESv1_enc \
-    libEGL_angle \
-    libGLESv1_CM_angle \
-    libGLESv2_angle
-endif
-
-# Enable bluetooth
-PRODUCT_PACKAGES += \
-    android.hardware.bluetooth-service.default \
-    android.hardware.bluetooth.audio-impl \
-    bt_vhci_forwarder \
-
-# Bluetooth hardware properties.
-ifeq ($(TARGET_PRODUCT_PROP),)
-TARGET_PRODUCT_PROP := $(LOCAL_PATH)/../../bluetooth.prop
-endif
-
-# Bluetooth se policies
-BOARD_SEPOLICY_DIRS += system/bt/vendor_libs/linux/sepolicy
-
-PRODUCT_PACKAGES += \
-    android.hardware.security.keymint-service
-PRODUCT_COPY_FILES += \
-    frameworks/native/data/etc/android.hardware.keystore.app_attest_key.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.keystore.app_attest_key.xml
-
-PRODUCT_PACKAGES += \
-    DisplayCutoutEmulationEmu01Overlay \
-    EmulationPixel7ProOverlay \
-    SystemUIEmulationPixel7ProOverlay \
-    EmulationPixel7Overlay \
-    SystemUIEmulationPixel7Overlay \
-    EmulationPixel6ProOverlay \
-    SystemUIEmulationPixel6ProOverlay \
-    EmulationPixel6Overlay \
-    SystemUIEmulationPixel6Overlay \
-    EmulationPixel6aOverlay \
-    SystemUIEmulationPixel6aOverlay \
-    EmulationPixel5Overlay \
-    SystemUIEmulationPixel5Overlay \
-    EmulationPixel4XLOverlay \
-    SystemUIEmulationPixel4XLOverlay \
-    EmulationPixel4Overlay \
-    SystemUIEmulationPixel4Overlay \
-    EmulationPixel4aOverlay \
-    SystemUIEmulationPixel4aOverlay \
-    EmulationPixel3XLOverlay \
-    SystemUIEmulationPixel3XLOverlay \
-    EmulationPixel3Overlay \
-    SystemUIEmulationPixel3Overlay \
-    EmulationPixel3aOverlay \
-    SystemUIEmulationPixel3aOverlay \
-    EmulationPixel3aXLOverlay \
-    SystemUIEmulationPixel3aXLOverlay \
-    EmulationPixel2XLOverlay \
-    NavigationBarMode2ButtonOverlay \
-
-ifneq ($(EMULATOR_VENDOR_NO_GNSS),true)
-PRODUCT_PACKAGES += android.hardware.gnss-service.ranchu
-endif
-
-ifneq ($(EMULATOR_VENDOR_NO_SENSORS),true)
-PRODUCT_PACKAGES += \
-    android.hardware.sensors-service.multihal \
-    android.hardware.sensors@2.1-impl.ranchu
-# TODO(rkir):
-# add a soong namespace and move this into a.h.sensors@2.1-impl.ranchu
-# as prebuilt_etc. For now soong_namespace causes a build break because the fw
-# refers to our wifi HAL in random places.
-PRODUCT_COPY_FILES += \
-    device/generic/goldfish/sensors/hals.conf:$(TARGET_COPY_OUT_VENDOR)/etc/sensors/hals.conf
-endif
-
-ifneq ($(EMULATOR_VENDOR_NO_CAMERA),true)
-PRODUCT_SOONG_NAMESPACES += \
-    hardware/google/camera \
-    hardware/google/camera/devices/EmulatedCamera \
-
-PRODUCT_PACKAGES += \
-    android.hardware.camera.provider.ranchu \
-    android.hardware.camera.provider@2.7-service-google \
-    libgooglecamerahwl_impl \
-
-PRODUCT_COPY_FILES += \
-    device/generic/goldfish/camera/media/profiles.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_V1_0.xml \
-    device/generic/goldfish/camera/media/codecs_google_video_default.xml:${TARGET_COPY_OUT_VENDOR}/etc/media_codecs_google_video.xml \
-    device/generic/goldfish/camera/media/codecs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs.xml \
-    device/generic/goldfish/camera/media/codecs_performance.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance.xml \
-    device/generic/goldfish/camera/media/codecs_performance_c2.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance_c2.xml \
-    frameworks/native/data/etc/android.hardware.camera.ar.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.ar.xml \
-    frameworks/native/data/etc/android.hardware.camera.flash-autofocus.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.flash-autofocus.xml \
-    frameworks/native/data/etc/android.hardware.camera.concurrent.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.concurrent.xml \
-    frameworks/native/data/etc/android.hardware.camera.front.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.front.xml \
-    frameworks/native/data/etc/android.hardware.camera.full.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.full.xml \
-    frameworks/native/data/etc/android.hardware.camera.raw.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.raw.xml \
-    hardware/google/camera/devices/EmulatedCamera/hwl/configs/emu_camera_back.json:$(TARGET_COPY_OUT_VENDOR)/etc/config/emu_camera_back.json \
-    hardware/google/camera/devices/EmulatedCamera/hwl/configs/emu_camera_front.json:$(TARGET_COPY_OUT_VENDOR)/etc/config/emu_camera_front.json \
-    hardware/google/camera/devices/EmulatedCamera/hwl/configs/emu_camera_depth.json:$(TARGET_COPY_OUT_VENDOR)/etc/config/emu_camera_depth.json \
-
-endif
-
-ifneq ($(EMULATOR_VENDOR_NO_SOUND),true)
-PRODUCT_PACKAGES += \
-    android.hardware.audio.service \
-    android.hardware.audio@7.1-impl.ranchu \
-    android.hardware.audio.effect@7.0-impl \
-
-DEVICE_MANIFEST_FILE += device/generic/goldfish/audio/android.hardware.audio.effects@7.0.xml
-
-PRODUCT_COPY_FILES += \
-    device/generic/goldfish/audio/policy/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \
-    device/generic/goldfish/audio/policy/primary_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/primary_audio_policy_configuration.xml \
-    frameworks/av/services/audiopolicy/config/bluetooth_audio_policy_configuration_7_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_audio_policy_configuration_7_0.xml \
-    frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml \
-    frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \
-    frameworks/av/services/audiopolicy/config/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml \
-    frameworks/av/media/libeffects/data/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml \
-
-endif
-
-# WiFi: vendor side
-PRODUCT_PACKAGES += \
-    mac80211_create_radios \
-    dhcpclient \
-    hostapd \
-    wpa_supplicant \
-
-# Window Extensions
-$(call inherit-product, $(SRC_TARGET_DIR)/product/window_extensions.mk)
-
-# "Hello, world!" HAL implementations, mostly for compliance
-PRODUCT_PACKAGES += \
-    android.hardware.atrace@1.0-service \
-    android.hardware.authsecret-service.example \
-    android.hardware.contexthub-service.example \
-    android.hardware.dumpstate-service.example \
-    android.hardware.health-service.example \
-    android.hardware.health.storage-service.default \
-    android.hardware.lights-service.example \
-    android.hardware.neuralnetworks-shim-service-sample \
-    android.hardware.neuralnetworks-service-sample-all \
-    android.hardware.neuralnetworks-service-sample-limited \
-    android.hardware.power-service.example \
-    android.hardware.power.stats-service.example \
-    android.hardware.rebootescrow-service.default \
-    android.hardware.thermal@2.0-service.mock \
-    android.hardware.vibrator-service.example
-
-# TVs don't use a hardware identity service.
-ifneq ($(PRODUCT_IS_ATV_SDK),true)
-    PRODUCT_PACKAGES += \
-        android.hardware.identity-service.example
-endif
-
-PRODUCT_COPY_FILES += \
-    device/generic/goldfish/data/etc/dtb.img:dtb.img \
-    device/generic/goldfish/emulator-info.txt:data/misc/emulator/version.txt \
-    device/generic/goldfish/data/etc/apns-conf.xml:data/misc/apns/apns-conf.xml \
-    device/generic/goldfish/radio/RadioConfig/radioconfig.xml:data/misc/emulator/config/radioconfig.xml \
-    device/generic/goldfish/data/etc/iccprofile_for_sim0.xml:data/misc/modem_simulator/iccprofile_for_sim0.xml \
-    device/google/cuttlefish/host/commands/modem_simulator/files/iccprofile_for_sim0_for_CtsCarrierApiTestCases.xml:data/misc/modem_simulator/iccprofile_for_carrierapitests.xml \
-    device/generic/goldfish/data/etc/numeric_operator.xml:data/misc/modem_simulator/etc/modem_simulator/files/numeric_operator.xml \
-    device/generic/goldfish/data/etc/local.prop:data/local.prop \
-    device/generic/goldfish/init.qemu-adb-keys.sh:$(TARGET_COPY_OUT_SYSTEM_EXT)/bin/init.qemu-adb-keys.sh \
-    device/generic/goldfish/init.ranchu-core.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.ranchu-core.sh \
-    device/generic/goldfish/init.ranchu-net.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.ranchu-net.sh \
-    device/generic/goldfish/init.ranchu.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.ranchu.rc \
-    device/generic/goldfish/init.system_ext.rc:$(TARGET_COPY_OUT_SYSTEM_EXT)/etc/init/init.system_ext.rc \
-    device/generic/goldfish/ueventd.ranchu.rc:$(TARGET_COPY_OUT_VENDOR)/etc/ueventd.rc \
-    device/generic/goldfish/input/virtio_input_rotary.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_rotary.idc \
-    device/generic/goldfish/input/qwerty2.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/qwerty2.idc \
-    device/generic/goldfish/input/qwerty.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/qwerty.kl \
-    device/generic/goldfish/input/virtio_input_multi_touch_1.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_1.idc \
-    device/generic/goldfish/input/virtio_input_multi_touch_2.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_2.idc \
-    device/generic/goldfish/input/virtio_input_multi_touch_3.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_3.idc \
-    device/generic/goldfish/input/virtio_input_multi_touch_4.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_4.idc \
-    device/generic/goldfish/input/virtio_input_multi_touch_5.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_5.idc \
-    device/generic/goldfish/input/virtio_input_multi_touch_6.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_6.idc \
-    device/generic/goldfish/input/virtio_input_multi_touch_7.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_7.idc \
-    device/generic/goldfish/input/virtio_input_multi_touch_8.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_8.idc \
-    device/generic/goldfish/input/virtio_input_multi_touch_9.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_9.idc \
-    device/generic/goldfish/input/virtio_input_multi_touch_10.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_10.idc \
-    device/generic/goldfish/input/virtio_input_multi_touch_11.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_11.idc \
-    device/generic/goldfish/display_settings_app_compat.xml:$(TARGET_COPY_OUT_VENDOR)/etc/display_settings_app_compat.xml \
-    device/generic/goldfish/display_settings_freeform.xml:$(TARGET_COPY_OUT_VENDOR)/etc/display_settings_freeform.xml \
-    device/generic/goldfish/display_settings.xml:$(TARGET_COPY_OUT_VENDOR)/etc/display_settings.xml \
-    device/generic/goldfish/data/etc/config.ini:config.ini \
-    device/generic/goldfish/wifi/wpa_supplicant.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/wpa_supplicant.conf \
-    frameworks/native/data/etc/android.hardware.bluetooth_le.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth_le.xml \
-    frameworks/native/data/etc/android.hardware.bluetooth.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth.xml \
-    frameworks/native/data/etc/android.hardware.wifi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.xml \
-    frameworks/native/data/etc/android.hardware.wifi.passpoint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.passpoint.xml \
-    frameworks/native/data/etc/android.hardware.wifi.direct.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.direct.xml \
-    device/generic/goldfish/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml \
-    frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_audio.xml \
-    frameworks/av/media/libstagefright/data/media_codecs_google_telephony.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_telephony.xml \
-    frameworks/native/data/etc/android.hardware.touchscreen.multitouch.jazzhand.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml \
-    frameworks/native/data/etc/android.hardware.vulkan.level-1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.level.xml \
-    frameworks/native/data/etc/android.hardware.vulkan.compute-0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.compute.xml \
-    frameworks/native/data/etc/android.hardware.vulkan.version-1_1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.version.xml \
-    frameworks/native/data/etc/android.software.vulkan.deqp.level-2023-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.vulkan.deqp.level.xml \
-    frameworks/native/data/etc/android.software.opengles.deqp.level-2023-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.opengles.deqp.level.xml \
-    frameworks/native/data/etc/android.software.autofill.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.autofill.xml \
-    frameworks/native/data/etc/android.software.verified_boot.xml:${TARGET_COPY_OUT_PRODUCT}/etc/permissions/android.software.verified_boot.xml \
-    device/generic/goldfish/data/etc/permissions/privapp-permissions-goldfish.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/permissions/privapp-permissions-goldfish.xml \
+$(call inherit-product, $(LOCAL_PATH)/../../vendor_common.mk)
diff --git a/64bitonly/product/x86_64-vendor.mk b/64bitonly/product/x86_64-vendor.mk
index e4f8acf..a28c035 100644
--- a/64bitonly/product/x86_64-vendor.mk
+++ b/64bitonly/product/x86_64-vendor.mk
@@ -3,18 +3,23 @@
 PRODUCT_PROPERTY_OVERRIDES += \
        vendor.rild.libpath=/vendor/lib64/libgoldfish-ril.so
 
+ADVANCED_FEATURES_FILE := advancedFeatures.ini
+ifneq ($(filter %_minigbm, $(TARGET_PRODUCT)),)
+ADVANCED_FEATURES_FILE := advancedFeatures.ini.minigbm
+endif
+
 # This is a build configuration for a full-featured build of the
 # Open-Source part of the tree. It's geared toward a US-centric
 # build quite specifically for the emulator, and might not be
 # entirely appropriate to inherit from for on-device configurations.
 PRODUCT_COPY_FILES += \
     device/generic/goldfish/data/etc/config.ini.xl:config.ini \
-    device/generic/goldfish/data/etc/advancedFeatures.ini:advancedFeatures.ini \
+    device/generic/goldfish/data/etc/$(ADVANCED_FEATURES_FILE):advancedFeatures.ini \
     device/generic/goldfish/data/etc/encryptionkey.img:encryptionkey.img \
     $(EMULATOR_KERNEL_FILE):kernel-ranchu
 
 PRODUCT_SDK_ADDON_COPY_FILES += \
-    device/generic/goldfish/data/etc/advancedFeatures.ini:images/x86_64/advancedFeatures.ini \
+    device/generic/goldfish/data/etc/$(ADVANCED_FEATURES_FILE):images/x86_64/advancedFeatures.ini \
     device/generic/goldfish/data/etc/encryptionkey.img:images/x86_64/encryptionkey.img \
     $(EMULATOR_KERNEL_FILE):images/x86_64/kernel-ranchu
 
@@ -24,8 +29,7 @@
 PRODUCT_PROPERTY_OVERRIDES += \
     ro.crypto.dm_default_key.options_format.version=2
 
-PRODUCT_SHIPPING_API_LEVEL := 33
-PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS := false
+PRODUCT_SHIPPING_API_LEVEL := 34
 TARGET_USES_MKE2FS := true
 
 PRODUCT_PROPERTY_OVERRIDES += \
diff --git a/AndroidProducts.mk b/AndroidProducts.mk
index 13bd09e..9a22b54 100644
--- a/AndroidProducts.mk
+++ b/AndroidProducts.mk
@@ -2,6 +2,7 @@
     $(LOCAL_DIR)/sdk_phone_x86_vendor.mk \
     $(LOCAL_DIR)/64bitonly/product/sdk_phone64_x86_64.mk \
     $(LOCAL_DIR)/64bitonly/product/sdk_phone64_x86_64_riscv64.mk \
+    $(LOCAL_DIR)/64bitonly/product/sdk_tablet_arm64.mk \
     $(LOCAL_DIR)/64bitonly/product/sdk_tablet_x86_64.mk \
     $(LOCAL_DIR)/64bitonly/product/sdk_phone64_arm64.mk \
     $(LOCAL_DIR)/64bitonly/product/sdk_slim_x86_64.mk \
diff --git a/MultiDisplayProvider/AndroidManifest.xml b/MultiDisplayProvider/AndroidManifest.xml
index 3b3b1e3..5c203bd 100644
--- a/MultiDisplayProvider/AndroidManifest.xml
+++ b/MultiDisplayProvider/AndroidManifest.xml
@@ -20,7 +20,11 @@
           package="com.android.emulator.multidisplay"
           android:sharedUserId="android.uid.system" >
 
+    <uses-permission android:name="android.permission.HARDWARE_TEST" />
+    <uses-permission android:name="android.permission.INTERNAL_SYSTEM_WINDOW" />
+    <uses-permission android:name="android.permission.ACCESS_SURFACE_FLINGER" />
     <uses-sdk android:minSdkVersion="19" />
+
     <application android:label="@string/app_name"
                  android:persistent="true">
         <receiver android:name=".MultiDisplayServiceReceiver"
diff --git a/MultiDisplayProvider/jni/com_android_emulator_multidisplay.cpp b/MultiDisplayProvider/jni/com_android_emulator_multidisplay.cpp
index 10e9282..26c7a43 100644
--- a/MultiDisplayProvider/jni/com_android_emulator_multidisplay.cpp
+++ b/MultiDisplayProvider/jni/com_android_emulator_multidisplay.cpp
@@ -43,6 +43,7 @@
 static const uint8_t DEL = 2;
 static const uint8_t QUERY = 3;
 static const uint8_t BIND = 4;
+static const uint8_t SET_DISPLAY = 0x10;
 
 static void fillMsg(std::vector<uint8_t>& buf, uint8_t cmd, uint8_t* data, uint32_t size) {
     // msg format is size(4B) + cmd(1B) + data(size B)
@@ -125,6 +126,14 @@
     std::vector<uint8_t> args(length, 0);
     qemu_pipe_read_fully(gFd, args.data(), (size_t)length);
     switch(args[0]) {
+        case SET_DISPLAY:
+            ALOGV("received setdisplay event");
+            *arrp = SET_DISPLAY;
+            for (int i = 1; i < 6; i++) {
+                *(arrp + i) = *(uint32_t*)(&args[(i - 1) * 4 + 1]);
+            }
+            env->ReleaseIntArrayElements(arr, arrp, JNI_COMMIT);
+            break;
         case ADD: {
             ALOGV("received add event");
             *arrp = ADD;
diff --git a/MultiDisplayProvider/src/com/android/emulator/multidisplay/MultiDisplayService.java b/MultiDisplayProvider/src/com/android/emulator/multidisplay/MultiDisplayService.java
index 41da923..d78cc4e 100644
--- a/MultiDisplayProvider/src/com/android/emulator/multidisplay/MultiDisplayService.java
+++ b/MultiDisplayProvider/src/com/android/emulator/multidisplay/MultiDisplayService.java
@@ -17,15 +17,20 @@
 package com.android.emulator.multidisplay;
 
 import android.app.Service;
+import android.hardware.display.DisplayManager;
+import android.hardware.display.VirtualDisplay;
 import android.content.Intent;
 import android.os.Handler;
 import android.os.IBinder;
+import android.os.Messenger;
+import android.os.Parcel;
+import android.os.RemoteException;
+import android.os.ServiceManager;
 import android.util.DebugUtils;
 import android.util.Log;
-import android.hardware.display.DisplayManager;
-import android.hardware.display.VirtualDisplay;
 import android.view.Surface;
 
+import java.lang.Thread;
 import java.io.FileDescriptor;
 import java.io.PrintWriter;
 import java.util.ArrayList;
@@ -33,8 +38,6 @@
 import java.util.List;
 import java.util.stream.Collectors;
 
-import android.os.Messenger;
-
 public final class MultiDisplayService extends Service {
     private static final String TAG = "MultiDisplayService";
     private static final String DISPLAY_NAME = "Emulator 2D Display";
@@ -47,6 +50,10 @@
     private static final int MAX_DISPLAYS = 10;
     private static final int ADD = 1;
     private static final int DEL = 2;
+    // the following is used by resizabel to set display
+    // intentionally shifted 4 bits to avoid conflicting
+    // with existing multidisplay functions
+    private static final int SET_DISPLAY = 0x10;
 
     private static final int FLAGS = DisplayManager.VIRTUAL_DISPLAY_FLAG_PUBLIC |
                                       DisplayManager.VIRTUAL_DISPLAY_FLAG_OWN_CONTENT_ONLY |
@@ -55,6 +62,8 @@
                                       1 << 6 |//DisplayManager.VIRTUAL_DISPLAY_FLAG_SUPPORTS_TOUCH
                                       1 << 9; //DisplayManager.VIRTUAL_DISPLAY_FLAG_SHOULD_SHOW_SYSTEM_DECORATIONS;
 
+    private static final String SURFACE_COMPOSER_INTERFACE_KEY = "android.ui.ISurfaceComposer";
+    private IBinder mSurfaceFlinger;
     private DisplayManager mDisplayManager;
     private VirtualDisplay mVirtualDisplay[];
     private Surface mSurface[];
@@ -130,7 +139,7 @@
 
     @Override
     public void onCreate() {
-        Log.d(TAG, "Creating service");
+        Log.i(TAG, "Creating service");
 
         super.onCreate();
 
@@ -359,12 +368,16 @@
             while(nativeOpen() <= 0) {
                 Log.e(TAG, "failed to open multiDisplay pipe, retry");
             }
+            Log.d(TAG, "success open multiDisplay pipe");
             while(true) {
+                Log.d(TAG, "waiting to read pipe");
                 int[] array = {0, 0, 0, 0, 0, 0};
                 if (!nativeReadPipe(array)) {
+                    Log.e(TAG, "failed and try again");
                     continue;
                 }
-                Log.v(TAG, "run(): array= " + Arrays.toString(array));
+                Log.d(TAG, "have read something from pipe");
+                Log.d(TAG, "run(): array= " + Arrays.toString(array));
                 switch (array[0]) {
                     case ADD: {
                         for (int j = 0; j < 6; j++) {
@@ -392,6 +405,34 @@
                         deleteVirtualDisplay(i);
                         break;
                     }
+                    case SET_DISPLAY: {
+                         for (int j = 0; j < 6; j++) {
+                             Log.d(TAG, "SET_DISPLAY received " + array[j]);
+                         }
+                         if (mSurfaceFlinger == null) {
+                             Log.d(TAG, "obtain surfaceflinger " );
+                             mSurfaceFlinger = ServiceManager.getService("SurfaceFlinger");
+                         }
+                         if (mSurfaceFlinger != null) {
+                             int i = array[1];
+                             Parcel data = Parcel.obtain();
+                             data.writeInterfaceToken(SURFACE_COMPOSER_INTERFACE_KEY);
+                             data.writeInt(i);
+                             try {
+                                 if (i >=0) {
+                                    mSurfaceFlinger.transact(1035, data, null, 0 /* flags */);
+                                    Log.d(TAG, "setting display to " + i);
+                                 } else {
+                                    Log.e(TAG, "invalid display id " + i);
+                                 }
+                             } catch (RemoteException e) {
+                                 Log.e(TAG, "Could not set display:" + e.toString());
+                             }
+                         } else {
+                             Log.e(TAG, "cannot get SurfaceFlinger service");
+                         }
+                        break;
+                    }
                     // TODO(b/231763427): implement LIST
                 }
             }
diff --git a/arm64-kernel.mk b/arm64-kernel.mk
index 70efdf4..9286abb 100644
--- a/arm64-kernel.mk
+++ b/arm64-kernel.mk
@@ -1,4 +1,5 @@
 TARGET_KERNEL_USE ?= 6.1
+PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS ?= false
 
 KERNEL_ARTIFACTS_PATH := kernel/prebuilts/$(TARGET_KERNEL_USE)/arm64
 
diff --git a/arm64-vendor.mk b/arm64-vendor.mk
index 0cf4e53..f8a70d3 100644
--- a/arm64-vendor.mk
+++ b/arm64-vendor.mk
@@ -6,8 +6,7 @@
 PRODUCT_PROPERTY_OVERRIDES += \
     ro.crypto.dm_default_key.options_format.version=2
 
-PRODUCT_SHIPPING_API_LEVEL := 33
-PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS := false
+PRODUCT_SHIPPING_API_LEVEL := 34
 TARGET_USES_MKE2FS := true
 
 # Note: the following lines need to stay at the beginning so that it can
diff --git a/audio/device_port_sink.cpp b/audio/device_port_sink.cpp
index ae89076..c4295c2 100644
--- a/audio/device_port_sink.cpp
+++ b/audio/device_port_sink.cpp
@@ -159,7 +159,7 @@
                 mReceivedFrames += szFrames;
                 bytesToWrite -= szBytes;
             } else {
-                ALOGV("TinyalsaSink::%s:%d pcm_write was late reading "
+                ALOGV("TinyalsaSink::%s:%d pcm_writei was late reading "
                       "frames, dropping %zu us of audio",
                       __func__, __LINE__,
                       size_t(1000000 * bytesToWrite / mFrameSize / mSampleRateHz));
@@ -209,7 +209,18 @@
                     LOG_ALWAYS_FATAL_IF(mRingBuffer.consume(chunk, szBytes) < szBytes);
                 }
 
-                talsa::pcmWrite(mPcm.get(), writeBuffer.data(), szBytes);
+                const uint8_t *data8 = writeBuffer.data();
+                while (szBytes > 0) {
+                    const int n = talsa::pcmWrite(mPcm.get(), data8, szBytes, mFrameSize);
+                    if (n < 0) {
+                        break;
+                    }
+                    LOG_ALWAYS_FATAL_IF(static_cast<size_t>(n) > szBytes,
+                                        "n=%d szBytes=%zu mFrameSize=%u",
+                                        n, szBytes, mFrameSize);
+                    data8 += n;
+                    szBytes -= n;
+                }
             }
         }
     }
diff --git a/audio/device_port_source.cpp b/audio/device_port_source.cpp
index 608992a..79582dc 100644
--- a/audio/device_port_source.cpp
+++ b/audio/device_port_source.cpp
@@ -138,7 +138,7 @@
                 bytesToRead -= writeBufSzBytes;
                 mSentFrames += writeBufSzBytes / mFrameSize;
             } else {
-                ALOGD("TinyalsaSource::%s:%d pcm_read was late delivering "
+                ALOGD("TinyalsaSource::%s:%d pcm_readi was late delivering "
                       "frames, inserting %zu us of silence",
                       __func__, __LINE__,
                       size_t(1000000 * bytesToRead / mFrameSize / mSampleRateHz));
@@ -185,7 +185,14 @@
     }
 
     size_t doRead(void *dst, size_t sz) {
-        return talsa::pcmRead(mPcm.get(), dst, sz) ? sz : 0;
+        const int n = talsa::pcmRead(mPcm.get(), dst, sz, mFrameSize);
+        if (n > 0) {
+            LOG_ALWAYS_FATAL_IF(static_cast<size_t>(n) > sz,
+                                "n=%d sz=%zu mFrameSize=%u", n, sz, mFrameSize);
+            return n;
+        } else {
+            return 0;
+        }
     }
 
     static std::unique_ptr<TinyalsaSource> create(unsigned pcmCard,
diff --git a/audio/policy/primary_audio_policy_configuration.xml b/audio/policy/primary_audio_policy_configuration.xml
index 9307816..01050d4 100644
--- a/audio/policy/primary_audio_policy_configuration.xml
+++ b/audio/policy/primary_audio_policy_configuration.xml
@@ -13,12 +13,12 @@
         <mixPort name="primary output" role="source" flags="AUDIO_OUTPUT_FLAG_PRIMARY">
             <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
                      samplingRates="8000 11025 16000 32000 44100 48000"
-                     channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+                     channelMasks="AUDIO_CHANNEL_OUT_MONO AUDIO_CHANNEL_OUT_STEREO"/>
         </mixPort>
         <mixPort name="primary input" role="sink">
             <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
                      samplingRates="8000 11025 16000 32000 44100 48000"
-                     channelMasks="AUDIO_CHANNEL_IN_STEREO"/>
+                     channelMasks="AUDIO_CHANNEL_IN_MONO AUDIO_CHANNEL_IN_STEREO"/>
         </mixPort>
 
         <mixPort name="telephony_tx" role="source">
diff --git a/audio/primary_device.cpp b/audio/primary_device.cpp
index 3163f6d..7a1aec5 100644
--- a/audio/primary_device.cpp
+++ b/audio/primary_device.cpp
@@ -20,6 +20,7 @@
 #include "primary_device.h"
 #include "stream_in.h"
 #include "stream_out.h"
+#include "talsa.h"
 #include "util.h"
 #include "debug.h"
 
@@ -83,7 +84,9 @@
 
 Return<void> Device::getInputBufferSize(const AudioConfig& config, getInputBufferSize_cb _hidl_cb) {
     AudioConfig suggestedConfig;
-    if (util::checkAudioConfig(false, kInBufferDurationMs, config, suggestedConfig)) {
+    if (util::checkAudioConfig(false, kInBufferDurationMs,
+                               talsa::pcmGetPcmPeriodSettings().periodCount,
+                               config, suggestedConfig)) {
         const size_t sz =
             suggestedConfig.frameCount
             * util::countChannels(suggestedConfig.base.channelMask)
@@ -286,7 +289,9 @@
     }
 
     AudioConfig suggestedConfig;
-    if (util::checkAudioConfig(true, kOutBufferDurationMs, config, suggestedConfig)) {
+    if (util::checkAudioConfig(true, kOutBufferDurationMs,
+                               talsa::pcmGetPcmPeriodSettings().periodCount,
+                               config, suggestedConfig)) {
         auto stream = std::make_unique<StreamOut>(
             this, ioHandle, device, suggestedConfig, flags, sourceMetadata);
 
@@ -314,7 +319,9 @@
     }
 
     AudioConfig suggestedConfig;
-    if (util::checkAudioConfig(false, kInBufferDurationMs, config, suggestedConfig)) {
+    if (util::checkAudioConfig(false, kInBufferDurationMs,
+                               talsa::pcmGetPcmPeriodSettings().periodCount,
+                               config, suggestedConfig)) {
         auto stream = std::make_unique<StreamIn>(
             this, ioHandle, device, suggestedConfig, flags, sinkMetadata);
 
diff --git a/audio/talsa.cpp b/audio/talsa.cpp
index 4c2d7f8..c5d232d 100644
--- a/audio/talsa.cpp
+++ b/audio/talsa.cpp
@@ -152,6 +152,10 @@
     pcm_config.period_size =
         periodSettings.periodSizeMultiplier * frameCount / periodSettings.periodCount;
     pcm_config.format = PCM_FORMAT_S16_LE;
+    if (isOut) {
+        pcm_config.start_threshold = pcm_config.period_size * (pcm_config.period_count - 1);
+        pcm_config.stop_threshold = pcm_config.period_size * pcm_config.period_count;
+    }
 
     pcm_t *pcmRaw = ::pcm_open(dev, card,
                                (isOut ? PCM_OUT : PCM_IN) | PCM_MONOTONIC,
@@ -183,58 +187,78 @@
     return pcm;
 }
 
-bool pcmRead(pcm_t *pcm, void *data, unsigned int count) {
+int pcmRead(pcm_t *pcm, void *data, const int szBytes,
+             const unsigned int frameSize) {
+    LOG_ALWAYS_FATAL_IF(frameSize == 0);
+    LOG_ALWAYS_FATAL_IF(szBytes < 0, "szBytes=%d", szBytes);
+    LOG_ALWAYS_FATAL_IF((szBytes % frameSize) != 0, "szBytes=%d frameSize=%u",
+                        szBytes, frameSize);
     if (!pcm) {
-        return FAILURE(false);
+        return FAILURE(-1);
     }
 
+    const int szFrames = szBytes / frameSize;
     int tries = 3;
     while (true) {
-        --tries;
-        const int r = ::pcm_read(pcm, data, count);
-        switch (-r) {
-        case 0:
-            return true;
+        const int framesRead = ::pcm_readi(pcm, data, szFrames);
+        if (framesRead > 0) {
+            LOG_ALWAYS_FATAL_IF(framesRead > szFrames,
+                                "framesRead=%d szFrames=%d szBytes=%u frameSize=%u",
+                                framesRead, szFrames, szBytes, frameSize);
+            return framesRead * frameSize;
+        } else {
+            --tries;
+            switch (-framesRead) {
+            case EIO:
+            case EAGAIN:
+                if (tries > 0) {
+                    break;
+                }
+                [[fallthrough]];
 
-        case EIO:
-        case EAGAIN:
-            if (tries > 0) {
-                break;
+            default:
+                ALOGW("%s:%d pcm_readi failed with '%s' (%d)",
+                      __func__, __LINE__, ::pcm_get_error(pcm), framesRead);
+                return FAILURE(-1);
             }
-            [[fallthrough]];
-
-        default:
-            ALOGW("%s:%d pcm_read failed with '%s' (%d)",
-                  __func__, __LINE__, ::pcm_get_error(pcm), r);
-            return FAILURE(false);
         }
     }
 }
 
-bool pcmWrite(pcm_t *pcm, const void *data, unsigned int count) {
+int pcmWrite(pcm_t *pcm, const void *data, const int szBytes,
+              const unsigned int frameSize) {
+    LOG_ALWAYS_FATAL_IF(frameSize == 0);
+    LOG_ALWAYS_FATAL_IF(szBytes < 0, "szBytes=%d", szBytes);
+    LOG_ALWAYS_FATAL_IF((szBytes % frameSize) != 0, "szBytes=%d frameSize=%u",
+                        szBytes, frameSize);
     if (!pcm) {
-        return FAILURE(false);
+        return FAILURE(-1);
     }
 
+    const int szFrames = szBytes / frameSize;
     int tries = 3;
     while (true) {
-        --tries;
-        const int r = ::pcm_write(pcm, data, count);
-        switch (-r) {
-        case 0:
-            return true;
+        const int framesWritten = ::pcm_writei(pcm, data, szFrames);
+        if (framesWritten > 0) {
+            LOG_ALWAYS_FATAL_IF(framesWritten > szFrames,
+                                "framesWritten=%d szFrames=%d szBytes=%u frameSize=%u",
+                                framesWritten, szFrames, szBytes, frameSize);
+            return framesWritten * frameSize;
+        } else {
+            --tries;
+            switch (-framesWritten) {
+            case EIO:
+            case EAGAIN:
+                if (tries > 0) {
+                    break;
+                }
+                [[fallthrough]];
 
-        case EIO:
-        case EAGAIN:
-            if (tries > 0) {
-                break;
+            default:
+                ALOGW("%s:%d pcm_writei failed with '%s' (%d)",
+                      __func__, __LINE__, ::pcm_get_error(pcm), framesWritten);
+                return FAILURE(-1);
             }
-            [[fallthrough]];
-
-        default:
-            ALOGW("%s:%d pcm_write failed with '%s' (%d)",
-                  __func__, __LINE__, ::pcm_get_error(pcm), r);
-            return FAILURE(false);
         }
     }
 }
diff --git a/audio/talsa.h b/audio/talsa.h
index 956a016..59804a8 100644
--- a/audio/talsa.h
+++ b/audio/talsa.h
@@ -42,8 +42,8 @@
 typedef std::unique_ptr<pcm_t, PcmDeleter> PcmPtr;
 PcmPtr pcmOpen(unsigned int dev, unsigned int card, unsigned int nChannels,
                size_t sampleRateHz, size_t frameCount, bool isOut);
-bool pcmRead(pcm_t *pcm, void *data, unsigned int count);
-bool pcmWrite(pcm_t *pcm, const void *data, unsigned int count);
+int pcmRead(pcm_t *pcm, void *data, int szBytes, unsigned int frameSize);
+int pcmWrite(pcm_t *pcm, const void *data, int szBytes, unsigned int frameSize);
 
 class Mixer {
 public:
diff --git a/audio/util.cpp b/audio/util.cpp
index 95ed929..dff075b 100644
--- a/audio/util.cpp
+++ b/audio/util.cpp
@@ -92,9 +92,9 @@
     return (v + a - 1) / a * a;
 }
 
-size_t getBufferSizeFrames(size_t duration_ms, uint32_t sample_rate) {
+size_t getBufferSizeFrames(size_t duration_ms, size_t sample_rate, size_t extraAlignment) {
     // AudioFlinger requires the buffer to be aligned by 16 frames
-    return align(sample_rate * duration_ms / 1000, 16);
+    return align(sample_rate * duration_ms / 1000, 16 * extraAlignment);
 }
 
 }  // namespace
@@ -152,6 +152,7 @@
 
 bool checkAudioConfig(const bool isOut,
                       size_t duration_ms,
+                      size_t extraAlignment,
                       const AudioConfig &src,
                       AudioConfig &suggested) {
     bool result = true;
@@ -170,7 +171,8 @@
     }
 
     if (src.frameCount == 0) {
-        suggested.frameCount = getBufferSizeFrames(duration_ms, src.base.sampleRateHz);
+        suggested.frameCount = getBufferSizeFrames(duration_ms, src.base.sampleRateHz,
+                                                   extraAlignment);
     }
 
     return result;
diff --git a/audio/util.h b/audio/util.h
index db3c3c2..459978d 100644
--- a/audio/util.h
+++ b/audio/util.h
@@ -45,6 +45,7 @@
 bool checkAudioConfig(const AudioConfig &cfg);
 bool checkAudioConfig(bool isOut,
                       size_t duration_ms,
+                      size_t extraAlignment,
                       const AudioConfig &cfg,
                       AudioConfig &suggested);
 
diff --git a/camera/Android.bp b/camera/Android.bp
index 6356217..1e83bf8 100644
--- a/camera/Android.bp
+++ b/camera/Android.bp
@@ -50,9 +50,6 @@
         "yuv.cpp",
     ],
     shared_libs: [
-        "android.hardware.graphics.mapper@2.0",
-        "android.hardware.graphics.mapper@3.0",
-        "android.hardware.graphics.mapper@4.0",
         "libbase",
         "libbinder",
         "libbinder_ndk",
@@ -63,7 +60,6 @@
         "libfmq",
         "libGLESv2",
         "libgralloctypes",
-        "libhidlbase",
         "libjpeg",
         "liblog",
         "libprocessgroup",
diff --git a/camera/CameraDevice.cpp b/camera/CameraDevice.cpp
index ddd04f0..0447413 100644
--- a/camera/CameraDevice.cpp
+++ b/camera/CameraDevice.cpp
@@ -16,7 +16,6 @@
 
 #define FAILURE_DEBUG_PREFIX "CameraDevice"
 
-#include <charconv>
 #include <string_view>
 
 #include <system/camera_metadata.h>
@@ -32,8 +31,6 @@
 namespace provider {
 namespace implementation {
 namespace {
-constexpr char kCameraIdPrefix[] = "device@1.0/internal/";
-
 const uint32_t kExtraResultKeys[] = {
     ANDROID_CONTROL_AE_STATE,
     ANDROID_CONTROL_AF_STATE,
@@ -92,7 +89,7 @@
 
     {
         m[ANDROID_COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES]
-            .add(ANDROID_COLOR_CORRECTION_ABERRATION_MODE_OFF);
+            .add<uint8_t>(ANDROID_COLOR_CORRECTION_ABERRATION_MODE_OFF);
     }
     {   // ANDROID_CONTROL_...
         m[ANDROID_CONTROL_AE_AVAILABLE_ANTIBANDING_MODES]
@@ -136,9 +133,9 @@
             .add<int32_t>(0)    // AWB
             .add<int32_t>(0);   // AF
         m[ANDROID_CONTROL_AE_LOCK_AVAILABLE] =
-            ANDROID_CONTROL_AE_LOCK_AVAILABLE_FALSE;
+            uint8_t(ANDROID_CONTROL_AE_LOCK_AVAILABLE_FALSE);
         m[ANDROID_CONTROL_AWB_LOCK_AVAILABLE] =
-            ANDROID_CONTROL_AWB_LOCK_AVAILABLE_FALSE;
+            uint8_t(ANDROID_CONTROL_AWB_LOCK_AVAILABLE_FALSE);
         m[ANDROID_CONTROL_AVAILABLE_MODES]
             .add<uint8_t>(ANDROID_CONTROL_MODE_OFF)
             .add<uint8_t>(ANDROID_CONTROL_MODE_AUTO);
@@ -156,13 +153,13 @@
     {   // ANDROID_FLASH_INFO_...
         const auto supportedFlashStrength = mHwCamera->getSupportedFlashStrength();
         if (supportedFlashStrength.first > 0) {
-            m[ANDROID_FLASH_INFO_AVAILABLE] = ANDROID_FLASH_INFO_AVAILABLE_TRUE;
+            m[ANDROID_FLASH_INFO_AVAILABLE] = uint8_t(ANDROID_FLASH_INFO_AVAILABLE_TRUE);
             m[ANDROID_FLASH_INFO_STRENGTH_MAXIMUM_LEVEL] =
                 int32_t(supportedFlashStrength.first);
             m[ANDROID_FLASH_INFO_STRENGTH_DEFAULT_LEVEL] =
                 int32_t(supportedFlashStrength.second);
         } else {
-            m[ANDROID_FLASH_INFO_AVAILABLE] = ANDROID_FLASH_INFO_AVAILABLE_FALSE;
+            m[ANDROID_FLASH_INFO_AVAILABLE] = uint8_t(ANDROID_FLASH_INFO_AVAILABLE_FALSE);
         }
     }
     {   // ANDROID_HOT_PIXEL_...
@@ -179,8 +176,8 @@
         m[ANDROID_JPEG_MAX_SIZE] = int32_t(mHwCamera->getJpegMaxSize());
     }
     {   // ANDROID_LENS_...
-        m[ANDROID_LENS_FACING] = mHwCamera->isBackFacing() ?
-            ANDROID_LENS_FACING_BACK : ANDROID_LENS_FACING_FRONT;
+        m[ANDROID_LENS_FACING] = uint8_t(mHwCamera->isBackFacing() ?
+            ANDROID_LENS_FACING_BACK : ANDROID_LENS_FACING_FRONT);
 
         {
             auto& v = m[ANDROID_LENS_INFO_AVAILABLE_APERTURES];
@@ -202,7 +199,7 @@
         m[ANDROID_LENS_INFO_MINIMUM_FOCUS_DISTANCE] =
             float(mHwCamera->getMinimumFocusDistance());
         m[ANDROID_LENS_INFO_FOCUS_DISTANCE_CALIBRATION] =
-            ANDROID_LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE;
+            uint8_t(ANDROID_LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE);
     }
     {   // ANDROID_NOISE_REDUCTION_...
         m[ANDROID_NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES]
@@ -218,29 +215,21 @@
         }
 
         m[ANDROID_REQUEST_MAX_NUM_INPUT_STREAMS] = int32_t(0);
-        m[ANDROID_REQUEST_PIPELINE_MAX_DEPTH] = mHwCamera->getPipelineMaxDepth();
+        m[ANDROID_REQUEST_PIPELINE_MAX_DEPTH] = uint8_t(mHwCamera->getPipelineMaxDepth());
         m[ANDROID_REQUEST_PARTIAL_RESULT_COUNT] = int32_t(1);
-        m[ANDROID_REQUEST_AVAILABLE_CAPABILITIES]
-            .add(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE)
-            .add(ANDROID_REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS);
+        {
+            auto& availableCaps = m[ANDROID_REQUEST_AVAILABLE_CAPABILITIES];
+            uint32_t availableCapsBitmap =
+                mHwCamera->getAvailableCapabilitiesBitmap();
+
+            for (int i = 0; availableCapsBitmap; ++i, availableCapsBitmap >>= 1) {
+                if (availableCapsBitmap & 1) {
+                    availableCaps.add<uint8_t>(i);
+                }
+            }
+        }
     }
     {   // ANDROID_SCALER_...
-        {
-            auto& v = m[ANDROID_SCALER_AVAILABLE_FORMATS];
-            for (const auto fmt : mHwCamera->getSupportedPixelFormats()) {
-                v.add(fmt);
-            }
-        }
-        {
-            auto& jpeg = m[ANDROID_SCALER_AVAILABLE_JPEG_SIZES];
-            auto& processed = m[ANDROID_SCALER_AVAILABLE_PROCESSED_SIZES];
-
-            for (const auto sz : mHwCamera->getSupportedResolutions()) {
-                jpeg.add<int32_t>(sz.width).add<int32_t>(sz.height);
-                processed.add<int32_t>(sz.width).add<int32_t>(sz.height);
-            }
-        }
-
         m[ANDROID_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM] =
             float(mHwCamera->getMaxDigitalZoom());
 
@@ -274,7 +263,7 @@
         }
 
         m[ANDROID_SCALER_CROPPING_TYPE] =
-            ANDROID_SCALER_CROPPING_TYPE_CENTER_ONLY;
+            uint8_t(ANDROID_SCALER_CROPPING_TYPE_CENTER_ONLY);
     }
     {   // ANDROID_SENSOR_...
         m[ANDROID_SENSOR_ORIENTATION] =
@@ -310,7 +299,7 @@
         }
 
         m[ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT] =
-            ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB;
+            uint8_t(ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB);
 
         {
             const auto exposureTimeRange = mHwCamera->getSensorExposureTimeRange();
@@ -323,7 +312,7 @@
         m[ANDROID_SENSOR_INFO_MAX_FRAME_DURATION] =
             int64_t(mHwCamera->getSensorMaxFrameDuration());
         m[ANDROID_SENSOR_INFO_TIMESTAMP_SOURCE] =
-            ANDROID_SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN;  // SYSTEM_TIME_MONOTONIC
+            uint8_t(ANDROID_SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN);  // SYSTEM_TIME_MONOTONIC
     }
     {   // ANDROID_SHADING_...
         m[ANDROID_SHADING_AVAILABLE_MODES]
@@ -340,7 +329,7 @@
     }
     {   // ANDROID_INFO_...
         m[ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL] =
-            ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED;
+            uint8_t(ANDROID_INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED);
     }
     {   // ANDROID_SYNC_
         m[ANDROID_SYNC_MAX_LATENCY] = ANDROID_SYNC_MAX_LATENCY_UNKNOWN;
@@ -355,7 +344,7 @@
         const std::vector<uint32_t> keys = getSortedKeys(m);
         CameraMetadataValue& val = m[ANDROID_REQUEST_AVAILABLE_CHARACTERISTICS_KEYS];
         for (const uint32_t key : keys) {
-            val.add<uint32_t>(key);
+            val.add<int32_t>(key);
         }
     }
     {
@@ -365,7 +354,7 @@
             const std::vector<uint32_t> keys = getSortedKeys(r);
             CameraMetadataValue& val = m[ANDROID_REQUEST_AVAILABLE_REQUEST_KEYS];
             for (const uint32_t key : keys) {
-                val.add<uint32_t>(key);
+                val.add<int32_t>(key);
             }
         }
 
@@ -377,7 +366,7 @@
             const std::vector<uint32_t> keys = getSortedKeys(r);
             CameraMetadataValue& val = m[ANDROID_REQUEST_AVAILABLE_RESULT_KEYS];
             for (const uint32_t key : keys) {
-                val.add<uint32_t>(key);
+                val.add<int32_t>(key);
             }
         }
     }
@@ -440,34 +429,37 @@
     CameraMetadataMap m;
 
     m[ANDROID_COLOR_CORRECTION_ABERRATION_MODE] =
-        ANDROID_COLOR_CORRECTION_ABERRATION_MODE_OFF;
-    m[ANDROID_CONTROL_AE_ANTIBANDING_MODE] = ANDROID_CONTROL_AE_ANTIBANDING_MODE_AUTO;
+        uint8_t(ANDROID_COLOR_CORRECTION_ABERRATION_MODE_OFF);
+    m[ANDROID_CONTROL_AE_ANTIBANDING_MODE] =
+        uint8_t(ANDROID_CONTROL_AE_ANTIBANDING_MODE_AUTO);
     m[ANDROID_CONTROL_AE_EXPOSURE_COMPENSATION] = int32_t(0);
-    m[ANDROID_CONTROL_AE_LOCK] = ANDROID_CONTROL_AE_LOCK_OFF;
-    m[ANDROID_CONTROL_AE_MODE] = (tpl == RequestTemplate::MANUAL) ?
-        ANDROID_CONTROL_AE_MODE_OFF : ANDROID_CONTROL_AE_MODE_ON;
+    m[ANDROID_CONTROL_AE_LOCK] = uint8_t(ANDROID_CONTROL_AE_LOCK_OFF);
+    m[ANDROID_CONTROL_AE_MODE] = uint8_t((tpl == RequestTemplate::MANUAL) ?
+        ANDROID_CONTROL_AE_MODE_OFF : ANDROID_CONTROL_AE_MODE_ON);
     m[ANDROID_CONTROL_AE_TARGET_FPS_RANGE]
         .add<int32_t>(fpsRange.first).add<int32_t>(fpsRange.second);
-    m[ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER] = ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER_IDLE;
-    m[ANDROID_CONTROL_AF_MODE] = (tpl == RequestTemplate::MANUAL) ?
-        ANDROID_CONTROL_AF_MODE_OFF : ANDROID_CONTROL_AF_MODE_AUTO;
-    m[ANDROID_CONTROL_AF_TRIGGER] = ANDROID_CONTROL_AF_TRIGGER_IDLE;
-    m[ANDROID_CONTROL_AWB_LOCK] = ANDROID_CONTROL_AWB_LOCK_OFF;
-    m[ANDROID_CONTROL_AWB_MODE] = (tpl == RequestTemplate::MANUAL) ?
-        ANDROID_CONTROL_AWB_MODE_OFF : ANDROID_CONTROL_AWB_MODE_AUTO;
-    m[ANDROID_CONTROL_CAPTURE_INTENT] = MapRequestTemplateToIntent(tpl);
-    m[ANDROID_CONTROL_EFFECT_MODE] = ANDROID_CONTROL_EFFECT_MODE_OFF;
-    m[ANDROID_CONTROL_MODE] = (tpl == RequestTemplate::MANUAL) ?
-        ANDROID_CONTROL_MODE_OFF : ANDROID_CONTROL_MODE_AUTO;
-    m[ANDROID_CONTROL_SCENE_MODE] = ANDROID_CONTROL_SCENE_MODE_DISABLED;
-    m[ANDROID_CONTROL_VIDEO_STABILIZATION_MODE] = ANDROID_CONTROL_VIDEO_STABILIZATION_MODE_OFF;
+    m[ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER] =
+        uint8_t(ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER_IDLE);
+    m[ANDROID_CONTROL_AF_MODE] = uint8_t((tpl == RequestTemplate::MANUAL) ?
+        ANDROID_CONTROL_AF_MODE_OFF : ANDROID_CONTROL_AF_MODE_AUTO);
+    m[ANDROID_CONTROL_AF_TRIGGER] = uint8_t(ANDROID_CONTROL_AF_TRIGGER_IDLE);
+    m[ANDROID_CONTROL_AWB_LOCK] = uint8_t(ANDROID_CONTROL_AWB_LOCK_OFF);
+    m[ANDROID_CONTROL_AWB_MODE] = uint8_t((tpl == RequestTemplate::MANUAL) ?
+        ANDROID_CONTROL_AWB_MODE_OFF : ANDROID_CONTROL_AWB_MODE_AUTO);
+    m[ANDROID_CONTROL_CAPTURE_INTENT] = uint8_t(MapRequestTemplateToIntent(tpl));
+    m[ANDROID_CONTROL_EFFECT_MODE] = uint8_t(ANDROID_CONTROL_EFFECT_MODE_OFF);
+    m[ANDROID_CONTROL_MODE] = uint8_t((tpl == RequestTemplate::MANUAL) ?
+        ANDROID_CONTROL_MODE_OFF : ANDROID_CONTROL_MODE_AUTO);
+    m[ANDROID_CONTROL_SCENE_MODE] = uint8_t(ANDROID_CONTROL_SCENE_MODE_DISABLED);
+    m[ANDROID_CONTROL_VIDEO_STABILIZATION_MODE] =
+        uint8_t(ANDROID_CONTROL_VIDEO_STABILIZATION_MODE_OFF);
     m[ANDROID_CONTROL_ZOOM_RATIO] = float(mHwCamera->getZoomRatioRange().first);
 
-    m[ANDROID_EDGE_MODE] = ANDROID_EDGE_MODE_OFF;
+    m[ANDROID_EDGE_MODE] = uint8_t(ANDROID_EDGE_MODE_OFF);
 
-    m[ANDROID_FLASH_MODE] = ANDROID_FLASH_MODE_OFF;
+    m[ANDROID_FLASH_MODE] = uint8_t(ANDROID_FLASH_MODE_OFF);
 
-    m[ANDROID_HOT_PIXEL_MODE] = ANDROID_HOT_PIXEL_MODE_OFF;
+    m[ANDROID_HOT_PIXEL_MODE] = uint8_t(ANDROID_HOT_PIXEL_MODE_OFF);
 
     m[ANDROID_JPEG_ORIENTATION] = int32_t(0);
     m[ANDROID_JPEG_QUALITY] = uint8_t(85);
@@ -478,16 +470,14 @@
     m[ANDROID_LENS_FOCAL_LENGTH] = float(mHwCamera->getDefaultFocalLength());
     m[ANDROID_LENS_FOCUS_DISTANCE] = float(mHwCamera->getMinimumFocusDistance());
     m[ANDROID_LENS_OPTICAL_STABILIZATION_MODE] =
-        ANDROID_LENS_OPTICAL_STABILIZATION_MODE_OFF;
+        uint8_t(ANDROID_LENS_OPTICAL_STABILIZATION_MODE_OFF);
 
-    m[ANDROID_NOISE_REDUCTION_MODE] = ANDROID_NOISE_REDUCTION_MODE_OFF;
+    m[ANDROID_NOISE_REDUCTION_MODE] = uint8_t(ANDROID_NOISE_REDUCTION_MODE_OFF);
 
-    m[ANDROID_SENSOR_TEST_PATTERN_MODE] = ANDROID_SENSOR_TEST_PATTERN_MODE_OFF;
+    m[ANDROID_SENSOR_TEST_PATTERN_MODE] = int32_t(ANDROID_SENSOR_TEST_PATTERN_MODE_OFF);
 
-    m[ANDROID_REQUEST_FRAME_COUNT] = int32_t(0);
     m[ANDROID_REQUEST_ID] = int32_t(0);
-    m[ANDROID_REQUEST_METADATA_MODE] = ANDROID_REQUEST_METADATA_MODE_FULL;
-    m[ANDROID_REQUEST_TYPE] = ANDROID_REQUEST_TYPE_CAPTURE;
+    m[ANDROID_REQUEST_METADATA_MODE] = uint8_t(ANDROID_REQUEST_METADATA_MODE_FULL);
 
     m[ANDROID_SCALER_CROP_REGION]
         .add<int32_t>(0).add<int32_t>(0)
@@ -498,42 +488,22 @@
     m[ANDROID_SENSOR_FRAME_DURATION] = int64_t(mHwCamera->getDefaultSensorFrameDuration());
     m[ANDROID_SENSOR_SENSITIVITY] = int32_t(mHwCamera->getDefaultSensorSensitivity());
 
-    m[ANDROID_STATISTICS_FACE_DETECT_MODE] = ANDROID_STATISTICS_FACE_DETECT_MODE_OFF;
-    m[ANDROID_STATISTICS_SHARPNESS_MAP_MODE] = ANDROID_STATISTICS_SHARPNESS_MAP_MODE_OFF;
-    m[ANDROID_STATISTICS_HOT_PIXEL_MAP_MODE] = ANDROID_STATISTICS_HOT_PIXEL_MAP_MODE_OFF;
-    m[ANDROID_STATISTICS_LENS_SHADING_MAP_MODE] = ANDROID_STATISTICS_LENS_SHADING_MAP_MODE_OFF;
+    m[ANDROID_STATISTICS_FACE_DETECT_MODE] =
+        uint8_t(ANDROID_STATISTICS_FACE_DETECT_MODE_OFF);
+    m[ANDROID_STATISTICS_SHARPNESS_MAP_MODE] =
+        uint8_t(ANDROID_STATISTICS_SHARPNESS_MAP_MODE_OFF);
+    m[ANDROID_STATISTICS_HOT_PIXEL_MAP_MODE] =
+        uint8_t(ANDROID_STATISTICS_HOT_PIXEL_MAP_MODE_OFF);
+    m[ANDROID_STATISTICS_LENS_SHADING_MAP_MODE] =
+        uint8_t(ANDROID_STATISTICS_LENS_SHADING_MAP_MODE_OFF);
 
-    m[ANDROID_BLACK_LEVEL_LOCK] = ANDROID_BLACK_LEVEL_LOCK_OFF;
-    m[ANDROID_DISTORTION_CORRECTION_MODE] = ANDROID_DISTORTION_CORRECTION_MODE_OFF;
+    m[ANDROID_BLACK_LEVEL_LOCK] = uint8_t(ANDROID_BLACK_LEVEL_LOCK_OFF);
+    m[ANDROID_DISTORTION_CORRECTION_MODE] =
+        uint8_t(ANDROID_DISTORTION_CORRECTION_MODE_OFF);
 
     return m;
 }
 
-std::string CameraDevice::getPhysicalId(const int index) {
-    char buf[sizeof(kCameraIdPrefix) + 8];
-    snprintf(buf, sizeof(buf), "%s%d", kCameraIdPrefix, index);
-    return buf;
-}
-
-std::optional<int> CameraDevice::parsePhysicalId(const std::string_view str) {
-    if (str.size() < sizeof(kCameraIdPrefix)) {
-        return FAILURE(std::nullopt);
-    }
-
-    if (memcmp(str.data(), kCameraIdPrefix, sizeof(kCameraIdPrefix) - 1) != 0) {
-        return FAILURE(std::nullopt);
-    }
-
-    int index;
-    const auto r = std::from_chars(&str[sizeof(kCameraIdPrefix) - 1],
-                                   &*str.end(), index, 10);
-    if (r.ec == std::errc()) {
-        return index;
-    } else {
-        return FAILURE(std::nullopt);
-    }
-}
-
 }  // namespace implementation
 }  // namespace provider
 }  // namespace camera
diff --git a/camera/CameraDevice.h b/camera/CameraDevice.h
index 6e56d42..f096da3 100644
--- a/camera/CameraDevice.h
+++ b/camera/CameraDevice.h
@@ -65,9 +65,6 @@
 
     CameraMetadataMap constructDefaultRequestSettings(RequestTemplate tpl) const;
 
-    static std::string getPhysicalId(int index);
-    static std::optional<int> parsePhysicalId(std::string_view str);
-
 private:
     friend struct CameraProvider;
 
diff --git a/camera/CameraDeviceSession.cpp b/camera/CameraDeviceSession.cpp
index 70c2aac..41a22e3 100644
--- a/camera/CameraDeviceSession.cpp
+++ b/camera/CameraDeviceSession.cpp
@@ -105,7 +105,8 @@
 
 void notifyShutter(ICameraDeviceCallback* cb,
                    const int32_t frameNumber,
-                   const int64_t timestamp) {
+                   const int64_t shutterTimestamp,
+                   const int64_t readoutTimestamp) {
     using aidl::android::hardware::camera::device::NotifyMsg;
     using aidl::android::hardware::camera::device::ShutterMsg;
     using NotifyMsgTag = NotifyMsg::Tag;
@@ -115,7 +116,8 @@
     {
         ShutterMsg shutterMsg;
         shutterMsg.frameNumber = frameNumber;
-        shutterMsg.timestamp = timestamp;
+        shutterMsg.timestamp = shutterTimestamp;
+        shutterMsg.readoutTimestamp = readoutTimestamp;
         msg.set<NotifyMsgTag::shutter>(shutterMsg);
     }
 
@@ -529,11 +531,9 @@
     }
 
     const int32_t frameNumber = req.frameNumber;
-    const int64_t shutterTimestampNs = timespec2nanos(nextFrameT);
 
-    notifyShutter(&*mCb, frameNumber, shutterTimestampNs);
-
-    auto [frameDurationNs, metadata, outputBuffers, delayedOutputBuffers] =
+    auto [frameDurationNs, exposureDurationNs, metadata,
+          outputBuffers, delayedOutputBuffers] =
         mHwCamera.processCaptureRequest(std::move(req.metadataUpdate),
                                         {req.buffers.begin(), req.buffers.end()});
 
@@ -547,6 +547,8 @@
         }
     }
 
+    const int64_t shutterTimestampNs = timespec2nanos(nextFrameT);
+    notifyShutter(&*mCb, frameNumber, shutterTimestampNs, shutterTimestampNs + exposureDurationNs);
     metadataSetShutterTimestamp(&metadata, shutterTimestampNs);
     consumeCaptureResult(makeCaptureResult(frameNumber,
         std::move(metadata), std::move(outputBuffers)));
diff --git a/camera/CameraProvider.cpp b/camera/CameraProvider.cpp
index 004d7af..02cf5c8 100644
--- a/camera/CameraProvider.cpp
+++ b/camera/CameraProvider.cpp
@@ -14,6 +14,8 @@
  * limitations under the License.
  */
 
+#include <charconv>
+
 #include <inttypes.h>
 
 #include <log/log.h>
@@ -28,6 +30,34 @@
 namespace camera {
 namespace provider {
 namespace implementation {
+namespace {
+constexpr char kCameraIdPrefix[] = "device@1.0/internal/";
+
+std::string getLogicalCameraId(const int index) {
+    char buf[sizeof(kCameraIdPrefix) + 8];
+    snprintf(buf, sizeof(buf), "%s%d", kCameraIdPrefix, index);
+    return buf;
+}
+
+std::optional<int> parseLogicalCameraId(const std::string_view str) {
+    if (str.size() < sizeof(kCameraIdPrefix)) {
+        return FAILURE(std::nullopt);
+    }
+
+    if (memcmp(str.data(), kCameraIdPrefix, sizeof(kCameraIdPrefix) - 1) != 0) {
+        return FAILURE(std::nullopt);
+    }
+
+    int index;
+    const auto r = std::from_chars(&str[sizeof(kCameraIdPrefix) - 1],
+                                   &*str.end(), index, 10);
+    if (r.ec == std::errc()) {
+        return index;
+    } else {
+        return FAILURE(std::nullopt);
+    }
+}
+}  // namespace
 
 using aidl::android::hardware::camera::common::Status;
 
@@ -53,7 +83,7 @@
     camera_ids->reserve(mAvailableCameras.size());
 
     for (int i = 0; i < mAvailableCameras.size(); ++i) {
-        camera_ids->push_back(CameraDevice::getPhysicalId(mDeviceIdBase + i));
+        camera_ids->push_back(getLogicalCameraId(mDeviceIdBase + i));
     }
 
     return ScopedAStatus::ok();
@@ -62,7 +92,7 @@
 ScopedAStatus CameraProvider::getCameraDeviceInterface(
         const std::string& name,
         std::shared_ptr<ICameraDevice>* device) {
-    const std::optional<int> maybeIndex = CameraDevice::parsePhysicalId(name);
+    const std::optional<int> maybeIndex = parseLogicalCameraId(name);
     if (!maybeIndex) {
         return toScopedAStatus(FAILURE(Status::ILLEGAL_ARGUMENT));
     }
diff --git a/camera/FakeRotatingCamera.cpp b/camera/FakeRotatingCamera.cpp
index 2069013..ec00c5e 100644
--- a/camera/FakeRotatingCamera.cpp
+++ b/camera/FakeRotatingCamera.cpp
@@ -61,6 +61,8 @@
 constexpr int kMaxFPS = 30;
 constexpr int64_t kOneSecondNs = 1000000000;
 
+constexpr float kDefaultFocalLength = 2.8;
+
 constexpr int64_t kMinFrameDurationNs = kOneSecondNs / kMaxFPS;
 constexpr int64_t kMaxFrameDurationNs = kOneSecondNs / kMinFPS;
 constexpr int64_t kDefaultFrameDurationNs = kOneSecondNs / kMedFPS;
@@ -432,7 +434,7 @@
     }
 }
 
-std::tuple<int64_t, CameraMetadata,
+std::tuple<int64_t, int64_t, CameraMetadata,
            std::vector<StreamBuffer>, std::vector<DelayedStreamBuffer>>
 FakeRotatingCamera::processCaptureRequest(CameraMetadata metadataUpdate,
                                           Span<CachedStreamBuffer*> csbs) {
@@ -494,7 +496,7 @@
         }
     }
 
-    return make_tuple(mFrameDurationNs,
+    return make_tuple(mFrameDurationNs, kDefaultSensorExposureTimeNs,
                       std::move(resultMetadata), std::move(outputBuffers),
                       std::move(delayedOutputBuffers));
 
@@ -505,7 +507,7 @@
         outputBuffers.push_back(csb->finish(false));
     }
 
-    return make_tuple(FAILURE(-1),
+    return make_tuple(FAILURE(-1), 0,
                       std::move(resultMetadata), std::move(outputBuffers),
                       std::move(delayedOutputBuffers));
 }
@@ -806,20 +808,20 @@
 
     CameraMetadataMap m = parseCameraMetadataMap(metadata);
 
-    m[ANDROID_CONTROL_AE_STATE] = ANDROID_CONTROL_AE_STATE_CONVERGED;
-    m[ANDROID_CONTROL_AF_STATE] = af.first;
-    m[ANDROID_CONTROL_AWB_STATE] = ANDROID_CONTROL_AWB_STATE_CONVERGED;
-    m[ANDROID_FLASH_STATE] = ANDROID_FLASH_STATE_UNAVAILABLE;
+    m[ANDROID_CONTROL_AE_STATE] = uint8_t(ANDROID_CONTROL_AE_STATE_CONVERGED);
+    m[ANDROID_CONTROL_AF_STATE] = uint8_t(af.first);
+    m[ANDROID_CONTROL_AWB_STATE] = uint8_t(ANDROID_CONTROL_AWB_STATE_CONVERGED);
+    m[ANDROID_FLASH_STATE] = uint8_t(ANDROID_FLASH_STATE_UNAVAILABLE);
     m[ANDROID_LENS_APERTURE] = getDefaultAperture();
     m[ANDROID_LENS_FOCUS_DISTANCE] = af.second;
-    m[ANDROID_LENS_STATE] = ANDROID_LENS_STATE_STATIONARY;
+    m[ANDROID_LENS_STATE] = uint8_t(ANDROID_LENS_STATE_STATIONARY);
     m[ANDROID_REQUEST_PIPELINE_DEPTH] = uint8_t(4);
     m[ANDROID_SENSOR_FRAME_DURATION] = mFrameDurationNs;
     m[ANDROID_SENSOR_EXPOSURE_TIME] = kDefaultSensorExposureTimeNs;
     m[ANDROID_SENSOR_SENSITIVITY] = getDefaultSensorSensitivity();
     m[ANDROID_SENSOR_TIMESTAMP] = int64_t(0);
     m[ANDROID_SENSOR_ROLLING_SHUTTER_SKEW] = kMinSensorExposureTimeNs;
-    m[ANDROID_STATISTICS_SCENE_FLICKER] = ANDROID_STATISTICS_SCENE_FLICKER_NONE;
+    m[ANDROID_STATISTICS_SCENE_FLICKER] = uint8_t(ANDROID_STATISTICS_SCENE_FLICKER_NONE);
 
     std::optional<CameraMetadata> maybeSerialized =
         serializeCameraMetadataMap(m);
@@ -908,6 +910,14 @@
     return mIsBackFacing;
 }
 
+Span<const float> FakeRotatingCamera::getAvailableFocalLength() const {
+    static const float availableFocalLengths[] = {
+        kDefaultFocalLength
+    };
+
+    return availableFocalLengths;
+}
+
 std::tuple<int32_t, int32_t, int32_t> FakeRotatingCamera::getMaxNumOutputStreams() const {
     return {
         0,  // raw
@@ -978,7 +988,7 @@
 }
 
 float FakeRotatingCamera::getDefaultFocalLength() const {
-    return 2.8;
+    return kDefaultFocalLength;
 }
 
 }  // namespace hw
diff --git a/camera/FakeRotatingCamera.h b/camera/FakeRotatingCamera.h
index 1d95b16..01b9745 100644
--- a/camera/FakeRotatingCamera.h
+++ b/camera/FakeRotatingCamera.h
@@ -44,7 +44,7 @@
                    const Stream* streams, const HalStream* halStreams) override;
     void close() override;
 
-    std::tuple<int64_t, CameraMetadata, std::vector<StreamBuffer>,
+    std::tuple<int64_t, int64_t, CameraMetadata, std::vector<StreamBuffer>,
                std::vector<DelayedStreamBuffer>>
         processCaptureRequest(CameraMetadata, Span<CachedStreamBuffer*>) override;
 
@@ -52,6 +52,7 @@
     Span<const std::pair<int32_t, int32_t>> getTargetFpsRanges() const override;
     Span<const Rect<uint16_t>> getAvailableThumbnailSizes() const override;
     bool isBackFacing() const override;
+    Span<const float> getAvailableFocalLength() const override;
     std::tuple<int32_t, int32_t, int32_t> getMaxNumOutputStreams() const override;
     Span<const PixelFormat> getSupportedPixelFormats() const override;
     Span<const Rect<uint16_t>> getSupportedResolutions() const override;
diff --git a/camera/HwCamera.cpp b/camera/HwCamera.cpp
index 1b4ffb2..9c44395 100644
--- a/camera/HwCamera.cpp
+++ b/camera/HwCamera.cpp
@@ -147,6 +147,12 @@
     return 4;
 }
 
+uint32_t HwCamera::getAvailableCapabilitiesBitmap() const {
+    return
+        (1U << ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE) |
+        (1U << ANDROID_REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS);
+}
+
 float HwCamera::getMaxDigitalZoom() const {
     return 1.0;
 }
diff --git a/camera/HwCamera.h b/camera/HwCamera.h
index 8345705..4ad37a4 100644
--- a/camera/HwCamera.h
+++ b/camera/HwCamera.h
@@ -80,7 +80,7 @@
                            const Stream* streams, const HalStream* halStreams) = 0;
     virtual void close() = 0;
 
-    virtual std::tuple<int64_t, CameraMetadata, std::vector<StreamBuffer>,
+    virtual std::tuple<int64_t, int64_t, CameraMetadata, std::vector<StreamBuffer>,
                        std::vector<DelayedStreamBuffer>>
         processCaptureRequest(CameraMetadata, Span<CachedStreamBuffer*>) = 0;
 
@@ -107,6 +107,7 @@
     virtual float getMinimumFocusDistance() const;
     virtual std::tuple<int32_t, int32_t, int32_t> getMaxNumOutputStreams() const = 0;
     virtual int32_t getPipelineMaxDepth() const;
+    virtual uint32_t getAvailableCapabilitiesBitmap() const;
     virtual Span<const PixelFormat> getSupportedPixelFormats() const = 0;
     virtual Span<const Rect<uint16_t>> getSupportedResolutions() const = 0;
     virtual float getMaxDigitalZoom() const;
diff --git a/camera/QemuCamera.cpp b/camera/QemuCamera.cpp
index 23344fa..c088418 100644
--- a/camera/QemuCamera.cpp
+++ b/camera/QemuCamera.cpp
@@ -174,7 +174,7 @@
     }
 }
 
-std::tuple<int64_t, CameraMetadata,
+std::tuple<int64_t, int64_t, CameraMetadata,
            std::vector<StreamBuffer>, std::vector<DelayedStreamBuffer>>
 QemuCamera::processCaptureRequest(CameraMetadata metadataUpdate,
                                   Span<CachedStreamBuffer*> csbs) {
@@ -211,6 +211,7 @@
     }
 
     return make_tuple((mQemuChannel.ok() ? mFrameDurationNs : FAILURE(-1)),
+                      mSensorExposureDurationNs,
                       std::move(resultMetadata), std::move(outputBuffers),
                       std::move(delayedOutputBuffers));
 }
@@ -429,20 +430,20 @@
 
     CameraMetadataMap m = parseCameraMetadataMap(metadata);
 
-    m[ANDROID_CONTROL_AE_STATE] = ANDROID_CONTROL_AE_STATE_CONVERGED;
-    m[ANDROID_CONTROL_AF_STATE] = af.first;
-    m[ANDROID_CONTROL_AWB_STATE] = ANDROID_CONTROL_AWB_STATE_CONVERGED;
-    m[ANDROID_FLASH_STATE] = ANDROID_FLASH_STATE_UNAVAILABLE;
+    m[ANDROID_CONTROL_AE_STATE] = uint8_t(ANDROID_CONTROL_AE_STATE_CONVERGED);
+    m[ANDROID_CONTROL_AF_STATE] = uint8_t(af.first);
+    m[ANDROID_CONTROL_AWB_STATE] = uint8_t(ANDROID_CONTROL_AWB_STATE_CONVERGED);
+    m[ANDROID_FLASH_STATE] = uint8_t(ANDROID_FLASH_STATE_UNAVAILABLE);
     m[ANDROID_LENS_APERTURE] = mAperture;
     m[ANDROID_LENS_FOCUS_DISTANCE] = af.second;
-    m[ANDROID_LENS_STATE] = ANDROID_LENS_STATE_STATIONARY;
+    m[ANDROID_LENS_STATE] = uint8_t(ANDROID_LENS_STATE_STATIONARY);
     m[ANDROID_REQUEST_PIPELINE_DEPTH] = uint8_t(4);
     m[ANDROID_SENSOR_FRAME_DURATION] = mFrameDurationNs;
     m[ANDROID_SENSOR_EXPOSURE_TIME] = mSensorExposureDurationNs;
     m[ANDROID_SENSOR_SENSITIVITY] = mSensorSensitivity;
     m[ANDROID_SENSOR_TIMESTAMP] = int64_t(0);
     m[ANDROID_SENSOR_ROLLING_SHUTTER_SKEW] = kMinSensorExposureTimeNs;
-    m[ANDROID_STATISTICS_SCENE_FLICKER] = ANDROID_STATISTICS_SCENE_FLICKER_NONE;
+    m[ANDROID_STATISTICS_SCENE_FLICKER] = uint8_t(ANDROID_STATISTICS_SCENE_FLICKER_NONE);
 
     std::optional<CameraMetadata> maybeSerialized =
         serializeCameraMetadataMap(m);
diff --git a/camera/QemuCamera.h b/camera/QemuCamera.h
index b7f5a60..bf010bc 100644
--- a/camera/QemuCamera.h
+++ b/camera/QemuCamera.h
@@ -49,7 +49,7 @@
                    const Stream* streams, const HalStream* halStreams) override;
     void close() override;
 
-    std::tuple<int64_t, CameraMetadata, std::vector<StreamBuffer>,
+    std::tuple<int64_t, int64_t, CameraMetadata, std::vector<StreamBuffer>,
                std::vector<DelayedStreamBuffer>>
         processCaptureRequest(CameraMetadata, Span<CachedStreamBuffer*>) override;
 
diff --git a/camera/media/codecs_google_video_default.xml b/camera/media/codecs_google_video_default.xml
index 7bb7121..f18991b 100644
--- a/camera/media/codecs_google_video_default.xml
+++ b/camera/media/codecs_google_video_default.xml
@@ -47,7 +47,7 @@
             <Limit name="measured-frame-rate-720x480" range="262-264" />
             <Limit name="measured-frame-rate-1280x720" range="227-251" />
             <Limit name="measured-frame-rate-1920x1080" range="235-247" />
-            <Limit name="measured-frame-rate-3840x2160" range="235-247" />
+            <Limit name="measured-frame-rate-3840x2160" range="90-120" />
             <Feature name="adaptive-playback" />
         </MediaCodec>
         <MediaCodec name="c2.goldfish.h264.decoder" type="video/avc">
@@ -62,7 +62,7 @@
             <Limit name="measured-frame-rate-720x480" range="262-264" />
             <Limit name="measured-frame-rate-1280x720" range="227-251" />
             <Limit name="measured-frame-rate-1920x1080" range="235-247" />
-            <Limit name="measured-frame-rate-3840x2160" range="235-247" />
+            <Limit name="measured-frame-rate-3840x2160" range="90-120" />
             <Feature name="adaptive-playback" />
         </MediaCodec>
         <MediaCodec name="c2.goldfish.hevc.decoder" type="video/hevc">
@@ -73,11 +73,12 @@
             <Limit name="bitrate" range="1-120000000" />
             <Limit name="frame-rate" range="1-480" />
             <Limit name="performance-point-3840x2160" value="30" />
-            <Limit name="measured-frame-rate-320x240" range="257-266" />
+            <Limit name="measured-frame-rate-320x240" range="257-400" />
+            <Limit name="measured-frame-rate-352x288" range="252-400" />
             <Limit name="measured-frame-rate-720x480" range="262-264" />
             <Limit name="measured-frame-rate-1280x720" range="227-251" />
             <Limit name="measured-frame-rate-1920x1080" range="235-247" />
-            <Limit name="measured-frame-rate-3840x2160" range="235-247" />
+            <Limit name="measured-frame-rate-3840x2160" range="90-120" />
             <Feature name="adaptive-playback" />
         </MediaCodec>
         <MediaCodec name="OMX.google.h264.decoder" type="video/avc">
@@ -118,7 +119,7 @@
             <Limit name="measured-frame-rate-640x360" range="237-258" />
             <Limit name="measured-frame-rate-1280x720" range="237-258" />
             <Limit name="measured-frame-rate-1920x1080" range="293-302" />
-            <Limit name="measured-frame-rate-3840x2160" range="150-150" />
+            <Limit name="measured-frame-rate-3840x2160" range="90-120" />
             <Feature name="adaptive-playback" />
         </MediaCodec>
         <MediaCodec name="OMX.android.goldfish.vp8.decoder" type="video/x-vnd.on2.vp8">
@@ -144,7 +145,7 @@
             <Limit name="bitrate" range="1-120000000" />
             <Limit name="frame-rate" range="1-480" />
             <Limit name="performance-point-1920x1080" value="30" />
-            <Limit name="measured-frame-rate-320x180" range="743-817" />
+            <Limit name="measured-frame-rate-320x180" range="300-400" />
             <Limit name="measured-frame-rate-640x360" range="237-258" />
             <Limit name="measured-frame-rate-1280x720" range="60-160" />
             <Limit name="measured-frame-rate-1920x1080" range="30-160" />
@@ -158,7 +159,7 @@
             <Limit name="bitrate" range="1-120000000" />
             <Limit name="frame-rate" range="1-480" />
             <Limit name="performance-point-3840x2160" value="30" />
-            <Limit name="measured-frame-rate-320x180" range="950-970" />
+            <Limit name="measured-frame-rate-320x180" range="300-400" />
             <Limit name="measured-frame-rate-640x360" range="237-258" />
             <Limit name="measured-frame-rate-1280x720" range="237-258" />
             <Limit name="measured-frame-rate-1920x1080" range="100-120" />
diff --git a/camera/media/codecs_performance.xml b/camera/media/codecs_performance.xml
index 022fd9c..c243a54 100644
--- a/camera/media/codecs_performance.xml
+++ b/camera/media/codecs_performance.xml
@@ -84,6 +84,8 @@
         <MediaCodec name="OMX.google.mpeg4.decoder" type="video/mp4v-es" update="true">
             <!-- 4 runs, min 1439 max 1625 gmean 1523 -->
             <Limit name="measured-frame-rate-176x144" range="1439-1625" />
+            <Limit name="measured-frame-rate-480x360" range="200-400" />
+            <Limit name="measured-frame-rate-1280x720" range="100-200" />
         </MediaCodec>
         <MediaCodec name="OMX.google.vp8.decoder" type="video/x-vnd.on2.vp8" update="true">
             <!-- 3 runs, min 1129 max 1261 gmean 1190 -->
diff --git a/camera/media/codecs_performance_c2.xml b/camera/media/codecs_performance_c2.xml
index 9da7ed7..0377873 100644
--- a/camera/media/codecs_performance_c2.xml
+++ b/camera/media/codecs_performance_c2.xml
@@ -33,7 +33,7 @@
         </MediaCodec>
         <MediaCodec name="c2.android.vp8.decoder" type="video/x-vnd.on2.vp8" update="true">
             <!-- measured 90%:799-924 med:815 N=12 -->
-            <Limit name="measured-frame-rate-320x180" range="814-859" /> <!-- v90%=1.1 -->
+            <Limit name="measured-frame-rate-320x180" range="300-400" /> <!-- v90%=1.1 -->
             <!-- measured 90%:338-379 med:345 N=12 -->
             <Limit name="measured-frame-rate-640x360" range="344-358" /> <!-- v90%=1.1 -->
             <Limit name="measured-frame-rate-1280x720" range="88-92" /> <!-- N=50 v90%=1.1 -->
@@ -50,6 +50,17 @@
             <!-- measured 90%:56-58 med:57 N=12 -->
             <Limit name="measured-frame-rate-1920x1080" range="57-57" /> <!-- v90%=1.0 -->
         </MediaCodec>
+        <MediaCodec name="c2.android.av1.decoder" type="video/av01" update="true">
+            <!-- MANUALLY ADJUSTED -->
+            <Limit name="measured-frame-rate-320x180" range="156-362" />
+            <!-- MANUALLY ADJUSTED -->
+            <Limit name="measured-frame-rate-640x360" range="100-200" />
+            <Limit name="measured-frame-rate-720x480" range="100-200" />
+            <!-- MANUALLY ADJUSTED -->
+            <Limit name="measured-frame-rate-1280x720" range="40-110" />
+            <!-- MANUALLY ADJUSTED -->
+            <Limit name="measured-frame-rate-1920x1080" range="17-54" />
+        </MediaCodec>
         <MediaCodec name="c2.android.h263.decoder" type="video/3gpp" update="true">
             <!-- measured 90%:1219-1704 med:1479 N=12 -->
             <Limit name="measured-frame-rate-176x144" range="470-520" /> <!-- v90%=1.2 -->
@@ -59,6 +70,8 @@
         <MediaCodec name="c2.android.mpeg4.decoder" type="video/mp4v-es" update="true">
             <!-- measured 90%:1298-1653 med:1316 SLOW N=12 -->
             <Limit name="measured-frame-rate-176x144" range="540-590" /> <!-- v90%=1.1 -->
+            <Limit name="measured-frame-rate-480x360" range="200-400" /> <!-- v90%=1.1 -->
+            <Limit name="measured-frame-rate-1280x720" range="100-200" /> <!-- v90%=1.1 -->
         </MediaCodec>
     </Decoders>
 
@@ -80,15 +93,23 @@
             <Limit name="measured-frame-rate-176x144" range="1400-1560" /> <!-- SHOULDN'T HAVE TWEAKED N=220 v90%=4.0 -->
         </MediaCodec>
         <MediaCodec name="c2.android.vp8.encoder" type="video/x-vnd.on2.vp8" update="true">
-            <Limit name="measured-frame-rate-320x180" range="178-245" /> <!-- Manual N=20 -->
-            <Limit name="measured-frame-rate-640x360" range="100-126" /> <!-- Manual N=20 -->
+            <Limit name="measured-frame-rate-320x180" range="200-300" /> <!-- Manual N=20 -->
+            <Limit name="measured-frame-rate-640x360" range="200-300" /> <!-- Manual N=20 -->
             <Limit name="measured-frame-rate-1280x720" range="35-37" /> <!-- Manual N=20 -->
             <Limit name="measured-frame-rate-1920x1080" range="24-31" /> <!-- Manual N=20 -->
         </MediaCodec>
         <MediaCodec name="c2.android.vp9.encoder" type="video/x-vnd.on2.vp9" update="true">
-            <Limit name="measured-frame-rate-320x180" range="109-109" /> <!-- v93%=1.3 -->
+            <Limit name="measured-frame-rate-320x180" range="300-400" /> <!-- v93%=1.3 -->
             <Limit name="measured-frame-rate-640x360" range="61-61" /> <!-- v95%=1.1 -->
             <Limit name="measured-frame-rate-1280x720" range="20-20" /> <!-- v95%=1.3 -->
         </MediaCodec>
+        <MediaCodec name="c2.android.av1.encoder" type="video/av01" update="true">
+            <!-- MANUALLY ADJUSTED -->
+            <Limit name="measured-frame-rate-320x240" range="300-400" />
+            <!-- MANUALLY ADJUSTED -->
+            <Limit name="measured-frame-rate-720x480" range="80-120" />
+            <!-- MANUALLY ADJUSTED -->
+            <Limit name="measured-frame-rate-1280x720" range="40-50" />
+        </MediaCodec>
     </Encoders>
 </MediaCodecs>
diff --git a/camera/media/codecs_performance_c2_arm64.xml b/camera/media/codecs_performance_c2_arm64.xml
index 2d207cf..e6a5ce7 100644
--- a/camera/media/codecs_performance_c2_arm64.xml
+++ b/camera/media/codecs_performance_c2_arm64.xml
@@ -49,6 +49,16 @@
             <!-- measured 90%:56-58 med:57 N=12 -->
             <Limit name="measured-frame-rate-1920x1080" range="120-160" /> <!-- v90%=1.0 -->
         </MediaCodec>
+        <MediaCodec name="c2.android.av1.decoder" type="video/av01" update="true">
+            <!-- MANUALLY ADJUSTED -->
+            <Limit name="measured-frame-rate-320x180" range="156-362" />
+            <!-- MANUALLY ADJUSTED -->
+            <Limit name="measured-frame-rate-640x360" range="63-162" />
+            <!-- MANUALLY ADJUSTED -->
+            <Limit name="measured-frame-rate-1280x720" range="40-110" />
+            <!-- MANUALLY ADJUSTED -->
+            <Limit name="measured-frame-rate-1920x1080" range="17-54" />
+        </MediaCodec>
         <MediaCodec name="c2.android.h263.decoder" type="video/3gpp" update="true">
             <!-- measured 90%:1219-1704 med:1479 N=12 -->
             <Limit name="measured-frame-rate-176x144" range="1441-1441" /> <!-- v90%=1.2 -->
@@ -89,5 +99,13 @@
             <Limit name="measured-frame-rate-640x360" range="61-61" /> <!-- v95%=1.1 -->
             <Limit name="measured-frame-rate-1280x720" range="20-20" /> <!-- v95%=1.3 -->
         </MediaCodec>
+        <MediaCodec name="c2.android.av1.encoder" type="video/av01" update="true">
+            <!-- MANUALLY ADJUSTED -->
+            <Limit name="measured-frame-rate-320x240" range="84-130" />
+            <!-- MANUALLY ADJUSTED -->
+            <Limit name="measured-frame-rate-720x480" range="20-43" />
+            <!-- MANUALLY ADJUSTED -->
+            <Limit name="measured-frame-rate-1280x720" range="8-21" />
+        </MediaCodec>
     </Encoders>
 </MediaCodecs>
diff --git a/camera/metadata_utils.cpp b/camera/metadata_utils.cpp
index 318c35b..5bc1d77 100644
--- a/camera/metadata_utils.cpp
+++ b/camera/metadata_utils.cpp
@@ -62,17 +62,36 @@
 
     CameraMetadataPtr cm(allocate_camera_metadata(m.size() * 5 / 4, dataSize * 3 / 2));
 
+    unsigned numIncorrectTagDataSize = 0;
     for (const auto& [tag, value] : m) {
         if (value.count > 0) {
-            if (add_camera_metadata_entry(cm.get(), tag, value.data.data(), value.count)) {
-                return FAILURE_V(std::nullopt, "failed to add tag=%s.%s(%u), count=%u",
-                                 get_camera_metadata_section_name(tag),
-                                 get_camera_metadata_tag_name(tag), tag,
-                                 value.count);
+            const int tagType = get_camera_metadata_tag_type(tag);
+            const size_t elementSize = camera_metadata_type_size[tagType];
+            const size_t expectedDataSize = value.count * elementSize;
+
+            if (value.data.size() == expectedDataSize) {
+                if (add_camera_metadata_entry(cm.get(), tag, value.data.data(), value.count)) {
+                    return FAILURE_V(std::nullopt, "failed to add tag=%s.%s(%u), count=%u",
+                                     get_camera_metadata_section_name(tag),
+                                     get_camera_metadata_tag_name(tag), tag,
+                                     value.count);
+                }
+            } else {
+                ++numIncorrectTagDataSize;
+                ALOGE("%s:%d: Incorrect tag (%s.%s(%u), %s[%u]) data size, "
+                      "expected=%zu, actual=%zu", __func__, __LINE__,
+                       get_camera_metadata_section_name(tag),
+                       get_camera_metadata_tag_name(tag),
+                       tag, camera_metadata_type_names[tagType],
+                       value.count, expectedDataSize, value.data.size());
             }
         }
     }
 
+    LOG_ALWAYS_FATAL_IF(numIncorrectTagDataSize > 0, "%s:%d: there are %u tags "
+                        "with incorrect data size, see the messages above.",
+                        __func__, __LINE__, numIncorrectTagDataSize);
+
     if (sort_camera_metadata(cm.get())) {
         return FAILURE(std::nullopt);
     }
@@ -127,54 +146,60 @@
     for (size_t i = 0; i < n; ++i) {
         camera_metadata_ro_entry_t e;
         get_camera_metadata_ro_entry(raw, i, &e);
-        char value[256];
+        std::vector<char> value;
 
         if (e.count > 0) {
             switch (e.type) {
             case TYPE_BYTE: {
-                    char* s = value;
+                    int s = 0;
                     for (unsigned j = 0; j < e.count; ++j) {
-                        s += snprintf(s, sizeof(value), "%s%u",
+                        value.resize(s + 4);
+                        s += snprintf(&value[s], value.size() - s, "%s%u",
                                       ((j > 0) ? "," : ""), e.data.u8[j]);
                     }
                 }
                 break;
             case TYPE_INT32: {
-                    char* s = value;
+                    int s = 0;
                     for (unsigned j = 0; j < e.count; ++j) {
-                        s += snprintf(s, sizeof(value), "%s%d",
+                        value.resize(s + 12);
+                        s += snprintf(&value[s], value.size() - s, "%s%d",
                                       ((j > 0) ? "," : ""), e.data.i32[j]);
                     }
                 }
                 break;
             case TYPE_FLOAT: {
-                    char* s = value;
+                    int s = 0;
                     for (unsigned j = 0; j < e.count; ++j) {
-                        s += snprintf(s, sizeof(value), "%s%g",
+                        value.resize(s + 12);
+                        s += snprintf(&value[s], value.size() - s, "%s%g",
                                       ((j > 0) ? "," : ""), e.data.f[j]);
                     }
                 }
                 break;
             case TYPE_INT64: {
-                    char* s = value;
+                    int s = 0;
                     for (unsigned j = 0; j < e.count; ++j) {
-                        s += snprintf(s, sizeof(value), "%s%" PRId64,
+                        value.resize(s + 24);
+                        s += snprintf(&value[s], value.size() - s, "%s%" PRId64,
                                       ((j > 0) ? "," : ""), e.data.i64[j]);
                     }
                 }
                 break;
             case TYPE_DOUBLE: {
-                    char* s = value;
+                    int s = 0;
                     for (unsigned j = 0; j < e.count; ++j) {
-                        s += snprintf(s, sizeof(value), "%s%g",
+                        value.resize(s + 25);
+                        s += snprintf(&value[s], value.size() - s, "%s%g",
                                       ((j > 0) ? "," : ""), e.data.d[j]);
                     }
                 }
                 break;
             case TYPE_RATIONAL: {
-                    char* s = value;
+                    int s = 0;
                     for (unsigned j = 0; j < e.count; ++j) {
-                        s += snprintf(s, sizeof(value), "%s%d/%d",
+                        value.resize(s + 25);
+                        s += snprintf(&value[s], value.size() - s, "%s%d/%d",
                                       ((j > 0) ? "," : ""),
                                       e.data.r[j].numerator,
                                       e.data.r[j].denominator);
@@ -182,17 +207,19 @@
                 }
                 break;
             default:
-                snprintf(value, sizeof(value), "%s", "bad type");
+                value.resize(12);
+                snprintf(&value[0], value.size(), "%s", "bad type");
                 break;
             }
         } else {
-            snprintf(value, sizeof(value), "%s", "empty");
+            value.resize(8);
+            snprintf(&value[0], value.size(), "%s", "empty");
         }
 
         ALOGD("%s:%d i=%zu tag=%s.%s(%u),%s[%zu]: %s", __func__, __LINE__, i,
               get_camera_metadata_section_name(e.tag),
               get_camera_metadata_tag_name(e.tag),
-              e.tag, camera_metadata_type_names[e.type], e.count, value);
+              e.tag, camera_metadata_type_names[e.type], e.count, value.data());
     }
 }
 
diff --git a/data/etc/advancedFeatures.ini.minigbm b/data/etc/advancedFeatures.ini.minigbm
new file mode 100644
index 0000000..7c4af33
--- /dev/null
+++ b/data/etc/advancedFeatures.ini.minigbm
@@ -0,0 +1,30 @@
+BluetoothEmulation = on
+GrallocSync = on
+LogcatPipe = on
+GLAsyncSwap = on
+GLESDynamicVersion = on
+GLDMA = on
+EncryptUserData = on
+IntelPerformanceMonitoringUnit = on
+VirtioWifi = on
+HostComposition = on
+VirtioInput = on
+DynamicPartition = on
+HardwareDecoder = on
+ModemSimulator= on
+YUVCache = on
+GLDirectMem = on
+MultiDisplay = on
+VulkanNullOptionalStrings = on
+VulkanIgnoredHandles = on
+Mac80211hwsimUserspaceManaged = on
+VirtconsoleLogcat = on
+VirtioVsockPipe = on
+AndroidbootProps2 = on
+DeviceSkinOverlay = on
+VulkanQueueSubmitWithCommands = on
+VulkanBatchedDescriptorSetUpdate = on
+DeviceStateOnBoot = on
+HWCMultiConfigs = on
+VirtioSndCard = on
+Minigbm = on
diff --git a/data/etc/config.ini.pixeltablet b/data/etc/config.ini.pixeltablet
new file mode 100644
index 0000000..a4e7f92
--- /dev/null
+++ b/data/etc/config.ini.pixeltablet
@@ -0,0 +1,46 @@
+AvdId = Pixel_Tablet_API_34
+PlayStore.enabled = true
+abi.type = x86_64
+avd.ini.displayname = Pixel Tablet API 34
+avd.ini.encoding = UTF-8
+disk.dataPartition.size = 6442450944
+fastboot.chosenSnapshotFile = 
+fastboot.forceChosenSnapshotBoot = no
+fastboot.forceColdBoot = no
+fastboot.forceFastBoot = yes
+hw.accelerometer = yes
+hw.arc = false
+hw.audioInput = yes
+hw.battery = yes
+hw.camera.back = virtualscene
+hw.camera.front = emulated
+hw.cpu.arch = x86_64
+hw.cpu.ncore = 4
+hw.dPad = no
+hw.device.hash2 = MD5:3eb16c85159ad6e1cbb3263194d1a735
+hw.device.manufacturer = Google
+hw.device.name = pixel_tablet
+hw.gps = no
+hw.gpu.enabled = yes
+hw.gpu.mode = auto
+hw.initialOrientation = landscape
+hw.keyboard = yes
+hw.lcd.density = 320
+hw.lcd.height = 1600
+hw.lcd.width = 2560
+hw.mainKeys = no
+hw.ramSize = 2048
+hw.sdCard = yes
+hw.sensors.orientation = yes
+hw.sensors.proximity = no
+hw.trackBall = no
+runtime.network.latency = none
+runtime.network.speed = full
+sdcard.size = 512M
+showDeviceFrame = no
+skin.dynamic = yes
+skin.name = 2560x1600
+skin.path.backup = pixel_tablet
+tag.display = Google Play
+tag.id = google_apis_playstore
+vm.heapSize = 192
diff --git a/data/etc/empty_data_disk b/data/etc/empty_data_disk
deleted file mode 100644
index ad42531..0000000
--- a/data/etc/empty_data_disk
+++ /dev/null
@@ -1 +0,0 @@
-This mean the content in data image will start as empty
diff --git a/data/etc/google/64bit/user/advancedFeatures.ini b/data/etc/google/64bit/user/advancedFeatures.ini
index 7d633d6..027ece5 100644
--- a/data/etc/google/64bit/user/advancedFeatures.ini
+++ b/data/etc/google/64bit/user/advancedFeatures.ini
@@ -4,6 +4,7 @@
 LogcatPipe = on
 GLAsyncSwap = on
 GLESDynamicVersion = on
+HWCMultiConfigs = on
 PlayStoreImage = on
 EncryptUserData = on
 IntelPerformanceMonitoringUnit = on
@@ -24,6 +25,7 @@
 VirtioVsockPipe = on
 AndroidbootProps2 = on
 DeviceSkinOverlay = on
+SupportPixelFold = on
 VulkanQueueSubmitWithCommands = on
 VulkanBatchedDescriptorSetUpdate = on
 DeviceStateOnBoot = on
diff --git a/data/etc/google/64bit/user/advancedFeatures.ini.minigbm b/data/etc/google/64bit/user/advancedFeatures.ini.minigbm
new file mode 100644
index 0000000..0fe52ef
--- /dev/null
+++ b/data/etc/google/64bit/user/advancedFeatures.ini.minigbm
@@ -0,0 +1,31 @@
+BluetoothEmulation = on
+GrallocSync = on
+GLDMA = on
+LogcatPipe = on
+GLAsyncSwap = on
+GLESDynamicVersion = on
+PlayStoreImage = on
+EncryptUserData = on
+IntelPerformanceMonitoringUnit = on
+VirtioWifi = on
+HostComposition = on
+VirtioInput = on
+HardwareDecoder = on
+DynamicPartition = on
+ModemSimulator= on
+MultiDisplay = on
+YUVCache = on
+GLDirectMem = on
+VulkanNullOptionalStrings = on
+VulkanIgnoredHandles = on
+Mac80211hwsimUserspaceManaged = on
+VirtconsoleLogcat = on
+VirtioVsockPipe = on
+AndroidbootProps2 = on
+DeviceSkinOverlay = on
+SupportPixelFold = on
+VulkanQueueSubmitWithCommands = on
+VulkanBatchedDescriptorSetUpdate = on
+DeviceStateOnBoot = on
+VirtioSndCard = on
+Minigbm = on
diff --git a/data/etc/google/64bit/user/advancedFeatures.ini.tablet b/data/etc/google/64bit/user/advancedFeatures.ini.tablet
new file mode 100644
index 0000000..2fe44f8
--- /dev/null
+++ b/data/etc/google/64bit/user/advancedFeatures.ini.tablet
@@ -0,0 +1,29 @@
+BluetoothEmulation = on
+GrallocSync = on
+GLDMA = on
+LogcatPipe = on
+GLAsyncSwap = on
+GLESDynamicVersion = on
+PlayStoreImage = on
+EncryptUserData = on
+IntelPerformanceMonitoringUnit = on
+VirtioWifi = on
+HostComposition = on
+RefCountPipe = on
+VirtioInput = on
+HardwareDecoder = on
+DynamicPartition = on
+MultiDisplay = on
+YUVCache = on
+GLDirectMem = on
+VulkanNullOptionalStrings = on
+VulkanIgnoredHandles = on
+Mac80211hwsimUserspaceManaged = on
+VirtconsoleLogcat = on
+VirtioVsockPipe = on
+AndroidbootProps2 = on
+DeviceSkinOverlay = on
+VulkanQueueSubmitWithCommands = on
+VulkanBatchedDescriptorSetUpdate = on
+DeviceStateOnBoot = on
+VirtioSndCard = on
diff --git a/data/etc/google/64bit/user/arm64/advancedFeatures.ini b/data/etc/google/64bit/user/arm64/advancedFeatures.ini
index 953f411..97e3b58 100644
--- a/data/etc/google/64bit/user/arm64/advancedFeatures.ini
+++ b/data/etc/google/64bit/user/arm64/advancedFeatures.ini
@@ -4,6 +4,7 @@
 LogcatPipe = on
 GLAsyncSwap = on
 GLESDynamicVersion = on
+HWCMultiConfigs = on
 PlayStoreImage = on
 EncryptUserData = on
 VirtioWifi = on
@@ -23,6 +24,7 @@
 VirtioVsockPipe = on
 AndroidbootProps2 = on
 DeviceSkinOverlay = on
+SupportPixelFold = on
 VulkanQueueSubmitWithCommands = on
 VulkanBatchedDescriptorSetUpdate = on
 DeviceStateOnBoot = on
diff --git a/data/etc/google/64bit/user/arm64/advancedFeatures.ini.tablet b/data/etc/google/64bit/user/arm64/advancedFeatures.ini.tablet
new file mode 100644
index 0000000..c32cfc0
--- /dev/null
+++ b/data/etc/google/64bit/user/arm64/advancedFeatures.ini.tablet
@@ -0,0 +1,28 @@
+BluetoothEmulation = on
+GrallocSync = on
+GLDMA = on
+LogcatPipe = on
+GLAsyncSwap = on
+GLESDynamicVersion = on
+PlayStoreImage = on
+EncryptUserData = on
+VirtioWifi = on
+HostComposition = on
+RefCountPipe = on
+VirtioInput = on
+HardwareDecoder = on
+DynamicPartition = on
+MultiDisplay = on
+YUVCache = on
+GLDirectMem = on
+VulkanNullOptionalStrings = on
+VulkanIgnoredHandles = on
+Mac80211hwsimUserspaceManaged = on
+VirtconsoleLogcat = on
+VirtioVsockPipe = on
+AndroidbootProps2 = on
+DeviceSkinOverlay = on
+VulkanQueueSubmitWithCommands = on
+VulkanBatchedDescriptorSetUpdate = on
+DeviceStateOnBoot = on
+VirtioSndCard = on
diff --git a/data/etc/google/64bit/userdebug/advancedFeatures.ini b/data/etc/google/64bit/userdebug/advancedFeatures.ini
index 1fbdaa7..d3ed06d 100644
--- a/data/etc/google/64bit/userdebug/advancedFeatures.ini
+++ b/data/etc/google/64bit/userdebug/advancedFeatures.ini
@@ -23,6 +23,7 @@
 VirtioVsockPipe = on
 AndroidbootProps2 = on
 DeviceSkinOverlay = on
+SupportPixelFold = on
 VulkanQueueSubmitWithCommands = on
 VulkanBatchedDescriptorSetUpdate = on
 DeviceStateOnBoot = on
diff --git a/data/etc/google/64bit/userdebug/advancedFeatures.ini.minigbm b/data/etc/google/64bit/userdebug/advancedFeatures.ini.minigbm
new file mode 100644
index 0000000..ca47a37
--- /dev/null
+++ b/data/etc/google/64bit/userdebug/advancedFeatures.ini.minigbm
@@ -0,0 +1,31 @@
+BluetoothEmulation = on
+GrallocSync = on
+GLDMA = on
+LogcatPipe = on
+GLAsyncSwap = on
+GLESDynamicVersion = on
+EncryptUserData = on
+IntelPerformanceMonitoringUnit = on
+VirtioWifi = on
+HostComposition = on
+VirtioInput = on
+HardwareDecoder = on
+DynamicPartition = on
+ModemSimulator= on
+MultiDisplay = on
+YUVCache = on
+GLDirectMem = on
+VulkanNullOptionalStrings = on
+VulkanIgnoredHandles = on
+Mac80211hwsimUserspaceManaged = on
+VirtconsoleLogcat = on
+VirtioVsockPipe = on
+AndroidbootProps2 = on
+DeviceSkinOverlay = on
+SupportPixelFold = on
+VulkanQueueSubmitWithCommands = on
+VulkanBatchedDescriptorSetUpdate = on
+DeviceStateOnBoot = on
+HWCMultiConfigs = on
+VirtioSndCard = on
+Minigbm = on
diff --git a/data/etc/google/64bit/userdebug/advancedFeatures.ini.tablet b/data/etc/google/64bit/userdebug/advancedFeatures.ini.tablet
new file mode 100644
index 0000000..0810dfe
--- /dev/null
+++ b/data/etc/google/64bit/userdebug/advancedFeatures.ini.tablet
@@ -0,0 +1,29 @@
+BluetoothEmulation = on
+GrallocSync = on
+GLDMA = on
+LogcatPipe = on
+GLAsyncSwap = on
+GLESDynamicVersion = on
+EncryptUserData = on
+IntelPerformanceMonitoringUnit = on
+VirtioWifi = on
+HostComposition = on
+RefCountPipe = on
+VirtioInput = on
+HardwareDecoder = on
+DynamicPartition = on
+MultiDisplay = on
+YUVCache = on
+GLDirectMem = on
+VulkanNullOptionalStrings = on
+VulkanIgnoredHandles = on
+Mac80211hwsimUserspaceManaged = on
+VirtconsoleLogcat = on
+VirtioVsockPipe = on
+AndroidbootProps2 = on
+DeviceSkinOverlay = on
+VulkanQueueSubmitWithCommands = on
+VulkanBatchedDescriptorSetUpdate = on
+DeviceStateOnBoot = on
+HWCMultiConfigs = on
+VirtioSndCard = on
diff --git a/data/etc/google/64bit/userdebug/arm64/advancedFeatures.ini b/data/etc/google/64bit/userdebug/arm64/advancedFeatures.ini
index 6121043..44123cf 100644
--- a/data/etc/google/64bit/userdebug/arm64/advancedFeatures.ini
+++ b/data/etc/google/64bit/userdebug/arm64/advancedFeatures.ini
@@ -22,6 +22,7 @@
 VirtioVsockPipe = on
 AndroidbootProps2 = on
 DeviceSkinOverlay = on
+SupportPixelFold = on
 VulkanQueueSubmitWithCommands = on
 VulkanBatchedDescriptorSetUpdate = on
 DeviceStateOnBoot = on
diff --git a/data/etc/google/64bit/userdebug/arm64/advancedFeatures.ini.tablet b/data/etc/google/64bit/userdebug/arm64/advancedFeatures.ini.tablet
new file mode 100644
index 0000000..86a27ea
--- /dev/null
+++ b/data/etc/google/64bit/userdebug/arm64/advancedFeatures.ini.tablet
@@ -0,0 +1,28 @@
+BluetoothEmulation = on
+GrallocSync = on
+GLDMA = on
+LogcatPipe = on
+GLAsyncSwap = on
+GLESDynamicVersion = on
+EncryptUserData = on
+VirtioWifi = on
+HostComposition = on
+RefCountPipe = on
+VirtioInput = on
+HardwareDecoder = on
+DynamicPartition = on
+MultiDisplay = on
+YUVCache = on
+GLDirectMem = on
+VulkanNullOptionalStrings = on
+VulkanIgnoredHandles = on
+Mac80211hwsimUserspaceManaged = on
+VirtconsoleLogcat = on
+VirtioVsockPipe = on
+AndroidbootProps2 = on
+DeviceSkinOverlay = on
+VulkanQueueSubmitWithCommands = on
+VulkanBatchedDescriptorSetUpdate = on
+DeviceStateOnBoot = on
+HWCMultiConfigs = on
+VirtioSndCard = on
diff --git a/data/etc/google/user/advancedFeatures.ini b/data/etc/google/user/advancedFeatures.ini
index 6b6310b..a4b1646 100644
--- a/data/etc/google/user/advancedFeatures.ini
+++ b/data/etc/google/user/advancedFeatures.ini
@@ -24,6 +24,7 @@
 VirtioVsockPipe = on
 AndroidbootProps2 = on
 DeviceSkinOverlay = on
+SupportPixelFold = on
 VulkanQueueSubmitWithCommands = on
 VulkanBatchedDescriptorSetUpdate = on
 DeviceStateOnBoot = on
diff --git a/data/etc/google/user/advancedFeatures.ini.minigbm b/data/etc/google/user/advancedFeatures.ini.minigbm
new file mode 100644
index 0000000..483a153
--- /dev/null
+++ b/data/etc/google/user/advancedFeatures.ini.minigbm
@@ -0,0 +1,31 @@
+BluetoothEmulation = on
+GrallocSync = on
+GLDMA = on
+LogcatPipe = on
+GLAsyncSwap = on
+GLESDynamicVersion = on
+PlayStoreImage = on
+EncryptUserData = on
+IntelPerformanceMonitoringUnit = on
+VirtioWifi = on
+HostComposition = on
+VirtioInput = on
+DynamicPartition = on
+HardwareDecoder = on
+ModemSimulator= on
+MultiDisplay = on
+YUVCache = on
+GLDirectMem = on
+VulkanNullOptionalStrings = on
+VulkanIgnoredHandles = on
+Mac80211hwsimUserspaceManaged = on
+VirtconsoleLogcat = on
+VirtioVsockPipe = on
+AndroidbootProps2 = on
+DeviceSkinOverlay = on
+SupportPixelFold = on
+VulkanQueueSubmitWithCommands = on
+VulkanBatchedDescriptorSetUpdate = on
+DeviceStateOnBoot = on
+VirtioSndCard = on
+Minigbm = on
diff --git a/data/etc/google/user/arm64/advancedFeatures.ini b/data/etc/google/user/arm64/advancedFeatures.ini
index bf58071..845ee2a 100644
--- a/data/etc/google/user/arm64/advancedFeatures.ini
+++ b/data/etc/google/user/arm64/advancedFeatures.ini
@@ -23,6 +23,7 @@
 VirtioVsockPipe = on
 AndroidbootProps2 = on
 DeviceSkinOverlay = on
+SupportPixelFold = on
 VulkanQueueSubmitWithCommands = on
 VulkanBatchedDescriptorSetUpdate = on
 DeviceStateOnBoot = on
diff --git a/data/etc/google/userdebug/advancedFeatures.ini b/data/etc/google/userdebug/advancedFeatures.ini
index bff2444..7c0e94e 100644
--- a/data/etc/google/userdebug/advancedFeatures.ini
+++ b/data/etc/google/userdebug/advancedFeatures.ini
@@ -23,6 +23,7 @@
 VirtioVsockPipe = on
 AndroidbootProps2 = on
 DeviceSkinOverlay = on
+SupportPixelFold = on
 VulkanQueueSubmitWithCommands = on
 VulkanBatchedDescriptorSetUpdate = on
 DeviceStateOnBoot = on
diff --git a/data/etc/google/userdebug/advancedFeatures.ini.minigbm b/data/etc/google/userdebug/advancedFeatures.ini.minigbm
new file mode 100644
index 0000000..b01365e
--- /dev/null
+++ b/data/etc/google/userdebug/advancedFeatures.ini.minigbm
@@ -0,0 +1,31 @@
+BluetoothEmulation = on
+GrallocSync = on
+GLDMA = on
+LogcatPipe = on
+GLAsyncSwap = on
+GLESDynamicVersion = on
+EncryptUserData = on
+IntelPerformanceMonitoringUnit = on
+VirtioWifi = on
+HostComposition = on
+VirtioInput = on
+DynamicPartition = on
+HardwareDecoder = on
+ModemSimulator= on
+MultiDisplay = on
+YUVCache = on
+GLDirectMem = on
+VulkanNullOptionalStrings = on
+VulkanIgnoredHandles = on
+Mac80211hwsimUserspaceManaged = on
+VirtconsoleLogcat = on
+VirtioVsockPipe = on
+AndroidbootProps2 = on
+DeviceSkinOverlay = on
+SupportPixelFold = on
+VulkanQueueSubmitWithCommands = on
+VulkanBatchedDescriptorSetUpdate = on
+DeviceStateOnBoot = on
+HWCMultiConfigs = on
+VirtioSndCard = on
+Minigbm = on
diff --git a/data/etc/google/userdebug/arm64/advancedFeatures.ini b/data/etc/google/userdebug/arm64/advancedFeatures.ini
index 8504de5..443ef81 100644
--- a/data/etc/google/userdebug/arm64/advancedFeatures.ini
+++ b/data/etc/google/userdebug/arm64/advancedFeatures.ini
@@ -22,6 +22,7 @@
 VirtioVsockPipe = on
 AndroidbootProps2 = on
 DeviceSkinOverlay = on
+SupportPixelFold = on
 VulkanQueueSubmitWithCommands = on
 VulkanBatchedDescriptorSetUpdate = on
 DeviceStateOnBoot = on
diff --git a/data/etc/handheld_core_hardware.xml b/data/etc/handheld_core_hardware.xml
index ef20627..5c2227f 100644
--- a/data/etc/handheld_core_hardware.xml
+++ b/data/etc/handheld_core_hardware.xml
@@ -53,6 +53,7 @@
     <feature name="android.hardware.sensor.gyroscope" />
     <feature name="android.hardware.sensor.hinge_angle" />
     <feature name="android.hardware.telephony" />
+    <feature name="android.hardware.telephony.calling" />
     <feature name="android.hardware.telephony.data" />
     <feature name="android.hardware.telephony.gsm" />
     <feature name="android.hardware.telephony.ims" />
diff --git a/data/etc/permissions/privapp-permissions-multidisplay.xml b/data/etc/permissions/privapp-permissions-multidisplay.xml
new file mode 100644
index 0000000..7e79a60
--- /dev/null
+++ b/data/etc/permissions/privapp-permissions-multidisplay.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+   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
+  -->
+<!--
+This XML file declares which signature|privileged permissions should be granted to privileged
+applications on GMS or Google-branded devices.
+It allows additional grants on top of privapp-permissions-platform.xml
+-->
+<permissions>
+    <privapp-permissions package="com.android.emulator.multidisplay">
+        <permission name="android.permission.HARDWARE_TEST"/>
+        <permission name="android.permission.INTERNAL_SYSTEM_WINDOW"/>
+        <permission name="android.permission.ACCESS_SURFACE_FLINGER"/>
+    </privapp-permissions>
+</permissions>
+
diff --git a/data/etc/tablet_core_hardware.xml b/data/etc/tablet_core_hardware.xml
new file mode 100644
index 0000000..54b7bb8
--- /dev/null
+++ b/data/etc/tablet_core_hardware.xml
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<!-- These are the hardware components that all handheld devices
+     must include. Devices with optional hardware must also include extra
+     hardware files, per the comments below.
+
+     Handheld devices include phones, mobile Internet devices (MIDs),
+     Personal Media Players (PMPs), small tablets (7" or less), and similar
+     devices.
+
+    This file is similar to device/generic/goldfish/data/etc/handheld_core_hardware.xml.
+    with out telephony or hinge sensors
+-->
+<permissions>
+    <feature name="android.hardware.audio.output" />
+    <feature name="android.hardware.bluetooth" />
+    <feature name="android.hardware.camera" />
+    <feature name="android.hardware.location" />
+    <feature name="android.hardware.location.gps" />
+    <feature name="android.hardware.location.network" />
+    <feature name="android.hardware.sensor.accelerometer" />
+    <feature name="android.hardware.sensor.ambient_temperature" />
+    <feature name="android.hardware.sensor.compass" />
+    <feature name="android.hardware.sensor.barometer" />
+    <feature name="android.hardware.sensor.light" />
+    <feature name="android.hardware.sensor.proximity" />
+    <feature name="android.hardware.sensor.relative_humidity" />
+    <feature name="android.hardware.sensor.gyroscope" />
+    <feature name="android.hardware.touchscreen" />
+    <feature name="android.hardware.microphone" />
+    <feature name="android.hardware.screen.portrait" />
+    <feature name="android.hardware.screen.landscape" />
+
+    <!-- basic system services -->
+    <feature name="android.software.app_widgets" />
+    <feature name="android.software.voice_recognizers" notLowRam="true" />
+    <feature name="android.software.backup" />
+    <feature name="android.software.home_screen" />
+    <feature name="android.software.input_methods" />
+    <feature name="android.software.midi" />
+    <feature name="android.software.print" />
+    <feature name="android.software.cant_save_state" />
+    <feature name="android.software.secure_lock_screen" />
+    <feature name="android.software.companion_device_setup" />
+    <feature name="android.software.credentials" />
+
+    <!-- Feature to specify if the device supports adding device admins. -->
+    <feature name="android.software.device_admin" />
+
+    <!-- Feature to specify if the device support managed users. -->
+    <feature name="android.software.managed_users" />
+
+    <feature name="android.software.picture_in_picture" />
+    <feature name="android.software.activities_on_secondary_displays" />
+
+    <feature name="android.software.cts" />
+
+    <feature name="android.hardware.security.model.compatible" />
+
+    <!-- Feature to specify if the device supports controls. -->
+    <feature name="android.software.controls" />
+
+    <!-- devices with GPS must include android.hardware.location.gps.xml -->
+    <!-- devices with an autofocus camera and/or flash must include either
+         android.hardware.camera.autofocus.xml or
+         android.hardware.camera.autofocus-flash.xml -->
+    <!-- devices with a front facing camera must include
+         android.hardware.camera.front.xml -->
+    <!-- devices with WiFi must also include android.hardware.wifi.xml -->
+    <!-- devices that support multitouch must include the most appropriate one
+         of these files:
+
+         If only partial (non-independent) pointers are supported:
+         android.hardware.touchscreen.multitouch.xml
+
+         If up to 4 independently tracked pointers are supported:
+         include android.hardware.touchscreen.multitouch.distinct.xml
+
+         If 5 or more independently tracked pointers are supported:
+         include android.hardware.touchscreen.multitouch.jazzhand.xml
+
+         ONLY ONE of the above should be included. -->
+    <!-- devices with an ambient light sensor must also include
+         android.hardware.sensor.light.xml -->
+    <!-- devices with a proximity sensor must also include
+         android.hardware.sensor.proximity.xml -->
+    <!-- GSM phones must also include android.hardware.telephony.gsm.xml -->
+    <!-- CDMA phones must also include android.hardware.telephony.cdma.xml -->
+    <!-- Devices that have low-latency audio stacks suitable for apps like
+         VoIP may include android.hardware.audio.low_latency.xml. ONLY apps
+         that meet the requirements specified in the CDD may include this. -->
+</permissions>
diff --git a/data/media/test/media.adb b/data/media/test/media.adb
deleted file mode 100644
index d860ef1..0000000
--- a/data/media/test/media.adb
+++ /dev/null
@@ -1,5 +0,0 @@
-push	media/0/test/CtsMediaTestCases-1.4/swirl_136x144_mpeg4.mp4	/sdcard/test/CtsMediaTestCases-1.4/swirl_136x144_mpeg4.mp4
-push	media/0/test/CtsMediaTestCases-1.4/swirl_132x130_mpeg4.mp4	/sdcard/test/CtsMediaTestCases-1.4/swirl_132x130_mpeg4.mp4
-push	media/0/test/CtsMediaTestCases-1.4/swirl_130x132_mpeg4.mp4	/sdcard/test/CtsMediaTestCases-1.4/swirl_130x132_mpeg4.mp4
-push	media/0/test/CtsMediaTestCases-1.4/swirl_144x136_mpeg4.mp4	/sdcard/test/CtsMediaTestCases-1.4/swirl_144x136_mpeg4.mp4
-push	media/0/test/CtsMediaTestCases-1.4/swirl_128x128_mpeg4.mp4	/sdcard/test/CtsMediaTestCases-1.4/swirl_128x128_mpeg4.mp4
diff --git a/data/media/test/swirl_128x128_mpeg4.mp4 b/data/media/test/swirl_128x128_mpeg4.mp4
deleted file mode 100644
index 694ce95..0000000
--- a/data/media/test/swirl_128x128_mpeg4.mp4
+++ /dev/null
Binary files differ
diff --git a/data/media/test/swirl_130x132_mpeg4.mp4 b/data/media/test/swirl_130x132_mpeg4.mp4
deleted file mode 100644
index ed6b529..0000000
--- a/data/media/test/swirl_130x132_mpeg4.mp4
+++ /dev/null
Binary files differ
diff --git a/data/media/test/swirl_132x130_mpeg4.mp4 b/data/media/test/swirl_132x130_mpeg4.mp4
deleted file mode 100644
index ed975db..0000000
--- a/data/media/test/swirl_132x130_mpeg4.mp4
+++ /dev/null
Binary files differ
diff --git a/data/media/test/swirl_136x144_mpeg4.mp4 b/data/media/test/swirl_136x144_mpeg4.mp4
deleted file mode 100644
index c74bd96..0000000
--- a/data/media/test/swirl_136x144_mpeg4.mp4
+++ /dev/null
Binary files differ
diff --git a/data/media/test/swirl_144x136_mpeg4.mp4 b/data/media/test/swirl_144x136_mpeg4.mp4
deleted file mode 100644
index 81c1db3..0000000
--- a/data/media/test/swirl_144x136_mpeg4.mp4
+++ /dev/null
Binary files differ
diff --git a/emulator64_x86_64/BoardConfig.mk b/emulator64_x86_64/BoardConfig.mk
index fcb97ea..db9f2af 100644
--- a/emulator64_x86_64/BoardConfig.mk
+++ b/emulator64_x86_64/BoardConfig.mk
@@ -19,8 +19,6 @@
 TARGET_ARCH_VARIANT := x86_64
 TARGET_2ND_ARCH_VARIANT := x86_64
 
-BOARD_DO_NOT_STRIP_VENDOR_MODULES := true
-
 TARGET_PRELINK_MODULE := false
 include build/make/target/board/BoardConfigGsiCommon.mk
 include build/make/target/board/BoardConfigEmuCommon.mk
diff --git a/init.ranchu.rc b/init.ranchu.rc
index e7b6c05..6d6dfb5 100644
--- a/init.ranchu.rc
+++ b/init.ranchu.rc
@@ -27,9 +27,6 @@
     exec u:r:modprobe:s0 -- /system/bin/modprobe -a -d /system/lib/modules zram.ko
 
 on init
-    # set RLIMIT_MEMLOCK to 8MB for BPF network statistics
-    setrlimit memlock 8388608 8388608
-
     write /sys/block/zram0/comp_algorithm lz4
     write /proc/sys/vm/page-cluster 0
 
@@ -59,7 +56,6 @@
     start qemu-props
 
 on post-fs-data
-    setprop vold.post_fs_data_done 1
     mkdir /data/vendor/adb 0755 root root
     mkdir /data/vendor/devicestate 0755 root root
     mkdir /data/vendor/var 0755 root root
diff --git a/input/virtio_input_multi_touch_7.idc b/input/virtio_input_multi_touch_7.idc
index 7147fb7..388337f 100644
--- a/input/virtio_input_multi_touch_7.idc
+++ b/input/virtio_input_multi_touch_7.idc
@@ -9,4 +9,4 @@
 # This displayID matches the unique ID of the virtual display created for Emulator.
 # This will indicate to input flinger than it should link this input device
 # with the virtual display.
-touch.displayId = virtual:com.android.emulator.multidisplay:1234567
+touch.displayId = local:4619827551948147201
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
index 0e61b2a..841bc69 100644
--- a/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -27,6 +27,39 @@
     <!--  Whether Multiuser UI should be shown -->
     <bool name="config_enableMultiUserUI">true</bool>
 
+        <!-- Map of System DeviceState supplied by DeviceStateManager to WM Jetpack posture. -->
+    <string-array name="config_device_state_postures" translatable="false">
+        <item>0:1</item> <!-- CLOSED -->
+        <item>1:2</item> <!-- HALF_OPENED -->
+        <item>2:3</item> <!-- OPENED -->
+        <item>3:1</item> <!-- FLIPPED -->
+    </string-array>
+
+    <!-- The device states (supplied by DeviceStateManager) that should be treated as open by the
+         display fold controller. -->
+    <integer-array name="config_openDeviceStates" translatable="false">
+        <item>2</item> <!-- OPEN -->
+    </integer-array>
+
+    <!-- The device states (supplied by DeviceStateManager) that should be treated as folded by the
+         display fold controller. This also controls the folded bit in CameraServiceProxy. -->
+    <integer-array name="config_foldedDeviceStates" translatable="false">
+        <item>0</item> <!-- CLOSED -->
+    </integer-array>
+
+    <!-- The device states (supplied by DeviceStateManager) that should be treated as half folded by
+         the display fold controller. This also controls the folded bit in CameraServiceProxy. -->
+    <integer-array name="config_halfFoldedDeviceStates" translatable="false">
+        <item>1</item> <!-- HALF_OPENED -->
+    </integer-array>
+
+    <!-- The device states (supplied by DeviceStateManager) that should be treated as a rear display
+         state. Default is empty. -->
+    <integer-array name="config_rearDisplayDeviceStates" translatable="false">
+        <item>3</item> <!-- REAR_DISPLAY_STATE -->
+    </integer-array>
+
+
     <!-- Set to true to add links to Cell Broadcast app from Settings and MMS app. -->
     <bool name="config_cellBroadcastAppLinks">true</bool>
 
@@ -46,20 +79,7 @@
       <item>"wlan\\d"</item>
     </string-array>
 
-    <!-- Map of System DeviceState supplied by DeviceStateManager to WM Jetpack posture. -->
-    <string-array name="config_device_state_postures" translatable="false">
-        <item>1:1</item> <!-- CLOSED -->
-        <item>2:2</item> <!-- HALF_OPENED -->
-        <item>3:3</item> <!-- OPENED -->
-        <item>4:4</item> <!-- FLIPPED -->
-        <item>5:5</item> <!-- TENT -->
-    </string-array>
 
-    <!-- The device states (supplied by DeviceStateManager) that should be treated as folded by the
-         display fold controller. -->
-    <integer-array name="config_foldedDeviceStates" translatable="false">
-      <item>1</item> <!-- CLOSED -->
-    </integer-array>
 
     <!-- This device is able to support the microphone and camera global toggles. -->
     <bool name="config_supportsMicToggle">true</bool>
@@ -72,6 +92,13 @@
         <item>network</item>
     </string-array>
 
-    <bool name="config_supportMicNearUltrasound">false</bool>
-    <bool name="config_supportSpeakerNearUltrasound">false</bool>
+    <string-array name="config_perDeviceStateRotationLockDefaults" translatable="false">
+        <item>0:1</item> <!-- CLOSED -> LOCKED -->
+        <item>2:0:1</item> <!-- HALF_OPENED -> IGNORED and fallback to device state OPENED -->
+        <item>1:2</item> <!-- OPENED -> UNLOCKED -->
+    </string-array>
+
+    <bool name="config_supportMicNearUltrasound">true</bool>
+    <bool name="config_supportSpeakerNearUltrasound">true</bool>
+
 </resources>
diff --git a/overlay/frameworks/base/core/res/res/xml/irq_device_map.xml b/overlay/frameworks/base/core/res/res/xml/irq_device_map.xml
new file mode 100644
index 0000000..09d7a88
--- /dev/null
+++ b/overlay/frameworks/base/core/res/res/xml/irq_device_map.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+**
+** 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.
+*/
+-->
+<irq-device-map>
+    <device name="rtc0">
+        <subsystem>Alarm</subsystem>
+    </device>
+</irq-device-map>
diff --git a/overlay/frameworks/base/packages/overlays/GoldfishSkinConfig/Android.mk b/overlay/frameworks/base/packages/overlays/GoldfishSkinConfig/Android.mk
new file mode 100644
index 0000000..f0d4c55
--- /dev/null
+++ b/overlay/frameworks/base/packages/overlays/GoldfishSkinConfig/Android.mk
@@ -0,0 +1,40 @@
+#
+#  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.
+#
+
+# create skin related configuration files and symlinks
+# 
+
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := GoldfishSkinConfig
+LOCAL_MODULE_TAGS  := optional
+LOCAL_MODULE_CLASS := ETC
+LOCAL_MODULE_PATH  := $(TARGET_OUT_DATA)/misc/
+LOCAL_SRC_FILES    := readme.txt
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-BSD
+LOCAL_LICENSE_CONDITIONS := notice
+
+# following is **needed**, as the framework only looks at vendor/etc/displayconfig
+# that may change in the future, such as V or later
+LOCAL_POST_INSTALL_CMD := ln -sf /data/system/displayconfig $(PRODUCT_OUT)/vendor/etc/displayconfig
+
+# following is not needed, but keep a note here, as the framework already
+# take /data/system/devicestate/ before accessing /vendor/etc/devicestate
+# LOCAL_POST_INSTALL_CMD += ln -sf /data/system/devicestate $(PRODUCT_OUT)/vendor/etc/devicestate
+
+include $(BUILD_PREBUILT)
+
diff --git a/overlay/frameworks/base/packages/overlays/GoldfishSkinConfig/readme.txt b/overlay/frameworks/base/packages/overlays/GoldfishSkinConfig/readme.txt
new file mode 100644
index 0000000..5d2ee15
--- /dev/null
+++ b/overlay/frameworks/base/packages/overlays/GoldfishSkinConfig/readme.txt
@@ -0,0 +1,20 @@
+#
+# 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.
+#
+
+This folder contains the skin specific configuration files, and
+they should be arranged by host emulator on first boot, according
+the device type and skin in avd's config.ini file
+
diff --git a/overlay/frameworks/base/packages/overlays/pixel_7a/AndroidOverlay/Android.mk b/overlay/frameworks/base/packages/overlays/pixel_7a/AndroidOverlay/Android.mk
new file mode 100644
index 0000000..ddbe715
--- /dev/null
+++ b/overlay/frameworks/base/packages/overlays/pixel_7a/AndroidOverlay/Android.mk
@@ -0,0 +1,31 @@
+#
+#  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.
+#
+
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_RRO_THEME := EmulationPixel7a
+
+LOCAL_PRODUCT_MODULE := true
+
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
+
+LOCAL_PACKAGE_NAME := EmulationPixel7aOverlay
+LOCAL_SDK_VERSION := current
+
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+include $(BUILD_RRO_PACKAGE)
diff --git a/overlay/frameworks/base/packages/overlays/pixel_7a/AndroidOverlay/AndroidManifest.xml b/overlay/frameworks/base/packages/overlays/pixel_7a/AndroidOverlay/AndroidManifest.xml
new file mode 100644
index 0000000..90d2717
--- /dev/null
+++ b/overlay/frameworks/base/packages/overlays/pixel_7a/AndroidOverlay/AndroidManifest.xml
@@ -0,0 +1,24 @@
+<!--
+/**
+ * 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.
+ */
+-->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.android.internal.emulation.pixel_7a"
+    android:versionCode="1"
+    android:versionName="1.0">
+    <overlay android:targetPackage="android" android:priority="1"/>
+    <application android:label="Filled" android:hasCode="false"/>
+</manifest>
diff --git a/overlay/frameworks/base/packages/overlays/pixel_7a/AndroidOverlay/res/values/config.xml b/overlay/frameworks/base/packages/overlays/pixel_7a/AndroidOverlay/res/values/config.xml
new file mode 100644
index 0000000..10e5067
--- /dev/null
+++ b/overlay/frameworks/base/packages/overlays/pixel_7a/AndroidOverlay/res/values/config.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- Whether the display cutout region of the main built-in display should be forced to
+        black in software (to avoid aliasing or emulate a cutout that is not physically existent).
+    -->
+    <bool name="config_fillMainBuiltInDisplayCutout">true</bool>
+
+    <!-- Display cutout configuration -->
+    <string translatable="false" name="config_mainBuiltInDisplayCutout">
+        M 507,66
+        a 33,33 0 1 0 66,0 33,33 0 1 0 -66,0
+        Z
+        @left
+    </string>
+
+    <string translatable="false" name="config_mainBuiltInDisplayCutoutRectApproximation">
+        M 480,0
+        h 145
+        v 118
+        h -145
+        Z
+        @left
+    </string>
+</resources>
diff --git a/overlay/frameworks/base/packages/overlays/pixel_7a/AndroidOverlay/res/values/dimens.xml b/overlay/frameworks/base/packages/overlays/pixel_7a/AndroidOverlay/res/values/dimens.xml
new file mode 100644
index 0000000..be8d827
--- /dev/null
+++ b/overlay/frameworks/base/packages/overlays/pixel_7a/AndroidOverlay/res/values/dimens.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * 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.
+*/
+-->
+<resources>
+    <!-- Radius of the software rounded corners. -->
+    <dimen name="rounded_corner_radius">47px</dimen>
+    <dimen name="rounded_corner_radius_top">47px</dimen>
+    <dimen name="rounded_corner_radius_bottom">48px</dimen>
+
+   <!-- for 20dp of padding at 3.5px/dp at default density -->
+    <dimen name="rounded_corner_content_padding">47px</dimen>
+
+    <!-- Height of the status bar.
+         Do not read this dimen directly. Use {@link SystemBarUtils#getStatusBarHeight} instead.
+         -->
+    <dimen name="status_bar_height_default">28dp</dimen>
+    <dimen name="status_bar_height_portrait">118px</dimen>
+    <dimen name="status_bar_height_landscape">28dp</dimen>
+
+    <!-- Adjustment for software rounded corners since corners aren't perfectly round. -->
+    <dimen name="rounded_corner_radius_adjustment">5px</dimen>
+</resources>
diff --git a/overlay/frameworks/base/packages/overlays/pixel_7a/SystemUIOverlay/Android.mk b/overlay/frameworks/base/packages/overlays/pixel_7a/SystemUIOverlay/Android.mk
new file mode 100644
index 0000000..79b53f0
--- /dev/null
+++ b/overlay/frameworks/base/packages/overlays/pixel_7a/SystemUIOverlay/Android.mk
@@ -0,0 +1,31 @@
+#
+#  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.
+#
+
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_RRO_THEME := SystemUIEmulationPixel7a
+
+LOCAL_PRODUCT_MODULE := true
+
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
+
+LOCAL_PACKAGE_NAME := SystemUIEmulationPixel7aOverlay
+LOCAL_SDK_VERSION := current
+
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+include $(BUILD_RRO_PACKAGE)
diff --git a/overlay/frameworks/base/packages/overlays/pixel_7a/SystemUIOverlay/AndroidManifest.xml b/overlay/frameworks/base/packages/overlays/pixel_7a/SystemUIOverlay/AndroidManifest.xml
new file mode 100644
index 0000000..4ec829d
--- /dev/null
+++ b/overlay/frameworks/base/packages/overlays/pixel_7a/SystemUIOverlay/AndroidManifest.xml
@@ -0,0 +1,24 @@
+<!--
+/**
+ * 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.
+ */
+-->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.android.systemui.emulation.pixel_7a"
+    android:versionCode="1"
+    android:versionName="1.0">
+    <overlay android:targetPackage="com.android.systemui" android:priority="1"/>
+    <application android:label="Filled" android:hasCode="false"/>
+</manifest>
diff --git a/overlay/frameworks/base/packages/overlays/pixel_7a/SystemUIOverlay/res/drawable/rounded_corner_bottom.xml b/overlay/frameworks/base/packages/overlays/pixel_7a/SystemUIOverlay/res/drawable/rounded_corner_bottom.xml
new file mode 100644
index 0000000..fd37234
--- /dev/null
+++ b/overlay/frameworks/base/packages/overlays/pixel_7a/SystemUIOverlay/res/drawable/rounded_corner_bottom.xml
@@ -0,0 +1,25 @@
+<!--
+    Copyright (C) 2022 The Android Open Source Project
+
+    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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="50px"
+        android:height="50px"
+        android:viewportWidth="50"
+        android:viewportHeight="50">
+
+    <path
+        android:pathData="M 0,50 C 0.08303658,43.995271 0.26956077,42.271707 0.70414831,39.50341 1.0543654,37.272548 1.7782723,33.526779 4.1147257,27.960543 5.8269831,24.129607 7.6089696,21.336234 10.012571,18.172837 12.157673,15.498951 14.679237,12.871136 17.460579,10.600699 19.822417,8.7039434 22.788037,6.5492946 27.306398,4.4110174 30.772226,2.7708429 33.051046,2.0752882 37.181125,1.116566 41.654462,0.19593655 43.840716,0.0930927 50,0 H 0 Z"
+        android:fillColor="#000000" />
+
+</vector>
+
diff --git a/overlay/frameworks/base/packages/overlays/pixel_7a/SystemUIOverlay/res/drawable/rounded_corner_top.xml b/overlay/frameworks/base/packages/overlays/pixel_7a/SystemUIOverlay/res/drawable/rounded_corner_top.xml
new file mode 100644
index 0000000..6735ec7
--- /dev/null
+++ b/overlay/frameworks/base/packages/overlays/pixel_7a/SystemUIOverlay/res/drawable/rounded_corner_top.xml
@@ -0,0 +1,25 @@
+<!--
+    Copyright (C) 2022 The Android Open Source Project
+
+    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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="50px"
+        android:height="50px"
+        android:viewportWidth="50"
+        android:viewportHeight="50">
+
+    <path
+        android:pathData="M 0,50 C 0.09060685,43.961677 0.29312289,41.906213 0.90627324,38.938969 1.4214352,36.445923 1.8152288,33.956753 4.3522215,28.156341 6.0942093,24.386105 7.8938533,21.486328 10.374474,18.316668 12.519576,15.642782 14.896031,13.143223 17.677373,10.872786 20.050666,9.0484831 22.757616,6.7720455 27.52968,4.6936421 31.552671,2.941486 32.881983,2.4984814 36.839765,1.44829 40.383179,0.67047466 42.768284,0.20918885 50,0 H 0 Z"
+        android:fillColor="#000000" />
+
+</vector>
+
diff --git a/overlay/frameworks/base/packages/overlays/pixel_7a/SystemUIOverlay/res/values-land/dimen.xml b/overlay/frameworks/base/packages/overlays/pixel_7a/SystemUIOverlay/res/values-land/dimen.xml
new file mode 100644
index 0000000..d52300a
--- /dev/null
+++ b/overlay/frameworks/base/packages/overlays/pixel_7a/SystemUIOverlay/res/values-land/dimen.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (c) 2022, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+-->
+<resources>
+    <!-- Landscape, just use the regular values -->
+    <dimen name="status_bar_padding_start">8dp</dimen>
+    <dimen name="status_bar_padding_end">8dp</dimen>
+
+    <!-- the padding on the top of the statusbar (usually 0) -->
+    <dimen name="status_bar_padding_top">0dp</dimen>
+</resources>
diff --git a/overlay/frameworks/base/packages/overlays/pixel_7a/SystemUIOverlay/res/values/config.xml b/overlay/frameworks/base/packages/overlays/pixel_7a/SystemUIOverlay/res/values/config.xml
new file mode 100644
index 0000000..9b82fd4
--- /dev/null
+++ b/overlay/frameworks/base/packages/overlays/pixel_7a/SystemUIOverlay/res/values/config.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+     for different hardware and product builds. -->
+<resources>
+    <!-- Default rounded corner curve (a Bezier). Must match (the curved path in) rounded.xml.
+         Note that while rounded.xml includes the entire path (including the horizontal and vertical
+         corner edges), this pulls out just the curve.
+     -->
+    <string name="config_rounded_mask" translatable="false">M 71,0 C 33,0 22,-1 10,10 -1,22 0,33 0,71</string>
+
+    <!-- Configure 13px of extra protection around the front-facing camera -->
+    <string translatable="false" name="config_frontBuiltInDisplayCutoutProtection">
+        M 494,66
+        a 46,46 0 1 0 92,0
+        a 46,46 0 1 0 -92,0
+        Z
+    </string>
+
+    <!-- Camera 1 is the front camera on barbet -->
+    <string translatable="false" name="config_protectedCameraId">1</string>
+
+    <!-- Comma-separated list of packages to exclude from camera protection. In our case,
+    ignore the gaze detection package -->
+    <string translatable="false" name="config_cameraProtectionExcludedPackages">com.google.android.as</string>
+
+    <bool name="config_enableDisplayCutoutProtection">true</bool>
+</resources>
diff --git a/overlay/frameworks/base/packages/overlays/pixel_7a/SystemUIOverlay/res/values/dimens.xml b/overlay/frameworks/base/packages/overlays/pixel_7a/SystemUIOverlay/res/values/dimens.xml
new file mode 100644
index 0000000..f65748b
--- /dev/null
+++ b/overlay/frameworks/base/packages/overlays/pixel_7a/SystemUIOverlay/res/values/dimens.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * 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.
+*/
+-->
+<resources>
+    <!-- Don't need the left side padding due to being inset from the cutout -->
+    <dimen name="status_bar_padding_start">0dp</dimen>
+
+    <!-- the padding on the top of the statusbar (usually 0) -->
+    <dimen name="status_bar_padding_top">1px</dimen>
+
+    <!-- Height of the status bar header bar when on Keyguard (match status_bar_height) -->
+    <dimen name="status_bar_header_height_keyguard">@*android:dimen/status_bar_height</dimen>
+
+    <!-- Padding for the system icons on the keyguard (when no multi user switch is showing).
+    The icons always have a 4dp padding in the container so we only need 56 extra px of padding
+    for the corners -->
+    <dimen name="system_icons_super_container_avatarless_margin_end">11px</dimen>
+
+    <!-- Multi user switch has some intrinsic padding to it -->
+    <dimen name="multi_user_switch_keyguard_margin">6dp</dimen>
+
+    <dimen name="keyguard_carrier_text_margin">0px</dimen>
+
+    <dimen name="config_rounded_mask_size">47px</dimen>
+    <dimen name="config_rounded_mask_size_top">47px</dimen>
+    <dimen name="config_rounded_mask_size_bottom">46px</dimen>
+
+    <!-- Location on the screen of the center of the physical power button. -->
+    <dimen name="physical_power_button_center_screen_location_y">730px</dimen>
+
+    <!-- Location on the screen of the center of the physical volume up/down buttons. -->
+    <dimen name="physical_volume_up_button_center_screen_location_y">1064px</dimen>
+    <dimen name="physical_volume_down_button_center_screen_location_y">1232px</dimen>
+
+</resources>
+
diff --git a/overlay/frameworks/base/packages/overlays/pixel_8/AndroidOverlay/Android.mk b/overlay/frameworks/base/packages/overlays/pixel_8/AndroidOverlay/Android.mk
new file mode 100644
index 0000000..1a81d33
--- /dev/null
+++ b/overlay/frameworks/base/packages/overlays/pixel_8/AndroidOverlay/Android.mk
@@ -0,0 +1,31 @@
+#
+#  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.
+#
+
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_RRO_THEME := EmulationPixel8
+
+LOCAL_PRODUCT_MODULE := true
+
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
+
+LOCAL_PACKAGE_NAME := EmulationPixel8Overlay
+LOCAL_SDK_VERSION := current
+
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+include $(BUILD_RRO_PACKAGE)
diff --git a/overlay/frameworks/base/packages/overlays/pixel_8/AndroidOverlay/AndroidManifest.xml b/overlay/frameworks/base/packages/overlays/pixel_8/AndroidOverlay/AndroidManifest.xml
new file mode 100644
index 0000000..1090a5e
--- /dev/null
+++ b/overlay/frameworks/base/packages/overlays/pixel_8/AndroidOverlay/AndroidManifest.xml
@@ -0,0 +1,24 @@
+<!--
+/**
+ * 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.
+ */
+-->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.android.internal.emulation.pixel_8"
+    android:versionCode="1"
+    android:versionName="1.0">
+    <overlay android:targetPackage="android" android:priority="1"/>
+    <application android:label="Filled" android:hasCode="false"/>
+</manifest>
diff --git a/overlay/frameworks/base/packages/overlays/pixel_8/AndroidOverlay/res/values/config.xml b/overlay/frameworks/base/packages/overlays/pixel_8/AndroidOverlay/res/values/config.xml
new file mode 100644
index 0000000..449a350
--- /dev/null
+++ b/overlay/frameworks/base/packages/overlays/pixel_8/AndroidOverlay/res/values/config.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- Whether the display cutout region of the main built-in display should be forced to
+        black in software (to avoid aliasing or emulate a cutout that is not physically existent).
+    -->
+    <bool name="config_fillMainBuiltInDisplayCutout">true</bool>
+
+    <!-- Display cutout configuration -->
+    <string translatable="false" name="config_mainBuiltInDisplayCutout">
+        m 576,65.75 a 36.25,36.25 0 0 0 -72.5,0 36.25,36.25 0 0 0 72.5,0 z
+        @left
+    </string>
+
+    <string translatable="false" name="config_mainBuiltInDisplayCutoutRectApproximation">
+        M 478.5,0
+        h 122
+        v 132
+        h -122
+        Z
+        @left
+    </string>
+</resources>
diff --git a/overlay/frameworks/base/packages/overlays/pixel_8/AndroidOverlay/res/values/dimens.xml b/overlay/frameworks/base/packages/overlays/pixel_8/AndroidOverlay/res/values/dimens.xml
new file mode 100644
index 0000000..295bddf
--- /dev/null
+++ b/overlay/frameworks/base/packages/overlays/pixel_8/AndroidOverlay/res/values/dimens.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * 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.
+*/
+-->
+<resources>
+    <!-- Radius of the software rounded corners. -->
+    <dimen name="rounded_corner_radius">102px</dimen>
+    <dimen name="rounded_corner_radius_top">104px</dimen>
+    <dimen name="rounded_corner_radius_bottom">102px</dimen>
+
+    <!-- Height of the status bar.
+         Do not read this dimen directly. Use {@link SystemBarUtils#getStatusBarHeight} instead.
+         -->
+    <dimen name="status_bar_height_default">28dp</dimen>
+    <dimen name="status_bar_height_portrait">132px</dimen>
+    <dimen name="status_bar_height_landscape">28dp</dimen>
+
+</resources>
diff --git a/overlay/frameworks/base/packages/overlays/pixel_8/SystemUIOverlay/Android.mk b/overlay/frameworks/base/packages/overlays/pixel_8/SystemUIOverlay/Android.mk
new file mode 100644
index 0000000..a9c333a
--- /dev/null
+++ b/overlay/frameworks/base/packages/overlays/pixel_8/SystemUIOverlay/Android.mk
@@ -0,0 +1,31 @@
+#
+#  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.
+#
+
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_RRO_THEME := SystemUIEmulationPixel8
+
+LOCAL_PRODUCT_MODULE := true
+
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
+
+LOCAL_PACKAGE_NAME := SystemUIEmulationPixel8Overlay
+LOCAL_SDK_VERSION := current
+
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+include $(BUILD_RRO_PACKAGE)
diff --git a/overlay/frameworks/base/packages/overlays/pixel_8/SystemUIOverlay/AndroidManifest.xml b/overlay/frameworks/base/packages/overlays/pixel_8/SystemUIOverlay/AndroidManifest.xml
new file mode 100644
index 0000000..2280d7b
--- /dev/null
+++ b/overlay/frameworks/base/packages/overlays/pixel_8/SystemUIOverlay/AndroidManifest.xml
@@ -0,0 +1,24 @@
+<!--
+/**
+ * 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.
+ */
+-->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.android.systemui.emulation.pixel_8"
+    android:versionCode="1"
+    android:versionName="1.0">
+    <overlay android:targetPackage="com.android.systemui" android:priority="1"/>
+    <application android:label="Filled" android:hasCode="false"/>
+</manifest>
diff --git a/overlay/frameworks/base/packages/overlays/pixel_8/SystemUIOverlay/res/drawable/rounded_corner_bottom.xml b/overlay/frameworks/base/packages/overlays/pixel_8/SystemUIOverlay/res/drawable/rounded_corner_bottom.xml
new file mode 100644
index 0000000..229e6ed
--- /dev/null
+++ b/overlay/frameworks/base/packages/overlays/pixel_8/SystemUIOverlay/res/drawable/rounded_corner_bottom.xml
@@ -0,0 +1,23 @@
+<!--
+    Copyright (C) 2023 The Android Open Source Project
+
+    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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="128px"
+        android:height="128px"
+        android:viewportWidth="21.596"
+        android:viewportHeight="21.596">
+    <path
+        android:fillColor="#FF000000"
+        android:pathData="m0,21.596C0,18.555 -0.037,15.711 0.702,12.7c0.718,-2.927 2.092,-5.593 4.247,-7.749C7.105,2.796 9.772,1.421 12.699,0.703 15.711,-0.037 18.555,0 21.596,0H0v21.595Z"/>
+</vector>
+
diff --git a/overlay/frameworks/base/packages/overlays/pixel_8/SystemUIOverlay/res/drawable/rounded_corner_top.xml b/overlay/frameworks/base/packages/overlays/pixel_8/SystemUIOverlay/res/drawable/rounded_corner_top.xml
new file mode 100644
index 0000000..229e6ed
--- /dev/null
+++ b/overlay/frameworks/base/packages/overlays/pixel_8/SystemUIOverlay/res/drawable/rounded_corner_top.xml
@@ -0,0 +1,23 @@
+<!--
+    Copyright (C) 2023 The Android Open Source Project
+
+    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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="128px"
+        android:height="128px"
+        android:viewportWidth="21.596"
+        android:viewportHeight="21.596">
+    <path
+        android:fillColor="#FF000000"
+        android:pathData="m0,21.596C0,18.555 -0.037,15.711 0.702,12.7c0.718,-2.927 2.092,-5.593 4.247,-7.749C7.105,2.796 9.772,1.421 12.699,0.703 15.711,-0.037 18.555,0 21.596,0H0v21.595Z"/>
+</vector>
+
diff --git a/overlay/frameworks/base/packages/overlays/pixel_8/SystemUIOverlay/res/values/config.xml b/overlay/frameworks/base/packages/overlays/pixel_8/SystemUIOverlay/res/values/config.xml
new file mode 100644
index 0000000..5aa8b46
--- /dev/null
+++ b/overlay/frameworks/base/packages/overlays/pixel_8/SystemUIOverlay/res/values/config.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+     for different hardware and product builds. -->
+<resources>
+    <!-- Default rounded corner curve (a Bezier). Must match (the curved path in) rounded.xml.
+         Note that while rounded.xml includes the entire path (including the horizontal and vertical
+         corner edges), this pulls out just the curve.
+     -->
+   <!-- Configure 13px of extra protection around the front-facing camera -->
+    <string translatable="false" name="config_frontBuiltInDisplayCutoutProtection">
+        m 589,65.75 a 49.25,49.25 0 0 0 -98.5,0 49.25,49.25 0 0 0 98.5,0 z
+    </string>
+
+    <!-- Camera 1 is the front camera -->
+    <string translatable="false" name="config_protectedCameraId">1</string>
+
+    <!-- Comma-separated list of packages to exclude from camera protection. In our case,
+    ignore the gaze detection package -->
+    <string translatable="false" name="config_cameraProtectionExcludedPackages">com.google.android.as</string>
+
+    <bool name="config_enableDisplayCutoutProtection">true</bool>
+</resources>
diff --git a/overlay/frameworks/base/packages/overlays/pixel_8/SystemUIOverlay/res/values/dimens.xml b/overlay/frameworks/base/packages/overlays/pixel_8/SystemUIOverlay/res/values/dimens.xml
new file mode 100644
index 0000000..dbb961d
--- /dev/null
+++ b/overlay/frameworks/base/packages/overlays/pixel_8/SystemUIOverlay/res/values/dimens.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * 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.
+*/
+-->
+<resources>
+    <!-- Don't need the left side padding due to being inset from the cutout -->
+    <dimen name="status_bar_padding_start">16dp</dimen>
+
+    <!-- the padding on the top of the statusbar (usually 0) -->
+    <dimen name="status_bar_padding_top">1px</dimen>
+
+    <!-- Height of the status bar header bar when on Keyguard (match status_bar_height) -->
+    <dimen name="status_bar_header_height_keyguard">@*android:dimen/status_bar_height</dimen>
+
+    <!-- Padding for the system icons on the keyguard (when no multi user switch is showing).
+    The icons always have a 4dp padding in the container so we only need 56 extra px of padding
+    for the corners -->
+    <dimen name="system_icons_super_container_avatarless_margin_end">11px</dimen>
+
+    <!-- Multi user switch has some intrinsic padding to it -->
+    <dimen name="multi_user_switch_keyguard_margin">6dp</dimen>
+
+    <dimen name="keyguard_carrier_text_margin">0px</dimen>
+
+    <dimen name="config_rounded_mask_size">47px</dimen>
+    <dimen name="config_rounded_mask_size_top">47px</dimen>
+    <dimen name="config_rounded_mask_size_bottom">46px</dimen>
+
+    <!-- Location on the screen of the center of the physical volume up/down buttons. -->
+    <dimen name="physical_volume_up_button_center_screen_location_y">1000px</dimen>
+    <dimen name="physical_volume_down_button_center_screen_location_y">1160px</dimen>
+
+    <!-- Padding for the lock icon on the keyguard. In pixels - should not scale with
+         display size. -->
+    <dimen name="lock_icon_padding">50px</dimen>
+
+    <!-- Offset should not be more than 1mm -->
+    <dimen name="udfps_burn_in_offset_x">6px</dimen>
+    <dimen name="udfps_burn_in_offset_y">17px</dimen>
+
+</resources>
diff --git a/overlay/frameworks/base/packages/overlays/pixel_8_pro/AndroidOverlay/Android.mk b/overlay/frameworks/base/packages/overlays/pixel_8_pro/AndroidOverlay/Android.mk
new file mode 100644
index 0000000..51261b3
--- /dev/null
+++ b/overlay/frameworks/base/packages/overlays/pixel_8_pro/AndroidOverlay/Android.mk
@@ -0,0 +1,31 @@
+#
+#  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.
+#
+
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_RRO_THEME := EmulationPixel8Pro
+
+LOCAL_PRODUCT_MODULE := true
+
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
+
+LOCAL_PACKAGE_NAME := EmulationPixel8ProOverlay
+LOCAL_SDK_VERSION := current
+
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+include $(BUILD_RRO_PACKAGE)
diff --git a/overlay/frameworks/base/packages/overlays/pixel_8_pro/AndroidOverlay/AndroidManifest.xml b/overlay/frameworks/base/packages/overlays/pixel_8_pro/AndroidOverlay/AndroidManifest.xml
new file mode 100644
index 0000000..9ae3877
--- /dev/null
+++ b/overlay/frameworks/base/packages/overlays/pixel_8_pro/AndroidOverlay/AndroidManifest.xml
@@ -0,0 +1,24 @@
+<!--
+/**
+ * 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.
+ */
+-->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.android.internal.emulation.pixel_8_pro"
+    android:versionCode="1"
+    android:versionName="1.0">
+    <overlay android:targetPackage="android" android:priority="1"/>
+    <application android:label="Filled" android:hasCode="false"/>
+</manifest>
diff --git a/overlay/frameworks/base/packages/overlays/pixel_8_pro/AndroidOverlay/res/values/config.xml b/overlay/frameworks/base/packages/overlays/pixel_8_pro/AndroidOverlay/res/values/config.xml
new file mode 100644
index 0000000..7eb20d7
--- /dev/null
+++ b/overlay/frameworks/base/packages/overlays/pixel_8_pro/AndroidOverlay/res/values/config.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- Whether the display cutout region of the main built-in display should be forced to
+        black in software (to avoid aliasing or emulate a cutout that is not physically existent).
+    -->
+     <!-- The stable device width and height in pixels. If these aren't set to a positive number
+          then the device will use the width and height of the default display the first time it's
+          booted.  -->
+    <integer name="config_stableDeviceDisplayWidth">1344</integer>
+    <integer name="config_stableDeviceDisplayHeight">2992</integer>
+
+
+    <!-- Whether the display cutout region of the main built-in display should be forced to
+        black in software (to avoid aliasing or emulate a cutout that is not physically existent).
+    -->
+    <bool name="config_fillMainBuiltInDisplayCutout">true</bool>
+
+    <!-- Display cutout configuration -->
+    <string translatable="false" name="config_mainBuiltInDisplayCutout">
+        M 628.75,75
+        a 43.25,43.25 0 1 0 86.5,0
+        a 43.25,43.25 0 1 0 -86.5,0
+        Z
+        @left
+    </string>
+
+    <string translatable="false" name="config_mainBuiltInDisplayCutoutRectApproximation">
+        M 615.5,0
+        h 110
+        v 151
+        h -110
+        Z
+        @left
+    </string>
+
+    <!-- A string config in svg path format for the main display shape.
+         (@see https://www.w3.org/TR/SVG/paths.html#PathData).
+
+         This config must be set unless:
+         1. {@link Configuration#isScreenRound} is true which means the display shape is circular
+            and the system will auto-generate a circular shape.
+         2. The display has no rounded corner and the system will auto-generate a rectangular shape.
+         (@see DisplayShape#createDefaultDisplayShape)
+
+         Note: If the display supports multiple resolutions, please define the path config based on
+         the highest resolution so that it can be scaled correctly in each resolution.
+    -->
+    <string name="config_mainDisplayShape" translatable="false">M 119.9999 -3.7795276e-05 C 113.32402 0.34316186 102.8311 1.9200038 98.695215 2.8066029 C 73.98156 8.0987976 62.561448 13.566009 49.605371 22.5859 C 34.411306 33.163789 20.551075 49.59161 12.962793 65.706994 C 7.8660073 76.530983 2.8411097 93.439401 1.4120111 104.32809 C 0.066002501 114.58638 0.28550144 114.76397 -9.8267718e-05 119.99996 L -9.8267718e-05 2877 L 1.9803705 2891.3164 C 8.0676544 2919.9453 16.781085 2937.4625 33.785058 2955.2598 C 51.142521 2973.4268 70.876659 2983.6798 100.6835 2990.0176 L 114.9999 2992 L 1228.9999 2992 L 1243.3163 2990.0176 C 1273.1232 2983.6798 1292.8573 2973.4268 1310.2148 2955.2598 C 1327.2186 2937.4625 1335.9323 2919.9453 1342.0194 2891.3164 L 1343.9999 2877 L 1343.9999 119.99996 C 1343.7143 114.76397 1343.9338 114.58638 1342.5878 104.32809 C 1341.1587 93.439401 1336.1338 76.530983 1331.037 65.706994 C 1323.4487 49.59161 1309.5885 33.163789 1294.3944 22.5859 C 1281.4385 13.566009 1270.0183 8.0987976 1245.3046 2.8066029 C 1241.1687 1.9200038 1230.6758 0.34316186 1223.9999 -3.7795276e-05 L 119.9999 -3.7795276e-05 z</string>
+
+</resources>
diff --git a/overlay/frameworks/base/packages/overlays/pixel_8_pro/AndroidOverlay/res/values/dimens.xml b/overlay/frameworks/base/packages/overlays/pixel_8_pro/AndroidOverlay/res/values/dimens.xml
new file mode 100644
index 0000000..bc6c690
--- /dev/null
+++ b/overlay/frameworks/base/packages/overlays/pixel_8_pro/AndroidOverlay/res/values/dimens.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * 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.
+*/
+-->
+<resources>
+    <!-- Radius of the software rounded corners. -->
+    <dimen name="rounded_corner_radius">91px</dimen>
+    <dimen name="rounded_corner_radius_top">91px</dimen>
+    <dimen name="rounded_corner_radius_bottom">91px</dimen>
+
+    <!-- Height of the status bar.
+         Do not read this dimen directly. Use {@link SystemBarUtils#getStatusBarHeight} instead.
+         -->
+    <dimen name="status_bar_height_default">28dp</dimen>
+    <dimen name="status_bar_height_portrait">151px</dimen>
+    <dimen name="status_bar_height_landscape">28dp</dimen>
+
+
+</resources>
diff --git a/overlay/frameworks/base/packages/overlays/pixel_8_pro/SystemUIOverlay/Android.mk b/overlay/frameworks/base/packages/overlays/pixel_8_pro/SystemUIOverlay/Android.mk
new file mode 100644
index 0000000..232491e
--- /dev/null
+++ b/overlay/frameworks/base/packages/overlays/pixel_8_pro/SystemUIOverlay/Android.mk
@@ -0,0 +1,31 @@
+#
+#  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.
+#
+
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_RRO_THEME := SystemUIEmulationPixel8Pro
+
+LOCAL_PRODUCT_MODULE := true
+
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
+
+LOCAL_PACKAGE_NAME := SystemUIEmulationPixel8ProOverlay
+LOCAL_SDK_VERSION := current
+
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+include $(BUILD_RRO_PACKAGE)
diff --git a/overlay/frameworks/base/packages/overlays/pixel_8_pro/SystemUIOverlay/AndroidManifest.xml b/overlay/frameworks/base/packages/overlays/pixel_8_pro/SystemUIOverlay/AndroidManifest.xml
new file mode 100644
index 0000000..2227f30
--- /dev/null
+++ b/overlay/frameworks/base/packages/overlays/pixel_8_pro/SystemUIOverlay/AndroidManifest.xml
@@ -0,0 +1,24 @@
+<!--
+/**
+ * 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.
+ */
+-->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.android.systemui.emulation.pixel_8_pro"
+    android:versionCode="1"
+    android:versionName="1.0">
+    <overlay android:targetPackage="com.android.systemui" android:priority="1"/>
+    <application android:label="Filled" android:hasCode="false"/>
+</manifest>
diff --git a/overlay/frameworks/base/packages/overlays/pixel_8_pro/SystemUIOverlay/res/drawable/rounded_corner_bottom.xml b/overlay/frameworks/base/packages/overlays/pixel_8_pro/SystemUIOverlay/res/drawable/rounded_corner_bottom.xml
new file mode 100644
index 0000000..379aa25
--- /dev/null
+++ b/overlay/frameworks/base/packages/overlays/pixel_8_pro/SystemUIOverlay/res/drawable/rounded_corner_bottom.xml
@@ -0,0 +1,22 @@
+<!--
+    Copyright (C) 2023 The Android Open Source Project
+
+    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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="146.5px"
+        android:height="146.5px"
+        android:viewportWidth="21.56"
+        android:viewportHeight="21.56">
+    <path
+        android:fillColor="#000000"
+        android:pathData="m0,21.56C0,18.524 -0.037,15.685 0.701,12.679c0.717,-2.922 2.089,-5.584 4.241,-7.736C7.093,2.791 9.755,1.419 12.678,0.701 15.684,-0.037 18.524,0 21.56,0H0v21.559Z"/>
+</vector>
diff --git a/overlay/frameworks/base/packages/overlays/pixel_8_pro/SystemUIOverlay/res/drawable/rounded_corner_top.xml b/overlay/frameworks/base/packages/overlays/pixel_8_pro/SystemUIOverlay/res/drawable/rounded_corner_top.xml
new file mode 100644
index 0000000..379aa25
--- /dev/null
+++ b/overlay/frameworks/base/packages/overlays/pixel_8_pro/SystemUIOverlay/res/drawable/rounded_corner_top.xml
@@ -0,0 +1,22 @@
+<!--
+    Copyright (C) 2023 The Android Open Source Project
+
+    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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+        android:width="146.5px"
+        android:height="146.5px"
+        android:viewportWidth="21.56"
+        android:viewportHeight="21.56">
+    <path
+        android:fillColor="#000000"
+        android:pathData="m0,21.56C0,18.524 -0.037,15.685 0.701,12.679c0.717,-2.922 2.089,-5.584 4.241,-7.736C7.093,2.791 9.755,1.419 12.678,0.701 15.684,-0.037 18.524,0 21.56,0H0v21.559Z"/>
+</vector>
diff --git a/overlay/frameworks/base/packages/overlays/pixel_8_pro/SystemUIOverlay/res/values/config.xml b/overlay/frameworks/base/packages/overlays/pixel_8_pro/SystemUIOverlay/res/values/config.xml
new file mode 100644
index 0000000..01a30ae
--- /dev/null
+++ b/overlay/frameworks/base/packages/overlays/pixel_8_pro/SystemUIOverlay/res/values/config.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+     for different hardware and product builds. -->
+<resources>
+   <!-- Configure 13px of extra protection around the front-facing camera -->
+    <string translatable="false" name="config_frontBuiltInDisplayCutoutProtection">
+        M 613.5,75.5
+        a 58,58 0 0 1 116,0
+        a 58,58 0 0 1 -116,0
+        Z
+    </string>
+
+    <!-- Camera 1 is the front camera -->
+    <string translatable="false" name="config_protectedCameraId">1</string>
+
+    <!-- Comma-separated list of packages to exclude from camera protection. In our case,
+    ignore the gaze detection package -->
+    <string translatable="false" name="config_cameraProtectionExcludedPackages">com.google.android.as</string>
+
+    <bool name="config_enableDisplayCutoutProtection">true</bool>
+</resources>
diff --git a/overlay/frameworks/base/packages/overlays/pixel_8_pro/SystemUIOverlay/res/values/dimens.xml b/overlay/frameworks/base/packages/overlays/pixel_8_pro/SystemUIOverlay/res/values/dimens.xml
new file mode 100644
index 0000000..fe55c16
--- /dev/null
+++ b/overlay/frameworks/base/packages/overlays/pixel_8_pro/SystemUIOverlay/res/values/dimens.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * 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.
+*/
+-->
+<resources>
+    <dimen name="status_bar_padding_start">16dp</dimen>
+    <!-- Location on the screen of the center of the physical power button. -->
+    <dimen name="physical_power_button_center_screen_location_y">774px</dimen>
+
+    <!-- Location on the screen of the center of the physical volume up/down buttons. -->
+    <dimen name="physical_volume_up_button_center_screen_location_y">1040px</dimen>
+    <dimen name="physical_volume_down_button_center_screen_location_y">1174px</dimen>
+
+    <!-- Padding for the lock icon on the keyguard. In pixels - should not scale with
+         display size. -->
+    <dimen name="lock_icon_padding">57px</dimen>
+</resources>
diff --git a/overlay/frameworks/base/packages/overlays/pixel_fold/AndroidOverlay/Android.mk b/overlay/frameworks/base/packages/overlays/pixel_fold/AndroidOverlay/Android.mk
new file mode 100644
index 0000000..0cc191a
--- /dev/null
+++ b/overlay/frameworks/base/packages/overlays/pixel_fold/AndroidOverlay/Android.mk
@@ -0,0 +1,32 @@
+#
+#  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.
+#
+
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_RRO_THEME := EmulationPixelFold
+
+LOCAL_PRODUCT_MODULE := true
+
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
+
+LOCAL_PACKAGE_NAME := EmulationPixelFoldOverlay
+LOCAL_SDK_VERSION := current
+
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+
+include $(BUILD_RRO_PACKAGE)
diff --git a/overlay/frameworks/base/packages/overlays/pixel_fold/AndroidOverlay/AndroidManifest.xml b/overlay/frameworks/base/packages/overlays/pixel_fold/AndroidOverlay/AndroidManifest.xml
new file mode 100644
index 0000000..74fd1c4
--- /dev/null
+++ b/overlay/frameworks/base/packages/overlays/pixel_fold/AndroidOverlay/AndroidManifest.xml
@@ -0,0 +1,24 @@
+<!--
+/**
+ * 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.
+ */
+-->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.android.internal.emulation.pixel_fold"
+    android:versionCode="1"
+    android:versionName="1.0">
+    <overlay android:targetPackage="android" android:priority="1"/>
+    <application android:label="Filled" android:hasCode="false"/>
+</manifest>
diff --git a/overlay/frameworks/base/packages/overlays/pixel_fold/AndroidOverlay/res/values/config.xml b/overlay/frameworks/base/packages/overlays/pixel_fold/AndroidOverlay/res/values/config.xml
new file mode 100644
index 0000000..6d6f003
--- /dev/null
+++ b/overlay/frameworks/base/packages/overlays/pixel_fold/AndroidOverlay/res/values/config.xml
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- this is important so guest knows we have two displays-->
+    <string-array name="config_displayUniqueIdArray" translatable="false">
+        <item>"local:4619827259835644672"</item>
+        <item>"local:4619827551948147201"</item>
+    </string-array>
+
+   <!-- Whether the display cutout region of the secondary built-in display should be forced to
+        black in software (to avoid aliasing or emulate a cutout that is not physically existent).
+    -->
+    <bool name="config_fillSecondaryBuiltInDisplayCutout">true</bool>
+
+    <!-- Display cutout configuration -->
+    <string translatable="false" name="config_secondaryBuiltInDisplayCutout">
+        M 505,61
+        a 35,35 0 1 0 70,0 35,35 0 1 0 -70,0
+        Z
+        @left
+    </string>
+
+    <string translatable="false" name="config_secondaryBuiltInDisplayCutoutRectApproximation">
+        M 480,0
+        h 110
+        v 110
+        h -110
+        Z
+        @left
+    </string>
+
+    <!-- WindowsManager JetPack display features -->
+    <string name="config_display_features" translatable="false">fold-[1104,0,1104,1848]</string>
+
+    <!-- Map of DeviceState to rotation lock setting. Each entry must be in the format "key:value",
+         or "key:value:fallback_key" for example: "0:1" or "2:0:1". The keys are device states, and
+         the values are one of Settings.Secure.DeviceStateRotationLockSetting.
+         The fallback is a key to a device state that can be specified when the value is
+         Settings.Secure.DEVICE_STATE_ROTATION_LOCK_IGNORED.
+     -->
+    <string-array name="config_perDeviceStateRotationLockDefaults" translatable="false">
+        <item>0:1</item> <!-- CLOSED -> LOCKED -->
+        <item>2:0:1</item> <!-- HALF_OPENED -> IGNORED and fallback to device state OPENED -->
+        <item>1:2</item> <!-- OPENED -> UNLOCKED -->
+    </string-array>
+
+    <!-- Map of System DeviceState supplied by DeviceStateManager to WM Jetpack posture. -->
+    <string-array name="config_device_state_postures" translatable="false">
+        <item>0:1</item> <!-- CLOSED -->
+        <item>1:2</item> <!-- HALF_OPENED -->
+        <item>2:3</item> <!-- OPENED -->
+        <item>3:1</item> <!-- FLIPPED -->
+    </string-array>
+
+    <!-- The device states (supplied by DeviceStateManager) that should be treated as open by the
+         display fold controller. -->
+    <integer-array name="config_openDeviceStates" translatable="false">
+        <item>2</item> <!-- OPEN -->
+    </integer-array>
+
+    <!-- The device states (supplied by DeviceStateManager) that should be treated as folded by the
+         display fold controller. This also controls the folded bit in CameraServiceProxy. -->
+    <integer-array name="config_foldedDeviceStates" translatable="false">
+        <item>0</item> <!-- CLOSED -->
+    </integer-array>
+
+    <!-- The device states (supplied by DeviceStateManager) that should be treated as half folded by
+         the display fold controller. This also controls the folded bit in CameraServiceProxy. -->
+    <integer-array name="config_halfFoldedDeviceStates" translatable="false">
+        <item>1</item> <!-- HALF_OPENED -->
+    </integer-array>
+
+    <!-- The device states (supplied by DeviceStateManager) that should be treated as a rear display
+         state. Default is empty. -->
+    <integer-array name="config_rearDisplayDeviceStates" translatable="false">
+        <item>3</item> <!-- REAR_DISPLAY_STATE -->
+    </integer-array>
+
+    <bool name="config_supportsConcurrentInternalDisplays">false</bool>
+    <bool name="config_localDisplaysMirrorContent">false</bool>
+    <!-- Multi Display related -->
+    <!-- Whether the system enables per-display focus. If the system has the input method for each
+         display, this value should be true. -->
+    <bool name="config_perDisplayFocusEnabled">true</bool>
+    <!-- True if the device supports system decorations on secondary displays. -->
+    <bool name="config_supportsSystemDecorsOnSecondaryDisplays">true</bool>
+    <!-- This is the default launcher package with an activity to use on secondary displays that
+         support system decorations.
+         This launcher package must have an activity that supports multiple instances and has
+         corresponding launch mode set in AndroidManifest.
+         {@see android.view.Display#FLAG_SHOULD_SHOW_SYSTEM_DECORATIONS} -->
+
+    <!-- The device states (supplied by DeviceStateManager) that should be treated as folded by the
+         display fold controller. -->
+
+</resources>
diff --git a/overlay/frameworks/base/packages/overlays/pixel_fold/AndroidOverlay/res/values/dimens.xml b/overlay/frameworks/base/packages/overlays/pixel_fold/AndroidOverlay/res/values/dimens.xml
new file mode 100644
index 0000000..8cfb06a
--- /dev/null
+++ b/overlay/frameworks/base/packages/overlays/pixel_fold/AndroidOverlay/res/values/dimens.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * 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.
+*/
+-->
+<resources>
+
+    <!-- for 20dp of padding at 3.5px/dp at default density -->
+
+    <!-- Height of the status bar.
+         Do not read this dimen directly. Use {@link SystemBarUtils#getStatusBarHeight} instead.
+         -->
+    <dimen name="status_bar_height_default">28dp</dimen>
+    <dimen name="status_bar_height_portrait">144px</dimen>
+    <dimen name="status_bar_height_landscape">28dp</dimen>
+
+    <!-- Adjustment for software rounded corners since corners aren't perfectly round. -->
+    <bool name="config_persistBrightnessNitsForDefaultDisplay">true</bool>
+
+    <!-- Height of the status bar.
+         Do not read this dimen directly. Use {@link SystemBarUtils#getStatusBarHeight} instead.
+         -->
+
+
+
+    <bool name="config_supportMicNearUltrasound">false</bool>
+    <bool name="config_supportSpeakerNearUltrasound">false</bool>
+
+</resources>
diff --git a/overlay/frameworks/base/packages/overlays/pixel_fold/SystemUIOverlay/Android.mk b/overlay/frameworks/base/packages/overlays/pixel_fold/SystemUIOverlay/Android.mk
new file mode 100644
index 0000000..c46c35e
--- /dev/null
+++ b/overlay/frameworks/base/packages/overlays/pixel_fold/SystemUIOverlay/Android.mk
@@ -0,0 +1,31 @@
+#
+#  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.
+#
+
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_RRO_THEME := SystemUIEmulationPixelFold
+
+LOCAL_PRODUCT_MODULE := true
+
+LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
+
+LOCAL_PACKAGE_NAME := SystemUIEmulationPixelFoldOverlay
+LOCAL_SDK_VERSION := current
+
+LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
+LOCAL_LICENSE_CONDITIONS := notice
+include $(BUILD_RRO_PACKAGE)
diff --git a/overlay/frameworks/base/packages/overlays/pixel_fold/SystemUIOverlay/AndroidManifest.xml b/overlay/frameworks/base/packages/overlays/pixel_fold/SystemUIOverlay/AndroidManifest.xml
new file mode 100644
index 0000000..797c72e
--- /dev/null
+++ b/overlay/frameworks/base/packages/overlays/pixel_fold/SystemUIOverlay/AndroidManifest.xml
@@ -0,0 +1,24 @@
+<!--
+/**
+ * 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.
+ */
+-->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.android.systemui.emulation.pixel_fold"
+    android:versionCode="1"
+    android:versionName="1.0">
+    <overlay android:targetPackage="com.android.systemui" android:priority="1"/>
+    <application android:label="Filled" android:hasCode="false"/>
+</manifest>
diff --git a/overlay/frameworks/base/packages/overlays/pixel_fold/SystemUIOverlay/res/values/config.xml b/overlay/frameworks/base/packages/overlays/pixel_fold/SystemUIOverlay/res/values/config.xml
new file mode 100644
index 0000000..06edcb5
--- /dev/null
+++ b/overlay/frameworks/base/packages/overlays/pixel_fold/SystemUIOverlay/res/values/config.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+     for different hardware and product builds. -->
+<resources>
+    <!-- Configure 13px of extra protection around the front-facing camera -->
+    <string translatable="false" name="config_frontBuiltInDisplayCutoutProtection">
+        M 494,65
+        a 46,46 0 1 0 92,0
+        a 46,46 0 1 0 -92,0
+        Z
+    </string>
+
+
+    <!-- Comma-separated list of packages to exclude from camera protection. In our case,
+    ignore the gaze detection package -->
+    <string translatable="false" name="config_cameraProtectionExcludedPackages">com.google.android.as</string>
+
+    <bool name="config_enableDisplayCutoutProtection">true</bool>
+</resources>
diff --git a/overlay/frameworks/base/packages/overlays/pixel_fold/SystemUIOverlay/res/values/dimens.xml b/overlay/frameworks/base/packages/overlays/pixel_fold/SystemUIOverlay/res/values/dimens.xml
new file mode 100644
index 0000000..bef4e8d
--- /dev/null
+++ b/overlay/frameworks/base/packages/overlays/pixel_fold/SystemUIOverlay/res/values/dimens.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * 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.
+*/
+-->
+<resources>
+    <!-- the padding on the top of the statusbar (usually 0) -->
+    <dimen name="status_bar_padding_top">1px</dimen>
+
+    <!-- Height of the status bar header bar when on Keyguard (match status_bar_height) -->
+    <dimen name="status_bar_header_height_keyguard">@*android:dimen/status_bar_height</dimen>
+
+    <!-- Padding for the system icons on the keyguard (when no multi user switch is showing).
+    The icons always have a 4dp padding in the container so we only need 26 extra px of padding
+    for the corners -->
+    <dimen name="system_icons_super_container_avatarless_margin_end">26px</dimen>
+
+    <!-- Margin on the right side of the system icon group on Keyguard. -->
+    <dimen name="system_icons_keyguard_padding_end">6.5dp</dimen>
+
+    <!-- Camera 1 is the front camera -->
+    <string translatable="false" name="config_protectedCameraId">1</string>
+
+    <!-- Location on the screen of the center of the physical power button. -->
+    <dimen name="physical_power_button_center_screen_location_y">940px</dimen>
+
+    <!-- Location on the screen of the center of the physical volume up/down buttons. -->
+    <dimen name="physical_volume_up_button_center_screen_location_y">1320px</dimen>
+    <dimen name="physical_volume_down_button_center_screen_location_y">1520px</dimen>
+
+    <!-- Padding for the lock icon on the keyguard. In pixels - should not scale with display size. -->
+    <dimen name="lock_icon_padding">60px</dimen>
+</resources>
diff --git a/pc/images_source.prop_template b/pc/images_source.prop_template
index ab63ff7..69a8815 100644
--- a/pc/images_source.prop_template
+++ b/pc/images_source.prop_template
@@ -1,6 +1,6 @@
 Pkg.Desc=System Image ${TARGET_CPU_ABI}.
 Pkg.Revision=1
-Pkg.Dependencies=emulator#30.7.3
+Pkg.Dependencies=emulator#33.1.19
 AndroidVersion.ApiLevel=${PLATFORM_SDK_VERSION}
 AndroidVersion.CodeName=${PLATFORM_VERSION_CODENAME}
 SystemImage.Abi=${TARGET_CPU_ABI}
diff --git a/pixel_fold/device_state_configuration.xml b/pixel_fold/device_state_configuration.xml
new file mode 100644
index 0000000..8a18143
--- /dev/null
+++ b/pixel_fold/device_state_configuration.xml
@@ -0,0 +1,51 @@
+<device-state-config>
+    <device-state>
+        <identifier>0</identifier>
+        <name>CLOSED</name>
+        <conditions>
+            <sensor>
+                <type>android.sensor.hinge_angle</type>
+                <name>Goldfish hinge sensor0 (in degrees)</name>
+                <value>
+                    <min-inclusive>0</min-inclusive>
+                    <max-inclusive>30</max-inclusive>
+                </value>
+            </sensor>
+        </conditions>
+    </device-state>
+    <device-state>
+        <identifier>1</identifier>
+        <name>HALF_OPENED</name>
+        <conditions>
+            <sensor>
+                <type>android.sensor.hinge_angle</type>
+                <name>Goldfish hinge sensor0 (in degrees)</name>
+                <value>
+                    <min>30</min>
+                    <max>150</max>
+                </value>
+            </sensor>
+        </conditions>
+    </device-state>
+    <device-state>
+        <identifier>2</identifier>
+        <name>OPENED</name>
+            <conditions>
+                <sensor>
+                    <type>android.sensor.hinge_angle</type>
+                    <name>Goldfish hinge sensor0 (in degrees)</name>
+                    <value>
+                        <min-inclusive>150</min-inclusive>
+                        <max-inclusive>180</max-inclusive>
+                    </value>
+                    </sensor>
+            </conditions>
+    </device-state>
+    <device-state>
+        <identifier>3</identifier>
+        <name>REAR_DISPLAY_MODE</name>
+        <flags>
+            <flag>FLAG_EMULATED_ONLY</flag>
+        </flags>
+    </device-state>
+</device-state-config>
diff --git a/pixel_fold/display_layout_configuration.xml b/pixel_fold/display_layout_configuration.xml
new file mode 100644
index 0000000..2c50e76
--- /dev/null
+++ b/pixel_fold/display_layout_configuration.xml
@@ -0,0 +1,54 @@
+<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
+<layouts>
+  <layout>
+    <!-- CLOSED: display0 disabled, display1 enabled -->
+    <state>0</state>
+
+    <display enabled="false">
+      <address>4619827259835644672</address>
+    </display>
+
+    <display enabled="true" defaultDisplay="true">
+      <address>4619827551948147201</address>
+    </display>
+  </layout>
+
+  <layout>
+    <!-- HALF_OPENED: display0 enabled, display1 disabled -->
+    <state>1</state>
+
+    <display enabled="true" defaultDisplay="true">
+      <address>4619827259835644672</address>
+    </display>
+
+    <display enabled="false">
+      <address>4619827551948147201</address>
+    </display>
+  </layout>
+
+  <layout>
+    <!-- OPENED: display0 enabled, display1 disabled -->
+    <state>2</state>
+
+    <display enabled="true" defaultDisplay="true">
+      <address>4619827259835644672</address>
+    </display>
+
+    <display enabled="false">
+      <address>4619827551948147201</address>
+    </display>
+  </layout>
+
+  <layout>
+  <!-- REAR_DISPLAY_MODE: display0 disabled, display1 enabled -->
+    <state>3</state>
+
+    <display enabled="false">
+      <address>4619827259835644672</address>
+    </display>
+
+    <display enabled="true" defaultDisplay="true">
+      <address>4619827551948147201</address>
+    </display>
+  </layout>
+</layouts>
diff --git a/pixel_fold/display_settings.xml b/pixel_fold/display_settings.xml
new file mode 100644
index 0000000..6ad8287
--- /dev/null
+++ b/pixel_fold/display_settings.xml
@@ -0,0 +1,8 @@
+<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
+<display-settings>
+    <config identifier="0" />
+    <!-- Allow rotation of fixed-orientation activities on the inner screen. -->
+    <display
+        name="local:4619827259835644672"
+        ignoreOrientationRequest="true"/>
+</display-settings>
diff --git a/provision/EmulatorProvisonLib/src/com/android/sdksetup/ProvisionActivity.java b/provision/EmulatorProvisonLib/src/com/android/sdksetup/ProvisionActivity.java
index 30d6c50..7beda57 100644
--- a/provision/EmulatorProvisonLib/src/com/android/sdksetup/ProvisionActivity.java
+++ b/provision/EmulatorProvisonLib/src/com/android/sdksetup/ProvisionActivity.java
@@ -149,6 +149,25 @@
         } else if (!displaySettingsName.isEmpty()) {
             Log.e(TAG(), "Unexpected value `" + displaySettingsName + "` in " + displaySettingsProp);
         }
+        final String autoRotateProp = "ro.boot.qemu.autorotate";
+        final String autoRotateSetting = SystemProperties.get(autoRotateProp);
+        if (!autoRotateSetting.isEmpty()) {
+            Settings.System.putString(getContentResolver(), Settings.System.ACCELEROMETER_ROTATION, autoRotateSetting);
+        }
+    }
+
+    // required for CTS which uses the mock modem
+    private void provisionMockModem() {
+        String value = SystemProperties.get("ro.boot.radio.allow_mock_modem");
+        if (!value.isEmpty()) {
+            if (value.equals("1")) {
+                value = "true";
+            } else if (value.equals("0")) {
+                value = "false";
+            }
+
+            SystemProperties.set("persist.radio.allow_mock_modem", value);
+        }
     }
 
     protected void provisionTelephony() {
@@ -156,6 +175,8 @@
         // the following blocks, TODO: find out why and fix it. disable this for now.
         // TelephonyManager mTelephony = getApplicationContext().getSystemService(TelephonyManager.class);
         // mTelephony.setPreferredNetworkTypeBitmask(TelephonyManager.NETWORK_TYPE_BITMASK_NR);
+
+        provisionMockModem();
     }
 
     protected void provisionLocation() {
diff --git a/sensors/Android.bp b/sensors/Android.bp
index c86eceb..e971f8e 100644
--- a/sensors/Android.bp
+++ b/sensors/Android.bp
@@ -23,17 +23,29 @@
     default_applicable_licenses: ["device_generic_goldfish_license"],
 }
 
-cc_library_shared {
-    name: "android.hardware.sensors@2.1-impl.ranchu",
-    vendor: true,
-    relative_install_path: "hw",
-    defaults: ["hidl_defaults"],
+filegroup {
+    name: "android.hardware.sensors@2.1-impl.virtual_srcs",
     srcs: [
         "multihal_sensors.cpp",
         "multihal_sensors_epoll.cpp",
         "multihal_sensors_qemu.cpp",
         "sensor_list.cpp",
-        "entry.cpp"
+    ]
+}
+
+cc_library_headers {
+    name: "android.hardware.sensors@2.1-impl.virtual_headers",
+    vendor_available: true,
+    export_include_dirs: ["include"],
+}
+
+cc_defaults {
+    name: "android.hardware.sensors@2.1-impl.virtual.defaults",
+    vendor: true,
+    relative_install_path: "hw",
+    defaults: ["hidl_defaults"],
+    srcs: [
+        ":android.hardware.sensors@2.1-impl.virtual_srcs",
     ],
     shared_libs: [
         "android.hardware.sensors@2.0",
@@ -44,8 +56,19 @@
         "liblog",
         "libutils",
     ],
+    header_libs: [
+        "android.hardware.sensors@2.X-multihal.header",
+        "android.hardware.sensors@2.1-impl.virtual_headers"
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.sensors@2.1-impl.ranchu",
+    defaults: ["android.hardware.sensors@2.1-impl.virtual.defaults"],
+    srcs: [
+        "entry.cpp"
+    ],
     static_libs: ["libqemud.ranchu"],
-    header_libs: ["android.hardware.sensors@2.X-multihal.header"],
     cflags: [
         "-DLOG_TAG=\"android.hardware.sensors@2.1-impl.ranchu\"",
         "-DANDROID_BASE_UNIQUE_FD_DISABLE_IMPLICIT_CONVERSION",
diff --git a/sensors/entry.cpp b/sensors/entry.cpp
index d48c458..170f3fc 100644
--- a/sensors/entry.cpp
+++ b/sensors/entry.cpp
@@ -14,14 +14,47 @@
  * limitations under the License.
  */
 
-#include <log/log.h>
-#include "multihal_sensors.h"
+#include <android-base/unique_fd.h>
+#include <qemud.h>
+#include <multihal_sensors.h>
 
+using ::android::base::unique_fd;
 using ::android::hardware::sensors::V2_1::implementation::ISensorsSubHal;
 
 namespace {
-goldfish::MultihalSensors impl;
-}
+
+class QemudSensorsTransport : public goldfish::SensorsTransport {
+ public:
+    QemudSensorsTransport()
+        : m_qemuSensorsFd(qemud_channel_open("sensors")) {}
+
+    int Send(const void* msg, int size) override {
+        return qemud_channel_send(m_qemuSensorsFd.get(), msg, size);
+    }
+
+    int Receive(void* msg, int maxsize) override {
+        return qemud_channel_recv(m_qemuSensorsFd.get(), msg, maxsize);
+    }
+
+    bool Ok() const override {
+        return m_qemuSensorsFd.ok();
+    }
+
+    int Fd() const override {
+        return m_qemuSensorsFd.get();
+    }
+
+    const char* Name() const override {
+        return "qemud_channel";
+    }
+
+ private:
+    const unique_fd m_qemuSensorsFd;
+};
+
+goldfish::MultihalSensors impl([](){ return std::make_unique<QemudSensorsTransport>(); });
+
+} // namespace
 
 extern "C" ISensorsSubHal* sensorsHalGetSubHal_2_1(uint32_t* version) {
     *version = SUB_HAL_2_1_VERSION;
diff --git a/sensors/multihal_sensors.h b/sensors/include/multihal_sensors.h
similarity index 85%
rename from sensors/multihal_sensors.h
rename to sensors/include/multihal_sensors.h
index 3f242f2..1f50b0b 100644
--- a/sensors/multihal_sensors.h
+++ b/sensors/include/multihal_sensors.h
@@ -18,6 +18,7 @@
 #include <android-base/unique_fd.h>
 #include <V2_1/SubHal.h>
 #include <atomic>
+#include <functional>
 #include <condition_variable>
 #include <cstdint>
 #include <random>
@@ -25,6 +26,8 @@
 #include <thread>
 #include <vector>
 
+#include "multihal_sensors_transport.h"
+
 namespace goldfish {
 namespace ahs = ::android::hardware::sensors;
 namespace ahs21 = ahs::V2_1;
@@ -47,7 +50,9 @@
 using ::android::sp;
 
 struct MultihalSensors : public ahs21::implementation::ISensorsSubHal {
-    MultihalSensors();
+    using SensorsTransportFactory = std::function<std::unique_ptr<SensorsTransport>()>;
+
+    MultihalSensors(SensorsTransportFactory);
     ~MultihalSensors();
 
     Return<void> debug(const hidl_handle& fd, const hidl_vec<hidl_string>& args) override;
@@ -75,6 +80,7 @@
 private:
     struct QemuSensorsProtocolState {
         int64_t timeBiasNs = -500000000;
+        int32_t sensorsUpdateIntervalMs = 200;
 
         static constexpr float kSensorNoValue = -1e+30;
 
@@ -95,24 +101,30 @@
         return m_activeSensorsMask & (1u << sensorHandle);  // m_mtx required
     }
     Event activationOnChangeSensorEvent(int32_t sensorHandle, const SensorInfo& sensor) const;
-    static bool activateQemuSensorImpl(int pipe, int sensorHandle, bool enabled);
-    bool setAllQemuSensors(bool enabled);
-    void parseQemuSensorEventLocked(const int pipe, QemuSensorsProtocolState* state);
+    static bool setSensorsReportingImpl(SensorsTransport& st, int sensorHandle, bool enabled);
+    static bool setAllSensorsReporting(SensorsTransport& st,
+                                       uint32_t availableSensorsMask, bool enabled);
+    static bool setSensorsGuestTime(SensorsTransport& st, int64_t value);
+    static bool setSensorsUpdateIntervalMs(SensorsTransport& st, uint32_t value);
+    void parseQemuSensorEventLocked(QemuSensorsProtocolState* state);
     void postSensorEventLocked(const Event& event);
     void doPostSensorEventLocked(const SensorInfo& sensor, const Event& event);
     void setAdditionalInfoFrames();
     void sendAdditionalInfoReport(int sensorHandle);
 
+    bool qemuSensorListenerThreadImpl(int transportFd);
     void qemuSensorListenerThread();
     void batchThread();
 
     double randomError(float lo, float hi);
 
     static constexpr char kCMD_QUIT = 'q';
+    static constexpr char kCMD_RESTART = 'r';
     bool qemuSensorThreadSendCommand(char cmd) const;
 
-    // set in ctor, never change
-    const unique_fd     m_qemuSensorsFd;
+    const SensorsTransportFactory m_sensorsTransportFactory;
+    SensorsTransport*   m_sensorsTransport;
+
     uint32_t            m_availableSensorsMask = 0;
     // a pair of connected sockets to talk to the worker thread
     unique_fd           m_callersFd;        // a caller writes here
diff --git a/sensors/include/multihal_sensors_transport.h b/sensors/include/multihal_sensors_transport.h
new file mode 100644
index 0000000..d5de150
--- /dev/null
+++ b/sensors/include/multihal_sensors_transport.h
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+
+#pragma once
+
+namespace goldfish {
+
+class SensorsTransport {
+ public:
+    virtual int Send(const void* msg, int size) = 0;
+    virtual int Receive(void* msg, int maxsize) = 0;
+    virtual bool Ok() const = 0;
+    virtual int Fd() const = 0;
+    virtual const char* Name() const = 0;
+
+    virtual ~SensorsTransport() = default;
+};
+
+}  // namespace goldfish
diff --git a/sensors/multihal_sensors.cpp b/sensors/multihal_sensors.cpp
index 41c7f42..beb34d9 100644
--- a/sensors/multihal_sensors.cpp
+++ b/sensors/multihal_sensors.cpp
@@ -14,11 +14,10 @@
  * limitations under the License.
  */
 
-#include <cinttypes>
+#include <cstdint>
 #include <log/log.h>
-#include <qemud.h>
 #include <utils/SystemClock.h>
-#include "multihal_sensors.h"
+#include <multihal_sensors.h>
 #include "sensor_list.h"
 
 namespace goldfish {
@@ -31,57 +30,53 @@
 
 namespace {
 constexpr int64_t kMaxSamplingPeriodNs = 1000000000;
+
+struct SensorsTransportStub : public SensorsTransport {
+    int Send(const void*, int) override { return -1; }
+    int Receive(void*, int) override { return -1; }
+    bool Ok() const override { return false; }
+    int Fd() const override { return -1; }
+    const char* Name() const override { return "stub"; }
+};
+
+const SensorsTransportStub g_sensorsTransportStub;
 }
 
-MultihalSensors::MultihalSensors()
-        : m_qemuSensorsFd(qemud_channel_open("sensors"))
+MultihalSensors::MultihalSensors(SensorsTransportFactory stf)
+        : m_sensorsTransportFactory(std::move(stf))
+        , m_sensorsTransport(const_cast<SensorsTransportStub*>(&g_sensorsTransportStub))
         , m_batchInfo(getSensorNumber()) {
-    if (!m_qemuSensorsFd.ok()) {
-        ALOGE("%s:%d: m_qemuSensorsFd is not opened", __func__, __LINE__);
-        ::abort();
+    {
+        const auto st = m_sensorsTransportFactory();
+
+        LOG_ALWAYS_FATAL_IF(!st->Ok(), "%s:%d: sensors transport is not opened",
+                            __func__, __LINE__);
+
+        using namespace std::literals;
+        const std::string_view kListSensorsCmd = "list-sensors"sv;
+
+        LOG_ALWAYS_FATAL_IF(st->Send(kListSensorsCmd.data(), kListSensorsCmd.size()) < 0,
+                            "%s:%d: send for %s failed", __func__, __LINE__, st->Name());
+
+        char buffer[64];
+        const int len = st->Receive(buffer, sizeof(buffer) - 1);
+        LOG_ALWAYS_FATAL_IF(len < 0, "%s:%d: receive for %s failed", __func__, __LINE__,
+                            st->Name());
+
+        buffer[len] = 0;
+        uint32_t hostSensorsMask = 0;
+        LOG_ALWAYS_FATAL_IF(sscanf(buffer, "%u", &hostSensorsMask) != 1,
+                            "%s:%d: Can't parse qemud response", __func__, __LINE__);
+
+        m_availableSensorsMask = hostSensorsMask & ((1u << getSensorNumber()) - 1);
+
+        ALOGI("%s:%d: host sensors mask=%x, available sensors mask=%x",
+              __func__, __LINE__, hostSensorsMask, m_availableSensorsMask);
     }
 
-    char buffer[64];
-    int len = snprintf(buffer, sizeof(buffer),
-                       "time:%" PRId64, ::android::elapsedRealtimeNano());
-    if (qemud_channel_send(m_qemuSensorsFd.get(), buffer, len) < 0) {
-        ALOGE("%s:%d: qemud_channel_send failed", __func__, __LINE__);
-        ::abort();
-    }
-
-    using namespace std::literals;
-    const std::string_view kListSensorsCmd = "list-sensors"sv;
-
-    if (qemud_channel_send(m_qemuSensorsFd.get(),
-                           kListSensorsCmd.data(),
-                           kListSensorsCmd.size()) < 0) {
-        ALOGE("%s:%d: qemud_channel_send failed", __func__, __LINE__);
-        ::abort();
-    }
-
-    len = qemud_channel_recv(m_qemuSensorsFd.get(), buffer, sizeof(buffer) - 1);
-    if (len < 0) {
-        ALOGE("%s:%d: qemud_channel_recv failed", __func__, __LINE__);
-        ::abort();
-    }
-    buffer[len] = 0;
-    uint32_t hostSensorsMask = 0;
-    if (sscanf(buffer, "%u", &hostSensorsMask) != 1) {
-        ALOGE("%s:%d: Can't parse qemud response", __func__, __LINE__);
-        ::abort();
-    }
-
-    m_availableSensorsMask = hostSensorsMask
-        & ((1u << getSensorNumber()) - 1);
-
-    ALOGI("%s:%d: host sensors mask=%x, available sensors mask=%x",
-          __func__, __LINE__, hostSensorsMask, m_availableSensorsMask);
-
-    if (!::android::base::Socketpair(AF_LOCAL, SOCK_STREAM, 0,
-                                     &m_callersFd, &m_sensorThreadFd)) {
-        ALOGE("%s:%d: Socketpair failed", __func__, __LINE__);
-        ::abort();
-    }
+    LOG_ALWAYS_FATAL_IF(!::android::base::Socketpair(AF_LOCAL, SOCK_STREAM, 0,
+                                                     &m_callersFd, &m_sensorThreadFd),
+                        "%s:%d: Socketpair failed", __func__, __LINE__);
 
     setAdditionalInfoFrames();
 
@@ -90,8 +85,6 @@
 }
 
 MultihalSensors::~MultihalSensors() {
-    setAllQemuSensors(false);
-
     m_batchRunning = false;
     m_batchUpdated.notify_one();
     m_batchThread.join();
@@ -268,14 +261,10 @@
             activeSensorsMask >>= 1;
         }
 
-        const int delayMs = std::max(1, int(minSamplingPeriodNs / 1000000));
-
-        char buffer[64];
-        const int len = snprintf(buffer, sizeof(buffer), "set-delay:%d", delayMs);
-
-        if (qemud_channel_send(m_qemuSensorsFd.get(), buffer, len) < 0) {
-            ALOGE("%s:%d: qemud_channel_send failed", __func__, __LINE__);
-            ::abort();
+        const uint32_t sensorsUpdateIntervalMs = std::max(1, int(minSamplingPeriodNs / 1000000));
+        m_protocolState.sensorsUpdateIntervalMs = sensorsUpdateIntervalMs;
+        if (!setSensorsUpdateIntervalMs(*m_sensorsTransport, sensorsUpdateIntervalMs)) {
+            qemuSensorThreadSendCommand(kCMD_RESTART);
         }
     }
 
@@ -330,7 +319,6 @@
 
 Return<Result> MultihalSensors::initialize(const sp<IHalProxyCallback>& halProxyCallback) {
     std::unique_lock<std::mutex> lock(m_mtx);
-    setAllQemuSensors(true);   // we need to start sampling sensors for batching
     m_opMode = OperationMode::NORMAL;
     m_halProxyCallback = halProxyCallback;
     return Result::OK;
@@ -418,6 +406,35 @@
     return true;
 }
 
+void MultihalSensors::qemuSensorListenerThread() {
+    while (true) {
+        const auto st = m_sensorsTransportFactory();
+
+        LOG_ALWAYS_FATAL_IF(!setSensorsGuestTime(
+            *st, ::android::elapsedRealtimeNano()));
+        LOG_ALWAYS_FATAL_IF(!setSensorsUpdateIntervalMs(
+            *st, m_protocolState.sensorsUpdateIntervalMs));
+        LOG_ALWAYS_FATAL_IF(!setAllSensorsReporting(
+            *st, m_availableSensorsMask, true));
+
+        {
+            std::unique_lock<std::mutex> lock(m_mtx);
+            m_sensorsTransport = st.get();
+        }
+
+        const bool cont = qemuSensorListenerThreadImpl(st->Fd());
+
+        {
+            std::unique_lock<std::mutex> lock(m_mtx);
+            m_sensorsTransport = const_cast<SensorsTransportStub*>(&g_sensorsTransportStub);
+        }
+
+        if (!cont) {
+            break;
+        }
+    }
+}
+
 void MultihalSensors::batchThread() {
     while (m_batchRunning) {
         std::unique_lock<std::mutex> lock(m_mtx);
diff --git a/sensors/multihal_sensors_epoll.cpp b/sensors/multihal_sensors_epoll.cpp
index 63b978a..5ce6eb6 100644
--- a/sensors/multihal_sensors_epoll.cpp
+++ b/sensors/multihal_sensors_epoll.cpp
@@ -38,14 +38,12 @@
 }
 }  // namespace
 
-void MultihalSensors::qemuSensorListenerThread() {
+bool MultihalSensors::qemuSensorListenerThreadImpl(const int transportFd) {
     const unique_fd epollFd(epoll_create1(0));
-    if (!epollFd.ok()) {
-        ALOGE("%s:%d: epoll_create1 failed", __func__, __LINE__);
-        ::abort();
-    }
+    LOG_ALWAYS_FATAL_IF(!epollFd.ok(), "%s:%d: epoll_create1 failed",
+                        __func__, __LINE__);
 
-    epollCtlAdd(epollFd.get(), m_qemuSensorsFd.get());
+    epollCtlAdd(epollFd.get(), transportFd);
     epollCtlAdd(epollFd.get(), m_sensorThreadFd.get());
 
     while (true) {
@@ -55,9 +53,9 @@
                                                     events, 2,
                                                     kTimeoutMs));
         if (n < 0) {
-            ALOGE("%s:%d: epoll_wait failed with '%s'",
+            ALOGW("%s:%d: epoll_wait failed with '%s'",
                   __func__, __LINE__, strerror(errno));
-            continue;
+            return true;
         }
 
         for (int i = 0; i < n; ++i) {
@@ -65,33 +63,35 @@
             const int fd = ev->data.fd;
             const int ev_events = ev->events;
 
-            if (fd == m_qemuSensorsFd.get()) {
+            if (fd == transportFd) {
                 if (ev_events & (EPOLLERR | EPOLLHUP)) {
-                    ALOGE("%s:%d: epoll_wait: devFd has an error, ev_events=%x",
-                          __func__, __LINE__, ev_events);
-                    ::abort();
+                    ALOGW("%s:%d: epoll_wait: transportFd has an error, "
+                          "ev_events=%x", __func__, __LINE__, ev_events);
+                    return true;
                 } else if (ev_events & EPOLLIN) {
                     std::unique_lock<std::mutex> lock(m_mtx);
-                    parseQemuSensorEventLocked(m_qemuSensorsFd.get(), &m_protocolState);
+                    parseQemuSensorEventLocked(&m_protocolState);
                 }
             } else if (fd == m_sensorThreadFd.get()) {
                 if (ev_events & (EPOLLERR | EPOLLHUP)) {
-                    ALOGE("%s:%d: epoll_wait: threadsFd has an error, ev_events=%x",
-                          __func__, __LINE__, ev_events);
-                    ::abort();
+                    LOG_ALWAYS_FATAL("%s:%d: epoll_wait: threadFd has an error, "
+                                     "ev_events=%x", __func__, __LINE__, ev_events);
                 } else if (ev_events & EPOLLIN) {
                     const int cmd = qemuSensortThreadRcvCommand(fd);
-                    if (cmd == kCMD_QUIT) {
-                        return;
-                    } else {
-                        ALOGE("%s:%d: qemuSensortThreadRcvCommand returned unexpected command, cmd=%d",
+                    switch (cmd) {
+                    case kCMD_QUIT: return false;
+                    case kCMD_RESTART: return true;
+                    default:
+                        ALOGW("%s:%d: qemuSensortThreadRcvCommand "
+                              "returned unexpected command, cmd=%d",
                               __func__, __LINE__, cmd);
-                        ::abort();
+                        return true;
                     }
                 }
             } else {
-                ALOGE("%s:%d: epoll_wait() returned unexpected fd",
+                ALOGW("%s:%d: epoll_wait() returned unexpected fd",
                       __func__, __LINE__);
+                return true;
             }
         }
     }
diff --git a/sensors/multihal_sensors_qemu.cpp b/sensors/multihal_sensors_qemu.cpp
index 19df6c5..985612e 100644
--- a/sensors/multihal_sensors_qemu.cpp
+++ b/sensors/multihal_sensors_qemu.cpp
@@ -14,12 +14,12 @@
  * limitations under the License.
  */
 
+#include <cinttypes>
 #include <log/log.h>
 #include <utils/SystemClock.h>
 #include <math.h>
-#include <qemud.h>
 #include <random>
-#include "multihal_sensors.h"
+#include <multihal_sensors.h>
 #include "sensor_list.h"
 
 namespace goldfish {
@@ -53,28 +53,29 @@
 
 }  // namespace
 
-bool MultihalSensors::activateQemuSensorImpl(const int pipe,
-                                             const int sensorHandle,
-                                             const bool enabled) {
+bool MultihalSensors::setSensorsReportingImpl(SensorsTransport& st,
+                                              const int sensorHandle,
+                                              const bool enabled) {
     char buffer[64];
     int len = snprintf(buffer, sizeof(buffer),
                        "set:%s:%d",
                        getQemuSensorNameByHandle(sensorHandle),
                        (enabled ? 1 : 0));
 
-    if (qemud_channel_send(pipe, buffer, len) < 0) {
-        ALOGE("%s:%d: qemud_channel_send failed", __func__, __LINE__);
+    if (st.Send(buffer, len) < 0) {
+        ALOGE("%s:%d: send for %s failed", __func__, __LINE__, st.Name());
         return false;
     } else {
         return true;
     }
 }
 
-bool MultihalSensors::setAllQemuSensors(const bool enabled) {
-    uint32_t mask = m_availableSensorsMask;
-    for (int i = 0; mask; ++i, mask >>= 1) {
-        if (mask & 1) {
-            if (!activateQemuSensorImpl(m_qemuSensorsFd.get(), i, enabled)) {
+bool MultihalSensors::setAllSensorsReporting(SensorsTransport& st,
+                                             uint32_t availableSensorsMask,
+                                             const bool enabled) {
+    for (int i = 0; availableSensorsMask; ++i, availableSensorsMask >>= 1) {
+        if (availableSensorsMask & 1) {
+            if (!setSensorsReportingImpl(st, i, enabled)) {
                 return false;
             }
         }
@@ -83,17 +84,39 @@
     return true;
 }
 
+bool MultihalSensors::setSensorsGuestTime(SensorsTransport& st, const int64_t value) {
+    char buffer[64];
+    int len = snprintf(buffer, sizeof(buffer), "time:%" PRId64, value);
+    if (st.Send(buffer, len) < 0) {
+        ALOGE("%s:%d: send for %s failed", __func__, __LINE__, st.Name());
+        return false;
+    } else {
+        return true;
+    }
+}
+
+bool MultihalSensors::setSensorsUpdateIntervalMs(SensorsTransport& st,
+                                                 const uint32_t intervalMs) {
+    char buffer[64];
+    const int len = snprintf(buffer, sizeof(buffer), "set-delay:%u", intervalMs);
+    if (st.Send(buffer, len) < 0) {
+        ALOGE("%s:%d: send for %s failed", __func__, __LINE__, st.Name());
+        return false;
+    } else {
+        return true;
+    }
+}
+
 double MultihalSensors::randomError(float lo, float hi) {
     std::uniform_real_distribution<> distribution(lo, hi);
     return distribution(gen);
 }
 
-void MultihalSensors::parseQemuSensorEventLocked(const int pipe,
-                                                 QemuSensorsProtocolState* state) {
+void MultihalSensors::parseQemuSensorEventLocked(QemuSensorsProtocolState* state) {
     char buf[256];
-    const int len = qemud_channel_recv(pipe, buf, sizeof(buf) - 1);
+    const int len = m_sensorsTransport->Receive(buf, sizeof(buf) - 1);
     if (len < 0) {
-        ALOGE("%s:%d: qemud_channel_recv failed", __func__, __LINE__);
+        ALOGE("%s:%d: receive for %s failed", __func__, __LINE__, m_sensorsTransport->Name());
     }
     const int64_t nowNs = ::android::elapsedRealtimeNano();
     buf[len] = 0;
diff --git a/sepolicy/common/file_contexts b/sepolicy/common/file_contexts
index 5ee3aea..4333297 100644
--- a/sepolicy/common/file_contexts
+++ b/sepolicy/common/file_contexts
@@ -70,6 +70,13 @@
 /vendor/lib(64)?/libdrm.so  u:object_r:same_process_hal_file:s0
 /vendor/lib(64)?/hw/android\.hardware\.graphics\.mapper@3\.0-impl-ranchu\.so   u:object_r:same_process_hal_file:s0
 /vendor/lib(64)?/libGoldfishProfiler\.so       u:object_r:same_process_hal_file:s0
+/vendor/lib(64)?/dri/.* u:object_r:same_process_hal_file:s0
+/vendor/lib(64)?/hw/android\.hardware\.graphics\.mapper@4\.0-impl\.minigbm\.so u:object_r:same_process_hal_file:s0
+/vendor/lib(64)?/hw/mapper\.minigbm\.so u:object_r:same_process_hal_file:s0
+/vendor/lib(64)?/libminigbm_gralloc.so  u:object_r:same_process_hal_file:s0
+/vendor/lib(64)?/libminigbm_gralloc4_utils.so  u:object_r:same_process_hal_file:s0
+/vendor/bin/hw/android\.hardware\.graphics\.allocator-service\.minigbm   u:object_r:hal_graphics_allocator_default_exec:s0
+/vendor/bin/hw/android\.hardware\.graphics\.allocator@4\.0-service\.minigbm   u:object_r:hal_graphics_allocator_default_exec:s0
 
 # data
 /data/vendor/mediadrm(/.*)?            u:object_r:mediadrm_vendor_data_file:s0
diff --git a/sepolicy/common/platform_app.te b/sepolicy/common/platform_app.te
index 44c2265..1d9ad7e 100644
--- a/sepolicy/common/platform_app.te
+++ b/sepolicy/common/platform_app.te
@@ -1,2 +1,3 @@
 allow platform_app self:vsock_socket create_socket_perms_no_ioctl;
 allow platform_app hal_graphics_allocator_default:vsock_socket { read write getattr };
+set_prop(platform_app, radio_control_prop);
diff --git a/tablet/data/etc/display_settings.xml b/tablet/data/etc/display_settings.xml
new file mode 100644
index 0000000..7808e5a
--- /dev/null
+++ b/tablet/data/etc/display_settings.xml
@@ -0,0 +1,8 @@
+<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
+<display-settings>
+    <config identifier="0" />
+    <!-- Allow rotation of fixed-orientation activities on the tablet. -->
+    <display
+        name="local:4619827259835644672"
+        ignoreOrientationRequest="true"/>
+</display-settings>
diff --git a/tablet/data/etc/tablet.xml b/tablet/data/etc/tablet.xml
new file mode 100644
index 0000000..7e93c5c
--- /dev/null
+++ b/tablet/data/etc/tablet.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<permissions>
+  <!-- Do not support autofocus in tablet devices. -->
+  <unavailable-feature name="android.hardware.camera.autofocus" />
+  <!-- Do not support hinge angle sensors in tablet devices. -->
+  <unavailable-feature name="android.hardware.sensor.hinge_angle" />
+</permissions>
diff --git a/tablet/overlay/frameworks/base/core/res/res/values/config.xml b/tablet/overlay/frameworks/base/core/res/res/values/config.xml
new file mode 100644
index 0000000..08cbf92
--- /dev/null
+++ b/tablet/overlay/frameworks/base/core/res/res/values/config.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2017, The Android Open Source Project
+**
+** Licensed under the Apache License, Version 2.0 (the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
+**
+**     http://www.apache.org/licenses/LICENSE-2.0
+**
+** Unless required by applicable law or agreed to in writing, software
+** distributed under the License is distributed on an "AS IS" BASIS,
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+** See the License for the specific language governing permissions and
+** limitations under the License.
+*/
+-->
+
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- Make this 'true' to allow the Emulator to control
+         the state of the headphone/microphone jack -->
+    <bool name="config_useDevInputEventForAudioJack">true</bool>
+
+    <!--  Maximum number of supported users -->
+    <integer name="config_multiuserMaximumUsers">4</integer>
+    <!--  Whether Multiuser UI should be shown -->
+    <bool name="config_enableMultiUserUI">true</bool>
+
+    <integer name="config_deskDockRotation">0</integer>
+
+
+    <!-- Indicate whether closing the lid causes the device to enter the folded state which means
+         to get a smaller screen and opening the lid causes the device to enter the unfolded state
+         which means to get a larger screen. -->
+    <bool name="config_lidControlsDisplayFold">true</bool>
+
+    <!-- Allow testing SoftAP using the simulated interfaces on the emulator. -->
+    <string-array name="config_tether_wifi_regexs">
+      <item>"wlan\\d"</item>
+    </string-array>
+
+
+
+    <!-- This device is able to support the microphone and camera global toggles. -->
+    <bool name="config_supportsMicToggle">true</bool>
+    <bool name="config_supportsCamToggle">true</bool>
+    <!-- Specifies priority of automatic time sources. Suggestions from higher entries in the list
+         take precedence over lower ones.
+         See com.android.server.timedetector.TimeDetectorStrategy for available sources. -->
+    <string-array name="config_autoTimeSourcesPriority">
+        <item>telephony</item>
+        <item>network</item>
+    </string-array>
+
+
+    <bool name="config_supportMicNearUltrasound">true</bool>
+    <bool name="config_supportSpeakerNearUltrasound">true</bool>
+
+</resources>
diff --git a/tablet/overlay/frameworks/base/core/res/res/xml/irq_device_map.xml b/tablet/overlay/frameworks/base/core/res/res/xml/irq_device_map.xml
new file mode 100644
index 0000000..09d7a88
--- /dev/null
+++ b/tablet/overlay/frameworks/base/core/res/res/xml/irq_device_map.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+**
+** 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.
+*/
+-->
+<irq-device-map>
+    <device name="rtc0">
+        <subsystem>Alarm</subsystem>
+    </device>
+</irq-device-map>
diff --git a/tablet/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml b/tablet/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
new file mode 100644
index 0000000..7b206e4
--- /dev/null
+++ b/tablet/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/**
+ * Copyright (c) 2015, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+
+<resources>
+    <bool name="def_lockscreen_disabled">true</bool>
+    <bool name="def_wifi_on">true</bool>
+    <!-- Allow scanning even if WiFi is disabled -->
+    <integer name="def_wifi_scan_always_available">1</integer>
+
+    <!-- maximize the timeout to INT_MAX about 500+ hours -->
+    <integer name="def_screen_off_timeout">2147483647</integer>
+
+    <!-- Allow users to use both the on-screen keyboard, as well as a real
+         keyboard -->
+    <bool name="def_show_ime_with_hard_keyboard">true</bool>
+</resources>
diff --git a/tasks/emu_img_zip.mk b/tasks/emu_img_zip.mk
index c973e6a..dc5e502 100644
--- a/tasks/emu_img_zip.mk
+++ b/tasks/emu_img_zip.mk
@@ -45,19 +45,29 @@
 INTERNAL_EMULATOR_PACKAGE_FILES += device/generic/goldfish/data/etc/userdata.img
 
 INTERNAL_EMULATOR_FEATURE_DIR := .
-ifneq ($(filter sdk_phone64_% sdk_gphone64_%, $(TARGET_PRODUCT)),)
+ifneq ($(filter sdk_phone64_% sdk_gphone64_% sdk_tablet% sdk_gtablet%, $(TARGET_PRODUCT)),)
 INTERNAL_EMULATOR_FEATURE_DIR := 64bit
 endif
 
+ADVANCED_FEATURES_FILENAME := advancedFeatures.ini
+ifneq ($(filter %_minigbm, $(TARGET_PRODUCT)),)
+ADVANCED_FEATURES_FILENAME := advancedFeatures.ini.minigbm
+endif
+
+ifneq ($(filter sdk_tablet% sdk_gtablet%, $(TARGET_PRODUCT)),)
+ADVANCED_FEATURES_FILENAME := advancedFeatures.ini.tablet
+endif
+
+ADVANCED_FEATURES_FILES :=
 ifeq ($(TARGET_BUILD_VARIANT),user)
-INTERNAL_EMULATOR_PACKAGE_FILES += device/generic/goldfish/data/etc/google/$(INTERNAL_EMULATOR_FEATURE_DIR)/user/advancedFeatures.ini
+ADVANCED_FEATURES_FILES += device/generic/goldfish/data/etc/google/$(INTERNAL_EMULATOR_FEATURE_DIR)/user/$(ADVANCED_FEATURES_FILENAME)
 ifeq ($(TARGET_ARCH),arm64)
-INTERNAL_EMULATOR_PACKAGE_FILES += device/generic/goldfish/data/etc/google/$(INTERNAL_EMULATOR_FEATURE_DIR)/user/arm64/advancedFeatures.ini
+ADVANCED_FEATURES_FILES += device/generic/goldfish/data/etc/google/$(INTERNAL_EMULATOR_FEATURE_DIR)/user/arm64/$(ADVANCED_FEATURES_FILENAME)
 endif
 else
-INTERNAL_EMULATOR_PACKAGE_FILES += device/generic/goldfish/data/etc/google/$(INTERNAL_EMULATOR_FEATURE_DIR)/userdebug/advancedFeatures.ini
+ADVANCED_FEATURES_FILES += device/generic/goldfish/data/etc/google/$(INTERNAL_EMULATOR_FEATURE_DIR)/userdebug/$(ADVANCED_FEATURES_FILENAME)
 ifeq ($(TARGET_ARCH),arm64)
-INTERNAL_EMULATOR_PACKAGE_FILES += device/generic/goldfish/data/etc/google/$(INTERNAL_EMULATOR_FEATURE_DIR)/userdebug/arm64/advancedFeatures.ini
+ADVANCED_FEATURES_FILES += device/generic/goldfish/data/etc/google/$(INTERNAL_EMULATOR_FEATURE_DIR)/userdebug/arm64/$(ADVANCED_FEATURES_FILENAME)
 endif
 endif
 
@@ -82,10 +92,11 @@
 endif # x86
 endif # arm
 
-$(INTERNAL_EMULATOR_PACKAGE_TARGET): $(INTERNAL_EMULATOR_PACKAGE_FILES) $(FINAL_INSTALLED_QEMU_SYSTEMIMAGE) $(FINAL_INSTALLED_QEMU_RAMDISKIMAGE) $(FINAL_INSTALLED_QEMU_VENDORIMAGE) $(EMULATOR_KERNEL_FILE) $(PRODUCT_OUT)/userdata.img
+$(INTERNAL_EMULATOR_PACKAGE_TARGET): $(INTERNAL_EMULATOR_PACKAGE_FILES) $(FINAL_INSTALLED_QEMU_SYSTEMIMAGE) $(FINAL_INSTALLED_QEMU_RAMDISKIMAGE) $(FINAL_INSTALLED_QEMU_VENDORIMAGE) $(EMULATOR_KERNEL_FILE) $(ADVANCED_FEATURES_FILES) $(PRODUCT_OUT)/userdata.img
 	@echo "Package: $@"
 	$(hide) mkdir -p $(INTERNAL_EMULATOR_PACKAGE_SOURCE)/$(TARGET_CPU_ABI)
 	$(hide) $(foreach f,$(INTERNAL_EMULATOR_PACKAGE_FILES), $(ACP) $(f) $(INTERNAL_EMULATOR_PACKAGE_SOURCE)/$(TARGET_CPU_ABI)/$(notdir $(f));)
+	$(hide) $(foreach f,$(ADVANCED_FEATURES_FILES), $(ACP) $(f) $(INTERNAL_EMULATOR_PACKAGE_SOURCE)/$(TARGET_CPU_ABI)/advancedFeatures.ini;)
 	$(hide) ($(ACP) $(EMULATOR_KERNEL_FILE) $(INTERNAL_EMULATOR_PACKAGE_SOURCE)/$(TARGET_CPU_ABI)/${EMULATOR_KERNEL_DIST_NAME})
 	$(hide) $(ACP) -r $(PRODUCT_OUT)/data $(INTERNAL_EMULATOR_PACKAGE_SOURCE)/$(TARGET_CPU_ABI)
 	$(hide) $(SOONG_ZIP) -o $@ -C $(INTERNAL_EMULATOR_PACKAGE_SOURCE) -D $(INTERNAL_EMULATOR_PACKAGE_SOURCE)/$(TARGET_CPU_ABI)
diff --git a/tools/Android.mk b/tools/Android.mk
index 367be42..50f3b65 100644
--- a/tools/Android.mk
+++ b/tools/Android.mk
@@ -26,17 +26,23 @@
         $(PRODUCT_OUT)/VerifiedBootParams.textproto \
         $(foreach p,$(BOARD_SUPER_PARTITION_PARTITION_LIST),$(PRODUCT_OUT)/$(p).img)
 
+ADVANCED_FEATURES_FILENAME := advancedFeatures.ini
+ifneq ($(filter %_minigbm, $(TARGET_PRODUCT)),)
+ADVANCED_FEATURES_FILENAME := advancedFeatures.ini.minigbm
+ADVANCED_FEATURES_FILES :=
+
+endif
 ifeq ($(filter sdk_gphone_%, $(TARGET_PRODUCT)),)
 ifeq ($(TARGET_BUILD_VARIANT),user)
-EMU_EXTRA_FILES += device/generic/goldfish/data/etc/user/advancedFeatures.ini
+ADVANCED_FEATURES_FILES += device/generic/goldfish/data/etc/user/$(ADVANCED_FEATURES_FILENAME)
 else
-EMU_EXTRA_FILES += device/generic/goldfish/data/etc/advancedFeatures.ini
+ADVANCED_FEATURES_FILES += device/generic/goldfish/data/etc/$(ADVANCED_FEATURES_FILENAME)
 endif
 else
 ifeq ($(TARGET_BUILD_VARIANT),user)
-EMU_EXTRA_FILES += device/generic/goldfish/data/etc/google/user/advancedFeatures.ini
+ADVANCED_FEATURES_FILES += device/generic/goldfish/data/etc/google/user/$(ADVANCED_FEATURES_FILENAME)
 else
-EMU_EXTRA_FILES += device/generic/goldfish/data/etc/google/userdebug/advancedFeatures.ini
+ADVANCED_FEATURES_FILES += device/generic/goldfish/data/etc/google/userdebug/$(ADVANCED_FEATURES_FILENAME)
 endif
 endif
 
@@ -65,10 +71,11 @@
 $(EMU_EXTRA_TARGET): PRIVATE_PACKAGE_SRC := \
         $(call intermediates-dir-for, PACKAGING, emu_extra_target)
 
-$(EMU_EXTRA_TARGET): $(EMU_EXTRA_FILES) $(EMULATOR_KERNEL_FILE) $(SOONG_ZIP)
+$(EMU_EXTRA_TARGET): $(EMU_EXTRA_FILES) $(ADVANCED_FEATURES_FILES) $(EMULATOR_KERNEL_FILE) $(SOONG_ZIP)
 	@echo "Package: $@"
 	rm -rf $@ $(PRIVATE_PACKAGE_SRC)
 	$(foreach f,$(EMU_EXTRA_FILES), cp $(f) $(PRIVATE_PACKAGE_SRC)/$(TARGET_ARCH)/$(notdir $(f)) &&) true
+	$(foreach f,$(ADVANCED_FEATURES_FILES), cp $(f) $(PRIVATE_PACKAGE_SRC)/$(TARGET_ARCH)/advancedFeatures.ini &&) true
 	cp $(EMULATOR_KERNEL_FILE) $(PRIVATE_PACKAGE_SRC)/$(TARGET_ARCH)/${EMULATOR_KERNEL_DIST_NAME}
 	cp -r $(PRODUCT_OUT)/data $(PRIVATE_PACKAGE_SRC)/$(TARGET_ARCH)
 	mkdir -p $(PRIVATE_PACKAGE_SRC)/$(TARGET_ARCH)/system
diff --git a/vendor.mk b/vendor.mk
index 52df143..cbc324a 100644
--- a/vendor.mk
+++ b/vendor.mk
@@ -13,299 +13,4 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-#
-# This file is to configure vendor/data partitions of emulator-related products
-#
-$(call inherit-product-if-exists, frameworks/native/build/phone-xhdpi-2048-dalvik-heap.mk)
-
-# Enable Scoped Storage related
-$(call inherit-product, $(SRC_TARGET_DIR)/product/emulated_storage.mk)
-
-DEVICE_MANIFEST_FILE += device/generic/goldfish/manifest.xml
-
-PRODUCT_SOONG_NAMESPACES += \
-    device/generic/goldfish \
-    device/generic/goldfish-opengl
-
-PRODUCT_VENDOR_PROPERTIES += \
-    ro.control_privapp_permissions=enforce \
-    ro.crypto.volume.filenames_mode=aes-256-cts \
-    ro.hardware.audio.tinyalsa.period_count=4 \
-    ro.hardware.audio.tinyalsa.period_size_multiplier=4 \
-    ro.hardware.audio.tinyalsa.host_latency_ms=30 \
-    ro.hardware.power=ranchu \
-    ro.hardware.vulkan=ranchu \
-    ro.incremental.enable=yes \
-    ro.logd.size=1M \
-    ro.kernel.qemu=1 \
-    ro.soc.manufacturer=AOSP \
-    ro.soc.model=ranchu \
-    ro.surface_flinger.supports_background_blur=1 \
-    ro.zygote.disable_gl_preload=1 \
-    debug.sf.vsync_reactor_ignore_present_fences=true \
-    debug.stagefright.c2inputsurface=-1 \
-    debug.stagefright.ccodec=4 \
-    graphics.gpu.profiler.support=true \
-    persist.sys.zram_enabled=1 \
-    wifi.direct.interface=p2p-dev-wlan0 \
-    wifi.interface=wlan0 \
-
-# Device modules
-PRODUCT_PACKAGES += \
-    android.hardware.drm-service-lazy.clearkey \
-    android.hardware.gatekeeper@1.0-service.software \
-    android.hardware.usb-service.example \
-    vulkan.ranchu \
-    libandroidemu \
-    libOpenglCodecCommon \
-    libOpenglSystemCommon \
-    qemu-export-property \
-    qemu-props \
-    stagefright \
-    android.hardware.graphics.allocator@3.0-service.ranchu \
-    android.hardware.graphics.mapper@3.0-impl-ranchu \
-    android.hardware.graphics.composer3-service.ranchu \
-    toybox_vendor \
-    android.hardware.wifi-service \
-    android.hardware.media.c2@1.0-service-goldfish \
-    libcodec2_goldfish_vp8dec \
-    libcodec2_goldfish_vp9dec \
-    libcodec2_goldfish_avcdec \
-    libcodec2_goldfish_hevcdec \
-    sh_vendor \
-    local_time.default \
-    SdkSetup \
-    goldfish_overlay_connectivity_gsi \
-    MultiDisplayProvider \
-    libGoldfishProfiler \
-    dlkm_loader
-
-ifneq ($(EMULATOR_DISABLE_RADIO),true)
-PRODUCT_PACKAGES += \
-    libcuttlefish-ril-2 \
-    libgoldfish-rild \
-    EmulatorRadioConfig \
-    EmulatorTetheringConfigOverlay
-
-DEVICE_MANIFEST_FILE += device/generic/goldfish/manifest.radio.xml
-DISABLE_RILD_OEM_HOOK := true
-endif
-
-ifneq ($(EMULATOR_VENDOR_NO_BIOMETRICS), true)
-PRODUCT_PACKAGES += \
-    android.hardware.biometrics.fingerprint-service.ranchu \
-    android.hardware.biometrics.face-service.example \
-
-PRODUCT_COPY_FILES += \
-    frameworks/native/data/etc/android.hardware.fingerprint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.fingerprint.xml \
-    frameworks/native/data/etc/android.hardware.biometrics.face.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.biometrics.face.xml \
-
-endif
-
-ifneq ($(BUILD_EMULATOR_OPENGL),false)
-PRODUCT_PACKAGES += \
-    libGLESv1_CM_emulation \
-    lib_renderControl_enc \
-    libEGL_emulation \
-    libGLESv2_enc \
-    libvulkan_enc \
-    libGLESv2_emulation \
-    libGLESv1_enc \
-    libEGL_angle \
-    libGLESv1_CM_angle \
-    libGLESv2_angle
-endif
-
-# Enable bluetooth
-PRODUCT_PACKAGES += \
-    android.hardware.bluetooth-service.default \
-    android.hardware.bluetooth.audio-impl \
-    bt_vhci_forwarder \
-
-# Bluetooth hardware properties.
-ifeq ($(TARGET_PRODUCT_PROP),)
-TARGET_PRODUCT_PROP := $(LOCAL_PATH)/bluetooth.prop
-endif
-
-# Bluetooth se policies
-BOARD_SEPOLICY_DIRS += system/bt/vendor_libs/linux/sepolicy
-
-PRODUCT_PACKAGES += \
-    android.hardware.security.keymint-service
-PRODUCT_COPY_FILES += \
-    frameworks/native/data/etc/android.hardware.keystore.app_attest_key.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.keystore.app_attest_key.xml
-
-PRODUCT_PACKAGES += \
-    DisplayCutoutEmulationEmu01Overlay \
-    EmulationPixel7ProOverlay \
-    SystemUIEmulationPixel7ProOverlay \
-    EmulationPixel7Overlay \
-    SystemUIEmulationPixel7Overlay \
-    EmulationPixel6ProOverlay \
-    SystemUIEmulationPixel6ProOverlay \
-    EmulationPixel6Overlay \
-    SystemUIEmulationPixel6Overlay \
-    EmulationPixel6aOverlay \
-    SystemUIEmulationPixel6aOverlay \
-    EmulationPixel5Overlay \
-    SystemUIEmulationPixel5Overlay \
-    EmulationPixel4XLOverlay \
-    SystemUIEmulationPixel4XLOverlay \
-    EmulationPixel4Overlay \
-    SystemUIEmulationPixel4Overlay \
-    EmulationPixel4aOverlay \
-    SystemUIEmulationPixel4aOverlay \
-    EmulationPixel3XLOverlay \
-    SystemUIEmulationPixel3XLOverlay \
-    EmulationPixel3Overlay \
-    SystemUIEmulationPixel3Overlay \
-    EmulationPixel3aOverlay \
-    SystemUIEmulationPixel3aOverlay \
-    EmulationPixel3aXLOverlay \
-    SystemUIEmulationPixel3aXLOverlay \
-    EmulationPixel2XLOverlay \
-    NavigationBarMode2ButtonOverlay \
-
-ifneq ($(EMULATOR_VENDOR_NO_GNSS),true)
-PRODUCT_PACKAGES += android.hardware.gnss-service.ranchu
-endif
-
-ifneq ($(EMULATOR_VENDOR_NO_SENSORS),true)
-PRODUCT_PACKAGES += \
-    android.hardware.sensors-service.multihal \
-    android.hardware.sensors@2.1-impl.ranchu
-# TODO(rkir):
-# add a soong namespace and move this into a.h.sensors@2.1-impl.ranchu
-# as prebuilt_etc. For now soong_namespace causes a build break because the fw
-# refers to our wifi HAL in random places.
-PRODUCT_COPY_FILES += \
-    device/generic/goldfish/sensors/hals.conf:$(TARGET_COPY_OUT_VENDOR)/etc/sensors/hals.conf
-endif
-
-ifneq ($(EMULATOR_VENDOR_NO_CAMERA),true)
-PRODUCT_SOONG_NAMESPACES += \
-    hardware/google/camera \
-    hardware/google/camera/devices/EmulatedCamera \
-
-PRODUCT_PACKAGES += \
-    android.hardware.camera.provider.ranchu \
-    android.hardware.camera.provider@2.7-service-google \
-    libgooglecamerahwl_impl \
-
-PRODUCT_COPY_FILES += \
-    device/generic/goldfish/camera/media/profiles.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_V1_0.xml \
-    device/generic/goldfish/camera/media/codecs_google_video_default.xml:${TARGET_COPY_OUT_VENDOR}/etc/media_codecs_google_video.xml \
-    device/generic/goldfish/camera/media/codecs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs.xml \
-    device/generic/goldfish/camera/media/codecs_performance.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance.xml \
-    device/generic/goldfish/camera/media/codecs_performance_c2.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance_c2.xml \
-    frameworks/native/data/etc/android.hardware.camera.ar.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.ar.xml \
-    frameworks/native/data/etc/android.hardware.camera.flash-autofocus.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.flash-autofocus.xml \
-    frameworks/native/data/etc/android.hardware.camera.concurrent.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.concurrent.xml \
-    frameworks/native/data/etc/android.hardware.camera.front.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.front.xml \
-    frameworks/native/data/etc/android.hardware.camera.full.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.full.xml \
-    frameworks/native/data/etc/android.hardware.camera.raw.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.raw.xml \
-    hardware/google/camera/devices/EmulatedCamera/hwl/configs/emu_camera_back.json:$(TARGET_COPY_OUT_VENDOR)/etc/config/emu_camera_back.json \
-    hardware/google/camera/devices/EmulatedCamera/hwl/configs/emu_camera_front.json:$(TARGET_COPY_OUT_VENDOR)/etc/config/emu_camera_front.json \
-    hardware/google/camera/devices/EmulatedCamera/hwl/configs/emu_camera_depth.json:$(TARGET_COPY_OUT_VENDOR)/etc/config/emu_camera_depth.json \
-
-endif
-
-ifneq ($(EMULATOR_VENDOR_NO_SOUND),true)
-PRODUCT_PACKAGES += \
-    android.hardware.audio.service \
-    android.hardware.audio@7.1-impl.ranchu \
-    android.hardware.audio.effect@7.0-impl \
-
-DEVICE_MANIFEST_FILE += device/generic/goldfish/audio/android.hardware.audio.effects@7.0.xml
-
-PRODUCT_COPY_FILES += \
-    device/generic/goldfish/audio/policy/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \
-    device/generic/goldfish/audio/policy/primary_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/primary_audio_policy_configuration.xml \
-    frameworks/av/services/audiopolicy/config/bluetooth_audio_policy_configuration_7_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_audio_policy_configuration_7_0.xml \
-    frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml \
-    frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \
-    frameworks/av/services/audiopolicy/config/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml \
-    frameworks/av/media/libeffects/data/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml \
-
-endif
-
-# WiFi: vendor side
-PRODUCT_PACKAGES += \
-    mac80211_create_radios \
-    dhcpclient \
-    hostapd \
-    wpa_supplicant \
-
-# Window Extensions
-$(call inherit-product, $(SRC_TARGET_DIR)/product/window_extensions.mk)
-
-# "Hello, world!" HAL implementations, mostly for compliance
-PRODUCT_PACKAGES += \
-    android.hardware.atrace@1.0-service \
-    android.hardware.authsecret-service.example \
-    android.hardware.contexthub-service.example \
-    android.hardware.dumpstate-service.example \
-    android.hardware.health-service.example \
-    android.hardware.health.storage-service.default \
-    android.hardware.identity-service.example \
-    android.hardware.lights-service.example \
-    android.hardware.neuralnetworks-shim-service-sample \
-    android.hardware.neuralnetworks-service-sample-all \
-    android.hardware.neuralnetworks-service-sample-limited \
-    android.hardware.power-service.example \
-    android.hardware.power.stats-service.example \
-    android.hardware.rebootescrow-service.default \
-    android.hardware.thermal@2.0-service.mock \
-    android.hardware.vibrator-service.example
-
-PRODUCT_COPY_FILES += \
-    device/generic/goldfish/data/etc/dtb.img:dtb.img \
-    device/generic/goldfish/emulator-info.txt:data/misc/emulator/version.txt \
-    device/generic/goldfish/data/etc/apns-conf.xml:data/misc/apns/apns-conf.xml \
-    device/generic/goldfish/radio/RadioConfig/radioconfig.xml:data/misc/emulator/config/radioconfig.xml \
-    device/generic/goldfish/data/etc/iccprofile_for_sim0.xml:data/misc/modem_simulator/iccprofile_for_sim0.xml \
-    device/google/cuttlefish/host/commands/modem_simulator/files/iccprofile_for_sim0_for_CtsCarrierApiTestCases.xml:data/misc/modem_simulator/iccprofile_for_carrierapitests.xml \
-    device/generic/goldfish/data/etc/numeric_operator.xml:data/misc/modem_simulator/etc/modem_simulator/files/numeric_operator.xml \
-    device/generic/goldfish/data/etc/local.prop:data/local.prop \
-    device/generic/goldfish/init.qemu-adb-keys.sh:$(TARGET_COPY_OUT_SYSTEM_EXT)/bin/init.qemu-adb-keys.sh \
-    device/generic/goldfish/init.ranchu-core.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.ranchu-core.sh \
-    device/generic/goldfish/init.ranchu-net.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.ranchu-net.sh \
-    device/generic/goldfish/init.ranchu.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.ranchu.rc \
-    device/generic/goldfish/init.system_ext.rc:$(TARGET_COPY_OUT_SYSTEM_EXT)/etc/init/init.system_ext.rc \
-    device/generic/goldfish/ueventd.ranchu.rc:$(TARGET_COPY_OUT_VENDOR)/etc/ueventd.rc \
-    device/generic/goldfish/input/virtio_input_rotary.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_rotary.idc \
-    device/generic/goldfish/input/qwerty2.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/qwerty2.idc \
-    device/generic/goldfish/input/qwerty.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/qwerty.kl \
-    device/generic/goldfish/input/virtio_input_multi_touch_1.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_1.idc \
-    device/generic/goldfish/input/virtio_input_multi_touch_2.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_2.idc \
-    device/generic/goldfish/input/virtio_input_multi_touch_3.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_3.idc \
-    device/generic/goldfish/input/virtio_input_multi_touch_4.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_4.idc \
-    device/generic/goldfish/input/virtio_input_multi_touch_5.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_5.idc \
-    device/generic/goldfish/input/virtio_input_multi_touch_6.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_6.idc \
-    device/generic/goldfish/input/virtio_input_multi_touch_7.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_7.idc \
-    device/generic/goldfish/input/virtio_input_multi_touch_8.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_8.idc \
-    device/generic/goldfish/input/virtio_input_multi_touch_9.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_9.idc \
-    device/generic/goldfish/input/virtio_input_multi_touch_10.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_10.idc \
-    device/generic/goldfish/input/virtio_input_multi_touch_11.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_11.idc \
-    device/generic/goldfish/display_settings_app_compat.xml:$(TARGET_COPY_OUT_VENDOR)/etc/display_settings_app_compat.xml \
-    device/generic/goldfish/display_settings_freeform.xml:$(TARGET_COPY_OUT_VENDOR)/etc/display_settings_freeform.xml \
-    device/generic/goldfish/display_settings.xml:$(TARGET_COPY_OUT_VENDOR)/etc/display_settings.xml \
-    device/generic/goldfish/data/etc/config.ini:config.ini \
-    device/generic/goldfish/wifi/wpa_supplicant.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/wpa_supplicant.conf \
-    frameworks/native/data/etc/android.hardware.bluetooth_le.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth_le.xml \
-    frameworks/native/data/etc/android.hardware.bluetooth.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth.xml \
-    frameworks/native/data/etc/android.hardware.wifi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.xml \
-    frameworks/native/data/etc/android.hardware.wifi.passpoint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.passpoint.xml \
-    frameworks/native/data/etc/android.hardware.wifi.direct.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.direct.xml \
-    device/generic/goldfish/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml \
-    frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_audio.xml \
-    frameworks/av/media/libstagefright/data/media_codecs_google_telephony.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_telephony.xml \
-    frameworks/native/data/etc/android.hardware.touchscreen.multitouch.jazzhand.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml \
-    frameworks/native/data/etc/android.hardware.vulkan.level-1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.level.xml \
-    frameworks/native/data/etc/android.hardware.vulkan.compute-0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.compute.xml \
-    frameworks/native/data/etc/android.hardware.vulkan.version-1_1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.version.xml \
-    frameworks/native/data/etc/android.software.vulkan.deqp.level-2023-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.vulkan.deqp.level.xml \
-    frameworks/native/data/etc/android.software.opengles.deqp.level-2023-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.opengles.deqp.level.xml \
-    frameworks/native/data/etc/android.software.autofill.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.autofill.xml \
-    frameworks/native/data/etc/android.software.verified_boot.xml:${TARGET_COPY_OUT_PRODUCT}/etc/permissions/android.software.verified_boot.xml \
-    device/generic/goldfish/data/etc/permissions/privapp-permissions-goldfish.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/permissions/privapp-permissions-goldfish.xml \
+$(call inherit-product, $(LOCAL_PATH)/vendor_common.mk)
diff --git a/vendor_common.mk b/vendor_common.mk
new file mode 100644
index 0000000..a0d5479
--- /dev/null
+++ b/vendor_common.mk
@@ -0,0 +1,349 @@
+#
+# 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.
+
+#
+# This file is to configure vendor/data partitions of emulator-related products
+#
+$(call inherit-product-if-exists, frameworks/native/build/phone-xhdpi-2048-dalvik-heap.mk)
+
+# Enable Scoped Storage related
+$(call inherit-product, $(SRC_TARGET_DIR)/product/emulated_storage.mk)
+
+DEVICE_MANIFEST_FILE += device/generic/goldfish/manifest.xml
+
+PRODUCT_SOONG_NAMESPACES += \
+    device/generic/goldfish \
+    device/generic/goldfish-opengl
+
+# RKPD
+PRODUCT_PRODUCT_PROPERTIES += \
+    remote_provisioning.enable_rkpd=true \
+    remote_provisioning.hostname=remoteprovisioning.googleapis.com
+
+PRODUCT_VENDOR_PROPERTIES += \
+    ro.control_privapp_permissions=enforce \
+    ro.crypto.volume.filenames_mode=aes-256-cts \
+    ro.hardware.audio.tinyalsa.period_count=4 \
+    ro.hardware.audio.tinyalsa.period_size_multiplier=2 \
+    ro.hardware.audio.tinyalsa.host_latency_ms=80 \
+    ro.hardware.power=ranchu \
+    ro.hardware.vulkan=ranchu \
+    ro.incremental.enable=yes \
+    ro.logd.size=1M \
+    ro.kernel.qemu=1 \
+    ro.soc.manufacturer=AOSP \
+    ro.soc.model=ranchu \
+    ro.surface_flinger.supports_background_blur=1 \
+    ro.zygote.disable_gl_preload=1 \
+    debug.sf.vsync_reactor_ignore_present_fences=true \
+    debug.stagefright.c2inputsurface=-1 \
+    debug.stagefright.ccodec=4 \
+    persist.sys.zram_enabled=1 \
+    wifi.direct.interface=p2p-dev-wlan0 \
+    wifi.interface=wlan0 \
+
+# Device modules
+PRODUCT_PACKAGES += \
+    android.hardware.drm-service-lazy.clearkey \
+    android.hardware.gatekeeper@1.0-service.software \
+    android.hardware.usb-service.example \
+    vulkan.ranchu \
+    libandroidemu \
+    libOpenglCodecCommon \
+    libOpenglSystemCommon \
+    qemu-export-property \
+    qemu-props \
+    stagefright \
+    android.hardware.graphics.composer3-service.ranchu \
+    toybox_vendor \
+    android.hardware.wifi-service \
+    android.hardware.media.c2@1.0-service-goldfish \
+    libcodec2_goldfish_vp8dec \
+    libcodec2_goldfish_vp9dec \
+    libcodec2_goldfish_avcdec \
+    libcodec2_goldfish_hevcdec \
+    sh_vendor \
+    local_time.default \
+    SdkSetup \
+    goldfish_overlay_connectivity_gsi \
+    MultiDisplayProvider \
+    libGoldfishProfiler \
+    dlkm_loader
+
+ifneq ($(filter %_minigbm, $(TARGET_PRODUCT)),)
+PRODUCT_VENDOR_PROPERTIES += ro.hardware.gralloc=minigbm
+PRODUCT_PACKAGES += \
+    android.hardware.graphics.allocator-service.minigbm \
+    android.hardware.graphics.mapper@4.0-impl.minigbm \
+    mapper.minigbm
+else
+PRODUCT_VENDOR_PROPERTIES += ro.hardware.gralloc=ranchu
+PRODUCT_PACKAGES += \
+    android.hardware.graphics.allocator@3.0-service.ranchu \
+    android.hardware.graphics.mapper@3.0-impl-ranchu
+endif
+
+ifneq ($(EMULATOR_DISABLE_RADIO),true)
+PRODUCT_PACKAGES += \
+    libcuttlefish-ril-2 \
+    libgoldfish-rild \
+    EmulatorRadioConfig \
+    EmulatorTetheringConfigOverlay
+
+DEVICE_MANIFEST_FILE += device/generic/goldfish/manifest.radio.xml
+DISABLE_RILD_OEM_HOOK := true
+endif
+
+ifneq ($(EMULATOR_VENDOR_NO_BIOMETRICS), true)
+PRODUCT_PACKAGES += \
+    android.hardware.biometrics.fingerprint-service.ranchu \
+    android.hardware.biometrics.face-service.example \
+
+PRODUCT_COPY_FILES += \
+    frameworks/native/data/etc/android.hardware.fingerprint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.fingerprint.xml \
+    frameworks/native/data/etc/android.hardware.biometrics.face.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.biometrics.face.xml \
+
+endif
+
+ifneq ($(BUILD_EMULATOR_OPENGL),false)
+PRODUCT_PACKAGES += \
+    libGLESv1_CM_emulation \
+    lib_renderControl_enc \
+    libEGL_emulation \
+    libGLESv2_enc \
+    libvulkan_enc \
+    libGLESv2_emulation \
+    libGLESv1_enc \
+    libEGL_angle \
+    libGLESv1_CM_angle \
+    libGLESv2_angle
+endif
+
+# Enable bluetooth
+PRODUCT_PACKAGES += \
+    android.hardware.bluetooth-service.default \
+    android.hardware.bluetooth.audio-impl \
+    bt_vhci_forwarder \
+
+# Bluetooth hardware properties.
+ifeq ($(TARGET_PRODUCT_PROP),)
+TARGET_PRODUCT_PROP := $(LOCAL_PATH)/bluetooth.prop
+endif
+
+# Bluetooth se policies
+BOARD_SEPOLICY_DIRS += system/bt/vendor_libs/linux/sepolicy
+
+PRODUCT_PACKAGES += \
+    android.hardware.security.keymint-service
+PRODUCT_COPY_FILES += \
+    frameworks/native/data/etc/android.hardware.keystore.app_attest_key.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.keystore.app_attest_key.xml
+
+PRODUCT_PACKAGES += \
+    DisplayCutoutEmulationEmu01Overlay \
+    EmulationPixelFoldOverlay \
+    SystemUIEmulationPixelFoldOverlay \
+    EmulationPixel8ProOverlay \
+    SystemUIEmulationPixel8ProOverlay \
+    EmulationPixel8Overlay \
+    SystemUIEmulationPixel8Overlay \
+    EmulationPixel7ProOverlay \
+    SystemUIEmulationPixel7ProOverlay \
+    EmulationPixel7Overlay \
+    SystemUIEmulationPixel7Overlay \
+    EmulationPixel7aOverlay \
+    SystemUIEmulationPixel7aOverlay \
+    EmulationPixel6ProOverlay \
+    SystemUIEmulationPixel6ProOverlay \
+    EmulationPixel6Overlay \
+    SystemUIEmulationPixel6Overlay \
+    EmulationPixel6aOverlay \
+    SystemUIEmulationPixel6aOverlay \
+    EmulationPixel5Overlay \
+    SystemUIEmulationPixel5Overlay \
+    EmulationPixel4XLOverlay \
+    SystemUIEmulationPixel4XLOverlay \
+    EmulationPixel4Overlay \
+    SystemUIEmulationPixel4Overlay \
+    EmulationPixel4aOverlay \
+    SystemUIEmulationPixel4aOverlay \
+    EmulationPixel3XLOverlay \
+    SystemUIEmulationPixel3XLOverlay \
+    EmulationPixel3Overlay \
+    SystemUIEmulationPixel3Overlay \
+    EmulationPixel3aOverlay \
+    SystemUIEmulationPixel3aOverlay \
+    EmulationPixel3aXLOverlay \
+    SystemUIEmulationPixel3aXLOverlay \
+    EmulationPixel2XLOverlay \
+    NavigationBarMode2ButtonOverlay \
+
+ifneq ($(EMULATOR_VENDOR_NO_GNSS),true)
+PRODUCT_PACKAGES += android.hardware.gnss-service.ranchu
+endif
+
+ifneq ($(EMULATOR_VENDOR_NO_SENSORS),true)
+PRODUCT_PACKAGES += \
+    android.hardware.sensors-service.multihal \
+    android.hardware.sensors@2.1-impl.ranchu
+# TODO(rkir):
+# add a soong namespace and move this into a.h.sensors@2.1-impl.ranchu
+# as prebuilt_etc. For now soong_namespace causes a build break because the fw
+# refers to our wifi HAL in random places.
+PRODUCT_COPY_FILES += \
+    device/generic/goldfish/sensors/hals.conf:$(TARGET_COPY_OUT_VENDOR)/etc/sensors/hals.conf
+endif
+
+ifneq ($(EMULATOR_VENDOR_NO_CAMERA),true)
+PRODUCT_SOONG_NAMESPACES += \
+    hardware/google/camera \
+    hardware/google/camera/devices/EmulatedCamera \
+
+PRODUCT_PACKAGES += \
+    android.hardware.camera.provider.ranchu \
+    android.hardware.camera.provider@2.7-service-google \
+    libgooglecamerahwl_impl \
+
+PRODUCT_COPY_FILES += \
+    device/generic/goldfish/camera/media/profiles.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_V1_0.xml \
+    device/generic/goldfish/camera/media/codecs_google_video_default.xml:${TARGET_COPY_OUT_VENDOR}/etc/media_codecs_google_video.xml \
+    device/generic/goldfish/camera/media/codecs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs.xml \
+    device/generic/goldfish/camera/media/codecs_performance.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance.xml \
+    device/generic/goldfish/camera/media/codecs_performance_c2.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance_c2.xml \
+    frameworks/native/data/etc/android.hardware.camera.flash-autofocus.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.flash-autofocus.xml \
+    frameworks/native/data/etc/android.hardware.camera.concurrent.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.concurrent.xml \
+    frameworks/native/data/etc/android.hardware.camera.front.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.front.xml \
+    frameworks/native/data/etc/android.hardware.camera.full.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.full.xml \
+    frameworks/native/data/etc/android.hardware.camera.raw.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.raw.xml \
+    hardware/google/camera/devices/EmulatedCamera/hwl/configs/emu_camera_back.json:$(TARGET_COPY_OUT_VENDOR)/etc/config/emu_camera_back.json \
+    hardware/google/camera/devices/EmulatedCamera/hwl/configs/emu_camera_front.json:$(TARGET_COPY_OUT_VENDOR)/etc/config/emu_camera_front.json \
+    hardware/google/camera/devices/EmulatedCamera/hwl/configs/emu_camera_depth.json:$(TARGET_COPY_OUT_VENDOR)/etc/config/emu_camera_depth.json \
+
+endif
+
+ifneq ($(EMULATOR_VENDOR_NO_SOUND),true)
+PRODUCT_PACKAGES += \
+    android.hardware.audio.service \
+    android.hardware.audio@7.1-impl.ranchu \
+    android.hardware.audio.effect@7.0-impl \
+
+DEVICE_MANIFEST_FILE += device/generic/goldfish/audio/android.hardware.audio.effects@7.0.xml
+
+PRODUCT_COPY_FILES += \
+    device/generic/goldfish/audio/policy/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \
+    device/generic/goldfish/audio/policy/primary_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/primary_audio_policy_configuration.xml \
+    frameworks/av/services/audiopolicy/config/bluetooth_audio_policy_configuration_7_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_audio_policy_configuration_7_0.xml \
+    frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml \
+    frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \
+    frameworks/av/services/audiopolicy/config/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml \
+    frameworks/av/media/libeffects/data/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml \
+
+endif
+
+# WiFi: vendor side
+PRODUCT_PACKAGES += \
+    mac80211_create_radios \
+    dhcpclient \
+    hostapd \
+    wpa_supplicant \
+
+# Window Extensions
+$(call inherit-product, $(SRC_TARGET_DIR)/product/window_extensions.mk)
+
+# "Hello, world!" HAL implementations, mostly for compliance
+PRODUCT_PACKAGES += \
+    android.hardware.atrace@1.0-service \
+    android.hardware.authsecret-service.example \
+    android.hardware.contexthub-service.example \
+    android.hardware.dumpstate-service.example \
+    android.hardware.health-service.example \
+    android.hardware.health.storage-service.default \
+    android.hardware.lights-service.example \
+    android.hardware.neuralnetworks-shim-service-sample \
+    android.hardware.neuralnetworks-service-sample-all \
+    android.hardware.neuralnetworks-service-sample-limited \
+    android.hardware.power-service.example \
+    android.hardware.power.stats-service.example \
+    android.hardware.rebootescrow-service.default \
+    android.hardware.thermal@2.0-service.mock \
+    android.hardware.vibrator-service.example
+
+# TVs don't use a hardware identity service.
+ifneq ($(PRODUCT_IS_ATV_SDK),true)
+    PRODUCT_PACKAGES += \
+        android.hardware.identity-service.example
+endif
+
+PRODUCT_COPY_FILES += \
+    device/generic/goldfish/data/etc/dtb.img:dtb.img \
+    device/generic/goldfish/emulator-info.txt:data/misc/emulator/version.txt \
+    device/generic/goldfish/data/etc/apns-conf.xml:data/misc/apns/apns-conf.xml \
+    device/generic/goldfish/radio/RadioConfig/radioconfig.xml:data/misc/emulator/config/radioconfig.xml \
+    device/generic/goldfish/data/etc/iccprofile_for_sim0.xml:data/misc/modem_simulator/iccprofile_for_sim0.xml \
+    device/google/cuttlefish/host/commands/modem_simulator/files/iccprofile_for_sim0_for_CtsCarrierApiTestCases.xml:data/misc/modem_simulator/iccprofile_for_carrierapitests.xml \
+    device/generic/goldfish/data/etc/numeric_operator.xml:data/misc/modem_simulator/etc/modem_simulator/files/numeric_operator.xml \
+    device/generic/goldfish/data/etc/local.prop:data/local.prop \
+    device/generic/goldfish/init.qemu-adb-keys.sh:$(TARGET_COPY_OUT_SYSTEM_EXT)/bin/init.qemu-adb-keys.sh \
+    device/generic/goldfish/init.ranchu-core.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.ranchu-core.sh \
+    device/generic/goldfish/init.ranchu-net.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.ranchu-net.sh \
+    device/generic/goldfish/init.ranchu.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.ranchu.rc \
+    device/generic/goldfish/init.system_ext.rc:$(TARGET_COPY_OUT_SYSTEM_EXT)/etc/init/init.system_ext.rc \
+    device/generic/goldfish/ueventd.ranchu.rc:$(TARGET_COPY_OUT_VENDOR)/etc/ueventd.rc \
+    device/generic/goldfish/input/virtio_input_rotary.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_rotary.idc \
+    device/generic/goldfish/input/qwerty2.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/qwerty2.idc \
+    device/generic/goldfish/input/qwerty.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/qwerty.kl \
+    device/generic/goldfish/input/virtio_input_multi_touch_1.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_1.idc \
+    device/generic/goldfish/input/virtio_input_multi_touch_2.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_2.idc \
+    device/generic/goldfish/input/virtio_input_multi_touch_3.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_3.idc \
+    device/generic/goldfish/input/virtio_input_multi_touch_4.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_4.idc \
+    device/generic/goldfish/input/virtio_input_multi_touch_5.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_5.idc \
+    device/generic/goldfish/input/virtio_input_multi_touch_6.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_6.idc \
+    device/generic/goldfish/input/virtio_input_multi_touch_7.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_7.idc \
+    device/generic/goldfish/input/virtio_input_multi_touch_8.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_8.idc \
+    device/generic/goldfish/input/virtio_input_multi_touch_9.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_9.idc \
+    device/generic/goldfish/input/virtio_input_multi_touch_10.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_10.idc \
+    device/generic/goldfish/input/virtio_input_multi_touch_11.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/virtio_input_multi_touch_11.idc \
+    device/generic/goldfish/display_settings_app_compat.xml:$(TARGET_COPY_OUT_VENDOR)/etc/display_settings_app_compat.xml \
+    device/generic/goldfish/display_settings_freeform.xml:$(TARGET_COPY_OUT_VENDOR)/etc/display_settings_freeform.xml \
+    device/generic/goldfish/display_settings.xml:$(TARGET_COPY_OUT_VENDOR)/etc/display_settings.xml \
+    device/generic/goldfish/pixel_fold/device_state_configuration.xml:/data/misc/pixel_fold/devicestate/device_state_configuration.xml \
+    device/generic/goldfish/pixel_fold/display_layout_configuration.xml:/data/misc/pixel_fold/displayconfig/display_layout_configuration.xml \
+    device/generic/goldfish/pixel_fold/display_settings.xml:/data/misc/pixel_fold/display_settings.xml \
+    device/generic/goldfish/data/etc/config.ini:config.ini \
+    device/generic/goldfish/wifi/wpa_supplicant.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/wpa_supplicant.conf \
+    frameworks/native/data/etc/android.hardware.bluetooth_le.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth_le.xml \
+    frameworks/native/data/etc/android.hardware.bluetooth.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth.xml \
+    frameworks/native/data/etc/android.hardware.wifi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.xml \
+    frameworks/native/data/etc/android.hardware.wifi.passpoint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.passpoint.xml \
+    frameworks/native/data/etc/android.hardware.wifi.direct.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.direct.xml \
+    frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_audio.xml \
+    frameworks/av/media/libstagefright/data/media_codecs_google_telephony.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_telephony.xml \
+    frameworks/native/data/etc/android.hardware.touchscreen.multitouch.jazzhand.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml \
+    frameworks/native/data/etc/android.hardware.vulkan.level-1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.level.xml \
+    frameworks/native/data/etc/android.hardware.vulkan.compute-0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.compute.xml \
+    frameworks/native/data/etc/android.hardware.vulkan.version-1_3.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.version.xml \
+    frameworks/native/data/etc/android.software.vulkan.deqp.level-2023-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.vulkan.deqp.level.xml \
+    frameworks/native/data/etc/android.software.opengles.deqp.level-2023-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.opengles.deqp.level.xml \
+    frameworks/native/data/etc/android.software.autofill.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.autofill.xml \
+    frameworks/native/data/etc/android.software.verified_boot.xml:${TARGET_COPY_OUT_PRODUCT}/etc/permissions/android.software.verified_boot.xml \
+    device/generic/goldfish/data/etc/permissions/privapp-permissions-goldfish.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/permissions/privapp-permissions-goldfish.xml \
+    device/generic/goldfish/data/etc/permissions/privapp-permissions-multidisplay.xml:$(TARGET_COPY_OUT_SYSTEM_EXT)/etc/permissions/privapp-permissions-multidisplay.xml \
+
+ifneq ($(EMULATOR_DISABLE_RADIO),true)
+# Android TV ingests this file, but declares its own set of hardware permissions.
+ifneq ($(PRODUCT_IS_ATV_SDK),true)
+    PRODUCT_COPY_FILES+= \
+        device/generic/goldfish/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml
+endif
+endif
diff --git a/x86-vendor.mk b/x86-vendor.mk
index c1fdd29..8582cfa 100644
--- a/x86-vendor.mk
+++ b/x86-vendor.mk
@@ -1,5 +1,9 @@
 include device/generic/goldfish/x86_64-kernel.mk
 
+ADVANCED_FEATURES_FILE := advancedFeatures.ini
+ifneq ($(filter %_minigbm, $(TARGET_PRODUCT)),)
+ADVANCED_FEATURES_FILE := advancedFeatures.ini.minigbm
+endif
 PRODUCT_PROPERTY_OVERRIDES += \
        vendor.rild.libpath=/vendor/lib/libgoldfish-ril.so
 
@@ -9,20 +13,19 @@
 # entirely appropriate to inherit from for on-device configurations.
 PRODUCT_COPY_FILES += \
     device/generic/goldfish/data/etc/config.ini.xl:config.ini \
-    device/generic/goldfish/data/etc/advancedFeatures.ini:advancedFeatures.ini \
+    device/generic/goldfish/data/etc/$(ADVANCED_FEATURES_FILE):advancedFeatures.ini \
     device/generic/goldfish/data/etc/encryptionkey.img:encryptionkey.img \
     $(EMULATOR_KERNEL_FILE):kernel-ranchu-64
 
 PRODUCT_SDK_ADDON_COPY_FILES += \
-    device/generic/goldfish/data/etc/advancedFeatures.ini:images/x86/advancedFeatures.ini \
+    device/generic/goldfish/data/etc/$(ADVANCED_FEATURES_FILE):images/x86/advancedFeatures.ini \
     device/generic/goldfish/data/etc/encryptionkey.img:images/x86/encryptionkey.img \
     $(EMULATOR_KERNEL_FILE):images/x86/kernel-ranchu-64
 
 PRODUCT_PROPERTY_OVERRIDES += \
     ro.crypto.dm_default_key.options_format.version=2
 
-PRODUCT_SHIPPING_API_LEVEL := 33
-PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS := false
+PRODUCT_SHIPPING_API_LEVEL := 34
 TARGET_USES_MKE2FS := true
 
 PRODUCT_COPY_FILES += \
diff --git a/x86_64-kernel.mk b/x86_64-kernel.mk
index d57cf6c..57ccb98 100644
--- a/x86_64-kernel.mk
+++ b/x86_64-kernel.mk
@@ -1,4 +1,5 @@
 TARGET_KERNEL_USE ?= 6.1
+PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS ?= false
 
 KERNEL_ARTIFACTS_PATH := kernel/prebuilts/$(TARGET_KERNEL_USE)/x86_64
 
diff --git a/x86_64-vendor.mk b/x86_64-vendor.mk
index 75ecd9c..e92c451 100644
--- a/x86_64-vendor.mk
+++ b/x86_64-vendor.mk
@@ -3,39 +3,33 @@
 PRODUCT_PROPERTY_OVERRIDES += \
        vendor.rild.libpath=/vendor/lib64/libgoldfish-ril.so
 
+ADVANCED_FEATURES_FILE := advancedFeatures.ini
+ifneq ($(filter %_minigbm, $(TARGET_PRODUCT)),)
+ADVANCED_FEATURES_FILE := advancedFeatures.ini.minigbm
+endif
+
 # This is a build configuration for a full-featured build of the
 # Open-Source part of the tree. It's geared toward a US-centric
 # build quite specifically for the emulator, and might not be
 # entirely appropriate to inherit from for on-device configurations.
 PRODUCT_COPY_FILES += \
     device/generic/goldfish/data/etc/config.ini.xl:config.ini \
-    device/generic/goldfish/data/etc/advancedFeatures.ini:advancedFeatures.ini \
+	device/generic/goldfish/data/etc/$(ADVANCED_FEATURES_FILE):advancedFeatures.ini \
     device/generic/goldfish/data/etc/encryptionkey.img:encryptionkey.img \
     $(EMULATOR_KERNEL_FILE):kernel-ranchu
 
 PRODUCT_SDK_ADDON_COPY_FILES += \
-    device/generic/goldfish/data/etc/advancedFeatures.ini:images/x86_64/advancedFeatures.ini \
+    device/generic/goldfish/data/etc/$(ADVANCED_FEATURES_FILE):images/x86_64/advancedFeatures.ini \
     device/generic/goldfish/data/etc/encryptionkey.img:images/x86_64/encryptionkey.img \
     $(EMULATOR_KERNEL_FILE):images/x86_64/kernel-ranchu
 
 PRODUCT_COPY_FILES += \
     device/generic/goldfish/data/etc/configs/gpu.config:data/misc/gceconfigs/gpu.config
 
-# a hack to reduce presubmit time where CTS tries to install media files one by one
-# taking more than 30 minutes; following is just the list of files needed by current
-# tests on presubmit
-PRODUCT_COPY_FILES += \
-    device/generic/goldfish/data/media/test/swirl_136x144_mpeg4.mp4:data/media/0/test/CtsMediaTestCases-1.4/swirl_136x144_mpeg4.mp4 \
-    device/generic/goldfish/data/media/test/swirl_132x130_mpeg4.mp4:data/media/0/test/CtsMediaTestCases-1.4/swirl_132x130_mpeg4.mp4 \
-    device/generic/goldfish/data/media/test/swirl_130x132_mpeg4.mp4:data/media/0/test/CtsMediaTestCases-1.4/swirl_130x132_mpeg4.mp4 \
-    device/generic/goldfish/data/media/test/swirl_144x136_mpeg4.mp4:data/media/0/test/CtsMediaTestCases-1.4/swirl_144x136_mpeg4.mp4 \
-    device/generic/goldfish/data/media/test/swirl_128x128_mpeg4.mp4:data/media/0/test/CtsMediaTestCases-1.4/swirl_128x128_mpeg4.mp4
-
 PRODUCT_PROPERTY_OVERRIDES += \
     ro.crypto.dm_default_key.options_format.version=2
 
-PRODUCT_SHIPPING_API_LEVEL := 33
-PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS := false
+PRODUCT_SHIPPING_API_LEVEL := 34
 TARGET_USES_MKE2FS := true
 
 PRODUCT_COPY_FILES += \