diff --git a/Android.bp b/Android.bp
new file mode 100644
index 0000000..e719cab
--- /dev/null
+++ b/Android.bp
@@ -0,0 +1,36 @@
+soong_namespace {
+ imports: [
+ "hardware/google/interfaces",
+ "hardware/google/pixel",
+ ],
+}
+
+package {
+ default_applicable_licenses: ["device_google_zumapro_license"],
+}
+
+// Added automatically by a large-scale-change that took the approach of
+// 'apply every license found to every target'. While this makes sure we respect
+// every license restriction, it may not be entirely correct.
+//
+// e.g. GPL in an MIT project might only apply to the contrib/ directory.
+//
+// Please consider splitting the single license below into multiple licenses,
+// taking care not to lose any license_kind information, and overriding the
+// default license using the 'licenses: [...]' property on targets as needed.
+//
+// For unused files, consider creating a 'fileGroup' with "//visibility:private"
+// to attach the license to, and including a comment whether the files may be
+// used in the current project.
+// See: http://go/android-license-faq
+license {
+ name: "device_google_zumapro_license",
+ visibility: [":__subpackages__"],
+ license_kinds: [
+ "SPDX-license-identifier-Apache-2.0",
+ "SPDX-license-identifier-BSD",
+ ],
+ license_text: [
+ "NOTICE",
+ ],
+}
diff --git a/Android.mk b/Android.mk
new file mode 100644
index 0000000..fc070c6
--- /dev/null
+++ b/Android.mk
@@ -0,0 +1,30 @@
+#
+# Copyright (C) 2011 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.
+#
+
+# WARNING: Everything listed here will be built on ALL platforms,
+# including x86, the universal, and the SDK. Modules must be uniquely
+# named (liblights.panda), and must build everywhere, or limit themselves
+# to only building on ARM if they include assembly. Individual makefiles
+# are responsible for having their own logic, for fine-grained control.
+
+LOCAL_PATH := $(call my-dir)
+
+# if some modules are built directly from this directory (not subdirectories),
+# their rules should be written here.
+
+ifeq ($(USES_DEVICE_GOOGLE_ZUMAPRO),true)
+ include $(call first-makefiles-under,$(LOCAL_PATH))
+endif
diff --git a/BoardConfig-common.mk b/BoardConfig-common.mk
new file mode 100644
index 0000000..fd963b7
--- /dev/null
+++ b/BoardConfig-common.mk
@@ -0,0 +1,427 @@
+#
+# Copyright (C) 2019 The Android Open-Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+include build/make/target/board/BoardConfigMainlineCommon.mk
+include build/make/target/board/BoardConfigPixelCommon.mk
+
+# Should be uncommented after fixing vndk-sp violation is fixed.
+PRODUCT_FULL_TREBLE_OVERRIDE := true
+
+# HACK : To fix up after bring up multimedia devices.
+TARGET_SOC := zumapro
+
+TARGET_SOC_NAME := google
+
+USES_DEVICE_GOOGLE_ZUMAPRO := true
+
+TARGET_ARCH := arm64
+TARGET_ARCH_VARIANT := armv8-2a
+TARGET_CPU_ABI := arm64-v8a
+TARGET_CPU_VARIANT := cortex-a55
+TARGET_CPU_VARIANT_RUNTIME := cortex-a55
+
+BOARD_KERNEL_CMDLINE += dyndbg=\"func alloc_contig_dump_pages +p\"
+BOARD_KERNEL_CMDLINE += earlycon=exynos4210,0x10870000 console=ttySAC0,115200 androidboot.console=ttySAC0 printk.devkmsg=on
+BOARD_KERNEL_CMDLINE += cma_sysfs.experimental=Y
+BOARD_KERNEL_CMDLINE += cgroup_disable=memory
+BOARD_KERNEL_CMDLINE += rcupdate.rcu_expedited=1 rcu_nocbs=all
+BOARD_KERNEL_CMDLINE += stack_depot_disable=off page_pinner=on
+BOARD_KERNEL_CMDLINE += swiotlb=1024
+BOARD_BOOTCONFIG += androidboot.boot_devices=13200000.ufs
+
+TARGET_NO_BOOTLOADER := true
+TARGET_NO_RADIOIMAGE := true
+BOARD_PREBUILT_BOOTIMAGE := $(wildcard $(TARGET_KERNEL_DIR)/boot.img)
+ifneq (,$(BOARD_PREBUILT_BOOTIMAGE))
+TARGET_NO_KERNEL := true
+else
+TARGET_NO_KERNEL := false
+endif
+BOARD_USES_GENERIC_KERNEL_IMAGE := true
+BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT := true
+BOARD_MOVE_GSI_AVB_KEYS_TO_VENDOR_BOOT := true
+TARGET_RECOVERY_WIPE := device/google/zumapro/conf/recovery.wipe
+
+# This is the fstab file that will be included in the recovery image. Note that
+# recovery doesn't care about the encryption settings, so it doesn't matter
+# whether we use the normal or the fips fstab here.
+TARGET_RECOVERY_FSTAB_GENRULE := gen_fstab.zumapro-sw-encrypt
+
+TARGET_RECOVERY_PIXEL_FORMAT := ABGR_8888
+TARGET_RECOVERY_UI_MARGIN_HEIGHT := 165
+TARGET_RECOVERY_UI_LIB := \
+ librecovery_ui_pixel \
+ libfstab
+
+AB_OTA_UPDATER := true
+
+AB_OTA_PARTITIONS += \
+ system \
+ system_dlkm \
+ system_ext \
+ product \
+ vbmeta_system
+
+ifneq ($(PRODUCT_BUILD_BOOT_IMAGE),false)
+AB_OTA_PARTITIONS += boot
+endif
+ifneq ($(PRODUCT_BUILD_INIT_BOOT_IMAGE), false)
+AB_OTA_PARTITIONS += init_boot
+endif
+ifneq ($(PRODUCT_BUILD_VENDOR_BOOT_IMAGE),false)
+AB_OTA_PARTITIONS += vendor_boot
+AB_OTA_PARTITIONS += dtbo
+endif
+ifeq ($(PRODUCT_BUILD_VENDOR_KERNEL_BOOT_IMAGE),true)
+AB_OTA_PARTITIONS += vendor_kernel_boot
+endif
+ifneq ($(PRODUCT_BUILD_VBMETA_IMAGE),false)
+AB_OTA_PARTITIONS += vbmeta
+endif
+ifneq ($(PRODUCT_BUILD_PVMFW_IMAGE),false)
+AB_OTA_PARTITIONS += pvmfw
+endif
+
+# EMULATOR common modules
+BOARD_EMULATOR_COMMON_MODULES := liblight
+
+OVERRIDE_RS_DRIVER := libRSDriverArm.so
+BOARD_EGL_CFG := device/google/zumapro/conf/egl.cfg
+#BOARD_USES_HGL := true
+USE_OPENGL_RENDERER := true
+NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3
+BOARD_USES_EXYNOS5_COMMON_GRALLOC := true
+BOARD_USES_EXYNOS_GRALLOC_VERSION := 4
+#BOARD_USES_EXYNOS_GRALLOC_VERSION := $(DEVICE_USES_EXYNOS_GRALLOC_VERSION)
+BOARD_USES_ALIGN_RESTRICTION := false
+BOARD_USES_GRALLOC_ION_SYNC := true
+
+# This should be the same value as USE_SWIFTSHADER in device.mk
+BOARD_USES_SWIFTSHADER := false
+
+# Gralloc4
+ifeq ($(BOARD_USES_EXYNOS_GRALLOC_VERSION),4)
+ifeq ($(BOARD_USES_SWIFTSHADER),true)
+TARGET_DISABLE_TRIPLE_BUFFERING := true
+$(call soong_config_set,arm_gralloc,gralloc_arm_no_external_afbc,true)
+$(call soong_config_set,arm_gralloc,mali_gpu_support_afbc_basic,false)
+$(call soong_config_set,arm_gralloc,mali_gpu_support_afbc_wideblk,false)
+$(call soong_config_set,arm_gralloc,gralloc_init_afbc,false)
+$(call soong_config_set,arm_gralloc,dpu_support_1010102_afbc,false)
+else
+$(call soong_config_set,arm_gralloc,gralloc_arm_no_external_afbc,false)
+$(call soong_config_set,arm_gralloc,mali_gpu_support_afbc_basic,true)
+$(call soong_config_set,arm_gralloc,mali_gpu_support_afbc_wideblk,true)
+$(call soong_config_set,arm_gralloc,gralloc_init_afbc,true)
+$(call soong_config_set,arm_gralloc,dpu_support_1010102_afbc,true)
+endif # ifeq ($(BOARD_USES_SWIFTSHADER),true)
+$(call soong_config_set,arm_gralloc,gralloc_ion_sync_on_lock,$(BOARD_USES_GRALLOC_ION_SYNC))
+endif # ifeq ($(BOARD_USES_EXYNOS_GRALLOC_VERSION),4)
+
+# libVendorGraphicbuffer
+ifeq ($(BOARD_USES_EXYNOS_GRALLOC_VERSION),4)
+$(call soong_config_set,vendorgraphicbuffer,gralloc_version,four)
+else
+$(call soong_config_set,vendorgraphicbuffer,gralloc_version,three)
+endif
+
+#display_unit_test
+ifeq ($(USES_DEVICE_GOOGLE_ZUMAPRO),true)
+$(call soong_config_set,display_unit_test,soc,zumapro)
+endif
+
+# Graphics
+#BOARD_USES_EXYNOS_DATASPACE_FEATURE := true
+
+# Enable chain partition for system.
+BOARD_AVB_VBMETA_SYSTEM := system system_dlkm system_ext product
+BOARD_AVB_VBMETA_SYSTEM_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem
+BOARD_AVB_VBMETA_SYSTEM_ALGORITHM := SHA256_RSA2048
+BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
+BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX_LOCATION := 1
+
+# Enable chained vbmeta for boot images
+BOARD_AVB_BOOT_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem
+BOARD_AVB_BOOT_ALGORITHM := SHA256_RSA2048
+BOARD_AVB_BOOT_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
+BOARD_AVB_BOOT_ROLLBACK_INDEX_LOCATION := 2
+
+# Enable chained vbmeta for init_boot images
+BOARD_AVB_INIT_BOOT_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem
+BOARD_AVB_INIT_BOOT_ALGORITHM := SHA256_RSA2048
+BOARD_AVB_INIT_BOOT_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
+BOARD_AVB_INIT_BOOT_ROLLBACK_INDEX_LOCATION := 4
+
+TARGET_USERIMAGES_USE_EXT4 := true
+TARGET_USERIMAGES_USE_F2FS := true
+BOARD_USERDATAIMAGE_PARTITION_SIZE := 11796480000
+BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE := f2fs
+PRODUCT_FS_COMPRESSION := 1
+BOARD_FLASH_BLOCK_SIZE := 4096
+BOARD_MOUNT_SDCARD_RW := true
+
+# system.img
+BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE := ext4
+
+# product.img
+BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4
+TARGET_COPY_OUT_PRODUCT := product
+
+# system_ext.img
+BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE := ext4
+TARGET_COPY_OUT_SYSTEM_EXT := system_ext
+
+# persist.img
+BOARD_PERSISTIMAGE_FILE_SYSTEM_TYPE := f2fs
+
+########################
+# Video Codec
+########################
+# 1. Exynos C2
+BOARD_USE_CODEC2_HIDL_1_2 := true
+BOARD_USE_CSC_FILTER := false
+BOARD_USE_DEC_SW_CSC := true
+BOARD_USE_ENC_SW_CSC := true
+BOARD_SUPPORT_MFC_ENC_RGB := true
+BOARD_USE_BLOB_ALLOCATOR := false
+BOARD_SUPPORT_MFC_ENC_BT2020 := true
+BOARD_SUPPORT_FLEXIBLE_P010 := true
+
+########################
+
+BOARD_SUPER_PARTITION_SIZE := 8531214336
+BOARD_SUPER_PARTITION_GROUPS := google_dynamic_partitions
+# Set size to BOARD_SUPER_PARTITION_SIZE - overhead (4MiB) (b/182237294)
+BOARD_GOOGLE_DYNAMIC_PARTITIONS_SIZE := 8527020032
+BOARD_GOOGLE_DYNAMIC_PARTITIONS_PARTITION_LIST := \
+ system \
+ system_dlkm \
+ system_ext \
+ product \
+ vendor \
+ vendor_dlkm
+
+# Set error limit to BOARD_SUPER_PARTITON_SIZE - 500MB
+BOARD_SUPER_PARTITION_ERROR_LIMIT := 8006926336
+
+# Build a separate system_dlkm partition
+BOARD_USES_SYSTEM_DLKMIMAGE := true
+BOARD_SYSTEM_DLKMIMAGE_FILE_SYSTEM_TYPE := ext4
+TARGET_COPY_OUT_SYSTEM_DLKM := system_dlkm
+
+#
+# AUDIO & VOICE
+#
+BOARD_USES_GENERIC_AUDIO := true
+
+$(call soong_config_set,aoc_audio_func,ext_hidl,true)
+
+ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
+$(call soong_config_set,aoc_audio_func,dump_usecase_data,true)
+$(call soong_config_set,aoc_audio_func,hal_socket_control,true)
+$(call soong_config_set,aoc_audio_func,record_tunning_keys,true)
+endif
+
+ifneq (,$(filter aosp_%,$(TARGET_PRODUCT)))
+$(call soong_config_set,aoc_audio_func,aosp_build,true)
+endif
+
+# Primary AudioHAL Configuration
+#BOARD_USE_COMMON_AUDIOHAL := true
+#BOARD_USE_CALLIOPE_AUDIOHAL := false
+#BOARD_USE_AUDIOHAL := true
+
+# Compress Offload Configuration
+#BOARD_USE_OFFLOAD_AUDIO := true
+#BOARD_USE_OFFLOAD_EFFECT := false
+
+# SoundTriggerHAL Configuration
+#BOARD_USE_SOUNDTRIGGER_HAL := false
+
+# Vibrator HAL actuator model configuration
+$(call soong_config_set,haptics,actuator_model,$(ACTUATOR_MODEL))
+$(call soong_config_set,haptics,adaptive_haptics_feature,$(ADAPTIVE_HAPTICS_FEATURE))
+
+# HWComposer
+BOARD_HWC_VERSION := hwc3
+TARGET_RUNNING_WITHOUT_SYNC_FRAMEWORK := false
+BOARD_HDMI_INCAPABLE := true
+TARGET_USES_HWC2 := true
+HWC_SUPPORT_RENDER_INTENT := true
+HWC_SUPPORT_COLOR_TRANSFORM := true
+#BOARD_USES_DISPLAYPORT := true
+# if AFBC is enabled, must set ro.vendor.ddk.set.afbc=1
+BOARD_USES_EXYNOS_AFBC_FEATURE := true
+#BOARD_USES_HDRUI_GLES_CONVERSION := true
+
+BOARD_LIBACRYL_DEFAULT_COMPOSITOR := fimg2d_zumapro
+BOARD_LIBACRYL_G2D_HDR_PLUGIN := libacryl_hdr_plugin
+
+# HWCServices
+BOARD_USES_HWC_SERVICES := true
+
+# WiFiDisplay
+# BOARD_USES_VIRTUAL_DISPLAY := true
+# BOARD_USES_VDS_EXYNOS_HWC := true
+# BOARD_USES_WIFI_DISPLAY:= true
+# BOARD_USES_EGL_SURFACE_FOR_COMPOSITION_MIXED := true
+# BOARD_USES_VDS_YUV420SPM := true
+# BOARD_USES_VDS_OTHERFORMAT := true
+# BOARD_USES_VDS_DEBUG_FLAG := true
+# BOARD_USES_DISABLE_COMPOSITIONTYPE_GLES := true
+# BOARD_USES_SECURE_ENCODER_ONLY := true
+# BOARD_USES_TSMUX := true
+
+# SCALER
+BOARD_USES_DEFAULT_CSC_HW_SCALER := true
+BOARD_DEFAULT_CSC_HW_SCALER := 4
+BOARD_USES_SCALER_M2M1SHOT := true
+
+# Device Tree
+BOARD_USES_DT := true
+BOARD_INCLUDE_DTB_IN_BOOTIMG := true
+BOARD_PREBUILT_DTBIMAGE_DIR := $(TARGET_KERNEL_DIR)
+BOARD_PREBUILT_DTBOIMAGE := $(BOARD_PREBUILT_DTBIMAGE_DIR)/dtbo.img
+
+# PLATFORM LOG
+TARGET_USES_LOGD := true
+
+# LIBHWJPEG
+#TARGET_USES_UNIVERSAL_LIBHWJPEG := true
+#LIBHWJPEG_HWSCALER_ID := 0
+
+#Keymaster
+#BOARD_USES_KEYMASTER_VER1 := true
+
+#FMP
+#BOARD_USES_FMP_DM_CRYPT := true
+#BOARD_USES_FMP_FSCRYPTO := true
+BOARD_USES_METADATA_PARTITION := true
+
+# SKIA
+#BOARD_USES_SKIA_MULTITHREADING := true
+#BOARD_USES_FIMGAPI_V5X := true
+
+# SECCOMP Policy
+BOARD_SECCOMP_POLICY = device/google/zumapro/seccomp_policy
+
+#CURL
+BOARD_USES_CURL := true
+
+# Sensor HAL
+BOARD_USES_EXYNOS_SENSORS_DUMMY := true
+
+# VISION
+# Exynos vision framework (EVF)
+#TARGET_USES_EVF := true
+# HW acceleration
+#TARGET_USES_VPU_KERNEL := true
+#TARGET_USES_SCORE_KERNEL := true
+#TARGET_USES_CL_KERNEL := false
+
+# exynos RIL
+TARGET_EXYNOS_RIL_SOURCE := true
+ENABLE_VENDOR_RIL_SERVICE := true
+
+# GNSS
+# BOARD_USES_EXYNOS_GNSS_DUMMY := true
+
+# Bluetooth defines
+# TODO(b/123695868): Remove the need for this
+BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := \
+ build/make/target/board/mainline_arm64/bluetooth
+
+#VNDK
+BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED := true
+BOARD_VNDK_VERSION := current
+
+# H/W align restriction of MM IPs
+BOARD_EXYNOS_S10B_FORMAT_ALIGN := 64
+
+# NeuralNetworks
+GPU_SOURCE_PRESENT := $(wildcard vendor/arm/mali/valhall)
+GPU_PREBUILD_PRESENT := $(wildcard vendor/google_devices/zumapro/prebuilts/gpu)
+ifneq (,$(strip $(GPU_SOURCE_PRESENT) $(GPU_PREBUILD_PRESENT)))
+ARMNN_COMPUTE_CL_ENABLE := 1
+else
+ARMNN_COMPUTE_CL_ENABLE := 0
+endif
+ARMNN_COMPUTE_NEON_ENABLE := 1
+
+# Boot.img
+BOARD_RAMDISK_USE_LZ4 := true
+#BOARD_KERNEL_BASE := 0x80000000
+#BOARD_KERNEL_PAGESIZE := 2048
+#BOARD_KERNEL_OFFSET := 0x80000
+#BOARD_RAMDISK_OFFSET := 0x4000000
+BOARD_BOOT_HEADER_VERSION := 4
+BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION)
+
+BOARD_INIT_BOOT_HEADER_VERSION := 4
+BOARD_MKBOOTIMG_INIT_ARGS += --header_version $(BOARD_INIT_BOOT_HEADER_VERSION)
+
+# Enable AVB2.0
+BOARD_AVB_ENABLE := true
+BOARD_BOOTIMAGE_PARTITION_SIZE := 0x04000000
+BOARD_INIT_BOOT_IMAGE_PARTITION_SIZE := 0x800000
+BOARD_VENDOR_BOOTIMAGE_PARTITION_SIZE := 0x04000000
+BOARD_DTBOIMG_PARTITION_SIZE := 0x01000000
+
+# Build vendor kernel boot image
+BOARD_VENDOR_KERNEL_BOOTIMAGE_PARTITION_SIZE := 0x04000000
+
+# Vendor ramdisk image for kernel development
+BOARD_BUILD_VENDOR_RAMDISK_IMAGE := true
+
+KERNEL_MODULE_DIR := $(TARGET_KERNEL_DIR)
+KERNEL_MODULES := $(wildcard $(KERNEL_MODULE_DIR)/*.ko)
+
+BOARD_SYSTEM_KERNEL_MODULES_BLOCKLIST_FILE := $(KERNEL_MODULE_DIR)/system_dlkm.modules.blocklist
+BOARD_VENDOR_KERNEL_MODULES_BLOCKLIST_FILE := $(KERNEL_MODULE_DIR)/vendor_dlkm.modules.blocklist
+
+BOARD_VENDOR_KERNEL_RAMDISK_KERNEL_MODULES_LOAD := $(strip $(shell cat $(KERNEL_MODULE_DIR)/vendor_kernel_boot.modules.load))
+ifndef BOARD_VENDOR_KERNEL_RAMDISK_KERNEL_MODULES_LOAD
+$(error vendor_kernel_boot.modules.load not found or empty)
+endif
+BOARD_VENDOR_KERNEL_RAMDISK_KERNEL_MODULES := $(addprefix $(KERNEL_MODULE_DIR)/, $(notdir $(BOARD_VENDOR_KERNEL_RAMDISK_KERNEL_MODULES_LOAD)))
+
+BOARD_VENDOR_KERNEL_MODULES_LOAD := $(strip $(shell cat $(KERNEL_MODULE_DIR)/vendor_dlkm.modules.load))
+ifndef BOARD_VENDOR_KERNEL_MODULES_LOAD
+$(error vendor_dlkm.modules.load not found or empty)
+endif
+BOARD_VENDOR_KERNEL_MODULES := $(addprefix $(KERNEL_MODULE_DIR)/, $(notdir $(BOARD_VENDOR_KERNEL_MODULES_LOAD)))
+
+BOARD_SYSTEM_KERNEL_MODULES_LOAD := $(strip $(shell cat $(KERNEL_MODULE_DIR)/system_dlkm.modules.load))
+ifndef BOARD_SYSTEM_KERNEL_MODULES_LOAD
+$(error system_dlkm.modules.load not found or empty)
+endif
+BOARD_SYSTEM_KERNEL_MODULES := $(addprefix $(KERNEL_MODULE_DIR)/, $(notdir $(BOARD_SYSTEM_KERNEL_MODULES_LOAD)))
+
+# Using BUILD_COPY_HEADERS
+BUILD_BROKEN_USES_BUILD_COPY_HEADERS := true
+
+include device/google/zumapro-sepolicy/zumapro-sepolicy.mk
+
+# Battery options
+BOARD_KERNEL_CMDLINE += at24.write_timeout=100
+
+# Enable larger logbuf
+BOARD_KERNEL_CMDLINE += log_buf_len=1024K
+
+# Protected VM firmware
+BOARD_PVMFWIMAGE_PARTITION_SIZE := 0x00100000
+
+# pick up library for cleaning digital car keys on factory reset
+-include vendor/google_devices/gs-common/proprietary/BoardConfigVendor.mk
diff --git a/CleanSpec.mk b/CleanSpec.mk
new file mode 100644
index 0000000..09e0169
--- /dev/null
+++ b/CleanSpec.mk
@@ -0,0 +1,85 @@
+# Copyright (C) 2012 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.
+#
+
+# If you don't need to do a full clean build but would like to touch
+# a file or delete some intermediate files, add a clean step to the end
+# of the list. These steps will only be run once, if they haven't been
+# run before.
+#
+# E.g.:
+# $(call add-clean-step, touch -c external/sqlite/sqlite3.h)
+# $(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/STATIC_LIBRARIES/libz_intermediates)
+#
+# Always use "touch -c" and "rm -f" or "rm -rf" to gracefully deal with
+# files that are missing or have been moved.
+#
+# Use $(PRODUCT_OUT) to get to the "out/target/product/blah/" directory.
+# Use $(OUT_DIR) to refer to the "out" directory.
+#
+# If you need to re-do something that's already mentioned, just copy
+# the command and add it to the bottom of the list. E.g., if a change
+# that you made last week required touching a file and a change you
+# made today requires touching the same file, just copy the old
+# touch step and add it to the end of the list.
+#
+# ************************************************
+# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
+# ************************************************
+
+# For example:
+#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/AndroidTests_intermediates)
+#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/core_intermediates)
+#$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f)
+#$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*)
+$(call add-clean-step, find $(PRODUCT_OUT) -name "*.apk" | xargs rm)
+
+# ************************************************
+# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
+# ************************************************
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libsurfaceflinger_intermediates)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libui_intermediates)
+$(call add-clean-step, rm -f $(PRODUCT_OUT)/root/default.prop)
+$(call add-clean-step, rm -f $(TARGET_OUT)/build.prop)
+$(call add-clean-step, rm -f $(PRODUCT_OUT)/system/etc/mixer_paths_lb.xml)
+$(call add-clean-step, rm -f $(PRODUCT_OUT)/system/etc/permissions/android.hardware.camera.xml)
+
+$(call add-clean-step, rm -f $(PRODUCT_OUT)/root/*)
+# Power HAL 1.0
+$(call add-clean-step, rm -f $(PRODUCT_OUT)/vendor/init/android.hardware.power@1.0-service.rc)
+$(call add-clean-step, rm -f $(PRODUCT_OUT)/vendor/bin/hw/android.hardware.power@1.0-service)
+# Power HAL HIDL
+$(call add-clean-step, rm -f $(PRODUCT_OUT)/vendor/etc/init/android.hardware.power@1.3-service.pixel-libperfmgr.rc)
+
+# Health storage HAL
+$(call add-clean-step, find $(PRODUCT_OUT) -type f -name "*android.hardware.health.storage@1.0*" -print0 | xargs -0 rm -f)
+
+# Update to USB HAL 1.3
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/bin/hw/android.hardware.usb@1.2-service.slider)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/init/android.hardware.usb@1.2-service.slider.rc)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/vintf/manifest/android.hardware.usb@1.2-service.slider.xml)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/bin/hw/android.hardware.usb@1.3-service.slider)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/init/android.hardware.usb@1.3-service.slider.rc)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/vintf/manifest/android.hardware.usb@1.3-service.slider.xml)
+
+# Power Stats HAL 1.0 to AIDL
+$(call add-clean-step, rm -f $(PRODUCT_OUT)/vendor/bin/hw/android.hardware.power.stats@1.0-service.zumapro)
+$(call add-clean-step, rm -f $(PRODUCT_OUT)/vendor/etc/init/android.hardware.power.stats@1.0-service.zumapro.rc)
+$(call add-clean-step, rm -f $(PRODUCT_OUT)/vendor/etc/vintf/manifest/android.hardware.power.stats@1.0-service.zumapro.xml)
+
+# Health HAL to AIDL
+$(call add-clean-step, find $(PRODUCT_OUT)/system -type f -name "*charger*" -print0 | xargs -0 rm -f)
+$(call add-clean-step, find $(PRODUCT_OUT)/vendor -type f -name "*health@*" -print0 | xargs -0 rm -f)
+$(call add-clean-step, find $(PRODUCT_OUT)/recovery/root -type f -name "*charger*" -print0 | xargs -0 rm -f)
+$(call add-clean-step, find $(PRODUCT_OUT)/recovery/root -type f -name "*health@*" -print0 | xargs -0 rm -f)
diff --git a/NOTICE b/NOTICE
new file mode 100644
index 0000000..316b4eb
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1,190 @@
+
+ Copyright (c) 2014, 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.
+
+ 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.
+
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
diff --git a/aosp_common.mk b/aosp_common.mk
new file mode 100644
index 0000000..9a552e8
--- /dev/null
+++ b/aosp_common.mk
@@ -0,0 +1,51 @@
+#
+# Copyright 2020 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.
+#
+
+#
+# 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 CSI checking
+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)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/telephony_system_ext.mk)
+
+#
+# All components inherited here go to product image
+#
+$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_product.mk)
+
+#
+# All components inherited here go to vendor image
+#
+# TODO(b/136525499): move *_vendor.mk into the vendor makefile later
+$(call inherit-product, $(SRC_TARGET_DIR)/product/handheld_vendor.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/telephony_vendor.mk)
+
+#$(call inherit-product, device/google/zumapro/device.mk)
+#$(call inherit-product-if-exists, vendor/google_devices/zumapro/proprietary/device-vendor.mk)
+
+# TODO: fix
+# PRODUCT_RESTRICT_VENDOR_FILES := all
+
+# b/189477034: Bypass build time check on uses_libs until vendor fixes all their apps
+PRODUCT_BROKEN_VERIFY_USES_LIBRARIES := true
diff --git a/compatibility_matrix.xml b/compatibility_matrix.xml
new file mode 100644
index 0000000..264e854
--- /dev/null
+++ b/compatibility_matrix.xml
@@ -0,0 +1,84 @@
+
+
+
+ android.frameworks.displayservice
+ 1.0
+
+ IDisplayService
+ default
+
+
+
+ android.frameworks.schedulerservice
+ 1.0
+
+ ISchedulingPolicyService
+ default
+
+
+
+ android.frameworks.sensorservice
+ 1.0
+
+ ISensorManager
+ default
+
+
+
+ android.hardware.graphics.composer
+ 2.1
+
+ IComposer
+ vr
+
+
+
+ android.hidl.allocator
+ 1.0
+
+ IAllocator
+ ashmem
+
+
+
+ android.hidl.manager
+ 1.0
+
+ IServiceManager
+ default
+
+
+
+ android.hidl.memory
+ 1.0
+
+ IMapper
+ ashmem
+
+
+
+ android.hidl.token
+ 1.0
+
+ ITokenManager
+ default
+
+
+
+ android.system.wifi.keystore
+ 1.0
+
+ IKeystore
+ default
+
+
+
+ 0.0.0
+
+
diff --git a/component-overrides.xml b/component-overrides.xml
new file mode 100644
index 0000000..9aa38e7
--- /dev/null
+++ b/component-overrides.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/conf/Android.bp b/conf/Android.bp
new file mode 100644
index 0000000..f355e29
--- /dev/null
+++ b/conf/Android.bp
@@ -0,0 +1,84 @@
+/*
+ * Copyright (C) 2021 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.
+ */
+
+// By default this device uses hardware-wrapped keys for storage encryption,
+// which is intended to offer increased security over the traditional method
+// (software keys). However, hardware-wrapped keys aren't compatible with
+// FIPS-140 certification of the encryption hardware, and hence we have to
+// disable the use of them in FIPS mode. This requires having two fstab files:
+// one for the default mode, and one for FIPS mode selectable via
+// androidboot.fstab_suffix on the kernel command line. These fstabs should be
+// identical with the exception of the encryption settings, so to keep them in
+// sync the rules below generate them from a template file.
+
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "device_google_zumapro_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ default_applicable_licenses: ["device_google_zumapro_license"],
+}
+
+genrule {
+ name: "gen_fstab.zumapro-hw-encrypt",
+ srcs: ["fstab.zumapro.in"],
+ out: ["fstab.zumapro"],
+ cmd: "sed -e s/@fileencryption@/fileencryption=:aes-256-hctr2:inlinecrypt_optimized+wrappedkey_v0/" +
+ " -e s/@inlinecrypt@/inlinecrypt/ " +
+ " -e s/@metadata_encryption@/metadata_encryption=:wrappedkey_v0/ $(in) > $(out)",
+}
+
+genrule {
+ name: "gen_fstab.zumapro-sw-encrypt",
+ srcs: ["fstab.zumapro.in"],
+ out: ["fstab.zumapro"],
+ cmd: "sed -e s/@fileencryption@/fileencryption=aes-256-xts:aes-256-hctr2/" +
+ " -e s/@inlinecrypt@// " +
+ " -e s/@metadata_encryption@/metadata_encryption=/ $(in) > $(out)",
+}
+
+genrule {
+ name: "gen_fstab.zumapro-no-encrypt",
+ srcs: ["fstab.zumapro.in"],
+ out: ["fstab.zumapro"],
+ cmd: "sed -e s/@fileencryption@//" +
+ " -e s/@inlinecrypt@// " +
+ " -e s/@metadata_encryption@// $(in) > $(out)",
+}
+
+genrule {
+ name: "gen_fstab.zumapro-fips",
+ srcs: ["fstab.zumapro.in"],
+ out: ["fstab.zumapro-fips"],
+ cmd: "sed -e s/@fileencryption@/fileencryption=aes-256-xts/" +
+ " -e s/@inlinecrypt@/inlinecrypt/ " +
+ " -e s/@metadata_encryption@/metadata_encryption=aes-256-xts/ $(in) > $(out)",
+}
+
+prebuilt_etc {
+ name: "fstab.zumapro",
+ src: ":gen_fstab.zumapro-hw-encrypt",
+ vendor: true,
+ vendor_ramdisk_available: true,
+}
+
+prebuilt_etc {
+ name: "fstab.zumapro-fips",
+ src: ":gen_fstab.zumapro-fips",
+ vendor: true,
+ vendor_ramdisk_available: true,
+}
diff --git a/conf/egl.cfg b/conf/egl.cfg
new file mode 100644
index 0000000..4515dfd
--- /dev/null
+++ b/conf/egl.cfg
@@ -0,0 +1 @@
+0 1 mali
diff --git a/conf/fstab.modem b/conf/fstab.modem
new file mode 100644
index 0000000..a5e5fd4
--- /dev/null
+++ b/conf/fstab.modem
@@ -0,0 +1,4 @@
+# Android fstab file.
+#
+# Create the specific fstab file for modem partition as flexibility
+/dev/block/platform/13200000.ufs/by-name/modem /mnt/vendor/modem_img ext4 ro,defaults,context=u:object_r:modem_img_file:s0,barrier=1 wait,slotselect
diff --git a/conf/fstab.persist b/conf/fstab.persist
new file mode 100644
index 0000000..46437c1
--- /dev/null
+++ b/conf/fstab.persist
@@ -0,0 +1,5 @@
+# Android fstab file.
+#
+# Keep persist in an fstab file, since we need to run fsck on it after abnormal shutdown.
+/dev/block/platform/13200000.ufs/by-name/persist /mnt/vendor/persist f2fs noatime,nosuid,nodev,sync wait,check,formattable
+/dev/block/platform/13200000.ufs/by-name/persist /mnt/vendor/persist ext4 noatime,nosuid,nodev,data=journal,commit=1 wait,check,formattable,metadata_csum
diff --git a/conf/fstab.postinstall b/conf/fstab.postinstall
new file mode 100644
index 0000000..955fba7
--- /dev/null
+++ b/conf/fstab.postinstall
@@ -0,0 +1,4 @@
+# Android fstab file.
+#
+#
+system /postinstall ext4 ro,nosuid,nodev,noexec slotselect_other,logical,avb_keys=/product/etc/security/avb/system_other.avbpubkey
diff --git a/conf/fstab.zumapro.in b/conf/fstab.zumapro.in
new file mode 100644
index 0000000..e749162
--- /dev/null
+++ b/conf/fstab.zumapro.in
@@ -0,0 +1,25 @@
+# Android fstab file.
+#
+# The filesystem that contains the filesystem checker binary (typically /system) cannot
+# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
+#
+#
+system /system ext4 ro wait,slotselect,avb=vbmeta_system,logical,first_stage_mount,readahead_size_kb=128
+# During compliance testing, the previous line would fail (because GSI is ext4), and the next line would be used to mount GSI.
+system /system ext4 ro,barrier=1 wait,slotselect,avb=vbmeta_system,logical,first_stage_mount,readahead_size_kb=128
+system_dlkm /system_dlkm ext4 ro wait,slotselect,avb=vbmeta_system,logical,first_stage_mount,readahead_size_kb=128
+system_ext /system_ext ext4 ro wait,slotselect,avb=vbmeta_system,logical,first_stage_mount,readahead_size_kb=128
+product /product ext4 ro wait,slotselect,avb=vbmeta_system,logical,first_stage_mount,readahead_size_kb=128
+vendor /vendor ext4 ro wait,slotselect,avb=vbmeta_vendor,logical,first_stage_mount,readahead_size_kb=128
+vendor_dlkm /vendor_dlkm ext4 ro wait,slotselect,avb=vbmeta,logical,first_stage_mount
+/dev/block/platform/13200000.ufs/by-name/boot /boot emmc defaults slotselect,avb=boot,first_stage_mount
+/dev/block/platform/13200000.ufs/by-name/init_boot /init_boot emmc defaults slotselect,avb=init_boot,first_stage_mount
+/dev/block/platform/13200000.ufs/by-name/efs /mnt/vendor/efs f2fs noatime,sync wait,check,formattable
+/dev/block/platform/13200000.ufs/by-name/efs_backup /mnt/vendor/efs_backup f2fs noatime,sync wait,check,formattable
+/dev/block/platform/13200000.ufs/by-name/modem_userdata /mnt/vendor/modem_userdata f2fs noatime,sync wait,check,formattable
+/dev/block/platform/13200000.ufs/by-name/misc /misc emmc defaults wait
+/dev/block/platform/13200000.ufs/by-name/metadata /metadata f2fs noatime,nosuid,nodev,sync wait,check,formattable,first_stage_mount
+#/dev/block/platform/13200000.ufs/by-name/pvmfw /pvmfw emmc defaults wait,slotselect,avb=pvmfw,first_stage_mount
+/dev/block/platform/13200000.ufs/by-name/userdata /data f2fs noatime,nosuid,nodev,discard,reserve_root=32768,resgid=1065,fsync_mode=nobarrier,compress_extension=apk,compress_extension=apex,compress_extension=so,compress_extension=vdex,compress_extension=odex,@inlinecrypt@,atgc,checkpoint_merge,compress_cache latemount,wait,check,quota,formattable,sysfs_path=/dev/sys/block/bootdevice,checkpoint=fs,reservedsize=128M,fscompress,readahead_size_kb=128,@fileencryption@,@metadata_encryption@,keydirectory=/metadata/vold/metadata_encryption,zoned_device
+/dev/block/platform/13200000.ufs/by-name/vbmeta /vbmeta emmc defaults slotselect,first_stage_mount
+/devices/platform/11210000.usb* auto vfat defaults voldmanaged=usb:auto
diff --git a/conf/init.debug.rc b/conf/init.debug.rc
new file mode 100644
index 0000000..0fed4ff
--- /dev/null
+++ b/conf/init.debug.rc
@@ -0,0 +1,55 @@
+on early-init
+ mount debugfs /sys/kernel/debug /sys/kernel/debug
+
+# SJTAG
+on init
+ chown system system /sys/devices/platform/sjtag_ap/interface/access_lvl
+ chown system system /sys/devices/platform/sjtag_ap/interface/auth
+ chown system system /sys/devices/platform/sjtag_ap/interface/begin
+ chown system system /sys/devices/platform/sjtag_ap/interface/dbg_domain
+ chown system system /sys/devices/platform/sjtag_ap/interface/dbg_itvl
+ chown system system /sys/devices/platform/sjtag_ap/interface/end
+ chown system system /sys/devices/platform/sjtag_ap/interface/pubkey
+ chown system system /sys/devices/platform/sjtag_gsa/interface/access_lvl
+ chown system system /sys/devices/platform/sjtag_gsa/interface/auth
+ chown system system /sys/devices/platform/sjtag_gsa/interface/begin
+ chown system system /sys/devices/platform/sjtag_gsa/interface/dbg_domain
+ chown system system /sys/devices/platform/sjtag_gsa/interface/dbg_itvl
+ chown system system /sys/devices/platform/sjtag_gsa/interface/end
+ chown system system /sys/devices/platform/sjtag_gsa/interface/pubkey
+
+on property:vendor.debug.ramdump.force_crash=true
+ write /sys/kernel/pixel_debug/trigger "null"
+
+on property:power.battery_input.suspended=true
+ write /sys/kernel/debug/google_charger/input_suspend 1
+
+on property:power.battery_input.suspended=false
+ write /sys/kernel/debug/google_charger/input_suspend 0
+
+# Bluetooth
+on post-fs-data
+ chown bluetooth system /dev/logbuffer_btlpm
+ chown bluetooth system /dev/logbuffer_tty18
+
+# pKVM performance is different on A0 and B0 chips.
+# Add extra tag to metrics collected on A0 to separate the results.
+on property:ro.revision=PROTO1.0
+ setprop debug.hypervisor.metrics_tag "hwrev_a0"
+on property:ro.revision=PROTO1.1
+ setprop debug.hypervisor.metrics_tag "hwrev_a0"
+on property:ro.revision=EVT1.0
+ setprop debug.hypervisor.metrics_tag "hwrev_a0"
+
+# A0 chips require pKVM for a hardware issue workaround. Set pKVM to 'enabled'
+# in /misc partition on first boot to signal to tests that this device should
+# not be booted with pKVM disabled.
+service vendor.force_pkvm /vendor/bin/misc_writer --set-enable-pkvm
+ disabled
+ oneshot
+on property:persist.sys.device_provisioned=1 && property:ro.revision=PROTO1.0
+ start vendor.force_pkvm
+on property:persist.sys.device_provisioned=1 && property:ro.revision=PROTO1.1
+ start vendor.force_pkvm
+on property:persist.sys.device_provisioned=1 && property:ro.revision=EVT1.0
+ start vendor.force_pkvm
diff --git a/conf/init.exynos.nanohub.rc b/conf/init.exynos.nanohub.rc
new file mode 100644
index 0000000..9a58229
--- /dev/null
+++ b/conf/init.exynos.nanohub.rc
@@ -0,0 +1,20 @@
+on post-fs
+## ensure correct calibration file permissions
+ chown root system /mnt/vendor/persist/sensorcal.json
+ chmod 0640 /mnt/vendor/persist/sensorcal.json
+ start vendor.flash-nanohub-fw
+
+on post-fs-data
+ mkdir /data/vendor/sensor
+ chown root system /data/vendor/sensor
+ chmod 0770 /data/vendor/sensor
+
+service vendor.flash-nanohub-fw /vendor/bin/nanoapp_cmd download
+ oneshot
+ disabled
+ user root
+ group system
+
+on post-fs-data
+ mkdir /data/system/nanohub_lock/
+ restorecon /data/system/nanohub_lock
diff --git a/conf/init.factory.rc b/conf/init.factory.rc
new file mode 100644
index 0000000..ed294fd
--- /dev/null
+++ b/conf/init.factory.rc
@@ -0,0 +1,19 @@
+# Factory specific init.rc
+
+on early-init
+ mount debugfs /sys/kernel/debug /sys/kernel/debug
+
+on init
+ export PATH /product/bin:/apex/com.android.runtime/bin:/apex/com.android.art/bin:/system_ext/bin:/system/bin:/system/xbin:/odm/bin:/vendor/bin:/vendor/xbin:/vendor/bin/factory
+
+on boot
+ # FTM log folder
+ mkdir /data/ftmlog 0775 system system
+
+ # Audio test folder
+ mkdir /data/AudioTest 0775 system system
+
+on property:sys.boot_completed=1
+ # Bump nnapi min clamp & add adbd to it for factory (b/222226268)
+ write /proc/vendor_sched/nnapi_uclamp_min 512
+ exec - root root -- /vendor/bin/factory/factory_post_boot
diff --git a/conf/init.freq.userdebug.rc b/conf/init.freq.userdebug.rc
new file mode 100644
index 0000000..0eb79be
--- /dev/null
+++ b/conf/init.freq.userdebug.rc
@@ -0,0 +1,69 @@
+# Non Persistent Soft Max Freq
+on property:vendor.softmaxfreq.cl0=*
+ write /sys/devices/platform/exynos-acme/freq_qos_max "0 ${vendor.softmaxfreq.cl0}"
+
+on property:vendor.softmaxfreq.cl1=*
+ write /sys/devices/platform/exynos-acme/freq_qos_max "4 ${vendor.softmaxfreq.cl1}"
+
+on property:vendor.softmaxfreq.cl2=*
+ write /sys/devices/platform/exynos-acme/freq_qos_max "8 ${vendor.softmaxfreq.cl2}"
+
+on property:vendor.softmaxfreq.bci=*
+ write /sys/devices/platform/170000a0.devfreq_bci/devfreq/170000a0.devfreq_bci/exynos_data/soft_max_freq "${vendor.softmaxfreq.bci}"
+
+on property:vendor.softmaxfreq.dsu=*
+ write /sys/devices/platform/17000090.devfreq_dsu/devfreq/17000090.devfreq_dsu/exynos_data/soft_max_freq "${vendor.softmaxfreq.dsu}"
+
+on property:vendor.softmaxfreq.mif=*
+ write /sys/devices/platform/17000010.devfreq_mif/devfreq/17000010.devfreq_mif/exynos_data/soft_max_freq "${vendor.softmaxfreq.mif}"
+
+# Persistent Soft Max Freq overrides
+on property:persist.vendor.softmaxfreq.cl0=*
+ setprop vendor.softmaxfreq.cl0 "${persist.vendor.softmaxfreq.cl0}"
+
+on property:persist.vendor.softmaxfreq.cl1=*
+ setprop vendor.softmaxfreq.cl1 "${persist.vendor.softmaxfreq.cl1}"
+
+on property:persist.vendor.softmaxfreq.cl2=*
+ setprop vendor.softmaxfreq.cl2 "${persist.vendor.softmaxfreq.cl2}"
+
+on property:persist.vendor.softmaxfreq.bci=*
+ setprop vendor.softmaxfreq.bci "${persist.vendor.softmaxfreq.bci}"
+
+on property:persist.vendor.softmaxfreq.dsu=*
+ setprop vendor.softmaxfreq.dsu "${persist.vendor.softmaxfreq.dsu}"
+
+on property:persist.vendor.softmaxfreq.mif=*
+ setprop vendor.softmaxfreq.mif "${persist.vendor.softmaxfreq.mif}"
+
+on property:vendor.softmaxfreq.all=*
+ setprop vendor.softmaxfreq.cl0 "9999999"
+ setprop vendor.softmaxfreq.cl1 "9999999"
+ setprop vendor.softmaxfreq.cl2 "9999999"
+ setprop vendor.softmaxfreq.bci "9999999"
+ setprop vendor.softmaxfreq.dsu "9999999"
+ setprop vendor.softmaxfreq.mif "9999999"
+
+on property:vendor.lockfreq.max=*
+ write /sys/devices/platform/exynos-acme/freq_qos_min "0 9999999"
+ write /sys/devices/platform/exynos-acme/freq_qos_max "0 9999999"
+ write /sys/devices/platform/exynos-acme/freq_qos_min "0 9999999"
+ write /sys/devices/platform/exynos-acme/freq_qos_min "4 9999999"
+ write /sys/devices/platform/exynos-acme/freq_qos_max "4 9999999"
+ write /sys/devices/platform/exynos-acme/freq_qos_min "4 9999999"
+ write /sys/devices/platform/exynos-acme/freq_qos_min "8 9999999"
+ write /sys/devices/platform/exynos-acme/freq_qos_max "8 9999999"
+ write /sys/devices/platform/exynos-acme/freq_qos_min "8 9999999"
+ write /sys/devices/platform/170000a0.devfreq_bci/devfreq/170000a0.devfreq_bci/exynos_data/soft_max_freq "9999999"
+ write /sys/devices/platform/170000a0.devfreq_bci/devfreq/170000a0.devfreq_bci/exynos_data/debug_scaling_devfreq_min "9999999"
+ write /sys/devices/platform/170000a0.devfreq_bci/devfreq/170000a0.devfreq_bci/exynos_data/debug_scaling_devfreq_max "9999999"
+ write /sys/devices/platform/170000a0.devfreq_bci/devfreq/170000a0.devfreq_bci/exynos_data/debug_scaling_devfreq_min "9999999"
+ write /sys/devices/platform/17000090.devfreq_dsu/devfreq/17000090.devfreq_dsu/exynos_data/soft_max_freq "9999999"
+ write /sys/devices/platform/17000090.devfreq_dsu/devfreq/17000090.devfreq_dsu/exynos_data/debug_scaling_devfreq_min "9999999"
+ write /sys/devices/platform/17000090.devfreq_dsu/devfreq/17000090.devfreq_dsu/exynos_data/debug_scaling_devfreq_max "9999999"
+ write /sys/devices/platform/17000090.devfreq_dsu/devfreq/17000090.devfreq_dsu/exynos_data/debug_scaling_devfreq_min "9999999"
+ write /sys/devices/platform/17000010.devfreq_mif/devfreq/17000010.devfreq_mif/exynos_data/soft_max_freq "9999999"
+ write /sys/devices/platform/17000010.devfreq_mif/devfreq/17000010.devfreq_mif/exynos_data/debug_scaling_devfreq_min "9999999"
+ write /sys/devices/platform/17000010.devfreq_mif/devfreq/17000010.devfreq_mif/exynos_data/debug_scaling_devfreq_max "9999999"
+ write /sys/devices/platform/17000010.devfreq_mif/devfreq/17000010.devfreq_mif/exynos_data/debug_scaling_devfreq_min "9999999"
+
diff --git a/conf/init.recovery.device.rc b/conf/init.recovery.device.rc
new file mode 100644
index 0000000..592efbd
--- /dev/null
+++ b/conf/init.recovery.device.rc
@@ -0,0 +1,16 @@
+on init
+ wait /sys/devices/platform/11210000.usb/11210000.dwc3/driver 10
+ setprop sys.usb.controller "11210000.dwc3"
+ setprop sys.usb.configfs 1
+
+on init && property:ro.debuggable=1 && property:ro.boot.mode=recovery
+ start recovery-console
+
+service recovery-console /system/bin/sh
+ class core
+ console
+ disabled
+ user root
+ group root shell log readproc
+ seclabel u:r:su:s0
+ setenv HOSTNAME console
diff --git a/conf/init.zumapro.rc b/conf/init.zumapro.rc
new file mode 100644
index 0000000..97f35d9
--- /dev/null
+++ b/conf/init.zumapro.rc
@@ -0,0 +1,1065 @@
+import /vendor/etc/init/hw/init.zumapro.usb.rc
+import android.hardware.drm@1.2-service.widevine.rc
+import init.exynos.sensorhub.rc
+
+on early-init
+ mount_all /vendor/etc/fstab.persist --early
+
+on init
+ # CPU0 cannot be offline
+ chmod 0444 /sys/devices/system/cpu/cpu0/online
+
+ # Set teo as cpu idle governor
+ write /sys/devices/system/cpu/cpuidle/current_governor teo
+
+ # Boot time fs tuning
+ write /sys/block/sda/queue/iostats 0
+ write /sys/block/sda/queue/scheduler bfq
+ write /sys/block/sda/queue/iosched/slice_idle 0
+ write /sys/block/sda/queue/nr_requests 256
+ write /dev/sys/fs/by-name/userdata/data_io_flag 56
+ write /dev/sys/fs/by-name/userdata/node_io_flag 56
+
+ chown system system /proc/vendor_sched/set_task_group_bg
+ chown system system /proc/vendor_sched/set_task_group_cam
+ chown system system /proc/vendor_sched/set_task_group_fg
+ chown system system /proc/vendor_sched/set_task_group_nnapi
+ chown system system /proc/vendor_sched/set_task_group_sys
+ chown system system /proc/vendor_sched/set_task_group_sysbg
+ chown system system /proc/vendor_sched/set_task_group_ta
+ chown system system /proc/vendor_sched/set_task_group_rt
+ chown system system /proc/vendor_sched/set_task_group_sf
+ chown system system /proc/vendor_sched/set_task_group_dex2oat
+ chown system system /proc/vendor_sched/set_task_group_cam_power
+ chown system system /proc/vendor_sched/set_task_group_ota
+ chown system system /proc/vendor_sched/set_proc_group_bg
+ chown system system /proc/vendor_sched/set_proc_group_cam
+ chown system system /proc/vendor_sched/set_proc_group_fg
+ chown system system /proc/vendor_sched/set_proc_group_nnapi
+ chown system system /proc/vendor_sched/set_proc_group_sys
+ chown system system /proc/vendor_sched/set_proc_group_sysbg
+ chown system system /proc/vendor_sched/set_proc_group_ta
+ chown system system /proc/vendor_sched/set_proc_group_rt
+ chown system system /proc/vendor_sched/set_proc_group_sf
+ chown system system /proc/vendor_sched/set_proc_group_dex2oat
+ chown system system /proc/vendor_sched/set_proc_group_cam_power
+ chown system system /proc/vendor_sched/set_proc_group_ota
+ chown system system /proc/vendor_sched/prefer_idle_set
+ chown system system /proc/vendor_sched/prefer_idle_clear
+ chown system system /proc/vendor_sched/pmu_poll_enable
+ chown system system /proc/vendor_sched/pmu_poll_time
+ chown system system /sys/devices/system/cpu/cpufreq/policy0/sched_pixel/lcpi_threshold
+ chown system system /sys/devices/system/cpu/cpufreq/policy0/sched_pixel/spc_threshold
+ chown system system /sys/devices/system/cpu/cpufreq/policy0/sched_pixel/limit_frequency
+ chown system system /sys/devices/system/cpu/cpufreq/policy0/sched_pixel/pmu_limit_enable
+ chown system system /sys/devices/system/cpu/cpufreq/policy4/sched_pixel/lcpi_threshold
+ chown system system /sys/devices/system/cpu/cpufreq/policy4/sched_pixel/spc_threshold
+ chown system system /sys/devices/system/cpu/cpufreq/policy4/sched_pixel/limit_frequency
+ chown system system /sys/devices/system/cpu/cpufreq/policy4/sched_pixel/pmu_limit_enable
+ chown system system /sys/devices/system/cpu/cpufreq/policy8/sched_pixel/lcpi_threshold
+ chown system system /sys/devices/system/cpu/cpufreq/policy8/sched_pixel/spc_threshold
+ chown system system /sys/devices/system/cpu/cpufreq/policy8/sched_pixel/limit_frequency
+ chown system system /sys/devices/system/cpu/cpufreq/policy8/sched_pixel/pmu_limit_enable
+
+ chown system system /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu0_memlat@17000010/memlat_cpuidle_state_aware
+ chown system system /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu1_memlat@17000010/memlat_cpuidle_state_aware
+ chown system system /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu2_memlat@17000010/memlat_cpuidle_state_aware
+ chown system system /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu3_memlat@17000010/memlat_cpuidle_state_aware
+ chown system system /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu4_memlat@17000010/memlat_cpuidle_state_aware
+ chown system system /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu5_memlat@17000010/memlat_cpuidle_state_aware
+ chown system system /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu6_memlat@17000010/memlat_cpuidle_state_aware
+ chown system system /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu7_memlat@17000010/memlat_cpuidle_state_aware
+ chown system system /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu8_memlat@17000010/memlat_cpuidle_state_aware
+
+ chmod 0220 /proc/vendor_sched/set_task_group_bg
+ chmod 0220 /proc/vendor_sched/set_task_group_cam
+ chmod 0220 /proc/vendor_sched/set_task_group_fg
+ chmod 0220 /proc/vendor_sched/set_task_group_nnapi
+ chmod 0220 /proc/vendor_sched/set_task_group_sys
+ chmod 0220 /proc/vendor_sched/set_task_group_sysbg
+ chmod 0220 /proc/vendor_sched/set_task_group_ta
+ chmod 0220 /proc/vendor_sched/set_task_group_rt
+ chmod 0220 /proc/vendor_sched/set_task_group_sf
+ chmod 0220 /proc/vendor_sched/set_task_group_dex2oat
+ chmod 0220 /proc/vendor_sched/set_task_group_cam_power
+ chmod 0220 /proc/vendor_sched/set_task_group_ota
+ chmod 0220 /proc/vendor_sched/set_proc_group_bg
+ chmod 0220 /proc/vendor_sched/set_proc_group_cam
+ chmod 0220 /proc/vendor_sched/set_proc_group_fg
+ chmod 0220 /proc/vendor_sched/set_proc_group_nnapi
+ chmod 0220 /proc/vendor_sched/set_proc_group_sys
+ chmod 0220 /proc/vendor_sched/set_proc_group_sysbg
+ chmod 0220 /proc/vendor_sched/set_proc_group_ta
+ chmod 0220 /proc/vendor_sched/set_proc_group_rt
+ chmod 0220 /proc/vendor_sched/set_proc_group_sf
+ chmod 0220 /proc/vendor_sched/set_proc_group_dex2oat
+ chmod 0220 /proc/vendor_sched/set_proc_group_cam_power
+ chmod 0220 /proc/vendor_sched/set_proc_group_ota
+ chmod 0220 /proc/vendor_sched/prefer_idle_set
+ chmod 0220 /proc/vendor_sched/prefer_idle_clear
+ chmod 0220 /proc/vendor_sched/pmu_poll_enable
+ chmod 0220 /proc/vendor_sched/pmu_poll_time
+
+ wait /dev/block/platform/${ro.boot.boot_devices}
+ symlink /dev/block/platform/${ro.boot.boot_devices} /dev/block/bootdevice
+
+ # to access UFS/eMMC sysfs directly
+ symlink /sys/devices/platform/${ro.boot.boot_devices} /dev/sys/block/bootdevice
+
+ # Disable UFS powersaving
+ write /dev/sys/block/bootdevice/clkgate_enable 0
+
+ start vendor.keymaster-4-0
+
+ # ZRAM setup
+ write /sys/block/zram0/comp_algorithm lz77eh
+ write /proc/sys/vm/page-cluster 0
+
+ # Some user code relies on ro.boot.hardware.revision
+ setprop ro.boot.hardware.revision ${ro.revision}
+
+ # Allow PAI targeting per hardware SKU
+ setprop ro.oem.key1 ${ro.boot.hardware.sku}
+
+ # Property used by vintf for sku specific manifests
+ # Property used by NFC for sku specific configurations
+ setprop ro.boot.product.hardware.sku ${ro.boot.hardware.sku}
+
+ # Support legacy paths
+ symlink /data/app /factory
+
+ # Apply network parameters for high data performance.
+ write /proc/sys/net/core/rmem_default 327680
+ write /proc/sys/net/core/rmem_max 8388608
+ write /proc/sys/net/core/wmem_default 327680
+ write /proc/sys/net/core/wmem_max 8388608
+ write /proc/sys/net/core/optmem_max 20480
+ write /proc/sys/net/core/netdev_max_backlog 10000
+ write /proc/sys/net/ipv4/tcp_rmem "2097152 4194304 8388608"
+ write /proc/sys/net/ipv4/tcp_wmem "262144 524288 8388608"
+ write /proc/sys/net/ipv4/tcp_mem "44259 59012 88518"
+ write /proc/sys/net/ipv4/udp_mem "88518 118025 177036"
+
+ write /sys/class/net/rmnet0/queues/rx-0/rps_cpus fe
+ write /sys/class/net/rmnet1/queues/rx-0/rps_cpus fe
+ write /sys/class/net/rmnet2/queues/rx-0/rps_cpus fe
+ write /sys/class/net/rmnet3/queues/rx-0/rps_cpus fe
+ write /sys/class/net/rmnet4/queues/rx-0/rps_cpus fe
+ write /sys/class/net/rmnet5/queues/rx-0/rps_cpus fe
+ write /sys/class/net/rmnet6/queues/rx-0/rps_cpus fe
+ write /sys/class/net/rmnet7/queues/rx-0/rps_cpus fe
+
+ # Create UDS structure for base VR services.
+ mkdir /dev/socket/pdx 0775 system system
+ mkdir /dev/socket/pdx/system 0775 system system
+ mkdir /dev/socket/pdx/system/buffer_hub 0775 system system
+ mkdir /dev/socket/pdx/system/performance 0775 system system
+ mkdir /dev/socket/pdx/system/vr 0775 system system
+ mkdir /dev/socket/pdx/system/vr/display 0775 system system
+ mkdir /dev/socket/pdx/system/vr/pose 0775 system system
+ mkdir /dev/socket/pdx/system/vr/sensors 0775 system system
+
+ # Boot time 183626384
+ write /proc/vendor_sched/ta_uclamp_min 1024
+ write /proc/vendor_sched/ta_prefer_idle 1
+ write /proc/vendor_sched/fg_uclamp_min 1024
+ write /proc/vendor_sched/fg_prefer_idle 1
+ write /proc/vendor_sched/sys_uclamp_min 1024
+ write /proc/vendor_sched/sys_prefer_idle 1
+
+ # governor setting
+ write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor sched_pixel
+ write /sys/devices/system/cpu/cpu0/cpufreq/sched_pixel/up_rate_limit_us 500
+ write /sys/devices/system/cpu/cpu0/cpufreq/sched_pixel/down_rate_limit_us 5000
+ write /sys/devices/system/cpu/cpu0/cpufreq/sched_pixel/down_rate_limit_scale_pow 2
+ write /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor sched_pixel
+ write /sys/devices/system/cpu/cpu4/cpufreq/sched_pixel/up_rate_limit_us 500
+ write /sys/devices/system/cpu/cpu4/cpufreq/sched_pixel/down_rate_limit_us 20000
+ write /sys/devices/system/cpu/cpu8/cpufreq/scaling_governor sched_pixel
+ write /sys/devices/system/cpu/cpu8/cpufreq/sched_pixel/up_rate_limit_us 500
+ write /sys/devices/system/cpu/cpu8/cpufreq/sched_pixel/down_rate_limit_us 20000
+
+
+ # memlat cpuidle awareness setting
+ write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu0_memlat@17000010/memlat_cpuidle_state_aware 2
+ write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu1_memlat@17000010/memlat_cpuidle_state_aware 2
+ write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu2_memlat@17000010/memlat_cpuidle_state_aware 2
+ write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu3_memlat@17000010/memlat_cpuidle_state_aware 2
+ write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu4_memlat@17000010/memlat_cpuidle_state_aware 2
+ write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu5_memlat@17000010/memlat_cpuidle_state_aware 2
+ write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu6_memlat@17000010/memlat_cpuidle_state_aware 2
+ write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu7_memlat@17000010/memlat_cpuidle_state_aware 2
+ write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu8_memlat@17000010/memlat_cpuidle_state_aware 2
+
+ # RT uclamp setting
+ write /proc/sys/kernel/sched_util_clamp_min_rt_default 0
+
+ # change permissions and default values for camera-daemon cpu controller
+ chown system system /dev/cpuctl/camera-daemon/cpu.uclamp.min
+ chown system system /dev/cpuctl/camera-daemon/cpu.uclamp.max
+ chown root root /dev/cpuctl/camera-daemon/cpu.uclamp.latency_sensitive
+ chown system system /dev/cpuctl/camera-daemon/cgroup.procs
+
+ mkdir /dev/cpuset/camera-daemon-high-group
+ write /dev/cpuset/camera-daemon-high-group/cpus 0-8
+ write /dev/cpuset/camera-daemon-high-group/mems 0
+ chown system system /dev/cpuset/camera-daemon-high-group/tasks
+ chmod 0664 /dev/cpuset/camera-daemon-high-group/tasks
+
+ mkdir /dev/cpuset/camera-daemon-mid-group
+ write /dev/cpuset/camera-daemon-mid-group/cpus 0-8
+ write /dev/cpuset/camera-daemon-mid-group/mems 0
+ chown system system /dev/cpuset/camera-daemon-mid-group/tasks
+ chmod 0664 /dev/cpuset/camera-daemon-mid-group/tasks
+
+ mkdir /dev/cpuset/camera-daemon-mid-high-group
+ write /dev/cpuset/camera-daemon-mid-high-group/cpus 0-8
+ write /dev/cpuset/camera-daemon-mid-high-group/mems 0
+ chown system system /dev/cpuset/camera-daemon-mid-high-group/tasks
+ chmod 0664 /dev/cpuset/camera-daemon-mid-high-group/tasks
+
+ write /proc/vendor_sched/cam_prefer_idle 1
+ write /proc/vendor_sched/cam_uclamp_min 1
+
+ chown system system /dev/cpuset/cgroup.procs
+
+ # nanohub sensor
+ chmod 0664 /dev/nanohub
+ chmod 0664 /dev/nanohub_comms
+ chown system system /dev/nanohub
+ chown system system /dev/nanohub_comms
+
+ # Dump maxfg
+ chown system system /sys/class/power_supply/maxfg/m5_model_state
+ chown system system /sys/class/power_supply/maxfg_base/m5_model_state
+
+ # pca9468 : slider+77729: 6-0057; slider+MW A1: 5-0057
+ chown system system /d/regmap/5-0057-pca9468-mains/registers
+ chown system system /d/regmap/6-0057-pca9468-mains/registers
+
+ # Dump eeprom
+ chown system system /sys/devices/platform/10970000.hsi2c/i2c-5/5-0050/eeprom
+ chown system system /sys/devices/platform/10970000.hsi2c/i2c-4/4-0050/eeprom
+ chown system system /sys/devices/platform/10da0000.hsi2c/i2c-6/6-0050/eeprom
+ chown system system /sys/devices/platform/10c90000.hsi2c/i2c-7/7-0050/eeprom
+ chown system system /dev/battery_history
+ chmod 0644 /dev/battery_history
+
+ # Loading common kernel modules in background
+ start init_display
+
+ # Charge stats (write 0)
+ chown system system /sys/class/power_supply/battery/charge_stats
+
+ # Pca Charge stats (write 0)
+ chown system system /sys/class/power_supply/pca9468-mains/device/chg_stats
+
+ # Wireless Charge stats (write 0)
+ chown system system /sys/class/power_supply/wireless/device/charge_stats
+
+ # Permission for wireless charging
+ chown system system /sys/class/power_supply/wireless/capacity
+ chown system system /sys/class/power_supply/wireless/device/rtx
+ chown system system /sys/class/power_supply/wireless/device/rxdata
+ chown system system /sys/class/power_supply/wireless/device/txdata
+ chown system system /sys/class/power_supply/wireless/device/rxlen
+ chown system system /sys/class/power_supply/wireless/device/txlen
+ chown system system /sys/class/power_supply/wireless/device/ccreset
+ chown system system /sys/class/power_supply/wireless/device/status
+ chown system system /sys/class/power_supply/wireless/device/version
+ chown system system /sys/class/power_supply/wireless/device/features
+ chown system system /sys/class/power_supply/wireless/device/authtype
+
+ # Adaptive charge
+ chown system system /sys/class/power_supply/battery/charge_deadline
+
+ # Charging policy
+ chown system system /sys/class/power_supply/battery/charging_policy
+
+ # Battery Defender
+ chown system system /sys/devices/platform/google,battery/power_supply/battery/bd_trickle_cnt
+ chown system system /sys/devices/platform/google,battery/power_supply/battery/bd_trickle_dry_run
+ chown system system /sys/devices/platform/google,battery/power_supply/battery/bd_trickle_enable
+ chown system system /sys/devices/platform/google,battery/power_supply/battery/bd_trickle_recharge_soc
+ chown system system /sys/devices/platform/google,battery/power_supply/battery/bd_trickle_reset_sec
+ chown system system /sys/devices/platform/google,battery/power_supply/battery/bd_clear
+ chown system system /sys/devices/platform/google,battery/power_supply/battery/health_safety_margin
+ chown system system /sys/devices/platform/google,charger/bd_drainto_soc
+ chown system system /sys/devices/platform/google,charger/bd_recharge_soc
+ chown system system /sys/devices/platform/google,charger/bd_recharge_voltage
+ chown system system /sys/devices/platform/google,charger/bd_resume_abs_temp
+ chown system system /sys/devices/platform/google,charger/bd_resume_soc
+ chown system system /sys/devices/platform/google,charger/bd_resume_temp
+ chown system system /sys/devices/platform/google,charger/bd_resume_time
+ chown system system /sys/devices/platform/google,charger/bd_temp_dry_run
+ chown system system /sys/devices/platform/google,charger/bd_temp_enable
+ chown system system /sys/devices/platform/google,charger/bd_trigger_temp
+ chown system system /sys/devices/platform/google,charger/bd_trigger_time
+ chown system system /sys/devices/platform/google,charger/bd_trigger_voltage
+ chown system system /sys/devices/platform/google,charger/bd_clear
+ chown system system /sys/devices/platform/google,charger/charge_start_level
+ chown system system /sys/devices/platform/google,charger/charge_stop_level
+ chown system system /sys/devices/platform/google,cpm/dc_ctl
+
+ # Power Stats HAL
+ chown system system /dev/bbd_pwrstat
+
+ # Add a boost for NNAPI HAL
+ write /proc/vendor_sched/nnapi_prefer_idle 0
+ write /proc/vendor_sched/nnapi_uclamp_min 512
+
+ # Add memlat governor settings
+ write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu0_memlat@17000010/polling_interval 10
+ write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu1_memlat@17000010/polling_interval 10
+ write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu2_memlat@17000010/polling_interval 10
+ write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu3_memlat@17000010/polling_interval 10
+ write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu4_memlat@17000010/polling_interval 10
+ write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu5_memlat@17000010/polling_interval 10
+ write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu6_memlat@17000010/polling_interval 10
+ write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu7_memlat@17000010/polling_interval 10
+ write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu8_memlat@17000010/polling_interval 10
+ write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu0_memlat@17000010/mem_latency/ratio_ceil 1800
+ write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu1_memlat@17000010/mem_latency/ratio_ceil 1800
+ write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu2_memlat@17000010/mem_latency/ratio_ceil 1800
+ write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu3_memlat@17000010/mem_latency/ratio_ceil 1800
+ write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu4_memlat@17000010/mem_latency/ratio_ceil 3700
+ write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu5_memlat@17000010/mem_latency/ratio_ceil 3700
+ write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu6_memlat@17000010/mem_latency/ratio_ceil 3700
+ write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu7_memlat@17000010/mem_latency/ratio_ceil 3700
+ write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu8_memlat@17000010/mem_latency/ratio_ceil 3400
+ write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu0_memlat@17000010/mem_latency/stall_floor 3000
+ write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu1_memlat@17000010/mem_latency/stall_floor 3000
+ write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu2_memlat@17000010/mem_latency/stall_floor 3000
+ write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu3_memlat@17000010/mem_latency/stall_floor 3000
+ write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu4_memlat@17000010/mem_latency/stall_floor 2400
+ write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu5_memlat@17000010/mem_latency/stall_floor 2400
+ write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu6_memlat@17000010/mem_latency/stall_floor 2400
+ write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu7_memlat@17000010/mem_latency/stall_floor 2400
+ write /sys/class/devfreq/gs_memlat_devfreq:devfreq_mif_cpu8_memlat@17000010/mem_latency/stall_floor 800
+
+ # Add dsulat governor settings
+ write /sys/class/devfreq/gs_dsulat_devfreq:devfreq_dsu_lat@17000090/dsu_latency/ratio_ceil_cl0 700
+ write /sys/class/devfreq/gs_dsulat_devfreq:devfreq_dsu_lat@17000090/dsu_latency/ratio_ceil_cl1 1000
+ write /sys/class/devfreq/gs_dsulat_devfreq:devfreq_dsu_lat@17000090/dsu_latency/ratio_ceil_cl2 3000
+
+ # Add dsulat governor settings
+ write /sys/class/devfreq/gs_dsulat_devfreq:devfreq_dsu_lat@17000090/dsu_latency/ratio_ceil_cl0 700
+ write /sys/class/devfreq/gs_dsulat_devfreq:devfreq_dsu_lat@17000090/dsu_latency/ratio_ceil_cl1 1000
+ write /sys/class/devfreq/gs_dsulat_devfreq:devfreq_dsu_lat@17000090/dsu_latency/ratio_ceil_cl2 3000
+
+ # Give pixelstats group access to PCIe link statistics counters
+ chown system system /sys/devices/platform/12100000.pcie/link_stats/complete_timeout_irqs
+ chown system system /sys/devices/platform/12100000.pcie/link_stats/link_down_irqs
+ chown system system /sys/devices/platform/12100000.pcie/link_stats/link_recovery_failures
+ chown system system /sys/devices/platform/12100000.pcie/link_stats/link_up_failures
+ chown system system /sys/devices/platform/13120000.pcie/link_stats/complete_timeout_irqs
+ chown system system /sys/devices/platform/13120000.pcie/link_stats/link_down_irqs
+ chown system system /sys/devices/platform/13120000.pcie/link_stats/link_recovery_failures
+ chown system system /sys/devices/platform/13120000.pcie/link_stats/link_up_failures
+
+ # Write MTE config
+ # Little Cores:
+ write /sys/devices/system/cpu/cpu0/mte_tcf_preferred sync
+ write /sys/devices/system/cpu/cpu1/mte_tcf_preferred sync
+ write /sys/devices/system/cpu/cpu2/mte_tcf_preferred sync
+ write /sys/devices/system/cpu/cpu3/mte_tcf_preferred sync
+ # Mid Cores:
+ write /sys/devices/system/cpu/cpu4/mte_tcf_preferred sync
+ write /sys/devices/system/cpu/cpu5/mte_tcf_preferred sync
+ write /sys/devices/system/cpu/cpu6/mte_tcf_preferred sync
+ write /sys/devices/system/cpu/cpu7/mte_tcf_preferred sync
+ # Big Core: sync more performance is prohibitively bad
+ write /sys/devices/system/cpu/cpu8/mte_tcf_preferred asymm
+
+ # Change GSA log group for dumpstate
+ chown root system /sys/devices/platform/16490000.gsa-ns/log_main
+ chown root system /sys/devices/platform/16490000.gsa-ns/log_intermediate
+
+on post-fs
+ # Ensure device is ready and start storageproxyd
+ wait /dev/sg1
+ start storageproxyd
+
+on late-fs
+ # Start bootanimation class before mount
+ start bootanim
+ class_start animation
+
+ # Mount RW partitions which need run fsck
+ mount_all --late
+
+on post-fs-data
+ # Modem temperature driver
+ chown radio system /sys/devices/platform/cp-tm1/cp_temp
+
+ # Log data folder
+ mkdir /data/vendor 0771 radio system
+ mkdir /data/vendor/log 0771 radio system
+ mkdir /data/vendor/log/cbd 0771 radio system
+ mkdir /data/vendor/log/rfsd 0771 radio system
+
+ mkdir /data/exynos/log 0771 radio system
+ mkdir /data/vendor/rild 0771 radio system
+ mkdir /data/vendor/dump 0771 radio system
+ mkdir /data/vendor/slog 0771 system system
+
+ # PixelLogger log paths.
+ mkdir /data/vendor/radio 773 system radio
+ mkdir /data/vendor/radio/logs 773 system radio
+ mkdir /data/vendor/radio/logs/always-on 777 system radio
+
+ # Modem extended log folder
+ mkdir /data/vendor/radio/extended_logs 0770 radio system
+
+ # Modem MDS log folder
+ mkdir /data/vendor/radio/mds 0771 radio system
+
+ # Modem SIM log folder
+ mkdir /data/vendor/radio/sim 0771 radio system
+
+ # Unzipped modem images folder
+ mkdir /data/vendor/radio/image 0771 radio system
+
+ # Modem stat folder
+ mkdir /data/vendor/modem_stat 0771 radio system
+ write /data/vendor/modem_stat/debug.txt ""
+ chown radio system /data/vendor/modem_stat/debug.txt
+ chmod 0664 /data/vendor/modem_stat/debug.txt
+
+ # Modem replay folder
+ mkdir /mnt/vendor/modem_userdata/replay 0775 radio system
+
+ # Write display MIPI frequency from Modem
+ chown system system /sys/devices/platform/19440000.drmdsim/hs_clock
+ chown system system /sys/devices/platform/19450000.drmdsim/hs_clock
+ chmod 0664 /sys/devices/platform/19440000.drmdsim/hs_clock
+ chmod 0664 /sys/devices/platform/19450000.drmdsim/hs_clock
+
+ # IPSEC PIDDIR for VoWiFi
+ mkdir /data/vendor/misc 0771 root system
+ mkdir /data/vendor/misc/vpn 0771 root system
+
+ # Permissions Camera
+ mkdir /data/vendor/camera 0770 system camera
+ mkdir /data/vendor/camera/catpipe 0770 system camera
+ chmod 0755 /sys/kernel/debug/tracing
+ restorecon /sys/kernel/debug/tracing/trace_marker
+
+ # ranging sensor
+ chown system system /dev/stmvl53l1_ranging
+ chmod 0660 /dev/stmvl53l1_ranging
+
+ # Factory calibration files
+ chmod 0771 /mnt/vendor/persist/camera
+ chmod 0771 /mnt/vendor/persist/camera/OTP_calibration
+ chmod 0771 /mnt/vendor/persist/camera/pdaf_calibration_data
+ mkdir /mnt/vendor/persist/camera/rear 0771 system camera
+ chmod 0771 /mnt/vendor/persist/camera/rear
+
+ # Audio dump and debug
+ mkdir /data/vendor/audio 0770 audio audio
+
+ # Create the directories for Darwinn HAL.
+ mkdir /data/vendor/hal_neuralnetworks_darwinn 0770 system system
+ mkdir /data/vendor/hal_neuralnetworks_darwinn/checksum_cache 0770 system system
+ mkdir /data/vendor/edgetpu 0770 system system
+ mkdir /data/vendor/edgetpu/cache 0770 system system
+
+ # Compatibility path for TPU
+ symlink /dev/edgetpu-soc /dev/edgetpu
+
+on zygote-start
+ # For PixelLogger configuration file.
+ chmod 0771 /data/vendor/wifi
+ write /proc/vendor_sched/sys_uclamp_min 0
+
+on post-fs-data
+ # Create the directories used by the Wireless subsystem
+ mkdir /data/vendor/wifi 0771 wifi wifi
+ mkdir /data/vendor/wifi/wpa 0770 wifi wifi
+ mkdir /data/vendor/wifi/wpa/sockets 0770 wifi wifi
+
+# Gatekeeper data
+ mkdir /data/vendor/gk 0771 system system
+
+# HWC data
+ mkdir /data/vendor/log/hwc 0771 system graphics
+
+# Video data
+ mkdir /data/vendor/media 0700 mediacodec mediacodec
+
+on post-fs-data
+ # GPS
+ mkdir /data/vendor/gps 0771 system system
+ chown system system /data/vendor/gps
+ rm /data/vendor/gps/gps_started
+ rm /data/vendor/gps/glonass_started
+ rm /data/vendor/gps/beidou_started
+ rm /data/vendor/gps/smd_started
+ rm /data/vendor/gps/sv_cno.info
+
+ chown gps system /sys/devices/platform/111e0000.spi/spi_master/spi21/spi21.0/nstandby
+ chmod 0664 /dev/ttyBCM
+ chown gps system /dev/ttyBCM
+ chmod 0664 /dev/bbd_control
+ chown gps system /dev/bbd_control
+ chmod 0664 /dev/bbd_patch
+ chown gps system /dev/bbd_patch
+ chmod 0664 /dev/bbd_sensor
+ chown gps system /dev/bbd_sensor
+
+on early-boot
+ # Wait for insmod_sh to finish all common modules
+ wait_for_prop vendor.common.modules.ready 1
+
+ # Permission for Health Storage HAL
+ chown system system /dev/sys/block/bootdevice/manual_gc
+
+ # Permission for Pixelstats
+ chown system system /dev/sys/block/bootdevice/slowio_read_cnt
+ chown system system /dev/sys/block/bootdevice/slowio_write_cnt
+ chown system system /dev/sys/block/bootdevice/slowio_unmap_cnt
+ chown system system /dev/sys/block/bootdevice/slowio_sync_cnt
+
+ # logbuffer
+ chown system system /dev/logbuffer_maxfg
+ chown system system /dev/logbuffer_maxfg_monitor
+ chown system system /dev/logbuffer_maxq
+ chown system system /dev/logbuffer_rtx
+ chown system system /dev/logbuffer_ssoc
+ chown system system /dev/logbuffer_ttf
+ chown system system /dev/logbuffer_tcpm
+ chown system system /dev/logbuffer_usbpd
+ chown system system /dev/logbuffer_wireless
+ chown system system /dev/logbuffer_pca9468
+ chown system system /dev/logbuffer_cpm
+ chown system system /dev/logbuffer_wc68
+ chown system system /dev/logbuffer_pcie0
+ chown system system /dev/logbuffer_pcie1
+ chown system system /dev/logbuffer_bd
+
+on boot
+
+ # Allow to access debugfs for system:system
+ chmod 0755 /sys/kernel/debug
+ chown system system /sys/kernel/debug
+
+ #setprop ro.radio.noril no
+
+ # default country code
+ setprop ro.boot.wificountrycode 00
+
+ # Set up kernel tracing, but disable it by default
+ chmod 0222 /sys/kernel/debug/tracing/trace_marker
+ write /sys/kernel/debug/tracing/tracing_on 0
+
+ # Trigger TMU to ACPM pi table update
+ write /sys/module/gs_thermal/parameters/update_acpm_pi_table 1
+
+ # Change permission for A-Box firmware logs file & GPR dump
+ chown audioserver system /sys/devices/platform/17c50000.abox/reset
+ chown audioserver system /sys/devices/platform/17c50000.abox/service
+ chown audioserver system /sys/devices/platform/17c50000.abox/0.abox_debug/gpr
+ chown audioserver system /sys/devices/platform/17c50000.abox/0.abox_debug/calliope_sram
+ chown audioserver system /sys/devices/platform/17c50000.abox/0.abox_debug/calliope_dram
+ chown audioserver system /sys/devices/platform/17c50000.abox/0.abox_debug/calliope_iva
+ chown audioserver system /sys/kernel/debug/abox/log-00
+
+# Permission for USB SELECT
+ chown system system /sys/class/android_usb/android0/enable
+ chmod 0660 /sys/class/android_usb/android0/enable
+ chown system system /sys/class/android_usb/android0/idVendor
+ chmod 0660 /sys/class/android_usb/android0/idVendor
+ chown system system /sys/class/android_usb/android0/idProduct
+ chmod 0660 /sys/class/android_usb/android0/idProduct
+ chown system system /sys/class/android_usb/android0/f_diag/clients
+ chmod 0660 /sys/class/android_usb/android0/f_diag/clients
+ chown system system /sys/class/android_usb/android0/functions
+ chmod 0660 /sys/class/android_usb/android0/functions
+ chown system system /sys/class/android_usb/android0/bDeviceClass
+ chmod 0660 /sys/class/android_usb/android0/bDeviceClass
+
+# Permission for UART SWITCH
+ chmod 0660 /sys/class/sec/switch/uart_sel
+ chown system system /sys/class/sec/switch/uart_sel
+
+# VTS sysfs file permission
+ chown audioserver system /sys/devices/platform/13810000.vts/vts_svoice_model
+ chown audioserver system /sys/devices/platform/13810000.vts/vts_google_model
+ chmod 0660 /sys/devices/platform/13810000.vts/vts_svoice_model
+ chmod 0660 /sys/devices/platform/13810000.vts/vts_google_model
+
+on property:persist.vendor.radio.no_modem_board=1
+ setprop ro.radio.noril yes
+
+on fs
+ mount_all --early
+ restorecon_recursive /mnt/vendor/efs
+ chown radio system /mnt/vendor/efs
+ restorecon_recursive /mnt/vendor/efs_backup
+ chown radio system /mnt/vendor/efs_backup
+ restorecon_recursive /mnt/vendor/modem_userdata
+ chown radio system /mnt/vendor/modem_userdata
+
+ # Mount modem partition
+ mount_all /vendor/etc/fstab.modem --early
+ restorecon_recursive /mnt/vendor/modem_img
+
+ restorecon_recursive /mnt/vendor/persist
+ restorecon_recursive /mnt/vendor/persist/aoc
+ restorecon_recursive /mnt/vendor/persist/audio
+ restorecon_recursive /mnt/vendor/persist/sensors
+ restorecon_recursive /mnt/vendor/persist/battery
+ restorecon_recursive /mnt/vendor/persist/camera
+ restorecon_recursive /mnt/vendor/persist/modem
+ # Set up display-related directories and permissions
+ # Add restorecon_recursive command to make sure the restorecon label is persist_display_file.
+ restorecon_recursive /mnt/vendor/persist/display
+ mkdir /mnt/vendor/persist/data/sfs 0700 system system
+ mkdir /mnt/vendor/persist/data/tz 0700 system system
+ mkdir /mnt/vendor/persist/touch 0770 system system
+
+# Permissions for ION
+ chmod 0660 /sys/class/ion_cma/ion_video_ext/isolated
+ chown system system /sys/class/ion_cma/ion_video_ext/isolated
+
+# Permissions for hwcomposer
+ chown system system /sys/class/backlight/panel0-backlight/als_table
+ chown system system /sys/class/backlight/panel0-backlight/brightness
+ chown system system /sys/class/backlight/panel0-backlight/dimming_on
+ chown system system /sys/class/backlight/panel0-backlight/hbm_mode
+ chown system system /sys/class/backlight/panel0-backlight/local_hbm_mode
+ chown system system /sys/devices/platform/exynos-drm/primary-panel/gamma
+ chown system system /sys/devices/platform/exynos-drm/primary-panel/min_vrefresh
+ chown system system /sys/devices/platform/exynos-drm/primary-panel/idle_delay_ms
+ chown system system /sys/devices/platform/exynos-drm/primary-panel/panel_idle
+ chown system system /sys/devices/platform/exynos-drm/primary-panel/panel_need_handle_idle_exit
+ chown system system /sys/devices/platform/exynos-drm/primary-panel/op_hz
+ chown system system /sys/module/drm/parameters/vblankoffdelay
+ chown system system /sys/class/dqe0/atc/ambient_light
+ chown system system /sys/class/dqe0/atc/st
+ chown system system /sys/class/dqe0/atc/en
+ chown system system /sys/class/dqe0/atc/lt
+ chown system system /sys/class/dqe0/atc/ns
+ chown system system /sys/class/dqe0/atc/dither
+ chown system system /sys/class/dqe0/atc/pl_w1
+ chown system system /sys/class/dqe0/atc/pl_w2
+ chown system system /sys/class/dqe0/atc/ctmode
+ chown system system /sys/class/dqe0/atc/pp_en
+ chown system system /sys/class/dqe0/atc/upgrade_on
+ chown system system /sys/class/dqe0/atc/tdr_max
+ chown system system /sys/class/dqe0/atc/tdr_min
+ chown system system /sys/class/dqe0/atc/back_light
+ chown system system /sys/class/dqe0/atc/dstep
+ chown system system /sys/class/dqe0/atc/scale_mode
+ chown system system /sys/class/dqe0/atc/threshold_1
+ chown system system /sys/class/dqe0/atc/threshold_2
+ chown system system /sys/class/dqe0/atc/threshold_3
+ chown system system /sys/class/dqe0/atc/gain_limit
+ chown system system /sys/class/dqe0/atc/lt_calc_ab_shift
+
+ chown system system /sys/devices/platform/19470000.drmdecon/early_wakeup
+ chmod 0660 /sys/devices/platform/19470000.drmdecon/early_wakeup
+
+ chown system system /sys/devices/platform/19470000.drmdecon/hibernation
+ chmod 0644 /sys/devices/platform/19470000.drmdecon/hibernation
+
+# Copy DRM Key
+# copy /system/app/wv.keys /factory/wv.keys
+
+# Permission for DRM Key
+# chmod 0644 /factory/wv.keys
+
+# Permission for flashlight control for HAL3.3
+# The Istor espresso board does not have the flash led h/w, So the below permission line are blocked.
+# If you want to test the flashlight in board which have the flash led h/w, Enable the below blocked lines.
+ chmod 0660 /sys/class/camera/flash/rear_torch_flash
+ chown system camera /sys/class/camera/flash/rear_torch_flash
+#load ecd firmware
+ write /proc/ecd/load_firmware 1
+
+service abox /vendor/bin/main_abox 17c50000.abox
+ class late_start
+ user audioserver
+ group audioserver
+ seclabel u:r:abox:s0
+
+# on userdebug and eng builds, enable kgdb on the serial console
+on property:ro.debuggable=1
+ write /sys/module/kgdboc/parameters/kgdboc ttyFIQ1
+ write /sys/module/fiq_debugger/parameters/kgdb_enable 1
+
+# Touch
+on property:vendor.device.modules.ready=1
+ chown system system /sys/class/spi_master/spi20/spi20.0/stm_fts_cmd
+ chown system system /sys/class/spi_master/spi20/spi20.0/glove_mode
+ chown system system /sys/devices/virtual/sec/tsp/fw_version
+ chown system system /sys/devices/virtual/sec/tsp/cmd
+ chown system system /sys/devices/virtual/sec/tsp/cmd_result
+ chown system system /sys/devices/virtual/sec/tsp/status
+ chown system system /sys/devices/virtual/goog_touch_interface/gti.0/force_active
+ chown system system /sys/devices/virtual/goog_touch_interface/gti.0/fw_ver
+ chown system system /sys/devices/virtual/goog_touch_interface/gti.0/ms_base
+ chown system system /sys/devices/virtual/goog_touch_interface/gti.0/ms_diff
+ chown system system /sys/devices/virtual/goog_touch_interface/gti.0/ms_raw
+ chown system system /sys/devices/virtual/goog_touch_interface/gti.0/self_test
+ chown system system /sys/devices/virtual/goog_touch_interface/gti.0/ss_base
+ chown system system /sys/devices/virtual/goog_touch_interface/gti.0/ss_diff
+ chown system system /sys/devices/virtual/goog_touch_interface/gti.0/ss_raw
+ # Allow access to touch
+ chown system input /dev/touch_offload
+ chmod 660 /dev/touch_offload
+
+# Route touch_sensitivity_mode to persist
+on property:debug.touch_sensitivity_mode=0
+ setprop persist.vendor.touch_sensitivity_mode 0
+
+on property:debug.touch_sensitivity_mode=1
+ setprop persist.vendor.touch_sensitivity_mode 1
+
+on property:init.svc.vendor.charger=running
+ stop keymaster-4-0
+
+ setprop sys.usb.configfs 1
+ setprop vendor.setup.power 1
+
+ # keep one little and one big
+ write /sys/devices/system/cpu/cpu1/online 0
+ write /sys/devices/system/cpu/cpu2/online 0
+ write /sys/devices/system/cpu/cpu3/online 0
+ write /sys/devices/system/cpu/cpu4/online 0
+ write /sys/devices/system/cpu/cpu5/online 0
+ write /sys/devices/system/cpu/cpu7/online 0
+
+on property:sys.boot_completed=1
+
+ # Runtime fs tuning
+ write /sys/block/sda/queue/nr_requests 128
+ write /sys/block/sda/queue/iostats 1
+ write /sys/block/sda/queue/iosched/slice_idle 0
+ write /dev/sys/fs/by-name/userdata/data_io_flag 8
+ write /dev/sys/fs/by-name/userdata/node_io_flag 8
+
+ # Permission for Pixelstats
+ chown system system /dev/sys/fs/by-name/userdata/compr_written_block
+ chown system system /dev/sys/fs/by-name/userdata/compr_saved_block
+ chown system system /dev/sys/fs/by-name/userdata/compr_new_inode
+ chown system system /dev/sys/fs/by-name/userdata/gc_segment_mode
+ chown system system /dev/sys/fs/by-name/userdata/gc_reclaimed_segments
+ chown system system /dev/sys/fs/by-name/userdata/peak_atomic_write
+ chown system system /dev/sys/fs/by-name/userdata/committed_atomic_block
+ chown system system /dev/sys/fs/by-name/userdata/revoked_atomic_block
+
+ # Enable ZRAM on boot_complete
+ swapon_all /vendor/etc/fstab.${ro.board.platform}
+ write /proc/sys/vm/swappiness 100
+
+ # Back to default VM settings
+ write /proc/sys/vm/dirty_expire_centisecs 3000
+ write /proc/sys/vm/dirty_background_ratio 10
+
+ # Enable UFS powersaving
+ write /dev/sys/block/bootdevice/clkgate_enable 1
+
+ # Setup final cpuset
+ write /dev/cpuset/top-app/cpus 0-8
+ write /dev/cpuset/foreground/cpus 0-7
+ write /dev/cpuset/background/cpus 0-3
+ write /dev/cpuset/system-background/cpus 0-3
+ write /dev/cpuset/restricted/cpus 0-3
+ write /dev/cpuset/camera-daemon/cpus 0-8
+ setprop vendor.powerhal.init 1
+
+ # Setup final cpu.uclamp
+ write /proc/vendor_sched/ta_uclamp_min 1
+ write /proc/vendor_sched/fg_uclamp_min 0
+ write /proc/vendor_sched/sys_prefer_idle 0
+ # cfs_rq clamp is using tg->uclamp setting
+ # align it with the vendor_group setting
+ write /proc/vendor_sched/bg_uclamp_max 512
+ write /dev/cpuctl/background/cpu.uclamp.max 50
+ write /proc/vendor_sched/bg_group_throttle 512
+ write /proc/vendor_sched/sysbg_uclamp_max 512
+ write /dev/cpuctl/system-background/cpu.uclamp.max 50
+ write /proc/vendor_sched/sysbg_group_throttle 512
+ write /proc/vendor_sched/dex2oat_uclamp_max 615
+ write /dev/cpuctl/dex2oat/cpu.uclamp.max 60
+ write /proc/vendor_sched/dex2oat_group_throttle 615
+ write /proc/vendor_sched/ota_uclamp_max 410
+ write /proc/vendor_sched/ota_group_throttle 410
+
+ # Set PMU freq limit parameters
+ write /sys/devices/system/cpu/cpufreq/policy0/sched_pixel/lcpi_threshold 2
+ write /sys/devices/system/cpu/cpufreq/policy0/sched_pixel/spc_threshold 59
+ write /sys/devices/system/cpu/cpufreq/policy0/sched_pixel/limit_frequency 1401000
+ write /sys/devices/system/cpu/cpufreq/policy4/sched_pixel/lcpi_threshold 6
+ write /sys/devices/system/cpu/cpufreq/policy4/sched_pixel/spc_threshold 64
+ write /sys/devices/system/cpu/cpufreq/policy4/sched_pixel/limit_frequency 1826000
+ write /sys/devices/system/cpu/cpufreq/policy8/sched_pixel/lcpi_threshold 5
+ write /sys/devices/system/cpu/cpufreq/policy8/sched_pixel/spc_threshold 69
+ write /sys/devices/system/cpu/cpufreq/policy8/sched_pixel/limit_frequency 2507000
+ write /proc/vendor_sched/pmu_poll_time 10
+
+ # Disable PMU freq limit
+ write /sys/devices/system/cpu/cpufreq/policy0/sched_pixel/pmu_limit_enable 1
+ write /sys/devices/system/cpu/cpufreq/policy4/sched_pixel/pmu_limit_enable 1
+ write /sys/devices/system/cpu/cpufreq/policy8/sched_pixel/pmu_limit_enable 1
+ write /proc/vendor_sched/pmu_poll_enable 0
+
+ # Setup groups for SF (RT used for SF RE, SF used for SF main)
+ write /proc/vendor_sched/rt_uclamp_min 125
+ write /proc/vendor_sched/rt_prefer_idle 1
+ write /proc/vendor_sched/sf_uclamp_min 30
+ write /proc/vendor_sched/sf_prefer_idle 1
+
+ # Setup cpu.shares to throttle background groups (bg ~ 5% sysbg ~ 5% dex2oat ~2.5%)
+ write /dev/cpuctl/background/cpu.shares 1024
+ write /dev/cpuctl/system-background/cpu.shares 1024
+ write /dev/cpuctl/dex2oat/cpu.shares 512
+ write /dev/cpuctl/system/cpu.shares 20480
+ # We only have system and background groups holding tasks and the groups below are empty
+ write /dev/cpuctl/camera-daemon/cpu.shares 20480
+ write /dev/cpuctl/foreground/cpu.shares 20480
+ write /dev/cpuctl/nnapi-hal/cpu.shares 20480
+ write /dev/cpuctl/rt/cpu.shares 20480
+ write /dev/cpuctl/top-app/cpu.shares 20480
+
+ # gvotables for dumpstate
+ chown system system /sys/kernel/debug/gvotables
+
+ # Permission for wireless charging
+ chown system system /sys/class/power_supply/wireless/capacity
+ chown system system /sys/class/power_supply/wireless/device/rtx
+ chown system system /sys/class/power_supply/wireless/device/rxdata
+ chown system system /sys/class/power_supply/wireless/device/txdata
+ chown system system /sys/class/power_supply/wireless/device/rxlen
+ chown system system /sys/class/power_supply/wireless/device/txlen
+ chown system system /sys/class/power_supply/wireless/device/ccreset
+ chown system system /sys/class/power_supply/wireless/device/status
+ chown system system /sys/class/power_supply/wireless/device/version
+
+ # AOC reset permission
+ chown root system /sys/devices/platform/19000000.aoc/reset
+ chmod 0220 /sys/devices/platform/19000000.aoc/reset
+
+ # AOC UDFPS clock compensation permission
+ chown system system /sys/devices/platform/17000000.aoc/control/udfps_set_clock_source
+ chmod 220 /sys/devices/platform/17000000.aoc/control/udfps_set_clock_source
+ chown system system /sys/devices/platform/17000000.aoc/control/udfps_get_osc_freq
+ chmod 440 /sys/devices/platform/17000000.aoc/control/udfps_get_osc_freq
+ chown system system /sys/devices/platform/17000000.aoc/control/udfps_get_disp_freq
+ chmod 440 /sys/devices/platform/17000000.aoc/control/udfps_get_disp_freq
+
+ # write serialno to battery path for pairing
+ write /sys/class/power_supply/battery/dev_sn ${ro.boot.serialno}
+
+ # Disable GPU firmware logging
+ write /sys/devices/platform/1f000000.mali/firmware_config/Log\ verbosity/cur 0
+
+#Enable SICD
+ write /sys/devices/system/cpu/cpupm/cpupm/sicd 1
+
+# IMS WiFi Calling
+ service charonservice /system/vendor/bin/charon
+ class main
+ user root
+ disabled
+ seclabel u:r:charonservice:s0
+
+on property:vendor.charon.exec=1
+ rm /data/vendor/misc/vpn/charon.pid
+ chmod 0666 /dev/tun
+ start charonservice
+
+on property:vendor.charon.exec=0
+ stop charonservice
+ rm /data/vendor/misc/vpn/charon.pid
+
+# charger driver exposes now finer grain control, map demo mode to those properties
+# NOTE: demo mode can only be exit wiping data (which reset the persist properties)
+on property:sys.retaildemo.enabled=1
+ setprop persist.vendor.charge.stop.level 35
+ setprop persist.vendor.charge.start.level 30
+
+# Test Harness Mode default battery profile.
+on property:persist.sys.test_harness=1 && property:persist.vendor.testing_battery_profile=0
+ setprop persist.vendor.charge.stop.level 70
+ setprop persist.vendor.charge.start.level 35
+ setprop vendor.battery.defender.disable 1
+
+# Extremely restricted battery profile.
+on property:persist.sys.test_harness=1 && property:persist.vendor.testing_battery_profile=1
+ setprop persist.vendor.charge.stop.level 50
+ setprop persist.vendor.charge.start.level 35
+ setprop vendor.battery.defender.disable 1
+
+# Normal behavior (as if the device was a regular device)
+on property:persist.sys.test_harness=1 && property:persist.vendor.testing_battery_profile=2
+ setprop persist.vendor.charge.stop.level 100
+ setprop persist.vendor.charge.start.level 0
+
+# Unrestricted, allows charging to 100%
+on property:persist.sys.test_harness=1 && property:persist.vendor.testing_battery_profile=3
+ setprop persist.vendor.charge.stop.level 100
+ setprop persist.vendor.charge.start.level 0
+ setprop vendor.battery.defender.disable 1
+
+# bugreport is triggered by holding down volume down, volume up and power
+service bugreport /system/bin/dumpstate -d -p -z
+ class main
+ disabled
+ oneshot
+ keycodes 114 115 116
+
+# Proxy for Secure Storage
+on post-fs-data
+ mkdir /data/vendor/rebootescrow 0770 hsm hsm
+ mkdir /data/vendor/ss 0770 root system
+ mkdir /mnt/vendor/persist/ss 0770 root system
+ restorecon_recursive /mnt/vendor/persist/ss
+ symlink /mnt/vendor/persist/ss /data/vendor/ss/persist
+ chown root system /data/vendor/ss/persist
+ chmod 0770 /data/vendor/ss/persist
+ symlink /dev/block/platform/13200000\.ufs/by-name/trusty_persist /data/vendor/ss/persist/0
+ chown system system /data/vendor/ss/persist/0
+
+ restart storageproxyd
+
+service storageproxyd /vendor/bin/storageproxyd -d /dev/trusty-ipc-dev0 \
+ -r /dev/sg1 -p /data/vendor/ss -t ufs
+ class early_hal
+ user system
+ group system
+
+# Write build info to kdebuginfo
+on property:ro.build.fingerprint=*
+ write /sys/module/debug_kinfo/parameters/build_info ${ro.build.fingerprint}
+
+# Bluetooth
+on post-fs-data
+ chown bluetooth system /sys/devices/platform/175b0000.serial/serial0/serial0-0/bluetooth/hci0/rfkill0/state
+ chown bluetooth system /sys/devices/platform/odm/odm:btbcm/rfkill/rfkill0/state
+ chown bluetooth system /sys/devices/platform/odm/odm:btbcm/rfkill/rfkill2/state
+ chown bluetooth system /proc/bluetooth/sleep/btwake
+ chown bluetooth system /proc/bluetooth/sleep/lpm
+ chown bluetooth system /proc/bluetooth/sleep/btwrite
+
+# ODPM
+on fs
+ chown system system /sys/devices/platform/acpm_mfd_bus@18100000/i2c-7/i2c-s2mpg12mfd/s2mpg12-meter/s2mpg12-odpm/iio\:device0/enabled_rails
+ chown system system /sys/devices/platform/acpm_mfd_bus@18110000/i2c-8/i2c-s2mpg13mfd/s2mpg13-meter/s2mpg13-odpm/iio\:device1/enabled_rails
+
+on post-fs-data
+ mkdir /data/vendor/powerstats 0771 system system
+ chown system system /data/vendor/powerstats
+
+on property:vendor.thermal.link_ready=1
+ # BCL
+ write /sys/devices/platform/cpupm/cpupm/cpd_cl1 0 #Disable power down
+ write /sys/devices/platform/cpupm/cpupm/cpd_cl2 0 #Disable power down
+ write /sys/devices/virtual/pmic/mitigation/clock_ratio/tpu_light_clk_ratio 0xfff041c1 #OCP
+ write /sys/devices/virtual/pmic/mitigation/clock_ratio/cpu1_heavy_clk_ratio 0xfff041c0 #DFS
+ write /sys/devices/virtual/pmic/mitigation/clock_ratio/cpu2_heavy_clk_ratio 0xfff041c0 #DFS
+ write /sys/devices/virtual/pmic/mitigation/clock_ratio/gpu_light_clk_ratio 0xfff041c1 #OCP
+ write /sys/devices/virtual/pmic/mitigation/clock_ratio/cpu2_light_clk_ratio 0xfff041c3 #OCP
+ write /sys/devices/virtual/pmic/mitigation/clock_ratio/gpu_heavy_clk_ratio 0xfff04380 #DFS
+ write /sys/devices/virtual/pmic/mitigation/clock_ratio/tpu_heavy_clk_ratio 0xfff041c0 #DFS
+ write /sys/devices/virtual/pmic/mitigation/triggered_lvl/smpl_lvl 3100
+ write /sys/devices/virtual/pmic/mitigation/triggered_lvl/soft_ocp_cpu2_lvl 12000
+ write /sys/devices/virtual/pmic/mitigation/triggered_lvl/soft_ocp_gpu_lvl 9000
+ write /sys/devices/virtual/pmic/mitigation/triggered_lvl/soft_ocp_tpu_lvl 8500
+ write /sys/devices/virtual/pmic/mitigation/clock_div/tpu_clk_div 0x1
+ write /sys/devices/virtual/pmic/mitigation/clock_div/gpu_clk_div 0x1
+ write /sys/devices/virtual/pmic/mitigation/clock_div/cpu2_clk_div 0x1
+ write /sys/devices/platform/cpupm/cpupm/cpd_cl1 1 #Enable power down
+ write /sys/devices/platform/cpupm/cpupm/cpd_cl2 1 #Enable power down
+ chown system system /dev/thermal/tz-by-name/soc/mode
+ chown system system /dev/thermal/tz-by-name/vdroop2/trip_point_0_temp
+ chown system system /dev/thermal/tz-by-name/vdroop2/trip_point_0_hyst
+ chown system system /dev/thermal/tz-by-name/vdroop1/trip_point_0_temp
+ chown system system /dev/thermal/tz-by-name/vdroop1/trip_point_0_hyst
+ chown system system /dev/thermal/tz-by-name/smpl_gm/trip_point_0_temp
+ chown system system /dev/thermal/tz-by-name/smpl_gm/trip_point_0_hyst
+ chown system system /dev/thermal/tz-by-name/ocp_cpu1/trip_point_0_temp
+ chown system system /dev/thermal/tz-by-name/ocp_cpu1/trip_point_0_hyst
+ chown system system /dev/thermal/tz-by-name/ocp_cpu2/trip_point_0_temp
+ chown system system /dev/thermal/tz-by-name/ocp_cpu2/trip_point_0_hyst
+ chown system system /dev/thermal/tz-by-name/ocp_tpu/trip_point_0_temp
+ chown system system /dev/thermal/tz-by-name/ocp_tpu/trip_point_0_hyst
+ chown system system /dev/thermal/tz-by-name/ocp_gpu/trip_point_0_temp
+ chown system system /dev/thermal/tz-by-name/ocp_gpu/trip_point_0_hyst
+ chown system system /dev/thermal/tz-by-name/soft_ocp_cpu1/trip_point_0_temp
+ chown system system /dev/thermal/tz-by-name/soft_ocp_cpu1/trip_point_0_hyst
+ chown system system /dev/thermal/tz-by-name/soft_ocp_cpu2/trip_point_0_temp
+ chown system system /dev/thermal/tz-by-name/soft_ocp_cpu2/trip_point_0_hyst
+ chown system system /dev/thermal/tz-by-name/soft_ocp_tpu/trip_point_0_temp
+ chown system system /dev/thermal/tz-by-name/soft_ocp_tpu/trip_point_0_hyst
+ chown system system /dev/thermal/tz-by-name/soft_ocp_gpu/trip_point_0_temp
+ chown system system /dev/thermal/tz-by-name/soft_ocp_gpu/trip_point_0_hyst
+ chown system system /dev/thermal/tz-by-name/soc/trip_point_0_temp
+ chown system system /dev/thermal/tz-by-name/soc/trip_point_0_hyst
+ chown system system /dev/thermal/tz-by-name/batoilo/trip_point_0_temp
+ chown system system /dev/thermal/tz-by-name/batoilo/trip_point_0_hyst
+ # Thermal
+ chown system system /dev/thermal/tz-by-name/disp_therm/trip_point_0_temp
+ chown system system /dev/thermal/tz-by-name/disp_therm/trip_point_0_hyst
+ chown system system /dev/thermal/tz-by-name/north_therm/trip_point_0_temp
+ chown system system /dev/thermal/tz-by-name/north_therm/trip_point_0_hyst
+ chown system system /dev/thermal/tz-by-name/cam_therm/trip_point_0_temp
+ chown system system /dev/thermal/tz-by-name/cam_therm/trip_point_0_hyst
+ chown system system /dev/thermal/tz-by-name/charge_therm/trip_point_0_temp
+ chown system system /dev/thermal/tz-by-name/charge_therm/trip_point_0_hyst
+ chown system system /dev/thermal/tz-by-name/soc_therm/trip_point_0_temp
+ chown system system /dev/thermal/tz-by-name/soc_therm/trip_point_0_hyst
+ chown system system /dev/thermal/tz-by-name/neutral_therm/trip_point_0_temp
+ chown system system /dev/thermal/tz-by-name/neutral_therm/trip_point_0_hyst
+ chown system system /dev/thermal/tz-by-name/usb_pwr_therm/trip_point_0_temp
+ chown system system /dev/thermal/tz-by-name/usb_pwr_therm/trip_point_0_hyst
+ chown system system /dev/thermal/tz-by-name/quiet_therm/trip_point_0_temp
+ chown system system /dev/thermal/tz-by-name/quiet_therm/trip_point_0_hyst
+ chown system system /dev/thermal/cdev-by-name/thermal-cpufreq-0/user_vote
+ chown system system /dev/thermal/cdev-by-name/thermal-cpufreq-1/user_vote
+ chown system system /dev/thermal/cdev-by-name/thermal-cpufreq-2/user_vote
+ chown system system /dev/thermal/cdev-by-name/thermal-gpufreq-0/user_vote
+ chown system system /dev/thermal/cdev-by-name/gxp-cooling/user_vote
+ chown system system /dev/thermal/cdev-by-name/tpu_cooling/user_vote
+ chown system system /dev/thermal/cdev-by-name/fcc/cur_state
+ chown system system /dev/thermal/cdev-by-name/dc_icl/cur_state
+ chown system system /dev/thermal/cdev-by-name/wlc_fcc/cur_state
+ chown system system /dev/thermal/cdev-by-name/chg_mdis/cur_state
+ chown system system /dev/thermal/cdev-by-name/usbc-port/cur_state
+
+on charger
+ # Use charger thermal config
+ setprop vendor.thermal.config "thermal_info_config_charge.json"
+
+ # Wait for insmod_sh to finish all common modules
+ wait_for_prop vendor.common.modules.ready 1
+
+ # Create thermal symlink in off charging mode
+ mkdir /dev/thermal 0750 system system
+ mkdir /dev/thermal/tz-by-name 0750 system system
+ mkdir /dev/thermal/cdev-by-name 0750 system system
+ start vendor.thermal.symlinks
+
+on property:vendor.disable.bcl.control=1
+ write /sys/devices/virtual/pmic/mitigation/instruction/enable_mitigation 0
+
+on property:vendor.disable.bcl.control=0
+ write /sys/devices/virtual/pmic/mitigation/instruction/enable_mitigation 1
+
+# UDFPS
+on post-fs-data && property:ro.vendor.factory=1
+ # HBM mode for UDFPS factory apk
+ chmod 666 /d/dri/0/DSI-1/panel/reg/payload
+ chmod 666 /d/dri/0/DSI-1/panel/reg/count
+ chmod 666 /d/dri/0/DSI-1/panel/reg/address
+ chmod 666 /d/dri/0/DSI-1/panel/hbm_mode
+ chmod 666 /sys/class/backlight/panel0-backlight/local_hbm_max_timeout
+ chmod 666 /sys/class/backlight/panel0-backlight/local_hbm_mode
+ chmod 666 /sys/class/backlight/panel0-backlight/hbm_mode
+
+# UFS
+on property:ro.boot.mode=charger && property:init.svc.vendor.charger=running
+ # Enable UFS powersaving in Off Mode Charger
+ write /dev/sys/block/bootdevice/clkgate_enable 1
diff --git a/conf/init.zumapro.usb.rc b/conf/init.zumapro.usb.rc
new file mode 100644
index 0000000..0f5d22c
--- /dev/null
+++ b/conf/init.zumapro.usb.rc
@@ -0,0 +1,194 @@
+on early-boot
+ mkdir /config/usb_gadget/g1
+ mkdir /config/usb_gadget/g1/strings/0x409
+ mkdir /config/usb_gadget/g1/configs/b.1
+ write /config/usb_gadget/g1/idVendor 0x18d1
+ write /config/usb_gadget/g1/strings/0x409/serialnumber ${ro.serialno}
+ write /config/usb_gadget/g1/strings/0x409/manufacturer ${ro.product.manufacturer}
+ write /config/usb_gadget/g1/strings/0x409/product ${ro.product.model}
+ write /config/usb_gadget/g1/configs/b.1/MaxPower 0x384
+ write /config/usb_gadget/g1/os_desc/b_vendor_code 0x1
+ write /config/usb_gadget/g1/os_desc/qw_sign "MSFT100"
+
+ # ffs function
+ mkdir /config/usb_gadget/g1/functions/ffs.adb 0770 shell shell
+ mkdir /config/usb_gadget/g1/functions/ffs.mtp
+ mkdir /config/usb_gadget/g1/functions/ffs.ptp
+ mkdir /dev/usb-ffs 0775 shell shell
+ mkdir /dev/usb-ffs/adb 0770 shell shell
+ mkdir /dev/usb-ffs/mtp 0770 mtp mtp
+ mkdir /dev/usb-ffs/ptp 0770 mtp mtp
+ mount functionfs adb /dev/usb-ffs/adb rmode=0770,fmode=0660,uid=2000,gid=2000,no_disconnect=1
+ mount functionfs mtp /dev/usb-ffs/mtp rmode=0770,fmode=0660,uid=1024,gid=1024,no_disconnect=1
+ mount functionfs ptp /dev/usb-ffs/ptp rmode=0770,fmode=0660,uid=1024,gid=1024,no_disconnect=1
+ setprop sys.usb.mtp.device_type 3
+ setprop sys.usb.mtp.batchcancel true
+ symlink /config/usb_gadget/g1/configs/b.1 /config/usb_gadget/g1/os_desc/b.1
+
+ # mtp function
+ mkdir /config/usb_gadget/g1/functions/mtp.gs0
+
+ # ptp function
+ mkdir /config/usb_gadget/g1/functions/ptp.gs1
+
+ # accessory function
+ mkdir /config/usb_gadget/g1/functions/accessory.gs2
+
+ # audio_source function
+ mkdir /config/usb_gadget/g1/functions/audio_source.gs3
+
+ # rndis function
+ mkdir /config/usb_gadget/g1/functions/rndis.gs4
+ # Modify class/subclass/protocol for rndis.gs4
+ # Remote NDIS: Class: Wireless Controller (0xe0), Subclass: 0x1, Protocol: 0x3
+ write /config/usb_gadget/g1/functions/rndis.gs4/class e0
+ write /config/usb_gadget/g1/functions/rndis.gs4/subclass 01
+ write /config/usb_gadget/g1/functions/rndis.gs4/protocol 03
+ write /config/usb_gadget/g1/functions/rndis.gs4/os_desc/interface.ncm/compatible_id RNDIS
+ write /config/usb_gadget/g1/functions/rndis.gs4/ifname rndis%d
+ setprop vendor.usb.rndis.config rndis.gs4
+
+ # midi function
+ mkdir /config/usb_gadget/g1/functions/midi.gs5
+
+ # acm function
+ mkdir /config/usb_gadget/g1/functions/acm.gs6
+
+ # dm function
+ mkdir /config/usb_gadget/g1/functions/dm.gs7
+
+ # uts function
+ mkdir /config/usb_gadget/g1/functions/uts.gs8
+
+ # ncm function
+ mkdir /config/usb_gadget/g1/functions/ncm.gs9
+ write /config/usb_gadget/g1/functions/ncm.gs9/os_desc/interface.ncm/compatible_id WINNCM
+ write /config/usb_gadget/g1/functions/ncm.gs9/ifname ncm%d
+
+ # etr_miu function
+ mkdir /config/usb_gadget/g1/functions/etr_miu.gs11
+
+ # acm function for uwb
+ mkdir /config/usb_gadget/g1/functions/acm.uwb0
+
+ # chown file/folder permission
+ chown system system /config/usb_gadget/
+ chown system system /config/usb_gadget/g1
+ chown system system /config/usb_gadget/g1/UDC
+ chown system system /config/usb_gadget/g1/bDeviceClass
+ chown system system /config/usb_gadget/g1/bDeviceProtocol
+ chown system system /config/usb_gadget/g1/bDeviceSubClass
+ chown system system /config/usb_gadget/g1/bMaxPacketSize0
+ chown system system /config/usb_gadget/g1/bcdDevice
+ chown system system /config/usb_gadget/g1/bcdUSB
+ chown system system /config/usb_gadget/g1/configs
+ chown system system /config/usb_gadget/g1/configs/b.1
+ chown system system /config/usb_gadget/g1/configs/b.1/MaxPower
+ chown system system /config/usb_gadget/g1/configs/b.1/bmAttributes
+ chown system system /config/usb_gadget/g1/configs/b.1/strings
+ chown system system /config/usb_gadget/g1/functions
+ chown system system /config/usb_gadget/g1/functions/accessory.gs2
+ chown system system /config/usb_gadget/g1/functions/acm.gs6
+ chown system system /config/usb_gadget/g1/functions/acm.gs6/port_num
+ chown system system /config/usb_gadget/g1/functions/acm.uwb0
+ chown system system /config/usb_gadget/g1/functions/acm.uwb0/port_num
+ chown system system /config/usb_gadget/g1/functions/audio_source.gs3
+ chown system system /config/usb_gadget/g1/functions/dm.gs7
+ chown system system /config/usb_gadget/g1/functions/ffs.adb
+ chown system system /config/usb_gadget/g1/functions/ffs.mtp
+ chown system system /config/usb_gadget/g1/functions/ffs.ptp
+ chown system system /config/usb_gadget/g1/functions/midi.gs5
+ chown system system /config/usb_gadget/g1/functions/midi.gs5/buflen
+ chown system system /config/usb_gadget/g1/functions/midi.gs5/id
+ chown system system /config/usb_gadget/g1/functions/midi.gs5/in_ports
+ chown system system /config/usb_gadget/g1/functions/midi.gs5/index
+ chown system system /config/usb_gadget/g1/functions/midi.gs5/out_ports
+ chown system system /config/usb_gadget/g1/functions/midi.gs5/qlen
+ chown system system /config/usb_gadget/g1/functions/mtp.gs0
+ chown system system /config/usb_gadget/g1/functions/mtp.gs0/os_desc
+ chown system system /config/usb_gadget/g1/functions/mtp.gs0/os_desc/interface.MTP
+ chown system system /config/usb_gadget/g1/functions/mtp.gs0/os_desc/interface.MTP/compatible_id
+ chown system system /config/usb_gadget/g1/functions/mtp.gs0/os_desc/interface.MTP/sub_compatible_id
+ chown system system /config/usb_gadget/g1/functions/ncm.gs9
+ chown system system /config/usb_gadget/g1/functions/ncm.gs9/dev_addr
+ chown system system /config/usb_gadget/g1/functions/ncm.gs9/host_addr
+ chown system system /config/usb_gadget/g1/functions/ncm.gs9/ifname
+ chown system system /config/usb_gadget/g1/functions/ncm.gs9/os_desc
+ chown system system /config/usb_gadget/g1/functions/ncm.gs9/os_desc/interface.ncm
+ chown system system /config/usb_gadget/g1/functions/ncm.gs9/os_desc/interface.ncm/compatible_id
+ chown system system /config/usb_gadget/g1/functions/ncm.gs9/os_desc/interface.ncm/sub_compatible_id
+ chown system system /config/usb_gadget/g1/functions/ncm.gs9/qmult
+ chown system system /config/usb_gadget/g1/functions/ptp.gs1
+ chown system system /config/usb_gadget/g1/functions/ptp.gs1/os_desc
+ chown system system /config/usb_gadget/g1/functions/ptp.gs1/os_desc/interface.MTP
+ chown system system /config/usb_gadget/g1/functions/ptp.gs1/os_desc/interface.MTP/compatible_id
+ chown system system /config/usb_gadget/g1/functions/ptp.gs1/os_desc/interface.MTP/sub_compatible_id
+ chown system system /config/usb_gadget/g1/functions/rndis.gs4
+ chown system system /config/usb_gadget/g1/functions/rndis.gs4/class
+ chown system system /config/usb_gadget/g1/functions/rndis.gs4/dev_addr
+ chown system system /config/usb_gadget/g1/functions/rndis.gs4/host_addr
+ chown system system /config/usb_gadget/g1/functions/rndis.gs4/ifname
+ chown system system /config/usb_gadget/g1/functions/rndis.gs4/os_desc
+ chown system system /config/usb_gadget/g1/functions/rndis.gs4/os_desc/interface.rndis
+ chown system system /config/usb_gadget/g1/functions/rndis.gs4/os_desc/interface.rndis/compatible_id
+ chown system system /config/usb_gadget/g1/functions/rndis.gs4/os_desc/interface.rndis/sub_compatible_id
+ chown system system /config/usb_gadget/g1/functions/rndis.gs4/protocol
+ chown system system /config/usb_gadget/g1/functions/rndis.gs4/qmult
+ chown system system /config/usb_gadget/g1/functions/rndis.gs4/subclass
+ chown system system /config/usb_gadget/g1/idProduct
+ chown system system /config/usb_gadget/g1/idVendor
+ chown system system /config/usb_gadget/g1/max_speed
+ chown system system /config/usb_gadget/g1/os_desc
+ chown system system /config/usb_gadget/g1/os_desc/b.1
+ chown system system /config/usb_gadget/g1/os_desc/b_vendor_code
+ chown system system /config/usb_gadget/g1/os_desc/qw_sign
+ chown system system /config/usb_gadget/g1/os_desc/use
+ chown system system /config/usb_gadget/g1/strings
+ chown system system /config/usb_gadget/g1/strings/0x409
+ chown system system /config/usb_gadget/g1/strings/0x409/manufacturer
+ chown system system /config/usb_gadget/g1/strings/0x409/product
+ chown system system /config/usb_gadget/g1/strings/0x409/serialnumber
+ setprop vendor.usb.functions.ready 1
+
+on boot
+ # Use USB Gadget HAL
+ setprop sys.usb.configfs 2
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=adb && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/idProduct 0x4EE7
+ write /config/usb_gadget/g1/idVendor 0x18D1
+
+on property:vendor.usb.config=*
+ start usbd
+
+on property:persist.vendor.usb.usbradio.config=*
+ start usbd
+
+on charger
+ mkdir /config/usb_gadget/g1
+ mkdir /config/usb_gadget/g1/strings/0x409
+ mkdir /config/usb_gadget/g1/configs/b.1
+ write /config/usb_gadget/g1/strings/0x409/serialnumber ${ro.serialno}
+ write /config/usb_gadget/g1/strings/0x409/manufacturer ${ro.product.manufacturer}
+ write /config/usb_gadget/g1/strings/0x409/product ${ro.product.model}
+ write /config/usb_gadget/g1/configs/b.1/MaxPower 0x384
+ write /config/usb_gadget/g1/os_desc/b_vendor_code 0x1
+ write /config/usb_gadget/g1/os_desc/qw_sign "MSFT100"
+ mkdir /config/usb_gadget/g1/functions/midi.gs5
+ symlink /config/usb_gadget/g1/configs/b.1 /config/usb_gadget/g1/os_desc/b.1
+ setprop sys.usb.controller "11210000.dwc3"
+ setprop sys.usb.configfs 1
+
+on property:ro.bootmode=charger
+ setprop sys.usb.config charger
+
+on property:sys.usb.config=charger && property:sys.usb.configfs=1
+ write /config/usb_gadget/g1/idVendor 0x18d1
+ write /config/usb_gadget/g1/idProduct 0x4eea
+ write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "midi"
+ symlink /config/usb_gadget/g1/functions/midi.gs5 /config/usb_gadget/g1/configs/b.1/f1
+ write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:ro.bootmode=usbuwb
+ setprop persist.vendor.usb.usbradio.config uwb_acm
diff --git a/conf/recovery.wipe b/conf/recovery.wipe
new file mode 100644
index 0000000..9ee7a1e
--- /dev/null
+++ b/conf/recovery.wipe
@@ -0,0 +1,3 @@
+# All the partitions to be wiped (in order) under recovery.
+/dev/block/by-name/userdata
+/dev/block/by-name/metadata
diff --git a/conf/soundtrigger_conf.h b/conf/soundtrigger_conf.h
new file mode 100644
index 0000000..1263c60
--- /dev/null
+++ b/conf/soundtrigger_conf.h
@@ -0,0 +1,109 @@
+/*
+ * Copyright (C) 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.
+ */
+#ifndef __EXYNOS_SOUNDTRIGGERCONF_H__
+#define __EXYNOS_SOUNDTRIGGERCONF_H__
+
+/********************************************************************/
+/** ALSA Framework Sound Card & Sound Device Information */
+/** */
+/** You can find Sound Device Name from /dev/snd. */
+/** Sound Device Name consist of Card Number & Device Number. */
+/** */
+/********************************************************************/
+
+/* Sound Card and Mixer card Numbers based on Target Device */
+/* You have to match this number with real kernel information */
+#define VTS_SOUND_CARD 0
+#define VTS_MIXER_CARD 0
+
+/* PCM Nodes number for seamless and normal recording*/
+#define VTS_TRICAP_DEVICE_NODE 13
+#define VTS_RECORD_DEVICE_NODE 14
+
+/* sysfs file paths for loading model binaries into VTS kernel driver */
+#define VTS_HOTWORD_MODEL "/sys/devices/platform/13810000.vts/vts_google_model"
+#define VTS_SVOICE_MODEL "/sys/devices/platform/13810000.vts/vts_svoice_model"
+
+#define AUDIO_PRIMARY_HAL_LIBRARY_PATH "/vendor/lib/libaudioproxy.so"
+
+// VTS Capture(Input) PCM Configuration
+#define DEFAULT_VTS_CHANNELS 1 // Mono
+#define DEFAULT_VTS_SAMPLING_RATE 16000 // 16KHz
+
+#define PRIMARY_VTS_PERIOD_SIZE 160 // 160 frames, 10ms in case of 16KHz Stream
+#define PRIMARY_VTS_PERIOD_COUNT 1024 // Buffer count => Total 327680 Bytes = 160 * 1(Mono) * 2(16bit PCM) * 1024(Buffer count)
+
+/* VTS mixer controls */
+#define VTS_ACTIVE_KEYPHRASE_CTL_NAME "VTS Active Keyphrase" /* default: 0-"SVOICE", 1-"GOOGLE", 2-"SENSORY" */
+#define VTS_EXECUTION_MODE_CTL_NAME "VTS Execution Mode" /* 0-"OFF-MODE", 1-"VOICE-TRIG-MODE", 2-"SOUND-DECTECT-MODE", 3-"VT-ALWAYS-MODE" 4-"GOOGLE-TRI-MODE */
+#define VTS_VOICERECOGNIZE_START_CTL_NAME "VTS VoiceRecognize Start" /* 0-"Off", 1-On" */
+#define VTS_VOICETRIGGER_VALUE_CTL_NAME "VTS VoiceTrigger Value" /* 0 ~ 2000 ms*/
+
+#define MAIN_MIC_CONTROL_COUNT 8
+#define HEADSET_MIC_CONTROL_COUNT 8
+#define MODEL_RECOGNIZE_CONTROL_COUNT 4
+
+/* MIC Mixer controls for VTS */
+char *main_mic_ctlname[] = {
+ "VTS DMIC SEL",
+ "VTS DMIC IF RCH EN",
+ "VTS DMIC IF LCH EN",
+ "VTS SYS SEL",
+ "VTS HPF EN",
+ "VTS HPF SEL",
+ "DMIC1 Switch",
+ "VTS Virtual Output Mux",
+};
+
+char *headset_mic_ctlname[] = {
+ "AUXPDM1 Rate",
+ "AUXPDM1 Input",
+ "AUXPDM1 Output Switch",
+ "AUXPDM Switch",
+ "VTS DMIC SEL",
+ "VTS DMIC IF RCH EN",
+ "VTS DMIC IF LCH EN",
+ "VTS SYS SEL",
+ "VTS HPF EN",
+ "VTS HPF SEL",
+};
+
+/* MIC Mixer control values */
+/* FIXME : Double check this values */
+int main_mic_ctlvalue[] = {
+ 0, //"VTS DMIC SEL",
+ 1, //"VTS DMIC IF RCH EN",
+ 1, //"VTS DMIC IF LCH EN",
+ 1, //"VTS SYS SEL",
+ 1, //"VTS HPF EN",
+ 1, //"VTS HPF SEL",
+ 1, //"DMIC1 Switch",
+ 1, //"VTS Virtual Output Mux",
+};
+
+int headset_mic_ctlvalue[] = {
+ 3, //"AUXPDM1 Rate",
+ 0, //"AUXPDM1 Input",
+ 1, //"AUXPDM1 Output Switch",
+ 1, //"AUXPDM Switch",
+ 1, //"VTS DMIC SEL",
+ 1, //"VTS DMIC IF RCH EN",
+ 1, //"VTS DMIC IF LCH EN",
+ 1, //"VTS SYS SEL",
+ 1, //"VTS HPF EN",
+ 1, //"VTS HPF SEL",
+};
+#endif // __EXYNOS_SOUNDTRIGGERCONF_H__
diff --git a/conf/ueventd.zumapro.rc b/conf/ueventd.zumapro.rc
new file mode 100644
index 0000000..80ee743
--- /dev/null
+++ b/conf/ueventd.zumapro.rc
@@ -0,0 +1,225 @@
+/dev/mali0 0666 system system
+/dev/ion 0666 system system
+/dev/ump 0666 system graphics
+/dev/exynos-mem 0660 system graphics
+/dev/video0 0660 system camera
+/dev/video1 0660 system camera
+/dev/video2 0660 system camera
+/dev/video3 0660 system camera
+/dev/video20 0660 system system
+# media0 is used for GSC, DECON, etc
+/dev/media0 0660 system camera
+# media1 is used for DECON Ext WB
+/dev/media1 0660 system graphics
+# Various devices use the v4l-subdev interface
+# We declare all such nodes simultaneously here
+/dev/v4l-subdev0 0660 system camera
+/dev/v4l-subdev1 0660 system camera
+/dev/v4l-subdev2 0660 system camera
+/dev/v4l-subdev3 0660 system camera
+/dev/v4l-subdev4 0660 system camera
+/dev/v4l-subdev5 0660 system camera
+/dev/v4l-subdev6 0660 system camera
+/dev/v4l-subdev7 0660 system camera
+/dev/v4l-subdev8 0660 system camera
+/dev/v4l-subdev9 0660 system camera
+/dev/v4l-subdev10 0660 system camera
+/dev/v4l-subdev11 0660 system camera
+/dev/v4l-subdev12 0660 system camera
+/dev/v4l-subdev13 0660 system camera
+/dev/v4l-subdev14 0660 system camera
+/dev/v4l-subdev15 0660 system camera
+/dev/v4l-subdev16 0660 system camera
+/dev/v4l-subdev17 0660 system camera
+/dev/v4l-subdev18 0660 system camera
+/dev/v4l-subdev19 0660 system camera
+# v4l-subdev20 is used for DECON Ext WB
+/dev/v4l-subdev20 0660 system graphics
+/dev/v4l-subdev21 0660 system graphics
+/dev/v4l-subdev32 0660 system graphics
+
+# gscalers
+/dev/video23 0660 media graphics
+/dev/video26 0660 media graphics
+/dev/video24 0660 media graphics
+/dev/video27 0660 media graphics
+/dev/video29 0660 media graphics
+/dev/video30 0660 media graphics
+# video31 is used for DECON Ext WB
+/dev/video31 0660 media graphics
+
+# mscalers
+/dev/video50 0660 mediacodec drmrpc
+/dev/m2m1shot_scaler0 0660 mediacodec drmrpc
+
+/dev/video55 0666 system graphics
+/dev/g2d 0660 system graphics
+/dev/fimg2d 0666 system graphics
+/dev/i2c-2 0660 system system
+/dev/HPD 0660 system system
+
+# wfd
+/dev/tsmux 0660 media graphics
+/dev/repeater 0660 media graphics
+
+# mfc
+/dev/video6 0660 mediacodec mediadrm
+/dev/video7 0660 mediacodec mediadrm
+/dev/video8 0660 mediacodec mediadrm
+/dev/video9 0660 mediacodec mediadrm
+/dev/video10 0660 mediacodec mediadrm
+/dev/video11 0660 mediacodec mediadrm
+
+# camera
+/dev/media2 0660 media media
+/dev/hdcp2 0660 media media
+
+# jpeg
+/dev/m2m1shot_jpeg 0660 media media
+/dev/video12 0660 system system
+
+# audio
+/dev/seiren 0660 system audio
+/dev/acd-audio_output_tuning 0660 system audio
+/dev/acd-audio_bulk_tx 0660 system audio
+/dev/acd-audio_bulk_rx 0660 system audio
+/dev/acd-audio_input_tuning 0660 system audio
+/dev/acd-audio_input_bulk_tx 0660 system audio
+/dev/acd-audio_input_bulk_rx 0660 system audio
+/dev/acd-sound_trigger 0660 system audio
+/dev/acd-hotword_notification 0660 system audio
+/dev/acd-hotword_pcm 0660 system audio
+/dev/acd-ambient_pcm 0660 system audio
+/dev/acd-model_data 0660 system audio
+/dev/acd-debug 0660 system audio
+/dev/acd-audio_tap* 0660 system audio
+/dev/acd-audio_dcdoff_ref 0660 system audio
+/dev/amcs 0660 system audio
+/dev/acd-audio_rtp_* 0660 system radio
+
+# Secure MEM driver
+/dev/s5p-smem 0660 drm drmrpc
+
+# cbd
+/dev/block/by-name/modem 0640 root radio
+/dev/block/by-name/modem_a 0640 root radio
+/dev/block/by-name/modem_b 0640 root radio
+
+# DM tools
+/dev/umts_dm0 0660 system system
+/dev/umts_router 0660 system system
+/dev/ttyGS0 0660 system system
+/dev/ttyGS1 0660 system system
+/dev/ttyGS2 0660 system system
+
+# IPC RIL
+/dev/umts_boot0 0660 radio system
+/dev/umts_ipc0 0660 radio radio
+/dev/umts_ipc1 0660 radio radio
+/dev/umts_rfs0 0660 radio radio
+
+# IPC OEM
+/dev/oem_ipc* 0660 radio radio
+/dev/oem_test 0660 radio radio
+
+# interactive governor parameters
+/sys/devices/system/cpu/cpu* cpufreq/interactive/timer_rate 0660 system system
+/sys/devices/system/cpu/cpu* cpufreq/interactive/timer_slack 0660 system system
+/sys/devices/system/cpu/cpu* cpufreq/interactive/min_sample_time 0660 system system
+/sys/devices/system/cpu/cpu* cpufreq/interactive/hispeed_freq 0660 system system
+/sys/devices/system/cpu/cpu* cpufreq/interactive/target_loads 0660 system system
+/sys/devices/system/cpu/cpu* cpufreq/interactive/go_hispeed_load 0660 system system
+/sys/devices/system/cpu/cpu* cpufreq/interactive/above_hispeed_delay 0660 system system
+/sys/devices/system/cpu/cpu* cpufreq/interactive/boost 0660 system system
+/sys/devices/system/cpu/cpu* cpufreq/interactive/boostpulse 0200 system system
+/sys/devices/system/cpu/cpu* cpufreq/interactive/input_boost 0660 system system
+/sys/devices/system/cpu/cpu* cpufreq/interactive/boostpulse_duration 0660 system system
+/sys/devices/system/cpu/cpu* cpufreq/interactive/io_is_busy 0660 system system
+
+# Vision (VPU, SCORE)
+/dev/vertex0 0660 media media
+/dev/vertex1 0660 media media
+
+# AoC
+/dev/aoc 0660 system system
+
+# Sensors (USF)
+/dev/acd-com.google.usf 0660 system system
+/dev/acd-com.google.usf.non_wake_up 0660 system system
+
+# LWIS
+/dev/lwis* 0660 system system
+
+# NFC
+/dev/st21nfc 0660 nfc nfc
+
+# UWB
+/dev/uci 0660 uwb uwb
+
+# SecureElement
+/dev/st54spi 0660 secure_element secure_element
+
+#bigwave
+/dev/bigwave 0660 mediacodec mediadrm
+
+# Trusty
+/dev/trusty-ipc-dev0 0660 system drmrpc
+/dev/trusty-log0 0660 system system
+/dev/block/platform/13200000\.ufs/by-name/trusty_persist 0660 system system
+
+# RPMB
+/dev/sg1 0660 system system
+
+# Citadel
+/dev/gsc0 0660 hsm hsm
+
+# Storage: for factory reset protection feature
+/dev/block/by-name/frp 0660 system system
+
+# Storage: for UDFPS calibration data sideload feature
+/dev/block/by-name/mfg_data 0660 system system
+
+# TPU
+/dev/edgetpu-soc 0660 system system
+
+# DSP
+/dev/gxp 0666 system camera
+
+# TOE
+/dev/dit2 0660 radio radio
+
+# Bluetooth
+/dev/ttySAC18 0660 bluetooth system
+/dev/btpower 0660 bluetooth system
+
+# BT Wifi Coexistence
+/dev/wbrc 0660 system system
+
+# TUI
+/dev/tui-driver 0660 system system
+
+# DMA-BUF heaps
+/dev/dma_heap/crypto 0444 system graphics
+/dev/dma_heap/crypto-uncached 0444 system graphics
+/dev/dma_heap/faceauth_dsp-secure 0444 system graphics
+/dev/dma_heap/faceauth_tpu-secure 0444 system graphics
+/dev/dma_heap/faimg-secure 0444 system graphics
+/dev/dma_heap/famodel-secure 0444 system graphics
+/dev/dma_heap/faprev-secure 0444 system graphics
+/dev/dma_heap/farawimg-secure 0444 system graphics
+/dev/dma_heap/tui-secure 0444 system graphics
+/dev/dma_heap/vframe-secure 0444 system drmrpc
+/dev/dma_heap/vscaler-secure 0444 system graphics
+/dev/dma_heap/vstream-secure 0444 system drmrpc
+/dev/dma_heap/sensor_direct_heap 0444 system graphics
+/dev/dma_heap/aaudio_playback_heap 0444 system audio
+/dev/dma_heap/aaudio_capture_heap 0444 system audio
+
+# Direct Charging
+/dev/logbuffer_pca9468_tcpm 0600 system system
+
+# Raw HID devices
+/dev/hidraw* 0660 system system
+
+# Wlan
+/dev/wlan 0660 wifi wifi
diff --git a/default-permissions.xml b/default-permissions.xml
new file mode 100644
index 0000000..8a0f653
--- /dev/null
+++ b/default-permissions.xml
@@ -0,0 +1,130 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/device-common.mk b/device-common.mk
new file mode 100644
index 0000000..c230ef2
--- /dev/null
+++ b/device-common.mk
@@ -0,0 +1,55 @@
+#
+# Copyright (C) 2020 The Android Open-Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+-include vendor/google_devices/zumapro/proprietary/telephony/device-vendor.mk
+include device/google/zumapro/device.mk
+
+# Telephony
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.hardware.telephony.carrierlock.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.telephony.carrierlock.xml
+
+# Android Verified Boot
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.software.verified_boot.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.verified_boot.xml
+
+# Factory OTA
+-include vendor/unbundled_google/packages/FactoryOtaPrebuilt/factoryota.mk
+
+# Set system properties identifying the chipset
+PRODUCT_VENDOR_PROPERTIES += ro.soc.manufacturer=Google
+PRODUCT_VENDOR_PROPERTIES += ro.soc.model=ZUMAPRO
+
+PRODUCT_PRODUCT_PROPERTIES += \
+ persist.vendor.testing_battery_profile=2
+
+# The default value of this variable is false and should only be set to true when
+# the device allows users to retain eSIM profiles after factory reset of user data.
+PRODUCT_PRODUCT_PROPERTIES += \
+ masterclear.allow_retain_esim_profiles_after_fdr=true
+
+# ZramWriteback
+-include hardware/google/pixel/mm/device_gki.mk
+
+# Set thermal warm reset
+PRODUCT_PRODUCT_PROPERTIES += \
+ ro.thermal_warmreset = true
+
+# Indicate that the bootloader supports the MTE developer option switch
+# (MISC_MEMTAG_MODE_MEMTAG_ONCE), with the exception of _fullmte products that
+# force enable MTE.
+ifeq (,$(filter %_fullmte,$(TARGET_PRODUCT)))
+PRODUCT_PRODUCT_PROPERTIES += ro.arm64.memtag.bootctl_supported=1
+endif
diff --git a/device-shipping-common.mk b/device-shipping-common.mk
new file mode 100644
index 0000000..445df19
--- /dev/null
+++ b/device-shipping-common.mk
@@ -0,0 +1,16 @@
+#
+# Copyright (C) 2020 The Android Open-Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+include device/google/zumapro/device-common.mk
diff --git a/device.mk b/device.mk
new file mode 100644
index 0000000..f52336a
--- /dev/null
+++ b/device.mk
@@ -0,0 +1,1132 @@
+#
+# Copyright (C) 2011 The Android Open-Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+include device/google/gs-common/device.mk
+include device/google/gs-common/gs_watchdogd/watchdog.mk
+include device/google/gs-common/ramdump/ramdump.mk
+include device/google/gs-common/soc/soc.mk
+include device/google/gs-common/modem/modem.mk
+include device/google/gs-common/aoc/aoc.mk
+include device/google/gs-common/trusty/trusty.mk
+include device/google/gs-common/pcie/pcie.mk
+include device/google/gs-common/storage/storage.mk
+include device/google/gs-common/thermal/thermal.mk
+include device/google/gs-common/performance/perf.mk
+include device/google/gs-common/pixel_metrics/pixel_metrics.mk
+include device/google/gs-common/soc/freq.mk
+include device/google/gs-common/gps/dump/log.mk
+include device/google/gs-common/display/dump.mk
+include device/google/gs-common/gxp/dump.mk
+include device/google/gs-common/camera/dump.mk
+include device/google/gs-common/radio/dump.mk
+include device/google/gs-common/gear/dumpstate/aidl.mk
+
+include device/google/zumapro/dumpstate/item.mk
+
+ifneq ($(BOARD_WITHOUT_RADIO),true)
+include device/google/gs-common/gps/brcm/device_v2.mk
+endif
+
+TARGET_BOARD_PLATFORM := zumapro
+ALLOW_MISSING_DEPENDENCIES := true
+
+AB_OTA_POSTINSTALL_CONFIG += \
+ RUN_POSTINSTALL_system=true \
+ POSTINSTALL_PATH_system=system/bin/otapreopt_script \
+ FILESYSTEM_TYPE_system=ext4 \
+POSTINSTALL_OPTIONAL_system=true
+
+# Set Vendor SPL to match platform
+VENDOR_SECURITY_PATCH = $(PLATFORM_SECURITY_PATCH)
+
+# Set boot SPL
+BOOT_SECURITY_PATCH = $(PLATFORM_SECURITY_PATCH)
+
+# TODO(b/207450311): Remove this flag once implemented
+USE_PIXEL_GRALLOC := false
+ifeq ($(USE_PIXEL_GRALLOC),true)
+ PRODUCT_SOONG_NAMESPACES += hardware/google/gchips/GrallocHAL
+endif
+
+PRODUCT_SOONG_NAMESPACES += \
+ hardware/google/av \
+ hardware/google/gchips \
+ hardware/google/gchips/gralloc4 \
+ hardware/google/graphics/common \
+ hardware/google/graphics/zumapro \
+ hardware/google/interfaces \
+ hardware/google/pixel \
+ device/google/zumapro \
+ device/google/zumapro/powerstats \
+ system/chre/host/hal_generic \
+ vendor/google/whitechapel/tools \
+ vendor/google/interfaces \
+ vendor/google_devices/common/proprietary/confirmatioui_hal \
+ vendor/google_nos/host/android \
+ vendor/google_nos/test/system-test-harness \
+ vendor/google/camera
+
+LOCAL_KERNEL := $(TARGET_KERNEL_DIR)/Image.lz4
+
+# Set the environment variable to switch the Keymint HAL service to Rust
+TRUSTY_KEYMINT_IMPL := rust
+
+# OEM Unlock reporting
+PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
+ ro.oem_unlock_supported=1
+
+# Include vendor telephony soong namespace
+PRODUCT_SOONG_NAMESPACES += \
+ vendor/samsung_slsi/telephony/$(BOARD_USES_SHARED_VENDOR_TELEPHONY)
+
+ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
+#Set IKE logs to verbose for WFC
+PRODUCT_PROPERTY_OVERRIDES += log.tag.IKE=VERBOSE
+
+#Set Shannon IMS logs to debug
+PRODUCT_PROPERTY_OVERRIDES += log.tag.SHANNON_IMS=DEBUG
+
+#Set Shannon QNS logs to debug
+PRODUCT_PROPERTY_OVERRIDES += log.tag.ShannonQNS=DEBUG
+PRODUCT_PROPERTY_OVERRIDES += log.tag.ShannonQNS-ims=DEBUG
+PRODUCT_PROPERTY_OVERRIDES += log.tag.ShannonQNS-emergency=DEBUG
+PRODUCT_PROPERTY_OVERRIDES += log.tag.ShannonQNS-mms=DEBUG
+PRODUCT_PROPERTY_OVERRIDES += log.tag.ShannonQNS-xcap=DEBUG
+PRODUCT_PROPERTY_OVERRIDES += log.tag.ShannonQNS-HC=DEBUG
+
+# Modem userdebug
+include device/google/zumapro/modem/userdebug.mk
+endif
+
+ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
+# b/36703476: Set default log size to 1M
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.logd.size=1M
+# b/114766334: persist all logs by default rotating on 30 files of 1MiB
+PRODUCT_PROPERTY_OVERRIDES += \
+ logd.logpersistd=logcatd \
+ logd.logpersistd.size=30
+endif
+
+# From system.property
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.telephony.default_network=27 \
+ persist.vendor.ril.db_ecc.use.iccid_to_plmn=1 \
+ persist.vendor.ril.db_ecc.id.type=5
+ #rild.libpath=/system/lib64/libsec-ril.so \
+ #rild.libargs=-d /dev/umts_ipc0
+
+# SIT-RIL Logging setting
+PRODUCT_PROPERTY_OVERRIDES += \
+ persist.vendor.ril.log_mask=3 \
+ persist.vendor.ril.log.base_dir=/data/vendor/radio/sit-ril \
+ persist.vendor.ril.log.chunk_size=5242880 \
+ persist.vendor.ril.log.num_file=3
+
+# Enable reboot free DSDS
+PRODUCT_PRODUCT_PROPERTIES += \
+ persist.radio.reboot_on_modem_change=false
+
+# Configure DSDS by default
+PRODUCT_PRODUCT_PROPERTIES += \
+ persist.radio.multisim.config=dsds
+
+# Enable Early Camping
+PRODUCT_PRODUCT_PROPERTIES += \
+ persist.vendor.ril.camp_on_earlier=1
+
+# Enable SET_SCREEN_STATE request
+PRODUCT_PROPERTY_OVERRIDES += \
+ persist.vendor.ril.enable_set_screen_state=1
+
+# Set the Bluetooth Class of Device
+# Service Field: 0x5A -> 90
+# Bit 14: LE audio
+# Bit 17: Networking
+# Bit 19: Capturing
+# Bit 20: Object Transfer
+# Bit 22: Telephony
+# MAJOR_CLASS: 0x42 -> 66 (Phone)
+# MINOR_CLASS: 0x0C -> 12 (Smart Phone)
+PRODUCT_PRODUCT_PROPERTIES += \
+ bluetooth.device.class_of_device=90,66,12
+
+# Set supported Bluetooth profiles to enabled
+PRODUCT_PRODUCT_PROPERTIES += \
+ bluetooth.profile.asha.central.enabled=true \
+ bluetooth.profile.a2dp.source.enabled=true \
+ bluetooth.profile.avrcp.target.enabled=true \
+ bluetooth.profile.bap.broadcast.assist.enabled=true \
+ bluetooth.profile.bap.unicast.server.enabled=true \
+ bluetooth.profile.bas.client.enabled=true \
+ bluetooth.profile.csip.set_coordinator.enabled=true \
+ bluetooth.profile.gatt.enabled=true \
+ bluetooth.profile.hap.client.enabled=true \
+ bluetooth.profile.hfp.ag.enabled=true \
+ bluetooth.profile.hid.device.enabled=true \
+ bluetooth.profile.hid.host.enabled=true \
+ bluetooth.profile.map.server.enabled=true \
+ bluetooth.profile.mcp.server.enabled=true \
+ bluetooth.profile.opp.enabled=true \
+ bluetooth.profile.pan.nap.enabled=true \
+ bluetooth.profile.pan.panu.enabled=true \
+ bluetooth.profile.pbap.server.enabled=true \
+ bluetooth.profile.sap.server.enabled=true \
+ bluetooth.profile.tbs.server.enabled=true \
+ bluetooth.profile.vc.server.enabled=true
+
+# Carrier configuration default location
+PRODUCT_PROPERTY_OVERRIDES += \
+ persist.vendor.radio.config.carrier_config_dir=/mnt/vendor/modem_img/images/default/confpack
+
+PRODUCT_PROPERTY_OVERRIDES += \
+ telephony.active_modems.max_count=2
+
+USE_LASSEN_OEMHOOK := true
+
+# Use for GRIL
+USES_LASSEN_MODEM := true
+
+ifeq ($(USES_GOOGLE_DIALER_CARRIER_SETTINGS),true)
+USE_GOOGLE_DIALER := true
+USE_GOOGLE_CARRIER_SETTINGS := true
+endif
+
+# Audio client implementation for RIL
+USES_GAUDIO := true
+
+# ######################
+# GRAPHICS - GPU (begin)
+
+# Must match BOARD_USES_SWIFTSHADER in BoardConfig.mk
+USE_SWIFTSHADER := false
+
+# HWUI
+TARGET_USES_VULKAN = true
+
+PRODUCT_SOONG_NAMESPACES += \
+ vendor/arm/mali/valhall
+
+$(call soong_config_set,pixel_mali,soc,$(TARGET_BOARD_PLATFORM))
+$(call soong_config_set,arm_gralloc,soc,$(TARGET_BOARD_PLATFORM))
+
+include device/google/gs101/neuralnetwork/neuralnetwork.mk
+
+PRODUCT_PACKAGES += \
+ csffw_image_prebuilt__firmware_prebuilt_ttux_mali_csffw.bin \
+ libGLES_mali \
+ vulkan.mali \
+ libOpenCL \
+ libgpudataproducer
+
+ifeq ($(USE_SWIFTSHADER),true)
+PRODUCT_PACKAGES += \
+ libEGL_angle \
+ libGLESv1_CM_angle \
+ libGLESv2_angle \
+ vulkan.pastel
+
+PRODUCT_VENDOR_PROPERTIES += \
+ ro.hardware.egl=angle \
+ ro.hardware.vulkan=pastel
+else
+PRODUCT_VENDOR_PROPERTIES += \
+ ro.hardware.vulkan=mali
+endif
+
+# Mali Configuration Properties
+# b/221255664 prevents setting PROTECTED_MAX_CORE_COUNT=2
+PRODUCT_VENDOR_PROPERTIES += \
+ vendor.mali.protected_max_core_count=1 \
+ vendor.mali.protected_tls_max=67108864 \
+ vendor.mali.platform_agt_frequency_khz=24576
+
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.hardware.opengles.aep.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.opengles.aep.xml \
+ frameworks/native/data/etc/android.hardware.vulkan.version-1_3.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.version.xml \
+ frameworks/native/data/etc/android.hardware.vulkan.level-1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.level.xml \
+ frameworks/native/data/etc/android.hardware.vulkan.compute-0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.compute.xml \
+ frameworks/native/data/etc/android.software.vulkan.deqp.level-2021-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.vulkan.deqp.level.xml \
+ frameworks/native/data/etc/android.software.opengles.deqp.level-2021-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.opengles.deqp.level.xml
+
+#endif
+
+PRODUCT_VENDOR_PROPERTIES += \
+ ro.opengles.version=196610 \
+ graphics.gpu.profiler.support=true \
+ debug.renderengine.backend=skiavkthreaded \
+
+# GRAPHICS - GPU (end)
+# ####################
+
+# Device Manifest, Device Compatibility Matrix for Treble
+DEVICE_MANIFEST_FILE := \
+ device/google/zumapro/manifest.xml
+
+ifneq (,$(filter aosp_%,$(TARGET_PRODUCT)))
+DEVICE_MANIFEST_FILE += \
+ device/google/zumapro/manifest_media_aosp.xml
+
+PRODUCT_COPY_FILES += \
+ device/google/zumapro/media_codecs_aosp_c2.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_c2.xml
+else
+DEVICE_MANIFEST_FILE += \
+ device/google/zumapro/manifest_media.xml
+
+PRODUCT_COPY_FILES += \
+ device/google/zumapro/media_codecs_bo_c2.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_c2.xml \
+ device/google/zumapro/media_codecs_aosp_c2.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_aosp_c2.xml
+endif
+
+DEVICE_MATRIX_FILE := \
+ device/google/zumapro/compatibility_matrix.xml
+
+DEVICE_PACKAGE_OVERLAYS += device/google/zumapro/overlay
+
+# This will be updated to 34 (Android U) for shipping
+PRODUCT_SHIPPING_API_LEVEL := 33
+
+# RKP VINTF
+-include vendor/google_nos/host/android/hals/keymaster/aidl/strongbox/RemotelyProvisionedComponent-citadel.mk
+
+# Enforce the Product interface
+PRODUCT_PRODUCT_VNDK_VERSION := current
+PRODUCT_ENFORCE_PRODUCT_PARTITION_INTERFACE := true
+
+# Init files
+PRODUCT_COPY_FILES += \
+ $(LOCAL_KERNEL):kernel \
+ device/google/zumapro/conf/init.zumapro.usb.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.zumapro.usb.rc \
+ device/google/zumapro/conf/ueventd.zumapro.rc:$(TARGET_COPY_OUT_VENDOR)/etc/ueventd.rc
+
+PRODUCT_COPY_FILES += \
+ device/google/zumapro/conf/init.zumapro.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.zumapro.rc
+
+ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
+PRODUCT_COPY_FILES += \
+ device/google/zumapro/conf/init.debug.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.debug.rc
+PRODUCT_COPY_FILES += \
+ device/google/zumapro/conf/init.freq.userdebug.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.freq.userdebug.rc
+endif
+
+# Recovery files
+PRODUCT_COPY_FILES += \
+ device/google/zumapro/conf/init.recovery.device.rc:$(TARGET_COPY_OUT_RECOVERY)/root/init.recovery.zumapro.rc
+
+# Fstab files
+PRODUCT_PACKAGES += \
+ fstab.zumapro \
+ fstab.zumapro.vendor_ramdisk \
+ fstab.zumapro-fips \
+ fstab.zumapro-fips.vendor_ramdisk
+
+PRODUCT_COPY_FILES += \
+ device/google/$(TARGET_BOARD_PLATFORM)/conf/fstab.persist:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.persist \
+ device/google/$(TARGET_BOARD_PLATFORM)/conf/fstab.modem:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.modem
+
+include device/google/gs-common/insmod/insmod.mk
+
+# Insmod config files
+PRODUCT_COPY_FILES += \
+ $(call find-copy-subdir-files,init.insmod.*.cfg,$(TARGET_KERNEL_DIR),$(TARGET_COPY_OUT_VENDOR_DLKM)/etc)
+
+# For creating dtbo image
+PRODUCT_HOST_PACKAGES += \
+ mkdtimg
+
+PRODUCT_PACKAGES += \
+ messaging
+
+# Contexthub HAL
+PRODUCT_PACKAGES += \
+ android.hardware.contexthub-service.generic
+
+# CHRE tools
+ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
+PRODUCT_PACKAGES += \
+ chre_power_test_client \
+ chre_test_client
+endif
+
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.hardware.context_hub.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.context_hub.xml
+
+## Enable the CHRE Daemon
+CHRE_USF_DAEMON_ENABLED := true
+PRODUCT_PACKAGES += \
+ chre \
+ preloaded_nanoapps.json
+
+# Filesystem management tools
+PRODUCT_PACKAGES += \
+ linker.vendor_ramdisk \
+ tune2fs.vendor_ramdisk \
+ resize2fs.vendor_ramdisk
+
+# Userdata Checkpointing OTA GC
+PRODUCT_PACKAGES += \
+ checkpoint_gc
+
+# Vendor verbose logging default property
+ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
+PRODUCT_PROPERTY_OVERRIDES += \
+ persist.vendor.verbose_logging_enabled=true
+else
+PRODUCT_PROPERTY_OVERRIDES += \
+ persist.vendor.verbose_logging_enabled=false
+endif
+
+# CP Logging properties
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.vendor.sys.modem.logging.loc = /data/vendor/slog \
+ persist.vendor.sys.silentlog.tcp = "On" \
+ ro.vendor.cbd.modem_removable = "1" \
+ ro.vendor.cbd.modem_type = "s5100sit" \
+ persist.vendor.sys.modem.logging.br_num=5 \
+ persist.vendor.sys.modem.logging.enable=true
+
+# Enable silent CP crash handling
+ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
+PRODUCT_PROPERTY_OVERRIDES += \
+ persist.vendor.ril.crash_handling_mode=1
+else
+PRODUCT_PROPERTY_OVERRIDES += \
+ persist.vendor.ril.crash_handling_mode=2
+endif
+
+# Add support dual SIM mode
+PRODUCT_PROPERTY_OVERRIDES += \
+ persist.vendor.radio.multisim_switch_support=true
+
+# RPMB TA
+PRODUCT_PACKAGES += \
+ tlrpmb
+
+# Touch firmware
+#PRODUCT_COPY_FILES += \
+ device/google/zumapro/firmware/touch/s6sy761.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/s6sy761.fw
+# Touch
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.hardware.touchscreen.multitouch.jazzhand.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml
+
+# Sensors
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.hardware.sensor.accelerometer.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.accelerometer.xml \
+ frameworks/native/data/etc/android.hardware.sensor.barometer.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.barometer.xml \
+ frameworks/native/data/etc/android.hardware.sensor.compass.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.compass.xml \
+ frameworks/native/data/etc/android.hardware.sensor.dynamic.head_tracker.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.dynamic.head_tracker.xml \
+ frameworks/native/data/etc/android.hardware.sensor.gyroscope.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.gyroscope.xml \
+ frameworks/native/data/etc/android.hardware.sensor.hifi_sensors.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.hifi_sensors.xml \
+ frameworks/native/data/etc/android.hardware.sensor.light.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.light.xml\
+ frameworks/native/data/etc/android.hardware.sensor.proximity.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.proximity.xml \
+ frameworks/native/data/etc/android.hardware.sensor.stepcounter.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.stepcounter.xml \
+ frameworks/native/data/etc/android.hardware.sensor.stepdetector.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.stepdetector.xml
+
+# Add sensor HAL AIDL product packages
+PRODUCT_PACKAGES += android.hardware.sensors-service.multihal
+
+# USB HAL
+PRODUCT_PACKAGES += \
+ android.hardware.usb-service
+PRODUCT_PACKAGES += \
+ android.hardware.usb.gadget-service
+
+# MIDI feature
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.software.midi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.midi.xml
+
+# default usb debug functions
+ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
+PRODUCT_PROPERTY_OVERRIDES += \
+ persist.vendor.usb.usbradio.config=dm
+endif
+
+# adpf 16ms update rate
+PRODUCT_PRODUCT_PROPERTIES += \
+ vendor.powerhal.adpf.rate=16666666
+
+PRODUCT_COPY_FILES += \
+ device/google/zumapro/task_profiles.json:$(TARGET_COPY_OUT_VENDOR)/etc/task_profiles.json
+
+-include hardware/google/pixel/power-libperfmgr/aidl/device.mk
+
+# IRQ rebalancing.
+include hardware/google/pixel/rebalance_interrupts/rebalance_interrupts.mk
+
+# PowerStats HAL
+PRODUCT_PACKAGES += \
+ android.hardware.power.stats-service.pixel
+
+#
+# Audio HALs
+#
+
+# Audio Configurations
+#USE_LEGACY_LOCAL_AUDIO_HAL := false
+#USE_XML_AUDIO_POLICY_CONF := 1
+
+# Enable AAudio MMAP/NOIRQ data path.
+PRODUCT_PROPERTY_OVERRIDES += aaudio.mmap_policy=2
+PRODUCT_PROPERTY_OVERRIDES += aaudio.mmap_exclusive_policy=2
+PRODUCT_PROPERTY_OVERRIDES += aaudio.hw_burst_min_usec=2000
+
+# Calliope firmware overwrite
+#PRODUCT_COPY_FILES += \
+ device/google/zumapro/firmware/calliope_dram.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/calliope_dram.bin \
+ device/google/zumapro/firmware/calliope_sram.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/calliope_sram.bin \
+ device/google/zumapro/firmware/calliope_dram_2.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/calliope_dram_2.bin \
+ device/google/zumapro/firmware/calliope_sram_2.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/calliope_sram_2.bin \
+ device/google/zumapro/firmware/calliope2.dt:$(TARGET_COPY_OUT_VENDOR)/firmware/calliope2.dt \
+
+# Cannot reference variables defined in BoardConfig.mk, uncomment this if
+# BOARD_USE_OFFLOAD_AUDIO and BOARD_USE_OFFLOAD_EFFECT are true
+## AudioEffectHAL library
+#PRODUCT_PACKAGES += \
+# libexynospostprocbundle
+
+# Cannot reference variables defined in BoardConfig.mk, uncomment this if
+# BOARD_USE_SOUNDTRIGGER_HAL is true
+#PRODUCT_PACKAGES += \
+# sound_trigger.primary.maran9820
+
+# A-Box Service Daemon
+#PRODUCT_PACKAGES += main_abox
+
+# Libs
+PRODUCT_PACKAGES += \
+ com.android.future.usb.accessory
+
+PRODUCT_PACKAGES += \
+ android.hardware.graphics.mapper@4.0-impl \
+ android.hardware.graphics.allocator-V1-service
+
+PRODUCT_PACKAGES += \
+ memtrack.$(TARGET_BOARD_PLATFORM) \
+ libion_exynos \
+ libion
+
+PRODUCT_PACKAGES += \
+ libhwjpeg
+
+# Video Editor
+PRODUCT_PACKAGES += \
+ VideoEditorGoogle
+
+# WideVine modules
+include device/google/zumapro/widevine/device.mk
+PRODUCT_PACKAGES += \
+ liboemcrypto \
+
+RIPCURRENTPRO_PRODUCT := %ripcurrentpro
+ifneq (,$(filter $(RIPCURRENTPRO_PRODUCT), $(TARGET_PRODUCT)))
+ LOCAL_TARGET_PRODUCT := ripcurrentpro
+else
+ # WAR: continue defaulting to slider build on zumapro
+ LOCAL_TARGET_PRODUCT := slider
+endif
+
+$(call soong_config_set,google3a_config,soc,zumapro)
+$(call soong_config_set,google3a_config,gcam_awb,true)
+$(call soong_config_set,google3a_config,ghawb_truetone,true)
+
+ifneq ($(wildcard vendor/google/services/LyricCameraHAL/src),)
+$(call soong_config_set,lyric,soc,zumapro)
+$(call soong_config_set,lyric,use_lyric_camera_hal,true)
+$(call soong_config_set,lyric,kernel_version,v515)
+# lyric::tuning_product is set in device-specific makefiles,
+# such as device/google/${DEVICE}/device-${DEVICE}.mk
+
+$(call soong_config_set,gch,hwl_library,lyric)
+endif
+
+# WiFi
+PRODUCT_PACKAGES += \
+ android.hardware.wifi-service \
+ wificond \
+ libwpa_client
+
+# Connectivity
+PRODUCT_PACKAGES += \
+ ConnectivityOverlay
+
+PRODUCT_PACKAGES_DEBUG += \
+ f2fs_io \
+ check_f2fs \
+ f2fs.fibmap \
+ dump.f2fs
+
+# Storage health HAL
+PRODUCT_PACKAGES += \
+ android.hardware.health.storage-service.default
+
+# Battery Mitigation
+include device/google/gs-common/battery_mitigation/bcl.mk
+# storage pixelstats
+-include hardware/google/pixel/pixelstats/device.mk
+
+# Enable project quotas and casefolding for emulated storage without sdcardfs
+$(call inherit-product, $(SRC_TARGET_DIR)/product/emulated_storage.mk)
+
+$(call inherit-product, $(SRC_TARGET_DIR)/product/virtual_ab_ota/android_t_baseline.mk)
+PRODUCT_VIRTUAL_AB_COMPRESSION_METHOD := gz
+
+# Enforce generic ramdisk allow list
+$(call inherit-product, $(SRC_TARGET_DIR)/product/generic_ramdisk.mk)
+
+# Titan-M
+ifeq (,$(filter true, $(BOARD_WITHOUT_DTLS)))
+include device/google/gs-common/dauntless/gsc.mk
+endif
+
+PRODUCT_PACKAGES_DEBUG += \
+ WvInstallKeybox
+
+# Copy Camera HFD Setfiles
+#PRODUCT_COPY_FILES += \
+ device/google/zumapro/firmware/camera/libhfd/default_configuration.hfd.cfg.json:$(TARGET_COPY_OUT_VENDOR)/firmware/default_configuration.hfd.cfg.json \
+ device/google/zumapro/firmware/camera/libhfd/pp_cfg.json:$(TARGET_COPY_OUT_VENDOR)/firmware/pp_cfg.json \
+ device/google/zumapro/firmware/camera/libhfd/tracker_cfg.json:$(TARGET_COPY_OUT_VENDOR)/firmware/tracker_cfg.json \
+ device/google/zumapro/firmware/camera/libhfd/WithLightFixNoBN.SDNNmodel:$(TARGET_COPY_OUT_VENDOR)/firmware/WithLightFixNoBN.SDNNmodel
+
+# WiFi
+PRODUCT_COPY_FILES += \
+ 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.direct.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.direct.xml \
+ frameworks/native/data/etc/android.hardware.wifi.aware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.aware.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.rtt.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.rtt.xml
+
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.hardware.usb.host.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.host.xml \
+ frameworks/native/data/etc/android.hardware.usb.accessory.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.accessory.xml
+
+PRODUCT_COPY_FILES += \
+ 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.front.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.front.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.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\
+
+#PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.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.direct.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.direct.xml \
+ frameworks/native/data/etc/android.hardware.wifi.passpoint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.passpoint.xml \
+
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.hardware.audio.low_latency.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.low_latency.xml \
+ frameworks/native/data/etc/android.hardware.audio.pro.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.pro.xml \
+
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.software.ipsec_tunnels.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.ipsec_tunnels.xml \
+
+PRODUCT_PROPERTY_OVERRIDES += \
+ debug.slsi_platform=1 \
+ debug.hwc.winupdate=1
+
+ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
+PRODUCT_PACKAGES += displaycolor_service
+endif
+
+PRODUCT_PROPERTY_OVERRIDES += \
+ debug.sf.disable_backpressure=0 \
+ debug.sf.enable_gl_backpressure=1 \
+ debug.sf.enable_sdr_dimming=1
+
+# Camera
+PRODUCT_PROPERTY_OVERRIDES += \
+ vendor.camera.multicam.enable_p23_multicam=true
+
+PRODUCT_DEFAULT_PROPERTY_OVERRIDES += debug.sf.use_phase_offsets_as_durations=1
+PRODUCT_DEFAULT_PROPERTY_OVERRIDES += debug.sf.late.sf.duration=10500000
+PRODUCT_DEFAULT_PROPERTY_OVERRIDES += debug.sf.late.app.duration=16600000
+PRODUCT_DEFAULT_PROPERTY_OVERRIDES += debug.sf.early.sf.duration=16600000
+PRODUCT_DEFAULT_PROPERTY_OVERRIDES += debug.sf.early.app.duration=16600000
+PRODUCT_DEFAULT_PROPERTY_OVERRIDES += debug.sf.earlyGl.sf.duration=16600000
+PRODUCT_DEFAULT_PROPERTY_OVERRIDES += debug.sf.earlyGl.app.duration=16600000
+PRODUCT_DEFAULT_PROPERTY_OVERRIDES += debug.sf.frame_rate_multiple_threshold=120
+
+PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.enable_layer_caching=true
+PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.set_idle_timer_ms?=80
+PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.set_touch_timer_ms=200
+PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.set_display_power_timer_ms=1000
+PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.use_content_detection_for_refresh_rate=true
+PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.max_frame_buffer_acquired_buffers=3
+
+PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.supports_background_blur=1
+PRODUCT_SYSTEM_PROPERTIES += ro.launcher.blur.appLaunch=0
+
+# Must align with HAL types Dataspace
+# The data space of wide color gamut composition preference is Dataspace::DISPLAY_P3
+PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.wcg_composition_dataspace=143261696
+
+# Display
+PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.has_wide_color_display=true
+PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.has_HDR_display=true
+PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.use_color_management=true
+PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.protected_contents=true
+PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.display_update_imminent_timeout_ms=50
+
+# force to blend in P3 mode
+PRODUCT_PROPERTY_OVERRIDES += \
+ persist.sys.sf.native_mode=2 \
+ persist.sys.sf.color_mode=9
+PRODUCT_COPY_FILES += \
+ device/google/zumapro/display/display_colordata_cal0.pb:$(TARGET_COPY_OUT_VENDOR)/etc/display_colordata_cal0.pb
+
+# limit DPP downscale ratio
+PRODUCT_DEFAULT_PROPERTY_OVERRIDES += vendor.hwc.dpp.downscale=2
+
+# Cannot reference variables defined in BoardConfig.mk, uncomment this if
+# BOARD_USES_EXYNOS_DSS_FEATURE is true
+## set the dss enable status setup
+#PRODUCT_PROPERTY_OVERRIDES += \
+# ro.exynos.dss=1
+
+# Cannot reference variables defined in BoardConfig.mk, uncomment this if
+# BOARD_USES_EXYNOS_AFBC_FEATURE is true
+# set the dss enable status setup
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.vendor.ddk.set.afbc=1
+
+PRODUCT_CHARACTERISTICS := nosdcard
+
+# WIFI COEX
+PRODUCT_COPY_FILES += \
+ device/google/zumapro/wifi/coex_table.xml:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/coex_table.xml
+
+PRODUCT_PACKAGES += hostapd
+PRODUCT_PACKAGES += wpa_supplicant
+PRODUCT_PACKAGES += wpa_supplicant.conf
+
+WIFI_PRIV_CMD_UPDATE_MBO_CELL_STATUS := enabled
+
+ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
+PRODUCT_PACKAGES += wpa_cli
+PRODUCT_PACKAGES += hostapd_cli
+endif
+
+####################################
+## VIDEO
+####################################
+
+# Video
+PRODUCT_SOONG_NAMESPACES += vendor/google/media/bigwave
+
+$(call soong_config_set,bigw,soc,$(TARGET_BOARD_PLATFORM))
+
+PRODUCT_PACKAGES += \
+ google.hardware.media.c2@2.0-service \
+ libgc2_bw_store \
+ libgc2_bw_base \
+ libgc2_bw_av1_dec \
+ libgc2_bw_av1_enc \
+ libbw_av1dec \
+ libbw_av1enc \
+ libgc2_bw_cwl \
+ libgc2_bw_log \
+ libgc2_bw_utils
+
+# 1. Codec 2.0
+# for settings used by different C2 hal
+include device/google/gs-common/mediacodec/common/mediacodec_common.mk
+# for Exynos C2 Hal
+include device/google/gs-common/mediacodec/samsung/mediacodec_samsung.mk
+
+PRODUCT_COPY_FILES += \
+ device/google/zumapro/media_codecs_performance_c2.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance_c2.xml \
+
+PRODUCT_PROPERTY_OVERRIDES += \
+ debug.stagefright.c2-poolmask=458752 \
+ debug.c2.use_dmabufheaps=1 \
+ media.c2.dmabuf.padding=512 \
+ debug.stagefright.ccodec_delayed_params=1 \
+ ro.vendor.gpu.dataspace=1
+
+# Create input surface on the framework side
+PRODUCT_PROPERTY_OVERRIDES += \
+ debug.stagefright.c2inputsurface=-1 \
+
+# 2. OpenMAX IL
+PRODUCT_COPY_FILES += \
+ device/google/zumapro/media_codecs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs.xml \
+ device/google/zumapro/media_codecs_performance.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance.xml
+####################################
+
+# Telephony
+#PRODUCT_COPY_FILES += \
+ frameworks/av/media/libstagefright/data/media_codecs_google_telephony.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_telephony.xml
+
+# CBD (CP booting deamon)
+CBD_USE_V2 := true
+CBD_PROTOCOL_SIT := true
+
+# setup dalvik vm configs.
+$(call inherit-product, frameworks/native/build/phone-xhdpi-6144-dalvik-heap.mk)
+
+PRODUCT_TAGS += dalvik.gc.type-precise
+
+# Exynos OpenVX framework
+PRODUCT_PACKAGES += \
+ libexynosvision
+
+ifeq ($(TARGET_USES_CL_KERNEL),true)
+PRODUCT_PACKAGES += \
+ libopenvx-opencl
+endif
+
+# Trusty (KM, GK, Storage)
+$(call inherit-product, system/core/trusty/trusty-storage.mk)
+$(call inherit-product, system/core/trusty/trusty-base.mk)
+
+# Trusty unit test tool
+PRODUCT_PACKAGES_DEBUG += \
+ trusty-ut-ctrl \
+ tipc-test \
+ trusty_stats_test \
+
+include device/google/gs101/confirmationui/confirmationui.mk
+
+# Trusty Metrics Daemon
+PRODUCT_SOONG_NAMESPACES += \
+ vendor/google/trusty/common
+
+PRODUCT_PACKAGES += \
+ trusty_metricsd
+
+$(call soong_config_set,google_displaycolor,displaycolor_platform,zumapro)
+PRODUCT_PACKAGES += \
+ android.hardware.composer.hwc3-service.pixel \
+ libdisplaycolor
+
+# Storage: for factory reset protection feature
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.frp.pst=/dev/block/by-name/frp
+
+# System props to enable Bluetooth Quality Report (BQR) feature
+ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
+PRODUCT_PRODUCT_PROPERTIES += \
+ persist.bluetooth.bqr.event_mask?=262174 \
+ persist.bluetooth.bqr.min_interval_ms=500
+else
+PRODUCT_PRODUCT_PROPERTIES += \
+ persist.bluetooth.bqr.event_mask?=30 \
+ persist.bluetooth.bqr.min_interval_ms=500
+endif
+
+#VNDK
+PRODUCT_PACKAGES += \
+ vndk-libs
+
+PRODUCT_ENFORCE_RRO_TARGETS := \
+ framework-res
+
+# Dynamic Partitions
+PRODUCT_USE_DYNAMIC_PARTITIONS := true
+
+# Use FUSE passthrough
+PRODUCT_PRODUCT_PROPERTIES += \
+ persist.sys.fuse.passthrough.enable=true
+
+# Use /product/etc/fstab.postinstall to mount system_other
+PRODUCT_PRODUCT_PROPERTIES += \
+ ro.postinstall.fstab.prefix=/product
+
+PRODUCT_COPY_FILES += \
+ device/google/zumapro/conf/fstab.postinstall:$(TARGET_COPY_OUT_PRODUCT)/etc/fstab.postinstall
+
+# fastbootd
+PRODUCT_PACKAGES += \
+ android.hardware.fastboot@1.1-impl.pixel \
+ fastbootd
+
+#google iwlan
+PRODUCT_PACKAGES += \
+ Iwlan
+
+#Iwlan test app for userdebug/eng builds
+ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
+PRODUCT_PACKAGES += \
+ IwlanTestApp
+endif
+
+PRODUCT_PACKAGES += \
+ whitelist \
+ libstagefright_hdcp \
+ libskia_opt
+
+#PRODUCT_PACKAGES += \
+ mfc_fw.bin \
+ calliope_sram.bin \
+ calliope_dram.bin \
+ calliope_iva.bin \
+ vts.bin
+
+# This will be called only if IMSService is building with source code for dev branches.
+$(call inherit-product-if-exists, vendor/samsung_slsi/telephony/$(BOARD_USES_SHARED_VENDOR_TELEPHONY)/shannon-ims/device-vendor.mk)
+
+PRODUCT_PACKAGES += ShannonIms
+
+#RCS Test Messaging App
+PRODUCT_PACKAGES_DEBUG += \
+ TestRcsApp
+
+PRODUCT_PACKAGES += ShannonRcs
+
+ifeq (,$(filter aosp_% factory_%,$(TARGET_PRODUCT)))
+#ImsMediaAoc library
+FEATURE_TYPE := oem_audio
+SOONG_CONFIG_NAMESPACES += audio_lib
+SOONG_CONFIG_audio_lib += \
+ audio_type
+
+SOONG_CONFIG_audio_lib_audio_type := $(FEATURE_TYPE)
+endif
+
+# ImsMedia
+PRODUCT_PACKAGES += \
+ ImsMediaService \
+ libimsmedia
+
+# Boot Control HAL
+PRODUCT_PACKAGES += \
+ android.hardware.boot@1.2-impl-zumapro \
+ android.hardware.boot@1.2-service-zumapro
+
+# Exynos RIL and telephony
+# Multi SIM(DSDS)
+SIM_COUNT := 2
+SUPPORT_MULTI_SIM := true
+# Support NR
+SUPPORT_NR := true
+# Support 5G on both stacks
+SUPPORT_NR_DS := true
+# Using IRadio 2.1
+USE_RADIO_HAL_2_1 := true
+
+#$(call inherit-product, vendor/google_devices/telephony/common/device-vendor.mk)
+#$(call inherit-product, vendor/google_devices/zumapro/proprietary/device-vendor.mk)
+
+ifneq ($(BOARD_WITHOUT_RADIO),true)
+$(call inherit-product-if-exists, vendor/samsung_slsi/telephony/$(BOARD_USES_SHARED_VENDOR_TELEPHONY)/common/device-vendor.mk)
+endif
+
+$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit_only.mk)
+#$(call inherit-product, hardware/google_devices/exynos5/exynos5.mk)
+#$(call inherit-product-if-exists, hardware/google_devices/zumapro/zumapro.mk)
+#$(call inherit-product-if-exists, vendor/google_devices/common/exynos-vendor.mk)
+#$(call inherit-product-if-exists, hardware/broadcom/wlan/bcmdhd/firmware/bcm4375/device-bcm.mk)
+include device/google/gs-common/sensors/sensors.mk
+$(call inherit-product-if-exists, vendor/google/services/LyricCameraHAL/src/build/device-vendor.mk)
+$(call inherit-product-if-exists, vendor/google/camera/devices/whi/device-vendor.mk)
+
+PRODUCT_COPY_FILES += \
+ device/google/zumapro/default-permissions.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/default-permissions/default-permissions.xml \
+ device/google/zumapro/component-overrides.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sysconfig/component-overrides.xml \
+ frameworks/native/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml \
+
+ifneq ($(BOARD_WITHOUT_RADIO),true)
+# modem_svc_sit daemon
+PRODUCT_PACKAGES += modem_svc_sit
+
+# modem_ml_svc_sit daemon
+PRODUCT_PACKAGES += modem_ml_svc_sit
+
+# modem ML models configs
+ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
+PRODUCT_COPY_FILES += \
+ device/google/zumapro/modem_ml/modem_ml_models_userdebug.conf:$(TARGET_COPY_OUT_VENDOR)/etc/modem_ml_models.conf
+else
+PRODUCT_COPY_FILES += \
+ device/google/zumapro/modem_ml/modem_ml_models_user.conf:$(TARGET_COPY_OUT_VENDOR)/etc/modem_ml_models.conf
+endif
+
+# modem logging binary/configs
+PRODUCT_PACKAGES += modem_logging_control
+
+# modem logging configs
+PRODUCT_COPY_FILES += \
+ device/google/zumapro/radio/config/logging.conf:$(TARGET_COPY_OUT_VENDOR)/etc/modem/logging.conf \
+ device/google/zumapro/radio/config/default.cfg:$(TARGET_COPY_OUT_VENDOR)/etc/modem/default.cfg \
+ device/google/zumapro/radio/config/default.nprf:$(TARGET_COPY_OUT_VENDOR)/etc/modem/default.nprf \
+ device/google/zumapro/radio/config/default_metrics.xml:$(TARGET_COPY_OUT_VENDOR)/etc/modem/default_metrics.xml
+endif
+
+# ARM NN files
+ARM_COMPUTE_CL_ENABLE := 1
+
+# Vibrator Diag
+PRODUCT_PACKAGES_DEBUG += \
+ diag-vibrator \
+ diag-vibrator-cs40l25a \
+ diag-vibrator-drv2624 \
+ $(NULL)
+
+PRODUCT_PACKAGES += \
+ android.hardware.health-service.zumapro \
+ android.hardware.health-service.zumapro_recovery \
+
+# Audio
+# Audio HAL Server & Default Implementations
+include device/google/gs-common/audio/hidl_zuma.mk
+
+## AoC soong
+PRODUCT_SOONG_NAMESPACES += \
+ vendor/google/whitechapel/aoc
+
+$(call soong_config_set,aoc,target_soc,$(TARGET_BOARD_PLATFORM))
+$(call soong_config_set,aoc,target_product,$(TARGET_PRODUCT))
+
+#
+## Audio properties
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.config.vc_call_vol_steps=7 \
+ ro.config.media_vol_steps=25 \
+ ro.audio.monitorRotation = true \
+ ro.audio.offload_wakelock=false
+
+# vndservicemanager and vndservice no longer included in API 30+, however needed by vendor code.
+# See b/148807371 for reference
+PRODUCT_PACKAGES += vndservicemanager
+PRODUCT_PACKAGES += vndservice
+
+## TinyTools, debug tool and cs35l41 speaker calibration tool for Audio
+ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
+PRODUCT_PACKAGES += \
+ tinyplay \
+ tinycap \
+ tinymix \
+ tinypcminfo \
+ tinyhostless \
+ cplay \
+ aoc_hal \
+ aoc_tuning_inft \
+ mahal_test \
+ ma_aoc_tuning_test \
+ crus_sp_cal
+endif
+
+PRODUCT_PACKAGES += \
+ google.hardware.media.c2@1.0-service \
+ libgc2_store \
+ libgc2_base \
+ libgc2_av1_dec \
+ libbo_av1 \
+ libgc2_cwl \
+ libgc2_utils
+
+## Start packet router
+include device/google/gs101/telephony/pktrouter.mk
+
+# Thermal HAL
+include hardware/google/pixel/thermal/device.mk
+PRODUCT_PROPERTY_OVERRIDES += persist.vendor.enable.thermal.genl=true
+
+# EdgeTPU
+include device/google/gs-common/edgetpu/edgetpu.mk
+# Config variables for TPU chip on device.
+$(call soong_config_set,edgetpu_config,chip,rio)
+# TPU firmware
+PRODUCT_PACKAGES += edgetpu-rio.fw
+
+# Connectivity Thermal Power Manager
+PRODUCT_PACKAGES += \
+ ConnectivityThermalPowerManager
+
+# A/B support
+PRODUCT_PACKAGES += \
+ otapreopt_script \
+ cppreopts.sh \
+ update_engine \
+ update_engine_sideload \
+ update_verifier
+
+# pKVM
+$(call inherit-product, packages/modules/Virtualization/apex/product_packages.mk)
+PRODUCT_BUILD_PVMFW_IMAGE := true
+
+# Enable to build standalone vendor_kernel_boot image.
+PRODUCT_BUILD_VENDOR_KERNEL_BOOT_IMAGE := true
+
+# Enable watchdog timeout loop breaker.
+PRODUCT_PROPERTY_OVERRIDES += \
+ framework_watchdog.fatal_window.second=600 \
+ framework_watchdog.fatal_count=3
+
+# Enable zygote critical window.
+PRODUCT_PROPERTY_OVERRIDES += \
+ zygote.critical_window.minute=10
+
+# Suspend properties
+PRODUCT_PROPERTY_OVERRIDES += \
+ suspend.short_suspend_threshold_millis=5000
+
+# Enable Incremental on the device
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.incremental.enable=true
+
+# Project
+include hardware/google/pixel/common/pixel-common-device.mk
+
+# Pixel Logger
+ifneq ($(BOARD_WITHOUT_RADIO),true)
+include hardware/google/pixel/PixelLogger/PixelLogger.mk
+else
+BOARD_SEPOLICY_DIRS += hardware/google/pixel-sepolicy/logger_app
+endif
+
+# sscoredump
+include hardware/google/pixel/sscoredump/device.mk
+
+# RadioExt Version
+USES_RADIOEXT_V1_6 = true
+
+# Wifi ext
+include hardware/google/pixel/wifi_ext/device.mk
+
+# Battery Stats Viewer
+PRODUCT_PACKAGES_DEBUG += BatteryStatsViewer
+
+# Install product specific framework compatibility matrix
+# (TODO: b/169535506) This includes the FCM for system_ext and product partition.
+# It must be split into the FCM of each partition.
+DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE += device/google/zumapro/device_framework_matrix_product.xml
+
+# Keymint configuration
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.software.device_id_attestation.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.device_id_attestation.xml \
+ frameworks/native/data/etc/android.hardware.device_unique_attestation.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.device_unique_attestation.xml
+
+# Call deleteAllKeys if vold detects a factory reset
+PRODUCT_VENDOR_PROPERTIES += ro.crypto.metadata_init_delete_all_keys.enabled?=true
+
+# Use HCTR2 for filenames encryption on adoptable storage.
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.crypto.volume.options=aes-256-xts:aes-256-hctr2
+
+# Hardware Info Collection
+include hardware/google/pixel/HardwareInfo/HardwareInfo.mk
+
+# UFS: the script is used to select the corresponding firmware to run FFU.
+PRODUCT_PACKAGES_DEBUG += ufs_firmware_update.sh
+
+# RIL extension service
+ifeq (,$(filter aosp_% factory_%,$(TARGET_PRODUCT)))
+include device/google/gs-common/pixel_ril/ril.mk
+endif
+
+# Touch service
+include hardware/google/pixel/input/twoshay.mk
diff --git a/device_framework_matrix_product.xml b/device_framework_matrix_product.xml
new file mode 100644
index 0000000..7daa998
--- /dev/null
+++ b/device_framework_matrix_product.xml
@@ -0,0 +1,236 @@
+
+
+ android.hardware.biometrics.face
+
+ IFace
+ default
+
+
+
+ android.hardware.biometrics.fingerprint
+
+ IFingerprint
+ default
+
+
+
+ android.hardware.contexthub
+ 1
+
+ IContextHub
+ default
+
+
+
+ android.hardware.graphics.composer3
+ 2
+
+ IComposer
+ default
+
+
+
+ android.hardware.radio
+ 1.2
+
+ ISap
+ slot2
+
+
+
+ android.hardware.radio.config
+ 1.1
+
+ IRadioConfig
+ default
+
+
+
+ android.hardware.vibrator
+ 2
+
+ IVibrator
+ dual
+
+
+
+ android.hardware.wifi.hostapd
+ 1
+
+ IHostapd
+ default
+
+
+
+ android.vendor.samsung_slsi.telephony.hardware.radio
+ 1.1
+
+ IOemSamsungslsi
+ slot1
+ slot2
+
+
+
+ com.fingerprints33.extension
+ 1.0
+
+ IFingerprintAuthenticator
+ default
+
+
+ IFingerprintCalibration
+ default
+
+
+ IFingerprintEngineering
+ default
+
+
+ IFingerprintNavigation
+ default
+
+
+ IFingerprintRecalibration
+ default
+
+
+ IFingerprintSenseTouch
+ default
+
+
+ IFingerprintSensorTest
+ default
+
+
+
+ com.google.face.debug
+ 2
+
+ IDebugHost
+ default
+
+
+ IDebugManager
+ default
+
+
+
+ com.google.edgetpu
+ 2
+
+ IEdgeTpuVendorService
+ default
+
+
+
+ com.google.edgetpu.dba
+ 1
+
+ IDevice
+ default
+
+
+
+ com.google.hardware.pixel.display
+ 8
+
+ IDisplay
+ default
+
+
+
+ com.google.input.algos.spd
+
+ IScreenProtectorDetectorService
+ default
+
+
+
+ com.google.input
+
+ ITouchContextService
+ default
+
+
+
+ hardware.qorvo.uwb
+
+ IUwbVendor
+ default
+
+
+
+ vendor.goodix.hardware.biometrics.fingerprint
+ 2.1
+
+ IGoodixFingerprintDaemon
+ default
+
+
+
+ hardware.google.bluetooth.bt_channel_avoidance
+ 1.0
+
+ IBTChannelAvoidance
+ default
+
+
+
+ hardware.google.bluetooth.sar
+ 1.1
+
+ IBluetoothSar
+ default
+
+
+
+ hardware.google.bluetooth.ccc
+ 1.0
+
+ IBluetoothCcc
+ default
+
+
+
+ vendor.google.google_battery
+ 2
+
+ IGoogleBattery
+ default
+
+
+
+ vendor.google.radioext
+ 1.6
+
+ IRadioExt
+ default
+
+
+
+ vendor.google.wifi_ext
+ 1
+
+ IWifiExt
+ default
+
+
+
+ vendor.samsung_slsi.telephony.hardware.oemservice
+ 1.0
+
+ IOemService
+ dm0
+ dm1
+ sced0
+
+
+
+ vendor.samsung_slsi.telephony.hardware.radioExternal
+ 1.1
+
+ IOemSlsiRadioExternal
+ rilExternal
+
+
+
diff --git a/display/display_colordata_cal0.pb b/display/display_colordata_cal0.pb
new file mode 100644
index 0000000..b266f90
Binary files /dev/null and b/display/display_colordata_cal0.pb differ
diff --git a/dumpstate/Android.bp b/dumpstate/Android.bp
new file mode 100644
index 0000000..ab47899
--- /dev/null
+++ b/dumpstate/Android.bp
@@ -0,0 +1,32 @@
+package {
+ default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
+sh_binary {
+ name: "dump_wlan.sh",
+ src: "dump_wlan.sh",
+ vendor: true,
+ sub_dir: "dump",
+}
+
+sh_binary {
+ name: "dump_power.sh",
+ src: "dump_power.sh",
+ vendor: true,
+ sub_dir: "dump",
+}
+
+sh_binary {
+ name: "dump_cma.sh",
+ src: "dump_cma.sh",
+ vendor: true,
+ sub_dir: "dump",
+}
+
+sh_binary {
+ name: "dump_gsa.sh",
+ src: "dump_gsa.sh",
+ vendor: true,
+ sub_dir: "dump",
+}
+
diff --git a/dumpstate/OWNERS b/dumpstate/OWNERS
new file mode 100644
index 0000000..5859d10
--- /dev/null
+++ b/dumpstate/OWNERS
@@ -0,0 +1,9 @@
+aaronding@google.com
+rurumihong@google.com
+adamshih@google.com
+wilsonsung@google.com
+lucaswei@google.com
+cyanhsieh@google.com
+rogerliao@google.com
+cyuanjen@google.com
+robinpeng@google.com
diff --git a/dumpstate/README.txt b/dumpstate/README.txt
new file mode 100644
index 0000000..b279bda
--- /dev/null
+++ b/dumpstate/README.txt
@@ -0,0 +1 @@
+Please refer to go/pixel-recycle to modularize your code in this space.
diff --git a/dumpstate/dump_cma.sh b/dumpstate/dump_cma.sh
new file mode 100644
index 0000000..63e497e
--- /dev/null
+++ b/dumpstate/dump_cma.sh
@@ -0,0 +1,9 @@
+#!/vendor/bin/sh
+echo "------ CMA info ------"
+for d in $(ls -d /d/cma/*); do
+ echo --- $d
+ echo --- count; cat $d/count
+ echo --- used; cat $d/used
+ echo --- bitmap; cat $d/bitmap
+done
+
diff --git a/dumpstate/dump_gsa.sh b/dumpstate/dump_gsa.sh
new file mode 100644
index 0000000..a0d4232
--- /dev/null
+++ b/dumpstate/dump_gsa.sh
@@ -0,0 +1,8 @@
+#!/vendor/bin/sh
+
+echo "--- GSA MAIN LOG"
+cat /sys/devices/platform/16490000.gsa-ns/log_main
+
+echo "--- GSA INTERMEDIATE LOG"
+cat /sys/devices/platform/16490000.gsa-ns/log_intermediate
+
diff --git a/dumpstate/dump_power.sh b/dumpstate/dump_power.sh
new file mode 100644
index 0000000..8c9cdec
--- /dev/null
+++ b/dumpstate/dump_power.sh
@@ -0,0 +1,411 @@
+#!/vendor/bin/sh
+build_type="$(getprop ro.build.type)"
+
+echo "\n------ Power Stats Times ------"
+echo -n "Boot: " && /vendor/bin/uptime -s && echo -n "Now: " && date;
+
+echo "\n------ ACPM stats ------"
+for f in /sys/devices/platform/acpm_stats/*_stats ; do
+ echo "\n\n$f"
+ cat $f
+done
+
+echo "\n------ CPU PM stats ------"
+cat "/sys/devices/system/cpu/cpupm/cpupm/time_in_state"
+
+echo "\n------ GENPD summary ------"
+cat "/d/pm_genpd/pm_genpd_summary"
+
+echo "\n------ Power supply property battery ------"
+cat "/sys/class/power_supply/battery/uevent"
+echo "\n------ Power supply property dc ------"
+cat "/sys/class/power_supply/dc/uevent"
+echo "\n------ Power supply property gcpm ------"
+cat "/sys/class/power_supply/gcpm/uevent"
+echo "\n------ Power supply property gcpm_pps ------"
+cat "/sys/class/power_supply/gcpm_pps/uevent"
+echo "\n------ Power supply property main-charger ------"
+cat "/sys/class/power_supply/main-charger/uevent"
+echo "\n------ Power supply property dc-mains ------"
+cat "/sys/class/power_supply/dc-mains/uevent"
+echo "\n------ Power supply property tcpm ------"
+cat "/sys/class/power_supply/tcpm-source-psy-8-0025/uevent"
+echo "\n------ Power supply property usb ------"
+cat "/sys/class/power_supply/usb/uevent"
+echo "\n------ Power supply property wireless ------"
+cat "/sys/class/power_supply/wireless/uevent"
+
+if [ -d "/sys/class/power_supply/maxfg" ]
+then
+ echo "\n------ Power supply property maxfg ------"
+ cat "/sys/class/power_supply/maxfg/uevent"
+ echo "\n------ m5_state ------"
+ cat "/sys/class/power_supply/maxfg/m5_model_state"
+ echo "\n------ maxfg ------"
+ cat "/dev/logbuffer_maxfg"
+ echo "\n------ maxfg ------"
+ cat "/dev/logbuffer_maxfg_monitor"
+else
+ echo "\n------ Power supply property maxfg_base ------"
+ cat "/sys/class/power_supply/maxfg_base/uevent"
+ echo "\n------ Power supply property maxfg_flip ------"
+ cat "/sys/class/power_supply/maxfg_flip/uevent"
+ echo "\n------ m5_state ------"
+ cat "/sys/class/power_supply/maxfg_base/m5_model_state"
+ echo "\n------ maxfg_base ------"
+ cat "/dev/logbuffer_maxfg_base"
+ echo "\n------ maxfg_flip ------"
+ cat "/dev/logbuffer_maxfg_flip"
+ echo "\n------ maxfg_base ------"
+ cat "/dev/logbuffer_maxfg_base_monitor"
+ echo "\n------ maxfg_flip ------"
+ cat "/dev/logbuffer_maxfg_flip_monitor"
+fi
+
+if [ -e "/dev/maxfg_history" ]
+then
+ echo "\n------ Maxim FG History ------"
+ cat "/dev/maxfg_history"
+fi
+
+if [ -d "/sys/class/power_supply/dock" ]
+then
+ echo "\n------ Power supply property dock ------"
+ cat "/sys/class/power_supply/dock/uevent"
+fi
+
+if [ -e "/dev/logbuffer_tcpm" ]
+then
+ echo "\n------ Logbuffer TCPM ------"
+ cat "/dev/logbuffer_tcpm"
+ if [ -d "/sys/kernel/debug/tcpm" ]
+ then
+ echo "\n------ TCPM logs ------"
+ cat /sys/kernel/debug/tcpm/*
+ else
+ echo "\n------ TCPM logs ------"
+ cat /sys/kernel/debug/usb/tcpm*
+ fi
+fi
+
+echo "\n------ TCPC ------"
+for f in /sys/devices/platform/10d60000.hsi2c/i2c-*/i2c-max77759tcpc
+do
+ echo "registers:"
+ cat $f/registers
+ echo "frs:"
+ cat $f/frs
+ echo "auto_discharge:"
+ cat $f/auto_discharge
+ echo "bc12_enabled:"
+ cat $f/bc12_enabled
+ echo "cc_toggle_enable:"
+ cat $f/cc_toggle_enable
+ echo "contaminant_detection:"
+ cat $f/contaminant_detection
+ echo "contaminant_detection_status:"
+ cat $f/contaminant_detection_status
+done
+
+echo "\n------ PD Engine ------"
+cat "/dev/logbuffer_usbpd"
+echo "\n------ PPS-google_cpm ------"
+cat "/dev/logbuffer_cpm"
+echo "\n------ PPS-dc ------"
+cat "/dev/logbuffer_pca9468"
+
+if [ -e "/dev/logbuffer_wc68" ]
+then
+ echo "\n------ WC68 ------"
+ cat "/dev/logbuffer_wc68"
+fi
+
+echo "\n------ Battery Health ------"
+cat "/sys/class/power_supply/battery/health_index_stats"
+echo "\n------ BMS ------"
+cat "/dev/logbuffer_ssoc"
+echo "\n------ TTF ------"
+cat "/dev/logbuffer_ttf"
+echo "\n------ TTF details ------"
+cat "/sys/class/power_supply/battery/ttf_details"
+echo "\n------ TTF stats ------"
+cat "/sys/class/power_supply/battery/ttf_stats"
+echo "\n------ aacr_state ------"
+cat "/sys/class/power_supply/battery/aacr_state"
+echo "\n------ maxq ------"
+cat "/dev/logbuffer_maxq"
+echo "\n------ TEMP/DOCK-DEFEND ------"
+cat "/dev/logbuffer_bd"
+
+echo "\n------ TRICKLE-DEFEND Config ------"
+cd /sys/devices/platform/google,battery/power_supply/battery/
+for f in `ls bd_*`
+do
+ echo $f: `cat $f`
+done
+
+echo "\n------ DWELL-DEFEND Config ------"
+cd /sys/devices/platform/google,charger/
+for f in `ls charge_s*`
+do
+ echo "$f: `cat $f`"
+done
+
+echo "\n------ TEMP-DEFEND Config ------"
+cd /sys/devices/platform/google,charger/
+for f in `ls bd_*`
+do
+ echo "$f: `cat $f`"
+done
+
+if [ $build_type = "userdebug" ]
+then
+ echo "\n------ DC_registers dump ------"
+ cat "/sys/class/power_supply/dc-mains/device/registers_dump"
+ echo "\n------ max77759_chg registers dump ------"
+ cat "/d/max77759_chg/registers"
+ echo "\n------ max77729_pmic registers dump ------"
+ cat "/d/max77729_pmic/registers"
+ echo "\n------ Charging table dump ------"
+ cat "/d/google_battery/chg_raw_profile"
+
+ echo "\n------ fg_model ------"
+ for f in /d/maxfg*
+ do
+ regs=`cat $f/fg_model`
+ echo $f:
+ echo "$regs"
+ done
+
+ echo "\n------ fg_alo_ver ------"
+ for f in /d/maxfg*
+ do
+ regs=`cat $f/algo_ver`
+ echo $f:
+ echo "$regs"
+ done
+
+ echo "\n------ fg_model_ok ------"
+ for f in /d/maxfg*
+ do
+ regs=`cat $f/model_ok`
+ echo $f:
+ echo "$regs"
+ done
+
+ echo "\n------ fg registers ------"
+ for f in /d/maxfg*
+ do
+ regs=`cat $f/registers`
+ echo $f:
+ echo "$regs"
+ done
+
+ echo "\n------ Maxim FG NV RAM ------"
+ for f in /d/maxfg*
+ do
+ regs=`cat $f/nv_registers`
+ echo $f:
+ echo "$regs"
+ done
+fi
+
+echo "\n------ Battery EEPROM ------"
+if [ -e "/sys/devices/platform/10970000.hsi2c/i2c-4/4-0050/eeprom" ]
+then
+ xxd /sys/devices/platform/10970000.hsi2c/i2c-4/4-0050/eeprom
+fi
+
+if [ -e "/sys/devices/platform/10970000.hsi2c/i2c-5/5-0050/eeprom" ]
+then
+ xxd /sys/devices/platform/10970000.hsi2c/i2c-5/5-0050/eeprom
+fi
+
+if [ -e "/sys/devices/platform/10da0000.hsi2c/i2c-6/6-0050/eeprom" ]
+then
+ xxd /sys/devices/platform/10da0000.hsi2c/i2c-6/6-0050/eeprom
+fi
+
+if [ -e "/sys/devices/platform/10da0000.hsi2c/i2c-7/7-0050/eeprom" ]
+then
+ xxd /sys/devices/platform/10da0000.hsi2c/i2c-7/7-0050/eeprom
+fi
+
+if [ -e "/sys/devices/platform/10c90000.hsi2c/i2c-7/7-0050/eeprom" ]
+then
+ xxd /sys/devices/platform/10c90000.hsi2c/i2c-7/7-0050/eeprom
+fi
+
+echo "\n------ Charger Stats ------"
+cat "/sys/class/power_supply/battery/charge_details"
+if [ $build_type = "userdebug" ]
+then
+ echo "\n------ Google Charger ------"
+ cd /sys/kernel/debug/google_charger/
+ for f in `ls pps_*`
+ do
+ echo "$f: `cat $f`"
+ done
+ echo "\n------ Google Battery ------"
+ cd /sys/kernel/debug/google_battery/
+ for f in `ls ssoc_*`
+ do
+ echo "$f: `cat $f`"
+ done
+fi
+
+echo "\n------ WLC logs ------"
+cat "/dev/logbuffer_wireless"
+echo "\n------ WLC VER ------"
+cat "/sys/class/power_supply/wireless/device/version"
+echo "\n------ WLC STATUS ------"
+cat "/sys/class/power_supply/wireless/device/status"
+echo "\n------ WLC FW Version ------"
+cat "/sys/class/power_supply/wireless/device/fw_rev"
+echo "\n------ RTX ------"
+cat "/dev/logbuffer_rtx"
+
+if [ $build_type = "userdebug" ]
+then
+ echo "\n------ gvotables ------"
+ cat /sys/kernel/debug/gvotables/*/status
+fi
+
+echo "\n------ Lastmeal ------"
+cat "/data/vendor/mitigation/lastmeal.txt"
+echo "\n------ Thismeal ------"
+cat "/data/vendor/mitigation/thismeal.txt"
+echo "\n------ Mitigation Stats ------"
+echo "Source\t\tCount\tSOC\tTime\tVoltage"
+for f in `ls /sys/devices/virtual/pmic/mitigation/last_triggered_count/*`
+do
+ count=`cat $f`
+ a=${f/\/sys\/devices\/virtual\/pmic\/mitigation\/last_triggered_count\//}
+ b=${f/last_triggered_count/last_triggered_capacity}
+ c=${f/last_triggered_count/last_triggered_timestamp/}
+ d=${f/last_triggered_count/last_triggered_voltage/}
+ cnt=`cat $f`
+ cap=`cat ${b/count/cap}`
+ ti=`cat ${c/count/time}`
+ volt=`cat ${d/count/volt}`
+ echo "${a/_count/} \t$cnt\t$cap\t$ti\t$volt"
+done
+
+echo "\n------ Clock Divider Ratio ------"
+echo \"Source\t\tRatio\"
+for f in `ls /sys/devices/virtual/pmic/mitigation/clock_ratio/*`
+do ratio=`cat $f`
+ a=${f/\/sys\/devices\/virtual\/pmic\/mitigation\/clock_ratio\//}
+ echo "${a/_ratio/} \t$ratio"
+done
+
+echo "\n------ Clock Stats ------"
+echo "Source\t\tStats"
+for f in `ls /sys/devices/virtual/pmic/mitigation/clock_stats/*`
+do
+ stats=`cat $f`
+ a=${f/\/sys\/devices\/virtual\/pmic\/mitigation\/clock_stats\//};
+ echo "${a/_stats/} \t$stats"
+done
+
+echo "\n------ Triggered Level ------"
+echo "Source\t\tLevel"
+for f in `ls /sys/devices/virtual/pmic/mitigation/triggered_lvl/*`
+do
+ lvl=`cat $f`
+ a=${f/\/sys\/devices\/virtual\/pmic\/mitigation\/triggered_lvl\//}
+ echo "${a/_lvl/} \t$lvl"
+done
+
+echo "\n------ Instruction ------"
+for f in `ls /sys/devices/virtual/pmic/mitigation/instruction/*`
+do
+ val=`cat $f`
+ a=${f/\/sys\/devices\/virtual\/pmic\/mitigation\/instruction\//}
+ echo "$a=$val"
+done
+
+echo "\n------ IRQ Duration Counts ------"
+echo "Source\t\t\t\tlt_5ms_cnt\tbt_5ms_to_10ms_cnt\tgt_10ms_cnt\tCode\tCurrent Threshold (uA)\tCurrent Reading (uA)"
+
+lt=`cat /sys/devices/virtual/pmic/mitigation/irq_dur_cnt/less_than_5ms_count`
+bt=`cat /sys/devices/virtual/pmic/mitigation/irq_dur_cnt/between_5ms_to_10ms_count`
+gt=`cat /sys/devices/virtual/pmic/mitigation/irq_dur_cnt/greater_than_10ms_count`
+lpf_cur_m=`cat /sys/devices/platform/acpm_mfd_bus@15500000/i2c-0/0-001f/s2mpg14-meter/s2mpg14-odpm/iio:device0/lpf_current`
+lpf_cur_s=`cat /sys/devices/platform/acpm_mfd_bus@15510000/i2c-1/1-002f/s2mpg15-meter/s2mpg15-odpm/iio:device1/lpf_current`
+
+lpf_cur_main=(${lpf_cur_m/\\n/;})
+lpf_cur_sub=(${lpf_cur_s/\\n/;})
+
+IFS_PRE=$IFS
+IFS=$'\n'
+lt_a=($lt)
+bt_a=($bt)
+gt_a=($gt)
+IFS=$IFS_PRE
+
+
+for f in `ls /sys/devices/virtual/pmic/mitigation/main_pwrwarn/*`
+do
+ count=`cat $f`
+ a=${f/\/sys\/devices\/virtual\/pmic\/mitigation\/main_pwrwarn\//}
+ s=${a/main_pwrwarn_threshold/}
+ arr=(${count//=/ })
+ code=${arr[0]}
+ threshold=${arr[1]}
+ main_array[$s]="$code\t$threshold"
+done
+
+i=1
+main_current=()
+for f in "${main_array[@]}"
+do
+ idx=$i
+ idx2=$idx+1
+ main_current+=(${lpf_cur_main[$idx2]})
+ i=$i+2
+done
+
+for f in `ls /sys/devices/virtual/pmic/mitigation/sub_pwrwarn/*`
+do
+ count=`cat $f`
+ a=${f/\/sys\/devices\/virtual\/pmic\/mitigation\/sub_pwrwarn\//}
+ s=${a/sub_pwrwarn_threshold/}
+ arr=(${count//=/ })
+ code=${arr[0]};
+ threshold=${arr[1]};
+ sub_array[$s]="$code\t$threshold"
+done
+i=1
+sub_current=()
+for f in "${sub_array[@]}"
+do
+ idx=$i
+ idx2=$idx+1
+ sub_current+=(${lpf_cur_sub[$idx2]})
+ i=$i+2
+done
+
+rows=${#lt_a[@]}
+for i in `seq 0 $rows`
+do
+ n="${lt_a[i]%:*}"
+ l="${lt_a[i]#*": "}"
+ b="${bt_a[i]#*": "}"
+ g="${gt_a[i]#*": "}"
+ if [ $i -lt 9 ]
+ then
+ echo "$n \t\t$l\t\t$b\t\t\t$g"
+ elif [ $i -ge 9 ] && [ $i -lt 21 ]
+ then
+ j=$i-9
+ thresh="${main_array[j]}"
+ current="${main_current[j]}"
+ echo "$n \t$l\t\t$b\t\t\t$g\t\t$thresh \t\t$current"
+ else
+ j=$i-21
+ thresh="${sub_array[j]}"
+ current="${sub_current[j]}"
+ echo "$n \t$l\t\t$b\t\t\t$g\t\t$thresh \t\t$current"
+ fi
+done
diff --git a/dumpstate/dump_wlan.sh b/dumpstate/dump_wlan.sh
new file mode 100644
index 0000000..4741ac8
--- /dev/null
+++ b/dumpstate/dump_wlan.sh
@@ -0,0 +1,3 @@
+#!/vendor/bin/sh
+echo "--- wlan WIP ---"
+
diff --git a/dumpstate/item.mk b/dumpstate/item.mk
new file mode 100644
index 0000000..124fd1c
--- /dev/null
+++ b/dumpstate/item.mk
@@ -0,0 +1,6 @@
+PRODUCT_PACKAGES += dump_wlan.sh \
+ dump_power.sh
+
+PRODUCT_PACKAGES_DEBUG += dump_cma.sh \
+ dump_gsa.sh
+
diff --git a/factory/factory_post_boot/Android.bp b/factory/factory_post_boot/Android.bp
new file mode 100644
index 0000000..cbbebda
--- /dev/null
+++ b/factory/factory_post_boot/Android.bp
@@ -0,0 +1,25 @@
+//
+// 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.
+
+package {
+ default_applicable_licenses: ["Android-Apache-2.0"],
+}
+sh_binary {
+ name: "factory_post_boot",
+ src: "factory_post_boot.sh",
+ vendor: true,
+ sub_dir: "factory",
+}
+
diff --git a/factory/factory_post_boot/factory_post_boot.sh b/factory/factory_post_boot/factory_post_boot.sh
new file mode 100644
index 0000000..82dfcfb
--- /dev/null
+++ b/factory/factory_post_boot/factory_post_boot.sh
@@ -0,0 +1,4 @@
+#!/vendor/bin/sh
+
+# Add adbd to nnapi vendor cgroup. (b/222226268)
+echo `pidof adbd` > /proc/vendor_sched/set_task_group_nnapi
diff --git a/factory/framework/Android.bp b/factory/framework/Android.bp
new file mode 100644
index 0000000..b9204cb
--- /dev/null
+++ b/factory/framework/Android.bp
@@ -0,0 +1,15 @@
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "//device/google/zumapro:device_google_zumapro_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ default_applicable_licenses: [
+ "//device/google/zumapro:device_google_zumapro_license",
+ ],
+}
+
+runtime_resource_overlay {
+ name: "FactoryOverlayFrameworkRes",
+ product_specific: true,
+}
diff --git a/factory/framework/AndroidManifest.xml b/factory/framework/AndroidManifest.xml
new file mode 100644
index 0000000..73875be
--- /dev/null
+++ b/factory/framework/AndroidManifest.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
diff --git a/factory/framework/res/drawable-nodpi/default_wallpaper.png b/factory/framework/res/drawable-nodpi/default_wallpaper.png
new file mode 100644
index 0000000..93b787e
Binary files /dev/null and b/factory/framework/res/drawable-nodpi/default_wallpaper.png differ
diff --git a/factory/launcher3/Android.bp b/factory/launcher3/Android.bp
new file mode 100644
index 0000000..90209a7
--- /dev/null
+++ b/factory/launcher3/Android.bp
@@ -0,0 +1,15 @@
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "//device/google/zumapro:device_google_zumapro_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ default_applicable_licenses: [
+ "//device/google/zumapro:device_google_zumapro_license",
+ ],
+}
+
+runtime_resource_overlay {
+ name: "FactoryOverlayLauncher3",
+ product_specific: true,
+}
diff --git a/factory/launcher3/AndroidManifest.xml b/factory/launcher3/AndroidManifest.xml
new file mode 100644
index 0000000..3f28585
--- /dev/null
+++ b/factory/launcher3/AndroidManifest.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
diff --git a/factory/launcher3/res/xml/default_workspace_5x5.xml b/factory/launcher3/res/xml/default_workspace_5x5.xml
new file mode 100644
index 0000000..ba1427a
--- /dev/null
+++ b/factory/launcher3/res/xml/default_workspace_5x5.xml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/factory/settings/Android.bp b/factory/settings/Android.bp
new file mode 100644
index 0000000..0666039
--- /dev/null
+++ b/factory/settings/Android.bp
@@ -0,0 +1,15 @@
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "//device/google/zumapro:device_google_zumapro_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ default_applicable_licenses: [
+ "//device/google/zumapro:device_google_zumapro_license",
+ ],
+}
+
+runtime_resource_overlay {
+ name: "FactoryOverlaySettings",
+ product_specific: true,
+}
diff --git a/factory/settings/AndroidManifest.xml b/factory/settings/AndroidManifest.xml
new file mode 100644
index 0000000..72e7838
--- /dev/null
+++ b/factory/settings/AndroidManifest.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
diff --git a/factory/settings/res/values/defaults.xml b/factory/settings/res/values/defaults.xml
new file mode 100644
index 0000000..b7febd9
--- /dev/null
+++ b/factory/settings/res/values/defaults.xml
@@ -0,0 +1,26 @@
+
+
+
+ 0
+ true
+ false
+ false
+ false
+ confirmed
+
diff --git a/factory_common.mk b/factory_common.mk
new file mode 100644
index 0000000..10bc6de
--- /dev/null
+++ b/factory_common.mk
@@ -0,0 +1,96 @@
+#
+# Copyright 2020 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.
+#
+
+$(call inherit-product, device/google/zumapro/aosp_common.mk)
+$(call inherit-product-if-exists, vendor/google_devices/zumapro/factory/pixel/device-factory.mk)
+
+PRODUCT_PROPERTY_OVERRIDES += service.adb.root=1 \
+ vendor.disable.thermal.control=1 \
+ ro.vendor.factory=1
+
+# Factory Libraries of Audio
+PRODUCT_PACKAGES += audioroute libaudioroutelite
+
+# Enable fatp by default for factory builds
+PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
+ persist.vendor.camera.fatp.enable=1
+
+# Disable camera related features for factory builds
+PRODUCT_PROPERTY_OVERRIDES += \
+ persist.vendor.camera.af.ignore_gyro=1 \
+ vendor.camera.debug.bypass_face_ssd_processor=1 \
+ vendor.camera.debug.csi_ebuf_enable=0 \
+ vendor.camera.debug.enable_face_detection=0 \
+ vendor.camera.debug.force_dpm_on=0 \
+ vendor.camera.debug.force_eis_on=0 \
+ vendor.camera.debug.force_eaf_on=0 \
+ vendor.camera.debug.force_mesh_warp_on=0 \
+ vendor.camera.debug.force_rectiface_node_on=0 \
+ vendor.camera.debug.force_steadiface_on=0 \
+ vendor.camera.debug.force_tnr_on=0 \
+ vendor.camera.debug.force_segmentation_node_on=0 \
+ vendor.camera.debug.enable_saliency=0 \
+ vendor.camera.debug.force_local_tone_mapping_on=0 \
+ vendor.camera.debug.local_tone_mapping_controller_v1.mode=0 \
+ vendor.camera.debug.enable_scene_detection=0
+
+# Disable ScreenDecorations for factory builds
+PRODUCT_PROPERTY_OVERRIDES += \
+ debug.disable_screen_decorations=true
+
+PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.set_idle_timer_ms?=80
+PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.set_touch_timer_ms=200
+PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.set_display_power_timer_ms=1000
+PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.use_content_detection_for_refresh_rate=true
+
+# Disable dimming in factory
+PRODUCT_DEFAULT_PROPERTY_OVERRIDES += vendor.display.0.brightness.dimming.usage=2
+
+
+# factory should always has SELinux permissive
+BOARD_BOOTCONFIG += androidboot.selinux=permissive
+BOARD_KERNEL_CMDLINE += androidboot.selinux=permissive
+
+# Disable DebugFS restrictions in factory builds
+PRODUCT_SET_DEBUGFS_RESTRICTIONS := false
+
+# Disable Bluetooth as default in factory build
+DEVICE_PACKAGE_OVERLAYS += device/google/zumapro/overlay-factory
+
+PRODUCT_COPY_FILES += \
+ device/google/zumapro/conf/init.factory.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.factory.rc
+
+BOARD_SEPOLICY_DIRS += hardware/google/pixel-sepolicy/factory_boost
+
+# Add factory-friendly changes
+PRODUCT_PACKAGES += \
+ FactoryOverlaySettings \
+ FactoryOverlayLauncher3 \
+ FactoryOverlayFrameworkRes \
+ factory_post_boot
+
+# To prevent rebooting due to crashing services
+PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
+ init.svc_debug.no_fatal.zygote=true \
+ persist.device_config.configuration.disable_rescue_party=true
+
+# PixelLogger for RF testing
+PRODUCT_PACKAGES_DEBUG += \
+ PixelLogger \
+
+# ModemDiagnosticSystem for desense tool
+PRODUCT_PACKAGES += \
+ ModemDiagnosticSystem \
diff --git a/fingerprint/fpc1540/fingerprint_config.mk b/fingerprint/fpc1540/fingerprint_config.mk
new file mode 100644
index 0000000..1584e11
--- /dev/null
+++ b/fingerprint/fpc1540/fingerprint_config.mk
@@ -0,0 +1,18 @@
+# ----------------------------
+# Add feature flags below
+# ----------------------------
+FPC_CONFIG_BUILD_VERSION=33
+FPC_CONFIG_CAPACITIVE=1
+FPC_CONFIG_MAX_NR_TEMPLATES=5
+FPC_CONFIG_SENSE_TOUCH_CALIBRATION_PATH=/data/fpc/calibration_sense_touch.dat
+FPC_CONFIG_TA_FS=1
+FPC_DEFECTIVE_PIXEL_LIST_SIZE=5000
+FPC_SENSOR_SDK_LOG_LEVEL=3
+FPC_TEE_RUNTIME=TRUSTY
+LIBFPC_NAME=libfpc1541_S_nav_debug.a
+FPC_CONFIG_DEBUG=1
+FPC_CONFIG_PRODUCT_DEFAULT=FPC_PRODUCT_TYPE1541_S
+
+#
+# File included from device//<>/.mk
+# Packages to include into the build
diff --git a/fingerprint/fpc1540/fingerprint_config_factory.mk b/fingerprint/fpc1540/fingerprint_config_factory.mk
new file mode 100644
index 0000000..85b1064
--- /dev/null
+++ b/fingerprint/fpc1540/fingerprint_config_factory.mk
@@ -0,0 +1,21 @@
+# ----------------------------
+# Add feature flags below
+# ----------------------------
+FPC_CONFIG_BUILD_VERSION=33
+FPC_CONFIG_CAPACITIVE=1
+FPC_CONFIG_MAX_NR_TEMPLATES=5
+FPC_CONFIG_NAVIGATION=0
+FPC_CONFIG_SENSE_TOUCH_CALIBRATION_PATH=/data/fpc/calibration_sense_touch.dat
+FPC_CONFIG_SENSORTEST=1
+FPC_CONFIG_TA_FS=1
+FPC_DEFECTIVE_PIXEL_LIST_SIZE=5000
+FPC_SENSOR_SDK_LOG_LEVEL=3
+FPC_TEE_RUNTIME=TRUSTY
+LIBFPC_NAME=libfpc1541_S_nav_debug.a
+FPC_CONFIG_DEBUG=1
+FPC_CONFIG_ENGINEERING=1
+FPC_CONFIG_PRODUCT_DEFAULT=FPC_PRODUCT_TYPE1541_S
+
+#
+# File included from device//<>/.mk
+# Packages to include into the build
diff --git a/fingerprint/fpc1540/fpc1540.mk b/fingerprint/fpc1540/fpc1540.mk
new file mode 100644
index 0000000..f1075f7
--- /dev/null
+++ b/fingerprint/fpc1540/fpc1540.mk
@@ -0,0 +1,8 @@
+# Fingerprint
+include device/google/zumapro/fingerprint/fpc1540/fingerprint_config.mk
+
+PRODUCT_PACKAGES += \
+ android.hardware.biometrics.fingerprint@2.1-service.fpc \
+
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.hardware.fingerprint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.fingerprint.xml
diff --git a/fingerprint/fpc1540/fpc1540_factory.mk b/fingerprint/fpc1540/fpc1540_factory.mk
new file mode 100644
index 0000000..f2e4baa
--- /dev/null
+++ b/fingerprint/fpc1540/fpc1540_factory.mk
@@ -0,0 +1,10 @@
+# Fingerprint
+include device/google/zumapro/fingerprint/fpc1540/fingerprint_config_factory.mk
+
+PRODUCT_PACKAGES += \
+ fpc_tee_test\
+ SensorTestTool \
+
+PRODUCT_PACKAGES += \
+ com.fingerprints.extension.xml \
+ com.fingerprints.extension \
diff --git a/fingerprint/udfps.mk b/fingerprint/udfps.mk
new file mode 100644
index 0000000..61f138f
--- /dev/null
+++ b/fingerprint/udfps.mk
@@ -0,0 +1,28 @@
+#
+# Copyright (C) 2020 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_COPY_FILES += \
+ frameworks/native/data/etc/android.hardware.fingerprint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.fingerprint.xml
+
+# Include the Goodix AIDL HAL namespaces.
+PRODUCT_SOONG_NAMESPACES += vendor/goodix/udfps/g6_trusty
+PRODUCT_SOONG_NAMESPACES += vendor/goodix/udfps/g6_aidl_trusty
+
+$(call soong_config_set,fp_hal_feature,biometric_suez_support,true)
+
+PRODUCT_PACKAGES += \
+ android.hardware.biometrics.fingerprint@2.1-service.goodix \
+ android.hardware.biometrics.fingerprint-service.goodix
diff --git a/fingerprint/udfps_factory.mk b/fingerprint/udfps_factory.mk
new file mode 100644
index 0000000..41aebe0
--- /dev/null
+++ b/fingerprint/udfps_factory.mk
@@ -0,0 +1,22 @@
+#
+# Copyright (C) 2020 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_PACKAGES += \
+ GF_delmar_factory \
+ udfps_test
+
+PRODUCT_PROPERTY_OVERRIDES += \
+ gf.debug.dump_data=1
diff --git a/firmware/BCM.btaddr b/firmware/BCM.btaddr
new file mode 100644
index 0000000..4bf70eb
--- /dev/null
+++ b/firmware/BCM.btaddr
@@ -0,0 +1 @@
+22:22:3b:ff:0d:50
diff --git a/firmware/BCM4362A2_001.003.006.0027.0033.hcd b/firmware/BCM4362A2_001.003.006.0027.0033.hcd
new file mode 100644
index 0000000..27b0dbc
Binary files /dev/null and b/firmware/BCM4362A2_001.003.006.0027.0033.hcd differ
diff --git a/firmware/BCM4389C0_003.001.010.0101.0000_Google_eval_USI_ES10.hcd b/firmware/BCM4389C0_003.001.010.0101.0000_Google_eval_USI_ES10.hcd
new file mode 100644
index 0000000..8e73e47
Binary files /dev/null and b/firmware/BCM4389C0_003.001.010.0101.0000_Google_eval_USI_ES10.hcd differ
diff --git a/firmware/BCM4389C1_003.002.009.0050.0000_Google_eval_USI_ES10_ePA_Updated.hcd b/firmware/BCM4389C1_003.002.009.0050.0000_Google_eval_USI_ES10_ePA_Updated.hcd
new file mode 100644
index 0000000..47120b3
Binary files /dev/null and b/firmware/BCM4389C1_003.002.009.0050.0000_Google_eval_USI_ES10_ePA_Updated.hcd differ
diff --git a/health/Android.bp b/health/Android.bp
new file mode 100644
index 0000000..97cdece
--- /dev/null
+++ b/health/Android.bp
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "//device/google/zumapro:device_google_zumapro_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ default_applicable_licenses: [
+ "//device/google/zumapro:device_google_zumapro_license",
+ ],
+}
+
+cc_defaults {
+ name: "android.hardware.health-service.zumapro-defaults",
+ defaults: [
+ "libhealth_aidl_impl_user",
+ "libhealth_aidl_charger_defaults",
+ ],
+ relative_install_path: "hw",
+ vintf_fragments: ["android.hardware.health-service.zumapro.xml"],
+ srcs: [
+ "Health.cpp",
+ ],
+
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
+
+ static_libs: [
+ "libhealth_aidl_impl",
+ ],
+}
+
+cc_binary {
+ name: "android.hardware.health-service.zumapro",
+ defaults: ["android.hardware.health-service.zumapro-defaults"],
+ proprietary: true,
+ init_rc: ["android.hardware.health-service.zumapro.rc"],
+ overrides: ["charger"],
+ shared_libs: [
+ "libpixelhealth",
+ ],
+}
+
+cc_binary {
+ name: "android.hardware.health-service.zumapro_recovery",
+ defaults: ["android.hardware.health-service.zumapro-defaults"],
+ recovery: true,
+ init_rc: ["android.hardware.health-service.zumapro_recovery.rc"],
+ overrides: ["charger.recovery"],
+}
diff --git a/health/Health.cpp b/health/Health.cpp
new file mode 100644
index 0000000..848dfe9
--- /dev/null
+++ b/health/Health.cpp
@@ -0,0 +1,264 @@
+/*
+ * Copyright (C) 2018 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.
+ */
+#define LOG_TAG "android.hardware.health@2.1-impl-zumapro"
+#include
+
+#include
+#include
+#include
+#include
+#include
+#include
+
+// Recovery doesn't have libpixelhealth and charger mode
+#ifndef __ANDROID_RECOVERY__
+#include
+#include
+#include
+#include
+#include
+#include
+#endif // !__ANDROID_RECOVERY__
+
+#include
+#include
+#include
+#include
+#include
+
+namespace {
+
+using namespace std::literals;
+
+using aidl::android::hardware::health::DiskStats;
+using aidl::android::hardware::health::HalHealthLoop;
+using aidl::android::hardware::health::HealthInfo;
+using aidl::android::hardware::health::StorageInfo;
+using android::hardware::health::InitHealthdConfig;
+
+#ifndef __ANDROID_RECOVERY__
+using aidl::android::hardware::health::charger::ChargerCallback;
+using aidl::android::hardware::health::charger::ChargerModeMain;
+using hardware::google::pixel::health::BatteryDefender;
+using hardware::google::pixel::health::BatteryMetricsLogger;
+using hardware::google::pixel::health::DeviceHealth;
+using hardware::google::pixel::health::LowBatteryShutdownMetrics;
+using hardware::google::pixel::health::ChargerDetect;
+
+#define FG_DIR "/sys/class/power_supply/battery"
+constexpr char kBatteryResistance[] {FG_DIR "/resistance"};
+constexpr char kBatteryOCV[] {FG_DIR "/voltage_ocv"};
+constexpr char kVoltageAvg[] {FG_DIR "/voltage_now"};
+
+#define WLC_DIR "/sys/class/power_supply/wireless"
+
+static BatteryDefender battDefender(WLC_DIR "/present",
+ "/sys/devices/platform/google,charger/charge_start_level",
+ "/sys/devices/platform/google,charger/charge_stop_level");
+static BatteryMetricsLogger battMetricsLogger(kBatteryResistance, kBatteryOCV);
+static LowBatteryShutdownMetrics shutdownMetrics(kVoltageAvg);
+static DeviceHealth deviceHealth;
+#endif // !__ANDROID_RECOVERY__
+
+#define UFS_DIR "/dev/sys/block/bootdevice"
+constexpr char kUfsHealthEol[]{UFS_DIR "/health_descriptor/eol_info"};
+constexpr char kUfsHealthLifetimeA[]{UFS_DIR "/health_descriptor/life_time_estimation_a"};
+constexpr char kUfsHealthLifetimeB[]{UFS_DIR "/health_descriptor/life_time_estimation_b"};
+constexpr char kUfsVersion[]{UFS_DIR "/device_descriptor/specification_version"};
+constexpr char kDiskStatsFile[]{"/sys/block/sda/stat"};
+
+static std::string ufs_version;
+static uint16_t eol;
+static uint16_t lifetimeA;
+static uint16_t lifetimeB;
+static std::chrono::system_clock::time_point ufs_last_query_time;
+constexpr auto kUfsQueryIntervalHours = std::chrono::hours{24};
+
+#ifndef __ANDROID_RECOVERY__
+static bool needs_wlc_updates = false;
+constexpr char kWlcCapacity[]{WLC_DIR "/capacity"};
+#endif // !__ANDROID_RECOVERY__
+
+std::ifstream assert_open(const std::string &path) {
+ std::ifstream stream(path);
+ if (!stream.is_open()) {
+ LOG(WARNING) << "Cannot read " << path;
+ }
+ return stream;
+}
+
+template
+void read_value_from_file(const std::string &path, T *field) {
+ auto stream = assert_open(path);
+ stream.unsetf(std::ios_base::basefield);
+ stream >> *field;
+}
+
+void read_ufs_version(StorageInfo *info) {
+ if (ufs_version.empty()) {
+ uint64_t value;
+ read_value_from_file(kUfsVersion, &value);
+ std::stringstream ss;
+ ss << "ufs " << std::hex << value;
+ ufs_version = ss.str();
+ LOG(INFO) << "ufs: " << ufs_version << " detected";
+ }
+ info->version = ufs_version;
+}
+
+#ifdef __ANDROID_RECOVERY__
+void private_healthd_board_init(struct healthd_config *) {}
+int private_healthd_board_battery_update(HealthInfo *) { return 0; }
+#else // !__ANDROID__RECOVERY__
+
+static bool FileExists(const std::string &filename) {
+ struct stat buffer;
+
+ return stat(filename.c_str(), &buffer) == 0;
+}
+
+void private_healthd_board_init(struct healthd_config *hc) {
+ std::string tcpmPsyName;
+ ChargerDetect::populateTcpmPsyName(&tcpmPsyName);
+ hc->ignorePowerSupplyNames.push_back(android::String8(tcpmPsyName.c_str()));
+ needs_wlc_updates = FileExists(kWlcCapacity);
+ if (needs_wlc_updates == false) {
+ battDefender.setWirelessNotSupported();
+ }
+}
+
+int private_healthd_board_battery_update(HealthInfo *health_info) {
+ deviceHealth.update(health_info);
+ battMetricsLogger.logBatteryProperties(*health_info);
+ shutdownMetrics.logShutdownVoltage(*health_info);
+ // Allow BatteryDefender to override online properties
+ ChargerDetect::onlineUpdate(health_info);
+ battDefender.update(health_info);
+
+ if (needs_wlc_updates &&
+ !android::base::WriteStringToFile(std::to_string(health_info->batteryLevel), kWlcCapacity))
+ LOG(INFO) << "Unable to write battery level to wireless capacity";
+
+ return 0;
+}
+#endif // __ANDROID_RECOVERY__
+
+void private_get_storage_info(std::vector *vec_storage_info) {
+ vec_storage_info->resize(1);
+ StorageInfo *storage_info = &vec_storage_info->at(0);
+
+ read_ufs_version(storage_info);
+
+ auto time_now = std::chrono::system_clock::now();
+ auto time_delta = time_now - ufs_last_query_time;
+ auto hoursElapsed = std::chrono::duration_cast(time_delta);
+ if (hoursElapsed >= kUfsQueryIntervalHours) {
+ ufs_last_query_time = time_now;
+ read_value_from_file(kUfsHealthEol, &eol);
+ read_value_from_file(kUfsHealthLifetimeA, &lifetimeA);
+ read_value_from_file(kUfsHealthLifetimeB, &lifetimeB);
+ LOG(INFO) << "ufs: eol=" << eol << " lifetimeA=" << lifetimeA << " lifetimeB=" << lifetimeB;
+ }
+ storage_info->eol = eol;
+ storage_info->lifetimeA = lifetimeA;
+ storage_info->lifetimeB = lifetimeB;
+
+ return;
+}
+
+void private_get_disk_stats(std::vector *vec_stats) {
+ vec_stats->resize(1);
+ DiskStats *stats = &vec_stats->at(0);
+
+ auto stream = assert_open(kDiskStatsFile);
+ // Regular diskstats entries
+ stream >> stats->reads >> stats->readMerges >> stats->readSectors >>
+ stats->readTicks >> stats->writes >> stats->writeMerges >>
+ stats->writeSectors >> stats->writeTicks >> stats->ioInFlight >>
+ stats->ioTicks >> stats->ioInQueue;
+ return;
+}
+} // anonymous namespace
+
+namespace aidl::android::hardware::health::implementation {
+class HealthImpl : public Health {
+ public:
+ HealthImpl(std::string_view instance_name, std::unique_ptr&& config)
+ : Health(std::move(instance_name), std::move(config)) {}
+
+ ndk::ScopedAStatus getDiskStats(std::vector* out) override;
+ ndk::ScopedAStatus getStorageInfo(std::vector* out) override;
+
+ protected:
+ void UpdateHealthInfo(HealthInfo* health_info) override;
+
+};
+
+void HealthImpl::UpdateHealthInfo(HealthInfo* health_info) {
+ private_healthd_board_battery_update(health_info);
+}
+
+ndk::ScopedAStatus HealthImpl::getStorageInfo(std::vector* out)
+{
+ private_get_storage_info(out);
+ if (out->empty()) {
+ return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
+ }
+ return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus HealthImpl::getDiskStats(std::vector* out)
+{
+ private_get_disk_stats(out);
+ if (out->empty()) {
+ return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
+ }
+ return ndk::ScopedAStatus::ok();
+}
+
+} // namespace aidl::android::hardware::health::implementation
+
+int main(int argc, char **argv) {
+ using ::aidl::android::hardware::health::implementation::HealthImpl;
+
+ // Use kernel logging in recovery
+#ifdef __ANDROID_RECOVERY__
+ android::base::InitLogging(argv, android::base::KernelLogger);
+#endif
+
+ auto config = std::make_unique();
+ InitHealthdConfig(config.get());
+
+ private_healthd_board_init(config.get());
+
+ auto binder =
+ ndk::SharedRefBase::make("default"sv, std::move(config));
+
+ if (argc >= 2 && argv[1] == "--charger"sv) {
+ // In regular mode, start charger UI.
+#ifndef __ANDROID_RECOVERY__
+ LOG(INFO) << "Starting charger mode with UI.";
+ return ChargerModeMain(binder, std::make_shared(binder));
+#endif
+ // In recovery, ignore --charger arg.
+ LOG(INFO) << "Starting charger mode without UI.";
+ } else {
+ LOG(INFO) << "Starting health HAL.";
+ }
+
+ auto hal_health_loop = std::make_shared(binder, binder);
+ return hal_health_loop->StartLoop();
+}
diff --git a/health/android.hardware.health-service.zumapro.rc b/health/android.hardware.health-service.zumapro.rc
new file mode 100644
index 0000000..f7175f8
--- /dev/null
+++ b/health/android.hardware.health-service.zumapro.rc
@@ -0,0 +1,17 @@
+service vendor.health-zumapro /vendor/bin/hw/android.hardware.health-service.zumapro
+ class hal
+ user system
+ group system
+ capabilities WAKE_ALARM BLOCK_SUSPEND
+ file /dev/kmsg w
+
+service vendor.charger /vendor/bin/hw/android.hardware.health-service.zumapro --charger
+ class charger
+ seclabel u:r:charger_vendor:s0
+ user system
+ group system wakelock input
+ capabilities SYS_BOOT
+ file /dev/kmsg w
+ file /sys/fs/pstore/console-ramoops-0 r
+ file /sys/fs/pstore/console-ramoops r
+ file /proc/last_kmsg r
diff --git a/health/android.hardware.health-service.zumapro.xml b/health/android.hardware.health-service.zumapro.xml
new file mode 100644
index 0000000..98026cb
--- /dev/null
+++ b/health/android.hardware.health-service.zumapro.xml
@@ -0,0 +1,7 @@
+
+
+ android.hardware.health
+ 1
+ IHealth/default
+
+
diff --git a/health/android.hardware.health-service.zumapro_recovery.rc b/health/android.hardware.health-service.zumapro_recovery.rc
new file mode 100644
index 0000000..c0cd085
--- /dev/null
+++ b/health/android.hardware.health-service.zumapro_recovery.rc
@@ -0,0 +1,7 @@
+service vendor.health-zumapro /system/bin/hw/android.hardware.health-service.zumapro_recovery
+ class hal
+ seclabel u:r:hal_health_default:s0
+ user system
+ group system
+ capabilities WAKE_ALARM BLOCK_SUSPEND
+ file /dev/kmsg w
diff --git a/init.hardware.wlc.rc.userdebug b/init.hardware.wlc.rc.userdebug
new file mode 100644
index 0000000..dee7b6b
--- /dev/null
+++ b/init.hardware.wlc.rc.userdebug
@@ -0,0 +1,24 @@
+#
+# Copyright (C) 2018 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.
+#
+
+on property:sys.boot_completed=1 && property:persist.vendor.limit.wlc.current=1
+ write /sys/class/power_supply/dc/current_max 75000
+
+on property:sys.boot_completed=1 && property:persist.vendor.limit.wlc.current=0
+ write /sys/class/power_supply/dc/current_max 1100000
+
+on property:vendor.disable.wlc=1
+ write /sys/class/power_supply/wireless/online 0
diff --git a/interfaces/boot/1.0/Android.bp b/interfaces/boot/1.0/Android.bp
new file mode 100644
index 0000000..c62eabd
--- /dev/null
+++ b/interfaces/boot/1.0/Android.bp
@@ -0,0 +1,66 @@
+//
+// Copyright (C) 2019 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "//device/google/zumapro:device_google_zumapro_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ default_applicable_licenses: [
+ "//device/google/zumapro:device_google_zumapro_license",
+ ],
+}
+
+cc_binary {
+ name: "android.hardware.boot@1.0-service-zumapro",
+ defaults: ["hidl_defaults"],
+ relative_install_path: "hw",
+ vendor: true,
+ init_rc: ["android.hardware.boot@1.0-service-zumapro.rc"],
+ srcs: [
+ "BootControl.cpp",
+ "GptUtils.cpp",
+ "service.cpp"
+ ],
+ shared_libs: [
+ "libbase",
+ "liblog",
+ "libhidlbase",
+ "libutils",
+ "libcutils",
+ "libz",
+ "android.hardware.boot@1.0",
+ ],
+}
+
+cc_library {
+ name: "android.hardware.boot@1.0-impl-zumapro",
+ recovery: true,
+ srcs: [
+ "BootControl.cpp",
+ "GptUtils.cpp",
+ ],
+ relative_install_path: "hw",
+ shared_libs: [
+ "libbase",
+ "liblog",
+ "libhidlbase",
+ "libutils",
+ "libcutils",
+ "libz",
+ "android.hardware.boot@1.0",
+ ],
+}
diff --git a/interfaces/boot/1.0/BootControl.cpp b/interfaces/boot/1.0/BootControl.cpp
new file mode 100644
index 0000000..1f155c9
--- /dev/null
+++ b/interfaces/boot/1.0/BootControl.cpp
@@ -0,0 +1,272 @@
+/*
+ * Copyright (C) 2019 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.
+ */
+
+#define LOG_TAG "bootcontrolhal"
+
+#include "BootControl.h"
+#include "GptUtils.h"
+
+#include
+#include
+#include
+
+namespace android {
+namespace hardware {
+namespace boot {
+namespace V1_0 {
+namespace implementation {
+
+namespace {
+
+#define BOOT_A_PATH "/dev/block/by-name/boot_a"
+#define BOOT_B_PATH "/dev/block/by-name/boot_b"
+
+// slot flags
+#define AB_ATTR_PRIORITY_SHIFT 52
+#define AB_ATTR_PRIORITY_MASK (3UL << AB_ATTR_PRIORITY_SHIFT)
+#define AB_ATTR_ACTIVE_SHIFT 54
+#define AB_ATTR_ACTIVE (1UL << AB_ATTR_ACTIVE_SHIFT)
+#define AB_ATTR_RETRY_COUNT_SHIFT (55)
+#define AB_ATTR_RETRY_COUNT_MASK (7UL << AB_ATTR_RETRY_COUNT_SHIFT)
+#define AB_ATTR_SUCCESSFUL (1UL << 58)
+#define AB_ATTR_UNBOOTABLE (1UL << 59)
+
+#define AB_ATTR_MAX_PRIORITY 3UL
+#define AB_ATTR_MAX_RETRY_COUNT 3UL
+
+static std::string getDevPath(uint32_t slot) {
+ char real_path[PATH_MAX];
+
+ const char *path = slot == 0 ? BOOT_A_PATH : BOOT_B_PATH;
+
+ int ret = readlink(path, real_path, sizeof real_path);
+ if (ret < 0) {
+ ALOGE("readlink failed for boot device %s\n", strerror(errno));
+ return std::string();
+ }
+
+ std::string dp(real_path);
+ // extract /dev/sda.. part
+ return dp.substr(0, sizeof "/dev/block/sdX" - 1);
+}
+
+static bool isSlotFlagSet(uint32_t slot, uint64_t flag) {
+ std::string dev_path = getDevPath(slot);
+ if (dev_path.empty()) {
+ ALOGI("Could not get device path for slot %d\n", slot);
+ return false;
+ }
+
+ GptUtils gpt(dev_path);
+ if (gpt.Load()) {
+ ALOGI("failed to load gpt data\n");
+ return false;
+ }
+
+ gpt_entry *e = gpt.GetPartitionEntry(slot ? "boot_b" : "boot_a");
+ if (e == nullptr) {
+ ALOGI("failed to get gpt entry\n");
+ return false;
+ }
+
+ return !!(e->attr & flag);
+}
+
+static int setSlotFlag(uint32_t slot, uint64_t flag) {
+ std::string dev_path = getDevPath(slot);
+ if (dev_path.empty()) {
+ ALOGI("Could not get device path for slot %d\n", slot);
+ return -1;
+ }
+
+ GptUtils gpt(dev_path);
+ if (gpt.Load()) {
+ ALOGI("failed to load gpt data\n");
+ return -1;
+ }
+
+ gpt_entry *e = gpt.GetPartitionEntry(slot ? "boot_b" : "boot_a");
+ if (e == nullptr) {
+ ALOGI("failed to get gpt entry\n");
+ return -1;
+ }
+
+ e->attr |= flag;
+ gpt.Sync();
+
+ return 0;
+}
+
+}
+
+// Methods from ::android::hardware::boot::V1_0::IBootControl follow.
+Return BootControl::getNumberSlots() {
+ uint32_t slots = 0;
+
+ if (access(BOOT_A_PATH, F_OK) == 0)
+ slots++;
+
+ if (access(BOOT_B_PATH, F_OK) == 0)
+ slots++;
+
+ return slots;
+}
+
+Return BootControl::getCurrentSlot() {
+ char suffix[PROPERTY_VALUE_MAX];
+ property_get("ro.boot.slot_suffix", suffix, "_a");
+ return std::string(suffix) == "_b" ? 1 : 0;
+}
+
+Return BootControl::markBootSuccessful(markBootSuccessful_cb _hidl_cb) {
+ if (getNumberSlots() == 0) {
+ // no slots, just return true otherwise Android keeps trying
+ _hidl_cb({true, ""});
+ return Void();
+ }
+ int ret = setSlotFlag(getCurrentSlot(), AB_ATTR_SUCCESSFUL);
+ ret ? _hidl_cb({false, "Failed to set successfull flag"}) : _hidl_cb({true, ""});
+ return Void();
+}
+
+Return BootControl::setActiveBootSlot(uint32_t slot, setActiveBootSlot_cb _hidl_cb) {
+ if (slot >= 2) {
+ _hidl_cb({false, "Invalid slot"});
+ return Void();
+ }
+
+ std::string dev_path = getDevPath(slot);
+ if (dev_path.empty()) {
+ _hidl_cb({false, "Could not get device path for slot"});
+ return Void();
+ }
+
+ GptUtils gpt(dev_path);
+ if (gpt.Load()) {
+ _hidl_cb({false, "failed to load gpt data"});
+ return Void();
+ }
+
+ gpt_entry *active_entry = gpt.GetPartitionEntry(slot == 0 ? "boot_a" : "boot_b");
+ gpt_entry *inactive_entry = gpt.GetPartitionEntry(slot == 0 ? "boot_b" : "boot_a");
+ if (active_entry == nullptr || inactive_entry == nullptr) {
+ _hidl_cb({false, "failed to get entries for boot partitions"});
+ return Void();
+ }
+
+ ALOGV("slot active attributes %lx\n", active_entry->attr);
+ ALOGV("slot inactive attributes %lx\n", inactive_entry->attr);
+
+ char boot_dev[PROPERTY_VALUE_MAX];
+ property_get("ro.boot.bootdevice", boot_dev, "");
+ if (boot_dev[0] == '\0') {
+ _hidl_cb({false, "invalid ro.boot.bootdevice prop"});
+ return Void();
+ }
+
+ std::string boot_lun_path = std::string("/sys/devices/platform/") +
+ boot_dev + "/pixel/boot_lun_enabled";
+ int fd = open(boot_lun_path.c_str(), O_RDWR);
+ if (fd < 0) {
+ // Try old path for kernels < 5.4
+ // TODO: remove once kernel 4.19 support is deprecated
+ std::string boot_lun_path = std::string("/sys/devices/platform/") +
+ boot_dev + "/attributes/boot_lun_enabled";
+ fd = open(boot_lun_path.c_str(), O_RDWR);
+ if (fd < 0) {
+ _hidl_cb({false, "failed to open ufs attr boot_lun_enabled"});
+ return Void();
+ }
+ }
+
+ // update attributes for active and inactive
+ inactive_entry->attr &= ~AB_ATTR_ACTIVE;
+ active_entry->attr = AB_ATTR_ACTIVE | (AB_ATTR_MAX_PRIORITY << AB_ATTR_PRIORITY_SHIFT) |
+ (AB_ATTR_MAX_RETRY_COUNT << AB_ATTR_RETRY_COUNT_SHIFT);
+
+ //
+ // bBootLunEn
+ // 0x1 => Boot LU A = enabled, Boot LU B = disable
+ // 0x2 => Boot LU A = disable, Boot LU B = enabled
+ //
+ int ret = android::base::WriteStringToFd(slot == 0 ? "1" : "2", fd);
+ close(fd);
+ if (ret < 0) {
+ _hidl_cb({false, "faied to write boot_lun_enabled attribute"});
+ return Void();
+ }
+
+ _hidl_cb({true, ""});
+ return Void();
+}
+
+Return BootControl::setSlotAsUnbootable(uint32_t slot, setSlotAsUnbootable_cb _hidl_cb) {
+ if (slot >= 2) {
+ _hidl_cb({false, "Invalid slot"});
+ return Void();
+ }
+
+ std::string dev_path = getDevPath(slot);
+ if (dev_path.empty()) {
+ _hidl_cb({false, "Could not get device path for slot"});
+ return Void();
+ }
+
+ GptUtils gpt(dev_path);
+ gpt.Load();
+
+ gpt_entry *e = gpt.GetPartitionEntry(slot ? "boot_b" : "boot_a");
+ e->attr |= AB_ATTR_UNBOOTABLE;
+
+ gpt.Sync();
+
+ _hidl_cb({true, ""});
+ return Void();
+}
+
+Return<::android::hardware::boot::V1_0::BoolResult> BootControl::isSlotBootable(uint32_t slot) {
+ if (getNumberSlots() == 0)
+ return BoolResult::FALSE;
+ if (slot >= getNumberSlots())
+ return BoolResult::INVALID_SLOT;
+ return isSlotFlagSet(slot, AB_ATTR_UNBOOTABLE) ? BoolResult::FALSE : BoolResult::TRUE;
+}
+
+Return<::android::hardware::boot::V1_0::BoolResult> BootControl::isSlotMarkedSuccessful(uint32_t slot) {
+ if (getNumberSlots() == 0) {
+ // just return true so that we don't we another call trying to mark it as successful
+ // when there is no slots
+ return BoolResult::TRUE;
+ }
+ if (slot >= getNumberSlots())
+ return BoolResult::INVALID_SLOT;
+ return isSlotFlagSet(slot, AB_ATTR_SUCCESSFUL) ? BoolResult::TRUE : BoolResult::FALSE;
+}
+
+Return BootControl::getSuffix(uint32_t slot, getSuffix_cb _hidl_cb) {
+ _hidl_cb(slot == 0 ? "_a" : slot == 1 ? "_b" : "");
+ return Void();
+}
+
+extern "C" IBootControl* HIDL_FETCH_IBootControl(const char*) {
+ return new BootControl();
+}
+
+} // namespace implementation
+} // namespace V1_0
+} // namespace boot
+} // namespace hardware
+} // namespace android
diff --git a/interfaces/boot/1.0/BootControl.h b/interfaces/boot/1.0/BootControl.h
new file mode 100644
index 0000000..eb81cb0
--- /dev/null
+++ b/interfaces/boot/1.0/BootControl.h
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2019 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
+
+#include
+#include
+#include
+
+namespace android {
+namespace hardware {
+namespace boot {
+namespace V1_0 {
+namespace implementation {
+
+using ::android::hardware::hidl_array;
+using ::android::hardware::hidl_memory;
+using ::android::hardware::hidl_string;
+using ::android::hardware::hidl_vec;
+using ::android::hardware::Return;
+using ::android::hardware::Void;
+using ::android::sp;
+
+struct BootControl : public IBootControl {
+ // Methods from ::android::hardware::boot::V1_0::IBootControl follow.
+ Return getNumberSlots() override;
+ Return getCurrentSlot() override;
+ Return markBootSuccessful(markBootSuccessful_cb _hidl_cb) override;
+ Return setActiveBootSlot(uint32_t slot, setActiveBootSlot_cb _hidl_cb) override;
+ Return setSlotAsUnbootable(uint32_t slot, setSlotAsUnbootable_cb _hidl_cb) override;
+ Return<::android::hardware::boot::V1_0::BoolResult> isSlotBootable(uint32_t slot) override;
+ Return<::android::hardware::boot::V1_0::BoolResult> isSlotMarkedSuccessful(uint32_t slot) override;
+ Return getSuffix(uint32_t slot, getSuffix_cb _hidl_cb) override;
+
+ // Methods from ::android::hidl::base::V1_0::IBase follow.
+
+};
+
+// FIXME: most likely delete, this is only for passthrough implementations
+extern "C" IBootControl* HIDL_FETCH_IBootControl(const char* name);
+
+} // namespace implementation
+} // namespace V1_0
+} // namespace boot
+} // namespace hardware
+} // namespace android
diff --git a/interfaces/boot/1.0/GptUtils.cpp b/interfaces/boot/1.0/GptUtils.cpp
new file mode 100644
index 0000000..f893617
--- /dev/null
+++ b/interfaces/boot/1.0/GptUtils.cpp
@@ -0,0 +1,199 @@
+/*
+ * Copyright (C) 2019 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.
+ */
+
+#define LOG_TAG "bootcontrolhal"
+
+#include "GptUtils.h"
+
+#include
+#include
+#include
+#include
+#include
+
+namespace android {
+namespace hardware {
+namespace boot {
+namespace V1_0 {
+namespace implementation {
+
+namespace {
+
+static int ValidateGptHeader(gpt_header *gpt)
+{
+ if (gpt->signature != GPT_SIGNATURE) {
+ ALOGE("invalid gpt signature 0x%lx\n", gpt->signature);
+ return -1;
+ }
+
+ if (gpt->header_size != sizeof(gpt_header)) {
+ ALOGE("invalid gpt header size %u\n", gpt->header_size);
+ return -1;
+ }
+
+ if (gpt->entry_size != sizeof(gpt_entry)) {
+ ALOGE("invalid gpt entry size %u\n", gpt->entry_size);
+ return -1;
+ }
+
+ return 0;
+}
+
+}
+
+GptUtils::GptUtils(const std::string dev_path) : dev_path(dev_path), fd(0) {}
+
+int GptUtils::Load(void)
+{
+ fd = open(dev_path.c_str(), O_RDWR);
+ if (fd < 0) {
+ ALOGE("failed to open block dev %s, %d\n", dev_path.c_str(), errno);
+ return -1;
+ }
+
+ int ret = ioctl(fd, BLKSSZGET, &block_size);
+ if (ret < 0) {
+ ALOGE("failed to get block size %d\n", errno);
+ return -1;
+ }
+
+ // read primary header
+ lseek64(fd, block_size, SEEK_SET);
+ ret = read(fd, &gpt_primary, sizeof gpt_primary);
+ if (ret < 0) {
+ ALOGE("failed to read gpt primary header %d\n", errno);
+ return -1;
+ }
+
+ if (ValidateGptHeader(&gpt_primary)) {
+ ALOGE("error validating gpt header\n");
+ return -1;
+ }
+
+ // read partition entries
+ entry_array.resize(gpt_primary.entry_count);
+ uint32_t entries_size = gpt_primary.entry_size * gpt_primary.entry_count;
+ lseek64(fd, block_size * gpt_primary.start_lba, SEEK_SET);
+ ret = read(fd, entry_array.data(), entries_size);
+ if (ret < 0) {
+ ALOGE("failed to read gpt partition entries %d\n", errno);
+ return -1;
+ }
+
+ // read gpt back header
+ lseek64(fd, block_size * gpt_primary.backup_lba, SEEK_SET);
+ ret = read(fd, &gpt_backup, sizeof gpt_backup);
+ if (ret < 0) {
+ ALOGE("failed to read gpt backup header %d\n", errno);
+ return -1;
+ }
+
+ if (ValidateGptHeader(&gpt_backup)) {
+ ALOGW("error validating gpt backup\n"); // just warn about it, not fail
+ }
+
+ // Create map
+ auto get_name = [](const uint16_t *efi_name) {
+ char name[37] = {};
+ for (int i = 0; efi_name[i] && i < sizeof name - 1; ++i)
+ name[i] = efi_name[i];
+ return std::string(name);
+ };
+
+ for (auto const &e: entry_array) {
+ if (e.name[0] == 0)
+ break; // stop at the first partition with no name
+ std::string s = get_name(e.name);
+ entries[s] = const_cast(&e);
+ }
+
+ return 0;
+}
+
+gpt_entry *GptUtils::GetPartitionEntry(std::string name)
+{
+ return entries.find(name) != entries.end() ? entries[name] : nullptr;
+}
+
+int GptUtils::Sync(void)
+{
+ if (!fd)
+ return -1;
+
+ // calculate crc and check if we need to update gpt
+ gpt_primary.entries_crc32 = crc32(0, reinterpret_cast(entry_array.data()),
+ entry_array.size() * sizeof(gpt_entry));
+
+ // save old crc
+ uint32_t crc = gpt_primary.crc32;
+ gpt_primary.crc32 = 0;
+
+ gpt_primary.crc32 = crc32(0, reinterpret_cast(&gpt_primary), sizeof gpt_primary);
+ if (crc == gpt_primary.crc32)
+ return 0; // nothing to do (no changes)
+
+ ALOGI("updating GPT\n");
+
+ lseek64(fd, block_size * gpt_primary.current_lba, SEEK_SET);
+ int ret = write(fd, &gpt_primary, sizeof gpt_primary);
+ if (ret < 0) {
+ ALOGE("failed to write gpt primary header %d\n", errno);
+ return -1;
+ }
+
+ lseek64(fd, block_size * gpt_primary.start_lba, SEEK_SET);
+ ret = write(fd, entry_array.data(), entry_array.size() * sizeof(gpt_entry));
+ if (ret < 0) {
+ ALOGE("failed to write gpt partition entries %d\n", errno);
+ return -1;
+ }
+
+ //update GPT backup entries and backup
+ lseek64(fd, block_size * gpt_backup.start_lba, SEEK_SET);
+ ret = write(fd, entry_array.data(), entry_array.size() * sizeof(gpt_entry));
+ if (ret < 0) {
+ ALOGE("failed to write gpt backup partition entries %d\n", errno);
+ return -1;
+ }
+
+ gpt_backup.entries_crc32 = gpt_primary.entries_crc32;
+ gpt_backup.crc32 = 0;
+ gpt_backup.crc32 = crc32(0, reinterpret_cast(&gpt_backup), sizeof gpt_backup);
+ lseek64(fd, block_size * gpt_primary.backup_lba, SEEK_SET);
+ ret = write(fd, &gpt_backup, sizeof gpt_backup);
+ if (ret < 0) {
+ ALOGE("failed to write gpt backup header %d\n", errno);
+ return -1;
+ }
+
+ fsync(fd);
+
+ return 0;
+}
+
+GptUtils::~GptUtils()
+{
+ if (fd) {
+ Sync();
+ close(fd);
+ }
+}
+
+} // namespace implementation
+} // namespace V1_0
+} // namespace boot
+} // namespace hardware
+} // namespace android
diff --git a/interfaces/boot/1.0/GptUtils.h b/interfaces/boot/1.0/GptUtils.h
new file mode 100644
index 0000000..d969d9d
--- /dev/null
+++ b/interfaces/boot/1.0/GptUtils.h
@@ -0,0 +1,79 @@
+/*
+ * Copyright (C) 2019 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
+
+#include
+#include
+#include