diff options
421 files changed, 21509 insertions, 115 deletions
diff --git a/.gitupstream b/.gitupstream new file mode 100644 index 00000000..f3791a07 --- /dev/null +++ b/.gitupstream @@ -0,0 +1 @@ +https://android.googlesource.com/device/google/redbull diff --git a/Android.bp b/Android.bp new file mode 100644 index 00000000..eb3944f4 --- /dev/null +++ b/Android.bp @@ -0,0 +1,47 @@ +soong_namespace { + imports: [ + "hardware/google/interfaces", + "hardware/google/pixel", + "hardware/qcom/bootctrl", + ], +} + +package { + default_applicable_licenses: ["device_google_redbull_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_redbull_license", + visibility: [":__subpackages__"], + license_kinds: [ + "SPDX-license-identifier-Apache-2.0", + "SPDX-license-identifier-BSD", + "SPDX-license-identifier-MIT", + "legacy_not_a_contribution", + "legacy_unencumbered", + ], + // large-scale-change unable to identify any license_text files +} + +vintf_compatibility_matrix { + name: "redbull_product_compatibility_matrix.xml", + stem: "compatibility_matrix.redbull.xml", + product_specific: true, + srcs: [ + "device_framework_matrix_product.xml", + ], +} diff --git a/BoardConfig-common.mk b/BoardConfig-common.mk new file mode 100644 index 00000000..5fe10c75 --- /dev/null +++ b/BoardConfig-common.mk @@ -0,0 +1,526 @@ +# +# 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. +# + +include build/make/target/board/BoardConfigMainlineCommon.mk +include build/make/target/board/BoardConfigPixelCommon.mk + +TARGET_BOARD_PLATFORM := lito +USES_DEVICE_GOOGLE_REDBULL := true + +TARGET_ARCH := arm64 +TARGET_ARCH_VARIANT := armv8-a +TARGET_CPU_ABI := arm64-v8a +TARGET_CPU_ABI2 := +TARGET_CPU_VARIANT := generic +TARGET_CPU_VARIANT_RUNTIME := cortex-a76 + +ifeq (,$(filter %_64,$(TARGET_PRODUCT))) +TARGET_2ND_ARCH := arm +TARGET_2ND_ARCH_VARIANT := armv8-a +TARGET_2ND_CPU_ABI := armeabi-v7a +TARGET_2ND_CPU_ABI2 := armeabi +TARGET_2ND_CPU_VARIANT := generic +TARGET_2ND_CPU_VARIANT_RUNTIME := cortex-a76 +endif + +BOARD_KERNEL_CMDLINE += console=ttyMSM0,115200n8 androidboot.console=ttyMSM0 printk.devkmsg=on +BOARD_KERNEL_CMDLINE += msm_rtb.filter=0x237 +BOARD_KERNEL_CMDLINE += ehci-hcd.park=3 +BOARD_KERNEL_CMDLINE += service_locator.enable=1 +BOARD_KERNEL_CMDLINE += androidboot.memcg=1 cgroup.memory=nokmem +BOARD_KERNEL_CMDLINE += lpm_levels.sleep_disabled=1 # STOPSHIP b/113233473 +BOARD_KERNEL_CMDLINE += usbcore.autosuspend=7 +BOARD_KERNEL_CMDLINE += androidboot.usbcontroller=a600000.dwc3 swiotlb=2048 +BOARD_KERNEL_CMDLINE += androidboot.boot_devices=soc/1d84000.ufshc +BOARD_KERNEL_CMDLINE += loop.max_part=7 +BOARD_KERNEL_CMDLINE += loop.hw_queue_depth=31 +BOARD_KERNEL_CMDLINE += snd_soc_cs35l41_i2c.async_probe=1 +BOARD_KERNEL_CMDLINE += i2c_qcom_geni.async_probe=1 +BOARD_KERNEL_CMDLINE += st21nfc.async_probe=1 +BOARD_KERNEL_CMDLINE += spmi_pmic_arb.async_probe=1 +BOARD_KERNEL_CMDLINE += ufs_qcom.async_probe=1 +BOARD_KERNEL_CMDLINE += spi-geni-qcom.async_probe=1 +BOARD_KERNEL_CMDLINE += cnss_utils.async_probe=1 +BOARD_KERNEL_CMDLINE += cgroup_disable=pressure + +BOARD_KERNEL_BASE := 0x00000000 +BOARD_KERNEL_PAGESIZE := 4096 + +BOARD_INCLUDE_DTB_IN_BOOTIMG := true +BOARD_BOOT_HEADER_VERSION := 3 +BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION) + +BOARD_DTBOIMG_PARTITION_SIZE := 16777216 + +TARGET_NO_KERNEL := false +BOARD_USES_GENERIC_KERNEL_IMAGE := true +BOARD_MOVE_GSI_AVB_KEYS_TO_VENDOR_BOOT := true +ifneq ($(PRODUCT_BUILD_VENDOR_BOOT_IMAGE),false) +BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT := true +endif + +BOARD_USES_METADATA_PARTITION := true + +AB_OTA_UPDATER := true + +ifneq ($(PRODUCT_BUILD_SYSTEM_IMAGE),false) +AB_OTA_PARTITIONS += system +AB_OTA_PARTITIONS += vbmeta_system +endif +ifneq ($(PRODUCT_BUILD_PRODUCT_IMAGE),false) +AB_OTA_PARTITIONS += product +endif +ifneq ($(PRODUCT_BUILD_SYSTEM_EXT_IMAGE),false) +AB_OTA_PARTITIONS += system_ext +endif +ifneq ($(PRODUCT_BUILD_BOOT_IMAGE),false) +AB_OTA_PARTITIONS += boot +endif +ifneq ($(PRODUCT_BUILD_VENDOR_BOOT_IMAGE),false) +AB_OTA_PARTITIONS += vendor_boot +AB_OTA_PARTITIONS += dtbo +endif +ifneq ($(PRODUCT_BUILD_VBMETA_IMAGE),false) +AB_OTA_PARTITIONS += vbmeta +endif + +# Partitions (listed in the file) to be wiped under recovery. +TARGET_RECOVERY_WIPE := device/google/redbull/recovery.wipe +TARGET_RECOVERY_FSTAB := device/google/redbull/fstab.hardware +TARGET_RECOVERY_PIXEL_FORMAT := RGBX_8888 +TARGET_RECOVERY_UI_LIB := \ + librecovery_ui_pixel \ + libfstab + +# Enable chain partition for system. +BOARD_AVB_VBMETA_SYSTEM := system 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 + +# product.img +BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4 + +# userdata.img +TARGET_USERIMAGES_USE_F2FS := true +BOARD_USERDATAIMAGE_PARTITION_SIZE := 10737418240 + +# persist.img +BOARD_PERSISTIMAGE_PARTITION_SIZE := 33554432 +BOARD_PERSISTIMAGE_FILE_SYSTEM_TYPE := ext4 + +# boot.img +BOARD_BOOTIMAGE_PARTITION_SIZE := 0x06000000 + +# vendor_boot.img +BOARD_VENDOR_BOOTIMAGE_PARTITION_SIZE := 0x06000000 + +# Allow LZ4 compression +BOARD_RAMDISK_USE_LZ4 := true + +# Specify BOOT_KERNEL_MODULES +# +# modules for first stage in vendor_boot.img, remainder goes to vendor.img. +# This list is a superset of all the possible modules required, and is +# filtered and ordered as per the supplied kernel's modules.load file. +# Any modules that do not exist will be silently dropped. This is required +# because some kernel configurations may have extra debug or test modules, +# make sure any required to be loaded during first stage init are listed. +BOOT_KERNEL_MODULES := \ + msm_ipc_logging.ko \ + qtee_shm_bridge.ko \ + qcom_hwspinlock.ko \ + smem.ko \ + msm_minidump.ko \ + watchdog_v2.ko \ + early_random.ko \ + qcom-pdc.ko \ + cmd-db.ko \ + qcom_rpmh.ko \ + phy-qcom-ufs.ko \ + phy-qcom-ufs-qrbtc-sdm845.ko \ + phy-qcom-ufs-qmp-v4.ko \ + phy-qcom-ufs-qmp-v4-lito.ko \ + phy-qcom-ufs-qmp-v3-660.ko \ + phy-qcom-ufs-qmp-v3.ko \ + pinctrl-msm.ko \ + pinctrl-lito.ko \ + qcom-spmi-wled.ko \ + msm_bus.ko \ + clk-qcom.ko \ + clk-aop-qmp.ko \ + clk-rpmh.ko \ + gcc-lito.ko \ + clk-spmi-pmic-div.ko \ + qrtr.ko \ + qmi_helpers.ko \ + secure_buffer.ko \ + heap_mem_ext_v01.ko \ + subsystem_notif.ko \ + ramdump.ko \ + msm_memshare.ko \ + msm_bus_rpmh.ko \ + rpmh-regulator.ko \ + qcom-geni-se.ko \ + msm_geni_serial.ko \ + msm_dma_iommu_mapping.ko \ + arm-smmu-debug.ko \ + iommu-logger.ko \ + arm-smmu.ko \ + ufshcd-core.ko \ + ufshcd-pltfrm.ko \ + ufs_qcom.ko \ + spi-geni-qcom.ko \ + i2c-qcom-geni.ko \ + ion-alloc.ko \ + pinctrl-spmi-gpio.ko \ + pinctrl-spmi-mpp.ko \ + pwm-qti-lpg.ko \ + debugcc-lito.ko \ + dispcc-lito.ko \ + gpucc-lito.ko \ + npucc-lito.ko \ + videocc-lito.ko \ + virt-dma.ko \ + gpi.ko \ + msm_scm.ko \ + mdt_loader.ko \ + smem_state.ko \ + smp2p.ko \ + qcom_ipcc.ko \ + llcc-slice.ko \ + llcc-lito.ko \ + core_hang_detect.ko \ + gladiator_hang_detect.ko \ + minidump_log.ko \ + memory_dump_v2.ko \ + dcc_v2.ko \ + service-locator.ko \ + service-notifier.ko \ + subsystem-restart.ko \ + peripheral-loader.ko \ + subsys-pil-tz.ko \ + cdsp-loader.ko \ + qseecom.ko \ + smcinvoke.ko \ + microdump_collector.ko \ + eud.ko \ + qcom_socinfo.ko \ + fsa4480-i2c.ko \ + rpmsg_core.ko \ + qcom_glink_native.ko \ + qcom_glink_smem.ko \ + qcom_glink_spss.ko \ + glink_probe.ko \ + glink_pkt.ko \ + smp2p_sleepstate.ko \ + event_timer.ko \ + lpm-stats.ko \ + msm_pm.ko \ + rpmh_master_stat.ko \ + system_pm.ko \ + rpm_stats.ko \ + ddr_stats.ko \ + cdsprm.ko \ + msm_icnss.ko \ + modemsmem.ko \ + qpnp-amoled-regulator.ko \ + refgen.ko \ + slg51000-regulator.ko \ + tps-regulator.ko \ + msm_rng.ko \ + adsprpc_compat.ko \ + adsprpc.ko \ + fastcvpd.ko \ + rdbg.ko \ + qpnp-power-on.ko \ + msm-poweroff.ko \ + usb_f_diag.ko \ + diagchar.ko \ + governor_bw_vbif.ko \ + governor_gpubw_mon.ko \ + governor_msm_adreno_tz.ko \ + msm_adreno.ko \ + regmap-spmi.ko \ + google-bms.ko \ + at24.ko \ + hdcp_qseecom.ko \ + msm_hdcp.ko \ + citadel-spi.ko \ + qcom-i2c-pmic.ko \ + qcom-spmi-pmic.ko \ + st21nfc.ko \ + st54j_se.ko \ + qpnp-revid.ko \ + devfreq_qcom_fw.ko \ + adc_tm.ko \ + msm_sps.ko \ + qce50.ko \ + qcedev-module.ko \ + qcrypto.ko \ + spmi-pmic-arb.ko \ + cnss_utils.ko \ + cnss_prealloc.ko \ + cnss_nl.ko \ + msm_sharedmem.ko \ + phy-generic.ko \ + phy-msm-ssusb-qmp.ko \ + phy-msm-snps-hs.ko \ + xhci-plat-hcd.ko \ + rndis.ko \ + usb_f_cdev.ko \ + usb_f_ccid.ko \ + dwc3.ko \ + usb-dwc3-msm.ko \ + usb_f_qdss.ko \ + msm_gsi.ko \ + ipa3.ko \ + usb_f_gsi.ko \ + usb_f_mtp.ko \ + usb_f_ptp.ko \ + roles.ko \ + tcpm.ko \ + logbuffer.ko \ + pmic-voter.ko \ + qpnp_pdphy.ko \ + dwc3-haps.ko \ + dwc3-of-simple.ko \ + dwc3-qcom.ko \ + touchscreen_tbn.ko \ + vd6281_module.ko \ + fpc1020_platform_tee.ko \ + rtc-pm8xxx.ko \ + i2c-qcom-geni.ko \ + devfreq_devbw.ko \ + msm_npu.ko \ + qpnp-battery.ko \ + of_batterydata.ko \ + qpnp-smb5-charger.ko \ + qpnp-qgauge.ko \ + sm7250_bms.ko \ + google_charger.ko \ + google-battery.ko \ + overheat_mitigation.ko \ + p9221_charger.ko \ + qti_qmi_sensor.ko \ + bcl_pmic5.ko \ + bcl_soc.ko \ + qmi_cdev.ko \ + lmh_dbg.ko \ + msm_lmh_dcvs.ko \ + regulator_aop_cdev.ko \ + cpu_isolate.ko \ + lmh_cpu_vdd_cdev.ko \ + qcom-spmi-temp-alarm.ko \ + thermal-tsens.ko \ + slimbus.ko \ + bluetooth_power.ko \ + qcom_edac.ko \ + qcom-cpufreq-hw.ko \ + leds-qpnp-flash-common.ko \ + leds-qpnp-flash-v2.ko \ + of_slimbus.ko \ + google_wlan_mac.ko \ + msm_ext_display.ko \ + msm_qmp.ko \ + governor_bw_hwmon.ko \ + bimc-bwmon.ko \ + governor_memlat.ko \ + arm-memlat-mon.ko \ + governor_cdsp_l3.ko \ + qcom-vadc-common.ko \ + qcom-spmi-adc5.ko \ + pac193x.ko \ + qcom_llcc_pmu.ko \ + nvmem_qfprom.ko \ + qcom-spmi-sdam.ko \ + slim_msm_ngd.ko \ + rpmsg_char.ko \ + rmnet.ko \ + usb-audio-qmi.ko \ + msm-vidc.ko \ + ebtables.ko \ + ebtable_broute.ko \ + sctp.ko \ + sctp_diag.ko \ + qrtr-smd.ko \ + msm_drm.ko \ + dm-user.ko \ + +# system_ext.img +BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE := ext4 + +BOARD_FLASH_BLOCK_SIZE := 131072 + +BOARD_ROOT_EXTRA_SYMLINKS := /vendor/lib/dsp:/dsp +BOARD_ROOT_EXTRA_SYMLINKS += /mnt/vendor/persist:/persist + +include device/google/redbull/sepolicy/redbull-sepolicy.mk + +QCOM_BOARD_PLATFORMS += lito +QC_PROP_ROOT := vendor/qcom/sm7250/proprietary +QC_PROP_PATH := $(QC_PROP_ROOT) +BOARD_HAVE_BLUETOOTH_QCOM := true +BOARD_HAVE_QCOM_FM := false +TARGET_USE_QTI_BT_SAR := true +TARGET_USE_QTI_BT_CHANNEL_AVOIDANCE := true +BOARD_USES_COMMON_BLUETOOTH_HAL := true + +# Camera +TARGET_USES_AOSP := true +BOARD_QTI_CAMERA_32BIT_ONLY := false +CAMERA_DAEMON_NOT_PRESENT := true +TARGET_USES_ION := true + +# GPS +TARGET_NO_RPC := true +TARGET_USES_HARDWARE_QCOM_GPS := false +BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE := default +BOARD_VENDOR_QCOM_LOC_PDK_FEATURE_SET := true + +# RenderScript +OVERRIDE_RS_DRIVER := libRSDriver_adreno.so + +# Sensors +TARGET_SUPPORT_DIRECT_REPORT := true + +# CHRE +CHRE_DAEMON_ENABLED := true +CHRE_DAEMON_LPMA_ENABLED := true +CHRE_DAEMON_LOAD_INTO_SENSORSPD := true + +# wlan +BOARD_WLAN_DEVICE := qcwcn +BOARD_WPA_SUPPLICANT_DRIVER := NL80211 +BOARD_HOSTAPD_DRIVER := NL80211 +WIFI_DRIVER_DEFAULT := qca_cld3 +WPA_SUPPLICANT_VERSION := VER_0_8_X +BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE) +BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE) +WIFI_HIDL_FEATURE_AWARE := true +WIFI_HIDL_FEATURE_DUAL_INTERFACE:= true +WIFI_FEATURE_WIFI_EXT_HAL := true +WIFI_FEATURE_IMU_DETECTION := true +WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY := true +BOARD_HOSTAPD_CONFIG_80211W_MFP_OPTIONAL := true +# Add WIFI_FEATURE_IMU_DETECTION to soong_config +$(call soong_config_set,wifi,feature_imu_detection,$(WIFI_FEATURE_IMU_DETECTION)) + +# Audio +BOARD_USES_ALSA_AUDIO := true +AUDIO_FEATURE_ENABLED_MULTI_VOICE_SESSIONS := true +AUDIO_FEATURE_ENABLED_SND_MONITOR := true +AUDIO_FEATURE_ENABLED_USB_TUNNEL := true +BOARD_SUPPORTS_SOUND_TRIGGER := true +AUDIO_FEATURE_FLICKER_SENSOR_INPUT := true +#SOUND_TRIGGER_FEATURE_LPMA_ENABLED := true +AUDIO_FEATURE_ENABLED_MAXX_AUDIO := true +AUDIO_FEATURE_ENABLED_AUDIO_THERMAL_LISTENER := true +AUDIO_FEATURE_ENABLED_24BITS_CAMCORDER := true +AUDIO_FEATURE_ENABLED_AUDIO_ZOOM := true +AUDIO_FEATURE_ENABLED_INSTANCE_ID := true +#Cirrus cs35l41 speaker amp +AUDIO_FEATURE_ENABLED_CS35L41 := true +AUDIO_FEATURE_ENABLED_CS35L41_CALIBRATION_TOOL := true +AUDIO_FEATURE_ENABLED_SVA_MULTI_STAGE := true +AUDIO_FEATURE_QSSI_COMPLIANCE := true + +# Audio hal flag +TARGET_USES_HARDWARE_QCOM_AUDIO := true +TARGET_USES_HARDWARE_QCOM_AUDIO_PLATFORM_8974 := true +TARGET_USES_HARDWARE_QCOM_AUDIO_POSTPROC := true +TARGET_USES_HARDWARE_QCOM_AUDIO_VOLUME_LISTENER := true +TARGET_USES_HARDWARE_QCOM_AUDIO_GET_MMAP_DATA_FD := true +TARGET_USES_HARDWARE_QCOM_AUDIO_APP_TYPE_CFG := true +TARGET_USES_HARDWARE_QCOM_AUDIO_ACDB_INIT_V2_CVD := true +TARGET_USES_HARDWARE_QCOM_AUDIO_MAX_TARGET_SPECIFIC_CHANNEL_CNT := "4" +TARGET_USES_HARDWARE_QCOM_AUDIO_INCALL_MUSIC_ENABLED := true +TARGET_USES_HARDWARE_QCOM_AUDIO_MULTIPLE_HW_VARIANTS_ENABLED := true +TARGET_USES_HARDWARE_QCOM_AUDIO_INCALL_STEREO_CAPTURE_ENABLED := true + +# Graphics +TARGET_USES_GRALLOC1 := true +TARGET_USES_HWC2 := true + +# Display +TARGET_USES_DISPLAY_RENDER_INTENTS := true +TARGET_USES_COLOR_METADATA := true +TARGET_USES_DRM_PP := true +TARGET_HAS_WIDE_COLOR_DISPLAY := true +TARGET_HAS_HDR_DISPLAY := true + +# Vendor Interface Manifest +DEVICE_MANIFEST_FILE := device/google/redbull/manifest.xml +ifeq (,$(filter %_64,$(TARGET_PRODUCT))) +# Omx is 32 bit only +DEVICE_MANIFEST_FILE += device/google/redbull/manifest_omx.xml +endif +DEVICE_MATRIX_FILE := device/google/redbull/compatibility_matrix.xml + +# Use mke2fs to create ext4 images +TARGET_USES_MKE2FS := true + +# dynamic partition +BOARD_SUPER_PARTITION_SIZE := 9755951104 +BOARD_SUPER_PARTITION_GROUPS := google_dynamic_partitions +ifneq ($(PRODUCT_BUILD_SYSTEM_IMAGE),false) +BOARD_GOOGLE_DYNAMIC_PARTITIONS_PARTITION_LIST += system +endif +ifneq ($(PRODUCT_BUILD_PRODUCT_IMAGE),false) +BOARD_GOOGLE_DYNAMIC_PARTITIONS_PARTITION_LIST += product +endif +ifneq ($(PRODUCT_BUILD_SYSTEM_EXT_IMAGE),false) +BOARD_GOOGLE_DYNAMIC_PARTITIONS_PARTITION_LIST += system_ext +endif +ifneq ($(PRODUCT_BUILD_VENDOR_IMAGE),false) +BOARD_GOOGLE_DYNAMIC_PARTITIONS_PARTITION_LIST += vendor +endif + +#BOARD_GOOGLE_DYNAMIC_PARTITIONS_SIZE is set to (6GB - 4MB) +BOARD_GOOGLE_DYNAMIC_PARTITIONS_SIZE := 6438256640 + +# Set error limit to BOARD_SUPER_PARTITON_SIZE - 500MB +BOARD_SUPER_PARTITION_ERROR_LIMIT := 9231663104 + +-include device/google/redbull/soong/pixel_soong_config.mk + +# List of modules that should not load automatically +PRODUCT_COPY_FILES += \ + device/google/redbull/modules.blocklist:$(TARGET_COPY_OUT_VENDOR)/lib/modules/modules.blocklist \ + device/google/redbull/init.insmod.charger.cfg:$(TARGET_COPY_OUT_VENDOR)/etc/init.insmod.charger.cfg \ + +# TARGET_BOOTLOADER_BOARD_NAME sensitive common boilerplate +# We can't use a variable as the prefix to an include statement +# because it makes it too difficult to convert to starlark +TARGET_BOARD_NAME_DIR := device/google/$(TARGET_BOOTLOADER_BOARD_NAME) +-include device/google/$(TARGET_BOOTLOADER_BOARD_NAME)/sepolicy/$(TARGET_BOOTLOADER_BOARD_NAME)-sepolicy.mk + +TARGET_BOARD_INFO_FILE := $(TARGET_BOARD_NAME_DIR)/board-info.txt +TARGET_BOARD_COMMON_PATH := $(TARGET_BOARD_NAME_DIR)/sm7250 + +TARGET_FS_CONFIG_GEN := $(TARGET_BOARD_NAME_DIR)/config.fs + +BOARD_BUILD_VENDOR_RAMDISK_IMAGE := true + +# Testing related defines +BOARD_PERFSETUP_SCRIPT := platform_testing/scripts/perf-setup/b5r3-setup.sh diff --git a/BoardConfigLineage.mk b/BoardConfigLineage.mk new file mode 100644 index 00000000..7d4900d9 --- /dev/null +++ b/BoardConfigLineage.mk @@ -0,0 +1,50 @@ +# +# Copyright (C) 2021 The LineageOS Project +# +# SPDX-License-Identifier: Apache-2.0 +# + +# Kernel +BOARD_KERNEL_IMAGE_NAME := Image.lz4 +TARGET_COMPILE_WITH_MSM_KERNEL := true +TARGET_KERNEL_CONFIG := redbull_defconfig +TARGET_KERNEL_SOURCE := kernel/google/redbull +TARGET_NEEDS_DTBOIMAGE := true +TARGET_KERNEL_CROSS_COMPILE_PREFIX := aarch64-linux-gnu- + +# Kernel modules +BOOT_KERNEL_MODULES += \ + heatmap.ko \ + touch_offload.ko + +KERNEL_MODULES_LOAD_RAW := $(strip $(shell cat device/google/redbull/modules.load)) +KERNEL_MODULES_LOAD := $(foreach m,$(KERNEL_MODULES_LOAD_RAW),$(notdir $(m))) +BOARD_VENDOR_KERNEL_MODULES_LOAD := $(filter-out $(BOOT_KERNEL_MODULES), $(KERNEL_MODULES_LOAD)) +BOARD_VENDOR_RAMDISK_KERNEL_MODULES_LOAD := $(filter $(BOOT_KERNEL_MODULES), $(KERNEL_MODULES_LOAD)) + +# Lineage Health +TARGET_HEALTH_CHARGING_CONTROL_SUPPORTS_DEADLINE := true +TARGET_HEALTH_CHARGING_CONTROL_SUPPORTS_TOGGLE := false + +# Manifests +DEVICE_MANIFEST_FILE += device/google/redbull/lineage_manifest.xml +DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE += vendor/lineage/config/device_framework_matrix.xml + +# Needed for camera +TARGET_GRALLOC_HANDLE_HAS_RESERVED_SIZE := true + +# Partitions +AB_OTA_PARTITIONS += \ + vendor + +BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4 + +# Reserve space for gapps install +-include vendor/lineage/config/BoardConfigReservedSize.mk + +# SELinux +BOARD_SEPOLICY_DIRS += device/google/redbull/sepolicy-lineage/dynamic +BOARD_SEPOLICY_DIRS += device/google/redbull/sepolicy-lineage/vendor + +# Verified Boot +BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --flags 3 diff --git a/CleanSpec.mk b/CleanSpec.mk new file mode 100644 index 00000000..ad0b7348 --- /dev/null +++ b/CleanSpec.mk @@ -0,0 +1,61 @@ +# Copyright 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. +# + +# 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/*) + +# Remove Face permission +$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/permissions/android.hardware.biometrics.face.xml) + +# Removing GSI keys from the ramdisk. +# Those keys will be embedded into VTS instead, to verify the GSI image in used. +$(call add-clean-step, rm -rf $(PRODUCT_OUT)/recovery/root/first_stage_ramdisk/avb/q-gsi.avbpubkey) +$(call add-clean-step, rm -rf $(PRODUCT_OUT)/recovery/root/first_stage_ramdisk/avb/r-gsi.avbpubkey) +$(call add-clean-step, rm -rf $(PRODUCT_OUT)/recovery/root/first_stage_ramdisk/avb/s-gsi.avbpubkey) + +# Use stable aidl power HAL +$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/init/android.hardware.power@1.3-service.pixel-libperfmgr.rc) + +# Remove generic atrace HAL +$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/init/android.hardware.atrace@1.0-service.rc) +$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/vintf/manifest/android.hardware.atrace@1.0-service.xml) diff --git a/METADATA b/METADATA new file mode 100644 index 00000000..d97975ca --- /dev/null +++ b/METADATA @@ -0,0 +1,3 @@ +third_party { + license_type: NOTICE +} diff --git a/WCNSS_qcom_cfg.ini b/WCNSS_qcom_cfg.ini new file mode 100644 index 00000000..09152747 --- /dev/null +++ b/WCNSS_qcom_cfg.ini @@ -0,0 +1,522 @@ +# This file allows user to override the factory +# defaults for the WLAN Driver + +############################################# +# Power related configurations +############################################# +# Phy Mode (auto, b, g, n, etc) +# Valid values are 0-9, with 0 = Auto, 4 = 11n, 9 = 11ac +# 1 = 11abg, 2 = 11b, 3 = 11g, 5 = 11g only, 6 = 11n only +# 7 = 11b only 8 = 11ac only. +gDot11Mode=0 + +############################################# +# STA related general configurations +############################################# +# UAPSD service interval for VO,VI, BE, BK traffic +InfraUapsdVoSrvIntv=0 +InfraUapsdViSrvIntv=0 +InfraUapsdBeSrvIntv=0 +InfraUapsdBkSrvIntv=0 + +# Flag to allow STA send AddTspec even when ACM is Off +gAddTSWhenACMIsOff=1 + +############################################# +# SAP related configurations +############################################# +#Enable OBSS protection +gEnableApOBSSProt=1 + +# RTS threshold +RTSThreshold=1048576 + +# 802.11d support +g11dSupportEnabled=0 + +# DFS Master Capability +gEnableDFSMasterCap=0 + +gNeighborLookupThreshold=76 + +# Legacy (non-ESE, non-802.11r) Fast Roaming Support +# To enable, set FastRoamEnabled=1 +# To disable, set FastRoamEnabled=0 +FastRoamEnabled=1 + +# Check if the AP to which we are roaming is better than current AP in +# terms of RSSI. Checking is disabled if set to Zero.Otherwise it will +# use this value as to how better the RSSI of the new/roamable AP should +# be for roaming +RoamRssiDiff=3 + +#Channel Bonding +gChannelBondingMode24GHz=0 +gChannelBondingMode5GHz=1 + +# Enable DFS channel roam +# 0: DISABLE, 1: ENABLED_NORMAL, 2: ENABLED_ACTIVE +gAllowDFSChannelRoam=1 + +# chain mask related params +# +# Set txchainmask and rxchainmask +# These parameters are used only if gEnable2x2 is 0 +# Valid values are 1,2 +# Set gSetTxChainmask1x1=1 or gSetRxChainmask1x1=1 to select chain0. +# Set gSetTxChainmask1x1=2 or gSetRxChainmask1x1=2 to select chain1. +gSetTxChainmask1x1=1 +gSetRxChainmask1x1=1 + +# MCC to SCC Switch mode: +# 0-Disable +# 1-Enable +# 2-Force SCC if same band, with SAP restart +# 3-Force SCC if same band, without SAP restart by sending (E)CSA +# 4-Force SCC if same band (or) use SAP mandatory channel for DBS, +# without SAP restart by sending (E)CSA +gWlanMccToSccSwitchMode = 3 + +#Allow STA+SAP SCC on DFS channel with master mode support disabled. +g_sta_sap_scc_on_dfs_chan = 0 + +# 1=enable tx STBC; 0=disable +gEnableTXSTBC=1 + +# 1=enable rx LDPC; 0=disable +gEnableRXLDPC=1 + +#Enable/Disable Tx beamformee in SAP mode +gEnableTxBFeeSAP=1 + +# Enable Tx beamforming in VHT20MHz +# Valid values are 0,1. If commented out, the default value is 0. +# 0=disable, 1=enable +gEnableTxBFin20MHz=1 + +# 802.11K support +gRrmEnable=1 + +#Enable Power Save offload +gEnablePowerSaveOffload=2 + +# Maximum Receive AMPDU size (VHT only. Valid values: +# 0->8k 1->16k 2->32k 3->64k 4->128k) +gVhtAmpduLenExponent=7 + +# Maximum MPDU length (VHT only. Valid values: +# 0->3895 octets, 1->7991 octets, 2->11454 octets) +gVhtMpduLen=2 + +# Report actual link speed (not max or scaled) +gReportMaxLinkSpeed=0 + +############################################# +# P2P related configurations +############################################# +#Enable or Disable p2p device address administered +isP2pDeviceAddrAdministrated=0 + +#Mac address provisioning +enable_mac_provision=1 + +#Enable VHT on 2.4Ghz +gEnableVhtFor24GHzBand=1 + +############################################# +# Offload related configurations +############################################# + +# controlling the following offload patterns +# through ini parameter. Default value is 1 +# to disable set it to zero. ssdp = 0 +# Setup multicast pattern for mDNS 224.0.0.251, +# SSDP 239.255.255.250 and LLMNR 224.0.0.252 +ssdp=0 + +# Regulatory Setting; 0=STRICT; 1=CUSTOM +gRegulatoryChangeCountry=1 + +# Disable/Enable GreenAP +# 0 to disable, 1 to enable, default: 1 +gEnableGreenAp=0 + +#Enable/Disable LPASS support +# 0 to disable, 1 to enable +gEnableLpassSupport=1 + +# Whether userspace country code setting shld have priority +gCountryCodePriority=1 + +# Enable or Disable Multi-user MIMO +# 1=Enable (default), 0=Disable +gEnableMuBformee=1 + +# Inactivity time (in ms) to end TX Service Period while in IBSS power save mode +gIbssTxSpEndInactivityTime=10 + +############################################# +# TDLS related configurations +############################################# +# Enable support for TDLS +# 0 - disable +# 1 - enable +gEnableTDLSSupport=1 + +# Enable support for Implicit Trigger of TDLS. That is, wlan driver shall +# initiate TDLS Discovery towards a peer whenever setup criteria (throughput +# and RSSI) is met and then will initiate teardown when teardown criteria +# (idle packet count and RSSI) is met. +# 0 - disable +# 1 - enable +gEnableTDLSImplicitTrigger=1 + +# Enable support for TDLS off-channel operation +# 0 - disable +# 1 - enable +# TDLS off-channel operation will be invoked when there is only one +# TDLS connection. +gEnableTDLSOffChannel=0 + +# Tx/Rx Packet threshold for initiating TDLS. +# This ini is used to configure the number of Tx/Rx packets during the period of +# gTDLSTxStatsPeriod when exceeded, a TDLS Discovery request is triggered. +gTDLSTxPacketThreshold=10 + +# Number of idle packet. +# This ini is used to configure the number of Tx/Rx packet, below which +# within last gTDLSTxStatsPeriod period is considered as idle condition. +gTDLSIdlePacketThreshold=1 + +# VHT Tx/Rx MCS values +# Valid values are 0,1,2. If commented out, the default value is 0. +# 0=MCS0-7, 1=MCS0-8, 2=MCS0-9 +gVhtRxMCS=2 +gVhtTxMCS=2 + +# VHT Tx/Rx MCS values for 2x2 +# Valid values are 0,1,2. If commented out, the default value is 0. +# 0=MCS0-7, 1=MCS0-8, 2=MCS0-9 +gEnable2x2=1 +gVhtRxMCS2x2=2 +gVhtTxMCS2x2=2 + +#IPA config is a bit mask and following are the configurations. +#bit0 IPA Enable +#bit1 IPA PRE Filter enable +#bit2 IPv6 enable +#bit3 IPA Resource Manager (RM) enable +#bit4 IPA Clock scaling enable +#bit5 IPA uC ENABLE +#bit6 IPA uC STA ENABLE +#bit8 IPA Real Time Debugging +gIPAConfig=0x7d + +# Enable Rx handling options +# Rx_thread=1 RPS=2(default for ROME) NAPI=4(default for ihelium) +# Rx_thread + NAPI = 5 +rx_mode=5 + +# Enable(Tx) fastpath for data traffic. +# 1 - enable(default) 0 - disable +gEnableFastPath=1 + +# Enable TCP Segmentation Offload +# 1 - enable 0 - disable +TSOEnable=1 + +# Enable Generic Receive Offload +# LRO and GRO are exclusive to each other +# LRO support is deprecated on latest 4.9(SDM845) kernel +# 1 - enable(default) 0 - disable +GROEnable=1 + +# Enable HT MPDU Density +# 4 for 2 micro sec +ght_mpdu_density=4 + +# Enable flow steering to enable multiple CEs for Rx flows. +# Multiple Rx CEs<==>Multiple Rx IRQs<==>probably different CPUs. +# Parallel Rx paths. +# 1 - enable 0 - disable(default) +gEnableFlowSteering=1 + +# Time in microseconds after which a NAPI poll must yield +ce_service_max_yield_time=500 + +#Maximum number of HTT messages to be processed per NAPI poll +ce_service_max_rx_ind_flush=1 + +# Maximum number of MSDUs the firmware will pack in one HTT_T2H_MSG_TYPE_RX_IN_ORD_PADDR_IND +maxMSDUsPerRxInd=8 +################ Datapath feature set End ################ + +################ NAN feature set start ################### + +# Enable NAN discovery (NAN 1.0) +# 1 - enable 0 - disable(default) +gEnableNanSupport=1 +################ NAN feature set end ##################### + +hostscan_adaptive_dwell_mode=1 + +# Create another interface during driver load +gEnableConcurrentSTA=wlan1 + +#Enable/Disable dual MAC feature +# 0 - enable DBS +# 1 - disable DBS +# 2 - disable DBS for connection but keep DBS for scan +# 3 - disable DBS for connection but keep DBS scan with async +# scan policy disabled +# 4 - enable DBS for connection as well as for scan with async +# scan policy disabled +# 5 - enable DBS for connection but disable dbs for scan. +# 6 - enable DBS for connection but disable simultaneous scan from +# upper layer (DBS scan remains enabled in FW). +gDualMacFeatureDisable=6 + +#Enable/Disable latency mode +# 0 disable +# 1 enable +wlm_latency_enable=1 + +# Enable/Disable NUD Tracking within driver +gEnableNUDTracking=0 + +# Configure hardware filter for DTIM mode +# The hardware filter is only effective in DTIM mode. +# Use this configuration to blanket drop broadcast/multicast packets at the hardware level +# without waking up the firmware +# +# Takes a bitmap of frame types to drop +# +# 0 = disable feature +# 1 = drop all broadcast frames, except ARP (default) +# 2 = drop all multicast frames, except ICMPv6 +# 3 = drop all broadcast and multicast frames, except ARP and ICMPv6 +gHwFilterMode=0 + +# Enables SNR Monitoring +# This ini is used to set default snr monitor +gEnableSNRMonitoring=1 + +# Control to enable TCP limit output byte +# This ini is used to enable dynamic configuration of TCP limit output bytes +# tcp_limit_output_bytes param. +# Enabling this will let driver post message to cnss-daemon, +# accordingly cnss-daemon will modify the tcp_limit_output_bytes. +gTcpLimitOutputEnable=0 + +# Enable Target Wake Time support. +# This ini is used to enable or disable TWT support. +enable_twt=0 + +# For NLO/PNO, enable MAWC based scan +# Enable/Disable the Motion Aided Wireless Connectivity based NLO using this parameter +mawc_nlo_enabled=0 + +# Force 1x1 when connecting to certain peer +# This INI when enabled will force 1x1 connection with certain peer. +gForce1x1Exception=0 + +# Enable/disable oce feature for STA +# This ini is used to enable/disable oce feature for STA +oce_sta_enable=1 + +# Enable/disable oce feature for SAP +# This ini is used to enable/disable oce feature for SAP +oce_sap_enable=0 + +#Enable/disable FILS discovery for SAP +oce_enable_fils_discovery_sap=0 + +# Set probe request rate +# This ini is used to set probe request rate to 5.5Mbps as per OCE requirement in 2.4G band +oce_enable_probe_req_rate=0 + +#Enable/disable probe request deferral as per OCE spec +oce_enable_probe_req_deferral=0 + +# HE caps Weightage to calculate best candidate +# This ini is used to increase/decrease HE caps weightage in best candidate selection. +# If AP supports HE caps, AP will get additional weightage with this param. +# Weightage will be given only if dot11mode is HE capable. +he_caps_weightage=0 + +# PCL Weightage to calculate best candidate +# This ini is used to increase/decrease PCL weightage in best candidate selection. +# If some APs are in PCL list, those AP will get addition weightage. +pcl_weightage=10 + +# Enable/disable esp feature +# This ini is used to enable/disable ESP(Estimated service parameters) IE parsing and decides +# whether firmware will include this in its scoring algo. +enable_esp_for_roam=0 + +# Bitmask to enable 11k offload to FW. +# This ini is used to set which of the 11k features is offloaded to FW +# Currently Neighbor Report Request is supported for offload and is enabled by default. +# B0: Offload 11k neighbor report requests +# B1-B31: Reserved +11k_offload_enable_bitmask=0 + +# Set channel selection logic for different concurrency combinations to DBS or inter band MCC. +# Default is DBS for STA+STA and STA+P2P. +# 0 - inter-band MCC +# 1 - DBS +# +# BIT 0: STA+STA +# BIT 1: STA+P2P +# BIT 2-31: Reserved +channel_select_logic_conc=0 + +# Configure BTM +# Bit 0: Enable/Disable the BTM offload. Set this to 1 will enable and 0 will disable BTM offload. +# BIT 2, 1: Action on non matching candidate with cache. If a BTM request is received from AP +# then the candidate AP's may/may-not be present in the firmware scan cache. +# Based on below config firmware will decide whether to forward BTM frame to host or +# consume with firmware and proceed with Roaming to candidate AP. +# +# 00 scan and consume +# 01 no scan and forward to host +# 10, 11 reserved +# BIT 5, 4, 3: Roaming handoff decisions on multiple candidates match +# 000 match if exact BSSIDs are found +# 001 match if at least one top priority BSSID only +# 010, 011, 100, 101, 110, 111 reserved +# BIT 6: Set this to 1 will send BTM query frame and 0 not sent. +# BIT 7-31: Reserved +btm_offload_config=1473 +btm_disassoc_timer_threshold=10000 +minimum_btm_candidate_score=0 +roam_candidate_validity_timer=0 + +#Timer waiting for interface up from the upper layer +gInterfaceChangeWait=2000 + +# Set external ACS Policy to Mandatory +acs_policy=1 + +# Set Modulated Dtim +gEnableModulatedDTIM=2 + +# Enable NAN datapath +genable_nan_datapath=1 + +# Set MaxLIModulate Dtim +gMaxLIModulatedDTIM=6 + +# Used for ignore peer infrormation +gIgnorePeerErpInfo=1 + +# DBS Scan Selection +gdbs_scan_selection=5,4,1,16,4,1 + +# 0 - Disallow STA+SAP SCC on LTE coex channel +# 1 - Allow STA+SAP SCC on LTE coex channel +g_sta_sap_scc_on_lte_coex_chan=1 + +# Tx Chain Mask for CCK +gCckChainMaskEnable=1 + +# Tx Chain Mask for 1SS +gTxChainMask1ss=0 + +# TPC power +gSelfGenFrmPwr=3 + +# Enable LFR3 subnet detection +gLFRSubnetDetectionEnable=0 + +#Enable APF in Active mode +gActiveUcBpfMode=2 + +# Control MC/BC active APF mode +gActiveMcBcBpfMode=1 + +# Enable or disable Probe Req Information Element whitelist. When enabled, IEs corresponding to bits +# set in bitmaps are allowed in probe request, all others removed while device is unassociated +# with an AP +# 1=Enable, 0=Disable (default) +g_enable_probereq_whitelist_ies=1 + +# ie bitmap examples: <bitmap_name>=<value> [<Allowed Information elements>] +# g_probe_req_ie_bitmap_0=0x80000009 #[0, 3, 31] +# g_probe_req_ie_bitmap_0=0x00000000 #[] (default) +# g_probe_req_ie_bitmap_1=0x80000009 #[32, 35, 63] +g_probe_req_ie_bitmap_0=0x0000000B +g_probe_req_ie_bitmap_1=0x00040000 +# g_probe_req_ie_bitmap_2=0x00000000 +# g_probe_req_ie_bitmap_3=0x00000000 +# g_probe_req_ie_bitmap_4=0x00000000 +# g_probe_req_ie_bitmap_5=0x00000000 +g_probe_req_ie_bitmap_6=0x20000000 +# g_probe_req_ie_bitmap_7=0x00000000 + +# Used to specify vendor specific OUIs +gProbeReqOUIs=0050F208 + +# enable 11d in world mode +enable_11d_in_world_mode=1 + +# WLM flags setting for low level +wlm_latency_flags_low=0xc08 + +#Enable/Disable chain selection optimization for one chain dtim +#Min: 0 +#MAX: 30 +gEnableDTIMSelectionDiversity=3 + +# Enable/Disable rtt sta mac randomization +enable_rtt_mac_randomization=1 + +# Set max time for active 2G channel scan +active_max_channel_time_2g=40 + +# To config roaming scan policy +roaming_scan_policy=1 + +# Config DPTRACE +gDptraceConfig=1,6,2,126 + +# Enable/Disable peer unmap confirmation support in Host +gEnablePeerUnmapConfSupport=1 + +# Enable/Disable separate wifi aware interface +nan_separate_iface_support=1 + +# Config Thermal mitigation +gThrottleDutyCycleLevel0=0 +gThrottleDutyCycleLevel1=0 +gThrottleDutyCycleLevel2=10 +gThrottleDutyCycleLevel3=30 +gThrottleDutyCycleLevel4=50 +gThrottleDutyCycleLevel5=70 + +# Enable/Disable conversion from SARV1 to SARV2 +gEnableSARV1toSARV2=1 + +#This ini is used to enable/disable ESE feature +EseEnabled=1 + +# Configure max number of ndi host supports +ndi_max_support=2 + +# Use wake lock during user scan +wake_lock_in_user_scan=1 + +# To address an interop issue with a particular AP +# Used to specify action OUIs to reconnect when assoc timeout +gActionOUIReconnAssocTimeout=00E04C 00 01 + +# Limit to send request to the firmware at most once in a second +nb_commands_interval=1 + +# This ini is used to enable/disable the HW assist feature in FW +g_disable_hw_assist=1 + +END + +# Note: Configuration parser would not read anything past the END marker + diff --git a/allowlist_com.google.android.as.xml b/allowlist_com.google.android.as.xml new file mode 100644 index 00000000..11e6e8d2 --- /dev/null +++ b/allowlist_com.google.android.as.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2022 The LineageOS 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> + <!-- Specify the explicit set of other applications that AI services are allowed to + interact with, including the providers that back the implementation of the APIs + provided by the package. --> + <allow-association target="com.google.android.as" allowed="com.android.bluetooth" /> + <allow-association target="com.google.android.as" allowed="com.android.bluetooth.services" /> + <allow-association target="com.google.android.as" allowed="com.android.providers.contacts" /> + <allow-association target="com.google.android.as" allowed="com.android.providers.media" /> + <allow-association target="com.google.android.as" allowed="com.android.providers.telephony" /> + <allow-association target="com.google.android.as" allowed="com.android.systemui" /> + <!-- AI services can bind to its open-source network component. --> + <allow-association target="com.google.android.as" allowed="com.google.android.as.oss" /> + + <!-- AI services open-source network component can only bind back to the core package. --> + <allow-association target="com.google.android.as.oss" allowed="com.google.android.as" /> +</config> diff --git a/audio/audio_configs.xml b/audio/audio_configs.xml new file mode 100644 index 00000000..271023da --- /dev/null +++ b/audio/audio_configs.xml @@ -0,0 +1,114 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- +Copyright (c) 2019, The Linux Foundation. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> +<configs> + <!-- APM Configs --> + <property name="audio.deep_buffer.media" value="true"/> + <property name="audio.offload.disable" value="false"/> + <property name="audio.offload.min.duration.secs" value="30"/> + <property name="audio.offload.video" value="true"/> + <property name="persist.vendor.audio.sva.conc.enabled" value="false"/> + <property name="persist.vendor.audio.va_concurrency_enabled" value="false"/> + <property name="vendor.audio.av.streaming.offload.enable" value="false"/> + <property name="vendor.audio.offload.track.enable" value="true"/> + <property name="vendor.audio.offload.multiple.enabled" value="false"/> + <property name="vendor.audio.rec.playback.conc.disabled" value="false"/> + <property name="vendor.voice.conc.fallbackpath" value=""/> + <property name="vendor.voice.dsd.playback.conc.disabled" value="true"/> + <property name="vendor.voice.path.for.pcm.voip" value="true"/> + <property name="vendor.voice.playback.conc.disabled" value="false"/> + <property name="vendor.voice.record.conc.disabled" value="false"/> + <property name="vendor.voice.voip.conc.disabled" value="false"/> + <flag name="audio_extn_formats_enabled" value="true" /> + <flag name="audio_extn_hdmi_spk_enabled" value="true" /> + <flag name="use_xml_audio_policy_conf" value="true" /> + <flag name="voice_concurrency" value="false" /> + + <!-- AV Configs --> + <property name="vendor.audio.use.sw.alac.decoder" value="true"/> + <property name="vendor.audio.use.sw.ape.decoder" value="true"/> + <property name="vendor.audio.use.sw.mpegh.decoder" value="false"/> + <property name="vendor.audio.flac.sw.decoder.24bit" value="true"/> + <property name="vendor.audio.hw.aac.encoder" value="true"/> + <flag name="aac_adts_offload_enabled" value="true" /> + <flag name="alac_offload_enabled" value="true" /> + <flag name="ape_offload_enabled" value="true" /> + <flag name="flac_offload_enabled" value="true" /> + <flag name="pcm_offload_enabled_16" value="true" /> + <flag name="pcm_offload_enabled_24" value="true" /> + <flag name="qti_flac_decoder" value="true" /> + <flag name="vorbis_offload_enabled" value="true" /> + <flag name="wma_offload_enabled" value="true" /> + + <!-- AHAL Configs --> + <flag name="a2dp_offload_enabled" value="true" /> + <flag name="anc_headset_enabled" value="true" /> + <flag name="audiosphere_enabled" value="true" /> + <flag name="audio_zoom_enabled" value="false" /> + <flag name="battery_listener_enabled" value="true" /> + <flag name="compress_capture_enabled" value="false" /> + <flag name="compress_in_enabled" value="true" /> + <flag name="compress_metadata_needed" value="true" /> + <flag name="concurrent_capture_enabled" value="true" /> + <flag name="custom_stereo_enabled" value="true" /> + <flag name="display_port_enabled" value="true" /> + <flag name="dsm_feedback_enabled" value="false" /> + <flag name="dynamic_ecns_enabled" value="true" /> + <flag name="ext_hw_plugin_enabled" value="true" /> + <flag name="ext_qdsp_enabled" value="false" /> + <flag name="ext_spkr_enabled" value="false" /> + <flag name="ext_spkr_tfa_enabled" value="false" /> + <flag name="fluence_enabled" value="true" /> + <flag name="hdmi_edid_enabled" value="true" /> + <flag name="hdmi_passthrough_enabled" value="true" /> + <flag name="hfp_enabled" value="true" /> + <flag name="hifi_audio_enabled" value="false" /> + <flag name="hwdep_cal_enabled" value="false" /> + <flag name="incall_music_enabled" value="true" /> + <flag name="keep_alive_enabled" value="true" /> + <flag name="kpi_optimize_enabled" value="true" /> + <flag name="maxx_audio_enabled" value="false" /> + <flag name="receiver_aided_stereo" value="true" /> + <flag name="snd_monitor_enabled" value="true" /> + <flag name="source_track_enabled" value="true" /> + <flag name="spkr_prot_enabled" value="true" /> + <flag name="ssrec_enabled" value="true" /> + <flag name="usb_offload_burst_mode" value="true" /> + <flag name="usb_offload_enabled" value="true" /> + <flag name="usb_offload_sidetone_vol_enabled" value="false" /> + <flag name="use_deep_buffer_as_primary_output" value="false" /> + <flag name="vbat_enabled" value="true" /> + <flag name="wsa_enabled" value="false" /> + + <!-- Common configs between APM and AHAL --> + <flag name="afe_proxy_enabled" value="true" /> + <flag name="compress_voip_enabled" value="false" /> + <flag name="fm_power_opt" value="true" /> + <flag name="record_play_concurrency" value="false" /> +</configs> diff --git a/audio/audio_effects.xml b/audio/audio_effects.xml new file mode 100644 index 00000000..63ebf8ef --- /dev/null +++ b/audio/audio_effects.xml @@ -0,0 +1,111 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--- Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. --> +<!--- --> +<!--- Redistribution and use in source and binary forms, with or without --> +<!--- modification, are permitted provided that the following conditions are --> +<!--- met: --> +<!--- * Redistributions of source code must retain the above copyright --> +<!--- notice, this list of conditions and the following disclaimer. --> +<!--- * Redistributions in binary form must reproduce the above --> +<!--- copyright notice, this list of conditions and the following --> +<!--- disclaimer in the documentation and/or other materials provided --> +<!--- with the distribution. --> +<!--- * Neither the name of The Linux Foundation nor the names of its --> +<!--- contributors may be used to endorse or promote products derived --> +<!--- from this software without specific prior written permission. --> +<!--- --> +<!--- THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED --> +<!--- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF --> +<!--- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT --> +<!--- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS --> +<!--- BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR --> +<!--- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF --> +<!--- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR --> +<!--- BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, --> +<!--- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE --> +<!--- OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN --> +<!--- IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --> + +<audio_effects_conf version="2.0" xmlns="http://schemas.android.com/audio/audio_effects_conf/v2_0"> + <libraries> + <library name="bundle" path="libbundlewrapper.so"/> + <library name="reverb" path="libreverbwrapper.so"/> + <library name="visualizer_sw" path="libvisualizer.so"/> + <library name="visualizer_hw" path="libqcomvisualizer.so"/> + <library name="downmix" path="libdownmix.so"/> + <library name="dynamics_processing" path="libdynproc.so"/> + <library name="loudness_enhancer" path="libldnhncr.so"/> + <library name="proxy" path="libeffectproxy.so"/> + <library name="offload_bundle" path="libqcompostprocbundle.so"/> + <library name="audio_pre_processing" path="libqcomvoiceprocessing.so"/> + <library name="volume_listener" path="libvolumelistener.so"/> + </libraries> + <effects> + <effectProxy name="bassboost" library="proxy" uuid="14804144-a5ee-4d24-aa88-0002a5d5c51b"> + <libsw library="bundle" uuid="8631f300-72e2-11df-b57e-0002a5d5c51b"/> + <libhw library="offload_bundle" uuid="2c4a8c24-1581-487f-94f6-0002a5d5c51b"/> + </effectProxy> + <effectProxy name="virtualizer" library="proxy" uuid="d3467faa-acc7-4d34-acaf-0002a5d5c51b"> + <libsw library="bundle" uuid="1d4033c0-8557-11df-9f2d-0002a5d5c51b"/> + <libhw library="offload_bundle" uuid="509a4498-561a-4bea-b3b1-0002a5d5c51b"/> + </effectProxy> + <effectProxy name="equalizer" library="proxy" uuid="c8e70ecd-48ca-456e-8a4f-0002a5d5c51b"> + <libsw library="bundle" uuid="ce772f20-847d-11df-bb17-0002a5d5c51b"/> + <libhw library="offload_bundle" uuid="a0dac280-401c-11e3-9379-0002a5d5c51b"/> + </effectProxy> + <effect name="volume" library="bundle" uuid="119341a0-8469-11df-81f9-0002a5d5c51b"/> + <effectProxy name="reverb_env_aux" library="proxy" uuid="48404ac9-d202-4ccc-bf84-0002a5d5c51b"> + <libsw library="reverb" uuid="4a387fc0-8ab3-11df-8bad-0002a5d5c51b"/> + <libhw library="offload_bundle" uuid="79a18026-18fd-4185-8233-0002a5d5c51b"/> + </effectProxy> + <effectProxy name="reverb_env_ins" library="proxy" uuid="b707403a-a1c1-4291-9573-0002a5d5c51b"> + <libsw library="reverb" uuid="c7a511a0-a3bb-11df-860e-0002a5d5c51b"/> + <libhw library="offload_bundle" uuid="eb64ea04-973b-43d2-8f5e-0002a5d5c51b"/> + </effectProxy> + <effectProxy name="reverb_pre_aux" library="proxy" uuid="1b78f587-6d1c-422e-8b84-0002a5d5c51b"> + <libsw library="reverb" uuid="f29a1400-a3bb-11df-8ddc-0002a5d5c51b"/> + <libhw library="offload_bundle" uuid="6987be09-b142-4b41-9056-0002a5d5c51b"/> + </effectProxy> + <effectProxy name="reverb_pre_ins" library="proxy" uuid="f3e178d2-ebcb-408e-8357-0002a5d5c51b"> + <libsw library="reverb" uuid="172cdf00-a3bc-11df-a72f-0002a5d5c51b"/> + <libhw library="offload_bundle" uuid="aa2bebf6-47cf-4613-9bca-0002a5d5c51b"/> + </effectProxy> + <effectProxy name="visualizer" library="proxy" uuid="1d0a1a53-7d5d-48f2-8e71-27fbd10d842c"> + <libsw library="visualizer_sw" uuid="d069d9e0-8329-11df-9168-0002a5d5c51b"/> + <libhw library="visualizer_hw" uuid="7a8044a0-1a71-11e3-a184-0002a5d5c51b"/> + </effectProxy> + <effect name="downmix" library="downmix" uuid="93f04452-e4fe-41cc-91f9-e475b6d1d69f"/> + <effect name="loudness_enhancer" library="loudness_enhancer" uuid="fa415329-2034-4bea-b5dc-5b381c8d1e2c"/> + <effect name="aec" library="audio_pre_processing" uuid="27dab416-23f8-11e8-b467-0ed5f89f718b"/> + <effect name="ns" library="audio_pre_processing" uuid="27dab6d2-23f8-11e8-b467-0ed5f89f718b"/> + <effect name="music_helper" library="volume_listener" uuid="08b8b058-0590-11e5-ac71-0025b32654a0"/> + <effect name="ring_helper" library="volume_listener" uuid="0956df94-0590-11e5-bdbe-0025b32654a0"/> + <effect name="alarm_helper" library="volume_listener" uuid="09f303e2-0590-11e5-8fdb-0025b32654a0"/> + <effect name="voice_helper" library="volume_listener" uuid="0ace5c08-0590-11e5-ae9e-0025b32654a0"/> + <effect name="notification_helper" library="volume_listener" uuid="0b776dde-0590-11e5-81ba-0025b32654a0"/> + <effect name="dynamics_processing" library="dynamics_processing" uuid="e0e6539b-1781-7261-676f-6d7573696340"/> + </effects> + <postprocess> + <stream type="music"> + <apply effect="music_helper"/> + </stream> + <stream type="ring"> + <apply effect="ring_helper"/> + </stream> + <stream type="alarm"> + <apply effect="alarm_helper"/> + </stream> + <stream type="voice_call"> + <apply effect="voice_helper"/> + </stream> + <stream type="notification"> + <apply effect="notification_helper"/> + </stream> + </postprocess> + <preprocess> + <stream type="voice_communication"> + <apply effect="aec"/> + <apply effect="ns"/> + </stream> + </preprocess> +</audio_effects_conf> diff --git a/audio/audio_io_policy.conf b/audio/audio_io_policy.conf new file mode 100644 index 00000000..68aee2ba --- /dev/null +++ b/audio/audio_io_policy.conf @@ -0,0 +1,119 @@ +# List of profiles for the output device session where stream is routed. +# A stream opened with the inputs attributes which match the "flags" and +# "formats" as specified in the profile is routed to a device at +# sample rate specified under "sampling_rates" and bit width under +# "bit_width" and the topology extracted from the acdb data against +# the "app_type". +# +# the flags and formats are specified using the strings corresponding to +# enums in audio.h and audio_policy.h. They are concatenated with "|" +# without space or "\n". +# the flags and formats should match the ones in "audio_policy.conf" + +outputs { + default { + flags AUDIO_OUTPUT_FLAG_PRIMARY + formats AUDIO_FORMAT_PCM_16_BIT + sampling_rates 48000 + bit_width 16 + app_type 69936 + } + proaudio { + flags AUDIO_OUTPUT_FLAG_FAST|AUDIO_OUTPUT_FLAG_RAW + formats AUDIO_FORMAT_PCM_16_BIT + sampling_rates 48000 + bit_width 16 + app_type 69943 + } + voip_rx { + flags AUDIO_OUTPUT_FLAG_VOIP_RX + formats AUDIO_FORMAT_PCM_16_BIT + sampling_rates 8000|16000|32000|48000 + bit_width 16 + app_type 69946 + } + deep_buffer { + flags AUDIO_OUTPUT_FLAG_DEEP_BUFFER + formats AUDIO_FORMAT_PCM_24_BIT_PACKED + sampling_rates 48000 + bit_width 24 + app_type 69940 + } + direct_pcm_16 { + flags AUDIO_OUTPUT_FLAG_DIRECT + formats AUDIO_FORMAT_PCM_16_BIT|AUDIO_FORMAT_PCM_24_BIT_PACKED|AUDIO_FORMAT_PCM_8_24_BIT|AUDIO_FORMAT_PCM_32_BIT + sampling_rates 44100|48000|88200|96000|176400|192000 + bit_width 16 + app_type 69936 + } + direct_pcm_24 { + flags AUDIO_OUTPUT_FLAG_DIRECT + formats AUDIO_FORMAT_PCM_24_BIT_PACKED|AUDIO_FORMAT_PCM_8_24_BIT|AUDIO_FORMAT_PCM_32_BIT + sampling_rates 44100|48000|88200|96000|176400|192000|352800|384000 + bit_width 24 + app_type 69940 + } + direct_pcm_32 { + flags AUDIO_OUTPUT_FLAG_DIRECT + formats AUDIO_FORMAT_PCM_32_BIT + sampling_rates 44100|48000|88200|96000|176400|192000|352800|384000 + bit_width 32 + app_type 69942 + } + compress_passthrough { + flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING|AUDIO_OUTPUT_FLAG_COMPRESS_PASSTHROUGH + formats AUDIO_FORMAT_AC3|AUDIO_FORMAT_E_AC3|AUDIO_FORMAT_E_AC3_JOC|AUDIO_FORMAT_DTS|AUDIO_FORMAT_DTS_HD|AUDIO_FORMAT_DSD + sampling_rates 32000|44100|48000|88200|96000|176400|192000|352800 + bit_width 16 + app_type 69941 + } + compress_offload_16 { + flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING|AUDIO_OUTPUT_FLAG_GAPLESS_OFFLOAD + formats AUDIO_FORMAT_MP3|AUDIO_FORMAT_PCM_16_BIT_OFFLOAD|AUDIO_FORMAT_PCM_24_BIT_OFFLOAD|AUDIO_FORMAT_FLAC|AUDIO_FORMAT_ALAC|AUDIO_FORMAT_APE|AUDIO_FORMAT_AAC_LC|AUDIO_FORMAT_AAC_HE_V1|AUDIO_FORMAT_AAC_HE_V2|AUDIO_FORMAT_WMA|AUDIO_FORMAT_WMA_PRO|AUDIO_FORMAT_VORBIS|AUDIO_FORMAT_AAC_ADTS_LC|AUDIO_FORMAT_AAC_ADTS_HE_V1|AUDIO_FORMAT_AAC_ADTS_HE_V2 + sampling_rates 44100|48000|88200|96000|176400|192000 + bit_width 16 + app_type 69940 + } + compress_offload_24 { + flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING|AUDIO_OUTPUT_FLAG_GAPLESS_OFFLOAD + formats AUDIO_FORMAT_MP3|AUDIO_FORMAT_PCM_24_BIT_OFFLOAD|AUDIO_FORMAT_FLAC|AUDIO_FORMAT_ALAC|AUDIO_FORMAT_APE|AUDIO_FORMAT_AAC_LC|AUDIO_FORMAT_AAC_HE_V1|AUDIO_FORMAT_AAC_HE_V2|AUDIO_FORMAT_VORBIS|AUDIO_FORMAT_WMA|AUDIO_FORMAT_WMA_PRO|AUDIO_FORMAT_AAC_ADTS_LC|AUDIO_FORMAT_AAC_ADTS_HE_V1|AUDIO_FORMAT_AAC_ADTS_HE_V2 + sampling_rates 44100|48000|88200|96000|176400|192000 + bit_width 24 + app_type 69940 + } +} + +inputs { + record_16bit { + formats AUDIO_FORMAT_PCM_16_BIT + sampling_rates 8000|16000|32000|44100|48000|88200|96000|176400|192000 + bit_width 16 + app_type 69938 + } + record_24bit { + formats AUDIO_FORMAT_PCM_24_BIT_PACKED|AUDIO_FORMAT_PCM_8_24_BIT + sampling_rates 44100|48000|88200|96000|176400|192000 + bit_width 24 + app_type 69948 + } + record_32bit { + formats AUDIO_FORMAT_PCM_32_BIT|AUDIO_FORMAT_PCM_FLOAT + sampling_rates 44100|48000|88200|96000|176400|192000 + bit_width 32 + app_type 69949 + } + voip_tx { + flags AUDIO_INPUT_FLAG_VOIP_TX + formats AUDIO_FORMAT_PCM_16_BIT + sampling_rates 8000|16000|32000|48000 + bit_width 16 + app_type 69946 + } + low_latency_voip_tx { + flags AUDIO_INPUT_FLAG_VOIP_TX|AUDIO_INPUT_FLAG_FAST + formats AUDIO_FORMAT_PCM_16_BIT + sampling_rates 48000 + bit_width 16 + app_type 69946 + } +} diff --git a/audio/crus_sp_cal_mixer_paths.xml b/audio/crus_sp_cal_mixer_paths.xml new file mode 100644 index 00000000..85f0c303 --- /dev/null +++ b/audio/crus_sp_cal_mixer_paths.xml @@ -0,0 +1,293 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- Copyright (c) 2018-2020, The Linux Foundation. All rights reserved. --> +<!-- --> +<!-- Redistribution and use in source and binary forms, with or without --> +<!-- modification, are permitted provided that the following conditions are --> +<!-- met: --> +<!-- * Redistributions of source code must retain the above copyright --> +<!-- notice, this list of conditions and the following disclaimer. --> +<!-- * Redistributions in binary form must reproduce the above --> +<!-- copyright notice, this list of conditions and the following --> +<!-- disclaimer in the documentation and/or other materials provided --> +<!-- with the distribution. --> +<!-- * Neither the name of The Linux Foundation nor the names of its --> +<!-- contributors may be used to endorse or promote products derived --> +<!-- from this software without specific prior written permission. --> +<!-- --> +<!-- THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED --> +<!-- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF --> +<!-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT --> +<!-- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS --> +<!-- BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR --> +<!-- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF --> +<!-- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR --> +<!-- BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, --> +<!-- OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN --> +<!-- IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --> +<mixer> + <!-- Initial Values --> + <!-- Preload Stage --> + <ctl name="Main AMP Enable Switch" value="0" /> + <ctl name="DSP1 Preload Switch" value="0" /> + <ctl name="R Main AMP Enable Switch" value="0" /> + <ctl name="R DSP1 Preload Switch" value="0" /> + <!-- Clock-trigger Stage --> + <ctl name="QUIN_TDM_RX_0 Audio Mixer MultiMedia1" value="0" /> + + <!-- Preparation Stage --> + <path name="crus-switch-fw-prepare"> + <ctl name="DRE DRE Switch" value="1" /> + <ctl name="VBSTMON Output Switch" value="1" /> + <ctl name="DSP Booted" value="0" /> + <ctl name="R DRE DRE Switch" value="1" /> + <ctl name="R VBSTMON Output Switch" value="1" /> + <ctl name="R DSP Booted" value="0" /> + + <path name="~crus-fw-preload" /> + </path> + + <!-- Preload Stage --> + <path name="crus-fw-preload"> + <ctl name="DSP1 Preload Switch" value="1" /> + <ctl name="R DSP1 Preload Switch" value="1" /> + <ctl name="Main AMP Enable Switch" value="0" /> + <ctl name="R Main AMP Enable Switch" value="0" /> + </path> + + <!-- Firmware-switching Stage --> + <path name="crus-switch-fw-Calibration"> + <ctl name="PCM Source" value="DSP" /> + <ctl name="DSP1 Firmware" value="Calibration" /> + <ctl name="R PCM Source" value="DSP" /> + <ctl name="R DSP1 Firmware" value="Calibration" /> + </path> + + <path name="crus-switch-fw-Diagnostic"> + <ctl name="PCM Source" value="DSP" /> + <ctl name="DSP1 Firmware" value="Diagnostic" /> + <ctl name="R PCM Source" value="DSP" /> + <ctl name="R DSP1 Firmware" value="Diagnostic" /> + </path> + + <path name="crus-switch-fw-Protection"> + <ctl name="PCM Source" value="DSP" /> + <ctl name="DSP1 Firmware" value="Protection" /> + <ctl name="R PCM Source" value="DSP" /> + <ctl name="R DSP1 Firmware" value="Protection" /> + </path> + + <!-- DSP-initialization Stage --> + <path name="crus-dsp-pre-calibration-amp1"> + <ctl name="DSP1 Calibration cd CAL_AMBIENT" value="25" endian="be" /> + <ctl name="Main AMP Enable Switch" value="1" /> + </path> + + <path name="crus-dsp-pre-calibration-amp2"> + <ctl name="R DSP1 Calibration cd CAL_AMBIENT" value="25" endian="be" /> + <ctl name="R Main AMP Enable Switch" value="1" /> + </path> + + <path name="crus-dsp-pre-calibration"> + <path name="crus-dsp-pre-calibration-amp1" /> + <path name="crus-dsp-pre-calibration-amp2" /> + </path> + + <path name="crus-dsp-pre-diagnostic-amp1"> + <ctl name="DSP1 Diagnostic cd CAL_AMBIENT" value="25" endian="be" /> + <ctl name="Main AMP Enable Switch" value="1" /> + </path> + + <path name="crus-dsp-pre-diagnostic-amp2"> + <ctl name="R DSP1 Diagnostic cd CAL_AMBIENT" value="25" endian="be" /> + <ctl name="R Main AMP Enable Switch" value="1" /> + </path> + + <path name="crus-dsp-pre-diagnostic"> + <path name="crus-dsp-pre-diagnostic-amp1" /> + <path name="crus-dsp-pre-diagnostic-amp2" /> + </path> + + <path name="crus-dsp-pre-protection"> + <ctl name="Main AMP Enable Switch" value="1" /> + <ctl name="R Main AMP Enable Switch" value="1" /> + </path> + + <!-- Clock-trigger Stage --> + <path name="platform-controls"> + <ctl name="QUIN_TDM_RX_0 Audio Mixer MultiMedia1" value="1" /> + </path> + + <!-- Post loaded firmware --> + <path name="crus-dsp-post-loading-fw"> + <ctl name="Main AMP Enable Switch" value="0" /> + <ctl name="R Main AMP Enable Switch" value="0" /> + </path> + + <!-- Value & Information Fetch Stage --> + <path name="platform-values"> + <ctl name="QUIN_TDM_RX_0 Format" /> + <ctl name="QUIN_TDM_TX_0 Format" /> + <ctl name="QUIN_TDM_RX_0 Channels" /> + <ctl name="QUIN_TDM_TX_0 Channels" /> + <ctl name="QUIN_TDM_RX_0 SampleRate" /> + <ctl name="QUIN_TDM_TX_0 SampleRate" /> + <ctl name="QUIN_TDM_RX_0 Audio Mixer MultiMedia1" /> + </path> + + <path name="cs35l41-values"> + <ctl name="DRE DRE Switch" /> + <ctl name="R DRE DRE Switch" /> + <ctl name="VBSTMON Output Switch" /> + <ctl name="R VBSTMON Output Switch" /> + <ctl name="AMP PCM Gain" /> + <ctl name="R AMP PCM Gain" /> + <ctl name="Digital PCM Volume" /> + <ctl name="R Digital PCM Volume" /> + <ctl name="PCM Source" /> + <ctl name="R PCM Source" /> + <ctl name="DSP Booted" /> + <ctl name="R DSP Booted" /> + <ctl name="Main AMP Enable Switch" /> + <ctl name="R Main AMP Enable Switch" /> + <ctl name="DSP1 Preload Switch" /> + <ctl name="R DSP1 Preload Switch" /> + <ctl name="DSP1 Firmware" /> + <ctl name="R DSP1 Firmware" /> + </path> + + + <!-- Note that the order of controls does matter because + it should be matched to the structure defined in + sp_cal_common.h --> + <!-- + struct calibration_data { + unsigned int cal_r; + unsigned int cal_status; + unsigned int cal_checksum; + unsigned int cal_ambient; + unsigned int amp_pcm_gain; + unsigned int digital_pcm_gain; + }; + --> + <path name="cs35l41-dsp-amp1-calibration-values"> + <ctl name="DSP1 Calibration cd CAL_R" /> + <ctl name="DSP1 Calibration cd CAL_STATUS" /> + <ctl name="DSP1 Calibration cd CAL_CHECKSUM" /> + <ctl name="DSP1 Calibration cd CAL_AMBIENT" /> + <ctl name="AMP PCM Gain" /> + <ctl name="Digital PCM Volume" /> + + <!-- Only for debug print --> + <ctl name="DSP1 Calibration cd CAL_SET_STATUS" /> + </path> + + <path name="cs35l41-dsp-amp2-calibration-values"> + <ctl name="R DSP1 Calibration cd CAL_R" /> + <ctl name="R DSP1 Calibration cd CAL_STATUS" /> + <ctl name="R DSP1 Calibration cd CAL_CHECKSUM" /> + <ctl name="R DSP1 Calibration cd CAL_AMBIENT" /> + <ctl name="R AMP PCM Gain" /> + <ctl name="R Digital PCM Volume" /> + + <!-- Only for debug print --> + <ctl name="R DSP1 Calibration cd CAL_SET_STATUS" /> + </path> + + <!-- + struct diagnostic_data { + struct calibration_data calibration_data; + unsigned int z_low_diff; + unsigned int diag_f0; + unsigned int diag_f0_status; + }; + --> + <path name="cs35l41-dsp-amp1-diagnostic-values"> + <!-- struct calibration_data START --> + <ctl name="DSP1 Diagnostic cd CAL_R" /> + <ctl name="DSP1 Diagnostic cd CAL_STATUS" /> + <ctl name="DSP1 Diagnostic cd CAL_CHECKSUM" /> + <ctl name="DSP1 Diagnostic cd CAL_AMBIENT" /> + <ctl name="AMP PCM Gain" /> + <ctl name="Digital PCM Volume" /> + <!-- struct calibration_data END --> + <ctl name="DSP1 Diagnostic cd DIAG_Z_LOW_DIFF" /> + <ctl name="DSP1 Diagnostic cd DIAG_F0" /> + <ctl name="DSP1 Diagnostic cd DIAG_F0_STATUS" /> + + <!-- Only for debug print --> + <ctl name="DSP1 Diagnostic cd CAL_SET_STATUS" /> + </path> + + <path name="cs35l41-dsp-amp2-diagnostic-values"> + <!-- struct calibration_data START --> + <ctl name="R DSP1 Diagnostic cd CAL_R" /> + <ctl name="R DSP1 Diagnostic cd CAL_STATUS" /> + <ctl name="R DSP1 Diagnostic cd CAL_CHECKSUM" /> + <ctl name="R DSP1 Diagnostic cd CAL_AMBIENT" /> + <ctl name="R AMP PCM Gain" /> + <ctl name="R Digital PCM Volume" /> + <!-- struct calibration_data END --> + <ctl name="R DSP1 Diagnostic cd DIAG_Z_LOW_DIFF" /> + <ctl name="R DSP1 Diagnostic cd DIAG_F0" /> + <ctl name="R DSP1 Diagnostic cd DIAG_F0_STATUS" /> + + <!-- Only for debug print --> + <ctl name="R DSP1 Diagnostic cd CAL_SET_STATUS" /> + </path> + + <path name="cs35l41-dsp-amp1-protection-values"> + <!-- struct calibration_data START --> + <ctl name="DSP1 Protection cd CAL_R" /> + <ctl name="DSP1 Protection cd CAL_STATUS" /> + <ctl name="DSP1 Protection cd CAL_CHECKSUM" /> + <ctl name="DSP1 Protection cd CAL_AMBIENT" /> + + <!-- These controls are unrelated so we can simply + skip them + <ctl name="AMP PCM Gain" /> + <ctl name="Digital PCM Volume" /> + --> + <!-- struct calibration_data END --> + </path> + + <path name="cs35l41-dsp-amp2-protection-values"> + <!-- struct calibration_data START --> + <ctl name="R DSP1 Protection cd CAL_R" /> + <ctl name="R DSP1 Protection cd CAL_STATUS" /> + <ctl name="R DSP1 Protection cd CAL_CHECKSUM" /> + <ctl name="R DSP1 Protection cd CAL_AMBIENT" /> + + <!-- These controls are unrelated so we can simply + skip them + <ctl name="R AMP PCM Gain" /> + <ctl name="R Digital PCM Volume" /> + --> + <!-- struct calibration_data END --> + </path> + + <path name="cs35l41-dsp-amp1-calibration-completion"> + <ctl name="DSP1 Calibration cd CAL_STATUS" /> + </path> + + <path name="cs35l41-dsp-amp2-calibration-completion"> + <ctl name="R DSP1 Calibration cd CAL_STATUS" /> + </path> + + <path name="cs35l41-dsp-amp1-apply-calibration-completion"> + <ctl name="DSP1 Protection cd CAL_SET_STATUS" /> + </path> + + <path name="cs35l41-dsp-amp2-apply-calibration-completion"> + <ctl name="R DSP1 Protection cd CAL_SET_STATUS" /> + </path> + + <path name="cs35l41-dsp-amp1-diagnostic-completion"> + <ctl name="DSP1 Diagnostic cd CAL_STATUS" /> + <ctl name="DSP1 Diagnostic cd DIAG_F0_STATUS" /> + </path> + + <path name="cs35l41-dsp-amp2-diagnostic-completion"> + <ctl name="R DSP1 Diagnostic cd CAL_STATUS" /> + <ctl name="R DSP1 Diagnostic cd DIAG_F0_STATUS" /> + </path> +</mixer> diff --git a/audio/rt5514_dsp_fw1.bin b/audio/rt5514_dsp_fw1.bin Binary files differnew file mode 100644 index 00000000..40fd3849 --- /dev/null +++ b/audio/rt5514_dsp_fw1.bin diff --git a/audio/rt5514_dsp_fw2.bin b/audio/rt5514_dsp_fw2.bin Binary files differnew file mode 100644 index 00000000..ef2d19e1 --- /dev/null +++ b/audio/rt5514_dsp_fw2.bin diff --git a/audio/rt5514_dsp_fw3.bin b/audio/rt5514_dsp_fw3.bin Binary files differnew file mode 100644 index 00000000..2961e02d --- /dev/null +++ b/audio/rt5514_dsp_fw3.bin diff --git a/audio/rt5514_dsp_fw4.bin b/audio/rt5514_dsp_fw4.bin Binary files differnew file mode 100644 index 00000000..c0a570bf --- /dev/null +++ b/audio/rt5514_dsp_fw4.bin diff --git a/audio/rt5514p_dsp_fw1.bin b/audio/rt5514p_dsp_fw1.bin Binary files differnew file mode 100644 index 00000000..64ab8644 --- /dev/null +++ b/audio/rt5514p_dsp_fw1.bin diff --git a/audio/rt5514p_dsp_fw2.bin b/audio/rt5514p_dsp_fw2.bin Binary files differnew file mode 100644 index 00000000..e08f45c0 --- /dev/null +++ b/audio/rt5514p_dsp_fw2.bin diff --git a/audio/rt5514p_dsp_fw3.bin b/audio/rt5514p_dsp_fw3.bin Binary files differnew file mode 100644 index 00000000..45a8b744 --- /dev/null +++ b/audio/rt5514p_dsp_fw3.bin diff --git a/audio/rt5514p_dsp_fw4.bin b/audio/rt5514p_dsp_fw4.bin Binary files differnew file mode 100644 index 00000000..1b22773a --- /dev/null +++ b/audio/rt5514p_dsp_fw4.bin diff --git a/audio/sound_trigger_platform_info.xml b/audio/sound_trigger_platform_info.xml new file mode 100644 index 00000000..d91223c7 --- /dev/null +++ b/audio/sound_trigger_platform_info.xml @@ -0,0 +1,324 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!--- Copyright (c) 2013-2019, The Linux Foundation. All rights reserved. --> +<!--- --> +<!--- Redistribution and use in source and binary forms, with or without --> +<!--- modification, are permitted provided that the following conditions are --> +<!--- met: --> +<!--- * Redistributions of source code must retain the above copyright --> +<!--- notice, this list of conditions and the following disclaimer. --> +<!--- * Redistributions in binary form must reproduce the above --> +<!--- copyright notice, this list of conditions and the following --> +<!--- disclaimer in the documentation and/or other materials provided --> +<!--- with the distribution. --> +<!--- * Neither the name of The Linux Foundation nor the names of its --> +<!--- contributors may be used to endorse or promote products derived --> +<!--- from this software without specific prior written permission. --> +<!--- --> +<!--- THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED --> +<!--- WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF --> +<!--- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT --> +<!--- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS --> +<!--- BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR --> +<!--- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF --> +<!--- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR --> +<!--- BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, --> +<!--- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE --> +<!--- OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN --> +<!--- IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --> +<sound_trigger_platform_info> + <param version="0x0105" /> <!-- this must be the first param --> +<!--- Version History: --> +<!--- 0x0101: Legacy version. --> +<!--- 0x0102: Includes acdb_ids param with the gcs_usecase tag. This matches --> +<!--- the gcs_usecase with the acdb device that uses it. --> +<!--- 0x0103: app_type and in_channels added to <lsm usecase> and out_channels --> +<!--- added to <adm_config> --> +<!--- 0x0104: instance id support for both WDSP<CPE> and ADSP lsm usecases --> +<!--- 0x0105: Select <lsm_usecase> based on capture device --> + + <common_config> + <param max_ape_sessions="8" /> + <param enable_failure_detection="false" /> + <param support_device_switch="false" /> + <param transit_to_non_lpi_on_battery_charging="false" /> + <param concurrent_capture="true" /> + <param transit_to_adsp_on_playback="true" /> + <!-- Below backend params must match with port used in mixer path file --> + <!-- param used to configure backend sample rate, format and channels --> + <param backend_port_name="PRI_TDM_TX_0" /> + <!-- Param used to match and obtain device backend index --> + <param backend_dai_name="PRI_TDM_TX_0" /> + </common_config> + <acdb_ids> + <param DEVICE_HANDSET_MIC_APE="100" /> + <param DEVICE_HANDSET_MIC_PP_APE="135" /> + <param DEVICE_HANDSET_DMIC_APE="149" /> + <param DEVICE_HANDSET_DMIC_LPI_APE="179" /> + <param DEVICE_HANDSET_TMIC_APE="157" /> + <param DEVICE_HANDSET_TMIC_LPI_APE="180" /> + <param DEVICE_HANDSET_QMIC_APE="137" /> + <param DEVICE_HANDSET_QMIC_LPI_APE="181" /> + <param DEVICE_HEADSET_MIC_APE="141" /> + <param DEVICE_HEADSET_MIC_APE_LPI="182" /> + </acdb_ids> + + <!-- Multiple sound_model_config tags can be listed, each with unique --> + <!-- vendor_uuid. The below tag represents QTI SVA engine sound model --> + <!-- configuration. ISV must use their own unique vendor_uuid. --> + + <!-- QTI SVA --> + <sound_model_config> + <param vendor_uuid="68ab2d40-e860-11e3-95ef-0002a5d5c51b" /> + <param execution_type="ADSP" /> + <param library="libsmwrapper.so" /> + <param max_ape_phrases="20" /> + <param max_ape_users="10" /> + <!-- Profile specific data which the algorithm can support --> + <param sample_rate="16000" /> + <param bit_width="16" /> + <param out_channels="1"/> <!-- Module output channels --> + + <arm_ss_usecase> + <!-- Options are "KEYWORD_DETECTION", "USER_VERIFICATION", "CUSTOM_DETECTION" --> + <param sm_detection_type= "KEYWORD_DETECTION" /> + <param sm_id="0x2" /> + <param module_lib="libcapiv2svacnn.so"/> + <param sample_rate="16000"/> + <param bit_wdith="16"/> + <param channel_count="1"/> + </arm_ss_usecase> + <arm_ss_usecase> + <param sm_detection_type= "USER_VERIFICATION" /> + <param sm_id="0x4" /> + <param module_lib="libcapiv2vop.so"/> + <param sample_rate="16000"/> + <param bit_wdith="16"/> + <param channel_count="1"/> + </arm_ss_usecase> + <!-- Module and param ids with which the algorithm is integrated + in non-graphite firmware (note these must come after gcs params) + Extends flexibility to have different ids based on execution type. + valid execution_type values: "WDSP" "ADSP" --> + <lsm_usecase> + <param capture_device="HANDSET" /> + <!-- adm_cfg_profile should match with the one defined under adm_config --> + <!-- Set it to NONE if LSM directly connects to AFE --> + <param adm_cfg_profile="FFECNS" /> + <!-- fluence_type: "FLUENCE_MIC", "FLUENCE_DMIC", "FLUENCE_TMIC" --> + <!-- "FLUENCE_QMIC". Param value is valid when adm_cfg_profile --> + <!-- is FFECNS --> + <param fluence_type="FLUENCE_TMIC" /> + <param execution_mode="ADSP" /> + <param app_type="2" /> <!-- app type used in ACDB --> + <param in_channels="5"/> <!-- Module input channels --> + <param in_channels_lpi="3"/> + <param load_sound_model_ids="0x00012C1C, 0x0, 0x00012C14" /> + <param unload_sound_model_ids="0x00012C1C, 0x0, 0x00012C15" /> + <param confidence_levels_ids="0x00012C1C, 0x0, 0x00012C07" /> + <param operation_mode_ids="0x00012C1C, 0x0, 0x00012C02" /> + <param polling_enable_ids="0x00012C1C, 0x0, 0x00012C1B" /> + <param custom_config_ids="0x00012C1C, 0x0, 0x00012C20" /> + <param det_event_type_ids="0x00012C1C, 0x0, 0x00012C2C" /> + </lsm_usecase> + <lsm_usecase> + <param capture_device="HEADSET" /> + <param adm_cfg_profile="FFECNS" /> + <param fluence_type="FLUENCE_MIC" /> + <param execution_mode="ADSP" /> + <param app_type="2" /> <!-- app type used in ACDB --> + <param in_channels="1"/> <!-- Module input channels --> + <param load_sound_model_ids="0x00012C1C, 0x0, 0x00012C14" /> + <param unload_sound_model_ids="0x00012C1C, 0x0, 0x00012C15" /> + <param confidence_levels_ids="0x00012C1C, 0x0, 0x00012C07" /> + <param operation_mode_ids="0x00012C1C, 0x0, 0x00012C02" /> + <param polling_enable_ids="0x00012C1C, 0x0, 0x00012C1B" /> + <param custom_config_ids="0x00012C1C, 0x0, 0x00012C20" /> + <param det_event_type_ids="0x00012C1C, 0x0, 0x00012C2C" /> + </lsm_usecase> + + <!-- format: "ADPCM_packet" or "PCM_packet" !--> + <!-- transfer_mode: "FTRT" or "RT" --> + <!-- kw_duration is in milli seconds. It is valid only for FTRT + transfer mode --> + <param capture_keyword="PCM_packet, RT, 2000" /> + <param client_capture_read_delay="2000" /> + </sound_model_config> + + <!-- QTI Music Detection !--> + <sound_model_config> + <param vendor_uuid="876c1b46-9d4d-40cc-a4fd-4d5ec7a80e47" /> + <param execution_type="ADSP" /> + <param library="libsmwrapper.so" /> + <param max_ape_phrases="1" /> + <param max_ape_users="1" /> + <!-- Profile specific data which the algorithm can support --> + <param sample_rate="16000" /> + <param bit_width="16" /> + <param out_channels="1"/> <!-- Module output channels --> + <!-- Module and param ids with which the algorithm is integrated + in non-graphite firmware (note these must come after gcs params) + Extends flexibility to have different ids based on execution type. + valid execution_type values: only "ADSP" --> + <lsm_usecase> + <param capture_device="HANDSET" /> + <!-- adm_cfg_profile should match with the one defined under adm_config --> + <!-- Set it to NONE if LSM directly connects to AFE --> + <param adm_cfg_profile="NONE" /> + <!-- fluence_type: "FLUENCE_MIC", "FLUENCE_DMIC", "FLUENCE_TMIC" --> + <!-- "FLUENCE_QMIC". Param value is valid when adm_cfg_profile --> + <!-- is FFECNS --> + <param fluence_type="NONE" /> + <param execution_mode="ADSP" /> + <param app_type="4" /> <!-- app type for MD used in ACDB --> + <param in_channels="1"/> <!-- Module input channels --> + <param load_sound_model_ids="0x00012C22, 0x0, 0x00012C14" /> + <param unload_sound_model_ids="0x00012C22, 0x0, 0x00012C15" /> + <param confidence_levels_ids="0x00012C22, 0x0, 0x00012C07" /> + <param det_event_type_ids="0x00012C22, 0x0, 0x00012C2C" /> + <param custom_config_ids="0x00012C22, 0x0, 0x00012C30" /> + </lsm_usecase> + <lsm_usecase> + <param capture_device="HEADSET" /> + <param adm_cfg_profile="NONE" /> + <param fluence_type="NONE" /> + <param execution_mode="ADSP" /> + <param app_type="4" /> <!-- app type for MD used in ACDB --> + <param in_channels="1"/> <!-- Module input channels --> + <param load_sound_model_ids="0x00012C22, 0x0, 0x00012C14" /> + <param unload_sound_model_ids="0x00012C22, 0x0, 0x00012C15" /> + <param confidence_levels_ids="0x00012C22, 0x0, 0x00012C07" /> + <param det_event_type_ids="0x00012C22, 0x0, 0x00012C2C" /> + <param custom_config_ids="0x00012C22, 0x0, 0x00012C30" /> + </lsm_usecase> + + <!-- format: "ADPCM_packet" or "PCM_packet" !--> + <!-- transfer_mode: "FTRT" or "RT" --> + <!-- kw_duration is in milli seconds. It is valid only for FTRT + transfer mode --> + <param capture_keyword="PCM_packet, FTRT, 1500" /> + <param client_capture_read_delay="2000" /> + </sound_model_config> + + <!-- Google Hotword --> + <sound_model_config> + <param vendor_uuid="7038ddc8-30f2-11e6-b0ac-40a8f03d3f15" /> + <param execution_type="ADSP" /> + <param library="none" /> + <param max_ape_phrases="1" /> + <param max_ape_users="1" /> + <!-- Profile specific data which the algorithm can support --> + <param sample_rate="16000" /> + <param bit_width="16" /> + <param out_channels="1"/> <!-- Module output channels --> + <lsm_usecase> + <param capture_device="HANDSET" /> + <!-- adm_cfg_profile should match with the one defined under adm_config --> + <!-- Set it to NONE if LSM directly connects to AFE --> + <param adm_cfg_profile="FLUENCE" /> + <!-- fluence_type: "FLUENCE_MIC", "FLUENCE_DMIC", "FLUENCE_TMIC" --> + <!-- "FLUENCE_QMIC". Param value is valid when adm_cfg_profile --> + <!-- is FFECNS --> + <param fluence_type="FLUENCE_DMIC" /> + <param execution_mode="ADSP" /> + <param app_type="3" /> <!-- app type used in ACDB --> + <param in_channels="2"/> <!-- Module input channels --> + <param load_sound_model_ids="0x18000001, 0x0, 0x00012C14" /> + <param unload_sound_model_ids="0x18000001, 0x0, 0x00012C15" /> + <param confidence_levels_ids="0x18000001, 0x0, 0x00012C07" /> + <param operation_mode_ids="0x18000001, 0x0, 0x00012C02" /> + <param polling_enable_ids="0x18000001, 0x0, 0x00012C1B" /> + <param custom_config_ids="0x18000001, 0x0, 0x00012C20" /> + </lsm_usecase> + <lsm_usecase> + <param capture_device="HEADSET" /> + <param adm_cfg_profile="NONE" /> + <param fluence_type="NONE" /> + <param execution_mode="ADSP" /> + <param app_type="3" /> <!-- app type used in ACDB --> + <param in_channels="1"/> <!-- Module input channels --> + <param load_sound_model_ids="0x18000001, 0x0, 0x00012C14" /> + <param unload_sound_model_ids="0x18000001, 0x0, 0x00012C15" /> + <param confidence_levels_ids="0x18000001, 0x0, 0x00012C07" /> + <param operation_mode_ids="0x18000001, 0x0, 0x00012C02" /> + <param polling_enable_ids="0x18000001, 0x0, 0x00012C1B" /> + <param custom_config_ids="0x18000001, 0x0, 0x00012C20" /> + </lsm_usecase> + + <!-- format: "ADPCM_packet" or "PCM_packet" !--> + <!-- transfer_mode: "FTRT" or "RT" --> + <!-- kw_duration is in milli seconds. It is valid only for FTRT + transfer mode --> + <param capture_keyword="PCM_raw, FTRT, 2000" /> + <param client_capture_read_delay="2000" /> + </sound_model_config> + + <!-- Google Music Detection --> + <sound_model_config> + <param vendor_uuid="9f6ad62a-1f0b-11e7-87c5-40a8f03d3f15" /> + <param execution_type="ADSP" /> + <param library="none" /> + <param max_ape_phrases="1" /> + <param max_ape_users="1" /> + <!-- Profile specific data which the algorithm can support --> + <param sample_rate="16000" /> + <param bit_width="16" /> + <param out_channels="1"/> <!-- Module output channels --> + <lsm_usecase> + <param capture_device="HANDSET" /> + <!-- adm_cfg_profile should match with the one defined under adm_config --> + <!-- Set it to NONE if LSM directly connects to AFE --> + <param adm_cfg_profile="FLUENCE" /> + <!-- fluence_type: "FLUENCE_MIC", "FLUENCE_DMIC", "FLUENCE_TMIC" --> + <!-- "FLUENCE_QMIC". Param value is valid when adm_cfg_profile --> + <!-- is FFECNS --> + <param fluence_type="FLUENCE_DMIC" /> + <param execution_mode="ADSP" /> + <param app_type="4" /> <!-- app type used in ACDB --> + <param in_channels="2"/> <!-- Module input channels --> + <param load_sound_model_ids="0x18100000, 0x0, 0x00012C14" /> + <param unload_sound_model_ids="0x18100000, 0x0, 0x00012C15" /> + <param confidence_levels_ids="0x18100000, 0x0, 0x00012C07" /> + <param operation_mode_ids="0x18100000, 0x0, 0x00012C02" /> + <param polling_enable_ids="0x18100000, 0x0, 0x00012C1B" /> + <param custom_config_ids="0x18100000, 0x0, 0x00012C20" /> + </lsm_usecase> + <lsm_usecase> + <param capture_device="HEADSET" /> + <param adm_cfg_profile="NONE" /> + <param fluence_type="NONE" /> + <param execution_mode="ADSP" /> + <param app_type="3" /> <!-- app type used in ACDB --> + <param in_channels="2"/> <!-- Module input channels --> + <param load_sound_model_ids="0x18100000, 0x0, 0x00012C14" /> + <param unload_sound_model_ids="0x18100000, 0x0, 0x00012C15" /> + <param confidence_levels_ids="0x18100000, 0x0, 0x00012C07" /> + <param operation_mode_ids="0x18100000, 0x0, 0x00012C02" /> + <param polling_enable_ids="0x18100000, 0x0, 0x00012C1B" /> + <param custom_config_ids="0x18100000, 0x0, 0x00012C20" /> + </lsm_usecase> + + <!-- format: "ADPCM_packet" or "PCM_packet" !--> + <!-- transfer_mode: "FTRT" or "RT" --> + <!-- kw_duration is in milli seconds. It is valid only for FTRT + transfer mode --> + <param capture_keyword="PCM_raw, FTRT, 5000" /> + <param client_capture_read_delay="2000" /> + </sound_model_config> + + <!-- Multiple adm_config tags can be listed, each with unique profile name. --> + <!-- app_type to match corresponding value from ACDB --> + <adm_config> + <param adm_cfg_profile="FFECNS" /> + <param app_type="69947" /> + <param sample_rate="16000" /> + <param bit_width="16" /> + <param out_channels="5"/> + </adm_config> + + <adm_config> + <param adm_cfg_profile="FLUENCE" /> + <param app_type="69944" /> + <param sample_rate="16000" /> + <param bit_width="16" /> + </adm_config> +</sound_trigger_platform_info> diff --git a/bluetooth_hearing_aid_audio_policy_configuration.xml b/bluetooth_hearing_aid_audio_policy_configuration.xml new file mode 100644 index 00000000..e275d6a6 --- /dev/null +++ b/bluetooth_hearing_aid_audio_policy_configuration.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Bluetooth Audio HAL Audio Policy Configuration file --> +<module name="bluetooth" halVersion="2.0"> + <mixPorts> + <!-- Hearing AIDs Audio Ports --> + <mixPort name="hearing aid output" role="source"> + <profile name="" format="AUDIO_FORMAT_PCM_16_BIT" + samplingRates="24000 16000" + channelMasks="AUDIO_CHANNEL_OUT_STEREO"/> + </mixPort> + </mixPorts> + <devicePorts> + <!-- Hearing AIDs Audio Ports --> + <devicePort tagName="BT Hearing Aid Out" type="AUDIO_DEVICE_OUT_HEARING_AID" role="sink"/> + </devicePorts> + <routes> + <route type="mix" sink="BT Hearing Aid Out" + sources="hearing aid output"/> + </routes> +</module> diff --git a/bootctrl/Android.bp b/bootctrl/Android.bp new file mode 100644 index 00000000..f57586a9 --- /dev/null +++ b/bootctrl/Android.bp @@ -0,0 +1,25 @@ +// +// 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 { + default_applicable_licenses: ["Android-Apache-2.0"], +} + +cc_library { + name: "bootctrl.lito", + defaults: ["bootctrl_hal_defaults"], + static_libs: ["libgptutils.redbull"], +} diff --git a/compatibility_matrix.xml b/compatibility_matrix.xml new file mode 100644 index 00000000..8b06eef7 --- /dev/null +++ b/compatibility_matrix.xml @@ -0,0 +1,58 @@ +<compatibility-matrix version="1.0" type="device"> + <hal format="hidl" optional="false"> + <name>android.frameworks.schedulerservice</name> + <version>1.0</version> + <interface> + <name>ISchedulingPolicyService</name> + <instance>default</instance> + </interface> + </hal> + <hal format="hidl" optional="false"> + <name>android.frameworks.sensorservice</name> + <version>1.0</version> + <interface> + <name>ISensorManager</name> + <instance>default</instance> + </interface> + </hal> + <hal format="hidl" optional="false"> + <name>android.hidl.allocator</name> + <version>1.0</version> + <interface> + <name>IAllocator</name> + <instance>ashmem</instance> + </interface> + </hal> + <hal format="hidl" optional="false"> + <name>android.hidl.manager</name> + <version>1.0</version> + <interface> + <name>IServiceManager</name> + <instance>default</instance> + </interface> + </hal> + <hal format="hidl" optional="false"> + <name>android.hidl.memory</name> + <version>1.0</version> + <interface> + <name>IMapper</name> + <instance>ashmem</instance> + </interface> + </hal> + <hal format="hidl" optional="false"> + <name>android.hidl.token</name> + <version>1.0</version> + <interface> + <name>ITokenManager</name> + <instance>default</instance> + </interface> + </hal> + <hal format="hidl" optional="false"> + <name>android.system.wifi.keystore</name> + <version>1.0</version> + <interface> + <name>IKeystore</name> + <instance>default</instance> + </interface> + </hal> +</compatibility-matrix> diff --git a/component-overrides.xml b/component-overrides.xml new file mode 100644 index 00000000..c682a7b9 --- /dev/null +++ b/component-overrides.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- 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. +--> +<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> diff --git a/default-permissions.xml b/default-permissions.xml new file mode 100644 index 00000000..e792f5cd --- /dev/null +++ b/default-permissions.xml @@ -0,0 +1,162 @@ +<?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.intelligence.sense"> + <!-- Record Audio --> + <permission name="android.permission.RECORD_AUDIO" fixed="false"/> + </exception> + + <exception + package="com.google.android.apps.restore" + sha256-cert-digest="56:BE:13:2B:78:06:56:FE:24:44:CD:34:32:6E:B5:D7:AA:C9:1D:20:96:AB:F0:FE:67:3A:99:27:06:22:EC:87"> + <!-- 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.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"/> + <!-- Battery Widget --> + <permission name="android.permission.BLUETOOTH_CONNECT" fixed="false"/> + </exception> + + <exception package="com.google.android.apps.camera.services"> + <!-- Camera --> + <permission name="android.permission.CAMERA" 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_COARSE_LOCATION" fixed="true"/> + <permission name="android.permission.ACCESS_BACKGROUND_LOCATION" fixed="true"/> + </exception> + + <exception package="com.google.android.apps.scone"> + <!-- Used to call ActivityTransition API for Smart OOS & Smart PNO --> + <permission name="android.permission.ACTIVITY_RECOGNITION" fixed="false"/> + <!-- Notifications --> + <permission name="android.permission.POST_NOTIFICATIONS" fixed="false"/> + </exception> + + <exception package="com.google.android.wfcactivation"> + <!-- SMS --> + <permission name="android.permission.RECEIVE_WAP_PUSH" fixed="false"/> + </exception> + <exception + package="com.google.vr.apps.ornament" + sha256-cert-digest="4A:9E:3F:3B:C8:D6:0C:E4:D3:CB:E5:A9:C6:6E:EC:11:EF:D0:1C:5F:E9:C7:8D:8C:92:3B:9D:42:48:23:00:13"> + <!-- 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.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> + <exception + package="com.google.android.adservices"> + <!-- Notifications --> + <permission name="android.permission.POST_NOTIFICATIONS" fixed="false"/> + </exception> + <exception + package="com.google.android.apps.mediashell"> + <!-- Notifications --> + <permission name="android.permission.POST_NOTIFICATIONS" fixed="false"/> + </exception> + <exception + package="com.google.android.apps.pixelmigrate"> + <!-- Notifications --> + <permission name="android.permission.POST_NOTIFICATIONS" fixed="false"/> + </exception> + <exception + package="com.google.android.apps.work.oobconfig"> + <!-- Notifications --> + <permission name="android.permission.POST_NOTIFICATIONS" fixed="true"/> + </exception> + <exception + package="com.google.android.apps.turbo"> + <!-- Notifications --> + <permission name="android.permission.POST_NOTIFICATIONS" fixed="false"/> + </exception> + <exception + package="com.google.android.euicc"> + <!-- Notifications --> + <permission name="android.permission.POST_NOTIFICATIONS" fixed="false"/> + </exception> +</exceptions> diff --git a/device-common.mk b/device-common.mk new file mode 100644 index 00000000..e46c4cbd --- /dev/null +++ b/device-common.mk @@ -0,0 +1,957 @@ +# +# 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 hardware platform +PRODUCT_PLATFORM := sm7250 + +LOCAL_PATH := device/google/redbull + +PRODUCT_VENDOR_MOVE_ENABLED := true +TARGET_BOARD_PLATFORM := lito + +PRODUCT_SOONG_NAMESPACES += \ + hardware/google/interfaces \ + hardware/google/pixel \ + device/google/redbull \ + hardware/qcom/sm7250 \ + system/chre/host/hal_generic \ + hardware/qcom/sm7250/display \ + vendor/google/camera \ + vendor/qcom/sm7250 \ + vendor/google/interfaces \ + vendor/google/tools/power-anomaly-qcril \ + vendor/google_devices/common/proprietary/confirmatioui_hal \ + vendor/google_nos/host/android \ + vendor/google_nos/test/system-test-harness + +# Include GPS soong namespace +PRODUCT_SOONG_NAMESPACES += \ + hardware/qcom/sm7250/gps \ + vendor/qcom/sm7250/proprietary/gps \ + vendor/qcom/sm7250/codeaurora/location + +# Include sensors soong namespace +PRODUCT_SOONG_NAMESPACES += \ + vendor/qcom/sensors \ + vendor/google/tools/sensors + +# Single vendor RIL/Telephony/data with SM7250 + PRODUCT_SOONG_NAMESPACES += \ + vendor/qcom/sm7250/codeaurora/commonsys/telephony/ims/ims-ext-common \ + vendor/qcom/sm7250/codeaurora/dataservices/rmnetctl \ + vendor/qcom/sm7250/proprietary/commonsys/qcrilOemHook \ + vendor/qcom/sm7250/proprietary/commonsys/telephony-apps/ims \ + vendor/qcom/sm7250/proprietary/commonsys/telephony-apps/QtiTelephonyService \ + vendor/qcom/sm7250/proprietary/commonsys/telephony-apps/xdivert \ + vendor/qcom/sm7250/proprietary/qcril-data-hal \ + vendor/qcom/sm7250/proprietary/qcril-hal \ + vendor/qcom/sm7250/proprietary/data + +PRODUCT_PROPERTY_OVERRIDES += \ + keyguard.no_require_sim=true + +# enable cal by default on accel sensor +PRODUCT_PRODUCT_PROPERTIES += \ + persist.vendor.debug.sensors.accel_cal=1 + +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 + +PRODUCT_COPY_FILES += \ + device/google/redbull/default-permissions.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/default-permissions/default-permissions.xml \ + device/google/redbull/component-overrides.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sysconfig/component-overrides.xml \ + frameworks/native/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml \ + frameworks/native/data/etc/android.software.verified_boot.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.verified_boot.xml \ + frameworks/native/data/etc/android.software.ipsec_tunnel_migration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.ipsec_tunnel_migration.xml + +# Enforce privapp-permissions whitelist +PRODUCT_PROPERTY_OVERRIDES += \ + ro.control_privapp_permissions?=enforce + +PRODUCT_PACKAGES += \ + messaging \ + +TARGET_PRODUCT_PROP := $(LOCAL_PATH)/product.prop + +$(call inherit-product, $(LOCAL_PATH)/utils.mk) + +# Installs gsi keys into ramdisk, to boot a developer GSI with verified boot. +$(call inherit-product, $(SRC_TARGET_DIR)/product/developer_gsi_keys.mk) + +PRODUCT_CHARACTERISTICS := nosdcard +PRODUCT_SHIPPING_API_LEVEL := 30 +BOARD_SHIPPING_API_LEVEL := 30 + +DEVICE_PACKAGE_OVERLAYS += $(LOCAL_PATH)/overlay + +PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/fstab.hardware:$(TARGET_COPY_OUT_VENDOR_RAMDISK)/first_stage_ramdisk/fstab.$(PRODUCT_PLATFORM) \ + $(LOCAL_PATH)/fstab.hardware:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.$(PRODUCT_PLATFORM) \ + $(LOCAL_PATH)/fstab.persist:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.persist \ + $(LOCAL_PATH)/init.hardware.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.$(PRODUCT_PLATFORM).rc \ + $(LOCAL_PATH)/init.modem.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.modem.sh \ + $(LOCAL_PATH)/init.power.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.$(PRODUCT_PLATFORM).power.rc \ + $(LOCAL_PATH)/init.radio.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.radio.sh \ + $(LOCAL_PATH)/init.hardware.usb.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.$(PRODUCT_PLATFORM).usb.rc \ + $(LOCAL_PATH)/init.insmod.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.insmod.sh \ + $(LOCAL_PATH)/init.sensors.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.sensors.sh \ + $(LOCAL_PATH)/ueventd.rc:$(TARGET_COPY_OUT_VENDOR)/ueventd.rc \ + $(LOCAL_PATH)/init.ramoops.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.ramoops.sh + + +MSM_VIDC_TARGET_LIST := lito # Get the color format from kernel headers +MASTER_SIDE_CP_TARGET_LIST := lito # ION specific settings + +ifneq (,$(filter eng, $(TARGET_BUILD_VARIANT))) + PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/init.hardware.mpssrfs.rc.userdebug:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.$(PRODUCT_PLATFORM).mpssrfs.rc + PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/init.hardware.diag.rc.userdebug:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.$(PRODUCT_PLATFORM).diag.rc + PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/init.hardware.ipa.rc.userdebug:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.$(PRODUCT_PLATFORM).ipa.rc +else + PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/init.hardware.mpssrfs.rc.user:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.$(PRODUCT_PLATFORM).mpssrfs.rc + PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/init.hardware.diag.rc.user:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.$(PRODUCT_PLATFORM).diag.rc +endif + +# A/B support +PRODUCT_PACKAGES += \ + otapreopt_script \ + cppreopts.sh \ + update_engine \ + update_verifier + +PRODUCT_PACKAGES += \ + linker.vendor_ramdisk \ + tune2fs.vendor_ramdisk \ + resize2fs.vendor_ramdisk + +# Use Sdcardfs +PRODUCT_PRODUCT_PROPERTIES += \ + ro.sys.sdcardfs=1 + +# Use FUSE passthrough +PRODUCT_PRODUCT_PROPERTIES += \ + persist.sys.fuse.passthrough.enable=true + +PRODUCT_PACKAGES += \ + bootctrl.lito \ + bootctrl.lito.recovery + +PRODUCT_PROPERTY_OVERRIDES += \ + ro.cp_system_other_odex=1 + +AB_OTA_POSTINSTALL_CONFIG += \ + RUN_POSTINSTALL_system=true \ + POSTINSTALL_PATH_system=system/bin/otapreopt_script \ + FILESYSTEM_TYPE_system=ext4 \ + POSTINSTALL_OPTIONAL_system=true + +PRODUCT_PACKAGES += \ + update_engine_sideload + +PRODUCT_PACKAGES_DEBUG += \ + f2fs_io \ + check_f2fs + +PRODUCT_PROPERTY_OVERRIDES += \ + ro.crypto.volume.filenames_mode=aes-256-cts + +AB_OTA_POSTINSTALL_CONFIG += \ + RUN_POSTINSTALL_vendor=true \ + POSTINSTALL_PATH_vendor=bin/checkpoint_gc \ + FILESYSTEM_TYPE_vendor=ext4 \ + POSTINSTALL_OPTIONAL_vendor=true + +# Userdata Checkpointing OTA GC +PRODUCT_PACKAGES += \ + checkpoint_gc + +# Context hub HAL +PRODUCT_PACKAGES += \ + android.hardware.contexthub-service.generic + +# CHRE tools +ifneq (,$(filter eng, $(TARGET_BUILD_VARIANT))) +PRODUCT_PACKAGES += \ + chre_power_test_client \ + chre_test_client +endif + +# Enable project quotas and casefolding for emulated storage without sdcardfs +$(call inherit-product, $(SRC_TARGET_DIR)/product/emulated_storage.mk) + +# The following modules are included in debuggable builds only. +PRODUCT_PACKAGES_DEBUG += \ + bootctl \ + r.vendor \ + update_engine_client + +PRODUCT_COPY_FILES += \ + frameworks/native/data/etc/android.hardware.camera.concurrent.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.concurrent.xml \ + frameworks/native/data/etc/android.hardware.camera.flash-autofocus.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.flash-autofocus.xml \ + frameworks/native/data/etc/android.hardware.camera.front.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.front.xml \ + frameworks/native/data/etc/android.hardware.camera.full.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.full.xml\ + frameworks/native/data/etc/android.hardware.camera.raw.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.raw.xml\ + frameworks/native/data/etc/android.hardware.bluetooth.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth.xml \ + frameworks/native/data/etc/android.hardware.bluetooth_le.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth_le.xml \ + frameworks/native/data/etc/android.hardware.context_hub.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.context_hub.xml \ + frameworks/native/data/etc/android.hardware.location.gps.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.location.gps.xml \ + frameworks/native/data/etc/android.hardware.reboot_escrow.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.reboot_escrow.xml \ + frameworks/native/data/etc/android.hardware.telephony.gsm.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.telephony.gsm.xml \ + frameworks/native/data/etc/android.hardware.telephony.cdma.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.telephony.cdma.xml \ + frameworks/native/data/etc/android.hardware.telephony.ims.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.telephony.ims.xml \ + frameworks/native/data/etc/android.hardware.touchscreen.multitouch.jazzhand.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml \ + frameworks/native/data/etc/android.hardware.wifi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.xml \ + frameworks/native/data/etc/android.hardware.wifi.direct.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.direct.xml \ + frameworks/native/data/etc/android.hardware.wifi.aware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.aware.xml \ + frameworks/native/data/etc/android.hardware.wifi.passpoint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.passpoint.xml \ + frameworks/native/data/etc/android.hardware.wifi.rtt.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.rtt.xml \ + frameworks/native/data/etc/android.software.sip.voip.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.sip.voip.xml \ + frameworks/native/data/etc/android.hardware.usb.accessory.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.accessory.xml \ + frameworks/native/data/etc/android.hardware.usb.host.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.host.xml \ + frameworks/native/data/etc/android.hardware.opengles.aep.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.opengles.aep.xml \ + frameworks/native/data/etc/android.hardware.nfc.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.xml \ + frameworks/native/data/etc/android.hardware.nfc.hce.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.hce.xml \ + frameworks/native/data/etc/android.hardware.nfc.hcef.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.hcef.xml \ + frameworks/native/data/etc/com.nxp.mifare.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/com.nxp.mifare.xml \ + frameworks/native/data/etc/android.hardware.vulkan.level-1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.level.xml \ + frameworks/native/data/etc/android.hardware.vulkan.compute-0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.compute.xml \ + frameworks/native/data/etc/android.hardware.vulkan.version-1_1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.version.xml \ + frameworks/native/data/etc/android.software.vulkan.deqp.level-2020-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.vulkan.deqp.level.xml \ + frameworks/native/data/etc/android.software.opengles.deqp.level-2020-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.opengles.deqp.level.xml \ + frameworks/native/data/etc/android.hardware.telephony.carrierlock.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.telephony.carrierlock.xml \ + frameworks/native/data/etc/android.hardware.strongbox_keystore.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.strongbox_keystore.xml \ + frameworks/native/data/etc/android.hardware.nfc.uicc.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.uicc.xml \ + frameworks/native/data/etc/android.hardware.nfc.ese.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.ese.xml \ + frameworks/native/data/etc/android.hardware.se.omapi.ese.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.se.omapi.ese.xml \ + frameworks/native/data/etc/android.hardware.se.omapi.uicc.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.se.omapi.uicc.xml + +# Audio fluence, ns, aec property, voice and media volume steps +PRODUCT_PROPERTY_OVERRIDES += \ + ro.vendor.audio.sdk.fluencetype=fluencepro \ + persist.vendor.audio.fluence.voicecall=true \ + persist.vendor.audio.fluence.speaker=true \ + persist.vendor.audio.fluence.voicecomm=true \ + persist.vendor.audio.fluence.voicerec=false \ + ro.config.vc_call_vol_steps=7 \ + ro.config.media_vol_steps=25 \ + +# Audio Features +PRODUCT_PROPERTY_OVERRIDES += \ + vendor.audio.feature.external_dsp.enable=true \ + vendor.audio.feature.external_speaker.enable=true \ + vendor.audio.feature.concurrent_capture.enable=false \ + vendor.audio.feature.a2dp_offload.enable=true \ + vendor.audio.feature.hfp.enable=true \ + vendor.audio.feature.hwdep_cal.enable=true \ + vendor.audio.feature.incall_music.enable=true \ + vendor.audio.feature.maxx_audio.enable=true \ + vendor.audio.feature.spkr_prot.enable=true \ + vendor.audio.feature.usb_offload.enable=true \ + vendor.audio.feature.audiozoom.enable=true \ + vendor.audio.feature.snd_mon.enable=true \ + vendor.audio.feature.multi_voice_session.enable=true \ + vendor.audio.capture.enforce_legacy_copp_sr=true \ + vendor.audio.offload.buffer.size.kb=256 \ + persist.vendor.audio_hal.dsp_bit_width_enforce_mode=24 \ + vendor.audio.offload.gapless.enabled=true \ + +# MaxxAudio effect and add rotation monitor +PRODUCT_PROPERTY_OVERRIDES += \ + ro.audio.monitorRotation=true + +# graphics +PRODUCT_PROPERTY_OVERRIDES += \ + ro.opengles.version=196610 + +PRODUCT_PROPERTY_OVERRIDES += \ + ro.vendor.display.paneltype=2 \ + ro.vendor.display.sensortype=1 \ + vendor.display.enable_async_powermode=0 \ + vendor.display.qdcm.mode_combine=1 \ + vendor.display.lbe.supported=1 + +# vndservicemanager has been removed from API30 devices (aosp/1235751) +# but we still need it for display services. +PRODUCT_PACKAGES += \ + vndservicemanager + +# camera google face detection +PRODUCT_PROPERTY_OVERRIDES += \ + persist.camera.googfd.enable=1 + +# camera hal buffer management +PRODUCT_PROPERTY_OVERRIDES += \ + persist.camera.managebuffer.enable=1 + +# camera enable RT thread +PRODUCT_PROPERTY_OVERRIDES += \ + persist.vendor.camera.realtimethread=1 + +# Lets the vendor library that Google Camera HWL is enabled +PRODUCT_PROPERTY_OVERRIDES += \ + persist.camera.google_hwl.enabled=true \ + persist.camera.google_hwl.name=libgooglecamerahwl_impl.so + +# camera common HWL +CAMERA_COMMON_HWL := true + +# OEM Unlock reporting +PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \ + ro.oem_unlock_supported=1 + +PRODUCT_PROPERTY_OVERRIDES += \ + persist.vendor.cne.feature=1 \ + persist.vendor.data.iwlan.enable=true \ + persist.vendor.radio.RATE_ADAPT_ENABLE=1 \ + persist.vendor.radio.ROTATION_ENABLE=1 \ + persist.vendor.radio.VT_ENABLE=1 \ + persist.vendor.radio.VT_HYBRID_ENABLE=1 \ + persist.vendor.radio.apm_sim_not_pwdn=1 \ + persist.vendor.radio.custom_ecc=1 \ + persist.vendor.radio.data_ltd_sys_ind=1 \ + persist.vendor.radio.videopause.mode=1 \ + persist.vendor.radio.mt_sms_ack=30 \ + persist.vendor.radio.multisim_switch_support=true \ + persist.vendor.radio.sib16_support=1 \ + persist.vendor.radio.data_con_rprt=true \ + persist.vendor.radio.relay_oprt_change=1 \ + persist.vendor.radio.no_wait_for_card=1 \ + persist.vendor.radio.sap_silent_pin=1 \ + persist.vendor.radio.manual_nw_rej_ct=1 \ + persist.rcs.supported=1 \ + vendor.rild.libpath=/vendor/lib64/libril-qc-hal-qmi.so \ + ro.hardware.keystore_desede=true \ + persist.vendor.radio.procedure_bytes=SKIP \ + persist.vendor.radio.hidl_dev_service=true \ + +# Enable reboot free DSDS +PRODUCT_PRODUCT_PROPERTIES += \ + persist.radio.reboot_on_modem_change=false + +PRODUCT_PROPERTY_OVERRIDES += \ + telephony.active_modems.max_count=2 + +# Disable snapshot timer +PRODUCT_PROPERTY_OVERRIDES += \ + persist.vendor.radio.snapshot_enabled=0 \ + persist.vendor.radio.snapshot_timer=0 + +# RenderScript HAL +PRODUCT_PACKAGES += \ + android.hardware.renderscript@1.0-impl + +# Light HAL +PRODUCT_PACKAGES += \ + lights.lito + +# Memtrack HAL +PRODUCT_PACKAGES += \ + memtrack.lito \ + android.hardware.memtrack@1.0-impl \ + android.hardware.memtrack@1.0-service + +# Bluetooth SoC +PRODUCT_PROPERTY_OVERRIDES += \ + vendor.qcom.bluetooth.soc=cherokee + +# Property for loading BDA from device tree +PRODUCT_PROPERTY_OVERRIDES += \ + ro.vendor.bt.bdaddr_path=/proc/device-tree/chosen/cdt/cdb2/bt_addr + +# Bluetooth WiPower +PRODUCT_PROPERTY_OVERRIDES += \ + ro.vendor.bluetooth.emb_wp_mode=false \ + ro.vendor.bluetooth.wipower=false + +# Bluetooth ftmdaemon needs libbt-hidlclient.so +PRODUCT_SOONG_NAMESPACES += vendor/qcom/proprietary/bluetooth/hidl_client + +# DRM HAL +PRODUCT_PACKAGES += \ + android.hardware.drm-service.clearkey + +# NFC and Secure Element packages +PRODUCT_PACKAGES += \ + $(RELEASE_PACKAGE_NFC_STACK) \ + Tag \ + SecureElement \ + android.hardware.nfc-service.st \ + android.hardware.secure_element@1.2-service.st + +PRODUCT_COPY_FILES += \ + device/google/redbull/nfc/libnfc-hal-st.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libnfc-hal-st.conf \ + device/google/redbull/nfc/libese-hal-st.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libese-hal-st.conf \ + device/google/redbull/nfc/libnfc-nci.conf:$(TARGET_COPY_OUT_PRODUCT)/etc/libnfc-nci.conf + +PRODUCT_PACKAGES += \ + android.hardware.health@2.1-impl-redbull \ + android.hardware.health@2.1-service + +# Storage health HAL +PRODUCT_PACKAGES += \ + android.hardware.health.storage@1.0-service + +PRODUCT_PACKAGES += \ + libmm-omxcore \ + libOmxCore \ + libstagefrighthw \ + libOmxVdec \ + libOmxVenc \ + libc2dcolorconvert + +PRODUCT_PROPERTY_OVERRIDES += \ + debug.stagefright.omx_default_rank=512 + +# Create input surface on the framework side +PRODUCT_PROPERTY_OVERRIDES += \ + debug.stagefright.c2inputsurface=-1 \ + +# Disable OMX +PRODUCT_PROPERTY_OVERRIDES += \ + vendor.media.omx=0 \ + +# Media Performance Class 11 +PRODUCT_PROPERTY_OVERRIDES += \ + ro.odm.build.media_performance_class=30 + +# Enable ECO service +QC2_HAVE_ECO_SERVICE := true + +PRODUCT_PROPERTY_OVERRIDES += \ + vendor.qc2.venc.avgqp.enable=1 + +# To reach target bitrate in CBR mode for IMS VT Call +PRODUCT_PROPERTY_OVERRIDES += \ + persist.vendor.ims.mm_minqp=1 + +# Google Camera HAL test libraries in debug builds +ifneq (,$(filter eng, $(TARGET_BUILD_VARIANT))) +PRODUCT_PACKAGES_DEBUG += \ + libgoogle_camera_hal_proprietary_tests \ + libgoogle_camera_hal_tests +endif + +PRODUCT_PACKAGES += \ + fs_config_dirs \ + fs_config_files + +# Boot control HAL +PRODUCT_PACKAGES += \ + android.hardware.boot@1.2-impl-pixel-legacy \ + android.hardware.boot@1.2-impl-pixel-legacy.recovery \ + android.hardware.boot@1.2-service \ + +#GNSS HAL +PRODUCT_PACKAGES += \ + libgps.utils \ + libgnss \ + libloc_core \ + liblocation_api \ + libbatching \ + libgeofencing \ + android.hardware.gnss@2.1-impl-qti \ + android.hardware.gnss@2.1-service-qti + +ENABLE_VENDOR_RIL_SERVICE := true + +USE_QCRIL_OEMHOOK := true + +HOSTAPD := hostapd +ifneq (,$(filter eng, $(TARGET_BUILD_VARIANT))) +HOSTAPD += hostapd_cli +endif +PRODUCT_PACKAGES += $(HOSTAPD) + +WPA := wpa_supplicant.conf +WPA += wpa_supplicant +PRODUCT_PACKAGES += $(WPA) + +ifneq (,$(filter eng, $(TARGET_BUILD_VARIANT))) +PRODUCT_PACKAGES += wpa_cli +endif + +# Wifi +PRODUCT_PACKAGES += \ + android.hardware.wifi-service \ + wificond \ + libwpa_client \ + WifiOverlay + +# Connectivity +PRODUCT_PACKAGES += \ + ConnectivityOverlay + +# WLAN driver configuration files +PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/wpa_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/wpa_supplicant_overlay.conf \ + $(LOCAL_PATH)/p2p_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/p2p_supplicant_overlay.conf \ + $(LOCAL_PATH)/wifi_concurrency_cfg.txt:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/wifi_concurrency_cfg.txt \ + $(LOCAL_PATH)/WCNSS_qcom_cfg.ini:$(TARGET_COPY_OUT_VENDOR)/firmware/wlan/qca_cld/WCNSS_qcom_cfg.ini \ + +PRODUCT_PACKAGES += \ + audio.usb.default \ + audio.r_submix.default \ + libaudio-resampler \ + audio.bluetooth.default + +PRODUCT_PACKAGES += \ + android.hardware.audio@7.0-impl:32 \ + android.hardware.audio.effect@7.0-impl:32 \ + android.hardware.soundtrigger@2.3-impl \ + android.hardware.bluetooth.audio@2.0-impl \ + android.hardware.audio.service + +ifneq (,$(filter eng, $(TARGET_BUILD_VARIANT))) +PRODUCT_PACKAGES += \ + tinyplay \ + tinycap \ + tinymix \ + tinypcminfo \ + cplay +endif + +# Audio hal xmls +PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/audio/sound_trigger_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_platform_info.xml + +# Cirrus calibration xml +PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/audio/crus_sp_cal_mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/crus_sp_cal_mixer_paths.xml + +# Audio Policy tables +PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/bluetooth_hearing_aid_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_hearing_aid_audio_policy_configuration.xml \ + $(LOCAL_PATH)/audio/audio_configs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_configs.xml \ + $(LOCAL_PATH)/audio/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml \ + $(LOCAL_PATH)/audio/audio_io_policy.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_io_policy.conf + +# Audio ACDB data + +# Audio ACDB workspace files for QACT + +# Audio speaker tunning config data + +# Audio audiozoom config data + +# RT5514 SoundTrigger +PRODUCT_COPY_FILES += \ + device/google/redbull/audio/rt5514_dsp_fw1.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/rt5514_dsp_fw1.bin \ + device/google/redbull/audio/rt5514_dsp_fw2.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/rt5514_dsp_fw2.bin \ + device/google/redbull/audio/rt5514_dsp_fw3.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/rt5514_dsp_fw3.bin \ + device/google/redbull/audio/rt5514_dsp_fw4.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/rt5514_dsp_fw4.bin \ + device/google/redbull/audio/rt5514p_dsp_fw1.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/rt5514p_dsp_fw1.bin \ + device/google/redbull/audio/rt5514p_dsp_fw2.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/rt5514p_dsp_fw2.bin \ + device/google/redbull/audio/rt5514p_dsp_fw3.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/rt5514p_dsp_fw3.bin \ + device/google/redbull/audio/rt5514p_dsp_fw4.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/rt5514p_dsp_fw4.bin + +PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/media_codecs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs.xml \ + $(LOCAL_PATH)/media_codecs_c2.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_c2.xml \ + $(LOCAL_PATH)/media_codecs_performance_c2.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance_c2.xml \ + $(LOCAL_PATH)/media_codecs_omx.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_omx.xml \ + $(LOCAL_PATH)/video_system_specs.json:$(TARGET_COPY_OUT_VENDOR)/etc/video_system_specs.json \ + frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_audio.xml \ + frameworks/av/media/libstagefright/data/media_codecs_google_telephony.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_telephony.xml \ + frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_video.xml \ + $(LOCAL_PATH)/media_profiles_V1_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_V1_0.xml + +# Vendor seccomp policy files for media components: +PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/seccomp_policy/mediacodec.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/mediacodec.policy + +PRODUCT_PROPERTY_OVERRIDES += \ + vendor.audio.snd_card.open.retries=50 + + +ifneq (,$(filter eng, $(TARGET_BUILD_VARIANT))) +# Subsystem ramdump +PRODUCT_PROPERTY_OVERRIDES += \ + persist.vendor.sys.ssr.enable_ramdumps=1 +endif + +# Subsystem silent restart +PRODUCT_PROPERTY_OVERRIDES += \ + persist.vendor.sys.ssr.restart_level=modem,adsp + +ifneq (,$(filter eng, $(TARGET_BUILD_VARIANT))) +# Sensor debug flag +PRODUCT_PROPERTY_OVERRIDES += \ + persist.vendor.debug.ash.logger=0 \ + persist.vendor.debug.ash.logger.time=0 +endif + +# setup dalvik vm configs +$(call inherit-product, frameworks/native/build/phone-xhdpi-6144-dalvik-heap.mk) + +# Use the default charger mode images +PRODUCT_PACKAGES += \ + charger_res_images + +ifneq (,$(filter eng, $(TARGET_BUILD_VARIANT))) +# b/36703476: Set default log size to 1M +PRODUCT_PROPERTY_OVERRIDES += \ + ro.logd.size=1M +# b/114766334: persist all logs by default rotating on 30 files of 1MiB +PRODUCT_PROPERTY_OVERRIDES += \ + logd.logpersistd=logcatd \ + logd.logpersistd.size=30 +endif + +# Storage: for factory reset protection feature +PRODUCT_PROPERTY_OVERRIDES += \ + ro.frp.pst=/dev/block/bootdevice/by-name/frp + +# Override heap growth limit due to high display density on device +PRODUCT_PROPERTY_OVERRIDES += \ + dalvik.vm.heapgrowthlimit?=256m + +# Use 64-bit dex2oat for better dexopt time. +PRODUCT_PROPERTY_OVERRIDES += \ + dalvik.vm.dex2oat64.enabled=true + +#Set default CDMA subscription to RUIM +PRODUCT_PROPERTY_OVERRIDES += \ + ro.telephony.default_cdma_sub=0 + +# Set network mode to Global (NR 5G, LTE, CDMA, EvDo, GSM and WCDMA) by default and no DSDS/DSDA +PRODUCT_PROPERTY_OVERRIDES += ro.telephony.default_network=27 + +# Set display color mode to Adaptive by default +PRODUCT_PROPERTY_OVERRIDES += \ + persist.sys.sf.color_saturation=1.0 \ + persist.sys.sf.native_mode=2 \ + persist.sys.sf.color_mode=9 + +# Keymaster configuration +PRODUCT_COPY_FILES += \ + frameworks/native/data/etc/android.software.device_id_attestation.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.device_id_attestation.xml \ + frameworks/native/data/etc/android.hardware.device_unique_attestation.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.device_unique_attestation.xml + +# Enable modem logging +PRODUCT_PROPERTY_OVERRIDES += \ + ro.vendor.radio.log_loc="/data/vendor/modem_dump" \ + ro.vendor.radio.log_prefix="modem_log_" + +# Enable modem logging for debug +ifneq (,$(filter eng, $(TARGET_BUILD_VARIANT))) +PRODUCT_PROPERTY_OVERRIDES += \ + persist.vendor.sys.modem.diag.mdlog=true +else +PRODUCT_PROPERTY_OVERRIDES += \ + persist.vendor.sys.modem.diag.mdlog=false +endif +PRODUCT_PROPERTY_OVERRIDES += \ + persist.vendor.sys.modem.diag.mdlog_br_num=5 + +# Enable tcpdump_logger on eng +ifneq (,$(filter eng, $(TARGET_BUILD_VARIANT))) + PRODUCT_PROPERTY_OVERRIDES += \ + persist.vendor.tcpdump.log.alwayson=false \ + persist.vendor.tcpdump.log.br_num=5 +endif + +# Preopt SystemUI. +PRODUCT_DEXPREOPT_SPEED_APPS += SystemUIGoogle # For internal +PRODUCT_DEXPREOPT_SPEED_APPS += SystemUI # For AOSP + +# Compile SystemUI on device with `speed`. +PRODUCT_PROPERTY_OVERRIDES += \ + dalvik.vm.systemuicompilerfilter=speed + +# Enable stats logging in LMKD +TARGET_LMKD_STATS_LOG := true + +PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/init.gadgethal.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.gadgethal.sh + +# default usb oem functions +ifneq (,$(filter eng, $(TARGET_BUILD_VARIANT))) + PRODUCT_PROPERTY_OVERRIDES += \ + persist.vendor.usb.usbradio.config=diag +endif + +# Enable app/sf phase offset as durations. The numbers below are translated from the existing +# positive offsets by finding the duration app/sf will have with the offsets. +# For SF the previous value was 6ms which under 16.6ms vsync time (60Hz) will leave SF with ~10.5ms +# for each frame. For App the previous value was 2ms which under 16.6ms vsync time will leave the +# App with ~20.5ms (16.6ms * 2 - 10.5ms - 2ms). The other values were calculated similarly. +# Full comparison between the old vs. the new values are captured in +# https://docs.google.com/spreadsheets/d/1a_5cVNY3LUAkeg-yL56rYQNwved6Hy-dvEcKSxp6f8k/edit + +PRODUCT_DEFAULT_PROPERTY_OVERRIDES += debug.sf.use_phase_offsets_as_durations=1 +PRODUCT_DEFAULT_PROPERTY_OVERRIDES += debug.sf.late.sf.duration=10500000 +PRODUCT_DEFAULT_PROPERTY_OVERRIDES += debug.sf.late.app.duration=20500000 +PRODUCT_DEFAULT_PROPERTY_OVERRIDES += debug.sf.early.sf.duration=16000000 +PRODUCT_DEFAULT_PROPERTY_OVERRIDES += debug.sf.early.app.duration=16500000 +PRODUCT_DEFAULT_PROPERTY_OVERRIDES += debug.sf.earlyGl.sf.duration=13500000 +PRODUCT_DEFAULT_PROPERTY_OVERRIDES += debug.sf.earlyGl.app.duration=21000000 + +# Do not skip init trigger by default +PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \ + vendor.skip.init=0 + +# Enable backpressure for GL comp +PRODUCT_PROPERTY_OVERRIDES += \ + debug.sf.enable_gl_backpressure=1 + +BOARD_USES_QCNE := true + +PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/sec_config:$(TARGET_COPY_OUT_VENDOR)/etc/sec_config + +# GPS configuration file +PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/gps.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gps.conf + +# dynamic partition +PRODUCT_USE_DYNAMIC_PARTITIONS := true + +# Use /product/etc/fstab.postinstall to mount system_other +PRODUCT_PRODUCT_PROPERTIES += \ + ro.postinstall.fstab.prefix=/product + +PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/fstab.postinstall:$(TARGET_COPY_OUT_PRODUCT)/etc/fstab.postinstall + +# powerstats HAL +PRODUCT_PACKAGES += \ + android.hardware.power.stats@1.0-service.pixel + +QTI_TELEPHONY_UTILS := qti-telephony-utils +QTI_TELEPHONY_UTILS += qti_telephony_utils.xml +PRODUCT_PACKAGES += $(QTI_TELEPHONY_UTILS) + +HIDL_WRAPPER := qti-telephony-hidl-wrapper +HIDL_WRAPPER += qti_telephony_hidl_wrapper.xml +HIDL_WRAPPER += qti-telephony-hidl-wrapper-prd +HIDL_WRAPPER += qti_telephony_hidl_wrapper_prd.xml +PRODUCT_PACKAGES += $(HIDL_WRAPPER) + +# Increment the SVN for any official public releases +ifeq ($(PRODUCT_DEVICE_SVN_OVERRIDE),) +PRODUCT_PROPERTY_OVERRIDES += \ + ro.vendor.build.svn=76 +endif + +# Enable iwlan service logging for debug +ifneq (,$(filter eng, $(TARGET_BUILD_VARIANT))) + PRODUCT_PROPERTY_OVERRIDES += persist.vendor.iwlan.logging.logcat=true +endif + +PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/powerhint.json:$(TARGET_COPY_OUT_VENDOR)/etc/powerhint.json + +PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/task_profiles.json:$(TARGET_COPY_OUT_VENDOR)/etc/task_profiles.json + +PRODUCT_PROPERTY_OVERRIDES += vendor.audio.adm.buffering.ms=2 +PRODUCT_PROPERTY_OVERRIDES += vendor.audio_hal.period_multiplier=2 +PRODUCT_PROPERTY_OVERRIDES += af.fast_track_multiplier=1 + +# Enable AAudio MMAP/NOIRQ data path. +# 1 is AAUDIO_POLICY_NEVER means only use Legacy path. +# 2 is AAUDIO_POLICY_AUTO means try MMAP then fallback to Legacy path. +# 3 is AAUDIO_POLICY_ALWAYS means only use MMAP path. +PRODUCT_PROPERTY_OVERRIDES += aaudio.mmap_policy=2 +# 1 is AAUDIO_POLICY_NEVER means only use SHARED mode +# 2 is AAUDIO_POLICY_AUTO means try EXCLUSIVE then fallback to SHARED mode. +# 3 is AAUDIO_POLICY_ALWAYS means only use EXCLUSIVE mode. +PRODUCT_PROPERTY_OVERRIDES += aaudio.mmap_exclusive_policy=2 + +# Increase the apparent size of a hardware burst from 1 msec to 2 msec. +# A "burst" is the number of frames processed at one time. +# That is an increase from 48 to 96 frames at 48000 Hz. +# The DSP will still be bursting at 48 frames but AAudio will think the burst is 96 frames. +# A low number, like 48, might increase power consumption or stress the system. +PRODUCT_PROPERTY_OVERRIDES += aaudio.hw_burst_min_usec=2000 + +# A2DP offload enabled for compilation +AUDIO_FEATURE_ENABLED_A2DP_OFFLOAD := true + +# A2DP offload supported +PRODUCT_PROPERTY_OVERRIDES += \ +ro.bluetooth.a2dp_offload.supported=true + +# A2DP offload disabled (UI toggle property) +PRODUCT_PROPERTY_OVERRIDES += \ +persist.bluetooth.a2dp_offload.disabled=false + +# A2DP offload DSP supported encoder list +PRODUCT_PROPERTY_OVERRIDES += \ +persist.bluetooth.a2dp_offload.cap=sbc-aac-aptx-aptxhd-ldac + +# Enable AAC frame ctl for A2DP sinks +PRODUCT_PROPERTY_OVERRIDES += \ +persist.vendor.bt.aac_frm_ctl.enabled=true + +# Enable VBR frame ctl +PRODUCT_PROPERTY_OVERRIDES += \ +persist.vendor.bt.aac_vbr_frm_ctl.enabled=true + +# Set lmkd options +PRODUCT_PRODUCT_PROPERTIES += \ + ro.config.low_ram ?= false \ + ro.lmk.log_stats = true \ + +# charger +PRODUCT_PRODUCT_PROPERTIES += \ + ro.charger.enable_suspend=true + +# Modem logging file +PRODUCT_COPY_FILES += \ + device/google/redbull/init.logging.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.$(PRODUCT_PLATFORM).logging.rc + +# Pixelstats broken mic detection +PRODUCT_PROPERTY_OVERRIDES += vendor.audio.mic_break=true + +PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.use_color_management=true +PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.has_wide_color_display=true +PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.has_HDR_display=true + +# Audio low latency feature +PRODUCT_COPY_FILES += \ + frameworks/native/data/etc/android.hardware.audio.low_latency.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.low_latency.xml + +# Pro audio feature +PRODUCT_COPY_FILES += \ + frameworks/native/data/etc/android.hardware.audio.pro.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.pro.xml + +# Must align with HAL types Dataspace +# The data space of wide color gamut composition preference is Dataspace::DISPLAY_P3 +PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.wcg_composition_dataspace=143261696 + +# MIDI feature +PRODUCT_COPY_FILES += \ + frameworks/native/data/etc/android.software.midi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.midi.xml + +# Set thermal warm reset +PRODUCT_PRODUCT_PROPERTIES += \ + ro.thermal_warmreset = true \ + +# Vendor verbose logging default property +ifneq (,$(filter eng, $(TARGET_BUILD_VARIANT))) +PRODUCT_PROPERTY_OVERRIDES += \ + persist.vendor.verbose_logging_enabled=true +else +PRODUCT_PROPERTY_OVERRIDES += \ + persist.vendor.verbose_logging_enabled=false +endif + +# Disable Rescue Party on eng build +ifneq (,$(filter eng, $(TARGET_BUILD_VARIANT))) +PRODUCT_PRODUCT_PROPERTIES += \ + persist.sys.disable_rescue=true +endif + +# Set support one-handed mode +PRODUCT_PRODUCT_PROPERTIES += \ + ro.support_one_handed_mode=true + +# Enable Incremental on the device via kernel module +PRODUCT_PROPERTY_OVERRIDES += \ + ro.incremental.enable=module:/vendor/lib/modules/incrementalfs.ko + +# Enforce generic ramdisk allow list +$(call inherit-product, $(SRC_TARGET_DIR)/product/generic_ramdisk.mk) + +# Enable watchdog timeout loop breaker. +PRODUCT_PROPERTY_OVERRIDES += \ + framework_watchdog.fatal_window.second=600 \ + framework_watchdog.fatal_count=3 + +# Enable zygote critical window. +PRODUCT_PROPERTY_OVERRIDES += \ + zygote.critical_window.minute=10 + +# Include the redbull product FCM +# (TODO: b/169535506) This includes the FCM for system_ext and product partition. +# Vendor Freeze system-only builds use a different FCM. +ifneq ($(PRODUCT_VENDOR_FREEZE_SYSTEM_BUILD),true) +PRODUCT_PACKAGES += redbull_product_compatibility_matrix.xml +endif +# Set system properties identifying the chipset +PRODUCT_VENDOR_PROPERTIES += ro.soc.manufacturer=Qualcomm +PRODUCT_VENDOR_PROPERTIES += ro.soc.model=SM7250 + +################################################################################# +# This is the End of device-common.mk file. +# Now, Pickup other split device-common.mk files: +################################################################################# + +# Display +-include hardware/qcom/sm7250/display/config/display-product.mk +-include vendor/qcom/sm7250/proprietary/display/config/display-product-proprietary.mk + +# Security +-include vendor/qcom/sm7250/proprietary/securemsm/config/keymaster_vendor_proprietary_board.mk +-include vendor/qcom/sm7250/proprietary/securemsm/config/keymaster_vendor_proprietary_product.mk +-include vendor/qcom/sm7250/proprietary/securemsm/config/cpz_vendor_proprietary_board.mk +-include vendor/qcom/sm7250/proprietary/securemsm/config/cpz_vendor_proprietary_product.mk +-include vendor/qcom/sm7250/proprietary/securemsm/config/smcinvoke_vendor_proprietary_product.mk +-include vendor/qcom/sm7250/proprietary/commonsys/securemsm/securemsm_system_product.mk + +# RIL +-include vendor/qcom/sm7250/proprietary/commonsys-intf/data/data_commonsys-intf_vendor_product.mk + +# Sensor +ifneq ($(wildcard vendor/google/tools),) + ENABLE_SENSOR_SSC_FOR_SOONG := true +endif +-include vendor/qcom/sm7250/proprietary/sensors-see/build_config/sns_vendor_board.mk +-include vendor/qcom/sm7250/proprietary/sensors-see/build_config/sns_vendor_product.mk + +# Project +include hardware/google/pixel/common/pixel-common-device.mk + +# gs-common +include device/google/gs-common/misc_writer/misc_writer.mk + +# Citadel +include hardware/google/pixel/citadel/citadel.mk + +# Factory OTA +-include vendor/google/factoryota/client/factoryota.mk + +# storage +-include hardware/google/pixel/pixelstats/device.mk + +# thermal +include device/google/gs-common/thermal/thermal_hal/device.mk + +# power HAL +-include hardware/google/pixel/power-libperfmgr/aidl/device.mk + +# mm_event +-include hardware/google/pixel/mm/device.mk + +# Pixel Logger +include hardware/google/pixel/PixelLogger/PixelLogger.mk + +# Touch service +include device/google/gs-common/touch/twoshay/twoshay.mk +################################################################################# + +# Update soong config namespace +-include vendor/google/build/soong/soong_config_namespace/qcril_oemhook.mk diff --git a/device-lineage.mk b/device-lineage.mk new file mode 100644 index 00000000..6787ece5 --- /dev/null +++ b/device-lineage.mk @@ -0,0 +1,89 @@ +# +# Copyright (C) 2021 The LineageOS Project +# +# SPDX-License-Identifier: Apache-2.0 +# + +# Overlays +DEVICE_PACKAGE_OVERLAYS += $(LOCAL_PATH)/overlay-lineage + +# Soong namespaces +PRODUCT_SOONG_NAMESPACES += \ + vendor/qcom/opensource/commonsys-intf/display \ + vendor/qcom/opensource/display + +# Add common definitions for Qualcomm +$(call inherit-product, hardware/qcom-caf/common/common.mk) + +# AiAi Config +PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/allowlist_com.google.android.as.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/sysconfig/allowlist_com.google.android.as.xml + +# Camera +PRODUCT_PRODUCT_PROPERTIES += \ + ro.vendor.camera.extensions.package=com.google.android.apps.camera.services \ + ro.vendor.camera.extensions.service=com.google.android.apps.camera.services.extensions.service.PixelExtensions + +# EUICC +PRODUCT_COPY_FILES += \ + frameworks/native/data/etc/android.hardware.telephony.euicc.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/permissions/android.hardware.telephony.euicc.xml + +# Google Assistant +PRODUCT_PRODUCT_PROPERTIES += ro.opa.eligible_device=true + +# LiveDisplay +PRODUCT_PACKAGES += \ + vendor.lineage.livedisplay@2.0-service-sdm + +# Parts +PRODUCT_PACKAGES += \ + GoogleParts + +# RCS +PRODUCT_PACKAGES += \ + PresencePolling \ + RcsService + +# Touch +include hardware/google/pixel/touch/device.mk + +# Build necessary packages for vendor + +# CHRE +PRODUCT_PACKAGES += \ + chre + +# GNSS +PRODUCT_PACKAGES += \ + flp.conf + +# Identity credential +PRODUCT_PACKAGES += \ + android.hardware.identity_credential.xml + +# Sensors +PRODUCT_PACKAGES += \ + android.hardware.sensors@2.0-service.multihal + +PRODUCT_COPY_FILES += \ + frameworks/native/data/etc/android.hardware.sensor.accelerometer.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.accelerometer.xml \ + frameworks/native/data/etc/android.hardware.sensor.barometer.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.barometer.xml \ + frameworks/native/data/etc/android.hardware.sensor.compass.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.compass.xml \ + frameworks/native/data/etc/android.hardware.sensor.gyroscope.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.gyroscope.xml \ + frameworks/native/data/etc/android.hardware.sensor.hifi_sensors.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.hifi_sensors.xml \ + frameworks/native/data/etc/android.hardware.sensor.light.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.light.xml \ + frameworks/native/data/etc/android.hardware.sensor.proximity.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.proximity.xml \ + frameworks/native/data/etc/android.hardware.sensor.stepcounter.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.stepcounter.xml \ + frameworks/native/data/etc/android.hardware.sensor.stepdetector.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.stepdetector.xml + +# VNDK FWK detect +PRODUCT_PACKAGES += \ + libvndfwk_detect_jni.qti.vendor + +# Wi-Fi +PRODUCT_PACKAGES += \ + libwifi-hal-ctrl:64 \ + libwifi-hal-qcom + +# Properties +TARGET_VENDOR_PROP := $(LOCAL_PATH)/vendor.prop diff --git a/device_framework_matrix_product.xml b/device_framework_matrix_product.xml new file mode 100644 index 00000000..2fcdb238 --- /dev/null +++ b/device_framework_matrix_product.xml @@ -0,0 +1,312 @@ +<compatibility-matrix version="1.0" type="framework" level="5"> + <hal format="hidl" optional="false"> + <name>com.qualcomm.qti.imscmservice</name> + <version>2.2</version> + <interface> + <name>IImsCmService</name> + <instance>qti.ims.connectionmanagerservice</instance> + </interface> + </hal> + <hal format="hidl" optional="false"> + <name>com.qualcomm.qti.uceservice</name> + <version>2.3</version> + <interface> + <name>IUceService</name> + <instance>com.qualcomm.qti.uceservice</instance> + </interface> + </hal> + <hal format="hidl" optional="false"> + <name>vendor.qti.ims.factory</name> + <version>1.0</version> + <interface> + <name>IImsFactory</name> + <instance>default</instance> + </interface> + </hal> + <hal format="hidl" optional="false"> + <name>vendor.qti.data.factory</name> + <version>2.2</version> + <interface> + <name>IFactory</name> + <instance>default</instance> + </interface> + </hal> + <!-- iwlan --> + <hal format="hidl" optional="false"> + <name>vendor.qti.hardware.data.iwlan</name> + <version>1.0</version> + <interface> + <name>IIWlan</name> + <instance>slot1</instance> + <instance>slot2</instance> + </interface> + </hal> + <hal format="hidl" optional="false"> + <name>vendor.display.color</name> + <version>1.0-5</version> + <interface> + <name>IDisplayColor</name> + <instance>default</instance> + </interface> + </hal> + <hal format="hidl" optional="false"> + <name>vendor.display.config</name> + <version>2.0</version> + <interface> + <name>IDisplayConfig</name> + <instance>default</instance> + </interface> + </hal> + <hal format="hidl" optional="false"> + <name>vendor.display.postproc</name> + <version>1.0</version> + <interface> + <name>IDisplayPostproc</name> + <instance>default</instance> + </interface> + </hal> + <hal format="aidl" optional="true"> + <name>vendor.google.google_battery</name> + <version>2-3</version> + <interface> + <name>IGoogleBattery</name> + <instance>default</instance> + </interface> + </hal> + <hal format="hidl" optional="false"> + <name>vendor.google.radioext</name> + <version>1.2-3</version> + <interface> + <name>IRadioExt</name> + <instance>default</instance> + </interface> + </hal> + <hal format="hidl" optional="false"> + <name>vendor.qti.hardware.radio.am</name> + <version>1.0</version> + <interface> + <name>IQcRilAudio</name> + <instance>slot1</instance> + <instance>slot2</instance> + </interface> + </hal> + <hal format="hidl" optional="false"> + <name>vendor.qti.hardware.radio.ims</name> + <version>1.6</version> + <interface> + <name>IImsRadio</name> + <instance>imsradio0</instance> + <instance>imsradio1</instance> + </interface> + </hal> + <hal format="hidl" optional="false"> + <name>vendor.qti.hardware.radio.lpa</name> + <version>1.0</version> + <interface> + <name>IUimLpa</name> + <instance>UimLpa0</instance> + <instance>UimLpa1</instance> + </interface> + </hal> + <hal format="hidl" optional="false"> + <name>vendor.qti.hardware.radio.qcrilhook</name> + <version>1.0</version> + <interface> + <name>IQtiOemHook</name> + <instance>oemhook0</instance> + <instance>oemhook1</instance> + </interface> + </hal> + <hal format="hidl" optional="false"> + <name>vendor.qti.hardware.radio.uim</name> + <version>1.2</version> + <interface> + <name>IUim</name> + <instance>Uim0</instance> + <instance>Uim1</instance> + </interface> + </hal> + <hal format="hidl" optional="false"> + <name>vendor.qti.hardware.radio.uim_remote_client</name> + <version>1.0</version> + <interface> + <name>IUimRemoteServiceClient</name> + <instance>uimRemoteClient0</instance> + <instance>uimRemoteClient1</instance> + </interface> + </hal> + <hal format="hidl" optional="false"> + <name>vendor.qti.hardware.radio.uim_remote_server</name> + <version>1.0</version> + <interface> + <name>IUimRemoteServiceServer</name> + <instance>uimRemoteServer0</instance> + <instance>uimRemoteServer1</instance> + </interface> + </hal> + <hal format="hidl" optional="false"> + <name>vendor.qti.hardware.tui_comm</name> + <version>1.0</version> + <interface> + <name>ITuiComm</name> + <instance>default</instance> + </interface> + </hal> + <hal format="hidl" optional="false"> + <name>vendor.qti.hardware.display.allocator</name> + <version>1.0</version> + <version>3.0</version> + <version>4.0</version> + <interface> + <name>IQtiAllocator</name> + <instance>default</instance> + </interface> + </hal> + <hal format="hidl" optional="false"> + <name>vendor.qti.hardware.display.mapper</name> + <version>2.0</version> + <version>3.0</version> + <version>4.0</version> + <interface> + <name>IQtiMapper</name> + <instance>default</instance> + </interface> + </hal> + <hal format="hidl" optional="false"> + <name>vendor.qti.hardware.display.composer</name> + <version>3.0</version> + <interface> + <name>IQtiComposer</name> + <instance>default</instance> + </interface> + </hal> + <hal format="hidl" optional="false"> + <name>vendor.qti.hardware.radio.internal.deviceinfo</name> + <version>1.0</version> + <interface> + <name>IDeviceInfo</name> + <instance>deviceinfo</instance> + </interface> + </hal> + <hal format="hidl" optional="false"> + <name>vendor.qti.imsrtpservice</name> + <version>3.0</version> + <interface> + <name>IRTPService</name> + <instance>imsrtpservice</instance> + </interface> + </hal> + <hal format="hidl" optional="false"> + <name>vendor.qti.ims.callinfo</name> + <version>1.0</version> + <interface> + <name>IService</name> + <instance>default</instance> + </interface> + </hal> + <hal format="hidl" optional="false"> + <name>hardware.google.bluetooth.sar</name> + <version>1.0</version> + <interface> + <name>IBluetoothSar</name> + <instance>default</instance> + </interface> + </hal> + <hal format="hidl" optional="false"> + <name>hardware.google.bluetooth.bt_channel_avoidance</name> + <version>1.0</version> + <interface> + <name>IBTChannelAvoidance</name> + <instance>default</instance> + </interface> + </hal> + <hal format="aidl" optional="true"> + <name>vendor.google.wifi_ext</name> + <version>1-3</version> + <interface> + <name>IWifiExt</name> + <instance>default</instance> + </interface> + </hal> + <hal format="hidl" optional="false"> + <name>vendor.qti.hardware.cacert</name> + <version>1.0</version> + <interface> + <name>IService</name> + <instance>default</instance> + </interface> + </hal> + <hal format="hidl" optional="false"> + <name>vendor.qti.hardware.data.connection</name> + <version>1.1</version> + <interface> + <name>IDataConnection</name> + <instance>slot1</instance> + <instance>slot2</instance> + </interface> + </hal> + <hal format="hidl" optional="false"> + <name>vendor.qti.hardware.radio.qtiradio</name> + <version>1.0</version> + <interface> + <name>IQtiRadio</name> + <instance>slot1</instance> + <instance>slot2</instance> + </interface> + </hal> + <hal format="hidl" optional="false"> + <name>vendor.qti.hardware.radio.qtiradio</name> + <version>2.4</version> + <interface> + <name>IQtiRadio</name> + <instance>slot1</instance> + <instance>slot2</instance> + </interface> + </hal> + <!-- QSEECom HAL service --> + <hal format="hidl" optional="false"> + <name>vendor.qti.hardware.qseecom</name> + <version>1.0</version> + <interface> + <name>IQSEECom</name> + <instance>default</instance> + </interface> + </hal> + <!-- QSPM HAL service --> + <hal format="hidl" optional="false"> + <name>vendor.qti.qspmhal</name> + <version>1.0</version> + <interface> + <name>IQspmhal</name> + <instance>default</instance> + </interface> + </hal> + <hal format="hidl" optional="false"> + <name>vendor.qti.hardware.qteeconnector</name> + <version>1.0</version> + <interface> + <name>IAppConnector</name> + <instance>default</instance> + </interface> + <interface> + <name>IGPAppConnector</name> + <instance>default</instance> + </interface> + </hal> + <hal format="aidl" optional="false"> + <name>com.google.hardware.pixel.display</name> + <interface> + <name>IDisplay</name> + <instance>default</instance> + </interface> + </hal> + <!-- DSP Service --> + <hal format="hidl" optional="false"> + <name>vendor.qti.hardware.dsp</name> + <version>1.0</version> + <interface> + <name>IDspService</name> + <instance>dspservice</instance> + </interface> + </hal> +</compatibility-matrix> diff --git a/fstab.hardware b/fstab.hardware new file mode 100644 index 00000000..d27d483b --- /dev/null +++ b/fstab.hardware @@ -0,0 +1,14 @@ +# Android fstab file. + +#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags> +/dev/block/bootdevice/by-name/boot /boot emmc defaults slotselect,avb=boot,first_stage_mount +system /system ext4 ro,barrier=1 wait,slotselect,avb=vbmeta_system,logical,first_stage_mount +system_ext /system_ext ext4 ro,barrier=1 wait,slotselect,avb=vbmeta_system,logical,first_stage_mount +vendor /vendor ext4 ro,barrier=1 wait,slotselect,avb=vbmeta,logical,first_stage_mount +product /product ext4 ro,barrier=1 wait,slotselect,avb,logical,first_stage_mount +/dev/block/by-name/metadata /metadata ext4 noatime,nosuid,nodev,discard,data=journal,commit=1 wait,formattable,first_stage_mount,check,metadata_csum +/dev/block/bootdevice/by-name/modem /vendor/firmware_mnt vfat ro,shortname=lower,uid=0,gid=1000,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait,slotselect +/dev/block/bootdevice/by-name/misc /misc emmc defaults defaults +/dev/block/bootdevice/by-name/userdata /data f2fs noatime,nosuid,nodev,discard,reserve_root=32768,resgid=1065,fsync_mode=nobarrier,inlinecrypt latemount,wait,check,quota,formattable,fileencryption=aes-256-xts:aes-256-cts:v2+inlinecrypt_optimized,reservedsize=128M,sysfs_path=/dev/sys/block/bootdevice,keydirectory=/metadata/vold/metadata_encryption,checkpoint=fs +/devices/platform/soc/a600000.ssusb/a600000.dwc3* auto vfat defaults voldmanaged=usb:auto +/dev/block/zram0 none swap defaults zramsize=2147483648,max_comp_streams=8,zram_backingdev_size=512M diff --git a/fstab.persist b/fstab.persist new file mode 100644 index 00000000..f3840b15 --- /dev/null +++ b/fstab.persist @@ -0,0 +1,4 @@ +# Keep persist in an fstab file, since we need to run fsck on it after abnormal shutdown. + +#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags> +/dev/block/platform/soc/1d84000.ufshc/by-name/persist /mnt/vendor/persist ext4 nosuid,nodev,noatime,barrier=1 wait diff --git a/fstab.postinstall b/fstab.postinstall new file mode 100644 index 00000000..83bb3c6f --- /dev/null +++ b/fstab.postinstall @@ -0,0 +1,17 @@ +# +# 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. + +#<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 diff --git a/gps.conf b/gps.conf new file mode 100644 index 00000000..b3f4102f --- /dev/null +++ b/gps.conf @@ -0,0 +1,391 @@ +# Error Estimate +# _SET = 1 +# _CLEAR = 0 +ERR_ESTIMATE=0 + +#NTP server +NTP_SERVER = time.google.com + +#XTRA CA path +XTRA_CA_PATH=/usr/lib/ssl-1.1/certs + +# DEBUG LEVELS: 0 - none, 1 - Error, 2 - Warning, 3 - Info +# 4 - Debug, 5 - Verbose +# If DEBUG_LEVEL is commented, Android's logging levels will be used +DEBUG_LEVEL = 2 + +# Intermediate position report, 1=enable, 0=disable +INTERMEDIATE_POS=0 + +# supl version 1.0 +#SUPL_VER=0x10000 + +# Emergency SUPL, 1=enable, 0=disable +SUPL_ES=1 + +#Choose PDN for Emergency SUPL +#1 - Use emergency PDN +#0 - Use regular SUPL PDN for Emergency SUPL +#USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL=0 + +#SUPL_MODE is a bit mask set in config.xml per carrier by default. +#If it is uncommented here, this value will overwrite the value from +#config.xml. +#MSA=0X2 +#MSB=0X1 +#SUPL_MODE= + +# GPS Capabilities bit mask +# SCHEDULING = 0x01 +# MSB = 0x02 +# MSA = 0x04 +# ON_DEMAND_TIME = 0x10 +# default = ON_DEMAND_TIME | MSA | MSB | SCHEDULING +CAPABILITIES=0x17 + +# Accuracy threshold for intermediate positions +# less accurate positions are ignored, 0 for passing all positions +# ACCURACY_THRES=5000 + +################################ +##### AGPS server settings ##### +################################ + +# FOR SUPL SUPPORT, set the following +# SUPL_HOST=supl.host.com or IP +# SUPL_PORT=1234 + +# FOR MO SUPL SUPPORT, set the following +# MO_SUPL_HOST=supl.host.com or IP +# MO_SUPL_PORT=1234 + +# FOR C2K PDE SUPPORT, set the following +# C2K_HOST=c2k.pde.com or IP +# C2K_PORT=1234 + +# Bitmask of slots that are available +# for write/install to, where 1s indicate writable, +# and the default value is 0 where no slots +# are writable. For example, AGPS_CERT_WRITABLE_MASK +# of b1000001010 makes 3 slots available +# and the remaining 7 slots unwritable. +#AGPS_CERT_WRITABLE_MASK=0 + +#################################### +# LTE Positioning Profile Settings +#################################### +# LPP_PROFILE is a bit mask +# 0: Enable RRLP on LTE(Default) +# 0x1: LPP User Plane +# 0x2: LPP Control Plane +# 0x4: LPP User Plane for NR5G +# 0x8: LPP Control Plane for NR5G +#LPP_PROFILE = 2 + +#################################### +#Datum Type +#################################### +# 0: WGS-84 +# 1: PZ-90 +DATUM_TYPE = 0 + +################################ +# EXTRA SETTINGS +################################ +# NMEA provider (1=Modem Processor, 0=Application Processor) +NMEA_PROVIDER=0 + +################################ +# NMEA TAG BLOCK GROUPING +################################ +# NMEA tag block grouping is only applicable to GSA +# Default is disabled +# 0 - disabled +# 1 - enabled +NMEA_TAG_BLOCK_GROUPING_ENABLED = 0 + +# Customized NMEA GGA fix quality that can be used to tell +# whether SENSOR contributed to the fix. +# +# When this configuration item is not enabled (set to any value that is not 1), +# GGA fix quality conforms to NMEA standard spec as below: +# PPP/DGNSS/SBAS correction fix w/ or w/o sensor: 2 +# RTK fixed fix w/ or w/o sensor: 4 +# RTK float fix w/ or w/o sensor: 5 +# SPE fix w/ or w/o sensor: 1 +# Sensor dead reckoning fix: 6 +# +# When this configuration is enabled (set to 1), GGA fix quality +# will be output as below: +# PPP fix w/o sensor: 59, w/ sensor: 69 +# DGNSS/SBAS correction fix w/o sensor: 2, w/ sensor: 62 +# RTK fixed fix w/o sensor: 4, w/ sensor: 64 +# RTK float fix w/o sensor: 5, w/ sensor: 65, +# SPE fix w/o sensor: 1, and w/ sensor: 61 +# Sensor dead reckoning fix: 6 +# +# any value that is not 1 - disabled +# 1 - enabled +CUSTOM_NMEA_GGA_FIX_QUALITY_ENABLED = 0 + +################################ +# NMEA Reporting Rate Config, valid only when NMEA_PROVIDER is set to "0" +################################ +# NMEA Reporting Rate +# Set it to "1HZ" for 1Hz NMEA Reporting +# Set it to "NHZ" for NHz NMEA Reporting +#Default : NHZ (overridden by position update rate if set to lower rates) +NMEA_REPORT_RATE=NHZ + +# Mark if it is a SGLTE target (1=SGLTE, 0=nonSGLTE) +SGLTE_TARGET=0 + +################################################## +# Select Positioning Protocol on A-GLONASS system +################################################## +# 0x1: RRC CPlane +# 0x2: RRLP UPlane +# 0x4: LLP Uplane +#A_GLONASS_POS_PROTOCOL_SELECT = 0 + +################################################## +# Select technology for LPPe Control Plane +################################################## +# 0x1: DBH for LPPe CP +# 0x2: WLAN AP Measurements for LPPe CP +# 0x4: SRN AP measurement for CP +# 0x8: Sensor Barometer Measurement LPPe CP +#LPPE_CP_TECHNOLOGY = 0 + +################################################## +# Select technology for LPPe User Plane +################################################## +# 0x1: DBH for LPPe UP +# 0x2: WLAN AP Measurements for LPPe UP +# 0x4: SRN AP measurement for UP +# 0x8: Sensor Barometer Measurement LPPe UP +#LPPE_UP_TECHNOLOGY = 0 + +################################################## +# AGPS_CONFIG_INJECT +################################################## +# enable/disable injection of AGPS configurations: +# SUPL_VER +# SUPL_HOST +# SUPL_PORT +# MO_SUPL_HOST +# MO_SUPL_PORT +# C2K_HOST +# C2K_PORT +# LPP_PROFILE +# A_GLONASS_POS_PROTOCOL_SELECT +# 0: disable +# 1: enable +AGPS_CONFIG_INJECT = 1 + +################################################## +# GNSS settings for automotive use cases +# Configurations in following section are +# specific to automotive use cases, others +# please do not change, keep the default values +################################################## + +# AP Coarse Timestamp Uncertainty +################################################## +# default : 10 +# AP time stamp uncertainty, until GNSS receiver +# is able to acquire better timing information +AP_TIMESTAMP_UNCERTAINTY = 10 + +##################################### +# DR_SYNC Pulse Availability +##################################### +# 0 : DR_SYNC pulse not available (default) +# 1 : DR_SYNC pulse available +# This configuration enables the driver to make use +# of PPS events generated by DR_SYNC pulse +# Standard Linux PPS driver needs to be enabled +DR_SYNC_ENABLED = 0 + +##################################### +# PPS Device name +##################################### +PPS_DEVICENAME = /dev/pps0 + +##################################### +# Ignore PPS at Startup and after long outage +##################################### +IGNORE_PPS_PULSE_COUNT = 1 + +##################################### +# Long GNSS RF outage in seconds +##################################### +GNSS_OUTAGE_DURATION = 10 + +##################################### +# AP Clock Accuracy +##################################### +# Quality of APPS processor clock (in PPM). +# Value specified is used for calculation of +# APPS time stamp uncertainty +AP_CLOCK_PPM = 100 + +##################################### +# MAX ms difference to detect missing pulse +##################################### +# Specifies time threshold in ms to validate any missing PPS pulses +MISSING_PULSE_TIME_DELTA = 900 + +##################################### +# Propagation time uncertainty +##################################### +# This settings enables time uncertainty propagation +# logic incase of missing PPS pulse +PROPAGATION_TIME_UNCERTAINTY = 1 + +####################################### +# APN / IP Type Configuration +# APN and IP Type to use for setting +# up WWAN call. +# Use below values for IP Type: +# v4 = 4 +# v6 = 6 +# v4v6 = 10 +####################################### +# INTERNET_APN = abc.xyz +# INTERNET_IP_TYPE = 4 +# SUPL_APN = abc.xyz +# SUPL_IP_TYPE = 4 + +##################################### +# Modem type +##################################### +# This setting configures modem type +# (external=0 or internal=1) +# comment out the next line to vote +# for the first modem in the list +MODEM_TYPE = 1 + +################################################## +# CONSTRAINED TIME UNCERTAINTY MODE +################################################## +# 0 : disabled (default) +# 1 : enabled +# This setting enables GPS engine to keep its time +# uncertainty below the specified constraint +#CONSTRAINED_TIME_UNCERTAINTY_ENABLED = 0 + +# If constrained time uncertainty mode is enabled, +# this setting specifies the time uncertainty +# threshold that gps engine need to maintain. +# In unit of milli-seconds. +# Default is 0.0 meaning that modem default value +# of time uncertainty threshold will be used. +#CONSTRAINED_TIME_UNCERTAINTY_THRESHOLD = 0.0 + +# If constrained time uncertainty mode is enabled, +# this setting specifies the power budget that +# gps engine is allowed to spend to maintain the time +# uncertainty. +# Default is 0 meaning that GPS engine is not constained +# by power budget and can spend as much power as needed. +# In unit of 0.1 milli watt second. +#CONSTRAINED_TIME_UNCERTAINTY_ENERGY_BUDGET = 0 + +################################################## +# POSITION ASSISTED CLOCK ESTIMATOR +################################################## +# 0 : disabled (default) +# 1 : enabled +# This setting enables GPS engine to estimate clock +# bias and drift when the signal from at least 1 +# SV is available and the UE’s position is known by +# other position engines. +#POSITION_ASSISTED_CLOCK_ESTIMATOR_ENABLED = 0 + +##################################### +# proxyAppPackageName +##################################### +# This is a string that is sent to the framework +# in nfwNotifyCb callback +PROXY_APP_PACKAGE_NAME = com.google.android.carrierlocation + +##################################### +# CP_MTLR_ES +##################################### +# CP MTLR ES, 1=enable, 0=disable +CP_MTLR_ES=1 + +################################################## +# GNSS_DEPLOYMENT +################################################## +# 0 : Enable QTI GNSS (default) +# 1 : Enable QCSR SS5 +# 2 : Enable PDS API +# This setting use to select between QTI GNSS, +# QCSR SS5 hardware receiver, and PDS API. +# By default QTI GNSS receiver is enabled. +# GNSS_DEPLOYMENT = 0 + +################################################## +## LOG BUFFER CONFIGURATION +################################################## +#LOG_BUFFER_ENABLED, 1=enable, 0=disable +#*_LEVEL_TIME_DEPTH, maximum time depth of level * +#in log buffer, unit is second +#*_LEVEL_MAX_CAPACITY, maximum numbers of level * +#log print sentences in log buffer +LOG_BUFFER_ENABLED = 0 +E_LEVEL_TIME_DEPTH = 600 +E_LEVEL_MAX_CAPACITY = 50 +W_LEVEL_TIME_DEPTH = 500 +W_LEVEL_MAX_CAPACITY = 100 +I_LEVEL_TIME_DEPTH = 400 +I_LEVEL_MAX_CAPACITY = 200 +D_LEVEL_TIME_DEPTH = 30 +D_LEVEL_MAX_CAPACITY = 300 +V_LEVEL_TIME_DEPTH = 200 +V_LEVEL_MAX_CAPACITY = 400 + +################################################## +# Allow buffer diag log packets when diag memory allocation +# fails during boot up time. +################################################## +BUFFER_DIAG_LOGGING = 1 + +####################################### +# NTRIP CLIENT LIBRARY NAME +####################################### +# NTRIP_CLIENT_LIB_NAME = + +################################################## +# Correction Data Framework settings +# Default values: +# CDFW_SOURCE_PRIORITY_1 = INTERNAL_1 RTCM +# CDFW_INJECT_DATA_INTERVAL = 600000 //10 mins +# CDFW_RTCM_MESSAGE_INTERVAL = 1000 //1 second +# +# If multiple sources coexist on a PL, +# the prorioty sequence can be set by the integer number. +# PRIORITY_1 is higher than PRIORITY_2, for example, +# CDFW_SOURCE_PRIORITY_1 = INTERNAL_1 RTCM +# CDFW_SOURCE_PRIORITY_2 = CV2X RTCM +################################################## + +################################################## +# RF LOSS +# The loss in 0.1 dbHz from the C/N0 at the antenna port +# These values must be configured by OEM if not +# supported in QMI LOC message +# There is one entry for each signal type +################################################## +RF_LOSS_GPS = 0 +RF_LOSS_GPS_L5 = 0 +RF_LOSS_GLO_LEFT = 0 +RF_LOSS_GLO_CENTER = 0 +RF_LOSS_GLO_RIGHT = 0 +RF_LOSS_BDS = 0 +RF_LOSS_BDS_B2A = 0 +RF_LOSS_GAL = 0 +RF_LOSS_GAL_E5 = 0 +RF_LOSS_NAVIC = 0 diff --git a/gpt-utils/Android.bp b/gpt-utils/Android.bp new file mode 100644 index 00000000..0aef9de0 --- /dev/null +++ b/gpt-utils/Android.bp @@ -0,0 +1,47 @@ +// +// 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_redbull_license" + // to get the below license kinds: + // SPDX-license-identifier-BSD + default_applicable_licenses: ["device_google_redbull_license"], +} + +cc_library { + name: "libgptutils.redbull", + vendor: true, + recovery_available: true, + shared_libs: [ + "libcutils", + "liblog", + "libz", + ], + cflags: [ + "-Wall", + "-Werror", + ], + srcs: [ + "gpt-utils.cpp", + ], + owner: "qti", + header_libs: [ + "device_kernel_headers", + ], + export_include_dirs: ["."], +} diff --git a/gpt-utils/gpt-utils.cpp b/gpt-utils/gpt-utils.cpp new file mode 100644 index 00000000..f80bfb3c --- /dev/null +++ b/gpt-utils/gpt-utils.cpp @@ -0,0 +1,1545 @@ +/* + * Copyright (c) 2013, The Linux Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of The Linux Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#define _LARGEFILE64_SOURCE /* enable lseek64() */ + +/****************************************************************************** + * INCLUDE SECTION + ******************************************************************************/ +#include <fcntl.h> +#include <string.h> +#include <errno.h> +#include <sys/stat.h> +#include <sys/ioctl.h> +#include <scsi/ufs/ioctl.h> +#include <scsi/ufs/ufs.h> +#include <unistd.h> +#include <linux/fs.h> +#include <limits.h> +#include <dirent.h> +#include <inttypes.h> +#include <linux/kernel.h> +#include <map> +#include <vector> +#include <string> +#define LOG_TAG "gpt-utils" +#include <cutils/log.h> +#include <cutils/properties.h> +#include "gpt-utils.h" +#include <endian.h> +#include <zlib.h> + + +/****************************************************************************** + * DEFINE SECTION + ******************************************************************************/ +#define BLK_DEV_FILE "/dev/block/mmcblk0" +/* list the names of the backed-up partitions to be swapped */ +/* extension used for the backup partitions - tzbak, abootbak, etc. */ +#define BAK_PTN_NAME_EXT "bak" +#define XBL_PRIMARY "/dev/block/platform/soc/1d84000.ufshc/by-name/xbl" +#define XBL_BACKUP "/dev/block/platform/soc/1d84000.ufshc/by-name/xblbak" +#define XBL_AB_PRIMARY "/dev/block/platform/soc/1d84000.ufshc/by-name/xbl_a" +#define XBL_AB_SECONDARY "/dev/block/platform/soc/1d84000.ufshc/by-name/xbl_b" +/* GPT defines */ +#define MAX_LUNS 26 +//Size of the buffer that needs to be passed to the UFS ioctl +#define UFS_ATTR_DATA_SIZE 32 +//This will allow us to get the root lun path from the path to the partition. +//i.e: from /dev/block/sdaXXX get /dev/block/sda. The assumption here is that +//the boot critical luns lie between sda to sdz which is acceptable because +//only user added external disks,etc would lie beyond that limit which do not +//contain partitions that interest us here. +#define PATH_TRUNCATE_LOC (sizeof("/dev/block/sda") - 1) + +//From /dev/block/sda get just sda +#define LUN_NAME_START_LOC (sizeof("/dev/block/") - 1) +#define BOOT_LUN_A_ID 1 +#define BOOT_LUN_B_ID 2 +/****************************************************************************** + * MACROS + ******************************************************************************/ + + +#define GET_4_BYTES(ptr) ((uint32_t) *((uint8_t *)(ptr)) | \ + ((uint32_t) *((uint8_t *)(ptr) + 1) << 8) | \ + ((uint32_t) *((uint8_t *)(ptr) + 2) << 16) | \ + ((uint32_t) *((uint8_t *)(ptr) + 3) << 24)) + +#define GET_8_BYTES(ptr) ((uint64_t) *((uint8_t *)(ptr)) | \ + ((uint64_t) *((uint8_t *)(ptr) + 1) << 8) | \ + ((uint64_t) *((uint8_t *)(ptr) + 2) << 16) | \ + ((uint64_t) *((uint8_t *)(ptr) + 3) << 24) | \ + ((uint64_t) *((uint8_t *)(ptr) + 4) << 32) | \ + ((uint64_t) *((uint8_t *)(ptr) + 5) << 40) | \ + ((uint64_t) *((uint8_t *)(ptr) + 6) << 48) | \ + ((uint64_t) *((uint8_t *)(ptr) + 7) << 56)) + +#define PUT_4_BYTES(ptr, y) *((uint8_t *)(ptr)) = (y) & 0xff; \ + *((uint8_t *)(ptr) + 1) = ((y) >> 8) & 0xff; \ + *((uint8_t *)(ptr) + 2) = ((y) >> 16) & 0xff; \ + *((uint8_t *)(ptr) + 3) = ((y) >> 24) & 0xff; + +/****************************************************************************** + * TYPES + ******************************************************************************/ +using namespace std; +enum gpt_state { + GPT_OK = 0, + GPT_BAD_SIGNATURE, + GPT_BAD_CRC +}; +//List of LUN's containing boot critical images. +//Required in the case of UFS devices +struct update_data { + char lun_list[MAX_LUNS][PATH_MAX]; + uint32_t num_valid_entries; +}; + +/****************************************************************************** + * FUNCTIONS + ******************************************************************************/ +/** + * ========================================================================== + * + * \brief Read/Write len bytes from/to block dev + * + * \param [in] fd block dev file descriptor (returned from open) + * \param [in] rw RW flag: 0 - read, != 0 - write + * \param [in] offset block dev offset [bytes] - RW start position + * \param [in] buf Pointer to the buffer containing the data + * \param [in] len RW size in bytes. Buf must be at least that big + * + * \return 0 on success + * + * ========================================================================== + */ +static int blk_rw(int fd, int rw, int64_t offset, uint8_t *buf, unsigned len) +{ + int r; + + if (lseek64(fd, offset, SEEK_SET) < 0) { + fprintf(stderr, "block dev lseek64 %" PRIi64 " failed: %s\n", offset, + strerror(errno)); + return -1; + } + + if (rw) + r = write(fd, buf, len); + else + r = read(fd, buf, len); + + if (r < 0) { + fprintf(stderr, "block dev %s failed: %s\n", rw ? "write" : "read", + strerror(errno)); + } else { + if (rw) { + r = fsync(fd); + if (r < 0) + fprintf(stderr, "fsync failed: %s\n", strerror(errno)); + } else { + r = 0; + } + } + + return r; +} + + + +/** + * ========================================================================== + * + * \brief Search within GPT for partition entry with the given name + * or it's backup twin (name-bak). + * + * \param [in] ptn_name Partition name to seek + * \param [in] pentries_start Partition entries array start pointer + * \param [in] pentries_end Partition entries array end pointer + * \param [in] pentry_size Single partition entry size [bytes] + * + * \return First partition entry pointer that matches the name or NULL + * + * ========================================================================== + */ +static uint8_t *gpt_pentry_seek(const char *ptn_name, + const uint8_t *pentries_start, + const uint8_t *pentries_end, + uint32_t pentry_size) +{ + char *pentry_name; + unsigned len = strlen(ptn_name); + + for (pentry_name = (char *) (pentries_start + PARTITION_NAME_OFFSET); + pentry_name < (char *) pentries_end; pentry_name += pentry_size) { + char name8[MAX_GPT_NAME_SIZE / 2]; + unsigned i; + + /* Partition names in GPT are UTF-16 - ignoring UTF-16 2nd byte */ + for (i = 0; i < sizeof(name8); i++) + name8[i] = pentry_name[i * 2]; + if (!strncmp(ptn_name, name8, len)) + if (name8[len] == 0 || !strcmp(&name8[len], BAK_PTN_NAME_EXT)) + return (uint8_t *) (pentry_name - PARTITION_NAME_OFFSET); + } + + return NULL; +} + + + +/** + * ========================================================================== + * + * \brief Swaps boot chain in GPT partition entries array + * + * \param [in] pentries_start Partition entries array start + * \param [in] pentries_end Partition entries array end + * \param [in] pentry_size Single partition entry size + * + * \return 0 on success, 1 if no backup partitions found + * + * ========================================================================== + */ +static int gpt_boot_chain_swap(const uint8_t *pentries_start, + const uint8_t *pentries_end, + uint32_t pentry_size) +{ + const char ptn_swap_list[][MAX_GPT_NAME_SIZE] = { PTN_SWAP_LIST }; + + int backup_not_found = 1; + unsigned i; + + for (i = 0; i < ARRAY_SIZE(ptn_swap_list); i++) { + uint8_t *ptn_entry; + uint8_t *ptn_bak_entry; + uint8_t ptn_swap[PTN_ENTRY_SIZE]; + //Skip the xbl partition on UFS devices. That is handled + //seperately. + if (gpt_utils_is_ufs_device() && !strncmp(ptn_swap_list[i], + PTN_XBL, + strlen(PTN_XBL))) + continue; + + ptn_entry = gpt_pentry_seek(ptn_swap_list[i], pentries_start, + pentries_end, pentry_size); + if (ptn_entry == NULL) + continue; + + ptn_bak_entry = gpt_pentry_seek(ptn_swap_list[i], + ptn_entry + pentry_size, pentries_end, pentry_size); + if (ptn_bak_entry == NULL) { + fprintf(stderr, "'%s' partition not backup - skip safe update\n", + ptn_swap_list[i]); + continue; + } + + /* swap primary <-> backup partition entries */ + memcpy(ptn_swap, ptn_entry, PTN_ENTRY_SIZE); + memcpy(ptn_entry, ptn_bak_entry, PTN_ENTRY_SIZE); + memcpy(ptn_bak_entry, ptn_swap, PTN_ENTRY_SIZE); + backup_not_found = 0; + } + + return backup_not_found; +} + + + +/** + * ========================================================================== + * + * \brief Sets secondary GPT boot chain + * + * \param [in] fd block dev file descriptor + * \param [in] boot Boot chain to switch to + * + * \return 0 on success + * + * ========================================================================== + */ +static int gpt2_set_boot_chain(int fd, enum boot_chain boot) +{ + int64_t gpt2_header_offset; + uint64_t pentries_start_offset; + uint32_t gpt_header_size; + uint32_t pentry_size; + uint32_t pentries_array_size; + + uint8_t *gpt_header = NULL; + uint8_t *pentries = NULL; + uint32_t crc; + uint32_t blk_size = 0; + int r; + + if (ioctl(fd, BLKSSZGET, &blk_size) != 0) { + fprintf(stderr, "Failed to get GPT device block size: %s\n", + strerror(errno)); + r = -1; + goto EXIT; + } + gpt_header = (uint8_t*)malloc(blk_size); + if (!gpt_header) { + fprintf(stderr, "Failed to allocate memory to hold GPT block\n"); + r = -1; + goto EXIT; + } + gpt2_header_offset = lseek64(fd, 0, SEEK_END) - blk_size; + if (gpt2_header_offset < 0) { + fprintf(stderr, "Getting secondary GPT header offset failed: %s\n", + strerror(errno)); + r = -1; + goto EXIT; + } + + /* Read primary GPT header from block dev */ + r = blk_rw(fd, 0, blk_size, gpt_header, blk_size); + + if (r) { + fprintf(stderr, "Failed to read primary GPT header from blk dev\n"); + goto EXIT; + } + pentries_start_offset = + GET_8_BYTES(gpt_header + PENTRIES_OFFSET) * blk_size; + pentry_size = GET_4_BYTES(gpt_header + PENTRY_SIZE_OFFSET); + pentries_array_size = + GET_4_BYTES(gpt_header + PARTITION_COUNT_OFFSET) * pentry_size; + + pentries = (uint8_t *) calloc(1, pentries_array_size); + if (pentries == NULL) { + fprintf(stderr, + "Failed to alloc memory for GPT partition entries array\n"); + r = -1; + goto EXIT; + } + /* Read primary GPT partititon entries array from block dev */ + r = blk_rw(fd, 0, pentries_start_offset, pentries, pentries_array_size); + if (r) + goto EXIT; + + crc = crc32(0, pentries, pentries_array_size); + if (GET_4_BYTES(gpt_header + PARTITION_CRC_OFFSET) != crc) { + fprintf(stderr, "Primary GPT partition entries array CRC invalid\n"); + r = -1; + goto EXIT; + } + + /* Read secondary GPT header from block dev */ + r = blk_rw(fd, 0, gpt2_header_offset, gpt_header, blk_size); + if (r) + goto EXIT; + + gpt_header_size = GET_4_BYTES(gpt_header + HEADER_SIZE_OFFSET); + pentries_start_offset = + GET_8_BYTES(gpt_header + PENTRIES_OFFSET) * blk_size; + + if (boot == BACKUP_BOOT) { + r = gpt_boot_chain_swap(pentries, pentries + pentries_array_size, + pentry_size); + if (r) + goto EXIT; + } + + crc = crc32(0, pentries, pentries_array_size); + PUT_4_BYTES(gpt_header + PARTITION_CRC_OFFSET, crc); + + /* header CRC is calculated with this field cleared */ + PUT_4_BYTES(gpt_header + HEADER_CRC_OFFSET, 0); + crc = crc32(0, gpt_header, gpt_header_size); + PUT_4_BYTES(gpt_header + HEADER_CRC_OFFSET, crc); + + /* Write the modified GPT header back to block dev */ + r = blk_rw(fd, 1, gpt2_header_offset, gpt_header, blk_size); + if (!r) + /* Write the modified GPT partititon entries array back to block dev */ + r = blk_rw(fd, 1, pentries_start_offset, pentries, + pentries_array_size); + +EXIT: + if(gpt_header) + free(gpt_header); + if (pentries) + free(pentries); + return r; +} + +/** + * ========================================================================== + * + * \brief Checks GPT state (header signature and CRC) + * + * \param [in] fd block dev file descriptor + * \param [in] gpt GPT header to be checked + * \param [out] state GPT header state + * + * \return 0 on success + * + * ========================================================================== + */ +static int gpt_get_state(int fd, enum gpt_instance gpt, enum gpt_state *state) +{ + int64_t gpt_header_offset; + uint32_t gpt_header_size; + uint8_t *gpt_header = NULL; + uint32_t crc; + uint32_t blk_size = 0; + + *state = GPT_OK; + + if (ioctl(fd, BLKSSZGET, &blk_size) != 0) { + fprintf(stderr, "Failed to get GPT device block size: %s\n", + strerror(errno)); + goto error; + } + gpt_header = (uint8_t*)malloc(blk_size); + if (!gpt_header) { + fprintf(stderr, "gpt_get_state:Failed to alloc memory for header\n"); + goto error; + } + if (gpt == PRIMARY_GPT) + gpt_header_offset = blk_size; + else { + gpt_header_offset = lseek64(fd, 0, SEEK_END) - blk_size; + if (gpt_header_offset < 0) { + fprintf(stderr, "gpt_get_state:Seek to end of GPT part fail\n"); + goto error; + } + } + + if (blk_rw(fd, 0, gpt_header_offset, gpt_header, blk_size)) { + fprintf(stderr, "gpt_get_state: blk_rw failed\n"); + goto error; + } + if (memcmp(gpt_header, GPT_SIGNATURE, sizeof(GPT_SIGNATURE))) + *state = GPT_BAD_SIGNATURE; + gpt_header_size = GET_4_BYTES(gpt_header + HEADER_SIZE_OFFSET); + + crc = GET_4_BYTES(gpt_header + HEADER_CRC_OFFSET); + /* header CRC is calculated with this field cleared */ + PUT_4_BYTES(gpt_header + HEADER_CRC_OFFSET, 0); + if (crc32(0, gpt_header, gpt_header_size) != crc) + *state = GPT_BAD_CRC; + free(gpt_header); + return 0; +error: + if (gpt_header) + free(gpt_header); + return -1; +} + + + +/** + * ========================================================================== + * + * \brief Sets GPT header state (used to corrupt and fix GPT signature) + * + * \param [in] fd block dev file descriptor + * \param [in] gpt GPT header to be checked + * \param [in] state GPT header state to set (GPT_OK or GPT_BAD_SIGNATURE) + * + * \return 0 on success + * + * ========================================================================== + */ +static int gpt_set_state(int fd, enum gpt_instance gpt, enum gpt_state state) +{ + int64_t gpt_header_offset; + uint32_t gpt_header_size; + uint8_t *gpt_header = NULL; + uint32_t crc; + uint32_t blk_size = 0; + + if (ioctl(fd, BLKSSZGET, &blk_size) != 0) { + fprintf(stderr, "Failed to get GPT device block size: %s\n", + strerror(errno)); + goto error; + } + gpt_header = (uint8_t*)malloc(blk_size); + if (!gpt_header) { + fprintf(stderr, "Failed to alloc memory for gpt header\n"); + goto error; + } + if (gpt == PRIMARY_GPT) + gpt_header_offset = blk_size; + else { + gpt_header_offset = lseek64(fd, 0, SEEK_END) - blk_size; + if (gpt_header_offset < 0) { + fprintf(stderr, "Failed to seek to end of GPT device\n"); + goto error; + } + } + if (blk_rw(fd, 0, gpt_header_offset, gpt_header, blk_size)) { + fprintf(stderr, "Failed to r/w gpt header\n"); + goto error; + } + if (state == GPT_OK) + memcpy(gpt_header, GPT_SIGNATURE, sizeof(GPT_SIGNATURE)); + else if (state == GPT_BAD_SIGNATURE) + *gpt_header = 0; + else { + fprintf(stderr, "gpt_set_state: Invalid state\n"); + goto error; + } + + gpt_header_size = GET_4_BYTES(gpt_header + HEADER_SIZE_OFFSET); + + /* header CRC is calculated with this field cleared */ + PUT_4_BYTES(gpt_header + HEADER_CRC_OFFSET, 0); + crc = crc32(0, gpt_header, gpt_header_size); + PUT_4_BYTES(gpt_header + HEADER_CRC_OFFSET, crc); + + if (blk_rw(fd, 1, gpt_header_offset, gpt_header, blk_size)) { + fprintf(stderr, "gpt_set_state: blk write failed\n"); + goto error; + } + return 0; +error: + if(gpt_header) + free(gpt_header); + return -1; +} + +int get_scsi_node_from_bootdevice(const char *bootdev_path, + char *sg_node_path, + size_t buf_size) +{ + char sg_dir_path[PATH_MAX] = {0}; + char real_path[PATH_MAX] = {0}; + DIR *scsi_dir = NULL; + struct dirent *de; + int node_found = 0; + if (!bootdev_path || !sg_node_path) { + fprintf(stderr, "%s : invalid argument\n", + __func__); + goto error; + } + if (readlink(bootdev_path, real_path, sizeof(real_path) - 1) < 0) { + fprintf(stderr, "failed to resolve link for %s(%s)\n", + bootdev_path, + strerror(errno)); + goto error; + } + if(strlen(real_path) < PATH_TRUNCATE_LOC + 1){ + fprintf(stderr, "Unrecognized path :%s:\n", + real_path); + goto error; + } + //For the safe side in case there are additional partitions on + //the XBL lun we truncate the name. + real_path[PATH_TRUNCATE_LOC] = '\0'; + if(strlen(real_path) < LUN_NAME_START_LOC + 1){ + fprintf(stderr, "Unrecognized truncated path :%s:\n", + real_path); + goto error; + } + //This will give us /dev/block/sdb/device/scsi_generic + //which contains a file sgY whose name gives us the path + //to /dev/sgY which we return + snprintf(sg_dir_path, sizeof(sg_dir_path) - 1, + "/sys/block/%s/device/scsi_generic", + &real_path[LUN_NAME_START_LOC]); + scsi_dir = opendir(sg_dir_path); + if (!scsi_dir) { + fprintf(stderr, "%s : Failed to open %s(%s)\n", + __func__, + sg_dir_path, + strerror(errno)); + goto error; + } + while((de = readdir(scsi_dir))) { + if (de->d_name[0] == '.') + continue; + else if (!strncmp(de->d_name, "sg", 2)) { + snprintf(sg_node_path, + buf_size -1, + "/dev/%s", + de->d_name); + fprintf(stderr, "%s:scsi generic node is :%s:\n", + __func__, + sg_node_path); + node_found = 1; + break; + } + } + if(!node_found) { + fprintf(stderr,"%s: Unable to locate scsi generic node\n", + __func__); + goto error; + } + closedir(scsi_dir); + return 0; +error: + if (scsi_dir) + closedir(scsi_dir); + return -1; +} + +int set_boot_lun(char *sg_dev, uint8_t boot_lun_id) +{ + int fd = -1; + int rc; + struct ufs_ioctl_query_data *data = NULL; + size_t ioctl_data_size = sizeof(struct ufs_ioctl_query_data) + UFS_ATTR_DATA_SIZE; + + data = (struct ufs_ioctl_query_data*)malloc(ioctl_data_size); + if (!data) { + fprintf(stderr, "%s: Failed to alloc query data struct\n", + __func__); + goto error; + } + memset(data, 0, ioctl_data_size); + data->opcode = UPIU_QUERY_OPCODE_WRITE_ATTR; + data->idn = QUERY_ATTR_IDN_BOOT_LU_EN; + data->buf_size = UFS_ATTR_DATA_SIZE; + data->buffer[0] = boot_lun_id; + fd = open(sg_dev, O_RDWR); + if (fd < 0) { + fprintf(stderr, "%s: Failed to open %s(%s)\n", + __func__, + sg_dev, + strerror(errno)); + goto error; + } + rc = ioctl(fd, UFS_IOCTL_QUERY, data); + if (rc) { + fprintf(stderr, "%s: UFS query ioctl failed(%s)\n", + __func__, + strerror(errno)); + goto error; + } + close(fd); + free(data); + return 0; +error: + if (fd >= 0) + close(fd); + if (data) + free(data); + return -1; +} + +//Swtich betwieen using either the primary or the backup +//boot LUN for boot. This is required since UFS boot partitions +//cannot have a backup GPT which is what we use for failsafe +//updates of the other 'critical' partitions. This function will +//not be invoked for emmc targets and on UFS targets is only required +//to be invoked for XBL. +// +//The algorithm to do this is as follows: +//- Find the real block device(eg: /dev/block/sdb) that corresponds +// to the /dev/block/bootdevice/by-name/xbl(bak) symlink +// +//- Once we have the block device 'node' name(sdb in the above example) +// use this node to to locate the scsi generic device that represents +// it by checking the file /sys/block/sdb/device/scsi_generic/sgY +// +//- Once we locate sgY we call the query ioctl on /dev/sgy to switch +//the boot lun to either LUNA or LUNB +int gpt_utils_set_xbl_boot_partition(enum boot_chain chain) +{ + struct stat st; + ///sys/block/sdX/device/scsi_generic/ + char sg_dev_node[PATH_MAX] = {0}; + uint8_t boot_lun_id = 0; + const char *boot_dev = NULL; + + if (chain == BACKUP_BOOT) { + boot_lun_id = BOOT_LUN_B_ID; + if (!stat(XBL_BACKUP, &st)) + boot_dev = XBL_BACKUP; + else if (!stat(XBL_AB_SECONDARY, &st)) + boot_dev = XBL_AB_SECONDARY; + else { + fprintf(stderr, "%s: Failed to locate secondary xbl\n", + __func__); + goto error; + } + } else if (chain == NORMAL_BOOT) { + boot_lun_id = BOOT_LUN_A_ID; + if (!stat(XBL_PRIMARY, &st)) + boot_dev = XBL_PRIMARY; + else if (!stat(XBL_AB_PRIMARY, &st)) + boot_dev = XBL_AB_PRIMARY; + else { + fprintf(stderr, "%s: Failed to locate primary xbl\n", + __func__); + goto error; + } + } else { + fprintf(stderr, "%s: Invalid boot chain id\n", __func__); + goto error; + } + //We need either both xbl and xblbak or both xbl_a and xbl_b to exist at + //the same time. If not the current configuration is invalid. + if((stat(XBL_PRIMARY, &st) || + stat(XBL_BACKUP, &st)) && + (stat(XBL_AB_PRIMARY, &st) || + stat(XBL_AB_SECONDARY, &st))) { + fprintf(stderr, "%s:primary/secondary XBL prt not found(%s)\n", + __func__, + strerror(errno)); + goto error; + } + fprintf(stderr, "%s: setting %s lun as boot lun\n", + __func__, + boot_dev); + if (get_scsi_node_from_bootdevice(boot_dev, + sg_dev_node, + sizeof(sg_dev_node))) { + fprintf(stderr, "%s: Failed to get scsi node path for xblbak\n", + __func__); + goto error; + } + if (set_boot_lun(sg_dev_node, boot_lun_id)) { + fprintf(stderr, "%s: Failed to set xblbak as boot partition\n", + __func__); + goto error; + } + return 0; +error: + return -1; +} + +int gpt_utils_is_ufs_device() +{ + char bootdevice[PROPERTY_VALUE_MAX] = {0}; + property_get("ro.boot.bootdevice", bootdevice, "N/A"); + if (strlen(bootdevice) < strlen(".ufshc") + 1) + return 0; + return (!strncmp(&bootdevice[strlen(bootdevice) - strlen(".ufshc")], + ".ufshc", + sizeof(".ufshc"))); +} +//dev_path is the path to the block device that contains the GPT image that +//needs to be updated. This would be the device which holds one or more critical +//boot partitions and their backups. In the case of EMMC this function would +//be invoked only once on /dev/block/mmcblk1 since it holds the GPT image +//containing all the partitions For UFS devices it could potentially be +//invoked multiple times, once for each LUN containing critical image(s) and +//their backups +int prepare_partitions(enum boot_update_stage stage, const char *dev_path) +{ + int r = 0; + int fd = -1; + int is_ufs = gpt_utils_is_ufs_device(); + enum gpt_state gpt_prim, gpt_second; + enum boot_update_stage internal_stage; + struct stat xbl_partition_stat; + + if (!dev_path) { + fprintf(stderr, "%s: Invalid dev_path\n", + __func__); + r = -1; + goto EXIT; + } + fd = open(dev_path, O_RDWR); + if (fd < 0) { + fprintf(stderr, "%s: Opening '%s' failed: %s\n", + __func__, + BLK_DEV_FILE, + strerror(errno)); + r = -1; + goto EXIT; + } + r = gpt_get_state(fd, PRIMARY_GPT, &gpt_prim) || + gpt_get_state(fd, SECONDARY_GPT, &gpt_second); + if (r) { + fprintf(stderr, "%s: Getting GPT headers state failed\n", + __func__); + goto EXIT; + } + + /* These 2 combinations are unexpected and unacceptable */ + if (gpt_prim == GPT_BAD_CRC || gpt_second == GPT_BAD_CRC) { + fprintf(stderr, "%s: GPT headers CRC corruption detected, aborting\n", + __func__); + r = -1; + goto EXIT; + } + if (gpt_prim == GPT_BAD_SIGNATURE && gpt_second == GPT_BAD_SIGNATURE) { + fprintf(stderr, "%s: Both GPT headers corrupted, aborting\n", + __func__); + r = -1; + goto EXIT; + } + + /* Check internal update stage according GPT headers' state */ + if (gpt_prim == GPT_OK && gpt_second == GPT_OK) + internal_stage = UPDATE_MAIN; + else if (gpt_prim == GPT_BAD_SIGNATURE) + internal_stage = UPDATE_BACKUP; + else if (gpt_second == GPT_BAD_SIGNATURE) + internal_stage = UPDATE_FINALIZE; + else { + fprintf(stderr, "%s: Abnormal GPTs state: primary (%d), secondary (%d), " + "aborting\n", __func__, gpt_prim, gpt_second); + r = -1; + goto EXIT; + } + + /* Stage already set - ready for update, exitting */ + if ((int) stage == (int) internal_stage - 1) + goto EXIT; + /* Unexpected stage given */ + if (stage != internal_stage) { + r = -1; + goto EXIT; + } + + switch (stage) { + case UPDATE_MAIN: + if (is_ufs) { + if(stat(XBL_PRIMARY, &xbl_partition_stat)|| + stat(XBL_BACKUP, &xbl_partition_stat)){ + //Non fatal error. Just means this target does not + //use XBL but relies on sbl whose update is handled + //by the normal methods. + fprintf(stderr, "%s: xbl part not found(%s).Assuming sbl in use\n", + __func__, + strerror(errno)); + } else { + //Switch the boot lun so that backup boot LUN is used + r = gpt_utils_set_xbl_boot_partition(BACKUP_BOOT); + if(r){ + fprintf(stderr, "%s: Failed to set xbl backup partition as boot\n", + __func__); + goto EXIT; + } + } + } + //Fix up the backup GPT table so that it actually points to + //the backup copy of the boot critical images + fprintf(stderr, "%s: Preparing for primary partition update\n", + __func__); + r = gpt2_set_boot_chain(fd, BACKUP_BOOT); + if (r) { + if (r < 0) + fprintf(stderr, + "%s: Setting secondary GPT to backup boot failed\n", + __func__); + /* No backup partitions - do not corrupt GPT, do not flag error */ + else + r = 0; + goto EXIT; + } + //corrupt the primary GPT so that the backup(which now points to + //the backup boot partitions is used) + r = gpt_set_state(fd, PRIMARY_GPT, GPT_BAD_SIGNATURE); + if (r) { + fprintf(stderr, "%s: Corrupting primary GPT header failed\n", + __func__); + goto EXIT; + } + break; + case UPDATE_BACKUP: + if (is_ufs) { + if(stat(XBL_PRIMARY, &xbl_partition_stat)|| + stat(XBL_BACKUP, &xbl_partition_stat)){ + //Non fatal error. Just means this target does not + //use XBL but relies on sbl whose update is handled + //by the normal methods. + fprintf(stderr, "%s: xbl part not found(%s).Assuming sbl in use\n", + __func__, + strerror(errno)); + } else { + //Switch the boot lun so that backup boot LUN is used + r = gpt_utils_set_xbl_boot_partition(NORMAL_BOOT); + if(r) { + fprintf(stderr, "%s: Failed to set xbl backup partition as boot\n", + __func__); + goto EXIT; + } + } + } + //Fix the primary GPT header so that is used + fprintf(stderr, "%s: Preparing for backup partition update\n", + __func__); + r = gpt_set_state(fd, PRIMARY_GPT, GPT_OK); + if (r) { + fprintf(stderr, "%s: Fixing primary GPT header failed\n", + __func__); + goto EXIT; + } + //Corrupt the scondary GPT header + r = gpt_set_state(fd, SECONDARY_GPT, GPT_BAD_SIGNATURE); + if (r) { + fprintf(stderr, "%s: Corrupting secondary GPT header failed\n", + __func__); + goto EXIT; + } + break; + case UPDATE_FINALIZE: + //Undo the changes we had made in the UPDATE_MAIN stage so that the + //primary/backup GPT headers once again point to the same set of + //partitions + fprintf(stderr, "%s: Finalizing partitions\n", + __func__); + r = gpt2_set_boot_chain(fd, NORMAL_BOOT); + if (r < 0) { + fprintf(stderr, "%s: Setting secondary GPT to normal boot failed\n", + __func__); + goto EXIT; + } + + r = gpt_set_state(fd, SECONDARY_GPT, GPT_OK); + if (r) { + fprintf(stderr, "%s: Fixing secondary GPT header failed\n", + __func__); + goto EXIT; + } + break; + default:; + } + +EXIT: + if (fd >= 0) { + fsync(fd); + close(fd); + } + return r; +} + +int add_lun_to_update_list(char *lun_path, struct update_data *dat) +{ + uint32_t i = 0; + struct stat st; + if (!lun_path || !dat){ + fprintf(stderr, "%s: Invalid data", + __func__); + return -1; + } + if (stat(lun_path, &st)) { + fprintf(stderr, "%s: Unable to access %s. Skipping adding to list", + __func__, + lun_path); + return -1; + } + if (dat->num_valid_entries == 0) { + fprintf(stderr, "%s: Copying %s into lun_list[%d]\n", + __func__, + lun_path, + i); + strlcpy(dat->lun_list[0], lun_path, + PATH_MAX * sizeof(char)); + dat->num_valid_entries = 1; + } else { + for (i = 0; (i < dat->num_valid_entries) && + (dat->num_valid_entries < MAX_LUNS - 1); i++) { + //Check if the current LUN is not already part + //of the lun list + if (!strncmp(lun_path,dat->lun_list[i], + strlen(dat->lun_list[i]))) { + //LUN already in list..Return + return 0; + } + } + fprintf(stderr, "%s: Copying %s into lun_list[%d]\n", + __func__, + lun_path, + dat->num_valid_entries); + //Add LUN path lun list + strlcpy(dat->lun_list[dat->num_valid_entries], lun_path, + PATH_MAX * sizeof(char)); + dat->num_valid_entries++; + } + return 0; +} + +int prepare_boot_update(enum boot_update_stage stage) +{ + int is_ufs = gpt_utils_is_ufs_device(); + struct stat ufs_dir_stat; + struct update_data data; + int rcode = 0; + uint32_t i = 0; + int is_error = 0; + const char ptn_swap_list[][MAX_GPT_NAME_SIZE] = { PTN_SWAP_LIST }; + //Holds /dev/block/bootdevice/by-name/*bak entry + char buf[PATH_MAX] = {0}; + //Holds the resolved path of the symlink stored in buf + char real_path[PATH_MAX] = {0}; + + if (!is_ufs) { + //emmc device. Just pass in path to mmcblk0 + return prepare_partitions(stage, BLK_DEV_FILE); + } else { + //Now we need to find the list of LUNs over + //which the boot critical images are spread + //and set them up for failsafe updates.To do + //this we find out where the symlinks for the + //each of the paths under + ///dev/block/bootdevice/by-name/PTN_SWAP_LIST + //actually point to. + fprintf(stderr, "%s: Running on a UFS device\n", + __func__); + memset(&data, '\0', sizeof(struct update_data)); + for (i=0; i < ARRAY_SIZE(ptn_swap_list); i++) { + //XBL on UFS does not follow the convention + //of being loaded based on well known GUID'S. + //We take care of switching the UFS boot LUN + //explicitly later on. + if (!strncmp(ptn_swap_list[i], + PTN_XBL, + strlen(PTN_XBL))) + continue; + snprintf(buf, sizeof(buf), + "%s/%sbak", + BOOT_DEV_DIR, + ptn_swap_list[i]); + if (stat(buf, &ufs_dir_stat)) { + continue; + } + if (readlink(buf, real_path, sizeof(real_path) - 1) < 0) + { + fprintf(stderr, "%s: readlink error. Skipping %s", + __func__, + strerror(errno)); + } else { + if(strlen(real_path) < PATH_TRUNCATE_LOC + 1){ + fprintf(stderr, "Unknown path.Skipping :%s:\n", + real_path); + } else { + real_path[PATH_TRUNCATE_LOC] = '\0'; + add_lun_to_update_list(real_path, &data); + } + } + memset(buf, '\0', sizeof(buf)); + memset(real_path, '\0', sizeof(real_path)); + } + for (i=0; i < data.num_valid_entries; i++) { + fprintf(stderr, "%s: Preparing %s for update stage %d\n", + __func__, + data.lun_list[i], + stage); + rcode = prepare_partitions(stage, data.lun_list[i]); + if (rcode != 0) + { + fprintf(stderr, "%s: Failed to prepare %s.Continuing..\n", + __func__, + data.lun_list[i]); + is_error = 1; + } + } + } + if (is_error) + return -1; + return 0; +} + +//Given a parttion name(eg: rpm) get the path to the block device that +//represents the GPT disk the partition resides on. In the case of emmc it +//would be the default emmc dev(/dev/block/mmcblk0). In the case of UFS we look +//through the /dev/block/bootdevice/by-name/ tree for partname, and resolve +//the path to the LUN from there. +static int get_dev_path_from_partition_name(const char *partname, + char *buf, + size_t buflen) +{ + struct stat st; + char path[PATH_MAX] = {0}; + if (!partname || !buf || buflen < ((PATH_TRUNCATE_LOC) + 1)) { + ALOGE("%s: Invalid argument", __func__); + goto error; + } + if (gpt_utils_is_ufs_device()) { + //Need to find the lun that holds partition partname + snprintf(path, sizeof(path), + "%s/%s", + BOOT_DEV_DIR, + partname); + if (stat(path, &st)) { + goto error; + } + if (readlink(path, buf, buflen) < 0) + { + goto error; + } else { + buf[PATH_TRUNCATE_LOC] = '\0'; + } + } else { + snprintf(buf, buflen, "/dev/block/mmcblk0"); + } + return 0; + +error: + return -1; +} + +int gpt_utils_get_partition_map(vector<string>& ptn_list, + map<string, vector<string>>& partition_map) { + char devpath[PATH_MAX] = {'\0'}; + map<string, vector<string>>::iterator it; + if (ptn_list.size() < 1) { + fprintf(stderr, "%s: Invalid ptn list\n", __func__); + return -1; + } + //Go through the passed in list + for (uint32_t i = 0; i < ptn_list.size(); i++) + { + //Key in the map is the path to the device that holds the + //partition + if (get_dev_path_from_partition_name(ptn_list[i].c_str(), + devpath, + sizeof(devpath))) { + //Not necessarily an error. The partition may just + //not be present. + continue; + } + string path = devpath; + it = partition_map.find(path); + if (it != partition_map.end()) { + it->second.push_back(ptn_list[i]); + } else { + vector<string> str_vec; + str_vec.push_back( ptn_list[i]); + partition_map.insert(pair<string, vector<string>> + (path, str_vec)); + } + memset(devpath, '\0', sizeof(devpath)); + } + return 0; +} + +//Get the block size of the disk represented by decsriptor fd +static uint32_t gpt_get_block_size(int fd) +{ + uint32_t block_size = 0; + if (fd < 0) { + ALOGE("%s: invalid descriptor", + __func__); + goto error; + } + if (ioctl(fd, BLKSSZGET, &block_size) != 0) { + ALOGE("%s: Failed to get GPT dev block size : %s", + __func__, + strerror(errno)); + goto error; + } + return block_size; +error: + return 0; +} + +//Write the GPT header present in the passed in buffer back to the +//disk represented by fd +static int gpt_set_header(uint8_t *gpt_header, int fd, + enum gpt_instance instance) +{ + uint32_t block_size = 0; + off_t gpt_header_offset = 0; + if (!gpt_header || fd < 0) { + ALOGE("%s: Invalid arguments", + __func__); + goto error; + } + block_size = gpt_get_block_size(fd); + ALOGI("%s: Block size is : %d", __func__, block_size); + if (block_size == 0) { + ALOGE("%s: Failed to get block size", __func__); + goto error; + } + if (instance == PRIMARY_GPT) + gpt_header_offset = block_size; + else + gpt_header_offset = lseek64(fd, 0, SEEK_END) - block_size; + if (gpt_header_offset <= 0) { + ALOGE("%s: Failed to get gpt header offset",__func__); + goto error; + } + ALOGI("%s: Writing back header to offset %ld", __func__, + gpt_header_offset); + if (blk_rw(fd, 1, gpt_header_offset, gpt_header, block_size)) { + ALOGE("%s: Failed to write back GPT header", __func__); + goto error; + } + return 0; +error: + return -1; +} + +//Read out the GPT header for the disk that contains the partition partname +static uint8_t* gpt_get_header(const char *partname, enum gpt_instance instance) +{ + uint8_t* hdr = NULL; + char devpath[PATH_MAX] = {0}; + int64_t hdr_offset = 0; + uint32_t block_size = 0; + int fd = -1; + if (!partname) { + ALOGE("%s: Invalid partition name", __func__); + goto error; + } + if (get_dev_path_from_partition_name(partname, devpath, sizeof(devpath)) + != 0) { + ALOGE("%s: Failed to resolve path for %s", + __func__, + partname); + goto error; + } + fd = open(devpath, O_RDWR); + if (fd < 0) { + ALOGE("%s: Failed to open %s : %s", + __func__, + devpath, + strerror(errno)); + goto error; + } + block_size = gpt_get_block_size(fd); + if (block_size == 0) + { + ALOGE("%s: Failed to get gpt block size for %s", + __func__, + partname); + goto error; + } + + hdr = (uint8_t*)malloc(block_size); + if (!hdr) { + ALOGE("%s: Failed to allocate memory for gpt header", + __func__); + } + if (instance == PRIMARY_GPT) + hdr_offset = block_size; + else { + hdr_offset = lseek64(fd, 0, SEEK_END) - block_size; + } + if (hdr_offset < 0) { + ALOGE("%s: Failed to get gpt header offset", + __func__); + goto error; + } + if (blk_rw(fd, 0, hdr_offset, hdr, block_size)) { + ALOGE("%s: Failed to read GPT header from device", + __func__); + goto error; + } + close(fd); + return hdr; +error: + if (fd >= 0) + close(fd); + if (hdr) + free(hdr); + return NULL; +} + +//Returns the partition entry array based on the +//passed in buffer which contains the gpt header. +//The fd here is the descriptor for the 'disk' which +//holds the partition +static uint8_t* gpt_get_pentry_arr(uint8_t *hdr, int fd) +{ + uint64_t pentries_start = 0; + uint32_t pentry_size = 0; + uint32_t block_size = 0; + uint32_t pentries_arr_size = 0; + uint8_t *pentry_arr = NULL; + int rc = 0; + if (!hdr) { + ALOGE("%s: Invalid header", __func__); + goto error; + } + if (fd < 0) { + ALOGE("%s: Invalid fd", __func__); + goto error; + } + block_size = gpt_get_block_size(fd); + if (!block_size) { + ALOGE("%s: Failed to get gpt block size for", + __func__); + goto error; + } + pentries_start = GET_8_BYTES(hdr + PENTRIES_OFFSET) * block_size; + pentry_size = GET_4_BYTES(hdr + PENTRY_SIZE_OFFSET); + pentries_arr_size = + GET_4_BYTES(hdr + PARTITION_COUNT_OFFSET) * pentry_size; + pentry_arr = (uint8_t*)calloc(1, pentries_arr_size); + if (!pentry_arr) { + ALOGE("%s: Failed to allocate memory for partition array", + __func__); + goto error; + } + rc = blk_rw(fd, 0, + pentries_start, + pentry_arr, + pentries_arr_size); + if (rc) { + ALOGE("%s: Failed to read partition entry array", + __func__); + goto error; + } + return pentry_arr; +error: + if (pentry_arr) + free(pentry_arr); + return NULL; +} + +static int gpt_set_pentry_arr(uint8_t *hdr, int fd, uint8_t* arr) +{ + uint32_t block_size = 0; + uint64_t pentries_start = 0; + uint32_t pentry_size = 0; + uint32_t pentries_arr_size = 0; + int rc = 0; + if (!hdr || fd < 0 || !arr) { + ALOGE("%s: Invalid argument", __func__); + goto error; + } + block_size = gpt_get_block_size(fd); + if (!block_size) { + ALOGE("%s: Failed to get gpt block size for", + __func__); + goto error; + } + ALOGI("%s : Block size is %d", __func__, block_size); + pentries_start = GET_8_BYTES(hdr + PENTRIES_OFFSET) * block_size; + pentry_size = GET_4_BYTES(hdr + PENTRY_SIZE_OFFSET); + pentries_arr_size = + GET_4_BYTES(hdr + PARTITION_COUNT_OFFSET) * pentry_size; + ALOGI("%s: Writing partition entry array of size %d to offset %" PRIu64, + __func__, + pentries_arr_size, + pentries_start); + rc = blk_rw(fd, 1, + pentries_start, + arr, + pentries_arr_size); + if (rc) { + ALOGE("%s: Failed to read partition entry array", + __func__); + goto error; + } + return 0; +error: + return -1; +} + + + +//Allocate a handle used by calls to the "gpt_disk" api's +struct gpt_disk * gpt_disk_alloc() +{ + struct gpt_disk *disk; + disk = (struct gpt_disk *)malloc(sizeof(struct gpt_disk)); + if (!disk) { + ALOGE("%s: Failed to allocate memory", __func__); + goto end; + } + memset(disk, 0, sizeof(struct gpt_disk)); +end: + return disk; +} + +//Free previously allocated/initialized handle +void gpt_disk_free(struct gpt_disk *disk) +{ + if (!disk) + return; + if (disk->hdr) + free(disk->hdr); + if (disk->hdr_bak) + free(disk->hdr_bak); + if (disk->pentry_arr) + free(disk->pentry_arr); + if (disk->pentry_arr_bak) + free(disk->pentry_arr_bak); + free(disk); + return; +} + +//fills up the passed in gpt_disk struct with information about the +//disk represented by path dev. Returns 0 on success and -1 on error. +int gpt_disk_get_disk_info(const char *dev, struct gpt_disk *dsk) +{ + struct gpt_disk *disk = NULL; + int fd = -1; + uint32_t gpt_header_size = 0; + + if (!dsk || !dev) { + ALOGE("%s: Invalid arguments", __func__); + goto error; + } + disk = dsk; + disk->hdr = gpt_get_header(dev, PRIMARY_GPT); + if (!disk->hdr) { + ALOGE("%s: Failed to get primary header", __func__); + goto error; + } + gpt_header_size = GET_4_BYTES(disk->hdr + HEADER_SIZE_OFFSET); + disk->hdr_crc = crc32(0, disk->hdr, gpt_header_size); + disk->hdr_bak = gpt_get_header(dev, PRIMARY_GPT); + if (!disk->hdr_bak) { + ALOGE("%s: Failed to get backup header", __func__); + goto error; + } + disk->hdr_bak_crc = crc32(0, disk->hdr_bak, gpt_header_size); + + //Descriptor for the block device. We will use this for further + //modifications to the partition table + if (get_dev_path_from_partition_name(dev, + disk->devpath, + sizeof(disk->devpath)) != 0) { + ALOGE("%s: Failed to resolve path for %s", + __func__, + dev); + goto error; + } + fd = open(disk->devpath, O_RDWR); + if (fd < 0) { + ALOGE("%s: Failed to open %s: %s", + __func__, + disk->devpath, + strerror(errno)); + goto error; + } + disk->pentry_arr = gpt_get_pentry_arr(disk->hdr, fd); + if (!disk->pentry_arr) { + ALOGE("%s: Failed to obtain partition entry array", + __func__); + goto error; + } + disk->pentry_arr_bak = gpt_get_pentry_arr(disk->hdr_bak, fd); + if (!disk->pentry_arr_bak) { + ALOGE("%s: Failed to obtain backup partition entry array", + __func__); + goto error; + } + disk->pentry_size = GET_4_BYTES(disk->hdr + PENTRY_SIZE_OFFSET); + disk->pentry_arr_size = + GET_4_BYTES(disk->hdr + PARTITION_COUNT_OFFSET) * + disk->pentry_size; + disk->pentry_arr_crc = GET_4_BYTES(disk->hdr + PARTITION_CRC_OFFSET); + disk->pentry_arr_bak_crc = GET_4_BYTES(disk->hdr_bak + + PARTITION_CRC_OFFSET); + disk->block_size = gpt_get_block_size(fd); + close(fd); + disk->is_initialized = GPT_DISK_INIT_MAGIC; + return 0; +error: + if (fd >= 0) + close(fd); + return -1; +} + +//Get pointer to partition entry from a allocated gpt_disk structure +uint8_t* gpt_disk_get_pentry(struct gpt_disk *disk, + const char *partname, + enum gpt_instance instance) +{ + uint8_t *ptn_arr = NULL; + if (!disk || !partname || disk->is_initialized != GPT_DISK_INIT_MAGIC) { + ALOGE("%s: Invalid argument",__func__); + goto error; + } + ptn_arr = (instance == PRIMARY_GPT) ? + disk->pentry_arr : disk->pentry_arr_bak; + return (gpt_pentry_seek(partname, ptn_arr, + ptn_arr + disk->pentry_arr_size , + disk->pentry_size)); +error: + return NULL; +} + +//Update CRC values for the various components of the gpt_disk +//structure. This function should be called after any of the fields +//have been updated before the structure contents are written back to +//disk. +int gpt_disk_update_crc(struct gpt_disk *disk) +{ + uint32_t gpt_header_size = 0; + if (!disk || (disk->is_initialized != GPT_DISK_INIT_MAGIC)) { + ALOGE("%s: invalid argument", __func__); + goto error; + } + //Recalculate the CRC of the primary partiton array + disk->pentry_arr_crc = crc32(0, + disk->pentry_arr, + disk->pentry_arr_size); + //Recalculate the CRC of the backup partition array + disk->pentry_arr_bak_crc = crc32(0, + disk->pentry_arr_bak, + disk->pentry_arr_size); + //Update the partition CRC value in the primary GPT header + PUT_4_BYTES(disk->hdr + PARTITION_CRC_OFFSET, disk->pentry_arr_crc); + //Update the partition CRC value in the backup GPT header + PUT_4_BYTES(disk->hdr_bak + PARTITION_CRC_OFFSET, + disk->pentry_arr_bak_crc); + //Update the CRC value of the primary header + gpt_header_size = GET_4_BYTES(disk->hdr + HEADER_SIZE_OFFSET); + //Header CRC is calculated with its own CRC field set to 0 + PUT_4_BYTES(disk->hdr + HEADER_CRC_OFFSET, 0); + PUT_4_BYTES(disk->hdr_bak + HEADER_CRC_OFFSET, 0); + disk->hdr_crc = crc32(0, disk->hdr, gpt_header_size); + disk->hdr_bak_crc = crc32(0, disk->hdr_bak, gpt_header_size); + PUT_4_BYTES(disk->hdr + HEADER_CRC_OFFSET, disk->hdr_crc); + PUT_4_BYTES(disk->hdr_bak + HEADER_CRC_OFFSET, disk->hdr_bak_crc); + return 0; +error: + return -1; +} + +//Write the contents of struct gpt_disk back to the actual disk +int gpt_disk_commit(struct gpt_disk *disk) +{ + int fd = -1; + if (!disk || (disk->is_initialized != GPT_DISK_INIT_MAGIC)){ + ALOGE("%s: Invalid args", __func__); + goto error; + } + fd = open(disk->devpath, O_RDWR); + if (fd < 0) { + ALOGE("%s: Failed to open %s: %s", + __func__, + disk->devpath, + strerror(errno)); + goto error; + } + ALOGI("%s: Writing back primary GPT header", __func__); + //Write the primary header + if(gpt_set_header(disk->hdr, fd, PRIMARY_GPT) != 0) { + ALOGE("%s: Failed to update primary GPT header", + __func__); + goto error; + } + ALOGI("%s: Writing back primary partition array", __func__); + //Write back the primary partition array + if (gpt_set_pentry_arr(disk->hdr, fd, disk->pentry_arr)) { + ALOGE("%s: Failed to write primary GPT partition arr", + __func__); + goto error; + } + close(fd); + return 0; +error: + if (fd >= 0) + close(fd); + return -1; +} diff --git a/gpt-utils/gpt-utils.h b/gpt-utils/gpt-utils.h new file mode 100644 index 00000000..f4e0b12d --- /dev/null +++ b/gpt-utils/gpt-utils.h @@ -0,0 +1,197 @@ +/* + * Copyright (c) 2013, The Linux Foundation. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of The Linux Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN + * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef __GPT_UTILS_H__ +#define __GPT_UTILS_H__ +#include <vector> +#include <string> +#include <map> +#ifdef __cplusplus +extern "C" { +#endif +#include <unistd.h> +#include <stdlib.h> +/****************************************************************************** + * GPT HEADER DEFINES + ******************************************************************************/ +#define GPT_SIGNATURE "EFI PART" +#define HEADER_SIZE_OFFSET 12 +#define HEADER_CRC_OFFSET 16 +#define PRIMARY_HEADER_OFFSET 24 +#define BACKUP_HEADER_OFFSET 32 +#define FIRST_USABLE_LBA_OFFSET 40 +#define LAST_USABLE_LBA_OFFSET 48 +#define PENTRIES_OFFSET 72 +#define PARTITION_COUNT_OFFSET 80 +#define PENTRY_SIZE_OFFSET 84 +#define PARTITION_CRC_OFFSET 88 + +#define TYPE_GUID_OFFSET 0 +#define TYPE_GUID_SIZE 16 +#define PTN_ENTRY_SIZE 128 +#define UNIQUE_GUID_OFFSET 16 +#define FIRST_LBA_OFFSET 32 +#define LAST_LBA_OFFSET 40 +#define ATTRIBUTE_FLAG_OFFSET 48 +#define PARTITION_NAME_OFFSET 56 +#define MAX_GPT_NAME_SIZE 72 + +/****************************************************************************** + * AB RELATED DEFINES + ******************************************************************************/ +//Bit 48 onwords in the attribute field are the ones where we are allowed to +//store our AB attributes. +#define AB_FLAG_OFFSET (ATTRIBUTE_FLAG_OFFSET + 6) +#define GPT_DISK_INIT_MAGIC 0xABCD +#define AB_PARTITION_ATTR_SLOT_ACTIVE (0x1<<2) +#define AB_PARTITION_ATTR_BOOT_SUCCESSFUL (0x1<<6) +#define AB_PARTITION_ATTR_UNBOOTABLE (0x1<<7) +#define AB_SLOT_ACTIVE_VAL 0xF +#define AB_SLOT_INACTIVE_VAL 0x0 +#define AB_SLOT_ACTIVE 1 +#define AB_SLOT_INACTIVE 0 +#define AB_SLOT_A_SUFFIX "_a" +#define AB_SLOT_B_SUFFIX "_b" +#define PTN_XBL "xbl" +#define PTN_SWAP_LIST PTN_XBL, \ + "abl", "aop", "devcfg", \ + "dtbo", "hyp", "keymaster", "qupfw", "tz", \ + "uefisecapp", "vbmeta", "vbmeta_system", "xbl_config", \ + "featenabler" + +#define AB_PTN_LIST PTN_SWAP_LIST, "boot", "vendor_boot", "system", "vendor", "system_ext", "modem", "product" +#define BOOT_DEV_DIR "/dev/block/bootdevice/by-name" + +/****************************************************************************** + * HELPER MACROS + ******************************************************************************/ +#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) +/****************************************************************************** + * TYPES + ******************************************************************************/ +enum boot_update_stage { + UPDATE_MAIN = 1, + UPDATE_BACKUP, + UPDATE_FINALIZE +}; + +enum gpt_instance { + PRIMARY_GPT = 0, + SECONDARY_GPT +}; + +enum boot_chain { + NORMAL_BOOT = 0, + BACKUP_BOOT +}; + +struct gpt_disk { + //GPT primary header + uint8_t *hdr; + //primary header crc + uint32_t hdr_crc; + //GPT backup header + uint8_t *hdr_bak; + //backup header crc + uint32_t hdr_bak_crc; + //Partition entries array + uint8_t *pentry_arr; + //Partition entries array for backup table + uint8_t *pentry_arr_bak; + //Size of the pentry array + uint32_t pentry_arr_size; + //Size of each element in the pentry array + uint32_t pentry_size; + //CRC of the partition entry array + uint32_t pentry_arr_crc; + //CRC of the backup partition entry array + uint32_t pentry_arr_bak_crc; + //Path to block dev representing the disk + char devpath[PATH_MAX]; + //Block size of disk + uint32_t block_size; + uint32_t is_initialized; +}; + +/****************************************************************************** + * FUNCTION PROTOTYPES + ******************************************************************************/ +int prepare_boot_update(enum boot_update_stage stage); +//GPT disk methods +struct gpt_disk* gpt_disk_alloc(); +//Free previously allocated gpt_disk struct +void gpt_disk_free(struct gpt_disk *disk); +//Get the details of the disk holding the partition whose name +//is passed in via dev +int gpt_disk_get_disk_info(const char *dev, struct gpt_disk *disk); + +//Get pointer to partition entry from a allocated gpt_disk structure +uint8_t* gpt_disk_get_pentry(struct gpt_disk *disk, + const char *partname, + enum gpt_instance instance); + +//Update the crc fields of the modified disk structure +int gpt_disk_update_crc(struct gpt_disk *disk); + +//Write the contents of struct gpt_disk back to the actual disk +int gpt_disk_commit(struct gpt_disk *disk); + +//Return if the current device is UFS based or not +int gpt_utils_is_ufs_device(); + +//Swtich betwieen using either the primary or the backup +//boot LUN for boot. This is required since UFS boot partitions +//cannot have a backup GPT which is what we use for failsafe +//updates of the other 'critical' partitions. This function will +//not be invoked for emmc targets and on UFS targets is only required +//to be invoked for XBL. +// +//The algorithm to do this is as follows: +//- Find the real block device(eg: /dev/block/sdb) that corresponds +// to the /dev/block/bootdevice/by-name/xbl(bak) symlink +// +//- Once we have the block device 'node' name(sdb in the above example) +// use this node to to locate the scsi generic device that represents +// it by checking the file /sys/block/sdb/device/scsi_generic/sgY +// +//- Once we locate sgY we call the query ioctl on /dev/sgy to switch +//the boot lun to either LUNA or LUNB +int gpt_utils_set_xbl_boot_partition(enum boot_chain chain); + +//Given a vector of partition names as a input and a reference to a map, +//populate the map to indicate which physical disk each of the partitions +//sits on. The key in the map is the path to the block device where the +//partition lies and the value is a vector of strings indicating which of +//the passed in partition names sits on that device. +int gpt_utils_get_partition_map(std::vector<std::string>& partition_list, + std::map<std::string,std::vector<std::string>>& partition_map); +#ifdef __cplusplus +} +#endif +#endif /* __GPT_UTILS_H__ */ diff --git a/health/Android.bp b/health/Android.bp new file mode 100644 index 00000000..f29e8c69 --- /dev/null +++ b/health/Android.bp @@ -0,0 +1,52 @@ +/* + * 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 { + default_applicable_licenses: ["Android-Apache-2.0"], +} + +cc_library_shared { + name: "android.hardware.health@2.1-impl-redbull", + stem: "android.hardware.health@2.0-impl-2.1-redbull", + + proprietary: true, + relative_install_path: "hw", + srcs: [ + "Health.cpp", + ], + + cflags: [ + "-Wall", + "-Werror", + ], + + static_libs: [ + "android.hardware.health@1.0-convert", + "libbatterymonitor", + "libhealth2impl", + "libhealthloop", + ], + + shared_libs: [ + "libbase", + "libcutils", + "libhidlbase", + "libpixelhealth", + "libutils", + "android.hardware.health@2.0", + "android.hardware.health@2.1", + ], +} diff --git a/health/Health.cpp b/health/Health.cpp new file mode 100644 index 00000000..83977989 --- /dev/null +++ b/health/Health.cpp @@ -0,0 +1,236 @@ +/* + * 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-redbull" +#include <android-base/logging.h> + +#include <android-base/file.h> +#include <android-base/parseint.h> +#include <android-base/strings.h> +#include <android/hardware/health/2.0/types.h> +#include <health2impl/Health.h> +#include <health/utils.h> +#include <hal_conversion.h> + +#include <pixelhealth/BatteryDefender.h> +#include <pixelhealth/BatteryMetricsLogger.h> +#include <pixelhealth/BatteryThermalControl.h> +#include <pixelhealth/DeviceHealth.h> +#include <pixelhealth/LowBatteryShutdownMetrics.h> + +#include <fstream> +#include <iomanip> +#include <string> +#include <vector> + +namespace { + +using namespace std::literals; + +using android::hardware::health::V1_0::hal_conversion::convertFromHealthInfo; +using android::hardware::health::V1_0::hal_conversion::convertToHealthInfo; +using android::hardware::health::V2_0::DiskStats; +using android::hardware::health::V2_0::StorageAttribute; +using android::hardware::health::V2_0::StorageInfo; +using android::hardware::health::V2_0::Result; +using ::android::hardware::health::V2_1::IHealth; +using android::hardware::health::InitHealthdConfig; + +using hardware::google::pixel::health::BatteryDefender; +using hardware::google::pixel::health::BatteryMetricsLogger; +using hardware::google::pixel::health::BatteryThermalControl; +using hardware::google::pixel::health::DeviceHealth; +using hardware::google::pixel::health::LowBatteryShutdownMetrics; + +#define FG_DIR "/sys/class/power_supply" +constexpr char kBatteryResistance[] {FG_DIR "/bms/resistance"}; +constexpr char kBatteryOCV[] {FG_DIR "/bms/voltage_ocv"}; +constexpr char kVoltageAvg[] {FG_DIR "/battery/voltage_now"}; + +#define WLC_DIR "/sys/class/power_supply/wireless" + +static BatteryDefender battDefender(WLC_DIR "/present"); +static BatteryThermalControl battThermalControl( + "sys/devices/virtual/thermal/tz-by-name/soc/mode"); +static BatteryMetricsLogger battMetricsLogger(kBatteryResistance, kBatteryOCV); +static LowBatteryShutdownMetrics shutdownMetrics(kVoltageAvg); +static DeviceHealth deviceHealth; + +#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"}; +constexpr char kUFSName[]{"UFS0"}; + +constexpr char kTCPMPSYName[]{"tcpm-source-psy-usbpd0"}; + +static bool needs_wlc_updates = false; +constexpr char kWlcCapacity[]{WLC_DIR "/capacity"}; + +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) { + uint64_t value; + read_value_from_file(kUfsVersion, &value); + std::stringstream ss; + ss << "ufs " << std::hex << value; + info->version = ss.str(); +} + +void fill_ufs_storage_attribute(StorageAttribute *attr) { + attr->isInternal = true; + attr->isBootDevice = true; + attr->name = kUFSName; +} + +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) { + hc->ignorePowerSupplyNames.push_back(android::String8(kTCPMPSYName)); + needs_wlc_updates = FileExists(kWlcCapacity); + if (needs_wlc_updates == false) { + battDefender.setWirelessNotSupported(); + } +} + +int private_healthd_board_battery_update(struct android::BatteryProperties *props) { + deviceHealth.update(props); + battThermalControl.updateThermalState(props); + battMetricsLogger.logBatteryProperties(props); + shutdownMetrics.logShutdownVoltage(props); + battDefender.update(props); + + if (needs_wlc_updates && + !android::base::WriteStringToFile(std::to_string(props->batteryLevel), kWlcCapacity)) + LOG(INFO) << "Unable to write battery level to wireless capacity"; + + return 0; +} + +void private_get_storage_info(std::vector<StorageInfo> &vec_storage_info) { + vec_storage_info.resize(1); + StorageInfo *storage_info = &vec_storage_info[0]; + fill_ufs_storage_attribute(&storage_info->attr); + + read_ufs_version(storage_info); + read_value_from_file(kUfsHealthEol, &storage_info->eol); + read_value_from_file(kUfsHealthLifetimeA, &storage_info->lifetimeA); + read_value_from_file(kUfsHealthLifetimeB, &storage_info->lifetimeB); + return; +} + +void private_get_disk_stats(std::vector<DiskStats> &vec_stats) { + vec_stats.resize(1); + DiskStats *stats = &vec_stats[0]; + fill_ufs_storage_attribute(&stats->attr); + + 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 android { +namespace hardware { +namespace health { +namespace V2_1 { +namespace implementation { +class HealthImpl : public Health { + public: + HealthImpl(std::unique_ptr<healthd_config>&& config) + : Health(std::move(config)) {} + + Return<void> getStorageInfo(getStorageInfo_cb _hidl_cb) override; + Return<void> getDiskStats(getDiskStats_cb _hidl_cb) override; + + protected: + void UpdateHealthInfo(HealthInfo* health_info) override; + +}; + +void HealthImpl::UpdateHealthInfo(HealthInfo* health_info) { + struct BatteryProperties props; + convertFromHealthInfo(health_info->legacy.legacy, &props); + private_healthd_board_battery_update(&props); + convertToHealthInfo(&props, health_info->legacy.legacy); +} + +Return<void> HealthImpl::getStorageInfo(getStorageInfo_cb _hidl_cb) +{ + std::vector<struct StorageInfo> info; + private_get_storage_info(info); + hidl_vec<struct StorageInfo> info_vec(info); + if (!info.size()) { + _hidl_cb(Result::NOT_SUPPORTED, info_vec); + } else { + _hidl_cb(Result::SUCCESS, info_vec); + } + return Void(); +} + +Return<void> HealthImpl::getDiskStats(getDiskStats_cb _hidl_cb) +{ + std::vector<struct DiskStats> stats; + private_get_disk_stats(stats); + hidl_vec<struct DiskStats> stats_vec(stats); + if (!stats.size()) { + _hidl_cb(Result::NOT_SUPPORTED, stats_vec); + } else { + _hidl_cb(Result::SUCCESS, stats_vec); + } + return Void(); +} + +} // namespace implementation +} // namespace V2_1 +} // namespace health +} // namespace hardware +} // namespace android + +extern "C" IHealth* HIDL_FETCH_IHealth(const char* instance) { + using ::android::hardware::health::V2_1::implementation::HealthImpl; + if (instance != "default"sv) { + return nullptr; + } + auto config = std::make_unique<healthd_config>(); + InitHealthdConfig(config.get()); + + private_healthd_board_init(config.get()); + + return new HealthImpl(std::move(config)); +} diff --git a/init.gadgethal.sh b/init.gadgethal.sh new file mode 100644 index 00000000..e52944bf --- /dev/null +++ b/init.gadgethal.sh @@ -0,0 +1,8 @@ +#!/vendor/bin/sh + +# +# modify config/usb_gadget/ permission +# +if [ -d /config/usb_gadget ]; then + chown -hR system.system /config/usb_gadget/ +fi diff --git a/init.hardware.diag.rc.user b/init.hardware.diag.rc.user new file mode 100644 index 00000000..a5418e45 --- /dev/null +++ b/init.hardware.diag.rc.user @@ -0,0 +1,50 @@ +# +# 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 init + chmod 666 /dev/diag + +on post-fs-data + mkdir /data/vendor/radio 0777 radio radio + mkdir /data/vendor/radio/diag_logs 0777 system system + rm /data/vendor/radio/diag_logs/logs/diag_poweron_log.qmdl + +service diag_mdlog_start /vendor/bin/diag_mdlog + class late_start + user shell + group system diag media_rw + disabled + oneshot + +service diag_mdlog_stop /vendor/bin/diag_mdlog -k + class late_start + user shell + group system diag media_rw + disabled + oneshot + +on property:persist.vendor.sys.modem.diag.mdlog=* + rm /data/vendor/radio/diag_logs/diag_mdlog_pid + setprop vendor.sys.modem.diag.mdlog ${persist.vendor.sys.modem.diag.mdlog} + +on property:vendor.sys.modem.diag.mdlog=true + start diag_mdlog_start + +on property:vendor.sys.modem.diag.mdlog=false + start diag_mdlog_stop + +on property:persist.vendor.verbose_logging_enabled=* + setprop persist.vendor.sys.modem.diag.mdlog ${persist.vendor.verbose_logging_enabled} diff --git a/init.hardware.diag.rc.userdebug b/init.hardware.diag.rc.userdebug new file mode 100644 index 00000000..16225b95 --- /dev/null +++ b/init.hardware.diag.rc.userdebug @@ -0,0 +1,117 @@ +# +# 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 init + chmod 666 /dev/diag + +on post-fs-data + # Modem logging collection + mkdir /data/vendor/radio 0777 radio radio + mkdir /data/vendor/radio/diag_logs 0777 system system + rm /data/vendor/radio/diag_logs/logs/diag_poweron_log.qmdl + # WLAN logging collection + mkdir /data/vendor/wifi 0777 system system + mkdir /data/vendor/wifi/cnss_diag 0777 system system + +service diag_mdlog_start /vendor/bin/diag_mdlog + class late_start + user shell + group system diag media_rw + socket diag_router stream 0666 system system + disabled + oneshot + +service diag_mdlog_stop /vendor/bin/diag_mdlog -k + class late_start + user shell + group system diag media_rw + disabled + oneshot + +on boot && property:persist.vendor.sys.modem.diag.mdlog=* + rm /data/vendor/radio/diag_logs/diag_mdlog_pid + setprop vendor.sys.modem.diag.mdlog ${persist.vendor.sys.modem.diag.mdlog} + +on property:vendor.sys.modem.diag.mdlog=true && property:persist.vendor.verbose_logging_enabled=true + start diag_mdlog_start + +on property:vendor.sys.modem.diag.mdlog=false + start diag_mdlog_stop + +on property:persist.vendor.sys.cnss.diag_qxdm=true + start vendor.cnss_diag + +on property:persist.vendor.sys.cnss.diag_qxdm=false + stop vendor.cnss_diag + +on property:persist.vendor.sys.cnss.diag_txt=true + start vendor.cnss_diag_txt + +on property:persist.vendor.sys.cnss.diag_txt=false + stop vendor.cnss_diag_txt + +service vendor.cnss_diag /vendor/bin/cnss_diag -q -u -w + class late_start + user system + group system + disabled + oneshot + +service vendor.cnss_diag_txt /vendor/bin/cnss_diag -s -f -P -m /data/vendor/wifi/cnss_diag/cnss_diag.conf -t HELIUM + class late_start + user system + group system + disabled + oneshot + +on property:vendor.debug.ramdump.force_crash=true + write /proc/sysrq-trigger "c" + +on property:ro.vendor.bluetooth.ftm_enabled=true + start ftmd + +service ftmd /vendor/bin/ftmdaemon + class late_start + user root + group bluetooth net_bt_admin misc diag net_bt + disabled + oneshot + +on property:vendor.sys.logger.bluetooth=true + setprop persist.vendor.service.bdroid.snooplog true + setprop persist.vendor.service.bdroid.fwsnoop true + +on property:vendor.sys.logger.bluetooth=false + setprop persist.vendor.service.bdroid.snooplog false + setprop persist.vendor.service.bdroid.fwsnoop false + +on property:persist.bluetooth.btsnoopenable=true + setprop persist.vendor.service.bdroid.soclog true + +on property:persist.bluetooth.btsnoopenable=false + setprop persist.vendor.service.bdroid.soclog false + +on property:vendor.usb.config=* + start usbd + +on property:persist.vendor.usb.usbradio.config=* + start usbd + +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 diff --git a/init.hardware.ipa.rc.userdebug b/init.hardware.ipa.rc.userdebug new file mode 100644 index 00000000..a690c0d4 --- /dev/null +++ b/init.hardware.ipa.rc.userdebug @@ -0,0 +1,19 @@ +# +# 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 boot + # Enable RmNet IPA3 TX timeout detection + write /d/ipawwan/debug 1 diff --git a/init.hardware.mpssrfs.rc.user b/init.hardware.mpssrfs.rc.user new file mode 100644 index 00000000..f75a413c --- /dev/null +++ b/init.hardware.mpssrfs.rc.user @@ -0,0 +1,5 @@ +on post-fs-data + # Modem Remote FS + mkdir /data/vendor/rfs 0770 vendor_rfs vendor_rfs + mkdir /data/vendor/rfs/mpss 0770 vendor_rfs vendor_rfs + mkdir /data/vendor/tombstones/rfs 0770 vendor_rfs vendor_rfs diff --git a/init.hardware.mpssrfs.rc.userdebug b/init.hardware.mpssrfs.rc.userdebug new file mode 100644 index 00000000..5939bfc3 --- /dev/null +++ b/init.hardware.mpssrfs.rc.userdebug @@ -0,0 +1,11 @@ +on post-fs-data + # Modem Remote FS + mkdir /data/vendor/rfs 0770 vendor_rfs vendor_rfs + mkdir /data/vendor/rfs/mpss 0770 vendor_rfs vendor_rfs + mkdir /data/vendor/tombstones/rfs 0770 vendor_rfs vendor_rfs + write /data/vendor/rfs/mpss/mcfg_nv_list_flag "1" + chown vendor_rfs vendor_rfs /data/vendor/rfs/mpss/mcfg_nv_list_flag + chmod 0700 /data/vendor/rfs/mpss/mcfg_nv_list_flag + +on property:vendor.sys.modem.diag.efsdump=true + chmod 0660 /data/vendor/rfs/mpss/modem_efs diff --git a/init.hardware.rc b/init.hardware.rc new file mode 100644 index 00000000..636f143c --- /dev/null +++ b/init.hardware.rc @@ -0,0 +1,809 @@ +# +# 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. +# + +import /vendor/etc/init/hw/init.${ro.boot.hardware.platform}.usb.rc +import /vendor/etc/init/hw/init.${ro.boot.hardware.platform}.diag.rc +import /vendor/etc/init/hw/init.${ro.boot.hardware.platform}.logging.rc +import /vendor/etc/init/hw/init.${ro.boot.hardware.platform}.mpssrfs.rc +import /vendor/etc/init/hw/init.${ro.boot.hardware.platform}.power.rc + +service vendor.charger /system/bin/charger + class charger + seclabel u:r:charger: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 + +on early-init + mount debugfs debugfs /sys/kernel/debug + chmod 0755 /sys/kernel/debug + mount_all /vendor/etc/fstab.persist --early + + # configure governor settings + write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor schedutil + write /sys/devices/system/cpu/cpu0/cpufreq/schedutil/up_rate_limit_us 500 + write /sys/devices/system/cpu/cpu0/cpufreq/schedutil/down_rate_limit_us 20000 + + # configure governor settings for big cluster + write /sys/devices/system/cpu/cpu6/cpufreq/scaling_governor schedutil + write /sys/devices/system/cpu/cpu6/cpufreq/schedutil/up_rate_limit_us 500 + write /sys/devices/system/cpu/cpu6/cpufreq/schedutil/down_rate_limit_us 20000 + + # configure governor settings for big big CPU + write /sys/devices/system/cpu/cpu7/cpufreq/scaling_governor schedutil + write /sys/devices/system/cpu/cpu7/cpufreq/schedutil/up_rate_limit_us 500 + write /sys/devices/system/cpu/cpu7/cpufreq/schedutil/down_rate_limit_us 20000 + +# Disable VDSO on JAWS boards. +on early-init && property:ro.revision="DEV1.0" + write /sys/module/vdso/parameters/enable_32 0 + +# Skip init trigger for charger mode +on early-init && property:ro.boot.mode=charger + setprop vendor.skip.init 1 + # Loading kernel modules in background + start charger_insmod_sh + +on init && property:vendor.skip.init=0 + # Boot time cpuset and stune + write /dev/cpuset/top-app/cpus 0-7 + write /dev/cpuset/foreground/cpus 0-7 + write /dev/cpuset/background/cpus 0-5 + write /dev/cpuset/system-background/cpus 0-5 + write /dev/cpuset/restricted/cpus 2-5 + write /dev/stune/foreground/schedtune.prefer_idle 1 + write /dev/stune/foreground/schedtune.prefer_high_cap 1 + write /dev/stune/foreground/schedtune.boost 100 + write /dev/stune/schedtune.prefer_idle 1 + write /dev/stune/schedtune.prefer_high_cap 1 + write /dev/stune/schedtune.boost 100 + write /dev/stune/top-app/schedtune.prefer_idle 1 + write /dev/stune/top-app/schedtune.prefer_high_cap 1 + write /dev/stune/top-app/schedtune.boost 100 + + # Boot time fs tuning + write /sys/block/sda/queue/iostats 0 + write /sys/block/sda/queue/scheduler cfq + write /sys/block/sda/queue/iosched/group_idle 0 + write /sys/block/sda/queue/iosched/slice_idle 0 + write /sys/block/sda/queue/nr_requests 256 + + # Disable powersaving + write /sys/module/lpm_levels/parameters/sleep_disabled 1 + + wait /dev/block/platform/${ro.boot.boot_devices} + symlink /dev/block/platform/${ro.boot.boot_devices} /dev/block/bootdevice + + # to access UFS/eMMC sysfs directly + symlink /sys/devices/platform/${ro.boot.boot_devices} /dev/sys/block/bootdevice + + # Disable UFS powersaving + write /dev/sys/block/bootdevice/clkgate_enable 0 + + # start qseecomd early as we mount system/ vendor/ early + # vold needs keymaster that needs qseecomd + start vendor.qseecomd + start keymaster-4-0 + + start vendor.citadeld + start vendor.keymaster-4-1-citadel + + # Loading kernel modules in background + start insmod_sh + + # bring back all cores + write /sys/devices/system/cpu/cpu0/online 1 + write /sys/devices/system/cpu/cpu1/online 1 + write /sys/devices/system/cpu/cpu2/online 1 + write /sys/devices/system/cpu/cpu3/online 1 + write /sys/devices/system/cpu/cpu4/online 1 + write /sys/devices/system/cpu/cpu5/online 1 + write /sys/devices/system/cpu/cpu6/online 1 + write /sys/devices/system/cpu/cpu7/online 1 + + # ZRAM setup + write /sys/block/zram0/comp_algorithm lz4 + write /proc/sys/vm/page-cluster 0 + + # Some user code relies on ro.boot.hardware.revision + setprop ro.boot.hardware.revision ${ro.revision} + + mkdir /dev/cpuset/camera-daemon-dedicated + write /dev/cpuset/camera-daemon-dedicated/cpus 0-7 + write /dev/cpuset/camera-daemon-dedicated/mems 0 + chown system system /dev/cpuset/camera-daemon-dedicated + chown system system /dev/cpuset/camera-daemon-dedicated/tasks + chmod 0664 /dev/cpuset/camera-daemon-dedicated/tasks + + # set default schedTune value for camera-daemon + write /dev/stune/camera-daemon/schedtune.prefer_idle 1 + write /dev/stune/camera-daemon/schedtune.boost 0 + + # Allow PAI targeting per hardware SKU + setprop ro.oem.key1 ${ro.boot.hardware.sku} + + # Property used by vintf for sku specific manifests + # Property used by NFC for sku specific configurations + setprop ro.boot.product.hardware.sku ${ro.boot.hardware.sku} + + # report max frequency to unity tasks. + write /proc/sys/kernel/sched_lib_name "UnityMain,libunity.so" + write /proc/sys/kernel/sched_lib_mask_force 255 + + # NFC streset tool name + setprop persist.vendor.nfc.streset /vendor/lib64/libstreset20.so + setprop persist.vendor.se.streset /vendor/lib64/libstreset20.so + setprop persist.vendor.se.stpreprocess /vendor/lib64/libstpreprocess20.so + +on late-init + chown system system /sys/devices/virtual/thermal/tz-by-name/cellular-emergency/trip_point_0_temp + chown system system /sys/devices/virtual/thermal/tz-by-name/cellular-emergency/trip_point_0_hyst + chown system system /sys/devices/virtual/thermal/tz-by-name/soc/mode + +on fs + mount_all /vendor/etc/fstab.${ro.boot.hardware.platform} --early + + mkdir /mnt/vendor/persist/audio 0770 media audio + mkdir /mnt/vendor/persist/data 0700 system system + mkdir /mnt/vendor/persist/display 0770 system graphics + mkdir /mnt/vendor/persist/haptics 0770 system system + mkdir /mnt/vendor/persist/rfs 0770 root system + mkdir /mnt/vendor/persist/hlos_rfs 0770 root system + mkdir /mnt/vendor/persist/oslo 0770 system system + mkdir /mnt/vendor/persist/touch 0770 system system + chmod 0770 /mnt/vendor/persist/rfs + chmod 0770 /mnt/vendor/persist/rfs/shared + chmod 0770 /mnt/vendor/persist/rfs/msm + chmod 0770 /mnt/vendor/persist/rfs/msm/adsp + chmod 0770 /mnt/vendor/persist/rfs/msm/mpss + chmod 0770 /mnt/vendor/persist/rfs/msm/slpi + chmod 0770 /mnt/vendor/persist/rfs/mdm + chmod 0770 /mnt/vendor/persist/rfs/mdm/adsp + chmod 0770 /mnt/vendor/persist/rfs/mdm/mpss + chmod 0770 /mnt/vendor/persist/rfs/mdm/slpi + chmod 0770 /mnt/vendor/persist/rfs/mdm/tn + chmod 0770 /mnt/vendor/persist/rfs/apq + chmod 0770 /mnt/vendor/persist/rfs/apq/gnss + chmod 0770 /mnt/vendor/persist/hlos_rfs + + # for cycle count backup + mkdir /mnt/vendor/persist/battery 0700 system system + + # Set up sensors-related directories and permissions + chmod 775 /mnt/vendor/persist/sensors + chmod 664 /mnt/vendor/persist/sensors/sensors_settings + chmod 775 /mnt/vendor/persist/sensors/registry + chmod 775 /mnt/vendor/persist/sensors/registry/registry + chmod 775 /mnt/vendor/persist/sensors/registry/factory_data + chmod 664 /mnt/vendor/persist/sensors/registry/factory_data/sns_fac_registry + chmod 664 /mnt/vendor/persist/sensors/registry/registry/sensors_registry + + restorecon_recursive /mnt/vendor/persist + + # Set up camera-related directories and permissions + # Add restorecon_recursive command to make sure the restorecon label is persist_camera_file. + restorecon_recursive /mnt/vendor/persist/camera + +on post-fs + # set RLIMIT_MEMLOCK to 64MB + setrlimit 8 67108864 67108864 + + # Wait qseecomd started + wait_for_prop vendor.sys.listeners.registered true + + # load IPA FWs + # This must be started when vendor.sys.listeners.registered is true + write /dev/ipa 1 + +on late-fs + # Start services for bootanim + #start color_init + #wait_for_prop vendor.display.native_display_primaries_ready 1 + #setprop ro.surface_flinger.display_primary_red ${vendor.display.primary_red} + #setprop ro.surface_flinger.display_primary_green ${vendor.display.primary_green} + #setprop ro.surface_flinger.display_primary_blue ${vendor.display.primary_blue} + #setprop ro.surface_flinger.display_primary_white ${vendor.display.primary_white} + # Permission for hwcomposer + chown system system /sys/devices/platform/soc/soc:qcom,dsi-display-primary/gamma + start surfaceflinger + start bootanim + start vendor.qti.hardware.display.composer + start vendor.qti.hardware.display.allocator + + # Wait for keymaster HALs (TEE and StrongBox) + exec_start wait_for_strongbox + + + # Mount RW partitions which need run fsck + mount_all /vendor/etc/fstab.${ro.boot.hardware.platform} --late + + # Required for time_daemon + mkdir /mnt/vendor/persist/time 0770 system system + chown system system /mnt/vendor/persist/time/ats_1 + chown system system /mnt/vendor/persist/time/ats_2 + chown system system /mnt/vendor/persist/time/ats_3 + chown system system /mnt/vendor/persist/time/ats_4 + chown system system /mnt/vendor/persist/time/ats_5 + chown system system /mnt/vendor/persist/time/ats_6 + chown system system /mnt/vendor/persist/time/ats_7 + chown system system /mnt/vendor/persist/time/ats_8 + chown system system /mnt/vendor/persist/time/ats_9 + chown system system /mnt/vendor/persist/time/ats_10 + chown system system /mnt/vendor/persist/time/ats_11 + chown system system /mnt/vendor/persist/time/ats_12 + chown system system /mnt/vendor/persist/time/ats_13 + chown system system /mnt/vendor/persist/time/ats_14 + chown system system /mnt/vendor/persist/time/ats_15 + chown system system /mnt/vendor/persist/time/ats_16 + + # Init sensor specific services + start init-sensors-sh + + # Start the twoshay touch service + start twoshay + + # turn off vblank irq immediately after turning off + write /sys/module/drm/parameters/vblankoffdelay -1 + + # Write build info to kdebuginfo. + write /sys/module/kdebuginfo/parameters/build_info "${ro.product.name}-${ro.build.type} ${ro.build.version.incremental}" + +on post-fs-data + mkdir /vendor/data/tombstones 0771 system system + mkdir /tombstones/modem 0771 system system + mkdir /tombstones/lpass 0771 system system + mkdir /tombstones/wcnss 0771 system system + mkdir /tombstones/dsps 0771 system system + mkdir /data/vendor/hbtp 0750 system system + mkdir /data/vendor/tloc 0700 system drmrpc + mkdir /data/vendor/nnhal 0700 system system + mkdir /data/vendor/time 0770 system system + mkdir /data/vendor/modem_fdr 0700 root system + mkdir /data/vendor/display 0770 system graphics + mkdir /data/vendor/camera 0770 system system + mkdir /data/vendor/rebootescrow 0770 hsm hsm + start vendor.rebootescrow-citadel + +on zygote-start + # zygote is started in common init.rc + # and now we can continue initialize /data/ + mkdir /data/vendor/ipa 0770 radio radio + chown radio radio /data/vendor/ipa + + # Create the directories used by the Wireless subsystem + mkdir /data/vendor/wifi 0771 wifi wifi + mkdir /data/vendor/wifi/wpa 0770 wifi wifi + mkdir /data/vendor/wifi/wpa/sockets 0770 wifi wifi + + # Create the directories used by CnE subsystem + mkdir /data/vendor/connectivity 0771 radio radio + chown radio radio /data/vendor/connectivity + + # Create directory for radio + mkdir /data/vendor/radio 0773 system radio + mkdir /data/vendor/modem_stat 0771 system radio + write /data/vendor/modem_stat/debug.txt "" + chown system radio /data/vendor/modem_stat/debug.txt + chmod 0664 /data/vendor/modem_stat/debug.txt + + # Mark the copy complete flag to not completed + write /data/vendor/radio/copy_complete 0 + chown radio radio /data/vendor/radio/copy_complete + chmod 0660 /data/vendor/radio/copy_complete + + # File flags for prebuilt ril db file + write /data/vendor/radio/prebuilt_db_support 1 + chown radio radio /data/vendor/radio/prebuilt_db_support + chmod 0400 /data/vendor/radio/prebuilt_db_support + write /data/vendor/radio/db_check_done 0 + chown radio radio /data/vendor/radio/db_check_done + chmod 0660 /data/vendor/radio/db_check_done + + # Create directories for Location services + mkdir /data/vendor/location 0770 gps gps + mkdir /data/vendor/location/mq 0770 gps gps + mkdir /data/vendor/location/xtwifi 0770 gps gps + mkdir /dev/socket/location 0770 gps gps + mkdir /dev/socket/location/mq 0770 gps gps + mkdir /dev/socket/location/xtra 0770 gps gps + + #Create directories for wifihal services + mkdir /dev/socket/wifihal 0770 wifi wifi + chmod 2770 /dev/socket/wifihal + +on early-boot + # Change owner for sensors-related directories + chown root system /mnt/vendor/persist/sensors/registry + chown root system /mnt/vendor/persist/sensors/registry/registry + chown system root /mnt/vendor/persist/sensors/sensors_settings + chown root root /mnt/vendor/persist/sensors/registry/registry/sensors_settings + + # Set up sensors-related data directories and permissions + mkdir /data/vendor/sensors 0770 + chown system system /data/vendor/sensors + mkdir /data/vendor/sensors/log 0770 + chown system system /data/vendor/sensors/log + + # Change owner for sensors factory calibrated registries directory + chown system system /mnt/vendor/persist/sensors/registry/factory_data + chown system system /mnt/vendor/persist/sensors/registry/factory_data/sns_fac_registry + restorecon_recursive /mnt/vendor/persist/sensors/registry/factory_data + + # Restore SeLinux Context for preventing temp.json with + # incorrect security context + restorecon /mnt/vendor/persist/sensors/registry/temp.json + + chmod 770 /mnt/vendor/persist/audio + chmod 660 /mnt/vendor/persist/audio/audio.cal + chown media audio /mnt/vendor/persist/audio + chown audioserver audio /mnt/vendor/persist/audio/audio.cal + + # Set up haptics-related directories and permissions + chmod 770 /mnt/vendor/persist/haptics + chmod 440 /mnt/vendor/persist/haptics/drv2624.cal + chown system system /mnt/vendor/persist/haptics + chown system system /mnt/vendor/persist/haptics/drv2624.cal + + # Set up oslo-related directories and permissions + chmod 770 /mnt/vendor/persist/oslo + chmod 660 /mnt/vendor/persist/oslo/oslo.cal + chown system system /mnt/vendor/persist/oslo + chown system system /mnt/vendor/persist/oslo/oslo.cal + + # Set up touch directories and permissions + chmod 770 /mnt/vendor/persist/touch + chown system system /mnt/vendor/persist/touch + + # Permission for lights driver + chown system system /sys/class/backlight/panel0-backlight/brightness + chown system system /sys/class/backlight/panel0-backlight/vr_mode + chown system system /sys/class/backlight/panel0-backlight/hbm_mode + chown system system /sys/class/backlight/panel0-backlight/als_table + chown system system /sys/devices/platform/soc/soc:qcom,dsi-display-primary/te2_table + + # Wait for insmod_sh to finish all modules + wait_for_prop vendor.all.modules.ready 1 + + # Wait for insmod_sh to finish all boot devices + wait_for_prop vendor.all.devices.ready 1 + + # Permission for Vibrator + chown system system /sys/class/leds/vibrator/device/mode + chown system system /sys/class/leds/vibrator/device/od_clamp + chown system system /sys/class/leds/vibrator/device/rtp_input + chown system system /sys/class/leds/vibrator/device/scale + chown system system /sys/class/leds/vibrator/device/set_sequencer + chown system system /sys/class/leds/vibrator/device/autocal_result + chown system system /sys/class/leds/vibrator/device/ctrl_loop + chown system system /sys/class/leds/vibrator/device/ol_lra_period + chown system system /sys/class/leds/vibrator/device/autocal + chown system system /sys/class/leds/vibrator/device/lp_trigger_effect + chown system system /sys/class/leds/vibrator/device/lra_wave_shape + write /sys/class/leds/vibrator/trigger transient + + # Permission for rainbow sensor + chown system system /sys/devices/platform/soc/994000.i2c/i2c-3/3-0020/rainbow_enable + chmod 0660 /sys/devices/platform/soc/994000.i2c/i2c-3/3-0020/rainbow_enable + chown system system /sys/devices/platform/soc/994000.i2c/i2c-3/3-0020/rainbow_read_byte + chmod 0660 /sys/devices/platform/soc/994000.i2c/i2c-3/3-0020/rainbow_read_byte + chown system system /sys/devices/platform/soc/994000.i2c/i2c-3/3-0020/rainbow_write_byte + chmod 0660 /sys/devices/platform/soc/994000.i2c/i2c-3/3-0020/rainbow_write_byte + chown system system /dev/vd6281 + chmod 0660 /dev/vd6281 + chown system system /mnt/vendor/persist/camera/rals_fac_test + chmod 0660 /mnt/vendor/persist/camera/rals_fac_test + + # FG cycle count read from dumpstate + backup restore from health HAL (and pixelstats) + chown system system /sys/class/power_supply/maxfg/cycle_counts_bins + + # Adaptive charge + chown system system /sys/class/power_supply/battery/charge_deadline + + # Battery Defender + chown system system /sys/devices/platform/soc/soc:google,charger/charge_stop_level + chown system system /sys/devices/platform/soc/soc:google,charger/charge_start_level + chown system system /sys/devices/platform/soc/soc:google,charger/bd_clear + chown system system /sys/devices/platform/soc/soc:google,battery/power_supply/battery/bd_clear + + # Charge stats (write 0) + chown system system /sys/class/power_supply/battery/charge_stats + + # Permission for battery eeprom + chown system system /sys/devices/platform/soc/98c000.i2c/i2c-1/1-0050/1-00500/nvmem + chmod 0640 /sys/devices/platform/soc/98c000.i2c/i2c-1/1-0050/1-00500/nvmem + chown system system /dev/battery_history + chmod 0644 /dev/battery_history + + # Permission for Pixelstats + chown system system /sys/class/misc/msm_cirrus_playback/resistance_left_right + chown system system /dev/sys/block/bootdevice/slowio_read_cnt + chown system system /dev/sys/block/bootdevice/slowio_write_cnt + chown system system /dev/sys/block/bootdevice/slowio_unmap_cnt + chown system system /dev/sys/block/bootdevice/slowio_sync_cnt + + # Permission for Health Storage HAL + chown system system /dev/sys/block/bootdevice/manual_gc + + # Permissions for reading display native color gamut + chown system graphics /mnt/vendor/persist/display/native_gamut.csv + +on boot + # This location is used by QCRIL to host UNIX domain + # socket files used for internal IPC within QCRIL + # modules + mkdir /dev/socket/qmux_radio 0770 radio radio + chmod 2770 /dev/socket/qmux_radio + + setprop wifi.interface wlan0 + setprop wifi.aware.interface wifi-aware0 + + chown system system /sys/kernel/hbtp/display_pwr + + start init-modem-sh + + start rfs_access + + # default country code + setprop ro.boot.wificountrycode 00 + + # WLAN debug access + chown system system /d/icnss/stats + +service init-radio-sh /vendor/bin/init.radio.sh + class late_start + user radio + group root radio + oneshot + +service init-modem-sh /vendor/bin/init.modem.sh + class core + user radio + group root radio + oneshot + +on property:init.svc.vendor.charger=running + stop vendor.qseecomd + stop keymaster-4-0 + + setprop sys.usb.configfs 1 + setprop vendor.setup.power 1 + + # keep one little and one big without big+ + write /sys/devices/system/cpu/cpu1/online 0 + write /sys/devices/system/cpu/cpu2/online 0 + write /sys/devices/system/cpu/cpu3/online 0 + write /sys/devices/system/cpu/cpu4/online 0 + write /sys/devices/system/cpu/cpu5/online 0 + write /sys/devices/system/cpu/cpu7/online 0 + +on property:sys.boot_completed=1 + setprop vendor.setup.power 1 + + # Permission for Pixelstats + chown system system /dev/sys/fs/by-name/userdata/gc_segment_mode + chown system system /dev/sys/fs/by-name/userdata/gc_reclaimed_segments + + # Runtime fs tuning + write /sys/block/sda/queue/nr_requests 128 + write /sys/block/sda/queue/iostats 1 + + # Back to default VM settings + write /proc/sys/vm/dirty_expire_centisecs 3000 + write /proc/sys/vm/dirty_background_ratio 10 + + # Enable ZRAM on boot_complete + swapon_all /vendor/etc/fstab.${ro.boot.hardware.platform} + write /proc/sys/vm/swappiness 100 + + # Setup runtime cpusets + write /dev/cpuset/top-app/cpus 0-7 + write /dev/cpuset/foreground/cpus 0-5,7 + write /dev/cpuset/background/cpus 4-5 + write /dev/cpuset/system-background/cpus 2-5 + write /dev/cpuset/restricted/cpus 2-5 + + # Setup runtime schedTune + write /dev/stune/foreground/schedtune.prefer_idle 1 + write /dev/stune/foreground/schedtune.prefer_high_cap 0 + write /dev/stune/foreground/schedtune.boost 0 + write /dev/stune/schedtune.prefer_idle 0 + write /dev/stune/schedtune.prefer_high_cap 0 + write /dev/stune/schedtune.boost 0 + write /dev/stune/top-app/schedtune.prefer_idle 1 + write /dev/stune/top-app/schedtune.prefer_high_cap 0 + write /dev/stune/top-app/schedtune.boost 10 + + # HardwareInfo needs to be able to read display info + chmod 444 /sys/devices/platform/soc/soc:qcom,dsi-display-primary/panel_info/panel0/serial_number + chmod 444 /sys/devices/platform/soc/soc:qcom,dsi-display-primary/panel_info/panel0/panel_vendor_name + chmod 444 /sys/devices/platform/soc/soc:qcom,dsi-display-primary/panel_info/panel0/panel_extinfo + + # Maxim FG dump for dumpstate + chown system system /sys/kernel/debug/regmap/1-0036/registers + chown system system /sys/kernel/debug/regmap/1-000b/registers + chown system system /sys/kernel/debug/google_battery/cycle_count_bins + chown system system /sys/kernel/debug/google_battery/ssoc_gdf + chown system system /sys/kernel/debug/google_battery/ssoc_rls + chown system system /sys/kernel/debug/google_battery/ssoc_uic + chown system system /sys/kernel/debug/google_battery/ssoc_uicurve + chown system system /sys/kernel/debug/google_charger/pps_op_ua + chown system system /sys/kernel/debug/google_charger/pps_out_uv + + # Permission for wireless charging + chown system system /sys/class/power_supply/wireless/capacity + chmod 0660 /sys/class/power_supply/wireless/capacity + chown system system /sys/devices/platform/soc/98c000.i2c/i2c-1/1-003b/rtx + chmod 0660 /sys/devices/platform/soc/98c000.i2c/i2c-1/1-003b/rtx + + chown system system /sys/devices/platform/soc/98c000.i2c/i2c-1/1-003b/rxdata + chown system system /sys/devices/platform/soc/98c000.i2c/i2c-1/1-003b/txdata + chown system system /sys/devices/platform/soc/98c000.i2c/i2c-1/1-003b/rxlen + chown system system /sys/devices/platform/soc/98c000.i2c/i2c-1/1-003b/txlen + chown system system /sys/devices/platform/soc/98c000.i2c/i2c-1/1-003b/ccreset + chown system system /sys/devices/platform/soc/98c000.i2c/i2c-1/1-003b/status + chown system system /sys/devices/platform/soc/98c000.i2c/i2c-1/1-003b/version + + # Permission for bootloader logs + chown root log /proc/bldrlog + chmod 0444 /proc/bldrlog + +on property:persist.vendor.hvdcp_opti.start=1 + chown root system /sys/class/power_supply/bms/soh + chown root system /sys/class/power_supply/bms/esr_actual + chown root system /sys/class/power_supply/bms/esr_nominal + +service vendor.per_mgr /vendor/bin/pm-service + user system + group system + ioprio rt 4 + +service per_proxy /vendor/bin/pm-proxy + class core + user system + group system + disabled + +on property:init.svc.vendor.per_mgr=running + start per_proxy + +# Start per_mgr daemon to boot modem as esim reset is done or not needed +on property:persist.vendor.modem.esim.reset=done + start vendor.per_mgr + +on property:persist.vendor.modem.esim.reset=noneed + start vendor.per_mgr + +# Force to start per_mgr daemon as boot completed +on property:sys.boot_completed=1 + start vendor.per_mgr + +on property:sys.shutdown.requested=* + stop per_proxy + +service vendor.qseecomd /vendor/bin/qseecomd + class core + user root + group root + +service init-sensors-sh /vendor/bin/init.sensors.sh + class main + user root + group root system + disabled + oneshot + +service vendor.adsprpcd /vendor/bin/adsprpcd + class main + user system + group media + +service vendor.adsprpcd_audiopd /vendor/bin/adsprpcd audiopd + class main + user media + group media + +service vendor.cdsprpcd /vendor/bin/cdsprpcd + class main + user system + group system + +service wait_for_strongbox /vendor/bin/hw/wait_for_strongbox + user root + group root system + priority -20 + ioprio rt 0 + +service vendor.qrtr-ns /vendor/bin/qrtr-ns -f + class core + user vendor_qrtr + group vendor_qrtr + capabilities NET_BIND_SERVICE + +service irsc_util /vendor/bin/irsc_util "/vendor/etc/sec_config" + class core + user root + oneshot + +service modem_svc /vendor/bin/modem_svc -q + class core + user root + group system + capabilities NET_BIND_SERVICE + +service vendor.ss_ramdump /vendor/bin/subsystem_ramdump + class main + user root + group system + disabled + +service vendor.ssr_setup /vendor/bin/ssr_setup + oneshot + disabled + +on property:persist.vendor.sys.ssr.restart_level=* + start vendor.ssr_setup + +on post-fs-data && property:persist.vendor.sys.ssr.enable_ramdumps=1 && property:vendor.skip.init=0 + write /sys/module/subsystem_restart/parameters/enable_ramdumps 1 + mkdir /data/vendor/wifidump 771 root system + mkdir /data/vendor/ramdump 771 root system + mkdir /data/vendor/ssrdump 771 root system + mkdir /data/vendor/ssrdump/coredump 771 root system + mkdir /data/vendor/ssrlog 775 root system + start vendor.ss_ramdump + +on property:persist.vendor.sys.ssr.enable_ramdumps=0 + write /sys/module/subsystem_restart/parameters/enable_ramdumps 0 + +on property:init.svc.vendor.qti.hardware.display.composer=stopped + stop ppd + +on property:init.svc.vendor.qti.hardware.display.composer=running + start ppd + +# Start daemon after boot completed +on property:sys.boot_completed=1 + start vendor.ssgtzd + +# Used 'disabled' flag, so daemon won't be started until explicit start +service vendor.ssgtzd /vendor/bin/ssgtzd + class late_start + user system + group system + disabled + socket ssgtzd stream 0660 system inet + +# charger driver exposes now finer grain control, map demo mode to those properties +# NOTE: demo mode can only be exit wiping data (which reset the persist properties) +on property:sys.retaildemo.enabled=1 + setprop persist.vendor.charge.stop.level 35 + setprop persist.vendor.charge.start.level 30 + +# Test Harness Mode default battery profile. Restricted but not too restricted. +on property:persist.sys.test_harness=1 && property:persist.vendor.testing_battery_profile=0 + setprop persist.vendor.charge.stop.level 70 + setprop persist.vendor.charge.start.level 35 + setprop vendor.battery.defender.disable 1 + +# Extremely restricted battery profile. +on property:persist.sys.test_harness=1 && property:persist.vendor.testing_battery_profile=1 + setprop persist.vendor.charge.stop.level 50 + setprop persist.vendor.charge.start.level 35 + setprop vendor.battery.defender.disable 1 + +# Normal behavior (as if the device was a regular device) +on property:persist.sys.test_harness=1 && property:persist.vendor.testing_battery_profile=2 + setprop persist.vendor.charge.stop.level 100 + setprop persist.vendor.charge.start.level 0 + +# Unrestricted, allows charging to 100% +on property:persist.sys.test_harness=1 && property:persist.vendor.testing_battery_profile=3 + setprop persist.vendor.charge.stop.level 100 + setprop persist.vendor.charge.start.level 0 + setprop vendor.battery.defender.disable 1 + +service insmod_sh /vendor/bin/init.insmod.sh /vendor/etc/init.insmod.${ro.hardware}.cfg + class main + user root + group root system + disabled + oneshot + +service charger_insmod_sh /vendor/bin/init.insmod.sh /vendor/etc/init.insmod.charger.cfg + class main + user root + group root system + disabled + oneshot + +service vendor.msm_irqbalance /vendor/bin/msm_irqbalance -f /vendor/etc/msm_irqbalance.conf + socket msm_irqbalance seqpacket 660 root system + class core + user root + group root + task_profiles ServiceCapacityLow + +service pd_mapper /vendor/bin/pd-mapper + class core + user system + group system + capabilities NET_BIND_SERVICE + +service cnss-daemon /vendor/bin/cnss-daemon -n -l + class late_start + user system + group system inet wifi + +service loc_launcher /vendor/bin/loc_launcher + class late_start + user gps + group gps + +on property:persist.sys.xtra-daemon.enabled=* + restart loc_launcher + +# Allow access to touch +on property:vendor.all.modules.ready=1 + chown system input /dev/touch_offload + chmod 660 /dev/touch_offload + +# Conditionally enable the twoshay touch service +on property:persist.vendor.enable_twoshay=1 + enable twoshay + +# bugreport is triggered by holding down volume down, volume up and power +service bugreport /system/bin/dumpstate -d -p -z + class main + disabled + oneshot + keycodes 114 115 116 + +# DSDS feature +# Set to Dual-sim mode based on CDT setting +on property:ro.boot.hardware.dsds=1 + setprop persist.radio.multisim.config dsds + +# Restart 1st qcrild after SIM config changed +on property:vendor.radio.sim_num.switch=1to2 && property:persist.radio.multisim.config=dsds + restart vendor.qcrild + +on property:vendor.radio.sim_num.switch=2to1 && property:persist.radio.multisim.config= + restart vendor.qcrild + +# Enable 2nd qcrild when the property set to dsds +on property:persist.radio.multisim.config=dsds + start vendor.qcrild2 + +# Stop 2nd qcrild when the property set to empty string +on property:persist.radio.multisim.config= + stop vendor.qcrild2 + +# For Japan radio builds, always enforce camera shutter sound +# Since this property is read by the audio server in system service, +# it should be written by the system init. +on property:ro.boot.hardware.radio.subtype=1 + setprop audio.camerasound.force true +# BUG FIX: b/163674593 +on property:ro.boot.hardware.sku=G5NZ6 + setprop audio.camerasound.force true + +on property:persist.sys.device_provisioned=1 + setprop dalvik.vm.dex2oat-cpu-set 0,1,2,3,4,5,7 + setprop dalvik.vm.dex2oat-threads 6 diff --git a/init.hardware.usb.rc b/init.hardware.usb.rc new file mode 100644 index 00000000..999cc60f --- /dev/null +++ b/init.hardware.usb.rc @@ -0,0 +1,112 @@ +# +# 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. +# + +on post-fs-data + mkdir /config/usb_gadget/g1 0770 + mkdir /config/usb_gadget/g1/strings/0x409 0770 + write /config/usb_gadget/g1/bcdUSB 0x0200 + write /config/usb_gadget/g1/idVendor 0x18d1 + write /config/usb_gadget/g1/bcdDevice 0x0440 + 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} + mkdir /config/usb_gadget/g1/functions/accessory.gs2 + mkdir /config/usb_gadget/g1/functions/audio_source.gs3 + mkdir /config/usb_gadget/g1/functions/midi.gs5 + mkdir /config/usb_gadget/g1/functions/ffs.adb + mkdir /config/usb_gadget/g1/functions/ffs.mtp + mkdir /config/usb_gadget/g1/functions/ffs.ptp + mkdir /config/usb_gadget/g1/functions/diag.diag + mkdir /config/usb_gadget/g1/functions/diag.diag_mdm + mkdir /config/usb_gadget/g1/functions/cser.dun.0 + mkdir /config/usb_gadget/g1/functions/cser.nmea.1 + mkdir /config/usb_gadget/g1/functions/gsi.rmnet + mkdir /config/usb_gadget/g1/functions/gsi.rndis + mkdir /config/usb_gadget/g1/functions/gsi.dpl + mkdir /config/usb_gadget/g1/functions/qdss.qdss + mkdir /config/usb_gadget/g1/functions/qdss.qdss_mdm + mkdir /config/usb_gadget/g1/configs/b.1 0770 + write /config/usb_gadget/g1/os_desc/b_vendor_code 0x1 + write /config/usb_gadget/g1/os_desc/qw_sign "MSFT100" + mkdir /dev/usb-ffs 0775 shell shell + mkdir /dev/usb-ffs/adb 0770 shell shell + mount functionfs adb /dev/usb-ffs/adb rmode=0770,fmode=0660,uid=2000,gid=2000,no_disconnect=1 + mkdir /dev/usb-ffs/mtp 0770 mtp mtp + mkdir /dev/usb-ffs/ptp 0770 mtp mtp + 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 + setprop sys.usb.controller "a600000.dwc3" + symlink /config/usb_gadget/g1/configs/b.1 /config/usb_gadget/g1/os_desc/b.1 + write /sys/module/libcomposite/parameters/disable_l1_for_hs "y" + write /config/usb_gadget/g1/functions/gsi.rndis/rndis_class_id 1 + # change /config/usb_gadget permission + start init-gadgethal-sh + +on property:init.svc.console=running + write /sys/class/power_supply/usb/moisture_detection_enabled 0 + +on property:vendor.usb.contaminantdisable=true + write /sys/class/power_supply/usb/moisture_detection_enabled 0 + +on property:init.svc.vendor.charger=running + write /sys/class/typec/port0/port_type sink + +on boot + setprop sys.usb.configfs 2 + write /sys/module/qpnp_pdphy/drivers/platform:qpnp-pdphy/c440000.qcom,spmi:qcom,pm7250b@2:qcom,usb-pdphy@1700/usbpd0/pdo "5V3A" + +on property:sys.usb.config=none && property:sys.usb.configfs=1 + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + +on charger + mkdir /config/usb_gadget/g1 0770 + mkdir /config/usb_gadget/g1/strings/0x409 0770 + write /config/usb_gadget/g1/bcdUSB 0x0200 + write /config/usb_gadget/g1/idVendor 0x18d1 + write /config/usb_gadget/g1/bcdDevice 0x0440 + write /config/usb_gadget/g1/strings/0x409/serialnumber ${ro.serialno} + write /config/usb_gadget/g1/strings/0x409/manufacturer Google + write /config/usb_gadget/g1/strings/0x409/product Pixel + mkdir /config/usb_gadget/g1/functions/midi.gs5 + mkdir /config/usb_gadget/g1/configs/b.1 0770 + mkdir /config/usb_gadget/g1/configs/b.1/strings/0x409 0770 + symlink /config/usb_gadget/g1/configs/b.1 /config/usb_gadget/g1/os_desc/b.1 + setprop sys.usb.controller "a600000.dwc3" + +on property:ro.bootmode=charger + setprop sys.usb.config midi + +on property:sys.usb.config=midi && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "midi" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + write /config/usb_gadget/g1/idVendor 0x18d1 + write /config/usb_gadget/g1/idProduct 0x4eea + 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} diff --git a/init.insmod.charger.cfg b/init.insmod.charger.cfg new file mode 100644 index 00000000..2940d28d --- /dev/null +++ b/init.insmod.charger.cfg @@ -0,0 +1,8 @@ +############################################# +# init.insmod.cfg # +# This file contains kernel modules to load # +# at init time by init.insmod.sh script # +############################################# + +# Load kernel modules +modprobe|-b * diff --git a/init.insmod.sh b/init.insmod.sh new file mode 100644 index 00000000..a222838c --- /dev/null +++ b/init.insmod.sh @@ -0,0 +1,53 @@ +#!/vendor/bin/sh + +############################################################# +### init.insmod.cfg format: ### +### ----------------------------------------------------- ### +### [insmod|setprop|enable/moprobe|wait] [path|prop name] ### +### ... ### +############################################################# + +# imitates wait_for_file() in init +wait_for_file() +{ + filename="${1}" + timeout="${2:-5}" + + expiry=$(($(date "+%s")+timeout)) + while [[ ! -e "${filename}" ]] && [[ "$(date "+%s")" -le "${expiry}" ]] + do + sleep 0.01 + done +} + +if [ $# -eq 1 ]; then + cfg_file=$1 +else + exit 1 +fi + + +if [ -f $cfg_file ]; then + while IFS="|" read -r action arg + do + case $action in + "insmod") insmod $arg ;; + "setprop") setprop $arg 1 ;; + "enable") echo 1 > $arg ;; + "modprobe") + case ${arg} in + "-b *" | "-b") + arg="-b $(cat /vendor/lib/modules/modules.load)" ;; + "*" | "") + arg="$(cat /vendor/lib/modules/modules.load)" ;; + esac + modprobe -a -d /vendor/lib/modules $arg ;; + "wait") wait_for_file $arg ;; + esac + done < $cfg_file +fi + +# set property even if there is no insmod config +# as property value "1" is expected in early-boot trigger +setprop vendor.all.modules.ready 1 +setprop vendor.all.devices.ready 1 diff --git a/init.logging.rc b/init.logging.rc new file mode 100644 index 00000000..969d5489 --- /dev/null +++ b/init.logging.rc @@ -0,0 +1,4 @@ +on post-fs-data + mkdir /data/vendor/modem_dump 0777 system system + mkdir /data/vendor/radio/diag_logs/logs 0777 system system + mkdir /data/vendor/radio/extended_logs 0770 system radio diff --git a/init.mdm.sh b/init.mdm.sh new file mode 100644 index 00000000..3ed7ed5b --- /dev/null +++ b/init.mdm.sh @@ -0,0 +1,34 @@ +#! /vendor/bin/sh + +# Copyright (c) 2013, The Linux Foundation. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of Linux Foundation nor +# the names of its contributors may be used to endorse or promote +# products derived from this software without specific prior written +# permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# + +baseband=`getprop ro.baseband` +if [ "$baseband" = "mdm" ] || [ "$baseband" = "mdm2" ]; then + start vendor.mdm_helper +fi + diff --git a/init.modem.sh b/init.modem.sh new file mode 100644 index 00000000..75520c70 --- /dev/null +++ b/init.modem.sh @@ -0,0 +1,9 @@ +#! /vendor/bin/sh + +# +# Publish CDT IMEI/MEID to properties +# +setprop vendor.modem.cdt.imei1 $(cat /proc/device-tree/chosen/cdt/cdb2/imei1) +setprop vendor.modem.cdt.imei2 $(cat /proc/device-tree/chosen/cdt/cdb2/imei2) +setprop vendor.modem.cdt.meid1 $(cat /proc/device-tree/chosen/cdt/cdb2/meid1) +setprop vendor.modem.cdt.meid2 $(cat /proc/device-tree/chosen/cdt/cdb2/meid2)
\ No newline at end of file diff --git a/init.msm.usb.configfs.rc b/init.msm.usb.configfs.rc new file mode 100644 index 00000000..e57f6995 --- /dev/null +++ b/init.msm.usb.configfs.rc @@ -0,0 +1,1216 @@ +# Copyright (c) 2016-2018, The Linux Foundation. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following +# disclaimer in the documentation and/or other materials provided +# with the distribution. +# * Neither the name of The Linux Foundation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# + +# USB compositions +on property:sys.usb.config=none && property:sys.usb.configfs=1 + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + +on property:sys.usb.config=mass_storage && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "msc" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0xF000 + symlink /config/usb_gadget/g1/functions/mass_storage.0 /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:sys.usb.config=mass_storage,adb && property:sys.usb.configfs=1 + start adbd + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=mass_storage,adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "adb_msc" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x9015 + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/mass_storage.0 /config/usb_gadget/g1/configs/b.1/f2 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,adb && property:sys.usb.configfs=1 + start adbd + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_adb" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x901D + symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x900E + symlink /config/usb_gadget/g1/functions/diag.diag /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:sys.usb.config=diag,serial_cdev,rmnet,adb && property:sys.usb.configfs=1 + start adbd + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,serial_cdev,rmnet,adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "Default composition" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x9091 + symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f3 + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f4 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,serial_cdev,rmnet && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "Default comp without ADB" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x9092 + symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f3 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:vendor.usb.tethering=true + write /sys/class/net/rndis0/queues/rx-0/rps_cpus ${vendor.usb.rps_mask} + +on property:sys.usb.config=rndis + setprop sys.usb.config rndis,${persist.vendor.usb.config.extra} + +on property:sys.usb.config=rndis,none && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0xF00E + symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state rndis + +on property:sys.usb.config=rndis,adb + setprop sys.usb.config rndis,${persist.vendor.usb.config.extra},adb + +on property:sys.usb.config=rndis,none,adb && property:sys.usb.configfs=1 + start adbd + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,none,adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_adb" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x9024 + symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state rndis,adb + +on property:sys.usb.config=rndis,diag && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_diag" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x902C + symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state rndis + +on property:sys.usb.config=rndis,diag,adb && property:sys.usb.configfs=1 + start adbd + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,diag,adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_diag_adb" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x902D + symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f3 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state rndis,adb + +on property:sys.usb.config=rndis,serial_cdev && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_dun" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x90B3 + symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state rndis + +on property:sys.usb.config=rndis,serial_cdev,adb && property:sys.usb.configfs=1 + start adbd + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,serial_cdev,adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_dun_adb" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x90B4 + symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f3 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state rndis,adb + +on property:sys.usb.config=rndis,serial_cdev,diag && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_dun_diag" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x90B5 + symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f3 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state rndis + +on property:sys.usb.config=rndis,serial_cdev,diag,adb && property:sys.usb.configfs=1 + start adbd + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,serial_cdev,diag,adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_dun_diag" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x90B6 + symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f3 + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f4 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state rndis,adb + +on property:sys.usb.config=mtp,diag && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "mtp_diag" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x901B + symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=mtp,diag,adb && property:sys.usb.configfs=1 + start adbd + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=mtp,diag,adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "mtp_diag_adb" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x903A + symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f3 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,qdss && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_qdss" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x904A + write /config/usb_gadget/g1/functions/qdss.qdss/enable_debug_inface 1 + symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f2 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,qdss,adb && property:sys.usb.configfs=1 + start adbd + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,qdss,adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_qdss_adb" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x9060 + write /config/usb_gadget/g1/functions/qdss.qdss/enable_debug_inface 1 + symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f3 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,qdss,rmnet && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_qdss_rmnet" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x9083 + write /config/usb_gadget/g1/functions/qdss.qdss/enable_debug_inface 1 + symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f3 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,qdss,rmnet,adb && property:sys.usb.configfs=1 + start adbd + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,qdss,rmnet,adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_qdss_rmnet_adb" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x9084 + write /config/usb_gadget/g1/functions/qdss.qdss/enable_debug_inface 1 + symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f3 + symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f4 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=rndis,diag,qdss && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_diag_qdss" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x9081 + write /config/usb_gadget/g1/functions/qdss.qdss/enable_debug_inface 1 + symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f3 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=rndis,diag,qdss,adb && property:sys.usb.configfs=1 + start adbd + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,diag,qdss,adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_diag_qdss_adb" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x9082 + write /config/usb_gadget/g1/functions/qdss.qdss/enable_debug_inface 1 + symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f3 + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f4 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=ncm && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ncm" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0xA4A1 + symlink /config/usb_gadget/g1/functions/ncm.0 /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:sys.usb.config=ncm,adb && property:sys.usb.configfs=1 + start adbd + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=ncm,adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ncm_adb" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x908C + symlink /config/usb_gadget/g1/functions/ncm.0 /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,serial_cdev && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_dun" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x9004 + symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,adb,serial_cdev && property:sys.usb.configfs=1 + start adbd + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,adb,serial_cdev && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_adb_dun" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x901f + symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f3 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,serial_cdev,rmnet,dpl && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_dun_rmnet_dpl" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x90b7 + symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f3 + symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f4 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,serial_cdev,rmnet,dpl,adb && property:sys.usb.configfs=1 + start adbd + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,serial_cdev,rmnet,dpl,adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_dun_rmnet_dpl_adb" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x90b8 + symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f3 + symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f4 + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f5 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=rndis,diag,dpl && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_diag_dpl" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x90bf + symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f3 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state rndis + +on property:sys.usb.config=rndis,diag,dpl,adb && property:sys.usb.configfs=1 + start adbd + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,diag,dpl,adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_diag_dpl_adb" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x90c0 + symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f3 + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f4 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state rndis,adb + +on property:sys.usb.config=ccid && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ccid" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x90CE + symlink /config/usb_gadget/g1/functions/ccid.ccid /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:sys.usb.config=ccid,adb && property:sys.usb.configfs=1 + start adbd + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=ccid,adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ccid_adb" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x90CF + symlink /config/usb_gadget/g1/functions/ccid.ccid /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=ccid,diag && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ccid_diag" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x90D0 + symlink /config/usb_gadget/g1/functions/ccid.ccid /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=ccid,diag,adb && property:sys.usb.configfs=1 + start adbd + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=ccid,diag,adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ccid_diag_adb" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x90D1 + symlink /config/usb_gadget/g1/functions/ccid.ccid /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f3 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,serial_cdev,rmnet,ccid && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_dun_rmnet_ccid" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x90D2 + symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f3 + symlink /config/usb_gadget/g1/functions/ccid.ccid /config/usb_gadget/g1/configs/b.1/f4 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,serial_cdev,rmnet,ccid,adb && property:sys.usb.configfs=1 + start adbd + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,serial_cdev,rmnet,ccid,adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_dun_rmnet_ccid_adb" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x90D3 + symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f3 + symlink /config/usb_gadget/g1/functions/ccid.ccid /config/usb_gadget/g1/configs/b.1/f4 + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f5 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,diag_mdm,qdss,qdss_mdm,serial_cdev,serial_cdev_mdm,rmnet && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_diag_mdm,qdss_qdss_mdm_dun_dun_mdm_rmnet" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x90D7 + symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/diag.diag_mdm /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f3 + symlink /config/usb_gadget/g1/functions/qdss.qdss_mdm /config/usb_gadget/g1/configs/b.1/f4 + symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f5 + symlink /config/usb_gadget/g1/functions/cser.dun.2 /config/usb_gadget/g1/configs/b.1/f6 + symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f7 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,diag_mdm,qdss,qdss_mdm,serial_cdev,serial_cdev_mdm,rmnet,adb && property:sys.usb.configfs=1 + start adbd + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,diag_mdm,qdss,qdss_mdm,serial_cdev,serial_cdev_mdm,rmnet,adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_diag_mdm,qdss_qdss_mdm_dun_dun_mdm_rmnet_adb" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x90D8 + symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/diag.diag_mdm /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f3 + symlink /config/usb_gadget/g1/functions/qdss.qdss_mdm /config/usb_gadget/g1/configs/b.1/f4 + symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f5 + symlink /config/usb_gadget/g1/functions/cser.dun.2 /config/usb_gadget/g1/configs/b.1/f6 + symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f7 + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f8 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,diag_mdm,qdss,qdss_mdm,serial_cdev,serial_cdev_mdm,dpl,rmnet && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_diag_mdm,qdss_qdss_mdm_dun_dun_mdm_dpl_rmnet" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x90DD + symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/diag.diag_mdm /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f3 + symlink /config/usb_gadget/g1/functions/qdss.qdss_mdm /config/usb_gadget/g1/configs/b.1/f4 + symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f5 + symlink /config/usb_gadget/g1/functions/cser.dun.2 /config/usb_gadget/g1/configs/b.1/f6 + symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f7 + symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f8 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,diag_mdm,qdss,qdss_mdm,serial_cdev,serial_cdev_mdm,dpl,rmnet,adb && property:sys.usb.configfs=1 + start adbd + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,diag_mdm,qdss,qdss_mdm,serial_cdev,serial_cdev_mdm,dpl,rmnet,adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_diag_mdm,qdss_qdss_mdm_dun_dun_mdm_dpl_rmnet_adb" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x90DE + symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/diag.diag_mdm /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f3 + symlink /config/usb_gadget/g1/functions/qdss.qdss_mdm /config/usb_gadget/g1/configs/b.1/f4 + symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f5 + symlink /config/usb_gadget/g1/functions/cser.dun.2 /config/usb_gadget/g1/configs/b.1/f6 + symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f7 + symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f8 + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,serial_cdev,rmnet,dpl,qdss && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_dun_rmnet_dpl_qdss" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x90DC + symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f3 + symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f4 + symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f5 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,serial_cdev,rmnet,dpl,qdss,adb && property:sys.usb.configfs=1 + start adbd + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,serial_cdev,rmnet,dpl,qdss,adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_dun_rmnet_dpl_qdss_adb" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x90DB + symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f3 + symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f4 + symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f5 + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f6 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,uac2,adb && property:sys.usb.configfs=1 + start adbd + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,uac2,adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_uac2_adb" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x90CA + symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/uac2.0 /config/usb_gadget/g1/configs/b.1/f3 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,uac2 && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_uac2" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x901C + symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/uac2.0 /config/usb_gadget/g1/configs/b.1/f2 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,uvc,adb && property:sys.usb.configfs=1 + start adbd + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,uvc,adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_uvc_adb" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x90CB + symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/uvc.0 /config/usb_gadget/g1/configs/b.1/f3 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,uvc && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_uvc" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x90DF + symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/uvc.0 /config/usb_gadget/g1/configs/b.1/f2 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,uac2,uvc,adb && property:sys.usb.configfs=1 + start adbd + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,uac2,uvc,adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_uac2_uvc_adb" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x90CC + symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/uac2.0 /config/usb_gadget/g1/configs/b.1/f3 + symlink /config/usb_gadget/g1/functions/uvc.0 /config/usb_gadget/g1/configs/b.1/f4 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,uac2,uvc && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_uac2_uvc" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x90E0 + symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/uac2.0 /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/uvc.0 /config/usb_gadget/g1/configs/b.1/f3 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,diag_mdm,qdss,qdss_mdm,serial_cdev,dpl,rmnet && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_diag_mdm_qdss_qdss_mdm_dun_dpl_rmnet" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x90E4 + symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/diag.diag_mdm /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f3 + symlink /config/usb_gadget/g1/functions/qdss.qdss_mdm /config/usb_gadget/g1/configs/b.1/f4 + symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f5 + symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f6 + symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f7 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,diag_mdm,qdss,qdss_mdm,serial_cdev,dpl,rmnet,adb && property:sys.usb.configfs=1 + start adbd + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=diag,diag_mdm,qdss,qdss_mdm,serial_cdev,dpl,rmnet,adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "diag_diag_mdm_qdss_qdss_mdm_dun_dpl_rmnet_adb" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x90E5 + symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/diag.diag_mdm /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f3 + symlink /config/usb_gadget/g1/functions/qdss.qdss_mdm /config/usb_gadget/g1/configs/b.1/f4 + symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f5 + symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f6 + symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.rmnet.inst.name} /config/usb_gadget/g1/configs/b.1/f7 + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f8 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,diag,diag_mdm,qdss,qdss_mdm,serial_cdev,dpl && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_diag_diag_mdm_qdss_qdss_mdm_dun_dpl" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x90E6 + symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/diag.diag_mdm /config/usb_gadget/g1/configs/b.1/f3 + symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f4 + symlink /config/usb_gadget/g1/functions/qdss.qdss_mdm /config/usb_gadget/g1/configs/b.1/f5 + symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f6 + symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f7 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state rndis + +on property:sys.usb.config=rndis,diag,diag_mdm,qdss,qdss_mdm,serial_cdev,dpl,adb && property:sys.usb.configfs=1 + start adbd + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,diag,diag_mdm,qdss,qdss_mdm,serial_cdev,dpl,adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_diag_diag_mdm_qdss_qdss_mdm_dun_dpl_adb" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + rm /config/usb_gadget/g1/configs/b.1/f3 + rm /config/usb_gadget/g1/configs/b.1/f4 + rm /config/usb_gadget/g1/configs/b.1/f5 + rm /config/usb_gadget/g1/configs/b.1/f6 + rm /config/usb_gadget/g1/configs/b.1/f7 + rm /config/usb_gadget/g1/configs/b.1/f8 + rm /config/usb_gadget/g1/configs/b.1/f9 + write /config/usb_gadget/g1/idVendor 0x05C6 + write /config/usb_gadget/g1/idProduct 0x90E7 + symlink /config/usb_gadget/g1/functions/${vendor.usb.rndis.func.name}.rndis /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/diag.diag /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/diag.diag_mdm /config/usb_gadget/g1/configs/b.1/f3 + symlink /config/usb_gadget/g1/functions/qdss.qdss /config/usb_gadget/g1/configs/b.1/f4 + symlink /config/usb_gadget/g1/functions/qdss.qdss_mdm /config/usb_gadget/g1/configs/b.1/f5 + symlink /config/usb_gadget/g1/functions/cser.dun.0 /config/usb_gadget/g1/configs/b.1/f6 + symlink /config/usb_gadget/g1/functions/${vendor.usb.rmnet.func.name}.${vendor.usb.dpl.inst.name} /config/usb_gadget/g1/configs/b.1/f7 + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f8 + write /config/usb_gadget/g1/UDC ${sys.usb.controller} + setprop sys.usb.state rndis,adb + +on property:sys.usb.config=adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/idVendor 0x18d1 + write /config/usb_gadget/g1/idProduct 0x4ee7 + +on property:sys.usb.config=mtp && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/idVendor 0x18d1 + write /config/usb_gadget/g1/idProduct 0x4ee1 + +on property:sys.usb.config=mtp,adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/idVendor 0x18d1 + write /config/usb_gadget/g1/idProduct 0x4ee2 + +on property:sys.usb.config=ptp && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/idVendor 0x18d1 + write /config/usb_gadget/g1/idProduct 0x4ee5 + +on property:sys.usb.config=ptp,adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/idVendor 0x18d1 + write /config/usb_gadget/g1/idProduct 0x4ee6 + +on property:sys.usb.config=accessory && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/idVendor 0x18d1 + write /config/usb_gadget/g1/idProduct 0x2d00 + +on property:sys.usb.config=accessory,adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/idVendor 0x18d1 + write /config/usb_gadget/g1/idProduct 0x2d01 + +on property:sys.usb.config=audio_source && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/idVendor 0x18d1 + write /config/usb_gadget/g1/idProduct 0x2d02 + +on property:sys.usb.config=audio_source,adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/idVendor 0x18d1 + write /config/usb_gadget/g1/idProduct 0x2d03 + +on property:sys.usb.config=accessory,audio_source && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/idVendor 0x18d1 + write /config/usb_gadget/g1/idProduct 0x2d04 + +on property:sys.usb.config=accessory,audio_source,adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/idVendor 0x18d1 + write /config/usb_gadget/g1/idProduct 0x2d05 + +on property:sys.usb.config=midi && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/idVendor 0x18d1 + write /config/usb_gadget/g1/idProduct 0x4ee8 + +on property:sys.usb.config=midi,adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/idVendor 0x18d1 + write /config/usb_gadget/g1/idProduct 0x4ee9 + +on property:vendor.usb.eud=1 + write /config/usb_gadget/g1/configs/b.1/MaxPower 1 + write /sys/module/eud/parameters/enable 1 + write /sys/kernel/debug/pmic-votable/USB_ICL/force_active 1 + write /sys/kernel/debug/pmic-votable/USB_ICL/force_val 500 + +on property:vendor.usb.eud=0 + write /sys/kernel/debug/pmic-votable/USB_ICL/force_active 0 + write /sys/kernel/debug/pmic-votable/USB_ICL/force_val 0 + write /config/usb_gadget/g1/configs/b.1/MaxPower 0 + write /sys/module/eud/parameters/enable 0 diff --git a/init.power.rc b/init.power.rc new file mode 100644 index 00000000..4394752c --- /dev/null +++ b/init.power.rc @@ -0,0 +1,150 @@ +# +# 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. +# + +on property:vendor.setup.power=1 + # Enable suspend clock reporting + write /sys/kernel/debug/clk/debug_suspend 1 + + # Enable bus-dcvs + write /sys/devices/platform/soc/soc:qcom,cpu-cpu-llcc-bw/devfreq/soc:qcom,cpu-cpu-llcc-bw/governor bw_hwmon + write /sys/devices/platform/soc/soc:qcom,cpu-cpu-llcc-bw/devfreq/soc:qcom,cpu-cpu-llcc-bw/polling_interval 50 + write /sys/devices/platform/soc/soc:qcom,cpu-cpu-llcc-bw/devfreq/soc:qcom,cpu-cpu-llcc-bw/bw_hwmon/mbps_zones "2288 4577 7110 9155 12298 14236 16265" + write /sys/devices/platform/soc/soc:qcom,cpu-cpu-llcc-bw/devfreq/soc:qcom,cpu-cpu-llcc-bw/bw_hwmon/sample_ms 4 + write /sys/devices/platform/soc/soc:qcom,cpu-cpu-llcc-bw/devfreq/soc:qcom,cpu-cpu-llcc-bw/bw_hwmon/io_percent 68 + write /sys/devices/platform/soc/soc:qcom,cpu-cpu-llcc-bw/devfreq/soc:qcom,cpu-cpu-llcc-bw/bw_hwmon/hist_memory 20 + write /sys/devices/platform/soc/soc:qcom,cpu-cpu-llcc-bw/devfreq/soc:qcom,cpu-cpu-llcc-bw/bw_hwmon/hyst_length 0 + write /sys/devices/platform/soc/soc:qcom,cpu-cpu-llcc-bw/devfreq/soc:qcom,cpu-cpu-llcc-bw/bw_hwmon/down_thres 80 + write /sys/devices/platform/soc/soc:qcom,cpu-cpu-llcc-bw/devfreq/soc:qcom,cpu-cpu-llcc-bw/bw_hwmon/guard_band_mbps 0 + write /sys/devices/platform/soc/soc:qcom,cpu-cpu-llcc-bw/devfreq/soc:qcom,cpu-cpu-llcc-bw/bw_hwmon/up_scale 250 + write /sys/devices/platform/soc/soc:qcom,cpu-cpu-llcc-bw/devfreq/soc:qcom,cpu-cpu-llcc-bw/bw_hwmon/idle_mbps 1600 + + write /sys/devices/platform/soc/soc:qcom,cpu-llcc-ddr-bw/devfreq/soc:qcom,cpu-llcc-ddr-bw/governor bw_hwmon + write /sys/devices/platform/soc/soc:qcom,cpu-llcc-ddr-bw/devfreq/soc:qcom,cpu-llcc-ddr-bw/polling_interval 50 + write /sys/devices/platform/soc/soc:qcom,cpu-llcc-ddr-bw/devfreq/soc:qcom,cpu-llcc-ddr-bw/bw_hwmon/mbps_zones "1144 1720 2086 2929 3879 5931 6881 7980" + write /sys/devices/platform/soc/soc:qcom,cpu-llcc-ddr-bw/devfreq/soc:qcom,cpu-llcc-ddr-bw/bw_hwmon/sample_ms 4 + write /sys/devices/platform/soc/soc:qcom,cpu-llcc-ddr-bw/devfreq/soc:qcom,cpu-llcc-ddr-bw/bw_hwmon/io_percent 68 + write /sys/devices/platform/soc/soc:qcom,cpu-llcc-ddr-bw/devfreq/soc:qcom,cpu-llcc-ddr-bw/bw_hwmon/hist_memory 20 + write /sys/devices/platform/soc/soc:qcom,cpu-llcc-ddr-bw/devfreq/soc:qcom,cpu-llcc-ddr-bw/bw_hwmon/hyst_length 0 + write /sys/devices/platform/soc/soc:qcom,cpu-llcc-ddr-bw/devfreq/soc:qcom,cpu-llcc-ddr-bw/bw_hwmon/down_thres 80 + write /sys/devices/platform/soc/soc:qcom,cpu-llcc-ddr-bw/devfreq/soc:qcom,cpu-llcc-ddr-bw/bw_hwmon/guard_band_mbps 0 + write /sys/devices/platform/soc/soc:qcom,cpu-llcc-ddr-bw/devfreq/soc:qcom,cpu-llcc-ddr-bw/bw_hwmon/up_scale 250 + write /sys/devices/platform/soc/soc:qcom,cpu-llcc-ddr-bw/devfreq/soc:qcom,cpu-llcc-ddr-bw/bw_hwmon/idle_mbps 1600 + + write /sys/devices/virtual/npu/msm_npu/pwr 1 + write /sys/devices/platform/soc/soc:qcom,npu-llcc-ddr-bw/devfreq/soc:qcom,npu-llcc-ddr-bw/governor "bw_hwmon" + write /sys/devices/platform/soc/soc:qcom,npu-llcc-ddr-bw/devfreq/soc:qcom,npu-llcc-ddr-bw/polling_interval 40 + write /sys/devices/platform/soc/soc:qcom,npu-llcc-ddr-bw/devfreq/soc:qcom,npu-llcc-ddr-bw/bw_hwmon/mbps_zones "1144 1720 2086 2929 3879 5931 6881 7980" + write /sys/devices/platform/soc/soc:qcom,npu-llcc-ddr-bw/devfreq/soc:qcom,npu-llcc-ddr-bw/bw_hwmon/sample_ms 4 + write /sys/devices/platform/soc/soc:qcom,npu-llcc-ddr-bw/devfreq/soc:qcom,npu-llcc-ddr-bw/bw_hwmon/io_percent 80 + write /sys/devices/platform/soc/soc:qcom,npu-llcc-ddr-bw/devfreq/soc:qcom,npu-llcc-ddr-bw/bw_hwmon/hist_memory 20 + write /sys/devices/platform/soc/soc:qcom,npu-llcc-ddr-bw/devfreq/soc:qcom,npu-llcc-ddr-bw/bw_hwmon/hyst_length 10 + write /sys/devices/platform/soc/soc:qcom,npu-llcc-ddr-bw/devfreq/soc:qcom,npu-llcc-ddr-bw/bw_hwmon/down_thres 30 + write /sys/devices/platform/soc/soc:qcom,npu-llcc-ddr-bw/devfreq/soc:qcom,npu-llcc-ddr-bw/bw_hwmon/guard_band_mbps 0 + write /sys/devices/platform/soc/soc:qcom,npu-llcc-ddr-bw/devfreq/soc:qcom,npu-llcc-ddr-bw/bw_hwmon/up_scale 250 + write /sys/devices/platform/soc/soc:qcom,npu-llcc-ddr-bw/devfreq/soc:qcom,npu-llcc-ddr-bw/bw_hwmon/idle_mbps 0 + write /sys/devices/virtual/npu/msm_npu/pwr 0 + + write /sys/devices/virtual/npu/msm_npu/pwr 1 + write /sys/devices/platform/soc/soc:qcom,npudsp-npu-ddr-bw/devfreq/soc:qcom,npudsp-npu-ddr-bw/governor "bw_hwmon" + write /sys/devices/platform/soc/soc:qcom,npudsp-npu-ddr-bw/devfreq/soc:qcom,npudsp-npu-ddr-bw/polling_interval 40 + write /sys/devices/platform/soc/soc:qcom,npudsp-npu-ddr-bw/devfreq/soc:qcom,npudsp-npu-ddr-bw/bw_hwmon/mbps_zones "1144 1720 2086 2929 3879 5931 6881 7980" + write /sys/devices/platform/soc/soc:qcom,npudsp-npu-ddr-bw/devfreq/soc:qcom,npudsp-npu-ddr-bw/bw_hwmon/sample_ms 4 + write /sys/devices/platform/soc/soc:qcom,npudsp-npu-ddr-bw/devfreq/soc:qcom,npudsp-npu-ddr-bw/bw_hwmon/io_percent 80 + write /sys/devices/platform/soc/soc:qcom,npudsp-npu-ddr-bw/devfreq/soc:qcom,npudsp-npu-ddr-bw/bw_hwmon/hist_memory 20 + write /sys/devices/platform/soc/soc:qcom,npudsp-npu-ddr-bw/devfreq/soc:qcom,npudsp-npu-ddr-bw/bw_hwmon/hyst_length 10 + write /sys/devices/platform/soc/soc:qcom,npudsp-npu-ddr-bw/devfreq/soc:qcom,npudsp-npu-ddr-bw/bw_hwmon/down_thres 30 + write /sys/devices/platform/soc/soc:qcom,npudsp-npu-ddr-bw/devfreq/soc:qcom,npudsp-npu-ddr-bw/bw_hwmon/guard_band_mbps 0 + write /sys/devices/platform/soc/soc:qcom,npudsp-npu-ddr-bw/devfreq/soc:qcom,npudsp-npu-ddr-bw/bw_hwmon/up_scale 250 + write /sys/devices/platform/soc/soc:qcom,npudsp-npu-ddr-bw/devfreq/soc:qcom,npudsp-npu-ddr-bw/bw_hwmon/idle_mbps 0 + write /sys/devices/virtual/npu/msm_npu/pwr 0 + + write /sys/devices/virtual/npu/msm_npu/pwr 1 + write /sys/devices/platform/soc/soc:qcom,npu-npu-llcc-bw/devfreq/soc:qcom,npu-npu-llcc-bw/governor "bw_hwmon" + write /sys/devices/platform/soc/soc:qcom,npu-npu-llcc-bw/devfreq/soc:qcom,npu-npu-llcc-bw/polling_interval 40 + write /sys/devices/platform/soc/soc:qcom,npu-npu-llcc-bw/devfreq/soc:qcom,npu-npu-llcc-bw/bw_hwmon/mbps_zones "2288 4577 7110 9155 12298 14236 16265" + write /sys/devices/platform/soc/soc:qcom,npu-npu-llcc-bw/devfreq/soc:qcom,npu-npu-llcc-bw/bw_hwmon/sample_ms 4 + write /sys/devices/platform/soc/soc:qcom,npu-npu-llcc-bw/devfreq/soc:qcom,npu-npu-llcc-bw/bw_hwmon/io_percent 100 + write /sys/devices/platform/soc/soc:qcom,npu-npu-llcc-bw/devfreq/soc:qcom,npu-npu-llcc-bw/bw_hwmon/hist_memory 20 + write /sys/devices/platform/soc/soc:qcom,npu-npu-llcc-bw/devfreq/soc:qcom,npu-npu-llcc-bw/bw_hwmon/hyst_length 10 + write /sys/devices/platform/soc/soc:qcom,npu-npu-llcc-bw/devfreq/soc:qcom,npu-npu-llcc-bw/bw_hwmon/down_thres 30 + write /sys/devices/platform/soc/soc:qcom,npu-npu-llcc-bw/devfreq/soc:qcom,npu-npu-llcc-bw/bw_hwmon/guard_band_mbps 0 + write /sys/devices/platform/soc/soc:qcom,npu-npu-llcc-bw/devfreq/soc:qcom,npu-npu-llcc-bw/bw_hwmon/up_scale 250 + write /sys/devices/virtual/npu/msm_npu/pwr 0 + + #Enable mem_latency governor for L3, LLCC, and DDR scaling + write /sys/devices/platform/soc/soc:qcom,cpu0-cpu-llcc-lat/devfreq/soc:qcom,cpu0-cpu-llcc-lat/governor mem_latency + write /sys/devices/platform/soc/soc:qcom,cpu0-cpu-llcc-lat/devfreq/soc:qcom,cpu0-cpu-llcc-lat/polling_interval 10 + write /sys/devices/platform/soc/soc:qcom,cpu0-cpu-llcc-lat/devfreq/soc:qcom,cpu0-cpu-llcc-lat/mem_latency/ratio_ceil 400 + + write /sys/devices/platform/soc/18321000.qcom,devfreq-l3/18321000.qcom,devfreq-l3:qcom,cpu0-cpu-l3-lat/devfreq/18321000.qcom,devfreq-l3:qcom,cpu0-cpu-l3-lat/governor mem_latency + write /sys/devices/platform/soc/18321000.qcom,devfreq-l3/18321000.qcom,devfreq-l3:qcom,cpu0-cpu-l3-lat/devfreq/18321000.qcom,devfreq-l3:qcom,cpu0-cpu-l3-lat/polling_interval 10 + write /sys/devices/platform/soc/18321000.qcom,devfreq-l3/18321000.qcom,devfreq-l3:qcom,cpu0-cpu-l3-lat/devfreq/18321000.qcom,devfreq-l3:qcom,cpu0-cpu-l3-lat/mem_latency/ratio_ceil 400 + + write /sys/devices/platform/soc/soc:qcom,cpu0-llcc-ddr-lat/devfreq/soc:qcom,cpu0-llcc-ddr-lat/governor mem_latency + write /sys/devices/platform/soc/soc:qcom,cpu0-llcc-ddr-lat/devfreq/soc:qcom,cpu0-llcc-ddr-lat/polling_interval 10 + write /sys/devices/platform/soc/soc:qcom,cpu0-llcc-ddr-lat/devfreq/soc:qcom,cpu0-llcc-ddr-lat/mem_latency/ratio_ceil 400 + + write /sys/devices/platform/soc/soc:qcom,cpu6-cpu-llcc-lat/devfreq/soc:qcom,cpu6-cpu-llcc-lat/governor mem_latency + write /sys/devices/platform/soc/soc:qcom,cpu6-cpu-llcc-lat/devfreq/soc:qcom,cpu6-cpu-llcc-lat/polling_interval 10 + write /sys/devices/platform/soc/soc:qcom,cpu6-cpu-llcc-lat/devfreq/soc:qcom,cpu6-cpu-llcc-lat/mem_latency/ratio_ceil 400 + + write /sys/devices/platform/soc/18321000.qcom,devfreq-l3/18321000.qcom,devfreq-l3:qcom,cpu6-cpu-l3-lat/devfreq/18321000.qcom,devfreq-l3:qcom,cpu6-cpu-l3-lat/governor mem_latency + write /sys/devices/platform/soc/18321000.qcom,devfreq-l3/18321000.qcom,devfreq-l3:qcom,cpu6-cpu-l3-lat/devfreq/18321000.qcom,devfreq-l3:qcom,cpu6-cpu-l3-lat/polling_interval 10 + #Gold L3 ratio ceil + write /sys/devices/platform/soc/18321000.qcom,devfreq-l3/18321000.qcom,devfreq-l3:qcom,cpu6-cpu-l3-lat/devfreq/18321000.qcom,devfreq-l3:qcom,cpu6-cpu-l3-lat/mem_latency/ratio_ceil 4000 + + write /sys/devices/platform/soc/18321000.qcom,devfreq-l3/18321000.qcom,devfreq-l3:qcom,cpu7-cpu-l3-lat/devfreq/18321000.qcom,devfreq-l3:qcom,cpu7-cpu-l3-lat/governor mem_latency + write /sys/devices/platform/soc/18321000.qcom,devfreq-l3/18321000.qcom,devfreq-l3:qcom,cpu7-cpu-l3-lat/devfreq/18321000.qcom,devfreq-l3:qcom,cpu7-cpu-l3-lat/polling_interval 10 + #Prime L3 ratio ceil + write /sys/devices/platform/soc/18321000.qcom,devfreq-l3/18321000.qcom,devfreq-l3:qcom,cpu7-cpu-l3-lat/devfreq/18321000.qcom,devfreq-l3:qcom,cpu7-cpu-l3-lat/mem_latency/ratio_ceil 4000 + + write /sys/devices/platform/soc/soc:qcom,cpu6-llcc-ddr-lat/devfreq/soc:qcom,cpu6-llcc-ddr-lat/governor mem_latency + write /sys/devices/platform/soc/soc:qcom,cpu6-llcc-ddr-lat/devfreq/soc:qcom,cpu6-llcc-ddr-lat/polling_interval 10 + write /sys/devices/platform/soc/soc:qcom,cpu6-llcc-ddr-lat/devfreq/soc:qcom,cpu6-llcc-ddr-lat/mem_latency/ratio_ceil 400 + + #Enable compute governor for gold latfloor + write /sys/devices/platform/soc/soc:qcom,cpu0-cpu-ddr-latfloor/devfreq/soc:qcom,cpu0-cpu-ddr-latfloor/governor compute + write /sys/devices/platform/soc/soc:qcom,cpu0-cpu-ddr-latfloor/devfreq/soc:qcom,cpu0-cpu-ddr-latfloor/polling_interval 10 + + write /sys/devices/platform/soc/soc:qcom,cpu6-cpu-ddr-latfloor/devfreq/soc:qcom,cpu6-cpu-ddr-latfloor/governor compute + write /sys/devices/platform/soc/soc:qcom,cpu6-cpu-ddr-latfloor/devfreq/soc:qcom,cpu6-cpu-ddr-latfloor/polling_interval 10 + + write /sys/devices/platform/soc/soc:qcom,cpu7-cpu-ddr-latfloor/devfreq/soc:qcom,cpu7-cpu-ddr-latfloor/governor compute + write /sys/devices/platform/soc/soc:qcom,cpu7-cpu-ddr-latfloor/devfreq/soc:qcom,cpu7-cpu-ddr-latfloor/polling_interval 10 + + #Enable cdspl3 governor for L3 cdsp nodes + write /sys/devices/platform/soc/18321000.qcom,devfreq-l3/18321000.qcom,devfreq-l3:qcom,cdsp-cdsp-l3-lat/devfreq/18321000.qcom,devfreq-l3:qcom,cdsp-cdsp-l3-lat/governor cdspl3 + + # Enable powersaving + write /sys/module/lpm_levels/parameters/sleep_disabled 0 + + # Enable UFS powersaving + write /dev/sys/block/bootdevice/clkgate_enable 1 + + # Enable idle state listener + write /sys/class/drm/card0/device/idle_encoder_mask 1 + write /sys/class/drm/card0/device/idle_timeout_ms 100 + + #Enable PowerHAL hint processing + setprop vendor.powerhal.init 1 + +on boot + # Disable console_suspend to get better logging for kernel crashes + write /sys/module/printk/parameters/console_suspend N + +# If UART is on, enable console_suspend on boot_complete to save power +on property:sys.boot_completed=1 && property:init.svc.console=running + write /sys/module/printk/parameters/console_suspend Y diff --git a/init.qcom.modem_links.sh b/init.qcom.modem_links.sh new file mode 100644 index 00000000..8aba652c --- /dev/null +++ b/init.qcom.modem_links.sh @@ -0,0 +1,132 @@ +#!/system/bin/sh +# Copyright (c) 2013, The Linux Foundation. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following +# disclaimer in the documentation and/or other materials provided +# with the distribution. +# * Neither the name of The Linux Foundation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# + +# No path is set up at this point so we have to do it here. +PATH=/sbin:/system/sbin:/system/bin:/system/xbin +export PATH + +# Check for images and set up symlinks +cd /firmware/image + +# Get the list of files in /firmware/image +# for which sym links have to be created + +fwfiles=`ls modem* adsp* wcnss* mba*` + +# Check if the links with similar names +# have been created in /system/etc/firmware + +cd /system/etc/firmware +linksNeeded=0 + +# For everyfile in fwfiles check if +# the corresponding file exists +for fwfile in $fwfiles; do + + # if (condition) does not seem to work + # with the android shell. Therefore + # make do with case statements instead. + # if a file named $fwfile is present + # no need to create links. If the file + # with the name $fwfile is not present + # need to create links. + + case `ls $fwfile` in + $fwfile) + continue;; + *) + # file with $fwfile does not exist + # need to create links + linksNeeded=1 + break;; + esac + +done + +# symlinks created for qca6714 firmware +ln -s /firmware/image/athwlan.bin /system/etc/firmware/athwlan.bin +ln -s /firmware/image/fakeboar.bin /system/etc/firmware/fakeBoardData_AR6004.bin +ln -s /firmware/image/otp.bin /system/etc/firmware/otp.bin +ln -s /firmware/image/utf.bin /system/etc/firmware/utf.bin + +case $linksNeeded in + 1) + cd /firmware/image + + case `ls modem.mdt 2>/dev/null` in + modem.mdt) + for imgfile in modem*; do + ln -s /firmware/image/$imgfile /system/etc/firmware/$imgfile 2>/dev/null + done + ;; + *) + # trying to log here but nothing will be logged since it is + # early in the boot process. Is there a way to log this message? + log -p w -t PIL no modem image found;; + esac + + case `ls adsp.mdt 2>/dev/null` in + adsp.mdt) + for imgfile in adsp*; do + ln -s /firmware/image/$imgfile /system/etc/firmware/$imgfile 2>/dev/null + done + ;; + *) + log -p w -t PIL no adsp image found;; + esac + + case `ls wcnss.mdt 2>/dev/null` in + wcnss.mdt) + for imgfile in wcnss*; do + ln -s /firmware/image/$imgfile /system/etc/firmware/$imgfile 2>/dev/null + done + ;; + *) + log -p w -t PIL no wcnss image found;; + esac + + case `ls mba.mdt 2>/dev/null` in + mba.mdt) + for imgfile in mba*; do + ln -s /firmware/image/$imgfile /system/etc/firmware/$imgfile 2>/dev/null + done + ;; + *) + log -p w -t PIL no mba image found;; + esac + + ;; + + *) + # Nothing to do. No links needed + ;; +esac + +cd / diff --git a/init.qcom.usb.rc b/init.qcom.usb.rc new file mode 100644 index 00000000..bebc8079 --- /dev/null +++ b/init.qcom.usb.rc @@ -0,0 +1,1665 @@ +# Copyright (c) 2011-2016, 2018 The Linux Foundation. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of The Linux Foundation nor +# the names of its contributors may be used to endorse or promote +# products derived from this software without specific prior written +# permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# + +# controller name can be overridden from boot command line +on init + setprop sys.usb.controller ${ro.boot.usbcontroller} + +on property:ro.boot.usbcontroller=* + setprop sys.usb.controller ${ro.boot.usbcontroller} + +on charger + mkdir /dev/usb-ffs 0770 shell shell + mkdir /dev/usb-ffs/adb 0770 shell shell + mount configfs none /config + mkdir /config/usb_gadget/g1 0770 shell shell + mkdir /config/usb_gadget/g1/strings/0x409 0770 shell shell + write /config/usb_gadget/g1/bcdUSB 0x0200 + write /config/usb_gadget/g1/os_desc/use 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} + mkdir /config/usb_gadget/g1/functions/mass_storage.0 + mkdir /config/usb_gadget/g1/functions/ffs.adb + mkdir /config/usb_gadget/g1/configs/b.1 0770 shell shell + mkdir /config/usb_gadget/g1/configs/b.1/strings/0x409 0770 shell shell + write /config/usb_gadget/g1/os_desc/b_vendor_code 0x1 + symlink /config/usb_gadget/g1/configs/b.1 /config/usb_gadget/g1/os_desc/b.1 + mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000 + write /sys/class/android_usb/android0/f_ffs/aliases adb + enable vendor.qcom-usb-sh + start vendor.qcom-usb-sh + setprop sys.usb.config mass_storage + +on boot + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + mkdir /dev/usb-ffs 0770 shell shell + mkdir /dev/usb-ffs/adb 0770 shell shell + mount configfs none /config + mkdir /config/usb_gadget/g1 0770 shell shell + mkdir /config/usb_gadget/g1/strings/0x409 0770 shell shell + write /config/usb_gadget/g1/bcdUSB 0x0200 + write /config/usb_gadget/g1/os_desc/use 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} + mkdir /config/usb_gadget/g1/functions/mass_storage.0 + mkdir /config/usb_gadget/g1/functions/mtp.gs0 + mkdir /config/usb_gadget/g1/functions/ptp.gs1 + mkdir /config/usb_gadget/g1/functions/accessory.gs2 + mkdir /config/usb_gadget/g1/functions/audio_source.gs3 + mkdir /config/usb_gadget/g1/functions/midi.gs5 + mkdir /config/usb_gadget/g1/functions/ffs.adb + mkdir /config/usb_gadget/g1/functions/diag.diag + mkdir /config/usb_gadget/g1/functions/diag.diag_mdm + mkdir /config/usb_gadget/g1/functions/cser.dun.0 + mkdir /config/usb_gadget/g1/functions/cser.nmea.1 + mkdir /config/usb_gadget/g1/functions/cser.dun.2 + mkdir /config/usb_gadget/g1/functions/gsi.rmnet + mkdir /config/usb_gadget/g1/functions/gsi.rndis + mkdir /config/usb_gadget/g1/functions/gsi.dpl + mkdir /config/usb_gadget/g1/functions/qdss.qdss + mkdir /config/usb_gadget/g1/functions/qdss.qdss_mdm + mkdir /config/usb_gadget/g1/functions/rndis_bam.rndis + mkdir /config/usb_gadget/g1/functions/rndis.rndis + mkdir /config/usb_gadget/g1/functions/rmnet_bam.rmnet + mkdir /config/usb_gadget/g1/functions/rmnet_bam.dpl + mkdir /config/usb_gadget/g1/functions/rmnet_bam.rmnet_bam_dmux + mkdir /config/usb_gadget/g1/functions/rmnet_bam.dpl_bam_dmux + mkdir /config/usb_gadget/g1/functions/ncm.0 + mkdir /config/usb_gadget/g1/functions/ccid.ccid + mkdir /config/usb_gadget/g1/functions/uac2.0 + mkdir /config/usb_gadget/g1/functions/uvc.0 + mkdir /config/usb_gadget/g1/configs/b.1 0770 shell shell + mkdir /config/usb_gadget/g1/configs/b.1/strings/0x409 0770 shell shell + write /config/usb_gadget/g1/os_desc/b_vendor_code 0x1 + write /config/usb_gadget/g1/os_desc/qw_sign "MSFT100" + symlink /config/usb_gadget/g1/configs/b.1 /config/usb_gadget/g1/os_desc/b.1 + mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000 + write /sys/class/android_usb/android0/f_ffs/aliases adb + +on load_persist_props_action + enable vendor.qcom-usb-sh + +service vendor.qcom-usb-sh /vendor/bin/init.qcom.usb.sh + class core + user root + oneshot + disabled + +on property:persist.vendor.usb.config=* + setprop persist.sys.usb.config ${persist.vendor.usb.config} + +on boot && property:ro.boot.usbconfigfs=true + setprop sys.usb.configfs 1 + +# Following are the parameters required for usb functionality. They provide configurable options like +# product_id/vendor id and allows specifying required functions: +# +# Required parameters: +# +# /sys/class/android_usb/android0/enable: Enables/disables usb composition +# Value: 0 (disable), 1 (enable) +# +# /sys/class/android_usb/android0/idVendor: Stores Vendor ID +# Value: 05c6 (Vendor id for Qualcomm Inc) +# +# /sys/class/android_usb/android0/idProduct: Stores Product id corresponding to usb composition +# Value: 0x9xxx for composite interface, 0xFxxx for single interface +# +# /sys/class/android_usb/android0/f_diag/clients: Stores name of clients representing a diag interface. +# Value: Passed one per interface. e.g. diag[,diag_mdm, diag_qsc, diag_mdm2] +# +# /sys/class/android_usb/android0/functions: Stores name of the function drivers used in usb composition. +# Value: Passed one per function driver. e.g. diag[,adb] +# +#Optional parameters: +# +# /sys/class/android_usb/android0/f_serial/transports: Stores type of underlying transports used to +# communicate to serial interface. +# Value: Passed one per interface. One value represents control and data transport together. +# e.g. smd[,sdio,tty,hsic] +# Only required if serial interface is present. +# +# /sys/class/android_usb/android0/f_serial/transport_names: Stores name of the underlying transports +# used to communicate to serial interface. This is used to distinguish between more than one interface +# using same transport type. +# Value: Passed one per interface. One value represents control and data transport together. +# e.g. serial_hsic[,serial_hsusb] +# Only required for transport type hsic, optional for other transport types. +# +# /sys/class/android_usb/android0/f_rmnet/transports: Stores type of underlying transports used to +# communicate to rmnet interface. +# Value: Passed two per interface as control, data transport type pair. +# e.g. smd,bam[,hsuart,hsuart] +# Only required if rmnet interface is present. +# +# /sys/class/android_usb/android0/f_rmnet/transport_names: Stores name of the underlying transports +# used to communicate to rmnet interface. This is used to distinguish between more than one interface +# using same transport type. +# Value: Passed one per interface. One value represents control and data transport together. +# e.g. rmnet_hsic[,rmnet_hsusb] +# Only required for transport type hsic, optional for other transport types. + +# USB compositions +on property:sys.usb.config=diag,serial_tty,serial_smd && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9002 + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_serial/transports tty,smd + write /sys/class/android_usb/android0/functions diag,serial + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,serial_tty,serial_smd,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9020 + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_serial/transports smd,tty + write /sys/class/android_usb/android0/functions diag,adb,serial + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 901D + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/functions diag,adb + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 900E + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/functions diag + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,serial_smd,rmnet_bam,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9091 + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_serial/transports smd + write /sys/class/android_usb/android0/f_rmnet/transports smd,bam + write /sys/class/android_usb/android0/functions diag,serial,rmnet,adb + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,serial_smd,rmnet_qti_bam,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9091 + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_serial/transports smd + write /sys/class/android_usb/android0/f_rmnet/transports qti,bam + write /sys/class/android_usb/android0/functions diag,serial,rmnet,adb + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,serial_smd,rmnet_bam && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9092 + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_serial/transports smd + write /sys/class/android_usb/android0/f_rmnet/transports smd,bam + write /sys/class/android_usb/android0/functions diag,serial,rmnet + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,serial_smd,rmnet_qti_bam && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9092 + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_serial/transports smd + write /sys/class/android_usb/android0/f_rmnet/transports qti,bam + write /sys/class/android_usb/android0/functions diag,serial,rmnet + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,serial_cdev,serial_tty,rmnet_ipa,mass_storage,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9025 + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_serial/transports char_bridge,tty + write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa + write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,serial_cdev,serial_tty,rmnet_ipa,mass_storage && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9026 + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_serial/transports char_bridge,tty + write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa + write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_bam,mass_storage,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9025 + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_serial/transports smd,tty + write /sys/class/android_usb/android0/f_rmnet/transports smd,bam + write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,acm_smd,acm_tty,rmnet_bam,mass_storage,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 903D + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_acm/acm_transports smd,tty + write /sys/class/android_usb/android0/f_rmnet/transports smd,bam + write /sys/class/android_usb/android0/functions diag,adb,acm,rmnet,mass_storage + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_bam,mass_storage && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9026 + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_serial/transports smd,tty + write /sys/class/android_usb/android0/f_rmnet/transports smd,bam + write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,acm_smd,acm_tty,rmnet_bam,mass_storage && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 903E + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_acm/acm_transports smd,tty + write /sys/class/android_usb/android0/f_rmnet/transports smd,bam + write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,diag_mdm,serial_sdio,serial_smd,rmnet_smd_sdio,mass_storage,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9037 + write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm + write /sys/class/android_usb/android0/f_serial/transports sdio,smd + write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet_smd_sdio,mass_storage + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,diag_mdm,acm_sdio,acm_smd,rmnet_smd_sdio,mass_storage,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 903B + write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm + write /sys/class/android_usb/android0/f_acm/acm_transports sdio,smd + write /sys/class/android_usb/android0/functions diag,adb,acm,rmnet_smd_sdio,mass_storage + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,diag_mdm,serial_sdio,serial_smd,rmnet_smd_sdio,mass_storage && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9038 + write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm + write /sys/class/android_usb/android0/f_serial/transports sdio,smd + write /sys/class/android_usb/android0/functions diag,serial,rmnet_smd_sdio,mass_storage + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,diag_mdm,acm_sdio,acm_smd,rmnet_smd_sdio,mass_storage && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 903C + write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm + write /sys/class/android_usb/android0/f_acm/acm_transports sdio,smd + write /sys/class/android_usb/android0/functions diag,acm,rmnet_smd_sdio,mass_storage + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,diag_mdm,serial_sdio,serial_tty,rmnet_sdio,mass_storage,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9031 + write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm + write /sys/class/android_usb/android0/f_serial/transports sdio,tty + write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet_sdio,mass_storage + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,diag_mdm,acm_sdio,acm_tty,rmnet_sdio,mass_storage,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 903B + write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm + write /sys/class/android_usb/android0/f_acm/acm_transports sdio,tty + write /sys/class/android_usb/android0/functions diag,adb,acm,rmnet_sdio,mass_storage + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,diag_mdm,serial_sdio,serial_tty,rmnet_sdio,mass_storage && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9032 + write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm + write /sys/class/android_usb/android0/f_serial/transports sdio,tty + write /sys/class/android_usb/android0/functions diag,serial,rmnet_sdio,mass_storage + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,diag_mdm,acm_sdio,acm_tty,rmnet_sdio,mass_storage && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 903C + write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm + write /sys/class/android_usb/android0/f_acm/acm_transports sdio,tty + write /sys/class/android_usb/android0/functions diag,acm,rmnet_sdio,mass_storage + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,serial_tty,serial_tty,rmnet_smd,mass_storage,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9025 + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_serial/transports tty,tty + write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet_smd,mass_storage + write /sys/class/android_usb/android0/enable 1 + start adbd + start vendor.port-bridge + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,acm_tty,acm_tty,rmnet_smd,mass_storage,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 903D + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_acm/acm_transports tty,tty + write /sys/class/android_usb/android0/functions diag,adb,acm,rmnet_smd,mass_storage + write /sys/class/android_usb/android0/enable 1 + start adbd + start vendor.port-bridge + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,serial_tty,serial_tty,rmnet_smd,mass_storage && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9026 + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_serial/transports tty,tty + write /sys/class/android_usb/android0/functions diag,serial,rmnet_smd,mass_storage + write /sys/class/android_usb/android0/enable 1 + start vendor.port-bridge + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,acm_tty,acm_tty,rmnet_smd,mass_storage && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 903E + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_acm/acm_transports tty,tty + write /sys/class/android_usb/android0/functions diag,serial,rmnet_smd,mass_storage + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_smd,mass_storage,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9025 + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_serial/transports smd,tty + write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet_smd,mass_storage + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,acm_smd,acm_tty,rmnet_smd,mass_storage,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 903D + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_acm/acm_transports smd,tty + write /sys/class/android_usb/android0/functions diag,adb,acm,rmnet_smd,mass_storage + write /sys/class/android_usb/android0/enable 1 + start adbd + start vendor.port-bridge + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_smd,mass_storage && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9026 + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_serial/transports smd,tty + write /sys/class/android_usb/android0/functions diag,serial,rmnet_smd,mass_storage + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,acm_smd,acm_tty,rmnet_smd,mass_storage && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 903E + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_acm/acm_transports smd,tty + write /sys/class/android_usb/android0/functions diag,serial,rmnet_smd,mass_storage + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +# RmNet using USB BAM to IPA BAM +on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_ipa,mass_storage,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9025 + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_serial/transports smd,tty + write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa + write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_ipa,mass_storage && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9026 + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_serial/transports smd,tty + write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa + write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,serial_smd,rmnet_ipa,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9091 + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_serial/transports smd + write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa + write /sys/class/android_usb/android0/functions diag,serial,rmnet,adb + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,serial_smd,rmnet_ipa && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9092 + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_serial/transports smd + write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa + write /sys/class/android_usb/android0/functions diag,serial,rmnet + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +# Fusion 3 composition +on property:sys.usb.config=diag,serial_hsic,serial_tty,rmnet_hsic,mass_storage,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9025 + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_serial/transports hsic,tty + write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic + write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic + write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic + write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage + write /sys/module/mdm_bridge/parameters/rx_rmnet_buffer_size 16384 + write /sys/module/mdm_bridge/parameters/max_rx_urbs 20 + write /sys/module/g_android/parameters/ghsic_data_rx_req_size 16384 + write /sys/module/g_android/parameters/ghsic_data_rmnet_rx_q_size 20 + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +# Fusion 3 composition with diag_mdm and adb +on property:sys.usb.config=diag,diag_mdm,serial_hsic,serial_tty,rmnet_hsic,mass_storage,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9031 + write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm + write /sys/class/android_usb/android0/f_serial/transports hsic,tty + write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic + write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic + write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic + write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage + write /sys/module/mdm_bridge/parameters/rx_rmnet_buffer_size 16384 + write /sys/module/mdm_bridge/parameters/max_rx_urbs 20 + write /sys/module/g_android/parameters/ghsic_data_rx_req_size 16384 + write /sys/module/g_android/parameters/ghsic_data_rmnet_rx_q_size 20 + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +# Fusion 3 composition with diag_mdm +on property:sys.usb.config=diag,diag_mdm,serial_hsic,serial_tty,rmnet_hsic,mass_storage && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9032 + write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm + write /sys/class/android_usb/android0/f_serial/transports hsic,tty + write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic + write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic + write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic + write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage + write /sys/module/mdm_bridge/parameters/rx_rmnet_buffer_size 16384 + write /sys/module/mdm_bridge/parameters/max_rx_urbs 20 + write /sys/module/g_android/parameters/ghsic_data_rx_req_size 16384 + write /sys/module/g_android/parameters/ghsic_data_rmnet_rx_q_size 20 + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +# Fusion 3 DSDA composition with adb +on property:sys.usb.config=diag,diag_mdm,diag_qsc,serial_hsic,serial_hsuart,rmnet_hsic,rmnet_hsuart,mass_storage,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9065 + write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_qsc + write /sys/class/android_usb/android0/f_serial/transports hsic,hsuart + write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic,serial_hsuart + write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic,hsuart,hsuart + write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic,rmnet_hsuart + write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage + write /sys/module/mdm_bridge/parameters/rx_rmnet_buffer_size 16384 + write /sys/module/mdm_bridge/parameters/max_rx_urbs 20 + write /sys/module/g_android/parameters/ghsic_data_rx_req_size 16384 + write /sys/module/g_android/parameters/ghsic_data_rmnet_rx_q_size 20 + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +# Fusion 3 DSDA composition without adb +on property:sys.usb.config=diag,diag_mdm,diag_qsc,serial_hsic,serial_hsuart,rmnet_hsic,rmnet_hsuart,mass_storage && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9066 + write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_qsc + write /sys/class/android_usb/android0/f_serial/transports hsic,hsuart + write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic,serial_hsuart + write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic,hsuart,hsuart + write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic,rmnet_hsuart + write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage + write /sys/module/mdm_bridge/parameters/rx_rmnet_buffer_size 16384 + write /sys/module/mdm_bridge/parameters/max_rx_urbs 20 + write /sys/module/g_android/parameters/ghsic_data_rx_req_size 16384 + write /sys/module/g_android/parameters/ghsic_data_rmnet_rx_q_size 20 + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +# Fusion 3 DSDA2 composition with adb +on property:sys.usb.config=diag,diag_mdm,diag_mdm2,serial_hsic,serial_hsusb,rmnet_hsic,rmnet_hsusb,mass_storage,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9065 + write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_mdm2 + write /sys/class/android_usb/android0/f_serial/transports hsic,hsic + write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic,serial_hsusb + write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic,hsic,hsic + write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic,rmnet_hsusb + write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage + write /sys/module/mdm_bridge/parameters/rx_rmnet_buffer_size 16384 + write /sys/module/mdm_bridge/parameters/max_rx_urbs 20 + write /sys/module/g_android/parameters/ghsic_data_rx_req_size 16384 + write /sys/module/g_android/parameters/ghsic_data_rmnet_rx_q_size 20 + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +# Fusion 3 DSDA2 composition without adb +on property:sys.usb.config=diag,diag_mdm,diag_mdm2,serial_hsic,serial_hsusb,rmnet_hsic,rmnet_hsusb,mass_storage && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9066 + write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_mdm2 + write /sys/class/android_usb/android0/f_serial/transports hsic,hsic + write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic,serial_hsusb + write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic,hsic,hsic + write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic,rmnet_hsusb + write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage + write /sys/module/mdm_bridge/parameters/rx_rmnet_buffer_size 16384 + write /sys/module/mdm_bridge/parameters/max_rx_urbs 20 + write /sys/module/g_android/parameters/ghsic_data_rx_req_size 16384 + write /sys/module/g_android/parameters/ghsic_data_rmnet_rx_q_size 20 + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +# Fusion PCIe composition with diag_mdm and adb +# Serial & RmNet bridged in userspace with tty and qti/ether +on property:sys.usb.config=diag,diag_mdm,serial_tty,rmnet_qti_ether,mass_storage,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9035 + write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm + write /sys/class/android_usb/android0/f_serial/transports tty + write /sys/class/android_usb/android0/f_rmnet/transports qti,ether + write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +# Fusion PCIe composition with diag_mdm +# Serial & RmNet bridged in userspace with tty and qti/ether +on property:sys.usb.config=diag,diag_mdm,serial_hsic,rmnet_hsic,mass_storage && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9036 + write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm + write /sys/class/android_usb/android0/f_serial/transports tty + write /sys/class/android_usb/android0/f_rmnet/transports qti,ether + write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +# Fusion HSIC/PCIe Hybrid composition with diag_mdm and adb +# RmNet is bridged over PCIe using qti,ether ctrl/data transports +on property:sys.usb.config=diag,diag_mdm,serial_hsic,rmnet_qti_ether,mass_storage,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9035 + write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm + write /sys/class/android_usb/android0/f_serial/transports hsic + write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic + write /sys/class/android_usb/android0/f_rmnet/transports qti,ether + write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +# Fusion HSIC/PCIe Hybrid composition with diag_mdm +# RmNet is bridged over PCIe using qti,ether ctrl/data transports +on property:sys.usb.config=diag,diag_mdm,serial_hsic,rmnet_hsic,mass_storage && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9036 + write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm + write /sys/class/android_usb/android0/f_serial/transports hsic + write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic + write /sys/class/android_usb/android0/f_rmnet/transports qti,ether + write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +# Fusion PCIe composition with diag_mdm +# Serial & RmNet bridged in userspace with port bridge and qti/ether +on property:sys.usb.config=diag,diag_mdm,serial_cdev,rmnet_qti_ether,mass_storage && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9036 + write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm + write /sys/class/android_usb/android0/f_serial/transports char_bridge + write /sys/class/android_usb/android0/f_rmnet/transports qti,ether + write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,diag_mdm,serial_cdev,rmnet_qti_ether,mass_storage,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9035 + write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm + write /sys/class/android_usb/android0/f_serial/transports char_bridge + write /sys/class/android_usb/android0/f_rmnet/transports qti,ether + write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +# Fusion 2.2 composition with diag_qsc and adb +on property:sys.usb.config=diag,diag_qsc,serial_smd,serial_tty,serial_hsuart,rmnet_hsuart,mass_storage,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9053 + write /sys/class/android_usb/android0/f_diag/clients diag,diag_qsc + write /sys/class/android_usb/android0/f_serial/transports smd,tty,hsuart + write /sys/class/android_usb/android0/f_rmnet/transports smd,bam,hsuart,hsuart + write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +# Fusion 2.2 composition with diag_qsc +on property:sys.usb.config=diag,diag_qsc,serial_smd,serial_tty,serial_hsuart,rmnet_hsuart,mass_storage && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9054 + write /sys/class/android_usb/android0/f_diag/clients diag,diag_qsc + write /sys/class/android_usb/android0/f_serial/transports smd,tty,hsuart + write /sys/class/android_usb/android0/f_rmnet/transports smd,bam,hsuart,hsuart + write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:vendor.usb.tethering=true + write /sys/class/net/rndis0/queues/rx-0/rps_cpus ${vendor.usb.rps_mask} + +on property:sys.usb.config=rndis + setprop sys.usb.config rndis,${persist.vendor.usb.config.extra} + +on property:sys.usb.config=rndis,none && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct F00E + write /sys/class/android_usb/android0/f_rndis/wceis 1 + write /sys/class/android_usb/android0/functions rndis + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state rndis + +on property:sys.usb.config=rndis,adb && property:sys.usb.configfs=0 + setprop sys.usb.config rndis,${persist.vendor.usb.config.extra},adb + +on property:sys.usb.config=rndis,none,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9024 + write /sys/class/android_usb/android0/f_rndis/wceis 1 + write /sys/class/android_usb/android0/functions rndis,adb + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state rndis,adb + +on property:sys.usb.config=rndis,diag && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 902C + write /sys/class/android_usb/android0/f_rndis/wceis 1 + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/functions rndis,diag + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state rndis + +on property:sys.usb.config=rndis,diag,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 902D + write /sys/class/android_usb/android0/f_rndis/wceis 1 + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/functions rndis,diag,adb + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state rndis,adb + +# DPL is implemented using QDSS +on property:sys.usb.config=rndis,diag,dpl && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 90BF + write /sys/class/android_usb/android0/f_rndis/wceis 1 + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_qdss/debug_intf 0 + write /sys/class/android_usb/android0/f_qdss/transports qti,bam2bam_ipa + write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam + write /sys/class/android_usb/android0/functions rndis,diag,qdss + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state rndis + +# DPL is implemented using QDSS +on property:sys.usb.config=rndis,diag,dpl,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 90C0 + write /sys/class/android_usb/android0/f_rndis/wceis 1 + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_qdss/debug_intf 0 + write /sys/class/android_usb/android0/f_qdss/transports qti,bam2bam_ipa + write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam + write /sys/class/android_usb/android0/functions rndis,diag,qdss,adb + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state rndis,adb + +on property:sys.usb.config=rndis,serial_smd && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 90B3 + write /sys/class/android_usb/android0/f_rndis/wceis 1 + write /sys/class/android_usb/android0/f_serial/transports smd + write /sys/class/android_usb/android0/functions rndis,serial + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state rndis + +on property:sys.usb.config=rndis,serial_smd,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 90B4 + write /sys/class/android_usb/android0/f_rndis/wceis 1 + write /sys/class/android_usb/android0/f_serial/transports smd + write /sys/class/android_usb/android0/functions rndis,serial,adb + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state rndis,adb + +on property:sys.usb.config=rndis,serial_smd,diag && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 90B5 + write /sys/class/android_usb/android0/f_rndis/wceis 1 + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_serial/transports smd + write /sys/class/android_usb/android0/functions rndis,serial,diag + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state rndis + +on property:sys.usb.config=rndis,serial_smd,diag,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 90B6 + write /sys/class/android_usb/android0/f_rndis/wceis 1 + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_serial/transports smd + write /sys/class/android_usb/android0/functions rndis,serial,diag,adb + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state rndis,adb + +on property:sys.usb.config=rndis,serial_cdev,diag && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 90B5 + write /sys/class/android_usb/android0/f_rndis/wceis 1 + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_serial/transports char_bridge + write /sys/class/android_usb/android0/functions rndis,serial,diag + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state rndis + +on property:sys.usb.config=rndis,serial_cdev,diag,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 90B6 + write /sys/class/android_usb/android0/f_rndis/wceis 1 + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_serial/transports char_bridge + write /sys/class/android_usb/android0/functions rndis,serial,diag,adb + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state rndis,adb + +on property:sys.usb.config=rndis,diag,diag_mdm && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9041 + write /sys/class/android_usb/android0/f_rndis/wceis 1 + write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm + write /sys/class/android_usb/android0/functions rndis,diag + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state rndis + +on property:sys.usb.config=rndis,diag,diag_mdm,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9042 + write /sys/class/android_usb/android0/f_rndis/wceis 1 + write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm + write /sys/class/android_usb/android0/functions rndis,diag,adb + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state rndis,adb + +on property:sys.usb.config=rndis,diag,diag_mdm,diag_qsc && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9086 + write /sys/class/android_usb/android0/f_rndis/wceis 1 + write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_qsc + write /sys/class/android_usb/android0/functions rndis,diag + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state rndis + +on property:sys.usb.config=rndis,diag,diag_mdm,diag_qsc,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9087 + write /sys/class/android_usb/android0/f_rndis/wceis 1 + write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_qsc + write /sys/class/android_usb/android0/functions rndis,diag,adb + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state rndis,adb + +on property:sys.usb.config=ptp && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 904D + write /sys/class/android_usb/android0/functions ptp + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=ptp,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 904E + write /sys/class/android_usb/android0/functions ptp,adb + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=mtp && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct F003 + write /sys/class/android_usb/android0/functions mtp + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=mtp,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9039 + write /sys/class/android_usb/android0/functions mtp,adb + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=mtp,diag && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 901B + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/functions mtp,diag + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=mtp,diag,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 903A + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/functions mtp,diag,adb + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=mtp,diag,diag_mdm && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9040 + write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm + write /sys/class/android_usb/android0/functions mtp,diag + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=mtp,diag,diag_mdm,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 903F + write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm + write /sys/class/android_usb/android0/functions mtp,diag,adb + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=mtp,diag,diag_mdm,diag_qsc && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9088 + write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_qsc + write /sys/class/android_usb/android0/functions mtp,diag + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=mtp,diag,diag_mdm,diag_qsc,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9089 + write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_qsc + write /sys/class/android_usb/android0/functions mtp,diag,adb + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,diag_mdm,ccid && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9045 + write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm + write /sys/class/android_usb/android0/functions diag,ccid + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,diag_mdm,ccid,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9044 + write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm + write /sys/class/android_usb/android0/functions diag,adb,ccid + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=mass_storage,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9015 + write /sys/class/android_usb/android0/functions adb,mass_storage + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +#Mass-storage only composition +on property:sys.usb.config=mass_storage && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct F000 + write /sys/class/android_usb/android0/functions mass_storage + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,qdss && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 904A + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_qdss/debug_intf 1 + write /sys/class/android_usb/android0/f_qdss/transports bam + write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam + write /sys/class/android_usb/android0/functions diag,qdss + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,qdss,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9060 + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_qdss/debug_intf 1 + write /sys/class/android_usb/android0/f_qdss/transports bam + write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam + write /sys/class/android_usb/android0/functions diag,qdss,adb + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,diag_mdm,qdss && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9099 + write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm + write /sys/class/android_usb/android0/f_qdss/debug_intf 1 + write /sys/class/android_usb/android0/f_qdss/transports bam + write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam + write /sys/class/android_usb/android0/functions diag,qdss + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,diag_mdm,qdss,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9098 + write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm + write /sys/class/android_usb/android0/f_qdss/debug_intf 1 + write /sys/class/android_usb/android0/f_qdss/transports bam + write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam + write /sys/class/android_usb/android0/functions diag,qdss,adb + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,qdss,rmnet_bam && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9083 + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_rmnet/transports smd,bam + write /sys/class/android_usb/android0/f_qdss/debug_intf 1 + write /sys/class/android_usb/android0/f_qdss/transports bam + write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam + write /sys/class/android_usb/android0/functions diag,qdss,rmnet + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,qdss,rmnet_qti_bam && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9083 + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_rmnet/transports qti,bam + write /sys/class/android_usb/android0/f_qdss/debug_intf 1 + write /sys/class/android_usb/android0/f_qdss/transports bam + write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam + write /sys/class/android_usb/android0/functions diag,qdss,rmnet + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,qdss,rmnet_bam,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9084 + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_rmnet/transports smd,bam + write /sys/class/android_usb/android0/f_qdss/debug_intf 1 + write /sys/class/android_usb/android0/f_qdss/transports bam + write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam + write /sys/class/android_usb/android0/functions diag,qdss,adb,rmnet + write /sys/module/dwc3/parameters/tx_fifo_resize_enable 1 + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,qdss,rmnet_qti_bam,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9084 + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_rmnet/transports qti,bam + write /sys/class/android_usb/android0/f_qdss/debug_intf 1 + write /sys/class/android_usb/android0/f_qdss/transports bam + write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam + write /sys/class/android_usb/android0/functions diag,qdss,adb,rmnet + write /sys/module/dwc3/parameters/tx_fifo_resize_enable 1 + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,qdss,rmnet_ipa && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9083 + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa + write /sys/class/android_usb/android0/f_qdss/debug_intf 1 + write /sys/class/android_usb/android0/f_qdss/transports bam + write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam + write /sys/class/android_usb/android0/functions diag,qdss,rmnet + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,qdss,rmnet_ipa,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9084 + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa + write /sys/class/android_usb/android0/f_qdss/debug_intf 1 + write /sys/class/android_usb/android0/f_qdss/transports bam + write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam + write /sys/class/android_usb/android0/functions diag,qdss,adb,rmnet + write /sys/module/dwc3/parameters/tx_fifo_resize_enable 1 + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,diag_mdm,qdss,rmnet_hsic && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 909B + write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm + write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic + write /sys/class/android_usb/android0/f_qdss/debug_intf 1 + write /sys/class/android_usb/android0/f_qdss/transports bam + write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam + write /sys/class/android_usb/android0/functions diag,qdss,rmnet + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,diag_mdm,qdss,rmnet_hsic,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 909A + write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm + write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic + write /sys/class/android_usb/android0/f_qdss/debug_intf 1 + write /sys/class/android_usb/android0/f_qdss/transports bam + write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam + write /sys/class/android_usb/android0/functions diag,qdss,adb,rmnet + write /sys/module/dwc3/parameters/tx_fifo_resize_enable 1 + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,diag_mdm,qdss_apq,qdss_mdm,rmnet_hsic && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 90A3 + write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm + write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic + write /sys/class/android_usb/android0/f_qdss/debug_intf 0 + write /sys/class/android_usb/android0/f_qdss/transports bam,hsic + write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam,qdss_hsic + write /sys/class/android_usb/android0/functions diag,qdss,rmnet + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,diag_mdm,qdss_apq,qdss_mdm,rmnet_hsic,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 90A2 + write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm + write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic + write /sys/class/android_usb/android0/f_qdss/debug_intf 0 + write /sys/class/android_usb/android0/f_qdss/transports bam,hsic + write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam,qdss_hsic + write /sys/class/android_usb/android0/functions diag,qdss,adb,rmnet + write /sys/module/dwc3/parameters/tx_fifo_resize_enable 1 + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=rndis,diag,qdss && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9081 + write /sys/class/android_usb/android0/f_rndis/wceis 1 + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_qdss/debug_intf 1 + write /sys/class/android_usb/android0/f_qdss/transports bam + write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam + write /sys/class/android_usb/android0/functions rndis,diag,qdss + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=rndis,diag,qdss,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 9082 + write /sys/class/android_usb/android0/f_rndis/wceis 1 + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_qdss/debug_intf 1 + write /sys/class/android_usb/android0/f_qdss/transports bam + write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam + write /sys/class/android_usb/android0/functions rndis,diag,qdss,adb + write /sys/module/dwc3/parameters/tx_fifo_resize_enable 1 + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +# same as 9025, plus data packet logging (DPL) using QDSS +on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_ipa,mass_storage,dpl,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 90AD + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_serial/transports smd,tty +# DPL is implemented using QDSS + write /sys/class/android_usb/android0/f_qdss/debug_intf 0 + write /sys/class/android_usb/android0/f_qdss/transports qti,bam2bam_ipa + write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam + write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa + write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage,qdss + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +# same as 9026, plus data packet logging (DPL) +on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_ipa,mass_storage,dpl && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 90B0 + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_serial/transports smd,tty +# DPL is implemented using QDSS + write /sys/class/android_usb/android0/f_qdss/debug_intf 0 + write /sys/class/android_usb/android0/f_qdss/transports qti,bam2bam_ipa + write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam + write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa + write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage,qdss + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,serial_cdev,serial_tty,rmnet_ipa,mass_storage,dpl,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 90AD + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_serial/transports char_bridge,tty +# DPL is implemented using QDSS + write /sys/class/android_usb/android0/f_qdss/debug_intf 0 + write /sys/class/android_usb/android0/f_qdss/transports qti,bam2bam_ipa + write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam + write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa + write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage,qdss + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,serial_cdev,serial_tty,rmnet_ipa,mass_storage,dpl && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 90B0 + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_serial/transports char_bridge,tty +# DPL is implemented using QDSS + write /sys/class/android_usb/android0/f_qdss/debug_intf 0 + write /sys/class/android_usb/android0/f_qdss/transports qti,bam2bam_ipa + write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam + write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa + write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage,qdss + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=ncm && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 0525 + write /sys/class/android_usb/android0/idProduct A4A1 + write /sys/class/android_usb/android0/functions ncm + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=ncm,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 908C + write /sys/class/android_usb/android0/functions ncm,adb + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=charging && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct F006 + write /sys/class/android_usb/android0/functions charging + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,serial_smd,rmnet_qti_bam,dpl_qti_bam_dmux && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 90B7 + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_serial/transports smd + write /sys/class/android_usb/android0/f_rmnet/transports qti,bam + write /sys/class/android_usb/android0/f_qdss/transports qti,bam_dmux + write /sys/class/android_usb/android0/functions diag,serial,rmnet,qdss + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,serial_smd,rmnet_qti_bam,dpl_qti_bam_dmux,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 90B8 + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_serial/transports smd + write /sys/class/android_usb/android0/f_rmnet/transports qti,bam + write /sys/class/android_usb/android0/f_qdss/transports qti,bam_dmux + write /sys/class/android_usb/android0/functions diag,serial,rmnet,qdss,adb + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,diag_cnss,serial_smd,serial_tty,rmnet_bam,mass_storage,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 90B2 + write /sys/class/android_usb/android0/f_diag/clients diag,diag_cnss + write /sys/class/android_usb/android0/f_serial/transports smd,tty + write /sys/class/android_usb/android0/f_rmnet/transports smd,bam + write /sys/class/android_usb/android0/functions diag,diag_cnss,adb,serial,rmnet,mass_storage + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,diag_cnss,serial_smd,serial_tty,rmnet_bam,mass_storage && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 90B3 + write /sys/class/android_usb/android0/f_diag/clients diag,diag_cnss + write /sys/class/android_usb/android0/f_serial/transports smd,tty + write /sys/class/android_usb/android0/f_rmnet/transports smd,bam + write /sys/class/android_usb/android0/functions diag,diag_cnss,serial,rmnet,mass_storage + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=midi && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 90BA + write /sys/class/android_usb/android0/functions midi + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=midi,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 90BB + write /sys/class/android_usb/android0/functions midi,adb + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,serial_smd,rmnet_ipa,dpl && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 90B7 + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_serial/transports smd +# DPL is implemented using QDSS + write /sys/class/android_usb/android0/f_qdss/debug_intf 0 + write /sys/class/android_usb/android0/f_qdss/transports qti,bam2bam_ipa + write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam + write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa + write /sys/class/android_usb/android0/functions diag,serial,rmnet,qdss + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,serial_smd,rmnet_ipa,dpl,adb && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 90B8 + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/f_serial/transports smd +# DPL is implemented using QDSS + write /sys/class/android_usb/android0/f_qdss/debug_intf 0 + write /sys/class/android_usb/android0/f_qdss/transports qti,bam2bam_ipa + write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam + write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa + write /sys/class/android_usb/android0/functions diag,serial,rmnet,qdss,adb + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,diag_mdm,serial_tty,rmnet_qti_ether,dpl_ether,mass_storage,adb + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 90AE + write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm + write /sys/class/android_usb/android0/f_serial/transports tty + write /sys/class/android_usb/android0/f_rmnet/transports qti,ether + write /sys/class/android_usb/android0/f_qdss/debug_intf 0 + write /sys/class/android_usb/android0/f_qdss/transports qti,ether + write /sys/class/android_usb/android0/f_qdss/transport_names qdss_dpl + write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,qdss,mass_storage + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,diag_mdm,serial_tty,rmnet_qti_ether,dpl_ether,mass_storage + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 90AF + write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm + write /sys/class/android_usb/android0/f_serial/transports tty + write /sys/class/android_usb/android0/f_rmnet/transports qti,ether + write /sys/class/android_usb/android0/f_qdss/debug_intf 0 + write /sys/class/android_usb/android0/f_qdss/transports qti,ether + write /sys/class/android_usb/android0/f_qdss/transport_names qdss_dpl + write /sys/class/android_usb/android0/functions diag,serial,rmnet,qdss,mass_storage + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,adb,uac2 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 90CA + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/functions diag,adb,uac2_func + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,adb,video && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 90CB + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/functions diag,adb,video + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=diag,adb,uac2,video && property:sys.usb.configfs=0 + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 05C6 + write /sys/class/android_usb/android0/idProduct 90CC + write /sys/class/android_usb/android0/f_diag/clients diag + write /sys/class/android_usb/android0/functions diag,adb,uac2_func,video + write /sys/class/android_usb/android0/enable 1 + start adbd + setprop sys.usb.state ${sys.usb.config} + diff --git a/init.qcom.usb.sh b/init.qcom.usb.sh new file mode 100644 index 00000000..b74e9db0 --- /dev/null +++ b/init.qcom.usb.sh @@ -0,0 +1,238 @@ +#!/vendor/bin/sh +# Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following +# disclaimer in the documentation and/or other materials provided +# with the distribution. +# * Neither the name of The Linux Foundation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# + +# Set platform variables +if [ -f /sys/devices/soc0/hw_platform ]; then + soc_hwplatform=`cat /sys/devices/soc0/hw_platform` 2> /dev/null +else + soc_hwplatform=`cat /sys/devices/system/soc/soc0/hw_platform` 2> /dev/null +fi + +if [ -f /sys/devices/soc0/machine ]; then + soc_machine=`cat /sys/devices/soc0/machine` 2> /dev/null +else + soc_machine=`cat /sys/devices/system/soc/soc0/machine` 2> /dev/null +fi + +# +# Check ESOC for external MDM +# +# Note: currently only a single MDM is supported +# +if [ -d /sys/bus/esoc/devices ]; then +for f in /sys/bus/esoc/devices/*; do + if [ -d $f ]; then + if [ `grep -e "^MDM" -e "^SDX" $f/esoc_name` ]; then + esoc_link=`cat $f/esoc_link` + break + fi + fi +done +fi + +target=`getprop ro.board.platform` + +# soc_ids for 8937 +if [ -f /sys/devices/soc0/soc_id ]; then + soc_id=`cat /sys/devices/soc0/soc_id` +else + soc_id=`cat /sys/devices/system/soc/soc0/id` +fi + +# +# Allow USB enumeration with default PID/VID +# +baseband=`getprop ro.baseband` + +echo 1 > /sys/class/android_usb/f_mass_storage/lun/nofua +usb_config=`getprop persist.vendor.usb.config` +if [ "$usb_config" == "" ]; then #USB persist config not set, select default configuration + if [ "$esoc_link" != "" ]; then + setprop persist.vendor.usb.config diag,diag_mdm,qdss,qdss_mdm,serial_cdev,dpl,rmnet,adb + else + case "$baseband" in + "apq") + setprop persist.vendor.usb.config diag,adb + ;; + *) + case "$soc_hwplatform" in + "Dragon" | "SBC") + setprop persist.vendor.usb.config diag,adb + ;; + *) + soc_machine=${soc_machine:0:3} + case "$soc_machine" in + "SDA") + setprop persist.vendor.usb.config diag,adb + ;; + *) + case "$target" in + "msm8996") + setprop persist.vendor.usb.config diag,serial_cdev,serial_tty,rmnet_ipa,mass_storage,adb + ;; + "msm8909") + setprop persist.vendor.usb.config diag,serial_smd,rmnet_qti_bam,adb + ;; + "msm8937") + if [ -d /config/usb_gadget ]; then + setprop persist.vendor.usb.config diag,serial_cdev,rmnet,dpl,adb + else + case "$soc_id" in + "313" | "320") + echo BAM2BAM_IPA > /sys/class/android_usb/android0/f_rndis_qc/rndis_transports + setprop persist.vendor.usb.config diag,serial_smd,rmnet_ipa,adb + ;; + *) + setprop persist.vendor.usb.config diag,serial_smd,rmnet_qti_bam,adb + ;; + esac + fi + ;; + "msm8953") + if [ -d /config/usb_gadget ]; then + setprop persist.vendor.usb.config diag,serial_cdev,rmnet,dpl,adb + else + setprop persist.vendor.usb.config diag,serial_smd,rmnet_ipa,adb + fi + ;; + "msm8998" | "sdm660" | "apq8098_latv") + setprop persist.vendor.usb.config diag,serial_cdev,rmnet,adb + ;; + "sdm845" | "sdm710") + setprop persist.vendor.usb.config diag,serial_cdev,rmnet,dpl,adb + ;; + #"lito") + # setprop persist.vendor.usb.config diag,serial_cdev,rmnet,dpl,qdss,adb + #;; + *) + setprop persist.vendor.usb.config diag,adb + ;; + esac + ;; + esac + ;; + esac + ;; + esac + fi +fi + +# set device mode notification to USB driver for SA8150 Auto ADP +product=`getprop ro.build.product` + +case "$product" in + "lito_au") + echo peripheral > /sys/bus/platform/devices/a600000.ssusb/mode + ;; + *) + ;; +esac + +# check configfs is mounted or not +if [ -d /config/usb_gadget ]; then + # ADB requires valid iSerialNumber; if ro.serialno is missing, use dummy + serialnumber=`cat /config/usb_gadget/g1/strings/0x409/serialnumber` 2> /dev/null + if [ "$serialnumber" == "" ]; then + serialno=1234567 + echo $serialno > /config/usb_gadget/g1/strings/0x409/serialnumber + fi +fi + +# +# Initialize RNDIS Diag option. If unset, set it to 'none'. +# +diag_extra=`getprop persist.vendor.usb.config.extra` +if [ "$diag_extra" == "" ]; then + setprop persist.vendor.usb.config.extra none +fi + +# enable rps cpus on msm8937 target +setprop vendor.usb.rps_mask 0 +case "$soc_id" in + "294" | "295" | "353" | "354") + setprop vendor.usb.rps_mask 40 + ;; +esac + +# +# Initialize UVC conifguration. +# +if [ -d /config/usb_gadget/g1/functions/uvc.0 ]; then + cd /config/usb_gadget/g1/functions/uvc.0 + + echo 3072 > streaming_maxpacket + echo 1 > streaming_maxburst + mkdir control/header/h + ln -s control/header/h control/class/fs/ + ln -s control/header/h control/class/ss + + mkdir -p streaming/uncompressed/u/360p + echo "666666\n1000000\n5000000\n" > streaming/uncompressed/u/360p/dwFrameInterval + + mkdir -p streaming/uncompressed/u/720p + echo 1280 > streaming/uncompressed/u/720p/wWidth + echo 720 > streaming/uncompressed/u/720p/wWidth + echo 29491200 > streaming/uncompressed/u/720p/dwMinBitRate + echo 29491200 > streaming/uncompressed/u/720p/dwMaxBitRate + echo 1843200 > streaming/uncompressed/u/720p/dwMaxVideoFrameBufferSize + echo 5000000 > streaming/uncompressed/u/720p/dwDefaultFrameInterval + echo "5000000\n" > streaming/uncompressed/u/720p/dwFrameInterval + + mkdir -p streaming/mjpeg/m/360p + echo "666666\n1000000\n5000000\n" > streaming/mjpeg/m/360p/dwFrameInterval + + mkdir -p streaming/mjpeg/m/720p + echo 1280 > streaming/mjpeg/m/720p/wWidth + echo 720 > streaming/mjpeg/m/720p/wWidth + echo 29491200 > streaming/mjpeg/m/720p/dwMinBitRate + echo 29491200 > streaming/mjpeg/m/720p/dwMaxBitRate + echo 1843200 > streaming/mjpeg/m/720p/dwMaxVideoFrameBufferSize + echo 5000000 > streaming/mjpeg/m/720p/dwDefaultFrameInterval + echo "5000000\n" > streaming/mjpeg/m/720p/dwFrameInterval + + echo 0x04 > /config/usb_gadget/g1/functions/uvc.0/streaming/mjpeg/m/bmaControls + + mkdir -p streaming/h264/h/960p + echo 1920 > streaming/h264/h/960p/wWidth + echo 960 > streaming/h264/h/960p/wWidth + echo 40 > streaming/h264/h/960p/bLevelIDC + echo "333667\n" > streaming/h264/h/960p/dwFrameInterval + + mkdir -p streaming/h264/h/1920p + echo "333667\n" > streaming/h264/h/1920p/dwFrameInterval + + mkdir streaming/header/h + ln -s streaming/uncompressed/u streaming/header/h + ln -s streaming/mjpeg/m streaming/header/h + ln -s streaming/h264/h streaming/header/h + ln -s streaming/header/h streaming/class/fs/ + ln -s streaming/header/h streaming/class/hs/ + ln -s streaming/header/h streaming/class/ss/ +fi diff --git a/init.qti.getbootdevice.sh b/init.qti.getbootdevice.sh new file mode 100644 index 00000000..fa6f7402 --- /dev/null +++ b/init.qti.getbootdevice.sh @@ -0,0 +1,55 @@ +#!/vendor/bin/sh +# Copyright (c) 2018, The Linux Foundation. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following +# disclaimer in the documentation and/or other materials provided +# with the distribution. +# * Neither the name of The Linux Foundation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# +#Script to find if the boot device is SD card or UFS + + +echo "Bootdevice setup: Starting..." > /dev/kmsg + +bootdevice=`getprop ro.boot.bootdevice` + +if [ "$bootdevice" = "8804000.sdhci" ]; then + ln -s /dev/block/platform/soc/8804000.sdhci /dev/block/bootdevice + echo "Waiting for SDHCI device to show up..." > /dev/kmsg + while [ ! -e "/dev/block/platform/soc/8804000.sdhci" ]; do + sleep 1 + done +elif [ "$bootdevice" = "1d84000.ufshc" ]; then + ln -s /dev/block/platform/soc/1d84000.ufshc /dev/block/bootdevice + echo "Waiting for UFS device to show up..." > /dev/kmsg + while [ ! -e "/dev/block/platform/soc/1d84000.ufshc" ]; do + sleep 1; + done +else + while true; do + echo "Boot failure - invalid bootdevice ($bootdevice)" > /dev/kmsg + sleep 30; + done +fi +echo "Bootdevice setup: Completed ($bootdevice)" > /dev/kmsg diff --git a/init.qti.qseecomd.sh b/init.qti.qseecomd.sh new file mode 100644 index 00000000..eb2eec90 --- /dev/null +++ b/init.qti.qseecomd.sh @@ -0,0 +1,35 @@ +#!/vendor/bin/sh +# Copyright (c) 2017, The Linux Foundation. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following +# disclaimer in the documentation and/or other materials provided +# with the distribution. +# * Neither the name of The Linux Foundation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# + +while [ "$registered" != "true" ] +do + sleep 0.1 + registered="`getprop vendor.sys.listeners.registered`" +done diff --git a/init.radio.sh b/init.radio.sh new file mode 100644 index 00000000..df54a664 --- /dev/null +++ b/init.radio.sh @@ -0,0 +1,38 @@ +#! /vendor/bin/sh + +# +# Copy qcril.db if needed for RIL +# +if [ -f /vendor/radio/qcril_database/qcril.db -a ! -f /data/vendor/radio/qcril.db ]; then + cp /vendor/radio/qcril_database/qcril.db /data/vendor/radio/qcril.db + chown -h radio.radio /data/vendor/radio/qcril.db +fi +echo 1 > /data/vendor/radio/db_check_done + +cp /vendor/radio/qcril_database/qcril.db /data/vendor/radio/qcril_prebuilt.db +chown radio.radio /data/vendor/radio/qcril_prebuilt.db +chmod 0660 /data/vendor/radio/qcril_prebuilt.db + +# +# Make modem config folder and copy firmware config to that folder for RIL +# +if [ -f /data/vendor/radio/ver_info.txt ]; then + prev_version_info=`cat /data/vendor/radio/ver_info.txt` +else + prev_version_info="" +fi + +cur_version_info=`cat /vendor/firmware_mnt/verinfo/ver_info.txt` +if [ ! -f /vendor/firmware_mnt/verinfo/ver_info.txt -o "$prev_version_info" != "$cur_version_info" ]; then + rm -rf /data/vendor/radio/modem_config + mkdir /data/vendor/radio/modem_config + chmod 770 /data/vendor/radio/modem_config + cp -r /vendor/firmware_mnt/image/modem_pr/mcfg/configs/* /data/vendor/radio/modem_config + chown -hR radio.radio /data/vendor/radio/modem_config + cp /vendor/firmware_mnt/verinfo/ver_info.txt /data/vendor/radio/ver_info.txt + chown radio.radio /data/vendor/radio/ver_info.txt +fi +cp /vendor/firmware_mnt/image/modem_pr/mbn_ota.txt /data/vendor/radio/modem_config +chown radio.radio /data/vendor/radio/modem_config/mbn_ota.txt +echo 1 > /data/vendor/radio/copy_complete + diff --git a/init.ramoops.sh b/init.ramoops.sh new file mode 100644 index 00000000..22146da1 --- /dev/null +++ b/init.ramoops.sh @@ -0,0 +1,17 @@ +#!/vendor/bin/sh + +# Decrypt the keys and write them to the kernel +ramoops -D + +if [ $? -eq 0 ]; then + # Pivot (and decrypt) + echo 1 > /sys/devices/virtual/ramoops/pstore/use_alt +else + setprop vendor.ramoops.decryption.error $? +fi + +# Trigger remount of pstore regardless of decryption state +setprop vendor.ramoops.decrypted true + +# Generate keys (if none exist), and load the keys to carveout +ramoops -g -l -c diff --git a/init.sensors.sh b/init.sensors.sh new file mode 100644 index 00000000..34917a24 --- /dev/null +++ b/init.sensors.sh @@ -0,0 +1,17 @@ +#! /vendor/bin/sh + +version=`grep -ao "OEM_IMAGE_VERSION_STRING[ -~]*" \ + /vendor/firmware/adsp.b04 | \ + sed -e s/OEM_IMAGE_VERSION_STRING=ADSP.version.// -e s/\(.*\).//` +setprop vendor.sys.adsp.firmware.version "$version" + +if [ -f /sys/devices/soc0/g_platform_version ]; then + B5_LUNCHBOX_PLATFORM_VERSION="655360" + B5_PVT_PLATFORM_VERSION="655390" + platform_version=`cat /sys/devices/soc0/g_platform_version` + if [ $platform_version -gt $B5_LUNCHBOX_PLATFORM_VERSION ]; then + if [ $platform_version -lt $B5_PVT_PLATFORM_VERSION ]; then + setprop vendor.sensor.proximity_fusion.enabled true + fi + fi +fi diff --git a/keymaster/Android.bp b/keymaster/Android.bp new file mode 100644 index 00000000..87f73988 --- /dev/null +++ b/keymaster/Android.bp @@ -0,0 +1,32 @@ +// +// 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 { + default_applicable_licenses: ["Android-Apache-2.0"], +} + +cc_binary { + name: "wait_for_strongbox", + 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, +} diff --git a/keymaster/wait_for_strongbox.cpp b/keymaster/wait_for_strongbox.cpp new file mode 100644 index 00000000..c0f4094b --- /dev/null +++ b/keymaster/wait_for_strongbox.cpp @@ -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); + } +} diff --git a/lineage.dependencies b/lineage.dependencies new file mode 100644 index 00000000..09f52fdf --- /dev/null +++ b/lineage.dependencies @@ -0,0 +1,10 @@ +[ + { + "repository": "android_device_google_gs-common", + "target_path": "device/google/gs-common" + }, + { + "repository": "android_kernel_google_redbull", + "target_path": "kernel/google/redbull" + } +] diff --git a/lineage_common.mk b/lineage_common.mk new file mode 100644 index 00000000..337fc02e --- /dev/null +++ b/lineage_common.mk @@ -0,0 +1,8 @@ +# +# Copyright (C) 2023 The LineageOS Project +# +# SPDX-License-Identifier: Apache-2.0 +# + +# Lineage Health +include hardware/google/pixel/lineage_health/device.mk diff --git a/lineage_manifest.xml b/lineage_manifest.xml new file mode 100644 index 00000000..35410f38 --- /dev/null +++ b/lineage_manifest.xml @@ -0,0 +1,11 @@ +<manifest version="1.0" type="device" target-level="5"> + <hal format="hidl"> + <name>vendor.lineage.livedisplay</name> + <transport>hwbinder</transport> + <version>2.0</version> + <interface> + <name>IPictureAdjustment</name> + <instance>default</instance> + </interface> + </hal> +</manifest> diff --git a/manifest.xml b/manifest.xml new file mode 100644 index 00000000..a54d6161 --- /dev/null +++ b/manifest.xml @@ -0,0 +1,453 @@ +<!-- Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> +<manifest version="1.0" type="device" target-level="5"> + <kernel target-level="5"/> + <hal format="hidl"> + <name>android.hardware.audio</name> + <transport>hwbinder</transport> + <version>7.0</version> + <interface> + <name>IDevicesFactory</name> + <instance>default</instance> + </interface> + </hal> + <hal format="hidl"> + <name>android.hardware.audio.effect</name> + <transport>hwbinder</transport> + <version>7.0</version> + <interface> + <name>IEffectsFactory</name> + <instance>default</instance> + </interface> + </hal> + <hal format="hidl"> + <name>vendor.qti.hardware.cacert</name> + <transport>hwbinder</transport> + <version>1.0</version> + <interface> + <name>IService</name> + <instance>default</instance> + </interface> + </hal> + <hal format="hidl"> + <name>vendor.qti.hardware.data.connection</name> + <transport>hwbinder</transport> + <version>1.1</version> + <interface> + <name>IDataConnection</name> + <instance>slot1</instance> + <instance>slot2</instance> + </interface> + </hal> + <hal format="hidl"> + <name>android.hardware.soundtrigger</name> + <transport>hwbinder</transport> + <version>2.3</version> + <interface> + <name>ISoundTriggerHw</name> + <instance>default</instance> + </interface> + </hal> + <!-- display --> + <hal format="hidl"> + <name>android.hardware.renderscript</name> + <transport arch="32+64">passthrough</transport> + <version>1.0</version> + <interface> + <name>IDevice</name> + <instance>default</instance> + </interface> + </hal> + <hal format="hidl"> + <name>vendor.google.radioext</name> + <transport>hwbinder</transport> + <version>1.3</version> + <interface> + <name>IRadioExt</name> + <instance>default</instance> + </interface> + </hal> + <hal format="hidl"> + <name>android.hardware.memtrack</name> + <transport>hwbinder</transport> + <impl level="generic"></impl> + <version>1.0</version> + <interface> + <name>IMemtrack</name> + <instance>default</instance> + </interface> + </hal> + <hal format="hidl"> + <name>android.hardware.secure_element</name> + <transport>hwbinder</transport> + <fqname>@1.2::ISecureElement/SIM1</fqname> + <fqname>@1.2::ISecureElement/SIM2</fqname> + <fqname>@1.2::ISecureElement/eSE1</fqname> + </hal> + <!-- gatekeeper --> + <hal format="hidl"> + <name>android.hardware.gatekeeper</name> + <transport>hwbinder</transport> + <version>1.0</version> + <interface> + <name>IGatekeeper</name> + <instance>default</instance> + </interface> + </hal> + <!-- iwlan --> + <hal format="hidl"> + <name>vendor.qti.hardware.data.iwlan</name> + <transport>hwbinder</transport> + <version>1.0</version> + <interface> + <name>IIWlan</name> + <instance>slot1</instance> + <instance>slot2</instance> + </interface> + </hal> + <!-- qcrilhook --> + <hal format="hidl"> + <name>vendor.qti.hardware.radio.qcrilhook</name> + <transport>hwbinder</transport> + <version>1.0</version> + <interface> + <name>IQtiOemHook</name> + <instance>oemhook0</instance> + <instance>oemhook1</instance> + </interface> + </hal> + <hal format="hidl"> + <name>vendor.qti.hardware.radio.ims</name> + <transport>hwbinder</transport> + <version>1.6</version> + <interface> + <name>IImsRadio</name> + <instance>imsradio0</instance> + <instance>imsradio1</instance> + </interface> + </hal> + <hal format="hidl"> + <name>vendor.qti.hardware.radio.lpa</name> + <transport>hwbinder</transport> + <version>1.0</version> + <interface> + <name>IUimLpa</name> + <instance>UimLpa0</instance> + <instance>UimLpa1</instance> + </interface> + </hal> + <hal format="hidl"> + <name>vendor.qti.hardware.radio.uim</name> + <transport>hwbinder</transport> + <version>1.2</version> + <interface> + <name>IUim</name> + <instance>Uim0</instance> + <instance>Uim1</instance> + </interface> + </hal> + <!-- RIL UIM REMOTE CLIENT --> + <hal format="hidl"> + <name>vendor.qti.hardware.radio.uim_remote_client</name> + <transport>hwbinder</transport> + <version>1.0</version> + <interface> + <name>IUimRemoteServiceClient</name> + <instance>uimRemoteClient0</instance> + <instance>uimRemoteClient1</instance> + </interface> + </hal> + <!-- RIL UIM REMOTE SERVER --> + <hal format="hidl"> + <name>vendor.qti.hardware.radio.uim_remote_server</name> + <transport>hwbinder</transport> + <version>1.0</version> + <interface> + <name>IUimRemoteServiceServer</name> + <instance>uimRemoteServer0</instance> + <instance>uimRemoteServer1</instance> + </interface> + </hal> + <!-- deviceInfo HAL --> + <hal format="hidl"> + <name>vendor.qti.hardware.radio.internal.deviceinfo</name> + <transport>hwbinder</transport> + <version>1.0</version> + <interface> + <name>IDeviceInfo</name> + <instance>deviceinfo</instance> + </interface> + </hal> + <!-- IMS RTP Service --> + <hal format="hidl"> + <name>vendor.qti.imsrtpservice</name> + <transport>hwbinder</transport> + <impl level="generic"></impl> + <version>3.0</version> + <interface> + <name>IRTPService</name> + <instance>imsrtpservice</instance> + </interface> + </hal> + <!-- fingerprint --> + <hal format="hidl"> + <name>android.hardware.biometrics.fingerprint</name> + <transport>hwbinder</transport> + <version>2.2</version> + <interface> + <name>IBiometricsFingerprint</name> + <instance>default</instance> + </interface> + </hal> + <!-- bluetooth --> + <hal format="hidl"> + <name>android.hardware.bluetooth</name> + <transport>hwbinder</transport> + <impl level="generic"></impl> + <version>1.0</version> + <interface> + <name>IBluetoothHci</name> + <instance>default</instance> + </interface> + </hal> + <hal format="hidl"> + <name>android.hardware.bluetooth.audio</name> + <transport>hwbinder</transport> + <version>2.0</version> + <interface> + <name>IBluetoothAudioProvidersFactory</name> + <instance>default</instance> + </interface> + </hal> + <!-- IMS UCE Service --> + <hal format="hidl"> + <name>com.qualcomm.qti.uceservice</name> + <transport>hwbinder</transport> + <version>2.3</version> + <interface> + <name>IUceService</name> + <instance>com.qualcomm.qti.uceservice</instance> + </interface> + </hal> + <!-- IMS callinfo Service --> + <hal format="hidl"> + <name>vendor.qti.ims.callinfo</name> + <transport>hwbinder</transport> + <version>1.0</version> + <interface> + <name>IService</name> + <instance>default</instance> + </interface> + </hal> + <hal format="hidl"> + <name>com.qualcomm.qti.imscmservice</name> + <transport>hwbinder</transport> + <version>2.2</version> + <interface> + <name>IImsCmService</name> + <instance>qti.ims.connectionmanagerservice</instance> + </interface> + </hal> + <hal format="hidl"> + <name>vendor.qti.hardware.radio.am</name> + <transport>hwbinder</transport> + <version>1.0</version> + <interface> + <name>IQcRilAudio</name> + <instance>slot1</instance> + <instance>slot2</instance> + </interface> + </hal> + <hal format="hidl"> + <name>vendor.qti.ims.factory</name> + <transport>hwbinder</transport> + <version>1.0</version> + <interface> + <name>IImsFactory</name> + <instance>default</instance> + </interface> + </hal> + <hal format="hidl"> + <name>vendor.qti.data.factory</name> + <transport>hwbinder</transport> + <version>2.2</version> + <interface> + <name>IFactory</name> + <instance>default</instance> + </interface> + </hal> + <hal format="hidl"> + <name>android.hardware.radio</name> + <transport>hwbinder</transport> + <fqname>@1.5::IRadio/slot1</fqname> + <fqname>@1.5::IRadio/slot2</fqname> + <fqname>@1.2::ISap/slot1</fqname> + <fqname>@1.2::ISap/slot2</fqname> + </hal> + <hal format="hidl"> + <name>android.hardware.radio.config</name> + <transport>hwbinder</transport> + <version>1.1</version> + <interface> + <name>IRadioConfig</name> + <instance>default</instance> + </interface> + </hal> + <!-- keymaster --> + <hal format="hidl"> + <name>android.hardware.keymaster</name> + <transport>hwbinder</transport> + <fqname>@4.0::IKeymasterDevice/default</fqname> + </hal> + <hal format="hidl"> + <name>android.hardware.power.stats</name> + <transport>hwbinder</transport> + <version>1.0</version> + <interface> + <name>IPowerStats</name> + <instance>default</instance> + </interface> + </hal> + <hal format="hidl"> + <name>android.hardware.dumpstate</name> + <transport>hwbinder</transport> + <version>1.1</version> + <interface> + <name>IDumpstateDevice</name> + <instance>default</instance> + </interface> + </hal> + <hal format="hidl"> + <name>hardware.google.bluetooth.sar</name> + <transport>hwbinder</transport> + <version>1.0</version> + <interface> + <name>IBluetoothSar</name> + <instance>default</instance> + </interface> + </hal> + <hal format="hidl"> + <name>hardware.google.bluetooth.bt_channel_avoidance</name> + <transport>hwbinder</transport> + <version>1.0</version> + <interface> + <name>IBTChannelAvoidance</name> + <instance>default</instance> + </interface> + </hal> + <hal format="hidl"> + <name>vendor.qti.hardware.tui_comm</name> + <transport>hwbinder</transport> + <version>1.0</version> + <interface> + <name>ITuiComm</name> + <instance>default</instance> + </interface> + </hal> + <hal format="hidl"> + <name>vendor.qti.hardware.radio.qtiradio</name> + <transport>hwbinder</transport> + <version>1.0</version> + <interface> + <name>IQtiRadio</name> + <instance>slot1</instance> + <instance>slot2</instance> + </interface> + </hal> + <hal format="hidl"> + <name>vendor.qti.hardware.radio.qtiradio</name> + <transport>hwbinder</transport> + <version>2.4</version> + <interface> + <name>IQtiRadio</name> + <instance>slot1</instance> + <instance>slot2</instance> + </interface> + </hal> + <hal format="hidl"> + <name>android.hardware.tetheroffload.config</name> + <transport>hwbinder</transport> + <version>1.0</version> + <interface> + <name>IOffloadConfig</name> + <instance>default</instance> + </interface> + </hal> + <hal format="hidl"> + <name>android.hardware.tetheroffload.control</name> + <transport>hwbinder</transport> + <version>1.0</version> + <interface> + <name>IOffloadControl</name> + <instance>default</instance> + </interface> + </hal> + <!-- QSEECom HAL service --> + <hal format="hidl"> + <name>vendor.qti.hardware.qseecom</name> + <transport>hwbinder</transport> + <version>1.0</version> + <interface> + <name>IQSEECom</name> + <instance>default</instance> + </interface> + </hal> + <!-- QSPM HAL service --> + <hal format="hidl"> + <name>vendor.qti.qspmhal</name> + <transport>hwbinder</transport> + <version>1.0</version> + <interface> + <name>IQspmhal</name> + <instance>default</instance> + </interface> + </hal> + <hal format="hidl" optional="true"> + <name>vendor.qti.hardware.qteeconnector</name> + <transport>hwbinder</transport> + <version>1.0</version> + <interface> + <name>IAppConnector</name> + <instance>default</instance> + </interface> + <interface> + <name>IGPAppConnector</name> + <instance>default</instance> + </interface> + </hal> + <!-- DSP Service --> + <hal format="hidl"> + <name>vendor.qti.hardware.dsp</name> + <transport>hwbinder</transport> + <version>1.0</version> + <interface> + <name>IDspService</name> + <instance>dspservice</instance> + </interface> + </hal> +</manifest> diff --git a/manifest_omx.xml b/manifest_omx.xml new file mode 100644 index 00000000..c6cfe66a --- /dev/null +++ b/manifest_omx.xml @@ -0,0 +1,45 @@ +<!-- Copyright (c) 2017-2021, The Linux Foundation. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of The Linux Foundation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--> +<manifest version="1.0" type="device" target-level="5"> + <!-- video omx hal --> + <hal format="hidl"> + <name>android.hardware.media.omx</name> + <transport>hwbinder</transport> + <impl level="generic"></impl> + <version>1.0</version> + <interface> + <name>IOmx</name> + <instance>default</instance> + </interface> + <interface> + <name>IOmxStore</name> + <instance>default</instance> + </interface> + </hal> + <!-- /video omx hal --> +</manifest> diff --git a/media_codecs.xml b/media_codecs.xml new file mode 100644 index 00000000..e2b3fd99 --- /dev/null +++ b/media_codecs.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8" ?> +<!-- + 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. +--> + +<MediaCodecs> + <Include href="media_codecs_c2.xml" /> + <Include href="media_codecs_omx.xml" /> + <Settings> + <Setting name="max-video-encoder-input-buffers" value="11" /> + <Domain name="telephony" enabled="true" /> + </Settings> +</MediaCodecs> diff --git a/media_codecs_c2.xml b/media_codecs_c2.xml new file mode 100644 index 00000000..6ed8eda0 --- /dev/null +++ b/media_codecs_c2.xml @@ -0,0 +1,304 @@ +<?xml version="1.0" encoding="utf-8" ?> +<!-- + Copyright (c) 2019-2020 Qualcomm Technologies, Inc. + All Rights Reserved. + Confidential and Proprietary - Qualcomm Technologies, Inc. + + Not a Contribution. + + Copyright (C) 2012-2018 The Linux Foundation. All rights reserved. + Copyright (C) 2012-2013 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. +--> + +<!-- + 7250 Non-Secure decoder capabilities + _________________________________________________________ + | Codec | W H fps Mbps MB/s | + |_____________|_________________________________________| + | h264 | 4096 2160 60 120 2073600 | + | | (4096) (2304) (30) (120) | + | hevc | 4096 2160 60 120 2073600 | + | | (4096) (2304) (30) (120) | + | vp8 | 4096 2160 30 120 1036800 | + | | (4096) (2304) (24) (120) | + | vp9 | 4096 2160 60 120 2073600 | + | | (4096) (2304) (30) (120) | + |_____________|_________________________________________| + + 7250 Secure decoder capabilities + ______________________________________________________ + | Codec | W H fps Mbps MB/s | + |__________|_________________________________________| + | h264 | 4096 2160 60 40 2073600 | + | | (4096) (2304) (30) (40) | + | vp9 | 4096 2160 60 40 2073600 | + | | (4096) (2304) (30) (40) | + | hevc | 4096 2160 60 40 2073600 | + | | (4096) (2304) (30) (40) | + |__________|_________________________________________| + + 7250 Non-Secure encoder capabilities (Secure not supported) + ______________________________________________________ + | Codec | W H fps Mbps MB/s | + |__________|_________________________________________| + | h264 | 4096 2160 60 120 2073600 | + | | (4096) (2304) (30) (120) | + | hevc | 4096 2160 60 120 2073600 | + | | (4096) (2304) (30) (120) | + | vp8 | 4096 2160 30 120 1036800 | + | | (4096) (2304) (24) (120) | + |__________|_________________________________________| +--> + +<Included> + <Decoders> + <!-- C2 decoders --> + <MediaCodec name="c2.qti.avc.decoder" type="video/avc"> + <Alias name="OMX.qcom.video.decoder.avc" /> + <Limit name="size" min="96x96" max="4096x2176" /> + <Limit name="alignment" value="2x2" /> + <Limit name="block-size" value="16x16" /> + <Limit name="blocks-per-second" range="64-1958400" /> + <Limit name="bitrate" range="1-100000000" /> + <Limit name="frame-rate" range="1-480" /> + <Limit name="concurrent-instances" max="16" /> + <Limit name="performance-point-4096x2160" value="24" /> + <Limit name="performance-point-3840x2160" value="30" /> + <Limit name="performance-point-1920x1080" value="120" /> + <Limit name="performance-point-1280x720" value="240" /> + <Feature name="adaptive-playback" /> + <Feature name="can-swap-width-height" value="1" /> + </MediaCodec> + <MediaCodec name="c2.qti.avc.decoder.low_latency" type="video/avc"> + <Limit name="size" min="96x96" max="4096x2176" /> + <Limit name="alignment" value="2x2" /> + <Limit name="block-size" value="16x16" /> + <Limit name="blocks-per-second" range="64-1958400" /> + <Limit name="bitrate" range="1-60000000" /> + <Limit name="frame-rate" range="1-480" /> + <Limit name="performance-point-4096x2160" value="24" /> + <Limit name="performance-point-3840x2160" value="30" /> + <Limit name="performance-point-1920x1080" value="120" /> + <Limit name="performance-point-1280x720" value="240" /> + <Feature name="adaptive-playback" /> + <Feature name="low-latency" /> + <Feature name="can-swap-width-height" value="1" /> + <Limit name="concurrent-instances" max="16" /> + </MediaCodec> + <MediaCodec name="c2.qti.avc.decoder.secure" type="video/avc" > + <Alias name="OMX.qcom.video.decoder.avc.secure" /> + <Limit name="size" min="96x96" max="4096x2176" /> + <Limit name="alignment" value="2x2" /> + <Limit name="block-size" value="16x16" /> + <Limit name="blocks-per-second" min="1" max="1958400" /> + <Limit name="bitrate" range="1-40000000" /> + <Limit name="frame-rate" range="1-240" /> + <Limit name="performance-point-4096x2160" value="24" /> + <Limit name="performance-point-3840x2160" value="30" /> + <Limit name="performance-point-1920x1080" value="60" /> + <Feature name="adaptive-playback" /> + <Feature name="secure-playback" required="true" /> + <Feature name="can-swap-width-height" value="1" /> + <Limit name="concurrent-instances" max="4" /> + </MediaCodec> + <MediaCodec name="c2.qti.hevc.decoder" type="video/hevc" > + <Alias name="OMX.qcom.video.decoder.hevc" /> + <Limit name="size" min="96x96" max="4096x2176" /> + <Limit name="alignment" value="2x2" /> + <Limit name="block-size" value="16x16" /> + <Limit name="blocks-per-second" min="64" max="1958400" /> + <Limit name="bitrate" range="1-100000000" /> + <Limit name="frame-rate" range="1-480" /> + <Limit name="performance-point-4096x2160" value="24" /> + <Limit name="performance-point-3840x2160" value="30" /> + <Limit name="performance-point-1920x1080" value="120" /> + <Limit name="performance-point-1280x720" value="240" /> + <Feature name="adaptive-playback" /> + <Feature name="can-swap-width-height" value="1" /> + <Limit name="concurrent-instances" max="16" /> + </MediaCodec> + <MediaCodec name="c2.qti.hevc.decoder.low_latency" type="video/hevc" > + <Limit name="size" min="96x96" max="4096x2176" /> + <Limit name="alignment" value="2x2" /> + <Limit name="block-size" value="16x16" /> + <Limit name="blocks-per-second" min="64" max="1958400" /> + <Limit name="bitrate" range="1-60000000" /> + <Limit name="frame-rate" range="1-480" /> + <Limit name="performance-point-4096x2160" value="24" /> + <Limit name="performance-point-3840x2160" value="30" /> + <Limit name="performance-point-1920x1080" value="120" /> + <Limit name="performance-point-1280x720" value="240" /> + <Feature name="adaptive-playback" /> + <Feature name="low-latency" /> + <Feature name="can-swap-width-height" value="1" /> + <Limit name="concurrent-instances" max="16" /> + </MediaCodec> + <MediaCodec name="c2.qti.hevc.decoder.secure" type="video/hevc" > + <Alias name="OMX.qcom.video.decoder.hevc.secure" /> + <Limit name="size" min="96x96" max="4096x2176" /> + <Limit name="alignment" value="2x2" /> + <Limit name="block-size" value="16x16" /> + <Limit name="blocks-per-second" min="24" max="2073600" /> + <Limit name="bitrate" range="1-40000000" /> + <Limit name="frame-rate" range="1-480" /> + <Limit name="performance-point-4096x2160" value="24" /> + <Limit name="performance-point-3840x2160" value="30" /> + <Limit name="performance-point-1920x1080" value="60" /> + <Feature name="adaptive-playback" /> + <Feature name="secure-playback" required="true" /> + <Feature name="can-swap-width-height" value="1" /> + <Limit name="concurrent-instances" max="4" /> + </MediaCodec> + <MediaCodec name="c2.qti.vp8.decoder" type="video/x-vnd.on2.vp8" > + <Alias name="OMX.qcom.video.decoder.vp8" /> + <Limit name="size" min="96x96" max="4096x2176" /> + <Limit name="alignment" value="2x2" /> + <Limit name="block-size" value="16x16" /> + <Limit name="blocks-per-second" min="64" max="1036800" /> + <Limit name="bitrate" range="1-100000000" /> + <Limit name="frame-rate" range="1-240" /> + <Limit name="performance-point-4096x2160" value="24" /> + <Limit name="performance-point-3840x2160" value="30" /> + <Limit name="performance-point-1920x1080" value="60" /> + <Limit name="performance-point-1280x720" value="120" /> + <Feature name="adaptive-playback" /> + <Feature name="can-swap-width-height" value="1" /> + <Limit name="concurrent-instances" max="16" /> + </MediaCodec> + <MediaCodec name="c2.qti.vp9.decoder" type="video/x-vnd.on2.vp9" > + <Alias name="OMX.qcom.video.decoder.vp9" /> + <Limit name="size" min="96x96" max="4096x2176" /> + <Limit name="alignment" value="2x2" /> + <Limit name="block-size" value="16x16" /> + <Limit name="blocks-per-second" min="64" max="1958400" /> + <Limit name="bitrate" range="1-100000000" /> + <Limit name="frame-rate" range="1-480" /> + <Limit name="performance-point-4096x2304" value="24" /> + <Limit name="performance-point-3840x2160" value="30" /> + <Limit name="performance-point-1920x1080" value="120" /> + <Limit name="performance-point-1280x720" value="240" /> + <Feature name="adaptive-playback" /> + <Feature name="can-swap-width-height" value="1" /> + <Limit name="concurrent-instances" max="6" /> + </MediaCodec> + <MediaCodec name="c2.qti.vp9.decoder.secure" type="video/x-vnd.on2.vp9" > + <Limit name="size" min="96x96" max="4096x2176" /> + <Limit name="alignment" value="2x2" /> + <Limit name="block-size" value="16x16" /> + <Limit name="blocks-per-second" min="24" max="2073600" /> + <Limit name="bitrate" range="1-40000000" /> + <Limit name="frame-rate" range="1-480" /> + <Limit name="performance-point-4096x2304" value="24" /> + <Limit name="performance-point-3840x2160" value="30" /> + <Limit name="performance-point-1920x1080" value="60" /> + <Feature name="adaptive-playback" /> + <Feature name="secure-playback" required="true" /> + <Feature name="can-swap-width-height" value="1" /> + <Limit name="concurrent-instances" max="4" /> + </MediaCodec> + </Decoders> + + <Encoders> + <!-- C2 encoders --> + <MediaCodec name="c2.qti.avc.encoder" type="video/avc"> + <Alias name="OMX.qcom.video.encoder.avc" /> + <Limit name="size" min="128x128" max="4096x2176" /> + <Limit name="alignment" value="2x2" /> + <Limit name="block-size" value="16x16" /> + <Limit name="blocks-per-second" min="64" max="1958400" /> + <Limit name="bitrate" range="1-100000000" /> + <Limit name="frame-rate" range="1-480" /> + <Limit name="concurrent-instances" max="16" /> + <Limit name="performance-point-4096x2160" value="24" /> + <Limit name="performance-point-3840x2160" value="30" /> + <Limit name="performance-point-1920x1080" value="120" /> + <Limit name="performance-point-1280x720" value="240" /> + <Feature name="bitrate-modes" value="VBR,CBR" /> + <!-- Video Quality control --> + <!-- QP supported using vendor extensions --> + <Feature name="qp-bounds" /> + <Feature name="can-swap-width-height" value="1" /> + <Mapping kind="vq" name="video-qp-b-max" value="vendor.qti-ext-enc-qp-range.qp-b-max" /> + <Mapping kind="vq" name="video-qp-b-min" value="vendor.qti-ext-enc-qp-range.qp-b-min" /> + <Mapping kind="vq" name="video-qp-i-max" value="vendor.qti-ext-enc-qp-range.qp-i-max" /> + <Mapping kind="vq" name="video-qp-i-min" value="vendor.qti-ext-enc-qp-range.qp-i-min" /> + <Mapping kind="vq" name="video-qp-p-max" value="vendor.qti-ext-enc-qp-range.qp-p-max" /> + <Mapping kind="vq" name="video-qp-p-min" value="vendor.qti-ext-enc-qp-range.qp-p-min" /> + </MediaCodec> + <MediaCodec name="c2.qti.hevc.encoder" type="video/hevc"> + <Alias name="OMX.qcom.video.encoder.hevc" /> + <Limit name="size" min="128x128" max="4096x2176" /> + <Limit name="alignment" value="2x2" /> + <Limit name="block-size" value="16x16" /> + <Limit name="blocks-per-second" min="64" max="1958400" /> + <Limit name="bitrate" range="1-100000000" /> + <Limit name="frame-rate" range="1-480" /> + <Limit name="concurrent-instances" max="16" /> + <Limit name="quality" range="0-100" default="80" /> + <Limit name="performance-point-4096x2160" value="24" /> + <Limit name="performance-point-3840x2160" value="30" /> + <Limit name="performance-point-1920x1080" value="120" /> + <Limit name="performance-point-1280x720" value="240" /> + <Feature name="bitrate-modes" value="VBR,CBR,CQ" /> + <Feature name="can-swap-width-height" value="1" /> + </MediaCodec> + <MediaCodec name="c2.qti.hevc.encoder.cq" type="video/hevc"> + <Limit name="size" min="512x512" max="512x512" /> + <Limit name="alignment" value="2x2" /> + <Limit name="block-size" value="16x16" /> + <Limit name="blocks-per-second" min="24" max="2073600" /> + <Limit name="bitrate" range="1-160000000" /> + <Limit name="frame-rate" range="1-20" /> + <Limit name="concurrent-instances" max="16" /> + <Limit name="quality" range="0-100" default="80" /> + <Limit name="performance-point-512x512" value="480" /> + <Feature name="bitrate-modes" value="CQ" /> + </MediaCodec> + <MediaCodec name="c2.qti.heic.encoder" type="image/vnd.android.heic"> + <Limit name="size" min="512x512" max="4096x2160" /> + <Limit name="block-count" range="1024-138240" /> <!--max-spatial: 8192x4320 --> + <Limit name="alignment" value="2x2" /> + <Limit name="block-size" value="16x16" /> + <Limit name="blocks-per-second" min="24" max="2073600" /> + <Limit name="frame-rate" range="1-20" /> + <Limit name="concurrent-instances" max="6" /> + <Limit name="quality" range="0-100" default="80" /> + <Limit name="performance-point-4096x2160" value="12" /> + <Limit name="performance-point-1920x1080" value="40" /> + <Limit name="performance-point-1920x1080" value="30" /> + <Limit name="performance-point-1280x720" value="80" /> + <Limit name="performance-point-1280x720" value="60" /> + <Limit name="performance-point-720x480" value="240" /> + <Feature name="bitrate-modes" value="CQ" /> + <Feature name="can-swap-width-height" value="1" /> + </MediaCodec> + <MediaCodec name="c2.qti.vp8.encoder" type="video/x-vnd.on2.vp8"> + <Alias name="OMX.qcom.video.encoder.vp8" /> + <Limit name="size" min="128x128" max="4096x2176" /> + <Limit name="alignment" value="2x2" /> + <Limit name="block-size" value="16x16" /> + <Limit name="blocks-per-second" min="64" max="1958400" /> + <Limit name="bitrate" range="1-100000000" /> + <Limit name="frame-rate" range="1-480" /> + <Limit name="concurrent-instances" max="16" /> + <Limit name="performance-point-4096x2160" value="24" /> + <Limit name="performance-point-3840x2160" value="30" /> + <Limit name="performance-point-1920x1080" value="60" /> + <Limit name="performance-point-1280x720" value="120" /> + <Feature name="bitrate-modes" value="VBR,CBR" /> + <Feature name="can-swap-width-height" value="1" /> + </MediaCodec> + </Encoders> +</Included> diff --git a/media_codecs_omx.xml b/media_codecs_omx.xml new file mode 100644 index 00000000..74b1c263 --- /dev/null +++ b/media_codecs_omx.xml @@ -0,0 +1,279 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2012-2018 The Linux Foundation. All rights reserved. + Not a contribution. + Copyright (C) 2012-2013 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. + + +--> + +<!-- + Non-Secure decoder capabilities + (MB is defined as 16x16) + _____________________________________________________________________ + | Codec | W H fps Mbps MB/s Max MB/s| + |_____________|_____________________________________________________| + | h264 | 1920 1088 480 220 3916800 3916800 | + | | 3820 2160 120 220 3888000 | + | | 4096 2160 96 220 3317760 | + | hevc | 1920 1088 480 220 3916800 3916800 | + | | 3820 2160 120 220 3888000 | + | | 4096 2160 96 220 3317760 | + | vp8 | 1280 720 240 100 864000 1036800 | + | | 1920 1088 120 100 979200 | + | | 3840 2160 30 100 972000 | + | | 4096 2160 30 100 1036800 | + | vp9 | 1920 1088 480 220 3916800 3916800 | + | | 3820 2160 120 220 3888000 | + | | 4096 2160 96 220 3317760 | + |_____________|_____________________________________________________| + + Secure decoder capabilities + (MB is defined as 16x16) + __________________________________________________________________ + | Codec | W H fps Mbps MB/s Max MB/s| + |__________|_____________________________________________________| + | h264 | 1280 720 60 40 216000 2073600 | + | | 1920 1088 60 40 489600 | + | | 3840 2160 60 40 1944000 | + | | 4096 2160 60 40 2073600 | + | hevc | 1280 720 60 40 216000 2073600 | + | | 1920 1088 60 40 489600 | + | | 3840 2160 60 40 1944000 | + | | 4096 2160 60 40 2073600 | + | vp9 | 1280 720 60 40 216000 2073600 | + | | 1920 1088 60 40 489600 | + | | 3840 2160 60 40 1944000 | + | | 4096 2160 60 40 2073600 | + |__________|_____________________________________________________| + + Non-Secure encoder capabilities (Secure not supported) + (MB is defined as 16x16) + __________________________________________________________________ + | Codec | W H fps Mbps MB/s Max MB/s| + |__________|_____________________________________________________| + | h264 | 1280 720 480 160 1728000 1958400 | + | | 1920 1088 240 160 1958400 | + | | 3840 2160 60 160 1944000 | + | | 4096 2160 48 160 1658880 | + | hevc | 1280 720 480 160 1728000 1958400 | + | | 1920 1088 240 160 1958400 | + | | 3840 2160 60 160 1944000 | + | | 4096 2160 48 160 1658880 | + | vp8 | 1280 720 240 40 864000 1036800 | + | | 1920 1088 120 40 979200 | + | | 3840 2160 30 40 972000 | + | | 4096 2160 30 40 1036800 | + |__________|_____________________________________________________| +--> + +<MediaCodecs> + <Include href="media_codecs_google_audio.xml" /> + <Include href="media_codecs_google_telephony.xml" /> + <Settings> + <Setting name="max-video-encoder-input-buffers" value="11" /> + </Settings> + <Encoders> + <!-- Video Hardware --> + <MediaCodec name="OMX.qcom.video.encoder.avc" type="video/avc" > + <Quirk name="requires-allocate-on-input-ports" /> + <Quirk name="requires-allocate-on-output-ports" /> + <Quirk name="requires-loaded-to-idle-after-allocation" /> + <Limit name="size" min="96x96" max="4096x2304" /> + <Limit name="alignment" value="2x2" /> + <Limit name="block-size" value="16x16" /> + <Limit name="blocks-per-second" min="36" max="1958400" /> + <Limit name="bitrate" range="1-160000000" /> + <Limit name="frame-rate" range="1-480" /> + <Limit name="concurrent-instances" max="16" /> + </MediaCodec> + <MediaCodec name="OMX.qcom.video.encoder.vp8" type="video/x-vnd.on2.vp8" > + <Quirk name="requires-allocate-on-input-ports" /> + <Quirk name="requires-allocate-on-output-ports" /> + <Quirk name="requires-loaded-to-idle-after-allocation" /> + <Limit name="size" min="96x96" max="4096x2304" /> + <Limit name="alignment" value="2x2" /> + <Limit name="block-size" value="16x16" /> + <Limit name="blocks-per-second" min="36" max="1036800" /> + <Limit name="bitrate" range="1-40000000" /> + <Limit name="frame-rate" range="1-240" /> + <Limit name="concurrent-instances" max="16" /> + </MediaCodec> + <MediaCodec name="OMX.qcom.video.encoder.hevc" type="video/hevc" > + <Quirk name="requires-allocate-on-input-ports" /> + <Quirk name="requires-allocate-on-output-ports" /> + <Quirk name="requires-loaded-to-idle-after-allocation" /> + <Limit name="size" min="96x96" max="4096x2304" /> + <Limit name="alignment" value="2x2" /> + <Limit name="block-size" value="16x16" /> + <Limit name="blocks-per-second" min="36" max="1958400" /> + <Limit name="bitrate" range="1-160000000" /> + <Limit name="frame-rate" range="1-480" /> + <Limit name="concurrent-instances" max="16" /> + </MediaCodec> + </Encoders> + <Decoders> + <!-- Video Hardware --> + <MediaCodec name="OMX.qcom.video.decoder.avc" type="video/avc" > + <Quirk name="requires-allocate-on-input-ports" /> + <Quirk name="requires-allocate-on-output-ports" /> + <Limit name="size" min="96x96" max="8192x4320" /> + <Limit name="alignment" value="2x2" /> + <Limit name="block-size" value="16x16" /> + <Limit name="blocks-per-second" min="36" max="3916800" /> + <Limit name="bitrate" range="1-220000000" /> + <Limit name="frame-rate" range="1-480" /> + <Feature name="adaptive-playback" /> + <Limit name="concurrent-instances" max="16" /> + </MediaCodec> + <MediaCodec name="OMX.qcom.video.decoder.avc.secure" type="video/avc" > + <Quirk name="requires-allocate-on-input-ports" /> + <Quirk name="requires-allocate-on-output-ports" /> + <Limit name="size" min="96x96" max="4096x2304" /> + <Limit name="alignment" value="2x2" /> + <Limit name="block-size" value="16x16" /> + <Limit name="blocks-per-second" min="36" max="2073600" /> + <Limit name="bitrate" range="1-40000000" /> + <Limit name="frame-rate" range="1-60" /> + <Feature name="adaptive-playback" /> + <Feature name="secure-playback" required="true" /> + <Limit name="concurrent-instances" max="6" /> + </MediaCodec> + <MediaCodec name="OMX.qcom.video.decoder.vp8" type="video/x-vnd.on2.vp8" > + <Quirk name="requires-allocate-on-input-ports" /> + <Quirk name="requires-allocate-on-output-ports" /> + <Limit name="size" min="96x96" max="4096x2304" /> + <Limit name="alignment" value="2x2" /> + <Limit name="block-size" value="16x16" /> + <Limit name="blocks-per-second" min="36" max="1036800" /> + <Limit name="bitrate" range="1-100000000" /> + <Limit name="frame-rate" range="1-240" /> + <Feature name="adaptive-playback" /> + <Limit name="concurrent-instances" max="16" /> + </MediaCodec> + <MediaCodec name="OMX.qcom.video.decoder.vp9" type="video/x-vnd.on2.vp9" > + <Quirk name="requires-allocate-on-input-ports" /> + <Quirk name="requires-allocate-on-output-ports" /> + <Limit name="size" min="96x96" max="8192x4320" /> + <Limit name="alignment" value="2x2" /> + <Limit name="block-size" value="16x16" /> + <Limit name="blocks-per-second" min="36" max="3916800" /> + <Limit name="bitrate" range="1-220000000" /> + <Limit name="frame-rate" range="1-480" /> + <Feature name="adaptive-playback" /> + <Limit name="concurrent-instances" max="6" /> + </MediaCodec> + <MediaCodec name="OMX.qcom.video.decoder.vp9.secure" type="video/x-vnd.on2.vp9" > + <Quirk name="requires-allocate-on-input-ports" /> + <Quirk name="requires-allocate-on-output-ports" /> + <Limit name="size" min="96x96" max="4096x2304" /> + <Limit name="alignment" value="2x2" /> + <Limit name="block-size" value="16x16" /> + <Limit name="blocks-per-second" min="36" max="2073600" /> + <Limit name="bitrate" range="1-40000000" /> + <Limit name="frame-rate" range="1-60" /> + <Feature name="adaptive-playback" /> + <Feature name="secure-playback" required="true" /> + <Limit name="concurrent-instances" max="6" /> + </MediaCodec> + <MediaCodec name="OMX.qcom.video.decoder.hevc" type="video/hevc" > + <Quirk name="requires-allocate-on-input-ports" /> + <Quirk name="requires-allocate-on-output-ports" /> + <Limit name="size" min="96x96" max="8192x4320" /> + <Limit name="alignment" value="2x2" /> + <Limit name="block-size" value="16x16" /> + <Limit name="blocks-per-second" min="36" max="3916800" /> + <Limit name="bitrate" range="1-220000000" /> + <Limit name="frame-rate" range="1-480" /> + <Feature name="adaptive-playback" /> + <Limit name="concurrent-instances" max="16" /> + </MediaCodec> + <MediaCodec name="OMX.qcom.video.decoder.hevc.secure" type="video/hevc" > + <Quirk name="requires-allocate-on-input-ports" /> + <Quirk name="requires-allocate-on-output-ports" /> + <Limit name="size" min="96x96" max="4096x2304" /> + <Limit name="alignment" value="2x2" /> + <Limit name="block-size" value="16x16" /> + <Limit name="blocks-per-second" min="36" max="2073600" /> + <Limit name="bitrate" range="1-40000000" /> + <Limit name="frame-rate" range="1-60" /> + <Feature name="adaptive-playback" /> + <Feature name="secure-playback" required="true" /> + <Limit name="concurrent-instances" max="6" /> + </MediaCodec> + </Decoders> + <Include href="media_codecs_google_video.xml" /> +</MediaCodecs> diff --git a/media_codecs_performance.xml b/media_codecs_performance.xml new file mode 100644 index 00000000..b0fbf330 --- /dev/null +++ b/media_codecs_performance.xml @@ -0,0 +1,141 @@ +<?xml version="1.0" encoding="utf-8" ?> +<!-- +Copyright (c) 2015-2017, The Linux Foundation. All rights reserved. + +Not a Contribution. + +Copyright 2015 The Android Open Source Project + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +u 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> + <Encoders> + <MediaCodec name="OMX.qcom.video.encoder.avc" type="video/avc" update="true"> + <Limit name="measured-frame-rate-320x240" range="238-238" /> + <Limit name="measured-frame-rate-720x480" range="123-123" /> + <Limit name="measured-frame-rate-1280x720" range="50-50" /> + <Limit name="measured-frame-rate-1920x1080" range="16-40" /> + </MediaCodec> + <MediaCodec name="OMX.qcom.video.encoder.hevc" type="video/hevc" update="true"> + <Limit name="measured-frame-rate-320x240" range="226-226" /> + <Limit name="measured-frame-rate-720x480" range="121-121" /> + <Limit name="measured-frame-rate-1280x720" range="49-49" /> + <Limit name="measured-frame-rate-1920x1080" range="16-45" /> + <Limit name="measured-frame-rate-3840x2160" range="6-24" /> + </MediaCodec> + <MediaCodec name="OMX.qcom.video.encoder.h263sw" type="video/3gpp" update="true"> + <Limit name="measured-frame-rate-176x144" range="303-303" /> + <Limit name="measured-frame-rate-352x288" range="259-259" /> + </MediaCodec> + <MediaCodec name="OMX.qcom.video.encoder.mpeg4sw" type="video/mp4v-es" update="true"> + <Limit name="measured-frame-rate-176x144" range="299-299" /> + <Limit name="measured-frame-rate-352x288" range="245-245" /> + <Limit name="measured-frame-rate-640x480" range="148-148" /> + </MediaCodec> + <MediaCodec name="OMX.qcom.video.encoder.vp8" type="video/x-vnd.on2.vp8" update="true"> + <Limit name="measured-frame-rate-320x180" range="266-266" /> + <Limit name="measured-frame-rate-640x360" range="165-165" /> + <Limit name="measured-frame-rate-1280x720" range="49-49" /> + <Limit name="measured-frame-rate-1920x1080" range="16-40" /> + </MediaCodec> + <MediaCodec name="OMX.google.h264.encoder" type="video/avc" update="true"> + <Limit name="measured-frame-rate-320x240" range="215-215" /> + <Limit name="measured-frame-rate-720x480" range="100-100" /> + <Limit name="measured-frame-rate-1280x720" range="56-56" /> + <Limit name="measured-frame-rate-1920x1080" range="30-30" /> + </MediaCodec> + <MediaCodec name="OMX.google.h263.encoder" type="video/3gpp" update="true"> + <Limit name="measured-frame-rate-176x144" range="200-200" /> + </MediaCodec> + <MediaCodec name="OMX.google.mpeg4.encoder" type="video/mp4v-es" update="true"> + <Limit name="measured-frame-rate-176x144" range="180-180" /> + </MediaCodec> + <MediaCodec name="OMX.google.vp8.encoder" type="video/x-vnd.on2.vp8" update="true"> + <Limit name="measured-frame-rate-320x180" range="39-39" /> + <Limit name="measured-frame-rate-640x360" range="32-32" /> + <Limit name="measured-frame-rate-1280x720" range="17-24" /> + <Limit name="measured-frame-rate-1920x1080" range="8-12" /> + </MediaCodec> + </Encoders> + <Decoders> + <MediaCodec name="OMX.qcom.video.decoder.avc" type="video/avc" update="true"> + <Limit name="measured-frame-rate-320x240" range="221-221" /> + <Limit name="measured-frame-rate-720x480" range="156-156" /> + <Limit name="measured-frame-rate-1280x720" range="111-111" /> + <Limit name="measured-frame-rate-1920x1088" range="71-71" /> + </MediaCodec> + <MediaCodec name="OMX.qcom.video.decoder.hevc" type="video/hevc" update="true"> + <Limit name="measured-frame-rate-352x288" range="222-222" /> + <Limit name="measured-frame-rate-720x480" range="165-165" /> + <Limit name="measured-frame-rate-1280x720" range="88-88" /> + <Limit name="measured-frame-rate-1920x1080" range="56-56" /> + <Limit name="measured-frame-rate-3840x2160" range="12-12" /> + </MediaCodec> + <MediaCodec name="OMX.qti.video.decoder.h263sw" type="video/3gpp" update="true"> + <Limit name="measured-frame-rate-176x144" range="356-356" /> + <Limit name="measured-frame-rate-352x288" range="292-292" /> + </MediaCodec> + <MediaCodec name="OMX.qti.video.decoder.mpeg4sw" type="video/mp4v-es" update="true"> + <Limit name="measured-frame-rate-176x144" range="146-146" /> + <Limit name="measured-frame-rate-480x360" range="145-145" /> + </MediaCodec> + <MediaCodec name="OMX.qcom.video.decoder.vp8" type="video/x-vnd.on2.vp8" update="true"> + <Limit name="measured-frame-rate-320x240" range="337-337" /> + <Limit name="measured-frame-rate-640x360" range="337-337" /> + <Limit name="measured-frame-rate-1280x720" range="337-337" /> + <Limit name="measured-frame-rate-1920x1080" range="248-248" /> + </MediaCodec> + <MediaCodec name="OMX.qcom.video.decoder.vp9" type="video/x-vnd.on2.vp9" update="true"> + <Limit name="measured-frame-rate-320x240" range="377-377" /> + <Limit name="measured-frame-rate-640x360" range="323-323" /> + <Limit name="measured-frame-rate-1280x720" range="262-262" /> + <Limit name="measured-frame-rate-1920x1080" range="220-220" /> + <Limit name="measured-frame-rate-3840x2160" range="51-51" /> + </MediaCodec> + <MediaCodec name="OMX.google.h264.decoder" type="video/avc" update="true"> + <Limit name="measured-frame-rate-320x240" range="122-122" /> + <Limit name="measured-frame-rate-720x480" range="68-68" /> + <Limit name="measured-frame-rate-1280x720" range="32-32" /> + <Limit name="measured-frame-rate-1920x1080" range="6-10" /> + </MediaCodec> + <MediaCodec name="OMX.google.h263.decoder" type="video/3gpp" update="true"> + <Limit name="measured-frame-rate-176x144" range="104-279" /> + <Limit name="measured-frame-rate-352x288" range="200-200" /> + </MediaCodec> + <MediaCodec name="OMX.google.hevc.decoder" type="video/hevc" update="true"> + <Limit name="measured-frame-rate-352x288" range="170-170" /> + <Limit name="measured-frame-rate-640x360" range="89-89" /> + <Limit name="measured-frame-rate-720x480" range="73-73" /> + <Limit name="measured-frame-rate-1280x720" range="32-32" /> + <Limit name="measured-frame-rate-1920x1080" range="21-21" /> + </MediaCodec> + <MediaCodec name="OMX.google.mpeg4.decoder" update="true"> + <Type name="video/mp4v-es"> + <Limit name="measured-frame-rate-176x144" range="430-450" /> + </Type> + </MediaCodec> + <MediaCodec name="OMX.google.vp8.decoder" type="video/x-vnd.on2.vp8" update="true"> + <Limit name="measured-frame-rate-320x240" range="330-381" /> + <Limit name="measured-frame-rate-640x360" range="139-185" /> + <Limit name="measured-frame-rate-1280x720" range="22-38" /> + <Limit name="measured-frame-rate-1920x1080" range="9-18" /> + </MediaCodec> + <MediaCodec name="OMX.google.vp9.decoder" type="video/x-vnd.on2.vp9" update="true"> + <Limit name="measured-frame-rate-320x240" range="200-230" /> + <Limit name="measured-frame-rate-640x360" range="81-90" /> + <Limit name="measured-frame-rate-1280x720" range="32-40" /> + <Limit name="measured-frame-rate-1920x1080" range="19-23" /> + </MediaCodec> + </Decoders> +</MediaCodecs> diff --git a/media_codecs_performance_c2.xml b/media_codecs_performance_c2.xml new file mode 100644 index 00000000..d1eb99e3 --- /dev/null +++ b/media_codecs_performance_c2.xml @@ -0,0 +1,275 @@ +<?xml version="1.0" encoding="utf-8" ?> +<!-- + Copyright (c) 2019 Qualcomm Technologies, Inc. + All Rights Reserved. + Confidential and Proprietary - Qualcomm Technologies, Inc. + + Not a Contribution. + + Copyright (C) 2012-2017 The Linux Foundation. All rights reserved. + Copyright (C) 2012-2013 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> + <!-- C2 HW decoders --> + <MediaCodec name="c2.qti.avc.decoder" type="video/avc" update="true"> + <Limit name="measured-frame-rate-320x240" range="1164-1164" /> <!-- N=50 v96%=1.1 --> + <!-- measured 90%:780-807 med:784 N=12 --> + <Limit name="measured-frame-rate-720x480" range="784-793" /> <!-- v90%=1.0 --> + <!-- measured 90%:377-382 med:380 N=12 --> + <Limit name="measured-frame-rate-1280x720" range="379-380" /> <!-- v90%=1.0 --> + <!-- measured 90%:180-181 med:180 N=19 --> + <Limit name="measured-frame-rate-1920x1080" range="180-180" /> <!-- v90%=1.0 --> + </MediaCodec> + <MediaCodec name="c2.qti.avc.decoder.low_latency" type="video/avc" update="true"> + <Limit name="measured-frame-rate-320x240" range="1164-1164" /> <!-- N=50 v96%=1.1 --> + <!-- measured 90%:780-807 med:784 N=12 --> + <Limit name="measured-frame-rate-720x480" range="784-793" /> <!-- v90%=1.0 --> + <!-- measured 90%:377-382 med:380 N=12 --> + <Limit name="measured-frame-rate-1280x720" range="379-380" /> <!-- v90%=1.0 --> + <!-- measured 90%:180-181 med:180 N=19 --> + <Limit name="measured-frame-rate-1920x1080" range="180-180" /> <!-- v90%=1.0 --> + </MediaCodec> + <MediaCodec name="c2.qti.hevc.decoder" type="video/hevc" update="true"> + <!-- measured 90%:1259-1417 med:1314 N=12 --> + <Limit name="measured-frame-rate-352x288" range="1314-1336" /> <!-- v90%=1.1 --> + <!-- measured 90%:1036-1107 med:1081 N=12 --> + <Limit name="measured-frame-rate-640x360" range="1071-1071" /> <!-- v90%=1.0 --> + <!-- measured 90%:948-976 med:962 N=12 --> + <Limit name="measured-frame-rate-720x480" range="961-962" /> <!-- v90%=1.0 --> + <!-- measured 90%:485-497 med:492 N=12 --> + <Limit name="measured-frame-rate-1280x720" range="491-491" /> <!-- v90%=1.0 --> + <!-- measured 90%:383-391 med:388 N=12 --> + <Limit name="measured-frame-rate-1920x1080" range="387-387" /> <!-- v90%=1.0 --> + <!-- measured 90%:107-108 med:107 N=12 --> + <Limit name="measured-frame-rate-3840x2160" range="107-107" /> <!-- v90%=1.0 --> + </MediaCodec> + <MediaCodec name="c2.qti.hevc.decoder.low_latency" type="video/hevc" update="true"> + <!-- measured 90%:1259-1417 med:1314 N=12 --> + <Limit name="measured-frame-rate-352x288" range="1314-1336" /> <!-- v90%=1.1 --> + <!-- measured 90%:1036-1107 med:1081 N=12 --> + <Limit name="measured-frame-rate-640x360" range="1071-1071" /> <!-- v90%=1.0 --> + <!-- measured 90%:948-976 med:962 N=12 --> + <Limit name="measured-frame-rate-720x480" range="961-962" /> <!-- v90%=1.0 --> + <!-- measured 90%:485-497 med:492 N=12 --> + <Limit name="measured-frame-rate-1280x720" range="491-491" /> <!-- v90%=1.0 --> + <!-- measured 90%:383-391 med:388 N=12 --> + <Limit name="measured-frame-rate-1920x1080" range="387-387" /> <!-- v90%=1.0 --> + <!-- measured 90%:107-108 med:107 N=12 --> + <Limit name="measured-frame-rate-3840x2160" range="107-107" /> <!-- v90%=1.0 --> + </MediaCodec> + <MediaCodec name="c2.qti.vp8.decoder" type="video/x-vnd.on2.vp8" update="true"> + <!-- measured 90%:1179-1262 med:1220 N=12 --> + <Limit name="measured-frame-rate-320x180" range="1219-1219" /> <!-- v90%=1.0 --> + <!-- measured 90%:1016-1045 med:1030 N=12 --> + <Limit name="measured-frame-rate-640x360" range="1029-1030" /> <!-- v90%=1.0 --> + <!-- measured 90%:384-391 med:388 N=12 --> + <Limit name="measured-frame-rate-1280x720" range="387-388" /> <!-- v90%=1.0 --> + <!-- measured 90%:175-176 med:176 N=12 --> + <Limit name="measured-frame-rate-1920x1080" range="175-176" /> <!-- v90%=1.0 --> + </MediaCodec> + <MediaCodec name="c2.qti.vp9.decoder" type="video/x-vnd.on2.vp9" update="true"> + <!-- measured 90%:1012-1079 med:1038 N=12 --> + <Limit name="measured-frame-rate-320x180" range="1038-1045" /> <!-- v90%=1.0 --> + <!-- measured 90%:771-810 med:794 N=12 --> + <Limit name="measured-frame-rate-640x360" range="790-790" /> <!-- v90%=1.0 --> + <!-- measured 90%:363-373 med:368 N=12 --> + <Limit name="measured-frame-rate-1280x720" range="368-368" /> <!-- v90%=1.0 --> + <!-- measured 90%:270-274 med:272 N=12 --> + <Limit name="measured-frame-rate-1920x1080" range="271-272" /> <!-- v90%=1.0 --> + <!-- measured 90%:70-72 med:71 N=12 --> + <Limit name="measured-frame-rate-3840x2160" range="71-71" /> <!-- v90%=1.0 --> + </MediaCodec> + + <!-- C2 HW decoders with OMX aliases --> + <MediaCodec name="OMX.qcom.video.decoder.avc" type="video/avc" update="true"> + <Limit name="measured-frame-rate-320x240" range="101-221" /> + <Limit name="measured-frame-rate-720x480" range="720-740" /> + <Limit name="measured-frame-rate-1280x720" range="200-420" /> + <Limit name="measured-frame-rate-1920x1088" range="76-167" /> + </MediaCodec> + <MediaCodec name="OMX.qcom.video.decoder.hevc" type="video/hevc" update="true"> + <Limit name="measured-frame-rate-352x288" range="800-850" /> + <Limit name="measured-frame-rate-720x480" range="440-600" /> + <Limit name="measured-frame-rate-1280x720" range="215-425" /> + <Limit name="measured-frame-rate-1920x1080" range="118-259" /> + <Limit name="measured-frame-rate-3840x2160" range="30-66" /> + </MediaCodec> + <MediaCodec name="OMX.qcom.video.decoder.vp8" type="video/x-vnd.on2.vp8" update="true"> + <Limit name="measured-frame-rate-320x240" range="800-900" /> + <Limit name="measured-frame-rate-640x360" range="700-750" /> + <Limit name="measured-frame-rate-1280x720" range="131-289" /> + <Limit name="measured-frame-rate-1920x1080" range="83-183" /> + </MediaCodec> + <MediaCodec name="OMX.qcom.video.decoder.vp9" type="video/x-vnd.on2.vp9" update="true"> + <Limit name="measured-frame-rate-320x240" range="800-900" /> + <Limit name="measured-frame-rate-640x360" range="700-800" /> + <Limit name="measured-frame-rate-1280x720" range="94-207" /> + <Limit name="measured-frame-rate-1920x1080" range="87-190" /> + <Limit name="measured-frame-rate-3840x2160" range="20-44" /> + </MediaCodec> + + <!-- C2 SW codecs --> + <MediaCodec name="c2.android.avc.decoder" type="video/avc" update="true"> + <!-- measured 98%:153-414 med:193/192 FLAKY(mn=61.7 < 96 - 414 < mx=423.7) --> + <Limit name="measured-frame-rate-320x240" range="486-504" /> <!-- N=50 v96%=1.3 --> + <!-- measured 90%:126-134 med:129 N=12 --> + <Limit name="measured-frame-rate-720x480" range="128-130" /> <!-- v90%=1.0 --> + <!-- measured 90%:47-51 med:49 N=12 --> + <Limit name="measured-frame-rate-1280x720" range="48-49" /> <!-- v90%=1.0 --> + <!-- measured 90%:21-24 med:22 N=12 --> + <Limit name="measured-frame-rate-1920x1080" range="22-22" /> <!-- v90%=1.0 --> + </MediaCodec> + <MediaCodec name="c2.android.hevc.decoder" type="video/hevc" update="true"> + <!-- measured 90%:433-542 med:469 N=12 --> + <Limit name="measured-frame-rate-352x288" range="469-485" /> <!-- v90%=1.1 --> + <!-- measured 90%:255-296 med:268 N=12 --> + <Limit name="measured-frame-rate-640x360" range="267-275" /> <!-- v90%=1.1 --> + <!-- measured 90%:231-266 med:249 N=12 --> + <Limit name="measured-frame-rate-720x480" range="248-248" /> <!-- v90%=1.1 --> + <!-- measured 90%:100-109 med:104 N=12 --> + <Limit name="measured-frame-rate-1280x720" range="103-105" /> <!-- v90%=1.0 --> + <!-- measured 90%:56-60 med:58 N=12 --> + <Limit name="measured-frame-rate-1920x1080" range="57-58" /> <!-- v90%=1.0 --> + </MediaCodec> + <MediaCodec name="c2.android.vp8.decoder" type="video/x-vnd.on2.vp8" update="true"> + <!-- measured 90%:799-924 med:815 N=12 --> + <Limit name="measured-frame-rate-320x180" range="814-859" /> <!-- v90%=1.1 --> + <!-- measured 90%:338-379 med:345 N=12 --> + <Limit name="measured-frame-rate-640x360" range="344-358" /> <!-- v90%=1.1 --> + <Limit name="measured-frame-rate-1280x720" range="88-92" /> <!-- N=50 v90%=1.1 --> + <!-- measured 90%:35-40 med:36 N=12 --> + <Limit name="measured-frame-rate-1920x1080" range="35-37" /> <!-- v90%=1.1 --> + </MediaCodec> + <MediaCodec name="c2.android.vp9.decoder" type="video/x-vnd.on2.vp9" update="true"> + <!-- measured 90%:621-650 med:634 N=12 --> + <Limit name="measured-frame-rate-320x180" range="633-635" /> <!-- v90%=1.0 --> + <!-- measured 90%:225-231 med:228 N=12 --> + <Limit name="measured-frame-rate-640x360" range="228-228" /> <!-- v90%=1.0 --> + <!-- measured 90%:91-94 med:93 N=12 --> + <Limit name="measured-frame-rate-1280x720" range="92-93" /> <!-- v90%=1.0 --> + <!-- measured 90%:56-58 med:57 N=12 --> + <Limit name="measured-frame-rate-1920x1080" range="57-57" /> <!-- v90%=1.0 --> + </MediaCodec> + <MediaCodec name="c2.android.h263.decoder" type="video/3gpp" update="true"> + <!-- measured 90%:1219-1704 med:1479 N=12 --> + <Limit name="measured-frame-rate-176x144" range="1441-1441" /> <!-- v90%=1.2 --> + <!-- measured 96%:889-1227 med:922 SLOW --> + <Limit name="measured-frame-rate-352x288" range="921-1045" /> <!-- N=50 v96%=1.2 --> + </MediaCodec> + <MediaCodec name="c2.android.mpeg4.decoder" type="video/mp4v-es" update="true"> + <!-- measured 90%:1298-1653 med:1316 SLOW N=12 --> + <Limit name="measured-frame-rate-176x144" range="1315-1465" /> <!-- v90%=1.1 --> + <Limit name="measured-frame-rate-480x360" range="501-752" /> + <Limit name="measured-frame-rate-1280x720" range="189-284" /> + </MediaCodec> + <MediaCodec name="c2.android.av1.decoder" type="video/av01" update="true"> + <Limit name="measured-frame-rate-352x288" range="323-351" /> + <Limit name="measured-frame-rate-640x360" range="180-185" /> + <Limit name="measured-frame-rate-720x480" range="113-114" /> + <Limit name="measured-frame-rate-1280x720" range="54-54" /> + </MediaCodec> + <MediaCodec name="c2.android.av1-dav1d.decoder" type="video/av01" update="true"> + <Limit name="measured-frame-rate-352x288" range="323-351" /> + <Limit name="measured-frame-rate-640x360" range="180-185" /> + <Limit name="measured-frame-rate-720x480" range="113-114" /> + <Limit name="measured-frame-rate-1280x720" range="54-54" /> + </MediaCodec> + </Decoders> + + <Encoders> + <!-- C2 HW encoders --> + <MediaCodec name="c2.qti.avc.encoder" type="video/avc" update="true"> + <Limit name="measured-frame-rate-320x240" range="210-390" /> + <Limit name="measured-frame-rate-720x480" range="180-280" /> + <Limit name="measured-frame-rate-1280x720" range="85-151" /> + <Limit name="measured-frame-rate-1920x1080" range="50-90" /> + </MediaCodec> + <MediaCodec name="c2.qti.hevc.encoder" type="video/hevc" update="true"> + <Limit name="measured-frame-rate-320x240" range="210-390" /><!-- Manual N=20 --> + <Limit name="measured-frame-rate-720x480" range="180-280" /><!-- Manual N=20 --> + <Limit name="measured-frame-rate-1280x720" range="85-151" /><!-- Manual N=20 --> + <Limit name="measured-frame-rate-1920x1080" range="50-90" /><!-- Manual N=20 --> + <Limit name="measured-frame-rate-3840x2160" range="18-30" /><!-- Manual N=20 --> + </MediaCodec> + <MediaCodec name="c2.qti.vp8.encoder" type="video/x-vnd.on2.vp8" update="true"> + <Limit name="measured-frame-rate-320x180" range="429-461" /><!-- Manual N=20 --> + <Limit name="measured-frame-rate-640x360" range="200-201" /><!-- Manual N=20 --> + <Limit name="measured-frame-rate-1280x720" range="102-121" /><!-- Manual N=20 --> + <Limit name="measured-frame-rate-1920x1080" range="18-41" /><!-- Manual N=20 --> + </MediaCodec> + <!-- C2 HW encoders with OMX aliases --> + <MediaCodec name="OMX.qcom.video.encoder.avc" type="video/avc" update="true"> + <Limit name="measured-frame-rate-320x240" range="106-234" /> + <Limit name="measured-frame-rate-720x480" range="64-140" /> + <Limit name="measured-frame-rate-1280x720" range="26-56" /> + <Limit name="measured-frame-rate-1920x1080" range="20-44" /> + </MediaCodec> + <MediaCodec name="OMX.qcom.video.encoder.hevc" type="video/hevc" update="true"> + <Limit name="measured-frame-rate-320x240" range="126-278" /> + <Limit name="measured-frame-rate-720x480" range="48-106" /> + <Limit name="measured-frame-rate-1280x720" range="19-41" /> + <Limit name="measured-frame-rate-1920x1080" range="17-37" /> + <Limit name="measured-frame-rate-3840x2160" range="11-25" /> + </MediaCodec> + <MediaCodec name="OMX.qcom.video.encoder.vp8" type="video/x-vnd.on2.vp8" update="true"> + <Limit name="measured-frame-rate-320x180" range="107-236" /> + <Limit name="measured-frame-rate-640x360" range="67-147" /> + <Limit name="measured-frame-rate-1280x720" range="21-46" /> + <Limit name="measured-frame-rate-1920x1080" range="18-41" /> + </MediaCodec> + + <!-- C2 SW encoders --> + <MediaCodec name="c2.android.h263.encoder" type="video/3gpp" update="true"> + <!-- measured 95%:144-637 med:343/343 FLAKY(mn=40.8 < 144 - 808 < mx=916.6) variance:2.1 --> + <Limit name="measured-frame-rate-176x144" range="287-459" /> <!-- TWEAKED N=224 --> + </MediaCodec> + <MediaCodec name="c2.android.avc.encoder" type="video/avc" update="true"> + <Limit name="measured-frame-rate-320x240" range="287-326" /> <!-- Manual N=20 --> + <Limit name="measured-frame-rate-720x480" range="122-124" /> <!-- Manual N=20 --> + <Limit name="measured-frame-rate-1280x720" range="76-80" /> <!-- Manual N=20 --> + <Limit name="measured-frame-rate-1920x1080" range="44-49" /> <!-- Manual N=20 --> + </MediaCodec> + <MediaCodec name="c2.android.hevc.encoder" type="video/hevc" update="true"> + <Limit name="measured-frame-rate-320x240" range="47-60" /> <!-- Manual N=20 --> + </MediaCodec> + <MediaCodec name="c2.android.mpeg4.encoder" type="video/mp4v-es" update="true"> + <!-- measured 90%:29-451 med:208/206 FLAKY(mn=19.2 < 47 - 412 < mx=888.9) RG.VARIANCE:2.5 --> + <Limit name="measured-frame-rate-176x144" range="203-445" /> <!-- SHOULDN'T HAVE TWEAKED N=220 v90%=4.0 --> + </MediaCodec> + <MediaCodec name="c2.android.vp8.encoder" type="video/x-vnd.on2.vp8" update="true"> + <Limit name="measured-frame-rate-320x180" range="178-245" /> <!-- Manual N=20 --> + <Limit name="measured-frame-rate-640x360" range="100-126" /> <!-- Manual N=20 --> + <Limit name="measured-frame-rate-1280x720" range="35-37" /> <!-- Manual N=20 --> + <Limit name="measured-frame-rate-1920x1080" range="24-31" /> <!-- Manual N=20 --> + </MediaCodec> + <MediaCodec name="c2.android.vp9.encoder" type="video/x-vnd.on2.vp9" update="true"> + <Limit name="measured-frame-rate-320x180" range="248-373" /> + <!-- measured 95%:54-67 med:61/61 N=36 --> + <Limit name="measured-frame-rate-640x360" range="61-61" /> <!-- v95%=1.1 --> + <!-- measured 95%:16-26 med:20/20 N=32 --> + <Limit name="measured-frame-rate-1280x720" range="20-20" /> <!-- v95%=1.3 --> + </MediaCodec> + <MediaCodec name="c2.android.av1.encoder" type="video/av01" update="true"> + <!-- measured 90%:225-240 med:237 N=4 --> + <Limit name="measured-frame-rate-320x240" range="232-232" /> <!-- v90%=1.0 --> + <!-- measured 90%:52-59 med:58 N=4 --> + <Limit name="measured-frame-rate-720x480" range="56-56" /> <!-- v90%=1.1 --> + <!-- measured 90%:21-26 med:25 N=4 --> + <Limit name="measured-frame-rate-1280x720" range="23-23" /> <!-- v90%=1.1 --> + </MediaCodec> + </Encoders> +</MediaCodecs> diff --git a/media_profiles.xml b/media_profiles.xml new file mode 100644 index 00000000..24f44751 --- /dev/null +++ b/media_profiles.xml @@ -0,0 +1,1650 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2012-2017 The Linux Foundation. All rights reserved. + Not a contribution. + 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> +<!ATTLIST EncoderProfile cameraId (0|1|2|3) #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|lpcm) #REQUIRED> +<!ATTLIST Audio bitRate CDATA #REQUIRED> +<!ATTLIST Audio sampleRate CDATA #REQUIRED> +<!ATTLIST Audio channels (1|2|6) #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> +<!ELEMENT EncoderOutputFileFormat EMPTY> +<!ATTLIST EncoderOutputFileFormat name (mp4|3gp) #REQUIRED> +<!ELEMENT VideoEncoderCap EMPTY> +<!ATTLIST VideoEncoderCap name (hevc|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> +<!ATTLIST VideoEncoderCap maxHFRFrameWidth CDATA #REQUIRED> +<!ATTLIST VideoEncoderCap maxHFRFrameHeight CDATA #REQUIRED> +<!ATTLIST VideoEncoderCap maxHFRMode CDATA #REQUIRED> +<!ELEMENT AudioEncoderCap EMPTY> +<!ATTLIST AudioEncoderCap name (amrnb|amrwb|aac|wma|lpcm) #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|6) #REQUIRED> +<!ATTLIST AudioEncoderCap maxChannels (1|2|6) #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> +<!ELEMENT VideoEditorCap EMPTY> +<!ATTLIST VideoEditorCap maxInputFrameWidth CDATA #REQUIRED> +<!ATTLIST VideoEditorCap maxInputFrameHeight CDATA #REQUIRED> +<!ATTLIST VideoEditorCap maxOutputFrameWidth CDATA #REQUIRED> +<!ATTLIST VideoEditorCap maxOutputFrameHeight CDATA #REQUIRED> +<!ATTLIST VideoEditorCap maxPrefetchYUVFrames CDATA #REQUIRED> +<!ELEMENT ExportVideoProfile EMPTY> +<!ATTLIST ExportVideoProfile name (h264|h263|m4v) #REQUIRED> +<!ATTLIST ExportVideoProfile profile CDATA #REQUIRED> +<!ATTLIST ExportVideoProfile level CDATA #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 --> + <!-- Back Camera --> + <CamcorderProfiles cameraId="0"> + + <EncoderProfile quality="low" fileFormat="3gp" duration="30"> + <Video codec="h264" + bitRate="192000" + width="176" + height="144" + frameRate="30" /> + + <Audio codec="amrnb" + bitRate="12200" + sampleRate="8000" + channels="1" /> + </EncoderProfile> + + <EncoderProfile quality="high" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="42000000" + width="3840" + height="2160" + frameRate="30" /> + + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="qvga" fileFormat="mp4" duration="60"> + <Video codec="h264" + bitRate="512000" + width="320" + height="240" + frameRate="30" /> + + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="cif" fileFormat="3gp" duration="30"> + <Video codec="h264" + bitRate="720000" + width="352" + height="288" + frameRate="30" /> + + <Audio codec="amrnb" + bitRate="12200" + sampleRate="8000" + channels="1" /> + </EncoderProfile> + + <EncoderProfile quality="480p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="2000000" + width="720" + height="480" + frameRate="30" /> + + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="720p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="14000000" + width="1280" + height="720" + frameRate="30" /> + + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="1080p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="20000000" + width="1920" + height="1080" + frameRate="30" /> + + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="qhd" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="42000000" + width="2560" + height="1440" + frameRate="30" /> + + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="2k" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="20000000" + width="2048" + height="1080" + frameRate="30" /> + + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="4kdci" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="42000000" + width="4096" + height="2160" + frameRate="24" /> + + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="2160p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="42000000" + width="3840" + height="2160" + frameRate="30" /> + + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="qcif" fileFormat="3gp" duration="30"> + <Video codec="h264" + bitRate="192000" + width="176" + height="144" + frameRate="30" /> + + <Audio codec="amrnb" + bitRate="12200" + sampleRate="8000" + channels="1" /> + </EncoderProfile> + + <EncoderProfile quality="vga" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="2000000" + width="640" + height="480" + frameRate="30" /> + + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="timelapselow" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="192000" + width="176" + height="144" + frameRate="30" /> + + <!-- audio setting is ignored --> + <Audio codec="amrnb" + bitRate="12200" + sampleRate="8000" + channels="1" /> + </EncoderProfile> + + <EncoderProfile quality="timelapsehigh" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="42000000" + width="3840" + height="2160" + frameRate="30" /> + + <!-- audio setting is ignored --> + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="192000" + width="176" + height="144" + frameRate="30" /> + + <!-- audio setting is ignored --> + <Audio codec="amrnb" + bitRate="12200" + sampleRate="8000" + channels="1" /> + </EncoderProfile> + + <EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="720000" + width="352" + height="288" + frameRate="30" /> + + <!-- audio setting is ignored --> + <Audio codec="amrnb" + bitRate="12200" + sampleRate="8000" + channels="1" /> + </EncoderProfile> + + + <EncoderProfile quality="timelapseqvga" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="512000" + width="320" + height="240" + frameRate="30" /> + + <!-- audio setting is ignored --> + <Audio codec="amrnb" + bitRate="12200" + sampleRate="8000" + channels="1" /> + </EncoderProfile> + + <EncoderProfile quality="timelapsevga" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="2000000" + width="640" + height="480" + frameRate="30" /> + + <!-- audio setting is ignored --> + <Audio codec="amrnb" + bitRate="12200" + sampleRate="8000" + channels="1" /> + </EncoderProfile> + + <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="2000000" + width="640" + height="480" + frameRate="30" /> + + <!-- audio setting is ignored --> + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="14000000" + width="1280" + height="720" + frameRate="30" /> + + <!-- audio setting is ignored --> + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="20000000" + width="1920" + height="1080" + frameRate="30" /> + + <!-- audio setting is ignored --> + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="timelapseqhd" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="42000000" + width="2560" + height="1440" + frameRate="30" /> + + <!-- audio setting is ignored --> + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="timelapse2k" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="20000000" + width="2048" + height="1080" + frameRate="30" /> + + <!-- audio setting is ignored --> + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="timelapse4kdci" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="42000000" + width="4096" + height="2160" + frameRate="30" /> + + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="timelapse2160p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="42000000" + width="3840" + height="2160" + frameRate="30" /> + + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <ImageEncoding quality="95" /> + <ImageEncoding quality="80" /> + <ImageEncoding quality="70" /> + <ImageDecoding memCap="20000000" /> + + </CamcorderProfiles> + <!-- Front Camera --> + <CamcorderProfiles cameraId="1"> + + <EncoderProfile quality="low" fileFormat="3gp" duration="30"> + <Video codec="h264" + bitRate="192000" + width="176" + height="144" + frameRate="30" /> + + <Audio codec="amrnb" + bitRate="12200" + sampleRate="8000" + channels="1" /> + </EncoderProfile> + + <EncoderProfile quality="high" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="20000000" + width="1920" + height="1080" + frameRate="30" /> + + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="qvga" fileFormat="mp4" duration="60"> + <Video codec="h264" + bitRate="512000" + width="320" + height="240" + frameRate="30" /> + + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="cif" fileFormat="3gp" duration="30"> + <Video codec="h264" + bitRate="720000" + width="352" + height="288" + frameRate="30" /> + + <Audio codec="amrnb" + bitRate="12200" + sampleRate="8000" + channels="1" /> + </EncoderProfile> + + <EncoderProfile quality="480p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="2000000" + width="720" + height="480" + frameRate="30" /> + + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="720p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="14000000" + width="1280" + height="720" + frameRate="30" /> + + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="1080p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="20000000" + width="1920" + height="1080" + frameRate="30" /> + + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="qcif" fileFormat="3gp" duration="30"> + <Video codec="h264" + bitRate="192000" + width="176" + height="144" + frameRate="30" /> + + <Audio codec="amrnb" + bitRate="12200" + sampleRate="8000" + channels="1" /> + </EncoderProfile> + + <EncoderProfile quality="vga" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="2000000" + width="640" + height="480" + frameRate="30" /> + + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <!-- TIMELAPSE profiles for front camera --> + <EncoderProfile quality="timelapselow" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="192000" + width="176" + height="144" + frameRate="30" /> + + <!-- audio setting is ignored --> + <Audio codec="amrnb" + bitRate="12200" + sampleRate="8000" + channels="1" /> + </EncoderProfile> + + <EncoderProfile quality="timelapsehigh" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="20000000" + width="1920" + height="1080" + frameRate="30" /> + + <!-- audio setting is ignored --> + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="192000" + width="176" + height="144" + frameRate="30" /> + + <!-- audio setting is ignored --> + <Audio codec="amrnb" + bitRate="12200" + sampleRate="8000" + channels="1" /> + </EncoderProfile> + + <EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="1200000" + width="352" + height="288" + frameRate="30" /> + + <!-- audio setting is ignored --> + <Audio codec="aac" + bitRate="96000" + sampleRate="48000" + channels="1" /> + </EncoderProfile> + + <EncoderProfile quality="timelapseqvga" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="512000" + width="320" + height="240" + frameRate="30" /> + + <!-- audio setting is ignored --> + <Audio codec="amrnb" + bitRate="12200" + sampleRate="8000" + channels="1" /> + </EncoderProfile> + + <EncoderProfile quality="timelapsevga" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="2000000" + width="640" + height="480" + frameRate="30" /> + + <!-- audio setting is ignored --> + <Audio codec="amrnb" + bitRate="12200" + sampleRate="8000" + channels="1" /> + </EncoderProfile> + + <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="5000000" + width="720" + height="480" + frameRate="30" /> + + <!-- audio setting is ignored --> + <Audio codec="aac" + bitRate="96000" + sampleRate="48000" + channels="1" /> + </EncoderProfile> + + <EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="8000000" + width="1280" + height="720" + frameRate="30" /> + + <!-- audio setting is ignored --> + <Audio codec="aac" + bitRate="96000" + sampleRate="48000" + channels="1" /> + </EncoderProfile> + + <EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="20000000" + width="1920" + height="1080" + frameRate="30" /> + + <!-- audio setting is ignored --> + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <ImageEncoding quality="95" /> + <ImageEncoding quality="80" /> + <ImageEncoding quality="70" /> + <ImageDecoding memCap="20000000" /> + + </CamcorderProfiles> + <!-- Camera ID 2 --> + <CamcorderProfiles cameraId="2"> + + <EncoderProfile quality="low" fileFormat="3gp" duration="30"> + <Video codec="h264" + bitRate="192000" + width="176" + height="144" + frameRate="30" /> + + <Audio codec="amrnb" + bitRate="12200" + sampleRate="8000" + channels="1" /> + </EncoderProfile> + + <EncoderProfile quality="high" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="42000000" + width="3840" + height="2160" + frameRate="30" /> + + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="qvga" fileFormat="mp4" duration="60"> + <Video codec="h264" + bitRate="512000" + width="320" + height="240" + frameRate="30" /> + + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="cif" fileFormat="3gp" duration="30"> + <Video codec="h264" + bitRate="720000" + width="352" + height="288" + frameRate="30" /> + + <Audio codec="amrnb" + bitRate="12200" + sampleRate="8000" + channels="1" /> + </EncoderProfile> + + <EncoderProfile quality="480p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="2000000" + width="720" + height="480" + frameRate="30" /> + + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="720p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="14000000" + width="1280" + height="720" + frameRate="30" /> + + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="1080p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="20000000" + width="1920" + height="1080" + frameRate="30" /> + + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="qhd" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="42000000" + width="2560" + height="1440" + frameRate="30" /> + + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="2k" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="20000000" + width="2048" + height="1080" + frameRate="30" /> + + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="4kdci" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="42000000" + width="4096" + height="2160" + frameRate="24" /> + + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="2160p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="42000000" + width="3840" + height="2160" + frameRate="30" /> + + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="qcif" fileFormat="3gp" duration="30"> + <Video codec="h264" + bitRate="192000" + width="176" + height="144" + frameRate="30" /> + + <Audio codec="amrnb" + bitRate="12200" + sampleRate="8000" + channels="1" /> + </EncoderProfile> + + <EncoderProfile quality="vga" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="2000000" + width="640" + height="480" + frameRate="30" /> + + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="timelapselow" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="192000" + width="176" + height="144" + frameRate="30" /> + + <!-- audio setting is ignored --> + <Audio codec="amrnb" + bitRate="12200" + sampleRate="8000" + channels="1" /> + </EncoderProfile> + + <EncoderProfile quality="timelapsehigh" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="42000000" + width="3840" + height="2160" + frameRate="30" /> + + <!-- audio setting is ignored --> + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="192000" + width="176" + height="144" + frameRate="30" /> + + <!-- audio setting is ignored --> + <Audio codec="amrnb" + bitRate="12200" + sampleRate="8000" + channels="1" /> + </EncoderProfile> + + <EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="720000" + width="352" + height="288" + frameRate="30" /> + + <!-- audio setting is ignored --> + <Audio codec="amrnb" + bitRate="12200" + sampleRate="8000" + channels="1" /> + </EncoderProfile> + + + <EncoderProfile quality="timelapseqvga" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="512000" + width="320" + height="240" + frameRate="30" /> + + <!-- audio setting is ignored --> + <Audio codec="amrnb" + bitRate="12200" + sampleRate="8000" + channels="1" /> + </EncoderProfile> + + <EncoderProfile quality="timelapsevga" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="2000000" + width="640" + height="480" + frameRate="30" /> + + <!-- audio setting is ignored --> + <Audio codec="amrnb" + bitRate="12200" + sampleRate="8000" + channels="1" /> + </EncoderProfile> + + <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="2000000" + width="640" + height="480" + frameRate="30" /> + + <!-- audio setting is ignored --> + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="14000000" + width="1280" + height="720" + frameRate="30" /> + + <!-- audio setting is ignored --> + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="20000000" + width="1920" + height="1080" + frameRate="30" /> + + <!-- audio setting is ignored --> + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="timelapseqhd" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="42000000" + width="2560" + height="1440" + frameRate="30" /> + + <!-- audio setting is ignored --> + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="timelapse2k" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="20000000" + width="2048" + height="1080" + frameRate="30" /> + + <!-- audio setting is ignored --> + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="timelapse4kdci" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="42000000" + width="4096" + height="2160" + frameRate="30" /> + + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="timelapse2160p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="42000000" + width="3840" + height="2160" + frameRate="30" /> + + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="highspeed1080p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="42000000" + width="1920" + height="1080" + frameRate="120" /> + + <!-- audio setting is ignored --> + <Audio codec="aac" + bitRate="96000" + sampleRate="48000" + channels="1" /> + </EncoderProfile> + + <EncoderProfile quality="highspeedhigh" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="24000000" + width="1280" + height="720" + frameRate="240" /> + + <!-- audio setting is ignored --> + <Audio codec="aac" + bitRate="96000" + sampleRate="48000" + channels="1" /> + </EncoderProfile> + + <EncoderProfile quality="highspeed720p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="24000000" + width="1280" + height="720" + frameRate="240" /> + + <!-- audio setting is ignored --> + <Audio codec="aac" + bitRate="96000" + sampleRate="48000" + channels="1" /> + </EncoderProfile> + + <EncoderProfile quality="highspeed480p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="12000000" + width="640" + height="480" + frameRate="240" /> + + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <ImageEncoding quality="95" /> + <ImageEncoding quality="80" /> + <ImageEncoding quality="70" /> + <ImageDecoding memCap="20000000" /> + + </CamcorderProfiles> + + <CamcorderProfiles cameraId="3"> + + <EncoderProfile quality="low" fileFormat="3gp" duration="30"> + <Video codec="h264" + bitRate="192000" + width="176" + height="144" + frameRate="30" /> + + <Audio codec="amrnb" + bitRate="12200" + sampleRate="8000" + channels="1" /> + </EncoderProfile> + + <EncoderProfile quality="high" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="42000000" + width="3840" + height="2160" + frameRate="30" /> + + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="qvga" fileFormat="mp4" duration="60"> + <Video codec="h264" + bitRate="512000" + width="320" + height="240" + frameRate="30" /> + + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="cif" fileFormat="3gp" duration="30"> + <Video codec="h264" + bitRate="720000" + width="352" + height="288" + frameRate="30" /> + + <Audio codec="amrnb" + bitRate="12200" + sampleRate="8000" + channels="1" /> + </EncoderProfile> + + <EncoderProfile quality="480p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="2000000" + width="720" + height="480" + frameRate="30" /> + + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="720p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="14000000" + width="1280" + height="720" + frameRate="30" /> + + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="1080p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="20000000" + width="1920" + height="1080" + frameRate="30" /> + + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="qhd" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="42000000" + width="2560" + height="1440" + frameRate="30" /> + + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="2k" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="20000000" + width="2048" + height="1080" + frameRate="30" /> + + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="4kdci" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="42000000" + width="4096" + height="2160" + frameRate="24" /> + + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="2160p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="42000000" + width="3840" + height="2160" + frameRate="30" /> + + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="qcif" fileFormat="3gp" duration="30"> + <Video codec="h264" + bitRate="192000" + width="176" + height="144" + frameRate="30" /> + + <Audio codec="amrnb" + bitRate="12200" + sampleRate="8000" + channels="1" /> + </EncoderProfile> + + <EncoderProfile quality="vga" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="2000000" + width="640" + height="480" + frameRate="30" /> + + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="timelapselow" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="192000" + width="176" + height="144" + frameRate="30" /> + + <!-- audio setting is ignored --> + <Audio codec="amrnb" + bitRate="12200" + sampleRate="8000" + channels="1" /> + </EncoderProfile> + + <EncoderProfile quality="timelapsehigh" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="42000000" + width="3840" + height="2160" + frameRate="30" /> + + <!-- audio setting is ignored --> + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="192000" + width="176" + height="144" + frameRate="30" /> + + <!-- audio setting is ignored --> + <Audio codec="amrnb" + bitRate="12200" + sampleRate="8000" + channels="1" /> + </EncoderProfile> + + <EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="720000" + width="352" + height="288" + frameRate="30" /> + + <!-- audio setting is ignored --> + <Audio codec="amrnb" + bitRate="12200" + sampleRate="8000" + channels="1" /> + </EncoderProfile> + + + <EncoderProfile quality="timelapseqvga" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="512000" + width="320" + height="240" + frameRate="30" /> + + <!-- audio setting is ignored --> + <Audio codec="amrnb" + bitRate="12200" + sampleRate="8000" + channels="1" /> + </EncoderProfile> + + <EncoderProfile quality="timelapsevga" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="2000000" + width="640" + height="480" + frameRate="30" /> + + <!-- audio setting is ignored --> + <Audio codec="amrnb" + bitRate="12200" + sampleRate="8000" + channels="1" /> + </EncoderProfile> + + <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="2000000" + width="640" + height="480" + frameRate="30" /> + + <!-- audio setting is ignored --> + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="14000000" + width="1280" + height="720" + frameRate="30" /> + + <!-- audio setting is ignored --> + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="20000000" + width="1920" + height="1080" + frameRate="30" /> + + <!-- audio setting is ignored --> + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="timelapseqhd" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="42000000" + width="2560" + height="1440" + frameRate="30" /> + + <!-- audio setting is ignored --> + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="timelapse2k" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="20000000" + width="2048" + height="1080" + frameRate="30" /> + + <!-- audio setting is ignored --> + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="timelapse4kdci" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="42000000" + width="4096" + height="2160" + frameRate="30" /> + + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="timelapse2160p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="42000000" + width="3840" + height="2160" + frameRate="30" /> + + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <EncoderProfile quality="highspeed1080p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="42000000" + width="1920" + height="1080" + frameRate="120" /> + + <!-- audio setting is ignored --> + <Audio codec="aac" + bitRate="96000" + sampleRate="48000" + channels="1" /> + </EncoderProfile> + + <EncoderProfile quality="highspeedhigh" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="24000000" + width="1280" + height="720" + frameRate="240" /> + + <!-- audio setting is ignored --> + <Audio codec="aac" + bitRate="96000" + sampleRate="48000" + channels="1" /> + </EncoderProfile> + + <EncoderProfile quality="highspeed720p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="24000000" + width="1280" + height="720" + frameRate="240" /> + + <!-- audio setting is ignored --> + <Audio codec="aac" + bitRate="96000" + sampleRate="48000" + channels="1" /> + </EncoderProfile> + + <EncoderProfile quality="highspeed480p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="12000000" + width="640" + height="480" + frameRate="240" /> + + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <ImageEncoding quality="95" /> + <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 + --> + <VideoEncoderCap name="h264" enabled="true" + minBitRate="64000" maxBitRate="42000000" + minFrameWidth="176" maxFrameWidth="4096" + minFrameHeight="144" maxFrameHeight="2160" + minFrameRate="15" maxFrameRate="30" + maxHFRFrameWidth="1920" maxHFRFrameHeight="1080" + maxHFRMode="120" /> + + <VideoEncoderCap name="h263" enabled="true" + minBitRate="64000" maxBitRate="2000000" + minFrameWidth="176" maxFrameWidth="800" + minFrameHeight="144" maxFrameHeight="480" + minFrameRate="15" maxFrameRate="30" + maxHFRFrameWidth="0" maxHFRFrameHeight="0" + maxHFRMode="0" /> + + <VideoEncoderCap name="m4v" enabled="true" + minBitRate="64000" maxBitRate="20000000" + minFrameWidth="176" maxFrameWidth="1920" + minFrameHeight="144" maxFrameHeight="1088" + minFrameRate="15" maxFrameRate="30" + maxHFRFrameWidth="0" maxHFRFrameHeight="0" + maxHFRMode="0" /> + + <VideoEncoderCap name="hevc" enabled="true" + minBitRate="64000" maxBitRate="100000000" + minFrameWidth="176" maxFrameWidth="4096" + minFrameHeight="144" maxFrameHeight="2160" + minFrameRate="15" maxFrameRate="30" + maxHFRFrameWidth="0" maxHFRFrameHeight="0" + maxHFRMode="0" /> + + <AudioEncoderCap name="aac" enabled="true" + minBitRate="8000" maxBitRate="96000" + minSampleRate="8000" maxSampleRate="48000" + minChannels="1" maxChannels="6" /> + + <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="23850" + 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" /> + + <AudioEncoderCap name="lpcm" enabled="true" + minBitRate="768000" maxBitRate="4608000" + minSampleRate="8000" maxSampleRate="48000" + minChannels="1" maxChannels="6" /> + + <!-- + 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="true"/> + <AudioDecoderCap name="wma" enabled="true"/> + + <!-- + The VideoEditor Capability configuration: + - maxInputFrameWidth: maximum video width of imported video clip. + - maxInputFrameHeight: maximum video height of imported video clip. + - maxOutputFrameWidth: maximum video width of exported video clip. + - maxOutputFrameHeight: maximum video height of exported video clip. + - maxPrefetchYUVFrames: maximum prefetch YUV frames for encoder, + used to limit the amount of memory for prefetched YUV frames. + For this platform, it allows maximum 30MB(3MB per 1080p frame x 10 + frames) memory. + --> + <VideoEditorCap maxInputFrameWidth="1920" + maxInputFrameHeight="1088" maxOutputFrameWidth="1920" + maxOutputFrameHeight="1088" maxPrefetchYUVFrames="10"/> + <!-- + The VideoEditor Export codec profile and level values + correspond to the values in OMX_Video.h. + E.g. for h264, profile value 1 means OMX_VIDEO_AVCProfileBaseline + and level 4096 means OMX_VIDEO_AVCLevel41. + Please note that the values are in decimal. + These values are for video encoder. + --> + <!-- + Codec = h.264, Baseline profile, level 4.0 + --> + <ExportVideoProfile name="h264" profile= "1" level="2048"/> + <!-- + Codec = h.263, Baseline profile, level 70 + --> + <ExportVideoProfile name="h263" profile= "1" level="128"/> + <!-- + Codec = mpeg4, Simple profile, level 5 + --> + <ExportVideoProfile name="m4v" profile= "1" level="128"/> +</MediaSettings> diff --git a/media_profiles_V1_0.xml b/media_profiles_V1_0.xml new file mode 100644 index 00000000..94dfd78e --- /dev/null +++ b/media_profiles_V1_0.xml @@ -0,0 +1,528 @@ +<?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. +--> +<!DOCTYPE MediaSettings SYSTEM "/system/etc/media_profiles_V1_0.dtd"> +<!-- + This file is used to declare the multimedia profiles and capabilities + on an android-powered device. +--> +<MediaSettings> + <!-- ****************************************************************** --> + <!-- camera id = 0 : logical dual rear cameras (wide is 2, tele is 3) --> + <!-- ****************************************************************** --> + <CamcorderProfiles cameraId="0"> + + <!-- low: 176 x 144 30fps --> + <EncoderProfile quality="low" fileFormat="3gp" duration="60"> + <Video codec="h264" + bitRate="128000" + width="176" + height="144" + frameRate="30" /> + <Audio codec="amrnb" + bitRate="12200" + sampleRate="8000" + channels="1" /> + </EncoderProfile> + + <!-- high: 3840 x 2160 60fps 72.0 Mbps --> + <EncoderProfile quality="high" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="72000000" + width="3840" + height="2160" + frameRate="60" /> + <Audio codec="aac" + bitRate="96000" + sampleRate="48000" + channels="1" /> + </EncoderProfile> + + <!-- qcif: 176 x 144 30fps --> + <EncoderProfile quality="qcif" fileFormat="3gp" duration="60"> + <Video codec="h264" + bitRate="128000" + width="176" + height="144" + frameRate="30" /> + <Audio codec="amrnb" + bitRate="12200" + sampleRate="8000" + channels="1" /> + </EncoderProfile> + + <!-- qvga: 320 x 240 30fps --> + <EncoderProfile quality="qvga" fileFormat="mp4" duration="60"> + <Video codec="h264" + bitRate="512000" + width="320" + height="240" + frameRate="30" /> + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <!-- cif: 352 x 288 30fps --> + <EncoderProfile quality="cif" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="1200000" + width="352" + height="288" + frameRate="30" /> + <Audio codec="aac" + bitRate="96000" + sampleRate="48000" + channels="1" /> + </EncoderProfile> + + <!-- 480p: 720 x 480 30fps --> + <EncoderProfile quality="480p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="6000000" + width="720" + height="480" + frameRate="30" /> + <Audio codec="aac" + bitRate="96000" + sampleRate="48000" + channels="1" /> + </EncoderProfile> + + <!-- 720p: 1280 x 720 60fps --> + <EncoderProfile quality="720p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="18000000" + width="1280" + height="720" + frameRate="60" /> + <Audio codec="aac" + bitRate="96000" + sampleRate="48000" + channels="1" /> + </EncoderProfile> + + <!-- 1080p: 1920 x 1080 60fps --> + <EncoderProfile quality="1080p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="33000000" + width="1920" + height="1080" + frameRate="60" /> + <Audio codec="aac" + bitRate="96000" + sampleRate="48000" + channels="1" /> + </EncoderProfile> + + <!-- 2160p: 3840 x 2160 60fps 72.0 Mbps --> + <EncoderProfile quality="2160p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="72000000" + width="3840" + height="2160" + frameRate="60" /> + <Audio codec="aac" + bitRate="96000" + sampleRate="48000" + channels="1" /> + </EncoderProfile> + + <!-- timelapse_qcif: 176 x 144 30fps --> + <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="192000" + width="176" + height="144" + frameRate="30" /> + <!-- audio setting is ignored --> + <Audio codec="amrnb" + bitRate="12200" + sampleRate="8000" + channels="1" /> + </EncoderProfile> + + <!-- timelapse_cif: 352 x 288 30fps --> + <EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="1200000" + width="352" + height="288" + frameRate="30" /> + <!-- audio setting is ignored --> + <Audio codec="aac" + bitRate="96000" + sampleRate="48000" + channels="1" /> + </EncoderProfile> + + <!-- timelapse_480p: 720 x 480 30fps --> + <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="6000000" + width="720" + height="480" + frameRate="30" /> + <!-- audio setting is ignored --> + <Audio codec="aac" + bitRate="96000" + sampleRate="48000" + channels="1" /> + </EncoderProfile> + + <!-- timelapse_720p: 1280 x 720 30fps --> + <EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="12000000" + width="1280" + height="720" + frameRate="30" /> + <!-- audio setting is ignored --> + <Audio codec="aac" + bitRate="96000" + sampleRate="48000" + channels="1" /> + </EncoderProfile> + + <!-- timelapse_1080p: 1920 x 1080 30fps --> + <EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="17000000" + width="1920" + height="1080" + frameRate="30" /> + <!-- audio setting is ignored --> + <Audio codec="aac" + bitRate="96000" + sampleRate="48000" + channels="1" /> + </EncoderProfile> + + <!-- timelapse_2160p: 3840 x 2160 30fps --> + <EncoderProfile quality="timelapse2160p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="42000000" + width="3840" + height="2160" + frameRate="30" /> + <!-- audio setting is ignored --> + <Audio codec="aac" + bitRate="96000" + sampleRate="48000" + channels="1" /> + </EncoderProfile> + + <!-- highspeed_low: 1280 x 720 240fps 42.0 Mbps --> + <EncoderProfile quality="highspeedlow" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="42000000" + width="1280" + height="720" + frameRate="240" /> + <!-- audio setting is ignored --> + <Audio codec="aac" + bitRate="96000" + sampleRate="48000" + channels="1" /> + </EncoderProfile> + + <!-- highspeed_high: 1920 x 1080 120fps 42.0 Mbps --> + <EncoderProfile quality="highspeedhigh" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="42000000" + width="1920" + height="1080" + frameRate="120" /> + <!-- audio setting is ignored --> + <Audio codec="aac" + bitRate="96000" + sampleRate="48000" + channels="1" /> + </EncoderProfile> + + <!-- highspeed720p: 1280 x 720 240fps 42.0 Mbps --> + <EncoderProfile quality="highspeed720p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="42000000" + width="1280" + height="720" + frameRate="240" /> + <!-- audio setting is ignored --> + <Audio codec="aac" + bitRate="96000" + sampleRate="48000" + channels="1" /> + </EncoderProfile> + + <!-- highspeed_1080p: 1920 x 1080 120fps 42.0 Mbps --> + <EncoderProfile quality="highspeed1080p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="42000000" + width="1920" + height="1080" + frameRate="120" /> + <!-- audio setting is ignored --> + <Audio codec="aac" + bitRate="96000" + sampleRate="48000" + channels="1" /> + </EncoderProfile> + + <ImageEncoding quality="95" /> + <ImageEncoding quality="80" /> + <ImageEncoding quality="70" /> + <ImageDecoding memCap="20000000" /> + </CamcorderProfiles> + + <!-- ****************************************************************** --> + <!-- camera id = 1 : front RGBD cameras --> + <!-- ****************************************************************** --> + <CamcorderProfiles cameraId="1"> + + <!-- low: 176 x 144 30fps --> + <EncoderProfile quality="low" fileFormat="3gp" duration="60"> + <Video codec="h264" + bitRate="128000" + width="176" + height="144" + frameRate="30" /> + <Audio codec="amrnb" + bitRate="12200" + sampleRate="8000" + channels="1" /> + </EncoderProfile> + + <!-- high: 1920 x 1080 30fps --> + <EncoderProfile quality="high" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="22000000" + width="1920" + height="1080" + frameRate="30" /> + <Audio codec="aac" + bitRate="96000" + sampleRate="48000" + channels="1" /> + </EncoderProfile> + + <!-- qcif: 176 x 144 30fps --> + <EncoderProfile quality="qcif" fileFormat="3gp" duration="60"> + <Video codec="h264" + bitRate="128000" + width="176" + height="144" + frameRate="30" /> + <Audio codec="amrnb" + bitRate="12200" + sampleRate="8000" + channels="1" /> + </EncoderProfile> + + <!-- qvga: 320 x 240 30fps --> + <EncoderProfile quality="qvga" fileFormat="mp4" duration="60"> + <Video codec="h264" + bitRate="512000" + width="320" + height="240" + frameRate="30" /> + <Audio codec="aac" + bitRate="156000" + sampleRate="48000" + channels="2" /> + </EncoderProfile> + + <!-- cif: 352 x 288 30fps --> + <EncoderProfile quality="cif" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="1200000" + width="352" + height="288" + frameRate="30" /> + <Audio codec="aac" + bitRate="96000" + sampleRate="48000" + channels="1" /> + </EncoderProfile> + + <!-- 480p: 720 x 480 30fps --> + <EncoderProfile quality="480p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="6000000" + width="720" + height="480" + frameRate="30" /> + <Audio codec="aac" + bitRate="96000" + sampleRate="48000" + channels="1" /> + </EncoderProfile> + + <!-- 720p: 1280 x 720 30fps --> + <EncoderProfile quality="720p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="12000000" + width="1280" + height="720" + frameRate="30" /> + <Audio codec="aac" + bitRate="96000" + sampleRate="48000" + channels="1" /> + </EncoderProfile> + + <!-- 1080p: 1920 x 1080 30fps --> + <EncoderProfile quality="1080p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="22000000" + width="1920" + height="1080" + frameRate="30" /> + <Audio codec="aac" + bitRate="96000" + sampleRate="48000" + channels="1" /> + </EncoderProfile> + + <!-- timelapse_qcif: 176 x 144 30fps --> + <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="192000" + width="176" + height="144" + frameRate="30" /> + <!-- audio setting is ignored --> + <Audio codec="amrnb" + bitRate="12200" + sampleRate="8000" + channels="1" /> + </EncoderProfile> + + <!-- timelapse_cif: 352 x 288 30fps --> + <EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="1200000" + width="352" + height="288" + frameRate="30" /> + <!-- audio setting is ignored --> + <Audio codec="aac" + bitRate="96000" + sampleRate="48000" + channels="1" /> + </EncoderProfile> + + <!-- timelapse_480p: 720 x 480 30fps --> + <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="6000000" + width="720" + height="480" + frameRate="30" /> + <!-- audio setting is ignored --> + <Audio codec="aac" + bitRate="96000" + sampleRate="48000" + channels="1" /> + </EncoderProfile> + + <!-- timelapse_720p: 1280 x 720 30fps --> + <EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30"> + <Video codec="h264" + bitRate="12000000" + width="1280" + height="720" + frameRate="30" /> + <!-- audio setting is ignored --> + <Audio codec="aac" + bitRate="96000" + sampleRate="48000" + channels="1" /> + </EncoderProfile> + + <ImageEncoding quality="95" /> + <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 + --> + <VideoEncoderCap name="hevc" enabled="true" + minBitRate="64000" maxBitRate="100000000" + minFrameWidth="176" maxFrameWidth="3840" + minFrameHeight="144" maxFrameHeight="2160" + minFrameRate="15" maxFrameRate="30" /> + + <VideoEncoderCap name="h264" enabled="true" + minBitRate="64000" maxBitRate="100000000" + minFrameWidth="176" maxFrameWidth="3840" + minFrameHeight="144" maxFrameHeight="2160" + minFrameRate="15" maxFrameRate="30" /> + + <VideoEncoderCap name="h263" enabled="true" + minBitRate="64000" maxBitRate="2000000" + minFrameWidth="176" maxFrameWidth="800" + minFrameHeight="144" maxFrameHeight="480" + minFrameRate="15" maxFrameRate="30" /> + + <VideoEncoderCap name="m4v" enabled="true" + minBitRate="64000" maxBitRate="40000000" + minFrameWidth="176" maxFrameWidth="1920" + minFrameHeight="144" maxFrameHeight="1080" + minFrameRate="15" maxFrameRate="30" /> + + <AudioEncoderCap name="aac" enabled="true" + minBitRate="758" maxBitRate="288000" + minSampleRate="8000" maxSampleRate="48000" + minChannels="1" maxChannels="2" /> + + <AudioEncoderCap name="heaac" enabled="true" + minBitRate="8000" maxBitRate="64000" + minSampleRate="16000" maxSampleRate="48000" + minChannels="1" maxChannels="2" /> + + <AudioEncoderCap name="aaceld" enabled="true" + minBitRate="16000" maxBitRate="192000" + minSampleRate="16000" maxSampleRate="48000" + minChannels="1" maxChannels="2" /> + + <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> diff --git a/modules.blocklist b/modules.blocklist new file mode 100644 index 00000000..8b1a1515 --- /dev/null +++ b/modules.blocklist @@ -0,0 +1,4 @@ +# List of sub-device specific modules to not load automatically +blocklist ftm5.ko +blocklist sec_touch.ko +blocklist incrementalfs.ko diff --git a/modules.load b/modules.load new file mode 100644 index 00000000..b116d1f2 --- /dev/null +++ b/modules.load @@ -0,0 +1,329 @@ +kernel/kernel/trace/msm_ipc_logging.ko +kernel/kernel/kheaders.ko +kernel/fs/incfs/incrementalfs.ko +kernel/drivers/irqchip/qcom-pdc.ko +kernel/drivers/phy/qualcomm/phy-qcom-ufs.ko +kernel/drivers/phy/qualcomm/phy-qcom-ufs-qrbtc-sdm845.ko +kernel/drivers/phy/qualcomm/phy-qcom-ufs-qmp-v4.ko +kernel/drivers/phy/qualcomm/phy-qcom-ufs-qmp-v4-lito.ko +kernel/drivers/phy/qualcomm/phy-qcom-ufs-qmp-v3-660.ko +kernel/drivers/phy/qualcomm/phy-qcom-ufs-qmp-v3.ko +kernel/drivers/pinctrl/qcom/pinctrl-msm.ko +kernel/drivers/pinctrl/qcom/pinctrl-spmi-gpio.ko +kernel/drivers/pinctrl/qcom/pinctrl-spmi-mpp.ko +kernel/drivers/pinctrl/qcom/pinctrl-lito.ko +kernel/drivers/pwm/pwm-qti-lpg.ko +kernel/drivers/video/backlight/lcd.ko +kernel/drivers/video/backlight/qcom-spmi-wled.ko +kernel/drivers/clk/qcom/clk-qcom.ko +kernel/drivers/clk/qcom/clk-aop-qmp.ko +kernel/drivers/clk/qcom/clk-rpmh.ko +kernel/drivers/clk/qcom/camcc-lito.ko +kernel/drivers/clk/qcom/debugcc-lito.ko +kernel/drivers/clk/qcom/dispcc-lito.ko +kernel/drivers/clk/qcom/gcc-lito.ko +kernel/drivers/clk/qcom/gpucc-lito.ko +kernel/drivers/clk/qcom/npucc-lito.ko +kernel/drivers/clk/qcom/videocc-lito.ko +kernel/drivers/clk/qcom/clk-spmi-pmic-div.ko +kernel/drivers/dma/qcom/gpi.ko +kernel/drivers/dma/virt-dma.ko +kernel/drivers/soc/qcom/cmd-db.ko +kernel/drivers/soc/qcom/mdt_loader.ko +kernel/drivers/soc/qcom/qmi_helpers.ko +kernel/drivers/soc/qcom/qcom_rpmh.ko +kernel/drivers/soc/qcom/smem.ko +kernel/drivers/soc/qcom/smem_state.ko +kernel/drivers/soc/qcom/smp2p.ko +kernel/drivers/soc/qcom/qcom_ipcc.ko +kernel/drivers/soc/qcom/llcc-slice.ko +kernel/drivers/soc/qcom/llcc-lito.ko +kernel/drivers/soc/qcom/llcc-orchid.ko +kernel/drivers/soc/qcom/llcc_perfmon.ko +kernel/drivers/soc/qcom/secure_buffer.ko +kernel/drivers/soc/qcom/qtee_shm_bridge.ko +kernel/drivers/soc/qcom/early_random.ko +kernel/drivers/soc/qcom/core_hang_detect.ko +kernel/drivers/soc/qcom/gladiator_hang_detect.ko +kernel/drivers/soc/qcom/msm_minidump.ko +kernel/drivers/soc/qcom/minidump_log.ko +kernel/drivers/soc/qcom/memory_dump_v2.ko +kernel/drivers/soc/qcom/dcc_v2.ko +kernel/drivers/soc/qcom/service-notifier.ko +kernel/drivers/soc/qcom/service-locator.ko +kernel/drivers/soc/qcom/subsys-pil-tz.ko +kernel/drivers/soc/qcom/memshare/heap_mem_ext_v01.ko +kernel/drivers/soc/qcom/memshare/msm_memshare.ko +kernel/drivers/soc/qcom/peripheral-loader.ko +kernel/drivers/soc/qcom/qdsp6v2/cdsp-loader.ko +kernel/drivers/soc/qcom/jtagv8.ko +kernel/drivers/soc/qcom/jtagv8-etm.ko +kernel/drivers/soc/qcom/smcinvoke.ko +kernel/drivers/soc/qcom/rq_stats.ko +kernel/drivers/soc/qcom/subsystem_notif.ko +kernel/drivers/soc/qcom/subsystem-restart.ko +kernel/drivers/soc/qcom/ramdump.ko +kernel/drivers/soc/qcom/microdump_collector.ko +kernel/drivers/soc/qcom/eud.ko +kernel/drivers/soc/qcom/qcom_socinfo.ko +kernel/drivers/soc/qcom/watchdog_v2.ko +kernel/drivers/soc/qcom/msm_bus/msm_bus.ko +kernel/drivers/soc/qcom/msm_bus/msm_bus_rpmh.ko +kernel/drivers/soc/qcom/fsa4480-i2c.ko +kernel/drivers/soc/qcom/glink_probe.ko +kernel/drivers/soc/qcom/glink_pkt.ko +kernel/drivers/soc/qcom/smp2p_sleepstate.ko +kernel/drivers/soc/qcom/system_pm.ko +kernel/drivers/soc/qcom/event_timer.ko +kernel/drivers/soc/qcom/lpm-stats.ko +kernel/drivers/soc/qcom/rpmh_master_stat.ko +kernel/drivers/soc/qcom/rpm_stats.ko +kernel/drivers/soc/qcom/ddr_stats.ko +kernel/drivers/soc/qcom/cdsprm.ko +kernel/drivers/soc/qcom/msm_icnss.ko +kernel/drivers/soc/qcom/modemsmem/modemsmem.ko +kernel/drivers/regulator/qpnp-amoled-regulator.ko +kernel/drivers/regulator/refgen.ko +kernel/drivers/regulator/rpmh-regulator.ko +kernel/drivers/regulator/slg51000-regulator.ko +kernel/drivers/regulator/tps-regulator.ko +kernel/drivers/tty/serial/msm_geni_serial.ko +kernel/drivers/char/hw_random/msm_rng.ko +kernel/drivers/char/adsprpc.ko +kernel/drivers/char/adsprpc_compat.ko +kernel/drivers/char/fastcvpd.ko +kernel/drivers/char/rdbg.ko +kernel/drivers/char/diag/diagchar.ko +kernel/drivers/iommu/msm_dma_iommu_mapping.ko +kernel/drivers/iommu/arm-smmu.ko +kernel/drivers/iommu/arm-smmu-debug.ko +kernel/drivers/iommu/iommu-logger.ko +kernel/drivers/gpu/msm/msm_adreno.ko +kernel/drivers/base/regmap/regmap-spmi.ko +kernel/drivers/misc/eeprom/at24.ko +kernel/drivers/misc/hdcp_qseecom.ko +kernel/drivers/misc/msm_hdcp.ko +kernel/drivers/misc/qseecom.ko +kernel/drivers/misc/citadel-spi.ko +kernel/drivers/mfd/qcom-i2c-pmic.ko +kernel/drivers/mfd/qcom-spmi-pmic.ko +kernel/drivers/nfc/st21nfc.ko +kernel/drivers/nfc/ese/st54j_se.ko +kernel/drivers/crypto/msm/qce50.ko +kernel/drivers/crypto/msm/qcedev-module.ko +kernel/drivers/crypto/msm/qcrypto.ko +kernel/drivers/scsi/ufs/ufs_qcom.ko +kernel/drivers/scsi/ufs/ufshcd-core.ko +kernel/drivers/scsi/ufs/ufshcd-pltfrm.ko +kernel/drivers/spi/spi-geni-qcom.ko +kernel/drivers/spmi/spmi-pmic-arb.ko +kernel/drivers/net/wireless/cnss_utils/cnss_utils.ko +kernel/drivers/net/wireless/cnss_prealloc/cnss_prealloc.ko +kernel/drivers/net/wireless/cnss_genl/cnss_nl.ko +kernel/drivers/uio/msm_sharedmem/msm_sharedmem.ko +kernel/drivers/usb/phy/phy-generic.ko +kernel/drivers/usb/phy/phy-msm-ssusb-qmp.ko +kernel/drivers/usb/phy/phy-msm-snps-hs.ko +kernel/drivers/usb/host/xhci-plat-hcd.ko +kernel/drivers/usb/gadget/function/rndis.ko +kernel/drivers/usb/gadget/function/usb_f_diag.ko +kernel/drivers/usb/gadget/function/usb_f_cdev.ko +kernel/drivers/usb/gadget/function/usb_f_ccid.ko +kernel/drivers/usb/gadget/function/usb_f_qdss.ko +kernel/drivers/usb/gadget/function/usb_f_gsi.ko +kernel/drivers/usb/gadget/function/usb_f_mtp.ko +kernel/drivers/usb/gadget/function/usb_f_ptp.ko +kernel/drivers/usb/typec/tcpm/tcpm.ko +kernel/drivers/usb/pd/qpnp_pdphy.ko +kernel/drivers/usb/dwc3/dwc3.ko +kernel/drivers/usb/dwc3/dwc3-haps.ko +kernel/drivers/usb/dwc3/dwc3-of-simple.ko +kernel/drivers/usb/dwc3/dwc3-qcom.ko +kernel/drivers/usb/dwc3/usb-dwc3-msm.ko +kernel/drivers/usb/roles/roles.ko +kernel/drivers/input/touchscreen/touch_offload.ko +kernel/drivers/input/touchscreen/touchscreen_tbn.ko +kernel/drivers/input/touchscreen/heatmap.ko +kernel/drivers/input/misc/drv2624.ko +kernel/drivers/input/misc/qpnp-power-on.ko +kernel/drivers/input/misc/vd6281/vd6281_module.ko +kernel/drivers/input/misc/fpc_fingerprint/fpc1020_platform_tee.ko +kernel/drivers/rtc/rtc-pm8xxx.ko +kernel/drivers/i2c/busses/i2c-qcom-geni.ko +kernel/drivers/media/platform/msm/npu/msm_npu.ko +kernel/drivers/power/reset/msm-poweroff.ko +kernel/drivers/power/supply/qcom/pmic-voter.ko +kernel/drivers/power/supply/qcom/qpnp-battery.ko +kernel/drivers/power/supply/qcom/qpnp-smb5-charger.ko +kernel/drivers/power/supply/qcom/qpnp-qgauge.ko +kernel/drivers/power/supply/google/google-bms.ko +kernel/drivers/power/supply/google/sm7250_bms.ko +kernel/drivers/power/supply/google/google_charger.ko +kernel/drivers/power/supply/google/google-battery.ko +kernel/drivers/power/supply/google/overheat_mitigation.ko +kernel/drivers/power/supply/google/logbuffer.ko +kernel/drivers/power/supply/google/p9221_charger.ko +kernel/drivers/thermal/qcom/adc_tm.ko +kernel/drivers/thermal/qcom/qti_qmi_sensor.ko +kernel/drivers/thermal/qcom/bcl_pmic5.ko +kernel/drivers/thermal/qcom/bcl_soc.ko +kernel/drivers/thermal/qcom/qmi_cdev.ko +kernel/drivers/thermal/qcom/msm_lmh_dcvs.ko +kernel/drivers/thermal/qcom/lmh_dbg.ko +kernel/drivers/thermal/qcom/regulator_aop_cdev.ko +kernel/drivers/thermal/qcom/cpu_isolate.ko +kernel/drivers/thermal/qcom/lmh_cpu_vdd_cdev.ko +kernel/drivers/thermal/qcom-spmi-temp-alarm.ko +kernel/drivers/thermal/thermal-tsens.ko +kernel/drivers/md/dm-user.ko +kernel/drivers/bluetooth/bluetooth_power.ko +kernel/drivers/edac/qcom_edac.ko +kernel/drivers/cpufreq/qcom-cpufreq-hw.ko +kernel/drivers/cpuidle/msm_pm.ko +kernel/drivers/leds/leds-qpnp-flash-v2.ko +kernel/drivers/leds/leds-qpnp-flash-common.ko +kernel/drivers/firmware/msm_scm.ko +kernel/drivers/of/of_slimbus.ko +kernel/drivers/of/of_batterydata.ko +kernel/drivers/staging/android/ion/ion-alloc.ko +kernel/drivers/staging/wlan_mac/google_wlan_mac.ko +kernel/drivers/platform/msm/msm_ext_display.ko +kernel/drivers/platform/msm/qpnp-revid.ko +kernel/drivers/platform/msm/sps/msm_sps.ko +kernel/drivers/platform/msm/gsi/msm_gsi.ko +kernel/drivers/platform/msm/ipa/ipa3.ko +kernel/drivers/platform/msm/qcom-geni-se.ko +kernel/drivers/mailbox/msm_qmp.ko +kernel/drivers/hwspinlock/qcom_hwspinlock.ko +kernel/drivers/devfreq/bimc-bwmon.ko +kernel/drivers/devfreq/arm-memlat-mon.ko +kernel/drivers/devfreq/governor_bw_hwmon.ko +kernel/drivers/devfreq/governor_memlat.ko +kernel/drivers/devfreq/governor_msm_adreno_tz.ko +kernel/drivers/devfreq/governor_bw_vbif.ko +kernel/drivers/devfreq/governor_gpubw_mon.ko +kernel/drivers/devfreq/governor_cdsp_l3.ko +kernel/drivers/devfreq/devfreq_qcom_fw.ko +kernel/drivers/devfreq/devfreq_devbw.ko +kernel/drivers/iio/adc/qcom-spmi-adc5.ko +kernel/drivers/iio/adc/qcom-vadc-common.ko +kernel/drivers/iio/power/pac193x.ko +kernel/drivers/perf/qcom_llcc_pmu.ko +kernel/drivers/hwtracing/google/coresight-clk-placeholder.ko +kernel/drivers/hwtracing/google/coresight-clk-amba-placeholder.ko +kernel/drivers/nvmem/nvmem_qfprom.ko +kernel/drivers/nvmem/qcom-spmi-sdam.ko +kernel/drivers/slimbus/slimbus.ko +kernel/drivers/slimbus/slim_msm_ngd.ko +kernel/drivers/rpmsg/rpmsg_core.ko +kernel/drivers/rpmsg/rpmsg_char.ko +kernel/drivers/rpmsg/qcom_glink_native.ko +kernel/drivers/rpmsg/qcom_glink_smem.ko +kernel/drivers/rpmsg/qcom_glink_spss.ko +kernel/drivers/rmnet.ko +kernel/sound/usb/usb-audio-qmi.ko +kernel/sound/soc/codecs/snd-soc-rl6231.ko +kernel/sound/soc/codecs/snd-soc-rt5514.ko +kernel/sound/soc/codecs/snd-soc-rt5514-qmi.ko +kernel/sound/soc/codecs/snd-soc-rt5514-spi.ko +kernel/sound/soc/codecs/snd-soc-wm-adsp.ko +kernel/sound/soc/codecs/snd-soc-cs35l41.ko +kernel/sound/soc/codecs/snd-soc-cs35l41-i2c.ko +kernel/sound/soc/codecs/snd-soc-codec-misc.ko +kernel/techpack/video/msm/msm-vidc.ko +kernel/techpack/display/msm/msm_drm.ko +kernel/techpack/camera/drivers/cam_req_mgr/cam_mem_mgr.ko +kernel/techpack/camera/drivers/cam_req_mgr/cam_req_mgr_late.ko +kernel/techpack/camera/drivers/cam_req_mgr/cam_req_mgr.ko +kernel/techpack/camera/drivers/cam_utils/cam_utils.ko +kernel/techpack/camera/drivers/cam_utils/cam_debug_util.ko +kernel/techpack/camera/drivers/cam_core/cam-context.ko +kernel/techpack/camera/drivers/cam_sync/cam-sync.ko +kernel/techpack/camera/drivers/cam_smmu/cam_smmu_api.ko +kernel/techpack/camera/drivers/cam_cpas/cam_cpas.ko +kernel/techpack/camera/drivers/cam_cdm/cam_cdm.ko +kernel/techpack/camera/drivers/cam_isp/isp_hw_mgr/hw_utils/cam_tasklet_util.ko +kernel/techpack/camera/drivers/cam_isp/isp_hw_mgr/hw_utils/cam_isp_packet_parser.ko +kernel/techpack/camera/drivers/cam_isp/isp_hw_mgr/hw_utils/irq_controller/cam_irq_controller.ko +kernel/techpack/camera/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid.ko +kernel/techpack/camera/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid17x.ko +kernel/techpack/camera/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_lite17x.ko +kernel/techpack/camera/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/cam_vfe.ko +kernel/techpack/camera/drivers/cam_isp/isp_hw_mgr/cam_isp_hw_mgr.ko +kernel/techpack/camera/drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.ko +kernel/techpack/camera/drivers/cam_isp/cam_isp.ko +kernel/techpack/camera/drivers/cam_sensor_module/cam_res_mgr/cam_res_mgr.ko +kernel/techpack/camera/drivers/cam_sensor_module/cam_sensor_utils/cam_sensor_util.ko +kernel/techpack/camera/drivers/cam_sensor_module/cam_cci/cam_cci.ko +kernel/techpack/camera/drivers/cam_sensor_module/cam_cci/cam_cci_late.ko +kernel/techpack/camera/drivers/cam_sensor_module/cam_sensor_io/cam-sensor-io.ko +kernel/techpack/camera/drivers/cam_sensor_module/cam_csiphy/cam_csiphy.ko +kernel/techpack/camera/drivers/cam_sensor_module/cam_actuator/cam_actuator.ko +kernel/techpack/camera/drivers/cam_sensor_module/cam_sensor/cam_sensor.ko +kernel/techpack/camera/drivers/cam_sensor_module/cam_eeprom/cam_eeprom.ko +kernel/techpack/camera/drivers/cam_sensor_module/cam_ois/cam_ois.ko +kernel/techpack/camera/drivers/cam_sensor_module/cam_flash/cam_flash.ko +kernel/techpack/camera/drivers/cam_sensor_module/cam_sensor_vsync/cam_sensor_vsync_dev.ko +kernel/techpack/camera/drivers/cam_sensor_module/cam_sensor_vsync/cam_sensor_vsync_pb.ko +kernel/techpack/camera/drivers/cam_sensor_module/cam_gyro/cam_gyro_core.ko +kernel/techpack/camera/drivers/cam_sensor_module/cam_fw_update/fw-update.ko +kernel/techpack/camera/drivers/cam_icp/icp_hw/a5_hw/cam_a5.ko +kernel/techpack/camera/drivers/cam_icp/icp_hw/ipe_hw/cam_ipe.ko +kernel/techpack/camera/drivers/cam_icp/icp_hw/bps_hw/cam_bps.ko +kernel/techpack/camera/drivers/cam_icp/cam_hfi.ko +kernel/techpack/camera/drivers/cam_icp/cam_icp.ko +kernel/techpack/camera/drivers/cam_jpeg/jpeg_hw/jpeg_enc_hw/cam_jpeg_enc.ko +kernel/techpack/camera/drivers/cam_jpeg/jpeg_hw/jpeg_dma_hw/cam_jpeg_dma.ko +kernel/techpack/camera/drivers/cam_jpeg/jpeg_hw/cam_jpeg_hw_mgr.ko +kernel/techpack/camera/drivers/cam_jpeg/cam_jpeg.ko +kernel/techpack/camera/drivers/cam_fd/fd_hw_mgr/cam-fd-hw-mgr.ko +kernel/techpack/camera/drivers/cam_fd/cam_fd.ko +kernel/techpack/camera/drivers/cam_lrme/lrme_hw_mgr/lrme_hw/cam_lrme_hw.ko +kernel/techpack/camera/drivers/cam_lrme/lrme_hw_mgr/cam_lrme_hw_mgr.ko +kernel/techpack/camera/drivers/cam_lrme/cam_lrme.ko +kernel/techpack/camera/drivers/cam_cust/cam_custom_hw_mgr/cam_custom_hw1/cam_custom_sub_mod_soc.ko +kernel/techpack/camera/drivers/cam_cust/cam_custom_hw_mgr/cam_custom_hw1/cam_custom_sub_mod_dev.ko +kernel/techpack/camera/drivers/cam_cust/cam_custom_hw_mgr/cam_custom_hw1/cam_custom_sub_mod_core.ko +kernel/techpack/camera/drivers/cam_cust/cam_custom_hw_mgr/cam_custom_csid/cam_custom_csid_dev.ko +kernel/techpack/camera/drivers/cam_cust/cam_custom_hw_mgr/cam_custom_hw_mgr.ko +kernel/techpack/camera/drivers/cam_cust/cam_custom_dev.ko +kernel/techpack/camera/drivers/cam_cust/cam_custom_context.ko +kernel/techpack/audio/soc/pinctrl_lpi_dlkm.ko +kernel/techpack/audio/soc/swr_dlkm.ko +kernel/techpack/audio/soc/snd_event_dlkm.ko +kernel/techpack/audio/soc/swr_ctrl_dlkm.ko +kernel/techpack/audio/dsp/codecs/native_dlkm.ko +kernel/techpack/audio/dsp/q6_dlkm.ko +kernel/techpack/audio/dsp/usf_dlkm.ko +kernel/techpack/audio/dsp/adsp_loader_dlkm.ko +kernel/techpack/audio/dsp/q6_pdr_dlkm.ko +kernel/techpack/audio/dsp/q6_notifier_dlkm.ko +kernel/techpack/audio/ipc/apr_dlkm.ko +kernel/techpack/audio/asoc/codecs/wcd937x/wcd937x_dlkm.ko +kernel/techpack/audio/asoc/codecs/wcd937x/wcd937x_slave_dlkm.ko +kernel/techpack/audio/asoc/codecs/wcd938x/wcd938x_dlkm.ko +kernel/techpack/audio/asoc/codecs/wcd938x/wcd938x_slave_dlkm.ko +kernel/techpack/audio/asoc/codecs/bolero/bolero_cdc_dlkm.ko +kernel/techpack/audio/asoc/codecs/bolero/wsa_macro_dlkm.ko +kernel/techpack/audio/asoc/codecs/bolero/va_macro_dlkm.ko +kernel/techpack/audio/asoc/codecs/bolero/tx_macro_dlkm.ko +kernel/techpack/audio/asoc/codecs/bolero/rx_macro_dlkm.ko +kernel/techpack/audio/asoc/codecs/wsa883x/wsa883x_dlkm.ko +kernel/techpack/audio/asoc/codecs/tas256x/tas256x_dlkm.ko +kernel/techpack/audio/asoc/codecs/wcd_core_dlkm.ko +kernel/techpack/audio/asoc/codecs/wcd9xxx_dlkm.ko +kernel/techpack/audio/asoc/codecs/wsa881x_dlkm.ko +kernel/techpack/audio/asoc/codecs/stub_dlkm.ko +kernel/techpack/audio/asoc/codecs/mbhc_dlkm.ko +kernel/techpack/audio/asoc/codecs/hdmi_dlkm.ko +kernel/techpack/audio/asoc/platform_dlkm.ko +kernel/techpack/audio/asoc/machine_dlkm.ko +kernel/net/bridge/netfilter/ebtables.ko +kernel/net/bridge/netfilter/ebtable_broute.ko +kernel/net/sctp/sctp.ko +kernel/net/sctp/sctp_diag.ko +kernel/net/qrtr/qrtr.ko +kernel/net/qrtr/qrtr-smd.ko +extra/ftm5.ko +extra/sec_touch.ko +extra/wlan.ko diff --git a/nfc/libese-hal-st.conf b/nfc/libese-hal-st.conf new file mode 100644 index 00000000..3969b88d --- /dev/null +++ b/nfc/libese-hal-st.conf @@ -0,0 +1,18 @@ +########################### Start of libese-hal-st.conf ########################### +############################################################################### +############################################################################### +# ST HAL trace log level +STESE_HAL_LOGLEVEL=1 + +############################################################################### +# Configure the device node +ST_ESE_DEV_NODE="/dev/st54j_se" + +############################################################################### +# Configure the polling interval (in us) +ST_ESE_DEV_POLLING_INTERVAL=1500 + +############################################################################### +# Configure the BGT timing (in us) +ST_ESE_DEV_BGT=1000 + diff --git a/nfc/libnfc-hal-st.conf b/nfc/libnfc-hal-st.conf new file mode 100644 index 00000000..ff976ddc --- /dev/null +++ b/nfc/libnfc-hal-st.conf @@ -0,0 +1,155 @@ +########################### Start of libnf-hal-st_aosp.conf ########################### + +############################################################################### +############################################################################### +# ST HAL trace log level +STNFC_HAL_LOGLEVEL=1 +NFC_DEBUG_ENABLED=0 + +############################################################################### +# Vendor specific mode to enable FW (RF & SWP) traces. +STNFC_FW_DEBUG_ENABLED=0 + +############################################################################### +# File used for NFA storage +NFA_STORAGE="/data/nfc" + +############################################################################### +# Keep the nfa storage file. +PRESERVE_STORAGE=1 + +############################################################################### +# In Switch OFF mode (phone switched-off), specify the desired CE mode to +# the controller. +# 0: No card-emulation; DEFAULT +# 1: Switch-off card-emulation enabled +CE_ON_SWITCH_OFF_STATE=1 + +############################################################################### +# Vendor specific mode to support the USB charging mode if VPSIO=1 in switch off. +STNFC_USB_CHARGING_MODE=1 + +############################################################################### +# Vendor Specific Proprietary Protocol & Discovery Configuration +# Set to 0xFF if unsupported +# byte[0] NCI_PROTOCOL_18092_ACTIVE +# byte[1] NCI_PROTOCOL_B_PRIME +# byte[2] NCI_PROTOCOL_DUAL +# byte[3] NCI_PROTOCOL_15693 +# byte[4] NCI_PROTOCOL_KOVIO +# byte[5] NCI_PROTOCOL_MIFARE +# byte[6] NCI_DISCOVERY_TYPE_POLL_KOVIO +# byte[7] NCI_DISCOVERY_TYPE_POLL_B_PRIME +# byte[8] NCI_DISCOVERY_TYPE_LISTEN_B_PRIME +NFA_PROPRIETARY_CFG={05:FF:FF:06:8A:90:77:FF:FF} + +############################################################################### +# Choose the presence-check algorithm for type-4 tag. If not defined, +# the default value is 1. +# 0 NFA_RW_PRES_CHK_DEFAULT; Let stack selects an algorithm +# 1 NFA_RW_PRES_CHK_I_BLOCK; ISO-DEP protocol's empty I-block +# 2 NFA_RW_PRES_CHK_RESET; Deactivate to Sleep, then re-activate +# 3 NFA_RW_PRES_CHK_RB_CH0; Type-4 tag protocol's ReadBinary command on channel 0 +# 4 NFA_RW_PRES_CHK_RB_CH3; Type-4 tag protocol's ReadBinary command on channel 3 +# 5 NFA_RW_PRES_CHK_ISO_DEP_NAK; presence check command ISO-DEP NAK as per NCI2.0 +PRESENCE_CHECK_ALGORITHM=5 + +############################################################################### +# Name of the NCI HAL module to use +# If unset, falls back to nfc_nci.bcm2079x +NCI_HAL_MODULE="nfc_nci.st21nfc" + +############################################################################### +# Allow list to be set at startup. +DEVICE_HOST_ALLOW_LIST={02:C0} + +############################################################################### +# BAIL OUT value for P2P +# Implements algorithm for NFC-DEP protocol priority over ISO-DEP protocol. +POLL_BAIL_OUT_MODE=1 + +############################################################################### +# Extended APDU length for ISO_DEP +ISO_DEP_MAX_TRANSCEIVE=0xFEFF + +############################################################################### +# Configure the NFC Extras to open and use a static pipe. If the value is +# not set or set to 0, then the default is use a dynamic pipe based on a +# destination gate (see NFA_HCI_DEFAULT_DEST_GATE). Note there is a value +# for each EE (ESE/SIM) +OFF_HOST_ESE_PIPE_ID=0x5E +OFF_HOST_SIM_PIPE_ID=0x3E + +############################################################################### +#Set the default Felica T3T System Code OffHost route Location : +#This settings will be used when application does not set this parameter +# host 0x00 +# eSE 0x82 (eSE), 0x86 (eUICC/SPI-SE) +# UICC 0x81 (UICC_1), 0x85 (UICC_2) +DEFAULT_SYS_CODE_ROUTE=0x86 + +############################################################################### +#Set the Felica T3T System Code supported power state: +DEFAULT_SYS_CODE_PWR_STATE=0x3B + +############################################################################### +# Path and Files used for FW update binaries storage +STNFC_FW_PATH_STORAGE="/vendor/firmware" +STNFC_FW_BIN_NAME="/st54j_fw.bin" +STNFC_FW_CONF_NAME="/st54j_conf.bin" + +############################################################################### +# Default off-host route for Felica. +# This settings will be used when application does not set this parameter +# host 0x00 +# eSE 0x82 (eSE), 0x86 (eUICC/SPI-SE) +# UICC 0x81 (UICC_1), 0x85 (UICC_2) +DEFAULT_NFCF_ROUTE=0x86 + +############################################################################### +# Configure the default off-host route. +# used for technology A and B routing +# eSE 0x82 (eSE), 0x86 (eUICC/SPI-SE) +# UICC 0x81 (UICC_1), 0x85 (UICC_2) +DEFAULT_OFFHOST_ROUTE=0x81 + +############################################################################### +# Configure the default AID route. +# host 0x00 +# eSE 0x82 (eSE), 0x86 (eUICC/SPI-SE) +# UICC 0x81 (UICC_1), 0x85 (UICC_2) +DEFAULT_ROUTE=0x00 + +############################################################################### +# Configure the NFCEEIDs of offhost UICC. +# UICC 0x81 (UICC_1), 0x85 (UICC_2) +OFFHOST_ROUTE_UICC={81} + +############################################################################### +# Configure the NFCEEIDs of offhost eSEs. +# eSE 0x82 (eSE), 0x86 (eUICC/SPI-SE) +OFFHOST_ROUTE_ESE={86} + +############################################################################### +# Configure the list of NFCEE for the ISO-DEP routing. +# host 0x00 +# eSE 0x82 (eSE), 0x86 (eUICC/SPI-SE) +# UICC 0x81 (UICC_1), 0x85 (UICC_2) +DEFAULT_ISODEP_ROUTE=0x81 + +############################################################################### +# Configure the ACTIVE_RW timer +# Default 0x00, set 0x01 to enable it +STNFC_ACTIVERW_TIMER=0x01 + +############################################################################### +# Core configuration settings +CORE_CONF_PROP={ 20, 02, 0a, 03, + a1, 01, 1e, + a2, 01, 19, + 80, 01, 01 +} + +############################################################################### +# NFCC reset request sysfs +ST_NFC_RESET_REQ_SYSFS="/sys/devices/platform/soc/984000.i2c/i2c-0/0-0057/i2c_reset" diff --git a/nfc/libnfc-nci.conf b/nfc/libnfc-nci.conf new file mode 100644 index 00000000..c17296a1 --- /dev/null +++ b/nfc/libnfc-nci.conf @@ -0,0 +1,115 @@ +############################################################################### +# Application options +NFC_DEBUG_ENABLED=0 + +############################################################################### +# File used for NFA storage +NFA_STORAGE="/data/nfc" + +############################################################################### +# Force UICC to only listen to the following technology(s). +# The bits are defined as tNFA_TECHNOLOGY_MASK in nfa_api.h. +# Default is NFA_TECHNOLOGY_MASK_A | NFA_TECHNOLOGY_MASK_B | NFA_TECHNOLOGY_MASK_F +UICC_LISTEN_TECH_MASK=0x07 + +############################################################################### +# Set HOST default listen to the following technology(s). +# The bits are defined as tNFA_TECHNOLOGY_MASK in nfa_api.h. +# Default is NFA_TECHNOLOGY_MASK_A | NFA_TECHNOLOGY_MASK_F +# 0x07 = A + B + F +HOST_LISTEN_TECH_MASK=0x07 + +############################################################################### +# AID for Empty Select command +# If specified, this AID will be substituted when an Empty SELECT command is +# detected. The first byte is the length of the AID. Maximum length is 16. +AID_FOR_EMPTY_SELECT={08:A0:00:00:01:51:00:00:00} + +############################################################################### +# When screen is turned off, specify the desired power state of the controller. +# 0: power-off-sleep state; DEFAULT +# 1: full-power state +# 2: screen-off card-emulation (CE4/CE3/CE1 modes are used) +SCREEN_OFF_POWER_STATE=1 + +############################################################################### +# Force tag polling for the following technology(s). +# The bits are defined as tNFA_TECHNOLOGY_MASK in nfa_api.h. +# Default is NFA_TECHNOLOGY_MASK_A | NFA_TECHNOLOGY_MASK_B | +# NFA_TECHNOLOGY_MASK_F | NFA_TECHNOLOGY_MASK_ISO15693 | +# NFA_TECHNOLOGY_MASK_B_PRIME | NFA_TECHNOLOGY_MASK_KOVIO | +# NFA_TECHNOLOGY_MASK_ACTIVE +# +# Notable bits: +# NFA_TECHNOLOGY_MASK_A 0x01 /* NFC Technology A */ +# NFA_TECHNOLOGY_MASK_B 0x02 /* NFC Technology B */ +# NFA_TECHNOLOGY_MASK_F 0x04 /* NFC Technology F */ +# NFA_TECHNOLOGY_MASK_ISO15693 0x08 /* Proprietary Technology */ +# NFA_TECHNOLOGY_MASK_KOVIO 0x20 /* Proprietary Technology */ +# NFA_TECHNOLOGY_MASK_ACTIVE 0x40 /* NFC Technology Active */ +POLLING_TECH_MASK=0x2F + +############################################################################### +# Force P2P to only listen for the following technology(s). +# The bits are defined as tNFA_TECHNOLOGY_MASK in nfa_api.h. +# Default is NFA_TECHNOLOGY_MASK_A | NFA_TECHNOLOGY_MASK_F | +# NFA_TECHNOLOGY_MASK_ACTIVE +# +# Notable bits: +# NFA_TECHNOLOGY_MASK_A 0x01 /* NFC Technology A */ +# NFA_TECHNOLOGY_MASK_F 0x04 /* NFC Technology F */ +# NFA_TECHNOLOGY_MASK_ACTIVE 0x40 /* NFC Technology Active */ +P2P_LISTEN_TECH_MASK=0x00 + +PRESERVE_STORAGE=0x01 + +############################################################################### +# Override the stack default for NFA_EE_MAX_EE_SUPPORTED set in nfc_target.h. +# The value is set to 3 by default as it assumes we will discover 0xF2, +# 0xF3, and 0xF4. If a platform will exclude and SE, this value can be reduced +# so that the stack will not wait any longer than necessary. +# Maximum EE supported number +# NXP PN547C2 0x02 +# NXP PN65T 0x03 +# NXP PN548C2 0x02 +# NXP PN66T 0x03 +NFA_MAX_EE_SUPPORTED=0x02 + +############################################################################### +# AID_MATCHING constants +# AID_MATCHING_EXACT_ONLY 0x00 +# AID_MATCHING_EXACT_OR_PREFIX 0x01 +# AID_MATCHING_PREFIX_ONLY 0x02 +# AID_MATCHING_EXACT_OR_SUBSET_OR_PREFIX 0x03 +AID_MATCHING_MODE=0x03 + +############################################################################### +#Set the default Felica T3T System Code : +#This settings will be used when application does not set this parameter +DEFAULT_SYS_CODE={FE:FE} + +############################################################################### +# Value of NIC parameter NFCC_COFNIG_CONTROL +# 0x00 NFCC is not allowed to manage RF configuration +# 0x01 NFCC is allowed to manage RF configuration +NFCC_CONFIG_CONTROL=0x01 + +############################################################################### +#Set if the AID routing should be blocked for the power modes not supported. +NFA_AID_BLOCK_ROUTE=1 + +############################################################################### +#Set the OffHost AID supported power state: +OFFHOST_AID_ROUTE_PWR_STATE=0x3B + +############################################################################### +# Mifare Tag implementation +# 0: General implementation +# 1: Legacy implementation +LEGACY_MIFARE_READER=0 + +############################################################################### +# Nfc recovery implementation +# 0: Crash Nfc Service +# 1: Toggle Nfc state +RECOVERY_OPTION=1 diff --git a/overlay-lineage/frameworks/base/core/res/res/values/arrays.xml b/overlay-lineage/frameworks/base/core/res/res/values/arrays.xml new file mode 100644 index 00000000..333bb324 --- /dev/null +++ b/overlay-lineage/frameworks/base/core/res/res/values/arrays.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** Copyright 2021, The LineageOS Project +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <!-- Device-specific array of SIM slot indexes which are are embedded eUICCs. + e.g. If a device has two physical slots with indexes 0, 1, and slot 1 is an + eUICC, then the value of this array should be: + <integer-array name="non_removable_euicc_slots"> + <item>1</item> + </integer-array> + If a device has three physical slots and slot 1 and 2 are eUICCs, then the value of + this array should be: + <integer-array name="non_removable_euicc_slots"> + <item>1</item> + <item>2</item> + </integer-array> + This is used to differentiate between removable eUICCs and built in eUICCs, and should + be set by OEMs for devices which use eUICCs. --> + <integer-array name="non_removable_euicc_slots"> + <item>1</item> + </integer-array> +</resources> diff --git a/overlay-lineage/frameworks/base/core/res/res/values/config.xml b/overlay-lineage/frameworks/base/core/res/res/values/config.xml new file mode 100644 index 00000000..65329a54 --- /dev/null +++ b/overlay-lineage/frameworks/base/core/res/res/values/config.xml @@ -0,0 +1,80 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** Copyright 2021, The LineageOS Project +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ +--> + +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + + <!-- List of comma separated package names for which we the system will not show crash, ANR, + etc. dialogs. --> + <string translatable="false" name="config_appsNotReportingCrashes">com.google.android.euicc</string> + + <!-- Specify if the fingerprint hardware support gestures--> + <bool name="config_fingerprintSupportsGestures">true</bool> + + <string-array name="config_nightDisplayColorTemperatureCoefficients"> + <!-- R a-coefficient --> <item>0.0</item> + <!-- R b-coefficient --> <item>0.0</item> + <!-- R y-intercept --> <item>1.0</item> + <!-- G a-coefficient --> <item>-0.000000014365268757</item> + <!-- G b-coefficient --> <item>0.000255092801250106</item> + <!-- G y-intercept --> <item>-0.064156942434907716</item> + <!-- B a-coefficient --> <item>-0.000000000910931179</item> + <!-- B b-coefficient --> <item>0.000207598323269139</item> + <!-- B y-intercept --> <item>-0.349361641294833436</item> + </string-array> + + <!-- Flag indicating whether we should enable the adaptive sleep.--> + <bool name="config_adaptive_sleep_available">true</bool> + + <!-- The component name for the default system attention service. + This service must be trusted, as it can be activated without explicit consent of the user. + See android.attention.AttentionManagerService. + --> + <string name="config_defaultAttentionService" translatable="false">com.google.android.as/com.google.android.apps.miphone.aiai.attention.service.AiAiAttentionService</string> + + <!-- Live Captions --> + <string name="config_defaultSystemCaptionsManagerService">com.google.android.as/com.google.android.apps.miphone.aiai.captions.SystemCaptionsManagerService</string> + + <!-- Recents text and image selection for Pixel Launcher (not supported by Launcher3) --> + <string name="config_defaultContentSuggestionsService" translatable="false">com.google.android.as/com.google.android.apps.miphone.aiai.app.AiAiContentSuggestionsService</string> + + <!-- Launcher app suggestions --> + <string name="config_defaultAppPredictionService" translatable="false">com.google.android.as/com.google.android.apps.miphone.aiai.app.AiAiPredictionService</string> + + <!-- Make AiAi the default role holder for System Intelligence --> + <string name="config_systemAmbientAudioIntelligence">com.google.android.as</string> + <string name="config_systemAudioIntelligence">com.google.android.as</string> + <string name="config_systemNotificationIntelligence">com.google.android.as</string> + <string name="config_systemTextIntelligence">com.google.android.as</string> + <string name="config_systemUiIntelligence">com.google.android.as</string> + <string name="config_systemVisualIntelligence">com.google.android.as</string> + + <!-- Whether WiFi display is supported by this device. + There are many prerequisites for this feature to work correctly. + Here are a few of them: + * The WiFi radio must support WiFi P2P. + * The WiFi radio must support concurrent connections to the WiFi display and + to an access point. + * The Audio Flinger audio_policy.conf file must specify a rule for the "r_submix" + remote submix module. This module is used to record and stream system + audio output to the WiFi display encoder in the media server. + * The remote submix module "audio.r_submix.default" must be installed on the device. + * The device must be provisioned with HDCP keys (for protected content). + --> + <bool name="config_enableWifiDisplay">true</bool> +</resources> diff --git a/overlay-lineage/frameworks/base/packages/SettingsProvider/res/values/defaults.xml b/overlay-lineage/frameworks/base/packages/SettingsProvider/res/values/defaults.xml new file mode 100644 index 00000000..65f6870f --- /dev/null +++ b/overlay-lineage/frameworks/base/packages/SettingsProvider/res/values/defaults.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/** + * Copyright 2021, The LineageOS 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> + <!-- Default screen brightness, from 0 to 255. 102 is 40%. --> + <integer name="def_screen_brightness">82</integer> + <!-- Set the automatic brightness mode on by default --> + <bool name="def_screen_brightness_automatic_mode">true</bool> +</resources> diff --git a/overlay-lineage/frameworks/base/packages/SystemUI/res/values/config.xml b/overlay-lineage/frameworks/base/packages/SystemUI/res/values/config.xml new file mode 100644 index 00000000..5cc77237 --- /dev/null +++ b/overlay-lineage/frameworks/base/packages/SystemUI/res/values/config.xml @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** Copyright 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. +*/ +--> + +<!-- These resources are around just to allow their values to be customized + for different hardware and product builds. --> +<resources> + + <!-- Should we vibrate on an icon animation of the shelf. This should only be active if the + vibrator is capable of subtle vibrations --> + <bool name="config_vibrateOnIconAnimation">true</bool> + + <!-- Whether to show a warning notification when device's skin temperature is high. --> + <integer name="config_showTemperatureWarning">1</integer> + + <!-- Whether to show a alarm dialog when device's usb port is overheating. --> + <integer name="config_showUsbPortAlarm">1</integer> + +</resources> diff --git a/overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml b/overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml new file mode 100644 index 00000000..d4faff51 --- /dev/null +++ b/overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** Copyright 2021, The LineageOS Project +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ +--> + +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + + <!-- Whether device has screen with higher aspect ratio --> + <bool name="config_haveHigherAspectRatioScreen">true</bool> + + <!-- Defines the actions shown in advanced reboot submenu --> + <string-array name="config_restartActionsList"> + <item>restart</item> + <item>restart_recovery</item> + <item>restart_fastboot</item> + <item>restart_bootloader</item> + </string-array> +</resources> diff --git a/overlay-lineage/packages/apps/Aperture/app/src/main/res/values/config.xml b/overlay-lineage/packages/apps/Aperture/app/src/main/res/values/config.xml new file mode 100644 index 00000000..58a9ef46 --- /dev/null +++ b/overlay-lineage/packages/apps/Aperture/app/src/main/res/values/config.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + SPDX-FileCopyrightText: 2022 The LineageOS Project + SPDX-License-Identifier: Apache-2.0 +--> +<resources> + <!-- An array of triplets made of (camera ID, approximate zoom ratio, exact zoom ratio). + These values will be added to the lens selector if one or more cameras uses the + multi-camera API to let the user select which lens to use. + It's highly recommended to leave config_enableAuxCameras to false, since with + multi-camera API you only use a single camera device for all sensors. + You may enable it if you need auxiliary camera devices for a set of cameras on one + of the device's side (e.g. logical main back camera but multiple physical camera + devices on front), in that case if a main device side's lens is referenced here + all the auxiliary camera devices of that side will be ignored. + You may be able to get the exact zoom ratio needed to trigger the lens switch from + your stock camera app and observing the zoom ratio it sets with the following command: + adb shell dumpsys media.camera | grep 'android.control.zoomRatio' -1 + Example for Google Pixel 7 Pro's back camera configuration: + <string-array name="config_logicalZoomRatios"> + <item>0</item> <item>0.5</item> <item>0.55632502</item> + <item>0</item> <item>2.0</item> <item>2.0</item> + <item>0</item> <item>5.0</item> <item>5.0</item> + </string-array> + --> + <string-array name="config_logicalZoomRatios"> + <item>0</item> <item>0.6</item> <item>0.61500001</item> + <item>0</item> <item>2.0</item> <item>2.0</item> + </string-array> +</resources> diff --git a/overlay-lineage/packages/apps/Dialer/java/com/android/dialer/callrecord/res/values/config.xml b/overlay-lineage/packages/apps/Dialer/java/com/android/dialer/callrecord/res/values/config.xml new file mode 100644 index 00000000..4cacde56 --- /dev/null +++ b/overlay-lineage/packages/apps/Dialer/java/com/android/dialer/callrecord/res/values/config.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright (C) 2021 The LineageOS Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<resources> + <bool name="call_recording_enabled">true</bool> + <integer name="call_recording_audio_source">4</integer> +</resources> diff --git a/overlay-lineage/packages/apps/Settings/res/values/config.xml b/overlay-lineage/packages/apps/Settings/res/values/config.xml new file mode 100644 index 00000000..61850280 --- /dev/null +++ b/overlay-lineage/packages/apps/Settings/res/values/config.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** Copyright 2021, The LineageOS Project +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + + <!-- Whether to show the Preference for Adaptive connectivity --> + <bool name="config_show_adaptive_connectivity">true</bool> + +</resources> diff --git a/overlay-lineage/packages/apps/Settings/res/values/lineage_config.xml b/overlay-lineage/packages/apps/Settings/res/values/lineage_config.xml new file mode 100644 index 00000000..d212f663 --- /dev/null +++ b/overlay-lineage/packages/apps/Settings/res/values/lineage_config.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (C) 2020-2024 The LineageOS 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> + <!-- Show battery cycle count --> + <bool name="config_show_battery_cycle_count" translatable="false">true</bool> +</resources> diff --git a/overlay-lineage/packages/apps/SimpleDeviceConfig/res/values/config.xml b/overlay-lineage/packages/apps/SimpleDeviceConfig/res/values/config.xml new file mode 100644 index 00000000..b5c0ad3a --- /dev/null +++ b/overlay-lineage/packages/apps/SimpleDeviceConfig/res/values/config.xml @@ -0,0 +1,112 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (C) 2020 The Proton AOSP 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> + <string-array name="configs_device"> + <!-- Live Captions (Pixel 2017 + OEM) --> + <item>device_personalization_services/Captions__allow_box_x_axis_movement=true</item> + <item>device_personalization_services/Captions__available_for_download=en-US;fr-FR;fr-BE;fr-CH;it-IT;it-CH;de-DE;de-AT;de-BE;de-CH;es-US</item> + <item>device_personalization_services/Captions__disable_prod=false</item> + <!-- <item>device_personalization_services/Captions__enable=false</item> --> + <item>device_personalization_services/Captions__enable_adaptive_box_width=true</item> + <item>device_personalization_services/Captions__enable_augmented_modality=true</item> + <item>device_personalization_services/Captions__enable_augmented_modality_input=true</item> + <item>device_personalization_services/Captions__enable_augmented_modality_language_detection=true</item> + <item>device_personalization_services/Captions__enable_augmented_music=true</item> + <!-- <item>device_personalization_services/Captions__enable_clearcut_logging=true</item> --> + <item>device_personalization_services/Captions__enable_language_detection=true</item> + <item>device_personalization_services/Captions__enable_multilang=true</item> + <item>device_personalization_services/Captions__enable_punctuations=true</item> + <item>device_personalization_services/Captions__enable_setting_page=false</item> + <item>device_personalization_services/Captions__enable_text_transform=false</item> + <item>device_personalization_services/Captions__enable_westworld_logging=false</item> + <item>device_personalization_services/Captions__enable_zero_day=false</item> + <item>device_personalization_services/Captions__manifest_url_template=https://storage.googleapis.com/captions/%{NAMESPACE}_%{VERSION}_manifest.json</item> + <item>device_personalization_services/Captions__model_version_v1=20190613</item> + <item>device_personalization_services/Captions__model_version_v1_2=20200112</item> + <item>device_personalization_services/Captions__new_model_version=20230731</item> + <item>device_personalization_services/Captions__speech_threshold=0.2</item> + <item>device_personalization_services/Captions__supported_languages=en-US;fr-FR;it-IT;de-DE</item> + <item>device_personalization_services/Captions__supported_languages_beta_quality=fr-FR;it-IT;de-DE</item> + <item>device_personalization_services/Captions__surface_sound_events=true</item> + <item>device_personalization_services/Captions__text_transform_augmented_input=true</item> + <item>device_personalization_services/Captions__visibility_playing_duration_millis=5000</item> + <item>device_personalization_services/Captions__visibility_stopped_duration_millis=1500</item> + + <!-- Now Playing (Pixel 2017) --> + <item>device_personalization_services/NowPlaying__ambient_music_apk_music_detector_min_score=0.45</item> + <item>device_personalization_services/NowPlaying__ambient_music_get_model_state_cooldown_seconds_cloud_search=9</item> + <item>device_personalization_services/NowPlaying__ambient_music_index_manifest_17_09_02=3071:https://storage.googleapis.com/music-iq-db/updatable_db_v3/20231217-030102/manifest.json</item> + <item>device_personalization_services/NowPlaying__ambient_music_matcher_match_threshold_17_09_02=1.0E-6</item> + <item>device_personalization_services/NowPlaying__ambient_music_on_demand_enabled=true</item> + <item>device_personalization_services/NowPlaying__ambient_music_on_demand_music_confidence=0.48</item> + <item>device_personalization_services/NowPlaying__cloud_api_allowed=true</item> + <item>device_personalization_services/NowPlaying__dsp_model_checksum_enabled=false</item> + <!-- <item>device_personalization_services/NowPlaying__enable_usage_fa=true</item> --> + <item>device_personalization_services/NowPlaying__favorites_enabled=true</item> + <item>device_personalization_services/NowPlaying__feature_users_count_enabled=true</item> + <!-- <item>device_personalization_services/NowPlaying__federated_analytics_allowed=true</item> --> + <item>device_personalization_services/NowPlaying__handle_ambient_music_results_with_history=true</item> + <item>device_personalization_services/NowPlaying__min_training_interval_millis=86400000</item> + <item>device_personalization_services/NowPlaying__nnfp_v3_model_enabled=true</item> + <item>device_personalization_services/NowPlaying__on_demand_enable_eager_prompt=true</item> + <item>device_personalization_services/NowPlaying__on_demand_fingerprinter_being_setup_warning=true</item> + <item>device_personalization_services/NowPlaying__on_demand_hide_if_fingerprinter_install_not_confirmed=true</item> + <item>device_personalization_services/NowPlaying__on_demand_min_supported_aga_version=12.35.17</item> + <item>device_personalization_services/NowPlaying__on_demand_retry_fingerprinter_install=true</item> + <item>device_personalization_services/NowPlaying__youtube_export_enabled=true</item> + + <!-- Adaptive Sound (Pixel 2020) --> + <item>device_personalization_services/AdaptiveAudio__enable_adaptive_audio=true</item> + <item>device_personalization_services/AdaptiveAudio__show_promo_notification=false</item> + <item>device_personalization_services/AdaptiveAudio__use_silence_detector_state_bug_fix=true</item> + + <!-- Screen attention (Pixel 2019) --> + <item>device_personalization_services/Attention__accel_sensor_enabled=false</item> + <item>device_personalization_services/Attention__accel_sensor_threshold_mss=0.2</item> + <item>device_personalization_services/Attention__enabled=true</item> + <item>device_personalization_services/Attention__margin_horizontal_px=1000</item> + <item>device_personalization_services/Attention__margin_vertical_px=1000</item> + <item>device_personalization_services/Attention__proximity_sensor_enabled=false</item> + + <!-- Recents text selection (for Pixel Launcher users) --> + <item>device_personalization_services/Overview__enable_barcode_detection=false</item> + <item>device_personalization_services/Overview__enable_image_search=false</item> + <item>device_personalization_services/Overview__enable_image_selection=true</item> + <item>device_personalization_services/Overview__enable_japanese_ocr=true</item> + <item>device_personalization_services/Overview__enable_lens_r_overview_long_press=true</item> + <item>device_personalization_services/Overview__enable_lens_r_overview_select_mode=true</item> + <item>device_personalization_services/Overview__enable_lens_r_overview_translate_action=false</item> + <item>device_personalization_services/Overview__enable_overview=true</item> + <item>device_personalization_services/Overview__enable_pir_clearcut_logging=true</item> + <item>device_personalization_services/Overview__enable_pir_westworld_logging=true</item> + <item>device_personalization_services/Overview__enable_proactive_hints=false</item> + <item>device_personalization_services/Overview__enable_superpacks_pir_protocol=true</item> + <item>device_personalization_services/Overview__min_lens_agsa_app_version=301084649</item> + <!-- Disable federated learning --> + <item>device_personalization_services/OverviewFederatedAnalytics__enable_fa=false</item> + <item>device_personalization_services/OverviewFederatedAnalytics__enable_min_training_interval=false</item> + <item>device_personalization_services/OverviewFederatedAnalytics__enable_non_synthetic_logs=false</item> + + <!-- Disable unused AiAi features --> + <item>device_personalization_services/Autofill__enable=false</item> + <item>device_personalization_services/Autofill__enable_fa=false</item> + <item>device_personalization_services/Fedex__enable_fedex=false</item> + <item>device_personalization_services/Logging__enable_aiai_clearcut_logging=false</item> + <item>device_personalization_services/NotificationAssistant__enable_service=false</item> + <item>device_personalization_services/VisualCortex__enable=false</item> + </string-array> +</resources> diff --git a/overlay-lineage/packages/services/Telephony/res/values/config.xml b/overlay-lineage/packages/services/Telephony/res/values/config.xml new file mode 100644 index 00000000..98ff60f3 --- /dev/null +++ b/overlay-lineage/packages/services/Telephony/res/values/config.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright 2021, The LineageOS 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. +--> + +<!-- Phone app resources that may need to be customized + for different hardware or product builds. --> +<resources> + <!-- The package name for the platform carrier config app, bundled with system image. --> + <string name="platform_carrier_config_package" translatable="false">com.google.android.carrier</string> + + <!-- The package names which can request thermal mitigation. --> + <string-array name="thermal_mitigation_allowlisted_packages" translatable="false"> + <item>com.google.android.connectivitythermalpowermanager</item> + </string-array> +</resources> diff --git a/overlay/frameworks/base/core/res/res/values-mcc440-mnc20/config.xml b/overlay/frameworks/base/core/res/res/values-mcc440-mnc20/config.xml new file mode 100644 index 00000000..0fdd49e6 --- /dev/null +++ b/overlay/frameworks/base/core/res/res/values-mcc440-mnc20/config.xml @@ -0,0 +1,30 @@ +<?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. +*/ +--> + +<!-- These resources are around just to allow their values to be customized + for different hardware and product builds. --> +<resources> + <!-- Entitlement APP provisioning for Tethering --> + <string-array translatable="false" name="config_mobile_hotspot_provision_app"> + <item>com.google.android.tetheringentitlement</item> + <item>com.google.android.tetheringentitlement.CarrierEntitlementActivity</item> + </string-array> + <string translatable="false" name="config_mobile_hotspot_provision_app_no_ui">com.google.android.carrierentitlement.SILENT_ENTITLEMENT_CHECK</string> + <string translatable="false" name="config_mobile_hotspot_provision_response">com.google.android.carrierentitlement.SILENT_ENTITLEMENT_CHECK_RESULT</string> +</resources>
\ No newline at end of file diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml new file mode 100755 index 00000000..e413a213 --- /dev/null +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -0,0 +1,340 @@ +<?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. +*/ +--> + +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + + <!-- When true use the linux /dev/input/event subsystem to detect the switch changes + on the headphone/microphone jack. When false use the older uevent framework. --> + <bool name="config_useDevInputEventForAudioJack">true</bool> + + <!-- Indicate whether to allow the device to suspend when the screen is off + due to the proximity sensor. This resource should only be set to true + if the sensor HAL correctly handles the proximity sensor as a wake-up source. + Otherwise, the device may fail to wake out of suspend reliably. + The default is false. --> + <bool name="config_suspendWhenScreenOffDueToProximity">true</bool> + + <!-- Flag indicating whether the we should enable the automatic brightness in Settings. + Software implementation will be used if config_hardware_auto_brightness_available is not set --> + <bool name="config_automatic_brightness_available">true</bool> + + <!-- Enable system navigation keys. --> + <bool name="config_supportSystemNavigationKeys">true</bool> + + <!-- Stability requirements in milliseconds for accepting a new brightness level. This is used + for debouncing the light sensor. Different constants are used to debounce the light sensor + when adapting to brighter or darker environments. This parameter controls how quickly + brightness changes occur in response to an observed change in light level that exceeds the + hysteresis threshold. --> + <integer name="config_autoBrightnessBrighteningLightDebounce">2000</integer> + <integer name="config_autoBrightnessDarkeningLightDebounce">4000</integer> + + <!-- Auto-brightness sensor type string --> + <string name="config_displayLightSensorType">"com.google.sensor.combo_light"</string> + + <!-- If this is true, the screen will come on when you unplug usb/power/whatever. --> + <bool name="config_unplugTurnsOnScreen">true</bool> + + <!-- Enable Night display, which requires HWC 2.0. --> + <bool name="config_nightDisplayAvailable">true</bool> + + <!-- Default color temperature, in Kelvin, to tint the screen when night display is + activated. --> + <integer name="config_nightDisplayColorTemperatureDefault">3339</integer> + + <!-- Boolean indicating whether display white balance is supported. --> + <bool name="config_displayWhiteBalanceAvailable">false</bool> + + <!-- List supported color modes. --> + <integer-array name="config_availableColorModes"> + <item>0</item> <!-- COLOR_MODE_NATURAL --> + <item>1</item> <!-- COLOR_MODE_BOOSTED --> + <item>2</item> <!-- COLOR_MODE_SATURATED --> + <item>3</item> <!-- COLOR_MODE_AUTOMATIC --> + </integer-array> + + <!-- Color mode to use when accessibility transforms are enabled. This color mode must be + supported by the device, but not necessarily appear in config_availableColorModes. The + regularly selected color mode will be used if this value is negative. --> + <integer name="config_accessibilityColorMode">2</integer> + + <!-- The following two arrays specify which color space to use for display composition when a + certain color mode is active. + Composition color spaces are defined in android.view.Display.COLOR_MODE_xxx, and color + modes are defined in ColorDisplayManager.COLOR_MODE_xxx and + ColorDisplayManager.VENDOR_COLOR_MODE_xxx. + The color space COLOR_MODE_DEFAULT (0) lets the system select the most appropriate + composition color space for currently displayed content. Other values (e.g., + COLOR_MODE_SRGB) override system selection; these other color spaces must be supported by + the device for for display composition. + If a color mode does not have a corresponding color space specified in this array, the + currently set composition color space will not be modified.--> + <integer-array name="config_displayCompositionColorModes"> + <item>0</item> <!-- COLOR_MODE_NATURAL --> + <item>1</item> <!-- COLOR_MODE_BOOSTED --> + <item>2</item> <!-- COLOR_MODE_SATURATED --> + <item>3</item> <!-- COLOR_MODE_AUTOMATIC --> + </integer-array> + <integer-array name="config_displayCompositionColorSpaces"> + <item>0</item> <!-- COLOR_MODE_DEFAULT --> + <item>0</item> <!-- COLOR_MODE_DEFAULT --> + <item>0</item> <!-- COLOR_MODE_DEFAULT --> + <item>9</item> <!-- COLOR_MODE_DISPLAY_P3 --> + </integer-array> + + <!-- Boolean indicating whether the HWC setColorTransform function can be performed efficiently + in hardware. --> + <bool name="config_setColorTransformAccelerated">true</bool> + + <!-- Boolean indicating if restoring network selection should be skipped --> + <!-- The restoring is handled by modem if it is true --> + <bool translatable="false" name="skip_restoring_network_selection">true</bool> + + <!-- If device supports pickup/lift gesture --> + <bool name="config_dozePulsePickup">true</bool> + + <!-- reference volume index for music stream to limit headphone volume and display warning --> + <integer name="config_safe_media_volume_index">7</integer> + + <!-- Whether Multiuser UI should be shown --> + <bool name="config_enableMultiUserUI">true</bool> + + <!-- Maximum number of supported users --> + <integer name="config_multiuserMaximumUsers">4</integer> + + <!-- List of regexpressions describing the interface (if any) that represent tetherable + USB interfaces. If the device doesn't want to support tething over USB this should + be empty. An example would be "usb.*" --> + <string-array translatable="false" name="config_tether_usb_regexs"> + <item>"usb\\d"</item> + <item>"rndis\\d"</item> + </string-array> + + <!-- List of regexpressions describing the interface (if any) that represent tetherable + Wifi interfaces. If the device doesn't want to support tethering over Wifi this + should be empty. An example would be "softap.*" --> + <string-array translatable="false" name="config_tether_wifi_regexs"> + <item>"wlan\\d"</item> + </string-array> + + <!-- List of regexpressions describing the interface (if any) that represent tetherable + Wifi P2P interfaces. If the device doesn't want to support tethering over Wifi P2p this + should be empty. An example would be "p2p-p2p.*" --> + <string-array translatable="false" name="config_tether_wifi_p2p_regexs"> + <item>"p2p-p2p\\d-.*"</item> + </string-array> + + <!-- The default intensity level for alarm vibrations. See + Settings.System.ALARM_VIBRATION_INTENSITY more details on the constant values and + meanings. --> + <integer name="config_defaultAlarmVibrationIntensity">3</integer> + <!-- The default intensity level for haptic feedback. See + Settings.System.HAPTIC_FEEDBACK_INTENSITY more details on the constant values and + meanings. --> + <integer name="config_defaultHapticFeedbackIntensity">3</integer> + <!-- The default intensity level for media vibrations. See + Settings.System.MEDIA_VIBRATION_INTENSITY more details on the constant values and + meanings. --> + <integer name="config_defaultMediaVibrationIntensity">3</integer> + <!-- The default intensity level for notification vibrations. See + Settings.System.NOTIFICATION_VIBRATION_INTENSITY more details on the constant values and + meanings. --> + <integer name="config_defaultNotificationVibrationIntensity">3</integer> + <!-- The default intensity level for notification vibrations. See + Settings.System.RING_VIBRATION_INTENSITY more details on the constant values and + meanings. --> + <integer name="config_defaultRingVibrationIntensity">3</integer> + + <!-- List of regexpressions describing the interface (if any) that represent tetherable + bluetooth interfaces. If the device doesn't want to support tethering over bluetooth this + should be empty. --> + <string-array translatable="false" name="config_tether_bluetooth_regexs"> + <item>"bt-pan"</item> + </string-array> + + <bool translatable="false" name="config_tether_upstream_automatic">true</bool> + + <!-- This string array should be overridden by the device to present a list of network + attributes. This is used by the connectivity manager to decide which networks can coexist + based on the hardware --> + <!-- An Array of "[Connection name],[ConnectivityManager.TYPE_xxxx], + [associated radio-type],[priority],[restoral-timer(ms)],[dependencyMet] --> + <!-- the 5th element "resore-time" indicates the number of milliseconds to delay + before automatically restore the default connection. Set -1 if the connection + does not require auto-restore. --> + <!-- the 6th element indicates boot-time dependency-met value. --> + <string-array translatable="false" name="networkAttributes"> + <item>"wifi,1,1,1,-1,true"</item> + <item>"mobile,0,0,0,-1,true"</item> + <item>"mobile_mms,2,0,2,60000,true"</item> + <item>"mobile_supl,3,0,2,60000,true"</item> + <item>"mobile_dun,4,0,2,60000,true"</item> + <item>"mobile_hipri,5,0,3,60000,true"</item> + <item>"mobile_fota,10,0,2,60000,true"</item> + <item>"mobile_ims,11,0,2,60000,true"</item> + <item>"mobile_cbs,12,0,2,60000,true"</item> + <item>"mobile_ia,14,0,2,-1,true"</item> + <item>"bluetooth,7,7,2,-1,true"</item> + <item>"ethernet,9,9,9,-1,true"</item> + <item>"mobile_emergency,15,0,2,-1,true</item> + </string-array> + + <!-- This string array should be overridden by the device to present a list of radio + attributes. This is used by the connectivity manager to decide which networks can coexist + based on the hardware --> + <!-- An Array of "[ConnectivityManager connectionType], + [# simultaneous connection types]" --> + <string-array translatable="false" name="radioAttributes"> + <item>"1,1"</item> + <item>"0,1"</item> + <item>"7,1"</item> + <item>"9,1"</item> + </string-array> + + <!-- Specifies whether to decouple the auto-suspend state of the device from the display on/off state. --> + <bool name="config_powerDecoupleAutoSuspendModeFromDisplay">true</bool> + + <!-- Specifies whether to decouple the interactive state of the device from the display on/off state. --> + <bool name="config_powerDecoupleInteractiveModeFromDisplay">true</bool> + + <!-- Is the device capable of hot swapping an UICC Card --> + <bool name="config_hotswapCapable">true</bool> + + <!-- Flag specifying whether VoLTE is availasble on device --> + <bool name="config_device_volte_available">true</bool> + + <!-- Flag specifying whether VoLTE is available on device --> + <bool name="config_device_vt_available">true</bool> + + <!-- Enable video pause workaround when enabling/disabling the camera. --> + <bool name="config_useVideoPauseWorkaround">true</bool> + + <!-- Flag specifying whether WFC over IMS is availasble on device --> + <bool name="config_device_wfc_ims_available">true</bool> + + <!-- Configure mobile tcp buffer sizes in the form: + rat-name:rmem_min,rmem_def,rmem_max,wmem_min,wmem_def,wmem_max + If no value is found for the rat-name in use, the system default will be applied. + --> + <string-array name="config_mobile_tcp_buffers"> + <item>umts:131072,262144,1452032,4096,16384,399360</item> + <item>hspa:131072,262144,2441216,4096,16384,399360</item> + <item>hsupa:131072,262144,2441216,4096,16384,399360</item> + <item>hsdpa:131072,262144,2441216,4096,16384,399360</item> + <item>hspap:131072,262144,2441216,4096,16384,399360</item> + <item>edge:16384,32768,131072,4096,16384,65536</item> + <item>gprs:4096,8192,24576,4096,8192,24576</item> + <item>1xrtt:16384,32768,131070,4096,16384,102400</item> + <item>evdo:131072,262144,1048576,4096,16384,524288</item> + <item>lte:524288,1048576,8388608,262144,524288,4194304</item> + <item>nr:2097152,6291456,16777216,512000,2097152,8388608</item> + <item>nr_sa:2097152,6291456,16777216,512000,2097152,8388608</item> + </string-array> + + <!-- Config determines whether to update phone object when voice registration + state changes. Voice radio tech change will always trigger an update of + phone object irrespective of this config --> + <bool name="config_switch_phone_on_voice_reg_state_change">false</bool> + + <!-- Number of physical SIM slots on the device. This includes both eSIM and pSIM slots, and + is not necessarily the same as the number of phones/logical modems supported by the device. + For example, a multi-sim device can have 2 phones/logical modems, but 3 physical slots, + or a single SIM device can have 1 phones/logical modems, but 2 physical slots (one eSIM + and one pSIM) --> + <integer name="config_num_physical_slots">2</integer> + + <!-- Disables compatibility WAL mode. + In this mode, only database journal mode will be changed, connection pool + size will still be limited to a single connection. --> + <bool name="db_compatibility_wal_supported">false</bool> + + <!-- Use ERI text for network name on CDMA LTE --> + <bool name="config_LTE_eri_for_network_name">false</bool> + + <!-- Default list of files pinned by the Pinner Service --> + <string-array translatable="false" name="config_defaultPinnerServiceFiles"> + <item>"/apex/com.android.art/javalib/core-oj.jar"</item> + <item>"/apex/com.android.art/javalib/core-libart.jar"</item> + <item>"/system/framework/framework.jar"</item> + <item>"/system/framework/services.jar"</item> + <item>"/system/bin/surfaceflinger"</item> + <item>"/system_ext/priv-app/SystemUI/SystemUI.apk"</item> + <item>"/vendor/lib64/lib_aion_buffer.so"</item> + <item>"/vendor/lib64/libcamxexternalformatutils.so"</item> + <item>"/vendor/lib64/libipebpsstriping.so"</item> + <item>"/vendor/lib64/libCB.so"</item> + <item>"/vendor/lib64/libgsl.so"</item> + </string-array> + + <!-- Bytes that the PinnerService will pin for Home app --> + <integer name="config_pinnerHomePinBytes">6291456</integer> + + <!-- True if Unprocessed audio source supports the required frequency range and level --> + <bool name="config_supportAudioSourceUnprocessed">true</bool> + + + <!-- Whether the new Auto Selection Network UI should be shown --> + <bool name="config_enableNewAutoSelectNetworkUI">true</bool> + + <string name="config_wlan_data_service_package">vendor.qti.iwlan</string> + <string name="config_wlan_network_service_package">vendor.qti.iwlan</string> + <string name="config_qualified_networks_service_package">vendor.qti.iwlan</string> + + <!-- Enables or disables haptic effect when the text insertion/selection handle is moved + manually by the user. Off by default, since the expected haptic feedback may not be + available on some devices. --> + <bool name="config_enableHapticTextHandle">true</bool> + <!-- Enable Zram writeback feature to allow unused pages in zram be written to flash. --> + <bool name="config_zramWriteback">true</bool> + + <!-- Array of light sensor LUX values to define our levels for auto backlight brightness support. + The N entries of this array define N 1 zones as follows: + Zone 0: 0 <= LUX < array[0] + Zone 1: array[0] <= LUX < array[1] + ... + Zone N: array[N - 1] <= LUX < array[N] + Zone N + 1 array[N] <= LUX < infinity + Must be overridden in platform specific overlays --> + <integer-array name="config_autoBrightnessLevels"> + <item>1</item> + <item>2</item> + <item>3</item> + <item>4</item> + <item>8</item> + <item>12</item> + <item>20</item> + <item>33</item> + <item>55</item> + <item>90</item> + <item>148</item> + <item>245</item> + <item>403</item> + <item>665</item> + <item>1097</item> + <item>1808</item> + <item>2981</item> + <item>5000</item> + <item>10000</item> + </integer-array> + + <!-- Whether the device enable the standalone (SA) mode of 5G NR.--> + <bool name="config_telephony5gStandalone">true</bool> + <!-- Whether the device enable the non-standalone (NSA) mode of 5G NR.--> + <bool name="config_telephony5gNonStandalone">true</bool> +</resources> diff --git a/overlay/frameworks/base/core/res/res/values/strings.xml b/overlay/frameworks/base/core/res/res/values/strings.xml new file mode 100644 index 00000000..e1daaadc --- /dev/null +++ b/overlay/frameworks/base/core/res/res/values/strings.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** Copyright 2017, The Android Open Source Project +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ +--> + +<!-- These resources are around just to allow their values to be customized + for different hardware and product builds. Do not translate. --> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <!-- Do not translate. Default access point SSID used for tethering --> + <string name="wifi_tether_configure_ssid_default" translatable="false">Pixel</string> +</resources> diff --git a/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc004/ic_5g_plus_mobiledata.xml b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc004/ic_5g_plus_mobiledata.xml new file mode 100644 index 00000000..998db3b4 --- /dev/null +++ b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc004/ic_5g_plus_mobiledata.xml @@ -0,0 +1,36 @@ +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:viewportWidth="22" + android:viewportHeight="17" + android:width="22dp" + android:height="17dp"> + <group> + <group> + <path android:fillColor="#FF000000" + android:pathData="M19.98,3.54v2.81c0,0.47 -0.15,0.84 -0.44,1.11s-0.69,0.41 -1.2,0.41c-0.5,0 -0.89,-0.13 -1.19,-0.4s-0.44,-0.63 -0.45,-1.09V3.54h0.88v2.82c0,0.28 0.07,0.48 0.2,0.61c0.13,0.13 0.32,0.19 0.56,0.19c0.49,0 0.75,-0.26 0.75,-0.78V3.54H19.98z"/> + <path android:fillColor="#FF000000" + android:pathData="M19.42,12.25l0.57,-3.04h0.88l-0.95,4.27h-0.88l-0.69,-2.85l-0.69,2.85h-0.88l-0.95,-4.27h0.88l0.58,3.03l0.7,-3.03h0.74L19.42,12.25z"/> + </group> + <group> + <path android:fillColor="#FF000000" + android:pathData="M0.94,8.49l0.43,-4.96H5.7v1.17H2.39L2.15,7.41c0.41,-0.29 0.85,-0.43 1.33,-0.43c0.77,0 1.38,0.3 1.83,0.9c0.44,0.6 0.66,1.41 0.66,2.43c0,1.03 -0.24,1.84 -0.72,2.43c-0.48,0.59 -1.14,0.88 -1.98,0.88c-0.75,0 -1.36,-0.24 -1.83,-0.73c-0.47,-0.49 -0.74,-1.16 -0.81,-2.02h1.13c0.07,0.57 0.23,1 0.49,1.29c0.26,0.29 0.59,0.43 1.01,0.43c0.47,0 0.84,-0.2 1.1,-0.61c0.26,-0.41 0.4,-0.96 0.4,-1.65c0,-0.65 -0.14,-1.18 -0.43,-1.59C4.05,8.32 3.67,8.11 3.19,8.11c-0.4,0 -0.72,0.1 -0.96,0.31L1.9,8.75L0.94,8.49z"/> + </group> + <path android:fillColor="#FF000000" + android:pathData="M13.86,12.24l-0.22,0.27c-0.63,0.73 -1.55,1.1 -2.76,1.1c-1.08,0 -1.92,-0.36 -2.53,-1.07c-0.61,-0.71 -0.93,-1.72 -0.94,-3.02V7.56c0,-1.39 0.28,-2.44 0.84,-3.13c0.56,-0.7 1.39,-1.04 2.51,-1.04c0.95,0 1.69,0.26 2.22,0.79c0.54,0.53 0.83,1.28 0.89,2.26h-1.25c-0.05,-0.62 -0.22,-1.1 -0.52,-1.45c-0.29,-0.35 -0.74,-0.52 -1.34,-0.52c-0.72,0 -1.24,0.23 -1.57,0.7C8.85,5.63 8.68,6.37 8.66,7.4v2.03c0,1 0.19,1.77 0.57,2.31c0.38,0.54 0.93,0.8 1.65,0.8c0.67,0 1.19,-0.16 1.54,-0.49l0.18,-0.17V9.59h-1.82V8.52h3.07V12.24z"/> + </group> +</vector> + diff --git a/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc030/ic_5g_e_mobiledata.xml b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc030/ic_5g_e_mobiledata.xml new file mode 100644 index 00000000..9577bb7f --- /dev/null +++ b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc030/ic_5g_e_mobiledata.xml @@ -0,0 +1,3 @@ +<vector android:width="31.05dp" android:height="11.5dp" android:viewportWidth="27" android:viewportHeight="10" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:pathData="M19.3585 9.45946l2.6848-5.67568h4.5436l-.4956 1.05406h-2.974l-.537 1.13513h2.437l-.5369 1.05406h-2.3958l-.6608 1.37837h3.2631l-.4544 1.05406h-4.874zM12.7772 3.82432c1.1565-1.5 3.3044-1.58108 3.7174-1.58108h.2892c1.1565 0 2.1479-.68919 2.6022-1.662159 0-.04054 0-.081081-.0413-.081081h-2.8501c-2.3544.040541-3.8827.77027-4.9153 1.78378-.6196.64865-.9913 1.25676-1.1153 1.58108-.2478.52703-.4543 1.05406-.57823 1.54055-.33044 1.33783.04131 2.43243.53693 3C11.0423 9.09459 12.075 9.5 13.438 9.5c2.0653 0 3.511-1.01351 3.511-1.01351l2.1479-4.62163c0-.04054 0-.08108-.0413-.08108h-3.2631c-1.0327 0-1.6936.68919-2.0653 1.62163h2.5196l-.8261 1.7027c-.0413.04054-.7848.44594-1.7348.44594-.4131 0-.9914-.12162-1.3631-.48648-.3718-.40541-.4544-1.05406-.2891-1.66216.1652-.64865.413-1.13514.7435-1.58109zM8.39878 4.27026c-.49567-.40541-1.11525-.48649-1.98267-.48649H4.68128l.7022-1.5h2.72616c1.15655 0 2.14786-.68919 2.60226-1.662162 0-.04054 0-.081081-.0413-.081081H4.14431L1.83121 5.40539h4.04793c.82611 0 .99133.44595.82611.93243-.16522.44595-.66089.77027-1.03263.93244-.41306.2027-.99134.32432-1.65222.32432-.53697 0-.99133-.04054-1.61092-.2027-.24783-.08108-.61958-.20271-1.07394-.40541L.509434 8.72972c.950026.44594 2.313106.72972 3.180516.72972.82611 0 1.98267-.16216 2.68486-.4054.66089-.28378 1.19786-.56757 1.65222-1.0946.45436-.52702.82611-1.21621.90872-1.94594.08261-.72973-.20653-1.41892-.53697-1.74324z" android:fillColor="#000000"/> +</vector> diff --git a/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc030/ic_5g_mobiledata.xml b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc030/ic_5g_mobiledata.xml new file mode 100644 index 00000000..68b795a7 --- /dev/null +++ b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc030/ic_5g_mobiledata.xml @@ -0,0 +1,3 @@ +<vector android:width="24.15dp" android:height="11.5dp" android:viewportWidth="21" android:viewportHeight="10" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:pathData="M11.489.608155c-.2515.493765-.6471.912165-1.1418 1.207735-.49467.29556-1.06868.45645-1.65686.46441H5.80602l-.80845 1.57309h1.83866c.7381-.06189 1.47575.12298 2.08008.52132.23591.20438.41399.45957.51852.74302.10452.28345.13227.58643.0808.8822-.14311.72341-.49148 1.39827-1.00916 1.95496-.47447.50268-1.07724.88672-1.75305 1.11693-.91702.28554-1.87928.42565-2.84642.41445-1.16311-.02438-2.30892-.26687-3.36854-.71291L1.462 6.98001c.36983.16678.75383.30496 1.14811.41315.55703.14675 1.13333.22088 1.71235.22026.60086.01484 1.19761-.09608 1.74603-.32452.46883-.19475.85346-.53033 1.09196-.95272.1951-.46398.01825-.92795-.85897-.92795H1.99535L4.50913.520833h6.91957c.0111-.000103.0222.002427.032.007353.0098.004927.0181.012089.0242.020815.006.008725.0095.01873.0103.029076.0007.010346-.0014.020695-.0062.030078zm1.3236 4.797465c-.1047.27913-.1338.57788-.0849.86993.049.29204.1745.56843.3656.80482.3875.33116.8997.50763 1.426.49134.6541-.00559 1.2969-.15807 1.8738-.44442l.8884-1.72167h-2.6962c.139-.44273.4272-.83242.8223-1.11181.3951-.27939.8763-.43375 1.3729-.44042h3.4836c.0099-.00002.0197.00231.0285.00676.0087.00445.016.01088.0214.01869.0053.0078.0084.01673.009.02596.0006.00922-.0013.01843-.0056.02678L17.9805 8.4723c-1.1188.65827-2.4146 1.01058-3.7391 1.01658-.5808.04128-1.1644-.03266-1.712-.21692-.5476-.18426-1.0468-.47462-1.4642-.85179-.3456-.42459-.5757-.92035-.6707-1.44517-.0951-.52482-.0523-1.06319.1247-1.56938.3402-1.47404 1.2466-2.78269 2.5499-3.68159C14.3724.825134 15.9835.397447 17.6015.520833h3.0093c.0111-.000103.0221.002427.032.007353.0098.004927.0181.012089.0241.020815.0061.008725.0096.01873.0104.029076.0007.010346-.0014.020695-.0062.030078-.2515.493765-.6471.912165-1.1418 1.207735-.4947.29556-1.0687.45645-1.6569.46441h-.2709c-1.0664-.08438-2.1308.18258-3.0065.75405-.8756.57147-1.5067 1.41097-1.7824 2.37127z" android:fillColor="#000000"/> +</vector> diff --git a/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc030/ic_5g_plus_mobiledata.xml b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc030/ic_5g_plus_mobiledata.xml new file mode 100644 index 00000000..0c7d770a --- /dev/null +++ b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc030/ic_5g_plus_mobiledata.xml @@ -0,0 +1,3 @@ +<vector android:width="33.35dp" android:height="11.5dp" android:viewportWidth="29" android:viewportHeight="10" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:pathData="M11.6748.608155c-.2556.493765-.6575.912165-1.1602 1.207735-.5027.29556-1.08602.45645-1.68372.46441H5.89992L5.0784 3.85339h1.8684c.75003-.06189 1.49961.12298 2.11371.52132.23973.20438.42069.45957.52691.74302.10621.28345.13441.58643.0821.8822-.14542.72341-.49942 1.39827-1.02548 1.95496-.48214.50268-1.09465.88672-1.78139 1.11693-.93186.28554-1.90968.42565-2.89246.41445-1.18192-.02438-2.34626-.26687-3.423017-.71291l.938477-1.79335c.37581.16678.76602.30496 1.16668.41315.56604.14675 1.15166.22088 1.74004.22026.61057.01484 1.21697-.09608 1.77426-.32452.47642-.19475.86727-.53033 1.10963-.95272.19825-.46398.01854-.92795-.87287-.92795H2.02763L4.58206.520833h7.03144c.0114-.000103.0225.002427.0325.007353.01.004927.0185.012089.0246.020815.0061.008725.0097.01873.0105.029076.0007.010346-.0014.020695-.0063.030078zm1.345 4.797465c-.1064.27913-.136.57788-.0862.86993.0497.29204.1773.56843.3715.80482.3937.33116.9142.50763 1.449.49134.6647-.00559 1.3179-.15807 1.9041-.44442l.9028-1.72167h-2.7398c.1412-.44273.4341-.83242.8356-1.11181.4015-.27939.8904-.43375 1.395-.44042h3.54c.0101-.00002.0201.00231.0289.00676.0089.00445.0164.01088.0218.01869.0054.0078.0086.01673.0092.02596.0006.00922-.0014.01843-.0057.02678L18.2713 8.4723c-1.1369.65827-2.4537 1.01058-3.7996 1.01658-.5901.04128-1.1832-.03266-1.7397-.21692-.5564-.18426-1.0637-.47462-1.4879-.85179-.3511-.42459-.5849-.92035-.6815-1.44517-.0966-.52482-.0531-1.06319.1267-1.56938.3458-1.47404 1.2668-2.78269 2.5912-3.68159C14.6049.825134 16.242.397447 17.8862.520833h3.0579c.0113-.000103.0225.002427.0325.007353.01.004927.0185.012089.0246.020815.0061.008725.0097.01873.0105.029076.0007.010346-.0014.020695-.0063.030078-.2556.493765-.6576.912165-1.1603 1.207735-.5026.29556-1.0859.45645-1.6836.46441h-.2753c-1.0837-.08438-2.1653.18258-3.0551.75405-.8898.57147-1.5311 1.41097-1.8113 2.37127zM25.8818 5.79662l1.0041-1.9341h-2.0167l-1.0027 1.9341h-2.3448l-.8044 1.54703h2.3462l-1.0026 1.9328h2.0167l1.0026-1.9328h2.4504l.8029-1.54703h-2.4517z" android:fillColor="#000000"/> +</vector> diff --git a/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc150/ic_5g_e_mobiledata.xml b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc150/ic_5g_e_mobiledata.xml new file mode 100644 index 00000000..9577bb7f --- /dev/null +++ b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc150/ic_5g_e_mobiledata.xml @@ -0,0 +1,3 @@ +<vector android:width="31.05dp" android:height="11.5dp" android:viewportWidth="27" android:viewportHeight="10" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:pathData="M19.3585 9.45946l2.6848-5.67568h4.5436l-.4956 1.05406h-2.974l-.537 1.13513h2.437l-.5369 1.05406h-2.3958l-.6608 1.37837h3.2631l-.4544 1.05406h-4.874zM12.7772 3.82432c1.1565-1.5 3.3044-1.58108 3.7174-1.58108h.2892c1.1565 0 2.1479-.68919 2.6022-1.662159 0-.04054 0-.081081-.0413-.081081h-2.8501c-2.3544.040541-3.8827.77027-4.9153 1.78378-.6196.64865-.9913 1.25676-1.1153 1.58108-.2478.52703-.4543 1.05406-.57823 1.54055-.33044 1.33783.04131 2.43243.53693 3C11.0423 9.09459 12.075 9.5 13.438 9.5c2.0653 0 3.511-1.01351 3.511-1.01351l2.1479-4.62163c0-.04054 0-.08108-.0413-.08108h-3.2631c-1.0327 0-1.6936.68919-2.0653 1.62163h2.5196l-.8261 1.7027c-.0413.04054-.7848.44594-1.7348.44594-.4131 0-.9914-.12162-1.3631-.48648-.3718-.40541-.4544-1.05406-.2891-1.66216.1652-.64865.413-1.13514.7435-1.58109zM8.39878 4.27026c-.49567-.40541-1.11525-.48649-1.98267-.48649H4.68128l.7022-1.5h2.72616c1.15655 0 2.14786-.68919 2.60226-1.662162 0-.04054 0-.081081-.0413-.081081H4.14431L1.83121 5.40539h4.04793c.82611 0 .99133.44595.82611.93243-.16522.44595-.66089.77027-1.03263.93244-.41306.2027-.99134.32432-1.65222.32432-.53697 0-.99133-.04054-1.61092-.2027-.24783-.08108-.61958-.20271-1.07394-.40541L.509434 8.72972c.950026.44594 2.313106.72972 3.180516.72972.82611 0 1.98267-.16216 2.68486-.4054.66089-.28378 1.19786-.56757 1.65222-1.0946.45436-.52702.82611-1.21621.90872-1.94594.08261-.72973-.20653-1.41892-.53697-1.74324z" android:fillColor="#000000"/> +</vector> diff --git a/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc150/ic_5g_mobiledata.xml b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc150/ic_5g_mobiledata.xml new file mode 100644 index 00000000..68b795a7 --- /dev/null +++ b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc150/ic_5g_mobiledata.xml @@ -0,0 +1,3 @@ +<vector android:width="24.15dp" android:height="11.5dp" android:viewportWidth="21" android:viewportHeight="10" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:pathData="M11.489.608155c-.2515.493765-.6471.912165-1.1418 1.207735-.49467.29556-1.06868.45645-1.65686.46441H5.80602l-.80845 1.57309h1.83866c.7381-.06189 1.47575.12298 2.08008.52132.23591.20438.41399.45957.51852.74302.10452.28345.13227.58643.0808.8822-.14311.72341-.49148 1.39827-1.00916 1.95496-.47447.50268-1.07724.88672-1.75305 1.11693-.91702.28554-1.87928.42565-2.84642.41445-1.16311-.02438-2.30892-.26687-3.36854-.71291L1.462 6.98001c.36983.16678.75383.30496 1.14811.41315.55703.14675 1.13333.22088 1.71235.22026.60086.01484 1.19761-.09608 1.74603-.32452.46883-.19475.85346-.53033 1.09196-.95272.1951-.46398.01825-.92795-.85897-.92795H1.99535L4.50913.520833h6.91957c.0111-.000103.0222.002427.032.007353.0098.004927.0181.012089.0242.020815.006.008725.0095.01873.0103.029076.0007.010346-.0014.020695-.0062.030078zm1.3236 4.797465c-.1047.27913-.1338.57788-.0849.86993.049.29204.1745.56843.3656.80482.3875.33116.8997.50763 1.426.49134.6541-.00559 1.2969-.15807 1.8738-.44442l.8884-1.72167h-2.6962c.139-.44273.4272-.83242.8223-1.11181.3951-.27939.8763-.43375 1.3729-.44042h3.4836c.0099-.00002.0197.00231.0285.00676.0087.00445.016.01088.0214.01869.0053.0078.0084.01673.009.02596.0006.00922-.0013.01843-.0056.02678L17.9805 8.4723c-1.1188.65827-2.4146 1.01058-3.7391 1.01658-.5808.04128-1.1644-.03266-1.712-.21692-.5476-.18426-1.0468-.47462-1.4642-.85179-.3456-.42459-.5757-.92035-.6707-1.44517-.0951-.52482-.0523-1.06319.1247-1.56938.3402-1.47404 1.2466-2.78269 2.5499-3.68159C14.3724.825134 15.9835.397447 17.6015.520833h3.0093c.0111-.000103.0221.002427.032.007353.0098.004927.0181.012089.0241.020815.0061.008725.0096.01873.0104.029076.0007.010346-.0014.020695-.0062.030078-.2515.493765-.6471.912165-1.1418 1.207735-.4947.29556-1.0687.45645-1.6569.46441h-.2709c-1.0664-.08438-2.1308.18258-3.0065.75405-.8756.57147-1.5067 1.41097-1.7824 2.37127z" android:fillColor="#000000"/> +</vector> diff --git a/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc150/ic_5g_plus_mobiledata.xml b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc150/ic_5g_plus_mobiledata.xml new file mode 100644 index 00000000..0c7d770a --- /dev/null +++ b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc150/ic_5g_plus_mobiledata.xml @@ -0,0 +1,3 @@ +<vector android:width="33.35dp" android:height="11.5dp" android:viewportWidth="29" android:viewportHeight="10" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:pathData="M11.6748.608155c-.2556.493765-.6575.912165-1.1602 1.207735-.5027.29556-1.08602.45645-1.68372.46441H5.89992L5.0784 3.85339h1.8684c.75003-.06189 1.49961.12298 2.11371.52132.23973.20438.42069.45957.52691.74302.10621.28345.13441.58643.0821.8822-.14542.72341-.49942 1.39827-1.02548 1.95496-.48214.50268-1.09465.88672-1.78139 1.11693-.93186.28554-1.90968.42565-2.89246.41445-1.18192-.02438-2.34626-.26687-3.423017-.71291l.938477-1.79335c.37581.16678.76602.30496 1.16668.41315.56604.14675 1.15166.22088 1.74004.22026.61057.01484 1.21697-.09608 1.77426-.32452.47642-.19475.86727-.53033 1.10963-.95272.19825-.46398.01854-.92795-.87287-.92795H2.02763L4.58206.520833h7.03144c.0114-.000103.0225.002427.0325.007353.01.004927.0185.012089.0246.020815.0061.008725.0097.01873.0105.029076.0007.010346-.0014.020695-.0063.030078zm1.345 4.797465c-.1064.27913-.136.57788-.0862.86993.0497.29204.1773.56843.3715.80482.3937.33116.9142.50763 1.449.49134.6647-.00559 1.3179-.15807 1.9041-.44442l.9028-1.72167h-2.7398c.1412-.44273.4341-.83242.8356-1.11181.4015-.27939.8904-.43375 1.395-.44042h3.54c.0101-.00002.0201.00231.0289.00676.0089.00445.0164.01088.0218.01869.0054.0078.0086.01673.0092.02596.0006.00922-.0014.01843-.0057.02678L18.2713 8.4723c-1.1369.65827-2.4537 1.01058-3.7996 1.01658-.5901.04128-1.1832-.03266-1.7397-.21692-.5564-.18426-1.0637-.47462-1.4879-.85179-.3511-.42459-.5849-.92035-.6815-1.44517-.0966-.52482-.0531-1.06319.1267-1.56938.3458-1.47404 1.2668-2.78269 2.5912-3.68159C14.6049.825134 16.242.397447 17.8862.520833h3.0579c.0113-.000103.0225.002427.0325.007353.01.004927.0185.012089.0246.020815.0061.008725.0097.01873.0105.029076.0007.010346-.0014.020695-.0063.030078-.2556.493765-.6576.912165-1.1603 1.207735-.5026.29556-1.0859.45645-1.6836.46441h-.2753c-1.0837-.08438-2.1653.18258-3.0551.75405-.8898.57147-1.5311 1.41097-1.8113 2.37127zM25.8818 5.79662l1.0041-1.9341h-2.0167l-1.0027 1.9341h-2.3448l-.8044 1.54703h2.3462l-1.0026 1.9328h2.0167l1.0026-1.9328h2.4504l.8029-1.54703h-2.4517z" android:fillColor="#000000"/> +</vector> diff --git a/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc170/ic_5g_e_mobiledata.xml b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc170/ic_5g_e_mobiledata.xml new file mode 100644 index 00000000..9577bb7f --- /dev/null +++ b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc170/ic_5g_e_mobiledata.xml @@ -0,0 +1,3 @@ +<vector android:width="31.05dp" android:height="11.5dp" android:viewportWidth="27" android:viewportHeight="10" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:pathData="M19.3585 9.45946l2.6848-5.67568h4.5436l-.4956 1.05406h-2.974l-.537 1.13513h2.437l-.5369 1.05406h-2.3958l-.6608 1.37837h3.2631l-.4544 1.05406h-4.874zM12.7772 3.82432c1.1565-1.5 3.3044-1.58108 3.7174-1.58108h.2892c1.1565 0 2.1479-.68919 2.6022-1.662159 0-.04054 0-.081081-.0413-.081081h-2.8501c-2.3544.040541-3.8827.77027-4.9153 1.78378-.6196.64865-.9913 1.25676-1.1153 1.58108-.2478.52703-.4543 1.05406-.57823 1.54055-.33044 1.33783.04131 2.43243.53693 3C11.0423 9.09459 12.075 9.5 13.438 9.5c2.0653 0 3.511-1.01351 3.511-1.01351l2.1479-4.62163c0-.04054 0-.08108-.0413-.08108h-3.2631c-1.0327 0-1.6936.68919-2.0653 1.62163h2.5196l-.8261 1.7027c-.0413.04054-.7848.44594-1.7348.44594-.4131 0-.9914-.12162-1.3631-.48648-.3718-.40541-.4544-1.05406-.2891-1.66216.1652-.64865.413-1.13514.7435-1.58109zM8.39878 4.27026c-.49567-.40541-1.11525-.48649-1.98267-.48649H4.68128l.7022-1.5h2.72616c1.15655 0 2.14786-.68919 2.60226-1.662162 0-.04054 0-.081081-.0413-.081081H4.14431L1.83121 5.40539h4.04793c.82611 0 .99133.44595.82611.93243-.16522.44595-.66089.77027-1.03263.93244-.41306.2027-.99134.32432-1.65222.32432-.53697 0-.99133-.04054-1.61092-.2027-.24783-.08108-.61958-.20271-1.07394-.40541L.509434 8.72972c.950026.44594 2.313106.72972 3.180516.72972.82611 0 1.98267-.16216 2.68486-.4054.66089-.28378 1.19786-.56757 1.65222-1.0946.45436-.52702.82611-1.21621.90872-1.94594.08261-.72973-.20653-1.41892-.53697-1.74324z" android:fillColor="#000000"/> +</vector> diff --git a/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc170/ic_5g_mobiledata.xml b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc170/ic_5g_mobiledata.xml new file mode 100644 index 00000000..68b795a7 --- /dev/null +++ b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc170/ic_5g_mobiledata.xml @@ -0,0 +1,3 @@ +<vector android:width="24.15dp" android:height="11.5dp" android:viewportWidth="21" android:viewportHeight="10" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:pathData="M11.489.608155c-.2515.493765-.6471.912165-1.1418 1.207735-.49467.29556-1.06868.45645-1.65686.46441H5.80602l-.80845 1.57309h1.83866c.7381-.06189 1.47575.12298 2.08008.52132.23591.20438.41399.45957.51852.74302.10452.28345.13227.58643.0808.8822-.14311.72341-.49148 1.39827-1.00916 1.95496-.47447.50268-1.07724.88672-1.75305 1.11693-.91702.28554-1.87928.42565-2.84642.41445-1.16311-.02438-2.30892-.26687-3.36854-.71291L1.462 6.98001c.36983.16678.75383.30496 1.14811.41315.55703.14675 1.13333.22088 1.71235.22026.60086.01484 1.19761-.09608 1.74603-.32452.46883-.19475.85346-.53033 1.09196-.95272.1951-.46398.01825-.92795-.85897-.92795H1.99535L4.50913.520833h6.91957c.0111-.000103.0222.002427.032.007353.0098.004927.0181.012089.0242.020815.006.008725.0095.01873.0103.029076.0007.010346-.0014.020695-.0062.030078zm1.3236 4.797465c-.1047.27913-.1338.57788-.0849.86993.049.29204.1745.56843.3656.80482.3875.33116.8997.50763 1.426.49134.6541-.00559 1.2969-.15807 1.8738-.44442l.8884-1.72167h-2.6962c.139-.44273.4272-.83242.8223-1.11181.3951-.27939.8763-.43375 1.3729-.44042h3.4836c.0099-.00002.0197.00231.0285.00676.0087.00445.016.01088.0214.01869.0053.0078.0084.01673.009.02596.0006.00922-.0013.01843-.0056.02678L17.9805 8.4723c-1.1188.65827-2.4146 1.01058-3.7391 1.01658-.5808.04128-1.1644-.03266-1.712-.21692-.5476-.18426-1.0468-.47462-1.4642-.85179-.3456-.42459-.5757-.92035-.6707-1.44517-.0951-.52482-.0523-1.06319.1247-1.56938.3402-1.47404 1.2466-2.78269 2.5499-3.68159C14.3724.825134 15.9835.397447 17.6015.520833h3.0093c.0111-.000103.0221.002427.032.007353.0098.004927.0181.012089.0241.020815.0061.008725.0096.01873.0104.029076.0007.010346-.0014.020695-.0062.030078-.2515.493765-.6471.912165-1.1418 1.207735-.4947.29556-1.0687.45645-1.6569.46441h-.2709c-1.0664-.08438-2.1308.18258-3.0065.75405-.8756.57147-1.5067 1.41097-1.7824 2.37127z" android:fillColor="#000000"/> +</vector> diff --git a/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc170/ic_5g_plus_mobiledata.xml b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc170/ic_5g_plus_mobiledata.xml new file mode 100644 index 00000000..0c7d770a --- /dev/null +++ b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc170/ic_5g_plus_mobiledata.xml @@ -0,0 +1,3 @@ +<vector android:width="33.35dp" android:height="11.5dp" android:viewportWidth="29" android:viewportHeight="10" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:pathData="M11.6748.608155c-.2556.493765-.6575.912165-1.1602 1.207735-.5027.29556-1.08602.45645-1.68372.46441H5.89992L5.0784 3.85339h1.8684c.75003-.06189 1.49961.12298 2.11371.52132.23973.20438.42069.45957.52691.74302.10621.28345.13441.58643.0821.8822-.14542.72341-.49942 1.39827-1.02548 1.95496-.48214.50268-1.09465.88672-1.78139 1.11693-.93186.28554-1.90968.42565-2.89246.41445-1.18192-.02438-2.34626-.26687-3.423017-.71291l.938477-1.79335c.37581.16678.76602.30496 1.16668.41315.56604.14675 1.15166.22088 1.74004.22026.61057.01484 1.21697-.09608 1.77426-.32452.47642-.19475.86727-.53033 1.10963-.95272.19825-.46398.01854-.92795-.87287-.92795H2.02763L4.58206.520833h7.03144c.0114-.000103.0225.002427.0325.007353.01.004927.0185.012089.0246.020815.0061.008725.0097.01873.0105.029076.0007.010346-.0014.020695-.0063.030078zm1.345 4.797465c-.1064.27913-.136.57788-.0862.86993.0497.29204.1773.56843.3715.80482.3937.33116.9142.50763 1.449.49134.6647-.00559 1.3179-.15807 1.9041-.44442l.9028-1.72167h-2.7398c.1412-.44273.4341-.83242.8356-1.11181.4015-.27939.8904-.43375 1.395-.44042h3.54c.0101-.00002.0201.00231.0289.00676.0089.00445.0164.01088.0218.01869.0054.0078.0086.01673.0092.02596.0006.00922-.0014.01843-.0057.02678L18.2713 8.4723c-1.1369.65827-2.4537 1.01058-3.7996 1.01658-.5901.04128-1.1832-.03266-1.7397-.21692-.5564-.18426-1.0637-.47462-1.4879-.85179-.3511-.42459-.5849-.92035-.6815-1.44517-.0966-.52482-.0531-1.06319.1267-1.56938.3458-1.47404 1.2668-2.78269 2.5912-3.68159C14.6049.825134 16.242.397447 17.8862.520833h3.0579c.0113-.000103.0225.002427.0325.007353.01.004927.0185.012089.0246.020815.0061.008725.0097.01873.0105.029076.0007.010346-.0014.020695-.0063.030078-.2556.493765-.6576.912165-1.1603 1.207735-.5026.29556-1.0859.45645-1.6836.46441h-.2753c-1.0837-.08438-2.1653.18258-3.0551.75405-.8898.57147-1.5311 1.41097-1.8113 2.37127zM25.8818 5.79662l1.0041-1.9341h-2.0167l-1.0027 1.9341h-2.3448l-.8044 1.54703h2.3462l-1.0026 1.9328h2.0167l1.0026-1.9328h2.4504l.8029-1.54703h-2.4517z" android:fillColor="#000000"/> +</vector> diff --git a/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc280/ic_5g_e_mobiledata.xml b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc280/ic_5g_e_mobiledata.xml new file mode 100644 index 00000000..9577bb7f --- /dev/null +++ b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc280/ic_5g_e_mobiledata.xml @@ -0,0 +1,3 @@ +<vector android:width="31.05dp" android:height="11.5dp" android:viewportWidth="27" android:viewportHeight="10" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:pathData="M19.3585 9.45946l2.6848-5.67568h4.5436l-.4956 1.05406h-2.974l-.537 1.13513h2.437l-.5369 1.05406h-2.3958l-.6608 1.37837h3.2631l-.4544 1.05406h-4.874zM12.7772 3.82432c1.1565-1.5 3.3044-1.58108 3.7174-1.58108h.2892c1.1565 0 2.1479-.68919 2.6022-1.662159 0-.04054 0-.081081-.0413-.081081h-2.8501c-2.3544.040541-3.8827.77027-4.9153 1.78378-.6196.64865-.9913 1.25676-1.1153 1.58108-.2478.52703-.4543 1.05406-.57823 1.54055-.33044 1.33783.04131 2.43243.53693 3C11.0423 9.09459 12.075 9.5 13.438 9.5c2.0653 0 3.511-1.01351 3.511-1.01351l2.1479-4.62163c0-.04054 0-.08108-.0413-.08108h-3.2631c-1.0327 0-1.6936.68919-2.0653 1.62163h2.5196l-.8261 1.7027c-.0413.04054-.7848.44594-1.7348.44594-.4131 0-.9914-.12162-1.3631-.48648-.3718-.40541-.4544-1.05406-.2891-1.66216.1652-.64865.413-1.13514.7435-1.58109zM8.39878 4.27026c-.49567-.40541-1.11525-.48649-1.98267-.48649H4.68128l.7022-1.5h2.72616c1.15655 0 2.14786-.68919 2.60226-1.662162 0-.04054 0-.081081-.0413-.081081H4.14431L1.83121 5.40539h4.04793c.82611 0 .99133.44595.82611.93243-.16522.44595-.66089.77027-1.03263.93244-.41306.2027-.99134.32432-1.65222.32432-.53697 0-.99133-.04054-1.61092-.2027-.24783-.08108-.61958-.20271-1.07394-.40541L.509434 8.72972c.950026.44594 2.313106.72972 3.180516.72972.82611 0 1.98267-.16216 2.68486-.4054.66089-.28378 1.19786-.56757 1.65222-1.0946.45436-.52702.82611-1.21621.90872-1.94594.08261-.72973-.20653-1.41892-.53697-1.74324z" android:fillColor="#000000"/> +</vector> diff --git a/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc280/ic_5g_mobiledata.xml b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc280/ic_5g_mobiledata.xml new file mode 100644 index 00000000..68b795a7 --- /dev/null +++ b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc280/ic_5g_mobiledata.xml @@ -0,0 +1,3 @@ +<vector android:width="24.15dp" android:height="11.5dp" android:viewportWidth="21" android:viewportHeight="10" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:pathData="M11.489.608155c-.2515.493765-.6471.912165-1.1418 1.207735-.49467.29556-1.06868.45645-1.65686.46441H5.80602l-.80845 1.57309h1.83866c.7381-.06189 1.47575.12298 2.08008.52132.23591.20438.41399.45957.51852.74302.10452.28345.13227.58643.0808.8822-.14311.72341-.49148 1.39827-1.00916 1.95496-.47447.50268-1.07724.88672-1.75305 1.11693-.91702.28554-1.87928.42565-2.84642.41445-1.16311-.02438-2.30892-.26687-3.36854-.71291L1.462 6.98001c.36983.16678.75383.30496 1.14811.41315.55703.14675 1.13333.22088 1.71235.22026.60086.01484 1.19761-.09608 1.74603-.32452.46883-.19475.85346-.53033 1.09196-.95272.1951-.46398.01825-.92795-.85897-.92795H1.99535L4.50913.520833h6.91957c.0111-.000103.0222.002427.032.007353.0098.004927.0181.012089.0242.020815.006.008725.0095.01873.0103.029076.0007.010346-.0014.020695-.0062.030078zm1.3236 4.797465c-.1047.27913-.1338.57788-.0849.86993.049.29204.1745.56843.3656.80482.3875.33116.8997.50763 1.426.49134.6541-.00559 1.2969-.15807 1.8738-.44442l.8884-1.72167h-2.6962c.139-.44273.4272-.83242.8223-1.11181.3951-.27939.8763-.43375 1.3729-.44042h3.4836c.0099-.00002.0197.00231.0285.00676.0087.00445.016.01088.0214.01869.0053.0078.0084.01673.009.02596.0006.00922-.0013.01843-.0056.02678L17.9805 8.4723c-1.1188.65827-2.4146 1.01058-3.7391 1.01658-.5808.04128-1.1644-.03266-1.712-.21692-.5476-.18426-1.0468-.47462-1.4642-.85179-.3456-.42459-.5757-.92035-.6707-1.44517-.0951-.52482-.0523-1.06319.1247-1.56938.3402-1.47404 1.2466-2.78269 2.5499-3.68159C14.3724.825134 15.9835.397447 17.6015.520833h3.0093c.0111-.000103.0221.002427.032.007353.0098.004927.0181.012089.0241.020815.0061.008725.0096.01873.0104.029076.0007.010346-.0014.020695-.0062.030078-.2515.493765-.6471.912165-1.1418 1.207735-.4947.29556-1.0687.45645-1.6569.46441h-.2709c-1.0664-.08438-2.1308.18258-3.0065.75405-.8756.57147-1.5067 1.41097-1.7824 2.37127z" android:fillColor="#000000"/> +</vector> diff --git a/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc280/ic_5g_plus_mobiledata.xml b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc280/ic_5g_plus_mobiledata.xml new file mode 100644 index 00000000..0c7d770a --- /dev/null +++ b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc280/ic_5g_plus_mobiledata.xml @@ -0,0 +1,3 @@ +<vector android:width="33.35dp" android:height="11.5dp" android:viewportWidth="29" android:viewportHeight="10" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:pathData="M11.6748.608155c-.2556.493765-.6575.912165-1.1602 1.207735-.5027.29556-1.08602.45645-1.68372.46441H5.89992L5.0784 3.85339h1.8684c.75003-.06189 1.49961.12298 2.11371.52132.23973.20438.42069.45957.52691.74302.10621.28345.13441.58643.0821.8822-.14542.72341-.49942 1.39827-1.02548 1.95496-.48214.50268-1.09465.88672-1.78139 1.11693-.93186.28554-1.90968.42565-2.89246.41445-1.18192-.02438-2.34626-.26687-3.423017-.71291l.938477-1.79335c.37581.16678.76602.30496 1.16668.41315.56604.14675 1.15166.22088 1.74004.22026.61057.01484 1.21697-.09608 1.77426-.32452.47642-.19475.86727-.53033 1.10963-.95272.19825-.46398.01854-.92795-.87287-.92795H2.02763L4.58206.520833h7.03144c.0114-.000103.0225.002427.0325.007353.01.004927.0185.012089.0246.020815.0061.008725.0097.01873.0105.029076.0007.010346-.0014.020695-.0063.030078zm1.345 4.797465c-.1064.27913-.136.57788-.0862.86993.0497.29204.1773.56843.3715.80482.3937.33116.9142.50763 1.449.49134.6647-.00559 1.3179-.15807 1.9041-.44442l.9028-1.72167h-2.7398c.1412-.44273.4341-.83242.8356-1.11181.4015-.27939.8904-.43375 1.395-.44042h3.54c.0101-.00002.0201.00231.0289.00676.0089.00445.0164.01088.0218.01869.0054.0078.0086.01673.0092.02596.0006.00922-.0014.01843-.0057.02678L18.2713 8.4723c-1.1369.65827-2.4537 1.01058-3.7996 1.01658-.5901.04128-1.1832-.03266-1.7397-.21692-.5564-.18426-1.0637-.47462-1.4879-.85179-.3511-.42459-.5849-.92035-.6815-1.44517-.0966-.52482-.0531-1.06319.1267-1.56938.3458-1.47404 1.2668-2.78269 2.5912-3.68159C14.6049.825134 16.242.397447 17.8862.520833h3.0579c.0113-.000103.0225.002427.0325.007353.01.004927.0185.012089.0246.020815.0061.008725.0097.01873.0105.029076.0007.010346-.0014.020695-.0063.030078-.2556.493765-.6576.912165-1.1603 1.207735-.5026.29556-1.0859.45645-1.6836.46441h-.2753c-1.0837-.08438-2.1653.18258-3.0551.75405-.8898.57147-1.5311 1.41097-1.8113 2.37127zM25.8818 5.79662l1.0041-1.9341h-2.0167l-1.0027 1.9341h-2.3448l-.8044 1.54703h2.3462l-1.0026 1.9328h2.0167l1.0026-1.9328h2.4504l.8029-1.54703h-2.4517z" android:fillColor="#000000"/> +</vector> diff --git a/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc410/ic_5g_e_mobiledata.xml b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc410/ic_5g_e_mobiledata.xml new file mode 100644 index 00000000..9577bb7f --- /dev/null +++ b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc410/ic_5g_e_mobiledata.xml @@ -0,0 +1,3 @@ +<vector android:width="31.05dp" android:height="11.5dp" android:viewportWidth="27" android:viewportHeight="10" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:pathData="M19.3585 9.45946l2.6848-5.67568h4.5436l-.4956 1.05406h-2.974l-.537 1.13513h2.437l-.5369 1.05406h-2.3958l-.6608 1.37837h3.2631l-.4544 1.05406h-4.874zM12.7772 3.82432c1.1565-1.5 3.3044-1.58108 3.7174-1.58108h.2892c1.1565 0 2.1479-.68919 2.6022-1.662159 0-.04054 0-.081081-.0413-.081081h-2.8501c-2.3544.040541-3.8827.77027-4.9153 1.78378-.6196.64865-.9913 1.25676-1.1153 1.58108-.2478.52703-.4543 1.05406-.57823 1.54055-.33044 1.33783.04131 2.43243.53693 3C11.0423 9.09459 12.075 9.5 13.438 9.5c2.0653 0 3.511-1.01351 3.511-1.01351l2.1479-4.62163c0-.04054 0-.08108-.0413-.08108h-3.2631c-1.0327 0-1.6936.68919-2.0653 1.62163h2.5196l-.8261 1.7027c-.0413.04054-.7848.44594-1.7348.44594-.4131 0-.9914-.12162-1.3631-.48648-.3718-.40541-.4544-1.05406-.2891-1.66216.1652-.64865.413-1.13514.7435-1.58109zM8.39878 4.27026c-.49567-.40541-1.11525-.48649-1.98267-.48649H4.68128l.7022-1.5h2.72616c1.15655 0 2.14786-.68919 2.60226-1.662162 0-.04054 0-.081081-.0413-.081081H4.14431L1.83121 5.40539h4.04793c.82611 0 .99133.44595.82611.93243-.16522.44595-.66089.77027-1.03263.93244-.41306.2027-.99134.32432-1.65222.32432-.53697 0-.99133-.04054-1.61092-.2027-.24783-.08108-.61958-.20271-1.07394-.40541L.509434 8.72972c.950026.44594 2.313106.72972 3.180516.72972.82611 0 1.98267-.16216 2.68486-.4054.66089-.28378 1.19786-.56757 1.65222-1.0946.45436-.52702.82611-1.21621.90872-1.94594.08261-.72973-.20653-1.41892-.53697-1.74324z" android:fillColor="#000000"/> +</vector> diff --git a/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc410/ic_5g_mobiledata.xml b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc410/ic_5g_mobiledata.xml new file mode 100644 index 00000000..68b795a7 --- /dev/null +++ b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc410/ic_5g_mobiledata.xml @@ -0,0 +1,3 @@ +<vector android:width="24.15dp" android:height="11.5dp" android:viewportWidth="21" android:viewportHeight="10" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:pathData="M11.489.608155c-.2515.493765-.6471.912165-1.1418 1.207735-.49467.29556-1.06868.45645-1.65686.46441H5.80602l-.80845 1.57309h1.83866c.7381-.06189 1.47575.12298 2.08008.52132.23591.20438.41399.45957.51852.74302.10452.28345.13227.58643.0808.8822-.14311.72341-.49148 1.39827-1.00916 1.95496-.47447.50268-1.07724.88672-1.75305 1.11693-.91702.28554-1.87928.42565-2.84642.41445-1.16311-.02438-2.30892-.26687-3.36854-.71291L1.462 6.98001c.36983.16678.75383.30496 1.14811.41315.55703.14675 1.13333.22088 1.71235.22026.60086.01484 1.19761-.09608 1.74603-.32452.46883-.19475.85346-.53033 1.09196-.95272.1951-.46398.01825-.92795-.85897-.92795H1.99535L4.50913.520833h6.91957c.0111-.000103.0222.002427.032.007353.0098.004927.0181.012089.0242.020815.006.008725.0095.01873.0103.029076.0007.010346-.0014.020695-.0062.030078zm1.3236 4.797465c-.1047.27913-.1338.57788-.0849.86993.049.29204.1745.56843.3656.80482.3875.33116.8997.50763 1.426.49134.6541-.00559 1.2969-.15807 1.8738-.44442l.8884-1.72167h-2.6962c.139-.44273.4272-.83242.8223-1.11181.3951-.27939.8763-.43375 1.3729-.44042h3.4836c.0099-.00002.0197.00231.0285.00676.0087.00445.016.01088.0214.01869.0053.0078.0084.01673.009.02596.0006.00922-.0013.01843-.0056.02678L17.9805 8.4723c-1.1188.65827-2.4146 1.01058-3.7391 1.01658-.5808.04128-1.1644-.03266-1.712-.21692-.5476-.18426-1.0468-.47462-1.4642-.85179-.3456-.42459-.5757-.92035-.6707-1.44517-.0951-.52482-.0523-1.06319.1247-1.56938.3402-1.47404 1.2466-2.78269 2.5499-3.68159C14.3724.825134 15.9835.397447 17.6015.520833h3.0093c.0111-.000103.0221.002427.032.007353.0098.004927.0181.012089.0241.020815.0061.008725.0096.01873.0104.029076.0007.010346-.0014.020695-.0062.030078-.2515.493765-.6471.912165-1.1418 1.207735-.4947.29556-1.0687.45645-1.6569.46441h-.2709c-1.0664-.08438-2.1308.18258-3.0065.75405-.8756.57147-1.5067 1.41097-1.7824 2.37127z" android:fillColor="#000000"/> +</vector> diff --git a/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc410/ic_5g_plus_mobiledata.xml b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc410/ic_5g_plus_mobiledata.xml new file mode 100644 index 00000000..0c7d770a --- /dev/null +++ b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc410/ic_5g_plus_mobiledata.xml @@ -0,0 +1,3 @@ +<vector android:width="33.35dp" android:height="11.5dp" android:viewportWidth="29" android:viewportHeight="10" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:pathData="M11.6748.608155c-.2556.493765-.6575.912165-1.1602 1.207735-.5027.29556-1.08602.45645-1.68372.46441H5.89992L5.0784 3.85339h1.8684c.75003-.06189 1.49961.12298 2.11371.52132.23973.20438.42069.45957.52691.74302.10621.28345.13441.58643.0821.8822-.14542.72341-.49942 1.39827-1.02548 1.95496-.48214.50268-1.09465.88672-1.78139 1.11693-.93186.28554-1.90968.42565-2.89246.41445-1.18192-.02438-2.34626-.26687-3.423017-.71291l.938477-1.79335c.37581.16678.76602.30496 1.16668.41315.56604.14675 1.15166.22088 1.74004.22026.61057.01484 1.21697-.09608 1.77426-.32452.47642-.19475.86727-.53033 1.10963-.95272.19825-.46398.01854-.92795-.87287-.92795H2.02763L4.58206.520833h7.03144c.0114-.000103.0225.002427.0325.007353.01.004927.0185.012089.0246.020815.0061.008725.0097.01873.0105.029076.0007.010346-.0014.020695-.0063.030078zm1.345 4.797465c-.1064.27913-.136.57788-.0862.86993.0497.29204.1773.56843.3715.80482.3937.33116.9142.50763 1.449.49134.6647-.00559 1.3179-.15807 1.9041-.44442l.9028-1.72167h-2.7398c.1412-.44273.4341-.83242.8356-1.11181.4015-.27939.8904-.43375 1.395-.44042h3.54c.0101-.00002.0201.00231.0289.00676.0089.00445.0164.01088.0218.01869.0054.0078.0086.01673.0092.02596.0006.00922-.0014.01843-.0057.02678L18.2713 8.4723c-1.1369.65827-2.4537 1.01058-3.7996 1.01658-.5901.04128-1.1832-.03266-1.7397-.21692-.5564-.18426-1.0637-.47462-1.4879-.85179-.3511-.42459-.5849-.92035-.6815-1.44517-.0966-.52482-.0531-1.06319.1267-1.56938.3458-1.47404 1.2668-2.78269 2.5912-3.68159C14.6049.825134 16.242.397447 17.8862.520833h3.0579c.0113-.000103.0225.002427.0325.007353.01.004927.0185.012089.0246.020815.0061.008725.0097.01873.0105.029076.0007.010346-.0014.020695-.0063.030078-.2556.493765-.6576.912165-1.1603 1.207735-.5026.29556-1.0859.45645-1.6836.46441h-.2753c-1.0837-.08438-2.1653.18258-3.0551.75405-.8898.57147-1.5311 1.41097-1.8113 2.37127zM25.8818 5.79662l1.0041-1.9341h-2.0167l-1.0027 1.9341h-2.3448l-.8044 1.54703h2.3462l-1.0026 1.9328h2.0167l1.0026-1.9328h2.4504l.8029-1.54703h-2.4517z" android:fillColor="#000000"/> +</vector> diff --git a/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc560/ic_5g_e_mobiledata.xml b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc560/ic_5g_e_mobiledata.xml new file mode 100644 index 00000000..9577bb7f --- /dev/null +++ b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc560/ic_5g_e_mobiledata.xml @@ -0,0 +1,3 @@ +<vector android:width="31.05dp" android:height="11.5dp" android:viewportWidth="27" android:viewportHeight="10" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:pathData="M19.3585 9.45946l2.6848-5.67568h4.5436l-.4956 1.05406h-2.974l-.537 1.13513h2.437l-.5369 1.05406h-2.3958l-.6608 1.37837h3.2631l-.4544 1.05406h-4.874zM12.7772 3.82432c1.1565-1.5 3.3044-1.58108 3.7174-1.58108h.2892c1.1565 0 2.1479-.68919 2.6022-1.662159 0-.04054 0-.081081-.0413-.081081h-2.8501c-2.3544.040541-3.8827.77027-4.9153 1.78378-.6196.64865-.9913 1.25676-1.1153 1.58108-.2478.52703-.4543 1.05406-.57823 1.54055-.33044 1.33783.04131 2.43243.53693 3C11.0423 9.09459 12.075 9.5 13.438 9.5c2.0653 0 3.511-1.01351 3.511-1.01351l2.1479-4.62163c0-.04054 0-.08108-.0413-.08108h-3.2631c-1.0327 0-1.6936.68919-2.0653 1.62163h2.5196l-.8261 1.7027c-.0413.04054-.7848.44594-1.7348.44594-.4131 0-.9914-.12162-1.3631-.48648-.3718-.40541-.4544-1.05406-.2891-1.66216.1652-.64865.413-1.13514.7435-1.58109zM8.39878 4.27026c-.49567-.40541-1.11525-.48649-1.98267-.48649H4.68128l.7022-1.5h2.72616c1.15655 0 2.14786-.68919 2.60226-1.662162 0-.04054 0-.081081-.0413-.081081H4.14431L1.83121 5.40539h4.04793c.82611 0 .99133.44595.82611.93243-.16522.44595-.66089.77027-1.03263.93244-.41306.2027-.99134.32432-1.65222.32432-.53697 0-.99133-.04054-1.61092-.2027-.24783-.08108-.61958-.20271-1.07394-.40541L.509434 8.72972c.950026.44594 2.313106.72972 3.180516.72972.82611 0 1.98267-.16216 2.68486-.4054.66089-.28378 1.19786-.56757 1.65222-1.0946.45436-.52702.82611-1.21621.90872-1.94594.08261-.72973-.20653-1.41892-.53697-1.74324z" android:fillColor="#000000"/> +</vector> diff --git a/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc560/ic_5g_mobiledata.xml b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc560/ic_5g_mobiledata.xml new file mode 100644 index 00000000..68b795a7 --- /dev/null +++ b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc560/ic_5g_mobiledata.xml @@ -0,0 +1,3 @@ +<vector android:width="24.15dp" android:height="11.5dp" android:viewportWidth="21" android:viewportHeight="10" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:pathData="M11.489.608155c-.2515.493765-.6471.912165-1.1418 1.207735-.49467.29556-1.06868.45645-1.65686.46441H5.80602l-.80845 1.57309h1.83866c.7381-.06189 1.47575.12298 2.08008.52132.23591.20438.41399.45957.51852.74302.10452.28345.13227.58643.0808.8822-.14311.72341-.49148 1.39827-1.00916 1.95496-.47447.50268-1.07724.88672-1.75305 1.11693-.91702.28554-1.87928.42565-2.84642.41445-1.16311-.02438-2.30892-.26687-3.36854-.71291L1.462 6.98001c.36983.16678.75383.30496 1.14811.41315.55703.14675 1.13333.22088 1.71235.22026.60086.01484 1.19761-.09608 1.74603-.32452.46883-.19475.85346-.53033 1.09196-.95272.1951-.46398.01825-.92795-.85897-.92795H1.99535L4.50913.520833h6.91957c.0111-.000103.0222.002427.032.007353.0098.004927.0181.012089.0242.020815.006.008725.0095.01873.0103.029076.0007.010346-.0014.020695-.0062.030078zm1.3236 4.797465c-.1047.27913-.1338.57788-.0849.86993.049.29204.1745.56843.3656.80482.3875.33116.8997.50763 1.426.49134.6541-.00559 1.2969-.15807 1.8738-.44442l.8884-1.72167h-2.6962c.139-.44273.4272-.83242.8223-1.11181.3951-.27939.8763-.43375 1.3729-.44042h3.4836c.0099-.00002.0197.00231.0285.00676.0087.00445.016.01088.0214.01869.0053.0078.0084.01673.009.02596.0006.00922-.0013.01843-.0056.02678L17.9805 8.4723c-1.1188.65827-2.4146 1.01058-3.7391 1.01658-.5808.04128-1.1644-.03266-1.712-.21692-.5476-.18426-1.0468-.47462-1.4642-.85179-.3456-.42459-.5757-.92035-.6707-1.44517-.0951-.52482-.0523-1.06319.1247-1.56938.3402-1.47404 1.2466-2.78269 2.5499-3.68159C14.3724.825134 15.9835.397447 17.6015.520833h3.0093c.0111-.000103.0221.002427.032.007353.0098.004927.0181.012089.0241.020815.0061.008725.0096.01873.0104.029076.0007.010346-.0014.020695-.0062.030078-.2515.493765-.6471.912165-1.1418 1.207735-.4947.29556-1.0687.45645-1.6569.46441h-.2709c-1.0664-.08438-2.1308.18258-3.0065.75405-.8756.57147-1.5067 1.41097-1.7824 2.37127z" android:fillColor="#000000"/> +</vector> diff --git a/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc560/ic_5g_plus_mobiledata.xml b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc560/ic_5g_plus_mobiledata.xml new file mode 100644 index 00000000..0c7d770a --- /dev/null +++ b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc560/ic_5g_plus_mobiledata.xml @@ -0,0 +1,3 @@ +<vector android:width="33.35dp" android:height="11.5dp" android:viewportWidth="29" android:viewportHeight="10" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:pathData="M11.6748.608155c-.2556.493765-.6575.912165-1.1602 1.207735-.5027.29556-1.08602.45645-1.68372.46441H5.89992L5.0784 3.85339h1.8684c.75003-.06189 1.49961.12298 2.11371.52132.23973.20438.42069.45957.52691.74302.10621.28345.13441.58643.0821.8822-.14542.72341-.49942 1.39827-1.02548 1.95496-.48214.50268-1.09465.88672-1.78139 1.11693-.93186.28554-1.90968.42565-2.89246.41445-1.18192-.02438-2.34626-.26687-3.423017-.71291l.938477-1.79335c.37581.16678.76602.30496 1.16668.41315.56604.14675 1.15166.22088 1.74004.22026.61057.01484 1.21697-.09608 1.77426-.32452.47642-.19475.86727-.53033 1.10963-.95272.19825-.46398.01854-.92795-.87287-.92795H2.02763L4.58206.520833h7.03144c.0114-.000103.0225.002427.0325.007353.01.004927.0185.012089.0246.020815.0061.008725.0097.01873.0105.029076.0007.010346-.0014.020695-.0063.030078zm1.345 4.797465c-.1064.27913-.136.57788-.0862.86993.0497.29204.1773.56843.3715.80482.3937.33116.9142.50763 1.449.49134.6647-.00559 1.3179-.15807 1.9041-.44442l.9028-1.72167h-2.7398c.1412-.44273.4341-.83242.8356-1.11181.4015-.27939.8904-.43375 1.395-.44042h3.54c.0101-.00002.0201.00231.0289.00676.0089.00445.0164.01088.0218.01869.0054.0078.0086.01673.0092.02596.0006.00922-.0014.01843-.0057.02678L18.2713 8.4723c-1.1369.65827-2.4537 1.01058-3.7996 1.01658-.5901.04128-1.1832-.03266-1.7397-.21692-.5564-.18426-1.0637-.47462-1.4879-.85179-.3511-.42459-.5849-.92035-.6815-1.44517-.0966-.52482-.0531-1.06319.1267-1.56938.3458-1.47404 1.2668-2.78269 2.5912-3.68159C14.6049.825134 16.242.397447 17.8862.520833h3.0579c.0113-.000103.0225.002427.0325.007353.01.004927.0185.012089.0246.020815.0061.008725.0097.01873.0105.029076.0007.010346-.0014.020695-.0063.030078-.2556.493765-.6576.912165-1.1603 1.207735-.5026.29556-1.0859.45645-1.6836.46441h-.2753c-1.0837-.08438-2.1653.18258-3.0551.75405-.8898.57147-1.5311 1.41097-1.8113 2.37127zM25.8818 5.79662l1.0041-1.9341h-2.0167l-1.0027 1.9341h-2.3448l-.8044 1.54703h2.3462l-1.0026 1.9328h2.0167l1.0026-1.9328h2.4504l.8029-1.54703h-2.4517z" android:fillColor="#000000"/> +</vector> diff --git a/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc950/ic_5g_e_mobiledata.xml b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc950/ic_5g_e_mobiledata.xml new file mode 100644 index 00000000..9577bb7f --- /dev/null +++ b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc950/ic_5g_e_mobiledata.xml @@ -0,0 +1,3 @@ +<vector android:width="31.05dp" android:height="11.5dp" android:viewportWidth="27" android:viewportHeight="10" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:pathData="M19.3585 9.45946l2.6848-5.67568h4.5436l-.4956 1.05406h-2.974l-.537 1.13513h2.437l-.5369 1.05406h-2.3958l-.6608 1.37837h3.2631l-.4544 1.05406h-4.874zM12.7772 3.82432c1.1565-1.5 3.3044-1.58108 3.7174-1.58108h.2892c1.1565 0 2.1479-.68919 2.6022-1.662159 0-.04054 0-.081081-.0413-.081081h-2.8501c-2.3544.040541-3.8827.77027-4.9153 1.78378-.6196.64865-.9913 1.25676-1.1153 1.58108-.2478.52703-.4543 1.05406-.57823 1.54055-.33044 1.33783.04131 2.43243.53693 3C11.0423 9.09459 12.075 9.5 13.438 9.5c2.0653 0 3.511-1.01351 3.511-1.01351l2.1479-4.62163c0-.04054 0-.08108-.0413-.08108h-3.2631c-1.0327 0-1.6936.68919-2.0653 1.62163h2.5196l-.8261 1.7027c-.0413.04054-.7848.44594-1.7348.44594-.4131 0-.9914-.12162-1.3631-.48648-.3718-.40541-.4544-1.05406-.2891-1.66216.1652-.64865.413-1.13514.7435-1.58109zM8.39878 4.27026c-.49567-.40541-1.11525-.48649-1.98267-.48649H4.68128l.7022-1.5h2.72616c1.15655 0 2.14786-.68919 2.60226-1.662162 0-.04054 0-.081081-.0413-.081081H4.14431L1.83121 5.40539h4.04793c.82611 0 .99133.44595.82611.93243-.16522.44595-.66089.77027-1.03263.93244-.41306.2027-.99134.32432-1.65222.32432-.53697 0-.99133-.04054-1.61092-.2027-.24783-.08108-.61958-.20271-1.07394-.40541L.509434 8.72972c.950026.44594 2.313106.72972 3.180516.72972.82611 0 1.98267-.16216 2.68486-.4054.66089-.28378 1.19786-.56757 1.65222-1.0946.45436-.52702.82611-1.21621.90872-1.94594.08261-.72973-.20653-1.41892-.53697-1.74324z" android:fillColor="#000000"/> +</vector> diff --git a/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc950/ic_5g_mobiledata.xml b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc950/ic_5g_mobiledata.xml new file mode 100644 index 00000000..68b795a7 --- /dev/null +++ b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc950/ic_5g_mobiledata.xml @@ -0,0 +1,3 @@ +<vector android:width="24.15dp" android:height="11.5dp" android:viewportWidth="21" android:viewportHeight="10" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:pathData="M11.489.608155c-.2515.493765-.6471.912165-1.1418 1.207735-.49467.29556-1.06868.45645-1.65686.46441H5.80602l-.80845 1.57309h1.83866c.7381-.06189 1.47575.12298 2.08008.52132.23591.20438.41399.45957.51852.74302.10452.28345.13227.58643.0808.8822-.14311.72341-.49148 1.39827-1.00916 1.95496-.47447.50268-1.07724.88672-1.75305 1.11693-.91702.28554-1.87928.42565-2.84642.41445-1.16311-.02438-2.30892-.26687-3.36854-.71291L1.462 6.98001c.36983.16678.75383.30496 1.14811.41315.55703.14675 1.13333.22088 1.71235.22026.60086.01484 1.19761-.09608 1.74603-.32452.46883-.19475.85346-.53033 1.09196-.95272.1951-.46398.01825-.92795-.85897-.92795H1.99535L4.50913.520833h6.91957c.0111-.000103.0222.002427.032.007353.0098.004927.0181.012089.0242.020815.006.008725.0095.01873.0103.029076.0007.010346-.0014.020695-.0062.030078zm1.3236 4.797465c-.1047.27913-.1338.57788-.0849.86993.049.29204.1745.56843.3656.80482.3875.33116.8997.50763 1.426.49134.6541-.00559 1.2969-.15807 1.8738-.44442l.8884-1.72167h-2.6962c.139-.44273.4272-.83242.8223-1.11181.3951-.27939.8763-.43375 1.3729-.44042h3.4836c.0099-.00002.0197.00231.0285.00676.0087.00445.016.01088.0214.01869.0053.0078.0084.01673.009.02596.0006.00922-.0013.01843-.0056.02678L17.9805 8.4723c-1.1188.65827-2.4146 1.01058-3.7391 1.01658-.5808.04128-1.1644-.03266-1.712-.21692-.5476-.18426-1.0468-.47462-1.4642-.85179-.3456-.42459-.5757-.92035-.6707-1.44517-.0951-.52482-.0523-1.06319.1247-1.56938.3402-1.47404 1.2466-2.78269 2.5499-3.68159C14.3724.825134 15.9835.397447 17.6015.520833h3.0093c.0111-.000103.0221.002427.032.007353.0098.004927.0181.012089.0241.020815.0061.008725.0096.01873.0104.029076.0007.010346-.0014.020695-.0062.030078-.2515.493765-.6471.912165-1.1418 1.207735-.4947.29556-1.0687.45645-1.6569.46441h-.2709c-1.0664-.08438-2.1308.18258-3.0065.75405-.8756.57147-1.5067 1.41097-1.7824 2.37127z" android:fillColor="#000000"/> +</vector> diff --git a/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc950/ic_5g_plus_mobiledata.xml b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc950/ic_5g_plus_mobiledata.xml new file mode 100644 index 00000000..0c7d770a --- /dev/null +++ b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc310-mnc950/ic_5g_plus_mobiledata.xml @@ -0,0 +1,3 @@ +<vector android:width="33.35dp" android:height="11.5dp" android:viewportWidth="29" android:viewportHeight="10" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:pathData="M11.6748.608155c-.2556.493765-.6575.912165-1.1602 1.207735-.5027.29556-1.08602.45645-1.68372.46441H5.89992L5.0784 3.85339h1.8684c.75003-.06189 1.49961.12298 2.11371.52132.23973.20438.42069.45957.52691.74302.10621.28345.13441.58643.0821.8822-.14542.72341-.49942 1.39827-1.02548 1.95496-.48214.50268-1.09465.88672-1.78139 1.11693-.93186.28554-1.90968.42565-2.89246.41445-1.18192-.02438-2.34626-.26687-3.423017-.71291l.938477-1.79335c.37581.16678.76602.30496 1.16668.41315.56604.14675 1.15166.22088 1.74004.22026.61057.01484 1.21697-.09608 1.77426-.32452.47642-.19475.86727-.53033 1.10963-.95272.19825-.46398.01854-.92795-.87287-.92795H2.02763L4.58206.520833h7.03144c.0114-.000103.0225.002427.0325.007353.01.004927.0185.012089.0246.020815.0061.008725.0097.01873.0105.029076.0007.010346-.0014.020695-.0063.030078zm1.345 4.797465c-.1064.27913-.136.57788-.0862.86993.0497.29204.1773.56843.3715.80482.3937.33116.9142.50763 1.449.49134.6647-.00559 1.3179-.15807 1.9041-.44442l.9028-1.72167h-2.7398c.1412-.44273.4341-.83242.8356-1.11181.4015-.27939.8904-.43375 1.395-.44042h3.54c.0101-.00002.0201.00231.0289.00676.0089.00445.0164.01088.0218.01869.0054.0078.0086.01673.0092.02596.0006.00922-.0014.01843-.0057.02678L18.2713 8.4723c-1.1369.65827-2.4537 1.01058-3.7996 1.01658-.5901.04128-1.1832-.03266-1.7397-.21692-.5564-.18426-1.0637-.47462-1.4879-.85179-.3511-.42459-.5849-.92035-.6815-1.44517-.0966-.52482-.0531-1.06319.1267-1.56938.3458-1.47404 1.2668-2.78269 2.5912-3.68159C14.6049.825134 16.242.397447 17.8862.520833h3.0579c.0113-.000103.0225.002427.0325.007353.01.004927.0185.012089.0246.020815.0061.008725.0097.01873.0105.029076.0007.010346-.0014.020695-.0063.030078-.2556.493765-.6576.912165-1.1603 1.207735-.5026.29556-1.0859.45645-1.6836.46441h-.2753c-1.0837-.08438-2.1653.18258-3.0551.75405-.8898.57147-1.5311 1.41097-1.8113 2.37127zM25.8818 5.79662l1.0041-1.9341h-2.0167l-1.0027 1.9341h-2.3448l-.8044 1.54703h2.3462l-1.0026 1.9328h2.0167l1.0026-1.9328h2.4504l.8029-1.54703h-2.4517z" android:fillColor="#000000"/> +</vector> diff --git a/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc311-mnc180/ic_5g_e_mobiledata.xml b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc311-mnc180/ic_5g_e_mobiledata.xml new file mode 100644 index 00000000..9577bb7f --- /dev/null +++ b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc311-mnc180/ic_5g_e_mobiledata.xml @@ -0,0 +1,3 @@ +<vector android:width="31.05dp" android:height="11.5dp" android:viewportWidth="27" android:viewportHeight="10" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:pathData="M19.3585 9.45946l2.6848-5.67568h4.5436l-.4956 1.05406h-2.974l-.537 1.13513h2.437l-.5369 1.05406h-2.3958l-.6608 1.37837h3.2631l-.4544 1.05406h-4.874zM12.7772 3.82432c1.1565-1.5 3.3044-1.58108 3.7174-1.58108h.2892c1.1565 0 2.1479-.68919 2.6022-1.662159 0-.04054 0-.081081-.0413-.081081h-2.8501c-2.3544.040541-3.8827.77027-4.9153 1.78378-.6196.64865-.9913 1.25676-1.1153 1.58108-.2478.52703-.4543 1.05406-.57823 1.54055-.33044 1.33783.04131 2.43243.53693 3C11.0423 9.09459 12.075 9.5 13.438 9.5c2.0653 0 3.511-1.01351 3.511-1.01351l2.1479-4.62163c0-.04054 0-.08108-.0413-.08108h-3.2631c-1.0327 0-1.6936.68919-2.0653 1.62163h2.5196l-.8261 1.7027c-.0413.04054-.7848.44594-1.7348.44594-.4131 0-.9914-.12162-1.3631-.48648-.3718-.40541-.4544-1.05406-.2891-1.66216.1652-.64865.413-1.13514.7435-1.58109zM8.39878 4.27026c-.49567-.40541-1.11525-.48649-1.98267-.48649H4.68128l.7022-1.5h2.72616c1.15655 0 2.14786-.68919 2.60226-1.662162 0-.04054 0-.081081-.0413-.081081H4.14431L1.83121 5.40539h4.04793c.82611 0 .99133.44595.82611.93243-.16522.44595-.66089.77027-1.03263.93244-.41306.2027-.99134.32432-1.65222.32432-.53697 0-.99133-.04054-1.61092-.2027-.24783-.08108-.61958-.20271-1.07394-.40541L.509434 8.72972c.950026.44594 2.313106.72972 3.180516.72972.82611 0 1.98267-.16216 2.68486-.4054.66089-.28378 1.19786-.56757 1.65222-1.0946.45436-.52702.82611-1.21621.90872-1.94594.08261-.72973-.20653-1.41892-.53697-1.74324z" android:fillColor="#000000"/> +</vector> diff --git a/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc311-mnc180/ic_5g_mobiledata.xml b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc311-mnc180/ic_5g_mobiledata.xml new file mode 100644 index 00000000..68b795a7 --- /dev/null +++ b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc311-mnc180/ic_5g_mobiledata.xml @@ -0,0 +1,3 @@ +<vector android:width="24.15dp" android:height="11.5dp" android:viewportWidth="21" android:viewportHeight="10" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:pathData="M11.489.608155c-.2515.493765-.6471.912165-1.1418 1.207735-.49467.29556-1.06868.45645-1.65686.46441H5.80602l-.80845 1.57309h1.83866c.7381-.06189 1.47575.12298 2.08008.52132.23591.20438.41399.45957.51852.74302.10452.28345.13227.58643.0808.8822-.14311.72341-.49148 1.39827-1.00916 1.95496-.47447.50268-1.07724.88672-1.75305 1.11693-.91702.28554-1.87928.42565-2.84642.41445-1.16311-.02438-2.30892-.26687-3.36854-.71291L1.462 6.98001c.36983.16678.75383.30496 1.14811.41315.55703.14675 1.13333.22088 1.71235.22026.60086.01484 1.19761-.09608 1.74603-.32452.46883-.19475.85346-.53033 1.09196-.95272.1951-.46398.01825-.92795-.85897-.92795H1.99535L4.50913.520833h6.91957c.0111-.000103.0222.002427.032.007353.0098.004927.0181.012089.0242.020815.006.008725.0095.01873.0103.029076.0007.010346-.0014.020695-.0062.030078zm1.3236 4.797465c-.1047.27913-.1338.57788-.0849.86993.049.29204.1745.56843.3656.80482.3875.33116.8997.50763 1.426.49134.6541-.00559 1.2969-.15807 1.8738-.44442l.8884-1.72167h-2.6962c.139-.44273.4272-.83242.8223-1.11181.3951-.27939.8763-.43375 1.3729-.44042h3.4836c.0099-.00002.0197.00231.0285.00676.0087.00445.016.01088.0214.01869.0053.0078.0084.01673.009.02596.0006.00922-.0013.01843-.0056.02678L17.9805 8.4723c-1.1188.65827-2.4146 1.01058-3.7391 1.01658-.5808.04128-1.1644-.03266-1.712-.21692-.5476-.18426-1.0468-.47462-1.4642-.85179-.3456-.42459-.5757-.92035-.6707-1.44517-.0951-.52482-.0523-1.06319.1247-1.56938.3402-1.47404 1.2466-2.78269 2.5499-3.68159C14.3724.825134 15.9835.397447 17.6015.520833h3.0093c.0111-.000103.0221.002427.032.007353.0098.004927.0181.012089.0241.020815.0061.008725.0096.01873.0104.029076.0007.010346-.0014.020695-.0062.030078-.2515.493765-.6471.912165-1.1418 1.207735-.4947.29556-1.0687.45645-1.6569.46441h-.2709c-1.0664-.08438-2.1308.18258-3.0065.75405-.8756.57147-1.5067 1.41097-1.7824 2.37127z" android:fillColor="#000000"/> +</vector> diff --git a/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc311-mnc180/ic_5g_plus_mobiledata.xml b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc311-mnc180/ic_5g_plus_mobiledata.xml new file mode 100644 index 00000000..0c7d770a --- /dev/null +++ b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc311-mnc180/ic_5g_plus_mobiledata.xml @@ -0,0 +1,3 @@ +<vector android:width="33.35dp" android:height="11.5dp" android:viewportWidth="29" android:viewportHeight="10" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:pathData="M11.6748.608155c-.2556.493765-.6575.912165-1.1602 1.207735-.5027.29556-1.08602.45645-1.68372.46441H5.89992L5.0784 3.85339h1.8684c.75003-.06189 1.49961.12298 2.11371.52132.23973.20438.42069.45957.52691.74302.10621.28345.13441.58643.0821.8822-.14542.72341-.49942 1.39827-1.02548 1.95496-.48214.50268-1.09465.88672-1.78139 1.11693-.93186.28554-1.90968.42565-2.89246.41445-1.18192-.02438-2.34626-.26687-3.423017-.71291l.938477-1.79335c.37581.16678.76602.30496 1.16668.41315.56604.14675 1.15166.22088 1.74004.22026.61057.01484 1.21697-.09608 1.77426-.32452.47642-.19475.86727-.53033 1.10963-.95272.19825-.46398.01854-.92795-.87287-.92795H2.02763L4.58206.520833h7.03144c.0114-.000103.0225.002427.0325.007353.01.004927.0185.012089.0246.020815.0061.008725.0097.01873.0105.029076.0007.010346-.0014.020695-.0063.030078zm1.345 4.797465c-.1064.27913-.136.57788-.0862.86993.0497.29204.1773.56843.3715.80482.3937.33116.9142.50763 1.449.49134.6647-.00559 1.3179-.15807 1.9041-.44442l.9028-1.72167h-2.7398c.1412-.44273.4341-.83242.8356-1.11181.4015-.27939.8904-.43375 1.395-.44042h3.54c.0101-.00002.0201.00231.0289.00676.0089.00445.0164.01088.0218.01869.0054.0078.0086.01673.0092.02596.0006.00922-.0014.01843-.0057.02678L18.2713 8.4723c-1.1369.65827-2.4537 1.01058-3.7996 1.01658-.5901.04128-1.1832-.03266-1.7397-.21692-.5564-.18426-1.0637-.47462-1.4879-.85179-.3511-.42459-.5849-.92035-.6815-1.44517-.0966-.52482-.0531-1.06319.1267-1.56938.3458-1.47404 1.2668-2.78269 2.5912-3.68159C14.6049.825134 16.242.397447 17.8862.520833h3.0579c.0113-.000103.0225.002427.0325.007353.01.004927.0185.012089.0246.020815.0061.008725.0097.01873.0105.029076.0007.010346-.0014.020695-.0063.030078-.2556.493765-.6576.912165-1.1603 1.207735-.5026.29556-1.0859.45645-1.6836.46441h-.2753c-1.0837-.08438-2.1653.18258-3.0551.75405-.8898.57147-1.5311 1.41097-1.8113 2.37127zM25.8818 5.79662l1.0041-1.9341h-2.0167l-1.0027 1.9341h-2.3448l-.8044 1.54703h2.3462l-1.0026 1.9328h2.0167l1.0026-1.9328h2.4504l.8029-1.54703h-2.4517z" android:fillColor="#000000"/> +</vector> diff --git a/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc311-mnc480/ic_5g_plus_mobiledata.xml b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc311-mnc480/ic_5g_plus_mobiledata.xml new file mode 100644 index 00000000..998db3b4 --- /dev/null +++ b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc311-mnc480/ic_5g_plus_mobiledata.xml @@ -0,0 +1,36 @@ +<!-- + 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. +--> +<vector xmlns:android="http://schemas.android.com/apk/res/android" + android:viewportWidth="22" + android:viewportHeight="17" + android:width="22dp" + android:height="17dp"> + <group> + <group> + <path android:fillColor="#FF000000" + android:pathData="M19.98,3.54v2.81c0,0.47 -0.15,0.84 -0.44,1.11s-0.69,0.41 -1.2,0.41c-0.5,0 -0.89,-0.13 -1.19,-0.4s-0.44,-0.63 -0.45,-1.09V3.54h0.88v2.82c0,0.28 0.07,0.48 0.2,0.61c0.13,0.13 0.32,0.19 0.56,0.19c0.49,0 0.75,-0.26 0.75,-0.78V3.54H19.98z"/> + <path android:fillColor="#FF000000" + android:pathData="M19.42,12.25l0.57,-3.04h0.88l-0.95,4.27h-0.88l-0.69,-2.85l-0.69,2.85h-0.88l-0.95,-4.27h0.88l0.58,3.03l0.7,-3.03h0.74L19.42,12.25z"/> + </group> + <group> + <path android:fillColor="#FF000000" + android:pathData="M0.94,8.49l0.43,-4.96H5.7v1.17H2.39L2.15,7.41c0.41,-0.29 0.85,-0.43 1.33,-0.43c0.77,0 1.38,0.3 1.83,0.9c0.44,0.6 0.66,1.41 0.66,2.43c0,1.03 -0.24,1.84 -0.72,2.43c-0.48,0.59 -1.14,0.88 -1.98,0.88c-0.75,0 -1.36,-0.24 -1.83,-0.73c-0.47,-0.49 -0.74,-1.16 -0.81,-2.02h1.13c0.07,0.57 0.23,1 0.49,1.29c0.26,0.29 0.59,0.43 1.01,0.43c0.47,0 0.84,-0.2 1.1,-0.61c0.26,-0.41 0.4,-0.96 0.4,-1.65c0,-0.65 -0.14,-1.18 -0.43,-1.59C4.05,8.32 3.67,8.11 3.19,8.11c-0.4,0 -0.72,0.1 -0.96,0.31L1.9,8.75L0.94,8.49z"/> + </group> + <path android:fillColor="#FF000000" + android:pathData="M13.86,12.24l-0.22,0.27c-0.63,0.73 -1.55,1.1 -2.76,1.1c-1.08,0 -1.92,-0.36 -2.53,-1.07c-0.61,-0.71 -0.93,-1.72 -0.94,-3.02V7.56c0,-1.39 0.28,-2.44 0.84,-3.13c0.56,-0.7 1.39,-1.04 2.51,-1.04c0.95,0 1.69,0.26 2.22,0.79c0.54,0.53 0.83,1.28 0.89,2.26h-1.25c-0.05,-0.62 -0.22,-1.1 -0.52,-1.45c-0.29,-0.35 -0.74,-0.52 -1.34,-0.52c-0.72,0 -1.24,0.23 -1.57,0.7C8.85,5.63 8.68,6.37 8.66,7.4v2.03c0,1 0.19,1.77 0.57,2.31c0.38,0.54 0.93,0.8 1.65,0.8c0.67,0 1.19,-0.16 1.54,-0.49l0.18,-0.17V9.59h-1.82V8.52h3.07V12.24z"/> + </group> +</vector> + diff --git a/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc312-mnc670/ic_5g_e_mobiledata.xml b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc312-mnc670/ic_5g_e_mobiledata.xml new file mode 100644 index 00000000..9577bb7f --- /dev/null +++ b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc312-mnc670/ic_5g_e_mobiledata.xml @@ -0,0 +1,3 @@ +<vector android:width="31.05dp" android:height="11.5dp" android:viewportWidth="27" android:viewportHeight="10" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:pathData="M19.3585 9.45946l2.6848-5.67568h4.5436l-.4956 1.05406h-2.974l-.537 1.13513h2.437l-.5369 1.05406h-2.3958l-.6608 1.37837h3.2631l-.4544 1.05406h-4.874zM12.7772 3.82432c1.1565-1.5 3.3044-1.58108 3.7174-1.58108h.2892c1.1565 0 2.1479-.68919 2.6022-1.662159 0-.04054 0-.081081-.0413-.081081h-2.8501c-2.3544.040541-3.8827.77027-4.9153 1.78378-.6196.64865-.9913 1.25676-1.1153 1.58108-.2478.52703-.4543 1.05406-.57823 1.54055-.33044 1.33783.04131 2.43243.53693 3C11.0423 9.09459 12.075 9.5 13.438 9.5c2.0653 0 3.511-1.01351 3.511-1.01351l2.1479-4.62163c0-.04054 0-.08108-.0413-.08108h-3.2631c-1.0327 0-1.6936.68919-2.0653 1.62163h2.5196l-.8261 1.7027c-.0413.04054-.7848.44594-1.7348.44594-.4131 0-.9914-.12162-1.3631-.48648-.3718-.40541-.4544-1.05406-.2891-1.66216.1652-.64865.413-1.13514.7435-1.58109zM8.39878 4.27026c-.49567-.40541-1.11525-.48649-1.98267-.48649H4.68128l.7022-1.5h2.72616c1.15655 0 2.14786-.68919 2.60226-1.662162 0-.04054 0-.081081-.0413-.081081H4.14431L1.83121 5.40539h4.04793c.82611 0 .99133.44595.82611.93243-.16522.44595-.66089.77027-1.03263.93244-.41306.2027-.99134.32432-1.65222.32432-.53697 0-.99133-.04054-1.61092-.2027-.24783-.08108-.61958-.20271-1.07394-.40541L.509434 8.72972c.950026.44594 2.313106.72972 3.180516.72972.82611 0 1.98267-.16216 2.68486-.4054.66089-.28378 1.19786-.56757 1.65222-1.0946.45436-.52702.82611-1.21621.90872-1.94594.08261-.72973-.20653-1.41892-.53697-1.74324z" android:fillColor="#000000"/> +</vector> diff --git a/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc312-mnc670/ic_5g_mobiledata.xml b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc312-mnc670/ic_5g_mobiledata.xml new file mode 100644 index 00000000..68b795a7 --- /dev/null +++ b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc312-mnc670/ic_5g_mobiledata.xml @@ -0,0 +1,3 @@ +<vector android:width="24.15dp" android:height="11.5dp" android:viewportWidth="21" android:viewportHeight="10" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:pathData="M11.489.608155c-.2515.493765-.6471.912165-1.1418 1.207735-.49467.29556-1.06868.45645-1.65686.46441H5.80602l-.80845 1.57309h1.83866c.7381-.06189 1.47575.12298 2.08008.52132.23591.20438.41399.45957.51852.74302.10452.28345.13227.58643.0808.8822-.14311.72341-.49148 1.39827-1.00916 1.95496-.47447.50268-1.07724.88672-1.75305 1.11693-.91702.28554-1.87928.42565-2.84642.41445-1.16311-.02438-2.30892-.26687-3.36854-.71291L1.462 6.98001c.36983.16678.75383.30496 1.14811.41315.55703.14675 1.13333.22088 1.71235.22026.60086.01484 1.19761-.09608 1.74603-.32452.46883-.19475.85346-.53033 1.09196-.95272.1951-.46398.01825-.92795-.85897-.92795H1.99535L4.50913.520833h6.91957c.0111-.000103.0222.002427.032.007353.0098.004927.0181.012089.0242.020815.006.008725.0095.01873.0103.029076.0007.010346-.0014.020695-.0062.030078zm1.3236 4.797465c-.1047.27913-.1338.57788-.0849.86993.049.29204.1745.56843.3656.80482.3875.33116.8997.50763 1.426.49134.6541-.00559 1.2969-.15807 1.8738-.44442l.8884-1.72167h-2.6962c.139-.44273.4272-.83242.8223-1.11181.3951-.27939.8763-.43375 1.3729-.44042h3.4836c.0099-.00002.0197.00231.0285.00676.0087.00445.016.01088.0214.01869.0053.0078.0084.01673.009.02596.0006.00922-.0013.01843-.0056.02678L17.9805 8.4723c-1.1188.65827-2.4146 1.01058-3.7391 1.01658-.5808.04128-1.1644-.03266-1.712-.21692-.5476-.18426-1.0468-.47462-1.4642-.85179-.3456-.42459-.5757-.92035-.6707-1.44517-.0951-.52482-.0523-1.06319.1247-1.56938.3402-1.47404 1.2466-2.78269 2.5499-3.68159C14.3724.825134 15.9835.397447 17.6015.520833h3.0093c.0111-.000103.0221.002427.032.007353.0098.004927.0181.012089.0241.020815.0061.008725.0096.01873.0104.029076.0007.010346-.0014.020695-.0062.030078-.2515.493765-.6471.912165-1.1418 1.207735-.4947.29556-1.0687.45645-1.6569.46441h-.2709c-1.0664-.08438-2.1308.18258-3.0065.75405-.8756.57147-1.5067 1.41097-1.7824 2.37127z" android:fillColor="#000000"/> +</vector> diff --git a/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc312-mnc670/ic_5g_plus_mobiledata.xml b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc312-mnc670/ic_5g_plus_mobiledata.xml new file mode 100644 index 00000000..0c7d770a --- /dev/null +++ b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc312-mnc670/ic_5g_plus_mobiledata.xml @@ -0,0 +1,3 @@ +<vector android:width="33.35dp" android:height="11.5dp" android:viewportWidth="29" android:viewportHeight="10" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:pathData="M11.6748.608155c-.2556.493765-.6575.912165-1.1602 1.207735-.5027.29556-1.08602.45645-1.68372.46441H5.89992L5.0784 3.85339h1.8684c.75003-.06189 1.49961.12298 2.11371.52132.23973.20438.42069.45957.52691.74302.10621.28345.13441.58643.0821.8822-.14542.72341-.49942 1.39827-1.02548 1.95496-.48214.50268-1.09465.88672-1.78139 1.11693-.93186.28554-1.90968.42565-2.89246.41445-1.18192-.02438-2.34626-.26687-3.423017-.71291l.938477-1.79335c.37581.16678.76602.30496 1.16668.41315.56604.14675 1.15166.22088 1.74004.22026.61057.01484 1.21697-.09608 1.77426-.32452.47642-.19475.86727-.53033 1.10963-.95272.19825-.46398.01854-.92795-.87287-.92795H2.02763L4.58206.520833h7.03144c.0114-.000103.0225.002427.0325.007353.01.004927.0185.012089.0246.020815.0061.008725.0097.01873.0105.029076.0007.010346-.0014.020695-.0063.030078zm1.345 4.797465c-.1064.27913-.136.57788-.0862.86993.0497.29204.1773.56843.3715.80482.3937.33116.9142.50763 1.449.49134.6647-.00559 1.3179-.15807 1.9041-.44442l.9028-1.72167h-2.7398c.1412-.44273.4341-.83242.8356-1.11181.4015-.27939.8904-.43375 1.395-.44042h3.54c.0101-.00002.0201.00231.0289.00676.0089.00445.0164.01088.0218.01869.0054.0078.0086.01673.0092.02596.0006.00922-.0014.01843-.0057.02678L18.2713 8.4723c-1.1369.65827-2.4537 1.01058-3.7996 1.01658-.5901.04128-1.1832-.03266-1.7397-.21692-.5564-.18426-1.0637-.47462-1.4879-.85179-.3511-.42459-.5849-.92035-.6815-1.44517-.0966-.52482-.0531-1.06319.1267-1.56938.3458-1.47404 1.2668-2.78269 2.5912-3.68159C14.6049.825134 16.242.397447 17.8862.520833h3.0579c.0113-.000103.0225.002427.0325.007353.01.004927.0185.012089.0246.020815.0061.008725.0097.01873.0105.029076.0007.010346-.0014.020695-.0063.030078-.2556.493765-.6576.912165-1.1603 1.207735-.5026.29556-1.0859.45645-1.6836.46441h-.2753c-1.0837-.08438-2.1653.18258-3.0551.75405-.8898.57147-1.5311 1.41097-1.8113 2.37127zM25.8818 5.79662l1.0041-1.9341h-2.0167l-1.0027 1.9341h-2.3448l-.8044 1.54703h2.3462l-1.0026 1.9328h2.0167l1.0026-1.9328h2.4504l.8029-1.54703h-2.4517z" android:fillColor="#000000"/> +</vector> diff --git a/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc313-mnc100/ic_5g_e_mobiledata.xml b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc313-mnc100/ic_5g_e_mobiledata.xml new file mode 100644 index 00000000..9577bb7f --- /dev/null +++ b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc313-mnc100/ic_5g_e_mobiledata.xml @@ -0,0 +1,3 @@ +<vector android:width="31.05dp" android:height="11.5dp" android:viewportWidth="27" android:viewportHeight="10" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:pathData="M19.3585 9.45946l2.6848-5.67568h4.5436l-.4956 1.05406h-2.974l-.537 1.13513h2.437l-.5369 1.05406h-2.3958l-.6608 1.37837h3.2631l-.4544 1.05406h-4.874zM12.7772 3.82432c1.1565-1.5 3.3044-1.58108 3.7174-1.58108h.2892c1.1565 0 2.1479-.68919 2.6022-1.662159 0-.04054 0-.081081-.0413-.081081h-2.8501c-2.3544.040541-3.8827.77027-4.9153 1.78378-.6196.64865-.9913 1.25676-1.1153 1.58108-.2478.52703-.4543 1.05406-.57823 1.54055-.33044 1.33783.04131 2.43243.53693 3C11.0423 9.09459 12.075 9.5 13.438 9.5c2.0653 0 3.511-1.01351 3.511-1.01351l2.1479-4.62163c0-.04054 0-.08108-.0413-.08108h-3.2631c-1.0327 0-1.6936.68919-2.0653 1.62163h2.5196l-.8261 1.7027c-.0413.04054-.7848.44594-1.7348.44594-.4131 0-.9914-.12162-1.3631-.48648-.3718-.40541-.4544-1.05406-.2891-1.66216.1652-.64865.413-1.13514.7435-1.58109zM8.39878 4.27026c-.49567-.40541-1.11525-.48649-1.98267-.48649H4.68128l.7022-1.5h2.72616c1.15655 0 2.14786-.68919 2.60226-1.662162 0-.04054 0-.081081-.0413-.081081H4.14431L1.83121 5.40539h4.04793c.82611 0 .99133.44595.82611.93243-.16522.44595-.66089.77027-1.03263.93244-.41306.2027-.99134.32432-1.65222.32432-.53697 0-.99133-.04054-1.61092-.2027-.24783-.08108-.61958-.20271-1.07394-.40541L.509434 8.72972c.950026.44594 2.313106.72972 3.180516.72972.82611 0 1.98267-.16216 2.68486-.4054.66089-.28378 1.19786-.56757 1.65222-1.0946.45436-.52702.82611-1.21621.90872-1.94594.08261-.72973-.20653-1.41892-.53697-1.74324z" android:fillColor="#000000"/> +</vector> diff --git a/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc313-mnc100/ic_5g_mobiledata.xml b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc313-mnc100/ic_5g_mobiledata.xml new file mode 100644 index 00000000..68b795a7 --- /dev/null +++ b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc313-mnc100/ic_5g_mobiledata.xml @@ -0,0 +1,3 @@ +<vector android:width="24.15dp" android:height="11.5dp" android:viewportWidth="21" android:viewportHeight="10" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:pathData="M11.489.608155c-.2515.493765-.6471.912165-1.1418 1.207735-.49467.29556-1.06868.45645-1.65686.46441H5.80602l-.80845 1.57309h1.83866c.7381-.06189 1.47575.12298 2.08008.52132.23591.20438.41399.45957.51852.74302.10452.28345.13227.58643.0808.8822-.14311.72341-.49148 1.39827-1.00916 1.95496-.47447.50268-1.07724.88672-1.75305 1.11693-.91702.28554-1.87928.42565-2.84642.41445-1.16311-.02438-2.30892-.26687-3.36854-.71291L1.462 6.98001c.36983.16678.75383.30496 1.14811.41315.55703.14675 1.13333.22088 1.71235.22026.60086.01484 1.19761-.09608 1.74603-.32452.46883-.19475.85346-.53033 1.09196-.95272.1951-.46398.01825-.92795-.85897-.92795H1.99535L4.50913.520833h6.91957c.0111-.000103.0222.002427.032.007353.0098.004927.0181.012089.0242.020815.006.008725.0095.01873.0103.029076.0007.010346-.0014.020695-.0062.030078zm1.3236 4.797465c-.1047.27913-.1338.57788-.0849.86993.049.29204.1745.56843.3656.80482.3875.33116.8997.50763 1.426.49134.6541-.00559 1.2969-.15807 1.8738-.44442l.8884-1.72167h-2.6962c.139-.44273.4272-.83242.8223-1.11181.3951-.27939.8763-.43375 1.3729-.44042h3.4836c.0099-.00002.0197.00231.0285.00676.0087.00445.016.01088.0214.01869.0053.0078.0084.01673.009.02596.0006.00922-.0013.01843-.0056.02678L17.9805 8.4723c-1.1188.65827-2.4146 1.01058-3.7391 1.01658-.5808.04128-1.1644-.03266-1.712-.21692-.5476-.18426-1.0468-.47462-1.4642-.85179-.3456-.42459-.5757-.92035-.6707-1.44517-.0951-.52482-.0523-1.06319.1247-1.56938.3402-1.47404 1.2466-2.78269 2.5499-3.68159C14.3724.825134 15.9835.397447 17.6015.520833h3.0093c.0111-.000103.0221.002427.032.007353.0098.004927.0181.012089.0241.020815.0061.008725.0096.01873.0104.029076.0007.010346-.0014.020695-.0062.030078-.2515.493765-.6471.912165-1.1418 1.207735-.4947.29556-1.0687.45645-1.6569.46441h-.2709c-1.0664-.08438-2.1308.18258-3.0065.75405-.8756.57147-1.5067 1.41097-1.7824 2.37127z" android:fillColor="#000000"/> +</vector> diff --git a/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc313-mnc100/ic_5g_plus_mobiledata.xml b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc313-mnc100/ic_5g_plus_mobiledata.xml new file mode 100644 index 00000000..0c7d770a --- /dev/null +++ b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc313-mnc100/ic_5g_plus_mobiledata.xml @@ -0,0 +1,3 @@ +<vector android:width="33.35dp" android:height="11.5dp" android:viewportWidth="29" android:viewportHeight="10" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:pathData="M11.6748.608155c-.2556.493765-.6575.912165-1.1602 1.207735-.5027.29556-1.08602.45645-1.68372.46441H5.89992L5.0784 3.85339h1.8684c.75003-.06189 1.49961.12298 2.11371.52132.23973.20438.42069.45957.52691.74302.10621.28345.13441.58643.0821.8822-.14542.72341-.49942 1.39827-1.02548 1.95496-.48214.50268-1.09465.88672-1.78139 1.11693-.93186.28554-1.90968.42565-2.89246.41445-1.18192-.02438-2.34626-.26687-3.423017-.71291l.938477-1.79335c.37581.16678.76602.30496 1.16668.41315.56604.14675 1.15166.22088 1.74004.22026.61057.01484 1.21697-.09608 1.77426-.32452.47642-.19475.86727-.53033 1.10963-.95272.19825-.46398.01854-.92795-.87287-.92795H2.02763L4.58206.520833h7.03144c.0114-.000103.0225.002427.0325.007353.01.004927.0185.012089.0246.020815.0061.008725.0097.01873.0105.029076.0007.010346-.0014.020695-.0063.030078zm1.345 4.797465c-.1064.27913-.136.57788-.0862.86993.0497.29204.1773.56843.3715.80482.3937.33116.9142.50763 1.449.49134.6647-.00559 1.3179-.15807 1.9041-.44442l.9028-1.72167h-2.7398c.1412-.44273.4341-.83242.8356-1.11181.4015-.27939.8904-.43375 1.395-.44042h3.54c.0101-.00002.0201.00231.0289.00676.0089.00445.0164.01088.0218.01869.0054.0078.0086.01673.0092.02596.0006.00922-.0014.01843-.0057.02678L18.2713 8.4723c-1.1369.65827-2.4537 1.01058-3.7996 1.01658-.5901.04128-1.1832-.03266-1.7397-.21692-.5564-.18426-1.0637-.47462-1.4879-.85179-.3511-.42459-.5849-.92035-.6815-1.44517-.0966-.52482-.0531-1.06319.1267-1.56938.3458-1.47404 1.2668-2.78269 2.5912-3.68159C14.6049.825134 16.242.397447 17.8862.520833h3.0579c.0113-.000103.0225.002427.0325.007353.01.004927.0185.012089.0246.020815.0061.008725.0097.01873.0105.029076.0007.010346-.0014.020695-.0063.030078-.2556.493765-.6576.912165-1.1603 1.207735-.5026.29556-1.0859.45645-1.6836.46441h-.2753c-1.0837-.08438-2.1653.18258-3.0551.75405-.8898.57147-1.5311 1.41097-1.8113 2.37127zM25.8818 5.79662l1.0041-1.9341h-2.0167l-1.0027 1.9341h-2.3448l-.8044 1.54703h2.3462l-1.0026 1.9328h2.0167l1.0026-1.9328h2.4504l.8029-1.54703h-2.4517z" android:fillColor="#000000"/> +</vector> diff --git a/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc313-mnc130/ic_5g_e_mobiledata.xml b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc313-mnc130/ic_5g_e_mobiledata.xml new file mode 100644 index 00000000..9577bb7f --- /dev/null +++ b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc313-mnc130/ic_5g_e_mobiledata.xml @@ -0,0 +1,3 @@ +<vector android:width="31.05dp" android:height="11.5dp" android:viewportWidth="27" android:viewportHeight="10" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:pathData="M19.3585 9.45946l2.6848-5.67568h4.5436l-.4956 1.05406h-2.974l-.537 1.13513h2.437l-.5369 1.05406h-2.3958l-.6608 1.37837h3.2631l-.4544 1.05406h-4.874zM12.7772 3.82432c1.1565-1.5 3.3044-1.58108 3.7174-1.58108h.2892c1.1565 0 2.1479-.68919 2.6022-1.662159 0-.04054 0-.081081-.0413-.081081h-2.8501c-2.3544.040541-3.8827.77027-4.9153 1.78378-.6196.64865-.9913 1.25676-1.1153 1.58108-.2478.52703-.4543 1.05406-.57823 1.54055-.33044 1.33783.04131 2.43243.53693 3C11.0423 9.09459 12.075 9.5 13.438 9.5c2.0653 0 3.511-1.01351 3.511-1.01351l2.1479-4.62163c0-.04054 0-.08108-.0413-.08108h-3.2631c-1.0327 0-1.6936.68919-2.0653 1.62163h2.5196l-.8261 1.7027c-.0413.04054-.7848.44594-1.7348.44594-.4131 0-.9914-.12162-1.3631-.48648-.3718-.40541-.4544-1.05406-.2891-1.66216.1652-.64865.413-1.13514.7435-1.58109zM8.39878 4.27026c-.49567-.40541-1.11525-.48649-1.98267-.48649H4.68128l.7022-1.5h2.72616c1.15655 0 2.14786-.68919 2.60226-1.662162 0-.04054 0-.081081-.0413-.081081H4.14431L1.83121 5.40539h4.04793c.82611 0 .99133.44595.82611.93243-.16522.44595-.66089.77027-1.03263.93244-.41306.2027-.99134.32432-1.65222.32432-.53697 0-.99133-.04054-1.61092-.2027-.24783-.08108-.61958-.20271-1.07394-.40541L.509434 8.72972c.950026.44594 2.313106.72972 3.180516.72972.82611 0 1.98267-.16216 2.68486-.4054.66089-.28378 1.19786-.56757 1.65222-1.0946.45436-.52702.82611-1.21621.90872-1.94594.08261-.72973-.20653-1.41892-.53697-1.74324z" android:fillColor="#000000"/> +</vector> diff --git a/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc313-mnc130/ic_5g_mobiledata.xml b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc313-mnc130/ic_5g_mobiledata.xml new file mode 100644 index 00000000..68b795a7 --- /dev/null +++ b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc313-mnc130/ic_5g_mobiledata.xml @@ -0,0 +1,3 @@ +<vector android:width="24.15dp" android:height="11.5dp" android:viewportWidth="21" android:viewportHeight="10" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:pathData="M11.489.608155c-.2515.493765-.6471.912165-1.1418 1.207735-.49467.29556-1.06868.45645-1.65686.46441H5.80602l-.80845 1.57309h1.83866c.7381-.06189 1.47575.12298 2.08008.52132.23591.20438.41399.45957.51852.74302.10452.28345.13227.58643.0808.8822-.14311.72341-.49148 1.39827-1.00916 1.95496-.47447.50268-1.07724.88672-1.75305 1.11693-.91702.28554-1.87928.42565-2.84642.41445-1.16311-.02438-2.30892-.26687-3.36854-.71291L1.462 6.98001c.36983.16678.75383.30496 1.14811.41315.55703.14675 1.13333.22088 1.71235.22026.60086.01484 1.19761-.09608 1.74603-.32452.46883-.19475.85346-.53033 1.09196-.95272.1951-.46398.01825-.92795-.85897-.92795H1.99535L4.50913.520833h6.91957c.0111-.000103.0222.002427.032.007353.0098.004927.0181.012089.0242.020815.006.008725.0095.01873.0103.029076.0007.010346-.0014.020695-.0062.030078zm1.3236 4.797465c-.1047.27913-.1338.57788-.0849.86993.049.29204.1745.56843.3656.80482.3875.33116.8997.50763 1.426.49134.6541-.00559 1.2969-.15807 1.8738-.44442l.8884-1.72167h-2.6962c.139-.44273.4272-.83242.8223-1.11181.3951-.27939.8763-.43375 1.3729-.44042h3.4836c.0099-.00002.0197.00231.0285.00676.0087.00445.016.01088.0214.01869.0053.0078.0084.01673.009.02596.0006.00922-.0013.01843-.0056.02678L17.9805 8.4723c-1.1188.65827-2.4146 1.01058-3.7391 1.01658-.5808.04128-1.1644-.03266-1.712-.21692-.5476-.18426-1.0468-.47462-1.4642-.85179-.3456-.42459-.5757-.92035-.6707-1.44517-.0951-.52482-.0523-1.06319.1247-1.56938.3402-1.47404 1.2466-2.78269 2.5499-3.68159C14.3724.825134 15.9835.397447 17.6015.520833h3.0093c.0111-.000103.0221.002427.032.007353.0098.004927.0181.012089.0241.020815.0061.008725.0096.01873.0104.029076.0007.010346-.0014.020695-.0062.030078-.2515.493765-.6471.912165-1.1418 1.207735-.4947.29556-1.0687.45645-1.6569.46441h-.2709c-1.0664-.08438-2.1308.18258-3.0065.75405-.8756.57147-1.5067 1.41097-1.7824 2.37127z" android:fillColor="#000000"/> +</vector> diff --git a/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc313-mnc130/ic_5g_plus_mobiledata.xml b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc313-mnc130/ic_5g_plus_mobiledata.xml new file mode 100644 index 00000000..0c7d770a --- /dev/null +++ b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc313-mnc130/ic_5g_plus_mobiledata.xml @@ -0,0 +1,3 @@ +<vector android:width="33.35dp" android:height="11.5dp" android:viewportWidth="29" android:viewportHeight="10" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:pathData="M11.6748.608155c-.2556.493765-.6575.912165-1.1602 1.207735-.5027.29556-1.08602.45645-1.68372.46441H5.89992L5.0784 3.85339h1.8684c.75003-.06189 1.49961.12298 2.11371.52132.23973.20438.42069.45957.52691.74302.10621.28345.13441.58643.0821.8822-.14542.72341-.49942 1.39827-1.02548 1.95496-.48214.50268-1.09465.88672-1.78139 1.11693-.93186.28554-1.90968.42565-2.89246.41445-1.18192-.02438-2.34626-.26687-3.423017-.71291l.938477-1.79335c.37581.16678.76602.30496 1.16668.41315.56604.14675 1.15166.22088 1.74004.22026.61057.01484 1.21697-.09608 1.77426-.32452.47642-.19475.86727-.53033 1.10963-.95272.19825-.46398.01854-.92795-.87287-.92795H2.02763L4.58206.520833h7.03144c.0114-.000103.0225.002427.0325.007353.01.004927.0185.012089.0246.020815.0061.008725.0097.01873.0105.029076.0007.010346-.0014.020695-.0063.030078zm1.345 4.797465c-.1064.27913-.136.57788-.0862.86993.0497.29204.1773.56843.3715.80482.3937.33116.9142.50763 1.449.49134.6647-.00559 1.3179-.15807 1.9041-.44442l.9028-1.72167h-2.7398c.1412-.44273.4341-.83242.8356-1.11181.4015-.27939.8904-.43375 1.395-.44042h3.54c.0101-.00002.0201.00231.0289.00676.0089.00445.0164.01088.0218.01869.0054.0078.0086.01673.0092.02596.0006.00922-.0014.01843-.0057.02678L18.2713 8.4723c-1.1369.65827-2.4537 1.01058-3.7996 1.01658-.5901.04128-1.1832-.03266-1.7397-.21692-.5564-.18426-1.0637-.47462-1.4879-.85179-.3511-.42459-.5849-.92035-.6815-1.44517-.0966-.52482-.0531-1.06319.1267-1.56938.3458-1.47404 1.2668-2.78269 2.5912-3.68159C14.6049.825134 16.242.397447 17.8862.520833h3.0579c.0113-.000103.0225.002427.0325.007353.01.004927.0185.012089.0246.020815.0061.008725.0097.01873.0105.029076.0007.010346-.0014.020695-.0063.030078-.2556.493765-.6576.912165-1.1603 1.207735-.5026.29556-1.0859.45645-1.6836.46441h-.2753c-1.0837-.08438-2.1653.18258-3.0551.75405-.8898.57147-1.5311 1.41097-1.8113 2.37127zM25.8818 5.79662l1.0041-1.9341h-2.0167l-1.0027 1.9341h-2.3448l-.8044 1.54703h2.3462l-1.0026 1.9328h2.0167l1.0026-1.9328h2.4504l.8029-1.54703h-2.4517z" android:fillColor="#000000"/> +</vector> diff --git a/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc313-mnc140/ic_5g_e_mobiledata.xml b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc313-mnc140/ic_5g_e_mobiledata.xml new file mode 100644 index 00000000..9577bb7f --- /dev/null +++ b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc313-mnc140/ic_5g_e_mobiledata.xml @@ -0,0 +1,3 @@ +<vector android:width="31.05dp" android:height="11.5dp" android:viewportWidth="27" android:viewportHeight="10" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:pathData="M19.3585 9.45946l2.6848-5.67568h4.5436l-.4956 1.05406h-2.974l-.537 1.13513h2.437l-.5369 1.05406h-2.3958l-.6608 1.37837h3.2631l-.4544 1.05406h-4.874zM12.7772 3.82432c1.1565-1.5 3.3044-1.58108 3.7174-1.58108h.2892c1.1565 0 2.1479-.68919 2.6022-1.662159 0-.04054 0-.081081-.0413-.081081h-2.8501c-2.3544.040541-3.8827.77027-4.9153 1.78378-.6196.64865-.9913 1.25676-1.1153 1.58108-.2478.52703-.4543 1.05406-.57823 1.54055-.33044 1.33783.04131 2.43243.53693 3C11.0423 9.09459 12.075 9.5 13.438 9.5c2.0653 0 3.511-1.01351 3.511-1.01351l2.1479-4.62163c0-.04054 0-.08108-.0413-.08108h-3.2631c-1.0327 0-1.6936.68919-2.0653 1.62163h2.5196l-.8261 1.7027c-.0413.04054-.7848.44594-1.7348.44594-.4131 0-.9914-.12162-1.3631-.48648-.3718-.40541-.4544-1.05406-.2891-1.66216.1652-.64865.413-1.13514.7435-1.58109zM8.39878 4.27026c-.49567-.40541-1.11525-.48649-1.98267-.48649H4.68128l.7022-1.5h2.72616c1.15655 0 2.14786-.68919 2.60226-1.662162 0-.04054 0-.081081-.0413-.081081H4.14431L1.83121 5.40539h4.04793c.82611 0 .99133.44595.82611.93243-.16522.44595-.66089.77027-1.03263.93244-.41306.2027-.99134.32432-1.65222.32432-.53697 0-.99133-.04054-1.61092-.2027-.24783-.08108-.61958-.20271-1.07394-.40541L.509434 8.72972c.950026.44594 2.313106.72972 3.180516.72972.82611 0 1.98267-.16216 2.68486-.4054.66089-.28378 1.19786-.56757 1.65222-1.0946.45436-.52702.82611-1.21621.90872-1.94594.08261-.72973-.20653-1.41892-.53697-1.74324z" android:fillColor="#000000"/> +</vector> diff --git a/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc313-mnc140/ic_5g_mobiledata.xml b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc313-mnc140/ic_5g_mobiledata.xml new file mode 100644 index 00000000..68b795a7 --- /dev/null +++ b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc313-mnc140/ic_5g_mobiledata.xml @@ -0,0 +1,3 @@ +<vector android:width="24.15dp" android:height="11.5dp" android:viewportWidth="21" android:viewportHeight="10" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:pathData="M11.489.608155c-.2515.493765-.6471.912165-1.1418 1.207735-.49467.29556-1.06868.45645-1.65686.46441H5.80602l-.80845 1.57309h1.83866c.7381-.06189 1.47575.12298 2.08008.52132.23591.20438.41399.45957.51852.74302.10452.28345.13227.58643.0808.8822-.14311.72341-.49148 1.39827-1.00916 1.95496-.47447.50268-1.07724.88672-1.75305 1.11693-.91702.28554-1.87928.42565-2.84642.41445-1.16311-.02438-2.30892-.26687-3.36854-.71291L1.462 6.98001c.36983.16678.75383.30496 1.14811.41315.55703.14675 1.13333.22088 1.71235.22026.60086.01484 1.19761-.09608 1.74603-.32452.46883-.19475.85346-.53033 1.09196-.95272.1951-.46398.01825-.92795-.85897-.92795H1.99535L4.50913.520833h6.91957c.0111-.000103.0222.002427.032.007353.0098.004927.0181.012089.0242.020815.006.008725.0095.01873.0103.029076.0007.010346-.0014.020695-.0062.030078zm1.3236 4.797465c-.1047.27913-.1338.57788-.0849.86993.049.29204.1745.56843.3656.80482.3875.33116.8997.50763 1.426.49134.6541-.00559 1.2969-.15807 1.8738-.44442l.8884-1.72167h-2.6962c.139-.44273.4272-.83242.8223-1.11181.3951-.27939.8763-.43375 1.3729-.44042h3.4836c.0099-.00002.0197.00231.0285.00676.0087.00445.016.01088.0214.01869.0053.0078.0084.01673.009.02596.0006.00922-.0013.01843-.0056.02678L17.9805 8.4723c-1.1188.65827-2.4146 1.01058-3.7391 1.01658-.5808.04128-1.1644-.03266-1.712-.21692-.5476-.18426-1.0468-.47462-1.4642-.85179-.3456-.42459-.5757-.92035-.6707-1.44517-.0951-.52482-.0523-1.06319.1247-1.56938.3402-1.47404 1.2466-2.78269 2.5499-3.68159C14.3724.825134 15.9835.397447 17.6015.520833h3.0093c.0111-.000103.0221.002427.032.007353.0098.004927.0181.012089.0241.020815.0061.008725.0096.01873.0104.029076.0007.010346-.0014.020695-.0062.030078-.2515.493765-.6471.912165-1.1418 1.207735-.4947.29556-1.0687.45645-1.6569.46441h-.2709c-1.0664-.08438-2.1308.18258-3.0065.75405-.8756.57147-1.5067 1.41097-1.7824 2.37127z" android:fillColor="#000000"/> +</vector> diff --git a/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc313-mnc140/ic_5g_plus_mobiledata.xml b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc313-mnc140/ic_5g_plus_mobiledata.xml new file mode 100644 index 00000000..0c7d770a --- /dev/null +++ b/overlay/frameworks/base/packages/SettingsLib/res/drawable-mcc313-mnc140/ic_5g_plus_mobiledata.xml @@ -0,0 +1,3 @@ +<vector android:width="33.35dp" android:height="11.5dp" android:viewportWidth="29" android:viewportHeight="10" xmlns:android="http://schemas.android.com/apk/res/android"> + <path android:pathData="M11.6748.608155c-.2556.493765-.6575.912165-1.1602 1.207735-.5027.29556-1.08602.45645-1.68372.46441H5.89992L5.0784 3.85339h1.8684c.75003-.06189 1.49961.12298 2.11371.52132.23973.20438.42069.45957.52691.74302.10621.28345.13441.58643.0821.8822-.14542.72341-.49942 1.39827-1.02548 1.95496-.48214.50268-1.09465.88672-1.78139 1.11693-.93186.28554-1.90968.42565-2.89246.41445-1.18192-.02438-2.34626-.26687-3.423017-.71291l.938477-1.79335c.37581.16678.76602.30496 1.16668.41315.56604.14675 1.15166.22088 1.74004.22026.61057.01484 1.21697-.09608 1.77426-.32452.47642-.19475.86727-.53033 1.10963-.95272.19825-.46398.01854-.92795-.87287-.92795H2.02763L4.58206.520833h7.03144c.0114-.000103.0225.002427.0325.007353.01.004927.0185.012089.0246.020815.0061.008725.0097.01873.0105.029076.0007.010346-.0014.020695-.0063.030078zm1.345 4.797465c-.1064.27913-.136.57788-.0862.86993.0497.29204.1773.56843.3715.80482.3937.33116.9142.50763 1.449.49134.6647-.00559 1.3179-.15807 1.9041-.44442l.9028-1.72167h-2.7398c.1412-.44273.4341-.83242.8356-1.11181.4015-.27939.8904-.43375 1.395-.44042h3.54c.0101-.00002.0201.00231.0289.00676.0089.00445.0164.01088.0218.01869.0054.0078.0086.01673.0092.02596.0006.00922-.0014.01843-.0057.02678L18.2713 8.4723c-1.1369.65827-2.4537 1.01058-3.7996 1.01658-.5901.04128-1.1832-.03266-1.7397-.21692-.5564-.18426-1.0637-.47462-1.4879-.85179-.3511-.42459-.5849-.92035-.6815-1.44517-.0966-.52482-.0531-1.06319.1267-1.56938.3458-1.47404 1.2668-2.78269 2.5912-3.68159C14.6049.825134 16.242.397447 17.8862.520833h3.0579c.0113-.000103.0225.002427.0325.007353.01.004927.0185.012089.0246.020815.0061.008725.0097.01873.0105.029076.0007.010346-.0014.020695-.0063.030078-.2556.493765-.6576.912165-1.1603 1.207735-.5026.29556-1.0859.45645-1.6836.46441h-.2753c-1.0837-.08438-2.1653.18258-3.0551.75405-.8898.57147-1.5311 1.41097-1.8113 2.37127zM25.8818 5.79662l1.0041-1.9341h-2.0167l-1.0027 1.9341h-2.3448l-.8044 1.54703h2.3462l-1.0026 1.9328h2.0167l1.0026-1.9328h2.4504l.8029-1.54703h-2.4517z" android:fillColor="#000000"/> +</vector> diff --git a/overlay/frameworks/base/packages/SettingsLib/res/values-mcc310-mnc004/strings.xml b/overlay/frameworks/base/packages/SettingsLib/res/values-mcc310-mnc004/strings.xml new file mode 100644 index 00000000..f8ed0c01 --- /dev/null +++ b/overlay/frameworks/base/packages/SettingsLib/res/values-mcc310-mnc004/strings.xml @@ -0,0 +1,22 @@ +<?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. + */ +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <!-- Content description of the data connection type 5G UW. [CHAR LIMIT=NONE] --> + <string name="data_connection_5g_plus" translatable="false">5G UW</string> +</resources> diff --git a/overlay/frameworks/base/packages/SettingsLib/res/values-mcc311-mnc480/strings.xml b/overlay/frameworks/base/packages/SettingsLib/res/values-mcc311-mnc480/strings.xml new file mode 100644 index 00000000..f8ed0c01 --- /dev/null +++ b/overlay/frameworks/base/packages/SettingsLib/res/values-mcc311-mnc480/strings.xml @@ -0,0 +1,22 @@ +<?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. + */ +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <!-- Content description of the data connection type 5G UW. [CHAR LIMIT=NONE] --> + <string name="data_connection_5g_plus" translatable="false">5G UW</string> +</resources> diff --git a/overlay/frameworks/base/packages/SettingsLib/res/values-mcc440-mnc20/config.xml b/overlay/frameworks/base/packages/SettingsLib/res/values-mcc440-mnc20/config.xml new file mode 100644 index 00000000..f9741d75 --- /dev/null +++ b/overlay/frameworks/base/packages/SettingsLib/res/values-mcc440-mnc20/config.xml @@ -0,0 +1,26 @@ +<?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 my obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ +--> + +<!-- These resources are around just to allow their values to be customized + for different hardware and product builds. --> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <!-- Control whether status bar should distinguish HSPA data icon from UMTS + data icon on devices --> + <bool name="config_hspa_data_distinguishable">false</bool> +</resources> diff --git a/overlay/packages/apps/Settings/res/values-mcc262-mnc01/strings.xml b/overlay/packages/apps/Settings/res/values-mcc262-mnc01/strings.xml new file mode 100644 index 00000000..cff4d804 --- /dev/null +++ b/overlay/packages/apps/Settings/res/values-mcc262-mnc01/strings.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** Copyright 2017, The Android Open Source Project +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ +--> + +<resources> + <string name="wifi_calling_settings_title">WLAN Call</string> +</resources> diff --git a/overlay/packages/apps/Settings/res/values/bools.xml b/overlay/packages/apps/Settings/res/values/bools.xml new file mode 100755 index 00000000..bb937893 --- /dev/null +++ b/overlay/packages/apps/Settings/res/values/bools.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright 2017 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<resources> + <!-- Whether to show a preference item for mobile plan --> + <bool name="config_show_mobile_plan">false</bool> +</resources> diff --git a/overlay/packages/apps/Settings/res/values/config.xml b/overlay/packages/apps/Settings/res/values/config.xml new file mode 100755 index 00000000..d8c7f6dc --- /dev/null +++ b/overlay/packages/apps/Settings/res/values/config.xml @@ -0,0 +1,36 @@ +<?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. +--> + +<resources> + <!-- The number of vibration intensity levels supported by the device. + + Note that this should correspond to the ability to vary the vibration amplitude, with + enough dynamic range to have at least as many distinct intensity levels as defined here. + + Supported values are 1, 2, 3. If '1', the settings app will use a toggle for the settings, + otherwise a slider. If '3', the settings app maps intensities directly to the levels + supported by the Vibrator HAL APIs. If '2', then the levels will be mapped to + VIBRATION_INTENSITY_LOW and VIBRATION_INTENSITY_HIGH, which gives the most range for + scaling vibrations. The medium intensity will be skipped. + + The default intensity values are configured at + frameworks/base/core/res/res/values/config.xml's config_default[type]VibrationIntensity. + Make sure that each default intensity value is consistent with the supported levels set + here. If this settings supports only 2 levels, for example, then the default intensity + should be either LOW (1) or HIGH (3). + --> + <integer name="config_vibration_supported_intensity_levels">2</integer> +</resources> diff --git a/overlay/packages/services/Telephony/res/values/config.xml b/overlay/packages/services/Telephony/res/values/config.xml new file mode 100644 index 00000000..4137a37e --- /dev/null +++ b/overlay/packages/services/Telephony/res/values/config.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- 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. +--> + +<!-- Phone app resources that may need to be customized + for different hardware or product builds. --> +<resources> + <!-- Allow handover from telephony calls to another ConnectionService. --> + <bool name="config_support_handover_from">true</bool> + + <!-- Flag indicating whether the device supports RTT (real-time text) --> + <bool name="config_support_rtt">true</bool> + + <!-- String indicating the package name of the device ImsService implementation for MMTEL. --> + <string name="config_ims_mmtel_package" translatable="false">org.codeaurora.ims</string> + + <!-- String indicating the package name of the device ImsService implementation for RCS. --> + <string name="config_ims_rcs_package" translatable="false">com.android.service.ims</string> + + <!-- Whether or not to support RCS User Capability Exchange --> + <bool name="config_rcs_user_capability_exchange_enabled">false</bool> + + <!-- This device supports the AudioManager Telephony audio device and output onto this + device using {@link AudioDeviceInfo#TYPE_TELEPHONY}. + This is used to support carriers which generate a recording tone to the remote party + when a call recording app is in use. --> + <bool name="config_support_telephony_audio_device">true</bool> + + <!-- This device can connect to 5G network in DSDS mode. --> + <bool name="config_5g_connection_in_dsds_mode">true</bool> + + <!-- This device requires that emergency calls are placed over the default data SIM when + possible because GNSS SUPL can only be received from the network on data subscription. --> + <bool name="config_gnss_supl_requires_default_data_for_emergency">true</bool> +</resources> diff --git a/p2p_supplicant_overlay.conf b/p2p_supplicant_overlay.conf new file mode 100644 index 00000000..d66504cc --- /dev/null +++ b/p2p_supplicant_overlay.conf @@ -0,0 +1,2 @@ +disable_scan_offload=1 +p2p_go_vht=1 diff --git a/parts/Android.bp b/parts/Android.bp new file mode 100644 index 00000000..594360b4 --- /dev/null +++ b/parts/Android.bp @@ -0,0 +1,23 @@ +// +// Copyright (C) 2021 The LineageOS Project +// +// SPDX-License-Identifier: Apache-2.0 +// + +android_app { + name: "GoogleParts", + + srcs: ["src/**/*.java"], + certificate: "platform", + platform_apis: true, + privileged: true, + system_ext_specific: true, + + static_libs: [ + "org.lineageos.settings.resources", + ], + + optimize: { + proguard_flags_files: ["proguard.flags"], + }, +} diff --git a/parts/AndroidManifest.xml b/parts/AndroidManifest.xml new file mode 100644 index 00000000..b5c79ae8 --- /dev/null +++ b/parts/AndroidManifest.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (C) 2021 The LineageOS Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="org.lineageos.settings" + android:versionCode="1" + android:versionName="1.0" + android:sharedUserId="android.uid.system"> + + <queries> + <package android:name="com.google.android.gms" /> + <package android:name="com.google.android.gsf" /> + <package android:name="com.google.android.euicc" /> + <package android:name="com.google.euiccpixel" /> + </queries> + + <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> + + <uses-sdk + android:minSdkVersion="30" + android:targetSdkVersion="30"/> + + <application + android:label="@string/device_settings_app_name" + android:persistent="true"> + + <receiver android:name=".BootCompletedReceiver"> + <intent-filter> + <action android:name="android.intent.action.BOOT_COMPLETED" /> + <category android:name="android.intent.category.DEFAULT" /> + </intent-filter> + </receiver> + + </application> +</manifest> diff --git a/parts/proguard.flags b/parts/proguard.flags new file mode 100644 index 00000000..3dbac7bc --- /dev/null +++ b/parts/proguard.flags @@ -0,0 +1,3 @@ +-keep class org.lineageos.settings.* { + *; +} diff --git a/parts/src/org/lineageos/settings/BootCompletedReceiver.java b/parts/src/org/lineageos/settings/BootCompletedReceiver.java new file mode 100644 index 00000000..3b56b2d5 --- /dev/null +++ b/parts/src/org/lineageos/settings/BootCompletedReceiver.java @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2021 The LineageOS 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 org.lineageos.settings; + +import android.content.BroadcastReceiver; +import android.content.Context; +import android.content.Intent; +import android.util.Log; + +public class BootCompletedReceiver extends BroadcastReceiver { + private static final String TAG = "GoogleParts"; + + @Override + public void onReceive(final Context context, Intent intent) { + Log.d(TAG, "Received boot completed intent"); + EuiccDisabler.enableOrDisableEuicc(context); + } +} diff --git a/parts/src/org/lineageos/settings/EuiccDisabler.java b/parts/src/org/lineageos/settings/EuiccDisabler.java new file mode 100644 index 00000000..a102841c --- /dev/null +++ b/parts/src/org/lineageos/settings/EuiccDisabler.java @@ -0,0 +1,71 @@ +/* + * Copyright (C) 2021 The LineageOS 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 org.lineageos.settings; + +import android.content.Context; +import android.content.pm.PackageInfo; +import android.content.pm.PackageManager; +import android.util.Log; + +class EuiccDisabler { + private static final String TAG = "GoogleParts"; + private static final String[] EUICC_DEPENDENCIES = new String[]{ + "com.google.android.gms", + "com.google.android.gsf" + }; + private static final String[] EUICC_PACKAGES = new String[]{ + "com.google.android.euicc", + "com.google.euiccpixel" + }; + + private static boolean isInstalledAndEnabled(PackageManager pm, String pkgName) { + try { + PackageInfo info = pm.getPackageInfo(pkgName, 0); + Log.d(TAG, "package " + pkgName + " installed, " + + "enabled = " + info.applicationInfo.enabled); + return info.applicationInfo.enabled; + } catch (PackageManager.NameNotFoundException e) { + Log.d(TAG, "package " + pkgName + " is not installed"); + return false; + } + } + + private static boolean shouldDisable(PackageManager pm) { + for (String dep : EUICC_DEPENDENCIES) { + if (!isInstalledAndEnabled(pm, dep)) { + // Disable if any of the dependencies are disabled + return true; + } + } + return false; + } + + public static void enableOrDisableEuicc(Context context) { + PackageManager pm = context.getPackageManager(); + boolean disable = shouldDisable(pm); + int flag = disable + ? PackageManager.COMPONENT_ENABLED_STATE_DISABLED + : PackageManager.COMPONENT_ENABLED_STATE_ENABLED; + for (String pkg : EUICC_PACKAGES) { + try { + pm.setApplicationEnabledSetting(pkg, flag, 0); + } catch (IllegalArgumentException e) { + Log.d(TAG, "package " + pkg + " is not present"); + } + } + } +} diff --git a/pixelstats/Android.bp b/pixelstats/Android.bp new file mode 100644 index 00000000..b0d0828c --- /dev/null +++ b/pixelstats/Android.bp @@ -0,0 +1,35 @@ +// +// 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. + +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + +cc_binary { + name: "pixelstats-vendor", + init_rc: ["pixelstats-vendor.redbull.rc"], + srcs: [ + "service.cpp", + ], + shared_libs: [ + "libbase", + "liblog", + "libutils", + "libpixelstats", + ], + proprietary: true, + static_libs: ["chre_client"], + header_libs: ["chre_api"], +} diff --git a/pixelstats/pixelstats-vendor.redbull.rc b/pixelstats/pixelstats-vendor.redbull.rc new file mode 100644 index 00000000..fdf8f79e --- /dev/null +++ b/pixelstats/pixelstats-vendor.redbull.rc @@ -0,0 +1,4 @@ +service vendor.pixelstats_vendor /vendor/bin/pixelstats-vendor + class hal + user system + group system context_hub readproc diff --git a/pixelstats/service.cpp b/pixelstats/service.cpp new file mode 100644 index 00000000..2ef0bef2 --- /dev/null +++ b/pixelstats/service.cpp @@ -0,0 +1,75 @@ +/* + * 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 "pixelstats" + +#include <android-base/logging.h> +#include <utils/StrongPointer.h> + +#include <pixelstats/DropDetect.h> +#include <pixelstats/SysfsCollector.h> +#include <pixelstats/UeventListener.h> + +using android::sp; +using android::hardware::google::pixel::DropDetect; +using android::hardware::google::pixel::SysfsCollector; +using android::hardware::google::pixel::UeventListener; + +#define BLOCK_STATS_LENGTH 15 +#define UFSHC_PATH(filename) "/dev/sys/block/bootdevice/" #filename +const struct SysfsCollector::SysfsPaths sysfs_paths = { + .SlowioReadCntPath = UFSHC_PATH(slowio_read_cnt), + .SlowioWriteCntPath = UFSHC_PATH(slowio_write_cnt), + .SlowioUnmapCntPath = UFSHC_PATH(slowio_unmap_cnt), + .SlowioSyncCntPath = UFSHC_PATH(slowio_sync_cnt), + .CycleCountBinsPath = "/sys/class/power_supply/battery/cycle_counts", + .ImpedancePath = "/sys/devices/platform/codec_detect/resistance_left_right", + .CodecPath = "/sys/devices/platform/codec_detect/codec_state", + .SpeechDspPath = "/sys/devices/platform/codec_detect/wdsp_stat", + .Codec1Path = "/sys/devices/platform/codec_detect/headset_codec_state", + .UFSLifetimeA = UFSHC_PATH(health_descriptor/life_time_estimation_a), + .UFSLifetimeB = UFSHC_PATH(health_descriptor/life_time_estimation_b), + .UFSLifetimeC = UFSHC_PATH(health_descriptor/life_time_estimation_c), + .F2fsStatsPath = "/sys/fs/f2fs/", + .EEPROMPath = "/dev/battery_history", + .UFSErrStatsPath = { + UFSHC_PATH(err_stats/err_host_reset) + } +}; + +const struct UeventListener::UeventPaths ueventPaths = { + .AudioUevent = "/kernel/q6audio/q6voice_uevent", +}; + +int main() { + LOG(INFO) << "starting PixelStats"; + + // b/118713028 Expect failure until drop detect nanoapp is enabled + sp<DropDetect> dropDetector = DropDetect::start(); + if (!dropDetector) { + LOG(ERROR) << "Unable to launch drop detection"; + return 1; + } + + UeventListener ueventListener(ueventPaths); + std::thread listenThread(&UeventListener::ListenForever, &ueventListener); + listenThread.detach(); + + SysfsCollector collector(sysfs_paths); + collector.collect(); // This blocks forever. + + return 0; +} diff --git a/powerhint.json b/powerhint.json new file mode 100644 index 00000000..f9903dc3 --- /dev/null +++ b/powerhint.json @@ -0,0 +1,1594 @@ +{ + "Nodes": [ + { + "Name": "CPULittleClusterMaxFreq", + "Path": "/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq", + "Values": [ + "9999999", + "1651200", + "1075200", + "864000", + "1075201", + "1363200", + "1516800", + "1651201" + ], + "DefaultIndex": 0, + "ResetOnInit": true + }, + { + "Name": "CPULittleClusterMinFreq", + "Path": "/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq", + "Values": [ + "9999999", + "575999", + "1075200", + "1363200", + "576000" + ], + "ResetOnInit": true + }, + { + "Name": "CPUBigClusterMaxFreq", + "Path": "/sys/devices/system/cpu/cpu6/cpufreq/scaling_max_freq", + "Values": [ + "9999999", + "1900800", + "1728000", + "1478400", + "9999998", + "940800", + "1152000", + "1478401", + "1728001", + "1900801" + + ], + "DefaultIndex": 0, + "ResetOnInit": true + }, + { + "Name": "CPUBigClusterMinFreq", + "Path": "/sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq", + "Values": [ + "9999999", + "1900800", + "1728000", + "1478400", + "652800" + ], + "ResetOnInit": true + }, + { + "Name": "CPUBigPlusClusterMaxFreq", + "Path": "/sys/devices/system/cpu/cpu7/cpufreq/scaling_max_freq", + "Values": [ + "9999999", + "1996800", + "1766400", + "9999998", + "1401600", + "1094400", + "1401601", + "1766401", + "1996801", + "2188800" + + ], + "DefaultIndex": 0, + "ResetOnInit": true + }, + { + "Name": "CPUBigPlusClusterMinFreq", + "Path": "/sys/devices/system/cpu/cpu7/cpufreq/scaling_min_freq", + "Values": [ + "9999999", + "1996800", + "1766400", + "806399", + "1401600", + "806400" + ], + "ResetOnInit": true + }, + { + "Name": "GPUMaxFreq", + "Path": "/sys/class/kgsl/kgsl-3d0/max_pwrlevel", + "Values": [ + "0", + "1" + ], + "Comments": [ + "0 => 625000000", + "1 => 500000000" + ], + "DefaultIndex": 0, + "ResetOnInit": true + }, + { + "Name": "GPUMinFreq", + "Path": "/sys/class/kgsl/kgsl-3d0/min_pwrlevel", + "Values": [ + "0", + "1", + "2", + "3" + ], + "Comments": [ + "0 => 625000000", + "1 => 500000000", + "2 => 400000000", + "3 => 275000000" + ], + "ResetOnInit": true + }, + { + "Name": "GPUForceRailOn", + "Path": "/sys/class/kgsl/kgsl-3d0/force_rail_on", + "Values": [ + "1", + "0" + ], + "ResetOnInit": true + }, + { + "Name": "GPUForceClkOn", + "Path": "/sys/class/kgsl/kgsl-3d0/force_clk_on", + "Values": [ + "1", + "0" + ], + "ResetOnInit": true + }, + { + "Name": "GPUIdleTimer", + "Path": "/sys/class/kgsl/kgsl-3d0/idle_timer", + "Values": [ + "10000", + "80" + ], + "ResetOnInit": true + }, + { + "Name": "TASchedtuneBoost", + "Path": "/dev/stune/top-app/schedtune.boost", + "Values": [ + "30", + "10" + ], + "ResetOnInit": true + }, + { + "Name": "TASchedtuneHighCap", + "Path": "/dev/stune/top-app/schedtune.prefer_high_cap", + "Values": [ + "1", + "0" + ], + "ResetOnInit": true + }, + { + "Name": "CDSchedtuneBoost", + "Path": "/dev/stune/camera-daemon/schedtune.boost", + "Values": [ + "1", + "0" + ], + "ResetOnInit": true + }, + { + "Name": "CDSchedtuneHighCap", + "Path": "/dev/stune/camera-daemon/schedtune.prefer_high_cap", + "Values": [ + "1", + "0" + ], + "ResetOnInit": true + }, + { + "Name": "CDCpusetCpus", + "Path": "/dev/cpuset/camera-daemon/cpus", + "Values": [ + "0-5", + "0-7" + ], + "ResetOnInit": true + }, + { + "Name": "CDDCpusetCpus", + "Path": "/dev/cpuset/camera-daemon-dedicated/cpus", + "Values": [ + "6-7", + "0-7" + ], + "ResetOnInit": true + }, + { + "Name": "CPUBWHystTriggerCount", + "Path": "/sys/class/devfreq/soc:qcom,cpu-cpu-llcc-bw/bw_hwmon/hyst_trigger_count", + "Values": [ + "0", + "3" + ], + "ResetOnInit": true + }, + { + "Name": "CPUBWHistMemory", + "Path": "/sys/class/devfreq/soc:qcom,cpu-cpu-llcc-bw/bw_hwmon/hist_memory", + "Values": [ + "0", + "20" + ], + "ResetOnInit": true + }, + { + "Name": "CPUBWHystLength", + "Path": "/sys/class/devfreq/soc:qcom,cpu-cpu-llcc-bw/bw_hwmon/hyst_length", + "Values": [ + "0", + "10" + ], + "ResetOnInit": true + }, + { + "Name": "CPUBWSampleMs", + "Path": "/sys/class/devfreq/soc:qcom,cpu-cpu-llcc-bw/bw_hwmon/sample_ms", + "Values": [ + "10", + "4" + ], + "ResetOnInit": true + }, + { + "Name": "CPUBWIOPercent", + "Path": "/sys/class/devfreq/soc:qcom,cpu-cpu-llcc-bw/bw_hwmon/io_percent", + "Values": [ + "80", + "34" + ], + "ResetOnInit": true + }, + { + "Name": "CPUBWUseAb", + "Path": "/sys/class/devfreq/soc:qcom,cpu-cpu-llcc-bw/bw_hwmon/use_ab", + "Values": [ + "0", + "1" + ], + "ResetOnInit": true + }, + { + "Name": "CPUBWMinFreq", + "Path": "/sys/class/devfreq/soc:qcom,cpu-cpu-llcc-bw/min_freq", + "Values": [ + "16265", + "9155", + "2288" + ], + "ResetOnInit": true + }, + { + "Name": "LLCCBWMinFreq", + "Path": "/sys/class/devfreq/soc:qcom,cpu-llcc-ddr-bw/min_freq", + "Values": [ + "7980", + "2597", + "762" + ], + "ResetOnInit": true + }, + { + "Name": "LLCCBWSampleMs", + "Path": "/sys/class/devfreq/soc:qcom,cpu-llcc-ddr-bw/bw_hwmon/sample_ms", + "Values": [ + "10", + "4" + ], + "ResetOnInit": true + }, + { + "Name": "LLCCBWHystLength", + "Path": "/sys/class/devfreq/soc:qcom,cpu-llcc-ddr-bw/bw_hwmon/hyst_length", + "Values": [ + "0", + "10" + ], + "ResetOnInit": true + }, + { + "Name": "LLCCBWUseAb", + "Path": "/sys/class/devfreq/soc:qcom,cpu-llcc-ddr-bw/bw_hwmon/use_ab", + "Values": [ + "0", + "1" + ], + "ResetOnInit": true + }, + { + "Name": "L3LittleClusterMinFreq", + "Path": "/sys/class/devfreq/18321000.qcom,devfreq-l3:qcom,cpu0-cpu-l3-lat/min_freq", + "Values": [ + "1440000000", + "300000000" + ], + "ResetOnInit": true + }, + { + "Name": "LLCCBWHystTriggerCount", + "Path": "/sys/class/devfreq/soc:qcom,cpu-llcc-ddr-bw/bw_hwmon/hyst_trigger_count", + "Values": [ + "0", + "3" + ], + "ResetOnInit": true + }, + { + "Name": "L3BigClusterMinFreq", + "Path": "/sys/class/devfreq/18321000.qcom,devfreq-l3:qcom,cpu6-cpu-l3-lat/min_freq", + "Values": [ + "1440000000", + "300000000" + ], + "ResetOnInit": true + }, + { + "Name": "L3BigPlusClusterMinFreq", + "Path": "/sys/class/devfreq/18321000.qcom,devfreq-l3:qcom,cpu7-cpu-l3-lat/min_freq", + "Values": [ + "1440000000", + "300000000" + ], + "ResetOnInit": true + }, + { + "Name": "PMQoSCpuDmaLatency", + "Path": "/dev/cpu_dma_latency", + "Values": [ + "61", + "100" + ], + "HoldFd": true + }, + { + "Name": "DisplayWakeup", + "Path": "/sys/devices/platform/soc/ae00000.qcom,mdss_mdp/drm/card0/sde-crtc-0/early_wakeup", + "Values": [ + "1", + "0" + ] + }, + { + "Name": "SkinThermCpuTzMode", + "Path": "/sys/devices/virtual/thermal/tz-by-name/skin-therm-cpu/mode", + "Values": [ + "enabled", + "disabled" + ], + "DefaultIndex": 0, + "ResetOnInit": true + }, + { + "Name": "SdmThermTzMode", + "Path": "/sys/devices/virtual/thermal/tz-by-name/sdm-therm/mode", + "Values": [ + "enabled", + "disabled" + ], + "DefaultIndex": 0, + "ResetOnInit": true + }, + { + "Name": "SkinThermTzOffset", + "Path": "/sys/devices/virtual/thermal/tz-by-name/skin-therm/offset", + "Values": [ + "0", + "-500", + "-3000" + ], + "DefaultIndex": 0, + "ResetOnInit": true + }, + { + "Name": "SkinThermCpuTzOffset", + "Path": "/sys/devices/virtual/thermal/tz-by-name/skin-therm-cpu/offset", + "Values": [ + "0", + "-500", + "-3000" + ], + "DefaultIndex": 0, + "ResetOnInit": true + }, + { + "Name": "SkinThermMonitorTzOffset", + "Path": "/sys/devices/virtual/thermal/tz-by-name/skin-therm-monitor/offset", + "Values": [ + "0", + "-500", + "-3000" + ], + "DefaultIndex": 0, + "ResetOnInit": true + }, + { + "Name": "CellularEmergencyTzOffset", + "Path": "/sys/devices/virtual/thermal/tz-by-name/cellular-emergency/offset", + "Values": [ + "0", + "-500", + "-3000" + ], + "DefaultIndex": 0, + "ResetOnInit": true + }, + { + "Name": "PanelAudioThermTzOffset", + "Path": "/sys/devices/virtual/thermal/tz-by-name/panel-audio-therm/offset", + "Values": [ + "0", + "-500", + "-3000" + ], + "DefaultIndex": 0, + "ResetOnInit": true + }, + { + "Name": "UfsClkGateEnable", + "Path": "/dev/sys/block/bootdevice/clkgate_enable", + "Values": [ + "0", + "1" + ], + "ResetOnInit": true + }, + { + "Name": "PowerHALMainState", + "Path": "vendor.powerhal.state", + "Values": [ + "SUSTAINED_PERFORMANCE", + "" + ], + "Type": "Property" + }, + { + "Name": "PowerHALAudioState", + "Path": "vendor.powerhal.audio", + "Values": [ + "AUDIO_STREAMING_LOW_LATENCY", + "" + ], + "Type": "Property" + }, + { + "Name": "PowerHALRenderingState", + "Path": "vendor.powerhal.rendering", + "Values": [ + "EXPENSIVE_RENDERING", + "" + ], + "Type": "Property" + }, + { + "Name": "Dex2oatThreads", + "Path": "vendor.powerhal.dalvik.vm.dex2oat-threads", + "Values": [ + "1", + "2", + "4", + "6" + ], + "Type": "Property" + }, + { + "Name": "Dex2oatCPUSet", + "Path": "vendor.powerhal.dalvik.vm.dex2oat-cpu-set", + "Values": [ + "4,5", + "2,3,4,5", + "0,1,2,3,4,5,7" + ], + "Type": "Property" + } + ], + "Actions": [ + { + "PowerHint": "SUSTAINED_PERFORMANCE", + "Node": "PowerHALMainState", + "Duration": 0, + "Value": "SUSTAINED_PERFORMANCE" + }, + { + "PowerHint": "SUSTAINED_PERFORMANCE", + "Node": "CPUBigClusterMaxFreq", + "Duration": 0, + "Value": "1478400" + }, + { + "PowerHint": "SUSTAINED_PERFORMANCE", + "Node": "CPUBigPlusClusterMaxFreq", + "Duration": 0, + "Value": "1401600" + }, + { + "PowerHint": "SUSTAINED_PERFORMANCE", + "Node": "CPULittleClusterMaxFreq", + "Duration": 0, + "Value": "1075200" + }, + { + "PowerHint": "SUSTAINED_PERFORMANCE", + "Node": "GPUMaxFreq", + "Duration": 0, + "Value": "1" + }, + { + "PowerHint": "INTERACTION", + "Node": "CPUBigPlusClusterMinFreq", + "Duration": 0, + "Value": "1401600" + }, + { + "PowerHint": "INTERACTION", + "Node": "CPULittleClusterMinFreq", + "Duration": 0, + "Value": "1363200" + }, + { + "PowerHint": "INTERACTION", + "Node": "TASchedtuneBoost", + "Duration": 0, + "Value": "30" + }, + { + "PowerHint": "INTERACTION", + "Node": "TASchedtuneHighCap", + "Duration": 0, + "Value": "1" + }, + { + "PowerHint": "INTERACTION", + "Node": "CPUBWHystTriggerCount", + "Duration": 0, + "Value": "0" + }, + { + "PowerHint": "INTERACTION", + "Node": "CPUBWHystLength", + "Duration": 0, + "Value": "0" + }, + { + "PowerHint": "INTERACTION", + "Node": "CPUBWHistMemory", + "Duration": 0, + "Value": "0" + }, + { + "PowerHint": "INTERACTION", + "Node": "CPUBWMinFreq", + "Duration": 0, + "Value": "9155" + }, + { + "PowerHint": "INTERACTION", + "Node": "LLCCBWMinFreq", + "Duration": 0, + "Value": "2597" + }, + { + "PowerHint": "INTERACTION", + "Node": "UfsClkGateEnable", + "Duration": 200, + "Value": "0" + }, + { + "PowerHint": "LAUNCH", + "Node": "TASchedtuneHighCap", + "Duration": 5000, + "Value": "1" + }, + { + "PowerHint": "LAUNCH", + "Node": "CPUBigClusterMaxFreq", + "Duration": 5000, + "Value": "9999999" + }, + { + "PowerHint": "LAUNCH", + "Node": "CPUBigPlusClusterMaxFreq", + "Duration": 5000, + "Value": "9999999" + }, + { + "PowerHint": "LAUNCH", + "Node": "CPUBigClusterMinFreq", + "Duration": 5000, + "Value": "9999999" + }, + { + "PowerHint": "LAUNCH", + "Node": "CPUBigPlusClusterMinFreq", + "Duration": 5000, + "Value": "9999999" + }, + { + "PowerHint": "LAUNCH", + "Node": "CPULittleClusterMinFreq", + "Duration": 5000, + "Value": "9999999" + }, + { + "PowerHint": "LAUNCH", + "Node": "PMQoSCpuDmaLatency", + "Duration": 5000, + "Value": "61" + }, + { + "PowerHint": "LAUNCH", + "Node": "CPUBWHystTriggerCount", + "Duration": 5000, + "Value": "0" + }, + { + "PowerHint": "LAUNCH", + "Node": "CPUBWHystLength", + "Duration": 5000, + "Value": "0" + }, + { + "PowerHint": "LAUNCH", + "Node": "CPUBWHistMemory", + "Duration": 5000, + "Value": "0" + }, + { + "PowerHint": "LAUNCH", + "Node": "CPUBWMinFreq", + "Duration": 5000, + "Value": "16265" + }, + { + "PowerHint": "LAUNCH", + "Node": "GPUForceClkOn", + "Duration": 5000, + "Value": "1" + }, + { + "PowerHint": "LAUNCH", + "Node": "GPUForceRailOn", + "Duration": 5000, + "Value": "1" + }, + { + "PowerHint": "LAUNCH", + "Node": "GPUIdleTimer", + "Duration": 5000, + "Value": "10000" + }, + { + "PowerHint": "LAUNCH", + "Node": "LLCCBWMinFreq", + "Duration": 5000, + "Value": "7980" + }, + { + "PowerHint": "LAUNCH", + "Node": "L3LittleClusterMinFreq", + "Duration": 5000, + "Value": "1440000000" + }, + { + "PowerHint": "LAUNCH", + "Node": "L3BigClusterMinFreq", + "Duration": 5000, + "Value": "1440000000" + }, + { + "PowerHint": "LAUNCH", + "Node": "L3BigPlusClusterMinFreq", + "Duration": 5000, + "Value": "1440000000" + }, + { + "PowerHint": "LAUNCH", + "Node": "UfsClkGateEnable", + "Duration": 5000, + "Value": "0" + }, + { + "PowerHint": "CAMERA_LAUNCH", + "Node": "CPUBigClusterMaxFreq", + "Duration": 1000, + "Value": "9999999" + }, + { + "PowerHint": "CAMERA_LAUNCH", + "Node": "CPUBigPlusClusterMaxFreq", + "Duration": 1000, + "Value": "9999999" + }, + { + "PowerHint": "CAMERA_LAUNCH", + "Node": "CPUBigClusterMinFreq", + "Duration": 1000, + "Value": "9999999" + }, + { + "PowerHint": "CAMERA_LAUNCH", + "Node": "CPUBigPlusClusterMinFreq", + "Duration": 1000, + "Value": "9999999" + }, + { + "PowerHint": "CAMERA_LAUNCH", + "Node": "CPULittleClusterMaxFreq", + "Duration": 1000, + "Value": "9999999" + }, + { + "PowerHint": "CAMERA_LAUNCH", + "Node": "CPULittleClusterMinFreq", + "Duration": 1000, + "Value": "9999999" + }, + { + "PowerHint": "CAMERA_LAUNCH", + "Node": "PMQoSCpuDmaLatency", + "Duration": 1000, + "Value": "61" + }, + { + "PowerHint": "CAMERA_LAUNCH", + "Node": "CDSchedtuneBoost", + "Duration": 1000, + "Value": "1" + }, + { + "PowerHint": "CAMERA_LAUNCH", + "Node": "CDSchedtuneHighCap", + "Duration": 1000, + "Value": "1" + }, + { + "PowerHint": "CAMERA_LAUNCH", + "Node": "UfsClkGateEnable", + "Duration": 1000, + "Value": "0" + }, + { + "PowerHint": "CAMERA_STREAMING_MID", + "Node": "CDCpusetCpus", + "Duration": 0, + "Value": "0-5" + }, + { + "PowerHint": "CAMERA_STREAMING_MID", + "Node": "CDDCpusetCpus", + "Duration": 0, + "Value": "6-7" + }, + { + "PowerHint": "CAMERA_STREAMING_MID", + "Node": "CPUBigClusterMaxFreq", + "Duration": 0, + "Value": "1900800" + }, + { + "PowerHint": "CAMERA_STREAMING_MID", + "Node": "CPUBigPlusClusterMaxFreq", + "Duration": 0, + "Value": "1996800" + }, + { + "PowerHint": "CAMERA_STREAMING_MID", + "Node": "CPUBWSampleMs", + "Duration": 0, + "Value": "10" + }, + { + "PowerHint": "CAMERA_STREAMING_MID", + "Node": "CPUBWIOPercent", + "Duration": 0, + "Value": "80" + }, + { + "PowerHint": "CAMERA_STREAMING_MID", + "Node": "LLCCBWSampleMs", + "Duration": 0, + "Value": "10" + }, + { + "PowerHint": "CAMERA_STREAMING_MID", + "Node": "CDSchedtuneBoost", + "Duration": 0, + "Value": "1" + }, + { + "PowerHint": "CAMERA_STREAMING_MID", + "Node": "CDSchedtuneHighCap", + "Duration": 0, + "Value": "1" + }, + { + "PowerHint": "CAMERA_STREAMING_MID", + "Node": "SkinThermMonitorTzOffset", + "Duration": 0, + "Value": "-3000" + }, + { + "PowerHint": "CAMERA_STREAMING_MID", + "Node": "SkinThermTzOffset", + "Duration": 0, + "Value": "-3000" + }, + { + "PowerHint": "CAMERA_STREAMING_MID", + "Node": "SkinThermCpuTzOffset", + "Duration": 0, + "Value": "-3000" + }, + { + "PowerHint": "CAMERA_STREAMING_MID", + "Node": "CellularEmergencyTzOffset", + "Duration": 0, + "Value": "-3000" + }, + { + "PowerHint": "CAMERA_STREAMING_MID", + "Node": "PanelAudioThermTzOffset", + "Duration": 0, + "Value": "-3000" + }, + { + "PowerHint": "CAMERA_STREAMING_HIGH", + "Node": "CDCpusetCpus", + "Duration": 0, + "Value": "0-5" + }, + { + "PowerHint": "CAMERA_STREAMING_HIGH", + "Node": "CDDCpusetCpus", + "Duration": 0, + "Value": "6-7" + }, + { + "PowerHint": "CAMERA_STREAMING_HIGH", + "Node": "CPUBigClusterMaxFreq", + "Duration": 0, + "Value": "1728000" + }, + { + "PowerHint": "CAMERA_STREAMING_HIGH", + "Node": "CPUBigPlusClusterMaxFreq", + "Duration": 0, + "Value": "1766400" + }, + { + "PowerHint": "CAMERA_STREAMING_HIGH", + "Node": "CDSchedtuneBoost", + "Duration": 0, + "Value": "1" + }, + { + "PowerHint": "CAMERA_STREAMING_HIGH", + "Node": "CDSchedtuneHighCap", + "Duration": 0, + "Value": "1" + }, + { + "PowerHint": "CAMERA_STREAMING_HIGH", + "Node": "CPUBWSampleMs", + "Duration": 0, + "Value": "10" + }, + { + "PowerHint": "CAMERA_STREAMING_HIGH", + "Node": "CPUBWIOPercent", + "Duration": 0, + "Value": "80" + }, + { + "PowerHint": "CAMERA_STREAMING_HIGH", + "Node": "LLCCBWSampleMs", + "Duration": 0, + "Value": "10" + }, + { + "PowerHint": "CAMERA_STREAMING_HIGH", + "Node": "CPUBWHystTriggerCount", + "Duration": 0, + "Value": "0" + }, + { + "PowerHint": "CAMERA_STREAMING_HIGH", + "Node": "CPUBWHystLength", + "Duration": 0, + "Value": "0" + }, + { + "PowerHint": "CAMERA_STREAMING_HIGH", + "Node": "LLCCBWHystTriggerCount", + "Duration": 0, + "Value": "0" + }, + { + "PowerHint": "CAMERA_STREAMING_HIGH", + "Node": "LLCCBWHystLength", + "Duration": 0, + "Value": "0" + }, + { + "PowerHint": "CAMERA_STREAMING_HIGH", + "Node": "SkinThermMonitorTzOffset", + "Duration": 0, + "Value": "-3000" + }, + { + "PowerHint": "CAMERA_STREAMING_HIGH", + "Node": "SkinThermTzOffset", + "Duration": 0, + "Value": "-3000" + }, + { + "PowerHint": "CAMERA_STREAMING_HIGH", + "Node": "SkinThermCpuTzOffset", + "Duration": 0, + "Value": "-3000" + }, + { + "PowerHint": "CAMERA_STREAMING_HIGH", + "Node": "CellularEmergencyTzOffset", + "Duration": 0, + "Value": "-3000" + }, + { + "PowerHint": "CAMERA_STREAMING_HIGH", + "Node": "PanelAudioThermTzOffset", + "Duration": 0, + "Value": "-3000" + }, + { + "PowerHint": "CAMERA_STREAMING_ULTRA", + "Node": "CDCpusetCpus", + "Duration": 0, + "Value": "0-5" + }, + { + "PowerHint": "CAMERA_STREAMING_ULTRA", + "Node": "CDDCpusetCpus", + "Duration": 0, + "Value": "6-7" + }, + { + "PowerHint": "CAMERA_STREAMING_ULTRA", + "Node": "CPUBigClusterMaxFreq", + "Duration": 0, + "Value": "1728000" + }, + { + "PowerHint": "CAMERA_STREAMING_ULTRA", + "Node": "CPUBigPlusClusterMaxFreq", + "Duration": 0, + "Value": "1766400" + }, + { + "PowerHint": "CAMERA_STREAMING_ULTRA", + "Node": "CDSchedtuneBoost", + "Duration": 0, + "Value": "1" + }, + { + "PowerHint": "CAMERA_STREAMING_ULTRA", + "Node": "CDSchedtuneHighCap", + "Duration": 0, + "Value": "1" + }, + { + "PowerHint": "CAMERA_STREAMING_ULTRA", + "Node": "CPUBWSampleMs", + "Duration": 0, + "Value": "10" + }, + { + "PowerHint": "CAMERA_STREAMING_ULTRA", + "Node": "CPUBWIOPercent", + "Duration": 0, + "Value": "80" + }, + { + "PowerHint": "CAMERA_STREAMING_ULTRA", + "Node": "LLCCBWSampleMs", + "Duration": 0, + "Value": "10" + }, + { + "PowerHint": "CAMERA_STREAMING_ULTRA", + "Node": "CPUBWHystTriggerCount", + "Duration": 0, + "Value": "0" + }, + { + "PowerHint": "CAMERA_STREAMING_ULTRA", + "Node": "CPUBWHystLength", + "Duration": 0, + "Value": "0" + }, + { + "PowerHint": "CAMERA_STREAMING_ULTRA", + "Node": "LLCCBWHystTriggerCount", + "Duration": 0, + "Value": "0" + }, + { + "PowerHint": "CAMERA_STREAMING_ULTRA", + "Node": "LLCCBWHystLength", + "Duration": 0, + "Value": "0" + }, + { + "PowerHint": "CAMERA_STREAMING_ULTRA", + "Node": "CPUBWUseAb", + "Duration": 0, + "Value": "0" + }, + { + "PowerHint": "CAMERA_STREAMING_ULTRA", + "Node": "LLCCBWUseAb", + "Duration": 0, + "Value": "0" + }, + { + "PowerHint": "CAMERA_STREAMING_ULTRA", + "Node": "SkinThermCpuTzMode", + "Duration": 15000, + "Value": "disabled" + }, + { + "PowerHint": "CAMERA_STREAMING_ULTRA", + "Node": "SdmThermTzMode", + "Duration": 15000, + "Value": "disabled" + }, + { + "PowerHint": "CAMERA_STREAMING_ULTRA", + "Node": "SkinThermMonitorTzOffset", + "Duration": 15000, + "Value": "-500" + }, + { + "PowerHint": "CAMERA_STREAMING_ULTRA", + "Node": "SkinThermTzOffset", + "Duration": 15000, + "Value": "-500" + }, + { + "PowerHint": "CAMERA_STREAMING_ULTRA", + "Node": "SkinThermCpuTzOffset", + "Duration": 15000, + "Value": "-500" + }, + { + "PowerHint": "CAMERA_STREAMING_ULTRA", + "Node": "CellularEmergencyTzOffset", + "Duration": 15000, + "Value": "-500" + }, + { + "PowerHint": "CAMERA_STREAMING_ULTRA", + "Node": "PanelAudioThermTzOffset", + "Duration": 15000, + "Value": "-500" + }, + { + "PowerHint": "CAMERA_STREAMING_FRONT_OR_PREVIEW_ONLY", + "Node": "CDCpusetCpus", + "Duration": 0, + "Value": "0-5" + }, + { + "PowerHint": "CAMERA_STREAMING_FRONT_OR_PREVIEW_ONLY", + "Node": "CDDCpusetCpus", + "Duration": 0, + "Value": "6-7" + }, + { + "PowerHint": "CAMERA_STREAMING_FRONT_OR_PREVIEW_ONLY", + "Node": "CPUBigClusterMaxFreq", + "Duration": 0, + "Value": "1900800" + }, + { + "PowerHint": "CAMERA_STREAMING_FRONT_OR_PREVIEW_ONLY", + "Node": "CPUBigPlusClusterMaxFreq", + "Duration": 0, + "Value": "1996800" + }, + { + "PowerHint": "CAMERA_STREAMING_FRONT_OR_PREVIEW_ONLY", + "Node": "CPUBWSampleMs", + "Duration": 0, + "Value": "10" + }, + { + "PowerHint": "CAMERA_STREAMING_FRONT_OR_PREVIEW_ONLY", + "Node": "CPUBWIOPercent", + "Duration": 0, + "Value": "80" + }, + { + "PowerHint": "CAMERA_STREAMING_FRONT_OR_PREVIEW_ONLY", + "Node": "LLCCBWSampleMs", + "Duration": 0, + "Value": "10" + }, + { + "PowerHint": "CAMERA_STREAMING_FRONT_OR_PREVIEW_ONLY", + "Node": "CDSchedtuneBoost", + "Duration": 0, + "Value": "1" + }, + { + "PowerHint": "CAMERA_STREAMING_FRONT_OR_PREVIEW_ONLY", + "Node": "CDSchedtuneHighCap", + "Duration": 0, + "Value": "1" + }, + { + "PowerHint": "CAMERA_STREAMING_LOW", + "Node": "CDCpusetCpus", + "Duration": 0, + "Value": "0-5" + }, + { + "PowerHint": "CAMERA_STREAMING_LOW", + "Node": "CDDCpusetCpus", + "Duration": 0, + "Value": "6-7" + }, + { + "PowerHint": "CAMERA_STREAMING_LOW", + "Node": "CPUBigClusterMaxFreq", + "Duration": 0, + "Value": "1900800" + }, + { + "PowerHint": "CAMERA_STREAMING_LOW", + "Node": "CPUBigPlusClusterMaxFreq", + "Duration": 0, + "Value": "1996800" + }, + { + "PowerHint": "CAMERA_STREAMING_LOW", + "Node": "CPUBWSampleMs", + "Duration": 0, + "Value": "10" + }, + { + "PowerHint": "CAMERA_STREAMING_LOW", + "Node": "CPUBWIOPercent", + "Duration": 0, + "Value": "80" + }, + { + "PowerHint": "CAMERA_STREAMING_LOW", + "Node": "LLCCBWSampleMs", + "Duration": 0, + "Value": "10" + }, + { + "PowerHint": "CAMERA_STREAMING_LOW", + "Node": "CPUBWHystTriggerCount", + "Duration": 0, + "Value": "0" + }, + { + "PowerHint": "CAMERA_STREAMING_LOW", + "Node": "CPUBWHystLength", + "Duration": 0, + "Value": "0" + }, + { + "PowerHint": "CAMERA_STREAMING_LOW", + "Node": "LLCCBWHystTriggerCount", + "Duration": 0, + "Value": "0" + }, + { + "PowerHint": "CAMERA_STREAMING_LOW", + "Node": "LLCCBWHystLength", + "Duration": 0, + "Value": "0" + }, + { + "PowerHint": "CAMERA_STREAMING_LOW", + "Node": "SkinThermMonitorTzOffset", + "Duration": 0, + "Value": "-3000" + }, + { + "PowerHint": "CAMERA_STREAMING_LOW", + "Node": "SkinThermTzOffset", + "Duration": 0, + "Value": "-3000" + }, + { + "PowerHint": "CAMERA_STREAMING_LOW", + "Node": "SkinThermCpuTzOffset", + "Duration": 0, + "Value": "-3000" + }, + { + "PowerHint": "CAMERA_STREAMING_LOW", + "Node": "CellularEmergencyTzOffset", + "Duration": 0, + "Value": "-3000" + }, + { + "PowerHint": "CAMERA_STREAMING_LOW", + "Node": "PanelAudioThermTzOffset", + "Duration": 0, + "Value": "-3000" + }, + { + "PowerHint": "CAMERA_SHOT", + "Node": "CPUBigClusterMaxFreq", + "Duration": 1000, + "Value": "9999999" + }, + { + "PowerHint": "CAMERA_SHOT", + "Node": "CPUBigPlusClusterMaxFreq", + "Duration": 1000, + "Value": "9999999" + }, + { + "PowerHint": "CAMERA_SHOT", + "Node": "CPUBigClusterMinFreq", + "Duration": 1000, + "Value": "9999999" + }, + { + "PowerHint": "CAMERA_SHOT", + "Node": "CPUBigPlusClusterMinFreq", + "Duration": 1000, + "Value": "9999999" + }, + { + "PowerHint": "CAMERA_SHOT", + "Node": "CPULittleClusterMaxFreq", + "Duration": 1000, + "Value": "9999999" + }, + { + "PowerHint": "CAMERA_SHOT", + "Node": "CPULittleClusterMinFreq", + "Duration": 1000, + "Value": "9999999" + }, + { + "PowerHint": "CAMERA_SHOT", + "Node": "PMQoSCpuDmaLatency", + "Duration": 1000, + "Value": "61" + }, + { + "PowerHint": "AUDIO_LAUNCH", + "Node": "PMQoSCpuDmaLatency", + "Duration": 0, + "Value": "61" + }, + { + "PowerHint": "AUDIO_STREAMING_LOW_LATENCY", + "Node": "PowerHALAudioState", + "Duration": 0, + "Value": "AUDIO_STREAMING_LOW_LATENCY" + }, + { + "PowerHint": "AUDIO_STREAMING_LOW_LATENCY", + "Node": "PMQoSCpuDmaLatency", + "Duration": 0, + "Value": "61" + }, + { + "PowerHint": "EXPENSIVE_RENDERING", + "Node": "PowerHALRenderingState", + "Duration": 0, + "Value": "EXPENSIVE_RENDERING" + }, + { + "PowerHint": "EXPENSIVE_RENDERING", + "Node": "GPUMinFreq", + "Duration": 0, + "Value": "1" + }, + { + "PowerHint": "EXPENSIVE_RENDERING", + "Node": "GPUMaxFreq", + "Duration": 0, + "Value": "0" + }, + { + "PowerHint": "ML_ACC", + "Node": "PMQoSCpuDmaLatency", + "Duration": 2000, + "Value": "61" + }, + { + "PowerHint": "DISPLAY_UPDATE_IMMINENT", + "Node": "DisplayWakeup", + "Duration": 60, + "Value": "1" + }, + { + "PowerHint": "FIXED_PERFORMANCE", + "Node": "CPUBigPlusClusterMaxFreq", + "Duration": 0, + "Value": "9999999" + }, + { + "PowerHint": "FIXED_PERFORMANCE", + "Node": "CPUBigPlusClusterMinFreq", + "Duration": 0, + "Value": "9999999" + }, + { + "PowerHint": "FIXED_PERFORMANCE", + "Node": "CPUBigClusterMaxFreq", + "Duration": 0, + "Value": "9999999" + }, + { + "PowerHint": "FIXED_PERFORMANCE", + "Node": "CPUBigClusterMinFreq", + "Duration": 0, + "Value": "9999999" + }, + { + "PowerHint": "FIXED_PERFORMANCE", + "Node": "CPULittleClusterMaxFreq", + "Duration": 0, + "Value": "9999999" + }, + { + "PowerHint": "FIXED_PERFORMANCE", + "Node": "CPULittleClusterMinFreq", + "Duration": 0, + "Value": "9999999" + }, + { + "PowerHint": "FIXED_PERFORMANCE", + "Node": "GPUMaxFreq", + "Duration": 0, + "Value": "0" + }, + { + "PowerHint": "FIXED_PERFORMANCE", + "Node": "GPUMinFreq", + "Duration": 0, + "Value": "0" + }, + { + "PowerHint": "Flipendo", + "Node": "CPULittleClusterMaxFreq", + "Duration": 0, + "Value": "1651200" + }, + { + "PowerHint": "Flipendo", + "Node": "CPUBigPlusClusterMaxFreq", + "Duration": 0, + "Value": "1766400" + }, + { + "PowerHint": "Flipendo", + "Node": "CPUBigClusterMaxFreq", + "Duration": 0, + "Value": "1728000" + }, + { + "PowerHint": "LOW_POWER_LITTLE_CLUSTER_50", + "Node": "CPULittleClusterMaxFreq", + "Duration": 3600000, + "Value": "864000" + }, + { + "PowerHint": "LOW_POWER_LITTLE_CLUSTER_50", + "Node": "CPULittleClusterMinFreq", + "Duration": 3600000, + "Value": "575999" + }, + { + "PowerHint": "LOW_POWER_LITTLE_CLUSTER_60", + "Node": "CPULittleClusterMaxFreq", + "Duration": 3600000, + "Value": "1075201" + }, + { + "PowerHint": "LOW_POWER_LITTLE_CLUSTER_60", + "Node": "CPULittleClusterMinFreq", + "Duration": 3600000, + "Value": "575999" + }, + { + "PowerHint": "LOW_POWER_LITTLE_CLUSTER_70", + "Node": "CPULittleClusterMaxFreq", + "Duration": 3600000, + "Value": "1363200" + }, + { + "PowerHint": "LOW_POWER_LITTLE_CLUSTER_80", + "Node": "CPULittleClusterMaxFreq", + "Duration": 3600000, + "Value": "1516800" + }, + { + "PowerHint": "LOW_POWER_LITTLE_CLUSTER_90", + "Node": "CPULittleClusterMaxFreq", + "Duration": 3600000, + "Value": "1651201" + }, + { + "PowerHint": "LOW_POWER_CPU_50", + "Node": "CPUBigClusterMaxFreq", + "Duration": 3600000, + "Value": "940800" + }, + { + "PowerHint": "LOW_POWER_CPU_50", + "Node": "CPUBigPlusClusterMaxFreq", + "Duration": 3600000, + "Value": "1094400" + }, + { + "PowerHint": "LOW_POWER_CPU_50", + "Node": "CPUBigPlusClusterMinFreq", + "Duration": 3600000, + "Value": "806399" + }, + { + "PowerHint": "LOW_POWER_CPU_60", + "Node": "CPUBigClusterMaxFreq", + "Duration": 3600000, + "Value": "1152000" + }, + { + "PowerHint": "LOW_POWER_CPU_60", + "Node": "CPUBigPlusClusterMaxFreq", + "Duration": 3600000, + "Value": "1401601" + }, + { + "PowerHint": "LOW_POWER_CPU_60", + "Node": "CPUBigPlusClusterMinFreq", + "Duration": 3600000, + "Value": "806399" + }, + { + "PowerHint": "LOW_POWER_CPU_70", + "Node": "CPUBigClusterMaxFreq", + "Duration": 3600000, + "Value": "1478401" + }, + { + "PowerHint": "LOW_POWER_CPU_70", + "Node": "CPUBigPlusClusterMaxFreq", + "Duration": 3600000, + "Value": "1766401" + }, + { + "PowerHint": "LOW_POWER_CPU_80", + "Node": "CPUBigClusterMaxFreq", + "Duration": 3600000, + "Value": "1728001" + }, + { + "PowerHint": "LOW_POWER_CPU_80", + "Node": "CPUBigPlusClusterMaxFreq", + "Duration": 3600000, + "Value": "1996801" + }, + { + "PowerHint": "LOW_POWER_CPU_90", + "Node": "CPUBigClusterMaxFreq", + "Duration": 3600000, + "Value": "1900801" + }, + { + "PowerHint": "LOW_POWER_CPU_90", + "Node": "CPUBigPlusClusterMaxFreq", + "Duration": 3600000, + "Value": "2188800" + }, + { + "PowerHint": "THERMAL_skin-therm-monitor_LIGHT", + "Node": "Dex2oatThreads", + "Duration": 0, + "Value": "4" + }, + { + "PowerHint": "THERMAL_skin-therm-monitor_LIGHT", + "Node": "Dex2oatCPUSet", + "Duration": 0, + "Value": "2,3,4,5" + }, + { + "PowerHint": "THERMAL_skin-therm-monitor_MODERATE", + "Node": "Dex2oatThreads", + "Duration": 0, + "Value": "2" + }, + { + "PowerHint": "THERMAL_skin-therm-monitor_MODERATE", + "Node": "Dex2oatCPUSet", + "Duration": 0, + "Value": "2,3,4,5" + }, + { + "PowerHint": "THERMAL_skin-therm-monitor_SEVERE", + "Node": "Dex2oatThreads", + "Duration": 0, + "Value": "1" + }, + { + "PowerHint": "THERMAL_skin-therm-monitor_SEVERE", + "Node": "Dex2oatCPUSet", + "Duration": 0, + "Value": "4,5" + }, + { + "PowerHint": "THERMAL_skin-therm-monitor_CRITICAL", + "Node": "Dex2oatThreads", + "Duration": 0, + "Value": "1" + }, + { + "PowerHint": "THERMAL_skin-therm-monitor_CRITICAL", + "Node": "Dex2oatCPUSet", + "Duration": 0, + "Value": "4,5" + }, + { + "PowerHint": "THERMAL_skin-therm-monitor_EMERGENCY", + "Node": "Dex2oatThreads", + "Duration": 0, + "Value": "1" + }, + { + "PowerHint": "THERMAL_skin-therm-monitor_EMERGENCY", + "Node": "Dex2oatCPUSet", + "Duration": 0, + "Value": "4,5" + }, + { + "PowerHint": "THERMAL_skin-therm-monitor_EMERGENCY", + "Node": "SkinThermMonitorTzOffset", + "Duration": 0, + "Value": "0" + }, + { + "PowerHint": "THERMAL_skin-therm-monitor_EMERGENCY", + "Node": "SkinThermTzOffset", + "Duration": 0, + "Value": "0" + }, + { + "PowerHint": "THERMAL_skin-therm-monitor_EMERGENCY", + "Node": "SkinThermCpuTzOffset", + "Duration": 0, + "Value": "0" + }, + { + "PowerHint": "THERMAL_skin-therm-monitor_EMERGENCY", + "Node": "CellularEmergencyTzOffset", + "Duration": 0, + "Value": "0" + }, + { + "PowerHint": "THERMAL_skin-therm-monitor_EMERGENCY", + "Node": "PanelAudioThermTzOffset", + "Duration": 0, + "Value": "0" + } + + ] +} diff --git a/powerstats/Android.bp b/powerstats/Android.bp new file mode 100644 index 00000000..b6658165 --- /dev/null +++ b/powerstats/Android.bp @@ -0,0 +1,45 @@ +// +// 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 { + default_applicable_licenses: ["Android-Apache-2.0"], +} + +cc_binary { + name: "android.hardware.power.stats@1.0-service.pixel", + relative_install_path: "hw", + init_rc: ["android.hardware.power.stats@1.0-service.pixel.rc"], + srcs: ["service.cpp", + "RailDataProvider.cpp", + ], + cflags: [ + "-Wall", + "-Werror", + ], + static_libs: [ + "libpixelpowerstats", + ], + shared_libs: [ + "libbase", + "libcutils", + "libhidlbase", + "libfmq", + "liblog", + "libutils", + "android.hardware.power.stats@1.0", + "pixelpowerstats_provider_aidl_interface-cpp", + "libbinder", + ], + vendor: true, +} diff --git a/powerstats/RailDataProvider.cpp b/powerstats/RailDataProvider.cpp new file mode 100644 index 00000000..d78bc717 --- /dev/null +++ b/powerstats/RailDataProvider.cpp @@ -0,0 +1,285 @@ + +/* + * 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 "libpixelpowerstats" +#include <algorithm> +#include <thread> +#include <exception> +#include <inttypes.h> +#include <stdlib.h> +#include <android-base/file.h> +#include <android-base/logging.h> +#include <android-base/properties.h> +#include <android-base/strings.h> +#include <android-base/stringprintf.h> +#include "RailDataProvider.h" +namespace android { +namespace hardware { +namespace google { +namespace pixel { +namespace powerstats { +#define MAX_FILE_PATH_LEN 128 +#define MAX_DEVICE_NAME_LEN 64 +#define MAX_QUEUE_SIZE 8192 +constexpr char kIioDirRoot[] = "/sys/bus/iio/devices/"; +constexpr char kDeviceName[] = "microchip,pac1934"; +constexpr char kDeviceType[] = "iio:device"; +constexpr uint32_t MAX_SAMPLING_RATE = 10; +constexpr uint64_t WRITE_TIMEOUT_NS = 1000000000; +void RailDataProvider::findIioPowerMonitorNodes() { + struct dirent *ent; + int fd; + char devName[MAX_DEVICE_NAME_LEN]; + char filePath[MAX_FILE_PATH_LEN]; + DIR *iioDir = opendir(kIioDirRoot); + if (!iioDir) { + ALOGE("Error opening directory: %s, error: %d", kIioDirRoot, errno); + return; + } + while (ent = readdir(iioDir), ent) { + if (strcmp(ent->d_name, ".") != 0 && + strcmp(ent->d_name, "..") != 0 && + strlen(ent->d_name) > strlen(kDeviceType) && + strncmp(ent->d_name, kDeviceType, strlen(kDeviceType)) == 0) { + snprintf(filePath, MAX_FILE_PATH_LEN, "%s/%s", ent->d_name, "name"); + fd = openat(dirfd(iioDir), filePath, O_RDONLY); + if (fd < 0) { + ALOGW("Failed to open directory: %s, error: %d", filePath, errno); + continue; + } + if (read(fd, devName, MAX_DEVICE_NAME_LEN) < 0) { + ALOGW("Failed to read device name from file: %s(%d)", + filePath, fd); + close(fd); + continue; + } + if (strncmp(devName, kDeviceName, strlen(kDeviceName)) == 0) { + snprintf(filePath, MAX_FILE_PATH_LEN, "%s/%s", kIioDirRoot, ent->d_name); + mOdpm.devicePaths.push_back(filePath); + } + close(fd); + } + } + closedir(iioDir); + return; +} +size_t RailDataProvider::parsePowerRails() { + std::string data; + std::string railFileName; + std::string spsFileName; + uint32_t index = 0; + uint32_t samplingRate; + for (const auto &path : mOdpm.devicePaths) { + railFileName = path + "/enabled_rails"; + spsFileName = path + "/sampling_rate"; + if (!android::base::ReadFileToString(spsFileName, &data)) { + ALOGW("Error reading file: %s", spsFileName.c_str()); + continue; + } + samplingRate = strtoul(data.c_str(), NULL, 10); + if (!samplingRate || samplingRate == ULONG_MAX) { + ALOGE("Error parsing: %s", spsFileName.c_str()); + break; + } + if (!android::base::ReadFileToString(railFileName, &data)) { + ALOGW("Error reading file: %s", railFileName.c_str()); + continue; + } + std::istringstream railNames(data); + std::string line; + while (std::getline(railNames, line)) { + std::vector<std::string> words = android::base::Split(line, ":"); + if (words.size() == 2) { + mOdpm.railsInfo.emplace(words[0], + RailData { + .devicePath = path, + .index = index, + .subsysName = words[1], + .samplingRate = samplingRate + }); + index++; + } else { + ALOGW("Unexpected format in file: %s", railFileName.c_str()); + } + } + } + return index; +} +int RailDataProvider::parseIioEnergyNode(std::string devName) { + int ret = 0; + std::string data; + std::string fileName = devName + "/energy_value"; + if (!android::base::ReadFileToString(fileName, &data)) { + ALOGE("Error reading file: %s", fileName.c_str()); + return -1; + } + std::istringstream energyData(data); + std::string line; + uint64_t timestamp = 0; + bool timestampRead = false; + while (std::getline(energyData, line)) { + std::vector<std::string> words = android::base::Split(line, ","); + if (timestampRead == false) { + if (words.size() == 1) { + timestamp = strtoull(words[0].c_str(), NULL, 10); + if (timestamp == 0 || timestamp == ULLONG_MAX) { + ALOGW("Potentially wrong timestamp: %" PRIu64, timestamp); + } + timestampRead = true; + } + } else if (words.size() == 2) { + std::string railName = words[0]; + if (mOdpm.railsInfo.count(railName) != 0) { + size_t index = mOdpm.railsInfo[railName].index; + mOdpm.reading[index].index = index; + mOdpm.reading[index].timestamp = timestamp; + mOdpm.reading[index].energy = strtoull(words[1].c_str(), NULL, 10); + if (mOdpm.reading[index].energy == ULLONG_MAX) { + ALOGW("Potentially wrong energy value: %" PRIu64, + mOdpm.reading[index].energy); + } + } + } else { + ALOGW("Unexpected format in file: %s", fileName.c_str()); + ret = -1; + break; + } + } + return ret; +} +Status RailDataProvider::parseIioEnergyNodes() { + Status ret = Status::SUCCESS; + if (mOdpm.hwEnabled == false) { + return Status::NOT_SUPPORTED; + } + for (const auto &devicePath : mOdpm.devicePaths) { + if(parseIioEnergyNode(devicePath) < 0) { + ALOGE("Error in parsing power stats"); + ret = Status::FILESYSTEM_ERROR; + break; + } + } + return ret; +} +RailDataProvider::RailDataProvider() { + findIioPowerMonitorNodes(); + size_t numRails = parsePowerRails(); + if (mOdpm.devicePaths.empty() || numRails == 0) { + mOdpm.hwEnabled = false; + } else { + mOdpm.hwEnabled = true; + mOdpm.reading.resize(numRails); + } +} +Return<void> RailDataProvider::getRailInfo(IPowerStats::getRailInfo_cb _hidl_cb) { + hidl_vec<RailInfo> rInfo; + Status ret = Status::SUCCESS; + size_t index; + std::lock_guard<std::mutex> _lock(mOdpm.mLock); + if (mOdpm.hwEnabled == false) { + ALOGI("getRailInfo not supported"); + _hidl_cb(rInfo, Status::NOT_SUPPORTED); + return Void(); + } + rInfo.resize(mOdpm.railsInfo.size()); + for (const auto& railData : mOdpm.railsInfo) { + index = railData.second.index; + rInfo[index].railName = railData.first; + rInfo[index].subsysName = railData.second.subsysName; + rInfo[index].index = index; + rInfo[index].samplingRate = railData.second.samplingRate; + } + _hidl_cb(rInfo, ret); + return Void(); +} +Return<void> RailDataProvider::getEnergyData(const hidl_vec<uint32_t>& railIndices, IPowerStats::getEnergyData_cb _hidl_cb) { + hidl_vec<EnergyData> eVal; + std::lock_guard<std::mutex> _lock(mOdpm.mLock); + Status ret = parseIioEnergyNodes(); + if (ret != Status::SUCCESS) { + _hidl_cb(eVal, ret); + return Void(); + } + if (railIndices.size() == 0) { + eVal.resize(mOdpm.railsInfo.size()); + memcpy(&eVal[0], &mOdpm.reading[0], mOdpm.reading.size() * sizeof(EnergyData)); + } else { + eVal.resize(railIndices.size()); + int i = 0; + for (const auto &railIndex : railIndices) { + if (railIndex >= mOdpm.reading.size()) { + ret = Status::INVALID_INPUT; + eVal.resize(0); + break; + } + memcpy(&eVal[i], &mOdpm.reading[railIndex], sizeof(EnergyData)); + i++; + } + } + _hidl_cb(eVal, ret); + return Void(); +} +Return<void> RailDataProvider::streamEnergyData(uint32_t timeMs, uint32_t samplingRate, + IPowerStats::streamEnergyData_cb _hidl_cb) { + std::lock_guard<std::mutex> _lock(mOdpm.mLock); + if (mOdpm.fmqSynchronized != nullptr) { + _hidl_cb(MessageQueueSync::Descriptor(), + 0, 0, Status::INSUFFICIENT_RESOURCES); + return Void(); + } + uint32_t sps = std::min(samplingRate, MAX_SAMPLING_RATE); + uint32_t numSamples = timeMs * sps / 1000; + mOdpm.fmqSynchronized.reset(new (std::nothrow) MessageQueueSync(MAX_QUEUE_SIZE, true)); + if (mOdpm.fmqSynchronized == nullptr || mOdpm.fmqSynchronized->isValid() == false) { + mOdpm.fmqSynchronized = nullptr; + _hidl_cb(MessageQueueSync::Descriptor(), + 0, 0, Status::INSUFFICIENT_RESOURCES); + return Void(); + } + std::thread pollThread = std::thread([this, sps, numSamples]() { + uint64_t sleepTimeUs = 1000000/sps; + uint32_t currSamples = 0; + while (currSamples < numSamples) { + mOdpm.mLock.lock(); + if (parseIioEnergyNodes() == Status::SUCCESS) { + mOdpm.fmqSynchronized->writeBlocking(&mOdpm.reading[0], + mOdpm.reading.size(), WRITE_TIMEOUT_NS); + mOdpm.mLock.unlock(); + currSamples++; + if (usleep(sleepTimeUs) < 0) { + ALOGW("Sleep interrupted"); + break; + } + } else { + mOdpm.mLock.unlock(); + break; + } + } + mOdpm.mLock.lock(); + mOdpm.fmqSynchronized = nullptr; + mOdpm.mLock.unlock(); + return; + }); + pollThread.detach(); + _hidl_cb(*(mOdpm.fmqSynchronized)->getDesc(), numSamples, + mOdpm.reading.size(), Status::SUCCESS); + return Void(); +} +} // namespace powerstats +} // namespace pixel +} // namespace google +} // namespace hardware +} // namespace android diff --git a/powerstats/RailDataProvider.h b/powerstats/RailDataProvider.h new file mode 100644 index 00000000..0f197223 --- /dev/null +++ b/powerstats/RailDataProvider.h @@ -0,0 +1,47 @@ + +#ifndef ANDROID_HARDWARE_POWERSTATS_RAILDATAPROVIDER_H +#define ANDROID_HARDWARE_POWERSTATS_RAILDATAPROVIDER_H +#include <fmq/MessageQueue.h> +#include <pixelpowerstats/PowerStats.h> +namespace android { +namespace hardware { +namespace google { +namespace pixel { +namespace powerstats { +typedef MessageQueue<EnergyData, kSynchronizedReadWrite> MessageQueueSync; +struct RailData { + std::string devicePath; + uint32_t index; + std::string subsysName; + uint32_t samplingRate; +}; +struct OnDeviceMmt { + std::mutex mLock; + bool hwEnabled; + std::vector<std::string> devicePaths; + std::map<std::string, RailData> railsInfo; + std::vector<EnergyData> reading; + std::unique_ptr<MessageQueueSync> fmqSynchronized; +}; +class RailDataProvider : public IRailDataProvider { +public: + RailDataProvider(); + // Methods from ::android::hardware::power::stats::V1_0::IPowerStats follow. + Return<void> getRailInfo(IPowerStats::getRailInfo_cb _hidl_cb) override; + Return<void> getEnergyData(const hidl_vec<uint32_t>& railIndices, + IPowerStats::getEnergyData_cb _hidl_cb) override; + Return<void> streamEnergyData(uint32_t timeMs, uint32_t samplingRate, + IPowerStats::streamEnergyData_cb _hidl_cb) override; + private: + OnDeviceMmt mOdpm; + void findIioPowerMonitorNodes(); + size_t parsePowerRails(); + int parseIioEnergyNode(std::string devName); + Status parseIioEnergyNodes(); +}; +} // namespace powerstats +} // namespace pixel +} // namespace google +} // namespace hardware +} // namespace android +#endif // ANDROID_HARDWARE_POWERSTATS_RAILDATAPROVIDER_H diff --git a/powerstats/android.hardware.power.stats@1.0-service.pixel.rc b/powerstats/android.hardware.power.stats@1.0-service.pixel.rc new file mode 100644 index 00000000..6ba83c28 --- /dev/null +++ b/powerstats/android.hardware.power.stats@1.0-service.pixel.rc @@ -0,0 +1,4 @@ +service vendor.power.stats-hal-1-0 /vendor/bin/hw/android.hardware.power.stats@1.0-service.pixel + class hal + user system + group system diff --git a/powerstats/service.cpp b/powerstats/service.cpp new file mode 100644 index 00000000..44c74936 --- /dev/null +++ b/powerstats/service.cpp @@ -0,0 +1,195 @@ +/* + * 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.power.stats@1.0-service.pixel" + +#include <android-base/properties.h> +#include <android/log.h> +#include <binder/IPCThreadState.h> +#include <binder/IServiceManager.h> +#include <binder/ProcessState.h> +#include <hidl/HidlTransportSupport.h> + +#include <pixelpowerstats/AidlStateResidencyDataProvider.h> +#include <pixelpowerstats/GenericStateResidencyDataProvider.h> +#include <pixelpowerstats/PowerStats.h> +#include <pixelpowerstats/WlanStateResidencyDataProvider.h> +#include <pixelpowerstats/DisplayStateResidencyDataProvider.h> + +#include "RailDataProvider.h" + +using android::OK; +using android::sp; +using android::status_t; + +// libhwbinder: +using android::hardware::configureRpcThreadpool; +using android::hardware::joinRpcThreadpool; + +// Generated HIDL files +using android::hardware::power::stats::V1_0::IPowerStats; +using android::hardware::power::stats::V1_0::PowerEntityInfo; +using android::hardware::power::stats::V1_0::PowerEntityStateSpace; +using android::hardware::power::stats::V1_0::PowerEntityType; +using android::hardware::power::stats::V1_0::implementation::PowerStats; + +// Pixel specific +using android::hardware::google::pixel::powerstats::AidlStateResidencyDataProvider; +using android::hardware::google::pixel::powerstats::GenericStateResidencyDataProvider; +using android::hardware::google::pixel::powerstats::PowerEntityConfig; +using android::hardware::google::pixel::powerstats::StateResidencyConfig; +using android::hardware::google::pixel::powerstats::RailDataProvider; +using android::hardware::google::pixel::powerstats::WlanStateResidencyDataProvider; +using android::hardware::google::pixel::powerstats::DisplayStateResidencyDataProvider; + +int main(int /* argc */, char ** /* argv */) { + ALOGI("power.stats service 1.0 is starting."); + + bool isDebuggable = android::base::GetBoolProperty("ro.debuggable", false); + + PowerStats *service = new PowerStats(); + + // Add rail data provider + service->setRailDataProvider(std::make_unique<RailDataProvider>()); + + // Add power entities related to rpmh + const uint64_t RPM_CLK = 19200; // RPM runs at 19.2Mhz. Divide by 19200 for msec + std::function<uint64_t(uint64_t)> rpmConvertToMs = [](uint64_t a) { return a / RPM_CLK; }; + std::vector<StateResidencyConfig> rpmStateResidencyConfigs = { + {.name = "Sleep", + .entryCountSupported = true, + .entryCountPrefix = "Sleep Count:", + .totalTimeSupported = true, + .totalTimePrefix = "Sleep Accumulated Duration:", + .totalTimeTransform = rpmConvertToMs, + .lastEntrySupported = true, + .lastEntryPrefix = "Sleep Last Entered At:", + .lastEntryTransform = rpmConvertToMs}}; + + auto rpmSdp = sp<GenericStateResidencyDataProvider>::make("/sys/power/rpmh_stats/master_stats"); + + uint32_t apssId = service->addPowerEntity("APSS", PowerEntityType::SUBSYSTEM); + rpmSdp->addEntity(apssId, PowerEntityConfig("APSS", rpmStateResidencyConfigs)); + + uint32_t mpssId = service->addPowerEntity("MPSS", PowerEntityType::SUBSYSTEM); + rpmSdp->addEntity(mpssId, PowerEntityConfig("MPSS", rpmStateResidencyConfigs)); + + uint32_t adspId = service->addPowerEntity("ADSP", PowerEntityType::SUBSYSTEM); + rpmSdp->addEntity(adspId, PowerEntityConfig("ADSP", rpmStateResidencyConfigs)); + + uint32_t adspIslandId = service->addPowerEntity("ADSP_ISLAND", PowerEntityType::SUBSYSTEM); + rpmSdp->addEntity(adspIslandId, PowerEntityConfig("ADSP_ISLAND", rpmStateResidencyConfigs)); + + uint32_t cdspId = service->addPowerEntity("CDSP", PowerEntityType::SUBSYSTEM); + rpmSdp->addEntity(cdspId, PowerEntityConfig("CDSP", rpmStateResidencyConfigs)); + + service->addStateResidencyDataProvider(std::move(rpmSdp)); + + // Add SoC power entity + std::vector<StateResidencyConfig> socStateResidencyConfigs = { + {.name = "AOSD", + .header = "RPM Mode:aosd", + .entryCountSupported = true, + .entryCountPrefix = "count:", + .totalTimeSupported = true, + .totalTimePrefix = "actual last sleep(msec):", + .lastEntrySupported = false}, + {.name = "CXSD", + .header = "RPM Mode:cxsd", + .entryCountSupported = true, + .entryCountPrefix = "count:", + .totalTimeSupported = true, + .totalTimePrefix = "actual last sleep(msec):", + .lastEntrySupported = false}}; + + auto socSdp = sp<GenericStateResidencyDataProvider>::make("/sys/power/system_sleep/stats"); + + uint32_t socId = service->addPowerEntity("SoC", PowerEntityType::POWER_DOMAIN); + socSdp->addEntity(socId, PowerEntityConfig(socStateResidencyConfigs)); + + service->addStateResidencyDataProvider(socSdp); + + if (isDebuggable) { + // Add WLAN power entity + uint32_t wlanId = service->addPowerEntity("WLAN", PowerEntityType::SUBSYSTEM); + auto wlanSdp = sp<WlanStateResidencyDataProvider>::make(wlanId, + "/sys/kernel/wifi/power_stats"); + service->addStateResidencyDataProvider(wlanSdp); + } + + uint32_t displayId = service->addPowerEntity("Display", PowerEntityType::SUBSYSTEM); + auto displaySdp = + sp<DisplayStateResidencyDataProvider>::make(displayId, + "/sys/class/backlight/panel0-backlight/state", + std::vector<std::string>{"Off", "LP", "1080x2340@60", "1080x2340@90"}); + service->addStateResidencyDataProvider(displaySdp); + + // Add NFC power entity + StateResidencyConfig nfcStateConfig = { + .entryCountSupported = true, + .entryCountPrefix = "Cumulative count:", + .totalTimeSupported = true, + .totalTimePrefix = "Cumulative duration msec:", + .lastEntrySupported = true, + .lastEntryPrefix = "Last entry timestamp msec:" + }; + std::vector<std::pair<std::string, std::string>> nfcStateHeaders = { + std::make_pair("Idle", "Idle mode:"), + std::make_pair("Active", "Active mode:"), + std::make_pair("Active-RW", "Active Reader/Writer mode:"), + }; + + sp<GenericStateResidencyDataProvider> nfcSdp = + new GenericStateResidencyDataProvider("/sys/class/misc/st21nfc/device/power_stats"); + + uint32_t nfcId = service->addPowerEntity("NFC", PowerEntityType::SUBSYSTEM); + nfcSdp->addEntity(nfcId, + PowerEntityConfig(generateGenericStateResidencyConfigs(nfcStateConfig, nfcStateHeaders))); + + service->addStateResidencyDataProvider(nfcSdp); + + // Add Power Entities that require the Aidl data provider + auto aidlSdp = sp<AidlStateResidencyDataProvider>::make(); + uint32_t citadelId = service->addPowerEntity("Citadel", PowerEntityType::SUBSYSTEM); + aidlSdp->addEntity(citadelId, "Citadel", {"Last-Reset", "Active", "Deep-Sleep"}); + + auto serviceStatus = android::defaultServiceManager()->addService( + android::String16("power.stats-vendor"), aidlSdp); + if (serviceStatus != android::OK) { + ALOGE("Unable to register power.stats-vendor service %d", serviceStatus); + return 1; + } + sp<android::ProcessState> ps{android::ProcessState::self()}; // Create non-HW binder threadpool + ps->startThreadPool(); + + service->addStateResidencyDataProvider(aidlSdp); + + // Configure the threadpool + configureRpcThreadpool(1, true /*callerWillJoin*/); + + status_t status = service->registerAsService(); + if (status != OK) { + ALOGE("Could not register service for power.stats HAL Iface (%d), exiting.", status); + return 1; + } + + ALOGI("power.stats service is ready"); + joinRpcThreadpool(); + + // In normal operation, we don't expect the thread pool to exit + ALOGE("power.stats service is shutting down"); + return 1; +} diff --git a/private/certs/wfcactivation.x509.pem b/private/certs/wfcactivation.x509.pem deleted file mode 100644 index bead020b..00000000 --- a/private/certs/wfcactivation.x509.pem +++ /dev/null @@ -1,23 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDyTCCArGgAwIBAgIJAODrqTpclyUkMA0GCSqGSIb3DQEBCwUAMHsxCzAJBgNV -BAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMRYwFAYDVQQHDA1Nb3VudGFpbiBW -aWV3MRQwEgYDVQQKDAtHb29nbGUgSW5jLjEQMA4GA1UECwwHQW5kcm9pZDEXMBUG -A1UEAwwOd2ZjX2FjdGl2YXRpb24wHhcNMTgwMjIxMDA1NTM4WhcNNDUwNzA5MDA1 -NTM4WjB7MQswCQYDVQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UE -BwwNTW91bnRhaW4gVmlldzEUMBIGA1UECgwLR29vZ2xlIEluYy4xEDAOBgNVBAsM -B0FuZHJvaWQxFzAVBgNVBAMMDndmY19hY3RpdmF0aW9uMIIBIjANBgkqhkiG9w0B -AQEFAAOCAQ8AMIIBCgKCAQEAruKdMaQjRrlTwLHWAhUwLXoq+1glzoQ5ibqHDg4i -GPPlwT7qPG8xWW6UmTiLNES6YSDpvCvptqrZccecviYfYIg7/JCF/xr2cFt9Gyyo -L0muemdUMFjGQJxKCQMi8jlqPVgfcy7ZEfVvoDWUupD7hVVA6TFkWH1nv/5GzJVK -h7D4vBaYE6qwM1+NJjrbk1O8SMMCES7MkJhpnfbRYr8d5uxSzDWqqeqvM6CFSvKw -cxqbCcNl0MDgSCgtnxzZZjg5AFuPECV8lgJpxFEqgEIK1fsebK5G8o4buokMW+W4 -ZT2LZtMq/qsZXl59h22KQX2w5mcI6KyV8WZOcPPOm8uf8wIDAQABo1AwTjAdBgNV -HQ4EFgQU9jpHDUfkIqBODCp9/c5TsraA9sowHwYDVR0jBBgwFoAU9jpHDUfkIqBO -DCp9/c5TsraA9sowDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAZMf+ -KD3oFS0cv/C0qQx28wW5BKFb/PM6RxDwTRF7yyJj4+uZU0+O8NJEqBNDgHusFJR6 -2ZXXiWDqzNb0scZxD95FP1YxiLPAcbn2oCTkGPYcCsBmT1i25RsIKTb7fR3UJ/bY -V55CQy1FjX5H1katVpezi1bs17stqrjL0aCk8s7wZPQ9KTy7SfMF9rUfg8ltrj8s -MD5cq21GJuJMpI2kNUV7IT+4B3CeHzpm0iy8NmbavgNezZAx1za4QIySNcKfdsSs -7PsNYPS0R9BeZK/4u4/yrQvRV0lXzQcIJPpwr0cfuhcgcHG8sbCLaw4Ph6go9kRL -hvY7ZX9pdBLS8ukQ4w== ------END CERTIFICATE----- diff --git a/private/keys.conf b/private/keys.conf deleted file mode 100644 index 9498bfff..00000000 --- a/private/keys.conf +++ /dev/null @@ -1,2 +0,0 @@ -[@WFCACTIVATION] -ALL : device/google/redbull-sepolicy/private/certs/wfcactivation.x509.pem diff --git a/product.prop b/product.prop new file mode 100644 index 00000000..add581ec --- /dev/null +++ b/product.prop @@ -0,0 +1,124 @@ + +persist.rild.nitz_plmn= +persist.rild.nitz_long_ons_0= +persist.rild.nitz_long_ons_1= +persist.rild.nitz_long_ons_2= +persist.rild.nitz_long_ons_3= +persist.rild.nitz_short_ons_0= +persist.rild.nitz_short_ons_1= +persist.rild.nitz_short_ons_2= +persist.rild.nitz_short_ons_3= +DEVICE_PROVISIONED=1 + +debug.sf.hw=1 +debug.gralloc.enable_fb_ubwc=1 + +# system props for the cne module +persist.vendor.cne.feature=1 + +# system props for the MM modules +media.stagefright.enable-player=true +media.stagefright.enable-http=true +media.stagefright.enable-aac=true +media.stagefright.enable-qcp=true +media.stagefright.enable-scan=true +mmp.enable.3g2=true +media.aac_51_output_enabled=true +mm.enable.smoothstreaming=true +#13631487 is decimal sum of supported codecs in AAL +#codecs:(PARSER_)AAC AC3 AMR_NB AMR_WB ASF AVI DTS FLV 3GP 3G2 MKV MP2PS MP2TS MP3 OGG QCP WAV FLAC AIFF APE DSD +mm.enable.qcom_parser=13631487 +persist.mm.enable.prefetch=true + +# Additional buffers shared between Camera and Video +vidc.enc.dcvs.extra-buff-count=2 +vidc.enc.disable.pq=1 + +# system props for the data netmgrd +persist.vendor.data.mode=concurrent + +# system props for time-services +persist.timed.enable=true + +# system props for perfetto +persist.traced.enable=1 + +# System prop to turn on CdmaLTEPhone always +telephony.lteOnCdmaDevice=1 + +# Simulate sdcard on /data/media +persist.fuse_sdcard=true + +# settings to enable Device Orientation Sensors +ro.qti.sensors.dev_ori=true + +# settings to disable sensors not needed +# all secondary wakeup +ro.qti.sensors.wu=false +# unused algorithms +ro.qti.sdk.sensors.gestures=false +ro.qti.sensors.amd=false +ro.qti.sensors.cmc=false +ro.qti.sensors.facing=false +ro.qti.sensors.pedometer=false +ro.qti.sensors.rmd=false +ro.qti.sensors.scrn_ortn=false +# use SMGR supplied verison +ro.qti.sensors.step_counter=false +ro.qti.sensors.step_detector=false + +#system prop for RmNet Data +persist.rmnet.data.enable=true +persist.data.wda.enable=true +persist.data.df.dl_mode=5 +persist.data.df.ul_mode=5 +persist.data.df.agg.dl_pkt=10 +persist.data.df.agg.dl_size=4096 +persist.data.df.mux_count=8 +persist.data.df.iwlan_mux=9 +persist.data.df.dev_name=rmnet_usb0 + +#set netflix property by Qualcomm's request to pass the certification +ro.netflix.bsp_rev=Q7250-19133-1 + +# +## system props for the data modules +# +#ro.use_data_netmgrd=true +persist.data.netmgrd.qos.enable=true +persist.data.mode=concurrent + +# System props to enable Bluetooth Quality Report (BQR) feature +# BQR event mask configuration +persist.bluetooth.bqr.event_mask=30 +# BQR minimum report interval configuration +persist.bluetooth.bqr.min_interval_ms=500 + +# System props to enable aac vbr feature +persist.bluetooth.a2dp_aac.vbr_supported=true + +# Set the Bluetooth Class of Device +# Service Field: 0x5A -> 90 +# Bit 17: Networking +# Bit 19: Capturing +# Bit 20: Object Transfer +# Bit 22: Telephony +# MAJOR_CLASS: 0x02 -> 2 (Phone) +# MINOR_CLASS: 0x0C -> 12 (Smart Phone) +bluetooth.device.class_of_device=90,2,12 + +# Set supported Bluetooth profiles to enabled +bluetooth.profile.asha.central.enabled?=true +bluetooth.profile.a2dp.source.enabled?=true +bluetooth.profile.avrcp.target.enabled?=true +bluetooth.profile.bas.client.enabled?=true +bluetooth.profile.gatt.enabled?=true +bluetooth.profile.hfp.ag.enabled?=true +bluetooth.profile.hid.device.enabled?=true +bluetooth.profile.hid.host.enabled?=true +bluetooth.profile.map.server.enabled?=true +bluetooth.profile.opp.enabled?=true +bluetooth.profile.pan.nap.enabled?=true +bluetooth.profile.pan.panu.enabled?=true +bluetooth.profile.pbap.server.enabled?=true +bluetooth.profile.sap.server.enabled?=true diff --git a/recovery.wipe b/recovery.wipe new file mode 100644 index 00000000..f3b99e0b --- /dev/null +++ b/recovery.wipe @@ -0,0 +1,12 @@ +# All the partitions to be wiped (in order) under recovery. +/dev/block/bootdevice/by-name/system_a +/dev/block/bootdevice/by-name/system_b +/dev/block/bootdevice/by-name/product_a +/dev/block/bootdevice/by-name/product_b +/dev/block/bootdevice/by-name/vendor_a +/dev/block/bootdevice/by-name/vendor_b +/dev/block/bootdevice/by-name/userdata +# Wipe the boot partitions last so that all partitions will be wiped +# correctly even if the wiping process gets interrupted by a force boot. +/dev/block/bootdevice/by-name/boot_a +/dev/block/bootdevice/by-name/boot_b diff --git a/redbull-sepolicy.mk b/redbull-sepolicy.mk deleted file mode 100644 index c2e6531b..00000000 --- a/redbull-sepolicy.mk +++ /dev/null @@ -1,17 +0,0 @@ -PRODUCT_PUBLIC_SEPOLICY_DIRS += device/google/redbull-sepolicy/public -PRODUCT_PRIVATE_SEPOLICY_DIRS += device/google/redbull-sepolicy/private - -# vendors -BOARD_SEPOLICY_DIRS += device/google/redbull-sepolicy/vendor/google -BOARD_SEPOLICY_DIRS += device/google/redbull-sepolicy/vendor/qcom/common -BOARD_SEPOLICY_DIRS += device/google/redbull-sepolicy/vendor/qcom/sm7250 -BOARD_SEPOLICY_DIRS += device/google/redbull-sepolicy/tracking_denials -BOARD_SEPOLICY_DIRS += device/google/redbull-sepolicy/vendor/st -BOARD_SEPOLICY_DIRS += device/google/redbull-sepolicy/vendor/verizon - -# Pixel-wide sepolicy -BOARD_VENDOR_SEPOLICY_DIRS += hardware/google/pixel-sepolicy/powerstats -BOARD_VENDOR_SEPOLICY_DIRS += hardware/google/pixel-sepolicy/ramdump/common - -# system_ext -SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS += device/google/redbull-sepolicy/system_ext/private diff --git a/rro_overlays/ConnectivityOverlay/Android.bp b/rro_overlays/ConnectivityOverlay/Android.bp new file mode 100644 index 00000000..e76c15a3 --- /dev/null +++ b/rro_overlays/ConnectivityOverlay/Android.bp @@ -0,0 +1,9 @@ +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + +runtime_resource_overlay { + name: "ConnectivityOverlay", + sdk_version: "current", + product_specific: true +} diff --git a/rro_overlays/ConnectivityOverlay/AndroidManifest.xml b/rro_overlays/ConnectivityOverlay/AndroidManifest.xml new file mode 100644 index 00000000..f349b7fb --- /dev/null +++ b/rro_overlays/ConnectivityOverlay/AndroidManifest.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- 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. +--> +<!-- Pixel specific connectivity overlays --> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="com.android.connectivity.resources.overlay" + android:versionCode="1" + android:versionName="1.0"> + <application android:hasCode="false" /> + <overlay + android:targetPackage="com.android.connectivity.resources" + android:targetName="ServiceConnectivityResourcesConfig" + android:isStatic="true" + android:priority="0"/> +</manifest> diff --git a/rro_overlays/ConnectivityOverlay/res/values/config.xml b/rro_overlays/ConnectivityOverlay/res/values/config.xml new file mode 100644 index 00000000..d9a29b07 --- /dev/null +++ b/rro_overlays/ConnectivityOverlay/res/values/config.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* + * 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. + */ +--> +<resources> + <!-- If the hardware supports specially marking packets that caused a wakeup of the + main CPU, set this value to the mark used. --> + <integer translatable="false" name="config_networkWakeupPacketMark">0x80000000</integer> + + <!-- Mask to use when checking skb mark defined in config_networkWakeupPacketMark above. --> + <integer translatable="false" name="config_networkWakeupPacketMask">0x80000000</integer> +</resources> diff --git a/rro_overlays/WifiOverlay/Android.bp b/rro_overlays/WifiOverlay/Android.bp new file mode 100644 index 00000000..3929ea91 --- /dev/null +++ b/rro_overlays/WifiOverlay/Android.bp @@ -0,0 +1,10 @@ +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + +runtime_resource_overlay { + name: "WifiOverlay", + theme: "WifiOverlay", + sdk_version: "current", + product_specific: true +} diff --git a/rro_overlays/WifiOverlay/AndroidManifest.xml b/rro_overlays/WifiOverlay/AndroidManifest.xml new file mode 100644 index 00000000..632ac6a4 --- /dev/null +++ b/rro_overlays/WifiOverlay/AndroidManifest.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- 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. +--> +<!-- Pixel specific wifi overlays --> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="com.android.wifi.resources.pixel" + android:versionCode="1" + android:versionName="1.0"> + <application android:hasCode="false" /> + <overlay + android:targetPackage="com.android.wifi.resources" + android:targetName="WifiCustomization" + android:isStatic="true" + android:priority="0"/> +</manifest> diff --git a/rro_overlays/WifiOverlay/OWNERS b/rro_overlays/WifiOverlay/OWNERS new file mode 100644 index 00000000..cd92d6fa --- /dev/null +++ b/rro_overlays/WifiOverlay/OWNERS @@ -0,0 +1,5 @@ +# People who can approve changes for submission +etancohen@google.com +arabawy@google.com +kumachang@google.com +satk@google.com diff --git a/rro_overlays/WifiOverlay/res/values/config.xml b/rro_overlays/WifiOverlay/res/values/config.xml new file mode 100644 index 00000000..a15e0baa --- /dev/null +++ b/rro_overlays/WifiOverlay/res/values/config.xml @@ -0,0 +1,121 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* + * 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. + */ +--> +<resources> + <!-- Boolean indicating whether the wifi chipset has 5GHz frequency band support --> + <bool translatable="false" name="config_wifi5ghzSupport">true</bool> + + <!-- Boolean indicating whether 802.11r Fast BSS Transition is enabled on this platform --> + <bool translatable="false" name="config_wifi_fast_bss_transition_enabled">true</bool> + + <!-- Boolean indicating whether the wifi chipset has background scan support --> + <bool translatable="false" name="config_wifi_background_scan_support">true</bool> + + <!-- Integer thresholds, do not connect to APs with RSSI lower than these values --> + <integer translatable="false" name="config_wifi_framework_wifi_score_entry_rssi_threshold_5GHz">-77</integer> + <integer translatable="false" name="config_wifi_framework_wifi_score_entry_rssi_threshold_24GHz">-80</integer> + <!-- Integer thresholds for low network score, should be somewhat less than the entry thresholds --> + <integer translatable="false" name="config_wifi_framework_wifi_score_bad_rssi_threshold_5GHz">-80</integer> + <integer translatable="false" name="config_wifi_framework_wifi_score_bad_rssi_threshold_24GHz">-83</integer> + + <!-- Boolean indicating whether or not to revert to default country code when cellular + radio is unable to find any MCC information to infer wifi country code from --> + <bool translatable="false" name="config_wifi_revert_country_code_on_cellular_loss">false</bool> + + <!-- Boolean indicating whether or not wifi should turn off when emergency call is made --> + <bool translatable="false" name="config_wifi_turn_off_during_emergency_call">true</bool> + + <!-- Configure wifi tcp buffersizes in the form: + rmem_min,rmem_def,rmem_max,wmem_min,wmem_def,wmem_max --> + <string name="config_wifi_tcp_buffers" translatable="false">524288,2097152,8388608,262144,524288,4194304</string> + + <!-- Enable ACS (auto channel selection) for Wifi hotspot (SAP) --> + <bool translatable="false" name="config_wifi_softap_acs_supported">true</bool> + + <!-- Enable 802.11ac for Wifi hotspot (SAP) --> + <bool translatable="false" name="config_wifi_softap_ieee80211ac_supported">true</bool> + + <!-- True if the firmware supports connected MAC randomization --> + <bool name="config_wifi_connected_mac_randomization_supported">true</bool> + <bool name="config_wifiAllowNonPersistentMacRandomizationOnOpenSsids">true</bool> + <!-- True if the firmware supports p2p MAC randomization --> + <bool name="config_wifi_p2p_mac_randomization_supported">true</bool> + + <!-- True if the firmware supports ap MAC randomization --> + <bool name="config_wifi_ap_mac_randomization_supported">true</bool> + + <!-- True if the firmware supports Wi-Fi link probing --> + <bool name="config_wifi_link_probing_supported">true</bool> + + <!-- Idle Receive current for wifi radio. 0 by default--> + <integer translatable="false" name="config_wifi_idle_receive_cur_ma">1</integer> + + <!-- Rx current for wifi radio. 0 by default--> + <integer translatable="false" name="config_wifi_active_rx_cur_ma">100</integer> + + <!-- Tx current for wifi radio. 0 by default--> + <integer translatable="false" name="config_wifi_tx_cur_ma">250</integer> + + <!-- Operating volatage for wifi radio. 0 by default--> + <integer translatable="false" name="config_wifi_operating_voltage_mv">3800</integer> + + <!-- Indicates that a full bugreport should be triggered when wifi diagnostics detects an error on non-user (i.e debug) builds --> + <bool translatable="false" name="config_wifi_diagnostics_bugreport_enabled">true</bool> + + <!-- Default access point SSID used for tethering --> + <string name="wifi_tether_configure_ssid_default" translatable="false">Pixel</string> + + <!-- Integer indicating maximum hardware supported client number of soft ap --> + <integer translatable="false" name="config_wifiHardwareSoftapMaxClientCount">32</integer> + <!-- Array indicating wifi fatal firmware alert error code list from driver --> + <array translatable="false" name="config_wifi_fatal_firmware_alert_error_code_list"> + <item>1</item> <!-- WLAN_LOG_REASON_ROAM_FAIL --> + <item>256</item> <!-- DATA_STALL_LOG_NONE --> + <item>257</item> <!-- DATA_STALL_LOG_FW_VDEV_PAUSE --> + <item>258</item> <!-- DATA_STALL_LOG_HWSCHED_CMD_FILTER --> + <item>259</item> <!-- DATA_STALL_LOG_HWSCHED_CMD_FLUSH --> + <item>260</item> <!-- DATA_STALL_LOG_FW_RX_REFILL_FAILED --> + <item>261</item> <!-- DATA_STALL_LOG_FW_RX_FCS_LEN_ERROR --> + <item>262</item> <!-- DATA_STALL_LOG_FW_WDOG_ERRORS --> + <item>263</item> <!-- DATA_STALL_LOG_BB_WDOG_ERROR --> + <item>264</item> <!-- DATA_STALL_LOG_POST_TIM_NO_TXRX_ERROR --> + <item>512</item> <!-- DATA_STALL_LOG_HOST_STA_TX_TIMEOUT --> + <item>513</item> <!-- DATA_STALL_LOG_HOST_SOFTAP_TX_TIMEOUT --> + <item>514</item> <!-- DATA_STALL_LOG_NUD_FAILURE --> + </array> + + <!-- Integer delay in milliseconds before set wlan interface up during watchdog recovery --> + <integer name="config_wifi_framework_recovery_timeout_delay">3000</integer> + + <!-- Enable adding minimum confirmation duration when sending network score to connectivity service. --> + <bool translatable="false" name="config_wifiMinConfirmationDurationSendNetworkScoreEnabled">true</bool> + + <!-- Disable channel utilization estimation with fixed value. + b/160239223: Rx time is excluded in cca busy time and channel utilization is calculated + correctly during heavy DL traffic --> + <bool translatable="false" name="config_wifiChannelUtilizationOverrideEnabled">false</bool> + + <!-- Whether to use the explicit vendor HAL API: IWifiStaIface.setRoamingState for disabling fw roaming. --> + <bool translatable="false" name="config_wifiUseHalApiToDisableFwRoaming">true</bool> + + <!-- Indicate the driver support NL80211_REG_CHANGED event. --> + <bool translatable="false" name="config_wifiDriverSupportedNl80211RegChangedEvent">true</bool> + + <!-- Indicate the device support request channel on Wi-Fi Aware data-path. --> + <bool translatable="false" name="config_wifiSupportChannelOnDataPath">true</bool> +</resources> diff --git a/sec_config b/sec_config new file mode 100644 index 00000000..a33c89b4 --- /dev/null +++ b/sec_config @@ -0,0 +1,330 @@ +/* IPC Security Config */ +/* <GPS QMI Service ID - 16>:<GPS QMI Instance ID - all instances>:<Client Group ID> */ +16:4294967295:1000:1021:1026 +/* <QDMA QMI Service ID - 75>:<QDMA QMI Instance ID - all instances>:<Client Group ID> */ +75:4294967295:1000:1001:3006 +/* <LOWI QMI Service ID - 38>:<LOWI QMI Instance ID - all instances>:<Client Group ID> */ +56:4294967295:1021 +/* Allow SS CTL service to be used by system and net_raw processes */ +43:4294967295:1000:3004 +/* <UIMHTTP QMI Service ID - 16>:<UIMHTTP QMI Instance ID - all instances>:<Client Group ID> */ +71:4294967295:1001 +/* <UIMRMT QMI Service ID - 16>:<UIMRMT QMI Instance ID - all instances>:<Client Group ID> */ +50:4294967295:1001 +/* QMI-SLIM service permitted to gps and net_raw */ +55:4294967295:1021 +/* Allow Sensor services to be used by sensor process */ +256:4294967295:1000:1006:1013:1021:1047:3011 +257:4294967295:1000:1006:1013:1021:1047:3011 +258:4294967295:1000:1006:1013:1021:1047:3011 +259:4294967295:1000:1006:1013:1021:1047:3011 +260:4294967295:1000:1006:1013:1021:1047:3011 +261:4294967295:1000:1006:1013:1021:1047:3011 +262:4294967295:1000:1006:1013:1021:1047:3011 +263:4294967295:1000:1006:1013:1021:1047:3011 +264:4294967295:1000:1006:1013:1021:1047:3011 +265:4294967295:1000:1006:1013:1021:1047:3011 +266:4294967295:1000:1006:1013:1021:1047:3011 +267:4294967295:1000:1006:1013:1021:1047:3011 +268:4294967295:1000:1006:1013:1021:1047:3011 +269:4294967295:1000:1006:1013:1021:1047:3011 +270:4294967295:1000:1006:1013:1021:1047:3011 +271:4294967295:1000:1006:1013:1021:1047:3011 +272:4294967295:1000:1006:1013:1021:1047:3011 +273:4294967295:1000:1006:1013:1021:1047:3011 +274:4294967295:1000:1006:1013:1021:1047:3011 +275:4294967295:1000:1006:1013:1021:1047:3011 +276:4294967295:1000:1006:1013:1021:1047:3011 +277:4294967295:1000:1006:1013:1021:1047:3011 +278:4294967295:1000:1006:1013:1021:1047:3011 +279:4294967295:1000:1006:1013:1021:1047:3011 +280:4294967295:1000:1006:1013:1021:1047:3011 +281:4294967295:1000:1006:1013:1021:1047:3011 +282:4294967295:1000:1006:1013:1021:1047:3011 +283:4294967295:1000:1006:1013:1021:1047:3011 +284:4294967295:1000:1006:1013:1021:1047:3011 +285:4294967295:1000:1006:1013:1021:1047:3011 +286:4294967295:1000:1006:1013:1021:1047:3011 +287:4294967295:1000:1006:1013:1021:1047:3011 +288:4294967295:1000:1006:1013:1021:1047:3011 +289:4294967295:1000:1006:1013:1021:1047:3011 +290:4294967295:1000:1006:1013:1021:1047:3011 +291:4294967295:1000:1006:1013:1021:1047:3011 +292:4294967295:1000:1006:1013:1021:1047:3011 +293:4294967295:1000:1006:1013:1021:1047:3011 +294:4294967295:1000:1006:1013:1021:1047:3011 +295:4294967295:1000:1006:1013:1021:1047:3011 +296:4294967295:1000:1006:1013:1021:1047:3011 +297:4294967295:1000:1006:1013:1021:1047:3011 +298:4294967295:1000:1006:1013:1021:1047:3011 +299:4294967295:1000:1006:1013:1021:1047:3011 +300:4294967295:1000:1006:1013:1021:1047:3011 +301:4294967295:1000:1006:1013:1021:1047:3011 +302:4294967295:1000:1006:1013:1021:1047:3011 +303:4294967295:1000:1006:1013:1021:1047:3011 +304:4294967295:1000:1006:1013:1021:1047:3011 +305:4294967295:1000:1006:1013:1021:1047:3011 +306:4294967295:1000:1006:1013:1021:1047:3011 +307:4294967295:1000:1006:1013:1021:1047:3011 +308:4294967295:1000:1006:1013:1021:1047:3011 +309:4294967295:1000:1006:1013:1021:1047:3011 +310:4294967295:1000:1006:1013:1021:1047:3011 +311:4294967295:1000:1006:1013:1021:1047:3011 +312:4294967295:1000:1006:1013:1021:1047:3011 +313:4294967295:1000:1006:1013:1021:1047:3011 +314:4294967295:1000:1006:1013:1021:1047:3011 +315:4294967295:1000:1006:1013:1021:1047:3011 +316:4294967295:1000:1006:1013:1021:1047:3011 +317:4294967295:1000:1006:1013:1021:1047:3011 +318:4294967295:1000:1006:1013:1021:1047:3011 +319:4294967295:1000:1006:1013:1021:1047:3011 +320:4294967295:1000:1006:1013:1021:1047:3011 +321:4294967295:1000:1006:1013:1021:1047:3011 +322:4294967295:1000:1006:1013:1021:1047:3011 +323:4294967295:1000:1006:1013:1021:1047:3011 +324:4294967295:1000:1006:1013:1021:1047:3011 +325:4294967295:1000:1006:1013:1021:1047:3011 +326:4294967295:1000:1006:1013:1021:1047:3011 +327:4294967295:1000:1006:1013:1021:1047:3011 +328:4294967295:1000:1006:1013:1021:1047:3011 +329:4294967295:1000:1006:1013:1021:1047:3011 +330:4294967295:1000:1006:1013:1021:1047:3011 +331:4294967295:1000:1006:1013:1021:1047:3011 +332:4294967295:1000:1006:1013:1021:1047:3011 +333:4294967295:1000:1006:1013:1021:1047:3011 +334:4294967295:1000:1006:1013:1021:1047:3011 +335:4294967295:1000:1006:1013:1021:1047:3011 +336:4294967295:1000:1006:1013:1021:1047:3011 +337:4294967295:1000:1006:1013:1021:1047:3011 +338:4294967295:1000:1006:1013:1021:1047:3011 +339:4294967295:1000:1006:1013:1021:1047:3011 +340:4294967295:1000:1006:1013:1021:1047:3011 +341:4294967295:1000:1006:1013:1021:1047:3011 +342:4294967295:1000:1006:1013:1021:1047:3011 +343:4294967295:1000:1006:1013:1021:1047:3011 +344:4294967295:1000:1006:1013:1021:1047:3011 +345:4294967295:1000:1006:1013:1021:1047:3011 +346:4294967295:1000:1006:1013:1021:1047:3011 +347:4294967295:1000:1006:1013:1021:1047:3011 +348:4294967295:1000:1006:1013:1021:1047:3011 +349:4294967295:1000:1006:1013:1021:1047:3011 +350:4294967295:1000:1006:1013:1021:1047:3011 +351:4294967295:1000:1006:1013:1021:1047:3011 +352:4294967295:1000:1006:1013:1021:1047:3011 +353:4294967295:1000:1006:1013:1021:1047:3011 +354:4294967295:1000:1006:1013:1021:1047:3011 +355:4294967295:1000:1006:1013:1021:1047:3011 +356:4294967295:1000:1006:1013:1021:1047:3011 +357:4294967295:1000:1006:1013:1021:1047:3011 +358:4294967295:1000:1006:1013:1021:1047:3011 +359:4294967295:1000:1006:1013:1021:1047:3011 +360:4294967295:1000:1006:1013:1021:1047:3011 +361:4294967295:1000:1006:1013:1021:1047:3011 +362:4294967295:1000:1006:1013:1021:1047:3011 +363:4294967295:1000:1006:1013:1021:1047:3011 +364:4294967295:1000:1006:1013:1021:1047:3011 +365:4294967295:1000:1006:1013:1021:1047:3011 +366:4294967295:1000:1006:1013:1021:1047:3011 +367:4294967295:1000:1006:1013:1021:1047:3011 +368:4294967295:1000:1006:1013:1021:1047:3011 +369:4294967295:1000:1006:1013:1021:1047:3011 +370:4294967295:1000:1006:1013:1021:1047:3011 +371:4294967295:1000:1006:1013:1021:1047:3011 +372:4294967295:1000:1006:1013:1021:1047:3011 +373:4294967295:1000:1006:1013:1021:1047:3011 +374:4294967295:1000:1006:1013:1021:1047:3011 +375:4294967295:1000:1006:1013:1021:1047:3011 +376:4294967295:1000:1006:1013:1021:1047:3011 +377:4294967295:1000:1006:1013:1021:1047:3011 +378:4294967295:1000:1006:1013:1021:1047:3011 +379:4294967295:1000:1006:1013:1021:1047:3011 +380:4294967295:1000:1006:1013:1021:1047:3011 +381:4294967295:1000:1006:1013:1021:1047:3011 +382:4294967295:1000:1006:1013:1021:1047:3011 +383:4294967295:1000:1006:1013:1021:1047:3011 +384:4294967295:1000:1006:1013:1021:1047:3011 +385:4294967295:1000:1006:1013:1021:1047:3011 +386:4294967295:1000:1006:1013:1021:1047:3011 +387:4294967295:1000:1006:1013:1021:1047:3011 +388:4294967295:1000:1006:1013:1021:1047:3011 +389:4294967295:1000:1006:1013:1021:1047:3011 +390:4294967295:1000:1006:1013:1021:1047:3011 +391:4294967295:1000:1006:1013:1021:1047:3011 +392:4294967295:1000:1006:1013:1021:1047:3011 +393:4294967295:1000:1006:1013:1021:1047:3011 +394:4294967295:1000:1006:1013:1021:1047:3011 +395:4294967295:1000:1006:1013:1021:1047:3011 +396:4294967295:1000:1006:1013:1021:1047:3011 +397:4294967295:1000:1006:1013:1021:1047:3011 +398:4294967295:1000:1006:1013:1021:1047:3011 +399:4294967295:1000:1006:1013:1021:1047:3011 +400:4294967295:1000:1006:1013:1021:1047:3011 +401:4294967295:1000:1006:1013:1021:1047:3011 +402:4294967295:1000:1006:1013:1021:1047:3011 +403:4294967295:1000:1006:1013:1021:1047:3011 +404:4294967295:1000:1006:1013:1021:1047:3011 +405:4294967295:1000:1006:1013:1021:1047:3011 +406:4294967295:1000:1006:1013:1021:1047:3011 +407:4294967295:1000:1006:1013:1021:1047:3011 +408:4294967295:1000:1006:1013:1021:1047:3011 +409:4294967295:1000:1006:1013:1021:1047:3011 +410:4294967295:1000:1006:1013:1021:1047:3011 +411:4294967295:1000:1006:1013:1021:1047:3011 +412:4294967295:1000:1006:1013:1021:1047:3011 +413:4294967295:1000:1006:1013:1021:1047:3011 +414:4294967295:1000:1006:1013:1021:1047:3011 +415:4294967295:1000:1006:1013:1021:1047:3011 +416:4294967295:1000:1006:1013:1021:1047:3011 +417:4294967295:1000:1006:1013:1021:1047:3011 +418:4294967295:1000:1006:1013:1021:1047:3011 +419:4294967295:1000:1006:1013:1021:1047:3011 +420:4294967295:1000:1006:1013:1021:1047:3011 +421:4294967295:1000:1006:1013:1021:1047:3011 +422:4294967295:1000:1006:1013:1021:1047:3011 +423:4294967295:1000:1006:1013:1021:1047:3011 +424:4294967295:1000:1006:1013:1021:1047:3011 +425:4294967295:1000:1006:1013:1021:1047:3011 +426:4294967295:1000:1006:1013:1021:1047:3011 +427:4294967295:1000:1006:1013:1021:1047:3011 +428:4294967295:1000:1006:1013:1021:1047:3011 +429:4294967295:1000:1006:1013:1021:1047:3011 +430:4294967295:1000:1006:1013:1021:1047:3011 +431:4294967295:1000:1006:1013:1021:1047:3011 +432:4294967295:1000:1006:1013:1021:1047:3011 +433:4294967295:1000:1006:1013:1021:1047:3011 +434:4294967295:1000:1006:1013:1021:1047:3011 +435:4294967295:1000:1006:1013:1021:1047:3011 +436:4294967295:1000:1006:1013:1021:1047:3011 +437:4294967295:1000:1006:1013:1021:1047:3011 +438:4294967295:1000:1006:1013:1021:1047:3011 +439:4294967295:1000:1006:1013:1021:1047:3011 +440:4294967295:1000:1006:1013:1021:1047:3011 +441:4294967295:1000:1006:1013:1021:1047:3011 +442:4294967295:1000:1006:1013:1021:1047:3011 +443:4294967295:1000:1006:1013:1021:1047:3011 +444:4294967295:1000:1006:1013:1021:1047:3011 +445:4294967295:1000:1006:1013:1021:1047:3011 +446:4294967295:1000:1006:1013:1021:1047:3011 +447:4294967295:1000:1006:1013:1021:1047:3011 +448:4294967295:1000:1006:1013:1021:1047:3011 +449:4294967295:1000:1006:1013:1021:1047:3011 +450:4294967295:1000:1006:1013:1021:1047:3011 +451:4294967295:1000:1006:1013:1021:1047:3011 +452:4294967295:1000:1006:1013:1021:1047:3011 +453:4294967295:1000:1006:1013:1021:1047:3011 +454:4294967295:1000:1006:1013:1021:1047:3011 +455:4294967295:1000:1006:1013:1021:1047:3011 +456:4294967295:1000:1006:1013:1021:1047:3011 +457:4294967295:1000:1006:1013:1021:1047:3011 +458:4294967295:1000:1006:1013:1021:1047:3011 +459:4294967295:1000:1006:1013:1021:1047:3011 +460:4294967295:1000:1006:1013:1021:1047:3011 +461:4294967295:1000:1006:1013:1021:1047:3011 +462:4294967295:1000:1006:1013:1021:1047:3011 +463:4294967295:1000:1006:1013:1021:1047:3011 +464:4294967295:1000:1006:1013:1021:1047:3011 +465:4294967295:1000:1006:1013:1021:1047:3011 +466:4294967295:1000:1006:1013:1021:1047:3011 +467:4294967295:1000:1006:1013:1021:1047:3011 +468:4294967295:1000:1006:1013:1021:1047:3011 +469:4294967295:1000:1006:1013:1021:1047:3011 +470:4294967295:1000:1006:1013:1021:1047:3011 +471:4294967295:1000:1006:1013:1021:1047:3011 +472:4294967295:1000:1006:1013:1021:1047:3011 +473:4294967295:1000:1006:1013:1021:1047:3011 +474:4294967295:1000:1006:1013:1021:1047:3011 +475:4294967295:1000:1006:1013:1021:1047:3011 +476:4294967295:1000:1006:1013:1021:1047:3011 +477:4294967295:1000:1006:1013:1021:1047:3011 +478:4294967295:1000:1006:1013:1021:1047:3011 +479:4294967295:1000:1006:1013:1021:1047:3011 +480:4294967295:1000:1006:1013:1021:1047:3011 +481:4294967295:1000:1006:1013:1021:1047:3011 +482:4294967295:1000:1006:1013:1021:1047:3011 +483:4294967295:1000:1006:1013:1021:1047:3011 +484:4294967295:1000:1006:1013:1021:1047:3011 +485:4294967295:1000:1006:1013:1021:1047:3011 +486:4294967295:1000:1006:1013:1021:1047:3011 +487:4294967295:1000:1006:1013:1021:1047:3011 +488:4294967295:1000:1006:1013:1021:1047:3011 +489:4294967295:1000:1006:1013:1021:1047:3011 +490:4294967295:1000:1006:1013:1021:1047:3011 +491:4294967295:1000:1006:1013:1021:1047:3011 +492:4294967295:1000:1006:1013:1021:1047:3011 +493:4294967295:1000:1006:1013:1021:1047:3011 +494:4294967295:1000:1006:1013:1021:1047:3011 +495:4294967295:1000:1006:1013:1021:1047:3011 +496:4294967295:1000:1006:1013:1021:1047:3011 +497:4294967295:1000:1006:1013:1021:1047:3011 +498:4294967295:1000:1006:1013:1021:1047:3011 +499:4294967295:1000:1006:1013:1021:1047:3011 +500:4294967295:1000:1006:1013:1021:1047:3011 +501:4294967295:1000:1006:1013:1021:1047:3011 +502:4294967295:1000:1006:1013:1021:1047:3011 +503:4294967295:1000:1006:1013:1021:1047:3011 +504:4294967295:1000:1006:1013:1021:1047:3011 +505:4294967295:1000:1006:1013:1021:1047:3011 +506:4294967295:1000:1006:1013:1021:1047:3011 +507:4294967295:1000:1006:1013:1021:1047:3011 +508:4294967295:1000:1006:1013:1021:1047:3011 +509:4294967295:1000:1006:1013:1021:1047:3011 +510:4294967295:1000:1006:1013:1021:1047:3011 +511:4294967295:1000:1006:1013:1021:1047:3011 +/* Allow RCS service to aquire net_raw permission */ +18:4294967295:1001:3004 +/* Allow RCS service to communicate to IMS QMI Priv Svc*/ +77:4294967295:1001:3003 +/* Allow cnd to accquire netbind */ +18:4294967295:1000:3003 +/* Allow QMID service to aquire net_raw permission */ +3:4294967295:1001:1021:3004 +2:4294967295:1000:1001:3004 +42:4294967295:1001:3004 +18:4294967295:1001:3004 +9:4294967295:1001:3004 +1:4294967295:1001:3004:1000 +4:4294967295:1001:3004 +7:4294967295:1001:3004 +8:4294967295:1001:3004:1000 +68:4294967295:1001:3004 +/* DPM */ +47:4294967295:1001:3004 +/* Allow communication to some QMI services with radio privilages */ +/* Format is <Service id>:<all instances>:<radio> */ +/* PBM */ +12:4294967295:1001 +/* WMS */ +5:4294967295:1001 +/* IMS VT */ +32:4294967295:1001 +/* IMSP */ +31:4294967295:1001 +/* PDC */ +36:4294967295:1001 +/* SAR */ +17:4294967295:1001 +/* RFRPE */ +41:4294967295:1001 +/*UIM*/ +11:4294967295:1001 +/*CAT*/ +10:4294967295:1001 +/*IMSA*/ +33:4294967295:1001 +/* CSVT */ +29:4294967295:1001 +/*SERVREG_NOTIF*/ +64:4294967295:1001 +66:4294967295:1001 +/*LTE*/ +70:4294967295:1001 +/* Allow Data dpmd to access QMI DFS */ +48:4294967295:1000:3004 +/* DIAG */ +4097:4294967295:2002:2950:3009:2901 +/* <WLFW QMI Service ID - 0x45>:<WLFW QMI Instance ID - all instances>:<Client Group ID> */ +69:4294967295:1000 +/* <WLPS QMI Service ID - 0x39>:<WLFW QMI Instance ID - all instances>:<Client Group ID> */ +57:4294967295:1000 +/* <MODEM_SVC QMI Service ID - 235>:<MODEM_SVC QMI Instance ID - all instances>:<Client Group ID> */ +235:4294967295:1000 diff --git a/seccomp_policy/mediacodec.policy b/seccomp_policy/mediacodec.policy new file mode 100644 index 00000000..07b7bf70 --- /dev/null +++ b/seccomp_policy/mediacodec.policy @@ -0,0 +1,9 @@ +# device specific syscalls +pselect6: 1 +eventfd2: 1 +sendto: 1 +recvfrom: 1 +_llseek: 1 +sysinfo: 1 +getcwd: 1 +getdents64: 1 diff --git a/sensors.hals.conf b/sensors.hals.conf new file mode 100644 index 00000000..5f3a14be --- /dev/null +++ b/sensors.hals.conf @@ -0,0 +1 @@ +sensors.ssc.so diff --git a/sepolicy-lineage/dynamic/hal_lineage_livedisplay_qti.te b/sepolicy-lineage/dynamic/hal_lineage_livedisplay_qti.te new file mode 100644 index 00000000..76c79ba9 --- /dev/null +++ b/sepolicy-lineage/dynamic/hal_lineage_livedisplay_qti.te @@ -0,0 +1,7 @@ +# Do not use add_service() as hal_graphics_composer_default may be the provider as well +allow hal_lineage_livedisplay_qti qdisplay_service:service_manager find; + +binder_call(hal_lineage_livedisplay_qti, hal_graphics_composer_default) + +# Allow LiveDisplay to access vendor display property +get_prop(hal_lineage_livedisplay_qti, vendor_display_prop) diff --git a/sepolicy-lineage/vendor/file_contexts b/sepolicy-lineage/vendor/file_contexts new file mode 100644 index 00000000..88151924 --- /dev/null +++ b/sepolicy-lineage/vendor/file_contexts @@ -0,0 +1,2 @@ +# LiveDisplay HAL +/(vendor|system/vendor)/bin/hw/vendor\.lineage\.livedisplay@2\.0-service-sdm u:object_r:hal_lineage_livedisplay_qti_exec:s0 diff --git a/sepolicy-lineage/vendor/hal_lineage_livedisplay.te b/sepolicy-lineage/vendor/hal_lineage_livedisplay.te new file mode 100644 index 00000000..83cfd263 --- /dev/null +++ b/sepolicy-lineage/vendor/hal_lineage_livedisplay.te @@ -0,0 +1,12 @@ +type hal_lineage_livedisplay_qti, domain; +hal_server_domain(hal_lineage_livedisplay_qti, hal_lineage_livedisplay) + +type hal_lineage_livedisplay_qti_exec, exec_type, vendor_file_type, file_type; +init_daemon_domain(hal_lineage_livedisplay_qti) + +# Allow LiveDisplay HAL's default implementation to use vendor-binder service +vndbinder_use(hal_lineage_livedisplay_qti) + +# Allow LiveDisplay to store files under /data/vendor/display and access them +allow hal_lineage_livedisplay_qti display_vendor_data_file:dir rw_dir_perms; +allow hal_lineage_livedisplay_qti display_vendor_data_file:file create_file_perms; diff --git a/sepolicy/.gitupstream b/sepolicy/.gitupstream new file mode 100644 index 00000000..8b9ed448 --- /dev/null +++ b/sepolicy/.gitupstream @@ -0,0 +1 @@ +https://android.googlesource.com/device/google/redbull-sepolicy diff --git a/OWNERS b/sepolicy/OWNERS index 791abb4a..791abb4a 100644 --- a/OWNERS +++ b/sepolicy/OWNERS diff --git a/PREUPLOAD.cfg b/sepolicy/PREUPLOAD.cfg index 6544d629..6544d629 100644 --- a/PREUPLOAD.cfg +++ b/sepolicy/PREUPLOAD.cfg diff --git a/sepolicy/private/certs/wfcactivation.x509.pem b/sepolicy/private/certs/wfcactivation.x509.pem new file mode 100644 index 00000000..b331e2ef --- /dev/null +++ b/sepolicy/private/certs/wfcactivation.x509.pem @@ -0,0 +1,23 @@ +-----BEGIN CERTIFICATE----- +MIIDxzCCAq+gAwIBAgIVALNdsIWw8RAlQd7BIdldf+kv/v+BMA0GCSqGSIb3DQEB +CwUAMHQxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH +Ew1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtHb29nbGUgSW5jLjEQMA4GA1UECxMH +QW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDAeFw0xODAyMjEwMDU0MjBaFw00ODAy +MjEwMDU0MjBaMHQxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYw +FAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtHb29nbGUgSW5jLjEQMA4G +A1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDCCASIwDQYJKoZIhvcNAQEB +BQADggEPADCCAQoCggEBAMC2qqWTcN7MfX8ILMKG6q8SDJIIlE+zXz67V7N3jZKh +XpPzIMAv9nDrR6tmDye7S7qxp3UniErpTBCrVCAQUksniJ/4d9Ie6r99UeDq6YzJ +Y9mcQtfvzD+ZELKgkNfBoUMNRMCx5v+srchcDVjnTuU3FxNhQMYpDhP7PCynJW9/ +YeNznLdAbYaHBVhTYueUxlwryf+1bBa3E54hqu0xoHrP0FjKiX1ifhuTBcQfmKnF +JfC/I6r0x2vi+hAgBDXX/4WAUAtCFSeOKw5Qp4osqrMlguuotcgdznRI4Qqs2YDF +TVeeagu/3x242sUJzSqn4rrU+kNt1Az+G2SEQsbK1akCAwEAAaNQME4wDAYDVR0T +BAUwAwEB/zAdBgNVHQ4EFgQUOyhe5x68/4unqcqy4QAqn22NXPYwHwYDVR0jBBgw +FoAUOyhe5x68/4unqcqy4QAqn22NXPYwDQYJKoZIhvcNAQELBQADggEBAGzl8klj ++pOfYj91U5Xi5C9unsOWSx4uTufn62c5TvL/AvkCq5adzYlF2u320S+kfvYlAOR6 +MhN5tlFaKBDGCi+6zHnLTO2QLaZxYGJb5SdwaAF14shFg+7ZNMLb1X8GuKrLIGw1 +P2A5EWFSIwNaGQLz7Mwr66db7efBNWVvcMRdM67cip4LMeXGxuW+aKoJ2X7/x3Lc +FKsKQ7Jx1RxoylUMNBS+0kPCqoUnMqgD9U8Drbp0NcQgkqe0Vks9I/j5bxMeXgES +dkvy6CwcTB01ROO+VLwmWbculJy59K10HtqmeBrzb3DLnxBgAqgbFvIqKVXp8yp2 +l7kN8tGn0HIj4+0= +-----END CERTIFICATE----- diff --git a/private/compat/30.0/30.0.cil b/sepolicy/private/compat/30.0/30.0.cil index b8deabff..b8deabff 100644 --- a/private/compat/30.0/30.0.cil +++ b/sepolicy/private/compat/30.0/30.0.cil diff --git a/private/compat/31.0/31.0.cil b/sepolicy/private/compat/31.0/31.0.cil index 1c8f7634..1c8f7634 100644 --- a/private/compat/31.0/31.0.cil +++ b/sepolicy/private/compat/31.0/31.0.cil diff --git a/private/dumpstate.te b/sepolicy/private/dumpstate.te index a5522fd8..a5522fd8 100644 --- a/private/dumpstate.te +++ b/sepolicy/private/dumpstate.te diff --git a/private/genfs_contexts b/sepolicy/private/genfs_contexts index 0baaf386..0baaf386 100644 --- a/private/genfs_contexts +++ b/sepolicy/private/genfs_contexts diff --git a/private/google_camera_app.te b/sepolicy/private/google_camera_app.te index 411bbcb3..411bbcb3 100644 --- a/private/google_camera_app.te +++ b/sepolicy/private/google_camera_app.te diff --git a/sepolicy/private/keys.conf b/sepolicy/private/keys.conf new file mode 100644 index 00000000..22198c56 --- /dev/null +++ b/sepolicy/private/keys.conf @@ -0,0 +1,2 @@ +[@WFCACTIVATION] +ALL : device/google/redbull/sepolicy/private/certs/wfcactivation.x509.pem diff --git a/private/mac_permissions.xml b/sepolicy/private/mac_permissions.xml index 636d5794..636d5794 100644 --- a/private/mac_permissions.xml +++ b/sepolicy/private/mac_permissions.xml diff --git a/private/radio.te b/sepolicy/private/radio.te index eb5b3441..eb5b3441 100644 --- a/private/radio.te +++ b/sepolicy/private/radio.te diff --git a/private/seapp_contexts b/sepolicy/private/seapp_contexts index bbdc26bb..bbdc26bb 100644 --- a/private/seapp_contexts +++ b/sepolicy/private/seapp_contexts diff --git a/private/service.te b/sepolicy/private/service.te index 2cc37a23..2cc37a23 100644 --- a/private/service.te +++ b/sepolicy/private/service.te diff --git a/private/service_contexts b/sepolicy/private/service_contexts index db3e3d14..db3e3d14 100644 --- a/private/service_contexts +++ b/sepolicy/private/service_contexts diff --git a/private/sprint_hidden_menu.te b/sepolicy/private/sprint_hidden_menu.te index 9c01004c..9c01004c 100644 --- a/private/sprint_hidden_menu.te +++ b/sepolicy/private/sprint_hidden_menu.te diff --git a/private/toolbox.te b/sepolicy/private/toolbox.te index e2676e95..e2676e95 100644 --- a/private/toolbox.te +++ b/sepolicy/private/toolbox.te diff --git a/private/uscc_omadm.te b/sepolicy/private/uscc_omadm.te index b53d66c3..b53d66c3 100644 --- a/private/uscc_omadm.te +++ b/sepolicy/private/uscc_omadm.te diff --git a/private/vzw_omadm_connmo.te b/sepolicy/private/vzw_omadm_connmo.te index dda0dc85..dda0dc85 100644 --- a/private/vzw_omadm_connmo.te +++ b/sepolicy/private/vzw_omadm_connmo.te diff --git a/private/vzw_omadm_dcmo.te b/sepolicy/private/vzw_omadm_dcmo.te index 8a27ef36..8a27ef36 100644 --- a/private/vzw_omadm_dcmo.te +++ b/sepolicy/private/vzw_omadm_dcmo.te diff --git a/private/vzw_omadm_diagmon.te b/sepolicy/private/vzw_omadm_diagmon.te index 5c2bb4b0..5c2bb4b0 100644 --- a/private/vzw_omadm_diagmon.te +++ b/sepolicy/private/vzw_omadm_diagmon.te diff --git a/private/vzw_omadm_trigger.te b/sepolicy/private/vzw_omadm_trigger.te index aea7a93a..aea7a93a 100644 --- a/private/vzw_omadm_trigger.te +++ b/sepolicy/private/vzw_omadm_trigger.te diff --git a/private/wfc_activation_app.te b/sepolicy/private/wfc_activation_app.te index cd32efc4..cd32efc4 100644 --- a/private/wfc_activation_app.te +++ b/sepolicy/private/wfc_activation_app.te diff --git a/public/dataservice_app.te b/sepolicy/public/dataservice_app.te index 426416c4..426416c4 100644 --- a/public/dataservice_app.te +++ b/sepolicy/public/dataservice_app.te diff --git a/public/google_camera_app.te b/sepolicy/public/google_camera_app.te index 656be514..656be514 100644 --- a/public/google_camera_app.te +++ b/sepolicy/public/google_camera_app.te diff --git a/sepolicy/redbull-sepolicy.mk b/sepolicy/redbull-sepolicy.mk new file mode 100644 index 00000000..a28d29b1 --- /dev/null +++ b/sepolicy/redbull-sepolicy.mk @@ -0,0 +1,29 @@ +PRODUCT_PUBLIC_SEPOLICY_DIRS += device/google/redbull/sepolicy/public +PRODUCT_PRIVATE_SEPOLICY_DIRS += device/google/redbull/sepolicy/private + +# confirmationui +BOARD_SEPOLICY_DIRS += hardware/google/pixel-sepolicy/confirmationui_hal + +# ramdump +BOARD_SEPOLICY_DIRS += hardware/google/pixel-sepolicy/ramdump + +# twoshay +BOARD_SEPOLICY_DIRS += hardware/google/pixel-sepolicy/input + +# google_battery service +BOARD_SEPOLICY_DIRS += hardware/google/pixel-sepolicy/googlebattery + +# vendors +BOARD_SEPOLICY_DIRS += device/google/redbull/sepolicy/vendor/google +BOARD_SEPOLICY_DIRS += device/google/redbull/sepolicy/vendor/qcom/common +BOARD_SEPOLICY_DIRS += device/google/redbull/sepolicy/vendor/qcom/sm7250 +BOARD_SEPOLICY_DIRS += device/google/redbull/sepolicy/tracking_denials +BOARD_SEPOLICY_DIRS += device/google/redbull/sepolicy/vendor/st +BOARD_SEPOLICY_DIRS += device/google/redbull/sepolicy/vendor/verizon + +# Pixel-wide sepolicy +BOARD_VENDOR_SEPOLICY_DIRS += hardware/google/pixel-sepolicy/powerstats +BOARD_VENDOR_SEPOLICY_DIRS += hardware/google/pixel-sepolicy/ramdump/common + +# system_ext +SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS += device/google/redbull/sepolicy/system_ext/private diff --git a/system_ext/private/platform_app.te b/sepolicy/system_ext/private/platform_app.te index 10d6bba9..10d6bba9 100644 --- a/system_ext/private/platform_app.te +++ b/sepolicy/system_ext/private/platform_app.te diff --git a/system_ext/private/seapp_contexts b/sepolicy/system_ext/private/seapp_contexts index 934937fe..934937fe 100644 --- a/system_ext/private/seapp_contexts +++ b/sepolicy/system_ext/private/seapp_contexts diff --git a/tracking_denials/bug_map b/sepolicy/tracking_denials/bug_map index 016afc63..016afc63 100644 --- a/tracking_denials/bug_map +++ b/sepolicy/tracking_denials/bug_map diff --git a/tracking_denials/dumpstate.te b/sepolicy/tracking_denials/dumpstate.te index c415668c..c415668c 100644 --- a/tracking_denials/dumpstate.te +++ b/sepolicy/tracking_denials/dumpstate.te diff --git a/tracking_denials/hal_dumpstate_impl.te b/sepolicy/tracking_denials/hal_dumpstate_impl.te index 92def335..92def335 100644 --- a/tracking_denials/hal_dumpstate_impl.te +++ b/sepolicy/tracking_denials/hal_dumpstate_impl.te diff --git a/tracking_denials/hal_health_default.te b/sepolicy/tracking_denials/hal_health_default.te index b4832d67..b4832d67 100644 --- a/tracking_denials/hal_health_default.te +++ b/sepolicy/tracking_denials/hal_health_default.te diff --git a/tracking_denials/hal_power_default.te b/sepolicy/tracking_denials/hal_power_default.te index 2f7782bf..2f7782bf 100644 --- a/tracking_denials/hal_power_default.te +++ b/sepolicy/tracking_denials/hal_power_default.te diff --git a/tracking_denials/hal_sensors_default.te b/sepolicy/tracking_denials/hal_sensors_default.te index 781bec74..781bec74 100644 --- a/tracking_denials/hal_sensors_default.te +++ b/sepolicy/tracking_denials/hal_sensors_default.te diff --git a/tracking_denials/hal_tetheroffload_default.te b/sepolicy/tracking_denials/hal_tetheroffload_default.te index 7c11ff73..7c11ff73 100644 --- a/tracking_denials/hal_tetheroffload_default.te +++ b/sepolicy/tracking_denials/hal_tetheroffload_default.te diff --git a/tracking_denials/pixelstats_vendor.te b/sepolicy/tracking_denials/pixelstats_vendor.te index 8b137891..8b137891 100644 --- a/tracking_denials/pixelstats_vendor.te +++ b/sepolicy/tracking_denials/pixelstats_vendor.te diff --git a/tracking_denials/platform_app.te b/sepolicy/tracking_denials/platform_app.te index d3f45227..d3f45227 100644 --- a/tracking_denials/platform_app.te +++ b/sepolicy/tracking_denials/platform_app.te diff --git a/tracking_denials/ssgtzd.te b/sepolicy/tracking_denials/ssgtzd.te index 148c6d23..148c6d23 100644 --- a/tracking_denials/ssgtzd.te +++ b/sepolicy/tracking_denials/ssgtzd.te diff --git a/tracking_denials/surfaceflinger.te b/sepolicy/tracking_denials/surfaceflinger.te index c364a38a..c364a38a 100644 --- a/tracking_denials/surfaceflinger.te +++ b/sepolicy/tracking_denials/surfaceflinger.te diff --git a/vendor/google/bug_map b/sepolicy/vendor/google/bug_map index 8dba124d..8dba124d 100644 --- a/vendor/google/bug_map +++ b/sepolicy/vendor/google/bug_map diff --git a/vendor/google/cbrs_setup.te b/sepolicy/vendor/google/cbrs_setup.te index 93d62a33..93d62a33 100644 --- a/vendor/google/cbrs_setup.te +++ b/sepolicy/vendor/google/cbrs_setup.te diff --git a/sepolicy/vendor/google/certs/EuiccSupportPixel.x509.pem b/sepolicy/vendor/google/certs/EuiccSupportPixel.x509.pem new file mode 100644 index 00000000..956c9590 --- /dev/null +++ b/sepolicy/vendor/google/certs/EuiccSupportPixel.x509.pem @@ -0,0 +1,33 @@ +-----BEGIN CERTIFICATE----- +MIIFxjCCA66gAwIBAgIURH+ESClecwsP2Et2gQ1RAHxabWcwDQYJKoZIhvcNAQEL +BQAwdDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcT +DU1vdW50YWluIFZpZXcxFDASBgNVBAoTC0dvb2dsZSBJbmMuMRAwDgYDVQQLEwdB +bmRyb2lkMRAwDgYDVQQDEwdBbmRyb2lkMB4XDTE5MDIyODE5MjIxNloXDTQ5MDIy +ODE5MjIxNlowdDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAU +BgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC0dvb2dsZSBJbmMuMRAwDgYD +VQQLEwdBbmRyb2lkMRAwDgYDVQQDEwdBbmRyb2lkMIICIjANBgkqhkiG9w0BAQEF +AAOCAg8AMIICCgKCAgEA5AVOe4SKiCOnR4DQ2V3sIo5LNpGtmdzZ54MnHIrsSX8n +43xtCTpfQWDWnDZFCIHSmR8KAOQ0BNxL8ajtr66gU6tFzD5Vlistwl9P9uUlYWgG +aeyEoOUqtiN2HtsJDpcCLYKOz6oH2c5NeruDp5n/Z49xpXXXLgoOTlsoS65tsTcW +FrcSuuOE40UyFJ+Rwhh1EiXGPvT99gaXNnDq5WIsPNNe39jV7f01lZs/g5iUn4dV +A/DxLMam/CQh7qQkh6qWkDL8koQ21N9xEZYTR8qvGvgz3Zd1yfT0P1HsgJaPXK5F +qb2vLV1NP8KoYIlB2KqadCn+HJjIgH8UIbB+R8o6KuWCYzLb5vPs87HkXG5/Y+GB +7HrCIC+6a8BJ4UUyjUkg/HtBd7GlEixZKLtbcJ3erdfL7uigjCJEqAYDXr2Zes31 +898ePcl3YQO5/rHobB7f4w3iF/TwIAAyRRlOceoskCEa/vCbmb7I8HQIJthSNedW +cBiKUneohCtfLT3qS0JUVZewiFRMOVD8mwcZFr4o/UfVslEe8DpBp0WXs/83OeEJ +dtfRc861jdOJ7EIyfDmBX91iWgLCBgv6aXtMvP7CwgZV7y+C+WbbsjYTYSjsNVSA +1uexVPozsSkIjxote0aAiu6+b8LAq9bq2c6Yc6MoldgBqlfcwvFzlKqlm966q6UC +AwEAAaNQME4wDAYDVR0TBAUwAwEB/zAdBgNVHQ4EFgQUuH5K2ov/9L++x+8UhrCD +hNdJm6EwHwYDVR0jBBgwFoAUuH5K2ov/9L++x+8UhrCDhNdJm6EwDQYJKoZIhvcN +AQELBQADggIBAIV1Wx+iwchzxx+ggbWlmJx+oPya2axvj8cgbLGujxI+nmtY2b7U +vzazggubioxJJW7rzemLMDwfKPlfiZkIeQmBe2YJhHiwIPaRAB2juZTfQARsEkd4 +qYvcIDui6PbbgitLWOh3lYNDcVe/c8+EwbJuNNSqjPwIZvj2lodTQNI7uUy1ff5h +ytHsznObr/rh+MeJlKKY56JL6VEzsD694iVFxJ7f4FXK5Y0pjqYmGj1krcfMFoxH +PAmj57yf3VVzeGKx5re+5WIMe5K0RZB9IWxfvx1DsxXvzVeaHYW/c6VF7TVT/RUV ++iLtst+1A1RJbeXDu3uLHxPAC44WUb3FQOUKPRP2cIul70ifJSbvu+qLuyfgwltX +yYIeQMSrUw4WK6NMNYaIPgEq1BX4rLUlKxlH4xaNwT5ZCWLTRdWozYP5FFSMdQhh +Ob1Ki81wKmr1f9EkXoW9eGRZBj3tAg90k0qltel30eLpW6gmnNg+la84nyaXfBF3 +vQAbaAuW5D3TAMWR/Wl6nHoPItdrXHkyMRvQkzx2ezKz61ZP3uDfEZvMLXR0lle8 +s6pTZB3GLS4mY9LFQdDwPlc1xk8yEcdnUAZs+9U6zZF1+FKSgb3UNy81g2DHUMp0 +FCBXTy+kLm0LQVYU91kLd+fTkmgkWl4xSyXeV5g3FFuiv9ahl7//vvCG +-----END CERTIFICATE----- diff --git a/sepolicy/vendor/google/certs/app.x509.pem b/sepolicy/vendor/google/certs/app.x509.pem new file mode 100644 index 00000000..1ccaade6 --- /dev/null +++ b/sepolicy/vendor/google/certs/app.x509.pem @@ -0,0 +1,25 @@ +-----BEGIN CERTIFICATE----- +MIIEQzCCAyugAwIBAgIJAMLgh0ZkSjCNMA0GCSqGSIb3DQEBBAUAMHQxCzAJBgNV +BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBW +aWV3MRQwEgYDVQQKEwtHb29nbGUgSW5jLjEQMA4GA1UECxMHQW5kcm9pZDEQMA4G +A1UEAxMHQW5kcm9pZDAeFw0wODA4MjEyMzEzMzRaFw0zNjAxMDcyMzEzMzRaMHQx +CzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3Vu +dGFpbiBWaWV3MRQwEgYDVQQKEwtHb29nbGUgSW5jLjEQMA4GA1UECxMHQW5kcm9p +ZDEQMA4GA1UEAxMHQW5kcm9pZDCCASAwDQYJKoZIhvcNAQEBBQADggENADCCAQgC +ggEBAKtWLgDYO6IIrgqWbxJOKdoR8qtW0I9Y4sypEwPpt1TTcvZApxsdyxMJZ2JO +Rland2qSGT2y5b+3JKkedxiLDmpHpDsz2WCbdxgxRczfey5YZnTJ4VZbH0xqWVW/ +8lGmPav5xVwnIiJS6HXk+BVKZF+JcWjAsb/GEuq/eFdpuzSqeYTcfi6idkyugwfY +wXFU1+5fZKUaRKYCwkkFQVfcAs1fXA5V+++FGfvjJ/CxURaSxaBvGdGDhfXE28LW +uT9ozCl5xw4Yq5OGazvV24mZVSoOO0yZ31j7kYvtwYK6NeADwbSxDdJEqO4k//0z +OHKrUiGYXtqw/A0LFFtqoZKFjnkCAQOjgdkwgdYwHQYDVR0OBBYEFMd9jMIhF1Yl +mn/Tgt9r45jk14alMIGmBgNVHSMEgZ4wgZuAFMd9jMIhF1Ylmn/Tgt9r45jk14al +oXikdjB0MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE +BxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLR29vZ2xlIEluYy4xEDAOBgNVBAsT +B0FuZHJvaWQxEDAOBgNVBAMTB0FuZHJvaWSCCQDC4IdGZEowjTAMBgNVHRMEBTAD +AQH/MA0GCSqGSIb3DQEBBAUAA4IBAQBt0lLO74UwLDYKqs6Tm8/yzKkEu116FmH4 +rkaymUIE0P9KaMftGlMexFlaYjzmB2OxZyl6euNXEsQH8gjwyxCUKRJNexBiGcCE +yj6z+a1fuHHvkiaai+KL8W1EyNmgjmyy8AW7P+LLlkR+ho5zEHatRbM/YAnqGcFh +5iZBqpknHf1SKMXFh4dd239FJ1jWYfbMDMy3NS5CTMQ2XFI1MvcyUTdZPErjQfTb +Qe3aDQsQcafEQPD+nqActifKZ0Np0IS9L9kR/wbNvyz6ENwPiTrjV2KRkEjH78ZM +cUQXg0L3BYHJ3lc69Vs5Ddf9uUGGMYldX3WfMBEmh/9iFBDAaTCK +-----END CERTIFICATE----- diff --git a/vendor/google/certs/com_google_mds.x509.pem b/sepolicy/vendor/google/certs/com_google_mds.x509.pem index 640c6fb9..640c6fb9 100644 --- a/vendor/google/certs/com_google_mds.x509.pem +++ b/sepolicy/vendor/google/certs/com_google_mds.x509.pem diff --git a/vendor/google/certs/pulse-release.x509.pem b/sepolicy/vendor/google/certs/pulse-release.x509.pem index fb11572f..fb11572f 100644 --- a/vendor/google/certs/pulse-release.x509.pem +++ b/sepolicy/vendor/google/certs/pulse-release.x509.pem diff --git a/vendor/google/citadeld.te b/sepolicy/vendor/google/citadeld.te index e0425188..e0425188 100644 --- a/vendor/google/citadeld.te +++ b/sepolicy/vendor/google/citadeld.te diff --git a/vendor/google/color_init.te b/sepolicy/vendor/google/color_init.te index 46c3ebc0..46c3ebc0 100644 --- a/vendor/google/color_init.te +++ b/sepolicy/vendor/google/color_init.te diff --git a/vendor/google/device.te b/sepolicy/vendor/google/device.te index 11d2fc35..11d2fc35 100644 --- a/vendor/google/device.te +++ b/sepolicy/vendor/google/device.te diff --git a/vendor/google/device_drop_monitor.te b/sepolicy/vendor/google/device_drop_monitor.te index 8c0c0b77..8c0c0b77 100644 --- a/vendor/google/device_drop_monitor.te +++ b/sepolicy/vendor/google/device_drop_monitor.te diff --git a/vendor/google/dumpstate.te b/sepolicy/vendor/google/dumpstate.te index c69e8745..c69e8745 100644 --- a/vendor/google/dumpstate.te +++ b/sepolicy/vendor/google/dumpstate.te diff --git a/vendor/google/e2fs.te b/sepolicy/vendor/google/e2fs.te index 4d2b596c..4d2b596c 100644 --- a/vendor/google/e2fs.te +++ b/sepolicy/vendor/google/e2fs.te diff --git a/vendor/google/euiccpixel_app.te b/sepolicy/vendor/google/euiccpixel_app.te index bef7b07b..bef7b07b 100644 --- a/vendor/google/euiccpixel_app.te +++ b/sepolicy/vendor/google/euiccpixel_app.te diff --git a/vendor/google/fastbootd.te b/sepolicy/vendor/google/fastbootd.te index 9b542501..9b542501 100644 --- a/vendor/google/fastbootd.te +++ b/sepolicy/vendor/google/fastbootd.te diff --git a/vendor/google/file.te b/sepolicy/vendor/google/file.te index 53a5f889..53a5f889 100644 --- a/vendor/google/file.te +++ b/sepolicy/vendor/google/file.te diff --git a/vendor/google/file_contexts b/sepolicy/vendor/google/file_contexts index 5a0e30c2..5a0e30c2 100644 --- a/vendor/google/file_contexts +++ b/sepolicy/vendor/google/file_contexts diff --git a/vendor/google/fsck.te b/sepolicy/vendor/google/fsck.te index 7d94ea1f..7d94ea1f 100644 --- a/vendor/google/fsck.te +++ b/sepolicy/vendor/google/fsck.te diff --git a/vendor/google/genfs_contexts b/sepolicy/vendor/google/genfs_contexts index 263f93b7..01141f4d 100644 --- a/vendor/google/genfs_contexts +++ b/sepolicy/vendor/google/genfs_contexts @@ -1,5 +1,6 @@ genfscon debugfs /f2fs u:object_r:debugfs_f2fs:s0 genfscon sysfs /devices/soc0 u:object_r:sysfs_soc:s0 +genfscon sysfs /devices/soc0/serial_number u:object_r:sysfs_soc_sensitive:s0 genfscon sysfs /devices/platform/soc/1d84000.ufshc/slowio_read_cnt u:object_r:sysfs_scsi_devices_0000:s0 genfscon sysfs /devices/platform/soc/1d84000.ufshc/slowio_write_cnt u:object_r:sysfs_scsi_devices_0000:s0 genfscon sysfs /devices/platform/soc/1d84000.ufshc/slowio_unmap_cnt u:object_r:sysfs_scsi_devices_0000:s0 diff --git a/vendor/google/google_camera_app.te b/sepolicy/vendor/google/google_camera_app.te index 2b4af1ac..2b4af1ac 100644 --- a/vendor/google/google_camera_app.te +++ b/sepolicy/vendor/google/google_camera_app.te diff --git a/vendor/google/grilservice_app.te b/sepolicy/vendor/google/grilservice_app.te index 4188d8f3..4188d8f3 100644 --- a/vendor/google/grilservice_app.te +++ b/sepolicy/vendor/google/grilservice_app.te diff --git a/vendor/google/hal_camera_default.te b/sepolicy/vendor/google/hal_camera_default.te index e90e7c7f..e90e7c7f 100644 --- a/vendor/google/hal_camera_default.te +++ b/sepolicy/vendor/google/hal_camera_default.te diff --git a/vendor/google/hal_confirmationui.te b/sepolicy/vendor/google/hal_confirmationui.te index 97609fd7..97609fd7 100644 --- a/vendor/google/hal_confirmationui.te +++ b/sepolicy/vendor/google/hal_confirmationui.te diff --git a/vendor/google/hal_contexthub.te b/sepolicy/vendor/google/hal_contexthub.te index 10c5d53d..10c5d53d 100644 --- a/vendor/google/hal_contexthub.te +++ b/sepolicy/vendor/google/hal_contexthub.te diff --git a/vendor/google/hal_dumpstate_impl.te b/sepolicy/vendor/google/hal_dumpstate_impl.te index 122f35dd..fa75a28e 100644 --- a/vendor/google/hal_dumpstate_impl.te +++ b/sepolicy/vendor/google/hal_dumpstate_impl.te @@ -177,7 +177,4 @@ dontaudit hal_dumpstate_impl sensors_vendor_data_file:file r_file_perms; # Access to thermal debug data r_dir_file(hal_dumpstate_impl, sysfs_thermal) -# Access to /sys/devices/soc0/serial_number -r_dir_file(hal_dumpstate_impl, sysfs_soc) - dontaudit hal_dumpstate_impl rootfs:dir rw_dir_perms; diff --git a/vendor/google/hal_fingerprint.te b/sepolicy/vendor/google/hal_fingerprint.te index f0dbd00a..f0dbd00a 100644 --- a/vendor/google/hal_fingerprint.te +++ b/sepolicy/vendor/google/hal_fingerprint.te diff --git a/vendor/google/hal_health_default.te b/sepolicy/vendor/google/hal_health_default.te index c9e6a0b5..c9e6a0b5 100644 --- a/vendor/google/hal_health_default.te +++ b/sepolicy/vendor/google/hal_health_default.te diff --git a/vendor/google/hal_health_storage_default.te b/sepolicy/vendor/google/hal_health_storage_default.te index 436297ac..436297ac 100644 --- a/vendor/google/hal_health_storage_default.te +++ b/sepolicy/vendor/google/hal_health_storage_default.te diff --git a/vendor/google/hal_neuralnetworks_darwinn.te b/sepolicy/vendor/google/hal_neuralnetworks_darwinn.te index 204b6f00..204b6f00 100644 --- a/vendor/google/hal_neuralnetworks_darwinn.te +++ b/sepolicy/vendor/google/hal_neuralnetworks_darwinn.te diff --git a/vendor/google/hal_power_default.te b/sepolicy/vendor/google/hal_power_default.te index 1da3393e..1da3393e 100644 --- a/vendor/google/hal_power_default.te +++ b/sepolicy/vendor/google/hal_power_default.te diff --git a/vendor/google/hal_power_stats_default.te b/sepolicy/vendor/google/hal_power_stats_default.te index fac8cda9..fac8cda9 100644 --- a/vendor/google/hal_power_stats_default.te +++ b/sepolicy/vendor/google/hal_power_stats_default.te diff --git a/vendor/google/hal_radioext_default.te b/sepolicy/vendor/google/hal_radioext_default.te index 1a6ac358..1a6ac358 100644 --- a/vendor/google/hal_radioext_default.te +++ b/sepolicy/vendor/google/hal_radioext_default.te diff --git a/vendor/google/hal_sensors_default.te b/sepolicy/vendor/google/hal_sensors_default.te index 4a9adc8b..4a9adc8b 100644 --- a/vendor/google/hal_sensors_default.te +++ b/sepolicy/vendor/google/hal_sensors_default.te diff --git a/vendor/google/hal_usb_impl.te b/sepolicy/vendor/google/hal_usb_impl.te index 12160ca3..12160ca3 100644 --- a/vendor/google/hal_usb_impl.te +++ b/sepolicy/vendor/google/hal_usb_impl.te diff --git a/vendor/google/hal_vibrator_default.te b/sepolicy/vendor/google/hal_vibrator_default.te index 0ba33f27..0ba33f27 100644 --- a/vendor/google/hal_vibrator_default.te +++ b/sepolicy/vendor/google/hal_vibrator_default.te diff --git a/vendor/google/hal_wifi_ext.te b/sepolicy/vendor/google/hal_wifi_ext.te index 32aa39c6..32aa39c6 100644 --- a/vendor/google/hal_wifi_ext.te +++ b/sepolicy/vendor/google/hal_wifi_ext.te diff --git a/vendor/google/hal_wireless_charger.te b/sepolicy/vendor/google/hal_wireless_charger.te index f2e0b3ab..f2e0b3ab 100644 --- a/vendor/google/hal_wireless_charger.te +++ b/sepolicy/vendor/google/hal_wireless_charger.te diff --git a/vendor/google/hal_wlc.te b/sepolicy/vendor/google/hal_wlc.te index 0339bbe8..0339bbe8 100644 --- a/vendor/google/hal_wlc.te +++ b/sepolicy/vendor/google/hal_wlc.te diff --git a/vendor/google/hardware_info_app.te b/sepolicy/vendor/google/hardware_info_app.te index 557ed506..557ed506 100644 --- a/vendor/google/hardware_info_app.te +++ b/sepolicy/vendor/google/hardware_info_app.te diff --git a/vendor/google/hbmsvmanager_app.te b/sepolicy/vendor/google/hbmsvmanager_app.te index d33136f5..d33136f5 100644 --- a/vendor/google/hbmsvmanager_app.te +++ b/sepolicy/vendor/google/hbmsvmanager_app.te diff --git a/vendor/google/hwservice.te b/sepolicy/vendor/google/hwservice.te index 7ba9a7a1..7ba9a7a1 100644 --- a/vendor/google/hwservice.te +++ b/sepolicy/vendor/google/hwservice.te diff --git a/vendor/google/hwservice_contexts b/sepolicy/vendor/google/hwservice_contexts index 51e5a317..51e5a317 100644 --- a/vendor/google/hwservice_contexts +++ b/sepolicy/vendor/google/hwservice_contexts diff --git a/vendor/google/init-insmod-sh.te b/sepolicy/vendor/google/init-insmod-sh.te index 67530dc3..67530dc3 100644 --- a/vendor/google/init-insmod-sh.te +++ b/sepolicy/vendor/google/init-insmod-sh.te diff --git a/vendor/google/init.te b/sepolicy/vendor/google/init.te index 42e1dd3f..42e1dd3f 100644 --- a/vendor/google/init.te +++ b/sepolicy/vendor/google/init.te diff --git a/vendor/google/init_dp.te b/sepolicy/vendor/google/init_dp.te index cb5ffffc..cb5ffffc 100644 --- a/vendor/google/init_dp.te +++ b/sepolicy/vendor/google/init_dp.te diff --git a/vendor/google/init_gadgethal.te b/sepolicy/vendor/google/init_gadgethal.te index b59e17a3..b59e17a3 100644 --- a/vendor/google/init_gadgethal.te +++ b/sepolicy/vendor/google/init_gadgethal.te diff --git a/vendor/google/init_modem.te b/sepolicy/vendor/google/init_modem.te index ebfe13d0..ebfe13d0 100644 --- a/vendor/google/init_modem.te +++ b/sepolicy/vendor/google/init_modem.te diff --git a/vendor/google/init_qti_chg_policy.te b/sepolicy/vendor/google/init_qti_chg_policy.te index 924d3d16..924d3d16 100644 --- a/vendor/google/init_qti_chg_policy.te +++ b/sepolicy/vendor/google/init_qti_chg_policy.te diff --git a/vendor/google/init_radio.te b/sepolicy/vendor/google/init_radio.te index 26664d75..26664d75 100644 --- a/vendor/google/init_radio.te +++ b/sepolicy/vendor/google/init_radio.te diff --git a/vendor/google/init_twoshay.te b/sepolicy/vendor/google/init_twoshay.te index 82b6971c..82b6971c 100644 --- a/vendor/google/init_twoshay.te +++ b/sepolicy/vendor/google/init_twoshay.te diff --git a/vendor/google/ip_health_monitor.te b/sepolicy/vendor/google/ip_health_monitor.te index 352d7c14..352d7c14 100644 --- a/vendor/google/ip_health_monitor.te +++ b/sepolicy/vendor/google/ip_health_monitor.te diff --git a/vendor/google/kernel.te b/sepolicy/vendor/google/kernel.te index 53ec7cfa..53ec7cfa 100644 --- a/vendor/google/kernel.te +++ b/sepolicy/vendor/google/kernel.te diff --git a/sepolicy/vendor/google/keys.conf b/sepolicy/vendor/google/keys.conf new file mode 100644 index 00000000..9151503b --- /dev/null +++ b/sepolicy/vendor/google/keys.conf @@ -0,0 +1,12 @@ +[@GOOGLE] +ALL : device/google/redbull/sepolicy/vendor/google/certs/app.x509.pem + +[@GOOGLEPULSE] +ALL : device/google/redbull/sepolicy/vendor/google/certs/pulse-release.x509.pem + +[@MDS] +ALL : device/google/redbull/sepolicy/vendor/google/certs/com_google_mds.x509.pem + +[@EUICCSUPPORTPIXEL] +ALL : device/google/redbull/sepolicy/vendor/google/certs/EuiccSupportPixel.x509.pem + diff --git a/vendor/google/logger_app.te b/sepolicy/vendor/google/logger_app.te index caa22f34..caa22f34 100644 --- a/vendor/google/logger_app.te +++ b/sepolicy/vendor/google/logger_app.te diff --git a/vendor/google/mac_permissions.xml b/sepolicy/vendor/google/mac_permissions.xml index 070982fc..070982fc 100644 --- a/vendor/google/mac_permissions.xml +++ b/sepolicy/vendor/google/mac_permissions.xml diff --git a/vendor/google/modem_diagnostics.te b/sepolicy/vendor/google/modem_diagnostics.te index c481738b..c481738b 100644 --- a/vendor/google/modem_diagnostics.te +++ b/sepolicy/vendor/google/modem_diagnostics.te diff --git a/vendor/google/modem_svc.te b/sepolicy/vendor/google/modem_svc.te index 0197ba49..0197ba49 100644 --- a/vendor/google/modem_svc.te +++ b/sepolicy/vendor/google/modem_svc.te diff --git a/vendor/google/pixelstats_vendor.te b/sepolicy/vendor/google/pixelstats_vendor.te index bb4a9d44..bb4a9d44 100644 --- a/vendor/google/pixelstats_vendor.te +++ b/sepolicy/vendor/google/pixelstats_vendor.te diff --git a/vendor/google/platform_app.te b/sepolicy/vendor/google/platform_app.te index 03004b31..03004b31 100644 --- a/vendor/google/platform_app.te +++ b/sepolicy/vendor/google/platform_app.te diff --git a/vendor/google/property.te b/sepolicy/vendor/google/property.te index 5dea67ad..5dea67ad 100644 --- a/vendor/google/property.te +++ b/sepolicy/vendor/google/property.te diff --git a/vendor/google/property_contexts b/sepolicy/vendor/google/property_contexts index 119d9829..119d9829 100644 --- a/vendor/google/property_contexts +++ b/sepolicy/vendor/google/property_contexts diff --git a/vendor/google/ramdump_app.te b/sepolicy/vendor/google/ramdump_app.te index fa4f9eb0..fa4f9eb0 100644 --- a/vendor/google/ramdump_app.te +++ b/sepolicy/vendor/google/ramdump_app.te diff --git a/vendor/google/ramoops.te b/sepolicy/vendor/google/ramoops.te index 9dc2bdc3..9dc2bdc3 100644 --- a/vendor/google/ramoops.te +++ b/sepolicy/vendor/google/ramoops.te diff --git a/vendor/google/recovery.te b/sepolicy/vendor/google/recovery.te index 39cb5575..39cb5575 100644 --- a/vendor/google/recovery.te +++ b/sepolicy/vendor/google/recovery.te diff --git a/vendor/google/rlsservice.te b/sepolicy/vendor/google/rlsservice.te index de0913e5..de0913e5 100644 --- a/vendor/google/rlsservice.te +++ b/sepolicy/vendor/google/rlsservice.te diff --git a/vendor/google/seapp_contexts b/sepolicy/vendor/google/seapp_contexts index 71f4cb57..71f4cb57 100644 --- a/vendor/google/seapp_contexts +++ b/sepolicy/vendor/google/seapp_contexts diff --git a/vendor/google/sensor_service_server.te b/sepolicy/vendor/google/sensor_service_server.te index 71c13efc..71c13efc 100644 --- a/vendor/google/sensor_service_server.te +++ b/sepolicy/vendor/google/sensor_service_server.te diff --git a/vendor/google/service.te b/sepolicy/vendor/google/service.te index 27abf848..27abf848 100644 --- a/vendor/google/service.te +++ b/sepolicy/vendor/google/service.te diff --git a/vendor/google/service_contexts b/sepolicy/vendor/google/service_contexts index 40989edf..40989edf 100644 --- a/vendor/google/service_contexts +++ b/sepolicy/vendor/google/service_contexts diff --git a/vendor/google/shell.te b/sepolicy/vendor/google/shell.te index eba9c9ef..eba9c9ef 100644 --- a/vendor/google/shell.te +++ b/sepolicy/vendor/google/shell.te diff --git a/vendor/google/ssr_detector.te b/sepolicy/vendor/google/ssr_detector.te index 3a44e9a1..3a44e9a1 100644 --- a/vendor/google/ssr_detector.te +++ b/sepolicy/vendor/google/ssr_detector.te diff --git a/vendor/google/su.te b/sepolicy/vendor/google/su.te index 917c2b3c..917c2b3c 100644 --- a/vendor/google/su.te +++ b/sepolicy/vendor/google/su.te diff --git a/vendor/google/system_app.te b/sepolicy/vendor/google/system_app.te index 9499c593..9499c593 100644 --- a/vendor/google/system_app.te +++ b/sepolicy/vendor/google/system_app.te diff --git a/vendor/google/tcpdump_logger.te b/sepolicy/vendor/google/tcpdump_logger.te index a6fb808d..a6fb808d 100644 --- a/vendor/google/tcpdump_logger.te +++ b/sepolicy/vendor/google/tcpdump_logger.te diff --git a/vendor/google/toolbox.te b/sepolicy/vendor/google/toolbox.te index b12911ab..b12911ab 100644 --- a/vendor/google/toolbox.te +++ b/sepolicy/vendor/google/toolbox.te diff --git a/vendor/google/update_engine.te b/sepolicy/vendor/google/update_engine.te index 8b914f4a..8b914f4a 100644 --- a/vendor/google/update_engine.te +++ b/sepolicy/vendor/google/update_engine.te diff --git a/vendor/google/update_engine_common.te b/sepolicy/vendor/google/update_engine_common.te index 62196f29..62196f29 100644 --- a/vendor/google/update_engine_common.te +++ b/sepolicy/vendor/google/update_engine_common.te diff --git a/vendor/google/uv_exposure_reporter.te b/sepolicy/vendor/google/uv_exposure_reporter.te index 8aa682ac..8aa682ac 100644 --- a/vendor/google/uv_exposure_reporter.te +++ b/sepolicy/vendor/google/uv_exposure_reporter.te diff --git a/vendor/google/vendor_init.te b/sepolicy/vendor/google/vendor_init.te index bc2ed4ee..bc2ed4ee 100644 --- a/vendor/google/vendor_init.te +++ b/sepolicy/vendor/google/vendor_init.te diff --git a/vendor/google/vendor_misc_writer.te b/sepolicy/vendor/google/vendor_misc_writer.te index 886b983c..886b983c 100644 --- a/vendor/google/vendor_misc_writer.te +++ b/sepolicy/vendor/google/vendor_misc_writer.te diff --git a/vendor/google/vendor_shell.te b/sepolicy/vendor/google/vendor_shell.te index 2ace587a..2ace587a 100644 --- a/vendor/google/vendor_shell.te +++ b/sepolicy/vendor/google/vendor_shell.te diff --git a/vendor/google/vndservice.te b/sepolicy/vendor/google/vndservice.te index d67705ff..d67705ff 100644 --- a/vendor/google/vndservice.te +++ b/sepolicy/vendor/google/vndservice.te diff --git a/vendor/google/vndservice_contexts b/sepolicy/vendor/google/vndservice_contexts index 6e449dec..6e449dec 100644 --- a/vendor/google/vndservice_contexts +++ b/sepolicy/vendor/google/vndservice_contexts diff --git a/vendor/google/vold.te b/sepolicy/vendor/google/vold.te index f7b7e262..f7b7e262 100644 --- a/vendor/google/vold.te +++ b/sepolicy/vendor/google/vold.te diff --git a/vendor/qcom/common/adpl.te b/sepolicy/vendor/qcom/common/adpl.te index a567abe1..a567abe1 100644 --- a/vendor/qcom/common/adpl.te +++ b/sepolicy/vendor/qcom/common/adpl.te diff --git a/vendor/qcom/common/adsprpcd.te b/sepolicy/vendor/qcom/common/adsprpcd.te index afafbab5..afafbab5 100644 --- a/vendor/qcom/common/adsprpcd.te +++ b/sepolicy/vendor/qcom/common/adsprpcd.te diff --git a/vendor/qcom/common/app.te b/sepolicy/vendor/qcom/common/app.te index 3316d9db..3316d9db 100644 --- a/vendor/qcom/common/app.te +++ b/sepolicy/vendor/qcom/common/app.te diff --git a/vendor/qcom/common/attributes b/sepolicy/vendor/qcom/common/attributes index a43fa65b..a43fa65b 100644 --- a/vendor/qcom/common/attributes +++ b/sepolicy/vendor/qcom/common/attributes diff --git a/vendor/qcom/common/bootanim.te b/sepolicy/vendor/qcom/common/bootanim.te index 934ca3e0..934ca3e0 100644 --- a/vendor/qcom/common/bootanim.te +++ b/sepolicy/vendor/qcom/common/bootanim.te diff --git a/vendor/qcom/common/cameraserver.te b/sepolicy/vendor/qcom/common/cameraserver.te index 4987377d..4987377d 100644 --- a/vendor/qcom/common/cameraserver.te +++ b/sepolicy/vendor/qcom/common/cameraserver.te diff --git a/vendor/qcom/common/cdsprpcd.te b/sepolicy/vendor/qcom/common/cdsprpcd.te index 67bdb549..67bdb549 100644 --- a/vendor/qcom/common/cdsprpcd.te +++ b/sepolicy/vendor/qcom/common/cdsprpcd.te diff --git a/vendor/qcom/common/chre.te b/sepolicy/vendor/qcom/common/chre.te index 4006a660..4006a660 100644 --- a/vendor/qcom/common/chre.te +++ b/sepolicy/vendor/qcom/common/chre.te diff --git a/vendor/qcom/common/cnd.te b/sepolicy/vendor/qcom/common/cnd.te index de96b7b5..de96b7b5 100644 --- a/vendor/qcom/common/cnd.te +++ b/sepolicy/vendor/qcom/common/cnd.te diff --git a/vendor/qcom/common/con_monitor.te b/sepolicy/vendor/qcom/common/con_monitor.te index 860c16e6..860c16e6 100644 --- a/vendor/qcom/common/con_monitor.te +++ b/sepolicy/vendor/qcom/common/con_monitor.te diff --git a/vendor/qcom/common/device.te b/sepolicy/vendor/qcom/common/device.te index db7a09c3..db7a09c3 100644 --- a/vendor/qcom/common/device.te +++ b/sepolicy/vendor/qcom/common/device.te diff --git a/vendor/qcom/common/diag.te b/sepolicy/vendor/qcom/common/diag.te index ba0972b4..ba0972b4 100644 --- a/vendor/qcom/common/diag.te +++ b/sepolicy/vendor/qcom/common/diag.te diff --git a/vendor/qcom/common/dspservice.te b/sepolicy/vendor/qcom/common/dspservice.te index a00a6fb2..a00a6fb2 100644 --- a/vendor/qcom/common/dspservice.te +++ b/sepolicy/vendor/qcom/common/dspservice.te diff --git a/vendor/qcom/common/ecoservice.te b/sepolicy/vendor/qcom/common/ecoservice.te index da131e38..da131e38 100644 --- a/vendor/qcom/common/ecoservice.te +++ b/sepolicy/vendor/qcom/common/ecoservice.te diff --git a/vendor/qcom/common/feature_enabler_client.te b/sepolicy/vendor/qcom/common/feature_enabler_client.te index 9fe8ce02..9fe8ce02 100644 --- a/vendor/qcom/common/feature_enabler_client.te +++ b/sepolicy/vendor/qcom/common/feature_enabler_client.te diff --git a/vendor/qcom/common/file.te b/sepolicy/vendor/qcom/common/file.te index 37cdeba0..503cbe07 100644 --- a/vendor/qcom/common/file.te +++ b/sepolicy/vendor/qcom/common/file.te @@ -6,6 +6,7 @@ type proc_swappiness, proc_type, fs_type; type cnd_data_file, file_type, data_file_type; type chre_socket, file_type; type sysfs_soc, sysfs_type, fs_type; +type sysfs_soc_sensitive, sysfs_type, fs_type; type sysfs_msm_subsys, sysfs_type, fs_type; type netmgrd_data_file, file_type, data_file_type; type persist_camera_file, file_type , vendor_persist_type; diff --git a/vendor/qcom/common/file_contexts b/sepolicy/vendor/qcom/common/file_contexts index ce842ca4..ce842ca4 100644 --- a/vendor/qcom/common/file_contexts +++ b/sepolicy/vendor/qcom/common/file_contexts diff --git a/vendor/qcom/common/genfs_contexts b/sepolicy/vendor/qcom/common/genfs_contexts index 5b8182a7..5b8182a7 100644 --- a/vendor/qcom/common/genfs_contexts +++ b/sepolicy/vendor/qcom/common/genfs_contexts diff --git a/vendor/qcom/common/hal_audio_default.te b/sepolicy/vendor/qcom/common/hal_audio_default.te index 296c1e76..296c1e76 100644 --- a/vendor/qcom/common/hal_audio_default.te +++ b/sepolicy/vendor/qcom/common/hal_audio_default.te diff --git a/vendor/qcom/common/hal_bluetooth_default.te b/sepolicy/vendor/qcom/common/hal_bluetooth_default.te index f5f21288..f5f21288 100644 --- a/vendor/qcom/common/hal_bluetooth_default.te +++ b/sepolicy/vendor/qcom/common/hal_bluetooth_default.te diff --git a/vendor/qcom/common/hal_bootctl.te b/sepolicy/vendor/qcom/common/hal_bootctl.te index 7c9837a6..7c9837a6 100644 --- a/vendor/qcom/common/hal_bootctl.te +++ b/sepolicy/vendor/qcom/common/hal_bootctl.te diff --git a/vendor/qcom/common/hal_display_color.te b/sepolicy/vendor/qcom/common/hal_display_color.te index 72b38370..72b38370 100644 --- a/vendor/qcom/common/hal_display_color.te +++ b/sepolicy/vendor/qcom/common/hal_display_color.te diff --git a/vendor/qcom/common/hal_drm_clearkey.te b/sepolicy/vendor/qcom/common/hal_drm_clearkey.te index 44518feb..44518feb 100644 --- a/vendor/qcom/common/hal_drm_clearkey.te +++ b/sepolicy/vendor/qcom/common/hal_drm_clearkey.te diff --git a/vendor/qcom/common/hal_drm_widevine.te b/sepolicy/vendor/qcom/common/hal_drm_widevine.te index b2be68ff..b2be68ff 100644 --- a/vendor/qcom/common/hal_drm_widevine.te +++ b/sepolicy/vendor/qcom/common/hal_drm_widevine.te diff --git a/vendor/qcom/common/hal_fingerprint.te b/sepolicy/vendor/qcom/common/hal_fingerprint.te index 699a781a..699a781a 100644 --- a/vendor/qcom/common/hal_fingerprint.te +++ b/sepolicy/vendor/qcom/common/hal_fingerprint.te diff --git a/vendor/qcom/common/hal_gatekeeper_qti.te b/sepolicy/vendor/qcom/common/hal_gatekeeper_qti.te index 27b35119..27b35119 100644 --- a/vendor/qcom/common/hal_gatekeeper_qti.te +++ b/sepolicy/vendor/qcom/common/hal_gatekeeper_qti.te diff --git a/vendor/qcom/common/hal_gnss_qti.te b/sepolicy/vendor/qcom/common/hal_gnss_qti.te index d3186612..d3186612 100644 --- a/vendor/qcom/common/hal_gnss_qti.te +++ b/sepolicy/vendor/qcom/common/hal_gnss_qti.te diff --git a/vendor/qcom/common/hal_graphics_allocator_default.te b/sepolicy/vendor/qcom/common/hal_graphics_allocator_default.te index a49e55ed..a49e55ed 100644 --- a/vendor/qcom/common/hal_graphics_allocator_default.te +++ b/sepolicy/vendor/qcom/common/hal_graphics_allocator_default.te diff --git a/vendor/qcom/common/hal_graphics_composer_default.te b/sepolicy/vendor/qcom/common/hal_graphics_composer_default.te index d27ef8fe..d27ef8fe 100644 --- a/vendor/qcom/common/hal_graphics_composer_default.te +++ b/sepolicy/vendor/qcom/common/hal_graphics_composer_default.te diff --git a/vendor/qcom/common/hal_imsrtp.te b/sepolicy/vendor/qcom/common/hal_imsrtp.te index 55c0ecd0..55c0ecd0 100644 --- a/vendor/qcom/common/hal_imsrtp.te +++ b/sepolicy/vendor/qcom/common/hal_imsrtp.te diff --git a/vendor/qcom/common/hal_keymaster_qti.te b/sepolicy/vendor/qcom/common/hal_keymaster_qti.te index 70c7cc21..70c7cc21 100644 --- a/vendor/qcom/common/hal_keymaster_qti.te +++ b/sepolicy/vendor/qcom/common/hal_keymaster_qti.te diff --git a/vendor/qcom/common/hal_memtrack_default.te b/sepolicy/vendor/qcom/common/hal_memtrack_default.te index 4882eca2..4882eca2 100644 --- a/vendor/qcom/common/hal_memtrack_default.te +++ b/sepolicy/vendor/qcom/common/hal_memtrack_default.te diff --git a/vendor/qcom/common/hal_neuralnetworks.te b/sepolicy/vendor/qcom/common/hal_neuralnetworks.te index 6ccdd390..6ccdd390 100644 --- a/vendor/qcom/common/hal_neuralnetworks.te +++ b/sepolicy/vendor/qcom/common/hal_neuralnetworks.te diff --git a/vendor/qcom/common/hal_qseecom.te b/sepolicy/vendor/qcom/common/hal_qseecom.te index fc37ddf8..fc37ddf8 100644 --- a/vendor/qcom/common/hal_qseecom.te +++ b/sepolicy/vendor/qcom/common/hal_qseecom.te diff --git a/vendor/qcom/common/hal_qteeconnector_qti.te b/sepolicy/vendor/qcom/common/hal_qteeconnector_qti.te index e305090b..e305090b 100644 --- a/vendor/qcom/common/hal_qteeconnector_qti.te +++ b/sepolicy/vendor/qcom/common/hal_qteeconnector_qti.te diff --git a/vendor/qcom/common/hal_rcsservice.te b/sepolicy/vendor/qcom/common/hal_rcsservice.te index c8257459..c8257459 100644 --- a/vendor/qcom/common/hal_rcsservice.te +++ b/sepolicy/vendor/qcom/common/hal_rcsservice.te diff --git a/vendor/qcom/common/hal_sensors_default.te b/sepolicy/vendor/qcom/common/hal_sensors_default.te index 19526438..19526438 100644 --- a/vendor/qcom/common/hal_sensors_default.te +++ b/sepolicy/vendor/qcom/common/hal_sensors_default.te diff --git a/vendor/qcom/common/hal_tetheroffload_default.te b/sepolicy/vendor/qcom/common/hal_tetheroffload_default.te index b463fc35..b463fc35 100644 --- a/vendor/qcom/common/hal_tetheroffload_default.te +++ b/sepolicy/vendor/qcom/common/hal_tetheroffload_default.te diff --git a/vendor/qcom/common/hal_tui_comm_qti.te b/sepolicy/vendor/qcom/common/hal_tui_comm_qti.te index b5a00b19..b5a00b19 100644 --- a/vendor/qcom/common/hal_tui_comm_qti.te +++ b/sepolicy/vendor/qcom/common/hal_tui_comm_qti.te diff --git a/vendor/qcom/common/hal_wifi_supplicant_default.te b/sepolicy/vendor/qcom/common/hal_wifi_supplicant_default.te index b046a9b0..b046a9b0 100644 --- a/vendor/qcom/common/hal_wifi_supplicant_default.te +++ b/sepolicy/vendor/qcom/common/hal_wifi_supplicant_default.te diff --git a/vendor/qcom/common/hvdcp.te b/sepolicy/vendor/qcom/common/hvdcp.te index 9c1b7eb8..9c1b7eb8 100644 --- a/vendor/qcom/common/hvdcp.te +++ b/sepolicy/vendor/qcom/common/hvdcp.te diff --git a/vendor/qcom/common/hwservice.te b/sepolicy/vendor/qcom/common/hwservice.te index 08c0a769..08c0a769 100644 --- a/vendor/qcom/common/hwservice.te +++ b/sepolicy/vendor/qcom/common/hwservice.te diff --git a/vendor/qcom/common/hwservice_contexts b/sepolicy/vendor/qcom/common/hwservice_contexts index 053545a8..053545a8 100644 --- a/vendor/qcom/common/hwservice_contexts +++ b/sepolicy/vendor/qcom/common/hwservice_contexts diff --git a/vendor/qcom/common/ims.te b/sepolicy/vendor/qcom/common/ims.te index 42a7200d..42a7200d 100644 --- a/vendor/qcom/common/ims.te +++ b/sepolicy/vendor/qcom/common/ims.te diff --git a/vendor/qcom/common/init-qti-keymaster-sh.te b/sepolicy/vendor/qcom/common/init-qti-keymaster-sh.te index f5a6c316..f5a6c316 100644 --- a/vendor/qcom/common/init-qti-keymaster-sh.te +++ b/sepolicy/vendor/qcom/common/init-qti-keymaster-sh.te diff --git a/vendor/qcom/common/init_shell.te b/sepolicy/vendor/qcom/common/init_shell.te index 11ea6a36..11ea6a36 100644 --- a/vendor/qcom/common/init_shell.te +++ b/sepolicy/vendor/qcom/common/init_shell.te diff --git a/vendor/qcom/common/ioctl_defines b/sepolicy/vendor/qcom/common/ioctl_defines index 1a7a207c..1a7a207c 100644 --- a/vendor/qcom/common/ioctl_defines +++ b/sepolicy/vendor/qcom/common/ioctl_defines diff --git a/vendor/qcom/common/ioctl_macros b/sepolicy/vendor/qcom/common/ioctl_macros index ae50a635..ae50a635 100644 --- a/vendor/qcom/common/ioctl_macros +++ b/sepolicy/vendor/qcom/common/ioctl_macros diff --git a/vendor/qcom/common/irsc_util.te b/sepolicy/vendor/qcom/common/irsc_util.te index 13401f91..13401f91 100644 --- a/vendor/qcom/common/irsc_util.te +++ b/sepolicy/vendor/qcom/common/irsc_util.te diff --git a/vendor/qcom/common/kernel.te b/sepolicy/vendor/qcom/common/kernel.te index 19d3986e..19d3986e 100644 --- a/vendor/qcom/common/kernel.te +++ b/sepolicy/vendor/qcom/common/kernel.te diff --git a/vendor/qcom/common/location.te b/sepolicy/vendor/qcom/common/location.te index d5df3c09..751f8471 100644 --- a/vendor/qcom/common/location.te +++ b/sepolicy/vendor/qcom/common/location.te @@ -41,3 +41,6 @@ unix_socket_send(location, wifihal, hal_wifi_ext); userdebug_or_eng(` allow location diag_device:chr_file rw_file_perms; ') + +# xtra-daemon control +get_prop(location, xtra_control_prop) diff --git a/vendor/qcom/common/mdm_helper.te b/sepolicy/vendor/qcom/common/mdm_helper.te index 7911e1b9..7911e1b9 100644 --- a/vendor/qcom/common/mdm_helper.te +++ b/sepolicy/vendor/qcom/common/mdm_helper.te diff --git a/vendor/qcom/common/mediacodec.te b/sepolicy/vendor/qcom/common/mediacodec.te index 4a5d2a3c..4a5d2a3c 100644 --- a/vendor/qcom/common/mediacodec.te +++ b/sepolicy/vendor/qcom/common/mediacodec.te diff --git a/vendor/qcom/common/mediaserver.te b/sepolicy/vendor/qcom/common/mediaserver.te index ef486cfd..ef486cfd 100644 --- a/vendor/qcom/common/mediaserver.te +++ b/sepolicy/vendor/qcom/common/mediaserver.te diff --git a/vendor/qcom/common/mediaswcodec.te b/sepolicy/vendor/qcom/common/mediaswcodec.te index 33b737ef..33b737ef 100644 --- a/vendor/qcom/common/mediaswcodec.te +++ b/sepolicy/vendor/qcom/common/mediaswcodec.te diff --git a/vendor/qcom/common/mediatranscoding.te b/sepolicy/vendor/qcom/common/mediatranscoding.te index ab3f09dc..ab3f09dc 100644 --- a/vendor/qcom/common/mediatranscoding.te +++ b/sepolicy/vendor/qcom/common/mediatranscoding.te diff --git a/vendor/qcom/common/msm_irqbalanced.te b/sepolicy/vendor/qcom/common/msm_irqbalanced.te index 886b4308..886b4308 100644 --- a/vendor/qcom/common/msm_irqbalanced.te +++ b/sepolicy/vendor/qcom/common/msm_irqbalanced.te diff --git a/vendor/qcom/common/netmgrd.te b/sepolicy/vendor/qcom/common/netmgrd.te index 49ec1026..49ec1026 100644 --- a/vendor/qcom/common/netmgrd.te +++ b/sepolicy/vendor/qcom/common/netmgrd.te diff --git a/vendor/qcom/common/netutils_wrapper.te b/sepolicy/vendor/qcom/common/netutils_wrapper.te index 299375b2..299375b2 100644 --- a/vendor/qcom/common/netutils_wrapper.te +++ b/sepolicy/vendor/qcom/common/netutils_wrapper.te diff --git a/vendor/qcom/common/omadm.te b/sepolicy/vendor/qcom/common/omadm.te index 377a0519..377a0519 100644 --- a/vendor/qcom/common/omadm.te +++ b/sepolicy/vendor/qcom/common/omadm.te diff --git a/vendor/qcom/common/pd_services.te b/sepolicy/vendor/qcom/common/pd_services.te index 1c6e09c8..1c6e09c8 100644 --- a/vendor/qcom/common/pd_services.te +++ b/sepolicy/vendor/qcom/common/pd_services.te diff --git a/vendor/qcom/common/peripheral_manager.te b/sepolicy/vendor/qcom/common/peripheral_manager.te index edafb01e..edafb01e 100644 --- a/vendor/qcom/common/peripheral_manager.te +++ b/sepolicy/vendor/qcom/common/peripheral_manager.te diff --git a/vendor/qcom/common/port-bridge.te b/sepolicy/vendor/qcom/common/port-bridge.te index 9057dd5a..9057dd5a 100644 --- a/vendor/qcom/common/port-bridge.te +++ b/sepolicy/vendor/qcom/common/port-bridge.te diff --git a/vendor/qcom/common/property.te b/sepolicy/vendor/qcom/common/property.te index 5867d8cc..5867d8cc 100644 --- a/vendor/qcom/common/property.te +++ b/sepolicy/vendor/qcom/common/property.te diff --git a/vendor/qcom/common/property_contexts b/sepolicy/vendor/qcom/common/property_contexts index 0b3c63b4..0b3c63b4 100644 --- a/vendor/qcom/common/property_contexts +++ b/sepolicy/vendor/qcom/common/property_contexts diff --git a/vendor/qcom/common/qlogd.te b/sepolicy/vendor/qcom/common/qlogd.te index 99c821b2..99c821b2 100644 --- a/vendor/qcom/common/qlogd.te +++ b/sepolicy/vendor/qcom/common/qlogd.te diff --git a/vendor/qcom/common/qrtr.te b/sepolicy/vendor/qcom/common/qrtr.te index 6cd4ac94..6cd4ac94 100644 --- a/vendor/qcom/common/qrtr.te +++ b/sepolicy/vendor/qcom/common/qrtr.te diff --git a/vendor/qcom/common/qspmhal.te b/sepolicy/vendor/qcom/common/qspmhal.te index 5f2724b5..5f2724b5 100644 --- a/vendor/qcom/common/qspmhal.te +++ b/sepolicy/vendor/qcom/common/qspmhal.te diff --git a/vendor/qcom/common/qtelephony.te b/sepolicy/vendor/qcom/common/qtelephony.te index a0650401..a0650401 100644 --- a/vendor/qcom/common/qtelephony.te +++ b/sepolicy/vendor/qcom/common/qtelephony.te diff --git a/vendor/qcom/common/qti.te b/sepolicy/vendor/qcom/common/qti.te index 187a9ddc..187a9ddc 100644 --- a/vendor/qcom/common/qti.te +++ b/sepolicy/vendor/qcom/common/qti.te diff --git a/vendor/qcom/common/qtidataservices_app.te b/sepolicy/vendor/qcom/common/qtidataservices_app.te index d963c469..d963c469 100644 --- a/vendor/qcom/common/qtidataservices_app.te +++ b/sepolicy/vendor/qcom/common/qtidataservices_app.te diff --git a/vendor/qcom/common/radio.te b/sepolicy/vendor/qcom/common/radio.te index 216ada19..216ada19 100644 --- a/vendor/qcom/common/radio.te +++ b/sepolicy/vendor/qcom/common/radio.te diff --git a/vendor/qcom/common/rfs_access.te b/sepolicy/vendor/qcom/common/rfs_access.te index a5b5ba84..a5b5ba84 100644 --- a/vendor/qcom/common/rfs_access.te +++ b/sepolicy/vendor/qcom/common/rfs_access.te diff --git a/vendor/qcom/common/ril_config_service.te b/sepolicy/vendor/qcom/common/ril_config_service.te index a28d7c64..a28d7c64 100644 --- a/vendor/qcom/common/ril_config_service.te +++ b/sepolicy/vendor/qcom/common/ril_config_service.te diff --git a/vendor/qcom/common/rild.te b/sepolicy/vendor/qcom/common/rild.te index 5bc8795a..5bc8795a 100644 --- a/vendor/qcom/common/rild.te +++ b/sepolicy/vendor/qcom/common/rild.te diff --git a/vendor/qcom/common/rmt_storage.te b/sepolicy/vendor/qcom/common/rmt_storage.te index b58b734f..b58b734f 100644 --- a/vendor/qcom/common/rmt_storage.te +++ b/sepolicy/vendor/qcom/common/rmt_storage.te diff --git a/vendor/qcom/common/seapp_contexts b/sepolicy/vendor/qcom/common/seapp_contexts index 7360124d..7360124d 100644 --- a/vendor/qcom/common/seapp_contexts +++ b/sepolicy/vendor/qcom/common/seapp_contexts diff --git a/vendor/qcom/common/sec_nvm.te b/sepolicy/vendor/qcom/common/sec_nvm.te index 98701de0..98701de0 100644 --- a/vendor/qcom/common/sec_nvm.te +++ b/sepolicy/vendor/qcom/common/sec_nvm.te diff --git a/vendor/qcom/common/secure_ui_service_app.te b/sepolicy/vendor/qcom/common/secure_ui_service_app.te index 3024627b..3024627b 100644 --- a/vendor/qcom/common/secure_ui_service_app.te +++ b/sepolicy/vendor/qcom/common/secure_ui_service_app.te diff --git a/vendor/qcom/common/sensors.te b/sepolicy/vendor/qcom/common/sensors.te index 789047ca..789047ca 100644 --- a/vendor/qcom/common/sensors.te +++ b/sepolicy/vendor/qcom/common/sensors.te diff --git a/vendor/qcom/common/service.te b/sepolicy/vendor/qcom/common/service.te index 9da5a979..9da5a979 100644 --- a/vendor/qcom/common/service.te +++ b/sepolicy/vendor/qcom/common/service.te diff --git a/vendor/qcom/common/service_contexts b/sepolicy/vendor/qcom/common/service_contexts index 48db21b6..48db21b6 100644 --- a/vendor/qcom/common/service_contexts +++ b/sepolicy/vendor/qcom/common/service_contexts diff --git a/vendor/qcom/common/shell.te b/sepolicy/vendor/qcom/common/shell.te index cd0e4a4d..cd0e4a4d 100644 --- a/vendor/qcom/common/shell.te +++ b/sepolicy/vendor/qcom/common/shell.te diff --git a/vendor/qcom/common/shsusrd.te b/sepolicy/vendor/qcom/common/shsusrd.te index 68e454bf..68e454bf 100644 --- a/vendor/qcom/common/shsusrd.te +++ b/sepolicy/vendor/qcom/common/shsusrd.te diff --git a/vendor/qcom/common/spdaemon.te b/sepolicy/vendor/qcom/common/spdaemon.te index bcf4fd7b..bcf4fd7b 100644 --- a/vendor/qcom/common/spdaemon.te +++ b/sepolicy/vendor/qcom/common/spdaemon.te diff --git a/vendor/qcom/common/ssgtzd.te b/sepolicy/vendor/qcom/common/ssgtzd.te index 055d0001..055d0001 100644 --- a/vendor/qcom/common/ssgtzd.te +++ b/sepolicy/vendor/qcom/common/ssgtzd.te diff --git a/vendor/qcom/common/ssr_diag.te b/sepolicy/vendor/qcom/common/ssr_diag.te index 47f00d3c..47f00d3c 100644 --- a/vendor/qcom/common/ssr_diag.te +++ b/sepolicy/vendor/qcom/common/ssr_diag.te diff --git a/vendor/qcom/common/ssr_setup.te b/sepolicy/vendor/qcom/common/ssr_setup.te index cf3e67fe..cf3e67fe 100644 --- a/vendor/qcom/common/ssr_setup.te +++ b/sepolicy/vendor/qcom/common/ssr_setup.te diff --git a/vendor/qcom/common/subsystem_ramdump.te b/sepolicy/vendor/qcom/common/subsystem_ramdump.te index 59d059d7..59d059d7 100644 --- a/vendor/qcom/common/subsystem_ramdump.te +++ b/sepolicy/vendor/qcom/common/subsystem_ramdump.te diff --git a/vendor/qcom/common/surfaceflinger.te b/sepolicy/vendor/qcom/common/surfaceflinger.te index ec3cace3..ec3cace3 100644 --- a/vendor/qcom/common/surfaceflinger.te +++ b/sepolicy/vendor/qcom/common/surfaceflinger.te diff --git a/vendor/qcom/common/system_server.te b/sepolicy/vendor/qcom/common/system_server.te index 89ec16cb..89ec16cb 100644 --- a/vendor/qcom/common/system_server.te +++ b/sepolicy/vendor/qcom/common/system_server.te diff --git a/vendor/qcom/common/tee.te b/sepolicy/vendor/qcom/common/tee.te index 1aac0292..1aac0292 100644 --- a/vendor/qcom/common/tee.te +++ b/sepolicy/vendor/qcom/common/tee.te diff --git a/vendor/qcom/common/time_daemon.te b/sepolicy/vendor/qcom/common/time_daemon.te index 2ec86d2a..2ec86d2a 100644 --- a/vendor/qcom/common/time_daemon.te +++ b/sepolicy/vendor/qcom/common/time_daemon.te diff --git a/vendor/qcom/common/timeservice_app.te b/sepolicy/vendor/qcom/common/timeservice_app.te index 9611ec86..9611ec86 100644 --- a/vendor/qcom/common/timeservice_app.te +++ b/sepolicy/vendor/qcom/common/timeservice_app.te diff --git a/vendor/qcom/common/vendor_init.te b/sepolicy/vendor/qcom/common/vendor_init.te index e543bbf6..e543bbf6 100644 --- a/vendor/qcom/common/vendor_init.te +++ b/sepolicy/vendor/qcom/common/vendor_init.te diff --git a/vendor/qcom/common/vendor_modprobe.te b/sepolicy/vendor/qcom/common/vendor_modprobe.te index 8a069fa3..8a069fa3 100644 --- a/vendor/qcom/common/vendor_modprobe.te +++ b/sepolicy/vendor/qcom/common/vendor_modprobe.te diff --git a/vendor/qcom/common/vndservice.te b/sepolicy/vendor/qcom/common/vndservice.te index 7cf5bba2..7cf5bba2 100644 --- a/vendor/qcom/common/vndservice.te +++ b/sepolicy/vendor/qcom/common/vndservice.te diff --git a/vendor/qcom/common/vndservice_contexts b/sepolicy/vendor/qcom/common/vndservice_contexts index c86bf6c1..c86bf6c1 100644 --- a/vendor/qcom/common/vndservice_contexts +++ b/sepolicy/vendor/qcom/common/vndservice_contexts diff --git a/vendor/qcom/common/vold.te b/sepolicy/vendor/qcom/common/vold.te index fb2b59cf..fb2b59cf 100644 --- a/vendor/qcom/common/vold.te +++ b/sepolicy/vendor/qcom/common/vold.te diff --git a/vendor/qcom/common/wcnss_service.te b/sepolicy/vendor/qcom/common/wcnss_service.te index 680aaa5c..680aaa5c 100644 --- a/vendor/qcom/common/wcnss_service.te +++ b/sepolicy/vendor/qcom/common/wcnss_service.te diff --git a/vendor/qcom/common/zygote.te b/sepolicy/vendor/qcom/common/zygote.te index 77d172a2..77d172a2 100644 --- a/vendor/qcom/common/zygote.te +++ b/sepolicy/vendor/qcom/common/zygote.te diff --git a/vendor/qcom/sm7250/file_contexts b/sepolicy/vendor/qcom/sm7250/file_contexts index 21189e8d..21189e8d 100644 --- a/vendor/qcom/sm7250/file_contexts +++ b/sepolicy/vendor/qcom/sm7250/file_contexts diff --git a/vendor/qcom/sm7250/genfs_contexts b/sepolicy/vendor/qcom/sm7250/genfs_contexts index 4877b549..4877b549 100644 --- a/vendor/qcom/sm7250/genfs_contexts +++ b/sepolicy/vendor/qcom/sm7250/genfs_contexts diff --git a/vendor/st/file_contexts b/sepolicy/vendor/st/file_contexts index b9031f82..b9031f82 100644 --- a/vendor/st/file_contexts +++ b/sepolicy/vendor/st/file_contexts diff --git a/vendor/st/hal_nfc_default.te b/sepolicy/vendor/st/hal_nfc_default.te index 3ec0448e..3ec0448e 100644 --- a/vendor/st/hal_nfc_default.te +++ b/sepolicy/vendor/st/hal_nfc_default.te diff --git a/vendor/st/hal_secure_element_default.te b/sepolicy/vendor/st/hal_secure_element_default.te index 84cde422..84cde422 100644 --- a/vendor/st/hal_secure_element_default.te +++ b/sepolicy/vendor/st/hal_secure_element_default.te diff --git a/vendor/st/property.te b/sepolicy/vendor/st/property.te index 723121a0..723121a0 100644 --- a/vendor/st/property.te +++ b/sepolicy/vendor/st/property.te diff --git a/vendor/st/property_contexts b/sepolicy/vendor/st/property_contexts index c6cd8a45..c6cd8a45 100644 --- a/vendor/st/property_contexts +++ b/sepolicy/vendor/st/property_contexts diff --git a/vendor/st/vendor_init.te b/sepolicy/vendor/st/vendor_init.te index abc7580b..abc7580b 100644 --- a/vendor/st/vendor_init.te +++ b/sepolicy/vendor/st/vendor_init.te diff --git a/sepolicy/vendor/verizon/keys.conf b/sepolicy/vendor/verizon/keys.conf new file mode 100644 index 00000000..208863f6 --- /dev/null +++ b/sepolicy/vendor/verizon/keys.conf @@ -0,0 +1,2 @@ +[@VERIZON] +ALL : device/google/redbull/sepolicy/vendor/verizon/verizon.x509.pem diff --git a/vendor/verizon/mac_permissions.xml b/sepolicy/vendor/verizon/mac_permissions.xml index 770f40a6..770f40a6 100644 --- a/vendor/verizon/mac_permissions.xml +++ b/sepolicy/vendor/verizon/mac_permissions.xml diff --git a/vendor/verizon/obdm_app.te b/sepolicy/vendor/verizon/obdm_app.te index c1ca9a15..c1ca9a15 100644 --- a/vendor/verizon/obdm_app.te +++ b/sepolicy/vendor/verizon/obdm_app.te diff --git a/vendor/verizon/verizon.x509.pem b/sepolicy/vendor/verizon/verizon.x509.pem index a06efc24..a06efc24 100644 --- a/vendor/verizon/verizon.x509.pem +++ b/sepolicy/vendor/verizon/verizon.x509.pem diff --git a/soong/Android.bp b/soong/Android.bp new file mode 100644 index 00000000..c96c54ce --- /dev/null +++ b/soong/Android.bp @@ -0,0 +1,13 @@ +// Define the soong config module for Pixel in this Android.bp + +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + +soong_config_module_type { + name: "pixel_sensors_cc_defaults", + module_type: "cc_defaults", + config_namespace: "sensor", + bool_variables: ["enable_sensor_ssc_for_soong"], + properties: ["enabled"], +} diff --git a/soong/pixel_soong_config.mk b/soong/pixel_soong_config.mk new file mode 100644 index 00000000..49857c62 --- /dev/null +++ b/soong/pixel_soong_config.mk @@ -0,0 +1,5 @@ +# Add pixel common soong config here. +# Set the variables properly in ProductConfig Makefiles for each pixel device + +#For sensor +$(call soong_config_set,sensor,enable_sensor_ssc_for_soong,$(ENABLE_SENSOR_SSC_FOR_SOONG)) diff --git a/task_profiles.json b/task_profiles.json new file mode 100644 index 00000000..35f23642 --- /dev/null +++ b/task_profiles.json @@ -0,0 +1,141 @@ +{ + "Profiles": [ + { + "Name": "CameraServiceHighCapacity", + "Actions": [ + { + "Name": "JoinCgroup", + "Params": + { + "Controller": "cpuset", + "Path": "camera-daemon-dedicated" + } + } + ] + }, + { + "Name": "LowIoPriority", + "Actions": [ + { + "Name": "JoinCgroup", + "Params": + { + "Controller": "blkio", + "Path": "background" + } + }, + { + "Name": "SetAttribute", + "Params": + { + "Name": "CfqGroupIdle", + "Value": "0", + "Optional": "true" + } + }, + { + "Name": "SetAttribute", + "Params": + { + "Name": "CfqWeight", + "Value": "200", + "Optional": "true" + } + } + ] + }, + { + "Name": "NormalIoPriority", + "Actions": [ + { + "Name": "JoinCgroup", + "Params": + { + "Controller": "blkio", + "Path": "" + } + }, + { + "Name": "SetAttribute", + "Params": + { + "Name": "CfqGroupIdle", + "Value": "2000", + "Optional": "true" + } + }, + { + "Name": "SetAttribute", + "Params": + { + "Name": "CfqWeight", + "Value": "1000", + "Optional": "true" + } + } + ] + }, + { + "Name": "HighIoPriority", + "Actions": [ + { + "Name": "JoinCgroup", + "Params": + { + "Controller": "blkio", + "Path": "" + } + }, + { + "Name": "SetAttribute", + "Params": + { + "Name": "CfqGroupIdle", + "Value": "2000", + "Optional": "true" + } + }, + { + "Name": "SetAttribute", + "Params": + { + "Name": "CfqWeight", + "Value": "1000", + "Optional": "true" + } + } + ] + }, + { + "Name": "MaxIoPriority", + "Actions": [ + { + "Name": "JoinCgroup", + "Params": + { + "Controller": "blkio", + "Path": "" + } + }, + { + "Name": "SetAttribute", + "Params": + { + "Name": "CfqGroupIdle", + "Value": "2000", + "Optional": "true" + } + }, + { + "Name": "SetAttribute", + "Params": + { + "Name": "CfqWeight", + "Value": "1000", + "Optional": "true" + } + } + ] + } + ] +} diff --git a/ueventd.rc b/ueventd.rc new file mode 100644 index 00000000..12756c68 --- /dev/null +++ b/ueventd.rc @@ -0,0 +1,170 @@ +# +# 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. +# + +# The modem image is mounted at /vendor/firmware_mnt +firmware_directories /vendor/firmware_mnt/image/ + +# the DIAG device node is not world writable/readable. +/dev/diag 0660 system diag + +/dev/wlan 0666 system system +/dev/kgsl-3d0 0666 system system +/dev/ion 0664 system system +/dev/rtc0 0660 system system +/dev/smd7 0660 bluetooth bluetooth +/dev/ipa 0660 system radio +/dev/wwan_ioctl 0660 system radio +/dev/ipaNatTable 0660 system radio +/dev/rmnet_ctrl 0660 usb usb +/dev/dpl_ctrl 0660 usb usb +/dev/ipa_odl_ctl 0660 radio radio +/dev/ipa_adpl 0660 system oem_2905 + +#permissions for CSVT +/dev/smd11 0660 radio radio + +/dev/smdcntl8 0640 radio radio +/dev/at_usb0 0640 radio radio +/dev/at_mdm0 0640 radio radio + +/dev/video* 0660 system camera +/dev/media* 0660 system camera +/dev/v4l-subdev* 0660 system camera + +/dev/qseecom 0660 system drmrpc +/dev/qsee_ipc_irq_spss 0660 system drmrpc +/dev/smcinvoke 0660 system drmrpc +/dev/qce 0660 system drmrpc +/dev/seemplog 0660 system system +/dev/spcom 0660 system system +/dev/sp_kernel 0660 system system +/dev/sp_ssr 0660 system system +/dev/sp_keymaster 0660 system system +/dev/sec_nvm_* 0660 system system + +/dev/jpeg0 0660 system camera +/dev/adsprpc-smd 0664 system system +/dev/adsprpc-smd-secure 0644 system system + +/dev/sdsprpc-smd 0660 system system + +/dev/wcd-dsp-glink 0660 system audio +/dev/wcd_dsp0_control 0660 system audio +/dev/wcd-spi-ac-client 0660 system audio +/dev/iaxxx-odsp-celldrv 0660 system audio +/dev/tunnel0 0660 system audio + +/dev/msm_qcelp 0660 system audio +/dev/msm_evrc 0660 system audio +/dev/msm_wma 0660 system audio +/dev/msm_wmapro 0660 system audio +/dev/msm_alac 0660 system audio +/dev/msm_ape 0660 system audio +/dev/msm_amrnb 0660 system audio +/dev/msm_amrwb 0660 system audio +/dev/msm_amrwbplus 0660 system audio +/dev/msm_aac 0660 system audio +/dev/msm_mp3* 0660 system audio +/dev/msm_multi_aac 0660 system audio +/dev/msm_aac_in 0660 system audio +/dev/msm_qcelp_in 0660 system audio +/dev/msm_evrc_in 0660 system audio +/dev/msm_amrnb_in 0640 system audio +/dev/msm_a2dp_in 0660 system audio +/dev/msm_ac3 0660 system audio +/dev/msm_audio_cal 0660 system audio +/dev/msm_hweffects 0660 system audio +/dev/msm_rtac 0660 system audio +/dev/msm_cirrus_playback 0660 system audio + +/dev/i2c-5 0660 media media +/dev/avtimer 0660 system audio + +/dev/uio0 0660 system system +/dev/uio1 0660 system system + +# SSR devices +/dev/subsys_* 0640 system system + +# Ramdump devices +/dev/ramdump_* 0640 system system + +# Citadel +/dev/citadel0 0660 hsm hsm + +# Storage: for factory reset protection feature +/dev/block/platform/soc/1d84000.ufshc/by-name/frp 0660 system system + +# fuel gauge history +/dev/maxfg_history 0644 system system + +# BT +/dev/ttyMSM0 0600 bluetooth bluetooth +/dev/ttyHS0 0660 bluetooth net_bt +/dev/btpower 0660 bluetooth net_bt + +# NFC +/dev/st21nfc 0660 nfc nfc + +#eSE device +/dev/st54j_se 0660 secure_element secure_element + +# Airbrush +/dev/ab_sm 0600 vendor_airbrush vendor_airbrush + +# TPU +/dev/abc-pcie-tpu_0 0660 system system + +# Face Authentication +/dev/faceauth 0660 system system + +# IPU +/dev/ipu 0666 cameraserver camera + +# AB DRAM +/dev/ab-dram 0666 cameraserver camera + +# ABC PCIE DMA +/dev/abc-pcie-dma 0666 cameraserver camera + +# fpc fingerprint +/sys/devices/platform/soc/soc:fp_fpc* irq 0600 system system +/sys/devices/platform/soc/soc:fp_fpc* wakeup_enable 0200 system system +/sys/devices/platform/soc/soc:fp_fpc* hw_reset 0600 system system + +# logbuffer +/dev/logbuffer_tcpm 0640 system system +/dev/logbuffer_usbpd 0640 system system +/dev/logbuffer_pps 0640 system system +/dev/logbuffer_ssoc 0640 system system +/dev/logbuffer_smblib 0640 system system +/dev/logbuffer_ttf 0640 system system +/dev/logbuffer_wireless 0640 system system +/dev/logbuffer_rtx 0640 system system + +# pixelstat +/sys/devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-02/c440000.qcom,spmi:qcom,pm7250b@2:qcom,usb-pdphy@1700/usbpd0/typec/port0/port0-partner identity/id_header 0444 system system +/sys/devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-02/c440000.qcom,spmi:qcom,pm7250b@2:qcom,usb-pdphy@1700/usbpd0/typec/port0/port0-partner identity/product 0444 system system + +# Input +/sys/devices/platform/soc/a600000.ssusb/a600000.dwc3/xhci-hcd.2.auto/usb1/1-1/*/*/leds/* brightness 0660 system system +/sys/devices/platform/soc/a600000.ssusb/a600000.dwc3/xhci-hcd.2.auto/usb1/1-1/*/*/leds/* multi_intensity 0660 system system + +#KGSL +/sys/class/kgsl/kgsl-3d0 perfcounter 0660 root shell + +# socinfo +/sys/devices/soc0 serial_number 0000 root root diff --git a/utils.mk b/utils.mk new file mode 100644 index 00000000..510e2631 --- /dev/null +++ b/utils.mk @@ -0,0 +1,201 @@ +# vars for use by utils +__empty := +__space := $(__empty) $(__empty) +__colon := $(__empty):$(__empty) +__underscore := $(__empty)_$(__empty) + +# $(call match-word,w1,w2) +# checks if w1 == w2 +# How it works +# if (w1-w2 not __empty or w2-w1 not __empty) then not_match else match +# +# returns true or __empty +#$(warning :$(1): :$(2): :$(subst $(1),,$(2)):) \ +#$(warning :$(2): :$(1): :$(subst $(2),,$(1)):) \ +# +define match-word +$(strip \ + $(if $(or $(subst $(1),$(__empty),$(2)),$(subst $(2),$(__empty),$(1))),,true) \ +) +endef + +# $(call find-word-in-list,w,wlist) +# finds an exact match of word w in word list wlist +# +# How it works +# fill wlist spaces with __colon +# wrap w with __colon +# search word w in list wl, if found match m, return stripped word w +# +# returns stripped word or __empty +define find-word-in-list +$(strip \ + $(eval wl:= $(__colon)$(subst $(__space),$(__colon),$(strip $(2)))$(__colon)) \ + $(eval w:= $(__colon)$(strip $(1))$(__colon)) \ + $(eval m:= $(findstring $(w),$(wl))) \ + $(if $(m),$(1),) \ +) +endef + +# $(call match-word-in-list,w,wlist) +# does an exact match of word w in word list wlist +# How it works +# if the input word is not __empty +# return output of an exact match of word w in wordlist wlist +# else +# return __empty +# returns true or __empty +define match-word-in-list +$(strip \ + $(if $(strip $(1)), \ + $(call match-word,$(call find-word-in-list,$(1),$(2)),$(strip $(1))), \ + ) \ +) +endef + +# $(call match-prefix,p,delim,w/wlist) +# matches prefix p in wlist using delimiter delim +# +# How it works +# trim the words in wlist w +# if find-word-in-list returns not __empty +# return true +# else +# return __empty +# +define match-prefix +$(strip \ + $(eval w := $(strip $(1)$(strip $(2)))) \ + $(eval text := $(patsubst $(w)%,$(1),$(3))) \ + $(if $(call match-word-in-list,$(1),$(text)),true,) \ +) +endef + +# ---- +# The following utilities are meant for board platform specific +# featurisation + +# $(call get-vendor-board-platforms,v) +# returns list of board platforms for vendor v +define get-vendor-board-platforms +$($(1)_BOARD_PLATFORMS) +endef + +# $(call is-board-platform,bp) +# returns true or __empty +define is-board-platform +$(call match-word,$(1),$(TARGET_BOARD_PLATFORM)) +endef + +# $(call is-not-board-platform,bp) +# returns true or __empty +define is-not-board-platform +$(if $(call match-word,$(1),$(TARGET_BOARD_PLATFORM)),,true) +endef + +# $(call is-board-platform-in-list,bpl) +# returns true or __empty +define is-board-platform-in-list +$(call match-word-in-list,$(TARGET_BOARD_PLATFORM),$(1)) +endef + +# $(call is-vendor-board-platform,vendor) +# returns true or __empty +define is-vendor-board-platform +$(strip \ + $(call match-word-in-list,$(TARGET_BOARD_PLATFORM),\ + $(call get-vendor-board-platforms,$(1)) \ + ) \ +) +endef + +# $(call is-chipset-in-board-platform,chipset) +# does a prefix match of chipset in TARGET_BOARD_PLATFORM +# uses underscore as a delimiter +# +# returns true or __empty +define is-chipset-in-board-platform +$(call match-prefix,$(1),$(__underscore),$(TARGET_BOARD_PLATFORM)) +endef + +# $(call is-chipset-prefix-in-board-platform,prefix) +# does a chipset prefix match in TARGET_BOARD_PLATFORM +# assumes '_' and 'a' as the delimiter to the chipset prefix +# +# How it works +# if ($(prefix)_ or $(prefix)a match in board platform) +# return true +# else +# return __empty +# +define is-chipset-prefix-in-board-platform +$(strip \ + $(eval delim_a := $(__empty)a$(__empty)) \ + $(if \ + $(or \ + $(call match-prefix,$(1),$(delim_a),$(TARGET_BOARD_PLATFORM)), \ + $(call match-prefix,$(1),$(__underscore),$(TARGET_BOARD_PLATFORM)), \ + ), \ + true, \ + ) \ +) +endef + +#---- +# The following utilities are meant for Android Code Name +# specific featurisation +# +# refer http://source.android.com/source/build-numbers.html +# for code names and associated sdk versions +CUPCAKE_SDK_VERSIONS := 3 +DONUT_SDK_VERSIONS := 4 +ECLAIR_SDK_VERSIONS := 5 6 7 +FROYO_SDK_VERSIONS := 8 +GINGERBREAD_SDK_VERSIONS := 9 10 +HONEYCOMB_SDK_VERSIONS := 11 12 13 +ICECREAM_SANDWICH_SDK_VERSIONS := 14 15 +JELLY_BEAN_SDK_VERSIONS := 16 17 18 + +# $(call is-platform-sdk-version-at-least,version) +# version is a numeric SDK_VERSION defined above +define is-platform-sdk-version-at-least +$(strip \ + $(if $(filter 1,$(shell echo "$$(( $(PLATFORM_SDK_VERSION) >= $(1) ))" )), \ + true, \ + ) \ +) +endef + +# $(call is-android-codename,codename) +# codename is one of cupcake,donut,eclair,froyo,gingerbread,icecream +# please refer the $(codename)_SDK_VERSIONS declared above +define is-android-codename +$(strip \ + $(if \ + $(call match-word-in-list,$(PLATFORM_SDK_VERSION),$($(1)_SDK_VERSIONS)), \ + true, \ + ) \ +) +endef + +# $(call is-android-codename-in-list,cnlist) +# cnlist is combination/list of android codenames +define is-android-codename-in-list +$(strip \ + $(eval acn := $(__empty)) \ + $(foreach \ + i,$(1),\ + $(eval acn += \ + $(if \ + $(call \ + match-word-in-list,\ + $(PLATFORM_SDK_VERSION),\ + $($(i)_SDK_VERSIONS)\ + ),\ + true,\ + )\ + )\ + ) \ + $(if $(strip $(acn)),true,) \ +) +endef diff --git a/vendor.prop b/vendor.prop new file mode 100644 index 00000000..8d93f7f9 --- /dev/null +++ b/vendor.prop @@ -0,0 +1,7 @@ +# DRM +drm.service.enabled=true +media.mediadrmservice.enable=true + +# Graphics +ro.hardware.egl=adreno +ro.hardware.vulkan=adreno diff --git a/vendor/google/certs/EuiccSupportPixel.x509.pem b/vendor/google/certs/EuiccSupportPixel.x509.pem deleted file mode 100644 index d11ad3d0..00000000 --- a/vendor/google/certs/EuiccSupportPixel.x509.pem +++ /dev/null @@ -1,29 +0,0 @@ ------BEGIN CERTIFICATE-----
-MIIF2zCCA8OgAwIBAgIVAIFP2e+Gh4wn4YFsSI7fRB6AXjIsMA0GCSqGSIb3DQEBCwUAMH4xCzAJ
-BgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQw
-EgYDVQQKEwtHb29nbGUgSW5jLjEQMA4GA1UECxMHQW5kcm9pZDEaMBgGA1UEAxMRRXVpY2NTdXBw
-b3J0UGl4ZWwwHhcNMTkwMjI4MTkyMjE4WhcNNDkwMjI4MTkyMjE4WjB+MQswCQYDVQQGEwJVUzET
-MBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLR29v
-Z2xlIEluYy4xEDAOBgNVBAsTB0FuZHJvaWQxGjAYBgNVBAMTEUV1aWNjU3VwcG9ydFBpeGVsMIIC
-IjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAqklePqeltzqnyXVch9eJRXFBRQQIBIJWhcXb
-WIP/kZ28ISnQ2SrZisdxqtvRIeInxb7lU1rRQDfqCFSp/vMZ3l25Ryn6OVLFP4bxV1vO797t7Ef/
-amYA1mFKBsD4KLaIGj0/2RpGesneCOb0jWl2yRgIO2Ez7Y4YgWU/IoickZDLp1u6/7e7E/Qq9OXK
-aXvtBSzooGrYC7eyKn7O21FOfz5cQRo4BipjJqXG5Ez8Vi+m/dL1IFRZheYttEf3v390vBcb0oJ0
-oYPzLxmnb1LchjZC3yLAknRA0hNt8clvJ3tjXFjtzCGKsQsT4rnvvGFFABJTCf3EdEiwBNS5U4ho
-+9+EtH7PpuoC+uVv2rLv/Gb7stlGQGx32KmK2CfKED3PdNqoT7WRx6nvVjCk3i7afdUcxQxcS9td
-5r80CB1bQEhS2sWLWB21PJrfMugWUJO5Bwz6u0es8dP+4FAHojIaF6iwB5ZYIuHGcEaOviHm4jOK
-rrGMlLqTwuEhq2aVIP55u7XRV98JLs2hlE5DJOWCIsPxybUDiddFvR+yzi/4FimsxJlEmaQAQcki
-uJ9DceVP03StPzFJSDRlqa4yF6xkZW5piNoANQ4MyI67V2Qf8g/L1UPYAi4hUMxQGo7Clw2hBRag
-ZTm65Xc7+ovBYxl5YaXAmNoJbss34Lw8tdrn4EECAwEAAaNQME4wDAYDVR0TBAUwAwEB/zAdBgNV
-HQ4EFgQU+hQdFrOGuCDI+bbebssw9TL5FcYwHwYDVR0jBBgwFoAU+hQdFrOGuCDI+bbebssw9TL5
-FcYwDQYJKoZIhvcNAQELBQADggIBAGmyZHXddei/zUUMowiyi/MTtqXf9hKDEN4zhAXkuiuHxqA9
-Ii0J1Sxz2dd5NkqMmtePKYFSGA884yVm1KAne/uoCWj57IK3jswiRYnKhXa293DxA/K9wY27IGbp
-ulSuuxbpjjV2tqGUuoNQGKX7Oy6s0GcibyZFc+LpD7ttGk5QoLC9qQdpXZgUv/yG2B99ERSXLCaL
-EWMNP/oVZQOCQGfsFM1fPLn3X0ZuCOQg9bljxFf3jTl+H6PIAhpCjKeeUQYLc41eQkCyR/f67aRB
-GvO4YDpXLn9eH23B+26rjPyFiVtMJ/jJZ7UEPeJ3XBj1COS/X7p9gGRS5rtfr9z7XxuMxvG0JU9U
-XA+bMfOOfCqflvw6IyUg+oxjBFIhgiP4fxna51+BqpctvB0OeRwUm6y4nN06AwqtD8SteQrEn0b0
-IDWOKlVeh0lJWrDDEHr55dXSF+CbOPUDmMxmGoulOEOy/qSWIQi8BfvdX+e88CmracNRYVffLuQj
-pRYN3TeiCJd+6/X9/x1Q8VLW7vOAb6uRyE2lOjX40DYBxK3xSq6J7Vp38f6z0vtQm2sAAQ4xqqon
-A9tB5p+nJlYHgSxXOZx3C13Rs/eMmiGCKkSpCTnGCgBC7PfJDdMK6SLw5Gn4oyGoZo4fXbADuHrU
-0JD1T1qdCm3aUSEmFgEA4rOL/0K3
------END CERTIFICATE-----
diff --git a/vendor/google/certs/app.x509.pem b/vendor/google/certs/app.x509.pem deleted file mode 100644 index 8e3e6273..00000000 --- a/vendor/google/certs/app.x509.pem +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIEqDCCA5CgAwIBAgIJANWFuGx90071MA0GCSqGSIb3DQEBBAUAMIGUMQswCQYD -VQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4g -VmlldzEQMA4GA1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UE -AxMHQW5kcm9pZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTAe -Fw0wODA0MTUyMzM2NTZaFw0zNTA5MDEyMzM2NTZaMIGUMQswCQYDVQQGEwJVUzET -MBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4G -A1UEChMHQW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9p -ZDEiMCAGCSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbTCCASAwDQYJKoZI -hvcNAQEBBQADggENADCCAQgCggEBANbOLggKv+IxTdGNs8/TGFy0PTP6DHThvbbR -24kT9ixcOd9W+EaBPWW+wPPKQmsHxajtWjmQwWfna8mZuSeJS48LIgAZlKkpFeVy -xW0qMBujb8X8ETrWy550NaFtI6t9+u7hZeTfHwqNvacKhp1RbE6dBRGWynwMVX8X -W8N1+UjFaq6GCJukT4qmpN2afb8sCjUigq0GuMwYXrFVee74bQgLHWGJwPmvmLHC -69EH6kWr22ijx4OKXlSIx2xT1AsSHee70w5iDBiK4aph27yH3TxkXy9V89TDdexA -cKk/cVHYNnDBapcavl7y0RiQ4biu8ymM8Ga/nmzhRKya6G0cGw8CAQOjgfwwgfkw -HQYDVR0OBBYEFI0cxb6VTEM8YYY6FbBMvAPyT+CyMIHJBgNVHSMEgcEwgb6AFI0c -xb6VTEM8YYY6FbBMvAPyT+CyoYGapIGXMIGUMQswCQYDVQQGEwJVUzETMBEGA1UE -CBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEQMA4GA1UEChMH -QW5kcm9pZDEQMA4GA1UECxMHQW5kcm9pZDEQMA4GA1UEAxMHQW5kcm9pZDEiMCAG -CSqGSIb3DQEJARYTYW5kcm9pZEBhbmRyb2lkLmNvbYIJANWFuGx90071MAwGA1Ud -EwQFMAMBAf8wDQYJKoZIhvcNAQEEBQADggEBABnTDPEF+3iSP0wNfdIjIz1AlnrP -zgAIHVvXxunW7SBrDhEglQZBbKJEk5kT0mtKoOD1JMrSu1xuTKEBahWRbqHsXcla -XjoBADb0kkjVEJu/Lh5hgYZnOjvlba8Ld7HCKePCVePoTJBdI4fvugnL8TsgK05a -IskyY0hKI9L8KfqfGTl1lzOv2KoWD0KWwtAWPoGChZxmQ+nBli+gwYMzM1vAkP+a -ayLe0a1EQimlOalO762r0GXO0ks+UeXde2Z4e+8S/pf7pITEI/tP+MxJTALw9QUW -Ev9lKTk+jkbqxbsh8nfBUapfKqYn0eidpwq2AzVp3juYl7//fKnaPhJD9gs= ------END CERTIFICATE----- diff --git a/vendor/google/keys.conf b/vendor/google/keys.conf deleted file mode 100644 index 26cd79f5..00000000 --- a/vendor/google/keys.conf +++ /dev/null @@ -1,12 +0,0 @@ -[@GOOGLE] -ALL : device/google/redbull-sepolicy/vendor/google/certs/app.x509.pem - -[@GOOGLEPULSE] -ALL : device/google/redbull-sepolicy/vendor/google/certs/pulse-release.x509.pem - -[@MDS] -ALL : device/google/redbull-sepolicy/vendor/google/certs/com_google_mds.x509.pem - -[@EUICCSUPPORTPIXEL] -ALL : device/google/redbull-sepolicy/vendor/google/certs/EuiccSupportPixel.x509.pem - diff --git a/vendor/verizon/keys.conf b/vendor/verizon/keys.conf deleted file mode 100644 index 620be969..00000000 --- a/vendor/verizon/keys.conf +++ /dev/null @@ -1,2 +0,0 @@ -[@VERIZON] -ALL : device/google/redbull-sepolicy/vendor/verizon/verizon.x509.pem diff --git a/video_system_specs.json b/video_system_specs.json new file mode 100644 index 00000000..440a2d10 --- /dev/null +++ b/video_system_specs.json @@ -0,0 +1,8 @@ +{ + "Video": { + "Presets": { + "enc_default_bframe_count": 1, + "enc_max_mbs_per_sec": 1958400 + } + } +} diff --git a/wifi_concurrency_cfg.txt b/wifi_concurrency_cfg.txt new file mode 100644 index 00000000..fa2764c6 --- /dev/null +++ b/wifi_concurrency_cfg.txt @@ -0,0 +1,3 @@ +ENABLE_STA_SAP_CONCURRENCY:1 +SAP_INTERFACE_NAME:softap0 +SAP_CHANNEL:6 diff --git a/wpa_supplicant_overlay.conf b/wpa_supplicant_overlay.conf new file mode 100644 index 00000000..bfe358a9 --- /dev/null +++ b/wpa_supplicant_overlay.conf @@ -0,0 +1,10 @@ +disable_scan_offload=1 +p2p_disabled=1 +tdls_external_control=1 +wowlan_triggers=magic_pkt +bss_max_count=512 +interworking=1 +hs20=1 +auto_interworking=0 +driver_param=use_p2p_group_interface=1 +btm_offload=1 diff --git a/wpa_supplicant_wcn.conf b/wpa_supplicant_wcn.conf new file mode 100644 index 00000000..287954e1 --- /dev/null +++ b/wpa_supplicant_wcn.conf @@ -0,0 +1,830 @@ +##### Example wpa_supplicant configuration file ############################### +# +# This file describes configuration file format and lists all available option. +# Please also take a look at simpler configuration examples in 'examples' +# subdirectory. +# +# Empty lines and lines starting with # are ignored + +# NOTE! This file may contain password information and should probably be made +# readable only by root user on multiuser systems. + +# Note: All file paths in this configuration file should use full (absolute, +# not relative to working directory) path in order to allow working directory +# to be changed. This can happen if wpa_supplicant is run in the background. + +# Whether to allow wpa_supplicant to update (overwrite) configuration +# +# This option can be used to allow wpa_supplicant to overwrite configuration +# file whenever configuration is changed (e.g., new network block is added with +# wpa_cli or wpa_gui, or a password is changed). This is required for +# wpa_cli/wpa_gui to be able to store the configuration changes permanently. +# Please note that overwriting configuration file will remove the comments from +# it. +update_config=1 + +# global configuration (shared by all network blocks) +# +# Parameters for the control interface. If this is specified, wpa_supplicant +# will open a control interface that is available for external programs to +# manage wpa_supplicant. The meaning of this string depends on which control +# interface mechanism is used. For all cases, the existance of this parameter +# in configuration is used to determine whether the control interface is +# enabled. +# +# For UNIX domain sockets (default on Linux and BSD): This is a directory that +# will be created for UNIX domain sockets for listening to requests from +# external programs (CLI/GUI, etc.) for status information and configuration. +# The socket file will be named based on the interface name, so multiple +# wpa_supplicant processes can be run at the same time if more than one +# interface is used. +# /var/run/wpa_supplicant is the recommended directory for sockets and by +# default, wpa_cli will use it when trying to connect with wpa_supplicant. +# +# Access control for the control interface can be configured by setting the +# directory to allow only members of a group to use sockets. This way, it is +# possible to run wpa_supplicant as root (since it needs to change network +# configuration and open raw sockets) and still allow GUI/CLI components to be +# run as non-root users. However, since the control interface can be used to +# change the network configuration, this access needs to be protected in many +# cases. By default, wpa_supplicant is configured to use gid 0 (root). If you +# want to allow non-root users to use the control interface, add a new group +# and change this value to match with that group. Add users that should have +# control interface access to this group. If this variable is commented out or +# not included in the configuration file, group will not be changed from the +# value it got by default when the directory or socket was created. +# +# When configuring both the directory and group, use following format: +# DIR=/var/run/wpa_supplicant GROUP=wheel +# DIR=/var/run/wpa_supplicant GROUP=0 +# (group can be either group name or gid) +ctrl_interface=wlan0 + +# IEEE 802.1X/EAPOL version +# wpa_supplicant is implemented based on IEEE Std 802.1X-2004 which defines +# EAPOL version 2. However, there are many APs that do not handle the new +# version number correctly (they seem to drop the frames completely). In order +# to make wpa_supplicant interoperate with these APs, the version number is set +# to 1 by default. This configuration value can be used to set it to the new +# version (2). +eapol_version=1 + +# AP scanning/selection +# By default, wpa_supplicant requests driver to perform AP scanning and then +# uses the scan results to select a suitable AP. Another alternative is to +# allow the driver to take care of AP scanning and selection and use +# wpa_supplicant just to process EAPOL frames based on IEEE 802.11 association +# information from the driver. +# 1: wpa_supplicant initiates scanning and AP selection +# 0: driver takes care of scanning, AP selection, and IEEE 802.11 association +# parameters (e.g., WPA IE generation); this mode can also be used with +# non-WPA drivers when using IEEE 802.1X mode; do not try to associate with +# APs (i.e., external program needs to control association). This mode must +# also be used when using wired Ethernet drivers. +# 2: like 0, but associate with APs using security policy and SSID (but not +# BSSID); this can be used, e.g., with ndiswrapper and NDIS drivers to +# enable operation with hidden SSIDs and optimized roaming; in this mode, +# the network blocks in the configuration file are tried one by one until +# the driver reports successful association; each network block should have +# explicit security policy (i.e., only one option in the lists) for +# key_mgmt, pairwise, group, proto variables +ap_scan=1 + +# EAP fast re-authentication +# By default, fast re-authentication is enabled for all EAP methods that +# support it. This variable can be used to disable fast re-authentication. +# Normally, there is no need to disable this. +fast_reauth=1 + +#Disable the default behavior of adding a separate interface for the P2P +#group when driver support for concurrent interfaces is available. +p2p_no_group_iface=1 + +# OpenSSL Engine support +# These options can be used to load OpenSSL engines. +# The two engines that are supported currently are shown below: +# They are both from the opensc project (http://www.opensc.org/) +# By default no engines are loaded. +# make the opensc engine available +#opensc_engine_path=/usr/lib/opensc/engine_opensc.so +# make the pkcs11 engine available +#pkcs11_engine_path=/usr/lib/opensc/engine_pkcs11.so +# configure the path to the pkcs11 module required by the pkcs11 engine +#pkcs11_module_path=/usr/lib/pkcs11/opensc-pkcs11.so + +# Dynamic EAP methods +# If EAP methods were built dynamically as shared object files, they need to be +# loaded here before being used in the network blocks. By default, EAP methods +# are included statically in the build, so these lines are not needed +#load_dynamic_eap=/usr/lib/wpa_supplicant/eap_tls.so +#load_dynamic_eap=/usr/lib/wpa_supplicant/eap_md5.so + +# Driver interface parameters +# This field can be used to configure arbitrary driver interace parameters. The +# format is specific to the selected driver interface. This field is not used +# in most cases. +#driver_param="field=value" + +# Country code +# The ISO/IEC alpha2 country code for the country in which this device is +# currently operating. +#country=US + +# Maximum lifetime for PMKSA in seconds; default 43200 +#dot11RSNAConfigPMKLifetime=43200 +# Threshold for reauthentication (percentage of PMK lifetime); default 70 +#dot11RSNAConfigPMKReauthThreshold=70 +# Timeout for security association negotiation in seconds; default 60 +#dot11RSNAConfigSATimeout=60 + +# Wi-Fi Protected Setup (WPS) parameters + +# Universally Unique IDentifier (UUID; see RFC 4122) of the device +# If not configured, UUID will be generated based on the local MAC address. +#uuid=12345678-9abc-def0-1234-56789abcdef0 + +# Device Name +# User-friendly description of device; up to 32 octets encoded in UTF-8 +#device_name=Wireless Client + +# Manufacturer +# The manufacturer of the device (up to 64 ASCII characters) +#manufacturer=Company + +# Model Name +# Model of the device (up to 32 ASCII characters) +#model_name=cmodel + +# Model Number +# Additional device description (up to 32 ASCII characters) +#model_number=123 + +# Serial Number +# Serial number of the device (up to 32 characters) +#serial_number=12345 + +# Primary Device Type +# Used format: <categ>-<OUI>-<subcateg> +# categ = Category as an integer value +# OUI = OUI and type octet as a 4-octet hex-encoded value; 0050F204 for +# default WPS OUI +# subcateg = OUI-specific Sub Category as an integer value +# Examples: +# 1-0050F204-1 (Computer / PC) +# 1-0050F204-2 (Computer / Server) +# 5-0050F204-1 (Storage / NAS) +# 6-0050F204-1 (Network Infrastructure / AP) +#device_type=1-0050F204-1 + +# OS Version +# 4-octet operating system version number (hex string) +#os_version=01020300 + +# Credential processing +# 0 = process received credentials internally (default) +# 1 = do not process received credentials; just pass them over ctrl_iface to +# external program(s) +# 2 = process received credentials internally and pass them over ctrl_iface +# to external program(s) +#wps_cred_processing=0 + +# network block +# +# Each network (usually AP's sharing the same SSID) is configured as a separate +# block in this configuration file. The network blocks are in preference order +# (the first match is used). +# +# network block fields: +# +# disabled: +# 0 = this network can be used (default) +# 1 = this network block is disabled (can be enabled through ctrl_iface, +# e.g., with wpa_cli or wpa_gui) +# +# id_str: Network identifier string for external scripts. This value is passed +# to external action script through wpa_cli as WPA_ID_STR environment +# variable to make it easier to do network specific configuration. +# +# ssid: SSID (mandatory); either as an ASCII string with double quotation or +# as hex string; network name +# +# scan_ssid: +# 0 = do not scan this SSID with specific Probe Request frames (default) +# 1 = scan with SSID-specific Probe Request frames (this can be used to +# find APs that do not accept broadcast SSID or use multiple SSIDs; +# this will add latency to scanning, so enable this only when needed) +# +# bssid: BSSID (optional); if set, this network block is used only when +# associating with the AP using the configured BSSID +# +# priority: priority group (integer) +# By default, all networks will get same priority group (0). If some of the +# networks are more desirable, this field can be used to change the order in +# which wpa_supplicant goes through the networks when selecting a BSS. The +# priority groups will be iterated in decreasing priority (i.e., the larger the +# priority value, the sooner the network is matched against the scan results). +# Within each priority group, networks will be selected based on security +# policy, signal strength, etc. +# Please note that AP scanning with scan_ssid=1 and ap_scan=2 mode are not +# using this priority to select the order for scanning. Instead, they try the +# networks in the order that used in the configuration file. +# +# mode: IEEE 802.11 operation mode +# 0 = infrastructure (Managed) mode, i.e., associate with an AP (default) +# 1 = IBSS (ad-hoc, peer-to-peer) +# Note: IBSS can only be used with key_mgmt NONE (plaintext and static WEP) +# and key_mgmt=WPA-NONE (fixed group key TKIP/CCMP). In addition, ap_scan has +# to be set to 2 for IBSS. WPA-None requires following network block options: +# proto=WPA, key_mgmt=WPA-NONE, pairwise=NONE, group=TKIP (or CCMP, but not +# both), and psk must also be set. +# +# frequency: Channel frequency in megahertz (MHz) for IBSS, e.g., +# 2412 = IEEE 802.11b/g channel 1. This value is used to configure the initial +# channel for IBSS (adhoc) networks. It is ignored in the infrastructure mode. +# In addition, this value is only used by the station that creates the IBSS. If +# an IBSS network with the configured SSID is already present, the frequency of +# the network will be used instead of this configured value. +# +# proto: list of accepted protocols +# WPA = WPA/IEEE 802.11i/D3.0 +# RSN = WPA2/IEEE 802.11i (also WPA2 can be used as an alias for RSN) +# If not set, this defaults to: WPA RSN +# +# key_mgmt: list of accepted authenticated key management protocols +# WPA-PSK = WPA pre-shared key (this requires 'psk' field) +# WPA-EAP = WPA using EAP authentication +# IEEE8021X = IEEE 802.1X using EAP authentication and (optionally) dynamically +# generated WEP keys +# NONE = WPA is not used; plaintext or static WEP could be used +# WPA-PSK-SHA256 = Like WPA-PSK but using stronger SHA256-based algorithms +# WPA-EAP-SHA256 = Like WPA-EAP but using stronger SHA256-based algorithms +# If not set, this defaults to: WPA-PSK WPA-EAP +# +# auth_alg: list of allowed IEEE 802.11 authentication algorithms +# OPEN = Open System authentication (required for WPA/WPA2) +# SHARED = Shared Key authentication (requires static WEP keys) +# LEAP = LEAP/Network EAP (only used with LEAP) +# If not set, automatic selection is used (Open System with LEAP enabled if +# LEAP is allowed as one of the EAP methods). +# +# pairwise: list of accepted pairwise (unicast) ciphers for WPA +# CCMP = AES in Counter mode with CBC-MAC [RFC 3610, IEEE 802.11i/D7.0] +# TKIP = Temporal Key Integrity Protocol [IEEE 802.11i/D7.0] +# NONE = Use only Group Keys (deprecated, should not be included if APs support +# pairwise keys) +# If not set, this defaults to: CCMP TKIP +# +# group: list of accepted group (broadcast/multicast) ciphers for WPA +# CCMP = AES in Counter mode with CBC-MAC [RFC 3610, IEEE 802.11i/D7.0] +# TKIP = Temporal Key Integrity Protocol [IEEE 802.11i/D7.0] +# WEP104 = WEP (Wired Equivalent Privacy) with 104-bit key +# WEP40 = WEP (Wired Equivalent Privacy) with 40-bit key [IEEE 802.11] +# If not set, this defaults to: CCMP TKIP WEP104 WEP40 +# +# psk: WPA preshared key; 256-bit pre-shared key +# The key used in WPA-PSK mode can be entered either as 64 hex-digits, i.e., +# 32 bytes or as an ASCII passphrase (in which case, the real PSK will be +# generated using the passphrase and SSID). ASCII passphrase must be between +# 8 and 63 characters (inclusive). +# This field is not needed, if WPA-EAP is used. +# Note: Separate tool, wpa_passphrase, can be used to generate 256-bit keys +# from ASCII passphrase. This process uses lot of CPU and wpa_supplicant +# startup and reconfiguration time can be optimized by generating the PSK only +# only when the passphrase or SSID has actually changed. +# +# eapol_flags: IEEE 802.1X/EAPOL options (bit field) +# Dynamic WEP key required for non-WPA mode +# bit0 (1): require dynamically generated unicast WEP key +# bit1 (2): require dynamically generated broadcast WEP key +# (3 = require both keys; default) +# Note: When using wired authentication, eapol_flags must be set to 0 for the +# authentication to be completed successfully. +# +# mixed_cell: This option can be used to configure whether so called mixed +# cells, i.e., networks that use both plaintext and encryption in the same +# SSID, are allowed when selecting a BSS form scan results. +# 0 = disabled (default) +# 1 = enabled +# +# proactive_key_caching: +# Enable/disable opportunistic PMKSA caching for WPA2. +# 0 = disabled (default) +# 1 = enabled +# +# wep_key0..3: Static WEP key (ASCII in double quotation, e.g. "abcde" or +# hex without quotation, e.g., 0102030405) +# wep_tx_keyidx: Default WEP key index (TX) (0..3) +# +# peerkey: Whether PeerKey negotiation for direct links (IEEE 802.11e DLS) is +# allowed. This is only used with RSN/WPA2. +# 0 = disabled (default) +# 1 = enabled +#peerkey=1 +# +# wpa_ptk_rekey: Maximum lifetime for PTK in seconds. This can be used to +# enforce rekeying of PTK to mitigate some attacks against TKIP deficiencies. +# +# Following fields are only used with internal EAP implementation. +# eap: space-separated list of accepted EAP methods +# MD5 = EAP-MD5 (unsecure and does not generate keying material -> +# cannot be used with WPA; to be used as a Phase 2 method +# with EAP-PEAP or EAP-TTLS) +# MSCHAPV2 = EAP-MSCHAPv2 (cannot be used separately with WPA; to be used +# as a Phase 2 method with EAP-PEAP or EAP-TTLS) +# OTP = EAP-OTP (cannot be used separately with WPA; to be used +# as a Phase 2 method with EAP-PEAP or EAP-TTLS) +# GTC = EAP-GTC (cannot be used separately with WPA; to be used +# as a Phase 2 method with EAP-PEAP or EAP-TTLS) +# TLS = EAP-TLS (client and server certificate) +# PEAP = EAP-PEAP (with tunnelled EAP authentication) +# TTLS = EAP-TTLS (with tunnelled EAP or PAP/CHAP/MSCHAP/MSCHAPV2 +# authentication) +# If not set, all compiled in methods are allowed. +# +# identity: Identity string for EAP +# This field is also used to configure user NAI for +# EAP-PSK/PAX/SAKE/GPSK. +# anonymous_identity: Anonymous identity string for EAP (to be used as the +# unencrypted identity with EAP types that support different tunnelled +# identity, e.g., EAP-TTLS) +# password: Password string for EAP. This field can include either the +# plaintext password (using ASCII or hex string) or a NtPasswordHash +# (16-byte MD4 hash of password) in hash:<32 hex digits> format. +# NtPasswordHash can only be used when the password is for MSCHAPv2 or +# MSCHAP (EAP-MSCHAPv2, EAP-TTLS/MSCHAPv2, EAP-TTLS/MSCHAP, LEAP). +# EAP-PSK (128-bit PSK), EAP-PAX (128-bit PSK), and EAP-SAKE (256-bit +# PSK) is also configured using this field. For EAP-GPSK, this is a +# variable length PSK. +# ca_cert: File path to CA certificate file (PEM/DER). This file can have one +# or more trusted CA certificates. If ca_cert and ca_path are not +# included, server certificate will not be verified. This is insecure and +# a trusted CA certificate should always be configured when using +# EAP-TLS/TTLS/PEAP. Full path should be used since working directory may +# change when wpa_supplicant is run in the background. +# On Windows, trusted CA certificates can be loaded from the system +# certificate store by setting this to cert_store://<name>, e.g., +# ca_cert="cert_store://CA" or ca_cert="cert_store://ROOT". +# Note that when running wpa_supplicant as an application, the user +# certificate store (My user account) is used, whereas computer store +# (Computer account) is used when running wpasvc as a service. +# ca_path: Directory path for CA certificate files (PEM). This path may +# contain multiple CA certificates in OpenSSL format. Common use for this +# is to point to system trusted CA list which is often installed into +# directory like /etc/ssl/certs. If configured, these certificates are +# added to the list of trusted CAs. ca_cert may also be included in that +# case, but it is not required. +# client_cert: File path to client certificate file (PEM/DER) +# Full path should be used since working directory may change when +# wpa_supplicant is run in the background. +# Alternatively, a named configuration blob can be used by setting this +# to blob://<blob name>. +# private_key: File path to client private key file (PEM/DER/PFX) +# When PKCS#12/PFX file (.p12/.pfx) is used, client_cert should be +# commented out. Both the private key and certificate will be read from +# the PKCS#12 file in this case. Full path should be used since working +# directory may change when wpa_supplicant is run in the background. +# Windows certificate store can be used by leaving client_cert out and +# configuring private_key in one of the following formats: +# cert://substring_to_match +# hash://certificate_thumbprint_in_hex +# for example: private_key="hash://63093aa9c47f56ae88334c7b65a4" +# Note that when running wpa_supplicant as an application, the user +# certificate store (My user account) is used, whereas computer store +# (Computer account) is used when running wpasvc as a service. +# Alternatively, a named configuration blob can be used by setting this +# to blob://<blob name>. +# private_key_passwd: Password for private key file (if left out, this will be +# asked through control interface) +# dh_file: File path to DH/DSA parameters file (in PEM format) +# This is an optional configuration file for setting parameters for an +# ephemeral DH key exchange. In most cases, the default RSA +# authentication does not use this configuration. However, it is possible +# setup RSA to use ephemeral DH key exchange. In addition, ciphers with +# DSA keys always use ephemeral DH keys. This can be used to achieve +# forward secrecy. If the file is in DSA parameters format, it will be +# automatically converted into DH params. +# subject_match: Substring to be matched against the subject of the +# authentication server certificate. If this string is set, the server +# sertificate is only accepted if it contains this string in the subject. +# The subject string is in following format: +# /C=US/ST=CA/L=San Francisco/CN=Test AS/emailAddress=as@example.com +# altsubject_match: Semicolon separated string of entries to be matched against +# the alternative subject name of the authentication server certificate. +# If this string is set, the server sertificate is only accepted if it +# contains one of the entries in an alternative subject name extension. +# altSubjectName string is in following format: TYPE:VALUE +# Example: EMAIL:server@example.com +# Example: DNS:server.example.com;DNS:server2.example.com +# Following types are supported: EMAIL, DNS, URI +# phase1: Phase1 (outer authentication, i.e., TLS tunnel) parameters +# (string with field-value pairs, e.g., "peapver=0" or +# "peapver=1 peaplabel=1") +# 'peapver' can be used to force which PEAP version (0 or 1) is used. +# 'peaplabel=1' can be used to force new label, "client PEAP encryption", +# to be used during key derivation when PEAPv1 or newer. Most existing +# PEAPv1 implementation seem to be using the old label, "client EAP +# encryption", and wpa_supplicant is now using that as the default value. +# Some servers, e.g., Radiator, may require peaplabel=1 configuration to +# interoperate with PEAPv1; see eap_testing.txt for more details. +# 'peap_outer_success=0' can be used to terminate PEAP authentication on +# tunneled EAP-Success. This is required with some RADIUS servers that +# implement draft-josefsson-pppext-eap-tls-eap-05.txt (e.g., +# Lucent NavisRadius v4.4.0 with PEAP in "IETF Draft 5" mode) +# include_tls_length=1 can be used to force wpa_supplicant to include +# TLS Message Length field in all TLS messages even if they are not +# fragmented. +# sim_min_num_chal=3 can be used to configure EAP-SIM to require three +# challenges (by default, it accepts 2 or 3) +# result_ind=1 can be used to enable EAP-SIM and EAP-AKA to use +# protected result indication. +# 'crypto_binding' option can be used to control PEAPv0 cryptobinding +# behavior: +# * 0 = do not use cryptobinding (default) +# * 1 = use cryptobinding if server supports it +# * 2 = require cryptobinding +# EAP-WSC (WPS) uses following options: pin=<Device Password> or +# pbc=1. +# phase2: Phase2 (inner authentication with TLS tunnel) parameters +# (string with field-value pairs, e.g., "auth=MSCHAPV2" for EAP-PEAP or +# "autheap=MSCHAPV2 autheap=MD5" for EAP-TTLS) +# Following certificate/private key fields are used in inner Phase2 +# authentication when using EAP-TTLS or EAP-PEAP. +# ca_cert2: File path to CA certificate file. This file can have one or more +# trusted CA certificates. If ca_cert2 and ca_path2 are not included, +# server certificate will not be verified. This is insecure and a trusted +# CA certificate should always be configured. +# ca_path2: Directory path for CA certificate files (PEM) +# client_cert2: File path to client certificate file +# private_key2: File path to client private key file +# private_key2_passwd: Password for private key file +# dh_file2: File path to DH/DSA parameters file (in PEM format) +# subject_match2: Substring to be matched against the subject of the +# authentication server certificate. +# altsubject_match2: Substring to be matched against the alternative subject +# name of the authentication server certificate. +# +# fragment_size: Maximum EAP fragment size in bytes (default 1398). +# This value limits the fragment size for EAP methods that support +# fragmentation (e.g., EAP-TLS and EAP-PEAP). This value should be set +# small enough to make the EAP messages fit in MTU of the network +# interface used for EAPOL. The default value is suitable for most +# cases. +# +# EAP-FAST variables: +# pac_file: File path for the PAC entries. wpa_supplicant will need to be able +# to create this file and write updates to it when PAC is being +# provisioned or refreshed. Full path to the file should be used since +# working directory may change when wpa_supplicant is run in the +# background. Alternatively, a named configuration blob can be used by +# setting this to blob://<blob name> +# phase1: fast_provisioning option can be used to enable in-line provisioning +# of EAP-FAST credentials (PAC): +# 0 = disabled, +# 1 = allow unauthenticated provisioning, +# 2 = allow authenticated provisioning, +# 3 = allow both unauthenticated and authenticated provisioning +# fast_max_pac_list_len=<num> option can be used to set the maximum +# number of PAC entries to store in a PAC list (default: 10) +# fast_pac_format=binary option can be used to select binary format for +# storing PAC entries in order to save some space (the default +# text format uses about 2.5 times the size of minimal binary +# format) +# +# wpa_supplicant supports number of "EAP workarounds" to work around +# interoperability issues with incorrectly behaving authentication servers. +# These are enabled by default because some of the issues are present in large +# number of authentication servers. Strict EAP conformance mode can be +# configured by disabling workarounds with eap_workaround=0. + +# Example blocks: + +# Simple case: WPA-PSK, PSK as an ASCII passphrase, allow all valid ciphers +#network={ +# ssid="simple" +# psk="very secret passphrase" +# priority=5 +#} +# +## Same as previous, but request SSID-specific scanning (for APs that reject +## broadcast SSID) +#network={ +# ssid="second ssid" +# scan_ssid=1 +# psk="very secret passphrase" +# priority=2 +#} +# +## Only WPA-PSK is used. Any valid cipher combination is accepted. +#network={ +# ssid="example" +# proto=WPA +# key_mgmt=WPA-PSK +# pairwise=CCMP TKIP +# group=CCMP TKIP WEP104 WEP40 +# psk=06b4be19da289f475aa46a33cb793029d4ab3db7a23ee92382eb0106c72ac7bb +# priority=2 +#} +# +## WPA-Personal(PSK) with TKIP and enforcement for frequent PTK rekeying +#network={ +# ssid="example" +# proto=WPA +# key_mgmt=WPA-PSK +# pairwise=TKIP +# group=TKIP +# psk="not so secure passphrase" +# wpa_ptk_rekey=600 +#} +# +## Only WPA-EAP is used. Both CCMP and TKIP is accepted. An AP that used WEP104 +## or WEP40 as the group cipher will not be accepted. +#network={ +# ssid="example" +# proto=RSN +# key_mgmt=WPA-EAP +# pairwise=CCMP TKIP +# group=CCMP TKIP +# eap=TLS +# identity="user@example.com" +# ca_cert="/etc/cert/ca.pem" +# client_cert="/etc/cert/user.pem" +# private_key="/etc/cert/user.prv" +# private_key_passwd="password" +# priority=1 +#} +# +## EAP-PEAP/MSCHAPv2 configuration for RADIUS servers that use the new peaplabel +## (e.g., Radiator) +#network={ +# ssid="example" +# key_mgmt=WPA-EAP +# eap=PEAP +# identity="user@example.com" +# password="foobar" +# ca_cert="/etc/cert/ca.pem" +# phase1="peaplabel=1" +# phase2="auth=MSCHAPV2" +# priority=10 +#} +# +## EAP-TTLS/EAP-MD5-Challenge configuration with anonymous identity for the +## unencrypted use. Real identity is sent only within an encrypted TLS tunnel. +#network={ +# ssid="example" +# key_mgmt=WPA-EAP +# eap=TTLS +# identity="user@example.com" +# anonymous_identity="anonymous@example.com" +# password="foobar" +# ca_cert="/etc/cert/ca.pem" +# priority=2 +#} +# +## EAP-TTLS/MSCHAPv2 configuration with anonymous identity for the unencrypted +## use. Real identity is sent only within an encrypted TLS tunnel. +#network={ +# ssid="example" +# key_mgmt=WPA-EAP +# eap=TTLS +# identity="user@example.com" +# anonymous_identity="anonymous@example.com" +# password="foobar" +# ca_cert="/etc/cert/ca.pem" +# phase2="auth=MSCHAPV2" +#} +# +## WPA-EAP, EAP-TTLS with different CA certificate used for outer and inner +## authentication. +#network={ +# ssid="example" +# key_mgmt=WPA-EAP +# eap=TTLS +# # Phase1 / outer authentication +# anonymous_identity="anonymous@example.com" +# ca_cert="/etc/cert/ca.pem" +# # Phase 2 / inner authentication +# phase2="autheap=TLS" +# ca_cert2="/etc/cert/ca2.pem" +# client_cert2="/etc/cer/user.pem" +# private_key2="/etc/cer/user.prv" +# private_key2_passwd="password" +# priority=2 +#} +# +## Both WPA-PSK and WPA-EAP is accepted. Only CCMP is accepted as pairwise and +## group cipher. +#network={ +# ssid="example" +# bssid=00:11:22:33:44:55 +# proto=WPA RSN +# key_mgmt=WPA-PSK WPA-EAP +# pairwise=CCMP +# group=CCMP +# psk=06b4be19da289f475aa46a33cb793029d4ab3db7a23ee92382eb0106c72ac7bb +#} +# +## Special characters in SSID, so use hex string. Default to WPA-PSK, WPA-EAP +## and all valid ciphers. +#network={ +# ssid=00010203 +# psk=000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f +#} +# +# +## EAP-SIM with a GSM SIM or USIM +#network={ +# ssid="eap-sim-test" +# key_mgmt=WPA-EAP +# eap=SIM +# pin="1234" +# pcsc="" +#} +# +# +## EAP-PSK +#network={ +# ssid="eap-psk-test" +# key_mgmt=WPA-EAP +# eap=PSK +# anonymous_identity="eap_psk_user" +# password=06b4be19da289f475aa46a33cb793029 +# identity="eap_psk_user@example.com" +#} +# +# +## IEEE 802.1X/EAPOL with dynamically generated WEP keys (i.e., no WPA) using +## EAP-TLS for authentication and key generation; require both unicast and +## broadcast WEP keys. +#network={ +# ssid="1x-test" +# key_mgmt=IEEE8021X +# eap=TLS +# identity="user@example.com" +# ca_cert="/etc/cert/ca.pem" +# client_cert="/etc/cert/user.pem" +# private_key="/etc/cert/user.prv" +# private_key_passwd="password" +# eapol_flags=3 +#} +# +# +## LEAP with dynamic WEP keys +#network={ +# ssid="leap-example" +# key_mgmt=IEEE8021X +# eap=LEAP +# identity="user" +# password="foobar" +#} +# +## EAP-IKEv2 using shared secrets for both server and peer authentication +#network={ +# ssid="ikev2-example" +# key_mgmt=WPA-EAP +# eap=IKEV2 +# identity="user" +# password="foobar" +#} +# +## EAP-FAST with WPA (WPA or WPA2) +#network={ +# ssid="eap-fast-test" +# key_mgmt=WPA-EAP +# eap=FAST +# anonymous_identity="FAST-000102030405" +# identity="username" +# password="password" +# phase1="fast_provisioning=1" +# pac_file="/etc/wpa_supplicant.eap-fast-pac" +#} +# +#network={ +# ssid="eap-fast-test" +# key_mgmt=WPA-EAP +# eap=FAST +# anonymous_identity="FAST-000102030405" +# identity="username" +# password="password" +# phase1="fast_provisioning=1" +# pac_file="blob://eap-fast-pac" +#} +# +## Plaintext connection (no WPA, no IEEE 802.1X) +#network={ +# ssid="plaintext-test" +# key_mgmt=NONE +#} +# +# +## Shared WEP key connection (no WPA, no IEEE 802.1X) +#network={ +# ssid="static-wep-test" +# key_mgmt=NONE +# wep_key0="abcde" +# wep_key1=0102030405 +# wep_key2="1234567890123" +# wep_tx_keyidx=0 +# priority=5 +#} +# +# +## Shared WEP key connection (no WPA, no IEEE 802.1X) using Shared Key +## IEEE 802.11 authentication +#network={ +# ssid="static-wep-test2" +# key_mgmt=NONE +# wep_key0="abcde" +# wep_key1=0102030405 +# wep_key2="1234567890123" +# wep_tx_keyidx=0 +# priority=5 +# auth_alg=SHARED +#} +# +# +## IBSS/ad-hoc network with WPA-None/TKIP. +#network={ +# ssid="test adhoc" +# mode=1 +# frequency=2412 +# proto=WPA +# key_mgmt=WPA-NONE +# pairwise=NONE +# group=TKIP +# psk="secret passphrase" +#} +# +# +## Catch all example that allows more or less all configuration modes +#network={ +# ssid="example" +# scan_ssid=1 +# key_mgmt=WPA-EAP WPA-PSK IEEE8021X NONE +# pairwise=CCMP TKIP +# group=CCMP TKIP WEP104 WEP40 +# psk="very secret passphrase" +# eap=TTLS PEAP TLS +# identity="user@example.com" +# password="foobar" +# ca_cert="/etc/cert/ca.pem" +# client_cert="/etc/cert/user.pem" +# private_key="/etc/cert/user.prv" +# private_key_passwd="password" +# phase1="peaplabel=0" +#} +# +## Example of EAP-TLS with smartcard (openssl engine) +#network={ +# ssid="example" +# key_mgmt=WPA-EAP +# eap=TLS +# proto=RSN +# pairwise=CCMP TKIP +# group=CCMP TKIP +# identity="user@example.com" +# ca_cert="/etc/cert/ca.pem" +# client_cert="/etc/cert/user.pem" +# +# engine=1 +# +# # The engine configured here must be available. Look at +# # OpenSSL engine support in the global section. +# # The key available through the engine must be the private key +# # matching the client certificate configured above. +# +# # use the opensc engine +# #engine_id="opensc" +# #key_id="45" +# +# # use the pkcs11 engine +# engine_id="pkcs11" +# key_id="id_45" +# +# # Optional PIN configuration; this can be left out and PIN will be +# # asked through the control interface +# pin="1234" +#} +# +## Example configuration showing how to use an inlined blob as a CA certificate +## data instead of using external file +#network={ +# ssid="example" +# key_mgmt=WPA-EAP +# eap=TTLS +# identity="user@example.com" +# anonymous_identity="anonymous@example.com" +# password="foobar" +# ca_cert="blob://exampleblob" +# priority=20 +#} +# +#blob-base64-exampleblob={ +#SGVsbG8gV29ybGQhCg== +#} + + +# Wildcard match for SSID (plaintext APs only). This example select any +# open AP regardless of its SSID. +#network={ +# key_mgmt=NONE +#} |
