From 8710a52d679e294041ad943e4d6d53d2d0b2f0ad Mon Sep 17 00:00:00 2001 From: Vincent Vidal Date: Thu, 7 Aug 2025 16:07:57 +0200 Subject: [PATCH] init --- Android.bp | 9 + AndroidProducts.mk | 8 + BoardConfig.mk | 212 + compatibility_matrix.xml | 2 + configs/audio/audio_effects.xml | 109 + configs/audio/audio_policy_configuration.xml | 320 ++ configs/media/media_codecs_c2.xml | 161 + configs/media/media_codecs_performance.xml | 131 + configs/media/media_profiles_V1_0.xml | 1679 ++++++ configs/nfc/libnfc-nci.conf | 90 + .../privapp-permissions-com.mediatek.ims.xml | 13 + configs/powerhint.json | 402 ++ configs/thermal.conf | 28 + configs/wifi/p2p_supplicant_overlay.conf | 6 + configs/wifi/wpa_supplicant.conf | 16 + configs/wifi/wpa_supplicant_overlay.conf | 5 + device.mk | 327 ++ extract-files.py | 144 + framework_compatibility_matrix.xml | 909 ++++ init/Android.bp | 96 + init/fstab.mt6835 | 101 + init/init.cgroup.rc | 48 + init/init.connectivity.common.rc | 83 + init/init.connectivity.rc | 4 + init/init.modem.rc | 42 + init/init.mt6835.power.rc | 60 + init/init.mt6835.rc | 1173 +++++ init/init.mt6835.usb.rc | 957 ++++ init/init.mtkgki.rc | 11 + init/init.project.rc | 66 + init/init.recovery.mt6835.rc | 27 + init/init.sensor_2_0.rc | 11 + init/init_connectivity.rc | 46 + init/ueventd.rc | 209 + libfmjni/Android.bp | 42 + libfmjni/NOTICE | 185 + libfmjni/README | 25 + libfmjni/common.cpp | 968 ++++ libfmjni/custom.cpp | 263 + libfmjni/fm.h | 547 ++ libfmjni/fmlib_cust.h | 66 + libfmjni/fmr.h | 276 + libfmjni/fmr_core.cpp | 1264 +++++ libfmjni/fmr_err.cpp | 45 + libfmjni/libfm_jni.cpp | 806 +++ lineage.dependencies | 10 + lineage_brax3.mk | 28 + manifest.xml | 220 + .../app/src/main/res/values/config.xml | 9 + overlay/CarrierConfigResOverlay/Android.bp | 10 + .../AndroidManifest.xml | 13 + .../res/xml/vendor.xml | 4501 +++++++++++++++++ overlay/DialerResOverlay/Android.bp | 9 + overlay/DialerResOverlay/AndroidManifest.xml | 13 + .../DialerResOverlay/res/values/config.xml | 9 + overlay/FrameworksResOverlay/Android.bp | 10 + .../FrameworksResOverlay/AndroidManifest.xml | 13 + .../power/res/xml/irq_device_map.xml | 59 + .../power/res/xml/power_profile.xml | 232 + .../res/values/arrays.xml | 24 + .../res/values/config.xml | 285 ++ overlay/SettingsProviderResOverlay/Android.bp | 9 + .../AndroidManifest.xml | 13 + .../res/values/defaults.xml | 11 + overlay/SettingsResOverlay/Android.bp | 9 + .../SettingsResOverlay/AndroidManifest.xml | 13 + .../SettingsResOverlay/res/values/config.xml | 9 + overlay/SystemUIResOverlay/Android.bp | 9 + .../SystemUIResOverlay/AndroidManifest.xml | 13 + .../SystemUIResOverlay/res/values/config.xml | 9 + overlay/TelephonyResOverlay/Android.bp | 9 + .../TelephonyResOverlay/AndroidManifest.xml | 13 + .../TelephonyResOverlay/res/values/config.xml | 12 + overlay/TetheringResOverlay/Android.bp | 9 + .../TetheringResOverlay/AndroidManifest.xml | 14 + .../TetheringResOverlay/res/values/config.xml | 13 + overlay/WifiResOverlay/Android.bp | 9 + overlay/WifiResOverlay/AndroidManifest.xml | 14 + overlay/WifiResOverlay/res/values/config.xml | 83 + proprietary-files.txt | 1368 +++++ proprietary-firmware.txt | 14 + sepolicy/vendor/cameraserver.te | 1 + sepolicy/vendor/ccci_mdinit.te | 1 + sepolicy/vendor/ccci_rpcd.te | 1 + sepolicy/vendor/device.te | 4 + sepolicy/vendor/file.te | 5 + sepolicy/vendor/file_contexts | 29 + sepolicy/vendor/fsck.te | 1 + sepolicy/vendor/fuelgauged_nvram.te | 2 + sepolicy/vendor/genfs_contexts | 62 + sepolicy/vendor/hal_fingerprint_default.te | 34 + sepolicy/vendor/hal_graphics_allocator.te | 1 + .../vendor/hal_graphics_allocator_default.te | 1 + .../vendor/hal_graphics_composer_default.te | 4 + sepolicy/vendor/hal_lineage_health_default.te | 1 + sepolicy/vendor/hal_mtk_pq.te | 1 + sepolicy/vendor/hwservice_contexts | 2 + sepolicy/vendor/init.te | 1 + sepolicy/vendor/ioctl_defines | 2 + sepolicy/vendor/mediaswcodec.te | 2 + sepolicy/vendor/mnld.te | 5 + sepolicy/vendor/mtk_hal_camera.te | 1 + sepolicy/vendor/mtk_hal_power.te | 20 + sepolicy/vendor/mtk_hal_pq.te | 6 + sepolicy/vendor/mtk_hal_videotelephony.te | 1 + sepolicy/vendor/nvram_daemon.te | 1 + sepolicy/vendor/property.te | 15 + sepolicy/vendor/property_contexts | 31 + sepolicy/vendor/service.te | 2 + sepolicy/vendor/service_contexts | 3 + sepolicy/vendor/surfaceflinger.te | 5 + sepolicy/vendor/system_app.te | 4 + sepolicy/vendor/system_server.te | 3 + sepolicy/vendor/thermal_core.te | 1 + sepolicy/vendor/touch_boost.te | 13 + sepolicy/vendor/update_engine.te | 6 + sepolicy/vendor/vendor_init.te | 6 + sepolicy/vendor/vndservice_contexts | 3 + sepolicy/vendor/vtservice.te | 1 + setup-makefiles.py | 1 + system.prop | 37 + vendor.prop | 339 ++ vendor_logtag.mk | 258 + 123 files changed, 20007 insertions(+) create mode 100644 Android.bp create mode 100644 AndroidProducts.mk create mode 100644 BoardConfig.mk create mode 100644 compatibility_matrix.xml create mode 100644 configs/audio/audio_effects.xml create mode 100644 configs/audio/audio_policy_configuration.xml create mode 100644 configs/media/media_codecs_c2.xml create mode 100644 configs/media/media_codecs_performance.xml create mode 100644 configs/media/media_profiles_V1_0.xml create mode 100644 configs/nfc/libnfc-nci.conf create mode 100644 configs/permissions/privapp-permissions-com.mediatek.ims.xml create mode 100644 configs/powerhint.json create mode 100644 configs/thermal.conf create mode 100644 configs/wifi/p2p_supplicant_overlay.conf create mode 100644 configs/wifi/wpa_supplicant.conf create mode 100644 configs/wifi/wpa_supplicant_overlay.conf create mode 100644 device.mk create mode 100755 extract-files.py create mode 100644 framework_compatibility_matrix.xml create mode 100644 init/Android.bp create mode 100644 init/fstab.mt6835 create mode 100644 init/init.cgroup.rc create mode 100644 init/init.connectivity.common.rc create mode 100644 init/init.connectivity.rc create mode 100644 init/init.modem.rc create mode 100644 init/init.mt6835.power.rc create mode 100644 init/init.mt6835.rc create mode 100644 init/init.mt6835.usb.rc create mode 100644 init/init.mtkgki.rc create mode 100644 init/init.project.rc create mode 100644 init/init.recovery.mt6835.rc create mode 100644 init/init.sensor_2_0.rc create mode 100644 init/init_connectivity.rc create mode 100644 init/ueventd.rc create mode 100644 libfmjni/Android.bp create mode 100644 libfmjni/NOTICE create mode 100644 libfmjni/README create mode 100755 libfmjni/common.cpp create mode 100644 libfmjni/custom.cpp create mode 100755 libfmjni/fm.h create mode 100644 libfmjni/fmlib_cust.h create mode 100755 libfmjni/fmr.h create mode 100755 libfmjni/fmr_core.cpp create mode 100755 libfmjni/fmr_err.cpp create mode 100755 libfmjni/libfm_jni.cpp create mode 100644 lineage.dependencies create mode 100644 lineage_brax3.mk create mode 100644 manifest.xml create mode 100644 overlay-lineage/packages/apps/Aperture/app/src/main/res/values/config.xml create mode 100644 overlay/CarrierConfigResOverlay/Android.bp create mode 100644 overlay/CarrierConfigResOverlay/AndroidManifest.xml create mode 100644 overlay/CarrierConfigResOverlay/res/xml/vendor.xml create mode 100644 overlay/DialerResOverlay/Android.bp create mode 100644 overlay/DialerResOverlay/AndroidManifest.xml create mode 100644 overlay/DialerResOverlay/res/values/config.xml create mode 100644 overlay/FrameworksResOverlay/Android.bp create mode 100644 overlay/FrameworksResOverlay/AndroidManifest.xml create mode 100644 overlay/FrameworksResOverlay/power/res/xml/irq_device_map.xml create mode 100755 overlay/FrameworksResOverlay/power/res/xml/power_profile.xml create mode 100644 overlay/FrameworksResOverlay/res/values/arrays.xml create mode 100644 overlay/FrameworksResOverlay/res/values/config.xml create mode 100644 overlay/SettingsProviderResOverlay/Android.bp create mode 100644 overlay/SettingsProviderResOverlay/AndroidManifest.xml create mode 100644 overlay/SettingsProviderResOverlay/res/values/defaults.xml create mode 100644 overlay/SettingsResOverlay/Android.bp create mode 100644 overlay/SettingsResOverlay/AndroidManifest.xml create mode 100644 overlay/SettingsResOverlay/res/values/config.xml create mode 100644 overlay/SystemUIResOverlay/Android.bp create mode 100644 overlay/SystemUIResOverlay/AndroidManifest.xml create mode 100644 overlay/SystemUIResOverlay/res/values/config.xml create mode 100644 overlay/TelephonyResOverlay/Android.bp create mode 100644 overlay/TelephonyResOverlay/AndroidManifest.xml create mode 100644 overlay/TelephonyResOverlay/res/values/config.xml create mode 100644 overlay/TetheringResOverlay/Android.bp create mode 100644 overlay/TetheringResOverlay/AndroidManifest.xml create mode 100644 overlay/TetheringResOverlay/res/values/config.xml create mode 100644 overlay/WifiResOverlay/Android.bp create mode 100644 overlay/WifiResOverlay/AndroidManifest.xml create mode 100644 overlay/WifiResOverlay/res/values/config.xml create mode 100644 proprietary-files.txt create mode 100644 proprietary-firmware.txt create mode 100644 sepolicy/vendor/cameraserver.te create mode 100644 sepolicy/vendor/ccci_mdinit.te create mode 100644 sepolicy/vendor/ccci_rpcd.te create mode 100644 sepolicy/vendor/device.te create mode 100644 sepolicy/vendor/file.te create mode 100644 sepolicy/vendor/file_contexts create mode 100644 sepolicy/vendor/fsck.te create mode 100644 sepolicy/vendor/fuelgauged_nvram.te create mode 100644 sepolicy/vendor/genfs_contexts create mode 100644 sepolicy/vendor/hal_fingerprint_default.te create mode 100644 sepolicy/vendor/hal_graphics_allocator.te create mode 100644 sepolicy/vendor/hal_graphics_allocator_default.te create mode 100644 sepolicy/vendor/hal_graphics_composer_default.te create mode 100644 sepolicy/vendor/hal_lineage_health_default.te create mode 100644 sepolicy/vendor/hal_mtk_pq.te create mode 100644 sepolicy/vendor/hwservice_contexts create mode 100644 sepolicy/vendor/init.te create mode 100644 sepolicy/vendor/ioctl_defines create mode 100644 sepolicy/vendor/mediaswcodec.te create mode 100644 sepolicy/vendor/mnld.te create mode 100644 sepolicy/vendor/mtk_hal_camera.te create mode 100644 sepolicy/vendor/mtk_hal_power.te create mode 100644 sepolicy/vendor/mtk_hal_pq.te create mode 100644 sepolicy/vendor/mtk_hal_videotelephony.te create mode 100644 sepolicy/vendor/nvram_daemon.te create mode 100644 sepolicy/vendor/property.te create mode 100644 sepolicy/vendor/property_contexts create mode 100644 sepolicy/vendor/service.te create mode 100644 sepolicy/vendor/service_contexts create mode 100644 sepolicy/vendor/surfaceflinger.te create mode 100644 sepolicy/vendor/system_app.te create mode 100644 sepolicy/vendor/system_server.te create mode 100644 sepolicy/vendor/thermal_core.te create mode 100644 sepolicy/vendor/touch_boost.te create mode 100644 sepolicy/vendor/update_engine.te create mode 100644 sepolicy/vendor/vendor_init.te create mode 100644 sepolicy/vendor/vndservice_contexts create mode 100644 sepolicy/vendor/vtservice.te create mode 100644 setup-makefiles.py create mode 100644 system.prop create mode 100644 vendor.prop create mode 100644 vendor_logtag.mk diff --git a/Android.bp b/Android.bp new file mode 100644 index 0000000..e991371 --- /dev/null +++ b/Android.bp @@ -0,0 +1,9 @@ +soong_namespace { +} + +install_symlink { + name: "nvcfg_mdota.ini_symlink", + vendor: true, + installed_location: "etc/mdota", + symlink_target: "/mnt/vendor/mdota", +} diff --git a/AndroidProducts.mk b/AndroidProducts.mk new file mode 100644 index 0000000..bcefcce --- /dev/null +++ b/AndroidProducts.mk @@ -0,0 +1,8 @@ +# +# Copyright (C) 2023 The LineageOS Project +# +# SPDX-License-Identifier: Apache-2.0 +# + +PRODUCT_MAKEFILES := \ + $(LOCAL_DIR)/lineage_brax3.mk diff --git a/BoardConfig.mk b/BoardConfig.mk new file mode 100644 index 0000000..07667e6 --- /dev/null +++ b/BoardConfig.mk @@ -0,0 +1,212 @@ +DEVICE_PATH := device/brax/brax3 +KEYS_PATH := vendor/lineage-priv/keys +TARGET_KERNEL_PATH := device/brax/brax3-kernel +BUILD_BROKEN_DUP_RULES := true + +# A/B +AB_OTA_UPDATER := true +BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT := true +BOARD_USES_RECOVERY_AS_BOOT := +TARGET_NO_RECOVERY := true + +AB_OTA_PARTITIONS += \ + boot \ + dtbo \ + init_boot \ + odm_dlkm \ + product \ + system \ + system_ext \ + system_dlkm \ + vbmeta \ + vbmeta_system \ + vbmeta_vendor \ + vendor \ + vendor_boot \ + vendor_dlkm + +# Architecture +TARGET_ARCH := arm64 +TARGET_ARCH_VARIANT := armv8-2a +TARGET_CPU_VARIANT := cortex-a55 +TARGET_CPU_ABI := arm64-v8a +TARGET_CPU_ABI2 := +TARGET_CPU_SMP := true + +TARGET_2ND_ARCH := arm +TARGET_2ND_ARCH_VARIANT := armv8-2a +TARGET_2ND_CPU_VARIANT := cortex-a55 +TARGET_2ND_CPU_ABI := armeabi-v7a +TARGET_2ND_CPU_ABI2 := armeabi + +# Bootloader +TARGET_BOOTLOADER_BOARD_NAME := k6835v1_64 + +# Display +TARGET_SCREEN_DENSITY := 280 + +# Kernel +TARGET_PREBUILT_KERNEL := $(TARGET_KERNEL_PATH)/kernel +BOARD_KERNEL_CMDLINE := \ + bootopt=64S3,32N2,64N2 +#BOARD_KERNEL_CMDLINE += \ + androidboot.selinux=permissive +BOARD_KERNEL_BASE := 0x40000000 +BOARD_KERNEL_OFFSET = 0 +BOARD_RAMDISK_OFFSET = 0x26F00000 +BOARD_TAGS_OFFSET = 0x07C80000 +BOARD_KERNEL_DTB_OFFSET = 0x07C80000 +BOARD_KERNEL_PAGESIZE := 4096 +BOARD_BOOT_HEADER_VERSION = 4 +BOARD_MKBOOTIMG_ARGS := \ + --base $(BOARD_KERNEL_BASE) \ + --kernel_offset $(BOARD_KERNEL_OFFSET) \ + --ramdisk_offset $(BOARD_RAMDISK_OFFSET) \ + --tags_offset $(BOARD_TAGS_OFFSET) \ + --dtb_offset $(BOARD_KERNEL_DTB_OFFSET) \ + --pagesize $(BOARD_KERNEL_PAGESIZE) \ + --header_version $(BOARD_BOOT_HEADER_VERSION) +BOARD_RAMDISK_USE_LZ4 := true + +# Kernel modules +BOARD_VENDOR_KERNEL_MODULES_LOAD := $(strip $(shell cat $(TARGET_KERNEL_PATH)/vendor_dlkm/modules.load)) +BOARD_VENDOR_KERNEL_MODULES := $(wildcard $(TARGET_KERNEL_PATH)/vendor_dlkm/*.ko) +BOARD_VENDOR_RAMDISK_KERNEL_MODULES_LOAD := $(strip $(shell cat $(TARGET_KERNEL_PATH)/vendor_boot/modules.load)) +BOARD_VENDOR_RAMDISK_KERNEL_MODULES := $(wildcard $(TARGET_KERNEL_PATH)/vendor_boot/*.ko) + +# Device Tree +BOARD_INCLUDE_DTB_IN_BOOTIMG := true +TARGET_NEEDS_DTBOIMAGE := true +BOARD_PREBUILT_DTBIMAGE_DIR := $(TARGET_KERNEL_PATH) +BOARD_PREBUILT_DTBOIMAGE := $(BOARD_PREBUILT_DTBIMAGE_DIR)/dtbo.img + +# Init Boot +BOARD_INIT_BOOT_HEADER_VERSION := 4 +BOARD_MKBOOTIMG_INIT_ARGS += --header_version $(BOARD_INIT_BOOT_HEADER_VERSION) + +# HIDL +DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE := \ + $(DEVICE_PATH)/framework_compatibility_matrix.xml +DEVICE_MANIFEST_FILE += $(DEVICE_PATH)/manifest.xml + +# Metadata +BOARD_USES_METADATA_PARTITION := true + +# Partitions +BOARD_PRODUCTIMAGE_MINIMAL_PARTITION_RESERVED_SIZE := false +-include vendor/lineage/config/BoardConfigReservedSize.mk + +BOARD_BOOTIMAGE_PARTITION_SIZE := 67108864 +BOARD_DTBOIMG_PARTITION_SIZE := 8388608 +BOARD_INIT_BOOT_IMAGE_PARTITION_SIZE := 8388608 +BOARD_USERDATAIMAGE_PARTITION_SIZE := 238748139520 +BOARD_VENDOR_BOOTIMAGE_PARTITION_SIZE := 67108864 + +BOARD_ODM_DLKMIMAGE_FILE_SYSTEM_TYPE := erofs +BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := erofs +BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE := erofs +BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE := erofs +BOARD_SYSTEM_DLKMIMAGE_FILE_SYSTEM_TYPE := erofs +BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := erofs +BOARD_VENDOR_DLKMIMAGE_FILE_SYSTEM_TYPE := erofs +BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE := f2fs + +BOARD_SUPER_PARTITION_GROUPS := mediatek_dynamic_partitions +BOARD_SUPER_PARTITION_SIZE := 9663676416 +BOARD_MEDIATEK_DYNAMIC_PARTITIONS_PARTITION_LIST := odm_dlkm product system system_ext system_dlkm vendor vendor_dlkm +BOARD_MEDIATEK_DYNAMIC_PARTITIONS_SIZE := 9661579264 +BOARD_FLASH_BLOCK_SIZE := 262144 +TARGET_COPY_OUT_ODM := vendor/odm +TARGET_COPY_OUT_ODM_DLKM := odm_dlkm +TARGET_COPY_OUT_PRODUCT := product +TARGET_COPY_OUT_SYSTEM_DLKM := system_dlkm +TARGET_COPY_OUT_SYSTEM_EXT := system_ext +TARGET_COPY_OUT_VENDOR := vendor +TARGET_COPY_OUT_VENDOR_DLKM := vendor_dlkm + +# Platform +TARGET_BOARD_PLATFORM := mt6835 + +# Recovery +TARGET_RECOVERY_FSTAB := $(DEVICE_PATH)/init/fstab.mt6835 +TARGET_RECOVERY_PIXEL_FORMAT := RGBX_8888 +TARGET_USERIMAGES_USE_EXT4 := true +TARGET_USERIMAGES_USE_F2FS := true + +# RIL +ENABLE_VENDOR_RIL_SERVICE := true + +# SELinux +BOARD_MTK_SEPOLICY_IS_LEGACY := true +include device/mediatek/sepolicy_vndr/SEPolicy.mk +BOARD_VENDOR_SEPOLICY_DIRS += $(DEVICE_PATH)/sepolicy/vendor + +# SPL +VENDOR_SECURITY_PATCH := 2025-04-05 + +# Verified Boot +BOARD_AVB_ENABLE := true +#BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --flags 3 +BOARD_MOVE_GSI_AVB_KEYS_TO_VENDOR_BOOT := true + +BOARD_AVB_ALGORITHM := SHA256_RSA2048 +ifneq (,$(wildcard $(KEYS_PATH)/brax3-oem.pem)) +BOARD_AVB_KEY_PATH := $(KEYS_PATH)/brax3-oem.pem +else +BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --flags 3 +BOARD_AVB_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem +endif +BOARD_AVB_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP) + +ifneq (,$(wildcard $(KEYS_PATH)/brax3-boot.pem)) +BOARD_AVB_BOOT_KEY_PATH := $(KEYS_PATH)/brax3-boot.pem +else +BOARD_AVB_BOOT_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem +endif +BOARD_AVB_BOOT_ALGORITHM := SHA256_RSA2048 +BOARD_AVB_BOOT_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP) +BOARD_AVB_BOOT_ROLLBACK_INDEX_LOCATION := 3 + +BOARD_AVB_VBMETA_SYSTEM := system system_dlkm system_ext product +ifneq (,$(wildcard $(KEYS_PATH)/brax3-system.pem)) +BOARD_AVB_VBMETA_SYSTEM_KEY_PATH := $(KEYS_PATH)/brax3-system.pem +else +BOARD_AVB_VBMETA_SYSTEM_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem +endif +BOARD_AVB_VBMETA_SYSTEM_ALGORITHM := SHA256_RSA2048 +BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP) +BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX_LOCATION := 2 + +BOARD_AVB_VBMETA_VENDOR := vendor vendor_dlkm odm_dlkm +ifneq (,$(wildcard $(KEYS_PATH)/brax3-vendor.pem)) +BOARD_AVB_VBMETA_VENDOR_KEY_PATH := $(KEYS_PATH)/brax3-vendor.pem +else +BOARD_AVB_VBMETA_VENDOR_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem +endif +BOARD_AVB_VBMETA_VENDOR_ALGORITHM := SHA256_RSA2048 +BOARD_AVB_VBMETA_VENDOR_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP) +BOARD_AVB_VBMETA_VENDOR_ROLLBACK_INDEX_LOCATION := 4 + +# Wi-Fi +WPA_SUPPLICANT_VERSION := VER_0_8_X +BOARD_HOSTAPD_DRIVER := NL80211 +BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_mt66xx +BOARD_WPA_SUPPLICANT_DRIVER := NL80211 +BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_mt66xx +WIFI_DRIVER_FW_PATH_PARAM := "/dev/wmtWifi" +WIFI_DRIVER_FW_PATH_STA:="STA" +WIFI_DRIVER_FW_PATH_AP:="AP" +WIFI_DRIVER_FW_PATH_P2P:="P2P" +WIFI_DRIVER_STATE_CTRL_PARAM := "/dev/wmtWifi" +WIFI_DRIVER_STATE_ON := "1" +WIFI_DRIVER_STATE_OFF := "0" +WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY := true + +BOARD_SHIPPING_API_LEVEL := 33 +BOARD_VNDK_VERSION := current + +TARGET_BRM_PLATFORM := mt6835 +VEXT_BRM_PLATFORM := mt6835 + +# Include the proprietary files BoardConfig. +include vendor/brax/brax3/BoardConfigVendor.mk diff --git a/compatibility_matrix.xml b/compatibility_matrix.xml new file mode 100644 index 0000000..a5ecfbf --- /dev/null +++ b/compatibility_matrix.xml @@ -0,0 +1,2 @@ + + diff --git a/configs/audio/audio_effects.xml b/configs/audio/audio_effects.xml new file mode 100644 index 0000000..f303801 --- /dev/null +++ b/configs/audio/audio_effects.xml @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/configs/audio/audio_policy_configuration.xml b/configs/audio/audio_policy_configuration.xml new file mode 100644 index 0000000..6cad844 --- /dev/null +++ b/configs/audio/audio_policy_configuration.xml @@ -0,0 +1,320 @@ + + + + + + + + + + + + + + + Speaker + Earpiece + Built-In Mic + Built-In Back Mic + FM Tuner In + Voice Call In + Echo Ref In + Telephony Tx + + Speaker + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/configs/media/media_codecs_c2.xml b/configs/media/media_codecs_c2.xml new file mode 100644 index 0000000..24390c5 --- /dev/null +++ b/configs/media/media_codecs_c2.xml @@ -0,0 +1,161 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/configs/media/media_codecs_performance.xml b/configs/media/media_codecs_performance.xml new file mode 100644 index 0000000..b1c2147 --- /dev/null +++ b/configs/media/media_codecs_performance.xml @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/configs/media/media_profiles_V1_0.xml b/configs/media/media_profiles_V1_0.xml new file mode 100644 index 0000000..2ab5dcb --- /dev/null +++ b/configs/media/media_profiles_V1_0.xml @@ -0,0 +1,1679 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/configs/nfc/libnfc-nci.conf b/configs/nfc/libnfc-nci.conf new file mode 100644 index 0000000..ce28052 --- /dev/null +++ b/configs/nfc/libnfc-nci.conf @@ -0,0 +1,90 @@ +############################################################################### +# Debug options +NFC_DEBUG_ENABLED=0 + +############################################################################### +# File used for NFA storage +NFA_STORAGE="/data/nfc" +PRESERVE_STORAGE=0x01 + +############################################################################### +# 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 + +############################################################################### +# Default poll duration (in ms) +# Default is 500ms if not set (see nfc_target.h) +#NFA_DM_DISC_DURATION_POLL=333 + +############################################################################### +# 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_A_ACTIVE | NFA_TECHNOLOGY_MASK_F_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_A_ACTIVE 0x40 /* NFC Technology A active mode */ +# NFA_TECHNOLOGY_MASK_F_ACTIVE 0x80 /* NFC Technology F active mode */ +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_A_ACTIVE | NFA_TECHNOLOGY_MASK_F_ACTIVE +# +# Notable bits: +# NFA_TECHNOLOGY_MASK_A 0x01 /* NFC Technology A */ +# NFA_TECHNOLOGY_MASK_F 0x04 /* NFC Technology F */ +# NFA_TECHNOLOGY_MASK_A_ACTIVE 0x40 /* NFC Technology A active mode */ +# NFA_TECHNOLOGY_MASK_F_ACTIVE 0x80 /* NFC Technology F active mode */ +P2P_LISTEN_TECH_MASK=0x00 + +############################################################################### +# 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 + +############################################################################### +# 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 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} + +############################################################################### +# AID_MATCHING constants +# AID_MATCHING_EXACT_ONLY 0x00 +# AID_MATCHING_EXACT_OR_PREFIX 0x01 +# AID_MATCHING_PREFIX_ONLY 0x02 +AID_MATCHING_MODE=0x01 + +############################################################################### +# NCI_RESET_TYPE options +# Default 0x00, reset configurations everytime. +# 0x01, reset configurations only once every boot. +# 0x02, keep configurations. +NCI_RESET_TYPE=0x00 + diff --git a/configs/permissions/privapp-permissions-com.mediatek.ims.xml b/configs/permissions/privapp-permissions-com.mediatek.ims.xml new file mode 100644 index 0000000..fe93e61 --- /dev/null +++ b/configs/permissions/privapp-permissions-com.mediatek.ims.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/configs/powerhint.json b/configs/powerhint.json new file mode 100644 index 0000000..48dd5a9 --- /dev/null +++ b/configs/powerhint.json @@ -0,0 +1,402 @@ +{ + "Nodes": [ + { + "Name": "GPUMinFreq", + "Path": "/sys/devices/platform/soc/13000000.mali/devfreq/13000000.mali/min_freq", + "Values": [ + "1100000000", + "1086000000", + "1072000000", + "1058000000", + "1045000000", + "1031000000", + "1017000000", + "1003000000", + "990000000", + "976000000", + "962000000", + "948000000", + "935000000", + "921000000", + "907000000", + "893000000", + "880000000", + "868000000", + "857000000", + "846000000", + "835000000", + "823000000", + "812000000", + "801000000", + "790000000", + "778000000", + "767000000", + "756000000", + "745000000", + "733000000", + "722000000", + "711000000", + "700000000", + "674000000", + "648000000", + "622000000", + "596000000", + "570000000", + "545000000", + "519000000", + "493000000", + "467000000", + "441000000", + "415000000", + "390000000" + ], + "ResetOnInit": true + }, + { + "Name": "CPULittleClusterMaxFreq", + "Path": "/sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq", + "Values": [ + "-1", + "2000000", + "1900000", + "1800000", + "1700000", + "1600000", + "1500000", + "1450000", + "1400000", + "1350000", + "1300000", + "1250000", + "1200000", + "1150000", + "1100000", + "1050000", + "1000000", + "950000", + "900000", + "850000", + "800000", + "750000", + "700000", + "650000" + ], + "DefaultIndex": 0, + "ResetOnInit": true + }, + { + "Name": "CPULittleClusterMinFreq", + "Path": "/sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq", + "Values": [ + "2000000", + "1900000", + "1800000", + "1700000", + "1600000", + "1500000", + "1450000", + "1400000", + "1350000", + "1300000", + "1250000", + "1200000", + "1150000", + "1100000", + "1050000", + "1000000", + "950000", + "900000", + "850000", + "800000", + "750000", + "700000", + "650000", + "-1" + ], + "ResetOnInit": true + }, + { + "Name": "CPUBigClusterMaxFreq", + "Path": "/sys/devices/system/cpu/cpufreq/policy6/scaling_max_freq", + "Values": [ + "-1", + "2400000", + "2300000", + "2200000", + "2100000", + "2000000", + "1900000", + "1800000", + "1700000", + "1600000", + "1500000", + "1400000", + "1300000", + "1200000", + "1100000", + "1000000", + "900000", + "800000", + "700000" + ], + "DefaultIndex": 0, + "ResetOnInit": true + }, + { + "Name": "CPUBigClusterMinFreq", + "Path": "/sys/devices/system/cpu/cpufreq/policy6/scaling_min_freq", + "Values": [ + "2400000", + "2300000", + "2200000", + "2100000", + "2000000", + "1900000", + "1800000", + "1700000", + "1600000", + "1500000", + "1400000", + "1300000", + "1200000", + "1100000", + "1000000", + "900000", + "800000", + "700000", + "-1" + ], + "ResetOnInit": true + }, + { + "Name": "GPUSchedMode", + "Path": "/sys/devices/platform/soc/13000000.mali/js_ctx_scheduling_mode", + "Values": [ + "0", + "1" + ], + "DefaultIndex": 0, + "ResetOnInit": true + }, + { + "Name": "GPUSchedPeriod", + "Path": "/sys/devices/platform/soc/13000000.mali/js_scheduling_period", + "Values": [ + "100", + "75", + "50", + "0" + ], + "ResetOnInit": true, + "DefaultIndex": 0 + }, + { + "Name": "GPUDVFSInterval", + "Path": "/sys/devices/platform/soc/13000000.mali/dvfs_period", + "Values": [ + "100", + "75", + "50" + ], + "ResetOnInit": true, + "DefaultIndex": 0 + }, + { + "Name": "FGUclampMin", + "Path": "/dev/cpuctl/foreground/cpu.uclamp.min", + "Values": [ + "100", + "0" + ], + "ResetOnInit": true + }, + { + "Name": "TAUclampMin", + "Path": "/dev/cpuctl/top-app/cpu.uclamp.min", + "Values": [ + "100", + "10", + "0" + ], + "ResetOnInit": true + }, + { + "Name": "CDUclampMin", + "Path": "/dev/cpuctl/camera-daemon/cpu.uclamp.min", + "Values": [ + "100", + "0" + ], + "ResetOnInit": true + }, + // { + // "Name": "SchedBoost", + // "Path": "/proc/perfmgr/boost_ctrl/eas_ctrl/sched_boost", + // "Values": [ + // "1", + // "0" + // ], + // "ResetOnInit": true + // }, + // { + // "Name": "DoubleTapToWakeEnable", + // "Path": "/sys/touchpanel/double_tap", + // "Values": [ + // "1", + // "0" + // ] + // }, + { + "Name": "PowerHALAudioState", + "Path": "vendor.powerhal.audio", + "Values": ["AUDIO_STREAMING_LOW_LATENCY", ""], + "Type": "Property" + }, + { + "Name": "PowerHALRenderingState", + "Path": "vendor.powerhal.rendering", + "Values": ["EXPENSIVE_RENDERING", ""], + "Type": "Property" + } + ], + "Actions": [ + { + "PowerHint": "AUDIO_STREAMING_LOW_LATENCY", + "Node": "PowerHALAudioState", + "Duration": 0, + "Value": "AUDIO_STREAMING_LOW_LATENCY" + }, + { + "PowerHint": "AUDIO_STREAMING_LOW_LATENCY", + "Node": "CPULittleClusterMinFreq", + "Duration": 0, + "Value": "900000" + }, + { + "PowerHint": "AUDIO_STREAMING_LOW_LATENCY", + "Node": "CPUBigClusterMinFreq", + "Duration": 0, + "Value": "900000" + }, + { + "PowerHint": "INTERACTION", + "Node": "CPULittleClusterMaxFreq", + "Duration": 0, + "Value": "-1" + }, + { + "PowerHint": "INTERACTION", + "Node": "CPULittleClusterMinFreq", + "Duration": 0, + "Value": "1250000" + }, + { + "PowerHint": "INTERACTION", + "Node": "CPUBigClusterMaxFreq", + "Duration": 0, + "Value": "-1" + }, + { + "PowerHint": "INTERACTION", + "Node": "CPUBigClusterMinFreq", + "Duration": 0, + "Value": "1600000" + }, + { + "PowerHint": "INTERACTION", + "Node": "TAUclampMin", + "Duration": 0, + "Value": "10" + }, + { + "PowerHint": "LAUNCH", + "Node": "CPUBigClusterMaxFreq", + "Duration": 3000, + "Value": "-1" + }, + { + "PowerHint": "LAUNCH", + "Node": "CPUBigClusterMinFreq", + "Duration": 3000, + "Value": "2400000" + }, + { + "PowerHint": "LAUNCH", + "Node": "CPULittleClusterMaxFreq", + "Duration": 3000, + "Value": "-1" + }, + { + "PowerHint": "LAUNCH", + "Node": "CPULittleClusterMinFreq", + "Duration": 3000, + "Value": "2000000" + }, + { + "PowerHint": "LAUNCH", + "Node": "FGUclampMin", + "Duration": 3000, + "Value": "100" + }, + { + "PowerHint": "LAUNCH", + "Node": "TAUclampMin", + "Duration": 3000, + "Value": "100" + }, + // { + // "PowerHint": "LAUNCH", + // "Node": "DRAMOppMin", + // "Duration": 3000, + // "Value": "1" + // }, + // { + // "PowerHint": "LAUNCH", + // "Node": "SchedBoost", + // "Duration": 3000, + // "Value": "1" + // }, + { + "PowerHint": "CAMERA_LAUNCH", + "Node": "CDUclampMin", + "Duration": 1000, + "Value": "100" + }, + { + "PowerHint": "EXPENSIVE_RENDERING", + "Node": "GPUMinFreq", + "Duration": 0, + "Value": "801000000" + }, + { + "PowerHint": "EXPENSIVE_RENDERING", + "Node": "PowerHALRenderingState", + "Duration": 0, + "Value": "EXPENSIVE_RENDERING" + }, + { + "PowerHint": "EXPENSIVE_RENDERING", + "Node": "GPUSchedPeriod", + "Duration": 0, + "Value": "100" + }, + { + "PowerHint": "EXPENSIVE_RENDERING", + "Node": "GPUDVFSInterval", + "Duration": 0, + "Value": "75" + }, + { + "PowerHint": "EXPENSIVE_RENDERING", + "Node": "GPUSchedMode", + "Duration": 0, + "Value": "1" + } + // { + // "PowerHint": "DOUBLE_TAP_TO_WAKE", + // "Node": "DoubleTapToWakeEnable", + // "Duration": 0, + // "Value": "1" + // } + ] +} diff --git a/configs/thermal.conf b/configs/thermal.conf new file mode 100644 index 0000000..1200ce9 --- /dev/null +++ b/configs/thermal.conf @@ -0,0 +1,28 @@ +[policy_type] +# If permanent= Yes, this policy is still valid after reboot +permanent= No + +[LTF] +thermal_zone= soc_max +mode= enabled + +[mtk-skin-control] +sensor= ap_ntc +max_target_tj= 85000 +min_target_tj= 55000 +trip_tpcb= 44000 +target_tpcb= 48000 +atc_mode= enable + +[charger-cooler] +mode= enabled +sensor= ap_ntc +threshold= [44000, 45000, 46500, 56000] +hysteresis= [2000, 2000, 2000, 2000] +current= [1800, 1000, 500, 0] + +[thermalhal-threshold] +type= SKIN +sensor= ap_ntc +level= [severe, critical, emergency, shutdown] +threshold= [52000, 56000, 58000, 80000] diff --git a/configs/wifi/p2p_supplicant_overlay.conf b/configs/wifi/p2p_supplicant_overlay.conf new file mode 100644 index 0000000..68feb96 --- /dev/null +++ b/configs/wifi/p2p_supplicant_overlay.conf @@ -0,0 +1,6 @@ +p2p_no_group_iface=0 +driver_param=use_p2p_group_interface=1 +bss_expiration_scan_count=1 +wowlan_triggers=disconnect +p2p_search_delay=50 +p2p_go_he=1 diff --git a/configs/wifi/wpa_supplicant.conf b/configs/wifi/wpa_supplicant.conf new file mode 100644 index 0000000..8553f02 --- /dev/null +++ b/configs/wifi/wpa_supplicant.conf @@ -0,0 +1,16 @@ +ctrl_interface=wlan0 +update_config=1 +manufacturer=MediaTek Inc. +device_name=Wireless Client +model_name=MTK Wireless Model +model_number=1.0 +serial_number=2.0 +device_type=10-0050F204-5 +os_version=01020300 +config_methods=display push_button keypad +p2p_no_group_iface=1 +driver_param=use_p2p_group_interface=1 +hs20=1 +pmf=1 +wowlan_disconnect_on_deinit=1 +sae_pwe=2 diff --git a/configs/wifi/wpa_supplicant_overlay.conf b/configs/wifi/wpa_supplicant_overlay.conf new file mode 100644 index 0000000..e2539b2 --- /dev/null +++ b/configs/wifi/wpa_supplicant_overlay.conf @@ -0,0 +1,5 @@ +p2p_no_group_iface=1 +driver_param=use_p2p_group_interface=1 +wowlan_triggers=disconnect +p2p_disabled=1 +bss_no_flush_when_down=1 diff --git a/device.mk b/device.mk new file mode 100644 index 0000000..0fed393 --- /dev/null +++ b/device.mk @@ -0,0 +1,327 @@ +$(call inherit-product, $(SRC_TARGET_DIR)/product/virtual_ab_ota/launch_with_vendor_ramdisk.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/product/generic_ramdisk.mk) + +SELINUX_IGNORE_NEVERALLOWS := true + +# A/B +PRODUCT_PACKAGES += \ + com.android.hardware.boot \ + android.hardware.boot-service.default_recovery + +PRODUCT_PACKAGES += \ + create_pl_dev \ + create_pl_dev.recovery + +PRODUCT_PACKAGES += \ + update_engine \ + update_engine_sideload \ + update_verifier + +PRODUCT_PACKAGES_DEBUG += \ + update_engine_client + +AB_OTA_POSTINSTALL_CONFIG += \ + RUN_POSTINSTALL_system=true \ + POSTINSTALL_PATH_system=system/bin/otapreopt_script \ + FILESYSTEM_TYPE_system=erofs \ + POSTINSTALL_OPTIONAL_system=true + +AB_OTA_POSTINSTALL_CONFIG += \ + RUN_POSTINSTALL_vendor=true \ + POSTINSTALL_PATH_vendor=bin/checkpoint_gc \ + FILESYSTEM_TYPE_vendor=erofs \ + POSTINSTALL_OPTIONAL_vendor=true + +PRODUCT_PACKAGES += \ + checkpoint_gc \ + otapreopt_script + +# Audio +PRODUCT_PACKAGES += \ + android.hardware.audio@7.1-impl:32 \ + android.hardware.audio.effect@7.0-impl:32 \ + android.hardware.audio.service + +PRODUCT_PACKAGES += \ + audio.bluetooth.default:32 \ + android.hardware.bluetooth.audio-impl:32 + +PRODUCT_COPY_FILES += \ + $(call find-copy-subdir-files,*,$(LOCAL_PATH)/configs/audio,$(TARGET_COPY_OUT_VENDOR)/etc) \ + $(call find-copy-subdir-files,*,$(LOCAL_PATH)/configs/media,$(TARGET_COPY_OUT_VENDOR)/etc) + +PRODUCT_COPY_FILES += \ + frameworks/av/services/audiopolicy/config/bluetooth_audio_policy_configuration_7_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_audio_policy_configuration.xml \ + frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml + +PRODUCT_COPY_FILES += \ + frameworks/native/data/etc/android.hardware.audio.low_latency.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.low_latency.xml \ + frameworks/native/data/etc/android.software.midi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.midi.xml + +# Bluetooth +PRODUCT_COPY_FILES += \ + frameworks/native/data/etc/android.hardware.bluetooth_le.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth_le.xml \ + frameworks/native/data/etc/android.hardware.bluetooth.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth.xml + +# Boot animation +TARGET_SCREEN_HEIGHT := 1612 +TARGET_SCREEN_WIDTH := 720 + +# Camera +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 + +# Dalvik +$(call inherit-product, frameworks/native/build/phone-xhdpi-4096-dalvik-heap.mk) + +# Display +PRODUCT_PACKAGES += \ + android.hardware.memtrack-service.mediatek-mali + +PRODUCT_COPY_FILES += \ + frameworks/native/data/etc/android.hardware.touchscreen.multitouch.jazzhand.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml + +# DRM +PRODUCT_PACKAGES += \ + android.hardware.drm-service.clearkey + +# Dynamic Partitions +PRODUCT_USE_DYNAMIC_PARTITIONS := true + +PRODUCT_PACKAGES += \ + fastbootd + +# Fingerprint +PRODUCT_PACKAGES += \ + android.hardware.biometrics.fingerprint@2.1-service + +PRODUCT_COPY_FILES += \ + frameworks/native/data/etc/android.hardware.fingerprint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.fingerprint.xml + +# FM Radio +PRODUCT_PACKAGES += \ + libfmjni-mediatek \ + FMRadio + +# Gatekeeper +PRODUCT_PACKAGES += \ + android.hardware.gatekeeper@1.0-impl \ + android.hardware.gatekeeper@1.0-service + +# GPS +PRODUCT_COPY_FILES += \ + frameworks/native/data/etc/android.hardware.location.gps.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.location.gps.xml + +# Graphics +PRODUCT_COPY_FILES += \ + frameworks/native/data/etc/android.hardware.opengles.aep.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.opengles.aep.xml \ + frameworks/native/data/etc/android.hardware.vulkan.compute-0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.compute.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.version-1_3.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.version-1_3.xml \ + frameworks/native/data/etc/android.software.opengles.deqp.level-2022-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.opengles.deqp.level.xml \ + frameworks/native/data/etc/android.software.vulkan.deqp.level-2022-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.vulkan.deqp.level.xml + +# Health +PRODUCT_PACKAGES += \ + android.hardware.health-service.mediatek \ + android.hardware.health-service.mediatek-recovery + +# IMS +PRODUCT_BOOT_JARS_EXTRA += \ + system_ext:mediatek-common \ + system_ext:mediatek-framework \ + system_ext:mediatek-ims-base \ + system_ext:mediatek-ims-common \ + system_ext:mediatek-telecom-common \ + system_ext:mediatek-telephony-base \ + system_ext:mediatek-telephony-common + +PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/configs/permissions/privapp-permissions-com.mediatek.ims.xml:$(TARGET_COPY_OUT_SYSTEM_EXT)/etc/permissions/privapp-permissions-com.mediatek.ims.xml + +# Init +PRODUCT_PACKAGES += \ + fstab.mt6835 \ + fstab.mt6835.vendor_ramdisk \ + init.mt6835.power.rc \ + init.connectivity.common.rc \ + init.connectivity.rc \ + init_connectivity.rc \ + init.modem.rc \ + init.mt6835.rc \ + init.mt6835.rc.vendor_ramdisk \ + init.mt6835.usb.rc \ + init.mtkgki.rc \ + init.project.rc \ + init.sensor_2_0.rc \ + ueventd.mt6835.rc + +PRODUCT_PACKAGES += \ + init.cgroup.rc \ + +#PRODUCT_PACKAGES += \ + init.mt6835.power.rc \ + +# Keymint +PRODUCT_COPY_FILES += \ + frameworks/native/data/etc/android.hardware.keystore.app_attest_key.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.keystore.app_attest_key.xml \ + frameworks/native/data/etc/android.software.device_id_attestation.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.device_id_attestation.xml + +# Light +PRODUCT_PACKAGES += \ + android.hardware.light-service.lineage + +# Lineage Health +PRODUCT_PACKAGES += \ + vendor.lineage.health-service.default + +$(call soong_config_set,lineage_health,charging_control_charging_path,/sys/devices/platform/charger/cmd_charge_disable) +$(call soong_config_set,lineage_health,charging_control_charging_enabled,0) +$(call soong_config_set,lineage_health,charging_control_charging_disabled,1) + +# NFC +PRODUCT_PACKAGES += \ + com.android.nfc_extras \ + Tag + +# PRODUCT_COPY_FILES += \ +# $(call find-copy-subdir-files,*,$(LOCAL_PATH)/configs/nfc,$(TARGET_COPY_OUT_VENDOR)/etc) + +PRODUCT_COPY_FILES += \ + 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/android.hardware.nfc.uicc.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.uicc.xml \ + frameworks/native/data/etc/android.hardware.nfc.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.xml + +# Overlays +PRODUCT_PACKAGES += \ + CarrierConfigResOverlay \ + DialerResOverlay \ + FrameworksResOverlay \ + SettingsProviderResOverlay \ + SettingsResOverlay \ + SystemUIResOverlay \ + TelephonyResOverlay \ + TetheringResOverlay \ + WifiResOverlay + +DEVICE_PACKAGE_OVERLAYS += \ + $(LOCAL_PATH)/overlay-lineage + +# Power +PRODUCT_PACKAGES += \ + android.hardware.power.stats-service.example + +# Power +#PRODUCT_PACKAGES += \ + android.hardware.power-service.lineage-libperfmgr \ + vendor.mediatek.hardware.mtkpower@1.2-service.stub \ + libmtkperf_client_vendor \ + libmtkperf_client + +PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/configs/powerhint.json:$(TARGET_COPY_OUT_VENDOR)/etc/powerhint.json + +# Properties +include $(LOCAL_PATH)/vendor_logtag.mk + +# Recovery +PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/init/init.recovery.mt6835.rc:$(TARGET_COPY_OUT_RECOVERY)/root/init.recovery.mt6835.rc + +# Secure element +PRODUCT_COPY_FILES += \ + 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.sd.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.se.omapi.sd.xml \ + frameworks/native/data/etc/android.hardware.se.omapi.uicc.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.se.omapi.uicc.xml + +# Sensors +PRODUCT_PACKAGES += \ + android.hardware.sensors@2.0-subhal-impl-1.0:64 \ + 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.compass.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.compass.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 + +# Shipping API level +PRODUCT_SHIPPING_API_LEVEL := 33 + +# Soong namespaces +PRODUCT_SOONG_NAMESPACES += \ + $(LOCAL_PATH) \ + hardware/google/interfaces \ + hardware/google/pixel \ + hardware/lineage/interfaces/power-libperfmgr \ + hardware/mediatek/libmtkperf_client \ + hardware/mediatek + +# Storage +$(call inherit-product, $(SRC_TARGET_DIR)/product/emulated_storage.mk) + +# Symlinks +PRODUCT_PACKAGES += \ + nvcfg_mdota.ini_symlink + +# Telephony +PRODUCT_PACKAGES += \ + OpenEUICC + +PRODUCT_COPY_FILES += \ + 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.euicc.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.telephony.euicc.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.ims.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.telephony.ims.xml + +# Thermal +PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/configs/thermal.conf:$(TARGET_COPY_OUT_VENDOR)/etc/thermal/thermal.conf + +# USB +PRODUCT_PACKAGES += \ + android.hardware.usb-service.mediatek + +PRODUCT_COPY_FILES += \ + 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 \ + +# Vendor service manager +PRODUCT_PACKAGES += \ + vndservicemanager + +# Vibrator +PRODUCT_PACKAGES += \ + android.hardware.vibrator-service.mediatek + +# Verified Boot +PRODUCT_COPY_FILES += \ + frameworks/native/data/etc/android.software.verified_boot.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.verified_boot.xml + +# Wi-Fi +PRODUCT_PACKAGES += \ + wpa_supplicant \ + hostapd \ + libwifi-hal-wrapper \ + android.hardware.wifi-service + + +PRODUCT_COPY_FILES += \ + $(call find-copy-subdir-files,*,$(LOCAL_PATH)/configs/wifi/,$(TARGET_COPY_OUT_VENDOR)/etc/wifi) + +PRODUCT_COPY_FILES += \ + frameworks/native/data/etc/android.hardware.wifi.direct.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.direct.xml \ + frameworks/native/data/etc/android.hardware.wifi.passpoint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.passpoint.xml \ + frameworks/native/data/etc/android.hardware.wifi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.xml \ + frameworks/native/data/etc/android.software.ipsec_tunnels.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.ipsec_tunnels.xml \ + frameworks/native/data/etc/android.software.ipsec_tunnel_migration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.ipsec_tunnel_migration.xml + +# Inherit from the proprietary files makefile. +$(call inherit-product, vendor/brax/brax3/brax3-vendor.mk) diff --git a/extract-files.py b/extract-files.py new file mode 100755 index 0000000..8243c5d --- /dev/null +++ b/extract-files.py @@ -0,0 +1,144 @@ +#!/usr/bin/env -S PYTHONPATH=../../../tools/extract-utils python3 +# +# SPDX-FileCopyrightText: 2024 The LineageOS Project +# SPDX-License-Identifier: Apache-2.0 +# + +from extract_utils.fixups_blob import ( + blob_fixup, + blob_fixups_user_type, +) +from extract_utils.fixups_lib import ( + lib_fixup_remove, + lib_fixups, + lib_fixups_user_type, +) +from extract_utils.main import ( + ExtractUtils, + ExtractUtilsModule, +) + +namespace_imports = [ + 'hardware/mediatek', + 'hardware/mediatek/libmtkperf_client', + 'vendor/brax/brax3', + 'hardware/mediatek', +] + + +def lib_fixup_vendor_suffix(lib: str, partition: str, *args, **kwargs): + return f'{lib}_{partition}' if partition == 'vendor' else None + + +lib_fixups: lib_fixups_user_type = { + **lib_fixups, + ( + 'android.hardware.security.keymint-V1-ndk', + 'vendor.mediatek.hardware.videotelephony@1.0', + 'vendor.mediatek.hardware.aee@1.0', + 'vendor.mediatek.hardware.aee@1.1', + ): lib_fixup_vendor_suffix, + ( + 'libsink', + ): lib_fixup_remove, +} + +blob_fixups: blob_fixups_user_type = { + ( + 'vendor/bin/hs20-osu-client', + 'vendor/bin/hw/hostapd', + 'vendor/bin/hw/wpa_supplicant', + ):blob_fixup() + .replace_needed('libcrypto.so', 'libcrypto-v33.so'), + ( + 'system_ext/lib64/libcomutils.so', + 'system_ext/lib64/libimsma_rtp.so', + 'system_ext/lib64/libvcodec_cap.so', + 'system_ext/lib64/libimsma_socketwrapper.so', + 'system_ext/lib64/libsink.so', + 'system_ext/lib64/libmtk_vt_service.so', + 'system_ext/lib64/libimsma.so', + 'system_ext/lib64/libsignal.so', + 'vendor/lib64/libcamera2ndk_vendor.so', + 'vendor/lib64/hw/sensors.mediatek.V2.0.so', + 'vendor/lib64/libcodec2_mtk_c2store.so', + 'vendor/lib64/libcodec2_mtk_vdec.so', + 'vendor/lib64/libcodec2_mtk_venc.so', + 'vendor/lib64/libcodec2_soft_common.so', + 'vendor/lib64/libcodec2_soft_mtk_alacdec.so', + 'vendor/lib64/libcodec2_soft_mtk_imaadpcmdec.so', + 'vendor/lib64/libcodec2_soft_mtk_mp3dec.so', + 'vendor/lib64/libcodec2_soft_mtk_msadpcmdec.so', + 'vendor/lib64/libcodec2_vndk.so', + 'vendor/lib64/libcodec2_vpp_AIMEMC_plugin.so', + 'vendor/lib64/libcodec2_vpp_mi_plugin.so', + 'vendor/lib64/libcodec2_vpp_qt_plugin.so', + 'vendor/lib64/libcodec2_vpp_rs_plugin.so', + 'vendor/lib/libstagefright_softomx.so', + 'vendor/lib/libstagefright_softomx_plugin.so', + ): blob_fixup() + .replace_needed('libstagefright_foundation.so', 'libstagefright_foundation-v33.so'), + 'vendor/bin/hw/android.hardware.media.c2@1.2-mediatek-64b': blob_fixup() + .add_needed('libstagefright_foundation-v33.so'), + ( + 'vendor/lib64/android.hardware.bluetooth.audio-impl.so', + 'vendor/lib64/libbluetooth_audio_session_aidl.so', + ): blob_fixup() + .replace_needed('android.hardware.bluetooth.audio-V2-ndk', 'android.hardware.bluetooth.audio-V5-ndk'), + ( + 'vendor/lib/vendor.mediatek.hardware.bluetooth.audio-V1-ndk.so' + 'vendor/lib64/vendor.mediatek.hardware.bluetooth.audio-V1-ndk.so' + ): blob_fixup() + .replace_needed('android.media.audio.common-V1-ndk.so', 'android.media.audio.common-V4-ndk.so'), + ( + 'vendor/bin/mnld', + 'vendor/lib64/hw/vendor.mediatek.hardware.pq@2.15-impl.so', + 'vendor/lib64/libaalservice.so', + 'vendor/lib64/libcam.utils.sensorprovider.so', + ): blob_fixup() + .replace_needed('libsensorndkbridge.so', 'android.hardware.sensors@1.0-convert-shared.so'), + 'vendor/lib64/libmtkcam_featurepolicy.so': blob_fixup() + .binary_regex_replace(b'\x34\xE8\x87\x40\xB9', b'\x34\x28\x02\x80\x52'), + 'vendor/bin/hw/android.hardware.sensors-service.multihal': blob_fixup() + .replace_needed('android.hardware.sensors-V1-ndk.so', 'android.hardware.sensors-V2-ndk.so'), + ( + 'vendor/lib/vendor.mediatek.hardware.bluetooth.audio-V1-ndk.so', + 'vendor/lib64/vendor.mediatek.hardware.bluetooth.audio-V1-ndk.so', + ): blob_fixup() + .replace_needed('android.hardware.audio.common-V1-ndk.so', 'android.hardware.audio.common-V4-ndk.so') + .replace_needed('android.hardware.audio.common-V1.so', 'android.hardware.audio.common-V4.so'), + ( + 'vendor/lib64/vendor.mediatek.hardware.pq_aidl-V1-ndk.so', + ): blob_fixup() + .replace_needed('android.hardware.graphics.common-V3-ndk.so', 'android.hardware.graphics.common-V6-ndk.so'), + 'vendor/lib64/lib3a.ae.stat.so': blob_fixup() + .add_needed('liblog.so'), + 'vendor/bin/hw/android.hardware.security.keymint@2.0-service.trustonic': blob_fixup() + .replace_needed('android.hardware.security.keymint-V2-ndk.so', 'android.hardware.security.keymint-V3-ndk.so') + .add_needed('android.hardware.security.rkp-V3-ndk.so'), + 'system_ext/lib64/libsource.so': blob_fixup() + .add_needed('libui_shim.so') + .replace_needed('libstagefright_foundation.so', 'libstagefright_foundation-v33.so'), + ( + 'vendor/lib/libnvram.so', + 'vendor/lib64/libnvram.so', + 'vendor/lib64/libsysenv.so', + 'vendor/bin/hw/android.hardware.usb-aidl-service.mediatekv1.0', + ): blob_fixup() + .add_needed('libbase_shim.so'), + 'vendor/lib64/hw/hwcomposer.mtk_common.so' : blob_fixup() + .add_needed('libprocessgroup_shim.so'), +} # fmt: skip + +module = ExtractUtilsModule( + 'brax3', + 'brax', + blob_fixups=blob_fixups, + lib_fixups=lib_fixups, + namespace_imports=namespace_imports, + add_firmware_proprietary_file=True, +) + +if __name__ == '__main__': + utils = ExtractUtils.device(module) + utils.run() diff --git a/framework_compatibility_matrix.xml b/framework_compatibility_matrix.xml new file mode 100644 index 0000000..9433e03 --- /dev/null +++ b/framework_compatibility_matrix.xml @@ -0,0 +1,909 @@ + + + + android.hardware.radio + hwbinder + 1.0-6 + + IRadio + em1 + em2 + em3 + em4 + imsAospSlot1 + imsAospSlot2 + imsAospSlot3 + imsAospSlot4 + se1 + se2 + se3 + se4 + slot4 + + + ISap + slot2 + slot3 + slot4 + + + + android.hardware.radio.data + 1 + + IRadioData + slot4 + + + + android.hardware.radio.messaging + 1 + + IRadioMessaging + slot4 + + + + android.hardware.radio.modem + 1 + + IRadioModem + slot4 + imsSlot1 + imsSlot2 + imsSlot3 + imsSlot4 + se1 + se2 + se3 + se4 + + + + android.hardware.radio.network + 1 + + IRadioNetwork + slot4 + imsSlot1 + imsSlot2 + imsSlot3 + imsSlot4 + + + + android.hardware.radio.sim + 1 + + IRadioSim + slot4 + imsSlot1 + imsSlot2 + imsSlot3 + imsSlot4 + se1 + se2 + se3 + se4 + + + + android.hardware.radio.voice + 1 + + IRadioVoice + slot4 + imsSlot1 + imsSlot2 + imsSlot3 + imsSlot4 + + + + vendor.mediatek.hardware.aee + hwbinder + 1.0-1 + + IAee + AEE + default + + + + vendor.mediatek.hardware.apmonitor + hwbinder + 2.0 + + IApmService + apm_hidl_service + + + + vendor.mediatek.hardware.apuware.apusys + hwbinder + 1.0 + 2.0 + 2.1 + + INeuronApusys + default + + + + vendor.mediatek.hardware.apuware.apusys + 1 + + INeuronApusys + default + + + + vendor.mediatek.hardware.apuware.hmp + hwbinder + 1.0 + + IApuwareHmp + default + + + + vendor.mediatek.hardware.apuware.utils + hwbinder + 1.0 + 2.0 + + IApuwareUtils + default + + + + vendor.mediatek.hardware.apuware.xrp + hwbinder + 1.0 + 2.0 + + INeuronXrp + default + + + + vendor.mediatek.hardware.atci + hwbinder + 1.0 + + IAtcid + default + + + + vendor.mediatek.hardware.bluetooth.audio + hwbinder + 2.1 + 2.2 + + IBluetoothAudioProvidersFactory + default + + + + vendor.mediatek.hardware.bluetooth.audio + 1 + + IBluetoothAudioProviderFactory + default + + + + vendor.mediatek.hardware.camera.aovservice + 1 + + IAovService + default + + + + vendor.mediatek.hardware.camera.atms + hwbinder + 1.0 + + IATMs + default + + + + vendor.mediatek.hardware.camera.bgservice + hwbinder + 1.0-1 + + IBGService + internal/0 + + + + vendor.mediatek.hardware.camera.ccap + hwbinder + 1.0 + + ICCAPControl + internal/0 + + + + vendor.mediatek.hardware.camera.isphal + hwbinder + 1.0-1 + + IISPModule + internal/0 + + + + vendor.mediatek.hardware.camera.postproc + hwbinder + 1.0 + + IPostDevice + internal/0 + + + + vendor.mediatek.hardware.clientapi + hwbinder + 1.0 + + IClientapi + clientapi_hal_service + + + + vendor.mediatek.hardware.composer_ext + hwbinder + 1.0 + + IComposerExt + default + + + + vendor.mediatek.hardware.dfps + hwbinder + 1.0 + + IFpsPolicyService + default + + + + vendor.mediatek.hardware.dmc + hwbinder + 1.0-2 + + IDmcService + dmc_hidl_service + + + + vendor.mediatek.hardware.dplanner + hwbinder + 2.0 + + IDPlanner + default + + + + vendor.mediatek.hardware.engineermode + hwbinder + 1.0-3 + + IEmd + EmHidlServer + + + + vendor.mediatek.hardware.engineermode + 1 + + IEmds + default + + + + vendor.mediatek.hardware.gnss.batching + 1 + + IMtkGnssBatching + default + + + + vendor.mediatek.hardware.gpu + hwbinder + 1.0 + + IGraphicExt + default + + + + vendor.mediatek.hardware.hdcpwifidisplay + hwbinder + 1.0 + + IHDCPWIFIDisplay + default + + + + vendor.mediatek.hardware.hdmi + hwbinder + 1.0-4 + + IMtkHdmiService + default + + + + vendor.mediatek.hardware.hdmi_aidl + 1 + + IMtkHdmiService_AIDL + default + + + + vendor.mediatek.hardware.imsa + hwbinder + 1.0 + + IImsa + imsa + + + + vendor.mediatek.hardware.interfaces_tc1.mtkradioex_tc1 + hwbinder + 3.0 + + IMtkRadioEx + mtkAssist1 + mtkAssist2 + mtkEm1 + mtkEm2 + mtkSe1 + mtkSe2 + mtkSlot1 + mtkSlot2 + mtkCap1 + mtkCap2 + mtkSmartRatSwitch1 + mtkSmartRatSwitch2 + + + + vendor.mediatek.hardware.keyinstall + 1.0 + + IKeyinstall + default + + + + vendor.mediatek.hardware.keymanage + hwbinder + 1.0 + + IKeymanage + default + + + + vendor.mediatek.hardware.keymaster_attestation + hwbinder + 1.0-1 + + IKeymasterDevice + default + + + + vendor.mediatek.hardware.lbs + hwbinder + 1.0 + + ILbs + AgpsDebugInterface + AgpsInterface + mtk_agps2framework + mtk_agpsd2debugService + mtk_debugService2agpsd + mtk_debugService2mnld + mtk_framework2agps + mtk_lbs_log_v2s + mtk_lppe_socket_agps + mtk_lppe_socket_bt + mtk_lppe_socket_ipaddr + mtk_lppe_socket_lbs + mtk_lppe_socket_network + mtk_lppe_socket_sensor + mtk_lppe_socket_wlan + mtk_meta2mnld + mtk_mnld2debugService + mtk_mnld2mtklogger + mtk_mnld2nlputils + mtk_mtklogger2mnld + mtk_jam2mnl + mtk_mnl2jam + + + + vendor.mediatek.hardware.log + hwbinder + 1.0 + + ILog + ATMWiFiHidlServer + ConnsysFWHidlServer + MobileLogHidlServer + ModemLogHidlServer + LoggerHidlServer + + + + vendor.mediatek.hardware.mdmonitor + hwbinder + 1.0 + + IMDMonitorService + default + + + + vendor.mediatek.hardware.mmagent + hwbinder + 1.0-1 + + IMMAgent + default + + + + vendor.mediatek.hardware.mmlpq + 2 + + IMmlpq + default + + + + vendor.mediatek.hardware.mms + hwbinder + 1.0-7 + + IMms + default + + + + vendor.mediatek.hardware.mtkcodecservice + hwbinder + 1.0-1 + + IMtkCodecService + default + + + + vendor.mediatek.hardware.mtkpower + hwbinder + 1.0-2 + + IMtkPerf + default + + + IMtkPower + default + + + + vendor.mediatek.hardware.mtkpower_applist + 1 + + IMtkpower_applist + default + + + + vendor.mediatek.hardware.mtkradioex + hwbinder + 2.0-5 + + IMtkRadioEx + imsSlot1 + imsSlot2 + imsSlot3 + imsSlot4 + mtkAssist1 + mtkAssist2 + mtkAssist3 + mtkAssist4 + mtkCap1 + mtkCap2 + mtkCap3 + mtkCap4 + mtkEm1 + mtkEm2 + mtkEm3 + mtkEm4 + mtkRcs1 + mtkRcs2 + mtkRcs3 + mtkRcs4 + mtkSe1 + mtkSe2 + mtkSe3 + mtkSe4 + mtkSlot1 + mtkSlot2 + mtkSlot3 + mtkSlot4 + mtkSmartRatSwitch1 + mtkSmartRatSwitch2 + mtkSmartRatSwitch3 + mtkSmartRatSwitch4 + + + + vendor.mediatek.hardware.mtkradioex + hwbinder + 3.0 + + IMtkRadioEx + imsSlot1 + imsSlot2 + imsSlot3 + imsSlot4 + mtkAssist1 + mtkAssist2 + mtkAssist3 + mtkAssist4 + mtkCap1 + mtkCap2 + mtkCap3 + mtkCap4 + mtkEm1 + mtkEm2 + mtkEm3 + mtkEm4 + mtkRcs1 + mtkRcs2 + mtkRcs3 + mtkRcs4 + mtkSe1 + mtkSe2 + mtkSe3 + mtkSe4 + mtkSlot1 + mtkSlot2 + mtkSlot3 + mtkSlot4 + mtkSmartRatSwitch1 + mtkSmartRatSwitch2 + mtkSmartRatSwitch3 + mtkSmartRatSwitch4 + mtkRsu1 + mtkRsu2 + mtkRsu3 + mtkRsu4 + + + + vendor.mediatek.hardware.mtkradioex.data + 1 + + IMtkRadioExData + slot1 + slot2 + slot3 + slot4 + + + + vendor.mediatek.hardware.mtkradioex.ims + 1 + + IMtkRadioExIms + slot1 + slot2 + slot3 + slot4 + + + + vendor.mediatek.hardware.mtkradioex.messaging + 1 + + IMtkRadioExMessaging + slot1 + slot2 + slot3 + slot4 + + + + vendor.mediatek.hardware.mtkradioex.modem + 1 + + IMtkRadioExModem + slot1 + slot2 + slot3 + slot4 + + + + vendor.mediatek.hardware.mtkradioex.network + 1 + + IMtkRadioExNetwork + slot1 + slot2 + slot3 + slot4 + + + + vendor.mediatek.hardware.mtkradioex.rcs + 1 + + IMtkRadioExRcs + slot1 + slot2 + slot3 + slot4 + + + + vendor.mediatek.hardware.mtkradioex.sim + 1 + + IMtkRadioExSim + slot1 + slot2 + slot3 + slot4 + + + + vendor.mediatek.hardware.mtkradioex.voice + 1 + + IMtkRadioExVoice + slot1 + slot2 + slot3 + slot4 + + + + vendor.mediatek.hardware.netdagent + hwbinder + 1.0 + + INetdagent + default + + + + vendor.mediatek.hardware.neuropilot.agent + hwbinder + 1.0-2 + + IAgent + default + + + + vendor.mediatek.hardware.nvram + hwbinder + 1.0-1 + + INvram + default + + + + vendor.mediatek.hardware.nwk_opt + hwbinder + 1.0 + + INwkOpt + default + + + + vendor.mediatek.hardware.power + hwbinder + 2.0-1 + + IPower + default + + + + vendor.mediatek.hardware.pplagent + hwbinder + 1.0 + + IPplAgent + default + + + + vendor.mediatek.hardware.pq + hwbinder + 2.0-15 + + IPictureQuality + default + + + + vendor.mediatek.hardware.pq_aidl + 1 + + IPictureQuality_AIDL + default + + + + vendor.mediatek.hardware.presence + hwbinder + 1.0 + + IPresence + presence_hal_service + + + + vendor.mediatek.hardware.radio_op + hwbinder + 2.0 + 3.0 + + IRadioOp + slot1 + slot2 + slot3 + slot4 + OpImsRILd1 + OpImsRILd2 + OpImsRILd3 + OpImsRILd4 + + + + vendor.mediatek.hardware.rcs + hwbinder + 2.0 + + IRcs + rcs_hal_service + + + + vendor.mediatek.hardware.thp + hwbinder + 1.0 + + ITHP + default + + + + vendor.mediatek.hardware.touchll + hwbinder + 1.0 + + ITouchll + default + + + + vendor.mediatek.hardware.videotelephony + hwbinder + 1.0 + + IVideoTelephony + default + + + + vendor.mediatek.hardware.vpu + hwbinder + 1.0 + + Ivpu + default + + + + vendor.mediatek.hardware.wfo + hwbinder + 1.0 + + IWifiOffload + wfo_hidl_service + + + + vendor.mediatek.hardware.wifi.supplicant + hwbinder + 2.0 + + ISupplicant + default + + + + vendor.mediatek.hardware.wifi.supplicant + hwbinder + 2.0-2 + + ISupplicant + default + + + + vendor.microtrust.hardware.soter + 1.0 + + ISoter + default + + + + vendor.microtrust.hardware.thh + 2.0 + + IThhDevice + default + + + + vendor.nxp.nxpnfc_aidl + 1 + + INxpNfc + default + + + + vendor.trustonic.tee + 1.0-1 + + ITee + default + + + + vendor.trustonic.tee.tui + 1.0 + + ITui + default + + + + vendor.lineage.health + 1 + + IChargingControl + default + + + diff --git a/init/Android.bp b/init/Android.bp new file mode 100644 index 0000000..f5ff63c --- /dev/null +++ b/init/Android.bp @@ -0,0 +1,96 @@ +// +// SPDX-FileCopyrightText: 2024 The LineageOS Project +// SPDX-License-Identifier: Apache-2.0 +// + +prebuilt_etc { + name: "fstab.mt6835", + src: "fstab.mt6835", + vendor: true, + vendor_ramdisk_available: true, +} + +prebuilt_etc { + name: "init.cgroup.rc", + src: "init.cgroup.rc", + sub_dir: "init/hw", + vendor: true, +} + +prebuilt_etc { + name: "init.mt6835.power.rc", + src: "init.mt6835.power.rc", + sub_dir: "init/hw", + vendor: true, +} + +prebuilt_etc { + name: "init.connectivity.common.rc", + src: "init.connectivity.common.rc", + sub_dir: "init/hw", + vendor: true, +} + +prebuilt_etc { + name: "init.connectivity.rc", + src: "init.connectivity.rc", + sub_dir: "init/hw", + vendor: true, +} + +prebuilt_etc { + name: "init_connectivity.rc", + src: "init_connectivity.rc", + sub_dir: "init/hw", + vendor: true, +} + +prebuilt_etc { + name: "init.modem.rc", + src: "init.modem.rc", + sub_dir: "init/hw", + vendor: true, +} + +prebuilt_etc { + name: "init.mt6835.rc", + src: "init.mt6835.rc", + sub_dir: "init/hw", + vendor: true, + vendor_ramdisk_available: true, +} + +prebuilt_etc { + name: "init.mt6835.usb.rc", + src: "init.mt6835.usb.rc", + sub_dir: "init/hw", + vendor: true, +} + +prebuilt_etc { + name: "init.mtkgki.rc", + src: "init.mtkgki.rc", + sub_dir: "init/hw", + vendor: true, +} + +prebuilt_etc { + name: "init.project.rc", + src: "init.project.rc", + sub_dir: "init/hw", + vendor: true, +} + +prebuilt_etc { + name: "init.sensor_2_0.rc", + src: "init.sensor_2_0.rc", + sub_dir: "init/hw", + vendor: true, +} + +prebuilt_etc { + name: "ueventd.mt6835.rc", + filename: "ueventd.rc", + src: "ueventd.rc", + vendor: true, +} diff --git a/init/fstab.mt6835 b/init/fstab.mt6835 new file mode 100644 index 0000000..388fa90 --- /dev/null +++ b/init/fstab.mt6835 @@ -0,0 +1,101 @@ +/dev/block/by-name/vbmeta /vbmeta emmc defaults slotselect,first_stage_mount +/dev/block/by-name/vbmeta_system /vbmeta_system emmc defaults first_stage_mount,nofail,slotselect,avb=vbmeta +/dev/block/by-name/vbmeta_vendor /vbmeta_vendor emmc defaults first_stage_mount,nofail,slotselect + +system /system erofs ro wait,slotselect,logical,first_stage_mount,avb_keys=/avb/q-gsi.avbpubkey:/avb/r-gsi.avbpubkey:/avb/s-gsi.avbpubkey +system_dlkm /system_dlkm erofs ro wait,slotselect,logical,first_stage_mount +system_ext /system_ext erofs ro wait,slotselect,logical,first_stage_mount +product /product erofs ro wait,slotselect,logical,first_stage_mount +vendor /vendor erofs ro wait,slotselect,logical,first_stage_mount +vendor_dlkm /vendor_dlkm erofs ro wait,slotselect,logical,first_stage_mount +odm_dlkm /odm_dlkm erofs ro wait,slotselect,logical,first_stage_mount + +/dev/block/by-name/boot /boot emmc defaults slotselect,first_stage_mount +/dev/block/by-name/init_boot /init_boot emmc defaults slotselect,first_stage_mount +/dev/block/by-name/vendor_boot /vendor_boot emmc defaults slotselect,first_stage_mount +/dev/block/by-name/dtbo /dtbo emmc defaults slotselect,first_stage_mount + +/dev/block/by-name/metadata /metadata f2fs noatime,nosuid,nodev,discard wait,check,formattable,first_stage_mount + +/dev/block/by-name/userdata /data f2fs noatime,nosuid,nodev,discard,noflush_merge,fsync_mode=nobarrier,reserve_root=134217,resgid=1065,inlinecrypt wait,check,formattable,quota,latemount,reservedsize=128m,checkpoint=fs,fileencryption=aes-256-xts:aes-256-cts:v2+inlinecrypt_optimized,keydirectory=/metadata/vold/metadata_encryption + + + +/dev/block/by-name/protect1 /mnt/vendor/protect_f ext4 noatime,nosuid,nodev,noauto_da_alloc,commit=1,nodelalloc wait,check,formattable +/dev/block/by-name/protect2 /mnt/vendor/protect_s ext4 noatime,nosuid,nodev,noauto_da_alloc,commit=1,nodelalloc wait,check,formattable +/dev/block/by-name/nvdata /mnt/vendor/nvdata ext4 noatime,nosuid,nodev,noauto_da_alloc,commit=1,nodelalloc wait,check,formattable +/dev/block/by-name/nvcfg /mnt/vendor/nvcfg ext4 noatime,nosuid,nodev,noauto_da_alloc,commit=1,nodelalloc wait,check,formattable + +/dev/block/by-name/persist /mnt/vendor/persist ext4 noatime,nosuid,nodev,noauto_da_alloc,commit=1,nodelalloc wait,check,formattable + +/devices/platform/soc/11240000.mmc* auto auto defaults voldmanaged=sdcard1:auto,encryptable=userdata + +/devices/platform/usb_xhci* auto vfat defaults voldmanaged=usbotg:auto +/devices/platform/soc/11201000.usb0/11200000.xhci* auto vfat defaults voldmanaged=usbotg:auto + +/dev/block/by-name/frp /persistent emmc defaults defaults + +/dev/block/by-name/nvram /nvram emmc defaults defaults +/dev/block/by-name/proinfo /proinfo emmc defaults defaults +/dev/block/by-name/lk1 /lk1 emmc defaults defaults +/dev/block/by-name/bootloader2 /bootloader2 emmc defaults defaults +/dev/block/by-name/para /para emmc defaults defaults +/dev/block/by-name/misc /misc emmc defaults defaults + + + +/dev/block/by-name/logo /logo emmc defaults defaults +/dev/block/by-name/expdb /expdb emmc defaults defaults +/dev/block/by-name/seccfg /seccfg emmc defaults defaults + +/dev/block/by-name/tee1 /tee1 emmc defaults defaults +/dev/block/by-name/tee2 /tee2 emmc defaults defaults + + +/dev/block/by-name/scp1 /scp1 emmc defaults defaults +/dev/block/by-name/scp2 /scp2 emmc defaults defaults + + +/dev/block/by-name/sspm1 /sspm1 emmc defaults defaults +/dev/block/by-name/sspm2 /sspm2 emmc defaults defaults + + +/dev/block/by-name/dpm1 /dpm1 emmc defaults defaults +/dev/block/by-name/dpm2 /dpm2 emmc defaults defaults + +/dev/block/by-name/mcupm1 /mcupm1 emmc defaults defaults +/dev/block/by-name/mcupm2 /mcupm2 emmc defaults defaults + + + +/dev/block/by-name/md1img /md1img emmc defaults defaults +/dev/block/by-name/md1dsp /md1dsp emmc defaults defaults +/dev/block/by-name/md1arm7 /md1arm7 emmc defaults defaults +/dev/block/by-name/md3img /md3img emmc defaults defaults + + + + + +/dev/block/by-name/gz1 /gz1 emmc defaults defaults +/dev/block/by-name/gz2 /gz2 emmc defaults defaults +/dev/block/by-name/ccu /ccu emmc defaults defaults +/dev/block/by-name/vcp /vcp emmc defaults defaults +/dev/block/by-name/gpueb /gpueb emmc defaults defaults +/dev/block/by-name/mcf_ota /mcf_ota emmc defaults defaults +/dev/block/by-name/mvpu_algo1 /mvpu_algo1 emmc defaults defaults +/dev/block/by-name/mvpu_algo2 /mvpu_algo2 emmc defaults defaults +/dev/block/by-name/apusys1 /apusys1 emmc defaults defaults +/dev/block/by-name/apusys2 /apusys2 emmc defaults defaults + +/dev/block/by-name/spmfw /spmfw emmc defaults defaults + +/dev/block/by-name/pi_img /pi_img emmc defaults defaults +/dev/block/by-name/boot_para /boot_para emmc defaults defaults +/dev/block/by-name/odmdtbo /odmdtbo emmc defaults defaults +/dev/block/by-name/connsys_wifi /connsys_wifi emmc defaults defaults +/dev/block/by-name/connsys_bt /connsys_bt emmc defaults defaults + +/dev/block/by-name/otp /otp emmc defaults defaults + + diff --git a/init/init.cgroup.rc b/init/init.cgroup.rc new file mode 100644 index 0000000..cf78864 --- /dev/null +++ b/init/init.cgroup.rc @@ -0,0 +1,48 @@ +on early-init + # boot perf. tune + write /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq 2000000 + write /sys/devices/system/cpu/cpufreq/policy6/scaling_min_freq 2200000 + write /sys/class/devfreq/mtk-dvfsrc-devfreq/userspace/set_freq 5500000000 + +on charger + write /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq 0 + write /sys/devices/system/cpu/cpufreq/policy6/scaling_min_freq 0 + write /sys/class/devfreq/mtk-dvfsrc-devfreq/userspace/set_freq 0 + + +on post-fs-data + write /sys/devices/system/cpu/cpufreq/policy0/scaling_governor sugov_ext + write /sys/devices/system/cpu/cpufreq/policy6/scaling_governor sugov_ext + write /proc/sys/kernel/sched_pelt_multiplier 4 + write /proc/sys/kernel/sched_util_clamp_min_rt_default 0 + +on boot + # boot perf. tune + write /dev/cpuctl/system/cpu.uclamp.min 100 + write /dev/cpuctl/system/cpu.uclamp.latency_sensitive 1 + write /dev/cpuctl/system-background/cpu.uclamp.min 100 + write /dev/cpuctl/system-background/cpu.uclamp.latency_sensitive 1 + write /dev/cpuctl/foreground/cpu.uclamp.min 100 + write /dev/cpuctl/foreground/cpu.uclamp.latency_sensitive 1 + write /dev/cpuctl/top-app/cpu.uclamp.min 100 + write /dev/cpuctl/top-app/cpu.uclamp.latency_sensitive 1 + write /dev/cpuctl/background/cpu.uclamp.min 100 + write /dev/cpuctl/background/cpu.uclamp.latency_sensitive 1 + +on property:sys.boot_completed=1 + write /proc/sys/kernel/sched_migration_cost_ns 200000 + + # restore boot perf. tune + write /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq 0 + write /sys/devices/system/cpu/cpufreq/policy6/scaling_min_freq 0 + write /sys/class/devfreq/mtk-dvfsrc-devfreq/userspace/set_freq 0 + write /dev/cpuctl/system/cpu.uclamp.min 0 + write /dev/cpuctl/system/cpu.uclamp.latency_sensitive 0 + write /dev/cpuctl/system-background/cpu.uclamp.min 0 + write /dev/cpuctl/system-background/cpu.uclamp.latency_sensitive 0 + write /dev/cpuctl/foreground/cpu.uclamp.min 0 + write /dev/cpuctl/foreground/cpu.uclamp.latency_sensitive 0 + write /dev/cpuctl/top-app/cpu.uclamp.min 0 + write /dev/cpuctl/top-app/cpu.uclamp.latency_sensitive 0 + write /dev/cpuctl/background/cpu.uclamp.min 0 + write /dev/cpuctl/background/cpu.uclamp.latency_sensitive 0 diff --git a/init/init.connectivity.common.rc b/init/init.connectivity.common.rc new file mode 100644 index 0000000..550029b --- /dev/null +++ b/init/init.connectivity.common.rc @@ -0,0 +1,83 @@ +# MTK connectivity .rc configure + +on post-fs-data + + +# +# Connectivity related device nodes & configuration (begin) +# + +#/dev/ttyMT2 for Connectivity BT/FM/GPS usage + chmod 0660 /dev/ttyMT2 + chown system system /dev/ttyMT2 + +#/dev/ttyMT1 for GPS 3337 usage + chmod 0660 /dev/ttyMT1 + chown system system /dev/ttyMT1 + +# GPS + mkdir /data/vendor/gps 0770 gps system + mkdir /data/vendor/log 0770 gps system + mkdir /data/vendor/log/gps 0770 gps system + +# GPS EMI + chmod 0660 /dev/gps_emi + +# WiFi + mkdir /data/vendor/wifi 0770 wifi wifi + mkdir /data/vendor/wifi/wpa 0770 wifi wifi + mkdir /data/vendor/wifi/wpa/sockets 0770 wifi wifi + +# BT relayer mode used VCOM + chown bluetooth bluetooth /dev/ttyGS2 + chmod 0660 /dev/ttyGS2 + +# +# Connectivity related device nodes & configuration (end) +# + + +on boot + +# +# Connectivity related services (Begin) +# +# GPS +service mnld /vendor/bin/mnld + class main + user gps + capabilities WAKE_ALARM + group gps inet misc sdcard_rw sdcard_r media_rw system radio wakelock + socket mnld stream 660 gps system + +# GPS Debug Process +service lbs_dbg /system/bin/lbs_dbg + class main + user shell + group log system gps inet misc sdcard_rw sdcard_r media_rw radio + socket lbs_dbg stream 660 gps system + +on property:persist.vendor.em.dy.debug=1 + stop lbs_dbg + +#service BGW /vendor/bin/BGW +# user system +# group gps system radio +# class main + +# Wlan +#service wpa_supplicant /vendor/bin/hw/wpa_supplicant \ +# -g@android:wpa_wlan0 +# interface android.hardware.wifi.supplicant@1.0::ISupplicant default +# interface android.hardware.wifi.supplicant@1.1::ISupplicant default +# interface android.hardware.wifi.supplicant@1.2::ISupplicant default +# interface android.hardware.wifi.supplicant@1.3::ISupplicant default +# socket wpa_wlan0 dgram 660 wifi wifi +# class main +# disabled +# oneshot + +# +# Connectivity related services (End) +# + diff --git a/init/init.connectivity.rc b/init/init.connectivity.rc new file mode 100644 index 0000000..08b3a51 --- /dev/null +++ b/init/init.connectivity.rc @@ -0,0 +1,4 @@ +# MTK connectivity .rc configure + +import /vendor/etc/init/hw/init_connectivity.rc +import /vendor/etc/init/hw/init.connectivity.common.rc diff --git a/init/init.modem.rc b/init/init.modem.rc new file mode 100644 index 0000000..9f4f4b7 --- /dev/null +++ b/init/init.modem.rc @@ -0,0 +1,42 @@ +# Copyright (C) 2012 The Android Open Source Project +# +# IMPORTANT: Do not create world writable files or directories. +# This is a common source of Android security bugs. +# + +on early-init + write /sys/class/net/ccmni0/queues/rx-0/rps_cpus "0D" + write /sys/class/net/ccmni1/queues/rx-0/rps_cpus "0D" + write /sys/class/net/ccmni2/queues/rx-0/rps_cpus "0D" + write /sys/class/net/ccmni3/queues/rx-0/rps_cpus "0D" + write /sys/class/net/ccmni4/queues/rx-0/rps_cpus "0D" + write /sys/class/net/ccmni5/queues/rx-0/rps_cpus "0D" + write /sys/class/net/ccmni6/queues/rx-0/rps_cpus "0D" + write /sys/class/net/ccmni7/queues/rx-0/rps_cpus "0D" + write /sys/class/net/ccmni9/queues/rx-0/rps_cpus "0D" + write /sys/class/net/ccmni10/queues/rx-0/rps_cpus "0D" + write /sys/class/net/ccmni11/queues/rx-0/rps_cpus "0D" + write /sys/class/net/ccmni12/queues/rx-0/rps_cpus "0D" + write /sys/class/net/ccmni13/queues/rx-0/rps_cpus "0D" + write /sys/class/net/ccmni14/queues/rx-0/rps_cpus "0D" + write /sys/class/net/ccmni15/queues/rx-0/rps_cpus "0D" + write /sys/class/net/ccmni16/queues/rx-0/rps_cpus "0D" + write /sys/class/net/ccmni17/queues/rx-0/rps_cpus "0D" + write /sys/class/net/ccmni18/queues/rx-0/rps_cpus "0D" + write /sys/class/net/ccmni19/queues/rx-0/rps_cpus "0D" + write /sys/class/net/ccmni20/queues/rx-0/rps_cpus "0D" + + write /proc/sys/net/core/netdev_max_backlog 50000 + write /proc/sys/net/ipv4/ipfrag_high_thresh 20971520 + + #setprop ro.vendor.net.upload.mark.default blocking #prize - del by liunao for antutu use network + +on post-fs-data + + write /proc/bootprof "post-fs-data: on modem start" + +# Encrypt phone function + setprop vold.post_fs_data_done 1 + + + diff --git a/init/init.mt6835.power.rc b/init/init.mt6835.power.rc new file mode 100644 index 0000000..6cf2612 --- /dev/null +++ b/init/init.mt6835.power.rc @@ -0,0 +1,60 @@ +on early-init + # boot perf. tune + write /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq 2000000 + write /sys/devices/system/cpu/cpufreq/policy6/scaling_min_freq 2200000 + write /sys/class/devfreq/mtk-dvfsrc-devfreq/userspace/set_freq 5500000000 + +on charger + write /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq 0 + write /sys/devices/system/cpu/cpufreq/policy6/scaling_min_freq 0 + write /sys/class/devfreq/mtk-dvfsrc-devfreq/userspace/set_freq 0 + + +on post-fs-data + write /sys/devices/system/cpu/cpufreq/policy0/scaling_governor sugov_ext + write /sys/devices/system/cpu/cpufreq/policy6/scaling_governor sugov_ext + write /proc/sys/kernel/sched_pelt_multiplier 4 + write /proc/sys/kernel/sched_util_clamp_min_rt_default 0 + +on boot + # boot perf. tune + write /dev/cpuctl/system/cpu.uclamp.min 100 + write /dev/cpuctl/system/cpu.uclamp.latency_sensitive 1 + write /dev/cpuctl/system-background/cpu.uclamp.min 100 + write /dev/cpuctl/system-background/cpu.uclamp.latency_sensitive 1 + write /dev/cpuctl/foreground/cpu.uclamp.min 100 + write /dev/cpuctl/foreground/cpu.uclamp.latency_sensitive 1 + write /dev/cpuctl/top-app/cpu.uclamp.min 100 + write /dev/cpuctl/top-app/cpu.uclamp.latency_sensitive 1 + write /dev/cpuctl/background/cpu.uclamp.min 100 + write /dev/cpuctl/background/cpu.uclamp.latency_sensitive 1 + +on property:sys.boot_completed=1 + write /proc/sys/kernel/sched_migration_cost_ns 200000 + + # restore boot perf. tune + write /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq 0 + write /sys/devices/system/cpu/cpufreq/policy6/scaling_min_freq 0 + write /sys/class/devfreq/mtk-dvfsrc-devfreq/userspace/set_freq 0 + write /dev/cpuctl/system/cpu.uclamp.min 0 + write /dev/cpuctl/system/cpu.uclamp.latency_sensitive 0 + write /dev/cpuctl/system-background/cpu.uclamp.min 0 + write /dev/cpuctl/system-background/cpu.uclamp.latency_sensitive 0 + write /dev/cpuctl/foreground/cpu.uclamp.min 0 + write /dev/cpuctl/foreground/cpu.uclamp.latency_sensitive 0 + write /dev/cpuctl/top-app/cpu.uclamp.min 0 + write /dev/cpuctl/top-app/cpu.uclamp.latency_sensitive 0 + write /dev/cpuctl/background/cpu.uclamp.min 0 + write /dev/cpuctl/background/cpu.uclamp.latency_sensitive 0 + +on init + # update cpus for cpuset cgroup + write /dev/cpuset/foreground/cpus 0-2,4-7 + write /dev/cpuset/foreground/boost/cpus 0-7 + write /dev/cpuset/background/cpus 0-2 + write /dev/cpuset/system-background/cpus 0-3 + write /dev/cpuset/top-app/cpus 0-7 + +on enable-low-power + # Enable PowerHAL hint processing + setprop vendor.powerhal.init 1 diff --git a/init/init.mt6835.rc b/init/init.mt6835.rc new file mode 100644 index 0000000..fa71b8a --- /dev/null +++ b/init/init.mt6835.rc @@ -0,0 +1,1173 @@ +# MTK platform .rc configure + +import ${ro.vendor.rc}init.connectivity.rc +import ${ro.vendor.rc}init.mt6835.usb.rc +import /vendor/etc/init/hw/init.project.rc +import /system_ext/etc/init/hw/init.aee.rc +import /FWUpgradeInit.rc +import /vendor/etc/init/hw/init.aee.rc +import ${ro.vendor.rc}init.volte.rc +import ${ro.vendor.rc}init.mal.rc +import ${ro.vendor.rc}${ro.vendor.init.sensor.rc} +import ${ro.vendor.rc}init.cgroup.rc + +# init.modem.rc must be the LAST rc file because vold.post_fs_data_done is set in it +import ${ro.vendor.rc}init.modem.rc +# *** DO NOT import the new rc file after this line *** + +on early-init + write /proc/bootprof "INIT:early-init" + + # prize add for googlekey + setprop ro.vendor.serialno ${ro.serialno} + setprop sys.serialno ${ro.serialno} + setprop vendor.pri.serialno ${ro.serialno} + + # initialize vendor.all.modules.ready to 1 here to prevent NOT GKI project blocked + setprop vendor.all.modules.ready 1 + +# Keep debugfs mounted in non-user builds +on early-init && property:ro.build.type=eng + mount debugfs debugfs /sys/kernel/debug + chmod 0755 /sys/kernel/debug + setprop persist.dbg.keep_debugfs_mounted true + +on early-init && property:ro.build.type=userdebug + mount debugfs debugfs /sys/kernel/debug + chmod 0755 /sys/kernel/debug + setprop persist.dbg.keep_debugfs_mounted true + +on init + write /proc/bootprof "INIT:init" + + # Support legacy paths + symlink /sdcard /mnt/sdcard + + # if primary storage is physical, set ro.vold.primary_physical to 1 + # setprop ro.vold.primary_physical 1 + + mkdir /mnt/cd-rom 0000 system system + +# change lk_env permission + chown root system /proc/lk_env + chmod 0660 /proc/lk_env + +# increase sysctl_rmem_max and sysctl_wmem_max values to 2M + write /proc/sys/net/core/wmem_max 8388608 + write /proc/sys/net/core/rmem_max 8388608 + +# update cpus for cpuset cgroup + write /dev/cpuset/foreground/cpus 0-7 + write /dev/cpuset/foreground/boost/cpus 0-7 + write /dev/cpuset/background/cpus 0-5 + write /dev/cpuset/system-background/cpus 0-5 + write /dev/cpuset/top-app/cpus 0-7 + + # prize added by liuyong, add charge_limit, 20231110-start + chmod 0666 /sys/devices/platform/charger/cmd_charge_disable + + chown system system /proc/pcb_config/prize_pcb_version + chmod 0444 /proc/pcb_config/prize_pcb_version + # prize added by liuyong, add charge_limit, 20231110-end + +on late-init + write /proc/bootprof "INIT:late-init" +# enable rcu_expedited + write /sys/kernel/rcu_expedited 1 + +# mount different fs start + +on charger + + exec /system/bin/e2fsck -f -p /dev/block/by-name/cache + mount ext4 /dev/block/by-name/cache /cache rw wait + chmod 0660 /dev/spm + chown system system /dev/spm + start spm_script + chmod 0666 /dev/kmsg + chmod 0775 /mnt/vendor + mkdir /mnt/vendor/nvcfg + mount ext4 /dev/block/by-name/nvcfg /mnt/vendor/nvcfg rw wait + chown system system /mnt/vendor/nvcfg + chmod 0771 /mnt/vendor/nvcfg + restorecon_recursive /mnt/vendor/nvcfg + write /sys/devices/platform/battery_meter/FG_daemon_log_level 7 + write /sys/bus/platform/devices/battery/FG_daemon_log_level 7 + # Permissions for System Server and daemons. + chown system system /sys/power/autosleep + chown system system /sys/power/state + chown system system /sys/power/wakeup_count + chown radio wakelock /sys/power/wake_lock + chown radio wakelock /sys/power/wake_unlock + chmod 0660 /sys/power/state + chmod 0660 /sys/power/wake_lock + chmod 0660 /sys/power/wake_unlock + chmod 0660 /sys/power/wakeup_count + write /sys/power/pm_freeze_timeout 2000 + + start fuelgauged + start fuelgauged_nvram + + chown system system /sys/class/leds/lcd-backlight/brightness + chown system system /sys/class/leds/red/brightness + chown system system /sys/class/leds/green/brightness + + start vendor.light-default + start vendor.health-default + + # Stop bootprof + write /proc/bootprof "0" + +on early-fs + write /proc/bootprof "INIT:early-fs" + +on fs + write /proc/bootprof "INIT:fs" + start vendor.boot-hal-1-2 + + # start earlylog0 + # wait /toto 5 + # rm /metadata/logcat + # start earlylog + # wait /toto 5 + + # mount fstab + write /proc/bootprof "INIT:Mount_START" + write /sys/kernel/tracing/trace_marker "B|1|Mount" + mount_all --early + exec /system/bin/tune2fs -O has_journal -u 10010 -r 4096 /dev/block/by-name/userdata + write /sys/kernel/tracing/trace_marker "E" + write /proc/bootprof "INIT:Mount_END" + +on fs + + mount iso9660 loop@/vendor/etc/iAmCdRom.iso /mnt/cd-rom ro + +on late-fs + write /proc/bootprof "INIT:late-fs" + wait_for_prop hwservicemanager.ready "true" + write /proc/bootprof "INIT:Mount_START --late" + write /sys/kernel/tracing/trace_marker "B|1|Mount late" + mount_all --late + write /sys/kernel/tracing/trace_marker "E" + write /proc/bootprof "INIT:Mount_END --late" + + +on post-fs + write /proc/bootprof "INIT:post-fs" + + # Support legacy paths + symlink /sdcard /storage/sdcard0 + + #change permissions for mediaserver + chown root media /proc/clkmgr/mipi_test + + #change permission for engineer mode + chown radio system /proc/clkmgr/pll_test + chown radio system /proc/clkmgr/pll_fsel + chmod 0664 /proc/clkmgr/pll_test + chmod 0664 /proc/clkmgr/pll_fsel + #change permission for engineer mode + chown radio system /proc/freqhopping/dramc + chown radio system /proc/freqhopping/dumpregs + chown radio system /proc/freqhopping/freqhopping_debug + chown radio system /proc/freqhopping/status + chown radio system /proc/freqhopping/userdef + + # Support A/B feature for emmc boot region + symlink /dev/block/sda /dev/block/mmcblk0boot0 + symlink /dev/block/sdb /dev/block/mmcblk0boot1 + symlink /dev/block/mmcblk0boot0 /dev/block/by-name/preloader_a + symlink /dev/block/mmcblk0boot1 /dev/block/by-name/preloader_b + + # Support A/B feature for combo emmc and ufs OTA update + symlink /dev/block/by-name/preloader_a /dev/block/by-name/preloader_emmc_a + symlink /dev/block/by-name/preloader_b /dev/block/by-name/preloader_emmc_b + symlink /dev/block/by-name/preloader_a /dev/block/by-name/preloader_ufs_a + symlink /dev/block/by-name/preloader_b /dev/block/by-name/preloader_ufs_b + + symlink /dev/block/mapper/pl_a /dev/block/by-name/preloader_raw_a + symlink /dev/block/mapper/pl_b /dev/block/by-name/preloader_raw_b + +# change owner + chown system system /proc/bootprof + chmod 0664 /proc/bootprof + chown root system /proc/mtprof/cputime + chown root system /proc/mtprof/reboot_pid + + chown system system /mnt/vendor/protect_f + chmod 0770 /mnt/vendor/protect_f + + chown system system /mnt/vendor/protect_s + chmod 0770 /mnt/vendor/protect_s + chown root log /proc/ccci_sib + + # allow ccci_mdinit access ccci_dump + chown root system /proc/ccci_dump + chown root system /proc/ccci_lp_mem + +on post-fs-data + write /proc/bootprof "INIT:post-fs-data" + wait_for_prop vendor.all.modules.ready 1 + write /proc/bootprof "modprobe: Load_Module_DONE" + + # Disable watermark boost + write /proc/sys/vm/watermark_boost_factor 0 + + # zram + write /sys/block/zram0/comp_algorithm lz4 + write /proc/sys/vm/page-cluster 0 + write /proc/sys/vm/swappiness 100 + write /sys/kernel/mm/swap/vma_ra_enabled false + swapon_all /vendor/etc/fstab.enableswap + + # boot time fs tune + write /sys/block/mmcblk0/queue/iostats 0 + write /sys/block/mmcblk0/queue/read_ahead_kb 2048 + write /sys/block/mmcblk0/queue/nr_requests 256 + write /sys/block/sdc/queue/iostats 0 + write /sys/block/sdc/queue/read_ahead_kb 2048 + write /sys/block/sdc/queue/nr_requests 256 + write /sys/block/dm-0/queue/read_ahead_kb 2048 + write /sys/block/dm-1/queue/read_ahead_kb 2048 + write /sys/block/dm-2/queue/read_ahead_kb 2048 + write /sys/block/dm-3/queue/read_ahead_kb 2048 + write /sys/block/dm-4/queue/read_ahead_kb 2048 + write /sys/block/dm-5/queue/read_ahead_kb 2048 + + chown system system /mnt/vendor/nvcfg + chmod 0771 /mnt/vendor/nvcfg + restorecon_recursive /mnt/vendor/nvcfg + chown system system /mnt/vendor/nvcfg/fg + chown system system /mnt/vendor/nvcfg/fg/old_fg_data + chown system system /mnt/vendor/nvcfg/fg/car_tune_value + + # create basic filesystem structure + # We chown/chmod /mnt/vendor/nvdata again so because mount is run as root + defaults + chown root system /mnt/vendor/nvdata + chmod 0771 /mnt/vendor/nvdata + mkdir /mnt/vendor/nvdata/media 0771 media audio + + #Create cct mount point + mkdir /mnt/vendor/cct + chown root system /mnt/vendor/cct + chmod 0771 /mnt/vendor/cct + + #Create flash folder + mkdir /data/vendor/flash + chown root system /data/vendor/flash + chmod 0771 /data/vendor/flash + + #Create shading mount point + mkdir /data/vendor/shading + chown root system /data/vendor/shading + chmod 0771 /data/vendor/shading + + #Create shading_otp mount point + mkdir /data/vendor/shading_otp + chown root system /data/vendor/shading_otp + chmod 0771 /data/vendor/shading_otp + + #Create NDD mount point + mkdir /data/vendor/camera_dump + chown root system /data/vendor/camera_dump + chmod 0771 /data/vendor/camera_dump + + #Create Camera Dip Debug Folder + mkdir /data/vendor/dipdebug + chown root system /data/vendor/dipdebug + chmod 0771 /data/vendor/dipdebug + + #Create flicker mount point + mkdir /data/vendor/flicker + chown root system /data/vendor/flicker + chmod 0771 /data/vendor/flicker + + #Create TP_MFNR mount point + chown root system /vendor/etc/tp_mfnr/ + chmod 0771 /vendor/etc/tp_mfnr/ + + #Create TP_SFNR mount point + chown root system /vendor/etc/tp_sfnr/ + chmod 0771 /vendor/etc/tp_sfnr/ + + # Create Audio HAL data directory + mkdir /data/vendor/audiohal 0771 system audio + + # Set SELinux security contexts on upgrade or policy update. + restorecon_recursive /mnt/vendor/nvdata + + #give system access to rfkill device node + chmod 0660 /dev/rfkill + + # create for muxd pts device node , to operate without root + mkdir /dev/radio 0770 radio radio + + # create mdota to mount mcf_ota + mkdir /mnt/vendor/mdota + + chmod 0660 /dev/spm + chown system system /dev/spm + +# GPS + chmod 0775 /vendor/xbin/MPED + chmod 0666 /dev/gps_emi + +# ----------------------- +# Add by MTK + # SCP log + chmod 0660 /sys/class/misc/scp/scp_mobile_log + chown root system /sys/class/misc/scp/scp_mobile_log + chmod 0220 /sys/class/misc/scp/scp_log_flush + chown root system /sys/class/misc/scp/scp_log_flush + chmod 0440 /dev/scp + chown root system /dev/scp + chmod 0664 /sys/class/misc/scp/scp_ee_force_ke + chown root system /sys/class/misc/scp/scp_ee_force_ke + + # ADSP log + chmod 0660 /sys/class/misc/adsp_0/log_enable + chown root system /sys/class/misc/adsp_0/log_enable + chmod 0660 /sys/class/misc/adsp_1/log_enable + chown root system /sys/class/misc/adsp_1/log_enable + chmod 0660 /dev/adsp + chown root media /dev/adsp + chmod 0440 /dev/adsp_0 + chown system media /dev/adsp_0 + chmod 0440 /dev/adsp_1 + chown system media /dev/adsp_1 + + # SSPM log + chmod 0620 /sys/class/misc/sspm/sspm_mobile_log + chown root system /sys/class/misc/sspm/sspm_mobile_log + chmod 0440 /dev/sspm + chown root system /dev/sspm + + # VCP log + chmod 0660 /sys/class/misc/vcp/vcp_mobile_log + chown root system /sys/class/misc/vcp/vcp_mobile_log + chmod 0220 /sys/class/misc/vcp/vcp_log_flush + chown root system /sys/class/misc/vcp/vcp_log_flush + chmod 0440 /dev/vcp + chown root system /dev/vcp + chmod 0664 /sys/class/misc/vcp/vcp_ee_force_ke + chown root system /sys/class/misc/vcp/vcp_ee_force_ke + + # radvd + chmod 444 /etc/radvd/radvd.conf + + # Mali 3D GPU driver + #insmod /vendor/lib/modules/mali.ko + #chmod 666 /dev/mali0 + #chown system graphics /dev/mali + + + + # Touch Panel + # chmod 0664 /dev/touch + chown root diag /sys/module/tpd_setting/parameters/tpd_calmat + chown root diag /sys/module/tpd_setting/parameters/tpd_em_debounce_time + chown root diag /sys/module/tpd_setting/parameters/tpd_mode + chown root diag /sys/module/tpd_setting/parameters/tpd_em_debounce_time0 + chown root diag /sys/module/tpd_setting/parameters/tpd_em_debounce_time1 + chown root diag /sys/module/tpd_setting/parameters/tpd_em_spl_num + chown root diag /sys/module/tpd_setting/parameters/tpd_em_pressure_threshold + chown root diag /sys/module/tpd_setting/parameters/tpd_em_auto_time_interval + chown root diag /sys/module/tpd_setting/parameters/tpd_em_sample_cnt + chown root diag /sys/module/tpd_setting/parameters/tpd_em_asamp + chown root diag /sys/module/tpd_debug/parameters/tpd_em_log + chown root diag /sys/module/tpd_debug/parameters/tpd_em_log_to_fs + + chmod 0666 /dev/pmem_multimedia + + # set ptmx group to non-root + chown root radio /dev/ptmx + + # RTC + chmod 660 /dev/alarm + chown root system /dev/alarm + + # M4U + #insmod /vendor/lib/modules/m4u.ko + #mknod /dev/M4U_device c 188 0 + chmod 0444 /dev/m4u + #chown system media /dev/M4U_device + chmod 0640 /proc/m4u + chown system media /proc/m4u + + #set mlock limit to infinate (for m4u operation) + setrlimit 8 -1 -1 + + # CMDQ + chmod 0640 /dev/mtk_mdp + chown system system /dev/mtk_mdp + + # MDP SYNC + chmod 0640 /dev/mdp_sync + chown system system /dev/mdp_sync + + # MML PQ + chmod 0640 /dev/mml_pq + chown system system /dev/mml_pq + + #OFFLOAD SERVICE + chmod 0640 /dev/offloadservice + chown media media /dev/offloadservice + + #OPEN DSP + chmod 0640 /dev/audio_ipi + chown media media /dev/audio_ipi + + #SmartPA + chmod 0640 /dev/audio_scp + chown media media /dev/audio_scp + chown audioserver audio /sys/bus/platform/devices/rt5509_param.0/prop_param + chown audioserver audio /sys/bus/platform/devices/rt5509_param.1/prop_param + + #Accdet + chown root radio /sys/devices/platform/Accdet_Driver/driver/accdet_call_state + + #Fingerprint + chmod 0666 /dev/goodix_fp + + #vdec-fmt + chmod 0660 /dev/vdec-fmt + chown media system /dev/vdec-fmt + chmod 0660 /dev/fmt_sync + chown system system /dev/fmt_sync + + #v4l2 codec + chmod 0660 /dev/vcu + chown media system /dev/vcu + chmod 0660 /dev/video0 + chown media system /dev/video0 + chmod 0660 /dev/video1 + chown media system /dev/video1 + mkdir /data/vendor/vcodec 0777 media system + mkdir /data/vendor/vcodec/log 0770 media system + mkdir /data/vendor/vcodec/in 0770 media system + mkdir /data/vendor/vcodec/out 0770 media system + + #MJC + #insmod /vendor/lib/modules/mjc_kernel_driver.ko + chmod 0660 /dev/MJC + chown media system /dev/MJC + + #kpd + chown radio radio /sys/devices/platform/mtk-kpd/driver/kpd_call_state + + #Charging Battery + chown radio radio /sys/devices/platform/battery/Charging_CallState + + # PMIC property + chown radio system /sys/devices/platform/mt-pmic/low_battery_protect_stop + chown radio system /sys/devices/platform/mt-pmic/low_battery_protect_ut + + #MDDB + mkdir /data/vendor_de/meta 0770 system system + mkdir /data/vendor_de/meta/mddb 0770 system system + + chown system /sys/devices/platform/msensor/driver/cpsopmode + chown system /sys/devices/platform/msensor/driver/cpsreptxy + chown system /sys/devices/platform/msensor/driver/cpsreptz + chown system /sys/devices/platform/gsensor/driver/cpsopmode + chown system /sys/devices/platform/gsensor/driver/cpsrange + + chown system /sys/class/input/input1/enable + chown system /sys/class/input/input1/delay + chown system /sys/class/input/input1/wake + chown system /sys/class/input/input1/offsets + chown system /sys/class/input/input2/enable + chown system /sys/class/input/input2/delay + chown system /sys/class/input/input2/wake + chown system /sys/class/input/input2/offsets + chown system /sys/class/input/input3/enable + chown system /sys/class/input/input3/delay + chown system /sys/class/input/input3/wake + chown system /sys/class/input/input3/offsets + chown system /sys/class/input/input4/enable + chown system /sys/class/input/input4/delay + chown system /sys/class/input/input4/wake + chown system /sys/class/input/input4/offsets + chown system /sys/class/input/input5/enable + chown system /sys/class/input/input5/delay + chown system /sys/class/input/input5/wake + chown system /sys/class/input/input5/offsets + chown system /sys/class/input/input6/enable + chown system /sys/class/input/input6/delay + chown system /sys/class/input/input6/wake + chown system /sys/class/input/input6/offsets + chown system /sys/class/input/input7/enable + chown system /sys/class/input/input7/delay + chown system /sys/class/input/input7/wake + chown system /sys/class/input/input7/offsets + chown system /sys/class/input/input8/enable + chown system /sys/class/input/input8/delay + chown system /sys/class/input/input8/wake + chown system /sys/class/input/input8/offsets + chown system /sys/class/input/input9/enable + chown system /sys/class/input/input9/delay + chown system /sys/class/input/input9/wake + chown system /sys/class/input/input9/offsets + chown system /sys/class/input/input10/enable + chown system /sys/class/input/input10/delay + chown system /sys/class/input/input10/wake + chown system /sys/class/input/input10/offsets + + #EM eint + chown root diag /sys/bus/platform/drivers/eint/current_eint + + # Display + chmod 0660 /dev/graphics/fb0 + chown system graphics /dev/graphics/fb0 + + chmod 0660 /dev/mtk_disp_mgr + chown system graphics /dev/mtk_disp_mgr + + chmod 0660 /dev/mtkfb_vsync + chown system graphics /dev/mtkfb_vsync + + chmod 0660 /dev/sw_sync + chown system graphics /dev/sw_sync + + # EM baseband file + chown root diag /vendor/bin/baseband_regdump + chmod 4750 /vendor/bin/baseband_regdump + + #pmu + chown root radio /sys/devices/platform/mt-pmic/pmic_access_bank0 + chown root radio /sys/devices/platform/mt-pmic/pmic_access_bank1 + chown root radio /sys/devices/platform/mt6311-user/mt6311_access + chown root radio /sys/devices/platform/mt-pmic/pmic_access + chmod 0664 /sys/devices/platform/mt-pmic/pmic_access_bank0 + chmod 0664 /sys/devices/platform/mt-pmic/pmic_access_bank1 + chmod 0664 /sys/devices/platform/mt6311-user/mt6311_access + chmod 0664 /sys/devices/platform/mt-pmic/pmic_access + + # EM CPU Speed Stress + chown root radio /proc/cpu_ss/cpu_ss_debug_mode + chown root radio /proc/cpu_ss/cpu_ss_mode + chown root radio /proc/cpu_ss/cpu_ss_period + chown root radio /proc/cpu_ss/cpu_ss_period_mode + chmod 0664 /proc/cpu_ss/cpu_ss_debug_mode + chmod 0664 /proc/cpu_ss/cpu_ss_mode + chmod 0664 /proc/cpu_ss/cpu_ss_period + chmod 0664 /proc/cpu_ss/cpu_ss_period_mode + + #EM eint + chown root diag /sys/bus/platform/drivers/eint/current_eint + + # Android SEC related device nodes + chmod 0660 /dev/sec + chown root system /dev/sec + + # FM Radio device node + chmod 0660 /dev/fm + chown media media /dev/fm + + # device apc settings + + # device info /proc interface + chmod 0440 /dev/devmap + chown root system /dev/devmap + + # bluetooth + chown bluetooth bluetooth /dev/hid-keyboard + chmod 0660 /dev/hid-keyboard + #Use uinput's default permission + chown system net_bt_admin /dev/uinput + + # UIBC + chown system media /dev/uibc + chmod 0660 /dev/uibc + + #TV-out + chmod 0664 /dev/TV-out + + #HDMI + chown media system /dev/hdmitx + chmod 0664 /dev/hdmitx + + + # JPEG + chmod 0666 /proc/mtk_jpeg + + # almk + chmod 0440 /dev/mtk_almk + + # DISP + chmod 0444 /dev/mtk_disp + + #ANC SERVICE + chmod 0640 /dev/ancservice + chown media media /dev/ancservice + + # gz device + chmod 0660 /dev/gz_kree + chown system system /dev/gz_kree + + #Camera + chmod 0660 /dev/camera-sysram + chmod 0660 /dev/camera-isp + chmod 0660 /dev/camera-mem + chmod 0660 /dev/camera-dip + chmod 0660 /dev/camera-tsf + chmod 0660 /dev/camera-dpe + chmod 0660 /dev/camera-mfb + chmod 0660 /dev/camera-rsc + chmod 0660 /dev/camera-owe + chmod 0660 /dev/camera-fdvt + chmod 0660 /dev/camera-pda + chmod 0660 /dev/camera-wpe + chmod 0660 /dev/camera-pipemgr + chmod 0660 /dev/kd_camera_hw + chmod 0660 /dev/seninf + chmod 0660 /dev/seninf_n3d + chmod 0660 /dev/flashlight + chmod 0660 /dev/kd_camera_hw_bus2 + chmod 0660 /dev/FM50AF + chmod 0660 /dev/CAM_CAL_DRV + chmod 0660 /dev/MAINAF + chmod 0660 /dev/MAIN2AF + chmod 0660 /dev/MAIN3AF + chmod 0660 /dev/SUBAF + chmod 0660 /dev/vpu + chmod 0660 /dev/apusys + chmod 0660 /dev/mtk_ccd + + chown system camera /dev/camera-sysram + chown system camera /dev/camera-isp + chown system camera /dev/camera-mem + chown system camera /dev/camera-dip + chown system camera /dev/camera-dpe + chown system camera /dev/camera-mfb + chown system camera /dev/camera-rsc + chown system camera /dev/camera-owe + chown system camera /dev/camera-tsf + chown system camera /dev/camera-fdvt + chown system camera /dev/camera-pda + chown system camera /dev/camera-wpe + chown system camera /dev/camera-pipemgr + chown system camera /dev/kd_camera_hw + chown system camera /dev/seninf + chown system camera /dev/seninf_n3d + chown system camera /dev/flashlight + chown system camera /dev/kd_camera_hw_bus2 + chown system camera /dev/FM50AF + chown system camera /dev/CAM_CAL_DRV + chown system camera /dev/MAINAF + chown system camera /dev/MAIN2AF + chown system camera /dev/MAIN3AF + chown system camera /dev/SUBAF + chown system camera /dev/vpu + chown system camera /dev/apusys + chown system camera /dev/mtk_ccd + chown system camera /sys/kernel/debug/mtk_cam_dbg/0/ctrl + chown system camera /sys/kernel/debug/mtk_cam_dbg/1/ctrl + chown system camera /sys/kernel/debug/mtk_cam_dbg/2/ctrl + + #CCU + chmod 0660 /dev/ccu + chown system camera /dev/ccu + + #VOW + chmod 0640 /dev/vow + chown media media /dev/vow + + #MATV + chmod 0660 /dev/MATV + chown system media /dev/MATV + + # otg_test + chown root radio /dev/mt_otg_test + chmod 0660 /dev/mt_otg_test + + # MDP + chmod 0660 /dev/mt-mdp + chown system media /dev/mt-mdp + + # SMI + chmod 0660 /dev/MTK_SMI + chown media media /dev/MTK_SMI + + # MMQoS + chmod 0660 /sys/devices/platform/interconnect/mmqos_hrt/camera_max_bw + chown media media /sys/devices/platform/interconnect/mmqos_hrt/camera_max_bw + + # RRC + chmod 0660 /dev/mtk_rrc + chown media system /dev/mtk_rrc + + # DFRC + chmod 0660 /dev/mtk_dfrc + chown system graphics /dev/mtk_dfrc + + + #change partition permission + + chmod 0640 /mtd@sec_ro + chown root system /mtd@sec_ro + + chmod 0640 /mtd@preloader + chown root system /mtd@preloader + + chmod 0660 /mtd@pro_info + chown root system /mtd@pro_info + + chmod 0640 /mtd@bootimg + chown root system /mtd@bootimg + + chmod 0640 /mtd@recovery + chown root system /mtd@recovery + + chmod 0660 /mtd@nvram + chown root system /mtd@nvram + + chmod 0660 /mtd@seccfg + chown root system /mtd@seccfg + + chmod 0660 /mtd@misc + chown root system /mtd@misc + + chmod 0664 /sys/bus/platform/drivers/emi_ctrl/concurrency_scenario + chown media media /sys/bus/platform/drivers/emi_ctrl/concurrency_scenario + + #mtk_sched + chmod 0660 /dev/mtk_sched + chown system media /dev/mtk_sched + + #BT SCO CVSD, for MT6572 and MT6582 CVSD codec on AP + chmod 0660 /dev/ebc + chown media media /dev/ebc + + #usip + chmod 0660 /dev/usip + chown media media /dev/usip + + chmod 0666 /dev/uio0 + + #otp + chmod 0660 /proc/driver/otp + chown root system /proc/driver/otp + + # secure memory + chown system system /proc/secmem0 + + chmod 0666 /dev/exm0 + + + #Thermal + mkdir /data/vendor/.tp/ 0775 system system + mkdir /data/vendor/thermal/ 0775 system system + + #MCUPM log + chmod 0620 /sys/class/misc/mcupm/mcupm_mobile_log + chown root system /sys/class/misc/mcupm/mcupm_mobile_log + chmod 0440 /dev/mcupm + chown root system /dev/mcupm + + #EM of MT6360 + chmod 0664 sys/kernel/debug/rt-regmap/mt6360_pmu.5-0034/data + chmod 0664 sys/kernel/debug/rt-regmap/mt6360_pmic.5-001a/data + chmod 0664 sys/kernel/debug/rt-regmap/mt6360_ldo.5-0064/data + chmod 0664 sys/kernel/debug/rt-regmap/mt6360-4e/data + chmod 0664 sys/kernel/debug/rt-regmap/mt6360_pmu.5-0034/reg_addr + chmod 0664 sys/kernel/debug/rt-regmap/mt6360_pmic.5-001a/reg_addr + chmod 0664 sys/kernel/debug/rt-regmap/mt6360_ldo.5-0064/reg_addr + chmod 0664 sys/kernel/debug/rt-regmap/mt6360-4e/reg_addr + + #widevine driver node + chmod 0660 /dev/drm_wv + chown media system /dev/drm_wv + + # allow hfmanager + chown system system /dev/hf_manager + chmod 0666 /dev/hf_manager + +# End of adding by MTK drivers +# ----------------------- +on zygote-start + write /proc/bootprof "INIT:zygote-start" + +on early-boot + write /proc/bootprof "INIT:early-boot" + verity_update_state + +on boot + write /proc/bootprof "INIT:boot" + + write /proc/sys/vm/dirty_writeback_centisecs 300 + chmod 0660 /sys/power/autosleep + + chmod 0664 /sys/class/leds/lcd-backlight/brightness + chown system system /sys/class/leds/lcd-backlight/brightness + + # For vibrator + chown system system /sys/class/leds/vibrator/trigger + + chown system system /sys/devices/system/cpu/cpufreq/hotplug/cpu_num_base + chmod 0660 /sys/devices/system/cpu/cpufreq/hotplug/cpu_num_base + chown system system /sys/devices/system/cpu/cpufreq/policy0/scaling_governor + chmod 0660 /sys/devices/system/cpu/cpufreq/policy0/scaling_governor + chown system system /sys/devices/system/cpu/cpufreq/policy4/scaling_governor + chmod 0660 /sys/devices/system/cpu/cpufreq/policy4/scaling_governor + chown root system /sys/kernel/debug/binder/transaction_log_enable + chown root system /sys/kernel/debug/binder/perf_evalue + chown system system /sys/devices/system/cpu/rq-stats/htasks_thresh + chmod 0660 /sys/devices/system/cpu/rq-stats/htasks_thresh + chown system system /sys/devices/system/cpu/rq-stats/avg_htasks_thresh + chmod 0660 /sys/devices/system/cpu/rq-stats/avg_htasks_thresh + + chown system /sys/module/mlog/parameters/do_mlog + chown system /sys/module/mlog/parameters/timer_intval + + chown root radio /sys/class/leds/lcd-backlight/duty + chown root radio /sys/class/leds/lcd-backlight/div + chown system system /sys/class/leds/lcd-backlight/trigger + chown system system /sys/class/leds/button-backlight/trigger + chown system system /sys/class/leds/keyboard-backlight/trigger + chown system system /sys/class/leds/jogball-backlight/trigger + chown system system /sys/class/leds/red/trigger + chown system system /sys/class/leds/green/trigger + chown system system /sys/class/leds/blue/trigger + + ## prize added by chenwenhui 20240603 for factory SPC prizedualcam test start + chmod 0664 /sys/devices/platform/soc/11db3000.i2c/i2c-8/8-0040/open + chmod 0664 /sys/devices/platform/soc/11db3000.i2c/i2c-8/8-0040/value + chmod 0664 /sys/devices/platform/soc/11db3000.i2c/i2c-8/8-0040/close + chmod 0664 /sys/devices/platform/soc/11db3000.i2c/i2c-8/8-0040/type + + chown system system /sys/devices/platform/soc/11db3000.i2c/i2c-8/8-0040/open + chown system system /sys/devices/platform/soc/11db3000.i2c/i2c-8/8-0040/value + chown system system /sys/devices/platform/soc/11db3000.i2c/i2c-8/8-0040/close + chown system system /sys/devices/platform/soc/11db3000.i2c/i2c-8/8-0040/type + ## prize added by chenwenhui 20240603 for factory SPC prizedualcam test end + + # gauge symbolic + symlink /sys/devices/platform/soc/1c804000.spmi/spmi-0/0-04/mt6377-gauge /dev/gauge + symlink /sys/devices/platform/soc/11b21000.i2c/i2c-5/5-0034/11b21000.i2c:mt6375@34:mtk_gauge /dev/gauge + + # Permission for hibernation + chown radio system /sys/power/tuxonice + chown radio system /sys/power/tuxonice/do_hibernate + chmod 0770 /sys/power/tuxonice + chmod 0220 /sys/power/tuxonice/do_hibernate + + +# Smartbook Handler Framework + chown system system /sys/power/sb_state + chmod 0660 /sys/power/sb_state + +# HMP CPU hotplug strategy + chown system system /proc/hps/num_base_perf_serv + chmod 0660 /proc/hps/num_base_perf_serv + chown system system /proc/hps/num_limit_power_serv + chmod 0660 /proc/hps/num_limit_power_serv + chown system system /proc/hps/num_limit_ultra_power_saving + chmod 0660 /proc/hps/num_limit_ultra_power_saving + chown system system /proc/hps/down_threshold + chmod 0660 /proc/hps/down_threshold + chown system system /proc/hps/up_threshold + chmod 0660 /proc/hps/up_threshold + chown system system /proc/hps/rush_boost_enabled + chmod 0660 /proc/hps/rush_boost_enabled + chown system system /proc/hps/heavy_task_enabled + chmod 0660 /proc/hps/heavy_task_enabled + chown system system /proc/hps/power_mode + chmod 0660 /proc/hps/power_mode + chown system system /proc/hps/up_times + chmod 0660 /proc/hps/up_times + chown system system /proc/hps/down_times + chmod 0660 /proc/hps/down_times + +# PPM + chown system system /proc/ppm/mode + chmod 0660 /proc/ppm/mode + chown system system /proc/ppm/policy/perfserv_min_perf_idx + chmod 0440 /proc/ppm/policy/perfserv_min_perf_idx + chown system system /proc/ppm/policy/perfserv_max_perf_idx + chmod 0440 /proc/ppm/policy/perfserv_max_perf_idx + chown system system /proc/ppm/policy/perfserv_perf_idx + chmod 0660 /proc/ppm/policy/perfserv_perf_idx + chown system system /proc/ppm/policy/userlimit_min_cpu_freq + chmod 0660 /proc/ppm/policy/userlimit_min_cpu_freq + chown system system /proc/ppm/policy/userlimit_max_cpu_freq + chmod 0660 /proc/ppm/policy/userlimit_max_cpu_freq + chown system system /proc/ppm/policy/userlimit_min_cpu_core + chmod 0660 /proc/ppm/policy/userlimit_min_cpu_core + chown system system /proc/ppm/policy/userlimit_max_cpu_core + chmod 0660 /proc/ppm/policy/userlimit_max_cpu_core + chown system system /proc/ppm/policy/userlimit_cpu_core + chmod 0660 /proc/ppm/policy/userlimit_cpu_core + chown system system /proc/ppm/policy/userlimit_cpu_freq + chmod 0660 /proc/ppm/policy/userlimit_cpu_freq + chown system system /proc/ppm/dump_cluster_0_dvfs_table + chmod 0440 /proc/ppm/dump_cluster_0_dvfs_table + chown system system /proc/ppm/dump_cluster_1_dvfs_table + chmod 0440 /proc/ppm/dump_cluster_1_dvfs_table + chown system system /proc/ppm/dump_cluster_2_dvfs_table + chmod 0440 /proc/ppm/dump_cluster_2_dvfs_table + chown system system /proc/ppm/root_cluster + chmod 0660 /proc/ppm/root_cluster + chown system system /proc/ppm/policy/hica_variant + chmod 0660 /proc/ppm/policy/hica_variant + chown system system /proc/ppm/policy/hica_settings/L_ONLY_to_4L_LL/loading_hold_time + chmod 0660 /proc/ppm/policy/hica_settings/L_ONLY_to_4L_LL/loading_hold_time + +# cpu_loading + chown system system /proc/cpu_loading/onoff + chmod 0664 /proc/cpu_loading/onoff + chown system system /proc/cpu_loading/overThrhld + chmod 0664 /proc/cpu_loading/overThrhld + chown system system /proc/cpu_loading/poltime_nsecs + chmod 0664 /proc/cpu_loading/poltime_nsecs + chown system system /proc/cpu_loading/poltime_secs + chmod 0664 /proc/cpu_loading/poltime_secs + chown system system /proc/cpu_loading/uevent_enable + chmod 0664 /proc/cpu_loading/uevent_enable + +# CPU freq + chown system system /proc/cpufreq/cpufreq_limited_by_hevc + chmod 0660 /proc/cpufreq/cpufreq_limited_by_hevc + chown system system /proc/cpufreq/cpufreq_limited_max_freq_by_user + chmod 0660 /proc/cpufreq/cpufreq_limited_max_freq_by_user + chown system system /proc/cpufreq/cpufreq_power_mode + chmod 0660 /proc/cpufreq/cpufreq_power_mode + chown system system /proc/cpufreq/enable_hw_gov + chmod 0660 /proc/cpufreq/enable_hw_gov + +# BW monitor + chown system system /proc/fliperfs/cg_enable + chmod 0664 /proc/fliperfs/cg_enable + chown system system /proc/fliperfs/cg_threshold + chmod 0664 /proc/fliperfs/cg_threshold + chown system system /proc/fliperfs/cg_threshold_ddr3 + chmod 0664 /proc/fliperfs/cg_threshold_ddr3 + chown system system /proc/fliperfs/perf + chmod 0664 /proc/fliperfs/perf + +# perfmgr + chown system system /proc/perfmgr/smart/hps_is_heavy + chmod 0660 /proc/perfmgr/smart/hps_is_heavy + chown system system /proc/perfmgr/smart/hps_check_duration + chmod 0660 /proc/perfmgr/smart/hps_check_duration + chown system system /proc/perfmgr/smart/hps_check_last_duration + chmod 0660 /proc/perfmgr/smart/hps_check_last_duration + chown system system /proc/perfmgr/smart/hps_uevent_enable + chmod 0660 /proc/perfmgr/smart/hps_uevent_enable + chown system system /sys/power/dcm_state + chmod 0660 /sys/power/dcm_state + +##Netlog tool + #change permissions about terminal + chown root radio /proc/net/vlan/config + chmod 0640 /proc/net/vlan/config + chown root radio /proc/net/ip6_tables_matches + chown root radio /proc/net/ip6_tables_names + chown root radio /proc/net/ip6_tables_targets + chown root radio /proc/net/arp_tables_targets + chown root radio /proc/net/arp_tables_matches + chown root radio /proc/net/arp_tables_names + chown root radio /proc/net/ip_tables_targets + chown root radio /proc/net/ip_tables_matches + chown root radio /proc/net/ip_tables_names + chown root radio /proc/net/ip_conntrack_expect + chown root radio /proc/net/ip_conntrack + chown root radio /proc/net/nf_conntrack + chown root radio /proc/net/nf_conntrack_expect + chown root radio /proc/net/netfilter/nfnetlink_log + chown root radio /proc/net/netfilter/nfnetlink_queue + +# WMT proc + chown shell system /proc/driver/wmt_dbg + chown shell system /proc/driver/wmt_aee + +# define device for EMCSMDLOGGER + chown system radio /dev/ttyGS3 + chmod 0660 /dev/ttyGS3 + +#Define device for ATCID + chmod 660 /dev/ttyGS0 + chown system radio /dev/ttyGS0 + chmod 660 /dev/ttyGS1 + chown system radio /dev/ttyGS1 +#Power Manager + write /sys/power/pm_freeze_timeout 2000 + +on property:vold.decrypt=trigger_reset_main + write /proc/bootprof "INIT:vold.decrypt=trigger_reset_main" + setprop sys.boot_completed 0 + setprop dev.bootcomplete 0 + +on property:vold.decrypt=trigger_post_fs_data + write /proc/bootprof "INIT:vold.decrypt=trigger_post_fs_data" + +on property:vold.decrypt=trigger_restart_min_framework + write /proc/bootprof "INIT:vold.decrypt=trigger_restart_min_framework" + start msensord + start permission_check + +on property:vold.decrypt=trigger_restart_framework + write /proc/bootprof "INIT:vold.decrypt=trigger_restart_framework" + start msensord + start permission_check + +on property:vold.decrypt=trigger_shutdown_framework + write /proc/bootprof "INIT:vold.decrypt=trigger_shutdown_framework" + setprop sys.boot_completed 0 + setprop dev.bootcomplete 0 + +# bugreport is triggered by holding down volume down, volume up and power +service bugreport /system/bin/dumpstate -d -p -B -z \ + -o /data/user_de/0/com.android.shell/files/bugreports/bugreport + class late_start + user root + disabled + oneshot + keycodes 114 115 116 + +# end boot time fs tune +on property:sys.boot_completed=1 + write /sys/block/mmcblk0/queue/iostats 1 + write /sys/block/mmcblk0/queue/read_ahead_kb 512 + write /sys/block/mmcblk0/queue/nr_requests 128 + write /sys/block/sdc/queue/iostats 1 + write /sys/block/sdc/queue/read_ahead_kb 512 + write /sys/block/sdc/queue/nr_requests 128 + write /sys/block/dm-0/queue/read_ahead_kb 128 + write /sys/block/dm-1/queue/read_ahead_kb 128 + write /sys/block/dm-2/queue/read_ahead_kb 128 + write /sys/block/dm-3/queue/read_ahead_kb 128 + write /sys/block/dm-4/queue/read_ahead_kb 128 + write /sys/block/dm-5/queue/read_ahead_kb 128 + + +on property:sys.boot_completed=1 + write /proc/perfmgr/boost_ctrl/cpu_ctrl/boot_freq "-1 -1 -1 -1 -1 -1" + write /sys/devices/platform/boot_dramboost/dramboost/dramboost 0 + # allow hfmanager + chown system system /dev/hf_manager + chmod 0666 /dev/hf_manager + # stop bootprof + write /proc/bootprof 0 + +#service dpfd /vendor/bin/dpfd +# user root +# group system media + +# +# External Modme control related services +# + +# +# Modem related services (Begin) +# +##Add by T.Zh for ppp daemon +#service pppd /system/bin/pppd file /data/misc/ppp/ppp_options +# user root +# disabled +# oneshot +# +## +# +# Modem related services (End) +# + +#add for power-off alarm +#service poad /vendor/bin/poad +# class main +# user system +# group system +# oneshot + +#service BGW /vendor/xbin/BGW +# user system +# group gps system radio +# class main + +# Mount mdota +on property:ro.boot.slot_suffix=_a + # Set SELinux security contexts on upgrade or policy update. + mount ext4 /dev/block/by-name/mcf_ota_a /mnt/vendor/mdota ro wait noatime + +on property:ro.boot.slot_suffix=_b + # Set SELinux security contexts on upgrade or policy update. + mount ext4 /dev/block/by-name/mcf_ota_b /mnt/vendor/mdota ro wait noatime + +# Battery info +on property:persist.vendor.mediatek.fg.disable=1 + write /sys/devices/platform/soc/1c804000.spmi/spmi-0/0-04/mt6377-gauge/FG_daemon_disable 1 + write /dev/gauge/FG_daemon_disable 1 + +on property:persist.vendor.mediatek.fg.force25c=1 + write /sys/devices/platform/soc/1c804000.spmi/spmi-0/0-04/mt6377-gauge/Battery_Temperature 25 + write /dev/gauge/Battery_Temperature 25 + +on property:persist.vendor.mediatek.fg.force25c=0 + write /sys/devices/platform/soc/1c804000.spmi/spmi-0/0-04/mt6377-gauge/Battery_Temperature 65535 + write /dev/gauge/Battery_Temperature 65535 + +on property:persist.vendor.mediatek.fg.log.enable=1 + write /sys/devices/platform/soc/1c804000.spmi/spmi-0/0-04/mt6377-gauge/FG_daemon_log_level 7 + write /dev/gauge/FG_daemon_log_level 7 + write /proc/sys/kernel/printk 8 + +# add meta_tst for ATM +service meta_tst /vendor/bin/meta_tst + class core + user root + group radio gps system wifi audio bluetooth media + capabilities NET_RAW NET_ADMIN + socket meta-atci stream 660 radio system + disabled + oneshot + +service factory_no_image /vendor/bin/factory + user root + group radio system wifi media gps audio bluetooth wakelock nfc + capabilities BLOCK_SUSPEND NET_RAW NET_ADMIN SYS_ADMIN SYS_BOOT + socket factory-atci stream 660 radio system + disabled + oneshot + +# start meta_tst for ATM +on property:sys.boot_completed=1 && property:ro.boot.atm=enable + start meta_tst + start loghidlvendorservice + start loghidlsysservice + +# reset mdmode when modem crash happens in ATM +on property:vendor.mtk.md1.status=reset + setprop persist.vendor.atm.mdmode normal + +# MTK fast charging support +on property:persist.vendor.mediatek.fast_charging.support=* + write /sys/devices/platform/charger/fast_chg_indicator ${persist.vendor.mediatek.fast_charging.support} + +# FPSGO FBT Game +on boot + insmod /vendor/lib/modules/fpsgo.ko + +# VSIM service (vendor OSI) +service osi /system/bin/osi + class main + user root + disabled + oneshot + #seclabel u:r:osi:s0 + +service earlylog0 /system/bin/logcat -b all -f /metadata/logcat0 + class core + user root + disabled + oneshot + +service earlylog /system/bin/logcat -b all -f /metadata/logcat + class core + user root + disabled + oneshot + +#on late-fs +# rm /metadata/logcat +# start earlylog diff --git a/init/init.mt6835.usb.rc b/init/init.mt6835.usb.rc new file mode 100644 index 0000000..2bb507e --- /dev/null +++ b/init/init.mt6835.usb.rc @@ -0,0 +1,957 @@ +import /system_ext/etc/init/hw/init.usb.rc + +on early-init + +on post-fs + setprop vendor.usb.vid "0x0E8D" + mkdir /dev/usb-ffs 0775 shell shell + mkdir /dev/usb-ffs/adb 0770 shell shell + mkdir /config/usb_gadget/g1 0770 shell shell + write /config/usb_gadget/g1/idVendor ${vendor.usb.vid} + write /config/usb_gadget/g1/bcdDevice 0x0223 + write /config/usb_gadget/g1/bcdUSB 0x0200 + write /config/usb_gadget/g1/os_desc/use 1 + mkdir /config/usb_gadget/g1/strings/0x409 0770 + 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/ffs.adb + mkdir /config/usb_gadget/g1/functions/ffs.mtp + write /config/usb_gadget/g1/functions/ffs.mtp/os_desc/interface.MTP/compatible_id "MTP" + mkdir /config/usb_gadget/g1/functions/ffs.ptp + mkdir /config/usb_gadget/g1/functions/mtk_rndis.gs4 + mkdir /config/usb_gadget/g1/functions/midi.gs5 + mkdir /config/usb_gadget/g1/functions/acm.gs0 + mkdir /config/usb_gadget/g1/functions/acm.gs1 + mkdir /config/usb_gadget/g1/functions/acm.gs2 + mkdir /config/usb_gadget/g1/functions/acm.gs3 + mkdir /config/usb_gadget/g1/functions/mass_storage.usb0 + mkdir /config/usb_gadget/g1/functions/hid.gs0 + 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" + write /config/usb_gadget/g1/configs/b.1/MaxPower 500 + symlink /config/usb_gadget/g1/configs/b.1 /config/usb_gadget/g1/os_desc/b.1 + 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 + +on post-fs-data + mkdir /config/usb_gadget/g1/functions/via_modem.gs0 + mkdir /config/usb_gadget/g1/functions/via_ets.gs0 + mkdir /config/usb_gadget/g1/functions/via_atc.gs0 + +on boot + setprop sys.usb.configfs 1 + setprop sys.usb.controller "11201000.usb0" + setprop vendor.usb.controller "11201000.usb0" + setprop vendor.usb.acm_cnt 0 + setprop vendor.usb.acm_port0 "" + setprop vendor.usb.acm_port1 "" + setprop vendor.usb.acm_enable 0 + write /sys/class/android_usb/android0/f_mtp/cpu_mask 0x80 + write /sys/module/usb_f_mtp/parameters/mtp_rx_cont 1 + chmod 0664 /sys/class/android_usb/android0/iSerial + chown root system /sys/class/android_usb/android0/iSerial + + chown radio system /sys/class/usb_rawbulk/data/enable + chmod 0660 /sys/class/usb_rawbulk/data/enable + chown radio system /sys/class/usb_rawbulk/ets/enable + chmod 0660 /sys/class/usb_rawbulk/ets/enable + chown radio system /sys/class/usb_rawbulk/atc/enable + chmod 0660 /sys/class/usb_rawbulk/atc/enable + chown radio system /sys/class/usb_rawbulk/pcv/enable + chmod 0660 /sys/class/usb_rawbulk/pcv/enable + chown radio system /sys/class/usb_rawbulk/gps/enable + chmod 0660 /sys/class/usb_rawbulk/gps/enable + chown system radio /dev/ttyGS0 + chmod 0660 /dev/ttyGS0 + chown system radio /dev/ttyGS1 + chmod 0660 /dev/ttyGS1 + chown system radio /dev/ttyGS2 + chmod 0660 /dev/ttyGS2 + chown system radio /dev/ttyGS3 + chmod 0660 /dev/ttyGS3 + + # for usb otg sdcard hot plug detection + write /sys/module/block/parameters/events_dfl_poll_msecs 1000 + + # force on usb + # write /sys/class/udc/${sys.usb.controller}/device/mode 3 + +on charger + mkdir /dev/usb-ffs 0775 shell shell + mkdir /dev/usb-ffs/adb 0770 shell shell + mkdir /config/usb_gadget/g1 0770 shell shell + write /config/usb_gadget/g1/idVendor 0x0E8D + write /config/usb_gadget/g1/bcdDevice 0x0223 + write /config/usb_gadget/g1/bcdUSB 0x0200 + write /config/usb_gadget/g1/os_desc/use 1 + mkdir /config/usb_gadget/g1/strings/0x409 0770 + 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/ffs.adb + mkdir /config/usb_gadget/g1/functions/midi.gs5 + 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" + write /config/usb_gadget/g1/configs/b.1/MaxPower 500 + symlink /config/usb_gadget/g1/configs/b.1 /config/usb_gadget/g1/os_desc/b.1 + mount functionfs adb /dev/usb-ffs/adb rmode=0770,fmode=0660,uid=2000,gid=2000,no_disconnect=1 + setprop sys.usb.configfs 1 + setprop sys.usb.controller "11201000.usb0" + setprop vendor.usb.controller "11201000.usb0" + +# midi for kpoc +on property:ro.bootmode=charger && property:ro.debuggable=0 + setprop sys.usb.config kpoc_midi + +on property:ro.bootmode=charger && property:ro.debuggable=1 && property:ro.vendor.usb.kpoc_adb=0 + setprop sys.usb.config kpoc_midi + +on property:sys.usb.config=kpoc_midi && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "kpoc_midi" + write /config/usb_gadget/g1/idProduct 0x2046 + symlink /config/usb_gadget/g1/functions/midi.gs5 /config/usb_gadget/g1/configs/b.1/f1 + write /config/usb_gadget/g1/UDC ${vendor.usb.controller} + +# adb for kpoc +on property:ro.bootmode=charger && property:ro.debuggable=1 && property:ro.vendor.usb.kpoc_adb=1 + setprop sys.usb.config kpoc_adb + +on property:sys.usb.config=kpoc_adb && property:sys.usb.configfs=1 + start kpoc_adbd + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=kpoc_adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "kpoc_adb" + write /config/usb_gadget/g1/idProduct 0x201C + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1 + write /config/usb_gadget/g1/UDC ${vendor.usb.controller} + +### more command at init.usb.configfs.rc ### +on property:sys.usb.config=none && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/idVendor ${vendor.usb.vid} + 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 + rmdir /config/usb_gadget/g1/functions/mtk_rndis.gs4 + write /sys/class/udc/${vendor.usb.controller}/device/saving 0 + +### main function : adb ### +### start adbd at init.usb.configfs.rc ### +on property:sys.usb.config=adb && property:vendor.usb.acm_cnt=0 && \ +property:sys.usb.configfs=1 + setprop vendor.usb.pid 0x201C +on property:sys.usb.config=adb && property:vendor.usb.acm_cnt=1 && \ +property:sys.usb.configfs=1 + setprop vendor.usb.pid 0x2006 + setprop vendor.usb.acm_port1 "" +on property:sys.usb.config=adb && property:vendor.usb.acm_cnt=2 && \ +property:sys.usb.configfs=1 + setprop vendor.usb.pid 0x2029 + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=adb && \ +property:vendor.usb.acm_enable=1 && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "adb_acm" + write /config/usb_gadget/g1/idProduct ${vendor.usb.pid} + write /sys/class/udc/${vendor.usb.controller}/device/saving 1 + symlink /config/usb_gadget/g1/functions/mass_storage.usb0 /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/acm.gs${vendor.usb.acm_port0} /config/usb_gadget/g1/configs/b.1/f3 + symlink /config/usb_gadget/g1/functions/acm.gs${vendor.usb.acm_port1} /config/usb_gadget/g1/configs/b.1/f4 + write /config/usb_gadget/g1/UDC ${vendor.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=adb && \ +property:vendor.usb.acm_enable=0 && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "adb" + write /config/usb_gadget/g1/idProduct ${vendor.usb.pid} + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1 + write /config/usb_gadget/g1/UDC ${vendor.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +### main function : mtp ### +on property:sys.usb.config=mtp && property:vendor.usb.acm_cnt=0 && \ +property:sys.usb.configfs=1 + setprop vendor.usb.pid 0x2008 +on property:sys.usb.config=mtp && property:vendor.usb.acm_cnt=1 && \ +property:sys.usb.configfs=1 + setprop vendor.usb.pid 0x2012 + setprop vendor.usb.acm_port1 "" +on property:sys.usb.config=mtp && property:vendor.usb.acm_cnt=2 && \ +property:sys.usb.configfs=1 + setprop vendor.usb.pid 0x202A + +on property:sys.usb.config=mtp && property:vendor.usb.acm_enable=1 && \ +property:sys.usb.configfs=1 && property:vendor.usb.ffs.mtp.ready=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "mtp_acm" + write /config/usb_gadget/g1/idProduct ${vendor.usb.pid} + write /config/usb_gadget/g1/os_desc/use 1 + write /sys/class/udc/${vendor.usb.controller}/device/saving 1 + symlink /config/usb_gadget/g1/functions/ffs.mtp /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/acm.gs${vendor.usb.acm_port0} /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/acm.gs${vendor.usb.acm_port1} /config/usb_gadget/g1/configs/b.1/f3 + write /config/usb_gadget/g1/UDC ${vendor.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=mtp && property:vendor.usb.acm_enable=0 && \ +property:sys.usb.configfs=1 && property:vendor.usb.ffs.mtp.ready=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "mtp" + write /config/usb_gadget/g1/idProduct ${vendor.usb.pid} + write /config/usb_gadget/g1/os_desc/use 1 + write /sys/class/udc/${vendor.usb.controller}/device/saving 2 + symlink /config/usb_gadget/g1/functions/ffs.mtp /config/usb_gadget/g1/configs/b.1/f1 + write /config/usb_gadget/g1/UDC ${vendor.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +### start adbd at init.usb.configfs.rc ### +on property:sys.usb.config=mtp,adb && property:vendor.usb.acm_cnt=0 && \ +property:sys.usb.configfs=1 + setprop vendor.usb.pid 0x201D +on property:sys.usb.config=mtp,adb && property:vendor.usb.acm_cnt=1 && \ +property:sys.usb.configfs=1 + setprop vendor.usb.pid 0x200A + setprop vendor.usb.acm_port1 "" +on property:sys.usb.config=mtp,adb && property:vendor.usb.acm_cnt=2 && \ +property:sys.usb.configfs=1 + setprop vendor.usb.pid 0x2026 + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=mtp,adb && \ +property:vendor.usb.acm_enable=1 && property:sys.usb.configfs=1 && property:vendor.usb.ffs.mtp.ready=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "mtp_adb_acm" + write /config/usb_gadget/g1/idProduct ${vendor.usb.pid} + write /config/usb_gadget/g1/os_desc/use 1 + write /sys/class/udc/${vendor.usb.controller}/device/saving 1 + symlink /config/usb_gadget/g1/functions/ffs.mtp /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/acm.gs${vendor.usb.acm_port0} /config/usb_gadget/g1/configs/b.1/f3 + symlink /config/usb_gadget/g1/functions/acm.gs${vendor.usb.acm_port1} /config/usb_gadget/g1/configs/b.1/f4 + write /config/usb_gadget/g1/UDC ${vendor.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=mtp,adb && \ +property:vendor.usb.acm_enable=0 && property:sys.usb.configfs=1 && property:vendor.usb.ffs.mtp.ready=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "mtp_adb" + write /config/usb_gadget/g1/idProduct ${vendor.usb.pid} + write /config/usb_gadget/g1/os_desc/use 1 + symlink /config/usb_gadget/g1/functions/ffs.mtp /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 ${vendor.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +### main function : ptp ### +on property:sys.usb.config=ptp && property:vendor.usb.acm_cnt=0 && \ +property:sys.usb.configfs=1 + setprop vendor.usb.pid 0x200B +on property:sys.usb.config=ptp && property:vendor.usb.acm_cnt=1 && \ +property:sys.usb.configfs=1 + setprop vendor.usb.pid 0x2013 + setprop vendor.usb.acm_port1 "" +on property:sys.usb.config=ptp && property:vendor.usb.acm_cnt=2 && \ +property:sys.usb.configfs=1 + setprop vendor.usb.pid 0x202B + +on property:sys.usb.config=ptp && property:vendor.usb.acm_enable=1 && \ +property:sys.usb.configfs=1 && property:vendor.usb.ffs.ptp.ready=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ptp_acm" + write /config/usb_gadget/g1/idProduct ${vendor.usb.pid} + write /sys/class/udc/${vendor.usb.controller}/device/saving 1 + symlink /config/usb_gadget/g1/functions/ffs.ptp /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/acm.gs${vendor.usb.acm_port0} /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/acm.gs${vendor.usb.acm_port1} /config/usb_gadget/g1/configs/b.1/f3 + write /config/usb_gadget/g1/UDC ${vendor.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=ptp && property:vendor.usb.acm_enable=0 && \ +property:sys.usb.configfs=1 && property:vendor.usb.ffs.ptp.ready=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ptp" + write /config/usb_gadget/g1/idProduct ${vendor.usb.pid} + write /sys/class/udc/${vendor.usb.controller}/device/saving 2 + symlink /config/usb_gadget/g1/functions/ffs.ptp /config/usb_gadget/g1/configs/b.1/f1 + write /config/usb_gadget/g1/UDC ${vendor.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +### start adbd at init.usb.configfs.rc ### +on property:sys.usb.config=ptp,adb && property:vendor.usb.acm_cnt=0 && \ +property:sys.usb.configfs=1 + setprop vendor.usb.pid 0x200C +on property:sys.usb.config=ptp,adb && property:vendor.usb.acm_cnt=1 && \ +property:sys.usb.configfs=1 + setprop vendor.usb.pid 0x200D + setprop vendor.usb.acm_port1 "" +on property:sys.usb.config=ptp,adb && property:vendor.usb.acm_cnt=2 && \ +property:sys.usb.configfs=1 + setprop vendor.usb.pid 0x2027 + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=ptp,adb && \ +property:vendor.usb.acm_enable=1 && property:sys.usb.configfs=1 && property:vendor.usb.ffs.ptp.ready=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ptp_adb_acm" + write /config/usb_gadget/g1/idProduct ${vendor.usb.pid} + write /sys/class/udc/${vendor.usb.controller}/device/saving 1 + symlink /config/usb_gadget/g1/functions/ffs.ptp /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/acm.gs${vendor.usb.acm_port0} /config/usb_gadget/g1/configs/b.1/f3 + symlink /config/usb_gadget/g1/functions/acm.gs${vendor.usb.acm_port1} /config/usb_gadget/g1/configs/b.1/f4 + write /config/usb_gadget/g1/UDC ${vendor.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=ptp,adb && \ +property:vendor.usb.acm_enable=0 && property:sys.usb.configfs=1 && property:vendor.usb.ffs.ptp.ready=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ptp_adb" + write /config/usb_gadget/g1/idProduct ${vendor.usb.pid} + symlink /config/usb_gadget/g1/functions/ffs.ptp /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 ${vendor.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +### main function : rndis ### +on property:sys.usb.config=rndis && property:vendor.usb.acm_cnt=0 && \ +property:sys.usb.configfs=1 + setprop vendor.usb.pid 0x2004 +on property:sys.usb.config=rndis && property:vendor.usb.acm_cnt=1 && \ +property:sys.usb.configfs=1 + setprop vendor.usb.pid 0x2011 + setprop vendor.usb.acm_port1 "" +on property:sys.usb.config=rndis && property:vendor.usb.acm_cnt=2 && \ +property:sys.usb.configfs=1 + setprop vendor.usb.pid 0x202C + +on property:sys.usb.config=rndis && property:vendor.usb.acm_enable=1 && \ +property:sys.usb.configfs=1 + mkdir /config/usb_gadget/g1/functions/mtk_rndis.gs4 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ums_acm" + write /config/usb_gadget/g1/idProduct ${vendor.usb.pid} + write /sys/class/udc/${vendor.usb.controller}/device/saving 1 + symlink /config/usb_gadget/g1/functions/mtk_rndis.gs4 /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/acm.gs${vendor.usb.acm_port0} /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/acm.gs${vendor.usb.acm_port1} /config/usb_gadget/g1/configs/b.1/f3 + write /config/usb_gadget/g1/UDC ${vendor.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=rndis && property:vendor.usb.acm_enable=0 && \ +property:sys.usb.configfs=1 + mkdir /config/usb_gadget/g1/functions/mtk_rndis.gs4 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis" + write /config/usb_gadget/g1/idProduct ${vendor.usb.pid} + symlink /config/usb_gadget/g1/functions/mtk_rndis.gs4 /config/usb_gadget/g1/configs/b.1/f1 + write /config/usb_gadget/g1/UDC ${vendor.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=rndis,adb && property:vendor.usb.acm_cnt=0 && \ +property:sys.usb.configfs=1 + setprop vendor.usb.pid 0x2005 +on property:sys.usb.config=rndis,adb && property:vendor.usb.acm_cnt=1 && \ +property:sys.usb.configfs=1 + setprop vendor.usb.pid 0x2010 + setprop vendor.usb.acm_port1 "" +on property:sys.usb.config=rndis,adb && property:vendor.usb.acm_cnt=2 && \ +property:sys.usb.configfs=1 + setprop vendor.usb.pid 0x2028 + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,adb && \ +property:vendor.usb.acm_enable=1 && property:sys.usb.configfs=1 + mkdir /config/usb_gadget/g1/functions/mtk_rndis.gs4 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_adb_acm" + write /config/usb_gadget/g1/idProduct ${vendor.usb.pid} + write /sys/class/udc/${vendor.usb.controller}/device/saving 1 + symlink /config/usb_gadget/g1/functions/mtk_rndis.gs4 /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/acm.gs${vendor.usb.acm_port0} /config/usb_gadget/g1/configs/b.1/f3 + symlink /config/usb_gadget/g1/functions/acm.gs${vendor.usb.acm_port1} /config/usb_gadget/g1/configs/b.1/f4 + write /config/usb_gadget/g1/UDC ${vendor.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,adb && \ +property:vendor.usb.acm_enable=0 && property:sys.usb.configfs=1 + mkdir /config/usb_gadget/g1/functions/mtk_rndis.gs4 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_adb" + write /config/usb_gadget/g1/idProduct ${vendor.usb.pid} + symlink /config/usb_gadget/g1/functions/mtk_rndis.gs4 /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 ${vendor.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +### main function : midi ### +on property:sys.usb.config=midi && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/idProduct 0x2046 + +on property:sys.usb.config=midi,adb && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/idProduct 0x2048 + +### main function : accessory ### +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 + +### main function : audio_source ### +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 + +### main function : accessory,audio_source ### +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=via_bypass && property:vendor.usb.acm_cnt=0 && \ +property:sys.usb.configfs=1 + setprop vendor.usb.pid 0x2031 +on property:sys.usb.config=via_bypass && property:vendor.usb.acm_cnt=1 && \ +property:sys.usb.configfs=1 + setprop vendor.usb.pid 0x2033 + setprop vendor.usb.acm_port1 "" + +##via_modem,via_ets,via_atc,acm +on property:sys.usb.config=via_bypass && property:vendor.usb.acm_enable=1 && \ +property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "via_bypass" + write /config/usb_gadget/g1/idProduct ${vendor.usb.pid} + write /sys/class/udc/${vendor.usb.controller}/device/saving 1 + symlink /config/usb_gadget/g1/functions/via_modem.gs0 /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/via_ets.gs0 /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/via_atc.gs0 /config/usb_gadget/g1/configs/b.1/f3 + symlink /config/usb_gadget/g1/functions/acm.gs${vendor.usb.acm_port0} /config/usb_gadget/g1/configs/b.1/f4 + write /config/usb_gadget/g1/UDC ${vendor.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +##via_modem,via_ets,via_atc,adb +on property:sys.usb.config=via_bypass && property:vendor.usb.acm_enable=0 && \ +property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "via_bypass" + write /config/usb_gadget/g1/idProduct ${vendor.usb.pid} + write /sys/class/udc/${vendor.usb.controller}/device/saving 1 + symlink /config/usb_gadget/g1/functions/via_modem.gs0 /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/via_ets.gs0 /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/via_atc.gs0 /config/usb_gadget/g1/configs/b.1/f3 + write /config/usb_gadget/g1/UDC ${vendor.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=via_bypass,adb && property:vendor.usb.acm_cnt=0 && \ +property:sys.usb.configfs=1 + setprop vendor.usb.pid 0x2032 +on property:sys.usb.config=via_bypass,adb && property:vendor.usb.acm_cnt=1 && \ +property:sys.usb.configfs=1 + setprop vendor.usb.pid 0x2034 + setprop vendor.usb.acm_port1 "" +on property:sys.usb.config=via_bypass,adb && property:vendor.usb.acm_cnt=2 && \ +property:sys.usb.configfs=1 + setprop vendor.usb.pid 0x2050 + +on property:sys.usb.config=via_bypass,adb && property:sys.usb.configfs=1 + start adbd + +##via_modem,via_ets,via_atc,adb,acm +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=via_bypass,adb && \ +property:vendor.usb.acm_enable=1 && property:vendor.usb.acm_cnt=1 && \ +property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_adb_acm" + write /config/usb_gadget/g1/idProduct ${vendor.usb.pid} + write /sys/class/udc/${vendor.usb.controller}/device/saving 1 + symlink /config/usb_gadget/g1/functions/via_modem.gs0 /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/via_ets.gs0 /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/via_atc.gs0 /config/usb_gadget/g1/configs/b.1/f3 + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f4 + symlink /config/usb_gadget/g1/functions/acm.gs${vendor.usb.acm_port0} /config/usb_gadget/g1/configs/b.1/f5 + write /config/usb_gadget/g1/UDC ${vendor.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +##via_modem,acm,adb +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=via_bypass,adb && \ +property:vendor.usb.acm_enable=1 && property:vendor.usb.acm_cnt=2 && \ +property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_adb_acm2" + write /config/usb_gadget/g1/idProduct ${vendor.usb.pid} + write /sys/class/udc/${vendor.usb.controller}/device/saving 1 + symlink /config/usb_gadget/g1/functions/via_modem.gs0 /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/acm.gs${vendor.usb.acm_port0} /config/usb_gadget/g1/configs/b.1/f3 + symlink /config/usb_gadget/g1/functions/acm.gs${vendor.usb.acm_port1} /config/usb_gadget/g1/configs/b.1/f4 + write /config/usb_gadget/g1/UDC ${vendor.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +##via_modem,via_ets,via_atc,adb +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=via_bypass,adb && \ +property:vendor.usb.acm_enable=0 && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_adb" + write /config/usb_gadget/g1/idProduct ${vendor.usb.pid} + write /sys/class/udc/${vendor.usb.controller}/device/saving 1 + symlink /config/usb_gadget/g1/functions/via_modem.gs0 /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/via_ets.gs0 /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/via_atc.gs0 /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 ${vendor.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +### main function : mass_storage ### +on property:sys.usb.config=mass_storage && property:vendor.usb.acm_cnt=0 && \ +property:sys.usb.configfs=1 + setprop vendor.usb.pid 0x2002 +on property:sys.usb.config=mass_storage && property:vendor.usb.acm_cnt=1 && \ +property:sys.usb.configfs=1 + setprop vendor.usb.pid 0x200F + setprop vendor.usb.acm_port1 "" +on property:sys.usb.config=mass_storage && property:vendor.usb.acm_cnt=2 && \ +property:sys.usb.configfs=1 + setprop vendor.usb.pid 0x202D + +on property:sys.usb.config=mass_storage && property:vendor.usb.acm_enable=1 && \ +property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ums_acm" + write /config/usb_gadget/g1/idProduct ${vendor.usb.pid} + write /sys/class/udc/${vendor.usb.controller}/device/saving 1 + symlink /config/usb_gadget/g1/functions/mass_storage.usb0 /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/acm.gs${vendor.usb.acm_port0} /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/acm.gs${vendor.usb.acm_port1} /config/usb_gadget/g1/configs/b.1/f3 + write /config/usb_gadget/g1/UDC ${vendor.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=mass_storage && property:vendor.usb.acm_enable=0 && \ +property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ums" + write /config/usb_gadget/g1/idProduct ${vendor.usb.pid} + symlink /config/usb_gadget/g1/functions/mass_storage.usb0 /config/usb_gadget/g1/configs/b.1/f1 + write /config/usb_gadget/g1/UDC ${vendor.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=mass_storage,adb && property:vendor.usb.acm_cnt=0 && \ +property:sys.usb.configfs=1 + setprop vendor.usb.pid 0x2003 +on property:sys.usb.config=mass_storage,adb && property:vendor.usb.acm_cnt=1 && \ +property:sys.usb.configfs=1 + setprop vendor.usb.pid 0x2006 + setprop vendor.usb.acm_port1 "" +on property:sys.usb.config=mass_storage,adb && property:vendor.usb.acm_cnt=2 && \ +property:sys.usb.configfs=1 + setprop vendor.usb.pid 0x2029 + +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:vendor.usb.acm_enable=1 && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ums_adb_acm" + write /config/usb_gadget/g1/idProduct ${vendor.usb.pid} + write /sys/class/udc/${vendor.usb.controller}/device/saving 1 + symlink /config/usb_gadget/g1/functions/mass_storage.usb0 /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/acm.gs${vendor.usb.acm_port0} /config/usb_gadget/g1/configs/b.1/f3 + symlink /config/usb_gadget/g1/functions/acm.gs${vendor.usb.acm_port1} /config/usb_gadget/g1/configs/b.1/f4 + write /config/usb_gadget/g1/UDC ${vendor.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=mass_storage,adb && \ +property:vendor.usb.acm_enable=0 && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ums_adb" + write /config/usb_gadget/g1/idProduct ${vendor.usb.pid} + symlink /config/usb_gadget/g1/functions/mass_storage.usb0 /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 ${vendor.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +### main function : bicr ### +on property:sys.usb.config=bicr && property:vendor.usb.acm_cnt=0 && \ +property:sys.usb.configfs=1 + setprop vendor.usb.pid 0x2002 +on property:sys.usb.config=bicr && property:vendor.usb.acm_cnt=1 && \ +property:sys.usb.configfs=1 + setprop vendor.usb.pid 0x200F + setprop vendor.usb.acm_port1 "" +on property:sys.usb.config=bicr && property:vendor.usb.acm_cnt=2 && \ +property:sys.usb.configfs=1 + setprop vendor.usb.pid 0x202D + +on property:sys.usb.config=bicr && property:vendor.usb.acm_enable=1 && \ +property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ums_acm" + write /config/usb_gadget/g1/idProduct ${vendor.usb.pid} + write /sys/class/udc/${vendor.usb.controller}/device/saving 1 + write /config/usb_gadget/g1/functions/mass_storage.usb0/lun.0/cdrom 1 + write /config/usb_gadget/g1/functions/mass_storage.usb0/lun.0/file "/dev/block/loop0" + symlink /config/usb_gadget/g1/functions/mass_storage.usb0 /config/usb_gadget/g1/configs/b.1/f1 + symlink /config/usb_gadget/g1/functions/acm.gs${vendor.usb.acm_port0} /config/usb_gadget/g1/configs/b.1/f2 + symlink /config/usb_gadget/g1/functions/acm.gs${vendor.usb.acm_port1} /config/usb_gadget/g1/configs/b.1/f3 + write /config/usb_gadget/g1/UDC ${vendor.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=bicr && property:vendor.usb.acm_enable=0 && \ +property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ums" + write /config/usb_gadget/g1/idProduct ${vendor.usb.pid} + write /config/usb_gadget/g1/functions/mass_storage.usb0/lun.0/cdrom 1 + write /config/usb_gadget/g1/functions/mass_storage.usb0/lun.0/file "/dev/block/loop0" + symlink /config/usb_gadget/g1/functions/mass_storage.usb0 /config/usb_gadget/g1/configs/b.1/f1 + write /config/usb_gadget/g1/UDC ${vendor.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=bicr,adb && property:vendor.usb.acm_cnt=0 && \ +property:sys.usb.configfs=1 + setprop vendor.usb.pid 0x2003 +on property:sys.usb.config=bicr,adb && property:vendor.usb.acm_cnt=1 && \ +property:sys.usb.configfs=1 + setprop vendor.usb.pid 0x2006 + setprop vendor.usb.acm_port1 "" +on property:sys.usb.config=bicr,adb && property:vendor.usb.acm_cnt=2 && \ +property:sys.usb.configfs=1 + setprop vendor.usb.pid 0x2029 + +on property:sys.usb.config=bicr,adb && property:sys.usb.configfs=1 + start adbd + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=bicr,adb && \ +property:vendor.usb.acm_enable=1 && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ums_adb_acm" + write /config/usb_gadget/g1/idProduct ${vendor.usb.pid} + write /sys/class/udc/${vendor.usb.controller}/device/saving 1 + write /config/usb_gadget/g1/functions/mass_storage.usb0/lun.0/cdrom 1 + write /config/usb_gadget/g1/functions/mass_storage.usb0/lun.0/file "/dev/block/loop0" + symlink /config/usb_gadget/g1/functions/mass_storage.usb0 /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/acm.gs${vendor.usb.acm_port0} /config/usb_gadget/g1/configs/b.1/f3 + symlink /config/usb_gadget/g1/functions/acm.gs${vendor.usb.acm_port1} /config/usb_gadget/g1/configs/b.1/f4 + write /config/usb_gadget/g1/UDC ${vendor.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.ffs.ready=1 && property:sys.usb.config=bicr,adb && \ +property:vendor.usb.acm_enable=0 && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ums_adb" + write /config/usb_gadget/g1/idProduct ${vendor.usb.pid} + write /config/usb_gadget/g1/functions/mass_storage.usb0/lun.0/cdrom 1 + write /config/usb_gadget/g1/functions/mass_storage.usb0/lun.0/file "/dev/block/loop0" + symlink /config/usb_gadget/g1/functions/mass_storage.usb0 /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 ${vendor.usb.controller} + setprop sys.usb.state ${sys.usb.config} + +### ACM APPEND SERIES ### +on property:persist.vendor.radio.port_index="0" && property:sys.boot_completed=1 + setprop vendor.usb.acm_idx "" + setprop vendor.usb.acm_cnt 0 + setprop vendor.usb.acm_enable 0 + setprop sys.usb.config none + setprop sys.usb.config ${sys.usb.state} + +on property:persist.vendor.radio.port_index="1" && property:sys.boot_completed=1 + setprop sys.usb.config acm_gs0 +on property:sys.usb.config=mass_storage,adb,acm + setprop sys.usb.config acm_gs0 +on property:sys.usb.config=acm_gs0 + setprop vendor.usb.acm_port0 0 + setprop vendor.usb.acm_port1 "" + setprop vendor.usb.acm_cnt 1 + setprop vendor.usb.acm_enable 1 + setprop sys.usb.config none + setprop sys.usb.config ${sys.usb.state} + setprop vendor.usb.acm_idx "1" + +on property:persist.vendor.radio.port_index="2" && property:sys.boot_completed=1 + setprop sys.usb.config acm_gs1 +on property:sys.usb.config=acm_gs1 + setprop vendor.usb.acm_port0 1 + setprop vendor.usb.acm_port1 "" + setprop vendor.usb.acm_cnt 1 + setprop vendor.usb.acm_enable 1 + setprop sys.usb.config none + setprop sys.usb.config ${sys.usb.state} + setprop vendor.usb.acm_idx "2" + +on property:persist.vendor.radio.port_index="3" && property:sys.boot_completed=1 + setprop sys.usb.config acm_gs2 +on property:sys.usb.config=acm_third + setprop sys.usb.config acm_gs2 +on property:sys.usb.config=acm_gs2 + setprop vendor.usb.acm_port0 2 + setprop vendor.usb.acm_port1 "" + setprop vendor.usb.acm_cnt 1 + setprop vendor.usb.acm_enable 1 + setprop sys.usb.config none + setprop sys.usb.config ${sys.usb.state} + setprop vendor.usb.acm_idx "3" + +on property:persist.vendor.radio.port_index="4" && property:sys.boot_completed=1 + setprop sys.usb.config acm_gs3 +on property:sys.usb.config=gs3 + setprop sys.usb.config acm_gs3 +on property:sys.usb.config=mtp,gs3 + setprop sys.usb.config acm_gs3 +on property:sys.usb.config=acm_gs3 + setprop vendor.usb.acm_port0 3 + setprop vendor.usb.acm_port1 "" + setprop vendor.usb.acm_cnt 1 + setprop vendor.usb.acm_enable 1 + setprop sys.usb.config none + setprop sys.usb.config ${sys.usb.state} + setprop vendor.usb.acm_idx "4" + +on property:sys.usb.config=mtp,gs0gs1 + setprop sys.usb.config acm_gs0gs1 +on property:sys.usb.config=gs0gs1 + setprop sys.usb.config acm_gs0gs1 +on property:sys.usb.config=rndis,gs0gs1 + setprop sys.usb.config acm_gs0gs1 +on property:sys.usb.config=rndis,adb,gs0gs1 + setprop sys.usb.config acm_gs0gs1 +on property:sys.usb.config=acm_gs0gs1 + setprop vendor.usb.acm_port0 0 + setprop vendor.usb.acm_port1 1 + setprop vendor.usb.acm_cnt 2 + setprop vendor.usb.acm_enable 1 + setprop sys.usb.config none + setprop sys.usb.config ${sys.usb.state} + setprop vendor.usb.acm_idx "1,2" + +on property:persist.vendor.radio.port_index="1,4" && property:sys.boot_completed=1 + setprop sys.usb.config acm_gs0gs3 +on property:sys.usb.config=gs3,dual_acm + setprop sys.usb.config acm_gs0gs3 +on property:sys.usb.config=mtp,gs3,dual_acm + setprop sys.usb.config acm_gs0gs3 +on property:sys.usb.config=mtp,gs0gs3 + setprop sys.usb.config acm_gs0gs3 +on property:sys.usb.config=gs0gs3 + setprop sys.usb.config acm_gs0gs3 +on property:sys.usb.config=rndis,gs0gs3 + setprop sys.usb.config acm_gs0gs3 +on property:sys.usb.config=rndis,adb,gs0gs3 + setprop sys.usb.config acm_gs0gs3 +on property:sys.usb.config=acm_gs0gs3 + setprop vendor.usb.acm_port0 0 + setprop vendor.usb.acm_port1 3 + setprop vendor.usb.acm_cnt 2 + setprop vendor.usb.acm_enable 1 + setprop sys.usb.config none + setprop sys.usb.config ${sys.usb.state} + setprop vendor.usb.acm_idx "1,4" + +on property:sys.usb.config=gs1gs3 + setprop sys.usb.config acm_gs1gs3 +on property:sys.usb.config=mtp,gs1gs3 + setprop sys.usb.config acm_gs1gs3 +on property:sys.usb.config=via_bypass,gs1gs3 + setprop sys.usb.config acm_gs1gs3 +on property:sys.usb.config=rndis,gs1gs3 + setprop sys.usb.config acm_gs1gs3 +on property:sys.usb.config=acm_gs1gs3 + setprop vendor.usb.acm_port0 1 + setprop vendor.usb.acm_port1 3 + setprop vendor.usb.acm_cnt 2 + setprop vendor.usb.acm_enable 1 + setprop sys.usb.config none + setprop sys.usb.config ${sys.usb.state} + setprop vendor.usb.acm_idx "2,4" + +# For ATM (Android Test Mode) +on property:vendor.usb.clear=1 && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/UDC "none" + write /config/usb_gadget/g1/bDeviceClass 0 + write /config/usb_gadget/g1/bDeviceSubClass 0 + write /config/usb_gadget/g1/bDeviceProtocol 0 + 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 + rmdir /config/usb_gadget/g1/functions/mtk_rndis.gs4 + write /sys/class/udc/${vendor.usb.controller}/device/saving 0 + setprop vendor.usb.clear 2 + +# has permission issue when read from ${sys.usb.ffs.ready} +on property:sys.usb.ffs.ready=0 + setprop vendor.usb.ffs.ready 0 +on property:sys.usb.ffs.ready=1 + setprop vendor.usb.ffs.ready 1 + +on property:sys.usb.config=atm_gs0 && property:sys.usb.configfs=1 + stop adbd + setprop vendor.usb.ffs.ready 0 + setprop vendor.usb.clear 1 + +on property:vendor.usb.ffs.ready=0 && property:sys.usb.config=atm_gs0 && \ +property:vendor.usb.clear=2 && property:sys.usb.configfs=1 + start adbd + +on property:vendor.usb.ffs.ready=1 && property:sys.usb.config=atm_gs0 && \ +property:vendor.usb.clear=2 && property:sys.usb.configfs=1 + setprop vendor.usb.acm_port0 0 + setprop vendor.usb.acm_port1 "" + setprop vendor.usb.acm_cnt 1 + setprop vendor.usb.acm_enable 1 + write /sys/class/udc/${vendor.usb.controller}/device/saving 1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "atm_gs0" + write /config/usb_gadget/g1/idProduct 0x200A + symlink /config/usb_gadget/g1/functions/ffs.mtp /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/acm.gs0 /config/usb_gadget/g1/configs/b.1/f3 + write /config/usb_gadget/g1/UDC ${vendor.usb.controller} + #setprop sys.usb.state ${sys.usb.config} + setprop vendor.usb.pid 0x200A + #setprop vendor.usb.clear 0 + setprop vendor.usb.acm_idx "1" + +on property:sys.usb.config=atm_gs0gs3 && property:sys.usb.configfs=1 + stop adbd + setprop vendor.usb.ffs.ready 0 + setprop vendor.usb.clear 1 + +on property:vendor.usb.ffs.ready=0 && property:sys.usb.config=atm_gs0gs3 && \ +property:vendor.usb.clear=2 && property:sys.usb.configfs=1 + start adbd + +on property:vendor.usb.ffs.ready=1 && property:sys.usb.config=atm_gs0gs3 && \ +property:vendor.usb.clear=2 && property:sys.usb.configfs=1 + setprop vendor.usb.acm_port0 0 + setprop vendor.usb.acm_port1 3 + setprop vendor.usb.acm_cnt 2 + setprop vendor.usb.acm_enable 1 + write /sys/class/udc/${vendor.usb.controller}/device/saving 1 + write /config/usb_gadget/g1/idProduct 0x2026 + symlink /config/usb_gadget/g1/functions/ffs.mtp /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/acm.gs0 /config/usb_gadget/g1/configs/b.1/f3 + symlink /config/usb_gadget/g1/functions/acm.gs3 /config/usb_gadget/g1/configs/b.1/f4 + write /config/usb_gadget/g1/UDC ${vendor.usb.controller} + #setprop sys.usb.state ${sys.usb.config} + setprop vendor.usb.pid 0x2026 + #setprop vendor.usb.clear 0 + setprop vendor.usb.acm_idx "1,4" + +### CHARGING ### +on property:sys.usb.config=cdp && property:sys.usb.configfs=1 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "mtp" + write /config/usb_gadget/g1/idProduct 0x2008 + write /config/usb_gadget/g1/os_desc/use 1 + symlink /config/usb_gadget/g1/functions/ffs.mtp /config/usb_gadget/g1/configs/b.1/f1 + write /config/usb_gadget/g1/UDC ${vendor.usb.controller} + setprop sys.usb.state ${sys.usb.config} + setprop vendor.usb.pid 0x2008 + +on property:sys.usb.config=charging_yes + setprop vendor.usb.charging yes + setprop sys.usb.config none + setprop sys.usb.config ${sys.usb.state} + +on property:sys.usb.config=charging_no + setprop sys.usb.config none + setprop sys.usb.config ${sys.usb.state} + setprop vendor.usb.charging no + +on property:vendor.usb.charging=yes + write /sys/class/udc/${vendor.usb.controller}/device/mode 0 +on property:vendor.usb.charging=no + write /sys/class/udc/${vendor.usb.controller}/device/mode 1 + +on property:vendor.usb.bicr=yes + write /sys/class/android_usb/android0/f_mass_storage/bicr 1 + write /sys/class/android_usb/android0/f_mass_storage/lun/file "/dev/block/loop0" +on property:vendor.usb.bicr=no + write /sys/class/android_usb/android0/f_mass_storage/bicr 0 + write /sys/class/android_usb/android0/f_mass_storage/lun/file "off" + +on property:vendor.em.usb.set=term_sel + write /proc/mtk_usb/usb-phy0/u2_phy/term_sel ${vendor.em.usb.value} +on property:vendor.em.usb.set=vrt_sel + write /proc/mtk_usb/usb-phy0/u2_phy/vrt_sel ${vendor.em.usb.value} +on property:vendor.em.usb.set=phy_rev6 + write /proc/mtk_usb/usb-phy0/u2_phy/phy_rev6 ${vendor.em.usb.value} +on property:vendor.em.usb.set=discth + write /proc/mtk_usb/usb-phy0/u2_phy/discth ${vendor.em.usb.value} + +on property:vendor.em.usb.bypass.enable=0 + write /sys/class/usb_rawbulk/gps/enable 1 +on property:vendor.em.usb.bypass.enable=1 + write /sys/class/usb_rawbulk/pcv/enable 1 +on property:vendor.em.usb.bypass.enable=2 + write /sys/class/usb_rawbulk/atc/enable 1 +on property:vendor.em.usb.bypass.enable=3 + write /sys/class/usb_rawbulk/ets/enable 1 +on property:vendor.em.usb.bypass.enable=4 + write /sys/class/usb_rawbulk/data/enable 1 +on property:vendor.em.usb.bypass.disable=0 + write /sys/class/usb_rawbulk/gps/enable 0 +on property:vendor.em.usb.bypass.disable=1 + write /sys/class/usb_rawbulk/pcv/enable 0 +on property:vendor.em.usb.bypass.disable=2 + write /sys/class/usb_rawbulk/atc/enable 0 +on property:vendor.em.usb.bypass.disable=3 + write /sys/class/usb_rawbulk/ets/enable 0 +on property:vendor.em.usb.bypass.disable=4 + write /sys/class/usb_rawbulk/data/enable 0 + +### vendor process start ### +on property:vendor.usb.config=* + setprop sys.usb.config ${vendor.usb.config} +### vendor process end ### + +### test command start ### +on property:vendor.usb.test=* + setprop sys.usb.config none + setprop sys.usb.config ${vendor.usb.test} +### test command end ### + +on property:vendor.usb.printk=* + write /proc/sys/kernel/printk ${vendor.usb.printk} + +on property:persist.vendor.usb.printk=* + setprop vendor.usb.printk ${persist.vendor.usb.printk} + +on property:vendor.usb.speed.mode=u3 + write /sys/class/udc/${vendor.usb.controller}/device/max_speed super-speed + write /sys/class/udc/${vendor.usb.controller}/device/mode 0 + write /sys/class/udc/${vendor.usb.controller}/device/mode 1 + +on property:vendor.usb.speed.mode=u2 + write /sys/class/udc/${vendor.usb.controller}/device/max_speed high-speed + write /sys/class/udc/${vendor.usb.controller}/device/mode 0 + write /sys/class/udc/${vendor.usb.controller}/device/mode 1 + +on property:persist.vendor.usb.speed.mode=u3 + write /sys/class/udc/${vendor.usb.controller}/device/max_speed super-speed + write /sys/class/udc/${vendor.usb.controller}/device/mode 0 + write /sys/class/udc/${vendor.usb.controller}/device/mode 1 + +on property:persist.vendor.usb.speed.mode=u2 + write /sys/class/udc/${vendor.usb.controller}/device/max_speed high-speed + write /sys/class/udc/${vendor.usb.controller}/device/mode 0 + write /sys/class/udc/${vendor.usb.controller}/device/mode 1 + +on property:vendor.usb.sib_enable=1 + write /proc/mtk_usb/usb-phy0/u3_phy/sib 1 + +on property:vendor.usb.sib_enable=0 + write /proc/mtk_usb/usb-phy0/u3_phy/sib 0 + +on property:vendor.usb.testmode=0 + write /proc/mtk_usb/xhci0/testmode "0" +on property:vendor.usb.testmode=1 + write /proc/mtk_usb/xhci0/testmode "test SE0 NAK" +on property:vendor.usb.testmode=2 + write /proc/mtk_usb/xhci0/testmode "test J" +on property:vendor.usb.testmode=3 + write /proc/mtk_usb/xhci0/testmode "test K" +on property:vendor.usb.testmode=4 + write /proc/mtk_usb/xhci0/testmode "test packet" + +on property:vendor.usb.device.wakeup=* + write ${vendor.usb.device.wakeup} "enabled" + +### PLATFORM VARIANT, cat $rc_file | grep write | sort | grep -vE "android0|usb20_phy" | awk '{print $2}' | uniq ### diff --git a/init/init.mtkgki.rc b/init/init.mtkgki.rc new file mode 100644 index 0000000..3bda127 --- /dev/null +++ b/init/init.mtkgki.rc @@ -0,0 +1,11 @@ +service insmod_sh /vendor/bin/init.insmod.sh /vendor/etc/init.insmod.${ro.hardware}.cfg + class main + user root + group root system + disabled + oneshot + +on early-init + setprop vendor.all.modules.ready 0 + write /proc/bootprof "modprobe: Load_Module_START" + start insmod_sh diff --git a/init/init.project.rc b/init/init.project.rc new file mode 100644 index 0000000..3df652a --- /dev/null +++ b/init/init.project.rc @@ -0,0 +1,66 @@ +import /vendor/etc/init/hw/init.mtkgki.rc + +# MTK project .rc configure + +on init + mkdir /mnt/media_rw/usbotg 0700 media_rw media_rw + mkdir /storage/usbotg 0700 root root + +on post-fs-data + +#Camera + chmod 0660 /dev/MAINAF + chown system camera /dev/MAINAF + + chmod 0660 /dev/MAINAF2 + chown system camera /dev/MAINAF2 + + chmod 0660 /dev/SUBAF + chown system camera /dev/SUBAF + + chmod 0660 /dev/GAF001AF + chown system camera /dev/GAF001AF + + chmod 0660 /dev/DW9714AF + chown system camera /dev/DW9714AF + + chmod 0660 /dev/LC898212AF + chown system camera /dev/LC898212AF + + chmod 0660 /dev/BU64745GWZAF + chown system camera /dev/BU64745GWZAF + +#SMB + chown system system /proc/smb/ScreenComm + chmod 0660 /proc/smb/ScreenComm + + chmod 0660 /dev/spm + chown system system /dev/spm + +#fingerprint + chown system system /dev/spidev1.0 + chmod 0666 /dev/focaltech_fp + chmod 0666 /dev/spidev1.0 + +on init + # Refer to http://source.android.com/devices/tech/storage/index.html + # It said, "Starting in Android 4.4, multiple external storage devices are surfaced to developers through + # Context.getExternalFilesDirs(), Context.getExternalCacheDirs(), and Context.getObbDirs(). + # External storage devices surfaced through these APIs must be a semi-permanent part of the device (such as an SD card slot in a battery compartment). + # Developers expect data stored in these locations to be available over long periods of time." + # Therefore, if the target doesn't support sd hot-plugging (Ex: the SD card slot in a battery compartment), we need to export SECONDARY_STORAGE in 'boot' section + # + # export SECONDARY_STORAGE /storage/sdcard1 + +service fuse_usbotg /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/usbotg /storage/usbotg + class late_start + user media_rw + disabled + +# start mmstat +on property:sys.boot_completed=1 + mkdir /sys/kernel/tracing/instances/mmstat 711 + write /sys/kernel/tracing/instances/mmstat/tracing_on 0 + write /sys/kernel/tracing/instances/mmstat/buffer_size_kb 16 + write /sys/kernel/tracing/instances/mmstat/events/mmstat/enable 1 + write /sys/kernel/tracing/instances/mmstat/tracing_on 1 diff --git a/init/init.recovery.mt6835.rc b/init/init.recovery.mt6835.rc new file mode 100644 index 0000000..69f49c0 --- /dev/null +++ b/init/init.recovery.mt6835.rc @@ -0,0 +1,27 @@ +import /init.recovery.project.rc + +on init + setprop sys.usb.configfs 1 + setprop sys.usb.controller "11201000.usb0" + +on fs && property:ro.debuggable=0 + # distinguish USB shoulde connect or not, i.e. CDP vs SDP + # set charging free due to it wait for USB activation + +on post-fs + # Support A/B feature for EMMC and UFS boot region + symlink /dev/block/sda /dev/block/mmcblk0boot0 + symlink /dev/block/sdb /dev/block/mmcblk0boot1 + symlink /dev/block/mmcblk0boot0 /dev/block/by-name/preloader_a + symlink /dev/block/mmcblk0boot1 /dev/block/by-name/preloader_b + + # Support A/B feature for combo emmc and ufs OTA update + symlink /dev/block/by-name/preloader_a /dev/block/by-name/preloader_emmc_a + symlink /dev/block/by-name/preloader_b /dev/block/by-name/preloader_emmc_b + symlink /dev/block/by-name/preloader_a /dev/block/by-name/preloader_ufs_a + symlink /dev/block/by-name/preloader_b /dev/block/by-name/preloader_ufs_b + + exec u:r:update_engine:s0 root root -- /system/bin/mtk_plpath_utils + + symlink /dev/block/mapper/pl_a /dev/block/by-name/preloader_raw_a + symlink /dev/block/mapper/pl_b /dev/block/by-name/preloader_raw_b diff --git a/init/init.sensor_2_0.rc b/init/init.sensor_2_0.rc new file mode 100644 index 0000000..41ebec3 --- /dev/null +++ b/init/init.sensor_2_0.rc @@ -0,0 +1,11 @@ +# MTK platform .rc configure +on post-fs-data + # calibration + mkdir /data/vendor/sensor 0774 system system + # Sensor add by driver for hf_manager Permissions + chmod 0666 /dev/hf_manager + chown system system /dev/hf_manager +# drv modified by gongtaitao for send lcm param to light sensor 20221031 start + chmod 0666 /dev/pix_manager + chown system system /dev/pix_manager +# drv modified by gongtaitao for send lcm param to light sensor 20221031 end diff --git a/init/init_connectivity.rc b/init/init_connectivity.rc new file mode 100644 index 0000000..5786763 --- /dev/null +++ b/init/init_connectivity.rc @@ -0,0 +1,46 @@ +# MTK connectivity .rc configure + +on post-fs-data + mkdir /data/vendor/stp_dump 0755 system system + mkdir /data/vendor/connsyslog 0755 system system + +on boot + +# WMT +service wmt_loader /vendor/bin/wmt_loader + class early_hal + user system + group system + oneshot + +service wmt_launcher /vendor/bin/wmt_launcher -p /vendor/firmware/ -o 1 + class early_hal + user system + group system + +on property:ro.build.type=eng + write /sys/kernel/debug/tracing/tracing_on 1 + +on property:persist.vendor.connsys.coredump.mode=1 + start stp_dump + +on property:persist.vendor.connsys.coredump.mode=2 + start stp_dump + +on property:persist.vendor.connsys.coredump.mode=0 + stop stp_dump + +on property:vendor.connsys.driver.ready=yes && property:persist.vendor.connsys.coredump.mode=* + write /proc/driver/wmt_user_proc "0x1 ${persist.vendor.connsys.coredump.mode}" + +on property:vendor.connsys.driver.ready=yes && property:debug.vendor.connsys.suspend.alarm=* + write /proc/driver/wmt_user_proc "0x2 ${debug.vendor.connsys.suspend.alarm}" + +on property:persist.vendor.em.dy.debug=1 + setprop persist.vendor.connsys.coredump.mode 0 + +service stp_dump /vendor/bin/stp_dump3 + user system + group system sdcard_rw misc + class core + disabled diff --git a/init/ueventd.rc b/init/ueventd.rc new file mode 100644 index 0000000..c95122f --- /dev/null +++ b/init/ueventd.rc @@ -0,0 +1,209 @@ +#change partition permission +# eMMC only +/dev/block/mmcblk0 0660 root system +/dev/block/mmcblk0boot0 0660 root system +/dev/block/mmcblk0boot1 0660 root system +/dev/misc-sd 0660 root system + +# UFS only +/dev/block/sda 0660 root system +/dev/block/sdb 0660 root system +/dev/block/sdc 0660 root system + +# eMMC/UFS common +/dev/block/by-name/misc2 0660 root system +/dev/block/by-name/boot 0640 root system +/dev/block/by-name/recovery 0640 root system +/dev/block/by-name/secro 0640 root system +/dev/block/by-name/seccfg 0660 root system +/dev/block/by-name/proinfo 0660 root system +/dev/block/by-name/nvram 0660 root system +/dev/block/by-name/para 0660 root system +/dev/block/by-name/logo 0660 root system +/dev/block/by-name/frp 0660 root system +/dev/block/by-name/md1img 0640 root system +/dev/block/by-name/md1img_a 0640 root system +/dev/block/by-name/md1img_b 0640 root system +/dev/block/by-name/md1dsp 0660 root system +/dev/block/by-name/boot_para 0640 root system + +# OTP +/dev/otp 0660 system system +/dev/block/by-name/otp 0660 root system + +# Connectivity +/dev/stpwmt 0660 system system +/dev/wmtdetect 0660 system system +/dev/fw_log_wmt 0660 system system +/dev/conninfra_dev 0660 system system +/dev/conn_pwr_dev 0660 system system + +# BT +/dev/stpbt 0660 bluetooth bluetooth +/dev/fw_log_bt 0660 bluetooth bluetooth + +# GPS +/dev/gpsdl0 0660 gps gps +/dev/gpsdl1 0660 gps gps +/dev/stpgps 0660 gps gps +/dev/stpgps2 0660 gps gps +/dev/gps 0660 gps system +/dev/gps_emi 0660 gps gps +/dev/gps_pwr 0660 gps gps +/dev/fw_log_gps 0660 gps gps +# ANT +/dev/stpant 0660 system system + +# WIFI +/dev/wmtWifi 0660 wifi wifi +/dev/fw_log_wifi 0660 wifi wifi + +# FMRadio +/dev/fm 0660 media media + +# NFC +/dev/st21nfc 0660 nfc radio +/dev/st54spi 0660 secure_element secure_element + +# MTK BTIF driver +/dev/btif 0600 system system + +# Trusty driver +/dev/trusty-ipc-dev0 0660 system system +/dev/nebula-ipc-dev0 0660 system system + +# RPMB (for Trusty) +/dev/block/mmcblk0rpmb 0660 root system + +# TrustonicTEE driver +/dev/mobicore 0600 system system +/dev/mobicore-user 0666 system system +/dev/t-base-tui 0666 system system + +# teeperf driver +/dev/teeperf 0666 system system + +#v4l2 device +/dev/video* 0660 camera system +/dev/media* 0660 camera system +/dev/v4l-subdev* 0660 camera system + +#v4l2 codec +/dev/vcu 0660 camera system + +#v4l2 camera +/dev/mtk_hcp 0660 camera system + +# DRM node +/dev/dri/card0 0660 system system + +# MDDP node +/dev/mddp 0660 system system + +# cpu hotplug +/sys/devices/system/cpu/cpu* cpufreq/sugov_ext/down_rate_limit_us 0664 system system +/sys/devices/system/cpu/cpu* cpufreq/sugov_ext/up_rate_limit_us 0664 system system + +# add the read write right of ttyUSB* +/dev/bus/usb/* 0660 root usb +/dev/ttyUSB0 0660 radio radio +/dev/ttyUSB1 0660 radio radio +/dev/ttyUSB2 0660 radio radio +/dev/ttyUSB3 0660 radio radio +/dev/ttyUSB4 0660 radio radio + +# Anyone can read the logs, but if they're not in the "logs" +# group, then they'll only see log entries for their UID. +/dev/log/ksystem 0600 root log + +/dev/ccci* 0660 radio radio +/dev/ttyC* 0660 radio radio +/sys/kernel/ccci modem_info 0644 radio radio +/sys/kernel/ccci md1_postfix 0644 radio radio +/sys/kernel/ccci md2_postfix 0644 radio radio +/dev/eemcs* 0660 radio radio +/dev/emd* 0660 radio radio +/dev/ccci_pcm_rx 0660 audio audio +/dev/ccci_pcm_tx 0660 audio audio +/dev/ccci_aud 0660 audio audio +/dev/ccci2_aud 0660 audio audio +/dev/ccci3_aud 0660 audio audio +/dev/ccci_raw_audio 0660 audio audio +/dev/ccci3_raw_audio 0660 audio audio +/dev/eemcs_aud 0660 audio audio +/dev/irtx 0660 system system +/dev/lirc* 0660 root system +/dev/ir-learning 0660 system system +# SGX device node +/dev/pvrsrvkm 0666 root root +/dev/pvr_sync 0666 root root + + +/sys/devices/platform/leds-mt65xx/leds/green delay_on 0664 system system +/sys/devices/platform/leds-mt65xx/leds/green delay_off 0664 system system +/sys/devices/platform/leds-mt65xx/leds/red delay_on 0664 system system +/sys/devices/platform/leds-mt65xx/leds/red delay_off 0664 system system +/sys/devices/platform/leds-mt65xx/leds/blue delay_on 0664 system system +/sys/devices/platform/leds-mt65xx/leds/blue delay_off 0664 system system + +#drv add by shenwenbin for leds selinux 20231118 start +/sys/class/leds/red delay_on 0664 system system +/sys/class/leds/red delay_off 0664 system system +/sys/class/leds/green delay_on 0664 system system +/sys/class/leds/green delay_off 0664 system system +/sys/class/leds/blue delay_on 0664 system system +/sys/class/leds/blue delay_off 0664 system system +#drv add by shenwenbin for leds selinux 20231118 end + +#GPIO +/dev/mtgpio 0600 radio root + +# Camera +/dev/camera_eeprom* 0660 system camera + +#FOR VIA MODEM +/dev/ttySDIO* 0660 radio sdcard_rw +/dev/ttyRB* 0660 radio radio + +# Mali node +/dev/mali0 0666 system graphics + +# Change ION driver permission +/dev/ion 0666 system graphics + +# Change DMA_HEAP deice permission +# refs: /system/core/rootdir/uevent.rc +# /dev/dma_heap/system 0444 system system +/dev/dma_heap/mtk_mm 0444 system system +/dev/dma_heap/mtk_mm-uncached 0444 system system +/dev/dma_heap/mtk_svp_page-uncached 0444 system system +/dev/dma_heap/mtk_prot_page-uncached 0444 system system +/dev/dma_heap/mtk_svp_region 0444 system system +/dev/dma_heap/mtk_svp_region-aligned 0444 system system +/dev/dma_heap/mtk_prot_region 0444 system system +/dev/dma_heap/mtk_prot_region-aligned 0444 system system +/dev/dma_heap/mtk_2d_fr_region 0444 system system +/dev/dma_heap/mtk_2d_fr_region-aligned 0444 system system +/dev/dma_heap/mtk_wfd_region 0444 system system +/dev/dma_heap/mtk_wfd_region-aligned 0444 system system +/dev/dma_heap/mtk_wfd_page-uncached 0444 system system + +#touch +/dev/touch 0660 root system +/dev/hotknot 0660 root system + +#hang_detect +/dev/RT_Monitor 0660 system system +/dev/kick_powerkey 0660 system system + +#MTK In-House TEE +/dev/ttyACM0 0660 radio radio + +#sensor +/dev/hf_manager 0660 system system + +#dynamic sensor +/dev/hidraw* 0660 system system + +#charging control +/sys/devices/platform/charger cmd_charge_disable 0660 system system \ No newline at end of file diff --git a/libfmjni/Android.bp b/libfmjni/Android.bp new file mode 100644 index 0000000..f5c3e0a --- /dev/null +++ b/libfmjni/Android.bp @@ -0,0 +1,42 @@ +// +// Copyright (C) 2014 The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// 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. +// + +cc_library_shared { + name: "libfmjni-mediatek", + + stem: "libfmjni", + + overrides: ["libfmjni"], + + srcs: [ + "fmr_core.cpp", + "fmr_err.cpp", + "libfm_jni.cpp", + "common.cpp", + "custom.cpp", + ], + + header_libs: ["jni_headers"], + + shared_libs: [ + "libbase", + "libcutils", + "libdl", + "liblog", + "libmedia", + "libnativehelper", + ], +} diff --git a/libfmjni/NOTICE b/libfmjni/NOTICE new file mode 100644 index 0000000..84ad622 --- /dev/null +++ b/libfmjni/NOTICE @@ -0,0 +1,185 @@ +This MediaTek software package contains software with the following notices and under the following licenses: + +============================================================================================================== + +Copyright (C) 2014 The Android Open Source Project + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + + diff --git a/libfmjni/README b/libfmjni/README new file mode 100644 index 0000000..6d7d090 --- /dev/null +++ b/libfmjni/README @@ -0,0 +1,25 @@ +Libraries of MTK FM feature, including FM power on/off, +seek, scan, tune...and some other basic functions. + +WHAT IT DOES? +============= +Provide FM basic functions + +HOW IT WAS BUILT? +================== +It needs the following libs from AOSP: +1. libcutils +2. libdl + +and the following libs from MediaTek: +1. libmedia + +HOW TO USE IT? +============== +Files in this directory is used to +generate libraries 'libfmjni' + +These libraries are loaded when system up + +All the source code of this library were written by MediaTek co.. + diff --git a/libfmjni/common.cpp b/libfmjni/common.cpp new file mode 100755 index 0000000..276be96 --- /dev/null +++ b/libfmjni/common.cpp @@ -0,0 +1,968 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * 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 +#include "fmr.h" + +#ifdef LOG_TAG +#undef LOG_TAG +#endif +#define LOG_TAG "FMLIB_COM" +#define UNUSED(x) (void)(x) + +int COM_get_seek_space() +{ + // FM radio seek space, 5:50KHZ; 1:100KHZ; 2:200KHZ + if (property_get_int32("persist.vendor.connsys.fm_50khz_support", 0) == 1) + return FM_SPACE_50K; + return FM_SPACE_DEFAULT; +} + +int COM_open_dev(const char *pname, int *fd) +{ + int ret = 0; + int tmp = -1; + + FMR_ASSERT(pname); + FMR_ASSERT(fd); + + LOGI("COM_open_dev start\n"); + tmp = open(pname, O_RDWR); + if (tmp < 0) { + LOGE("Open %s failed, %s\n", pname, strerror(errno)); + ret = -ERR_INVALID_FD; + } + *fd = tmp; + LOGI("%s, [fd=%d] [ret=%d]\n", __func__, *fd, ret); + return ret; +} + +int COM_close_dev(int fd) +{ + int ret = 0; + + LOGI("COM_close_dev start\n"); + ret = close(fd); + if (ret) { + LOGE("%s, failed\n", __func__); + } + LOGD("%s, [fd=%d] [ret=%d]\n", __func__, fd, ret); + return ret; +} + +int COM_pwr_up(int fd, int band, int freq) +{ + int ret = 0; + struct fm_tune_parm parm; + + LOGI("%s, [freq=%d]\n", __func__, freq); + bzero(&parm, sizeof(struct fm_tune_parm)); + + parm.band = band; + parm.freq = freq; + parm.hilo = FM_AUTO_HILO_OFF; + parm.space = FM_SEEK_SPACE; + + ret = ioctl(fd, FM_IOCTL_POWERUP, &parm); + if (ret) { + LOGE("%s, failed\n", __func__); + } + LOGD("%s, [fd=%d] [ret=%d]\n", __func__, fd, ret); + return ret; +} + +int COM_pwr_down(int fd, int type) +{ + int ret = 0; + LOGI("%s, [type=%d]\n", __func__, type); + ret = ioctl(fd, FM_IOCTL_POWERDOWN, &type); + if (ret) { + LOGE("%s, failed\n", __func__); + } + LOGD("%s, [fd=%d] [ret=%d]\n", __func__, fd, ret); + return ret; +} + +int COM_get_chip_id(int fd, int *chipid) +{ + int ret = 0; + uint16_t tmp = 0; + + FMR_ASSERT(chipid); + + ret = ioctl(fd, FM_IOCTL_GETCHIPID, &tmp); + *chipid = (int)tmp; + if (ret){ + LOGE("%s, failed\n", __func__); + } + LOGD("%s, [fd=%d] [chipid=%x] [ret=%d]\n", __func__, fd, *chipid, ret); + return ret; +} + +int COM_get_rssi(int fd, int *rssi) +{ + int ret = 0; + + FMR_ASSERT(rssi); + + ret = ioctl(fd, FM_IOCTL_GETRSSI, rssi); + if(ret){ + LOGE("%s, failed, [ret=%d]\n", __func__, ret); + } + LOGI("%s, [rssi=%d] [ret=%d]\n", __func__, *rssi, ret); + return ret; +} +/*0x20: space, 0x7E:~*/ +#define ISVALID(c)((c)>=0x20 && (c)<=0x7E) +/*change any char which out of [0x20,0x7E]to space(0x20)*/ +void COM_change_string(uint8_t *str, int len) +{ + int i = 0; + for (i=0; ievent_status&RDS_EVENT_PROGRAMNAME) { + LOGD("%s, Success,[event_status=%d]\n", __func__, rds->event_status); + *ps = &rds->PS_Data.PS[3][0]; + *ps_len = sizeof(rds->PS_Data.PS[3]); + + COM_change_string(*ps, *ps_len); + memcpy(tmp_ps, *ps, 8); + LOGI("PS=%s\n", tmp_ps); + } else { + LOGE("%s, Failed,[event_status=%d]\n", __func__, rds->event_status); + *ps = NULL; + *ps_len = 0; + ret = -ERR_RDS_NO_DATA; + } + + return ret; +} + +int COM_get_rt(int fd, RDSData_Struct *rds, uint8_t **rt, int *rt_len) +{ + int ret = 0; + char tmp_rt[65] = { 0 }; + + UNUSED(fd); + FMR_ASSERT(rds); + FMR_ASSERT(rt); + FMR_ASSERT(rt_len); + + if (rds->event_status&RDS_EVENT_LAST_RADIOTEXT) { + LOGD("%s, Success,[event_status=%d]\n", __func__, rds->event_status); + *rt = &rds->RT_Data.TextData[3][0]; + *rt_len = rds->RT_Data.TextLength; + + COM_change_string(*rt, *rt_len); + memcpy(tmp_rt, *rt, 64); + LOGI("RT=%s\n", tmp_rt); + } else { + LOGE("%s, Failed,[event_status=%d]\n", __func__, rds->event_status); + *rt = NULL; + *rt_len = 0; + ret = -ERR_RDS_NO_DATA; + } + return ret; +} + +int COM_get_pi(int fd, RDSData_Struct *rds, uint16_t *pi) +{ + int ret = 0; + + UNUSED(fd); + FMR_ASSERT(rds); + FMR_ASSERT(pi); + + if (rds->event_status & RDS_EVENT_PI_CODE) { + LOGD("%s, Success,[event_status=%d] [PI=%d]\n", __func__, rds->event_status, rds->PI); + *pi = rds->PI; + } else { + LOGI("%s, Failed, there's no pi,[event_status=%d]\n", __func__, rds->event_status); + *pi = -1; + ret = -ERR_RDS_NO_DATA; + } + + return ret; +} + +int COM_get_ecc(int fd, RDSData_Struct *rds, uint8_t *ecc) +{ + int ret = 0; + + UNUSED(fd); + FMR_ASSERT(rds); + FMR_ASSERT(ecc); + + if (rds->event_status & RDS_EVENT_ECC_CODE) { + LOGD("%s, Success,[event_status=%d] [ECC=%d]\n", __func__, + rds->event_status, rds->Extend_Country_Code); + *ecc = rds->Extend_Country_Code; + } else { + LOGI("%s, Failed, there's no ECC,[event_status=%d]\n", __func__, rds->event_status); + *ecc = -1; + ret = -ERR_RDS_NO_DATA; + } + + return ret; +} + +int COM_get_pty(int fd, RDSData_Struct *rds, uint8_t *pty) +{ + int ret = 0; + + UNUSED(fd); + FMR_ASSERT(rds); + FMR_ASSERT(pty); + + if(rds->event_status&RDS_EVENT_PTY_CODE){ + LOGD("%s, Success,[event_status=%d] [PTY=%d]\n", __func__, rds->event_status, rds->PTY); + *pty = rds->PTY; + }else{ + LOGI("%s, Success, there's no pty,[event_status=%d]\n", __func__, rds->event_status); + *pty = -1; + ret = -ERR_RDS_NO_DATA; + } + + return ret; +} + +int COM_tune(int fd, int freq, int band) +{ + int ret = 0; + + struct fm_tune_parm parm; + + bzero(&parm, sizeof(struct fm_tune_parm)); + + parm.band = band; + parm.freq = freq; + parm.hilo = FM_AUTO_HILO_OFF; + parm.space = FM_SEEK_SPACE; + + ret = ioctl(fd, FM_IOCTL_TUNE, &parm); + if (ret) { + LOGE("%s, failed\n", __func__); + } + LOGD("%s, [fd=%d] [freq=%d] [ret=%d]\n", __func__, fd, freq, ret); + return ret; +} + +int COM_seek(int fd, int *freq, int band, int dir, int lev) +{ + int ret = 0; + struct fm_seek_parm parm; + + bzero(&parm, sizeof(struct fm_tune_parm)); + + parm.band = band; + parm.freq = *freq; + parm.hilo = FM_AUTO_HILO_OFF; + parm.space = FM_SEEK_SPACE; + if (dir == 1) { + parm.seekdir = FM_SEEK_UP; + } else if (dir == 0) { + parm.seekdir = FM_SEEK_DOWN; + } + parm.seekth = lev; + + ret = ioctl(fd, FM_IOCTL_SEEK, &parm); + if (ret == 0) { + *freq = parm.freq; + } + LOGD("%s, [fd=%d] [ret=%d]\n", __func__, fd, ret); + return ret; +} + +int COM_set_mute(int fd, int mute) +{ + int ret = 0; + int tmp = mute; + + LOGD("%s, start \n", __func__); + ret = ioctl(fd, FM_IOCTL_MUTE, &tmp); + if (ret) { + LOGE("%s, failed\n", __func__); + } + LOGD("%s, [fd=%d] [ret=%d]\n", __func__, fd, ret); + return ret; +} + +int COM_is_fm_pwrup(int fd, int *pwrup) +{ + int ret = 0; + + ret = ioctl(fd, FM_IOCTL_IS_FM_POWERED_UP, pwrup); + if (ret) { + LOGE("%s, failed\n", __func__); + } + LOGD("%s, [fd=%d] [ret=%d]\n", __func__, fd, ret); + return ret; +} + +/****************************************** + * Inquiry if RDS is support in driver. + * Parameter: + * None + *supt Value: + * 1: support + * 0: NOT support + * -1: error + ******************************************/ +int COM_is_rdsrx_support(int fd, int *supt) +{ + int ret = 0; + int support = -1; + + if (fd < 0) { + LOGE("FM isRDSsupport fail, g_fm_fd = %d\n", fd); + *supt = -1; + ret = -ERR_INVALID_FD; + return ret; + } + + ret = ioctl(fd, FM_IOCTL_RDS_SUPPORT, &support); + if (ret) { + LOGE("FM FM_IOCTL_RDS_SUPPORT fail, errno = %d\n", errno); + //don't support + *supt = 0; + return ret; + } + LOGI("isRDSsupport Success,[support=%d]\n", support); + *supt = support; + return ret; +} + +int COM_pre_search(int fd) +{ + fm_s32 ret = 0; + ret = ioctl(fd, FM_IOCTL_PRE_SEARCH, 0); + LOGD("COM_pre_search:%d\n",ret); + return ret; +} + +int COM_restore_search(int fd) +{ + fm_s32 ret = 0; + ret = ioctl(fd, FM_IOCTL_RESTORE_SEARCH, 0); + LOGD("COM_restore_search:%d\n",ret); + return ret; +} + +/*soft mute tune function, usually for sw scan implement or CQI log tool*/ +int COM_Soft_Mute_Tune(int fd, fm_softmute_tune_t *para) +{ + fm_s32 ret = 0; + //fm_s32 RSSI = 0, PAMD = 0,MR = 0, ATDC = 0; + //fm_u32 PRX = 0; + //fm_u16 softmuteGainLvl = 0; + fm_softmute_tune_t value; + + value.freq = para->freq; + ret = ioctl(fd, FM_IOCTL_SOFT_MUTE_TUNE, &value); + if (ret) { + LOGE("FM soft mute tune faild:%d\n",ret); + return ret; + } +#if 0 + LOGD("Raw data of soft mute tune[%d]: RSSI:[%x]PAMD:[%x]MR:[%x]ATDC:[%x]PRX:[%x]SMG:[%x]",para->freq,value.RSSI,value.PAMD,value.MR,value.ATDC,value.PRX,value.SMG); + RSSI = ((value.RSSI & 0x03FF) >= 512) ? ((value.RSSI & 0x03FF) - 1024) : (value.RSSI & 0x03FF); + PAMD = ((value.PAMD & 0xFF) >= 128) ? ((value.PAMD & 0x00FF) - 256) : (value.PAMD & 0x00FF); + MR = ((value.MR & 0x01FF) >= 256) ? ((value.MR & 0x01FF) - 512) : (value.MR & 0x01FF); + ATDC =((value.ATDC & 0x0FFF) >= 2048) ? ((value.ATDC & 0x0FFF) - 4096) : (value.ATDC & 0x0FFF); + if (ATDC < 0) { + ATDC = (~(ATDC)) - 1;//Get abs value of ATDC + } + PRX = (value.PRX & 0x00FF); + softmuteGainLvl = value.SMG; + //check if the channel is valid according to each CQIs + if ((RSSI >= RSSI_TH) + && (PAMD <= PAMD_TH) + && (ATDC <= ATDC_TH) + && (MR >= MR_TH) + && (PRX >= PRX_TH) + && (softmuteGainLvl <= softMuteGainTH)) { + para->valid = fm_true; + } else { + para->valid = fm_false; + } +#endif + para->valid = value.valid; + para->rssi = value.rssi; + //LOGI("soft mute tune[%d] valid[%d]: RSSI:[%d]PAMD:[%d]MR:[%d]ATDC:[%d]PRX:[%d]SMG:[%d]",para->freq,para->valid,RSSI,PAMD,MR,ATDC,PRX,softmuteGainLvl); + return 0; +} + +int COM_get_cqi(int fd, int num, char *buf, int buf_len) +{ + int ret; + struct fm_cqi_req cqi_req; + + //check buf + num = (num > CQI_CH_NUM_MAX) ? CQI_CH_NUM_MAX : num; + num = (num < CQI_CH_NUM_MIN) ? CQI_CH_NUM_MIN : num; + cqi_req.ch_num = (uint16_t)num; + cqi_req.buf_size = cqi_req.ch_num * sizeof(struct fm_cqi); + if (!buf || (buf_len < cqi_req.buf_size)) { + LOGE("get cqi, invalid buf\n"); + return -1; + } + cqi_req.cqi_buf = buf; + + //get cqi from driver + ret = ioctl(fd, FM_IOCTL_CQI_GET, &cqi_req); + if (ret < 0) { + LOGE("get cqi, failed %d\n", ret); + return -1; + } + + return 0; +} + +int COM_turn_on_off_rds(int fd, int onoff) +{ + int ret = 0; + uint16_t rds_on = -1; + + LOGD("Rdsset start\n"); + if (onoff == FMR_RDS_ON) { + rds_on = 1; + ret = ioctl(fd, FM_IOCTL_RDS_ONOFF, &rds_on); + if (ret) { + LOGE("FM_IOCTL_RDS_ON failed\n"); + return ret; + } + LOGD("Rdsset Success,[rds_on=%d]\n", rds_on); + } else { + rds_on = 0; + ret = ioctl(fd, FM_IOCTL_RDS_ONOFF, &rds_on); + if (ret) { + LOGE("FM_IOCTL_RDS_OFF failed\n"); + return ret; + } + LOGD("Rdsset Success,[rds_on=%d]\n", rds_on); + } + return ret; +} + +int COM_read_rds_data(int fd, RDSData_Struct *rds, uint16_t *rds_status) +{ + int ret = 0; + uint16_t event_status; + //char tmp_ps[9] = {0}; + //char tmp_rt[65] = { 0 }; + + FMR_ASSERT(rds); + FMR_ASSERT(rds_status); + + if (read(fd, rds, sizeof(RDSData_Struct)) == sizeof(RDSData_Struct)) { + event_status = rds->event_status; + //memcpy(tmp_ps, &rds->PS_Data.PS[3][0], 8); + //memcpy(tmp_rt, &rds->RT_Data.TextData[3][0], 64); + LOGI("event_status = 0x%x\n", event_status); + //memset(tmp_ps, 0, 9); + //memset(tmp_rt, 0, 65); + *rds_status = event_status; + return ret; + } else { + //LOGE("readrds get no event\n"); + ret = -ERR_RDS_NO_DATA; + } + return ret; +} + +static int COM_get_af_pi(int fd, uint16_t *pi) +{ + int ret; + struct rds_raw_data rrd; + uint16_t pi1, pi2; + + FMR_ASSERT(pi); + + memset(&rrd, 0, sizeof(rrd)); + ret = ioctl(fd, FM_IOCTL_RDS_GET_LOG, &rrd); + if (ret) { + LOGE("COM_get_af_pi fail(%d)\n", ret); + *pi = 0; + return ret; + } + if (rrd.len == 0) { + LOGE("COM_get_af_pi fail, RDS log empty!\n"); + *pi = 0; + return -1; + } + pi1 = rrd.data[4]; + pi1 |= (rrd.data[5] << 8); + LOGI("data[4]=%02x,data[5]=%02x,pi1=%04x\n", rrd.data[4], rrd.data[5], pi1); + pi2 = rrd.data[16]; + pi2 |= (rrd.data[17] << 8); + LOGI("data[16]=%02x,data[17]=%02x,pi2=%04x\n", rrd.data[16], rrd.data[17], pi2); + + if (pi1 == pi2) { + LOGI("got af pi!!!\n"); + *pi = pi1; + } else { + LOGE("af pi check fail\n"); + *pi = 0; + return -1; + } + + return 0; +} + +int COM_active_af(int fd, RDSData_Struct *rds, CUST_cfg_ds *cfg_data, uint16_t orig_pi, uint16_t cur_freq, uint16_t *ret_freq) +{ + int ret = 0; + int i = 0, j = 0; + struct fm_tune_parm parm; + struct fm_softmute_tune_t smt_parm; + uint16_t set_freq = 0, sw_freq = 0, org_freq = 0; + uint16_t PAMD_Value = 0, AF_PAMD_LBound = 0, AF_PAMD_HBound = 0; + uint16_t PAMD_Level[25]; + uint16_t PI[25]; + uint16_t PAMD_DB_TBL[5] = {// 5dB, 10dB, 15dB, 20dB, 25dB, + // 13, 17, 21, 25, 29}; + 8, 12, 15, 18, 20}; + AF_Info af_list_backup; + AF_Info af_list; + FMR_ASSERT(rds); + FMR_ASSERT(cfg_data); + sw_freq = cur_freq; //current freq + org_freq = cur_freq; + parm.band = cfg_data->band; + parm.freq = sw_freq; + parm.hilo = FM_AUTO_HILO_OFF; + parm.space = FM_SPACE_DEFAULT; + + if (!(rds->event_status & RDS_EVENT_AF)) { + LOGE("activeAF failed\n"); + *ret_freq = 0; + ret = -ERR_RDS_NO_DATA; + return ret; + } + memset(&af_list_backup, 0, sizeof(af_list_backup)); + memcpy(&af_list_backup, &rds->AF_Data, sizeof(AF_Info)); + memset(&af_list, 0, sizeof(af_list)); + + AF_PAMD_LBound = PAMD_DB_TBL[0]; //5dB + AF_PAMD_HBound = PAMD_DB_TBL[1]; //15dB + ioctl(fd, FM_IOCTL_GETCURPAMD, &PAMD_Value); + for (i = 0; i < 3 && (PAMD_Value < AF_PAMD_LBound); i++) { + usleep(10 * 1000); + ioctl(fd, FM_IOCTL_GETCURPAMD, &PAMD_Value); + LOGI("check PAMD %d time(s), PAMD =%d", i+1, PAMD_Value); + } + LOGI("current_freq=%d, PAMD_Value=%d, orig_pi=%d\n", cur_freq, PAMD_Value, orig_pi); + + /* Start to detect AF channels when orignal channel turn weak */ + if (PAMD_Value < AF_PAMD_LBound) { + + /* Make sure rds->AF_Data.AF_Num is valid */ + af_list_backup.AF_Num = af_list_backup.AF_Num > 25 ? 25 : af_list_backup.AF_Num; + + /* Precheck af list*/ + for (i = 0, j = 0; i < af_list_backup.AF_Num; i++) { + set_freq = af_list_backup.AF[1][i]; + if(set_freq < cfg_data->low_band || set_freq > cfg_data->high_band) { + /*band check fail*/ + LOGI("AF[1][%d]:freq %d out of bandwidth[%d,%d], skip!\n", + i, af_list_backup.AF[1][i], cfg_data->low_band, cfg_data->high_band); + continue; + } + + /* Using Com_Soft_Mute_Tune to query valid channel*/ + memset(&smt_parm, 0, sizeof(fm_softmute_tune_t)); + smt_parm.freq = set_freq; + COM_Soft_Mute_Tune(fd, &smt_parm); + LOGE("af list pre-check:freq %d, valid:%d\n", smt_parm.freq, smt_parm.valid); + if(smt_parm.valid == 1) { + /* Update valid AF channel to af_list*/ + af_list.AF[1][j] = af_list_backup.AF[1][i]; + j++; + af_list.AF_Num++; + } + + } + + /*AF switch process*/ + for (i = 0; i < af_list.AF_Num; i++) { + set_freq = af_list.AF[1][i]; + LOGI("set_freq[%d] = %d, org_freq = %d\n", i, set_freq, org_freq); + + if (set_freq != org_freq) { + // Set mute to check every af channels + COM_set_mute(fd, 1); + parm.freq = set_freq; + ioctl(fd, FM_IOCTL_TUNE, &parm); + usleep(20 * 1000); + ioctl(fd, FM_IOCTL_GETCURPAMD, &PAMD_Level[i]); + + /* If signal is not good enough, skip */ + if (PAMD_Level[i] < AF_PAMD_HBound) { + LOGI("PAMD_Level[%d] =%d < AF_PAMD_HBound, continue", i, PAMD_Level[i]); + continue; + } + + for (j = 0 ; j < 5; j++ ) { + usleep(200 * 1000); + /* Query pi to 5 times */ + if (COM_get_af_pi(fd, &PI[i])) { + if (j == 4) + LOGE("get af pi fail\n"); + continue; + } else + break; + } + + if (orig_pi != PI[i]) { + LOGI("pi not match, current pi(%04x), orig pi(%04x)\n", PI[i], orig_pi); + continue; + } + LOGI("next_freq=%d, PAMD_Level[%d]=%d\n", parm.freq, i, PAMD_Level[i]); + /* To get largest PAMD */ + /* This is a trade-off*/ + /* If want to get a better quality AF channel, do as follows, it will spend longer to do AF switch*/ + /* If want to mute shorter, just use one fixed PAMD_VALUE, don't need to compare */ + if (PAMD_Level[i] > AF_PAMD_HBound) { + LOGI("PAMD_Level[%d] =%d > AF_PAMD_HBound, af switch", i, PAMD_Level[i]); + sw_freq = set_freq; + PAMD_Value = PAMD_Level[i]; + break; + } + } + } + LOGI("AF deside tune to freq: %d, PAMD_Level: %d\n", sw_freq, PAMD_Value); + if ((PAMD_Value > AF_PAMD_HBound)&&(sw_freq != 0)) { /* Tune to AF channel */ + parm.freq = sw_freq; + ioctl(fd, FM_IOCTL_TUNE, &parm); + cur_freq = parm.freq; + } else { /* Tune to orignal channel */ + parm.freq = org_freq; + ioctl(fd, FM_IOCTL_TUNE, &parm); + cur_freq = parm.freq; + } + /* Unmute when finish AF switch */ + COM_set_mute(fd, 0); + } else { + LOGD("RDS_EVENT_AF old freq:%d\n", org_freq); + } + *ret_freq = cur_freq; + + return ret; +} + +int COM_active_ta(int fd, RDSData_Struct *rds, int band, uint16_t cur_freq, uint16_t *backup_freq, uint16_t *ret_freq) +{ + int ret = 0; + + FMR_ASSERT(rds); + FMR_ASSERT(backup_freq); + FMR_ASSERT(ret_freq); + + if(rds->event_status&RDS_EVENT_TAON){ + uint16_t rds_on = 0; + struct fm_tune_parm parm; + uint16_t PAMD_Level[25]; + uint16_t PAMD_DB_TBL[5] = {13, 17, 21, 25, 29}; + uint16_t set_freq, sw_freq, org_freq, PAMD_Value, TA_PAMD_Threshold; + int i = 0; + + rds_on = 0; + ioctl(fd, FM_IOCTL_RDS_ONOFF, &rds_on); + TA_PAMD_Threshold = PAMD_DB_TBL[2]; //15dB + sw_freq = cur_freq; + org_freq = cur_freq; + *backup_freq = org_freq; + parm.band = band; + parm.freq = sw_freq; + parm.hilo = FM_AUTO_HILO_OFF; + parm.space = COM_get_seek_space(); + + ioctl(fd, FM_IOCTL_GETCURPAMD, &PAMD_Value); + //make sure rds->AF_Data.AF_Num is valid + rds->AFON_Data.AF_Num = (rds->AFON_Data.AF_Num > 25)? 25 : rds->AFON_Data.AF_Num; + for(i=0; i< rds->AFON_Data.AF_Num; i++){ + set_freq = rds->AFON_Data.AF[1][i]; + LOGI("set_freq=0x%02x,org_freq=0x%02x\n", set_freq, org_freq); + if(set_freq != org_freq){ + parm.freq = sw_freq; + ioctl(fd, FM_IOCTL_TUNE, &parm); + ioctl(fd, FM_IOCTL_GETCURPAMD, &PAMD_Level[i]); + if(PAMD_Level[i] > PAMD_Value){ + PAMD_Value = PAMD_Level[i]; + sw_freq = set_freq; + } + } + } + + if((PAMD_Value > TA_PAMD_Threshold)&&(sw_freq != 0)){ + rds->Switch_TP= 1; + parm.freq = sw_freq; + ioctl(fd, FM_IOCTL_TUNE, &parm); + cur_freq = parm.freq; + }else{ + parm.freq = org_freq; + ioctl(fd, FM_IOCTL_TUNE, &parm); + cur_freq = parm.freq; + } + rds_on = 1; + ioctl(fd, FM_IOCTL_RDS_ONOFF, &rds_on); + } + + *ret_freq = cur_freq; + return ret; +} + +int COM_deactive_ta(int fd, RDSData_Struct *rds, int band, uint16_t cur_freq, uint16_t *backup_freq, uint16_t *ret_freq) +{ + int ret = 0; + + UNUSED(band); + FMR_ASSERT(rds); + FMR_ASSERT(backup_freq); + FMR_ASSERT(ret_freq); + + if(rds->event_status&RDS_EVENT_TAON_OFF){ + uint16_t rds_on = 0; + struct fm_tune_parm parm; + parm.band = FM_RAIDO_BAND; + parm.freq = *backup_freq; + parm.hilo = FM_AUTO_HILO_OFF; + parm.space = COM_get_seek_space(); + + ioctl(fd, FM_IOCTL_RDS_ONOFF, &rds_on); + + ioctl(fd, FM_IOCTL_TUNE, &parm); + cur_freq = parm.freq; + rds_on = 1; + ioctl(fd, FM_IOCTL_RDS_ONOFF, &rds_on); + } + + *ret_freq = cur_freq; + return ret; +} + +int COM_ana_switch(int fd, int antenna) +{ + int ret = 0; + + ret = ioctl(fd, FM_IOCTL_ANA_SWITCH, &antenna); + if (ret < 0) { + LOGE("%s: fail, ret = %d\n", __func__, ret); + } + + LOGD("%s: [ret = %d]\n", __func__, ret); + return ret; +} + +int COM_get_badratio(int fd, int *badratio) +{ + int ret = 0; + uint16_t tmp = 0; + + ret = ioctl(fd, FM_IOCTL_GETBLERRATIO, &tmp); + *badratio = (int)tmp; + if (ret){ + LOGE("%s, failed\n", __func__); + } + LOGD("%s, [fd=%d] [ret=%d]\n", __func__, fd, ret); + return ret; +} + + +int COM_get_stereomono(int fd, int *stemono) +{ + int ret = 0; + uint16_t tmp = 0; + + ret = ioctl(fd, FM_IOCTL_GETMONOSTERO, &tmp); + *stemono = (int)tmp; + if (ret){ + LOGE("%s, failed\n", __func__); + } + LOGD("%s, [fd=%d] [ret=%d]\n", __func__, fd, ret); + return ret; +} + +int COM_set_stereomono(int fd, int stemono) +{ + int ret = 0; + + ret = ioctl(fd, FM_IOCTL_SETMONOSTERO, &stemono); + if (ret){ + LOGE("%s, failed\n", __func__); + } + LOGD("%s, [fd=%d] [ret=%d]\n", __func__, fd, ret); + return ret; +} + +int COM_get_caparray(int fd, int *caparray) +{ + int ret = 0; + int tmp = 0; + + LOGD("%s, [fd=%d]\n", __func__, fd); + ret = ioctl(fd, FM_IOCTL_GETCAPARRAY, &tmp); + if (ret){ + LOGE("%s, failed\n", __func__); + } + *caparray = tmp; + LOGD("%s, [fd=%d] [ret=%d]\n", __func__, fd, ret); + return ret; +} + +int COM_get_hw_info(int fd, struct fm_hw_info *info) +{ + int ret = 0; + + ret = ioctl(fd, FM_IOCTL_GET_HW_INFO, info); + if(ret){ + LOGE("%s, failed\n", __func__); + } + LOGD("%s, [fd=%d] [ret=%d]\n", __func__, fd, ret); + return ret; +} + + +/* COM_is_dese_chan -- check if gived channel is a de-sense channel or not + * @fd - fd of "dev/fm" + * @freq - gived channel + * return value: 0, not a dese chan; 1, a dese chan; else error NO. + */ +int COM_is_dese_chan(int fd, int freq) +{ + int ret = 0; + int tmp = freq; + + ret = ioctl(fd, FM_IOCTL_IS_DESE_CHAN, &freq); + if (ret < 0) { + LOGE("%s, failed,ret=%d\n", __func__,ret); + return ret; + } else { + LOGD("[fd=%d] %d --> dese=%d\n", fd, tmp, freq); + return freq; + } +} + +/* COM_desense_check -- check if gived channel is a de-sense channel or not + * @fd - fd of "dev/fm" + * @freq - gived channel + * @rssi-freq's rssi + * return value: 0, is desense channel and rssi is less than threshold; 1, not desense channel or it is but rssi is more than threshold. + */ +int COM_desense_check(int fd, int freq, int rssi) +{ + int ret = 0; + fm_desense_check_t parm; + + parm.freq = freq; + parm.rssi = rssi; + ret = ioctl(fd, FM_IOCTL_DESENSE_CHECK, &parm); + if (ret < 0) { + LOGE("%s, failed,ret=%d\n", __func__,ret); + return ret; + } else { + LOGD("[fd=%d] %d --> dese=%d\n", fd,freq,ret); + return ret; + } +} +/* +th_idx: + threshold type: 0, RSSI. 1,desense RSSI. 2,SMG. +th_val: threshold value*/ +int COM_set_search_threshold(int fd, int th_idx,int th_val) +{ + int ret = 0; + fm_search_threshold_t th_parm; + th_parm.th_type = th_idx; + th_parm.th_val = th_val; + ret = ioctl(fd, FM_IOCTL_SET_SEARCH_THRESHOLD, &th_parm); + if (ret < 0) + { + LOGE("%s, failed,ret=%d\n", __func__,ret); + } + return ret; +} +int COM_full_cqi_logger(int fd, fm_full_cqi_log_t *log_parm) +{ + int ret = 0; + + ret = ioctl(fd, FM_IOCTL_FULL_CQI_LOG, log_parm); + if (ret < 0) + { + LOGE("%s, failed,ret=%d\n", __func__,ret); + } + return ret; +} +void FM_interface_init(struct fm_cbk_tbl *cbk_tbl) +{ + //Basic functions. + cbk_tbl->open_dev = COM_open_dev; + cbk_tbl->close_dev = COM_close_dev; + cbk_tbl->pwr_up = COM_pwr_up; + cbk_tbl->pwr_down = COM_pwr_down; + cbk_tbl->tune = COM_tune; + cbk_tbl->set_mute = COM_set_mute; + cbk_tbl->is_rdsrx_support = COM_is_rdsrx_support; + cbk_tbl->turn_on_off_rds = COM_turn_on_off_rds; + cbk_tbl->get_chip_id = COM_get_chip_id; + //For RDS RX. + cbk_tbl->read_rds_data = COM_read_rds_data; + cbk_tbl->get_pi = COM_get_pi; + cbk_tbl->get_ps = COM_get_ps; + cbk_tbl->get_ecc = COM_get_ecc; + cbk_tbl->get_pty = COM_get_pty; + cbk_tbl->get_rssi = COM_get_rssi; + cbk_tbl->get_rt = COM_get_rt; + cbk_tbl->active_af = COM_active_af; + cbk_tbl->active_ta = COM_active_ta; + cbk_tbl->deactive_ta = COM_deactive_ta; + //FM short antenna + cbk_tbl->ana_switch = COM_ana_switch; + cbk_tbl->desense_check = COM_desense_check; + //RX EM mode use + cbk_tbl->get_badratio = COM_get_badratio; + cbk_tbl->get_stereomono = COM_get_stereomono; + cbk_tbl->set_stereomono = COM_set_stereomono; + cbk_tbl->get_caparray = COM_get_caparray; + cbk_tbl->get_cqi = COM_get_cqi; + cbk_tbl->is_dese_chan = COM_is_dese_chan; + cbk_tbl->desense_check = COM_desense_check; + cbk_tbl->get_hw_info = COM_get_hw_info; + //soft mute tune + cbk_tbl->soft_mute_tune = COM_Soft_Mute_Tune; + cbk_tbl->pre_search = COM_pre_search; + cbk_tbl->restore_search = COM_restore_search; + //EM + cbk_tbl->set_search_threshold = COM_set_search_threshold; + cbk_tbl->full_cqi_logger = COM_full_cqi_logger; + return; +} + diff --git a/libfmjni/custom.cpp b/libfmjni/custom.cpp new file mode 100644 index 0000000..21dfb20 --- /dev/null +++ b/libfmjni/custom.cpp @@ -0,0 +1,263 @@ +/* Copyright Statement: + * + * This software/firmware and related documentation ("MediaTek Software") are + * protected under relevant copyright laws. The information contained herein is + * confidential and proprietary to MediaTek Inc. and/or its licensors. Without + * the prior written permission of MediaTek inc. and/or its licensors, any + * reproduction, modification, use or disclosure of MediaTek Software, and + * information contained herein, in whole or in part, shall be strictly + * prohibited. + * + * MediaTek Inc. (C) 2010. All rights reserved. + * + * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES + * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") + * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER + * ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL + * WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED + * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR + * NONINFRINGEMENT. NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH + * RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, + * INCORPORATED IN, OR SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES + * TO LOOK ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. + * RECEIVER EXPRESSLY ACKNOWLEDGES THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO + * OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES CONTAINED IN MEDIATEK + * SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE + * RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR + * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S + * ENTIRE AND CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE + * RELEASED HEREUNDER WILL BE, AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE + * MEDIATEK SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE + * CHARGE PAID BY RECEIVER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. + * + * The following software/firmware and/or related documentation ("MediaTek + * Software") have been modified by MediaTek Inc. All revisions are subject to + * any receiver's applicable license agreements with MediaTek Inc. + */ + +#define MTK_LOG_ENABLE 1 + +#include +#include +#include + +#include +#include + +#include "fmr.h" +#include "fmlib_cust.h" + +#undef LOGV +#define LOGV(...) ALOGV(__VA_ARGS__) +#undef LOGD +#define LOGD(...) ALOGD(__VA_ARGS__) +#undef LOGI +#define LOGI(...) ALOGI(__VA_ARGS__) +#undef LOGW +#define LOGW(...) ALOGW(__VA_ARGS__) +#undef LOGE +#define LOGE(...) ALOGE(__VA_ARGS__) +#ifdef LOG_TAG +#undef LOG_TAG +#endif +#define LOG_TAG "FMLIB_CUST" + +#define MT6620_FM_FAKE_CHANNEL \ +{ \ + {10400, -40, -1}, \ + {9100, -40, -1}, \ + {9600, -40, -1}, \ + {9220, -80, -1}, \ + {0, 0, 0} \ +} + +#define MT6628_FM_FAKE_CHANNEL \ +{ \ + {0, 0, 0} \ +} + +#define MT6627_FM_FAKE_CHANNEL \ +{ \ + {9600, -107, -1}, \ + {10400, -107, -1}, \ + {10750, -224, -1}, \ + {0, 0, 0} \ +} +#define MT6580_FM_FAKE_CHANNEL \ +{ \ + {9600, -107, -1}, \ + {9570, -258, -1}, \ + {9580, -258, -1}, \ + {9590, -258, -1}, \ + {10400, -107, -1}, \ + {0, 0, 0} \ +} + +#define MT6630_FM_FAKE_CHANNEL \ +{ \ + {9600,-107,-1}, \ + {10400,-107,-1}, \ + {0, 0, 0} \ +} + +#define MT6631_FM_FAKE_CHANNEL \ +{ \ + {9210, -205, -1}, \ + {9600, -152, -1}, \ + {10400, -152, -1}, \ + {10750, -205, -1}, \ + {0, 0, 0} \ +} + +#define MT6632_FM_FAKE_CHANNEL \ +{ \ + {9600, -107, -1}, \ + {10400, -107, -1}, \ + {0, 0, 0} \ +} + +static struct fm_fake_channel mt6620_fake_ch[] = MT6620_FM_FAKE_CHANNEL; +static struct fm_fake_channel mt6627_fake_ch[] = MT6627_FM_FAKE_CHANNEL; +static struct fm_fake_channel mt6628_fake_ch[] = MT6628_FM_FAKE_CHANNEL; +static struct fm_fake_channel mt6580_fake_ch[] = MT6580_FM_FAKE_CHANNEL; +static struct fm_fake_channel mt6630_fake_ch[] = MT6630_FM_FAKE_CHANNEL; +static struct fm_fake_channel mt6631_fake_ch[] = MT6631_FM_FAKE_CHANNEL; +static struct fm_fake_channel mt6632_fake_ch[] = MT6632_FM_FAKE_CHANNEL; + +static struct fm_fake_channel_t fake_ch_info = {0, 0}; + +void CUST_update_cfg(struct CUST_cfg_ds *cfg, int chipid) +{ + struct fm_fake_channel *fake_ch = NULL; + + LOGI("update connsys chipid=0x%x\n", chipid); + + switch (chipid) + { + case FM_CHIP_MT6580: + cfg->chip = FM_CHIP_MT6580; + fake_ch = mt6580_fake_ch; + break; + case FM_CHIP_MT6620: + cfg->chip = FM_CHIP_MT6620; + fake_ch = mt6620_fake_ch; + break; + case FM_CHIP_MT6627: + cfg->chip = FM_CHIP_MT6627; + fake_ch = mt6627_fake_ch; + break; + case FM_CHIP_MT6628: + cfg->chip = FM_CHIP_MT6628; + fake_ch = mt6628_fake_ch; + break; + case FM_CHIP_MT6630: + cfg->chip = FM_CHIP_MT6630; + fake_ch = mt6630_fake_ch; + break; + case FM_CHIP_MT6631: + cfg->chip = FM_CHIP_MT6631; + fake_ch = mt6631_fake_ch; + break; + case FM_CHIP_MT6632: + cfg->chip = FM_CHIP_MT6632; + fake_ch = mt6632_fake_ch; + break; + case FM_CHIP_MT6635: + cfg->chip = FM_CHIP_MT6635; + fake_ch = mt6631_fake_ch; + break; + default: + LOGE("not support chipid=0x%x\n", chipid); + break; + } + + cfg->band = FM_RAIDO_BAND; // 1, UE; 2, JAPAN; 3, JAPANW + + cfg->low_band = FM_FREQ_MIN * 10; + cfg->high_band = FM_FREQ_MAX * 10; + + if (property_get_int32("persist.vendor.connsys.fm_50khz_support", 0) == 1) { + cfg->seek_space = 5; // FM radio seek space, 5:50KHZ; 1:100KHZ; 2:200KHZ + } else { + cfg->seek_space = 1; + } + + cfg->max_scan_num = FM_MAX_CHL_SIZE; + cfg->seek_lev = FM_SEEKTH_LEVEL_DEFAULT; + cfg->scan_sort = FM_SCAN_SORT_SELECT; + + if (property_get_int32("persist.vendor.connsys.fm_short_antenna_support", 0) == 1) { + cfg->short_ana_sup = fm_false; + } else { + cfg->short_ana_sup = fm_true; + } + + cfg->rssi_th_l2 = FM_CHIP_DESE_RSSI_TH; + cfg->rssi_th_l2 = (cfg->rssi_th_l2 > -72) ? -72 : cfg->rssi_th_l2; + cfg->rssi_th_l2 = (cfg->rssi_th_l2 < -102) ? -102 : cfg->rssi_th_l2; + + if (fake_ch) { + fake_ch_info.chan = fake_ch; + fake_ch_info.size = 0; + while (fake_ch[fake_ch_info.size].freq > 0) { + fake_ch_info.size++; + } + } + + cfg->fake_chan = &fake_ch_info; +} + +int CUST_get_cfg(struct CUST_cfg_ds *cfg) +{ + char val[PROPERTY_VALUE_MAX] = {0}; + int chipid = FM_CHIP_UNSUPPORTED; + + if (property_get("persist.vendor.connsys.fm_chipid", val, NULL)) { + if (strcmp(val, "soc") == 0) { + chipid = FM_CHIP_MT6580; + } else if (strcmp(val, "mt6620") == 0) { + chipid = FM_CHIP_MT6620; + } else if (strcmp(val, "mt6627") == 0) { + chipid = FM_CHIP_MT6627; + } else if (strcmp(val, "mt6628") == 0) { + chipid = FM_CHIP_MT6628; + } else if (strcmp(val, "mt6630") == 0) { + chipid = FM_CHIP_MT6630; + } else if (strcmp(val, "mt6631") == 0) { + chipid = FM_CHIP_MT6631; + } else if (strcmp(val, "mt6632") == 0) { + chipid = FM_CHIP_MT6632; + } else if ((strcmp(val, "mt6635") == 0) + || (strcmp(val, "connac2x") == 0)) { + chipid = FM_CHIP_MT6635; + } + } + + if (chipid == FM_CHIP_UNSUPPORTED) { + if (property_get("vendor.connsys.fm.adie.chipid", val, NULL)) { + if (strcmp(val, "0x6631") == 0) { + chipid = FM_CHIP_MT6631; + } else if ((strcmp(val, "0x6635") == 0) + || (strcmp(val, "0x6637") == 0)) { + chipid = FM_CHIP_MT6635; + } else { + LOGE("not support chipid=%s\n", val); + } + } else if (property_get("vendor.connsys.adie.chipid", val, NULL)) { + if (strcmp(val, "0x6631") == 0) { + chipid = FM_CHIP_MT6631; + } else if ((strcmp(val, "0x6635") == 0) + || (strcmp(val, "0x6637") == 0)) { + chipid = FM_CHIP_MT6635; + } else { + LOGE("not support chipid=%s\n", val); + } + } else { + LOGE("get vendor.connsys.fm.adie.chipid fail\n"); + } + } + + CUST_update_cfg(cfg, chipid); + + return 0; +} diff --git a/libfmjni/fm.h b/libfmjni/fm.h new file mode 100755 index 0000000..4ef2442 --- /dev/null +++ b/libfmjni/fm.h @@ -0,0 +1,547 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __FM_H__ +#define __FM_H__ + +#include +#include + +typedef signed char fm_s8; +typedef signed short fm_s16; +typedef signed int fm_s32; +typedef signed long long fm_s64; +typedef unsigned char fm_u8; +typedef unsigned short fm_u16; +typedef unsigned int fm_u32; +typedef unsigned long long fm_u64; +typedef enum fm_bool { + fm_false = 0, + fm_true = 1 +} fm_bool; + +// scan sort algorithm +enum { + FM_SCAN_SORT_NON = 0, + FM_SCAN_SORT_UP, + FM_SCAN_SORT_DOWN, + FM_SCAN_SORT_MAX +}; + +// scan methods +enum { + FM_SCAN_SEL_HW = 0, // select hardware scan, advantage: fast + FM_SCAN_SEL_SW, // select software scan, advantage: more accurate + FM_SCAN_SEL_MAX +}; + +//***************************************************************************************** +//***********************************FM config for customer ******************************* +//***************************************************************************************** +#define FMR_RSSI_TH_LONG 0x0301 // FM radio long antenna RSSI threshold(11.375dBuV) +#define FMR_RSSI_TH_SHORT 0x02E0 // FM radio short antenna RSSI threshold(-1dBuV) +#define FMR_CQI_TH 0x00E9 // FM radio Channel quality indicator threshold(0x0000~0x00FF) +#define FMR_SEEK_SPACE 1 // FM radio seek space,1:100KHZ; 2:200KHZ +#define FMR_SCAN_CH_SIZE 40 // FM radio scan max channel size +#define FMR_BAND 1 // FM radio band, 1:87.5MHz~108.0MHz; 2:76.0MHz~90.0MHz; + // 3:76.0MHz~108.0MHz; 4:special +#define FMR_BAND_FREQ_L 875 // FM radio special band low freq(Default 87.5MHz) +#define FMR_BAND_FREQ_H 1080 // FM radio special band high freq(Default 108.0MHz) +#define FM_SCAN_SORT_SELECT FM_SCAN_SORT_NON +#define FM_SCAN_SELECT FM_SCAN_SEL_HW +#define FM_SCAN_SOFT_MUTE_GAIN_TH 3 // soft-mute threshold when software scan, rang: 0~3, + // 0 means better audio quality but less channel +#define FM_CHIP_DESE_RSSI_TH (-102) // rang: -102 ~ -72 + +//***************************************************************************************** +//***********************************FM config for engineer ******************************* +//***************************************************************************************** +#define FMR_MR_TH 0x01BD // FM radio MR threshold +#define ADDR_SCAN_TH 0xE0 // scan thrshold register +#define ADDR_CQI_TH 0xE1 // scan CQI register +//***************************************************************************************** + +#define FM_NAME "fm" +#define FM_DEVICE_NAME "/dev/fm" + +// errno +#define FM_SUCCESS 0 +#define FM_FAILED 1 +#define FM_EPARM 2 +#define FM_BADSTATUS 3 +#define FM_TUNE_FAILED 4 +#define FM_SEEK_FAILED 5 +#define FM_BUSY 6 +#define FM_SCAN_FAILED 7 + +// band +#define FM_BAND_UNKNOWN 0 +#define FM_BAND_UE 1 // US/Europe band 87.5MHz ~ 108MHz (DEFAULT) +#define FM_BAND_JAPAN 2 // Japan band 76MHz ~ 90MHz +#define FM_BAND_JAPANW 3 // Japan wideband 76MHZ ~ 108MHz +#define FM_BAND_SPECIAL 4 // special band between 76MHZ and 108MHz +#define FM_BAND_DEFAULT FM_BAND_UE + +#define FM_UE_FREQ_MIN 875 +#define FM_UE_FREQ_MAX 1080 +#define FM_JP_FREQ_MIN 760 +#define FM_JP_FREQ_MAX 1080 +#define FM_FREQ_MIN FMR_BAND_FREQ_L +#define FM_FREQ_MAX FMR_BAND_FREQ_H +#define FM_RAIDO_BAND FM_BAND_UE + +// space +#define FM_SPACE_UNKNOWN 0 +#define FM_SPACE_100K 1 +#define FM_SPACE_200K 2 +#define FM_SPACE_50K 5 +#define FM_SPACE_DEFAULT FM_SPACE_100K + +#define FM_SEEK_SPACE FMR_SEEK_SPACE + +// max scan channel num +#define FM_MAX_CHL_SIZE FMR_SCAN_CH_SIZE +// auto HiLo +#define FM_AUTO_HILO_OFF 0 +#define FM_AUTO_HILO_ON 1 + +// seek direction +#define FM_SEEK_UP 0 +#define FM_SEEK_DOWN 1 + +// seek threshold +#define FM_SEEKTH_LEVEL_DEFAULT 4 + +struct fm_tune_parm { + uint8_t err; + uint8_t band; + uint8_t space; + uint8_t hilo; + uint8_t deemphasis; + uint16_t freq; +}; + +struct fm_seek_parm { + uint8_t err; + uint8_t band; + uint8_t space; + uint8_t hilo; + uint8_t seekdir; + uint8_t seekth; + uint16_t freq; +}; + +struct fm_scan_parm { + uint8_t err; + uint8_t band; + uint8_t space; + uint8_t hilo; + uint16_t freq; + uint16_t ScanTBL[16]; + uint16_t ScanTBLSize; +}; + +struct fm_ch_rssi { + uint16_t freq; + int rssi; +}; + +enum fm_scan_cmd_t { + FM_SCAN_CMD_INIT = 0, + FM_SCAN_CMD_START, + FM_SCAN_CMD_GET_NUM, + FM_SCAN_CMD_GET_CH, + FM_SCAN_CMD_GET_RSSI, + FM_SCAN_CMD_GET_CH_RSSI, + FM_SCAN_CMD_MAX +}; + +struct fm_scan_t { + enum fm_scan_cmd_t cmd; + int ret; // 0, success; else error code + uint16_t lower; // lower band, Eg, 7600 -> 76.0Mhz + uint16_t upper; // upper band, Eg, 10800 -> 108.0Mhz + int space; // 5: 50KHz, 10: 100Khz, 20: 200Khz + int num; // valid channel number + void *priv; + int sr_size; // scan result buffer size in bytes + union { + uint16_t *ch_buf; // channel buffer + int *rssi_buf; // rssi buffer + struct fm_ch_rssi *ch_rssi_buf; //channel and RSSI buffer + } sr; +}; + +struct fm_seek_t { + int ret; // 0, success; else error code + uint16_t freq; + uint16_t lower; // lower band, Eg, 7600 -> 76.0Mhz + uint16_t upper; // upper band, Eg, 10800 -> 108.0Mhz + int space; // 5: 50KHz, 10: 100Khz, 20: 200Khz + int dir; // 0: up; 1: down + int th; // seek threshold in dbm(Eg, -95dbm) + void *priv; +}; + +struct fm_tune_t { + int ret; // 0, success; else error code + uint16_t freq; + uint16_t lower; // lower band, Eg, 7600 -> 76.0Mhz + uint16_t upper; // upper band, Eg, 10800 -> 108.0Mhz + int space; // 5: 50KHz, 10: 100Khz, 20: 200Khz + void *priv; +}; + +struct fm_softmute_tune_t { + fm_s32 rssi; // RSSI of current channel + fm_u16 freq; // current frequency + fm_bool valid; // current channel is valid(true) or not(false) +}; + +struct fm_rssi_req { + uint16_t num; + uint16_t read_cnt; + struct fm_ch_rssi cr[16*16]; +}; + +struct fm_hw_info { + int chip_id; + int eco_ver; + int rom_ver; + int patch_ver; + int reserve; +}; + +struct fm_search_threshold_t { + fm_s32 th_type;// 0, RSSI. 1,desense RSSI. 2,SMG. + fm_s32 th_val; //threshold value + fm_s32 reserve; +}; + +#define NEED_DEF_RDS 1 + +#if NEED_DEF_RDS +//For RDS feature +typedef struct { + uint8_t TP; + uint8_t TA; + uint8_t Music; + uint8_t Stereo; + uint8_t Artificial_Head; + uint8_t Compressed; + uint8_t Dynamic_PTY; + uint8_t Text_AB; + uint32_t flag_status; +} RDSFlag_Struct; + +typedef struct { + uint16_t Month; + uint16_t Day; + uint16_t Year; + uint16_t Hour; + uint16_t Minute; + uint8_t Local_Time_offset_signbit; + uint8_t Local_Time_offset_half_hour; +} CT_Struct; + +typedef struct { + int16_t AF_Num; + int16_t AF[2][25]; + uint8_t Addr_Cnt; + uint8_t isMethod_A; + uint8_t isAFNum_Get; +} AF_Info; + +typedef struct { + uint8_t PS[4][8]; + uint8_t Addr_Cnt; +} PS_Info; + +typedef struct { + uint8_t TextData[4][64]; + uint8_t GetLength; + uint8_t isRTDisplay; + uint8_t TextLength; + uint8_t isTypeA; + uint8_t BufCnt; + uint16_t Addr_Cnt; +} RT_Info; + +struct rds_raw_data { + int dirty; // indicate if the data changed or not + int len; // the data len form chip + uint8_t data[148]; +}; + +struct rds_group_cnt { + unsigned int total; + unsigned int groupA[16]; // RDS groupA counter + unsigned int groupB[16]; // RDS groupB counter +}; + +enum rds_group_cnt_opcode { + RDS_GROUP_CNT_READ = 0, + RDS_GROUP_CNT_WRITE, + RDS_GROUP_CNT_RESET, + RDS_GROUP_CNT_MAX +}; + +struct rds_group_cnt_req { + int err; + enum rds_group_cnt_opcode op; + struct rds_group_cnt gc; +}; + +typedef struct { + CT_Struct CT; + RDSFlag_Struct RDSFlag; + uint16_t PI; + uint8_t Switch_TP; + uint8_t PTY; + AF_Info AF_Data; + AF_Info AFON_Data; + uint8_t Radio_Page_Code; + uint16_t Program_Item_Number_Code; + uint8_t Extend_Country_Code; + uint16_t Language_Code; + PS_Info PS_Data; + uint8_t PS_ON[8]; + RT_Info RT_Data; + uint16_t event_status; + struct rds_group_cnt gc; +} RDSData_Struct; + +//valid Rds Flag for notify +typedef enum { + RDS_FLAG_IS_TP = 0x0001, // Program is a traffic program + RDS_FLAG_IS_TA = 0x0002, // Program currently broadcasts a traffic ann. + RDS_FLAG_IS_MUSIC = 0x0004, // Program currently broadcasts music + RDS_FLAG_IS_STEREO = 0x0008, // Program is transmitted in stereo + RDS_FLAG_IS_ARTIFICIAL_HEAD = 0x0010, // Program is an artificial head recording + RDS_FLAG_IS_COMPRESSED = 0x0020, // Program content is compressed + RDS_FLAG_IS_DYNAMIC_PTY = 0x0040, // Program type can change + RDS_FLAG_TEXT_AB = 0x0080 // If this flag changes state, a new radio text string begins +} RdsFlag; + +typedef enum { + RDS_EVENT_FLAGS = 0x0001, // One of the RDS flags has changed state + RDS_EVENT_PI_CODE = 0x0002, // The program identification code has changed + RDS_EVENT_PTY_CODE = 0x0004, // The program type code has changed + RDS_EVENT_PROGRAMNAME = 0x0008, // The program name has changed + RDS_EVENT_UTCDATETIME = 0x0010, // A new UTC date/time is available + RDS_EVENT_LOCDATETIME = 0x0020, // A new local date/time is available + RDS_EVENT_LAST_RADIOTEXT = 0x0040, // A radio text string was completed + RDS_EVENT_AF = 0x0080, // Current Channel RF signal strength too weak, need do AF switch + RDS_EVENT_AF_LIST = 0x0100, // An alternative frequency list is ready + RDS_EVENT_AFON_LIST = 0x0200, // An alternative frequency list is ready + RDS_EVENT_TAON = 0x0400, // Other Network traffic announcement start + RDS_EVENT_TAON_OFF = 0x0800, // Other Network traffic announcement finished. + RDS_EVENT_ECC_CODE = 0x1000, /* ECC code */ + RDS_EVENT_RDS = 0x2000, // RDS Interrupt had arrived durint timer period + RDS_EVENT_NO_RDS = 0x4000, // RDS Interrupt not arrived durint timer period + RDS_EVENT_RDS_TIMER = 0x8000 // Timer for RDS Bler Check. ---- BLER block error rate +} RdsEvent; +#endif + +typedef enum { + FM_I2S_ON = 0, + FM_I2S_OFF, + FM_I2S_STATE_ERR +} fm_i2s_state_e; + +typedef enum { + FM_I2S_MASTER = 0, + FM_I2S_SLAVE, + FM_I2S_MODE_ERR +} fm_i2s_mode_e; + +typedef enum { + FM_I2S_32K = 0, + FM_I2S_44K, + FM_I2S_48K, + FM_I2S_SR_ERR +} fm_i2s_sample_e; + +struct fm_i2s_setting { + int onoff; + int mode; + int sample; +}; + +typedef enum { + FM_RX = 0, + FM_TX = 1 +} FM_PWR_T; + +typedef struct fm_i2s_info { + int status; /* 0:FM_I2S_ON, 1:FM_I2S_OFF,2:error */ + int mode; /* 0:FM_I2S_MASTER, 1:FM_I2S_SLAVE,2:error */ + int rate; /* 0:FM_I2S_32K:32000,1:FM_I2S_44K:44100,2:FM_I2S_48K:48000,3:error */ +} fm_i2s_info_t; + +typedef enum { + FM_AUD_ANALOG = 0, + FM_AUD_I2S = 1, + FM_AUD_MRGIF = 2, + FM_AUD_ERR +} fm_audio_path_e; + +typedef enum { + FM_I2S_PAD_CONN = 0, + FM_I2S_PAD_IO = 1, + FM_I2S_PAD_ERR +} fm_i2s_pad_sel_e; + +typedef struct fm_audio_info { + fm_audio_path_e aud_path; + fm_i2s_info_t i2s_info; + fm_i2s_pad_sel_e i2s_pad; +} fm_audio_info_t; + +struct fm_cqi { + int ch; + int rssi; + int reserve; +}; + +struct fm_cqi_req { + uint16_t ch_num; + int buf_size; + char *cqi_buf; +}; + +typedef struct { + int freq; + int rssi; +} fm_desense_check_t; + +typedef struct { + uint16_t lower; // lower band, Eg, 7600 -> 76.0Mhz + uint16_t upper; // upper band, Eg, 10800 -> 108.0Mhz + int space; // 0x1: 50KHz, 0x2: 100Khz, 0x4: 200Khz + int cycle; // repeat times +} fm_full_cqi_log_t; + +// ********** ***********FM IOCTL define start ******************************* +#define FM_IOC_MAGIC 0xf5 +#define FM_IOCTL_POWERUP _IOWR(FM_IOC_MAGIC, 0, struct fm_tune_parm*) +#define FM_IOCTL_POWERDOWN _IOWR(FM_IOC_MAGIC, 1, int32_t*) +#define FM_IOCTL_TUNE _IOWR(FM_IOC_MAGIC, 2, struct fm_tune_parm*) +#define FM_IOCTL_SEEK _IOWR(FM_IOC_MAGIC, 3, struct fm_seek_parm*) +#define FM_IOCTL_SETVOL _IOWR(FM_IOC_MAGIC, 4, uint32_t*) +#define FM_IOCTL_GETVOL _IOWR(FM_IOC_MAGIC, 5, uint32_t*) +#define FM_IOCTL_MUTE _IOWR(FM_IOC_MAGIC, 6, uint32_t*) +#define FM_IOCTL_GETRSSI _IOWR(FM_IOC_MAGIC, 7, int32_t*) +#define FM_IOCTL_SCAN _IOWR(FM_IOC_MAGIC, 8, struct fm_scan_parm*) +#define FM_IOCTL_STOP_SCAN _IO(FM_IOC_MAGIC, 9) + +//IOCTL and struct for test +#define FM_IOCTL_GETCHIPID _IOWR(FM_IOC_MAGIC, 10, uint16_t*) +#define FM_IOCTL_EM_TEST _IOWR(FM_IOC_MAGIC, 11, struct fm_em_parm*) +#define FM_IOCTL_RW_REG _IOWR(FM_IOC_MAGIC, 12, struct fm_ctl_parm*) +#define FM_IOCTL_GETMONOSTERO _IOWR(FM_IOC_MAGIC, 13, uint16_t*) +#define FM_IOCTL_GETCURPAMD _IOWR(FM_IOC_MAGIC, 14, uint16_t*) +#define FM_IOCTL_GETGOODBCNT _IOWR(FM_IOC_MAGIC, 15, uint16_t*) +#define FM_IOCTL_GETBADBNT _IOWR(FM_IOC_MAGIC, 16, uint16_t*) +#define FM_IOCTL_GETBLERRATIO _IOWR(FM_IOC_MAGIC, 17, uint16_t*) + +//IOCTL for RDS +#define FM_IOCTL_RDS_ONOFF _IOWR(FM_IOC_MAGIC, 18, uint16_t*) +#define FM_IOCTL_RDS_SUPPORT _IOWR(FM_IOC_MAGIC, 19, int32_t*) + +#define FM_IOCTL_RDS_SIM_DATA _IOWR(FM_IOC_MAGIC, 23, uint32_t*) +#define FM_IOCTL_IS_FM_POWERED_UP _IOWR(FM_IOC_MAGIC, 24, uint32_t*) + +//IOCTL for FM over BT +#define FM_IOCTL_OVER_BT_ENABLE _IOWR(FM_IOC_MAGIC, 29, int32_t*) + +//IOCTL for FM ANTENNA SWITCH +#define FM_IOCTL_ANA_SWITCH _IOWR(FM_IOC_MAGIC, 30, int32_t*) +#define FM_IOCTL_GETCAPARRAY _IOWR(FM_IOC_MAGIC, 31, int32_t*) + +//IOCTL for FM I2S Setting +#define FM_IOCTL_I2S_SETTING _IOWR(FM_IOC_MAGIC, 33, struct fm_i2s_setting*) + +#define FM_IOCTL_RDS_GROUPCNT _IOWR(FM_IOC_MAGIC, 34, struct rds_group_cnt_req*) +#define FM_IOCTL_RDS_GET_LOG _IOWR(FM_IOC_MAGIC, 35, struct rds_raw_data*) + +#define FM_IOCTL_SCAN_GETRSSI _IOWR(FM_IOC_MAGIC, 36, struct fm_rssi_req*) +#define FM_IOCTL_SETMONOSTERO _IOWR(FM_IOC_MAGIC, 37, int32_t) +#define FM_IOCTL_RDS_BC_RST _IOWR(FM_IOC_MAGIC, 38, int32_t*) +#define FM_IOCTL_CQI_GET _IOWR(FM_IOC_MAGIC, 39, struct fm_cqi_req*) +#define FM_IOCTL_GET_HW_INFO _IOWR(FM_IOC_MAGIC, 40, struct fm_hw_info*) +#define FM_IOCTL_GET_I2S_INFO _IOWR(FM_IOC_MAGIC, 41, fm_i2s_info_t*) +#define FM_IOCTL_IS_DESE_CHAN _IOWR(FM_IOC_MAGIC, 42, int32_t*) +#define FM_IOCTL_TOP_RDWR _IOWR(FM_IOC_MAGIC, 43, struct fm_top_rw_parm*) +#define FM_IOCTL_HOST_RDWR _IOWR(FM_IOC_MAGIC, 44, struct fm_host_rw_parm*) + +#define FM_IOCTL_PRE_SEARCH _IOWR(FM_IOC_MAGIC, 45,int32_t) +#define FM_IOCTL_RESTORE_SEARCH _IOWR(FM_IOC_MAGIC, 46,int32_t) + +#define FM_IOCTL_SET_SEARCH_THRESHOLD _IOWR(FM_IOC_MAGIC, 47, fm_search_threshold_t*) + +#define FM_IOCTL_GET_AUDIO_INFO _IOWR(FM_IOC_MAGIC, 48, fm_audio_info_t*) + +#define FM_IOCTL_SCAN_NEW _IOWR(FM_IOC_MAGIC, 60, struct fm_scan_t*) +#define FM_IOCTL_SEEK_NEW _IOWR(FM_IOC_MAGIC, 61, struct fm_seek_t*) +#define FM_IOCTL_TUNE_NEW _IOWR(FM_IOC_MAGIC, 62, struct fm_tune_t*) + +#define FM_IOCTL_SOFT_MUTE_TUNE _IOWR(FM_IOC_MAGIC, 63, struct fm_softmute_tune_t*)/*for soft mute tune*/ +#define FM_IOCTL_DESENSE_CHECK _IOWR(FM_IOC_MAGIC, 64, fm_desense_check_t*) + +//IOCTL for EM +#define FM_IOCTL_FULL_CQI_LOG _IOWR(FM_IOC_MAGIC, 70, fm_full_cqi_log_t *) + +#define FM_IOCTL_DUMP_REG _IO(FM_IOC_MAGIC, 0xFF) +// ********** ***********FM IOCTL define end ******************************* + +enum group_idx { + mono = 0, + stereo, + RSSI_threshold, + HCC_Enable, + PAMD_threshold, + Softmute_Enable, + De_emphasis, + HL_Side, + Demod_BW, + Dynamic_Limiter, + Softmute_Rate, + AFC_Enable, + Softmute_Level, + Analog_Volume, + GROUP_TOTAL_NUMS +}; + +enum item_idx { + Sblend_OFF = 0, + Sblend_ON, + ITEM_TOTAL_NUMS +}; + +struct fm_ctl_parm { + uint8_t err; + uint8_t addr; + uint16_t val; + uint16_t rw_flag; // 0:write, 1:read +}; + +struct fm_em_parm { + uint16_t group_idx; + uint16_t item_idx; + uint32_t item_value; +}; +#endif // __FM_H__ diff --git a/libfmjni/fmlib_cust.h b/libfmjni/fmlib_cust.h new file mode 100644 index 0000000..ee21ab9 --- /dev/null +++ b/libfmjni/fmlib_cust.h @@ -0,0 +1,66 @@ +/* Copyright Statement: + * + * This software/firmware and related documentation ("MediaTek Software") are + * protected under relevant copyright laws. The information contained herein is + * confidential and proprietary to MediaTek Inc. and/or its licensors. Without + * the prior written permission of MediaTek inc. and/or its licensors, any + * reproduction, modification, use or disclosure of MediaTek Software, and + * information contained herein, in whole or in part, shall be strictly + * prohibited. + * + * MediaTek Inc. (C) 2010. All rights reserved. + * + * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES + * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") + * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER + * ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL + * WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED + * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR + * NONINFRINGEMENT. NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH + * RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, + * INCORPORATED IN, OR SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES + * TO LOOK ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. + * RECEIVER EXPRESSLY ACKNOWLEDGES THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO + * OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES CONTAINED IN MEDIATEK + * SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE + * RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR + * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S + * ENTIRE AND CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE + * RELEASED HEREUNDER WILL BE, AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE + * MEDIATEK SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE + * CHARGE PAID BY RECEIVER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. + * + * The following software/firmware and/or related documentation ("MediaTek + * Software") have been modified by MediaTek Inc. All revisions are subject to + * any receiver's applicable license agreements with MediaTek Inc. + */ + +#ifndef __FMLIB_CUST_H__ +#define __FMLIB_CUST_H__ + +#define FM_CHIP_MT6616 0x6616 +#define FM_CHIP_MT6620 0x6620 +#define FM_CHIP_MT6626 0x6626 +#define FM_CHIP_MT6628 0x6628 +#define FM_CHIP_MT6627 0x6627 +#define FM_CHIP_MT6580 0x6580 +#define FM_CHIP_MT6630 0x6630 +#define FM_CHIP_MT6631 0x6631 +#define FM_CHIP_MT6632 0x6632 +#define FM_CHIP_MT6635 0x6635 + +#define FM_CHIP_UNSUPPORTED -1 + +#define FM_JNI_SCAN_SPACE_50K 5 +#define FM_JNI_SCAN_SPACE_100K 1 +#define FM_JNI_SCAN_SPACE_200K 2 + +/*implement fm scan by soft mute tune + change to 0 will scan by orginal way*/ +#define FMR_SOFT_MUTE_TUEN_SCAN 1 +#define FMR_NOISE_FLOORT_DETECT 1 +#define RSSI_TH -296 +#define FM_SEVERE_RSSI_TH -107 // 67dBuV +#define FM_NOISE_FLOOR_OFFSET 10 + +#endif // __FMLIB_CUST_H__ diff --git a/libfmjni/fmr.h b/libfmjni/fmr.h new file mode 100755 index 0000000..ef362f4 --- /dev/null +++ b/libfmjni/fmr.h @@ -0,0 +1,276 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __FMR_H__ +#define __FMR_H__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "fm.h" +#include "fmlib_cust.h" + +#undef LOGV +#define LOGV(...) ALOGV(__VA_ARGS__) +#undef LOGD +#define LOGD(...) ALOGD(__VA_ARGS__) +#undef LOGI +#define LOGI(...) ALOGI(__VA_ARGS__) +#undef LOGW +#define LOGW(...) ALOGW(__VA_ARGS__) +#undef LOGE +#define LOGE(...) ALOGE(__VA_ARGS__) + + +#define FM_DEV_NAME "/dev/fm" + +#define FM_RDS_PS_LEN 8 + +struct fm_fake_channel +{ + int freq; + int rssi_th; + int reserve; +}; + +struct fm_fake_channel_t +{ + int size; + struct fm_fake_channel *chan; +}; + +struct CUST_cfg_ds +{ + int16_t chip; + int32_t band; + int32_t low_band; + int32_t high_band; + int32_t seek_space; + int32_t max_scan_num; + int32_t seek_lev; + int32_t scan_sort; + int32_t short_ana_sup; + int32_t rssi_th_l2; + struct fm_fake_channel_t *fake_chan; +}; + +struct fm_cbk_tbl { + //Basic functions. + int (*open_dev)(const char *pname, int *fd); + int (*close_dev)(int fd); + int (*pwr_up)(int fd, int band, int freq); + int (*pwr_down)(int fd, int type); + int (*seek)(int fd, int *freq, int band, int dir, int lev); + int (*scan)(int fd, uint16_t *tbl, int *num, int band, int sort); + int (*fastget_rssi)(int fd, struct fm_rssi_req *rssi_req); + int (*get_cqi)(int fd, int num, char *buf, int buf_len); + int (*stop_scan)(int fd); + int (*tune)(int fd, int freq, int band); + int (*set_mute)(int fd, int mute); + int (*is_fm_pwrup)(int fd, int *pwrup); + int (*is_rdsrx_support)(int fd, int *supt); + int (*turn_on_off_rds)(int fd, int onoff); + int (*get_chip_id)(int fd, int *chipid); + //FOR RDS RX. + int (*read_rds_data)(int fd, RDSData_Struct *rds, uint16_t *rds_status); + int (*get_pi)(int fd, RDSData_Struct *rds, uint16_t *pi); + int (*get_ecc)(int fd, RDSData_Struct *rds, uint8_t *ecc); + int (*get_ps)(int fd, RDSData_Struct *rds, uint8_t **ps, int *ps_len); + int (*get_pty)(int fd, RDSData_Struct *rds, uint8_t *pty); + int (*get_rssi)(int fd, int *rssi); + int (*get_rt)(int fd, RDSData_Struct *rds, uint8_t **rt, int *rt_len); + int (*active_af)(int fd, RDSData_Struct *rds, CUST_cfg_ds *cfg, uint16_t orig_pi, uint16_t cur_freq, uint16_t *ret_freq); + int (*active_ta)(int fd, RDSData_Struct *rds, int band, uint16_t cur_freq, uint16_t *backup_freq, uint16_t *ret_freq); + int (*deactive_ta)(int fd, RDSData_Struct *rds, int band, uint16_t cur_freq, uint16_t *backup_freq, uint16_t *ret_freq); + //FM long/short antenna switch + int (*ana_switch)(int fd, int antenna); + //For FM RX EM mode + int (*get_badratio)(int fd, int *badratio); + int (*get_stereomono)(int fd, int *stemono); + int (*set_stereomono)(int fd, int stemono); + int (*get_caparray)(int fd, int *caparray); + int (*get_hw_info)(int fd, struct fm_hw_info *info); + int (*is_dese_chan)(int fd, int freq); + int (*soft_mute_tune)(int fd, fm_softmute_tune_t *para); + int (*desense_check)(int fd, int freq, int rssi); + int (*set_search_threshold)(int fd, int th_idx,int th_val); + int (*full_cqi_logger)(int fd,fm_full_cqi_log_t *log_parm); + /*New search*/ + int (*pre_search)(int fd); + int (*restore_search)(int fd); +}; + +typedef int (*CUST_func_type)(struct CUST_cfg_ds *); +typedef void (*init_func_type)(struct fm_cbk_tbl *); + +struct fmr_ds { + int fd; + int err; + uint16_t cur_freq; + uint16_t backup_freq; + void *priv; + void *custom_handler; + struct CUST_cfg_ds cfg_data; + struct fm_cbk_tbl tbl; + CUST_func_type get_cfg; + void *init_handler; + init_func_type init_func; + RDSData_Struct rds; + struct fm_hw_info hw_info; + fm_bool scan_stop; +}; + +enum fmr_err_em { + ERR_SUCCESS = 1000, // kernel error begin at here + ERR_INVALID_BUF, + ERR_INVALID_PARA, + ERR_STP, + ERR_GET_MUTEX, + ERR_FW_NORES, + ERR_RDS_CRC, + ERR_INVALID_FD, // native error begin at here + ERR_UNSUPPORT_CHIP, + ERR_LD_LIB, + ERR_FIND_CUST_FNUC, + ERR_UNINIT, + ERR_NO_MORE_IDX, + ERR_RDS_NO_DATA, + ERR_UNSUPT_SHORTANA, + ERR_MAX +}; + +enum fmr_rds_onoff { + FMR_RDS_ON, + FMR_RDS_OFF, + FMR_MAX +}; + +typedef enum { + FM_LONG_ANA = 0, + FM_SHORT_ANA +} fm_antenna_type; + + +#define CQI_CH_NUM_MAX 255 +#define CQI_CH_NUM_MIN 0 + + +/****************** Function declaration ******************/ +//fmr_err.cpp +char *FMR_strerr(); +void FMR_seterr(int err); + +//fmr_core.cpp +int FMR_init(void); +int FMR_get_cfgs(int idx); +int FMR_open_dev(int idx); +int FMR_close_dev(int idx); +int FMR_pwr_up(int idx, int freq); +int FMR_pwr_down(int idx, int type); +int FMR_seek(int idx, int start_freq, int dir, int *ret_freq); +int FMR_scan(int idx, uint16_t *tbl, int *num); +int FMR_stop_scan(int idx); +int FMR_tune(int idx, int freq); +int FMR_set_mute(int idx, int mute); +int FMR_is_fm_pwrup(int idx, int *pwrup); +int FMR_is_rdsrx_support(int idx, int *supt); +int FMR_turn_on_off_rds(int idx, int onoff); +int FMR_get_chip_id(int idx, int *chipid); +int FMR_read_rds_data(int idx, uint16_t *rds_status); +int FMR_get_pi(int idx, uint16_t *pi); +int FMR_get_ecc(int idx, uint8_t *ecc); +int FMR_get_ps(int idx, uint8_t **ps, int *ps_len); +int FMR_get_pty(int idx, uint8_t *pty); +int FMR_get_rssi(int idx, int *rssi); +int FMR_get_rt(int idx, uint8_t **rt, int *rt_len); +int FMR_active_af(int idx, uint16_t orig_pi, uint16_t *ret_freq); +int FMR_active_ta(int idx, uint16_t *ret_freq); +int FMR_deactive_ta(int idx, uint16_t *ret_freq); + +int FMR_ana_switch(int idx, int antenna); +int FMR_get_badratio(int idx, int *badratio); +int FMR_get_stereomono(int idx, int *stemono); +int FMR_set_stereomono(int idx, int stemono); +int FMR_get_caparray(int idx, int *caparray); +int FMR_get_hw_info(int idx, int **info, int *info_len); +int FMR_Pre_Search(int idx); +int FMR_Restore_Search(int idx); +int FMR_EMSetTH(int idx, int th_idx, int th_val); +int FMR_EM_CQI_logger(int idx,uint16_t cycle); +void FM_interface_init(struct fm_cbk_tbl *cbk_tbl); + +//common part +int COM_open_dev(const char *pname, int *fd); +int COM_close_dev(int fd); +int COM_pwr_up(int fd, int band, int freq); +int COM_pwr_down(int fd, int type); +int COM_seek(int fd, int *freq, int band, int dir, int lev); +int COM_Soft_Mute_Tune(int fd, fm_softmute_tune_t *para); +int COM_fastget_rssi(int fd, struct fm_rssi_req *rssi_req); +int COM_get_cqi(int fd, int num, char *buf, int buf_len); +int COM_stop_scan(int fd); +int COM_tune(int fd, int freq, int band); +int COM_set_mute(int fd, int mute); +int COM_is_fm_pwrup(int fd, int *pwrup); +int COM_is_rdsrx_support(int fd, int *supt); +int COM_turn_on_off_rds(int fd, int onoff); +int COM_get_chip_id(int fd, int *chipid); +int COM_read_rds_data(int fd, RDSData_Struct *rds, uint16_t *rds_status); +int COM_get_pi(int fd, RDSData_Struct *rds, uint16_t *pi); +int COM_get_ps(int fd, RDSData_Struct *rds, uint8_t **ps, int *ps_len); +int COM_get_pty(int fd, RDSData_Struct *rds, uint8_t *pty); +int COM_get_rssi(int fd, int *rssi); +int COM_get_rt(int fd, RDSData_Struct *rds, uint8_t **rt, int *rt_len); +int COM_active_af(int fd, RDSData_Struct *rds, CUST_cfg_ds *cfg, uint16_t orig_pi, uint16_t cur_freq, uint16_t *ret_freq); +int COM_active_ta(int fd, RDSData_Struct *rds, int band, uint16_t cur_freq, uint16_t *backup_freq, uint16_t *ret_freq); +int COM_deactive_ta(int fd, RDSData_Struct *rds, int band, uint16_t cur_freq, uint16_t *backup_freq, uint16_t *ret_freq); +int COM_ana_switch(int fd, int antenna); +int COM_get_badratio(int fd, int *badratio); +int COM_get_stereomono(int fd, int *stemono); +int COM_set_stereomono(int fd, int stemono); +int COM_get_caparray(int fd, int *caparray); +int COM_get_hw_info(int fd, struct fm_hw_info *info); +int COM_is_dese_chan(int fd, int freq); +int COM_desense_check(int fd, int freq, int rssi); +int COM_pre_search(int fd); +int COM_restore_search(int fd); +int COM_set_search_threshold(int fd, int th_idx,int th_val); +int COM_full_cqi_logger(int fd, fm_full_cqi_log_t *log_parm); + +void CUST_update_cfg(struct CUST_cfg_ds *cfg, int chipid); +int CUST_get_cfg(struct CUST_cfg_ds *cfg); + +#define FMR_ASSERT(a) { \ + if ((a) == NULL) { \ + LOGE("%s,invalid buf\n", __func__);\ + return -ERR_INVALID_BUF; \ + } \ +} +#endif + diff --git a/libfmjni/fmr_core.cpp b/libfmjni/fmr_core.cpp new file mode 100755 index 0000000..20a2316 --- /dev/null +++ b/libfmjni/fmr_core.cpp @@ -0,0 +1,1264 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * 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. + */ + +/******************************************************************* + * FM JNI core + * return -1 if error occured. else return needed value. + * if return type is char *, return NULL if error occured. + * Do NOT return value access paramater. + * + * FM JNI core should be independent from lower layer, that means + * there should be no low layer dependent data struct in FM JNI core + * + * Naming rule: FMR_n(paramter Micro), FMR_v(functions), fmr_n(global param) + * pfmr_n(global paramter pointer) + * + *******************************************************************/ + +#include "fmr.h" + +#ifdef LOG_TAG +#undef LOG_TAG +#endif +#define LOG_TAG "FMLIB_CORE" + +#define FMR_MAX_IDX 1 + +struct fmr_ds fmr_data; +struct fmr_ds *pfmr_data[FMR_MAX_IDX] = {0}; +#define FMR_fd(idx) ((pfmr_data[idx])->fd) +#define FMR_err(idx) ((pfmr_data[idx])->err) +#define FMR_chip(idx) ((pfmr_data[idx])->cfg_data.chip) +#define FMR_low_band(idx) ((pfmr_data[idx])->cfg_data.low_band) +#define FMR_high_band(idx) ((pfmr_data[idx])->cfg_data.high_band) +#define FMR_seek_space(idx) ((pfmr_data[idx])->cfg_data.seek_space) +#define FMR_max_scan_num(idx) ((pfmr_data[idx])->cfg_data.max_scan_num) +#define FMR_cbk_tbl(idx) ((pfmr_data[idx])->tbl) +#define FMR_cust_hdler(idx) ((pfmr_data[idx])->custom_handler) +#define FMR_get_cfg(idx) ((pfmr_data[idx])->get_cfg) +#define UNUSED(x) (void)(x) + +int FMR_get_cfgs(int idx) +{ + int ret = 0; + + if (idx < 0 || idx >= FMR_MAX_IDX) { + return -ERR_INVALID_PARA; + } + + CUST_get_cfg(&(pfmr_data[idx]->cfg_data)); + LOGI("OK\n"); + + FMR_cust_hdler(idx) = NULL; + FMR_get_cfg(idx) = NULL; + + LOGI("%s successfully. chip: 0x%x, lband: %d, hband: %d, seek_space: %d, max_scan_num: %d\n", __FUNCTION__, FMR_chip(idx), FMR_low_band(idx), FMR_high_band(idx), FMR_seek_space(idx), FMR_max_scan_num(idx)); + + return ret; +} + +int FMR_chk_cfg_data(int idx) +{ + //TODO Need check? how to check? + UNUSED(idx); + return 0; +} + + +int FMR_init() +{ + int idx; + int ret = 0; + //signal(4, sig_alarm); + + for (idx=0; idxinit_func = FM_interface_init; + if (pfmr_data[idx]->init_func == NULL) { + LOGE("%s init_func error, %s\n", __func__, dlerror()); + goto fail; + } else { + LOGI("Go to run init function\n"); + (*pfmr_data[idx]->init_func)(&(pfmr_data[idx]->tbl)); + LOGI("OK\n"); + ret = 0; + } + + return idx; + +fail: + pfmr_data[idx] = NULL; + + return -1; +} + +int FMR_open_dev(int idx) +{ + int ret = 0; + int real_chip = 0; + + if (idx < 0 || idx >= FMR_MAX_IDX) { + return -1; + } + + FMR_ASSERT(FMR_cbk_tbl(idx).open_dev); + + ret = FMR_cbk_tbl(idx).open_dev(FM_DEV_NAME, &FMR_fd(idx)); + if (ret || FMR_fd(idx) < 0) { + LOGE("%s failed, [fd=%d]\n", __func__, FMR_fd(idx)); + return ret; + } + + //Check if customer's cfg matchs driver. + ret = FMR_get_chip_id(idx, &real_chip); + if (FMR_chip(idx) != real_chip) { + LOGE("%s, 0x%x != 0x%x, reinit cfg.\n", __func__, FMR_chip(idx), real_chip); + CUST_update_cfg(&(pfmr_data[idx]->cfg_data), real_chip); + } + if (FMR_chip(idx) != real_chip) { + LOGE("%s, Chip config error. 0x%x != 0x%x\n", __func__, + FMR_chip(idx), real_chip); + ret = FMR_cbk_tbl(idx).close_dev(FMR_fd(idx)); + return ret; + } + + LOGD("%s, [fd=%d] [chipid=0x%x] [ret=%d]\n", __func__, FMR_fd(idx), real_chip, ret); + return ret; +} + +int FMR_close_dev(int idx) +{ + int ret = 0; + + if (idx < 0 || idx >= FMR_MAX_IDX) { + return -1; + } + + FMR_ASSERT(FMR_cbk_tbl(idx).close_dev); + ret = FMR_cbk_tbl(idx).close_dev(FMR_fd(idx)); + LOGD("%s, [fd=%d] [ret=%d]\n", __func__, FMR_fd(idx), ret); + return ret; +} + +int FMR_pwr_up(int idx, int freq) +{ + int ret = 0; + + if (idx < 0 || idx >= FMR_MAX_IDX) { + return -1; + } + + FMR_ASSERT(FMR_cbk_tbl(idx).pwr_up); + + LOGI("%s,[freq=%d]\n", __func__, freq); + if (freq < fmr_data.cfg_data.low_band || freq > fmr_data.cfg_data.high_band) { + LOGE("%s error freq: %d\n", __func__, freq); + ret = -ERR_INVALID_PARA; + return ret; + } + ret = FMR_cbk_tbl(idx).pwr_up(FMR_fd(idx), fmr_data.cfg_data.band, freq); + if (ret) { + LOGE("%s failed, [ret=%d]\n", __func__, ret); + } + fmr_data.cur_freq = freq; + LOGD("%s, [ret=%d]\n", __func__, ret); + return ret; +} + +int FMR_pwr_down(int idx, int type) +{ + int ret = 0; + + if (idx < 0 || idx >= FMR_MAX_IDX) { + return -1; + } + + FMR_ASSERT(FMR_cbk_tbl(idx).pwr_down); + ret = FMR_cbk_tbl(idx).pwr_down(FMR_fd(idx), type); + LOGD("%s, [ret=%d]\n", __func__, ret); + return ret; +} + +int FMR_get_chip_id(int idx, int *chipid) +{ + int ret = 0; + + if (idx < 0 || idx >= FMR_MAX_IDX) { + return -1; + } + + FMR_ASSERT(FMR_cbk_tbl(idx).get_chip_id); + FMR_ASSERT(chipid); + + ret = FMR_cbk_tbl(idx).get_chip_id(FMR_fd(idx), chipid); + if (ret) { + LOGE("%s failed, %s\n", __func__, FMR_strerr()); + *chipid = -1; + } + LOGD("%s, [ret=%d]\n", __func__, ret); + return ret; +} + +int FMR_get_rssi(int idx, int *rssi) +{ + int ret = 0; + + if (idx < 0 || idx >= FMR_MAX_IDX) { + return -1; + } + + FMR_ASSERT(FMR_cbk_tbl(idx).get_rssi); + FMR_ASSERT(rssi); + + ret = FMR_cbk_tbl(idx).get_rssi(FMR_fd(idx), rssi); + if (ret){ + LOGE("%s failed, [ret=%d]\n", __func__, ret); + *rssi = -1; + } + LOGD("%s, [rssi=%d] [ret=%d]\n", __func__, *rssi, ret); + return ret; +} + +int FMR_get_ps(int idx, uint8_t **ps, int *ps_len) +{ + int ret = 0; + + if (idx < 0 || idx >= FMR_MAX_IDX) { + return -1; + } + + FMR_ASSERT(FMR_cbk_tbl(idx).get_ps); + FMR_ASSERT(ps); + FMR_ASSERT(ps_len); + ret = FMR_cbk_tbl(idx).get_ps(FMR_fd(idx), &fmr_data.rds, ps, ps_len); + LOGD("%s, [ret=%d]\n", __func__, ret); + return ret; +} + +int FMR_get_rt(int idx, uint8_t **rt, int *rt_len) +{ + int ret = 0; + + if (idx < 0 || idx >= FMR_MAX_IDX) { + return -1; + } + + FMR_ASSERT(FMR_cbk_tbl(idx).get_rt); + FMR_ASSERT(rt); + FMR_ASSERT(rt_len); + + ret = FMR_cbk_tbl(idx).get_rt(FMR_fd(idx), &fmr_data.rds, rt, rt_len); + LOGD("%s, [ret=%d]\n", __func__, ret); + return ret; +} + +int FMR_get_pi(int idx, uint16_t *pi) +{ + int ret = 0; + + if (idx < 0 || idx >= FMR_MAX_IDX) { + return -1; + } + + FMR_ASSERT(FMR_cbk_tbl(idx).get_pi); + + ret = FMR_cbk_tbl(idx).get_pi(FMR_fd(idx), &fmr_data.rds, pi); + if (ret){ + LOGE("%s failed, %s\n", __func__, FMR_strerr()); + *pi = 0; + } + LOGD("%s, [ret=%d]\n", __func__, ret); + return ret; +} + +int FMR_get_ecc(int idx, uint8_t *ecc) +{ + int ret = 0; + + if (idx < 0 || idx >= FMR_MAX_IDX) { + return -1; + } + + FMR_ASSERT(FMR_cbk_tbl(idx).get_ecc); + + ret = FMR_cbk_tbl(idx).get_ecc(FMR_fd(idx), &fmr_data.rds, ecc); + if (ret){ + LOGE("%s failed\n", __func__); + *ecc = -1; + } + LOGD("%s, [ret=%d]\n", __func__, ret); + return ret; +} + +int FMR_get_pty(int idx, uint8_t *pty) +{ + int ret = 0; + + if (idx < 0 || idx >= FMR_MAX_IDX) { + return -1; + } + + FMR_ASSERT(FMR_cbk_tbl(idx).get_pty); + + ret = FMR_cbk_tbl(idx).get_pty(FMR_fd(idx), &fmr_data.rds, pty); + if (ret){ + *pty = -1; + LOGI("%s failed, %s\n", __func__, FMR_strerr()); + } + LOGD("%s, [ret=%d]\n", __func__, ret); + return ret; +} + +int FMR_tune(int idx, int freq) +{ + int ret = 0; + + if (idx < 0 || idx >= FMR_MAX_IDX) { + return -1; + } + + FMR_ASSERT(FMR_cbk_tbl(idx).tune); + + ret = FMR_cbk_tbl(idx).tune(FMR_fd(idx), freq, fmr_data.cfg_data.band); + if (ret) { + LOGE("%s failed, [ret=%d]\n", __func__, ret); + } + fmr_data.cur_freq = freq; + LOGD("%s, [freq=%d] [ret=%d]\n", __func__, freq, ret); + return ret; +} + +/*return: fm_true: desense, fm_false: not desene channel*/ +fm_bool FMR_DensenseDetect(fm_s32 idx, fm_u16 ChannelNo, fm_s32 RSSI) +{ + fm_u8 bDesenseCh = 0; + + if (idx < 0 || idx >= FMR_MAX_IDX) { + return fm_false; + } + + bDesenseCh = FMR_cbk_tbl(idx).desense_check(FMR_fd(idx), ChannelNo, RSSI); + if (bDesenseCh == 1) { + return fm_true; + } + return fm_false; +} + +fm_bool FMR_SevereDensense(fm_u16 ChannelNo, fm_s32 RSSI) +{ + fm_s32 i = 0; + struct fm_fake_channel_t *chan_info = fmr_data.cfg_data.fake_chan; + + for (i=0; isize; i++) { + if (ChannelNo == chan_info->chan[i].freq) { + //if (RSSI < FM_SEVERE_RSSI_TH) + if (RSSI < chan_info->chan[i].rssi_th) { + LOGI(" SevereDensense[%d] RSSI[%d]\n", ChannelNo,RSSI); + return fm_true; + } else { + break; + } + } + } + return fm_false; +} +#if (FMR_NOISE_FLOORT_DETECT==1) +/*return TRUE:get noise floor freq*/ +fm_bool FMR_NoiseFloorDetect(fm_bool *rF, fm_s32 rssi, fm_s32 *F_rssi) +{ + if (rF[0] == fm_true) { + if (rF[1] == fm_true) { + F_rssi[2] = rssi; + rF[2] = fm_true; + return fm_true; + } else { + F_rssi[1] = rssi; + rF[1] = fm_true; + } + } else { + F_rssi[0] = rssi; + rF[0] = fm_true; + } + return fm_false; +} +#endif + +/*check the cur_freq->freq is valid or not +return fm_true : need check cur_freq->valid + fm_false: check faild, should stop seek +*/ +static fm_bool FMR_Seek_TuneCheck(int idx, fm_softmute_tune_t *cur_freq) +{ + int ret = 0; + + if (idx < 0 || idx >= FMR_MAX_IDX) { + return fm_false; + } + + if (fmr_data.scan_stop == fm_true) { + ret = FMR_tune(idx,fmr_data.cur_freq); + LOGI("seek stop!!! tune ret=%d",ret); + return fm_false; + } + ret = FMR_cbk_tbl(idx).soft_mute_tune(FMR_fd(idx), cur_freq); + if (ret) { + LOGE("soft mute tune, failed:[%d]\n",ret); + cur_freq->valid = fm_false; + return fm_true; + } + if (cur_freq->valid == fm_true)/*get valid channel*/ { + if (FMR_DensenseDetect(idx, cur_freq->freq, cur_freq->rssi) == fm_true) { + LOGI("desense channel detected:[%d] \n", cur_freq->freq); + cur_freq->valid = fm_false; + return fm_true; + } + if (FMR_SevereDensense(cur_freq->freq, cur_freq->rssi) == fm_true) { + LOGI("sever desense channel detected:[%d] \n", cur_freq->freq); + cur_freq->valid = fm_false; + return fm_true; + } + LOGI("seek result freq:[%d] \n", cur_freq->freq); + } + return fm_true; +} +/* +check more 2 freq, curfreq: current freq, seek_dir: 1,forward. 0,backword +*/ +static int FMR_Seek_More(int idx, fm_softmute_tune_t *validfreq, fm_u8 seek_dir, fm_u8 step, fm_u16 min_freq, fm_u16 max_freq) +{ + fm_s32 i; + fm_softmute_tune_t cur_freq; + + if (idx < 0 || idx >= FMR_MAX_IDX) { + return -1; + } + + cur_freq.freq = validfreq->freq; + cur_freq.rssi = 0; + + for (i=0; i<2; i++) { + if (seek_dir)/*forward*/ { + if (cur_freq.freq + step > max_freq) { + return 0; + } + cur_freq.freq += step; + } else/*backward*/ { + if (cur_freq.freq - step < min_freq) { + return 0; + } + cur_freq.freq -= step; + } + if (FMR_Seek_TuneCheck(idx, &cur_freq) == fm_true) { + if (cur_freq.valid == fm_true) { + if (cur_freq.rssi > validfreq->rssi) { + validfreq->freq = cur_freq.freq; + validfreq->rssi = cur_freq.rssi; + LOGI("seek cover last by freq=%d",cur_freq.freq); + } + } + } else { + return -1; + } + } + return 0; +} + +/*check the a valid channel +return -1 : seek fail + 0: seek success +*/ +int FMR_seek_Channel(int idx, int start_freq, int min_freq, int max_freq, int band_channel_no, int seek_space, int dir, int *ret_freq, int *rssi_tmp) +{ + fm_s32 i, ret = 0; + fm_softmute_tune_t cur_freq; + + if (idx < 0 || idx >= FMR_MAX_IDX) { + return -1; + } + + memset(&cur_freq, 0, sizeof(struct fm_softmute_tune_t)); + + if (dir == 1)/*forward*/ { + for (i=((start_freq-min_freq)/seek_space+1); i=0; i--) { + cur_freq.freq = min_freq + seek_space*i; + LOGI("i=%d, freq=%d-----3",i,cur_freq.freq); + ret = FMR_Seek_TuneCheck(idx, &cur_freq); + if (ret == fm_false) { + return -1; + } else { + if (cur_freq.valid == fm_false) { + continue; + } else { + if ((seek_space == 5) && (start_freq == cur_freq.freq + seek_space)) { + continue; // filter the same channel + } + if (FMR_Seek_More(idx, &cur_freq, dir, seek_space, min_freq, max_freq) == 0) { + *ret_freq = cur_freq.freq; + *rssi_tmp = cur_freq.rssi; + return 0; + } else { + return -1; + } + } + } + } + for (i=(band_channel_no-1); i>((start_freq-min_freq)/seek_space); i--) { + cur_freq.freq = min_freq + seek_space*i; + LOGI("i=%d, freq=%d-----4",i,cur_freq.freq); + ret = FMR_Seek_TuneCheck(idx, &cur_freq); + if (ret == fm_false) { + return -1; + } else { + if (cur_freq.valid == fm_false) { + continue; + } else { + if ((seek_space == 5) && (start_freq == cur_freq.freq + seek_space)) { + continue; // filter the same channel + } + if (FMR_Seek_More(idx, &cur_freq, dir,seek_space, min_freq, max_freq) == 0) { + *ret_freq = cur_freq.freq; + *rssi_tmp = cur_freq.rssi; + return 0; + } else { + return -1; + } + } + } + } + } + + *ret_freq = start_freq; + return 0; +} + +int FMR_seek(int idx, int start_freq, int dir, int *ret_freq) +{ + fm_s32 ret = 0; + fm_s32 band_channel_no = 0; + fm_u8 seek_space = 10; + fm_u16 min_freq, max_freq; + int rssi; + + if (idx < 0 || idx >= FMR_MAX_IDX) { + return -1; + } + + if ((start_freq < 7600) || (start_freq > 10800)) /*need replace by macro*/ { + LOGE("%s error start_freq: %d\n", __func__, start_freq); + return -ERR_INVALID_PARA; + } + + //FM radio seek space,5:50KHZ; 1:100KHZ; 2:200KHZ + if (fmr_data.cfg_data.seek_space == 5) { + seek_space = 5; + } else if (fmr_data.cfg_data.seek_space == 2) { + seek_space = 20; + } else { + seek_space = 10; + } + if (fmr_data.cfg_data.band == FM_BAND_JAPAN)/* Japan band 76MHz ~ 90MHz */ { + band_channel_no = (9600-7600)/seek_space + 1; + min_freq = 7600; + max_freq = 9600; + } else if (fmr_data.cfg_data.band == FM_BAND_JAPANW)/* Japan wideband 76MHz ~ 108MHz */ { + band_channel_no = (10800-7600)/seek_space + 1; + min_freq = 7600; + max_freq = 10800; + } else/* US/Europe band 87.5MHz ~ 108MHz (DEFAULT) */ { + band_channel_no = (10800-8750)/seek_space + 1; + min_freq = 8750; + max_freq = 10800; + } + + fmr_data.scan_stop = fm_false; + LOGD("seek start freq %d band_channel_no=[%d], seek_space=%d band[%d - %d] dir=%d\n", start_freq, band_channel_no,seek_space,min_freq,max_freq,dir); + + ret = FMR_seek_Channel(idx, start_freq, min_freq, max_freq, band_channel_no, seek_space, dir, ret_freq, &rssi); + + return ret; +} + +int FMR_set_mute(int idx, int mute) +{ + int ret = 0; + + if (idx < 0 || idx >= FMR_MAX_IDX) { + return -1; + } + + FMR_ASSERT(FMR_cbk_tbl(idx).set_mute) + + if ((mute < 0) || (mute > 1)) { + LOGE("%s error param mute: %d\n", __func__, mute); + } + + ret = FMR_cbk_tbl(idx).set_mute(FMR_fd(idx), mute); + if (ret) { + LOGE("%s failed, %s\n", __func__, FMR_strerr()); + } + LOGD("%s, [mute=%d] [ret=%d]\n", __func__, mute, ret); + return ret; +} + +int FMR_is_fm_pwrup(int idx, int *pwrup) +{ + int ret = 0; + + if (idx < 0 || idx >= FMR_MAX_IDX) { + return -1; + } + + FMR_ASSERT(FMR_cbk_tbl(idx).is_fm_pwrup); + FMR_ASSERT(pwrup); + + ret = FMR_cbk_tbl(idx).is_fm_pwrup(FMR_fd(idx), pwrup); + if (ret){ + *pwrup = 0; + LOGE("%s failed, %s\n", __func__, FMR_strerr()); + } + + LOGD("%s, [pwrup=%d] [ret=%d]\n", __func__, *pwrup, ret); + return ret; +} +int FMR_is_rdsrx_support(int idx, int *supt) +{ + int ret = 0; + + if (idx < 0 || idx >= FMR_MAX_IDX) { + return -1; + } + + FMR_ASSERT(FMR_cbk_tbl(idx).is_rdsrx_support); + FMR_ASSERT(supt); + + ret = FMR_cbk_tbl(idx).is_rdsrx_support(FMR_fd(idx), supt); + if (ret) { + *supt = 0; + LOGE("%s, failed\n", __func__); + } + LOGD("%s, [supt=%d] [ret=%d]\n", __func__, *supt, ret); + return ret; +} + +int FMR_Pre_Search(int idx) +{ + if (idx < 0 || idx >= FMR_MAX_IDX) { + return -1; + } + + //avoid scan stop flag clear if stop cmd send before pre-search finish + fmr_data.scan_stop = fm_false; + FMR_ASSERT(FMR_cbk_tbl(idx).pre_search); + FMR_cbk_tbl(idx).pre_search(FMR_fd(idx)); + return 0; +} + +int FMR_Restore_Search(int idx) +{ + if (idx < 0 || idx >= FMR_MAX_IDX) { + return -1; + } + + FMR_ASSERT(FMR_cbk_tbl(idx).restore_search); + FMR_cbk_tbl(idx).restore_search(FMR_fd(idx)); + return 0; +} + +int FMR_scan_Channels(int idx, uint16_t *scan_tbl, int *max_cnt, fm_s32 band_channel_no, fm_u16 Start_Freq, fm_u8 seek_space, fm_u8 NF_Space) +{ + fm_s32 ret = 0, Num = 0, i, j; + fm_u32 ChannelNo = 0; + fm_softmute_tune_t cur_freq; + static struct fm_cqi SortData[CQI_CH_NUM_MAX]; + fm_bool LastExist = fm_false; + struct fm_cqi swap; +#if (FMR_NOISE_FLOORT_DETECT==1) + fm_s32 Pacc = 0, Nacc = 0; + fm_s32 NF = 0; + fm_bool F[3] = {fm_false, fm_false, fm_false}; + fm_s32 F_Rssi[3] = {0}; +#endif + + if (idx < 0 || idx >= FMR_MAX_IDX) { + return -1; + } + + memset(SortData, 0, CQI_CH_NUM_MAX*sizeof(struct fm_cqi)); + LOGI("band_channel_no=[%d], seek_space=%d, start freq=%d, NF_Space=%d\n", band_channel_no,seek_space,Start_Freq, NF_Space); + for (i=0; i 0)) /*neighbor channel*/ { + if (cur_freq.rssi>SortData[Num-1].rssi)/*save current freq and cover last channel*/ { + if (FMR_SevereDensense(cur_freq.freq, cur_freq.rssi) == fm_true) { + LastExist = fm_false; + continue; + } + SortData[Num-1].ch=cur_freq.freq; + SortData[Num-1].rssi=cur_freq.rssi; + SortData[Num-1].reserve = 1; + LOGI("cover last channel \n"); + } else/*ignore current freq*/ { + LastExist = fm_false; + continue; + } + } else/*save current*/ { + if (FMR_SevereDensense(cur_freq.freq, cur_freq.rssi) == fm_true) { + LastExist = fm_false; + continue; + } + if (Num < 0 || Num >= CQI_CH_NUM_MAX) { + continue; + } + SortData[Num].ch = cur_freq.freq; + SortData[Num].rssi = cur_freq.rssi; + SortData[Num].reserve = 1; + Num++; + LastExist = fm_true; + LOGI("Num++:[%d] \n", Num); + } + } else { +#if (FMR_NOISE_FLOORT_DETECT==1) + if (FMR_DensenseDetect(idx, cur_freq.freq, cur_freq.rssi) == fm_false) { + if (FMR_NoiseFloorDetect(F, cur_freq.rssi, F_Rssi) == fm_true) { + Pacc += F_Rssi[1]; + Nacc++; + /*check next freq*/ + F[0] = F[1]; + F_Rssi[0] = F_Rssi[1]; + F[1] = F[2]; + F_Rssi[1] = F_Rssi[2]; + F[2] = fm_false; + F_Rssi[2] = 0; + LOGI("FM Noise FLoor:Pacc=[%d] Nacc=[%d] \n", Pacc,Nacc); + } + } else { + memset(F, fm_false, sizeof(F)); + } +#endif + LastExist = fm_false; + } +#if (FMR_NOISE_FLOORT_DETECT==1) + if (((i%NF_Space) == 0) && (i != 0)) { + if (Nacc > 0) { + NF = Pacc/Nacc; + } else { + NF = RSSI_TH-FM_NOISE_FLOOR_OFFSET; + } + Pacc = 0; + Nacc = 0; + for (j = 0; j < Num; j++) { + if (SortData[j].rssi < (NF + FM_NOISE_FLOOR_OFFSET)) { + LOGI("FM Noise FLoor Detected:freq=[%d] NF=[%d] \n", SortData[j].ch, NF); + SortData[j].reserve = 0; + } + } + LOGI("FM Noise FLoor NF_Idx[%d] \n", j); + } +#endif + } + LOGI("get channel no.[%d] \n", Num); + if (Num == 0)/*get nothing*/ { + *max_cnt = 0; + FMR_Restore_Search(idx); + return -1; + } + + switch (fmr_data.cfg_data.scan_sort) + { + case FM_SCAN_SORT_UP: + case FM_SCAN_SORT_DOWN: + { + LOGI("Start sort \n"); + //do sort: insert sort algorithm + for (i = 1; i < Num; i++) { + for (j = i; (j > 0) && ((FM_SCAN_SORT_DOWN == fmr_data.cfg_data.scan_sort) ? (SortData[j-1].rssi \ + < SortData[j].rssi) : (SortData[j-1].rssi > SortData[j].rssi)); j--) { + memcpy(&swap, &SortData[j], sizeof(struct fm_cqi)); + memcpy(&SortData[j], &SortData[j-1], sizeof(struct fm_cqi)); + memcpy(&SortData[j-1], &swap, sizeof(struct fm_cqi)); + } + } + LOGI("End sort \n"); + break; + } + default: + break; + } + + ChannelNo = 0; + for (i=0; i= FMR_MAX_IDX) { + return -1; + } + + //FM radio seek space,5:50KHZ; 1:100KHZ; 2:200KHZ + if (fmr_data.cfg_data.seek_space == 5) { + seek_space = 5; + } else if (fmr_data.cfg_data.seek_space == 2) { + seek_space = 20; + } else { + seek_space = 10; + } + if (fmr_data.cfg_data.band == FM_BAND_JAPAN)/* Japan band 76MHz ~ 90MHz */ { + band_channel_no = (9600-7600)/seek_space + 1; + Start_Freq = 7600; + NF_Space = 400/seek_space; + } else if (fmr_data.cfg_data.band == FM_BAND_JAPANW)/* Japan wideband 76MHZ ~ 108MHz */ { + band_channel_no = (10800-7600)/seek_space + 1; + Start_Freq = 7600; + NF_Space = 640/seek_space; + } else/* US/Europe band 87.5MHz ~ 108MHz (DEFAULT) */ { + band_channel_no = (10800-8750)/seek_space + 1; + Start_Freq = 8750; + NF_Space = 410/seek_space; + } + + ret = FMR_scan_Channels(idx, scan_tbl, max_cnt, band_channel_no, Start_Freq, seek_space, NF_Space); + + return ret; +} + +int FMR_stop_scan(int idx) +{ + UNUSED(idx); + fmr_data.scan_stop = fm_true; + return 0; +} + +int FMR_turn_on_off_rds(int idx, int onoff) +{ + int ret = 0; + + if (idx < 0 || idx >= FMR_MAX_IDX) { + return -1; + } + + FMR_ASSERT(FMR_cbk_tbl(idx).turn_on_off_rds) + ret = FMR_cbk_tbl(idx).turn_on_off_rds(FMR_fd(idx), onoff); + if (ret) { + LOGE("%s, failed\n", __func__); + } + LOGD("%s, [onoff=%d] [ret=%d]\n", __func__, onoff, ret); + return ret; +} + +int FMR_read_rds_data(int idx, uint16_t *rds_status) +{ + int ret = 0; + + if (idx < 0 || idx >= FMR_MAX_IDX) { + return -1; + } + + FMR_ASSERT(FMR_cbk_tbl(idx).read_rds_data); + FMR_ASSERT(rds_status); + + ret = FMR_cbk_tbl(idx).read_rds_data(FMR_fd(idx), &fmr_data.rds, rds_status); + + LOGD("%s, [status=0x%04x] , [ret=%d]\n", __func__, *rds_status, ret); + + return ret; +} + +int FMR_active_af(int idx, uint16_t orig_pi, uint16_t *ret_freq) +{ + int ret = 0; + + if (idx < 0 || idx >= FMR_MAX_IDX) { + return -1; + } + + FMR_ASSERT(FMR_cbk_tbl(idx).active_af); + FMR_ASSERT(ret_freq); + ret = FMR_cbk_tbl(idx).active_af(FMR_fd(idx), + &fmr_data.rds, + &fmr_data.cfg_data, + orig_pi, + fmr_data.cur_freq, + ret_freq); + if ((ret == 0) && (*ret_freq != fmr_data.cur_freq)) { + fmr_data.cur_freq = *ret_freq; + LOGI("active AF OK, new channel[freq=%d]\n", fmr_data.cur_freq); + } + if(fmr_data.cfg_data.seek_space != 5) { + *ret_freq = *ret_freq/10; + } + LOGD("%s, [ret=%d]\n", __func__, ret); + return ret; +} + +int FMR_active_ta(int idx, uint16_t *ret_freq) +{ + int ret = 0; + + if (idx < 0 || idx >= FMR_MAX_IDX) { + return -1; + } + + FMR_ASSERT(FMR_cbk_tbl(idx).active_ta); + FMR_ASSERT(ret_freq); + ret = FMR_cbk_tbl(idx).active_ta(FMR_fd(idx), + &fmr_data.rds, + fmr_data.cfg_data.band, + fmr_data.cur_freq, + &fmr_data.backup_freq, + ret_freq); + if((ret == 0) && (*ret_freq != fmr_data.cur_freq)){ + fmr_data.cur_freq = *ret_freq; + LOGI("active TA OK, new channel[freq=%d]\n", fmr_data.cur_freq); + } + if(fmr_data.cfg_data.seek_space != 5) { + *ret_freq = *ret_freq/10; + } + LOGD("%s, [ret=%d]\n", __func__, ret); + return ret; +} + +int FMR_deactive_ta(int idx, uint16_t *ret_freq) +{ + int ret = 0; + + if (idx < 0 || idx >= FMR_MAX_IDX) { + return -1; + } + + FMR_ASSERT(FMR_cbk_tbl(idx).deactive_ta); + FMR_ASSERT(ret_freq); + ret = FMR_cbk_tbl(idx).deactive_ta(FMR_fd(idx), + &fmr_data.rds, + fmr_data.cfg_data.band, + fmr_data.cur_freq, + &fmr_data.backup_freq, + ret_freq); + if((ret == 0) && (*ret_freq != fmr_data.cur_freq)){ + fmr_data.cur_freq = *ret_freq; + LOGI("deactive TA OK, new channel[freq=%d]\n", fmr_data.cur_freq); + } + if(fmr_data.cfg_data.seek_space != 5) { + *ret_freq = *ret_freq/10; + } + LOGD("%s, [ret=%d]\n", __func__, ret); + return ret; +} + +int FMR_ana_switch(int idx, int antenna) +{ + int ret = 0; + + if (idx < 0 || idx >= FMR_MAX_IDX) { + return -1; + } + + FMR_ASSERT(FMR_cbk_tbl(idx).ana_switch); + + if (fmr_data.cfg_data.short_ana_sup == true) { + ret = FMR_cbk_tbl(idx).ana_switch(FMR_fd(idx), antenna); + if (ret) { + LOGE("%s failed, [ret=%d]\n", __func__, ret); + } + } else { + LOGW("FM antenna switch not support!\n"); + ret = -ERR_UNSUPT_SHORTANA; + } + + LOGD("%s, [ret=%d]\n", __func__, ret); + return ret; +} + +int FMR_get_badratio(int idx, int *badratio) +{ + int ret = 0; + + if (idx < 0 || idx >= FMR_MAX_IDX) { + return -1; + } + + FMR_ASSERT(FMR_cbk_tbl(idx).get_badratio); + FMR_ASSERT(badratio); + + ret = FMR_cbk_tbl(idx).get_badratio(FMR_fd(idx), badratio); + if (ret){ + *badratio = 0; + LOGE("%s failed, %s\n", __func__, FMR_strerr()); + } + + LOGD("%s, [badratio=%d] [ret=%d]\n", __func__, *badratio, ret); + return ret; +} + +int FMR_get_stereomono(int idx, int *stemono) +{ + int ret = 0; + + if (idx < 0 || idx >= FMR_MAX_IDX) { + return -1; + } + + FMR_ASSERT(FMR_cbk_tbl(idx).get_stereomono); + FMR_ASSERT(stemono); + + ret = FMR_cbk_tbl(idx).get_stereomono(FMR_fd(idx), stemono); + if (ret){ + *stemono = 0; + LOGE("%s failed, %s\n", __func__, FMR_strerr()); + } + + LOGD("%s, [stemono=%d] [ret=%d]\n", __func__, *stemono, ret); + return ret; +} + +int FMR_set_stereomono(int idx, int stemono) +{ + int ret = 0; + + if (idx < 0 || idx >= FMR_MAX_IDX) { + return -1; + } + + FMR_ASSERT(FMR_cbk_tbl(idx).set_stereomono); + + ret = FMR_cbk_tbl(idx).set_stereomono(FMR_fd(idx), stemono); + if (ret){ + LOGE("%s failed, %s\n", __func__, FMR_strerr()); + } + + LOGD("%s, [stemono=%d] [ret=%d]\n", __func__, stemono, ret); + return ret; +} + +int FMR_get_caparray(int idx, int *caparray) +{ + int ret = 0; + + if (idx < 0 || idx >= FMR_MAX_IDX) { + return -1; + } + + FMR_ASSERT(FMR_cbk_tbl(idx).get_caparray); + FMR_ASSERT(caparray); + + ret = FMR_cbk_tbl(idx).get_caparray(FMR_fd(idx), caparray); + if (ret){ + *caparray = 0; + LOGE("%s failed, %s\n", __func__, FMR_strerr()); + } + + LOGD("%s, [caparray=%d] [ret=%d]\n", __func__, *caparray, ret); + return ret; +} + +int FMR_get_hw_info(int idx, int **info, int *info_len) +{ + int ret = 0; + static int inited = 0; + static int info_array[10] = {0}; + + if (idx < 0 || idx >= FMR_MAX_IDX) { + return -1; + } + + FMR_ASSERT(FMR_cbk_tbl(idx).get_hw_info); + FMR_ASSERT(info); + FMR_ASSERT(info_len); + + if(!inited){ + ret = FMR_cbk_tbl(idx).get_hw_info(FMR_fd(idx), &fmr_data.hw_info); + if(ret >= 0){ + inited = 1; //get hw info success + } + } + + info_array[0] = fmr_data.hw_info.chip_id; + info_array[1] = fmr_data.hw_info.eco_ver; + info_array[2] = fmr_data.hw_info.rom_ver; + info_array[3] = fmr_data.hw_info.patch_ver; + + *info = info_array; + *info_len = sizeof(struct fm_hw_info)/sizeof(int); + + LOGD("chip:0x%08x, eco:0x%08x, rom:0x%08x, patch: 0x%08x\n", info_array[0], info_array[1], info_array[2], info_array[3]); + LOGD("%s, [ret=%d]\n", __func__, ret); + return ret; +} +/* +th_idx: + threshold type: 0, RSSI. 1,desense RSSI. 2,SMG. +th_val: threshold value*/ +int FMR_EMSetTH(int idx, int th_idx, int th_val) +{ + int ret = -1; + + if (idx < 0 || idx >= FMR_MAX_IDX) { + return -1; + } + + FMR_ASSERT(FMR_cbk_tbl(idx).set_search_threshold); + ret=FMR_cbk_tbl(idx).set_search_threshold(FMR_fd(idx),th_idx,th_val); + + return ret; +} + +int FMR_EM_CQI_logger(int idx,uint16_t cycle) +{ + int ret = -1; + fm_full_cqi_log_t log_setting; + uint i = 0; + + if (idx < 0 || idx >= FMR_MAX_IDX) { + return -1; + } + + FMR_ASSERT(FMR_cbk_tbl(idx).full_cqi_logger); + + //log_setting.cycle = cycle; + if(fmr_data.cfg_data.seek_space == 5) { + log_setting.lower = FM_FREQ_MIN * 10; + log_setting.upper = FM_FREQ_MAX * 10; + } else { + log_setting.lower = FM_FREQ_MIN; + log_setting.upper = FM_FREQ_MAX; + } + log_setting.space = 0x2; + + for(i = 0;i < cycle; i++) + { + + log_setting.cycle = i; + ret = FMR_cbk_tbl(idx).full_cqi_logger(FMR_fd(idx),&log_setting); + + LOGD("%s, [%d]\n", __func__, i); + } + + //ret = FMR_cbk_tbl(idx).full_cqi_logger(FMR_fd(idx),&log_setting); + + return ret; +} + diff --git a/libfmjni/fmr_err.cpp b/libfmjni/fmr_err.cpp new file mode 100755 index 0000000..5c63bcb --- /dev/null +++ b/libfmjni/fmr_err.cpp @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * 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 "fmr.h" + +#ifdef LOG_TAG +#undef LOG_TAG +#endif +#define LOG_TAG "FMLIB_ERR" + +#define FMR_ERR_BASE -0x100 + +static int fmr_err = 0; +static char tmp[20] = {0}; + +char *FMR_strerr() +{ + int ret = 0; + + ret = sprintf(tmp, "%d", fmr_err); + if (ret < 0) { + LOGE("%s sprintf fail\n", __func__); + } + + return tmp; +} + +void FMR_seterr(int err) +{ + fmr_err = err; +} + diff --git a/libfmjni/libfm_jni.cpp b/libfmjni/libfm_jni.cpp new file mode 100755 index 0000000..66ffcff --- /dev/null +++ b/libfmjni/libfm_jni.cpp @@ -0,0 +1,806 @@ +/* + * Copyright (C) 2014 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * 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 +#include "fmr.h" + +#ifdef LOG_TAG +#undef LOG_TAG +#endif +#define LOG_TAG "FMLIB_JNI" +#define FM_AF_THRESHOLD -80 +#define UNUSED(x) (void)(x) + +static int g_idx = -1; +extern struct fmr_ds fmr_data; +static short g_CurrentRDS_PI; + +jboolean openDev(JNIEnv *env, jobject thiz) +{ + int ret = 0; + UNUSED(env); + UNUSED(thiz); + + ret = FMR_open_dev(g_idx); // if success, then ret = 0; else ret < 0 + + LOGD("%s, [ret=%d]\n", __func__, ret); + return ret?JNI_FALSE:JNI_TRUE; +} + +jboolean closeDev(JNIEnv *env, jobject thiz) +{ + int ret = 0; + UNUSED(env); + UNUSED(thiz); + + ret = FMR_close_dev(g_idx); + + LOGD("%s, [ret=%d]\n", __func__, ret); + return ret?JNI_FALSE:JNI_TRUE; +} + +jboolean powerUp(JNIEnv *env, jobject thiz, jfloat freq) +{ + int ret = 0; + int tmp_freq; + UNUSED(env); + UNUSED(thiz); + + LOGI("%s, [freq=%d]\n", __func__, (int)freq); + /* fix jfloat precision issue */ + tmp_freq = (int)((float)freq * 100 + 0.5); //Eg, 87.5 * 100 --> 8750 + ret = FMR_pwr_up(g_idx, tmp_freq); + + LOGD("%s, [ret=%d]\n", __func__, ret); + return ret?JNI_FALSE:JNI_TRUE; +} + +jboolean powerDown(JNIEnv *env, jobject thiz, jint type) +{ + int ret = 0; + UNUSED(env); + UNUSED(thiz); + + ret = FMR_pwr_down(g_idx, type); + + LOGD("%s, [ret=%d]\n", __func__, ret); + return ret?JNI_FALSE:JNI_TRUE; +} + +jint readRssi(JNIEnv *env, jobject thiz) //jint = int +{ + int ret = 0; + int rssi = -1; + UNUSED(env); + UNUSED(thiz); + + ret = FMR_get_rssi(g_idx, &rssi); + + LOGD("%s, [ret=%d]\n", __func__, ret); + return rssi; +} + +jboolean tune(JNIEnv *env, jobject thiz, jfloat freq) +{ + int ret = 0; + int tmp_freq; + UNUSED(env); + UNUSED(thiz); + + /* fix jfloat precision issue */ + tmp_freq = (int)((float)freq * 100 + 0.5); //Eg, 87.5 * 100 --> 8750 + ret = FMR_tune(g_idx, tmp_freq); + if (!ret) /* clean global pi*/ + g_CurrentRDS_PI = 0; + LOGD("%s, [ret=%d]\n", __func__, ret); + return ret?JNI_FALSE:JNI_TRUE; +} + +jfloat seek(JNIEnv *env, jobject thiz, jfloat freq, jboolean isUp) //jboolean isUp; +{ + int ret = 0; + int tmp_freq; + int ret_freq; + float val; + UNUSED(env); + UNUSED(thiz); + + /* fix jfloat precision issue */ + tmp_freq = (int)((float)freq * 100 + 0.5); //Eg, 87.5 * 100 --> 8750 + ret = FMR_set_mute(g_idx, 1); + if (ret) { + LOGE("%s, error, [ret=%d]\n", __func__, ret); + } + LOGD("%s, [mute] [ret=%d]\n", __func__, ret); + + ret = FMR_seek(g_idx, tmp_freq, (int)isUp, &ret_freq); + if (ret) { + ret_freq = tmp_freq; //seek error, so use original freq + } + + LOGD("%s, [freq=%d] [ret=%d]\n", __func__, ret_freq, ret); + + val = (float)ret_freq/100; //Eg, 8755 / 100 --> 87.55 + + return val; +} + +jshortArray autoScan(JNIEnv *env, jobject thiz) +{ +#define FM_SCAN_CH_SIZE_MAX 200 + int ret = 0; + jshortArray scanChlarray; + int chl_cnt = FM_SCAN_CH_SIZE_MAX; + uint16_t ScanTBL[FM_SCAN_CH_SIZE_MAX]; + UNUSED(thiz); + + LOGI("%s, [tbl=%p]\n", __func__, ScanTBL); + FMR_Pre_Search(g_idx); + ret = FMR_scan(g_idx, ScanTBL, &chl_cnt); + if (ret < 0) { + LOGE("scan failed!\n"); + scanChlarray = NULL; + goto out; + } + if (chl_cnt > 0) { + scanChlarray = env->NewShortArray(chl_cnt); + env->SetShortArrayRegion(scanChlarray, 0, chl_cnt, (const jshort*)&ScanTBL[0]); + } else { + LOGE("cnt error, [cnt=%d]\n", chl_cnt); + scanChlarray = NULL; + } + FMR_Restore_Search(g_idx); + + if (fmr_data.scan_stop == fm_true) { + ret = FMR_tune(g_idx, fmr_data.cur_freq); + LOGI("scan stop!!! tune ret=%d",ret); + scanChlarray = NULL; + ret = -1; + } + +out: + LOGD("%s, [cnt=%d] [ret=%d]\n", __func__, chl_cnt, ret); + return scanChlarray; +} + +jboolean emsetth(JNIEnv *env, jobject thiz, jint index, jint value) +{ + int ret = 0; + UNUSED(env); + UNUSED(thiz); + + ret = FMR_EMSetTH(g_idx, index, value); + + LOGD("emsetth ret %d\n", ret); + return (ret < 0) ? JNI_FALSE : JNI_TRUE; +} +jshortArray emcmd(JNIEnv *env, jobject thiz, jshortArray val) +{ + jshortArray eventarray = NULL; + uint16_t eventtbl[20]={0}; + uint16_t* cmdtbl=NULL; + UNUSED(thiz); + + cmdtbl = (uint16_t*) env->GetShortArrayElements(val, NULL); + if(cmdtbl == NULL) + { + LOGE("%s:get cmdtbl error\n", __func__); + goto out; + } + LOGI("EM cmd:=%x %x %x %x %x",cmdtbl[0],cmdtbl[1],cmdtbl[2],cmdtbl[3],cmdtbl[4]); + + if(!cmdtbl[0]) //LANT + { + } + else //SANT + { + } + + switch(cmdtbl[1]) + { + case 0x02: //CQI log tool + { + FMR_EM_CQI_logger(g_idx, cmdtbl[2]); + } + break; + default: + break; + } + + eventarray = env->NewShortArray(20); + env->SetShortArrayRegion(eventarray, 0, 20, (const jshort*)&eventtbl[0]); + //LOGD("emsetth ret %d\n", ret); +out: + return eventarray; +} + +jshort readRds(JNIEnv *env, jobject thiz) +{ + int ret = 0; + int rssi = -1; + uint16_t rds_status = 0; + uint16_t pi = 0; + UNUSED(env); + UNUSED(thiz); + + ret = FMR_read_rds_data(g_idx, &rds_status); + + if (ret) { + rds_status = 0; // There's no event or some error happened + } else { + if (rds_status & RDS_EVENT_PI_CODE) { + ret = FMR_get_pi(0, &pi); + if (!ret) { + ret = FMR_get_rssi(g_idx, &rssi); + if (rssi > FM_AF_THRESHOLD) + g_CurrentRDS_PI = pi; + } + LOGE("get pi(0x%04x) \n", pi); + } + } + return rds_status; +} + +jshort getPI(JNIEnv *env, jobject thiz) +{ + int ret = 0; + uint16_t pi = 0; + UNUSED(env); + UNUSED(thiz); + + ret = FMR_get_pi(g_idx, &pi); + + if(ret){ + LOGE("%s, error, [ret=%d]\n", __func__, ret); + pi = -1; //there's some error happened + } + return pi; +} + +jbyte getECC(JNIEnv *env, jobject thiz) +{ + int ret = 0; + uint8_t ecc = 0; + UNUSED(env); + UNUSED(thiz); + + ret = FMR_get_ecc(g_idx, &ecc); + + if(ret){ + LOGE("%s, error, [ret=%d]\n", __func__, ret); + ecc = -1; //there's some error happened + } + return ecc; +} + +jbyte getPTY(JNIEnv *env, jobject thiz) +{ + int ret = 0; + uint8_t pty = 0; + UNUSED(env); + UNUSED(thiz); + + ret = FMR_get_pty(g_idx, &pty); + + if(ret){ + LOGE("%s, error, [ret=%d]\n", __func__, ret); + pty = -1; //there's some error happened + } + return pty; +} + +jbyteArray getPs(JNIEnv *env, jobject thiz) +{ + int ret = 0; + jbyteArray PSname; + uint8_t *ps = NULL; + int ps_len = 0; + UNUSED(thiz); + + ret = FMR_get_ps(g_idx, &ps, &ps_len); + if (ret) { + LOGE("%s, error, [ret=%d]\n", __func__, ret); + return NULL; + } + PSname = env->NewByteArray(ps_len); + env->SetByteArrayRegion(PSname, 0, ps_len, (const jbyte*)ps); + LOGD("%s, [ret=%d]\n", __func__, ret); + return PSname; +} + +jbyteArray getLrText(JNIEnv *env, jobject thiz) +{ + int ret = 0; + jbyteArray LastRadioText; + uint8_t *rt = NULL; + int rt_len = 0; + UNUSED(thiz); + + ret = FMR_get_rt(g_idx, &rt, &rt_len); + if (ret) { + LOGE("%s, error, [ret=%d]\n", __func__, ret); + return NULL; + } + LastRadioText = env->NewByteArray(rt_len); + env->SetByteArrayRegion(LastRadioText, 0, rt_len, (const jbyte*)rt); + LOGD("%s, [ret=%d]\n", __func__, ret); + return LastRadioText; +} + +jshort activeAf(JNIEnv *env, jobject thiz) +{ + int ret = 0; + jshort ret_freq = 0; + UNUSED(env); + UNUSED(thiz); + + ret = FMR_active_af(g_idx, g_CurrentRDS_PI, (uint16_t*)&ret_freq); + if (ret) { + LOGE("%s, error, [ret=%d]\n", __func__, ret); + return 0; + } + + LOGD("%s, [ret=%d], ret_freq=%d\n", __func__, ret, ret_freq); + return ret_freq; +} + +jshortArray getAFList(JNIEnv *env, jobject thiz) +{ + int ret = 0; + jshortArray AFList; + char *af = NULL; + int af_len = 0; + UNUSED(thiz); + + //ret = FMR_get_af(g_idx, &af, &af_len); // If need, we should implemate this API + if (ret) { + LOGE("%s, error, [ret=%d]\n", __func__, ret); + return NULL; + } + AFList = env->NewShortArray(af_len); + env->SetShortArrayRegion(AFList, 0, af_len, (const jshort*)af); + LOGD("%s, [ret=%d]\n", __func__, ret); + return AFList; +} + +jshort activeTA(JNIEnv *env, jobject thiz) +{ + int ret = 0; + jshort ret_freq = 0; + UNUSED(env); + UNUSED(thiz); + + ret = FMR_active_ta(g_idx, (uint16_t*)&ret_freq); + if(ret){ + LOGE("%s, error, [ret=%d]\n", __func__, ret); + return 0; + } + LOGD("%s, [ret=%d], ret_freq=%d\n", __func__, ret, ret_freq); + return ret_freq; +} + +jshort deactiveTA(JNIEnv *env, jobject thiz) +{ + int ret = 0; + jshort ret_freq = 0; + UNUSED(env); + UNUSED(thiz); + + ret = FMR_deactive_ta(g_idx, (uint16_t*)&ret_freq); + if(ret){ + LOGE("%s, error, [ret=%d]\n", __func__, ret); + return 0; + } + LOGD("%s, [ret=%d], ret_freq=%d\n", __func__, ret, ret_freq); + return ret_freq; +} + +jint setRds(JNIEnv *env, jobject thiz, jboolean rdson) +{ + int ret = 0; + int onoff = -1; + UNUSED(env); + UNUSED(thiz); + + if (rdson == JNI_TRUE) { + onoff = FMR_RDS_ON; + } else { + onoff = FMR_RDS_OFF; + } + ret = FMR_turn_on_off_rds(g_idx, onoff); + if (ret) { + LOGE("%s, error, [ret=%d]\n", __func__, ret); + } + LOGD("%s, [onoff=%d] [ret=%d]\n", __func__, onoff, ret); + return ret?JNI_FALSE:JNI_TRUE; +} + +jboolean stopScan(JNIEnv *env, jobject thiz) +{ + int ret = 0; + UNUSED(env); + UNUSED(thiz); + + ret = FMR_stop_scan(g_idx); + if (ret) { + LOGE("%s, error, [ret=%d]\n", __func__, ret); + } + LOGD("%s, [ret=%d]\n", __func__, ret); + return ret?JNI_FALSE:JNI_TRUE; +} + +jint setMute(JNIEnv *env, jobject thiz, jboolean mute) +{ + int ret = 0; + UNUSED(env); + UNUSED(thiz); + + ret = FMR_set_mute(g_idx, (int)mute); + if (ret) { + LOGE("%s, error, [ret=%d]\n", __func__, ret); + } + LOGD("%s, [mute=%d] [ret=%d]\n", __func__, (int)mute, ret); + return ret?JNI_FALSE:JNI_TRUE; +} + +/****************************************** + * Used to get chip ID. + *Parameter: + * None + *Return value + * 1000: chip AR1000 + * 6616: chip mt6616 + * -1: error + ******************************************/ +jint getchipid(JNIEnv *env, jobject thiz) +{ + int ret = 0; + int chipid = -1; + UNUSED(env); + UNUSED(thiz); + + ret = FMR_get_chip_id(g_idx, &chipid); + if(ret){ + LOGE("%s, error, [ret=%d]\n", __func__, ret); + } + LOGD("%s, [chipid=%x] [ret=%d]\n", __func__, chipid, ret); + return chipid; +} + +/****************************************** + * Inquiry if RDS is support in driver. + * Parameter: + * None + *Return Value: + * 1: support + * 0: NOT support + * -1: error + ******************************************/ +jint isRdsSupport(JNIEnv *env, jobject thiz) +{ + int ret = 0; + int supt = -1; + UNUSED(env); + UNUSED(thiz); + + ret = FMR_is_rdsrx_support(g_idx, &supt); + if (ret) { + LOGE("%s, error, [ret=%d]\n", __func__, ret); + } + LOGD("%s, [supt=%d] [ret=%d]\n", __func__, supt, ret); + return supt; +} + +/****************************************** + * Inquiry if FM is powered up. + * Parameter: + * None + *Return Value: + * 1: Powered up + * 0: Did NOT powered up + ******************************************/ +jint isFMPoweredUp(JNIEnv *env, jobject thiz) +{ + int ret = 0; + int pwrup = -1; + UNUSED(env); + UNUSED(thiz); + + ret = FMR_is_fm_pwrup(g_idx, &pwrup); + if(ret){ + LOGE("%s, error, [ret=%d]\n", __func__, ret); + } + LOGD("%s, [pwrup=%d] [ret=%d]\n", __func__, pwrup, ret); + return pwrup; +} + /****************************************** + + * SwitchAntenna + * Parameter: + * antenna: + 0 : switch to long antenna + 1: switch to short antenna + *Return Value: + * 0: Success + * 1: Failed + * 2: Not support + ******************************************/ +jint switchAntenna(JNIEnv *env, jobject thiz, jint antenna) +{ + int ret = 0; + jint jret = 0; + int ana = -1; + UNUSED(env); + UNUSED(thiz); + + if (0 == antenna) { + ana = FM_LONG_ANA; + } else if (1 == antenna) { + ana = FM_SHORT_ANA; + } else { + LOGE("%s:fail, para error\n", __func__); + jret = JNI_FALSE; + goto out; + } + ret = FMR_ana_switch(g_idx, ana); + if (ret == -ERR_UNSUPT_SHORTANA) { + LOGW("Not support switchAntenna\n"); + jret = 2; + } else if (ret) { + LOGE("switchAntenna(), error\n"); + jret = 1; + } else { + jret = 0; + } +out: + LOGD("%s: [antenna=%d] [ret=%d]\n", __func__, ana, ret); + return jret; +} + +/****************************************** + * Inquiry if FM is stereoMono. + * Parameter: + * None + *Return Value: + * JNI_TRUE: stereo + * JNI_FALSE: mono + ******************************************/ +jboolean stereoMono(JNIEnv *env, jobject thiz) +{ + int ret = 0; + int stemono = -1; + UNUSED(env); + UNUSED(thiz); + + ret = FMR_get_stereomono(g_idx, &stemono); + if(ret){ + LOGE("%s, error, [ret=%d]\n", __func__, ret); + } + LOGD("%s, [stemono=%d] [ret=%d]\n", __func__, stemono, ret); + + return stemono?JNI_TRUE:JNI_FALSE; +} + +/****************************************** + * Force set to stero/mono mode. + * Parameter: + * type: JNI_TRUE, mono; JNI_FALSE, stero + *Return Value: + * JNI_TRUE: success + * JNI_FALSE: failed + ******************************************/ +jboolean setStereoMono(JNIEnv *env, jobject thiz, jboolean type) +{ + int ret = 0; + UNUSED(env); + UNUSED(thiz); + + ret = FMR_set_stereomono(g_idx, ((type == JNI_TRUE) ? 1 : 0)); + if(ret){ + LOGE("%s, error, [ret=%d]\n", __func__, ret); + } + LOGD("%s,[ret=%d]\n", __func__, ret); + + return (ret==0) ? JNI_TRUE : JNI_FALSE; +} + +/****************************************** + * Read cap array of short antenna. + * Parameter: + * None + *Return Value: + * CapArray + ******************************************/ +jshort readCapArray(JNIEnv *env, jobject thiz) +{ + int ret = 0; + int caparray = -1; + UNUSED(env); + UNUSED(thiz); + + ret = FMR_get_caparray(g_idx, &caparray); + if(ret){ + LOGE("%s, error, [ret=%d]\n", __func__, ret); + } + LOGD("%s, [caparray=%d] [ret=%d]\n", __func__, caparray, ret); + + return (jshort)caparray; +} + +/****************************************** + * Read cap array of short antenna. + * Parameter: + * None + *Return Value: + * CapArray : 0~100 + ******************************************/ +jshort readRdsBler(JNIEnv *env, jobject thiz) +{ + int ret = 0; + int badratio = -1; + UNUSED(env); + UNUSED(thiz); + + ret = FMR_get_badratio(g_idx, &badratio); + if(ret){ + LOGE("%s, error, [ret=%d]\n", __func__, ret); + } + + if(badratio > 100){ + badratio = 100; + LOGW("badratio value error, give a max value!"); + }else if(badratio < 0){ + badratio = 0; + LOGW("badratio value error, give a min value!"); + } + LOGD("%s, [badratio=%d] [ret=%d]\n", __func__, badratio, ret); + + return (jshort)badratio; +} + +jintArray getHardwareVersion(JNIEnv *env, jobject thiz) +{ + int ret = 0; + jintArray hw_info; + int *info = NULL; + int info_len = 0; + UNUSED(thiz); + + ret = FMR_get_hw_info(g_idx, &info, &info_len); + if(ret < 0){ + LOGE("%s, error, [ret=%d]\n", __func__, ret); + return NULL; + } + hw_info = env->NewIntArray(info_len); + env->SetIntArrayRegion(hw_info, 0, info_len, (const jint*)info); + LOGD("%s, [ret=%d]\n", __func__, ret); + return hw_info; +} + +static const char *classPathNameRx = "com/android/fmradio/FmNative"; + +static JNINativeMethod methodsRx[] = { + {"openDev", "()Z", (void*)openDev}, + {"closeDev", "()Z", (void*)closeDev}, + {"powerUp", "(F)Z", (void*)powerUp}, + {"powerDown", "(I)Z", (void*)powerDown}, + {"tune", "(F)Z", (void*)tune}, + {"seek", "(FZ)F", (void*)seek}, + {"autoScan", "()[S", (void*)autoScan}, + {"stopScan", "()Z", (void*)stopScan}, + {"setRds", "(Z)I", (void*)setRds}, + {"readRds", "()S", (void*)readRds}, + {"getPs", "()[B", (void*)getPs}, + {"getLrText", "()[B", (void*)getLrText}, + {"activeAf", "()S", (void*)activeAf}, + {"setMute", "(Z)I", (void*)setMute}, + {"isRdsSupport", "()I", (void*)isRdsSupport}, + {"switchAntenna", "(I)I", (void*)switchAntenna}, + {"readRssi", "()I", (void*)readRssi}, + {"stereoMono", "()Z", (void*)stereoMono}, + {"setStereoMono", "(Z)Z", (void*)setStereoMono}, + {"readCapArray", "()S", (void*)readCapArray}, + {"readRdsBler", "()S", (void*)readRdsBler}, + {"emcmd","([S)[S",(void*)emcmd}, + {"emsetth","(II)Z",(void*)emsetth}, + {"getHardwareVersion", "()[I", (void*)getHardwareVersion}, +}; + +/* + * Register several native methods for one class. + */ +static jint registerNativeMethods(JNIEnv* env, const char* className, + JNINativeMethod* gMethods, int numMethods) +{ + jclass clazz; + + clazz = env->FindClass(className); + if (env->ExceptionCheck()) { + env->ExceptionDescribe(); + env->ExceptionClear(); + } + if (clazz == NULL) { + LOGE("Native registration unable to find class '%s'", className); + return JNI_FALSE; + } + if (env->RegisterNatives(clazz, gMethods, numMethods) < 0) { + LOGE("RegisterNatives failed for '%s'", className); + return JNI_FALSE; + } + + LOGD("%s, success\n", __func__); + return JNI_TRUE; +} + +/* + * Register native methods for all classes we know about. + * + * returns JNI_TRUE on success. + */ +static jint registerNatives(JNIEnv* env) +{ + jint ret = JNI_FALSE; + + if (registerNativeMethods(env, classPathNameRx,methodsRx, + sizeof(methodsRx) / sizeof(methodsRx[0]))) { + ret = JNI_TRUE; + } + + LOGD("%s, done\n", __func__); + return ret; +} + +// ---------------------------------------------------------------------------- + +/* + * This is called by the VM when the shared library is first loaded. + */ + +typedef union { + JNIEnv* env; + void* venv; +} UnionJNIEnvToVoid; + +jint JNI_OnLoad(JavaVM* vm, void* reserved) +{ + UnionJNIEnvToVoid uenv; + uenv.venv = NULL; + jint result = -1; + JNIEnv* env = NULL; + UNUSED(reserved); + + LOGI("JNI_OnLoad"); + + if (vm->GetEnv(&uenv.venv, JNI_VERSION_1_4) != JNI_OK) { + LOGE("ERROR: GetEnv failed"); + goto fail; + } + env = uenv.env; + + if (registerNatives(env) != JNI_TRUE) { + LOGE("ERROR: registerNatives failed"); + goto fail; + } + + if ((g_idx = FMR_init()) < 0) { + goto fail; + } + result = JNI_VERSION_1_4; + +fail: + return result; +} + diff --git a/lineage.dependencies b/lineage.dependencies new file mode 100644 index 0000000..a17ba2f --- /dev/null +++ b/lineage.dependencies @@ -0,0 +1,10 @@ +[ + { + "repository": "android_device_mediatek_sepolicy_vndr", + "target_path": "device/mediatek/sepolicy_vndr" + }, + { + "repository": "android_hardware_mediatek", + "target_path": "hardware/mediatek" + } +] \ No newline at end of file diff --git a/lineage_brax3.mk b/lineage_brax3.mk new file mode 100644 index 0000000..c5411c3 --- /dev/null +++ b/lineage_brax3.mk @@ -0,0 +1,28 @@ +# +# Copyright (C) 2021-2025 The LineageOS Project +# +# SPDX-License-Identifier: Apache-2.0 +# + +# Inherit from those products. Most specific first. +$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit_only.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk) + +# Inherit from brax3 device +$(call inherit-product, device/brax/brax3/device.mk) + +# Inherit some common Lineage stuff. +$(call inherit-product, vendor/lineage/config/common_full_phone.mk) + +PRODUCT_NAME := lineage_brax3 +PRODUCT_DEVICE := brax3 +PRODUCT_MANUFACTURER := BraX +PRODUCT_BRAND := BraX +PRODUCT_MODEL := BraX3 + +PRODUCT_BUILD_PROP_OVERRIDES += \ + BuildFingerprint=brax/brax3/k6835v1_64:15/AP4A.250205.002/:user/release-keys \ + DeviceName=BraX3 \ + DeviceProduct=BraX3 \ + SystemDevice=k6835v1_64 \ + SystemName=BraX3 diff --git a/manifest.xml b/manifest.xml new file mode 100644 index 0000000..17c290b --- /dev/null +++ b/manifest.xml @@ -0,0 +1,220 @@ + + + android.hardware.audio + hwbinder + @7.1::IDevicesFactory/default + + + android.hardware.audio.effect + hwbinder + @7.0::IEffectsFactory/default + + + android.hardware.bluetooth + hwbinder + @1.1::IBluetoothHci/default + + + android.hardware.camera.provider + hwbinder + @2.6::ICameraProvider/internal/0 + + + android.hardware.gatekeeper + hwbinder + @1.0::IGatekeeper/default + + + android.hardware.graphics.allocator + hwbinder + @4.0::IAllocator/default + + + android.hardware.graphics.composer + hwbinder + @2.1::IComposer/default + + + android.hardware.graphics.mapper + passthrough + @4.0::IMapper/default + + + android.hardware.radio + hwbinder + @1.2::ISap/slot1 + @1.2::ISap/slot2 + + + android.hardware.radio.config + IRadioConfig/default + + + android.hardware.radio.data + IRadioData/slot1 + IRadioData/slot2 + + + android.hardware.radio.messaging + IRadioMessaging/slot1 + IRadioMessaging/slot2 + + + android.hardware.radio.modem + IRadioModem/imsSlot1 + IRadioModem/imsSlot2 + IRadioModem/se1 + IRadioModem/se2 + IRadioModem/slot1 + IRadioModem/slot2 + + + android.hardware.radio.network + IRadioNetwork/imsSlot1 + IRadioNetwork/imsSlot2 + IRadioNetwork/slot1 + IRadioNetwork/slot2 + + + android.hardware.radio.sim + IRadioSim/imsSlot1 + IRadioSim/imsSlot2 + IRadioSim/se1 + IRadioSim/se2 + IRadioSim/slot1 + IRadioSim/slot2 + + + android.hardware.radio.voice + IRadioVoice/imsSlot1 + IRadioVoice/imsSlot2 + IRadioVoice/slot1 + IRadioVoice/slot2 + + + android.hardware.secure_element + hwbinder + @1.2::ISecureElement/SIM1 + @1.2::ISecureElement/SIM2 + + + android.hardware.tetheroffload.config + hwbinder + @1.0::IOffloadConfig/default + + + android.hardware.tetheroffload.control + hwbinder + @1.1::IOffloadControl/default + + + android.hardware.thermal + hwbinder + @1.0::IThermal/default + @2.0::IThermal/default + + + vendor.mediatek.hardware.camera.atms + hwbinder + @1.0::IATMs/default + + + vendor.mediatek.hardware.camera.bgservice + hwbinder + @1.1::IBGService/internal/0 + + + vendor.mediatek.hardware.camera.isphal + hwbinder + @1.1::IISPModule/internal/0 + + + vendor.mediatek.hardware.composer_ext + hwbinder + @1.0::IComposerExt/default + + + vendor.mediatek.hardware.dmc + hwbinder + @1.2::IDmcService/dmc_hidl_service + + + vendor.mediatek.hardware.gnss.batching + IMtkGnssBatching/default + + + vendor.mediatek.hardware.mmagent + hwbinder + @1.1::IMMAgent/default + + + vendor.mediatek.hardware.mms + hwbinder + @1.7::IMms/default + + + vendor.mediatek.hardware.mtkpower + hwbinder + @1.2::IMtkPerf/default + @1.2::IMtkPower/default + + + vendor.mediatek.hardware.mtkradioex.data + IMtkRadioExData/slot1 + IMtkRadioExData/slot2 + + + vendor.mediatek.hardware.mtkradioex.ims + IMtkRadioExIms/slot1 + IMtkRadioExIms/slot2 + + + vendor.mediatek.hardware.mtkradioex.messaging + IMtkRadioExMessaging/slot1 + IMtkRadioExMessaging/slot2 + + + vendor.mediatek.hardware.mtkradioex.modem + IMtkRadioExModem/slot1 + IMtkRadioExModem/slot2 + + + vendor.mediatek.hardware.mtkradioex.network + IMtkRadioExNetwork/slot1 + IMtkRadioExNetwork/slot2 + + + vendor.mediatek.hardware.mtkradioex.rcs + IMtkRadioExRcs/slot1 + IMtkRadioExRcs/slot2 + + + vendor.mediatek.hardware.mtkradioex.sim + IMtkRadioExSim/slot1 + IMtkRadioExSim/slot2 + + + vendor.mediatek.hardware.mtkradioex.voice + IMtkRadioExVoice/slot1 + IMtkRadioExVoice/slot2 + + + vendor.mediatek.hardware.netdagent + hwbinder + @1.0::INetdagent/default + + + vendor.mediatek.hardware.nvram + hwbinder + @1.1::INvram/default + + + vendor.mediatek.hardware.pq_aidl + IPictureQuality_AIDL/default + + + vendor.mediatek.hardware.videotelephony + hwbinder + @1.0::IVideoTelephony/default + + 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 0000000..7571030 --- /dev/null +++ b/overlay-lineage/packages/apps/Aperture/app/src/main/res/values/config.xml @@ -0,0 +1,9 @@ + + + + + true + diff --git a/overlay/CarrierConfigResOverlay/Android.bp b/overlay/CarrierConfigResOverlay/Android.bp new file mode 100644 index 0000000..4dfbded --- /dev/null +++ b/overlay/CarrierConfigResOverlay/Android.bp @@ -0,0 +1,10 @@ +// +// Copyright (C) 2022 The LineageOS Project +// SPDX-License-Identifier: Apache-2.0 +// + +runtime_resource_overlay { + name: "CarrierConfigResOverlay", + aaptflags: ["--keep-raw-values"], + vendor: true, +} diff --git a/overlay/CarrierConfigResOverlay/AndroidManifest.xml b/overlay/CarrierConfigResOverlay/AndroidManifest.xml new file mode 100644 index 0000000..9b5c93e --- /dev/null +++ b/overlay/CarrierConfigResOverlay/AndroidManifest.xml @@ -0,0 +1,13 @@ + + + + + + diff --git a/overlay/CarrierConfigResOverlay/res/xml/vendor.xml b/overlay/CarrierConfigResOverlay/res/xml/vendor.xml new file mode 100644 index 0000000..e72fcdf --- /dev/null +++ b/overlay/CarrierConfigResOverlay/res/xml/vendor.xml @@ -0,0 +1,4501 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +306971000123 + + + + + + + + + + + + + + + + + + + + + + + 121 + + + + + + connected_mmwave,legacy,10;connected,legacy,10;not_restricted_rrc_idle,legacy,10;not_restricted_rrc_con,legacy,10 + + + + + + + +31654501233 + + + + + + + + + + + + + + + + + + + + +31624001233 + connected_mmwave,legacy,10;connected,legacy,10;not_restricted_rrc_idle,legacy,10;not_restricted_rrc_con,legacy,10 + + + +31624001233 + + + + +31640192939 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 888 + + + + + + + + + + + + + + + + + + + + + +33660660001 + + + + + + + + 123 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 22177 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 121 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 170 + + + + + + + + + + + + + + + + + + + + + + + + + + + + connected_mmwave,legacy,10;connected,legacy,10;not_restricted_rrc_idle,legacy,10;not_restricted_rrc_con,legacy,10 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +38598151100 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +38598151100 + + + + + + + + + + + + + + + + + connected_mmwave,legacy,10;connected,legacy,10;not_restricted_rrc_idle,legacy,10;not_restricted_rrc_con,legacy,10 + + + + + + + connected_mmwave,legacy,10;connected,legacy,10;not_restricted_rrc_idle,legacy,10;not_restricted_rrc_con,legacy,10 + + + + + + + + + + + + + + + + + + + + + + + + + + + 41919 + + + + + + + + + + + + + + + 42020 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +40722033334 + + + + + + + + + +40766177177 + + + + + + + + + + + + + + + connected_mmwave,legacy,10;connected,legacy,10;not_restricted_rrc_idle,legacy,10;not_restricted_rrc_con,legacy,10 + + + + + + + +40766177177 + + + + + + + + + + + + + + + connected_mmwave,legacy,10;connected,legacy,10;not_restricted_rrc_idle,legacy,10;not_restricted_rrc_con,legacy,10 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + *99 + + + + + + + + + + + + +420603123311 + + + + + + + + + + + + + + + + + + + + + + + + + +420608989898 + + + + + + + + + + + + + + + + connected_mmwave,legacy,10;connected,legacy,10;not_restricted_rrc_idle,legacy,10;not_restricted_rrc_con,legacy,10 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +421903333999 + + + + + + + + + + + + + + + + + + + + + + + + connected_mmwave,legacy,10;connected,legacy,10;not_restricted_rrc_idle,legacy,10;not_restricted_rrc_con,legacy,10 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +436762200 + + + + + + + + + + + + + + + + + connected_mmwave,legacy,10;connected,legacy,10;not_restricted_rrc_idle,legacy,10;not_restricted_rrc_con,legacy,10 + + + + + + + + + + + +436762200 + + + + + + + + + + + + + + + + + connected_mmwave,legacy,10;connected,legacy,10;not_restricted_rrc_idle,legacy,10;not_restricted_rrc_con,legacy,10 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +436762200 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 121 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +48601222222 + + + + + + + + + + + + + + + +48602950000 + + + + + + + + + + + + + + *501 + + + + + + + + + + + + + + + + connected_mmwave,legacy,10;connected,legacy,10;not_restricted_rrc_idle,legacy,10;not_restricted_rrc_con,legacy,10 + + + + + + + + + + + + + + + + + + + + + + +491793000333 + + + + + + + + + + + + + + + + + + + +491793000333 + + + + + + + + + + + + + + + + + + + +491793000333 + + + + + + + + + + + + + + + + + + + + 5500 + + + + + + + + + + + + + + 5500 + + + + + + + + + + + + + + + + + + + + + + + 3311 + + + + + + + + + + + + + + + + + + connected_mmwave,legacy,10;connected,legacy,10;not_restricted_rrc_idle,legacy,10;not_restricted_rrc_con,legacy,10 + + + + + + + + + + + + + + 3311 + + + + + + + + + + + + + + + + + + connected_mmwave,legacy,10;connected,legacy,10;not_restricted_rrc_idle,legacy,10;not_restricted_rrc_con,legacy,10 + + + + + + + + + + + + + + 3311 + + + + + + + + + + + + + + + + + + connected_mmwave,legacy,10;connected,legacy,10;not_restricted_rrc_idle,legacy,10;not_restricted_rrc_con,legacy,10 + + + + + + + + + + + + + + + + + + + + + + + + 123 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +351962000000 + + + + + + + + + + 133 + +351931331330 + + + + + + 133 + +351931331330 + + + + + + + + 133 + +351931331330 + + + + + + + + 133 + +351931331330 + + + + + + + + 133 + +351931331330 + + + + + + + + 133 + +351931331330 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 171 + + + + + + + + 171 + + + + + + + + + + + 171 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +38970121212 + + + + + + + + + + + + + + + + + + + connected_mmwave,legacy,10;connected,legacy,10;not_restricted_rrc_idle,legacy,10;not_restricted_rrc_con,legacy,10 + + + + + + + + + + + + +3826714077 + + + + + + + + + + + + + + + connected_mmwave,legacy,10;connected,legacy,10;not_restricted_rrc_idle,legacy,10;not_restricted_rrc_con,legacy,10 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + *86 + + + + + + + + + + + *86 + + + + + + + + + + + + + *86 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + *777 + + + + + + + *99 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1416 + +819066514170 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +64222022002 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 132 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + *77 + + + + + *80 + + + + + + + + *80 + + + + + + + + + + + + + + + + + + *80 + + + + + + + + + + + + + + *80 + + + + + + + + + + + + + *80 + + + + + + + + *86 + + + + + + + + + + *80 + + + + + + + + + + + + + + *111 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 131 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + *2747 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + *555 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + *100 + + + + + + + + + *100 + + + + + + *100 + + + + + + *100 + + + + + + *100 + + + + + *100 + + + + *100 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +56964109999 + + + + + + + + + + + + + + + + + *20 + + + + + + + + + + + + + + + + + + + + + + + + + + *123 + + + + + + + + *123 + + + + + + + *123 + + + + + + + + + *123 + + + + + + + + + + + + *123 + + + + + + + + *123 + + + + + + + + *123 + + + + + *123 + + + + + + + + + + + + + + + + + + + #99 + + + + + + + + + + + + + + + + + + + + + + *555 + + + + + + + + + + *2747 + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/overlay/DialerResOverlay/Android.bp b/overlay/DialerResOverlay/Android.bp new file mode 100644 index 0000000..be600e5 --- /dev/null +++ b/overlay/DialerResOverlay/Android.bp @@ -0,0 +1,9 @@ +// +// Copyright (C) 2022 The LineageOS Project +// SPDX-License-Identifier: Apache-2.0 +// + +runtime_resource_overlay { + name: "DialerResOverlay", + vendor: true, +} diff --git a/overlay/DialerResOverlay/AndroidManifest.xml b/overlay/DialerResOverlay/AndroidManifest.xml new file mode 100644 index 0000000..ec8277d --- /dev/null +++ b/overlay/DialerResOverlay/AndroidManifest.xml @@ -0,0 +1,13 @@ + + + + + + diff --git a/overlay/DialerResOverlay/res/values/config.xml b/overlay/DialerResOverlay/res/values/config.xml new file mode 100644 index 0000000..2cbeb77 --- /dev/null +++ b/overlay/DialerResOverlay/res/values/config.xml @@ -0,0 +1,9 @@ + + + + true + 4 + diff --git a/overlay/FrameworksResOverlay/Android.bp b/overlay/FrameworksResOverlay/Android.bp new file mode 100644 index 0000000..1054766 --- /dev/null +++ b/overlay/FrameworksResOverlay/Android.bp @@ -0,0 +1,10 @@ +// +// Copyright (C) 2022 The LineageOS Project +// SPDX-License-Identifier: Apache-2.0 +// + +runtime_resource_overlay { + name: "FrameworksResOverlay", + vendor: true, + resource_dirs: ["res", "power/res"] +} diff --git a/overlay/FrameworksResOverlay/AndroidManifest.xml b/overlay/FrameworksResOverlay/AndroidManifest.xml new file mode 100644 index 0000000..b146007 --- /dev/null +++ b/overlay/FrameworksResOverlay/AndroidManifest.xml @@ -0,0 +1,13 @@ + + + + + + diff --git a/overlay/FrameworksResOverlay/power/res/xml/irq_device_map.xml b/overlay/FrameworksResOverlay/power/res/xml/irq_device_map.xml new file mode 100644 index 0000000..02b19cf --- /dev/null +++ b/overlay/FrameworksResOverlay/power/res/xml/irq_device_map.xml @@ -0,0 +1,59 @@ + + + + + + Alarm + + + diff --git a/overlay/FrameworksResOverlay/power/res/xml/power_profile.xml b/overlay/FrameworksResOverlay/power/res/xml/power_profile.xml new file mode 100755 index 0000000..cd13366 --- /dev/null +++ b/overlay/FrameworksResOverlay/power/res/xml/power_profile.xml @@ -0,0 +1,232 @@ + + + + + + 0.1 + 60 + 199 + 32.8 + 1.68 + 0.4 + 225.85 + 21.5 + 15.3 + 63.1 + 123 + 410 + 29 + + + 90 + 116.3 + + + 4 + 4 + + + + + 4 + 4 + + + + + 400000 + + + + + 0.1 + + + + 3.7 + + 5 + + 2.55. + + + 2.11 + + 2.22 + + + + 900000 + 979000 + 1085000 + 1218000 + 1351000 + 1484000 + 1617000 + 1750000 + 1814000 + 1879000 + 1944000 + 2009000 + 2074000 + 2139000 + 2215000 + 2301000 + + + + + 400000 + 501000 + 542000 + 643000 + 745000 + 846000 + 948000 + 1050000 + 1138000 + 1226000 + 1314000 + 1402000 + 1491000 + 1579000 + 1682000 + 1800000 + + + + + 74 + 77 + 81 + 85 + 89 + 92 + 94 + 97 + 100 + 104 + 107 + 109 + 113 + 116 + 121 + 125 + + + + 29 + 32 + 38 + 47 + 57 + 69 + 74 + 77 + 81 + 85 + 89 + 92 + 94 + 97 + 100 + 104 + + + + + + 22.7 + + + + + 1000 + + + + 0 + + 0 + + 0 + + + + + 0 + + + .0002 + .002 + .02 + .2 + 2 + + + + 0 + 0 + 0 + + 0 + 0 + 0 + 0 + 0 + + 0 + + + + 0 + 0 + + 0 + + diff --git a/overlay/FrameworksResOverlay/res/values/arrays.xml b/overlay/FrameworksResOverlay/res/values/arrays.xml new file mode 100644 index 0000000..431d5ff --- /dev/null +++ b/overlay/FrameworksResOverlay/res/values/arrays.xml @@ -0,0 +1,24 @@ + + + + + + 1 + + diff --git a/overlay/FrameworksResOverlay/res/values/config.xml b/overlay/FrameworksResOverlay/res/values/config.xml new file mode 100644 index 0000000..db34a8f --- /dev/null +++ b/overlay/FrameworksResOverlay/res/values/config.xml @@ -0,0 +1,285 @@ + + + + + + + + + + + + + + + + + + + + android.sensor.light + + + true + + + 1.0 + + + 128 + 256 + 384 + 512 + 640 + 768 + 896 + 1024 + 2048 + 4096 + 6144 + 8192 + 10240 + 12288 + 14336 + 16384 + 18432 + + + + 8 + 64 + 98 + 104 + 110 + 116 + 122 + 128 + 134 + 182 + 255 + 255 + 255 + 255 + 255 + 255 + 255 + 255 + + + + 1000 + 1000 + + + 500 + + + 270 + + + 90 + + + 0 + + + 40 + + + 50 + + + + M 0,0 + L -46, 0 + L -10, 26 + L 10, 26 + L 46, 0 + Z + @dp + + + @string/config_mainBuiltInDisplayCutout + + + false + + true + + + + 0:2:15 + + + + true + + + + true + + + com.android.systemui/com.android.systemui.doze.DozeService + + + 17 + + + true + + + false + + + false + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + + "/system/framework/framework.jar" + "/system/framework/services.jar" + "/apex/com.android.art/javalib/core-oj.jar" + "/apex/com.android.art/javalib/core-libart.jar" + "/system_ext/priv-app/SystemUI/SystemUI.apk" + "/system/bin/surfaceflinger" + + + + true + + + 1 + + + true + + + true + + + true + + + + @array/config_sfps_sensor_props_0 + + + + local:4627039422300187648 + 760 + 660 + 100 + + + + true + diff --git a/overlay/SettingsProviderResOverlay/Android.bp b/overlay/SettingsProviderResOverlay/Android.bp new file mode 100644 index 0000000..d12b447 --- /dev/null +++ b/overlay/SettingsProviderResOverlay/Android.bp @@ -0,0 +1,9 @@ +// +// Copyright (C) 2022 The LineageOS Project +// SPDX-License-Identifier: Apache-2.0 +// + +runtime_resource_overlay { + name: "SettingsProviderResOverlay", + vendor: true, +} diff --git a/overlay/SettingsProviderResOverlay/AndroidManifest.xml b/overlay/SettingsProviderResOverlay/AndroidManifest.xml new file mode 100644 index 0000000..f8c0246 --- /dev/null +++ b/overlay/SettingsProviderResOverlay/AndroidManifest.xml @@ -0,0 +1,13 @@ + + + + + + diff --git a/overlay/SettingsProviderResOverlay/res/values/defaults.xml b/overlay/SettingsProviderResOverlay/res/values/defaults.xml new file mode 100644 index 0000000..68bef51 --- /dev/null +++ b/overlay/SettingsProviderResOverlay/res/values/defaults.xml @@ -0,0 +1,11 @@ + + + + + + BraX3 + + diff --git a/overlay/SettingsResOverlay/Android.bp b/overlay/SettingsResOverlay/Android.bp new file mode 100644 index 0000000..b38169f --- /dev/null +++ b/overlay/SettingsResOverlay/Android.bp @@ -0,0 +1,9 @@ +// +// Copyright (C) 2022 The LineageOS Project +// SPDX-License-Identifier: Apache-2.0 +// + +runtime_resource_overlay { + name: "SettingsResOverlay", + vendor: true, +} diff --git a/overlay/SettingsResOverlay/AndroidManifest.xml b/overlay/SettingsResOverlay/AndroidManifest.xml new file mode 100644 index 0000000..d94a289 --- /dev/null +++ b/overlay/SettingsResOverlay/AndroidManifest.xml @@ -0,0 +1,13 @@ + + + + + + diff --git a/overlay/SettingsResOverlay/res/values/config.xml b/overlay/SettingsResOverlay/res/values/config.xml new file mode 100644 index 0000000..66e4c4f --- /dev/null +++ b/overlay/SettingsResOverlay/res/values/config.xml @@ -0,0 +1,9 @@ + + + + + true + diff --git a/overlay/SystemUIResOverlay/Android.bp b/overlay/SystemUIResOverlay/Android.bp new file mode 100644 index 0000000..e99e825 --- /dev/null +++ b/overlay/SystemUIResOverlay/Android.bp @@ -0,0 +1,9 @@ +// +// Copyright (C) 2022 The LineageOS Project +// SPDX-License-Identifier: Apache-2.0 +// + +runtime_resource_overlay { + name: "SystemUIResOverlay", + vendor: true, +} diff --git a/overlay/SystemUIResOverlay/AndroidManifest.xml b/overlay/SystemUIResOverlay/AndroidManifest.xml new file mode 100644 index 0000000..6d03997 --- /dev/null +++ b/overlay/SystemUIResOverlay/AndroidManifest.xml @@ -0,0 +1,13 @@ + + + + + + diff --git a/overlay/SystemUIResOverlay/res/values/config.xml b/overlay/SystemUIResOverlay/res/values/config.xml new file mode 100644 index 0000000..0bc3329 --- /dev/null +++ b/overlay/SystemUIResOverlay/res/values/config.xml @@ -0,0 +1,9 @@ + + + + 12dp + 30px + diff --git a/overlay/TelephonyResOverlay/Android.bp b/overlay/TelephonyResOverlay/Android.bp new file mode 100644 index 0000000..3acb6de --- /dev/null +++ b/overlay/TelephonyResOverlay/Android.bp @@ -0,0 +1,9 @@ +// +// Copyright (C) 2022 The LineageOS Project +// SPDX-License-Identifier: Apache-2.0 +// + +runtime_resource_overlay { + name: "TelephonyResOverlay", + vendor: true, +} diff --git a/overlay/TelephonyResOverlay/AndroidManifest.xml b/overlay/TelephonyResOverlay/AndroidManifest.xml new file mode 100644 index 0000000..cc15b72 --- /dev/null +++ b/overlay/TelephonyResOverlay/AndroidManifest.xml @@ -0,0 +1,13 @@ + + + + + + diff --git a/overlay/TelephonyResOverlay/res/values/config.xml b/overlay/TelephonyResOverlay/res/values/config.xml new file mode 100644 index 0000000..da5747d --- /dev/null +++ b/overlay/TelephonyResOverlay/res/values/config.xml @@ -0,0 +1,12 @@ + + + + + com.mediatek.ims + + + com.mediatek.ims + diff --git a/overlay/TetheringResOverlay/Android.bp b/overlay/TetheringResOverlay/Android.bp new file mode 100644 index 0000000..d51f303 --- /dev/null +++ b/overlay/TetheringResOverlay/Android.bp @@ -0,0 +1,9 @@ +// +// Copyright (C) 2022 The LineageOS Project +// SPDX-License-Identifier: Apache-2.0 +// + +runtime_resource_overlay { + name: "TetheringResOverlay", + vendor: true, +} diff --git a/overlay/TetheringResOverlay/AndroidManifest.xml b/overlay/TetheringResOverlay/AndroidManifest.xml new file mode 100644 index 0000000..a7f7f52 --- /dev/null +++ b/overlay/TetheringResOverlay/AndroidManifest.xml @@ -0,0 +1,14 @@ + + + + + + diff --git a/overlay/TetheringResOverlay/res/values/config.xml b/overlay/TetheringResOverlay/res/values/config.xml new file mode 100644 index 0000000..de1ef46 --- /dev/null +++ b/overlay/TetheringResOverlay/res/values/config.xml @@ -0,0 +1,13 @@ + + + + "usb\\d" + "rndis\\d" + + + + "softap\\d" + "ap\\d" + "ap_br_ap\\d" + + diff --git a/overlay/WifiResOverlay/Android.bp b/overlay/WifiResOverlay/Android.bp new file mode 100644 index 0000000..2ec7894 --- /dev/null +++ b/overlay/WifiResOverlay/Android.bp @@ -0,0 +1,9 @@ +// +// Copyright (C) 2022 The LineageOS Project +// SPDX-License-Identifier: Apache-2.0 +// + +runtime_resource_overlay { + name: "WifiResOverlay", + vendor: true, +} diff --git a/overlay/WifiResOverlay/AndroidManifest.xml b/overlay/WifiResOverlay/AndroidManifest.xml new file mode 100644 index 0000000..112853c --- /dev/null +++ b/overlay/WifiResOverlay/AndroidManifest.xml @@ -0,0 +1,14 @@ + + + + + + diff --git a/overlay/WifiResOverlay/res/values/config.xml b/overlay/WifiResOverlay/res/values/config.xml new file mode 100644 index 0000000..e9157f4 --- /dev/null +++ b/overlay/WifiResOverlay/res/values/config.xml @@ -0,0 +1,83 @@ + + + + + + + + + + + true + + true + + + true + + + true + + + + + + true + + + true + + + true + + + true + + + true + + + true + + + true + + + 1000 + + + 1-13 + + + 36,38,40,42,44,46,48,149,153,157,161,165 + + + 1730560,3461120,6922240,524288,1048576,4525824 + + + + + 1 + + + true + diff --git a/proprietary-files.txt b/proprietary-files.txt new file mode 100644 index 0000000..01f08e8 --- /dev/null +++ b/proprietary-files.txt @@ -0,0 +1,1368 @@ +# AEE +vendor/lib/libaedv.so +vendor/lib64/libaedv.so + +# Audio +vendor/lib/hw/audio.primary.mediatek.so;SYMLINK=vendor/lib/hw/audio.primary.mt6835.so +vendor/lib/hw/audio.r_submix.mediatek.so;SYMLINK=vendor/lib/hw/audio.r_submix.mt6835.so +vendor/lib/hw/audio.usb.default.so +vendor/lib/lib_iir.so +vendor/lib/libaudio_param_parser-vnd.so +vendor/lib/libaudiocompensationfilter_vendor.so +vendor/lib/libaudiocompensationfilterc.so +vendor/lib/libaudiocomponentengine_vendor.so +vendor/lib/libaudiocomponentenginec.so +vendor/lib/libaudiocustparam_vendor.so +vendor/lib/libaudiodcrflt_vendor.so +vendor/lib/libaudiofmtconv.so +vendor/lib/libaudioloudc.so +vendor/lib/libaudioprimarydevicehalifclient.so +vendor/lib/libaudiotoolkit_vendor.so +vendor/lib/libaurisysdemo.so +vendor/lib/libawinic_mtk_aurisys.so +vendor/lib/libbessound_hd_mtk_vendor.so +vendor/lib/libblisrc32_vendor.so +vendor/lib/libbwc.so +vendor/lib/libcvsd_mtk.so +vendor/lib/libmsbc_mtk.so +vendor/lib/libmtklimiter_vendor.so +vendor/lib/libmtkshifter_vendor.so +vendor/lib/libmtkspparser.so +vendor/lib/libMtkSpeechEnh.so +vendor/lib/libnxp_extamp_intf.so +vendor/lib/librt_extamp_intf.so +vendor/lib/libspeech_enh_lib.so;FIX_SONAME +vendor/lib/libspeechparser_vendor.so +vendor/lib/libtinycompress.so +vendor/lib/vendor.mediatek.hardware.audio@6.1.so +vendor/lib/vendor.mediatek.hardware.audio@7.1.so +vendor/lib/vendor.mediatek.hardware.audio@8.1.so +vendor/lib64/libbwc.so +vendor/lib64/libtinycompress.so +vendor/lib64/vendor.mediatek.hardware.audio@6.1.so + +# Audio Configs +vendor/etc/audio_device.xml +vendor/etc/audio_em.xml +vendor/etc/audio_param/AudioParamOptions_mgvi.xml +vendor/etc/audio_param/AudioParamOptions_vext.xml +vendor/etc/audio_param/BtInfo_AudioParam.xml +vendor/etc/audio_param/BtInfo_ParamUnitDesc.xml +vendor/etc/audio_param/CRSVol_AudioParam.xml +vendor/etc/audio_param/CRSVol_ParamUnitDesc.xml +vendor/etc/audio_param/CRSVolUI_AudioParam.xml +vendor/etc/audio_param/CRSVolUI_ParamUnitDesc.xml +vendor/etc/audio_param/HpImpedance_AudioParam.xml +vendor/etc/audio_param/HpImpedance_ParamUnitDesc.xml +vendor/etc/audio_param/MicInfo_AudioParam.xml +vendor/etc/audio_param/MicInfo_ParamUnitDesc.xml +vendor/etc/audio_param/PlaybackACF_AudioParam.xml +vendor/etc/audio_param/PlaybackACF_ParamUnitDesc.xml +vendor/etc/audio_param/Playback_AudioParam.xml +vendor/etc/audio_param/PlaybackDRC_AudioParam.xml +vendor/etc/audio_param/PlaybackDRC_ParamUnitDesc.xml +vendor/etc/audio_param/PlaybackHCF_AudioParam.xml +vendor/etc/audio_param/PlaybackHCF_ParamUnitDesc.xml +vendor/etc/audio_param/Playback_ParamTreeView.xml +vendor/etc/audio_param/Playback_ParamUnitDesc.xml +vendor/etc/audio_param/PlaybackVolAna_AudioParam.xml +vendor/etc/audio_param/PlaybackVolAna_ParamUnitDesc.xml +vendor/etc/audio_param/PlaybackVolDigi_AudioParam.xml +vendor/etc/audio_param/PlaybackVolDigi_ParamUnitDesc.xml +vendor/etc/audio_param/PlaybackVolUI_AudioParam.xml +vendor/etc/audio_param/PlaybackVolUI_ParamUnitDesc.xml +vendor/etc/audio_param/Record_AudioParam.xml +vendor/etc/audio_param/RecordDMNR_AudioParam.xml +vendor/etc/audio_param/RecordDMNR_ParamUnitDesc.xml +vendor/etc/audio_param/RecordFIR_AudioParam.xml +vendor/etc/audio_param/RecordFIR_ParamUnitDesc.xml +vendor/etc/audio_param/Record_ParamTreeView.xml +vendor/etc/audio_param/Record_ParamUnitDesc.xml +vendor/etc/audio_param/RecordUI_AudioParam.xml +vendor/etc/audio_param/RecordUI_ParamUnitDesc.xml +vendor/etc/audio_param/RecordVol_AudioParam.xml +vendor/etc/audio_param/RecordVol_ParamUnitDesc.xml +vendor/etc/audio_param/RecordVolUI_AudioParam.xml +vendor/etc/audio_param/RecordVolUI_ParamUnitDesc.xml +vendor/etc/audio_param/RingbackVol_AudioParam.xml +vendor/etc/audio_param/RingbackVol_ParamUnitDesc.xml +vendor/etc/audio_param/RingbackVolUI_AudioParam.xml +vendor/etc/audio_param/RingbackVolUI_ParamUnitDesc.xml +vendor/etc/audio_param/SmartPa_AudioParam.xml +vendor/etc/audio_param/SmartPa_ParamUnitDesc.xml +vendor/etc/audio_param/SoundEnhancement_AudioParam.xml +vendor/etc/audio_param/SoundEnhancement_ParamUnitDesc.xml +vendor/etc/audio_param/SpeechAcousticShock_AudioParam.xml +vendor/etc/audio_param/SpeechAcousticShock_ParamUnitDesc.xml +vendor/etc/audio_param/Speech_AudioParam.xml +vendor/etc/audio_param/SpeechDMNR_AudioParam.xml +vendor/etc/audio_param/SpeechDMNR_ParamUnitDesc.xml +vendor/etc/audio_param/SpeechEchoRef_AudioParam.xml +vendor/etc/audio_param/SpeechEchoRef_ParamUnitDesc.xml +vendor/etc/audio_param/SpeechGeneral_AudioParam.xml +vendor/etc/audio_param/SpeechGeneral_ParamUnitDesc.xml +vendor/etc/audio_param/SpeechMagiClarity_AudioParam.xml +vendor/etc/audio_param/SpeechMagiClarity_ParamUnitDesc.xml +vendor/etc/audio_param/SpeechNetwork_AudioParam.xml +vendor/etc/audio_param/SpeechNetwork_ParamUnitDesc.xml +vendor/etc/audio_param/Speech_ParamTreeView.xml +vendor/etc/audio_param/Speech_ParamUnitDesc.xml +vendor/etc/audio_param/SpeechUI_AudioParam.xml +vendor/etc/audio_param/SpeechUI_ParamUnitDesc.xml +vendor/etc/audio_param/SpeechVol_AudioParam.xml +vendor/etc/audio_param/SpeechVol_ParamUnitDesc.xml +vendor/etc/audio_param/SpeechVolUI_AudioParam.xml +vendor/etc/audio_param/SpeechVolUI_ParamUnitDesc.xml +vendor/etc/audio_param/Ultrasound_AudioParam.xml +vendor/etc/audio_param/Ultrasound_ParamUnitDesc.xml +vendor/etc/audio_param/UplinkConfiguration_AudioParam.xml +vendor/etc/audio_param/UplinkConfiguration_ParamUnitDesc.xml +vendor/etc/audio_param/USBCall_AudioParam.xml +vendor/etc/audio_param/USBCall_ParamUnitDesc.xml +vendor/etc/audio_param/USBDevice_AudioParam.xml +vendor/etc/audio_param/USBDevice_ParamUnitDesc.xml +vendor/etc/audio_param/VoIP_AudioParam.xml +vendor/etc/audio_param/VoIPDMNR_AudioParam.xml +vendor/etc/audio_param/VoIPDMNR_ParamUnitDesc.xml +vendor/etc/audio_param/VoIPGeneral_AudioParam.xml +vendor/etc/audio_param/VoIPGeneral_ParamUnitDesc.xml +vendor/etc/audio_param/VoIP_ParamTreeView.xml +vendor/etc/audio_param/VoIP_ParamUnitDesc.xml +vendor/etc/audio_param/VoIPUI_AudioParam.xml +vendor/etc/audio_param/VoIPUI_ParamUnitDesc.xml +vendor/etc/audio_param/VoIPv2_AudioParam.xml +vendor/etc/audio_param/VoIPv2DMNR_AudioParam.xml +vendor/etc/audio_param/VoIPv2DMNR_ParamUnitDesc.xml +vendor/etc/audio_param/VoIPv2General_AudioParam.xml +vendor/etc/audio_param/VoIPv2General_ParamUnitDesc.xml +vendor/etc/audio_param/VoIPv2_ParamTreeView.xml +vendor/etc/audio_param/VoIPv2_ParamUnitDesc.xml +vendor/etc/audio_param/VoIPv2UI_AudioParam.xml +vendor/etc/audio_param/VoIPv2UI_ParamUnitDesc.xml +vendor/etc/audio_param/VoIPVol_AudioParam.xml +vendor/etc/audio_param/VoIPVol_ParamUnitDesc.xml +vendor/etc/audio_param/VoIPVolUI_AudioParam.xml +vendor/etc/audio_param/VoIPVolUI_ParamUnitDesc.xml +vendor/etc/audio_param/Volume_AudioParam.xml +vendor/etc/audio_param/VolumeGainMap_AudioParam.xml +vendor/etc/audio_param/VolumeGainMap_ParamUnitDesc.xml +vendor/etc/audio_param/VolumeGainMapUL_AudioParam.xml +vendor/etc/audio_param/VolumeGainMapUL_ParamUnitDesc.xml +vendor/etc/audio_param/Volume_ParamUnitDesc.xml +vendor/etc/audio_param/VoWCommonSetting_AudioParam.xml +vendor/etc/audio_param/VoWCommonSetting_ParamUnitDesc.xml +vendor/etc/audio_param/VoWCompatibilityCode_AudioParam.xml +vendor/etc/audio_param/VoWCompatibilityCode_ParamUnitDesc.xml +vendor/etc/audio_param/VoWDspAec_AudioParam.xml +vendor/etc/audio_param/VoWDspAec_ParamUnitDesc.xml +vendor/etc/audio_param/VoWEngineFeature_AudioParam.xml +vendor/etc/audio_param/VoWEngineFeature_ParamUnitDesc.xml +vendor/etc/audio_param/VoWHwVad_AudioParam.xml +vendor/etc/audio_param/VoWHwVad_ParamUnitDesc.xml +vendor/etc/audio_param/VoWMicSetting_AudioParam.xml +vendor/etc/audio_param/VoWMicSetting_ParamUnitDesc.xml +vendor/etc/audio_param/VoWVoiceCommand_AudioParam.xml +vendor/etc/audio_param/VoWVoiceCommand_ParamUnitDesc.xml +vendor/etc/audio_policy_volumes.xml +vendor/etc/aurisys_config_rv.xml +vendor/etc/aurisys_config.xml +vendor/etc/default_volume_tables.xml +vendor/etc/media_profiles_V1_0.xml +vendor/etc/smartpa_param/AW_DSP.bin +vendor/etc/smartpa_param/AW_SINWAVE_DSP.bin +vendor/etc/smartpa_param/AW_VMAX_LEFT.bin +vendor/etc/smartpa_param/AW_VMAX_RIGHT.bin +vendor/etc/usb_audio_accessory_only_policy_configuration.xml + +# Bluetooth +vendor/bin/hw/android.hardware.bluetooth@1.1-service-mediatek +vendor/etc/init/android.hardware.bluetooth@1.1-service-mediatek.rc +vendor/etc/init/init.bt_drv.rc +vendor/firmware/BT_FW.cfg +vendor/lib/hw/android.hardware.bluetooth@1.1-impl-mediatek.so +vendor/lib/libbluetooth_mtk_pure.so +vendor/lib/libbluetooth_mtk.so +vendor/lib/libbt-vendor.so +vendor/lib64/hw/android.hardware.bluetooth@1.1-impl-mediatek.so +vendor/lib64/libbluetooth_mtk_pure.so +vendor/lib64/libbluetooth_mtk.so +vendor/lib64/libbt-vendor.so + +# Bluetooth (A2DP) +vendor/lib/hw/vendor.mediatek.hardware.bluetooth.audio@2.2-impl.so +vendor/lib/libbluetooth_audio_session_mediatek.so +vendor/lib/vendor.mediatek.hardware.bluetooth.audio-V1-ndk.so +vendor/lib/vendor.mediatek.hardware.bluetooth.audio@2.1.so +vendor/lib/vendor.mediatek.hardware.bluetooth.audio@2.2.so +vendor/lib64/hw/vendor.mediatek.hardware.bluetooth.audio@2.2-impl.so +vendor/lib64/libbluetooth_audio_session_mediatek.so +vendor/lib64/vendor.mediatek.hardware.bluetooth.audio-V1-ndk.so +vendor/lib64/vendor.mediatek.hardware.bluetooth.audio@2.1.so +vendor/lib64/vendor.mediatek.hardware.bluetooth.audio@2.2.so + +# Camera +vendor/bin/hw/camerahalserver +vendor/etc/init/camerahalserver.rc +vendor/etc/default_pd_calibration.bin +vendor/etc/tp_mfnr/IQParam.bin +vendor/etc/tp_sfnr/IQParam.bin +vendor/lib64/hw/android.hardware.camera.provider@2.6-impl-mediatek.so +vendor/lib64/hw/vendor.mediatek.hardware.camera.atms@1.0-impl.so +vendor/lib64/hw/vendor.mediatek.hardware.camera.bgservice@1.1-impl.so +vendor/lib64/hw/vendor.mediatek.hardware.camera.ccap@1.0-impl.so +vendor/lib64/hw/vendor.mediatek.hardware.camera.isphal@1.0-impl.so +vendor/lib64/hw/vendor.mediatek.hardware.camera.isphal@1.1-impl.so +vendor/lib64/hw/vendor.mediatek.hardware.camera.lomoeffect@1.0-impl.so +vendor/lib64/bf2257csmacro_mipi_raw_IdxMgr.so +vendor/lib64/bf2257csmacro_mipi_raw_tuning.so +vendor/lib64/libcam.seninfn3d.so +vendor/lib64/libcamalgo.3dnr.so +vendor/lib64/libcamalgo.dngop.so +vendor/lib64/libcamalgo.fdft.so +vendor/lib64/libcamalgo.nr.so +vendor/lib64/libcamalgo.platform.so +vendor/lib64/libcamalgo.utility.so +vendor/lib64/libcamalgo.warp.so +vendor/lib64/libCamera_bf2257csmacromipiraw_E2EHDR_Preview.so +vendor/lib64/libCamera_bf2257csmacromipiraw_E2EHDR_Video.so +vendor/lib64/libCamera_bf2257csmacromipiraw_Face_Capture.so +vendor/lib64/libCamera_bf2257csmacromipiraw_Flash_Capture.so +vendor/lib64/libCamera_bf2257csmacromipiraw_HDR_Capture.so +vendor/lib64/libCamera_bf2257csmacromipiraw_HDR_Preview.so +vendor/lib64/libCamera_bf2257csmacromipiraw_HDR_Video.so +vendor/lib64/libCamera_bf2257csmacromipiraw_N3D_Capture.so +vendor/lib64/libCamera_bf2257csmacromipiraw_N3D_Preview.so +vendor/lib64/libCamera_bf2257csmacromipiraw_N3D_Video.so +vendor/lib64/libCamera_bf2257csmacromipiraw_P1_YUV.so +vendor/lib64/libCamera_bf2257csmacromipiraw_Scene_Capture_4cell.so +vendor/lib64/libCamera_bf2257csmacromipiraw_Scene_Capture.so +vendor/lib64/libCamera_bf2257csmacromipiraw_Scene_Preview_4k.so +vendor/lib64/libCamera_bf2257csmacromipiraw_Scene_Preview.so +vendor/lib64/libCamera_bf2257csmacromipiraw_Scene_Preview_ZSD_Flash.so +vendor/lib64/libCamera_bf2257csmacromipiraw_Video_1080.so +vendor/lib64/libCamera_bf2257csmacromipiraw_Video_4k.so +vendor/lib64/libCamera_gc05a2submipiraw_Face_Beauty.so +vendor/lib64/libCamera_gc05a2submipiraw_Face_Portrait.so +vendor/lib64/libCamera_ov50c40mipiraw_Coosea_Remosaic.so +vendor/lib64/libCamera_ov50c40mipiraw_Coosea_RemosaicZoom1.so +vendor/lib64/libCamera_ov50c40mipiraw_Face_Beauty_Preview.so +vendor/lib64/libCamera_ov50c40mipiraw_Face_Beauty.so +vendor/lib64/libCamera_ov50c40mipiraw_Face_Capture_4cell_Zoom_2x.so +vendor/lib64/libCamera_ov50c40mipiraw_Face_Capture_4cell_Zoom_4x.so +vendor/lib64/libCamera_ov50c40mipiraw_Face_Capture_4cell_Zoom_6x.so +vendor/lib64/libCamera_ov50c40mipiraw_Scene_Capture_4cell_Zoom_2x.so +vendor/lib64/libCamera_ov50c40mipiraw_Scene_Capture_4cell_Zoom_4x.so +vendor/lib64/libCamera_ov50c40mipiraw_Scene_Capture_4cell_Zoom_6x.so +vendor/lib64/libCamera_ov50c40mipiraw_Scene_HDR.so +vendor/lib64/libCamera_ov50c40mipiraw_Scene_lowlight.so +vendor/lib64/libCamera_ov50c40mipiraw_Scene_Portrait.so +vendor/lib64/libCamera_ov50c40mipiraw_Video_1080_120.so +vendor/lib64/libCamera_ov50c40mipiraw_Video_1080_60_Zoom_2x.so +vendor/lib64/libCamera_ov50c40mipiraw_Video_1080_60_Zoom_4x.so +vendor/lib64/libCamera_ov50c40mipiraw_Video_1080_60_Zoom_6x.so +vendor/lib64/libCamera_ov50c40mipiraw_Video_1080_60.so +vendor/lib64/libCamera_ov50c40mipiraw_Video_1080_Zoom_2x.so +vendor/lib64/libCamera_ov50c40mipiraw_Video_1080_Zoom_4x.so +vendor/lib64/libCamera_ov50c40mipiraw_Video_1080_Zoom_6x.so +vendor/lib64/libCamera_ov50c40mipiraw_Video_4k_Zoom_2x.so +vendor/lib64/libCamera_ov50c40mipiraw_Video_4k_Zoom_4x.so +vendor/lib64/libCamera_ov50c40mipiraw_Video_4k_Zoom_6x.so +vendor/lib64/libCamera_s5k3l8mipiraw_Coosea_Remosaic.so +vendor/lib64/libCamera_s5k3l8mipiraw_Coosea_RemosaicZoom1.so +vendor/lib64/libCamera_s5k3l8mipiraw_Face_Beauty_Preview.so +vendor/lib64/libCamera_s5k3l8mipiraw_Face_Beauty.so +vendor/lib64/libCamera_s5k3l8mipiraw_Face_Capture_4cell_Zoom_2x.so +vendor/lib64/libCamera_s5k3l8mipiraw_Face_Capture_4cell_Zoom_4x.so +vendor/lib64/libCamera_s5k3l8mipiraw_Face_Capture_4cell_Zoom_6x.so +vendor/lib64/libCamera_s5k3l8mipiraw_Scene_Capture_4cell_Zoom_2x.so +vendor/lib64/libCamera_s5k3l8mipiraw_Scene_Capture_4cell_Zoom_4x.so +vendor/lib64/libCamera_s5k3l8mipiraw_Scene_Capture_4cell_Zoom_6x.so +vendor/lib64/libCamera_s5k3l8mipiraw_Scene_HDR.so +vendor/lib64/libCamera_s5k3l8mipiraw_Scene_lowlight.so +vendor/lib64/libCamera_s5k3l8mipiraw_Scene_Portrait.so +vendor/lib64/libCamera_s5k3l8mipiraw_Video_1080_120.so +vendor/lib64/libCamera_s5k3l8mipiraw_Video_1080_60_Zoom_2x.so +vendor/lib64/libCamera_s5k3l8mipiraw_Video_1080_60_Zoom_4x.so +vendor/lib64/libCamera_s5k3l8mipiraw_Video_1080_60_Zoom_6x.so +vendor/lib64/libCamera_s5k3l8mipiraw_Video_1080_Zoom_2x.so +vendor/lib64/libCamera_s5k3l8mipiraw_Video_1080_Zoom_4x.so +vendor/lib64/libCamera_s5k3l8mipiraw_Video_1080_Zoom_6x.so +vendor/lib64/libCamera_s5k3l8mipiraw_Video_4k_Zoom_2x.so +vendor/lib64/libCamera_s5k3l8mipiraw_Video_4k_Zoom_4x.so +vendor/lib64/libCamera_s5k3l8mipiraw_Video_4k_Zoom_6x.so +vendor/lib64/libcamera2ndk_vendor.so +vendor/lib64/libgz_uree.so +vendor/lib64/libheichal.so +vendor/lib64/libimagebuffer_wrapper.so +vendor/lib64/libmtkcam_pipelinepolicy-aov.so +vendor/lib64/libmtkisp_metadata.so +vendor/lib64/libremosaic_wrapper.so +vendor/lib64/libSQLiteModule_VER_ALL.so +vendor/lib64/gc05a2sub_mipi_raw_IdxMgr.so +vendor/lib64/gc05a2sub_mipi_raw_tuning.so +vendor/lib64/lib3a.ae.core.so +vendor/lib64/lib3a.ae.so +vendor/lib64/lib3a.ae.stat.so +vendor/lib64/lib3a.af.assist.so +vendor/lib64/lib3a.af.assist.utils.so +vendor/lib64/lib3a.af.core.so +vendor/lib64/lib3a.af.so +vendor/lib64/lib3a.alsflicker.so +vendor/lib64/lib3a.awb.core.so +vendor/lib64/lib3a.ccudrv.so +vendor/lib64/lib3a.ccuif.so +vendor/lib64/lib3a.custom.ae.so +vendor/lib64/lib3a.dce.so +vendor/lib64/lib3a.flash.so +vendor/lib64/lib3a.flicker.so +vendor/lib64/lib3a.gma.so +vendor/lib64/lib3a.lce.so +vendor/lib64/lib3a.log.so +vendor/lib64/lib3a.n3d3a.so +vendor/lib64/lib3a.sensors.color.so +vendor/lib64/lib3a.sensors.flicker.so +vendor/lib64/libaaa_ltm.so +vendor/lib64/libaaa_ltmx.so +vendor/lib64/libaiawb_moon_model.so +vendor/lib64/libaiawb_moon.so +vendor/lib64/libaiawb_p1ggm.so +vendor/lib64/libaiawb_sun_model.so +vendor/lib64/libaiawb_sun.so +vendor/lib64/libcam.afhal.so +vendor/lib64/libcamalgo.eis.so +vendor/lib64/libcamalgo.fsc.so +vendor/lib64/libcamalgo.gyro.so +vendor/lib64/libcamalgo.ispfeature.so +vendor/lib64/libcamalgo.lmv.so +vendor/lib64/libcamalgo.lsc.so +vendor/lib64/libcamalgo.n3d.so +vendor/lib64/libcamalgo.platform2.so +vendor/lib64/libcamalgo.rotate.so +vendor/lib64/libcamalgo.vsf.so +vendor/lib64/libcam.chdr.so +vendor/lib64/libcamdrv_isp.so +vendor/lib64/libcamdrv_tuning_mgr.so +vendor/lib64/libcamdrv_twin.so +vendor/lib64/libcamera.customae.so +vendor/lib64/libcamera.customaf.so +vendor/lib64/libcamera.customawb.so +vendor/lib64/libcameracustom.camera.3a.so +vendor/lib64/libcameracustom.camera_exif.so +vendor/lib64/libcameracustom.camera.isp.so +vendor/lib64/libcameracustom.camera.sensors.so +vendor/lib64/libcameracustom.flashlight.so +vendor/lib64/libcamera.customflk.so +vendor/lib64/libcameracustom.lens.so +vendor/lib64/libcamera.custom.pd_buf_mgr.so +vendor/lib64/libcameracustom.plugin.so +vendor/lib64/libcameracustom.so +vendor/lib64/libCamera_gc05a2submipiraw_E2EHDR_Preview.so +vendor/lib64/libCamera_gc05a2submipiraw_E2EHDR_Video.so +vendor/lib64/libCamera_gc05a2submipiraw_Face_Capture.so +vendor/lib64/libCamera_gc05a2submipiraw_Flash_Capture.so +vendor/lib64/libCamera_gc05a2submipiraw_HDR_Capture.so +vendor/lib64/libCamera_gc05a2submipiraw_HDR_Preview.so +vendor/lib64/libCamera_gc05a2submipiraw_HDR_Reconfig_Preview.so +vendor/lib64/libCamera_gc05a2submipiraw_HDR_Reconfig_Video.so +vendor/lib64/libCamera_gc05a2submipiraw_HDR_Video.so +vendor/lib64/libCamera_gc05a2submipiraw_N3D_Capture.so +vendor/lib64/libCamera_gc05a2submipiraw_N3D_Preview.so +vendor/lib64/libCamera_gc05a2submipiraw_N3D_Video.so +vendor/lib64/libCamera_gc05a2submipiraw_P1_YUV.so +vendor/lib64/libCamera_gc05a2submipiraw_Scene_Capture_4cell.so +vendor/lib64/libCamera_gc05a2submipiraw_Scene_Capture.so +vendor/lib64/libCamera_gc05a2submipiraw_Scene_Preview_4k.so +vendor/lib64/libCamera_gc05a2submipiraw_Scene_Preview.so +vendor/lib64/libCamera_gc05a2submipiraw_Scene_Preview_ZSD_Flash.so +vendor/lib64/libCamera_gc05a2submipiraw_Video_1080.so +vendor/lib64/libCamera_gc05a2submipiraw_Video_4k.so +vendor/lib64/libCamera_mtk000mipiraw_E2EHDR_Preview.so +vendor/lib64/libCamera_mtk000mipiraw_E2EHDR_Video.so +vendor/lib64/libCamera_mtk000mipiraw_Face_Capture.so +vendor/lib64/libCamera_mtk000mipiraw_Flash_Capture.so +vendor/lib64/libCamera_mtk000mipiraw_HDR_Capture.so +vendor/lib64/libCamera_mtk000mipiraw_HDR_Preview.so +vendor/lib64/libCamera_mtk000mipiraw_HDR_Reconfig_Preview.so +vendor/lib64/libCamera_mtk000mipiraw_HDR_Reconfig_Video.so +vendor/lib64/libCamera_mtk000mipiraw_HDR_Video.so +vendor/lib64/libCamera_mtk000mipiraw_N3D_Capture.so +vendor/lib64/libCamera_mtk000mipiraw_N3D_Preview.so +vendor/lib64/libCamera_mtk000mipiraw_N3D_Video.so +vendor/lib64/libCamera_mtk000mipiraw_P1_YUV.so +vendor/lib64/libCamera_mtk000mipiraw_Scene_Capture_4cell.so +vendor/lib64/libCamera_mtk000mipiraw_Scene_Capture.so +vendor/lib64/libCamera_mtk000mipiraw_Scene_Preview_4k.so +vendor/lib64/libCamera_mtk000mipiraw_Scene_Preview.so +vendor/lib64/libCamera_mtk000mipiraw_Scene_Preview_ZSD_Flash.so +vendor/lib64/libCamera_mtk000mipiraw_Video_1080.so +vendor/lib64/libCamera_mtk000mipiraw_Video_4k.so +vendor/lib64/libCamera_ov50c40mipiraw_E2EHDR_Preview.so +vendor/lib64/libCamera_ov50c40mipiraw_E2EHDR_Video.so +vendor/lib64/libCamera_ov50c40mipiraw_Face_Capture.so +vendor/lib64/libCamera_ov50c40mipiraw_Flash_Capture.so +vendor/lib64/libCamera_ov50c40mipiraw_HDR_Capture.so +vendor/lib64/libCamera_ov50c40mipiraw_HDR_Preview.so +vendor/lib64/libCamera_ov50c40mipiraw_HDR_Reconfig_Preview.so +vendor/lib64/libCamera_ov50c40mipiraw_HDR_Reconfig_Video.so +vendor/lib64/libCamera_ov50c40mipiraw_HDR_Video.so +vendor/lib64/libCamera_ov50c40mipiraw_N3D_Capture.so +vendor/lib64/libCamera_ov50c40mipiraw_N3D_Preview.so +vendor/lib64/libCamera_ov50c40mipiraw_N3D_Video.so +vendor/lib64/libCamera_ov50c40mipiraw_P1_YUV.so +vendor/lib64/libCamera_ov50c40mipiraw_Scene_Capture_4cell.so +vendor/lib64/libCamera_ov50c40mipiraw_Scene_Capture.so +vendor/lib64/libCamera_ov50c40mipiraw_Scene_Preview_4k.so +vendor/lib64/libCamera_ov50c40mipiraw_Scene_Preview.so +vendor/lib64/libCamera_ov50c40mipiraw_Scene_Preview_ZSD_Flash.so +vendor/lib64/libCamera_ov50c40mipiraw_Video_1080.so +vendor/lib64/libCamera_ov50c40mipiraw_Video_4k.so +vendor/lib64/libCamera_s5k3l8mipiraw_E2EHDR_Preview.so +vendor/lib64/libCamera_s5k3l8mipiraw_E2EHDR_Video.so +vendor/lib64/libCamera_s5k3l8mipiraw_Face_Capture.so +vendor/lib64/libCamera_s5k3l8mipiraw_Flash_Capture.so +vendor/lib64/libCamera_s5k3l8mipiraw_HDR_Capture.so +vendor/lib64/libCamera_s5k3l8mipiraw_HDR_Preview.so +vendor/lib64/libCamera_s5k3l8mipiraw_HDR_Reconfig_Preview.so +vendor/lib64/libCamera_s5k3l8mipiraw_HDR_Reconfig_Video.so +vendor/lib64/libCamera_s5k3l8mipiraw_HDR_Video.so +vendor/lib64/libCamera_s5k3l8mipiraw_N3D_Capture.so +vendor/lib64/libCamera_s5k3l8mipiraw_N3D_Preview.so +vendor/lib64/libCamera_s5k3l8mipiraw_N3D_Video.so +vendor/lib64/libCamera_s5k3l8mipiraw_P1_YUV.so +vendor/lib64/libCamera_s5k3l8mipiraw_Scene_Capture_4cell.so +vendor/lib64/libCamera_s5k3l8mipiraw_Scene_Capture.so +vendor/lib64/libCamera_s5k3l8mipiraw_Scene_Preview_4k.so +vendor/lib64/libCamera_s5k3l8mipiraw_Scene_Preview.so +vendor/lib64/libCamera_s5k3l8mipiraw_Scene_Preview_ZSD_Flash.so +vendor/lib64/libCamera_s5k3l8mipiraw_Video_1080_60.so +vendor/lib64/libCamera_s5k3l8mipiraw_Video_1080.so +vendor/lib64/libCamera_s5k3l8mipiraw_Video_4k.so +vendor/lib64/libCamera_s5k3l8mipiraw_Zoom_Preview1.so +vendor/lib64/libCamera_s5k3l8mipiraw_Zoom_Preview.so +vendor/lib64/libcam.feature_utils.so +vendor/lib64/libcam.hal3a.cctsvr.so +vendor/lib64/libcam.hal3a.log.so +vendor/lib64/libcam.hal3a.v3.ae.so +vendor/lib64/libcam.hal3a.v3.ai3a.so +vendor/lib64/libcam.hal3a.v3.awb.so +vendor/lib64/libcam.hal3a.v3.dng.so +vendor/lib64/libcam.hal3a.v3.fsmgr.so +vendor/lib64/libcam.hal3a.v3.lscMgr.so +vendor/lib64/libcam.hal3a.v3.lsctbl.50.so +vendor/lib64/libcam.hal3a.v3.nvram.50.so +vendor/lib64/libcam.hal3a.v3.platform.so +vendor/lib64/libcam.hal3a.v3.resultpool.so +vendor/lib64/libcam.hal3a.v3.so +vendor/lib64/libcam.halisp.buf.so +vendor/lib64/libcam.halisp.common.so +vendor/lib64/libcam.halisp.so +vendor/lib64/libcam.halsensor.hwintegration.so +vendor/lib64/libcam.halsensor.so +vendor/lib64/libcam.iopipe.so +vendor/lib64/libcam.isptuning.so +vendor/lib64/libcam.pdtblgen.so +vendor/lib64/libcam.tuning.cache.so +vendor/lib64/libcam.utils.sensorprovider.so +vendor/lib64/libcam.vhdr.so +vendor/lib64/libdip_drv.so +vendor/lib64/libdip_postproc.so +vendor/lib64/libeffecthal.base.so +vendor/lib64/libfeature_3dnr.so +vendor/lib64/libfeature.face.so +vendor/lib64/libfeature_fsc.so +vendor/lib64/libfeatureiodrv_mem.so +vendor/lib64/libfeature_lmv.so +vendor/lib64/libfeature_rss.so +vendor/lib64/libfeature.stereo.provider.so +vendor/lib64/libfeature.vsdof.hal.so +vendor/lib64/liblpcnr.so +vendor/lib64/libmsnr.so +vendor/lib64/libmtkcam_3rdparty.core.so +vendor/lib64/libmtkcam_3rdparty.customer.so +vendor/lib64/libmtkcam_3rdparty.mtk.so +vendor/lib64/libmtkcam_3rdparty.so +vendor/lib64/libmtkcam.atmseventmgr.so +vendor/lib64/libmtkcam_calibration_convertor.so +vendor/lib64/libmtkcam_calibration_provider.so +vendor/lib64/libmtkcam_debugutils.so +vendor/lib64/libmtkcam.debugwrapper.so +vendor/lib64/libmtkcam_device3_app.so +vendor/lib64/libmtkcam_device3_hal.so +vendor/lib64/libmtkcam_device3_hidl.so +vendor/lib64/libmtkcam_device3_hidlutils.so +vendor/lib64/libmtkcam_device3_utils.so +vendor/lib64/libmtkcam_devicesessionpolicy.so +vendor/lib64/libmtkcam_diputils.so +vendor/lib64/libmtkcam.eventcallback.so +vendor/lib64/libmtkcam_exif.so +vendor/lib64/libmtkcam_fdvt.so +vendor/lib64/libmtkcam.featurepipe.capture.so +vendor/lib64/libmtkcam.featurepipe.depthmap.so +vendor/lib64/libmtkcam.featurepipe.streaming.so +vendor/lib64/libmtkcam.featurepipe.vsdof_util.so +vendor/lib64/libmtkcam_featurepolicy.so +vendor/lib64/libmtkcam_featureutils.so +vendor/lib64/libmtkcam_fwkutils.so +vendor/lib64/libmtkcam_grallocutils.so +vendor/lib64/libmtkcam_hwnode.so +vendor/lib64/libmtkcam_hwutils.so +vendor/lib64/libmtkcam_imem.so +vendor/lib64/libmtkcam_imgbuf.so +vendor/lib64/libmtkcam.logicalmodule.so +vendor/lib64/libmtkcam_mapping_mgr.so +vendor/lib64/libmtkcam_metadata.so +vendor/lib64/libmtkcam_metastore.so +vendor/lib64/libmtkcam_mfb.so +vendor/lib64/libmtkcam_modulefactory_aaa.so +vendor/lib64/libmtkcam_modulefactory_custom.so +vendor/lib64/libmtkcam_modulefactory_drv.so +vendor/lib64/libmtkcam_modulefactory_utils.so +vendor/lib64/libmtkcam_modulehelper.so +vendor/lib64/libmtkcam_owe.so +vendor/lib64/libmtkcam_pipeline_fbm.so +vendor/lib64/libmtkcam_pipelinemodel_adapter.so +vendor/lib64/libmtkcam_pipelinemodel_capture.so +vendor/lib64/libmtkcam_pipelinemodel_isp.so +vendor/lib64/libmtkcam_pipelinemodel_session.so +vendor/lib64/libmtkcam_pipelinemodel.so +vendor/lib64/libmtkcam_pipelinemodel_utils.so +vendor/lib64/libmtkcam_pipelinemodel_zsl.so +vendor/lib64/libmtkcam_pipelinepolicy_factory.so +vendor/lib64/libmtkcam_pipelinepolicy-security.so +vendor/lib64/libmtkcam_pipelinepolicy-smvr.so +vendor/lib64/libmtkcam_pipelinepolicy.so +vendor/lib64/libmtkcam_pipeline.so +vendor/lib64/libmtkcam_prerelease.so +vendor/lib64/libmtkcam_rsc.so +vendor/lib64/libmtkcam_scenariorecorder.so +vendor/lib64/libmtkcam_stdutils.so +vendor/lib64/libmtkcam_streamutils.so +vendor/lib64/libmtkcam_synchelper.so +vendor/lib64/libmtkcam_sysutils.so +vendor/lib64/libmtkcam_tuning_utils.so +vendor/lib64/libmtkcam_ulog.so +vendor/lib64/libSonyIMX230PdafLibrary.so +vendor/lib64/libSonyIMX230PdafLibraryWrapper.so +vendor/lib64/libSonyIMX338PdafLibrary.so +vendor/lib64/libSonyIMX338PdafLibraryWrapper.so +vendor/lib64/libSonyIMX386PdafLibrary.so +vendor/lib64/libSonyIMX386PdafLibraryWrapper.so +vendor/lib64/libSonyIMX519PdafLibrary.so +vendor/lib64/libSonyIMX519PdafLibraryWrapper.so +vendor/lib64/libstereoinfoaccessor_vsdof.so +vendor/lib64/mtk000_mipi_raw_IdxMgr.so +vendor/lib64/mtk000_mipi_raw_tuning.so +vendor/lib64/mtkcam/libmtkcam_streaminfo_plugin-p1stt.so +vendor/lib64/ov50c40_mipi_raw_IdxMgr.so +vendor/lib64/ov50c40_mipi_raw_tuning.so +vendor/lib64/s5k3l8_mipi_raw_IdxMgr.so +vendor/lib64/s5k3l8_mipi_raw_tuning.so +vendor/lib64/vendor.mediatek.hardware.camera.atms@1.0.so +vendor/lib64/vendor.mediatek.hardware.camera.bgservice@1.0.so +vendor/lib64/vendor.mediatek.hardware.camera.bgservice@1.1.so +vendor/lib64/vendor.mediatek.hardware.camera.ccap@1.0.so +vendor/lib64/vendor.mediatek.hardware.camera.frhandler@1.0.so +vendor/lib64/vendor.mediatek.hardware.camera.isphal@1.0.so +vendor/lib64/vendor.mediatek.hardware.camera.isphal@1.1.so +vendor/lib64/vendor.mediatek.hardware.camera.lomoeffect@1.0.so +vendor/lib64/vendor.mediatek.hardware.camera.postproc@1.0.so +vendor/lib64/vendor.mediatek.hardware.camera.security@1.0.so + +# Certificates +vendor/etc/md/cacerts/tls/CyberTrustJapanPublicCAG3.crt +vendor/etc/md/cacerts/tls/EntrustRootCertificationAuthority.crt +vendor/etc/md/cacerts/tls/DomenySslDvCertificationAuthority.crt +vendor/etc/md/cacerts/tls/EntrustCertificationAuthorityL1K.cer +vendor/etc/md/cacerts/tls/DigiCertGlobalRootCA.crt +vendor/etc/md/cacerts/tls/CertumTrustedNetworkCA.crt +vendor/etc/md/cacerts/tls/KPN_BV_PKIoverheid_Organisatie_Server_CA-G3_2019.cer +vendor/etc/md/cacerts/tls/GoDaddyRootCertificateAuthorityG2.crt +vendor/etc/md/cacerts/tls/StaatderNederlandenOrganisatieServicesCA-G3.cer +vendor/etc/md/cacerts/tls/GoDaddySecureCertificateAuthorityG2.crt +vendor/etc/md/cacerts/tls/CertumOrganizationValidationCASHA2.crt +vendor/etc/md/cacerts/tls/certSIGN_ROOT_CA.crt +vendor/etc/md/cacerts/tls/CertumCA.crt +vendor/etc/md/cacerts/tls/StaatDerNederlandenEVRootCA.crt +vendor/etc/md/cacerts/tls/AAACertificateServices.crt +vendor/etc/md/cacerts/tls/StaatderNederlandenRootCA-G3.cer +vendor/etc/md/cacerts/tls/DigiCertGlobalRootG2.crt +vendor/etc/md/cacerts/tls/DigiCertSHA2SecureServerCA.crt +vendor/etc/md/cacerts/tls/EntrustRootCertificationAuthorityG2_root.crt +vendor/etc/md/cacerts/tls/EntrustRootCertificationAuthorityG2.crt +vendor/etc/md/cacerts/ikev2/IdenTrustCommercialRootCA1.cer +vendor/etc/md/cacerts/ikev2/VeriSignClass3G5.der +vendor/etc/md/cacerts/ikev2/DigiCertGlobalRootG3.crt +vendor/etc/md/cacerts/ikev2/Root-R3.cer +vendor/etc/md/cacerts/ikev2/GeoTrust_Primary_CA.der +vendor/etc/md/cacerts/ikev2/DigiCertGlobalRootCA.crt +vendor/etc/md/cacerts/ikev2/USERTrustRSACertificationAuthority.crt +vendor/etc/md/cacerts/ikev2/GeoTrust_PCA_G3_Root.der +vendor/etc/md/cacerts/ikev2/GoDaddyRootCertificateAuthorityG2.crt +vendor/etc/md/cacerts/ikev2/GlobalSign_root_CA.crt +vendor/etc/md/cacerts/ikev2/VeriSignClass3G4.der +vendor/etc/md/cacerts/ikev2/Entrust.net_Certification_Authority_2048.cer +vendor/etc/md/cacerts/ikev2/Root_CA_1003.crt +vendor/etc/md/cacerts/ikev2/LibertyGlobalEnterprise-Root-CA-G1.crt +vendor/etc/md/cacerts/ikev2/VeriSignUniversalRootCertification.der +vendor/etc/md/cacerts/ikev2/DigiCertGlobalRootG2.crt +vendor/etc/md/cacerts/ikev2/EntrustRootCertificationAuthorityG2_root.crt +vendor/etc/md/cacerts/ikev2/thawte.der +vendor/etc/md/cacerts/ikev2/GeoTrust_Primary_CA_G2_ECC.der +vendor/etc/security/cacerts/5a3f0ff8.0 +vendor/etc/security/cacerts/69105f4f.0 +vendor/etc/security/cacerts/9282e51c.0 +vendor/etc/security/cacerts/f013ecaf.0 +vendor/etc/security/cacerts/52b525c7.0 +vendor/etc/security/cacerts/a2c66da8.0 +vendor/etc/security/cacerts/e8651083.0 +vendor/etc/security/cacerts/d06393bb.0 +vendor/etc/security/cacerts/869fbf79.0 +vendor/etc/security/cacerts/343eb6cb.0 +vendor/etc/security/cacerts/04f60c28.0 +vendor/etc/security/cacerts/86212b19.0 +vendor/etc/security/cacerts/b936d1c6.0 +vendor/etc/security/cacerts/7a7c655d.0 +vendor/etc/security/cacerts/fb5fa911.0 +vendor/etc/security/cacerts/455f1b52.0 +vendor/etc/security/cacerts/dbff3a01.0 +vendor/etc/security/cacerts/5f47b495.0 +vendor/etc/security/cacerts/9d6523ce.0 +vendor/etc/security/cacerts/7a819ef2.0 +vendor/etc/security/cacerts/27af790d.0 +vendor/etc/security/cacerts/3e7271e8.0 +vendor/etc/security/cacerts/1e8e7201.0 +vendor/etc/security/cacerts/a81e292b.0 +vendor/etc/security/cacerts/a9d40e02.0 +vendor/etc/security/cacerts/c51c224c.0 +vendor/etc/security/cacerts/fd08c599.0 +vendor/etc/security/cacerts/d41b5e2a.0 +vendor/etc/security/cacerts/12d55845.0 +vendor/etc/security/cacerts/111e6273.0 +vendor/etc/security/cacerts/9685a493.0 +vendor/etc/security/cacerts/9479c8c3.0 +vendor/etc/security/cacerts/5cf9d536.0 +vendor/etc/security/cacerts/23f4c490.0 +vendor/etc/security/cacerts/bdacca6f.0 +vendor/etc/security/cacerts/ccc52f49.0 +vendor/etc/security/cacerts/01419da9.0 +vendor/etc/security/cacerts/304d27c3.0 +vendor/etc/security/cacerts/9aef356c.0 +vendor/etc/security/cacerts/3c899c73.0 +vendor/etc/security/cacerts/7892ad52.0 +vendor/etc/security/cacerts/d18e9066.0 +vendor/etc/security/cacerts/85cde254.0 +vendor/etc/security/cacerts/3c860d51.0 +vendor/etc/security/cacerts/4be590e0.0 +vendor/etc/security/cacerts/bd43e1dd.0 +vendor/etc/security/cacerts/bf64f35b.0 +vendor/etc/security/cacerts/f0cd152c.0 +vendor/etc/security/cacerts/88950faa.0 +vendor/etc/security/cacerts/1ae85e5e.0 +vendor/etc/security/cacerts/76579174.0 +vendor/etc/security/cacerts/33ee480d.0 +vendor/etc/security/cacerts/dbc54cab.0 +vendor/etc/security/cacerts/ed39abd0.0 +vendor/etc/security/cacerts/60afe812.0 +vendor/etc/security/cacerts/882de061.0 +vendor/etc/security/cacerts/31188b5e.0 +vendor/etc/security/cacerts/3c6676aa.0 +vendor/etc/security/cacerts/8d6437c3.0 +vendor/etc/security/cacerts/dc99f41e.0 +vendor/etc/security/cacerts/d16a5865.0 +vendor/etc/security/cacerts/a7605362.0 +vendor/etc/security/cacerts/81b9768f.0 +vendor/etc/security/cacerts/5acf816d.0 +vendor/etc/security/cacerts/ab59055e.0 +vendor/etc/security/cacerts/40dc992e.0 +vendor/etc/security/cacerts/d4c339cb.0 +vendor/etc/security/cacerts/1eb37bdf.0 +vendor/etc/security/cacerts/9339512a.0 +vendor/etc/security/cacerts/dfc0fe80.0 +vendor/etc/security/cacerts/399e7759.0 +vendor/etc/security/cacerts/5a250ea7.0 +vendor/etc/security/cacerts/3c9a4d3b.0 +vendor/etc/security/cacerts/edcbddb5.0 +vendor/etc/security/cacerts/89c02a45.0 +vendor/etc/security/cacerts/c90bc37d.0 +vendor/etc/security/cacerts/9591a472.0 +vendor/etc/security/cacerts/985c1f52.0 +vendor/etc/security/cacerts/b7db1890.0 +vendor/etc/security/cacerts/524d9b43.0 +vendor/etc/security/cacerts/da7377f6.0 +vendor/etc/security/cacerts/302904dd.0 +vendor/etc/security/cacerts/35105088.0 +vendor/etc/security/cacerts/fde84897.0 +vendor/etc/security/cacerts/9576d26b.0 +vendor/etc/security/cacerts/ab5346f4.0 +vendor/etc/security/cacerts/2d9dafe4.0 +vendor/etc/security/cacerts/0d69c7e1.0 +vendor/etc/security/cacerts/3ad48a91.0 +vendor/etc/security/cacerts/c559d742.0 +vendor/etc/security/cacerts/bc3f2570.0 +vendor/etc/security/cacerts/6187b673.0 +vendor/etc/security/cacerts/aeb67534.0 +vendor/etc/security/cacerts/b0f3e76e.0 +vendor/etc/security/cacerts/583d0756.0 +vendor/etc/security/cacerts/5046c355.0 +vendor/etc/security/cacerts/219d9499.0 +vendor/etc/security/cacerts/6b03dec0.0 +vendor/etc/security/cacerts/75680d2e.0 +vendor/etc/security/cacerts/b0ed035a.0 +vendor/etc/security/cacerts/63a2c897.0 +vendor/etc/security/cacerts/a3896b44.0 +vendor/etc/security/cacerts/82223c44.0 +vendor/etc/security/cacerts/1e1eab7c.0 +vendor/etc/security/cacerts/cb1c3204.0 +vendor/etc/security/cacerts/f459871d.0 +vendor/etc/security/cacerts/2add47b6.0 +vendor/etc/security/cacerts/10531352.0 +vendor/etc/security/cacerts/1df5a75f.0 +vendor/etc/security/cacerts/95aff9e3.0 +vendor/etc/security/cacerts/d59297b8.0 +vendor/etc/security/cacerts/e48193cf.0 +vendor/etc/security/cacerts/b872f2b4.0 +vendor/etc/security/cacerts/e442e424.0 +vendor/etc/security/cacerts/48a195d8.0 +vendor/etc/security/cacerts/d7746a63.0 +vendor/etc/security/cacerts/cf701eeb.0 +vendor/etc/security/cacerts/2fa87019.0 +vendor/etc/security/cacerts/83e9984f.0 +vendor/etc/security/cacerts/9f533518.0 +vendor/etc/security/cacerts/b3fb433b.0 +vendor/etc/security/cacerts/1f58a078.0 +vendor/etc/security/cacerts/d39b0a2c.0 +vendor/etc/security/cacerts/b74d2bd5.0 +vendor/etc/security/cacerts/c491639e.0 + +# Display +vendor/bin/hw/mt6835/android.hardware.graphics.allocator@4.0-service-mediatek.mt6835;SYMLINK=vendor/bin/hw/android.hardware.graphics.allocator@4.0-service-mediatek +vendor/bin/hw/android.hardware.graphics.composer@2.1-service +vendor/bin/hw/android.hardware.graphics.composer@3.1-service +vendor/bin/hw/vendor.mediatek.hardware.pq_aidl-service +vendor/etc/cust_pq.xml +vendor/etc/displayconfig/display_id_4627039422300187648.xml +vendor/etc/gralloc/cam.xml +vendor/etc/gralloc/dpu_aeu.xml +vendor/etc/gralloc/dpu.xml +vendor/etc/gralloc/gpu.xml +vendor/etc/gralloc/vpu.xml +vendor/etc/init/android.hardware.graphics.allocator@4.0-service-mediatek.rc +vendor/etc/init/android.hardware.graphics.composer@3.1-service.rc +vendor/etc/init/vendor.mediatek.hardware.pq_aidl-service.rc +vendor/etc/mali_platform.config +vendor/etc/vintf/manifest/manifest_hwcomposer.xml +vendor/lib/arm.graphics-V3-ndk.so +vendor/lib/egl/egl.cfg +vendor/lib/hw/android.hardware.graphics.mapper@4.0-impl-mediatek.so +vendor/lib64/arm.graphics-V3-ndk.so +vendor/lib64/android.hardware.graphics.composer@2.1-resources.so;MAKE_COPY_RULE_ONLY +vendor/lib64/android.hardware.graphics.composer@2.2-resources.so;MAKE_COPY_RULE_ONLY +vendor/lib64/egl/libGLES_mali.so;SYMLINK=vendor/lib64/hw/vulkan.mt6835.so +vendor/lib64/egl/libGLES_meow.so +vendor/lib64/egl/libMEOW_data.so +vendor/lib64/egl/libMEOW_gift.so +vendor/lib64/egl/libMEOW_qt.so +vendor/lib64/egl/libMEOW_trace.so +vendor/lib64/hw/hwcomposer.mtk_common.so +vendor/lib64/hw/android.hardware.graphics.allocator@4.0-impl-mediatek.so +vendor/lib64/hw/android.hardware.graphics.mapper@4.0-impl-mediatek.so +vendor/lib64/hw/vendor.mediatek.hardware.pq_aidl-impl.so +vendor/lib64/hw/vulkan.mali.so +vendor/lib64/libaal_cust.so +vendor/lib64/libaal_cust_func.so +vendor/lib64/libaal_key.so +vendor/lib64/libaal_mtk.so +vendor/lib64/libaalservice.so +vendor/lib64/libcomposer_ext.so +vendor/lib64/libDefaultFpsActor.so +vendor/lib64/libFrameRecord.so +vendor/lib64/libged.so +vendor/lib64/libgpu_aux.so +vendor/lib64/libgpud.so +vendor/lib64/libgralloc_extra.so +vendor/lib64/libgralloc_metadata.so +vendor/lib64/libgralloctypes_mtk.so +vendor/lib64/libion_mtk.so +vendor/lib64/libion_ulit.so +vendor/lib64/libmml.so +vendor/lib64/libNoFpsActor.so +vendor/lib64/libpq_cust_base.so +vendor/lib64/libpqframework.so +vendor/lib64/libpqhdrmetaparser.so +vendor/lib64/libpqparamparser.so +vendor/lib64/libpqsharememory.so +vendor/lib64/libpqtuning.so +vendor/lib64/libpqxmlparser.so +vendor/lib64/libudf.so +vendor/lib64/libaiselector.so +vendor/lib64/libdpframework.so +vendor/lib64/libpq_prot.so +vendor/lib64/vendor.mediatek.hardware.composer_ext@1.0.so +vendor/lib64/vendor.mediatek.hardware.mmagent@1.0.so +vendor/lib64/vendor.mediatek.hardware.mmagent@1.1.so +vendor/lib64/vendor.mediatek.hardware.pq_aidl-V1-ndk.so +vendor/lib64/vendor.mediatek.hardware.pq@2.0.so +vendor/lib64/vendor.mediatek.hardware.pq@2.1.so +vendor/lib64/vendor.mediatek.hardware.pq@2.10.so +vendor/lib64/vendor.mediatek.hardware.pq@2.11.so +vendor/lib64/vendor.mediatek.hardware.pq@2.12.so +vendor/lib64/vendor.mediatek.hardware.pq@2.13.so +vendor/lib64/vendor.mediatek.hardware.pq@2.2.so +vendor/lib64/vendor.mediatek.hardware.pq@2.3.so +vendor/lib64/vendor.mediatek.hardware.pq@2.4.so +vendor/lib64/vendor.mediatek.hardware.pq@2.5.so +vendor/lib64/vendor.mediatek.hardware.pq@2.6.so +vendor/lib64/vendor.mediatek.hardware.pq@2.7.so +vendor/lib64/vendor.mediatek.hardware.pq@2.8.so +vendor/lib64/vendor.mediatek.hardware.pq@2.9.so +vendor/lib/libged.so +vendor/lib/libgpud.so +vendor/lib/libgralloc_extra.so +vendor/lib/libgralloc_metadata.so +vendor/lib/libgralloctypes_mtk.so + +# DRM +vendor/bin/hw/android.hardware.drm-service.widevine +vendor/etc/init/android.hardware.drm-service.widevine.rc +vendor/etc/vintf/manifest/manifest_android.hardware.drm-service.widevine.xml +vendor/lib64/libwvaidl.so + +# DRVB +vendor/lib/libmtk_drvb.so +vendor/lib64/libmtk_drvb.so + +# Fingerprint +vendor/lib64/hw/fingerprint.default.so;FIX_SONAME + +# Firmware +vendor/firmware/aw87xxx_acf.bin +vendor/firmware/BT_FW.cfg +vendor/firmware/fm_cust.cfg +vendor/firmware/mt6627_fm_v1_coeff.bin +vendor/firmware/mt6627_fm_v1_patch.bin +vendor/firmware/mt6630_fm_v1_coeff.bin +vendor/firmware/mt6630_fm_v1_patch.bin +vendor/firmware/mt6630_fm_v2_coeff.bin +vendor/firmware/mt6630_fm_v2_coeff_tx.bin +vendor/firmware/mt6630_fm_v2_patch.bin +vendor/firmware/mt6630_fm_v2_patch_tx.bin +vendor/firmware/mt6631_fm_v1_coeff.bin +vendor/firmware/mt6631_fm_v1_patch.bin +vendor/firmware/mt6632_fm_v1_coeff.bin +vendor/firmware/mt6632_fm_v1_patch.bin +vendor/firmware/mt6635_fm_v1_coeff.bin +vendor/firmware/mt6635_fm_v1_patch.bin +vendor/firmware/remoteproc_scp +vendor/firmware/sec_s3nrn4v_firmware.bin +vendor/firmware/soc_fm_v1_coeff.bin +vendor/firmware/soc_fm_v1_patch.bin +vendor/firmware/wifi.cfg +vendor/firmware/WMT_SOC.cfg + +# FM +vendor/etc/init/init.fmradio_drv.rc + +# Fuelgauge +vendor/bin/fuelgauged +vendor/bin/fuelgauged_nvram +vendor/etc/init/fuelgauged_init.rc +vendor/etc/init/fuelgauged_nvram_init.rc +vendor/lib64/libfgauge_gm30.so + +# Gatekeeper +vendor/lib64/hw/android.hardware.gatekeeper@1.0-impl.so +vendor/lib64/hw/libMcGatekeeper.so;SYMLINK=vendor/lib64/hw/gatekeeper.trustonic.so +vendor/lib64/hw/libSoftGatekeeper.so;SYMLINK=vendor/lib64/hw/gatekeeper.default.so + +# GNSS +vendor/bin/gps_dump +vendor/bin/hw/android.hardware.gnss-service.mediatek +vendor/bin/hw/vendor.mediatek.hardware.gnss.batching-service +vendor/bin/mnld +vendor/bin/mtk_agpsd +vendor/etc/gnss/agps_profiles_conf2.xml:vendor/etc/agps_profiles_conf2.xml +vendor/etc/gnss/carrier/agps_profiles_conf2_carrier_ATnT_Mexico.xml +vendor/etc/gnss/carrier/agps_profiles_conf2_carrier_ATnT_US.xml +vendor/etc/gnss/carrier/agps_profiles_conf2_carrier_Claro_Peru.xml +vendor/etc/gnss/carrier/agps_profiles_conf2_carrier_Entel_Peru.xml +vendor/etc/gnss/carrier/agps_profiles_conf2_carrier_KDDI.xml +vendor/etc/gnss/carrier/agps_profiles_conf2_carrier_SK_Telecom.xml +vendor/etc/gnss/carrier/agps_profiles_conf2_carrier_SoftBank.xml +vendor/etc/gnss/carrier/agps_profiles_conf2_carrier_Sprint.xml +vendor/etc/gnss/carrier/agps_profiles_conf2_carrier_Test_SIM1.xml +vendor/etc/gnss/carrier/agps_profiles_conf2_carrier_Test_SIM2.xml +vendor/etc/gnss/carrier/agps_profiles_conf2_carrier_T-Mobile_US.xml +vendor/etc/gnss/carrier/agps_profiles_conf2_carrier_Verizon_Wireless.xml +vendor/etc/init/android.hardware.gnss-service.mediatek.rc +vendor/etc/init/init.gps_drv.rc +vendor/etc/init/init.gps_pwr.rc +vendor/etc/init/mtk_agpsd_p.rc +vendor/etc/init/mtkgnss-batching.rc +vendor/etc/MNL_Config.xml +vendor/etc/mpe.conf +vendor/etc/slp_conf +vendor/etc/vintf/manifest/gnss@2.1-service-mediatek.xml +vendor/etc/vintf/manifest/gnss-default.xml:vendor/etc/vintf/manifest/gnss-mtk.xml +vendor/lib64/hw/android.hardware.gnss@2.1-impl-mediatek.so +vendor/lib64/hw/android.hardware.gnss-impl-mediatek.so +vendor/lib64/hw/gps.default.so +vendor/lib64/librpc.so +vendor/lib64/libviagpsrpc.so +vendor/lib64/libDR.so +vendor/lib64/libmnl.so +vendor/lib64/vendor.mediatek.hardware.gnss.batching-V1-ndk.so + +# IMS +system_ext/bin/vtservice +system_ext/etc/init/init.vtservice.rc +system_ext/framework/mediatek-common.jar +system_ext/framework/mediatek-framework.jar +system_ext/framework/mediatek-ims-base.jar +system_ext/framework/mediatek-ims-common.jar +system_ext/framework/mediatek-ims-extension-plugin.jar +system_ext/framework/mediatek-telecom-common.jar +system_ext/framework/mediatek-telephony-base.jar +system_ext/framework/mediatek-telephony-common.jar +system_ext/lib64/libcomutils.so +system_ext/lib64/libimsma.so;DISABLE_CHECKELF +system_ext/lib64/libimsma_adapt.so +system_ext/lib64/libimsma_rtp.so +system_ext/lib64/libimsma_socketwrapper.so +system_ext/lib64/libmtk_vt_service.so +system_ext/lib64/libmtk_vt_wrapper.so +system_ext/lib64/libsignal.so +system_ext/lib64/libsink.so +system_ext/lib64/libsource.so +system_ext/lib64/libvcodec_cap.so +system_ext/lib64/libvcodec_capenc.so +system_ext/lib64/libvt_avsync.so +system_ext/lib64/vendor.mediatek.hardware.videotelephony-V1-ndk.so +system_ext/lib64/vendor.mediatek.hardware.videotelephony@1.0.so +system_ext/priv-app/ImsService/ImsService.apk + +# Init +vendor/bin/init.insmod.sh +vendor/etc/init.insmod.mt6835.cfg + +# Ladder +vendor/lib/libladder.so +vendor/lib64/libladder.so + +# Media +vendor/bin/vpud +vendor/lib/libapu_mdw_batch.so +vendor/lib/libapu_mdw.so +vendor/lib/libcapctrl.so +vendor/lib/libh264dec_customize.so +vendor/lib/libh264dec_sa.ca7.so;DISABLE_CHECKELF +vendor/lib/libh264dec_sd.ca7.so;DISABLE_CHECKELF +vendor/lib/libh264dec_se.ca7.so;DISABLE_CHECKELF +vendor/lib/libh264enc_sa.ca7.so;DISABLE_CHECKELF +vendor/lib/libHEVCdec_sa.ca7.android.so;DISABLE_CHECKELF +vendor/lib/libhevce_sb.ca7.android.so;DISABLE_CHECKELF +vendor/lib/libion_mtk.so +vendor/lib/libion_ulit.so +vendor/lib/libjpeg-alpha_vendor.so +vendor/lib/libjpeg-alpha-oal_vendor.so +vendor/lib/libJpgEncPipe.so +vendor/lib/libmp4enc_sa.ca7.so;DISABLE_CHECKELF +vendor/lib/libmp4enc_xa.ca7.so;DISABLE_CHECKELF +vendor/lib/libvcodec_oal.so;DISABLE_DEPS +vendor/lib/libvcodec_utility_plat.mt6835.so +vendor/lib/libvcodec_utility.so +vendor/lib/libvcodecdrv_header_stub.so +vendor/lib/libvcodecdrv.so +vendor/lib/libvp8dec_sa.ca7.so;DISABLE_CHECKELF +vendor/lib/libvp8enc_sa.ca7.so;DISABLE_CHECKELF +vendor/lib/libvp9dec_sa.ca7.so;DISABLE_CHECKELF +vendor/lib/libvpu5.so +vendor/lib/libvpud_vcodec.so +vendor/lib64/libapu_mdw_batch.so +vendor/lib64/libapu_mdw.so +vendor/lib64/libcapctrl.so +vendor/lib64/libhevce_sb.ca7.android.so +vendor/lib64/libicd_decoder.so +vendor/lib64/libimageio_plat_drv.so +vendor/lib64/libimageio_plat_pipe.so +vendor/lib64/libimageio.so +vendor/lib64/libjpeg-alpha_vendor.so +vendor/lib64/libjpeg-alpha-oal_vendor.so +vendor/lib64/libJpgEncPipe.so +vendor/lib64/libvcodec_oal.so +vendor/lib64/libvcodecdrv_header_stub.so +vendor/lib64/libvpu5.so + +# Media (c2) +vendor/bin/hw/android.hardware.media.c2@1.2-mediatek-64b +vendor/etc/init/android.hardware.media.c2@1.2-mediatek-64b.rc +vendor/etc/mtk_platform_codecs_config.xml +vendor/etc/seccomp_policy/android.hardware.media.c2@1.2-extended-seccomp-policy +vendor/etc/seccomp_policy/android.hardware.media.c2@1.2-mediatek-seccomp-policy +vendor/etc/seccomp_policy/mediacodec.policy +vendor/etc/seccomp_policy/mediaextractor.policy +vendor/etc/seccomp_policy/mediaswcodec.policy +vendor/etc/vintf/manifest/manifest_media_c2_V1_1_default.xml +vendor/lib64/libadpcmdec_mtk.so +vendor/lib64/libalacdec_mtk.so +vendor/lib64/libcodec2_mtk_c2store.so +vendor/lib64/libcodec2_mtk_vdec.so +vendor/lib64/libcodec2_mtk_venc.so +vendor/lib64/libcodec2_soft_mtk_alacdec.so +vendor/lib64/libcodec2_soft_mtk_imaadpcmdec.so +vendor/lib64/libcodec2_soft_mtk_mp3dec.so +vendor/lib64/libcodec2_soft_mtk_msadpcmdec.so +vendor/lib64/libcodec2_vpp_mi_plugin.so +vendor/lib64/libcodec2_vpp_qt_plugin.so +vendor/lib64/libcodec2_vpp_rs_plugin.so +vendor/lib64/libformatter.so +vendor/lib64/libmp3dec_mtk.so + +# MMS +vendor/bin/hw/vendor.mediatek.hardware.mms@1.7-service +vendor/etc/init/vendor.mediatek.hardware.mms@1.7-service.rc +vendor/lib64/hw/vendor.mediatek.hardware.mms@1.7-impl.so +vendor/lib64/vendor.mediatek.hardware.mms@1.0.so +vendor/lib64/vendor.mediatek.hardware.mms@1.1.so +vendor/lib64/vendor.mediatek.hardware.mms@1.2.so +vendor/lib64/vendor.mediatek.hardware.mms@1.3.so +vendor/lib64/vendor.mediatek.hardware.mms@1.4.so +vendor/lib64/vendor.mediatek.hardware.mms@1.5.so +vendor/lib64/vendor.mediatek.hardware.mms@1.6.so +vendor/lib64/vendor.mediatek.hardware.mms@1.7.so + +# NFC +vendor/bin/hw/android.hardware.nfc@1.2-service.sec +vendor/etc/init/android.hardware.nfc@1.2-service.sec.rc +vendor/etc/libnfc-nci.conf +vendor/etc/libnfc-sec-vendor.conf +vendor/etc/sec_s3nrn4v_hwreg.bin +vendor/etc/sec_s3nrn4v_swreg.bin +vendor/etc/vintf/manifest/android.hardware.nfc@1.2-service.sec.xml +vendor/lib64/nfc_nci_sec.so + +# NVRAM +vendor/bin/hw/vendor.mediatek.hardware.nvram@1.1-service +vendor/bin/nvram_daemon +vendor/etc/init/nvram_daemon.rc +vendor/etc/init/vendor.mediatek.hardware.nvram@1.1-sevice.rc +vendor/lib/libcustom_nvram.so +vendor/lib/libfile_op.so +vendor/lib/libnvram_sec.so +vendor/lib/libnvram.so +vendor/lib/vendor.mediatek.hardware.nvram@1.0.so +vendor/lib/vendor.mediatek.hardware.nvram@1.1.so +vendor/lib64/hw/vendor.mediatek.hardware.nvram@1.1-impl.so +vendor/lib64/libconnfem.so +vendor/lib64/libcustom_nvram.so +vendor/lib64/libfile_op.so +vendor/lib64/libnvram_sec.so +vendor/lib64/libnvram.so +vendor/lib64/vendor.mediatek.hardware.nvram@1.0.so +vendor/lib64/vendor.mediatek.hardware.nvram@1.1.so + +# Perf +vendor/bin/hw/vendor.mediatek.hardware.mtkpower@1.0-service +vendor/bin/touch_boost +vendor/etc/init/bootperf.rc +vendor/etc/init/touch_boost.rc +vendor/etc/init/vendor.mediatek.hardware.mtkpower@1.0-init.rc +vendor/etc/init/vendor.mediatek.hardware.mtkpower@1.0-service.rc +vendor/etc/nnapi_powerhal.json +vendor/etc/power_app_cfg.xml +vendor/etc/powercontable.xml +vendor/etc/powerscntbl.xml +vendor/etc/task_profiles.json +vendor/lib64/android.hardware.power-service-mediatek.so +vendor/lib64/hw/power.default.so +vendor/lib64/hw/vendor.mediatek.hardware.mtkpower@1.2-impl.so +vendor/lib64/libmtkperf_client_vendor.so +vendor/lib64/libperfctl_vendor.so +vendor/lib64/libpower_timer.so +vendor/lib64/libpowerhal.so +vendor/lib64/vendor.mediatek.hardware.power@2.0.so + +# Radio +vendor/bin/ccci_mdinit +vendor/bin/ccci_rpcd +vendor/bin/gsm0710muxd +vendor/bin/hw/mtkfusionrild +vendor/etc/ecc_list_OP01.xml +vendor/etc/ecc_list_OP02.xml +vendor/etc/ecc_list_OP09.xml +vendor/etc/ecc_list_OP12.xml +vendor/etc/ecc_list_OP17.xml +vendor/etc/ecc_list_OP18.xml +vendor/etc/ecc_list_OP20.xml +vendor/etc/ecc_list_OP236.xml +vendor/etc/ecc_list_preference.xml +vendor/etc/ecc_list.xml +vendor/etc/init/gsm0710muxd.rc +vendor/etc/init/init.cccifsd.rc +vendor/etc/init/init.cccimdinit.rc +vendor/etc/init/init.cccirpcd.rc +vendor/etc/init/mtkrild.rc +vendor/etc/init/muxreport.rc +vendor/etc/special_pws_channel.xml +vendor/etc/vendor-apns-conf.xml +vendor/etc/virtual-spn-conf-by-efgid1.xml +vendor/etc/virtual-spn-conf-by-efpnn.xml +vendor/etc/virtual-spn-conf-by-efspn.xml +vendor/etc/virtual-spn-conf-by-imsi.xml +vendor/lib/libmtkcutils.so +vendor/lib/libmtkproperty.so +vendor/lib/libmtkrillog.so +vendor/lib64/libcares_naptr.so +vendor/lib64/libcarrierconfig.so +vendor/lib64/libccci_util.so +vendor/lib64/libmipc.so +vendor/lib64/libmnetlink_v104.so +vendor/lib64/libmtk-fusion-ril-prop-vsim.so +vendor/lib64/libmtk-ril.so +vendor/lib64/libmtkares.so +vendor/lib64/libmtkconfig.so +vendor/lib64/libmtkconfigutils.so +vendor/lib64/libmtkcutils.so +vendor/lib64/libmtkhardware_legacy.so +vendor/lib64/libmtkmipc-ril.so +vendor/lib64/libmtknetcap.so +vendor/lib64/libmtknetutils.so +vendor/lib64/libmtkproperty.so +vendor/lib64/libmtkrillog.so +vendor/lib64/libmtkrilutils.so +vendor/lib64/libmtksysutils.so +vendor/lib64/libmtktinyxml.so +vendor/lib64/libmtkutils.so +vendor/lib64/libratconfig.so +vendor/lib64/librilfusion.so +vendor/lib64/libstorage_otp.so +vendor/lib64/libsysenv.so +vendor/lib64/libtrm.so +vendor/lib64/libwpfa.so +vendor/lib64/vendor.mediatek.hardware.mtkradioex.assist-V1-ndk.so +vendor/lib64/vendor.mediatek.hardware.mtkradioex.atci-V1-ndk.so +vendor/lib64/vendor.mediatek.hardware.mtkradioex.cap-V1-ndk.so +vendor/lib64/vendor.mediatek.hardware.mtkradioex.data-V1-ndk.so +vendor/lib64/vendor.mediatek.hardware.mtkradioex.em-V1-ndk.so +vendor/lib64/vendor.mediatek.hardware.mtkradioex.ims-V1-ndk.so +vendor/lib64/vendor.mediatek.hardware.mtkradioex.messaging-V1-ndk.so +vendor/lib64/vendor.mediatek.hardware.mtkradioex.modem-V1-ndk.so +vendor/lib64/vendor.mediatek.hardware.mtkradioex.mwi-V1-ndk.so +vendor/lib64/vendor.mediatek.hardware.mtkradioex.network-V1-ndk.so +vendor/lib64/vendor.mediatek.hardware.mtkradioex.rcs-V1-ndk.so +vendor/lib64/vendor.mediatek.hardware.mtkradioex.rsu-V1-ndk.so +vendor/lib64/vendor.mediatek.hardware.mtkradioex.se-V1-ndk.so +vendor/lib64/vendor.mediatek.hardware.mtkradioex.sim-V1-ndk.so +vendor/lib64/vendor.mediatek.hardware.mtkradioex.smartratswitch-V1-ndk.so +vendor/lib64/vendor.mediatek.hardware.mtkradioex.voice-V1-ndk.so + +# Radio (volte) +vendor/bin/hw/vtservice_hidl +vendor/bin/ipsec_mon +vendor/bin/rcs_volte_stack +vendor/bin/rcs_volte_stack64 +vendor/bin/volte_clientapi_ua +vendor/bin/volte_rcs_ua +vendor/bin/volte_rcs_ua64 +vendor/etc/init/init.vtservice_hidl.rc +vendor/etc/init/ipsec_mon.rc +vendor/etc/init/volte_clientapi_ua.rc +vendor/lib/hw/vendor.mediatek.hardware.videotelephony@1.0-impl.so +vendor/lib/libipsec_ims_shr.so +vendor/lib/librcs_interface.so +vendor/lib/librcs_volte_core.so +vendor/lib/vendor.mediatek.hardware.rcs@2.0.so +vendor/lib/vendor.mediatek.hardware.videotelephony@1.0.so;MODULE_SUFFIX=_vendor +vendor/lib64/hw/vendor.mediatek.hardware.videotelephony@1.0-impl.so +vendor/lib64/libipsec_ims_shr.so +vendor/lib64/librcs_interface.so +vendor/lib64/librcs_volte_core.so +vendor/lib64/vendor.mediatek.hardware.clientapi@1.0.so +vendor/lib64/vendor.mediatek.hardware.rcs@2.0.so +vendor/lib64/vendor.mediatek.hardware.videotelephony@1.0.so + +# Secure Element +vendor/bin/hw/android.hardware.secure_element@1.2-service-mediatek +vendor/etc/init/android.hardware.secure_element@1.2-service-mediatek.rc + +# Sensors +vendor/etc/sensors/hals.conf +vendor/lib64/hw/android.hardware.sensors@2.X-subhal-mediatek.so +vendor/lib64/hw/sensors.dynamic_sensor_hal.so +vendor/lib64/hw/sensors.mediatek.V2.0.so;SYMLINK=vendor/lib64/hw/sensors.mt6835.so +vendor/lib64/libhfmanager.so +vendor/lib64/libhwm.so +vendor/lib64/libksensor.so + +# Tether Offload +vendor/bin/hw/tetheroffloadservice +vendor/bin/netdagent +vendor/etc/init/netdagent.rc +vendor/etc/init/tetheroffloadservice.rc +vendor/lib64/libforkexecwrap.so +vendor/lib64/libifcutils_mtk.so +vendor/lib64/vendor.mediatek.hardware.netdagent@1.0.so + +# Thermal +vendor/bin/hw/android.hardware.thermal@2.0-service.mtk +vendor/bin/thermal_core +vendor/etc/fstb.cfg +vendor/etc/gbe.cfg +vendor/etc/xgf.cfg +vendor/etc/init/android.hardware.thermal@2.0-service.mtk.rc +vendor/etc/init/init.thermal_core.rc +vendor/lib64/hw/android.hardware.thermal@2.0-impl.so +vendor/lib64/hw/thermal_hal.so + +# Trusted Execution Environment (TEE) +vendor/app/mcRegistry/020f0000000000000000000000000000.drbin +vendor/app/mcRegistry/020f0000000000000000000000000000.tlbin +vendor/app/mcRegistry/031c0000000000000000000000000000.drbin +vendor/app/mcRegistry/031c0000000000000000000000000000.tlbin +vendor/app/mcRegistry/04010000000000000000000000003545.tabin +vendor/app/mcRegistry/05120000000000000000000000000001.drbin +vendor/app/mcRegistry/05120000000000000000000000000001.tlbin +vendor/app/mcRegistry/06090000000000000000000000000000.drbin +vendor/app/mcRegistry/06090000000000000000000000000000.tlbin +vendor/app/mcRegistry/07050000000000000000000000003545.drbin +vendor/app/mcRegistry/07050000000000000000000000003545.tlbin +vendor/app/mcRegistry/0706000000000000000000000000004d.tlbin +vendor/app/mcRegistry/07061000000000000000000000000000.tlbin +vendor/app/mcRegistry/07170000000000000000000000000000.drbin +vendor/app/mcRegistry/07170000000000000000000000000000.tlbin +vendor/app/mcRegistry/08030000000000000000000000000000.tabin +vendor/app/mcRegistry/08040000000000000000000000003419.tabin +vendor/app/mcRegistry/08050000000000000000000000003419.drbin +vendor/app/mcRegistry/08050000000000000000000000003419.tlbin +vendor/app/mcRegistry/08110000000000000000000000000000.tabin +vendor/app/mcRegistry/40188311faf343488db888ad39496f9a.drbin +vendor/app/mcRegistry/40188311faf343488db888ad39496f9a.tlbin +vendor/app/mcRegistry/5020170115e016302017012521300000.drbin +vendor/app/mcRegistry/5020170115e016302017012521300000.tlbin +vendor/app/mcRegistry/abcd270ea5c44c58bcd3384a2fa2539e.tabin +vendor/app/mcRegistry/e97c270ea5c44c58bcd3384a2fa2539e.tabin +vendor/bin/hw/android.hardware.security.keymint@2.0-service.trustonic +vendor/bin/mcDriverDaemon +vendor/etc/init/android.hardware.security.keymint@2.0-service.trustonic.rc +vendor/etc/init/tee.rc +vendor/etc/init/trustonic.rc +vendor/etc/vintf/manifest/android.hardware.security.keymint-service.trustonic.xml +vendor/etc/vintf/manifest/android.hardware.security.secureclock-service.trustonic.xml +vendor/etc/vintf/manifest/android.hardware.security.sharedsecret-service.trustonic.xml +vendor/lib/libthha.so;DISABLE_CHECKELF +vendor/lib64/libMcClient.so +vendor/lib64/libTEECommon.so +vendor/lib64/libthha.so + +# # USB +# vendor/bin/hw/android.hardware.usb-aidl-service.mediatekv1.0 +vendor/bin/hw/android.hardware.usb.gadget-service.mediatekv1.1 +# vendor/etc/init/android.hardware.usb-aidl-service.mediatek.rc +vendor/etc/init/android.hardware.usb.gadget-service.mediatek.rc +# vendor/etc/vintf/manifest/android.hardware.usb-aidl-service.mediatek.xml +vendor/etc/vintf/manifest/android.hardware.usb.gadget-service.mediatek.xml + +# Wi-Fi +vendor/bin/wlan_assistant +vendor/bin/wmt_launcher +vendor/bin/wmt_loader +vendor/etc/init/wlan_assistant.rc +vendor/etc/init/init.connfem.rc +vendor/etc/init/init.wlan_drv.rc +vendor/etc/init/init.wmt_drv.rc +vendor/lib64/libwifi-hal.so:vendor/lib64/libwifi-hal-mtk.so;FIX_SONAME + +# vendor/etc/init/init.connfem.rc +# vendor/bin/wlan_assistant +# vendor/bin/wmt_launcher +# vendor/bin/wmt_loader +# vendor/etc/init/init.wlan_drv.rc +# vendor/etc/init/init.wmt_drv.rc +# vendor/etc/init/wlan_assistant.rc +# vendor/lib64/libapmonitor_vendor.so +# #vendor/lib64/libconnfem.so +# vendor/lib64/libwifi-hal.so:vendor/lib64/libwifi-hal-mtk.so;FIX_SONAME +# vendor/lib64/libwifitest.so +# #vendor/lib64/libwpfa.so +# vendor/lib64/vendor.mediatek.hardware.apmonitor@2.0.so + + +# vendor/bin/meta_tst +# vendor/etc/apdb/APDB_MT6835___W2421_ENUM +# vendor/etc/apdb/APDB_MT6835___W2421 +# vendor/lib64/libhfmanagerwrapper.so +# vendor/lib64/libwifinvram.so +# vendor/lib64/libkmsetkey.so +# vendor/lib64/libwifical.so +# vendor/etc/init/hw/meta_init.rc +# vendor/etc/init/hw/factory_init.connectivity.rc +# vendor/etc/init/hw/factory_init.rc +# vendor/etc/init/hw/meta_init.connectivity.rc +# vendor/etc/init/hw/factory_init.project.rc +# vendor/etc/init/hw/meta_init.project.rc +# vendor/etc/init/hw/meta_init.vendor.rc +# vendor/etc/init/hw/multi_init.rc +# vendor/etc/init/hw/meta_init.modem.rc +# vendor/etc/init/hw/meta_init.connectivity.common.rc +# vendor/etc/init/hw/factory_init.connectivity.common.rc + + +# vendor/bin/factory +# vendor/lib64/libacdk.so +# vendor/lib64/libminiui.so +# vendor/lib64/libpixelflinger.so +# vendor/lib64/libfft_vendor.so +# vendor/lib64/libaudiotoolkit_vendor.so +# vendor/lib64/libaudio_param_parser-vnd.so +# vendor/lib64/libaudiocustparam_vendor.so +# vendor/lib64/libaudioprimarydevicehalifclient.so +# system_ext/etc/init/hw/vendor_init_as_system.rc +# system_ext/etc/init/hw/meta_init.system.rc +# vendor/bin/uart_launcher + +# vendor/etc/init/lbs_hidl_service.rc +# vendor/etc/vintf/manifest/lbs_hidl_service@1.0.xml +# vendor/bin/lbs_hidl_service +# vendor/lib64/vendor.mediatek.hardware.lbs@1.0.so +# vendor/lib64/lbs_hidl_service-impl.so + +# system_ext/app/DebugLoggerUI/DebugLoggerUI.apk +# system_ext/bin/connsyslogger +# system_ext/bin/emdlogger +# system_ext/bin/mdlogger +# system_ext/bin/mobile_log_d +# system_ext/bin/netdiag +# system_ext/bin/trace +# system_ext/etc/init/consyslogger.rc +# system_ext/etc/init/emdlogger.rc +# system_ext/etc/init/mdlogger.rc +# system_ext/etc/init/mobile_log_d.rc +# system_ext/etc/init/netdiag.rc +# system_ext/etc/mtklog-config.prop +# system_ext/framework/log-handler.jar +# system_ext/lib64/libaed.so +# system_ext/lib64/libccci_util_sys.so +# system_ext/lib64/libcompress.so +# system_ext/lib64/libmdloggerrecycle.so +# system_ext/lib64/libmediatek_exceptionlog.so +# system_ext/lib64/libmemoryDumpEncoder.so +# system_ext/lib64/libpcap_bak.so +# system_ext/lib64/vendor.mediatek.hardware.log@1.0.so +# system_ext/lib64/vendor.mediatek.hardware.log-V1-ndk.so +# system_ext/bin/loghidlsysservice +# system_ext/etc/init/loghidlsysservice.rc + +# system_ext/app/EngineerMode/EngineerMode.apk +# system_ext/lib/libem_support_jni.so +# system_ext/lib64/libem_support_jni.so +# system_ext/lib/libaudiotoolkit.so +# system_ext/lib/libem_aoltest_jni.so +# system_ext/lib/libem_audio_jni.so +# system_ext/lib/libem_wifi_jni.so +# system_ext/lib64/libaudiotoolkit.so +# system_ext/lib64/libem_aoltest_jni.so +# system_ext/lib64/libem_audio_jni.so +# system_ext/lib64/libem_wifi_jni.so +# system_ext/etc/init/em_svr_user.rc +# system_ext/bin/em_svr +# system_ext/lib/libsysenv_system.so +# system_ext/lib64/libsysenv_system.so diff --git a/proprietary-firmware.txt b/proprietary-firmware.txt new file mode 100644 index 0000000..6382672 --- /dev/null +++ b/proprietary-firmware.txt @@ -0,0 +1,14 @@ +connsys_bt.img;AB +dpm.img;AB +gz.img;AB +lk.img;AB +logo.img;AB +mcf_ota.img;AB +mcupm.img;AB +md1img.img;AB +pi_img.img;AB +scp.img;AB +spmfw.img;AB +sspm.img;AB +tee.img;AB +vcp.img diff --git a/sepolicy/vendor/cameraserver.te b/sepolicy/vendor/cameraserver.te new file mode 100644 index 0000000..0f6b550 --- /dev/null +++ b/sepolicy/vendor/cameraserver.te @@ -0,0 +1 @@ +get_prop(cameraserver, vendor_persist_camera_prop) diff --git a/sepolicy/vendor/ccci_mdinit.te b/sepolicy/vendor/ccci_mdinit.te new file mode 100644 index 0000000..1e8c6f0 --- /dev/null +++ b/sepolicy/vendor/ccci_mdinit.te @@ -0,0 +1 @@ +allow ccci_mdinit mcf_ota_file:dir r_dir_perms; diff --git a/sepolicy/vendor/ccci_rpcd.te b/sepolicy/vendor/ccci_rpcd.te new file mode 100644 index 0000000..c57531b --- /dev/null +++ b/sepolicy/vendor/ccci_rpcd.te @@ -0,0 +1 @@ +allow ccci_rpcd para_block_device:blk_file rw_file_perms_no_map; diff --git a/sepolicy/vendor/device.te b/sepolicy/vendor/device.te new file mode 100644 index 0000000..d9ec35d --- /dev/null +++ b/sepolicy/vendor/device.te @@ -0,0 +1,4 @@ +type connsys_bt_block_device, dev_type; +type connsys_wifi_block_device, dev_type; +type connsys_gnss_block_device, dev_type; +type init_boot_block_device, dev_type; diff --git a/sepolicy/vendor/file.te b/sepolicy/vendor/file.te new file mode 100644 index 0000000..77c0cc4 --- /dev/null +++ b/sepolicy/vendor/file.te @@ -0,0 +1,5 @@ +type proc_powerhal_cpu_ctrl, fs_type, proc_type; +type proc_touch_boost, fs_type, proc_type; +type proc_core_ctl, fs_type, proc_type; +type sysfs_thermal_efuse, fs_type, sysfs_type; +type sysfs_charging_control, fs_type, sysfs_type; diff --git a/sepolicy/vendor/file_contexts b/sepolicy/vendor/file_contexts new file mode 100644 index 0000000..fa75e0e --- /dev/null +++ b/sepolicy/vendor/file_contexts @@ -0,0 +1,29 @@ + +/dev/focaltech_fp u:object_r:ff_device:s0 +/data/vendor/focaltech(/.*)? u:object_r:ff_data_file:s0 +/vendor/bin/hw/vendor\.focaltech\.hardware\.biometrics\.fingerprint@1\.0-service u:object_r:hal_fingerprint_default_exec:s0 +/vendor/bin/hw/android\.hardware\.security\.keymint@2\.0-service\.trustonic u:object_r:hal_keymint_default_exec:s0 +/vendor/bin/hw/android\.hardware\.usb-aidl-service\.mediatekv1\.0 u:object_r:mtk_hal_usb_exec:s0 +/vendor/bin/hw/android\.hardware\.usb\.gadget-service\.mediatekv1\.1 u:object_r:mtk_hal_usb_exec:s0 +/vendor/bin/hw/android\.hardware\.drm-service\.widevine u:object_r:hal_drm_widevine_exec:s0 +/vendor/bin/hw/vendor\.mediatek\.hardware\.pq_aidl-service u:object_r:mtk_hal_pq_exec:s0 +/vendor/lib64/vendor\.mediatek\.hardware\.pq_aidl-V[0-9]+-ndk\.so u:object_r:same_process_hal_file:s0 +/vendor/lib64/vendor\.mediatek\.hardware\.pq@[0-9]+\.[0-9]+\.so u:object_r:same_process_hal_file:s0 +/vendor/lib64/vendor\.mediatek\.hardware\.mmagent@[0-9]\.[0-9]\.so u:object_r:same_process_hal_file:s0 +/vendor/lib(64)?/arm\.graphics-V[0-9]+-ndk\.so u:object_r:same_process_hal_file:s0 +/vendor/lib(64)?/mt[0-9]+[a-z]*/arm\.graphics-V[0-9]+-ndk\.so u:object_r:same_process_hal_file:s0 +/vendor/lib64/libaedv\.so u:object_r:same_process_hal_file:s0 +/vendor/lib64/libpqsharememory\.so u:object_r:same_process_hal_file:s0 +/vendor/lib64/libpqtuning\.so u:object_r:same_process_hal_file:s0 +/vendor/lib64/libpqhdrmetaparser\.so u:object_r:same_process_hal_file:s0 +/dev/ttyCMIPC5 u:object_r:gsm0710muxd_device:s0 +/(vendor|system/vendor)/bin/touch_boost u:object_r:touch_boost_exec:s0 + +/dev/block/by-name/connsys_bt(_[ab])? u:object_r:connsys_bt_block_device:s0 +/dev/block/by-name/connsys_wifi(_[ab])? u:object_r:connsys_wifi_block_device:s0 +/dev/block/by-name/connsys_gnss(_[ab])? u:object_r:connsys_gnss_block_device:s0 +/dev/block/by-name/init_boot(_[ab])? u:object_r:init_boot_block_device:s0 + +# SEC NFC +/(vendor|system/vendor)/bin/hw/android\.hardware\.nfc@1\.2-service.sec u:object_r:hal_nfc_default_exec:s0 +/dev/sec-nfc u:object_r:nfc_device:s0 diff --git a/sepolicy/vendor/fsck.te b/sepolicy/vendor/fsck.te new file mode 100644 index 0000000..5178f8e --- /dev/null +++ b/sepolicy/vendor/fsck.te @@ -0,0 +1 @@ +allow fsck_untrusted sysfs_devices_block:dir search; diff --git a/sepolicy/vendor/fuelgauged_nvram.te b/sepolicy/vendor/fuelgauged_nvram.te new file mode 100644 index 0000000..2c9e34e --- /dev/null +++ b/sepolicy/vendor/fuelgauged_nvram.te @@ -0,0 +1,2 @@ +allow fuelgauged_nvram sysfs_dt_firmware_android:dir r_dir_perms; +allow fuelgauged_nvram sysfs_dt_firmware_android:file r_file_perms; diff --git a/sepolicy/vendor/genfs_contexts b/sepolicy/vendor/genfs_contexts new file mode 100644 index 0000000..81234e5 --- /dev/null +++ b/sepolicy/vendor/genfs_contexts @@ -0,0 +1,62 @@ +genfscon sysfs /devices/platform/soc/soc:regulator-vibrator/leds/vibrator u:object_r:sysfs_vibrator:s0 +genfscon sysfs /devices/platform/soc/1c804000.spmi/spmi-0/0-04/mt6377-gauge/power_supply/ u:object_r:sysfs_batteryinfo:s0 +genfscon sysfs /devices/platform/soc/11b21000.i2c/i2c-5/5-006b/power_supply u:object_r:sysfs_batteryinfo:s0 +genfscon proc /powerhal_cpu_ctrl u:object_r:proc_powerhal_cpu_ctrl:s0 +genfscon proc /touch_boost u:object_r:proc_touch_boost:s0 +genfscon proc /cpumgr/core_ioctl u:object_r:proc_core_ctl:s0 +genfscon sysfs /devices/platform/efuse@11e80000/mtk-devinfo0/nvmem u:object_r:sysfs_thermal_efuse:s0 +genfscon sysfs /devices/platform/soc/11c10000.efuse/mtk-devinfo0/nvmem u:object_r:sysfs_thermal_efuse:s0 +genfscon sysfs /devices/platform/extcon_usb u:object_r:sysfs_extcon:s0 +genfscon sysfs /devices/platform/soc/18000000.wifi/net/wlan0/type u:object_r:sysfs_net:s0 +genfscon sysfs /devices/platform/soc/18000000.wifi/net/wlan0/wireless u:object_r:sysfs_net:s0 +genfscon sysfs /devices/platform/charger/cmd_charge_disable u:object_r:sysfs_charging_control:s0 + +genfscon sysfs /devices/platform/charger/power_supply/mtk-mst-hvdiv-chg/power/wakeup u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/charger/power_supply/mtk-slv-hvdiv-chg/power/wakeup u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/charger/power_supply/mtk-slave-charger/power/wakeup u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/charger/power_supply/mtk-master-charger/power/wakeup u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/charger/power_supply/mtk-slv-div-chg/power/wakeup u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/charger/power_supply/usb/power/wakeup u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/charger/power_supply/mtk-mst-div-chg/power/wakeup u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/soc/11002000.serial/tty/ttyS1/power/wakeup u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/soc/11201000.usb0/power/wakeup u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/soc/11013000.spi3/spi_master/spi3/spi3.0/wakeup u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/soc/1c804000.spmi/spmi-0/0-03/wakeup u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/soc/1c804000.spmi/spmi-0/0-03/power/wakeup u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/soc/1c804000.spmi/spmi-0/0-04/mt6377-rtc/wakeup u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/soc/1c804000.spmi/spmi-0/0-04/mt6377-rtc/power/wakeup u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/soc/1c804000.spmi/spmi-0/0-04/mt6377-rtc/rtc/rtc0/alarmtimer.0.auto/wakeup u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/soc/1c804000.spmi/spmi-0/0-04/mt6377-rtc/rtc/rtc0/alarmtimer.0.auto/power/wakeup u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/soc/1c804000.spmi/spmi-0/0-04/mt6377-gauge/power_supply/mtk-gauge/power/wakeup u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/soc/1c804000.spmi/spmi-0/0-04/mt6377-gauge/power_supply/battery/power/wakeup u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/soc/1c804000.spmi/spmi-0/0-04/wakeup u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/soc/1c804000.spmi/spmi-0/0-04/power/wakeup u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/soc/11b20000.i2c/i2c-3/3-0027/wakeup/wakeup37 u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/soc/11b21000.i2c/i2c-5/5-006b/wakeup u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/soc/11b21000.i2c/i2c-5/5-006b/power/wakeup u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/soc/11b21000.i2c/i2c-5/5-006b/power_supply/primary_chg/power/wakeup u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/soc/11b21000.i2c/i2c-5/5-0060/wakeup u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/soc/11001000.serial/tty/ttyS0/power/wakeup u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/soc/11db1000.i2c/i2c-6/6-0058/wakeup u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/soc/11db1000.i2c/i2c-6/6-0058/power/wakeup u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/soc/18002000.consys/power/wakeup u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/soc/1f000000.mdp/wakeup/wakeup40 u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/focaltech_fp/wakeup u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/charger/power_supply/mtk-mst-hvdiv-chg/wakeup20 u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/charger/power_supply/mtk-slv-hvdiv-chg/wakeup21 u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/charger/power_supply/mtk-slave-charger/wakeup17 u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/charger/power_supply/mtk-master-charger/wakeup16 u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/charger/power_supply/mtk-slv-div-chg/wakeup19 u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/charger/power_supply/usb/wakeup22 u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/charger/power_supply/mtk-mst-div-chg/wakeup18 u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/soc/1f000000.mdp/wakeup/wakeup39 u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/soc/11013000.spi3/spi_master/spi3/spi3.0/wakeup/wakeup37 u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/soc/1c804000.spmi/spmi-0/0-04/mt6377-rtc/wakeup/wakeup13 u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/soc/1c804000.spmi/spmi-0/0-04/mt6377-rtc/rtc/rtc0/alarmtimer.0.auto/wakeup/wakeup14 u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/soc/1c804000.spmi/spmi-0/0-04/mt6377-gauge/power_supply/mtk-gauge/wakeup35 u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/soc/1c804000.spmi/spmi-0/0-04/mt6377-gauge/power_supply/battery/wakeup34 u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/soc/11b21000.i2c/i2c-5/5-006b/wakeup/wakeup24 u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/soc/11b21000.i2c/i2c-5/5-006b/power_supply/primary_chg/wakeup23 u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/soc/11b21000.i2c/i2c-5/5-0060/wakeup/wakeup26 u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/soc/11b21000.i2c/i2c-5/5-0060/wakeup/wakeup25 u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/trusty/wakeup/wakeup38 u:object_r:sysfs_wakeup:s0 diff --git a/sepolicy/vendor/hal_fingerprint_default.te b/sepolicy/vendor/hal_fingerprint_default.te new file mode 100644 index 0000000..a0a970a --- /dev/null +++ b/sepolicy/vendor/hal_fingerprint_default.te @@ -0,0 +1,34 @@ + +# ------------------- focaltech fingerprint begin ------------------- +type ff_service, vndservice_manager_type; +type ff_hwservice, hwservice_manager_type; +type ff_device, dev_type; +type ff_data_file, file_type, data_file_type; + +vndbinder_use(hal_fingerprint_default) +hwbinder_use(hal_fingerprint_default) + +allow hal_fingerprint_default ff_device:chr_file rw_file_perms; +allow hal_fingerprint_default self:netlink_kobject_uevent_socket { create setopt bind read }; +allow hal_fingerprint_default ff_data_file:dir create_dir_perms; +allow hal_fingerprint_default ff_data_file:file create_file_perms; +allow hal_fingerprint_default ff_service:service_manager { add }; + +#allow hal_fingerprint_default power_service:service_manager { find }; +#allow hal_fingerprint_default shell_exec:file rx_file_perms; +allow hal_fingerprint_default ff_hwservice:hwservice_manager { add }; +allow hal_fingerprint_default ff_hwservice:hwservice_manager { find }; + +allow hal_fingerprint_default sysfs_leds:dir { search }; +allow hal_fingerprint_default sysfs_leds:lnk_file { read }; +allow hal_fingerprint_default sysfs_leds:file rw_file_perms; +#allow hal_fingerprint_default sysfs:file w_file_perms; + +allow system_app hal_fingerprint_default:binder call; + +allow hal_fingerprint_default ff_service:service_manager { find }; +allow hal_fingerprint_default hal_fingerprint_default:binder { call }; +#allow hal_fingerprint_default vendor_dmabuf_qseecom_heap_device:chr_file { ioctl read getattr lock map open watch watch_reads }; +#allow hal_fingerprint_default vendor_dmabuf_qseecom_ta_heap_device:chr_file { ioctl read getattr lock map open watch watch_reads }; +allow hal_fingerprint_default tee_device:chr_file { ioctl read getattr lock map open watch watch_reads }; +# ------------------- focaltech fingerprint end --------------------- diff --git a/sepolicy/vendor/hal_graphics_allocator.te b/sepolicy/vendor/hal_graphics_allocator.te new file mode 100644 index 0000000..cf4fe6d --- /dev/null +++ b/sepolicy/vendor/hal_graphics_allocator.te @@ -0,0 +1 @@ +allow hal_graphics_allocator_client hal_graphics_allocator_default_tmpfs:file rw_file_perms; diff --git a/sepolicy/vendor/hal_graphics_allocator_default.te b/sepolicy/vendor/hal_graphics_allocator_default.te new file mode 100644 index 0000000..40180f8 --- /dev/null +++ b/sepolicy/vendor/hal_graphics_allocator_default.te @@ -0,0 +1 @@ +typeattribute hal_graphics_allocator_default_tmpfs mlstrustedobject; diff --git a/sepolicy/vendor/hal_graphics_composer_default.te b/sepolicy/vendor/hal_graphics_composer_default.te new file mode 100644 index 0000000..99dc2e2 --- /dev/null +++ b/sepolicy/vendor/hal_graphics_composer_default.te @@ -0,0 +1,4 @@ +get_prop(hal_graphics_composer_default, vendor_mtk_hwc_dsi_switch_prop) +allow hal_graphics_composer_default sysfs_leds:file rw_file_perms; +allow hal_graphics_composer_default sysfs_leds:dir r_dir_perms; +allow hal_graphics_composer_default dmabuf_system_secure_heap_device:chr_file r_file_perms_no_map; diff --git a/sepolicy/vendor/hal_lineage_health_default.te b/sepolicy/vendor/hal_lineage_health_default.te new file mode 100644 index 0000000..89d810a --- /dev/null +++ b/sepolicy/vendor/hal_lineage_health_default.te @@ -0,0 +1 @@ +allow hal_lineage_health_default sysfs_charging_control:file rw_file_perms; diff --git a/sepolicy/vendor/hal_mtk_pq.te b/sepolicy/vendor/hal_mtk_pq.te new file mode 100644 index 0000000..d7acb61 --- /dev/null +++ b/sepolicy/vendor/hal_mtk_pq.te @@ -0,0 +1 @@ +hal_attribute_service(hal_mtk_pq, mtk_hal_pq_service) diff --git a/sepolicy/vendor/hwservice_contexts b/sepolicy/vendor/hwservice_contexts new file mode 100644 index 0000000..c4732a0 --- /dev/null +++ b/sepolicy/vendor/hwservice_contexts @@ -0,0 +1,2 @@ +vendor.focaltech.hardware.biometrics.fingerprint::IFocalFingerprint u:object_r:ff_hwservice:s0 +android.hardware.nfc::INfc u:object_r:hal_nfc_hwservice:s0 \ No newline at end of file diff --git a/sepolicy/vendor/init.te b/sepolicy/vendor/init.te new file mode 100644 index 0000000..a60d3a0 --- /dev/null +++ b/sepolicy/vendor/init.te @@ -0,0 +1 @@ +allow init init_boot_block_device:lnk_file { relabelto }; diff --git a/sepolicy/vendor/ioctl_defines b/sepolicy/vendor/ioctl_defines new file mode 100644 index 0000000..161701c --- /dev/null +++ b/sepolicy/vendor/ioctl_defines @@ -0,0 +1,2 @@ +define(`PERFMGR_TOUCH_BOOST_GET_CMD', `0x6701') +define(`CORE_CTL_SET_LIMIT_CPUS', `0x6704') diff --git a/sepolicy/vendor/mediaswcodec.te b/sepolicy/vendor/mediaswcodec.te new file mode 100644 index 0000000..08f1e78 --- /dev/null +++ b/sepolicy/vendor/mediaswcodec.te @@ -0,0 +1,2 @@ +dontaudit mediaswcodec vendor_file:dir read; +get_prop(mediaserver, vendor_mtk_c2_vdec_fmt_prop) diff --git a/sepolicy/vendor/mnld.te b/sepolicy/vendor/mnld.te new file mode 100644 index 0000000..c431167 --- /dev/null +++ b/sepolicy/vendor/mnld.te @@ -0,0 +1,5 @@ +allow mnld sysfs_ccci:dir search; +allow mnld sysfs_ccci:file r_file_perms; +allow mnld proc_bootconfig:file r_file_perms; +allow mnld gsm0710muxd_device:chr_file rw_file_perms_no_map; +allow mnld hf_manager_device:chr_file rw_file_perms_no_map; diff --git a/sepolicy/vendor/mtk_hal_camera.te b/sepolicy/vendor/mtk_hal_camera.te new file mode 100644 index 0000000..1e8df45 --- /dev/null +++ b/sepolicy/vendor/mtk_hal_camera.te @@ -0,0 +1 @@ +get_prop(mtk_hal_camera, vendor_persist_camera_prop) diff --git a/sepolicy/vendor/mtk_hal_power.te b/sepolicy/vendor/mtk_hal_power.te new file mode 100644 index 0000000..d4a7d4e --- /dev/null +++ b/sepolicy/vendor/mtk_hal_power.te @@ -0,0 +1,20 @@ +allow mtk_hal_power proc_powerhal_cpu_ctrl:dir r_dir_perms; +allow mtk_hal_power proc_powerhal_cpu_ctrl:file rw_file_perms; +allow system_server proc_powerhal_cpu_ctrl:dir search; +allow mtk_hal_power touch_boost:dir r_dir_perms; +allow mtk_hal_power touch_boost:file r_file_perms; +allow mtk_hal_power proc_touch_boost:dir r_dir_perms; +allow mtk_hal_power proc_touch_boost:file rw_file_perms; +set_prop(mtk_hal_power, vendor_mtk_boostfwk_sbb_touch_duration_prop) +allow mtk_hal_power proc_core_ctl:dir r_dir_perms; +allow mtk_hal_power proc_core_ctl:file rw_file_perms; +allowxperm mtk_hal_power proc_core_ctl:file ioctl { + CORE_CTL_SET_LIMIT_CPUS +}; +allow mtk_hal_power sysfs_thermal_efuse:file r_file_perms; + +allow mtk_hal_power touch_boost:dir r_dir_perms; +allow mtk_hal_power touch_boost:file r_file_perms; +allow mtk_hal_power sysfs_change_rate:file rw_file_perms; +allow mtk_hal_power proc_touch_boost:dir r_dir_perms; +allow mtk_hal_power proc_touch_boost:file rw_file_perms; diff --git a/sepolicy/vendor/mtk_hal_pq.te b/sepolicy/vendor/mtk_hal_pq.te new file mode 100644 index 0000000..6b1a218 --- /dev/null +++ b/sepolicy/vendor/mtk_hal_pq.te @@ -0,0 +1,6 @@ +binder_use(mtk_hal_pq) +allow mtk_hal_pq self:capability sys_nice; +allow mtk_hal_pq sysfs_leds:dir r_dir_perms; +allow mtk_hal_pq sysfs_leds:file r_file_perms; +hal_client_domain(mtk_hal_pq, hal_graphics_allocator) +binder_use(mtk_hal_pq) diff --git a/sepolicy/vendor/mtk_hal_videotelephony.te b/sepolicy/vendor/mtk_hal_videotelephony.te new file mode 100644 index 0000000..b0f6401 --- /dev/null +++ b/sepolicy/vendor/mtk_hal_videotelephony.te @@ -0,0 +1 @@ +hal_attribute_service(hal_videotelephony, mtk_hal_videotelephony_service) diff --git a/sepolicy/vendor/nvram_daemon.te b/sepolicy/vendor/nvram_daemon.te new file mode 100644 index 0000000..e925df6 --- /dev/null +++ b/sepolicy/vendor/nvram_daemon.te @@ -0,0 +1 @@ +set_prop(nvram_daemon, vendor_mtk_service_wifi_nvram_prop) diff --git a/sepolicy/vendor/property.te b/sepolicy/vendor/property.te new file mode 100644 index 0000000..17dbf7a --- /dev/null +++ b/sepolicy/vendor/property.te @@ -0,0 +1,15 @@ +vendor_restricted_prop(vendor_mtk_service_wifi_nvram_prop) +typeattribute vendor_mtk_service_wifi_nvram_prop mtk_core_property_type; + +# surfaceflinger +vendor_restricted_prop(vendor_mtk_debug_sf_duration_prop) +vendor_restricted_prop(vendor_mtk_debug_sf_kickidle_prop) +vendor_restricted_prop(vendor_mtk_hwc_dsi_switch_prop) + +# mediaswcodec +vendor_restricted_prop(vendor_mtk_c2_vdec_fmt_prop) + +vendor_restricted_prop(vendor_mtk_boostfwk_sbb_touch_duration_prop) +typeattribute vendor_mtk_boostfwk_sbb_touch_duration_prop mtk_core_property_type; + +system_vendor_config_prop(system_mtk_powerhal_prop) diff --git a/sepolicy/vendor/property_contexts b/sepolicy/vendor/property_contexts new file mode 100644 index 0000000..d89daae --- /dev/null +++ b/sepolicy/vendor/property_contexts @@ -0,0 +1,31 @@ +# nvram +vendor.service.wifi_nvram u:object_r:vendor_mtk_service_wifi_nvram_prop:s0 + +# surfaceflinger +vendor.debug.sf.dynamic_duration. u:object_r:vendor_mtk_debug_sf_duration_prop:s0 +vendor.debug.sf.kickidle. u:object_r:vendor_mtk_debug_sf_kickidle_prop:s0 +ro.vendor.mtk_hwc_dsi_switch u:object_r:vendor_mtk_hwc_dsi_switch_prop:s0 + +# mediaswcodec +ro.vendor.mtk.c2.vdec.fmt.support.level u:object_r:vendor_mtk_c2_vdec_fmt_prop:s0 + +# vtservice +ro.vendor.vt_hevc_support u:object_r:vendor_mtk_default_prop:s0 + +persist.vendor.pco5.radio. u:object_r:vendor_mtk_radio_prop:s0 + +vendor.boostfwk.sbb.touch.duration u:object_r:vendor_mtk_boostfwk_sbb_touch_duration_prop:s0 + +persist.vendor.debug.gpud. u:object_r:vendor_mtk_gpu_prop:s0 +ro.vendor.arm. u:object_r:vendor_mtk_gpu_prop:s0 +vendor.mali. u:object_r:vendor_mtk_gpu_prop:s0 + +persist.system.powerhal. u:object_r:system_mtk_powerhal_prop:s0 + +ro.vendor.vt.mtk_thin_md_support_mode u:object_r:vendor_mtk_vendor_vt_prop:s0 + +persist.vendor.log.tag.tel_dbg u:object_r:system_mtk_em_tel_log_prop:s0 + +vendor.debug. u:object_r:vendor_mtk_camera_prop:s0 + +persist.vendor.camera. u:object_r:vendor_persist_camera_prop:s0 diff --git a/sepolicy/vendor/service.te b/sepolicy/vendor/service.te new file mode 100644 index 0000000..8686186 --- /dev/null +++ b/sepolicy/vendor/service.te @@ -0,0 +1,2 @@ +type mtk_hal_pq_service, hal_service_type, protected_service, service_manager_type; +type mtk_hal_videotelephony_service, hal_service_type, protected_service, service_manager_type; diff --git a/sepolicy/vendor/service_contexts b/sepolicy/vendor/service_contexts new file mode 100644 index 0000000..8cfa962 --- /dev/null +++ b/sepolicy/vendor/service_contexts @@ -0,0 +1,3 @@ +vendor.mediatek.hardware.pq_aidl.IPictureQuality_AIDL/default u:object_r:mtk_hal_pq_service:s0 +vendor.mediatek.hardware.videotelephony.IVideoTelephony/default u:object_r:mtk_hal_videotelephony_service:s0 +android.hardware.drm.IDrmFactory/widevine u:object_r:hal_drm_service:s0 diff --git a/sepolicy/vendor/surfaceflinger.te b/sepolicy/vendor/surfaceflinger.te new file mode 100644 index 0000000..e6a649a --- /dev/null +++ b/sepolicy/vendor/surfaceflinger.te @@ -0,0 +1,5 @@ +dontaudit surfaceflinger vendor_file:dir read; +get_prop(surfaceflinger, vendor_mtk_debug_sf_duration_prop) +get_prop(surfaceflinger, vendor_mtk_debug_sf_kickidle_prop) +get_prop(surfaceflinger, vendor_mtk_hwc_dsi_switch_prop) +allow surfaceflinger vendor_file:file rx_file_perms; diff --git a/sepolicy/vendor/system_app.te b/sepolicy/vendor/system_app.te new file mode 100644 index 0000000..c7eed56 --- /dev/null +++ b/sepolicy/vendor/system_app.te @@ -0,0 +1,4 @@ + +allow system_app ff_hwservice:hwservice_manager { add }; +allow system_app ff_hwservice:hwservice_manager { find }; + diff --git a/sepolicy/vendor/system_server.te b/sepolicy/vendor/system_server.te new file mode 100644 index 0000000..817e17a --- /dev/null +++ b/sepolicy/vendor/system_server.te @@ -0,0 +1,3 @@ +get_prop(system_server, vendor_mtk_gpu_prop) +get_prop(system_server, system_mtk_powerhal_prop) +allow system_server proc_touch_boost:dir search; diff --git a/sepolicy/vendor/thermal_core.te b/sepolicy/vendor/thermal_core.te new file mode 100644 index 0000000..0c8ef39 --- /dev/null +++ b/sepolicy/vendor/thermal_core.te @@ -0,0 +1 @@ +allow thermal_core sysfs_thermal_efuse:file create_file_perms; diff --git a/sepolicy/vendor/touch_boost.te b/sepolicy/vendor/touch_boost.te new file mode 100644 index 0000000..e3a41a1 --- /dev/null +++ b/sepolicy/vendor/touch_boost.te @@ -0,0 +1,13 @@ +type touch_boost_exec, exec_type, file_type, vendor_file_type; +type touch_boost, domain; + +init_daemon_domain(touch_boost) + +allow touch_boost self:netlink_kobject_uevent_socket create_socket_perms_no_ioctl; +allow touch_boost sysfs_boot_mode:file r_file_perms; +hal_client_domain(touch_boost, hal_power) +allow touch_boost proc_perfmgr:dir r_dir_perms; +allow touch_boost proc_perfmgr:file rw_file_perms; +allowxperm touch_boost proc_perfmgr:file ioctl { + PERFMGR_TOUCH_BOOST_GET_CMD +}; diff --git a/sepolicy/vendor/update_engine.te b/sepolicy/vendor/update_engine.te new file mode 100644 index 0000000..b4648d6 --- /dev/null +++ b/sepolicy/vendor/update_engine.te @@ -0,0 +1,6 @@ +allow update_engine connsys_bt_block_device:blk_file rw_file_perms_no_map; +allow update_engine connsys_wifi_block_device:blk_file rw_file_perms_no_map; +allow update_engine connsys_gnss_block_device:blk_file rw_file_perms_no_map; +allow update_engine init_boot_block_device:blk_file rw_file_perms_no_map; +allow update_engine sysfs_memory:dir r_dir_perms; +allow update_engine bootdevice_block_device:blk_file rw_file_perms; diff --git a/sepolicy/vendor/vendor_init.te b/sepolicy/vendor/vendor_init.te new file mode 100644 index 0000000..421777e --- /dev/null +++ b/sepolicy/vendor/vendor_init.te @@ -0,0 +1,6 @@ +set_prop(vendor_init, vendor_mtk_debug_sf_duration_prop) +set_prop(vendor_init, vendor_mtk_c2_vdec_fmt_prop) +get_prop(vendor_init, vts_status_prop) + +allow vendor_init vendor_userdir_file:dir rw_dir_perms; +allow vendor_init vendor_userdir_file:file rw_file_perms; diff --git a/sepolicy/vendor/vndservice_contexts b/sepolicy/vendor/vndservice_contexts new file mode 100644 index 0000000..95ad033 --- /dev/null +++ b/sepolicy/vendor/vndservice_contexts @@ -0,0 +1,3 @@ + +FocalFingerprintService u:object_r:ff_service:s0 + diff --git a/sepolicy/vendor/vtservice.te b/sepolicy/vendor/vtservice.te new file mode 100644 index 0000000..865f3a5 --- /dev/null +++ b/sepolicy/vendor/vtservice.te @@ -0,0 +1 @@ +allow vtservice mtk_hal_videotelephony_service:service_manager find; diff --git a/setup-makefiles.py b/setup-makefiles.py new file mode 100644 index 0000000..32947cf --- /dev/null +++ b/setup-makefiles.py @@ -0,0 +1 @@ +#!./extract-files.py --regenerate_makefiles diff --git a/system.prop b/system.prop new file mode 100644 index 0000000..87af97e --- /dev/null +++ b/system.prop @@ -0,0 +1,37 @@ +# 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 + +# Enable system-side generic bluetooth audio HAL +persist.bluetooth.system_audio_hal.enabled=true +# Set commonly-supported Bluetooth profiles to enabled +# TODO: Enable BLE Audio profiles on newer vendors +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 + + +# IMS +persist.dbg.volte_avail_ovr=1 +persist.dbg.vt_avail_ovr=1 +persist.dbg.wfc_avail_ovr=1 + +# Updater URI +#lineage.updater.uri=https://ota.iode.tech/beta/brax3.json diff --git a/vendor.prop b/vendor.prop new file mode 100644 index 0000000..e057e8e --- /dev/null +++ b/vendor.prop @@ -0,0 +1,339 @@ +ro.boot.dynamic_partitions=true +ro.build.ab_update=true +external_storage.projid.enabled=1 +external_storage.casefold.enabled=1 +external_storage.sdcardfs.enabled=0 +init.userspace_reboot.is_supported=true +ro.vendor.init.sensor.rc=init.sensor_2_0.rc +camera.disable_zsl_mode=1 +ro.vendor.mtk_ovl_bringup=0 +ro.logd.kernel=false +debug.fdsan=fatal +ro.hardware.hwcomposer=mtk_common +debug.sf.use_phase_offsets_as_durations=1 +debug.sf.late.sf.duration=27600000 +debug.sf.late.app.duration=20000000 +debug.sf.early.sf.duration=27600000 +debug.sf.early.app.duration=20000000 +debug.sf.earlyGl.sf.duration=27600000 +debug.sf.earlyGl.app.duration=20000000 +debug.sf.hwc.min.duration=2000000 +debug.renderengine.backend=skiagl +debug.stagefright.c2inputsurface=-1 +ro.vendor.mtk_eccci_c2k=1 +ro.vendor.mtk_mcf_support=1 +persist.vendor.camera3.pipeline.bufnum.min.high_ram.imgo=7 +persist.vendor.camera3.pipeline.bufnum.min.low_ram.imgo=6 +persist.vendor.camera3.pipeline.bufnum.base.imgo=4 +persist.vendor.camera3.pipeline.bufnum.min.high_ram.rrzo=7 +persist.vendor.camera3.pipeline.bufnum.min.low_ram.rrzo=6 +persist.vendor.camera3.pipeline.bufnum.base.rrzo=4 +persist.vendor.camera3.pipeline.bufnum.min.high_ram.lcso=7 +persist.vendor.camera3.pipeline.bufnum.min.low_ram.lcso=6 +persist.vendor.camera3.pipeline.bufnum.base.lcso=4 +persist.vendor.camera3.pipeline.bufnum.min.high_ram.rsso=7 +persist.vendor.camera3.pipeline.bufnum.min.low_ram.rsso=6 +persist.vendor.camera3.pipeline.bufnum.base.rsso=5 +persist.vendor.camera3.pipeline.bufnum.min.high_ram.fdyuv=5 +persist.vendor.camera3.pipeline.bufnum.min.low_ram.fdyuv=5 +ro.vendor.mediatek.version.branch=alps-mp-t0.mp1 +ro.vendor.mediatek.version.release=alps-mp-t0.mp1.rc-V11.291.t0mp1rc.k6985v1.64_P3 +persist.radio.multisim.config=dsds +persist.vendor.radio.msimmode=dsds +ro.vendor.radio.max.multisim=dsds +ro.telephony.sim.count=2 +telephony.active_modems.max_count=2 +ro.vendor.mtk_wappush_support=1 +ro.vendor.mtk_audio_tuning_tool_ver=V1 +ro.vendor.wifi.sap.interface=ap0 +ro.vendor.mtk_gps_support=1 +drm.service.enabled=true +ro.vendor.mtk_emmc_support=1 +ro.vendor.mtk_ril_mode=c6m_1rild +ro.vendor.md_prop_ver=1 +ro.vendor.mtk_blulight_def_support=1 +ro.vendor.mtk_md_world_mode_support=1 +ro.vendor.ap_info_monitor=0 +ro.vendor.md_auto_setup_ims=1 +persist.vendor.radio.smart.data.switch=1 +ro.vendor.mtk_data_config=1 +persist.vendor.ims_support=1 +persist.vendor.mtk_dynamic_ims_switch=1 +persist.vendor.mtk_wfc_support=1 +persist.vendor.volte_support=1 +persist.vendor.mtk.volte.enable=1 +persist.vendor.vilte_support=1 +persist.vendor.viwifi_support=0 +ro.vendor.wfd.dummy.enable=0 +ro.vendor.wfd.iframesize.level=0 +ro.hardware.kmsetkey=trustonic +ro.vendor.mtk_trustonic_tee_support=1 +ro.hardware.gatekeeper=trustonic +persist.vendor.mtk_ct_volte_support=3 +vendor.mtk.vdec.waitkeyframeforplay=9 +vendor.mtk.vdec.decode.error.handle.mode=1 +debug.sf.disable_backpressure=1 +ro.vendor.mtk_log_hide_gps=0 +ro.control_privapp_permissions=enforce +ro.telephony.iwlan_operation_mode=AP-assisted +debug.mtk_tflite.target_nnapi=29 +ro.vendor.mtk_nn.option=A,B,C,D,E,F,G,Z +ro.vendor.mtk_nn_quant_preferred=1 +ro.crypto.volume.filenames_mode=aes-256-cts +ro.surface_flinger.primary_display_orientation=ORIENTATION_0 +ro.surface_flinger.force_hwc_copy_for_virtual_displays=true +persist.vendor.md_c2k_cap_dep_check=0 +ro.incremental.enable=yes +persist.system.powerhal.applist_enable=1 +ro.hardware.gralloc=common +ro.vendor.wifi.sap.concurrent.iface=ap1 +vendor.boostfwk.version=2 +ro.fuse.bpf.enabled=false +apexd.config.dm_create.timeout=5000 +apexd.config.loop_wait.attempts=100 +ro.vendor.mgvi_name=mgvi_64_ww_armv82 +# end of file +# hal_mgvi_64_ww_armv82 end +# vext_k6835v1_64 start +ro.boot.dynamic_partitions=true +ro.build.ab_update=true +external_storage.projid.enabled=1 +external_storage.casefold.enabled=1 +external_storage.sdcardfs.enabled=0 +ro.vendor.rc=/vendor/etc/init/hw/ +ro.oem_unlock_supported=1 +ro.surface_flinger.protected_contents=true +debug.sf.enable_hwc_vds=0 +vendor.debug.sf.dynamic_duration.switch=1 +vendor.debug.sf.dynamic_duration.sf.late=14600000 +vendor.debug.sf.dynamic_duration.app.late=18000000 +vendor.debug.sf.dynamic_duration.sf.early=14600000 +vendor.debug.sf.dynamic_duration.app.early=18000000 +vendor.debug.sf.dynamic_duration.sf.earlyGl=14600000 +vendor.debug.sf.dynamic_duration.app.earlyGl=18000000 +vendor.debug.sf.dynamic_duration.sf.decouple=27600000 +vendor.debug.sf.dynamic_duration.app.decouple=20000000 +vendor.debug.sf.dynamic_duration.sf.late.60=15600000 +vendor.debug.sf.dynamic_duration.app.late.60=16600000 +vendor.debug.sf.dynamic_duration.sf.early.60=15600000 +vendor.debug.sf.dynamic_duration.app.early.60=16600000 +vendor.debug.sf.dynamic_duration.sf.earlyGl.60=15600000 +vendor.debug.sf.dynamic_duration.app.earlyGl.60=16600000 +vendor.debug.sf.dynamic_duration.sf.late.90=15100000 +vendor.debug.sf.dynamic_duration.app.late.90=17200000 +vendor.debug.sf.dynamic_duration.sf.early.90=15100000 +vendor.debug.sf.dynamic_duration.app.early.90=17200000 +vendor.debug.sf.dynamic_duration.sf.earlyGl.90=15100000 +vendor.debug.sf.dynamic_duration.app.earlyGl.90=17200000 +vendor.debug.sf.dynamic_duration.sf.late.120=11600000 +vendor.debug.sf.dynamic_duration.app.late.120=12300000 +vendor.debug.sf.dynamic_duration.sf.early.120=11600000 +vendor.debug.sf.dynamic_duration.app.early.120=12300000 +vendor.debug.sf.dynamic_duration.sf.earlyGl.120=11600000 +vendor.debug.sf.dynamic_duration.app.earlyGl.120=12300000 +ro.surface_flinger.uclamp.min=234 +vendor.debug.sf.cpupolicy.log=1 +vendor.debug.sf.cpupolicy.upbound_uclamp_min=485 +vendor.debug.sf.cpupolicy.max_correct_offset=100 +vendor.debug.sf.cpupolicy.rt_bl_min=293 +vendor.debug.sf.cpupolicy.base_min_bl=330 +vendor.debug.sf.cpupolicy.sf_cpu_thres=285 +vendor.debug.sf.cpupolicy.upbound_uclamp_max_ll=267 +vendor.debug.sf.cpupolicy.xgf_min=25 +vendor.debug.sf.cpupolicy.hw_comp_suspend=1 +vendor.debug.sf.cpupolicy.min_60_mml=158 +vendor.debug.sf.cpupolicy.min_30_mml=158 +vendor.debug.sf.cpupolicy.lowbound_uclamp_min=167 +vendor.debug.sf.cpupolicy.upbound_uclamp_ret_sys=212 +vendor.debug.sf.cpupolicy.min_90=166 +vendor.debug.sf.cpupolicy.min_60=135 +vendor.debug.sf.cpupolicy.min_120=166 +vendor.debug.sf.cpupolicy.min_boost=166 +vendor.debug.sf.cpupolicy.foreground=1 +vendor.debug.sf.cpupolicy.hw_hfr_suspend=1 +vendor.debug.sf.cpupolicy.re_hfr=1 +vendor.debug.sf.cpupolicy.ll_mask=63 +vendor.debug.sf.cpupolicy.bl_mask=192 +vendor.debug.sf.cpupolicy.llbl_mask=255 +ro.vendor.composer_version=2.1 +ro.vendor.mtk_f2fs_enable=1 +ro.bluetooth.a2dp_offload.supported=false +persist.bluetooth.a2dp_offload.cap=sbc-aac +persist.bluetooth.a2dp_offload.disabled=true +ro.frp.pst=/dev/block/by-name/frp +ro.opengles.version=196610 +ro.hardware.vulkan=mali +graphics.gpu.profiler.support=true +ro.gfx.driver.0=com.mediatek.mt6835.gamedriver +ro.vendor.arm.egl.configs.r8_g8_b8_a8_32bit_fixed.hal_format=0x1 +ro.vendor.arm.egl.configs.r8_g8_b8_a8_32bit_fixed.recordable=true +ro.vendor.arm.egl.configs.r8_g8_b8_a8_32bit_fixed.framebuffer_target=false +ro.vendor.arm.egl.configs.r8_g8_b8_a0_32bit_fixed.hal_format=0x2 +ro.vendor.arm.egl.configs.r8_g8_b8_a0_32bit_fixed.recordable=false +ro.vendor.arm.egl.configs.r8_g8_b8_a0_32bit_fixed.framebuffer_target=false +ro.vendor.arm.egl.configs.r8_g8_b8_a0_24bit_fixed.hal_format=0x2 +ro.vendor.arm.egl.configs.r8_g8_b8_a0_24bit_fixed.recordable=false +ro.vendor.arm.egl.configs.r8_g8_b8_a0_24bit_fixed.framebuffer_target=false +ro.vendor.arm.egl.configs.r5_g6_b5_a0_16bit_fixed.hal_format=0x4 +ro.vendor.arm.egl.configs.r5_g6_b5_a0_16bit_fixed.recordable=false +ro.vendor.arm.egl.configs.r5_g6_b5_a0_16bit_fixed.framebuffer_target=false +ro.vendor.arm.egl.configs.r10_g10_b10_a2_32bit_fixed.hal_format=0x2b +ro.vendor.arm.egl.configs.r10_g10_b10_a2_32bit_fixed.recordable=false +ro.vendor.arm.egl.configs.r10_g10_b10_a2_32bit_fixed.framebuffer_target=false +ro.vendor.arm.egl.configs.r16_g16_b16_a16_64bit_float.hal_format=0x16 +ro.vendor.arm.egl.configs.r16_g16_b16_a16_64bit_float.recordable=false +ro.vendor.arm.egl.configs.r16_g16_b16_a16_64bit_float.framebuffer_target=false +ro.vendor.arm.egl.configs.r8_g8_b8_a0_24bit_yuv_special.hal_format=0x23 +ro.vendor.arm.egl.configs.r8_g8_b8_a0_24bit_yuv_special.framebuffer_target=false +vendor.camera.mdp.dre.enable=1 +vendor.camera.mdp.cz.enable=1 +vendor.mtk.camera.app.fd.video=1 +ro.vendor.camera.aishutter.support=0 +persist.vendor.radio.fd.counter=150 +persist.vendor.radio.fd.off.counter=50 +persist.vendor.radio.fd.r8.counter=150 +persist.vendor.radio.fd.off.r8.counter=50 +dalvik.vm.mtk-stack-trace-file=/data/anr/mtk_traces.txt +ro.frp.pst=/dev/block/by-name/frp +persist.adb.nonblocking_ffs=0 +aaudio.mmap_policy=0 +aaudio.mmap_exclusive_policy=0 +vendor.audio.powerhal.power.dl=true +vendor.audio.powerhal.power.ul=true +ro.vendor.camera3.zsl.default=230 +ro.vendor.mediatek.platform=MT6835 +dalvik.vm.heapmaxfree=8m +dalvik.vm.heapminfree=512k +dalvik.vm.heaptargetutilization=0.75 +ro.vendor.jpeg_decode_sw_opt=1 +ro.vendor.smvr.p2batch.hd=4 +ro.vendor.mtk_slow_motion_support=1 +debug.mediatek.disp_decompress=1 +debug.mediatek.appgamepq_compress=1 +ro.vendor.mtk_video_hevc_enc_support=1 +ro.vendor.vt_hevc_support=1 +ro.lmk.psi_complete_stall_ms=150 +ro.lmk.swap_free_low_percentage=20 +ro.lmk.thrashing_limit=30 +ro.lmk.thrashing_limit_decay=50 +ro.lmk.swap_util_max=90 +ro.lmk.kill_timeout_ms=100 +ro.surface_flinger.max_frame_buffer_acquired_buffers=4 +ro.vendor.mtk_mipc_support=1 +ro.vendor.mtk_prefer_64bit_proc=0 +ro.vendor.mtk_pq_support=2 +ro.vendor.pq.mtk_pq_video_whitelist_support=0 +ro.vendor.pq.mtk_video_transition=0 +ro.vendor.mtk_backlight_hwc_support=1 +ro.vendor.pq.mtk_scltm_support=0 +ro.vendor.mml.mtk_mml_support=0 +ro.vendor.pq.mtk_ai_scence_pq_support=0 +ro.vendor.pq.mtk_hdr10_plus_recording_support=0 +ro.vendor.pq.mtk_mdp_lite_pq_support=0 +ro.vendor.pq.mtk_ai_sdr_to_hdr_support=0 +ro.vendor.pq.mtk_ai_region_pq_support=0 +ro.vendor.pq.mtk_ai_hdr_model_dq=0 +ro.vendor.pq.mtk_dc_support=0 +ro.vendor.pq.mtk_ds_support=0 +ro.vendor.pq.mtk_ultra_resolution_support=0 +ro.vendor.mtk_pq_color_mode=1 +ro.vendor.pq.mtk_hfg_support=1 +ro.vendor.pq.mtk_caltm_support=1 +ro.vendor.pq.mtk_clearzoom_support=1 +ro.vendor.pq.mtk_mdp_ccorr_support=0 +ro.vendor.pq.mtk_pq_interface_support=0 +ro.vendor.pq.mtk_disp_c3d_support=0 +ro.vendor.pq.mtk_disp_tdshp_support=0 +ro.vendor.pq.mtk_disp_color_support=1 +ro.vendor.pq.mtk_disp_ccorr_support=1 +ro.vendor.pq.mtk_disp_gamma_support=1 +ro.vendor.pq.mtk_aal_support=1 +ro.vendor.mtk_aal_support=1 +ro.vendor.pq.mtk_dre30_support=0 +ro.vendor.pq.mtk_disp_game_pq_support=0 +ro.vendor.pq.mtk_backlight_smooth_support=0 +ro.vendor.pq.mtk_ultra_dimming_support=1 +ro.vendor.mtk_ultra_dimming_support=1 +ro.vendor.pq.mtk_blulight_def_support=1 +persist.vendor.sys.pq.mtk_disp_clarity_support=0 +ro.vendor.mtk_carrierexpress_pack=na +persist.vendor.mtk_usp_switch_mode=1 +ro.vendor.mtk_mvpu_security_support=0 +ro.vendor.mtk_fd_support=1 +ro.vendor.mtk_single_bin_modem_support=1 +ro.vendor.connsys.dedicated.log.port=bt,wifi,gps,mcu +persist.vendor.connsys.coredump.mode=2 +persist.vendor.connsys.chipid=-1 +persist.vendor.connsys.patch.version=-1 +persist.vendor.connsys.dynamic.dump=0 +vendor.connsys.driver.ready=no +ro.vendor.connsys.dedicated.log=1 +ro.vendor.gps.chrdev=gps_drv_stp +persist.vendor.connsys.fm_chipid=mt6631_6635 +ro.vendor.fm.platform=mt6631_6635 +ro.vendor.wlan.chrdev=wmt_chrdev_wifi +ro.vendor.wlan.gen=gen4m_6835 +ro.vendor.wlan.standalone.log=y +ro.vendor.bt.platform=connac1x +ro.vendor.bt.connac3=no +bluetooth.profile.sap.server.enabled=true +vendor.bluetooth.ldac.abr=true +ro.vendor.mtk_sim_hot_swap_common_slot=1 +ro.vendor.mtk_sim_card_onoff=3 +persist.vendor.mims_support=2 +persist.vendor.log.tel_log_ctrl=1 +ro.vendor.num_md_protocol=2 +ro.vendor.mtk_camera_app_version=3 +ro.vendor.pref_scale_enable_cfg=1 +ro.vendor.mtk_widevine_drm_l3_support=1 +ro.vendor.mtk_protocol1_rat_config=N/Lf/Lt/W/G +ro.vendor.mtk_dmc_support=1 +ro.vendor.mtk_mapi_support=1 +ro.vendor.mtk_c2k_lte_mode=0 +ro.telephony.default_network=26,26,26,26 +ro.vendor.mtk_ps1_rat=N/Lf/Lt/W/G +ro.vendor.mtk_lte_support=1 +persist.vendor.radio.mtk_ps2_rat=N/L/W/G +persist.vendor.radio.mtk_ps3_rat=G +ro.vendor.mtk_disable_cap_switch=1 +ro.vendor.mtk_world_phone_policy=0 +ro.vendor.mtk_rild_read_imsi=1 +persist.vendor.mtk_sim_switch_policy=2 +ro.vendor.sim_me_lock_mode=3 +ro.hardware.egl=meow +ro.vendor.mtk_md_sbp_custom_value=0 +persist.vendor.radio.mtk_dsbp_support=3 +ro.vendor.mtk_external_sim_only_slots=0 +ro.vendor.mtk_nn_baseline_support=1 +ro.vendor.mtk_mobile_management=1 +persist.vendor.factory.GB2312=no +ro.vendor.mtk_fast_charging_support=1 +ro.vendor.mtk.sensor.support=yes +dalvik.vm.heapgrowthlimit=256m +dalvik.vm.heapsize=512m +ro.vendor.camera.insensorzoom.support=0 +ro.vendor.camera.isp.support.colorspace=0 +ro.camera.disableJpegR=true +ro.vendor.mtk_tee_gp_support=1 +ro.vendor.mtk_wfd_support=1 +ro.vendor.mtk_thermal_2_0=1 +ro.vendor.mtk_cam_security_support=1 +ro.vendor.usb.kpoc_adb=0 +ro.netflix.bsp_rev=MTK6835-36999-1 +ro.vendor.mgk_name=mgk_64_entry_level_k515 +bluetooth.device.default_name=BraX3 +vendor.usb.product_string=BraX3 +ro.surface_flinger.set_idle_timer_ms=500 +ro.surface_flinger.set_touch_timer_ms=500 +debug.sf.mtk_ged_kpi=1 +ro.config.vc_call_vol_steps=10 +#ro.surface_flinger.vsync_event_phase_offset_ns=200000000 +#ro.surface_flinger.vsync_sf_event_phase_offset_ns=600000000 +debug.sf.enable_gl_backpressure=false +ro.vendor.mtk_config_max_dram_size=0x180000000 +media.stagefright.thumbnail.prefer_hw_codecs=true +debug.c2.use_dmabufheaps=1 +media.c2.dmabuf.padding=3072 +ro.vendor.pref_scale_enable_cfg=1 +ro.vendor.mtk_hdr_video_support=1 +ro.vendor.mtk_sec_video_path_support=1 diff --git a/vendor_logtag.mk b/vendor_logtag.mk new file mode 100644 index 0000000..c72f69a --- /dev/null +++ b/vendor_logtag.mk @@ -0,0 +1,258 @@ +ifeq (eng,$(TARGET_BUILD_VARIANT)) +VENDOR_LOG_LEVEL=I +else +VENDOR_LOG_LEVEL=S +endif + +PRODUCT_VENDOR_PROPERTIES += \ + persist.log.tag.MTK_APPList=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.libPowerHal=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.mtkpower@impl=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.mtkpower_client=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.UxUtility=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.PowerHalAddressUitls=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.PowerHalMgrImpl=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.PowerHalMgrServiceImpl=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.PowerHalWifiMonitor=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.mipc_lib=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.trm_lib=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RfxMclDisThread=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RfxCloneMgr=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RfxHandlerMgr=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RfxIdToStr=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RfxDisThread=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RfxMclStatusMgr=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RIL-Fusion=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RilOemClient=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RtmEccNumberController=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RmmEccNumberReqHdlr=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RmmEccNumberUrcHandler=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RfxBaseHandler=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RfxMclDisThread=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RfxCloneMgr=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RfxHandlerMgr=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RfxIdToStr=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RfxDisThread=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RfxMclStatusMgr=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RIL-Fusion=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RfxOpUtils=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RfxMclMessenger=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RfxFragEnc=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RfxStatusMgr=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RfxContFactory=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RfxChannelMgr=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RfxIdToMsgId=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RtmDC=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RmmDcEvent=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RmmDcUrcHandler=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.MipcEventHandler=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.InterfaceManager=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RmmPhbReq=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RmmPhbUrc=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RtmPhb=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RtmIms=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RtmImsConfigController=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RtmImsConference=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RtmImsDialog=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RmmImsCtlUrcHdl=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RmmImsCtlReqHdl=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RmmEmbmsReq=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RmmEmbmsUrc=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RtmEmbmsUtil=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RtmEmbmsAt=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RmmSimCommReq=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RmmSimCommUrc=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RmmSimBaseHandler=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RtmRadioConfig=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RtmCommSimCtrl=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RmmCommSimOpReq=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RtmRadioCont=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RmmDcPdnManager=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RmmDcUtility=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RmmNwHdlr=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RmmNwReqHdlr=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RmmNwRTReqHdlr=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RmmNwAsyncHdlr=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RmmNwNrtReqHdlr=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RmmNwRatSwHdlr=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RmmNwUrcHdlr=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RtmNwCtrl=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RmmRadioReq=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RmmCapa=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RtmCapa=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RtmWp=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RmmWp=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RmmOpRadioReq=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RmmOemHandler=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RtmModeCont=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RmmMwi=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RtmMwi=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.AT=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RILC=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RfxMainThread=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RfxRoot=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RfxRilAdapter=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RfxController=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RilOpProxy=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RILC-OP=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.WpfaCcciDataHeaderEncoder=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.WpfaCcciReader=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.WpfaCcciSender=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.WpfaControlMsgHandler=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.WpfaDriver=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.WpfaDriverAccept=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.WpfaDriverAdapter=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.WpfaDriverDeReg=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.WpfaDriverMessage=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.WpfaDriverRegFilter=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.WpfaDriverULIpPkt=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.WpfaDriverUtilis=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.WpfaDriverVersion=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.WpfaFilterRuleReqHandler=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.WpfaRingBuffer=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.WpfaShmAccessController=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.WpfaShmReadMsgHandler=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.WpfaShmSynchronizer=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.WpfaShmWriteMsgHandler=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.wpfa_iptable_android=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.WpfaRuleRegister=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.WpfaParsing=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.WpfaRuleContainer=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.NetAgentService=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.NetAgent_IO=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.NetLnkEventHdlr=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.GsmCdmaPhone=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RILMD2-SS=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.CapaSwitch=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.DSSelector=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.DSSelectorOm=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.DSSelectorOP01=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.DSSelectorOP02=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.DSSelectorOP09=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.DSSelectorOP18=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.DSSelectorUtil=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.SimSwitchOP01=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.SimSwitchOP02=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.SimSwitchOP18=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.IccProvider=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.IccPhoneBookIM=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.AdnRecordCache=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.AdnRecordLoader=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.AdnRecord=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.MtkIccProvider=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.MtkIccPHBIM=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.MtkAdnRecord=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.MtkRecordLoader=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.VT=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.ImsVTProvider=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.IccCardProxy=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.IsimFileHandler=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.IsimRecords=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.SIMRecords=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.SpnOverride=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.UiccCard=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.UiccController=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.CountryDetector=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.NetworkStats=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.NetworkPolicy=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.DataDispatcher=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.ImsService=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.IMS_RILA=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.IMSRILRequest=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.ImsManager=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.ImsApp=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.ImsBaseCommands=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.MtkImsManager=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.MtkImsService=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.ImsCall=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.ImsPhone=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.ImsPhoneCall=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.ImsPhoneBase=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.ImsCallSession=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.ImsCallProfile=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.ImsEcbm=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.ImsEcbmProxy=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.OperatorUtils=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.WfoApp=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.GsmCdmaConn=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.Phone=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.GsmCallTkrHlpr=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.MtkPhoneNotifr=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.MtkFactory=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.MtkGsmCdmaConn=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RadioManager=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RIL=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RIL_UIM_SOCKET=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RILD=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RfxMessage=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RfxDebugInfo=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RfxTimer=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RfxObject=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.SlotQueueEntry=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RfxAction=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RFX=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.PhoneFactory=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.ProxyController=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.SpnOverride=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.AirplaneHandler=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.ExternalSimMgr=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.VsimAdaptor=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.MtkCsimFH=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.MtkIsimFH=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.MtkRuimFH=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.MtkSIMFH=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.MtkSIMRecords=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.MtkSmsCbHeader=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.MtkSmsManager=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.MtkSmsMessage=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.MtkSpnOverride=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.MtkIccCardProxy=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.MtkUiccCard=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.MtkUiccCardApp=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.MtkUiccCtrl=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.MtkUsimFH=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.MtkSubCtrl=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.MtkEmbmsAdaptor=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RilClient=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RfxRilAdapter=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.MTKSST=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RfxRilUtils=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.WORLDMODE=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.MtkPhoneNumberUtils=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.MtkPhoneSwitcher=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RIL-Parcel=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RIL-Socket=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RIL-SocListen=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.RIL-Netlink=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.MwiRIL=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.PQ_DS=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.MtkTelephonyManagerEx=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.MtkIccSmsInterfaceManager=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.MtkUsimPhoneBookManager=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.DMC-Core=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.DMC-TranslatorLoader=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.DMC-TranslatorUtils=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.DMC-ReqQManager=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.DMC-DmcService=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.DMC-ApmService=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.DMC-SessionManager=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.DMC-EventsSubscriber=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.LCM-Subscriber=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.APM-Subscriber=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.MDM-Subscriber=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.APM-SessionJ=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.APM-SessionN=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.APM-ServiceJ=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.APM-KpiMonitor=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.PKM-MDM=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.PKM-Lib=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.PKM-Monitor=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.PKM-SA=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.PKM-Service=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.MAPI-TranslatorManager=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.MAPI-MdiRedirectorCtrl=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.MAPI-MdiRedirector=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.MAPI-NetworkSocketConnection=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.MAPI-SocketConnection=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.MAPI-SocketListener=$(VENDOR_LOG_LEVEL) \ + persist.log.tag.MAPI-CommandProcessor=$(VENDOR_LOG_LEVEL)