Merge zumapro/ripcurrentpro from master to udc-qpr-dev am: 98ec0197df
Original change: https://googleplex-android-review.googlesource.com/c/device/google/zumapro/+/23411719 Change-Id: Icb76ee256b434364ecbbf7ea88f1569c4da6f88a Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
c85d70c5f9
262 changed files with 17000 additions and 0 deletions
36
Android.bp
Normal file
36
Android.bp
Normal file
|
@ -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",
|
||||
],
|
||||
}
|
30
Android.mk
Normal file
30
Android.mk
Normal file
|
@ -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
|
431
BoardConfig-common.mk
Normal file
431
BoardConfig-common.mk
Normal file
|
@ -0,0 +1,431 @@
|
|||
#
|
||||
# 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)
|
||||
# TODO(b/272725898): Needs to check with owner later
|
||||
$(warning display_unit_test set to zuma on zumapro target)
|
||||
$(call soong_config_set,display_unit_test,soc,zuma)
|
||||
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
|
||||
|
||||
# TODO(b/272725898): Needs to check with owner later
|
||||
$(warning BOARD_LIBACRYL_DEFAULT_COMPOSITOR set to zuma on zumapro target)
|
||||
BOARD_LIBACRYL_DEFAULT_COMPOSITOR := fimg2d_zuma
|
||||
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
|
85
CleanSpec.mk
Normal file
85
CleanSpec.mk
Normal file
|
@ -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)
|
190
NOTICE
Normal file
190
NOTICE
Normal file
|
@ -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
|
||||
|
2
OWNERS
Normal file
2
OWNERS
Normal file
|
@ -0,0 +1,2 @@
|
|||
# per-file for Pixel device makefiles, see go/pixel-device-mk-owner-checklist for details.
|
||||
per-file *.mk=file:device/google/gs-common:master:/OWNERS
|
51
aosp_common.mk
Normal file
51
aosp_common.mk
Normal file
|
@ -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
|
84
compatibility_matrix.xml
Normal file
84
compatibility_matrix.xml
Normal file
|
@ -0,0 +1,84 @@
|
|||
<!--
|
||||
Autogenerated skeleton compatibility matrix.
|
||||
Use with caution. Modify it to suit your needs.
|
||||
All HALs are set to optional.
|
||||
Many entries other than HALs are zero-filled and
|
||||
require human attention.
|
||||
-->
|
||||
<compatibility-matrix version="1.0" type="device">
|
||||
<hal format="hidl" optional="true">
|
||||
<name>android.frameworks.displayservice</name>
|
||||
<version>1.0</version>
|
||||
<interface>
|
||||
<name>IDisplayService</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl" optional="true">
|
||||
<name>android.frameworks.schedulerservice</name>
|
||||
<version>1.0</version>
|
||||
<interface>
|
||||
<name>ISchedulingPolicyService</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl" optional="true">
|
||||
<name>android.frameworks.sensorservice</name>
|
||||
<version>1.0</version>
|
||||
<interface>
|
||||
<name>ISensorManager</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl" optional="true">
|
||||
<name>android.hardware.graphics.composer</name>
|
||||
<version>2.1</version>
|
||||
<interface>
|
||||
<name>IComposer</name>
|
||||
<instance>vr</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl" optional="true">
|
||||
<name>android.hidl.allocator</name>
|
||||
<version>1.0</version>
|
||||
<interface>
|
||||
<name>IAllocator</name>
|
||||
<instance>ashmem</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl" optional="true">
|
||||
<name>android.hidl.manager</name>
|
||||
<version>1.0</version>
|
||||
<interface>
|
||||
<name>IServiceManager</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl" optional="true">
|
||||
<name>android.hidl.memory</name>
|
||||
<version>1.0</version>
|
||||
<interface>
|
||||
<name>IMapper</name>
|
||||
<instance>ashmem</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl" optional="true">
|
||||
<name>android.hidl.token</name>
|
||||
<version>1.0</version>
|
||||
<interface>
|
||||
<name>ITokenManager</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl" optional="true">
|
||||
<name>android.system.wifi.keystore</name>
|
||||
<version>1.0</version>
|
||||
<interface>
|
||||
<name>IKeystore</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<vndk>
|
||||
<version>0.0.0</version>
|
||||
</vndk>
|
||||
</compatibility-matrix>
|
23
component-overrides.xml
Normal file
23
component-overrides.xml
Normal file
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- 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.
|
||||
-->
|
||||
<config>
|
||||
<component-override package="com.android.bluetooth" >
|
||||
<component class=".sap.SapService" enabled="true" />
|
||||
</component-override>
|
||||
<component-override package="com.google.android.apps.tips" >
|
||||
<component class=".TipsMain" enabled="true" />
|
||||
</component-override>
|
||||
</config>
|
134
conf/Android.bp
Normal file
134
conf/Android.bp
Normal file
|
@ -0,0 +1,134 @@
|
|||
/*
|
||||
* 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.zuma-hw-encrypt",
|
||||
srcs: ["fstab.zumapro.in"],
|
||||
out: ["fstab.zuma"],
|
||||
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-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.zuma-sw-encrypt",
|
||||
srcs: ["fstab.zumapro.in"],
|
||||
out: ["fstab.zuma"],
|
||||
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-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.zuma-no-encrypt",
|
||||
srcs: ["fstab.zumapro.in"],
|
||||
out: ["fstab.zuma"],
|
||||
cmd: "sed -e s/@fileencryption@//" +
|
||||
" -e s/@inlinecrypt@// " +
|
||||
" -e s/@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.zuma-fips",
|
||||
srcs: ["fstab.zumapro.in"],
|
||||
out: ["fstab.zuma-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)",
|
||||
}
|
||||
|
||||
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.zuma",
|
||||
src: ":gen_fstab.zuma-no-encrypt",
|
||||
vendor: true,
|
||||
vendor_ramdisk_available: true,
|
||||
}
|
||||
|
||||
prebuilt_etc {
|
||||
name: "fstab.zumapro",
|
||||
src: ":gen_fstab.zumapro-no-encrypt",
|
||||
vendor: true,
|
||||
vendor_ramdisk_available: true,
|
||||
}
|
||||
|
||||
prebuilt_etc {
|
||||
name: "fstab.zuma-fips",
|
||||
src: ":gen_fstab.zuma-fips",
|
||||
vendor: true,
|
||||
vendor_ramdisk_available: true,
|
||||
}
|
||||
|
||||
prebuilt_etc {
|
||||
name: "fstab.zumapro-fips",
|
||||
src: ":gen_fstab.zumapro-fips",
|
||||
vendor: true,
|
||||
vendor_ramdisk_available: true,
|
||||
}
|
1
conf/egl.cfg
Normal file
1
conf/egl.cfg
Normal file
|
@ -0,0 +1 @@
|
|||
0 1 mali
|
4
conf/fstab.modem
Normal file
4
conf/fstab.modem
Normal file
|
@ -0,0 +1,4 @@
|
|||
# Android fstab file.
|
||||
# <src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
|
||||
# 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
|
5
conf/fstab.persist
Normal file
5
conf/fstab.persist
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Android fstab file.
|
||||
# <src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
|
||||
# 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
|
4
conf/fstab.postinstall
Normal file
4
conf/fstab.postinstall
Normal file
|
@ -0,0 +1,4 @@
|
|||
# Android fstab file.
|
||||
#
|
||||
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
|
||||
system /postinstall ext4 ro,nosuid,nodev,noexec slotselect_other,logical,avb_keys=/product/etc/security/avb/system_other.avbpubkey
|
25
conf/fstab.zumapro.in
Normal file
25
conf/fstab.zumapro.in
Normal file
|
@ -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
|
||||
#
|
||||
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
|
||||
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
|
55
conf/init.debug.rc
Normal file
55
conf/init.debug.rc
Normal file
|
@ -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
|
20
conf/init.exynos.nanohub.rc
Normal file
20
conf/init.exynos.nanohub.rc
Normal file
|
@ -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
|
19
conf/init.factory.rc
Normal file
19
conf/init.factory.rc
Normal file
|
@ -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
|
69
conf/init.freq.userdebug.rc
Normal file
69
conf/init.freq.userdebug.rc
Normal file
|
@ -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"
|
||||
|
16
conf/init.recovery.device.rc
Normal file
16
conf/init.recovery.device.rc
Normal file
|
@ -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
|
1065
conf/init.zumapro.rc
Normal file
1065
conf/init.zumapro.rc
Normal file
File diff suppressed because it is too large
Load diff
194
conf/init.zumapro.usb.rc
Normal file
194
conf/init.zumapro.usb.rc
Normal file
|
@ -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
|
3
conf/recovery.wipe
Normal file
3
conf/recovery.wipe
Normal file
|
@ -0,0 +1,3 @@
|
|||
# All the partitions to be wiped (in order) under recovery.
|
||||
/dev/block/by-name/userdata
|
||||
/dev/block/by-name/metadata
|
109
conf/soundtrigger_conf.h
Normal file
109
conf/soundtrigger_conf.h
Normal file
|
@ -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__
|
225
conf/ueventd.zumapro.rc
Normal file
225
conf/ueventd.zumapro.rc
Normal file
|
@ -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
|
130
default-permissions.xml
Normal file
130
default-permissions.xml
Normal file
|
@ -0,0 +1,130 @@
|
|||
<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
|
||||
|
||||
<!-- Copyright (C) 2019 Google Inc.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<!--
|
||||
This file contains permissions to be granted by default. Default
|
||||
permissions are granted to special platform components and to apps
|
||||
that are approved to get default grants. The special components
|
||||
are apps that are expected tto work out-of-the-box as they provide
|
||||
core use cases such as default dialer, default email, etc. These
|
||||
grants are managed by the platform. The apps that are additionally
|
||||
approved for default grants are ones that provide carrier specific
|
||||
functionality, ones legally required at some location, ones providing
|
||||
alternative disclosure and opt-out UI, ones providing highlight features
|
||||
of a dedicated device, etc. This file contains only the latter exceptions.
|
||||
Fixed permissions cannot be controlled by the user and need a special
|
||||
approval. Typically these are to ensure either legally mandated functions
|
||||
or the app is considered a part of the OS.
|
||||
-->
|
||||
|
||||
<exceptions>
|
||||
|
||||
<!-- This is an example of an exception:
|
||||
<exception
|
||||
package="foo.bar.permission"
|
||||
<permission name="android.permission.READ_CONTACTS" fixed="true"/>
|
||||
<permission name="android.permission.READ_CALENDAR" fixed="false"/>
|
||||
</exception>
|
||||
-->
|
||||
|
||||
<exception package="com.google.android.settings.intelligence">
|
||||
<!-- Calendar -->
|
||||
<permission name="android.permission.READ_CALENDAR" fixed="true"/>
|
||||
<!-- Location -->
|
||||
<permission name="android.permission.ACCESS_FINE_LOCATION" fixed="false"/>
|
||||
<permission name="android.permission.ACCESS_BACKGROUND_LOCATION" fixed="false"/>
|
||||
</exception>
|
||||
|
||||
<exception package="com.google.android.apps.cbrsnetworkmonitor">
|
||||
<!-- Location access to create CBRS geofences-->
|
||||
<permission name="android.permission.ACCESS_FINE_LOCATION" fixed="true"/>
|
||||
<permission name="android.permission.ACCESS_BACKGROUND_LOCATION" fixed="true"/>
|
||||
</exception>
|
||||
|
||||
<exception package="com.google.android.apps.scone">
|
||||
<!-- NLP Location access to determine proximity to country border -->
|
||||
<permission name="android.permission.ACCESS_COARSE_LOCATION" fixed="false"/>
|
||||
<permission name="android.permission.ACCESS_BACKGROUND_LOCATION" fixed="false"/>
|
||||
<!-- Used to call ActivityTransition API for Smart PNO -->
|
||||
<permission name="android.permission.ACTIVITY_RECOGNITION" fixed="false"/>
|
||||
</exception>
|
||||
|
||||
<exception
|
||||
package="com.google.android.apps.restore">
|
||||
<!-- External storage -->
|
||||
<permission name="android.permission.READ_EXTERNAL_STORAGE" fixed="false"/>
|
||||
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" fixed="false"/>
|
||||
<!-- Contacts -->
|
||||
<permission name="android.permission.READ_CONTACTS" fixed="false"/>
|
||||
<permission name="android.permission.WRITE_CONTACTS" fixed="false"/>
|
||||
<!-- Call logs -->
|
||||
<permission name="android.permission.READ_CALL_LOG" fixed="false"/>
|
||||
<permission name="android.permission.WRITE_CALL_LOG" fixed="false"/>
|
||||
<!-- Used to set up a Wi-Fi P2P network -->
|
||||
<permission name="android.permission.NEARBY_WIFI_DEVICES" fixed="false"/>
|
||||
<!-- Notifications -->
|
||||
<permission name="android.permission.POST_NOTIFICATIONS" fixed="false"/>
|
||||
</exception>
|
||||
|
||||
<exception
|
||||
package="com.verizon.mips.services">
|
||||
<!-- Call -->
|
||||
<permission name="android.permission.PROCESS_OUTGOING_CALLS" fixed="false"/>
|
||||
<!-- Phone -->
|
||||
<permission name="android.permission.READ_PHONE_STATE" fixed="false"/>
|
||||
<!-- SMS -->
|
||||
<permission name="android.permission.RECEIVE_SMS" fixed="false"/>
|
||||
</exception>
|
||||
|
||||
<exception
|
||||
package="com.google.android.factorytest">
|
||||
<!-- Camera -->
|
||||
<permission name="android.permission.CAMERA" fixed="false"/>
|
||||
<!-- Microphone -->
|
||||
<permission name="android.permission.RECORD_AUDIO" fixed="false"/>
|
||||
<!-- Storage -->
|
||||
<permission name="android.permission.READ_EXTERNAL_STORAGE" fixed="false"/>
|
||||
<permission name="android.permission.WRITE_EXTERNAL_STORAGE" fixed="false"/>
|
||||
</exception>
|
||||
|
||||
<exception package="com.google.android.wfcactivation">
|
||||
<!-- SMS -->
|
||||
<permission name="android.permission.RECEIVE_WAP_PUSH" fixed="false"/>
|
||||
</exception>
|
||||
|
||||
<exception package="com.google.android.apps.accessibility.voiceaccess">
|
||||
<!-- Voice Access: A11y app to allow users to setup & control their devices with voice -->
|
||||
<!-- Approved android bug for pregrant permissions: b/182307492 -->
|
||||
|
||||
<!-- Phone state to turn off Voice Access when user is in a phone call -->
|
||||
<permission name="android.permission.READ_PHONE_STATE" fixed="false"/>
|
||||
|
||||
<!-- Microphone: To hear user's voice commands -->
|
||||
<permission name="android.permission.RECORD_AUDIO" fixed="false"/>
|
||||
</exception>
|
||||
<exception
|
||||
package="com.google.android.deskclock">
|
||||
<!-- Notifications -->
|
||||
<permission name="android.permission.POST_NOTIFICATIONS" fixed="false"/>
|
||||
</exception>
|
||||
<exception
|
||||
package="com.google.android.apps.tips">
|
||||
<!-- Notifications -->
|
||||
<permission name="android.permission.POST_NOTIFICATIONS" fixed="false"/>
|
||||
</exception>
|
||||
</exceptions>
|
||||
|
55
device-common.mk
Normal file
55
device-common.mk
Normal file
|
@ -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
|
16
device-shipping-common.mk
Normal file
16
device-shipping-common.mk
Normal file
|
@ -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
|
204
device_framework_matrix_product.xml
Normal file
204
device_framework_matrix_product.xml
Normal file
|
@ -0,0 +1,204 @@
|
|||
<compatibility-matrix version="1.0" type="framework" level="7">
|
||||
<hal format="aidl" optional="true">
|
||||
<name>android.hardware.biometrics.face</name>
|
||||
<interface>
|
||||
<name>IFace</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="aidl" optional="true">
|
||||
<name>android.hardware.biometrics.fingerprint</name>
|
||||
<interface>
|
||||
<name>IFingerprint</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="aidl">
|
||||
<name>android.hardware.contexthub</name>
|
||||
<version>1</version>
|
||||
<interface>
|
||||
<name>IContextHub</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="aidl">
|
||||
<name>android.hardware.graphics.composer3</name>
|
||||
<version>2</version>
|
||||
<interface>
|
||||
<name>IComposer</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl" optional="true">
|
||||
<name>android.hardware.radio</name>
|
||||
<version>1.2</version>
|
||||
<interface>
|
||||
<name>ISap</name>
|
||||
<instance>slot2</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl" optional="true">
|
||||
<name>android.hardware.radio.config</name>
|
||||
<version>1.1</version>
|
||||
<interface>
|
||||
<name>IRadioConfig</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="aidl" optional="true">
|
||||
<name>android.hardware.wifi.hostapd</name>
|
||||
<version>1</version>
|
||||
<interface>
|
||||
<name>IHostapd</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl" optional="true">
|
||||
<name>android.vendor.samsung_slsi.telephony.hardware.radio</name>
|
||||
<version>1.1</version>
|
||||
<interface>
|
||||
<name>IOemSamsungslsi</name>
|
||||
<instance>slot1</instance>
|
||||
<instance>slot2</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl" optional="true">
|
||||
<name>com.fingerprints33.extension</name>
|
||||
<version>1.0</version>
|
||||
<interface>
|
||||
<name>IFingerprintAuthenticator</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
<interface>
|
||||
<name>IFingerprintCalibration</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
<interface>
|
||||
<name>IFingerprintEngineering</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
<interface>
|
||||
<name>IFingerprintNavigation</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
<interface>
|
||||
<name>IFingerprintRecalibration</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
<interface>
|
||||
<name>IFingerprintSenseTouch</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
<interface>
|
||||
<name>IFingerprintSensorTest</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="aidl" optional="true">
|
||||
<name>com.google.face.debug</name>
|
||||
<version>2</version>
|
||||
<interface>
|
||||
<name>IDebugHost</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
<interface>
|
||||
<name>IDebugManager</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="aidl" optional="true">
|
||||
<name>com.google.edgetpu</name>
|
||||
<version>2</version>
|
||||
<interface>
|
||||
<name>IEdgeTpuVendorService</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="aidl" optional="true">
|
||||
<name>com.google.edgetpu.dba</name>
|
||||
<version>1</version>
|
||||
<interface>
|
||||
<name>IDevice</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="aidl" optional="true">
|
||||
<name>com.google.hardware.pixel.display</name>
|
||||
<version>8</version>
|
||||
<interface>
|
||||
<name>IDisplay</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="aidl" optional="true">
|
||||
<name>com.google.input.algos.spd</name>
|
||||
<interface>
|
||||
<name>IScreenProtectorDetectorService</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="aidl" optional="true">
|
||||
<name>com.google.input</name>
|
||||
<interface>
|
||||
<name>ITouchContextService</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="aidl" optional="true">
|
||||
<name>hardware.qorvo.uwb</name>
|
||||
<interface>
|
||||
<name>IUwbVendor</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl" optional="true">
|
||||
<name>vendor.goodix.hardware.biometrics.fingerprint</name>
|
||||
<version>2.1</version>
|
||||
<interface>
|
||||
<name>IGoodixFingerprintDaemon</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="aidl" optional="true">
|
||||
<name>vendor.google.google_battery</name>
|
||||
<version>2</version>
|
||||
<interface>
|
||||
<name>IGoogleBattery</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl" optional="true">
|
||||
<name>vendor.google.radioext</name>
|
||||
<version>1.6</version>
|
||||
<interface>
|
||||
<name>IRadioExt</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="aidl" optional="true">
|
||||
<name>vendor.google.wifi_ext</name>
|
||||
<version>1</version>
|
||||
<interface>
|
||||
<name>IWifiExt</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl" optional="true">
|
||||
<name>vendor.samsung_slsi.telephony.hardware.oemservice</name>
|
||||
<version>1.0</version>
|
||||
<interface>
|
||||
<name>IOemService</name>
|
||||
<instance>dm0</instance>
|
||||
<instance>dm1</instance>
|
||||
<instance>sced0</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl" optional="true">
|
||||
<name>vendor.samsung_slsi.telephony.hardware.radioExternal</name>
|
||||
<version>1.1</version>
|
||||
<interface>
|
||||
<name>IOemSlsiRadioExternal</name>
|
||||
<instance>rilExternal</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
</compatibility-matrix>
|
BIN
display/display_colordata_cal0.pb
Normal file
BIN
display/display_colordata_cal0.pb
Normal file
Binary file not shown.
25
dumpstate/Android.bp
Normal file
25
dumpstate/Android.bp
Normal file
|
@ -0,0 +1,25 @@
|
|||
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_gsa.sh",
|
||||
src: "dump_gsa.sh",
|
||||
vendor: true,
|
||||
sub_dir: "dump",
|
||||
}
|
||||
|
9
dumpstate/OWNERS
Normal file
9
dumpstate/OWNERS
Normal file
|
@ -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
|
1
dumpstate/README.txt
Normal file
1
dumpstate/README.txt
Normal file
|
@ -0,0 +1 @@
|
|||
Please refer to go/pixel-recycle to modularize your code in this space.
|
8
dumpstate/dump_gsa.sh
Normal file
8
dumpstate/dump_gsa.sh
Normal file
|
@ -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
|
||||
|
411
dumpstate/dump_power.sh
Normal file
411
dumpstate/dump_power.sh
Normal file
|
@ -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
|
3
dumpstate/dump_wlan.sh
Normal file
3
dumpstate/dump_wlan.sh
Normal file
|
@ -0,0 +1,3 @@
|
|||
#!/vendor/bin/sh
|
||||
echo "--- wlan WIP ---"
|
||||
|
5
dumpstate/item.mk
Normal file
5
dumpstate/item.mk
Normal file
|
@ -0,0 +1,5 @@
|
|||
PRODUCT_PACKAGES += dump_wlan.sh \
|
||||
dump_power.sh
|
||||
|
||||
PRODUCT_PACKAGES_DEBUG += dump_gsa.sh
|
||||
|
25
factory/factory_post_boot/Android.bp
Normal file
25
factory/factory_post_boot/Android.bp
Normal file
|
@ -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",
|
||||
}
|
||||
|
4
factory/factory_post_boot/factory_post_boot.sh
Normal file
4
factory/factory_post_boot/factory_post_boot.sh
Normal file
|
@ -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
|
15
factory/framework/Android.bp
Normal file
15
factory/framework/Android.bp
Normal file
|
@ -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,
|
||||
}
|
24
factory/framework/AndroidManifest.xml
Normal file
24
factory/framework/AndroidManifest.xml
Normal file
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- 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.
|
||||
-->
|
||||
<!-- Pixel specific factory overlays -->
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.android.frameworkres.overlay.factory">
|
||||
<application android:hasCode="false" />
|
||||
<overlay
|
||||
android:targetPackage="android"
|
||||
android:isStatic="true"
|
||||
android:priority="2"/>
|
||||
</manifest>
|
BIN
factory/framework/res/drawable-nodpi/default_wallpaper.png
Normal file
BIN
factory/framework/res/drawable-nodpi/default_wallpaper.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
15
factory/launcher3/Android.bp
Normal file
15
factory/launcher3/Android.bp
Normal file
|
@ -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,
|
||||
}
|
25
factory/launcher3/AndroidManifest.xml
Normal file
25
factory/launcher3/AndroidManifest.xml
Normal file
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- 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.
|
||||
-->
|
||||
<!-- Pixel specific factory overlays -->
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.android.launcher3.overlay.factory">
|
||||
<application android:hasCode="false" />
|
||||
<overlay
|
||||
android:targetPackage="com.android.launcher3"
|
||||
android:targetName="favorites"
|
||||
android:isStatic="true"
|
||||
android:priority="2"/>
|
||||
</manifest>
|
41
factory/launcher3/res/xml/default_workspace_5x5.xml
Normal file
41
factory/launcher3/res/xml/default_workspace_5x5.xml
Normal file
|
@ -0,0 +1,41 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2009 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.
|
||||
-->
|
||||
|
||||
<favorites xmlns:launcher="http://schemas.android.com/apk/res-auto/com.android.launcher3">
|
||||
|
||||
<!-- Hotseat (We use the screen as the position of the item in the hotseat) -->
|
||||
<!-- Dialer, Capacity, ELabel, Language, Barcode -->
|
||||
<resolve
|
||||
launcher:container="-101"
|
||||
launcher:screen="0"
|
||||
launcher:x="0"
|
||||
launcher:y="0" >
|
||||
<favorite launcher:uri="#Intent;action=android.intent.action.DIAL;end" />
|
||||
<favorite launcher:uri="tel:123" />
|
||||
<favorite launcher:uri="#Intent;action=android.intent.action.CALL_BUTTON;end" />
|
||||
</resolve>
|
||||
|
||||
<resolve
|
||||
launcher:container="-101"
|
||||
launcher:screen="4"
|
||||
launcher:x="4"
|
||||
launcher:y="0" >
|
||||
<favorite
|
||||
launcher:packageName="com.google_cte.barcodescanner"
|
||||
launcher:className="com.google_cte.barcodescanner.MainActivity" />
|
||||
</resolve>
|
||||
|
||||
</favorites>
|
15
factory/settings/Android.bp
Normal file
15
factory/settings/Android.bp
Normal file
|
@ -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,
|
||||
}
|
25
factory/settings/AndroidManifest.xml
Normal file
25
factory/settings/AndroidManifest.xml
Normal file
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- 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.
|
||||
-->
|
||||
<!-- Pixel specific factory overlays -->
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.android.providers.settings.overlay.factory">
|
||||
<application android:hasCode="false" />
|
||||
<overlay
|
||||
android:targetPackage="com.android.providers.settings"
|
||||
android:targetName="resources"
|
||||
android:isStatic="true"
|
||||
android:priority="2"/>
|
||||
</manifest>
|
26
factory/settings/res/values/defaults.xml
Normal file
26
factory/settings/res/values/defaults.xml
Normal file
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/**
|
||||
* Copyright (c) 2009, The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
-->
|
||||
<resources>
|
||||
<integer name="def_lockscreen_sounds_enabled">0</integer>
|
||||
<bool name="def_lockscreen_disabled">true</bool>
|
||||
<bool name="def_dtmf_tones_enabled">false</bool>
|
||||
<bool name="def_sound_effects_enabled">false</bool>
|
||||
<bool name="def_charging_sounds_enabled">false</bool>
|
||||
<string name="def_immersive_mode_confirmations" translatable="false">confirmed</string>
|
||||
</resources>
|
96
factory_common.mk
Normal file
96
factory_common.mk
Normal file
|
@ -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 \
|
18
fingerprint/fpc1540/fingerprint_config.mk
Normal file
18
fingerprint/fpc1540/fingerprint_config.mk
Normal file
|
@ -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/<manufacture>/<>/<device>.mk
|
||||
# Packages to include into the build
|
21
fingerprint/fpc1540/fingerprint_config_factory.mk
Normal file
21
fingerprint/fpc1540/fingerprint_config_factory.mk
Normal file
|
@ -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/<manufacture>/<>/<device>.mk
|
||||
# Packages to include into the build
|
8
fingerprint/fpc1540/fpc1540.mk
Normal file
8
fingerprint/fpc1540/fpc1540.mk
Normal file
|
@ -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
|
10
fingerprint/fpc1540/fpc1540_factory.mk
Normal file
10
fingerprint/fpc1540/fpc1540_factory.mk
Normal file
|
@ -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 \
|
1
firmware/BCM.btaddr
Normal file
1
firmware/BCM.btaddr
Normal file
|
@ -0,0 +1 @@
|
|||
22:22:3b:ff:0d:50
|
BIN
firmware/BCM4362A2_001.003.006.0027.0033.hcd
Normal file
BIN
firmware/BCM4362A2_001.003.006.0027.0033.hcd
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
67
health/Android.bp
Normal file
67
health/Android.bp
Normal file
|
@ -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"],
|
||||
}
|
264
health/Health.cpp
Normal file
264
health/Health.cpp
Normal file
|
@ -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 <android-base/logging.h>
|
||||
|
||||
#include <android-base/file.h>
|
||||
#include <android-base/parseint.h>
|
||||
#include <android-base/strings.h>
|
||||
#include <android/hardware/health/translate-ndk.h>
|
||||
#include <health-impl/Health.h>
|
||||
#include <health/utils.h>
|
||||
|
||||
// Recovery doesn't have libpixelhealth and charger mode
|
||||
#ifndef __ANDROID_RECOVERY__
|
||||
#include <health-impl/ChargerUtils.h>
|
||||
#include <pixelhealth/BatteryDefender.h>
|
||||
#include <pixelhealth/BatteryMetricsLogger.h>
|
||||
#include <pixelhealth/ChargerDetect.h>
|
||||
#include <pixelhealth/DeviceHealth.h>
|
||||
#include <pixelhealth/LowBatteryShutdownMetrics.h>
|
||||
#endif // !__ANDROID_RECOVERY__
|
||||
|
||||
#include <chrono>
|
||||
#include <fstream>
|
||||
#include <iomanip>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
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 <typename T>
|
||||
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<StorageInfo> *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<std::chrono::hours>(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<DiskStats> *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<healthd_config>&& config)
|
||||
: Health(std::move(instance_name), std::move(config)) {}
|
||||
|
||||
ndk::ScopedAStatus getDiskStats(std::vector<DiskStats>* out) override;
|
||||
ndk::ScopedAStatus getStorageInfo(std::vector<StorageInfo>* 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<StorageInfo>* 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<DiskStats>* 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<healthd_config>();
|
||||
InitHealthdConfig(config.get());
|
||||
|
||||
private_healthd_board_init(config.get());
|
||||
|
||||
auto binder =
|
||||
ndk::SharedRefBase::make<HealthImpl>("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<ChargerCallback>(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<HalHealthLoop>(binder, binder);
|
||||
return hal_health_loop->StartLoop();
|
||||
}
|
17
health/android.hardware.health-service.zumapro.rc
Normal file
17
health/android.hardware.health-service.zumapro.rc
Normal file
|
@ -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
|
7
health/android.hardware.health-service.zumapro.xml
Normal file
7
health/android.hardware.health-service.zumapro.xml
Normal file
|
@ -0,0 +1,7 @@
|
|||
<manifest version="1.0" type="device">
|
||||
<hal format="aidl">
|
||||
<name>android.hardware.health</name>
|
||||
<version>1</version>
|
||||
<fqname>IHealth/default</fqname>
|
||||
</hal>
|
||||
</manifest>
|
|
@ -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
|
24
init.hardware.wlc.rc.userdebug
Normal file
24
init.hardware.wlc.rc.userdebug
Normal file
|
@ -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
|
66
interfaces/boot/1.0/Android.bp
Normal file
66
interfaces/boot/1.0/Android.bp
Normal file
|
@ -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",
|
||||
],
|
||||
}
|
272
interfaces/boot/1.0/BootControl.cpp
Normal file
272
interfaces/boot/1.0/BootControl.cpp
Normal file
|
@ -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 <android-base/file.h>
|
||||
#include <cutils/properties.h>
|
||||
#include <log/log.h>
|
||||
|
||||
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<uint32_t> 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<uint32_t> BootControl::getCurrentSlot() {
|
||||
char suffix[PROPERTY_VALUE_MAX];
|
||||
property_get("ro.boot.slot_suffix", suffix, "_a");
|
||||
return std::string(suffix) == "_b" ? 1 : 0;
|
||||
}
|
||||
|
||||
Return<void> 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<void> 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<void> 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<void> 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
|
59
interfaces/boot/1.0/BootControl.h
Normal file
59
interfaces/boot/1.0/BootControl.h
Normal file
|
@ -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 <android/hardware/boot/1.0/IBootControl.h>
|
||||
#include <hidl/MQDescriptor.h>
|
||||
#include <hidl/Status.h>
|
||||
|
||||
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<uint32_t> getNumberSlots() override;
|
||||
Return<uint32_t> getCurrentSlot() override;
|
||||
Return<void> markBootSuccessful(markBootSuccessful_cb _hidl_cb) override;
|
||||
Return<void> setActiveBootSlot(uint32_t slot, setActiveBootSlot_cb _hidl_cb) override;
|
||||
Return<void> 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<void> 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
|
199
interfaces/boot/1.0/GptUtils.cpp
Normal file
199
interfaces/boot/1.0/GptUtils.cpp
Normal file
|
@ -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 <errno.h>
|
||||
#include <log/log.h>
|
||||
#include <android-base/file.h>
|
||||
#include <linux/fs.h>
|
||||
#include <zlib.h>
|
||||
|
||||
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 <partition name, gpt_entry pointer>
|
||||
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<gpt_entry *>(&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<uint8_t *>(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<uint8_t *>(&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<uint8_t *>(&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
|
79
interfaces/boot/1.0/GptUtils.h
Normal file
79
interfaces/boot/1.0/GptUtils.h
Normal file
|
@ -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 <string>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace android {
|
||||
namespace hardware {
|
||||
namespace boot {
|
||||
namespace V1_0 {
|
||||
namespace implementation {
|
||||
|
||||
#define GPT_SIGNATURE 0x5452415020494645UL
|
||||
|
||||
typedef struct {
|
||||
uint8_t type_guid[16];
|
||||
uint8_t guid[16];
|
||||
uint64_t first_lba;
|
||||
uint64_t last_lba;
|
||||
uint64_t attr;
|
||||
uint16_t name[36];
|
||||
} __attribute__((packed)) gpt_entry;
|
||||
|
||||
typedef struct {
|
||||
uint64_t signature;
|
||||
uint32_t revision;
|
||||
uint32_t header_size;
|
||||
uint32_t crc32;
|
||||
uint32_t reserved;
|
||||
uint64_t current_lba;
|
||||
uint64_t backup_lba;
|
||||
uint64_t first_usable_lba;
|
||||
uint64_t last_usable_lba;
|
||||
uint8_t disk_guid[16];
|
||||
uint64_t start_lba;
|
||||
uint32_t entry_count;
|
||||
uint32_t entry_size;
|
||||
uint32_t entries_crc32;
|
||||
} __attribute__((packed)) gpt_header;
|
||||
|
||||
class GptUtils {
|
||||
public:
|
||||
GptUtils(const std::string dev_path);
|
||||
int Load(void);
|
||||
gpt_entry *GetPartitionEntry(std::string name);
|
||||
int Sync(void);
|
||||
~GptUtils();
|
||||
|
||||
private:
|
||||
std::string dev_path;
|
||||
int fd;
|
||||
uint32_t block_size;
|
||||
gpt_header gpt_primary;
|
||||
gpt_header gpt_backup;
|
||||
std::vector<gpt_entry> entry_array;
|
||||
std::map<std::string, gpt_entry *>entries;
|
||||
};
|
||||
|
||||
} // namespace implementation
|
||||
} // namespace V1_0
|
||||
} // namespace boot
|
||||
} // namespace hardware
|
||||
} // namespace android
|
|
@ -0,0 +1,4 @@
|
|||
service vendor.boot-hal-1-0 /vendor/bin/hw/android.hardware.boot@1.0-service-zumapro
|
||||
class early_hal
|
||||
user root
|
||||
group root
|
47
interfaces/boot/1.0/service.cpp
Normal file
47
interfaces/boot/1.0/service.cpp
Normal file
|
@ -0,0 +1,47 @@
|
|||
/*
|
||||
* Copyright (C) 2016 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.boot@1.0-service"
|
||||
|
||||
#include <log/log.h>
|
||||
#include <hidl/HidlTransportSupport.h>
|
||||
#include <hidl/Status.h>
|
||||
#include <android/hardware/boot/1.0/IBootControl.h>
|
||||
#include "BootControl.h"
|
||||
|
||||
using ::android::status_t;
|
||||
|
||||
using ::android::hardware::boot::V1_0::IBootControl;
|
||||
|
||||
using ::android::hardware::boot::V1_0::implementation::BootControl;
|
||||
|
||||
int main (int /* argc */, char * /* argv */ []) {
|
||||
// This function must be called before you join to ensure the proper
|
||||
// number of threads are created. The threadpool will never exceed
|
||||
// size one because of this call.
|
||||
::android::hardware::configureRpcThreadpool(1 /*threads*/, true /*willJoin*/);
|
||||
|
||||
::android::sp bootctrl = new BootControl();
|
||||
const status_t status = bootctrl->registerAsService();
|
||||
if (status != ::android::OK) {
|
||||
return 1; // or handle error
|
||||
}
|
||||
|
||||
// Adds this thread to the threadpool, resulting in one total
|
||||
// thread in the threadpool. We could also do other things, but
|
||||
// would have to specify 'false' to willJoin in configureRpcThreadpool.
|
||||
::android::hardware::joinRpcThreadpool();
|
||||
return 1; // joinRpcThreadpool should never return
|
||||
}
|
83
interfaces/boot/1.2/Android.bp
Normal file
83
interfaces/boot/1.2/Android.bp
Normal file
|
@ -0,0 +1,83 @@
|
|||
//
|
||||
// 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.
|
||||
|
||||
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.2-service-zumapro",
|
||||
defaults: ["hidl_defaults"],
|
||||
relative_install_path: "hw",
|
||||
vendor: true,
|
||||
init_rc: ["android.hardware.boot@1.2-service-zumapro.rc"],
|
||||
srcs: [
|
||||
"BootControl.cpp",
|
||||
"GptUtils.cpp",
|
||||
"service.cpp"
|
||||
],
|
||||
shared_libs: [
|
||||
"libbase",
|
||||
"liblog",
|
||||
"libhidlbase",
|
||||
"libutils",
|
||||
"libcutils",
|
||||
"libz",
|
||||
"libtrusty",
|
||||
"android.hardware.boot@1.0",
|
||||
"android.hardware.boot@1.1",
|
||||
"android.hardware.boot@1.2",
|
||||
],
|
||||
static_libs: [
|
||||
"libboot_control",
|
||||
"libbootloader_message_vendor",
|
||||
"libfstab",
|
||||
],
|
||||
}
|
||||
|
||||
cc_library {
|
||||
name: "android.hardware.boot@1.2-impl-zumapro",
|
||||
stem: "android.hardware.boot@1.0-impl-1.2-impl-zumapro",
|
||||
recovery: true,
|
||||
srcs: [
|
||||
"BootControl.cpp",
|
||||
"GptUtils.cpp",
|
||||
],
|
||||
relative_install_path: "hw",
|
||||
shared_libs: [
|
||||
"libbase",
|
||||
"liblog",
|
||||
"libhidlbase",
|
||||
"libutils",
|
||||
"libcutils",
|
||||
"libz",
|
||||
"libtrusty",
|
||||
"android.hardware.boot@1.0",
|
||||
"android.hardware.boot@1.1",
|
||||
"android.hardware.boot@1.2",
|
||||
],
|
||||
static_libs: [
|
||||
"libboot_control",
|
||||
"libbootloader_message_vendor",
|
||||
"libfstab",
|
||||
],
|
||||
}
|
501
interfaces/boot/1.2/BootControl.cpp
Normal file
501
interfaces/boot/1.2/BootControl.cpp
Normal file
|
@ -0,0 +1,501 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#define LOG_TAG "bootcontrolhal"
|
||||
|
||||
#include "BootControl.h"
|
||||
|
||||
#include <android-base/file.h>
|
||||
#include <android-base/unique_fd.h>
|
||||
#include <bootloader_message/bootloader_message.h>
|
||||
#include <cutils/properties.h>
|
||||
#include <libboot_control/libboot_control.h>
|
||||
#include <log/log.h>
|
||||
#include <trusty/tipc.h>
|
||||
|
||||
#include "DevInfo.h"
|
||||
#include "GptUtils.h"
|
||||
|
||||
namespace android {
|
||||
namespace hardware {
|
||||
namespace boot {
|
||||
namespace V1_2 {
|
||||
namespace implementation {
|
||||
|
||||
using android::bootable::GetMiscVirtualAbMergeStatus;
|
||||
using android::bootable::InitMiscVirtualAbMessageIfNeeded;
|
||||
using android::bootable::SetMiscVirtualAbMergeStatus;
|
||||
using android::hardware::boot::V1_0::BoolResult;
|
||||
using android::hardware::boot::V1_0::CommandResult;
|
||||
using android::hardware::boot::V1_1::MergeStatus;
|
||||
|
||||
namespace {
|
||||
|
||||
// clang-format off
|
||||
|
||||
#define BOOT_A_PATH "/dev/block/by-name/boot_a"
|
||||
#define BOOT_B_PATH "/dev/block/by-name/boot_b"
|
||||
#define DEVINFO_PATH "/dev/block/by-name/devinfo"
|
||||
|
||||
// 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
|
||||
|
||||
// clang-format on
|
||||
|
||||
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 bool 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 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;
|
||||
}
|
||||
|
||||
e->attr |= flag;
|
||||
gpt.Sync();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool is_devinfo_valid;
|
||||
static bool is_devinfo_initialized;
|
||||
static std::mutex devinfo_lock;
|
||||
static devinfo_t devinfo;
|
||||
|
||||
static bool isDevInfoValid() {
|
||||
const std::lock_guard<std::mutex> lock(devinfo_lock);
|
||||
|
||||
if (is_devinfo_initialized) {
|
||||
return is_devinfo_valid;
|
||||
}
|
||||
|
||||
is_devinfo_initialized = true;
|
||||
|
||||
android::base::unique_fd fd(open(DEVINFO_PATH, O_RDONLY));
|
||||
android::base::ReadFully(fd, &devinfo, sizeof devinfo);
|
||||
|
||||
if (devinfo.magic != DEVINFO_MAGIC) {
|
||||
return is_devinfo_valid;
|
||||
}
|
||||
|
||||
uint32_t version = ((uint32_t)devinfo.ver_major << 16) | devinfo.ver_minor;
|
||||
// only version 3.3+ supports A/B data
|
||||
if (version >= 0x0003'0003) {
|
||||
is_devinfo_valid = true;
|
||||
}
|
||||
|
||||
return is_devinfo_valid;
|
||||
}
|
||||
|
||||
static bool DevInfoSync() {
|
||||
if (!isDevInfoValid()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
android::base::unique_fd fd(open(DEVINFO_PATH, O_WRONLY | O_DSYNC));
|
||||
return android::base::WriteFully(fd, &devinfo, sizeof devinfo);
|
||||
}
|
||||
|
||||
static void DevInfoInitSlot(devinfo_ab_slot_data_t &slot_data) {
|
||||
slot_data.retry_count = AB_ATTR_MAX_RETRY_COUNT;
|
||||
slot_data.unbootable = 0;
|
||||
slot_data.successful = 0;
|
||||
slot_data.active = 1;
|
||||
slot_data.fastboot_ok = 0;
|
||||
}
|
||||
|
||||
static int blow_otp_AR(bool secure) {
|
||||
static const char *dev_name = "/dev/trusty-ipc-dev0";
|
||||
static const char *otp_name = "com.android.trusty.otp_manager.tidl";
|
||||
int fd = 1, ret = 0;
|
||||
uint32_t cmd = secure? OTP_CMD_write_antirbk_secure_ap : OTP_CMD_write_antirbk_non_secure_ap;
|
||||
fd = tipc_connect(dev_name, otp_name);
|
||||
if (fd < 0) {
|
||||
ALOGI("Failed to connect to OTP_MGR ns TA - is it missing?\n");
|
||||
ret = -1;
|
||||
return ret;
|
||||
}
|
||||
|
||||
struct otp_mgr_req_base req = {
|
||||
.command = cmd,
|
||||
.resp_payload_size = 0,
|
||||
};
|
||||
struct iovec iov[] = {
|
||||
{
|
||||
.iov_base = &req,
|
||||
.iov_len = sizeof(req),
|
||||
},
|
||||
};
|
||||
|
||||
int rc = tipc_send(fd, iov, 1, NULL, 0);
|
||||
if (rc != sizeof(req)) {
|
||||
ALOGI("Send fail! %x\n", rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
struct otp_mgr_rsp_base resp;
|
||||
rc = read(fd, &resp, sizeof(resp));
|
||||
if (rc < 0) {
|
||||
ALOGI("Read fail! %x\n", rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
if (rc < sizeof(resp)) {
|
||||
ALOGI("Not enough data! %x\n", rc);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
if (resp.command != (cmd | OTP_RESP_BIT)) {
|
||||
ALOGI("Wrong command! %x\n", resp.command);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (resp.result != 0) {
|
||||
fprintf(stderr, "AR writing error! %x\n", resp.result);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
tipc_close(fd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool blowAR() {
|
||||
int ret = blow_otp_AR(true);
|
||||
if (ret) {
|
||||
ALOGI("Blow secure anti-rollback OTP failed");
|
||||
return false;
|
||||
}
|
||||
|
||||
ret = blow_otp_AR(false);
|
||||
if (ret) {
|
||||
ALOGI("Blow non-secure anti-rollback OTP failed");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
} // namespace
|
||||
|
||||
// Methods from ::android::hardware::boot::V1_0::IBootControl follow.
|
||||
Return<uint32_t> 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<uint32_t> BootControl::getCurrentSlot() {
|
||||
char suffix[PROPERTY_VALUE_MAX];
|
||||
property_get("ro.boot.slot_suffix", suffix, "_a");
|
||||
return std::string(suffix) == "_b" ? 1 : 0;
|
||||
}
|
||||
|
||||
Return<void> BootControl::markBootSuccessful(markBootSuccessful_cb _hidl_cb) {
|
||||
if (getNumberSlots() == 0) {
|
||||
// no slots, just return true otherwise Android keeps trying
|
||||
_hidl_cb({true, ""});
|
||||
return Void();
|
||||
}
|
||||
|
||||
bool ret;
|
||||
if (isDevInfoValid()) {
|
||||
auto const slot = getCurrentSlot();
|
||||
devinfo.ab_data.slots[slot].successful = 1;
|
||||
ret = DevInfoSync();
|
||||
} else {
|
||||
ret = setSlotFlag(getCurrentSlot(), AB_ATTR_SUCCESSFUL);
|
||||
}
|
||||
|
||||
if (!ret) {
|
||||
_hidl_cb({false, "Failed to set successful flag"});
|
||||
return Void();
|
||||
}
|
||||
|
||||
if (!blowAR()) {
|
||||
ALOGE("Failed to blow anti-rollback counter");
|
||||
// Ignore the error, since ABL will re-trigger it on reboot
|
||||
}
|
||||
|
||||
_hidl_cb({true, ""});
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> BootControl::setActiveBootSlot(uint32_t slot, setActiveBootSlot_cb _hidl_cb) {
|
||||
if (slot >= 2) {
|
||||
_hidl_cb({false, "Invalid slot"});
|
||||
return Void();
|
||||
}
|
||||
|
||||
if (isDevInfoValid()) {
|
||||
auto &active_slot_data = devinfo.ab_data.slots[slot];
|
||||
auto &inactive_slot_data = devinfo.ab_data.slots[!slot];
|
||||
|
||||
inactive_slot_data.active = 0;
|
||||
DevInfoInitSlot(active_slot_data);
|
||||
|
||||
if (!DevInfoSync()) {
|
||||
_hidl_cb({false, "Could not update DevInfo data"});
|
||||
return Void();
|
||||
}
|
||||
} else {
|
||||
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);
|
||||
|
||||
// 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);
|
||||
}
|
||||
|
||||
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 | O_DSYNC);
|
||||
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 | O_DSYNC);
|
||||
if (fd < 0) {
|
||||
_hidl_cb({false, "failed to open ufs attr boot_lun_enabled"});
|
||||
return Void();
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// 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<void> BootControl::setSlotAsUnbootable(uint32_t slot, setSlotAsUnbootable_cb _hidl_cb) {
|
||||
if (slot >= 2) {
|
||||
_hidl_cb({false, "Invalid slot"});
|
||||
return Void();
|
||||
}
|
||||
|
||||
if (isDevInfoValid()) {
|
||||
auto &slot_data = devinfo.ab_data.slots[slot];
|
||||
slot_data.unbootable = 1;
|
||||
if (!DevInfoSync()) {
|
||||
_hidl_cb({false, "Could not update DevInfo data"});
|
||||
return Void();
|
||||
}
|
||||
} else {
|
||||
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;
|
||||
|
||||
bool unbootable;
|
||||
if (isDevInfoValid()) {
|
||||
auto &slot_data = devinfo.ab_data.slots[slot];
|
||||
unbootable = !!slot_data.unbootable;
|
||||
} else {
|
||||
unbootable = isSlotFlagSet(slot, AB_ATTR_UNBOOTABLE);
|
||||
}
|
||||
|
||||
return 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;
|
||||
|
||||
bool successful;
|
||||
if (isDevInfoValid()) {
|
||||
auto &slot_data = devinfo.ab_data.slots[slot];
|
||||
successful = !!slot_data.successful;
|
||||
} else {
|
||||
successful = isSlotFlagSet(slot, AB_ATTR_SUCCESSFUL);
|
||||
}
|
||||
|
||||
return successful ? BoolResult::TRUE : BoolResult::FALSE;
|
||||
}
|
||||
|
||||
Return<void> BootControl::getSuffix(uint32_t slot, getSuffix_cb _hidl_cb) {
|
||||
_hidl_cb(slot == 0 ? "_a" : slot == 1 ? "_b" : "");
|
||||
return Void();
|
||||
}
|
||||
|
||||
// Methods from ::android::hardware::boot::V1_1::IBootControl follow.
|
||||
bool BootControl::Init() {
|
||||
return InitMiscVirtualAbMessageIfNeeded();
|
||||
}
|
||||
|
||||
Return<bool> BootControl::setSnapshotMergeStatus(
|
||||
::android::hardware::boot::V1_1::MergeStatus status) {
|
||||
return SetMiscVirtualAbMergeStatus(getCurrentSlot(), status);
|
||||
}
|
||||
|
||||
Return<::android::hardware::boot::V1_1::MergeStatus> BootControl::getSnapshotMergeStatus() {
|
||||
MergeStatus status;
|
||||
if (!GetMiscVirtualAbMergeStatus(getCurrentSlot(), &status)) {
|
||||
return MergeStatus::UNKNOWN;
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
// Methods from ::android::hardware::boot::V1_2::IBootControl follow.
|
||||
Return<uint32_t> BootControl::getActiveBootSlot() {
|
||||
if (getNumberSlots() == 0)
|
||||
return 0;
|
||||
|
||||
if (isDevInfoValid())
|
||||
return devinfo.ab_data.slots[1].active ? 1 : 0;
|
||||
return isSlotFlagSet(1, AB_ATTR_ACTIVE) ? 1 : 0;
|
||||
}
|
||||
|
||||
// Methods from ::android::hidl::base::V1_0::IBase follow.
|
||||
|
||||
IBootControl *HIDL_FETCH_IBootControl(const char * /* name */) {
|
||||
auto module = new BootControl();
|
||||
|
||||
module->Init();
|
||||
|
||||
return module;
|
||||
}
|
||||
|
||||
} // namespace implementation
|
||||
} // namespace V1_2
|
||||
} // namespace boot
|
||||
} // namespace hardware
|
||||
} // namespace android
|
88
interfaces/boot/1.2/BootControl.h
Normal file
88
interfaces/boot/1.2/BootControl.h
Normal file
|
@ -0,0 +1,88 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <android/hardware/boot/1.2/IBootControl.h>
|
||||
#include <hidl/MQDescriptor.h>
|
||||
#include <hidl/Status.h>
|
||||
|
||||
namespace android {
|
||||
namespace hardware {
|
||||
namespace boot {
|
||||
namespace V1_2 {
|
||||
namespace implementation {
|
||||
|
||||
using ::android::sp;
|
||||
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;
|
||||
|
||||
struct BootControl : public IBootControl {
|
||||
bool Init();
|
||||
|
||||
// Methods from ::android::hardware::boot::V1_0::IBootControl follow.
|
||||
Return<uint32_t> getNumberSlots() override;
|
||||
Return<uint32_t> getCurrentSlot() override;
|
||||
Return<void> markBootSuccessful(markBootSuccessful_cb _hidl_cb) override;
|
||||
Return<void> setActiveBootSlot(uint32_t slot, setActiveBootSlot_cb _hidl_cb) override;
|
||||
Return<void> 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<void> getSuffix(uint32_t slot, getSuffix_cb _hidl_cb) override;
|
||||
|
||||
// Methods from ::android::hardware::boot::V1_1::IBootControl follow.
|
||||
Return<bool> setSnapshotMergeStatus(
|
||||
::android::hardware::boot::V1_1::MergeStatus status) override;
|
||||
Return<::android::hardware::boot::V1_1::MergeStatus> getSnapshotMergeStatus() override;
|
||||
|
||||
// Methods from ::android::hardware::boot::V1_2::IBootControl follow.
|
||||
Return<uint32_t> getActiveBootSlot() 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);
|
||||
|
||||
enum otpmgr_command : uint32_t {
|
||||
OTP_REQ_SHIFT = 1,
|
||||
OTP_RESP_BIT = 1,
|
||||
OTP_CMD_write_antirbk_non_secure_ap = (7 << OTP_REQ_SHIFT),
|
||||
OTP_CMD_write_antirbk_secure_ap = (8 << OTP_REQ_SHIFT),
|
||||
};
|
||||
|
||||
struct otp_mgr_req_base {
|
||||
uint32_t command;
|
||||
uint32_t resp_payload_size;
|
||||
uint8_t handle;
|
||||
}__packed;
|
||||
|
||||
struct otp_mgr_rsp_base {
|
||||
uint32_t command;
|
||||
uint32_t resp_payload_size;
|
||||
int result;
|
||||
}__packed;
|
||||
|
||||
} // namespace implementation
|
||||
} // namespace V1_2
|
||||
} // namespace boot
|
||||
} // namespace hardware
|
||||
} // namespace android
|
61
interfaces/boot/1.2/DevInfo.h
Normal file
61
interfaces/boot/1.2/DevInfo.h
Normal file
|
@ -0,0 +1,61 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace android {
|
||||
namespace hardware {
|
||||
namespace boot {
|
||||
namespace V1_2 {
|
||||
namespace implementation {
|
||||
|
||||
//
|
||||
// definitions taken from ABL code
|
||||
//
|
||||
|
||||
constexpr uint32_t DEVINFO_MAGIC = 0x49564544;
|
||||
constexpr size_t DEVINFO_AB_SLOT_COUNT = 2;
|
||||
|
||||
struct devinfo_ab_slot_data_t {
|
||||
uint8_t retry_count;
|
||||
uint8_t unbootable : 1;
|
||||
uint8_t successful : 1;
|
||||
uint8_t active : 1;
|
||||
uint8_t fastboot_ok : 1;
|
||||
uint8_t : 4;
|
||||
uint8_t unused[2];
|
||||
} __attribute__((packed));
|
||||
|
||||
typedef struct {
|
||||
devinfo_ab_slot_data_t slots[DEVINFO_AB_SLOT_COUNT];
|
||||
} __attribute__((packed)) devinfo_ab_data_t;
|
||||
|
||||
struct devinfo_t {
|
||||
uint32_t magic;
|
||||
uint16_t ver_major;
|
||||
uint16_t ver_minor;
|
||||
uint8_t unused[40];
|
||||
devinfo_ab_data_t ab_data;
|
||||
uint8_t unused1[72]; // use remaining up to complete 128 bytes
|
||||
} __attribute__((packed));
|
||||
|
||||
static_assert(sizeof(devinfo_t) == 128, "invalid devinfo struct size");
|
||||
|
||||
} // namespace implementation
|
||||
} // namespace V1_2
|
||||
} // namespace boot
|
||||
} // namespace hardware
|
||||
} // namespace android
|
193
interfaces/boot/1.2/GptUtils.cpp
Normal file
193
interfaces/boot/1.2/GptUtils.cpp
Normal file
|
@ -0,0 +1,193 @@
|
|||
/*
|
||||
* 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 <android-base/file.h>
|
||||
#include <errno.h>
|
||||
#include <linux/fs.h>
|
||||
#include <log/log.h>
|
||||
#include <zlib.h>
|
||||
|
||||
namespace android {
|
||||
namespace hardware {
|
||||
namespace boot {
|
||||
namespace V1_2 {
|
||||
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;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
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 <partition name, gpt_entry pointer>
|
||||
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<gpt_entry *>(&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<uint8_t *>(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<uint8_t *>(&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<uint8_t *>(&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_2
|
||||
} // namespace boot
|
||||
} // namespace hardware
|
||||
} // namespace android
|
79
interfaces/boot/1.2/GptUtils.h
Normal file
79
interfaces/boot/1.2/GptUtils.h
Normal file
|
@ -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 <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace android {
|
||||
namespace hardware {
|
||||
namespace boot {
|
||||
namespace V1_2 {
|
||||
namespace implementation {
|
||||
|
||||
#define GPT_SIGNATURE 0x5452415020494645UL
|
||||
|
||||
typedef struct {
|
||||
uint8_t type_guid[16];
|
||||
uint8_t guid[16];
|
||||
uint64_t first_lba;
|
||||
uint64_t last_lba;
|
||||
uint64_t attr;
|
||||
uint16_t name[36];
|
||||
} __attribute__((packed)) gpt_entry;
|
||||
|
||||
typedef struct {
|
||||
uint64_t signature;
|
||||
uint32_t revision;
|
||||
uint32_t header_size;
|
||||
uint32_t crc32;
|
||||
uint32_t reserved;
|
||||
uint64_t current_lba;
|
||||
uint64_t backup_lba;
|
||||
uint64_t first_usable_lba;
|
||||
uint64_t last_usable_lba;
|
||||
uint8_t disk_guid[16];
|
||||
uint64_t start_lba;
|
||||
uint32_t entry_count;
|
||||
uint32_t entry_size;
|
||||
uint32_t entries_crc32;
|
||||
} __attribute__((packed)) gpt_header;
|
||||
|
||||
class GptUtils {
|
||||
public:
|
||||
GptUtils(const std::string dev_path);
|
||||
int Load(void);
|
||||
gpt_entry *GetPartitionEntry(std::string name);
|
||||
int Sync(void);
|
||||
~GptUtils();
|
||||
|
||||
private:
|
||||
std::string dev_path;
|
||||
int fd;
|
||||
uint32_t block_size;
|
||||
gpt_header gpt_primary;
|
||||
gpt_header gpt_backup;
|
||||
std::vector<gpt_entry> entry_array;
|
||||
std::map<std::string, gpt_entry *> entries;
|
||||
};
|
||||
|
||||
} // namespace implementation
|
||||
} // namespace V1_2
|
||||
} // namespace boot
|
||||
} // namespace hardware
|
||||
} // namespace android
|
|
@ -0,0 +1,7 @@
|
|||
service vendor.boot-hal-1-2 /vendor/bin/hw/android.hardware.boot@1.2-service-zumapro
|
||||
interface android.hardware.boot@1.0::IBootControl default
|
||||
interface android.hardware.boot@1.1::IBootControl default
|
||||
interface android.hardware.boot@1.2::IBootControl default
|
||||
class early_hal
|
||||
user root
|
||||
group root
|
50
interfaces/boot/1.2/service.cpp
Normal file
50
interfaces/boot/1.2/service.cpp
Normal file
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#define LOG_TAG "android.hardware.boot@1.2-service"
|
||||
|
||||
#include <android/hardware/boot/1.2/IBootControl.h>
|
||||
#include <hidl/HidlTransportSupport.h>
|
||||
#include <hidl/Status.h>
|
||||
#include <log/log.h>
|
||||
|
||||
#include "BootControl.h"
|
||||
|
||||
using ::android::status_t;
|
||||
|
||||
using ::android::hardware::boot::V1_2::IBootControl;
|
||||
|
||||
using ::android::hardware::boot::V1_2::implementation::BootControl;
|
||||
// using ::android::hardware::boot::implementation::BootControl;
|
||||
|
||||
int main(int /* argc */, char * /* argv */[]) {
|
||||
// This function must be called before you join to ensure the proper
|
||||
// number of threads are created. The threadpool will never exceed
|
||||
// size one because of this call.
|
||||
::android::hardware::configureRpcThreadpool(1 /*threads*/, true /*willJoin*/);
|
||||
|
||||
::android::sp bootctrl = new BootControl();
|
||||
const status_t status = bootctrl->registerAsService();
|
||||
if (status != ::android::OK) {
|
||||
return 1; // or handle error
|
||||
}
|
||||
|
||||
// Adds this thread to the threadpool, resulting in one total
|
||||
// thread in the threadpool. We could also do other things, but
|
||||
// would have to specify 'false' to willJoin in configureRpcThreadpool.
|
||||
::android::hardware::joinRpcThreadpool();
|
||||
return 1; // joinRpcThreadpool should never return
|
||||
}
|
40
keymaster/Android.bp
Normal file
40
keymaster/Android.bp
Normal file
|
@ -0,0 +1,40 @@
|
|||
//
|
||||
// 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_binary {
|
||||
name: "wait_for_strongbox",
|
||||
init_rc: ["wait_for_strongbox.rc"],
|
||||
relative_install_path: "hw",
|
||||
srcs: [ "wait_for_strongbox.cpp" ],
|
||||
cflags: [ "-Werror", "-Wall" ],
|
||||
shared_libs: [
|
||||
"android.hardware.keymaster@4.0",
|
||||
"libbase",
|
||||
"libkeymaster4_1support",
|
||||
"libutils",
|
||||
],
|
||||
proprietary: true,
|
||||
}
|
59
keymaster/wait_for_strongbox.cpp
Normal file
59
keymaster/wait_for_strongbox.cpp
Normal file
|
@ -0,0 +1,59 @@
|
|||
/*
|
||||
** Copyright 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.
|
||||
*/
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#define LOG_TAG "wait_for_strongbox"
|
||||
#include <android-base/logging.h>
|
||||
|
||||
#include <keymasterV4_1/Keymaster.h>
|
||||
|
||||
using android::hardware::keymaster::V4_1::SecurityLevel;
|
||||
using android::hardware::keymaster::V4_1::support::Keymaster;
|
||||
|
||||
useconds_t kWaitTimeMicroseconds = 1 * 1000; // 1 milliseconds
|
||||
|
||||
int main() {
|
||||
for (unsigned cycleCount = 0; /* Forever */; ++cycleCount) {
|
||||
auto keymasters = Keymaster::enumerateAvailableDevices();
|
||||
|
||||
bool foundStrongBox = false;
|
||||
bool foundTee = false;
|
||||
for (auto &dev : keymasters) {
|
||||
SecurityLevel securityLevel = dev->halVersion().securityLevel;
|
||||
uint8_t majorVersion = dev->halVersion().majorVersion;
|
||||
if (securityLevel == SecurityLevel::STRONGBOX && majorVersion == 4) {
|
||||
foundStrongBox = true;
|
||||
}
|
||||
if (securityLevel == SecurityLevel::TRUSTED_ENVIRONMENT && majorVersion == 4) {
|
||||
foundTee = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (foundTee && foundStrongBox) {
|
||||
return 0;
|
||||
}
|
||||
if (cycleCount % 10 == 1) {
|
||||
if (!foundStrongBox) {
|
||||
LOG(WARNING) << "Still waiting for StrongBox Keymaster";
|
||||
}
|
||||
if (!foundTee) {
|
||||
LOG(WARNING) << "Still waiting for TEE Keymaster";
|
||||
}
|
||||
}
|
||||
usleep(kWaitTimeMicroseconds);
|
||||
}
|
||||
}
|
9
keymaster/wait_for_strongbox.rc
Normal file
9
keymaster/wait_for_strongbox.rc
Normal file
|
@ -0,0 +1,9 @@
|
|||
# Wait for both Trusty and Strongbox HALs to be up
|
||||
service wait_for_strongbox /vendor/bin/hw/wait_for_strongbox
|
||||
user root
|
||||
group root system
|
||||
priority -20
|
||||
ioprio rt 0
|
||||
|
||||
on late-fs
|
||||
exec_start wait_for_strongbox
|
40
manifest.xml
Normal file
40
manifest.xml
Normal file
|
@ -0,0 +1,40 @@
|
|||
<manifest version="1.0" type="device" target-level="7">
|
||||
<hal format="hidl">
|
||||
<name>android.hardware.graphics.mapper</name>
|
||||
<transport arch="32+64">passthrough</transport>
|
||||
<version>4.0</version>
|
||||
<interface>
|
||||
<name>IMapper</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>android.hardware.boot</name>
|
||||
<transport>hwbinder</transport>
|
||||
<fqname>@1.2::IBootControl/default</fqname>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>android.hardware.neuralnetworks</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>1.3</version>
|
||||
<interface>
|
||||
<name>IDevice</name>
|
||||
<instance>google-armnn</instance>
|
||||
</interface>
|
||||
<fqname>@1.3::IDevice/google-armnn</fqname>
|
||||
</hal>
|
||||
<hal format="aidl">
|
||||
<name>com.google.input.algos.spd</name>
|
||||
<interface>
|
||||
<name>IScreenProtectorDetectorService</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="aidl">
|
||||
<name>com.google.input</name>
|
||||
<interface>
|
||||
<name>ITouchContextService</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
</manifest>
|
12
manifest_media.xml
Normal file
12
manifest_media.xml
Normal file
|
@ -0,0 +1,12 @@
|
|||
<manifest version="1.0" type="device">
|
||||
<hal format="hidl">
|
||||
<name>android.hardware.media.c2</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>1.2</version>
|
||||
<interface>
|
||||
<name>IComponentStore</name>
|
||||
<instance>default</instance>
|
||||
<instance>default1</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
</manifest>
|
11
manifest_media_aosp.xml
Normal file
11
manifest_media_aosp.xml
Normal file
|
@ -0,0 +1,11 @@
|
|||
<manifest version="1.0" type="device">
|
||||
<hal format="hidl">
|
||||
<name>android.hardware.media.c2</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>1.2</version>
|
||||
<interface>
|
||||
<name>IComponentStore</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
</manifest>
|
82
media_codecs.xml
Normal file
82
media_codecs.xml
Normal file
|
@ -0,0 +1,82 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- 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.
|
||||
-->
|
||||
|
||||
<!--
|
||||
<!DOCTYPE MediaCodecs [
|
||||
<!ELEMENT Include EMPTY>
|
||||
<!ATTLIST Include href CDATA #REQUIRED>
|
||||
<!ELEMENT MediaCodecs (Decoders|Encoders|Include)*>
|
||||
<!ELEMENT Decoders (MediaCodec|Include)*>
|
||||
<!ELEMENT Encoders (MediaCodec|Include)*>
|
||||
<!ELEMENT MediaCodec (Type|Quirk|Include)*>
|
||||
<!ATTLIST MediaCodec name CDATA #REQUIRED>
|
||||
<!ATTLIST MediaCodec type CDATA>
|
||||
<!ELEMENT Type EMPTY>
|
||||
<!ATTLIST Type name CDATA #REQUIRED>
|
||||
<!ELEMENT Quirk EMPTY>
|
||||
<!ATTLIST Quirk name CDATA #REQUIRED>
|
||||
]>
|
||||
|
||||
There's a simple and a complex syntax to declare the availability of a
|
||||
media codec:
|
||||
|
||||
A codec that properly follows the OpenMax spec and therefore doesn't have any
|
||||
quirks and that only supports a single content type can be declared like so:
|
||||
|
||||
<MediaCodec name="OMX.foo.bar" type="something/interesting" />
|
||||
|
||||
If a codec has quirks OR supports multiple content types, the following syntax
|
||||
can be used:
|
||||
|
||||
<MediaCodec name="OMX.foo.bar" >
|
||||
<Type name="something/interesting" />
|
||||
<Type name="something/else" />
|
||||
...
|
||||
<Quirk name="requires-allocate-on-input-ports" />
|
||||
<Quirk name="requires-allocate-on-output-ports" />
|
||||
<Quirk name="output-buffers-are-unreadable" />
|
||||
</MediaCodec>
|
||||
|
||||
Only the three quirks included above are recognized at this point:
|
||||
|
||||
"requires-allocate-on-input-ports"
|
||||
must be advertised if the component does not properly support specification
|
||||
of input buffers using the OMX_UseBuffer(...) API but instead requires
|
||||
OMX_AllocateBuffer to be used.
|
||||
|
||||
"requires-allocate-on-output-ports"
|
||||
must be advertised if the component does not properly support specification
|
||||
of output buffers using the OMX_UseBuffer(...) API but instead requires
|
||||
OMX_AllocateBuffer to be used.
|
||||
|
||||
"output-buffers-are-unreadable"
|
||||
must be advertised if the emitted output buffers of a decoder component
|
||||
are not readable, i.e. use a custom format even though abusing one of
|
||||
the official OMX colorspace constants.
|
||||
Clients of such decoders will not be able to access the decoded data,
|
||||
naturally making the component much less useful. The only use for
|
||||
a component with this quirk is to render the output to the screen.
|
||||
Audio decoders MUST NOT advertise this quirk.
|
||||
Video decoders that advertise this quirk must be accompanied by a
|
||||
corresponding color space converter for thumbnail extraction,
|
||||
matching surfaceflinger support that can render the custom format to
|
||||
a texture and possibly other code, so just DON'T USE THIS QUIRK.
|
||||
|
||||
-->
|
||||
|
||||
<MediaCodecs>
|
||||
<Include href="media_codecs_google_telephony.xml" />
|
||||
</MediaCodecs>
|
256
media_codecs_aosp_c2.xml
Normal file
256
media_codecs_aosp_c2.xml
Normal file
|
@ -0,0 +1,256 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 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.
|
||||
-->
|
||||
<MediaCodecs>
|
||||
<Settings>
|
||||
<Setting name="supports-multiple-secure-codecs" value="true" />
|
||||
<Setting name="supports-secure-with-non-secure-codec" value="true" />
|
||||
</Settings>
|
||||
<Decoders>
|
||||
<MediaCodec name="c2.exynos.h264.decoder" type="video/avc">
|
||||
<Limit name="size" min="32x32" max="7680x4320" />
|
||||
<Limit name="alignment" value="2x2" />
|
||||
<Limit name="block-size" value="16x16" />
|
||||
<Limit name="block-count" range="1-129600" />
|
||||
<Limit name="blocks-per-second" min="1" max="3888000" />
|
||||
<Limit name="bitrate" range="1-240000000" />
|
||||
<Limit name="performance-point-1280x720" range="240" />
|
||||
<Limit name="performance-point-3840x2160" range="120" />
|
||||
<Limit name="performance-point-7680x4320" range="30" />
|
||||
<Limit name="concurrent-instances" max="16" />
|
||||
<Feature name="adaptive-playback" />
|
||||
<Feature name="can-swap-width-height" value="1" />
|
||||
<Feature name="low-latency" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="c2.exynos.h264.decoder.secure" type="video/avc">
|
||||
<Limit name="size" min="32x32" max="3840x2160" />
|
||||
<Limit name="alignment" value="2x2" />
|
||||
<Limit name="block-size" value="16x16" />
|
||||
<Limit name="block-count" range="1-32400" />
|
||||
<Limit name="blocks-per-second" min="1" max="3888000" />
|
||||
<Limit name="bitrate" range="1-240000000" />
|
||||
<Limit name="performance-point-1280x720" range="240" />
|
||||
<Limit name="performance-point-3840x2160" range="120" />
|
||||
<Limit name="concurrent-instances" max="2" />
|
||||
<Feature name="adaptive-playback" />
|
||||
<Feature name="secure-playback" required="true" />
|
||||
<Feature name="can-swap-width-height" value="1" />
|
||||
<Feature name="low-latency" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="c2.exynos.hevc.decoder" type="video/hevc" >
|
||||
<Limit name="size" min="64x64" max="7680x4320" />
|
||||
<Limit name="alignment" value="2x2" />
|
||||
<Limit name="block-size" value="16x16" />
|
||||
<Limit name="block-count" range="1-129600" />
|
||||
<Limit name="blocks-per-second" min="1" max="3888000" />
|
||||
<Limit name="bitrate" range="1-240000000" />
|
||||
<Limit name="performance-point-1280x720" range="240" />
|
||||
<Limit name="performance-point-3840x2160" range="120" />
|
||||
<Limit name="performance-point-7680x4320" range="30" />
|
||||
<Limit name="concurrent-instances" max="16" />
|
||||
<Feature name="adaptive-playback" />
|
||||
<Feature name="can-swap-width-height" value="1" />
|
||||
<Feature name="low-latency" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="c2.exynos.hevc.decoder.secure" type="video/hevc" >
|
||||
<Limit name="size" min="64x64" max="3840x2160" />
|
||||
<Limit name="alignment" value="2x2" />
|
||||
<Limit name="block-size" value="16x16" />
|
||||
<Limit name="block-count" range="1-32400" />
|
||||
<Limit name="blocks-per-second" min="1" max="3888000" />
|
||||
<Limit name="bitrate" range="1-240000000" />
|
||||
<Limit name="performance-point-1280x720" range="240" />
|
||||
<Limit name="performance-point-3840x2160" range="120" />
|
||||
<Limit name="concurrent-instances" max="2" />
|
||||
<Feature name="adaptive-playback" />
|
||||
<Feature name="secure-playback" required="true" />
|
||||
<Feature name="can-swap-width-height" value="1" />
|
||||
<Feature name="low-latency" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="c2.exynos.mpeg4.decoder" type="video/mp4v-es">
|
||||
<Limit name="size" min="32x32" max="2048x2048" />
|
||||
<Limit name="alignment" value="2x2" />
|
||||
<Limit name="block-size" value="16x16" />
|
||||
<Limit name="block-count" range="1-16384" />
|
||||
<Limit name="blocks-per-second" min="1" max="979200" />
|
||||
<Limit name="bitrate" range="1-80000000" />
|
||||
<Limit name="performance-point-1280x720" range="240" />
|
||||
<Limit name="performance-point-1920x1080" range="120" />
|
||||
<Limit name="concurrent-instances" max="16" />
|
||||
<Feature name="adaptive-playback" />
|
||||
<Feature name="can-swap-width-height" value="1" />
|
||||
<Feature name="low-latency" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="c2.exynos.h263.decoder" type="video/3gpp">
|
||||
<Limit name="size" min="32x32" max="2048x1152" />
|
||||
<Limit name="alignment" value="4x4" />
|
||||
<Limit name="block-size" value="16x16" />
|
||||
<Limit name="block-count" range="1-9216" />
|
||||
<Limit name="blocks-per-second" min="1" max="979200" />
|
||||
<Limit name="bitrate" range="1-80000000" />
|
||||
<Limit name="performance-point-1280x720" range="240" />
|
||||
<Limit name="performance-point-1920x1080" range="120" />
|
||||
<Limit name="concurrent-instances" max="16" />
|
||||
<Feature name="adaptive-playback" />
|
||||
<Feature name="low-latency" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="c2.exynos.vp8.decoder" type="video/x-vnd.on2.vp8" >
|
||||
<Limit name="size" min="32x32" max="3840x2160" />
|
||||
<Limit name="alignment" value="2x2" />
|
||||
<Limit name="block-size" value="16x16" />
|
||||
<Limit name="block-count" range="1-32400" />
|
||||
<Limit name="blocks-per-second" min="1" max="3888000" />
|
||||
<Limit name="bitrate" range="1-80000000" />
|
||||
<Limit name="performance-point-1280x720" range="240" />
|
||||
<Limit name="performance-point-3840x2160" range="120" />
|
||||
<Limit name="concurrent-instances" max="16" />
|
||||
<Feature name="adaptive-playback" />
|
||||
<Feature name="can-swap-width-height" value="1" />
|
||||
<Feature name="low-latency" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="c2.exynos.vp9.decoder" type="video/x-vnd.on2.vp9" >
|
||||
<Limit name="size" min="64x64" max="7680x4352" />
|
||||
<Limit name="alignment" value="2x2" />
|
||||
<Limit name="block-size" value="64x64" />
|
||||
<Limit name="block-count" range="1-8160" />
|
||||
<Limit name="blocks-per-second" min="1" max="3888000" />
|
||||
<Limit name="bitrate" range="1-80000000" />
|
||||
<Limit name="performance-point-1280x720" range="240" />
|
||||
<Limit name="performance-point-3840x2160" range="120" />
|
||||
<Limit name="performance-point-7680x4320" range="30" />
|
||||
<Limit name="concurrent-instances" max="16" />
|
||||
<Feature name="adaptive-playback" />
|
||||
<Feature name="can-swap-width-height" value="1" />
|
||||
<Feature name="low-latency" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="c2.exynos.vp9.decoder.secure" type="video/x-vnd.on2.vp9" >
|
||||
<Limit name="size" min="64x64" max="3840x2176" />
|
||||
<Limit name="alignment" value="2x2" />
|
||||
<Limit name="block-size" value="64x64" />
|
||||
<Limit name="block-count" range="1-2040" />
|
||||
<Limit name="blocks-per-second" min="1" max="3888000" />
|
||||
<Limit name="bitrate" range="1-80000000" />
|
||||
<Limit name="performance-point-1280x720" range="240" />
|
||||
<Limit name="performance-point-3840x2160" range="120" />
|
||||
<Limit name="concurrent-instances" max="2" />
|
||||
<Feature name="adaptive-playback" />
|
||||
<Feature name="secure-playback" required="true" />
|
||||
<Feature name="can-swap-width-height" value="1" />
|
||||
<Feature name="low-latency" />
|
||||
</MediaCodec>
|
||||
</Decoders>
|
||||
|
||||
<Encoders>
|
||||
<MediaCodec name="c2.exynos.h264.encoder" type="video/avc">
|
||||
<Limit name="size" min="32x32" max="7680x4320" />
|
||||
<Limit name="alignment" value="2x2" />
|
||||
<Limit name="block-size" value="16x16" />
|
||||
<Limit name="block-count" range="1-129600" />
|
||||
<Limit name="blocks-per-second" min="1" max="3888000" />
|
||||
<Limit name="bitrate" range="1-240000000" />
|
||||
<Limit name="performance-point-1280x720" range="240" />
|
||||
<Limit name="performance-point-3840x2160" range="120" />
|
||||
<Limit name="performance-point-7680x4320" range="30" />
|
||||
<Limit name="concurrent-instances" max="16" />
|
||||
<Feature name="can-swap-width-height" value="1" />
|
||||
<Feature name="vq-minimum-quality"/>
|
||||
<Feature name="bitrate-modes" value="VBR,CBR,CBR-FD"/>
|
||||
<Feature name="qp-bounds"/>
|
||||
<Feature name="encoding-statistics"/>
|
||||
</MediaCodec>
|
||||
<MediaCodec name="c2.exynos.hevc.encoder" type="video/hevc" >
|
||||
<Limit name="size" min="64x64" max="7680x4320" />
|
||||
<Limit name="alignment" value="2x2" />
|
||||
<Limit name="block-size" value="32x32" />
|
||||
<Limit name="block-count" range="1-32400" />
|
||||
<Limit name="blocks-per-second" min="1" max="972000" />
|
||||
<Limit name="bitrate" range="1-240000000" />
|
||||
<Limit name="performance-point-1280x720" range="240" />
|
||||
<Limit name="performance-point-3840x2160" range="120" />
|
||||
<Limit name="performance-point-7680x4320" range="30" />
|
||||
<Limit name="concurrent-instances" max="16" />
|
||||
<Limit name="quality" range="0-100" default="57" />
|
||||
<Feature name="can-swap-width-height" value="1" />
|
||||
<Feature name="vq-minimum-quality"/>
|
||||
<Feature name="bitrate-modes" value="VBR,CBR,CBR-FD"/>
|
||||
<Feature name="qp-bounds"/>
|
||||
<Feature name="encoding-statistics"/>
|
||||
<Feature name="hdr-editing" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="c2.exynos.mpeg4.encoder" type="video/mp4v-es">
|
||||
<Limit name="size" min="32x32" max="2048x2048" />
|
||||
<Limit name="alignment" value="2x2" />
|
||||
<Limit name="block-size" value="16x16" />
|
||||
<Limit name="block-count" range="1-16384" />
|
||||
<Limit name="blocks-per-second" min="1" max="979200" />
|
||||
<Limit name="bitrate" range="1-80000000" />
|
||||
<Limit name="performance-point-1280x720" range="240" />
|
||||
<Limit name="performance-point-1920x1080" range="120" />
|
||||
<Limit name="concurrent-instances" max="16" />
|
||||
<Feature name="can-swap-width-height" value="1" />
|
||||
<Feature name="vq-minimum-quality"/>
|
||||
<Feature name="bitrate-modes" value="VBR,CBR"/>
|
||||
<Feature name="qp-bounds"/>
|
||||
<Feature name="encoding-statistics"/>
|
||||
</MediaCodec>
|
||||
<MediaCodec name="c2.exynos.h263.encoder" type="video/3gpp">
|
||||
<Limit name="size" min="32x32" max="2048x1152" />
|
||||
<Limit name="alignment" value="4x4" />
|
||||
<Limit name="block-size" value="16x16" />
|
||||
<Limit name="block-count" range="1-9216" />
|
||||
<Limit name="blocks-per-second" min="1" max="979200" />
|
||||
<Limit name="bitrate" range="1-80000000" />
|
||||
<Limit name="performance-point-1280x720" range="240" />
|
||||
<Limit name="performance-point-1920x1080" range="120" />
|
||||
<Limit name="concurrent-instances" max="16" />
|
||||
<Feature name="vq-minimum-quality"/>
|
||||
<Feature name="bitrate-modes" value="VBR,CBR"/>
|
||||
<Feature name="qp-bounds"/>
|
||||
<Feature name="encoding-statistics"/>
|
||||
</MediaCodec>
|
||||
<MediaCodec name="c2.exynos.vp8.encoder" type="video/x-vnd.on2.vp8" >
|
||||
<Limit name="size" min="32x32" max="3840x2160" />
|
||||
<Limit name="alignment" value="2x2" />
|
||||
<Limit name="block-size" value="16x16" />
|
||||
<Limit name="block-count" range="1-32400" />
|
||||
<Limit name="blocks-per-second" min="1" max="3888000" />
|
||||
<Limit name="bitrate" range="1-80000000" />
|
||||
<Limit name="performance-point-1280x720" range="240" />
|
||||
<Limit name="performance-point-3840x2160" range="120" />
|
||||
<Limit name="concurrent-instances" max="16" />
|
||||
<Feature name="can-swap-width-height" value="1" />
|
||||
<Feature name="vq-minimum-quality"/>
|
||||
<Feature name="bitrate-modes" value="VBR,CBR"/>
|
||||
<Feature name="qp-bounds"/>
|
||||
<Feature name="encoding-statistics"/>
|
||||
</MediaCodec>
|
||||
<MediaCodec name="c2.exynos.vp9.encoder" type="video/x-vnd.on2.vp9" >
|
||||
<Limit name="size" min="64x64" max="3840x2176" />
|
||||
<Limit name="alignment" value="2x2" />
|
||||
<Limit name="block-size" value="64x64" />
|
||||
<Limit name="block-count" range="1-2040" />
|
||||
<Limit name="blocks-per-second" min="1" max="243000" />
|
||||
<Limit name="bitrate" range="1-80000000" />
|
||||
<Limit name="performance-point-1280x720" range="240" />
|
||||
<Limit name="performance-point-3840x2160" range="120" />
|
||||
<Limit name="concurrent-instances" max="16" />
|
||||
<Feature name="can-swap-width-height" value="1" />
|
||||
<Feature name="vq-minimum-quality"/>
|
||||
<Feature name="bitrate-modes" value="VBR,CBR"/>
|
||||
<Feature name="qp-bounds"/>
|
||||
<Feature name="encoding-statistics"/>
|
||||
</MediaCodec>
|
||||
</Encoders>
|
||||
</MediaCodecs>
|
65
media_codecs_bo_c2.xml
Normal file
65
media_codecs_bo_c2.xml
Normal file
|
@ -0,0 +1,65 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 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.
|
||||
-->
|
||||
<MediaCodecs>
|
||||
<Include href="media_codecs_aosp_c2.xml" />
|
||||
<Decoders>
|
||||
<MediaCodec name="c2.google.av1.decoder" type="video/av01">
|
||||
<Limit name="size" min="96x96" max="3840x2160" />
|
||||
<Limit name="alignment" value="2x2" />
|
||||
<Limit name="block-size" value="16x16" />
|
||||
<Limit name="block-count" range="36-32400" />
|
||||
<Limit name="blocks-per-second" min="24" max="1944000" />
|
||||
<Limit name="bitrate" range="1-120000000" />
|
||||
<Limit name="frame-rate" range="1-120" />
|
||||
<Limit name="concurrent-instances" max="16" />
|
||||
<Limit name="performance-point-1920x1080" value="180" />
|
||||
<Limit name="performance-point-1920x1079" value="120" />
|
||||
<Limit name="performance-point-3840x2160" value="60" />
|
||||
<!--Feature name="adaptive-playback" /-->
|
||||
</MediaCodec>
|
||||
<MediaCodec name="c2.google.av1.decoder.secure" type="video/av01">
|
||||
<Limit name="size" min="96x96" max="3840x2160" />
|
||||
<Limit name="alignment" value="2x2" />
|
||||
<Limit name="block-size" value="16x16" />
|
||||
<Limit name="block-count" range="36-32400" />
|
||||
<Limit name="blocks-per-second" min="24" max="1944000" />
|
||||
<Limit name="bitrate" range="1-120000000" />
|
||||
<Limit name="frame-rate" range="1-120" />
|
||||
<Limit name="concurrent-instances" max="16" />
|
||||
<Limit name="performance-point-1920x1080" value="180" />
|
||||
<Limit name="performance-point-1920x1079" value="120" />
|
||||
<Limit name="performance-point-3840x2160" value="60" />
|
||||
<!--Feature name="adaptive-playback" /-->
|
||||
<Feature name="secure-playback" required="true" />
|
||||
</MediaCodec>
|
||||
</Decoders>
|
||||
<Encoders>
|
||||
<MediaCodec name="c2.google.av1.encoder" type="video/av01">
|
||||
<Limit name="size" min="64x64" max="3840x2176" />
|
||||
<Limit name="alignment" value="2x2" />
|
||||
<Limit name="block-size" value="64x64" />
|
||||
<Limit name="block-count" range="1-2040" />
|
||||
<Limit name="blocks-per-second" min="1" max="61200" />
|
||||
<Limit name="bitrate" range="1-120000000" />
|
||||
<Limit name="performance-point-1280x720" range="240" />
|
||||
<Limit name="performance-point-3840x2160" range="30" />
|
||||
<Limit name="concurrent-instances" max="16" />
|
||||
<Feature name="can-swap-width-height" value="1" />
|
||||
<Feature name="vq-minimum-quality"/>
|
||||
<Feature name="encoding-statistics"/>
|
||||
</MediaCodec>
|
||||
</Encoders>
|
||||
</MediaCodecs>
|
18
media_codecs_performance.xml
Normal file
18
media_codecs_performance.xml
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2016 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.
|
||||
-->
|
||||
|
||||
<MediaCodecs>
|
||||
</MediaCodecs>
|
279
media_codecs_performance_c2.xml
Normal file
279
media_codecs_performance_c2.xml
Normal file
|
@ -0,0 +1,279 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!-- Copyright 2016 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.
|
||||
-->
|
||||
|
||||
<MediaCodecs>
|
||||
<Decoders>
|
||||
<MediaCodec name="c2.exynos.h264.decoder" type="video/avc" update="true">
|
||||
<!-- measured 90%:528-534 med:528 N=2 -->
|
||||
<Limit name="measured-frame-rate-320x240" range="528-531" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:550-560 med:551 N=2 -->
|
||||
<Limit name="measured-frame-rate-720x480" range="550-555" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:540-561 med:541 N=2 -->
|
||||
<Limit name="measured-frame-rate-1280x720" range="540-551" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:409-413 med:410 N=2 -->
|
||||
<Limit name="measured-frame-rate-1920x1088" range="409-411" /> <!-- v90%=1.0 -->
|
||||
</MediaCodec>
|
||||
<MediaCodec name="c2.exynos.h264.decoder.secure" type="video/avc" update="true">
|
||||
<!-- measured 90%:528-534 med:528 N=2 -->
|
||||
<Limit name="measured-frame-rate-320x240" range="528-531" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:550-560 med:551 N=2 -->
|
||||
<Limit name="measured-frame-rate-720x480" range="550-555" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:540-561 med:541 N=2 -->
|
||||
<Limit name="measured-frame-rate-1280x720" range="540-551" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:409-413 med:410 N=2 -->
|
||||
<Limit name="measured-frame-rate-1920x1088" range="409-411" /> <!-- v90%=1.0 -->
|
||||
</MediaCodec>
|
||||
<MediaCodec name="c2.exynos.hevc.decoder" type="video/hevc" update="true">
|
||||
<!-- measured 90%:529-530 med:529 N=2 -->
|
||||
<Limit name="measured-frame-rate-352x288" range="1150-1250" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:528-530 med:529 N=2 -->
|
||||
<Limit name="measured-frame-rate-640x360" range="528-529" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:546-549 med:546 N=2 -->
|
||||
<Limit name="measured-frame-rate-720x480" range="546-548" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:547-560 med:547 N=2 -->
|
||||
<Limit name="measured-frame-rate-1280x720" range="547-553" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:569-574 med:570 N=2 -->
|
||||
<Limit name="measured-frame-rate-1920x1080" range="569-572" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:159-160 med:159 N=2 -->
|
||||
<Limit name="measured-frame-rate-3840x2160" range="159-159" /> <!-- v90%=1.0 -->
|
||||
</MediaCodec>
|
||||
<MediaCodec name="c2.exynos.hevc.decoder.secure" type="video/hevc" update="true">
|
||||
<!-- measured 90%:529-530 med:529 N=2 -->
|
||||
<Limit name="measured-frame-rate-352x288" range="1150-1250" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:528-530 med:529 N=2 -->
|
||||
<Limit name="measured-frame-rate-640x360" range="528-529" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:546-549 med:546 N=2 -->
|
||||
<Limit name="measured-frame-rate-720x480" range="546-548" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:547-560 med:547 N=2 -->
|
||||
<Limit name="measured-frame-rate-1280x720" range="547-553" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:569-574 med:570 N=2 -->
|
||||
<Limit name="measured-frame-rate-1920x1080" range="569-572" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:159-160 med:159 N=2 -->
|
||||
<Limit name="measured-frame-rate-3840x2160" range="159-159" /> <!-- v90%=1.0 -->
|
||||
</MediaCodec>
|
||||
<MediaCodec name="c2.exynos.mpeg4.decoder" type="video/mp4v-es" update="true">
|
||||
<!-- measured 90%:527-537 med:528 N=2 -->
|
||||
<Limit name="measured-frame-rate-176x144" range="527-532" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:387-391 med:387 N=2 -->
|
||||
<Limit name="measured-frame-rate-480x360" range="387-389" /> <!-- v90%=1.0 -->
|
||||
</MediaCodec>
|
||||
<MediaCodec name="c2.exynos.h263.decoder" type="video/3gpp" update="true">
|
||||
<!-- measured 90%:521-541 med:521 N=2 -->
|
||||
<Limit name="measured-frame-rate-176x144" range="1300-1400" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:528-540 med:528 N=2 -->
|
||||
<Limit name="measured-frame-rate-352x288" range="528-534" /> <!-- v90%=1.0 -->
|
||||
</MediaCodec>
|
||||
<MediaCodec name="c2.exynos.vp8.decoder" type="video/x-vnd.on2.vp8" update="true">
|
||||
<!-- measured 90%:451-555 med:452 SLOW N=2 -->
|
||||
<Limit name="measured-frame-rate-320x180" range="451-500" /> <!-- v90%=1.1 -->
|
||||
<!-- measured 90%:486-504 med:486 N=2 -->
|
||||
<Limit name="measured-frame-rate-640x360" range="486-495" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:518-566 med:518 N=2 -->
|
||||
<Limit name="measured-frame-rate-1280x720" range="518-542" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:386-387 med:386 N=2 -->
|
||||
<Limit name="measured-frame-rate-1920x1080" range="386-386" /> <!-- v90%=1.0 -->
|
||||
</MediaCodec>
|
||||
<MediaCodec name="c2.exynos.vp9.decoder" type="video/x-vnd.on2.vp9" update="true">
|
||||
<!-- measured 90%:523-536 med:524 N=2 -->
|
||||
<Limit name="measured-frame-rate-320x180" range="523-529" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:503-506 med:504 N=2 -->
|
||||
<Limit name="measured-frame-rate-640x360" range="503-505" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:510-518 med:511 N=2 -->
|
||||
<Limit name="measured-frame-rate-1280x720" range="510-514" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:349-351 med:350 N=2 -->
|
||||
<Limit name="measured-frame-rate-1920x1080" range="349-350" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:100-101 med:100 N=2 -->
|
||||
<Limit name="measured-frame-rate-3840x2160" range="100-100" /> <!-- v90%=1.0 -->
|
||||
</MediaCodec>
|
||||
<MediaCodec name="c2.exynos.vp9.decoder.secure" type="video/x-vnd.on2.vp9" update="true">
|
||||
<!-- measured 90%:523-536 med:524 N=2 -->
|
||||
<Limit name="measured-frame-rate-320x180" range="523-529" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:503-506 med:504 N=2 -->
|
||||
<Limit name="measured-frame-rate-640x360" range="503-505" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:510-518 med:511 N=2 -->
|
||||
<Limit name="measured-frame-rate-1280x720" range="510-514" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:349-351 med:350 N=2 -->
|
||||
<Limit name="measured-frame-rate-1920x1080" range="349-350" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:100-101 med:100 N=2 -->
|
||||
<Limit name="measured-frame-rate-3840x2160" range="100-100" /> <!-- v90%=1.0 -->
|
||||
</MediaCodec>
|
||||
|
||||
<MediaCodec name="c2.android.h263.decoder" type="video/3gpp" update="true">
|
||||
<!-- measured 90%:261-267 med:261 N=2 -->
|
||||
<Limit name="measured-frame-rate-176x144" range="261-264" /> <!-- v90%=1.0 -->
|
||||
</MediaCodec>
|
||||
<MediaCodec name="c2.android.avc.decoder" type="video/avc" update="true">
|
||||
<!-- measured 90%:342-360 med:343 N=2 -->
|
||||
<Limit name="measured-frame-rate-320x240" range="342-351" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:142-147 med:143 N=2 -->
|
||||
<Limit name="measured-frame-rate-720x480" range="142-145" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:54-56 med:55 N=2 -->
|
||||
<Limit name="measured-frame-rate-1280x720" range="54-55" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:25-26 med:26 N=2 -->
|
||||
<Limit name="measured-frame-rate-1920x1080" range="25-26" /> <!-- v90%=1.0 -->
|
||||
</MediaCodec>
|
||||
<MediaCodec name="c2.android.hevc.decoder" type="video/hevc" update="true">
|
||||
<!-- measured 90%:295-301 med:296 N=2 -->
|
||||
<Limit name="measured-frame-rate-352x288" range="295-298" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:196-207 med:196 N=2 -->
|
||||
<Limit name="measured-frame-rate-640x360" range="196-201" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:177-180 med:178 N=2 -->
|
||||
<Limit name="measured-frame-rate-720x480" range="177-178" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:81-82 med:82 N=2 -->
|
||||
<Limit name="measured-frame-rate-1280x720" range="81-82" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:45-47 med:46 N=2 -->
|
||||
<Limit name="measured-frame-rate-1920x1080" range="45-46" /> <!-- v90%=1.0 -->
|
||||
</MediaCodec>
|
||||
<MediaCodec name="c2.android.mpeg4.decoder" type="video/mp4v-es" update="true">
|
||||
<!-- measured 90%:234-241 med:234 N=2 -->
|
||||
<Limit name="measured-frame-rate-176x144" range="234-237" /> <!-- v90%=1.0 -->
|
||||
</MediaCodec>
|
||||
<MediaCodec name="c2.android.vp8.decoder" type="video/x-vnd.on2.vp8" update="true">
|
||||
<!-- measured 90%:445-623 med:445 SLOW N=2 -->
|
||||
<Limit name="measured-frame-rate-320x180" range="445-526" /> <!-- v90%=1.2 -->
|
||||
<!-- measured 90%:198-199 med:198 N=2 -->
|
||||
<Limit name="measured-frame-rate-640x360" range="198-199" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:18-19 med:18 N=2 -->
|
||||
<Limit name="measured-frame-rate-1920x1080" range="18-18" /> <!-- v90%=1.0 -->
|
||||
</MediaCodec>
|
||||
<MediaCodec name="c2.android.vp9.decoder" type="video/x-vnd.on2.vp9" update="true">
|
||||
<!-- measured 90%:440-463 med:441 N=2 -->
|
||||
<Limit name="measured-frame-rate-320x180" range="440-452" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:232-234 med:233 N=2 -->
|
||||
<Limit name="measured-frame-rate-640x360" range="232-233" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:63-64 med:63 N=2 -->
|
||||
<Limit name="measured-frame-rate-1280x720" range="63-63" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:39-40 med:39 N=2 -->
|
||||
<Limit name="measured-frame-rate-1920x1080" range="39-40" /> <!-- v90%=1.0 -->
|
||||
</MediaCodec>
|
||||
<MediaCodec name="c2.google.av1.decoder" type="video/av01" update="true">
|
||||
<!-- measured 90%:295-301 med:296 N=2 -->
|
||||
<Limit name="measured-frame-rate-352x288" range="295-298" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:196-207 med:196 N=2 -->
|
||||
<Limit name="measured-frame-rate-640x360" range="196-201" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:177-180 med:178 N=2 -->
|
||||
<Limit name="measured-frame-rate-720x480" range="177-178" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:81-82 med:82 N=2 -->
|
||||
<Limit name="measured-frame-rate-1280x720" range="81-82" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:45-47 med:46 N=2 -->
|
||||
<Limit name="measured-frame-rate-1920x1080" range="45-46" /> <!-- v90%=1.0 -->
|
||||
</MediaCodec>
|
||||
<MediaCodec name="c2.google.av1.decoder.secure" type="video/av01" update="true">
|
||||
<!-- measured 90%:295-301 med:296 N=2 -->
|
||||
<Limit name="measured-frame-rate-352x288" range="295-298" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:196-207 med:196 N=2 -->
|
||||
<Limit name="measured-frame-rate-640x360" range="196-201" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:177-180 med:178 N=2 -->
|
||||
<Limit name="measured-frame-rate-720x480" range="177-178" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:81-82 med:82 N=2 -->
|
||||
<Limit name="measured-frame-rate-1280x720" range="81-82" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:45-47 med:46 N=2 -->
|
||||
<Limit name="measured-frame-rate-1920x1080" range="45-46" /> <!-- v90%=1.0 -->
|
||||
</MediaCodec>
|
||||
</Decoders>
|
||||
|
||||
<Encoders>
|
||||
<MediaCodec name="c2.exynos.h264.encoder" type="video/avc" update="true">
|
||||
<!-- measured 90%:482-560 med:483 N=2 -->
|
||||
<Limit name="measured-frame-rate-320x240" range="482-520" /> <!-- v90%=1.1 -->
|
||||
<!-- measured 90%:301-313 med:302 N=2 -->
|
||||
<Limit name="measured-frame-rate-720x480" range="301-307" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:181-201 med:181 N=2 -->
|
||||
<Limit name="measured-frame-rate-1280x720" range="181-190" /> <!-- v90%=1.1 -->
|
||||
<!-- measured 90%:98-100 med:99 N=2 -->
|
||||
<Limit name="measured-frame-rate-1920x1080" range="98-99" /> <!-- v90%=1.0 -->
|
||||
</MediaCodec>
|
||||
<MediaCodec name="c2.exynos.hevc.encoder" type="video/hevc" update="true">
|
||||
<!-- measured 90%:589-597 med:589 N=2 -->
|
||||
<Limit name="measured-frame-rate-320x240" range="589-593" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:291-304 med:292 N=2 -->
|
||||
<Limit name="measured-frame-rate-720x480" range="291-298" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:195-201 med:196 N=2 -->
|
||||
<Limit name="measured-frame-rate-1280x720" range="195-198" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:94-96 med:95 N=2 -->
|
||||
<Limit name="measured-frame-rate-1920x1080" range="94-95" /> <!-- v90%=1.0 -->
|
||||
</MediaCodec>
|
||||
<MediaCodec name="c2.exynos.mpeg4.encoder" type="video/mp4v-es" update="true">
|
||||
<!-- measured 90%:575-670 med:575 N=2 -->
|
||||
<Limit name="measured-frame-rate-176x144" range="575-620" /> <!-- v90%=1.1 -->
|
||||
<!-- measured 90%:222-283 med:222 SLOW N=2 -->
|
||||
<Limit name="measured-frame-rate-352x288" range="222-250" /> <!-- v90%=1.1 -->
|
||||
<!-- measured 90%:123-124 med:124 N=2 -->
|
||||
<Limit name="measured-frame-rate-640x480" range="123-124" /> <!-- v90%=1.0 -->
|
||||
</MediaCodec>
|
||||
<MediaCodec name="c2.exynos.h263.encoder" type="video/3gpp" update="true">
|
||||
<!-- measured 90%:626-686 med:627 N=2 -->
|
||||
<Limit name="measured-frame-rate-176x144" range="626-656" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:295-300 med:296 N=2 -->
|
||||
<Limit name="measured-frame-rate-352x288" range="295-298" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:95-97 med:96 N=2 -->
|
||||
<Limit name="measured-frame-rate-704x576" range="95-96" /> <!-- v90%=1.0 -->
|
||||
</MediaCodec>
|
||||
<MediaCodec name="c2.exynos.vp8.encoder" type="video/x-vnd.on2.vp8" update="true">
|
||||
<!-- measured 90%:478-498 med:479 N=2 -->
|
||||
<Limit name="measured-frame-rate-320x180" range="478-488" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:334-347 med:334 N=2 -->
|
||||
<Limit name="measured-frame-rate-640x360" range="334-341" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:142-143 med:142 N=2 -->
|
||||
<Limit name="measured-frame-rate-1280x720" range="142-142" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:69-70 med:69 N=2 -->
|
||||
<Limit name="measured-frame-rate-1920x1080" range="69-69" /> <!-- v90%=1.0 -->
|
||||
</MediaCodec>
|
||||
<MediaCodec name="c2.exynos.vp9.encoder" type="video/x-vnd.on2.vp9" update="true">
|
||||
<!-- measured 90%:474-485 med:474 N=2 -->
|
||||
<Limit name="measured-frame-rate-320x180" range="474-479" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:192-267 med:193 SLOW N=2 -->
|
||||
<Limit name="measured-frame-rate-640x360" range="192-227" /> <!-- v90%=1.2 -->
|
||||
<!-- measured 90%:95-96 med:96 N=2 -->
|
||||
<Limit name="measured-frame-rate-1280x720" range="95-96" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:84-86 med:85 N=2 -->
|
||||
<Limit name="measured-frame-rate-1920x1080" range="84-85" /> <!-- v90%=1.0 -->
|
||||
</MediaCodec>
|
||||
|
||||
<MediaCodec name="c2.android.h263.encoder" type="video/3gpp" update="true">
|
||||
<!-- measured 90%:440-443 med:440 N=2 -->
|
||||
<Limit name="measured-frame-rate-176x144" range="440-441" /> <!-- v90%=1.0 -->
|
||||
</MediaCodec>
|
||||
<MediaCodec name="c2.android.avc.encoder" type="video/avc" update="true">
|
||||
<!-- measured 90%:345-350 med:345 N=2 -->
|
||||
<Limit name="measured-frame-rate-320x240" range="345-347" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:101-103 med:101 N=2 -->
|
||||
<Limit name="measured-frame-rate-720x480" range="101-102" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:54-55 med:54 N=2 -->
|
||||
<Limit name="measured-frame-rate-1280x720" range="54-54" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:28-30 med:29 N=2 -->
|
||||
<Limit name="measured-frame-rate-1920x1080" range="28-29" /> <!-- v90%=1.0 -->
|
||||
</MediaCodec>
|
||||
<MediaCodec name="c2.android.hevc.encoder" type="video/hevc" update="true">
|
||||
<!-- measured 90%:61-65 med:62 N=8 -->
|
||||
<Limit name="measured-frame-rate-320x240" range="18-22" /> <!-- v90%=1.0 -->
|
||||
</MediaCodec>
|
||||
<MediaCodec name="c2.android.mpeg4.encoder" type="video/mp4v-es" update="true">
|
||||
<!-- measured 90%:461-471 med:462 N=2 -->
|
||||
<Limit name="measured-frame-rate-176x144" range="461-466" /> <!-- v90%=1.0 -->
|
||||
</MediaCodec>
|
||||
<MediaCodec name="c2.android.vp8.encoder" type="video/x-vnd.on2.vp8" update="true">
|
||||
<!-- measured 90%:49-87 med:50 SLOW N=2 -->
|
||||
<Limit name="measured-frame-rate-320x180" range="394-395" /> <!-- v90%=1.3 -->
|
||||
<!-- measured 90%:55-57 med:56 N=2 -->
|
||||
<Limit name="measured-frame-rate-640x360" range="196-197" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:34-35 med:34 N=2 -->
|
||||
<Limit name="measured-frame-rate-1280x720" range="34-34" /> <!-- v90%=1.0 -->
|
||||
<!-- measured 90%:29-31 med:30 N=2 -->
|
||||
<Limit name="measured-frame-rate-1920x1080" range="29-30" /> <!-- v90%=1.0 -->
|
||||
</MediaCodec>
|
||||
</Encoders>
|
||||
</MediaCodecs>
|
895
media_profiles.xml
Normal file
895
media_profiles.xml
Normal file
|
@ -0,0 +1,895 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2010 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.
|
||||
-->
|
||||
<!DOCTYPE MediaSettings [
|
||||
<!ELEMENT MediaSettings (CamcorderProfiles,
|
||||
EncoderOutputFileFormat+,
|
||||
VideoEncoderCap+,
|
||||
AudioEncoderCap+,
|
||||
VideoDecoderCap,
|
||||
AudioDecoderCap)>
|
||||
<!ELEMENT CamcorderProfiles (EncoderProfile+, ImageEncoding+, ImageDecoding, Camera)>
|
||||
<!ELEMENT EncoderProfile (Video, Audio)>
|
||||
<!ATTLIST EncoderProfile quality (high|low) #REQUIRED>
|
||||
<!ATTLIST EncoderProfile fileFormat (mp4|3gp) #REQUIRED>
|
||||
<!ATTLIST EncoderProfile duration (30|60) #REQUIRED>
|
||||
<!ELEMENT Video EMPTY>
|
||||
<!ATTLIST Video codec (h264|h263|m4v) #REQUIRED>
|
||||
<!ATTLIST Video bitRate CDATA #REQUIRED>
|
||||
<!ATTLIST Video width CDATA #REQUIRED>
|
||||
<!ATTLIST Video height CDATA #REQUIRED>
|
||||
<!ATTLIST Video frameRate CDATA #REQUIRED>
|
||||
<!ELEMENT Audio EMPTY>
|
||||
<!ATTLIST Audio codec (amrnb|amrwb|aac) #REQUIRED>
|
||||
<!ATTLIST Audio bitRate CDATA #REQUIRED>
|
||||
<!ATTLIST Audio sampleRate CDATA #REQUIRED>
|
||||
<!ATTLIST Audio channels (1|2) #REQUIRED>
|
||||
<!ELEMENT ImageEncoding EMPTY>
|
||||
<!ATTLIST ImageEncoding quality (90|80|70|60|50|40) #REQUIRED>
|
||||
<!ELEMENT ImageDecoding EMPTY>
|
||||
<!ATTLIST ImageDecoding memCap CDATA #REQUIRED>
|
||||
<!ELEMENT Camera EMPTY>
|
||||
<!ATTLIST Camera previewFrameRate CDATA #REQUIRED>
|
||||
<!ELEMENT EncoderOutputFileFormat EMPTY>
|
||||
<!ATTLIST EncoderOutputFileFormat name (mp4|3gp) #REQUIRED>
|
||||
<!ELEMENT VideoEncoderCap EMPTY>
|
||||
<!ATTLIST VideoEncoderCap name (h264|h263|m4v|wmv) #REQUIRED>
|
||||
<!ATTLIST VideoEncoderCap enabled (true|false) #REQUIRED>
|
||||
<!ATTLIST VideoEncoderCap minBitRate CDATA #REQUIRED>
|
||||
<!ATTLIST VideoEncoderCap maxBitRate CDATA #REQUIRED>
|
||||
<!ATTLIST VideoEncoderCap minFrameWidth CDATA #REQUIRED>
|
||||
<!ATTLIST VideoEncoderCap maxFrameWidth CDATA #REQUIRED>
|
||||
<!ATTLIST VideoEncoderCap minFrameHeight CDATA #REQUIRED>
|
||||
<!ATTLIST VideoEncoderCap maxFrameHeight CDATA #REQUIRED>
|
||||
<!ATTLIST VideoEncoderCap minFrameRate CDATA #REQUIRED>
|
||||
<!ATTLIST VideoEncoderCap maxFrameRate CDATA #REQUIRED>
|
||||
<!ELEMENT AudioEncoderCap EMPTY>
|
||||
<!ATTLIST AudioEncoderCap name (amrnb|amrwb|aac|wma) #REQUIRED>
|
||||
<!ATTLIST AudioEncoderCap enabled (true|false) #REQUIRED>
|
||||
<!ATTLIST AudioEncoderCap minBitRate CDATA #REQUIRED>
|
||||
<!ATTLIST AudioEncoderCap maxBitRate CDATA #REQUIRED>
|
||||
<!ATTLIST AudioEncoderCap minSampleRate CDATA #REQUIRED>
|
||||
<!ATTLIST AudioEncoderCap maxSampleRate CDATA #REQUIRED>
|
||||
<!ATTLIST AudioEncoderCap minChannels (1|2) #REQUIRED>
|
||||
<!ATTLIST AudioEncoderCap maxChannels (1|2) #REQUIRED>
|
||||
<!ELEMENT VideoDecoderCap EMPTY>
|
||||
<!ATTLIST VideoDecoderCap name (wmv) #REQUIRED>
|
||||
<!ATTLIST VideoDecoderCap enabled (true|false) #REQUIRED>
|
||||
<!ELEMENT AudioDecoderCap EMPTY>
|
||||
<!ATTLIST AudioDecoderCap name (wma) #REQUIRED>
|
||||
<!ATTLIST AudioDecoderCap enabled (true|false) #REQUIRED>
|
||||
]>
|
||||
<!--
|
||||
This file is used to declare the multimedia profiles and capabilities
|
||||
on an android-powered device.
|
||||
-->
|
||||
<MediaSettings>
|
||||
<!-- Each camcorder profile defines a set of predefined configuration parameters -->
|
||||
<CamcorderProfiles cameraId="0">
|
||||
|
||||
<EncoderProfile quality="2160p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="12000000"
|
||||
width="3840"
|
||||
height="2160"
|
||||
frameRate="60" />
|
||||
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="16000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="1080p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="12000000"
|
||||
width="1920"
|
||||
height="1080"
|
||||
frameRate="60" />
|
||||
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="16000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="720p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="8000000"
|
||||
width="1280"
|
||||
height="720"
|
||||
frameRate="30" />
|
||||
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="16000"
|
||||
channels="1" />
|
||||
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="480p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="3000000"
|
||||
width="720"
|
||||
height="480"
|
||||
frameRate="30" />
|
||||
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="16000"
|
||||
channels="1" />
|
||||
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="timelapse2160p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="12000000"
|
||||
width="3840"
|
||||
height="2160"
|
||||
frameRate="30" />
|
||||
|
||||
<!-- Audio settings are not used for timealpse video recording -->
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="16000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="12000000"
|
||||
width="1920"
|
||||
height="1080"
|
||||
frameRate="30" />
|
||||
|
||||
<!-- Audio settings are not used for timealpse video recording -->
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="16000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="8000000"
|
||||
width="1280"
|
||||
height="720"
|
||||
frameRate="30" />
|
||||
|
||||
<!-- Audio settings are not used for timealpse video recording -->
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="16000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="3000000"
|
||||
width="720"
|
||||
height="480"
|
||||
frameRate="30" />
|
||||
|
||||
<!-- Audio settings are not used for timealpse video recording -->
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="16000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="highspeed1080p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="42000000"
|
||||
width="1920"
|
||||
height="1080"
|
||||
frameRate="240" />
|
||||
|
||||
<!-- audio setting is ignored -->
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="48000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<ImageEncoding quality="90" />
|
||||
<ImageEncoding quality="80" />
|
||||
<ImageEncoding quality="70" />
|
||||
<ImageDecoding memCap="20000000" />
|
||||
|
||||
</CamcorderProfiles>
|
||||
|
||||
<CamcorderProfiles cameraId="1">
|
||||
|
||||
<EncoderProfile quality="1080p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="12000000"
|
||||
width="1920"
|
||||
height="1080"
|
||||
frameRate="30" />
|
||||
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="16000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="720p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="8000000"
|
||||
width="1280"
|
||||
height="720"
|
||||
frameRate="30" />
|
||||
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="16000"
|
||||
channels="1" />
|
||||
|
||||
</EncoderProfile>
|
||||
<EncoderProfile quality="480p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="3000000"
|
||||
width="720"
|
||||
height="480"
|
||||
frameRate="30" />
|
||||
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="16000"
|
||||
channels="1" />
|
||||
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="12000000"
|
||||
width="1920"
|
||||
height="1080"
|
||||
frameRate="30" />
|
||||
|
||||
<!-- Audio settings are not used for timealpse video recording -->
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="16000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="8000000"
|
||||
width="1280"
|
||||
height="720"
|
||||
frameRate="30" />
|
||||
|
||||
<!-- Audio settings are not used for timealpse video recording -->
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="16000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="3000000"
|
||||
width="720"
|
||||
height="480"
|
||||
frameRate="30" />
|
||||
|
||||
<!-- Audio settings are not used for timealpse video recording -->
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="16000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<ImageEncoding quality="90" />
|
||||
<ImageEncoding quality="80" />
|
||||
<ImageEncoding quality="70" />
|
||||
<ImageDecoding memCap="20000000" />
|
||||
|
||||
</CamcorderProfiles>
|
||||
|
||||
<CamcorderProfiles cameraId="2">
|
||||
|
||||
<EncoderProfile quality="2160p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="12000000"
|
||||
width="3840"
|
||||
height="2160"
|
||||
frameRate="60" />
|
||||
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="16000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="1080p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="12000000"
|
||||
width="1920"
|
||||
height="1080"
|
||||
frameRate="30" />
|
||||
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="16000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="720p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="8000000"
|
||||
width="1280"
|
||||
height="720"
|
||||
frameRate="30" />
|
||||
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="16000"
|
||||
channels="1" />
|
||||
|
||||
</EncoderProfile>
|
||||
<EncoderProfile quality="480p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="3000000"
|
||||
width="720"
|
||||
height="480"
|
||||
frameRate="30" />
|
||||
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="16000"
|
||||
channels="1" />
|
||||
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="12000000"
|
||||
width="1920"
|
||||
height="1080"
|
||||
frameRate="30" />
|
||||
|
||||
<!-- Audio settings are not used for timealpse video recording -->
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="16000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="8000000"
|
||||
width="1280"
|
||||
height="720"
|
||||
frameRate="30" />
|
||||
|
||||
<!-- Audio settings are not used for timealpse video recording -->
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="16000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="3000000"
|
||||
width="720"
|
||||
height="480"
|
||||
frameRate="30" />
|
||||
|
||||
<!-- Audio settings are not used for timealpse video recording -->
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="16000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="highspeed1080p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="42000000"
|
||||
width="1920"
|
||||
height="1080"
|
||||
frameRate="240" />
|
||||
|
||||
<!-- audio setting is ignored -->
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="48000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<ImageEncoding quality="90" />
|
||||
<ImageEncoding quality="80" />
|
||||
<ImageEncoding quality="70" />
|
||||
<ImageDecoding memCap="20000000" />
|
||||
|
||||
</CamcorderProfiles>
|
||||
|
||||
<CamcorderProfiles cameraId="3">
|
||||
|
||||
<EncoderProfile quality="1080p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="12000000"
|
||||
width="1920"
|
||||
height="1080"
|
||||
frameRate="30" />
|
||||
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="16000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="720p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="8000000"
|
||||
width="1280"
|
||||
height="720"
|
||||
frameRate="30" />
|
||||
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="16000"
|
||||
channels="1" />
|
||||
|
||||
</EncoderProfile>
|
||||
<EncoderProfile quality="480p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="3000000"
|
||||
width="720"
|
||||
height="480"
|
||||
frameRate="30" />
|
||||
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="16000"
|
||||
channels="1" />
|
||||
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="12000000"
|
||||
width="1920"
|
||||
height="1080"
|
||||
frameRate="30" />
|
||||
|
||||
<!-- Audio settings are not used for timealpse video recording -->
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="16000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="8000000"
|
||||
width="1280"
|
||||
height="720"
|
||||
frameRate="30" />
|
||||
|
||||
<!-- Audio settings are not used for timealpse video recording -->
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="16000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="3000000"
|
||||
width="720"
|
||||
height="480"
|
||||
frameRate="30" />
|
||||
|
||||
<!-- Audio settings are not used for timealpse video recording -->
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="16000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<ImageEncoding quality="90" />
|
||||
<ImageEncoding quality="80" />
|
||||
<ImageEncoding quality="70" />
|
||||
<ImageDecoding memCap="20000000" />
|
||||
|
||||
</CamcorderProfiles>
|
||||
|
||||
<CamcorderProfiles cameraId="4">
|
||||
|
||||
<EncoderProfile quality="1080p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="12000000"
|
||||
width="1920"
|
||||
height="1080"
|
||||
frameRate="30" />
|
||||
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="16000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="720p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="8000000"
|
||||
width="1280"
|
||||
height="720"
|
||||
frameRate="30" />
|
||||
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="16000"
|
||||
channels="1" />
|
||||
|
||||
</EncoderProfile>
|
||||
<EncoderProfile quality="480p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="3000000"
|
||||
width="720"
|
||||
height="480"
|
||||
frameRate="30" />
|
||||
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="16000"
|
||||
channels="1" />
|
||||
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="12000000"
|
||||
width="1920"
|
||||
height="1080"
|
||||
frameRate="30" />
|
||||
|
||||
<!-- Audio settings are not used for timealpse video recording -->
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="16000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="8000000"
|
||||
width="1280"
|
||||
height="720"
|
||||
frameRate="30" />
|
||||
|
||||
<!-- Audio settings are not used for timealpse video recording -->
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="16000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="3000000"
|
||||
width="720"
|
||||
height="480"
|
||||
frameRate="30" />
|
||||
|
||||
<!-- Audio settings are not used for timealpse video recording -->
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="16000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<ImageEncoding quality="90" />
|
||||
<ImageEncoding quality="80" />
|
||||
<ImageEncoding quality="70" />
|
||||
<ImageDecoding memCap="20000000" />
|
||||
|
||||
</CamcorderProfiles>
|
||||
|
||||
<CamcorderProfiles cameraId="5">
|
||||
|
||||
<EncoderProfile quality="2160p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="12000000"
|
||||
width="3840"
|
||||
height="2160"
|
||||
frameRate="60" />
|
||||
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="16000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="1080p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="12000000"
|
||||
width="1920"
|
||||
height="1080"
|
||||
frameRate="30" />
|
||||
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="16000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="720p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="8000000"
|
||||
width="1280"
|
||||
height="720"
|
||||
frameRate="30" />
|
||||
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="16000"
|
||||
channels="1" />
|
||||
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="480p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="3000000"
|
||||
width="720"
|
||||
height="480"
|
||||
frameRate="30" />
|
||||
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="16000"
|
||||
channels="1" />
|
||||
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="timelapse2160p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="12000000"
|
||||
width="3840"
|
||||
height="2160"
|
||||
frameRate="30" />
|
||||
|
||||
<!-- Audio settings are not used for timealpse video recording -->
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="16000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="12000000"
|
||||
width="1920"
|
||||
height="1080"
|
||||
frameRate="30" />
|
||||
|
||||
<!-- Audio settings are not used for timealpse video recording -->
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="16000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="8000000"
|
||||
width="1280"
|
||||
height="720"
|
||||
frameRate="30" />
|
||||
|
||||
<!-- Audio settings are not used for timealpse video recording -->
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="16000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="3000000"
|
||||
width="720"
|
||||
height="480"
|
||||
frameRate="30" />
|
||||
|
||||
<!-- Audio settings are not used for timealpse video recording -->
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="16000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="highspeed1080p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="42000000"
|
||||
width="1920"
|
||||
height="1080"
|
||||
frameRate="240" />
|
||||
|
||||
<!-- audio setting is ignored -->
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="48000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<ImageEncoding quality="90" />
|
||||
<ImageEncoding quality="80" />
|
||||
<ImageEncoding quality="70" />
|
||||
<ImageDecoding memCap="20000000" />
|
||||
|
||||
</CamcorderProfiles>
|
||||
|
||||
<CamcorderProfiles cameraId="6">
|
||||
|
||||
<EncoderProfile quality="1080p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="12000000"
|
||||
width="1920"
|
||||
height="1080"
|
||||
frameRate="30" />
|
||||
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="16000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="720p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="8000000"
|
||||
width="1280"
|
||||
height="720"
|
||||
frameRate="30" />
|
||||
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="16000"
|
||||
channels="1" />
|
||||
|
||||
</EncoderProfile>
|
||||
<EncoderProfile quality="480p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="3000000"
|
||||
width="720"
|
||||
height="480"
|
||||
frameRate="30" />
|
||||
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="16000"
|
||||
channels="1" />
|
||||
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="12000000"
|
||||
width="1920"
|
||||
height="1080"
|
||||
frameRate="30" />
|
||||
|
||||
<!-- Audio settings are not used for timealpse video recording -->
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="16000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="8000000"
|
||||
width="1280"
|
||||
height="720"
|
||||
frameRate="30" />
|
||||
|
||||
<!-- Audio settings are not used for timealpse video recording -->
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="16000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="60">
|
||||
<Video codec="h264"
|
||||
bitRate="3000000"
|
||||
width="720"
|
||||
height="480"
|
||||
frameRate="30" />
|
||||
|
||||
<!-- Audio settings are not used for timealpse video recording -->
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="16000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<ImageEncoding quality="90" />
|
||||
<ImageEncoding quality="80" />
|
||||
<ImageEncoding quality="70" />
|
||||
<ImageDecoding memCap="20000000" />
|
||||
|
||||
</CamcorderProfiles>
|
||||
|
||||
|
||||
|
||||
<EncoderOutputFileFormat name="3gp" />
|
||||
<EncoderOutputFileFormat name="mp4" />
|
||||
|
||||
<!--
|
||||
If a codec is not enabled, it is invisible to the applications
|
||||
In other words, the applications won't be able to use the codec
|
||||
or query the capabilities of the codec at all if it is disabled
|
||||
-->
|
||||
|
||||
<!--
|
||||
FIXME : we only check Mpeg4 encorder cap and other codec doesn't check
|
||||
codec cap
|
||||
-->
|
||||
<VideoEncoderCap name="h264" enabled="true"
|
||||
minBitRate="64000" maxBitRate="12000000"
|
||||
minFrameWidth="128" maxFrameWidth="3840"
|
||||
minFrameHeight="96" maxFrameHeight="2160"
|
||||
minFrameRate="15" maxFrameRate="30" />
|
||||
|
||||
<VideoEncoderCap name="h263" enabled="true"
|
||||
minBitRate="64000" maxBitRate="1000000"
|
||||
minFrameWidth="128" maxFrameWidth="1920"
|
||||
minFrameHeight="96" maxFrameHeight="1080"
|
||||
minFrameRate="15" maxFrameRate="30" />
|
||||
|
||||
<VideoEncoderCap name="m4v" enabled="true"
|
||||
minBitRate="64000" maxBitRate="2000000"
|
||||
minFrameWidth="128" maxFrameWidth="1920"
|
||||
minFrameHeight="96" maxFrameHeight="1080"
|
||||
minFrameRate="15" maxFrameRate="30" />
|
||||
|
||||
<AudioEncoderCap name="aac" enabled="true"
|
||||
minBitRate="758" maxBitRate="288000"
|
||||
minSampleRate="8000" maxSampleRate="48000"
|
||||
minChannels="1" maxChannels="1" />
|
||||
|
||||
<AudioEncoderCap name="heaac" enabled="true"
|
||||
minBitRate="8000" maxBitRate="64000"
|
||||
minSampleRate="16000" maxSampleRate="48000"
|
||||
minChannels="1" maxChannels="1" />
|
||||
|
||||
<AudioEncoderCap name="aaceld" enabled="true"
|
||||
minBitRate="16000" maxBitRate="192000"
|
||||
minSampleRate="16000" maxSampleRate="48000"
|
||||
minChannels="1" maxChannels="1" />
|
||||
|
||||
<AudioEncoderCap name="amrwb" enabled="true"
|
||||
minBitRate="6600" maxBitRate="23050"
|
||||
minSampleRate="16000" maxSampleRate="16000"
|
||||
minChannels="1" maxChannels="1" />
|
||||
|
||||
<AudioEncoderCap name="amrnb" enabled="true"
|
||||
minBitRate="5525" maxBitRate="12200"
|
||||
minSampleRate="8000" maxSampleRate="8000"
|
||||
minChannels="1" maxChannels="1" />
|
||||
|
||||
<!--
|
||||
FIXME:
|
||||
We do not check decoder capabilities at present
|
||||
At present, we only check whether windows media is visible
|
||||
for TEST applications. For other applications, we do
|
||||
not perform any checks at all.
|
||||
-->
|
||||
<VideoDecoderCap name="wmv" enabled="false"/>
|
||||
<AudioDecoderCap name="wma" enabled="false"/>
|
||||
</MediaSettings>
|
1
modem/userdebug.mk
Normal file
1
modem/userdebug.mk
Normal file
|
@ -0,0 +1 @@
|
|||
PRODUCT_PACKAGES += vcd
|
3
modem_ml/modem_ml_models_user.conf
Normal file
3
modem_ml/modem_ml_models_user.conf
Normal file
|
@ -0,0 +1,3 @@
|
|||
#name,version,ml_type,compute_enable,compute_timer,train_enable,train_timer,monitor_enable_monitor_timer,execution_type,execution_timer
|
||||
sample_linear_reg,0,LEGACY,true,5000,false,0,false,0,SYNCHRONOUS_REGULAR,5000
|
||||
sample_fully_conn,0,LEGACY,true,5000,false,0,false,0,SYNCHRONOUS_REGULAR,5000
|
3
modem_ml/modem_ml_models_userdebug.conf
Normal file
3
modem_ml/modem_ml_models_userdebug.conf
Normal file
|
@ -0,0 +1,3 @@
|
|||
#name,version,ml_type,compute_enable,compute_timer,train_enable,train_timer,monitor_enable_monitor_timer,execution_type,execution_timer
|
||||
sample_linear_reg,0,LEGACY,true,5000,true,5000,true,5000,SYNCHRONOUS_REGULAR,5000
|
||||
sample_fully_conn,0,LEGACY,true,5000,true,5000,true,5000,SYNCHRONOUS_REGULAR,5000
|
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/**
|
||||
* Copyright (c) 2009, The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
-->
|
||||
<resources>
|
||||
<!-- Don't enable BT until user wants it -->
|
||||
<bool name="def_bluetooth_on">false</bool>
|
||||
</resources>
|
||||
|
7
overlay-factory/vendor/google/apps/PixelLogger/res/values/arrays.xml
vendored
Normal file
7
overlay-factory/vendor/google/apps/PixelLogger/res/values/arrays.xml
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
<resources>
|
||||
<string-array name="logger_entries">
|
||||
<item>shannondm</item>
|
||||
<item>cnss_diag</item>
|
||||
<item>brcm_gps</item>
|
||||
</string-array>
|
||||
</resources>
|
10
overlay-factory/vendor/google/apps/PixelLogger/res/values/config.xml
vendored
Normal file
10
overlay-factory/vendor/google/apps/PixelLogger/res/values/config.xml
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="config_logger_default_value" translatable="false">shannondm</string>
|
||||
<string name="config_cfg_default_value" translatable="false">Built-in Mask #1</string>
|
||||
|
||||
<!-- default config file for cnss_diag logger -->
|
||||
<string name="config_cfg_default_value_cnss_diag" translatable="false">cnss_diag.conf</string>
|
||||
<!-- config file to enable brcm gps logger -->
|
||||
<bool name="config_brcm_gps_enabled" translatable="false">true</bool>
|
||||
</resources>
|
19
overlay-factory/vendor/google/apps/PixelLogger/res/values/configmessages.xml
vendored
Normal file
19
overlay-factory/vendor/google/apps/PixelLogger/res/values/configmessages.xml
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string-array name="config_message_no_message">
|
||||
<item></item>
|
||||
</string-array>
|
||||
<string-array name="config_message_audio_warning">
|
||||
<item>This will collect audio from your voice calls. Would you like to proceed?</item>
|
||||
</string-array>
|
||||
<string-array name="config_message_possible_audio_warning">
|
||||
<item>This may collect audio from your voice calls. Would you like to proceed?</item>
|
||||
<item>Pixel_Default.nprf</item>
|
||||
<item>Built-in Mask #0</item>
|
||||
<item>Built-in Mask #1</item>
|
||||
<item>Built-in Mask #2</item>
|
||||
<item>Built-in Mask #3</item>
|
||||
</string-array>
|
||||
<string name="config_privacy_warning_title">Privacy Warning</string>
|
||||
<string name="default_config_selection_message">You are loading a user defined logging config. This may collect audio from your voice calls. Would you like to proceed?</string>
|
||||
</resources>
|
21
overlay-vendor/vendor/google/apps/ModemService/res/values/config.xml
vendored
Normal file
21
overlay-vendor/vendor/google/apps/ModemService/res/values/config.xml
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Antenna tuning by USB status -->
|
||||
<bool name="config_tuner_by_usb">false</bool>
|
||||
<integer name="config_proximity_values_usb_connected">1</integer>
|
||||
<integer name="config_proximity_values_usb_disconnected">0</integer>
|
||||
|
||||
<!-- SAR cutback -->
|
||||
<integer name="config_sar_comp_key">0</integer>
|
||||
<integer name="config_sar_state_default">3</integer>
|
||||
|
||||
<!-- SAR cutback by USB device -->
|
||||
<bool name="config_sar_by_usb_device">false</bool>
|
||||
<string-array name="config_sar_usb_devices">
|
||||
<!--
|
||||
<item>6353,20521,Google,USB-C to 3.5mm-Headphone Adapter</item>
|
||||
-->
|
||||
</string-array>
|
||||
<integer name="config_sar_state_usb_connected">3</integer>
|
||||
<integer name="config_sar_state_usb_device_matched">4</integer>
|
||||
</resources>
|
6
overlay-vendor/vendor/google/apps/PixelLogger/res/values/arrays.xml
vendored
Normal file
6
overlay-vendor/vendor/google/apps/PixelLogger/res/values/arrays.xml
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
<resources>
|
||||
<string-array name="logger_entries">
|
||||
<item>qxdm</item>
|
||||
<item>cnss_diag</item>
|
||||
</string-array>
|
||||
</resources>
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue