├── Android.bp ├── BoardConfigCommon.mk ├── audio ├── audio_effects.xml ├── audio_output_policy.conf ├── audio_platform_info.xml ├── audio_policy_configuration.xml ├── audio_policy_configuration_a2dp_offload_disabled.xml ├── audio_tuning_mixer_tavil.txt ├── bluetooth_hearing_aid_audio_policy_configuration.xml ├── graphite_ipc_platform_info.xml ├── listen_platform_info.xml ├── mixer_paths_tavil.xml ├── sound_trigger_mixer_paths_wcd9340.xml └── sound_trigger_platform_info.xml ├── blob-patches └── PowerOffAlarm.patch ├── common.mk ├── compatibility_matrix.xml ├── config.fs ├── configs ├── component-overrides.xml ├── gps │ ├── apdr.conf │ ├── flp.conf │ ├── gps.conf │ ├── izat.conf │ ├── lowi.conf │ ├── sap.conf │ └── xtwifi.conf ├── media_codecs_performance.xml ├── media_codecs_vendor.xml ├── media_profiles_vendor.xml ├── nfc │ ├── libnfc-nci.conf │ ├── libnfc-nxp.conf │ └── libnfc-nxp_RF.conf ├── privapp-permissions-hotword.xml ├── privapp-permissions-qti.xml ├── public.libraries.txt ├── qti_whitelist.xml ├── sec_config └── system_properties.xml ├── extract-files.py ├── fastboot-info.txt ├── framework_compatibility_matrix.xml ├── idc └── gf_input.idc ├── init ├── Android.bp ├── fstab.qcom ├── init.class_main.sh ├── init.oem.rc ├── init.qcom.class_core.sh ├── init.qcom.early_boot.sh ├── init.qcom.post_boot.sh ├── init.qcom.rc ├── init.qcom.sh ├── init.recovery.qcom.rc ├── init.target.rc └── ueventd.qcom.rc ├── keylayout └── gf_input.kl ├── lineage.dependencies ├── livedisplay ├── .clang-format ├── Android.bp ├── DisplayModes.cpp ├── DisplayModes.h ├── SunlightEnhancement.cpp ├── SunlightEnhancement.h ├── service.cpp ├── vendor.lineage.livedisplay@2.1-service.oneplus_sdm845.rc └── vendor.lineage.livedisplay@2.1-service.oneplus_sdm845.xml ├── manifest.xml ├── odm.prop ├── overlay-lineage ├── hardware │ └── oneplus │ │ └── doze │ │ └── res │ │ └── values │ │ └── config.xml ├── lineage-sdk │ ├── lineage │ │ └── res │ │ │ └── res │ │ │ └── values │ │ │ └── config.xml │ └── packages │ │ └── LineageSettingsProvider │ │ └── res │ │ └── values │ │ └── defaults.xml └── packages │ └── apps │ ├── Aperture │ └── app │ │ └── src │ │ └── main │ │ └── res │ │ └── values │ │ └── config.xml │ └── Dialer │ └── java │ └── com │ └── android │ └── dialer │ └── callrecord │ └── res │ └── values │ └── config.xml ├── overlay ├── frameworks │ └── base │ │ ├── core │ │ └── res │ │ │ └── res │ │ │ └── values │ │ │ └── config.xml │ │ └── packages │ │ ├── SettingsProvider │ │ └── res │ │ │ └── values │ │ │ └── defaults.xml │ │ └── SystemUI │ │ └── res │ │ ├── values-sw372dp │ │ └── dimens.xml │ │ └── values │ │ └── config.xml └── packages │ ├── apps │ └── CarrierConfig │ │ └── res │ │ └── xml │ │ └── vendor.xml │ └── services │ └── Telephony │ └── res │ ├── values │ └── config.xml │ └── xml │ └── telephony_injection.xml ├── pocketmode ├── Android.bp ├── AndroidManifest.xml ├── proguard.flags └── src │ └── org │ └── lineageos │ └── pocketmode │ ├── BootCompletedReceiver.java │ ├── PocketModeService.java │ └── PocketSensor.java ├── product.prop ├── proprietary-files.txt ├── rro_overlays └── WifiOverlay │ ├── Android.bp │ ├── AndroidManifest.xml │ └── res │ └── values │ └── config.xml ├── seccomp └── mediacodec.policy ├── sepolicy ├── private │ ├── pocketmode_app.te │ └── seapp_contexts ├── public │ └── file.te └── vendor │ ├── attributes │ ├── bluetooth.te │ ├── dashd.te │ ├── device.te │ ├── domain.te │ ├── file.te │ ├── file_contexts │ ├── genfs_contexts │ ├── hal_audio_default.te │ ├── hal_bluetooth_qti.te │ ├── hal_cameraHIDL.te │ ├── hal_cameraHIDL_default.te │ ├── hal_camera_default.te │ ├── hal_fingerprint_device.te │ ├── hal_ifaa.te │ ├── hal_ifaa_default.te │ ├── hal_iop_default.te │ ├── hal_lineage_livedisplay_qti.te │ ├── hal_lineage_touch_default.te │ ├── hal_nfc_default.te │ ├── hal_param.te │ ├── hal_param_default.te │ ├── hal_perf_default.te │ ├── hal_power_default.te │ ├── hwservice.te │ ├── hwservice_contexts │ ├── init.te │ ├── opf.te │ ├── platform_app.te │ ├── property.te │ ├── property_contexts │ ├── rild.te │ ├── sensors.te │ ├── system_app.te │ ├── tee.te │ ├── thermal-engine.te │ ├── vendor_init.te │ ├── vendor_qtelephony.te │ ├── wcnss_service.te │ └── wifi-mac-generator.te ├── setup-makefiles.py ├── system.prop ├── system_ext.prop ├── touch └── include │ └── TouchscreenGestureConfig.h ├── vendor.prop └── wifi ├── WCNSS_qcom_cfg.ini ├── p2p_supplicant_overlay.conf └── wpa_supplicant_overlay.conf /Android.bp: -------------------------------------------------------------------------------- 1 | soong_namespace { 2 | imports: ["hardware/oneplus"], 3 | } 4 | 5 | install_symlink { 6 | name: "firmware_wlan_mac.bin_symlink", 7 | vendor: true, 8 | installed_location: "firmware/wlan/qca_cld/wlan_mac.bin", 9 | symlink_target: "/mnt/vendor/persist/wlan_mac.bin", 10 | } 11 | 12 | install_symlink { 13 | name: "firmware_WCNSS_qcom_cfg.ini_symlink", 14 | vendor: true, 15 | installed_location: "firmware/wlan/qca_cld/WCNSS_qcom_cfg.ini", 16 | symlink_target: "/vendor/etc/wifi/WCNSS_qcom_cfg.ini", 17 | } 18 | -------------------------------------------------------------------------------- /BoardConfigCommon.mk: -------------------------------------------------------------------------------- 1 | 2 | # Copyright (C) 2018 The LineageOS Project 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | BOARD_VENDOR := oneplus 18 | 19 | COMMON_PATH := device/oneplus/sdm845-common 20 | 21 | # Architecture 22 | TARGET_ARCH := arm64 23 | TARGET_ARCH_VARIANT := armv8-a 24 | TARGET_CPU_ABI := arm64-v8a 25 | TARGET_CPU_ABI2 := 26 | TARGET_CPU_VARIANT := generic 27 | TARGET_CPU_VARIANT_RUNTIME := kryo385 28 | 29 | TARGET_2ND_ARCH := arm 30 | TARGET_2ND_ARCH_VARIANT := armv8-a 31 | TARGET_2ND_CPU_ABI := armeabi-v7a 32 | TARGET_2ND_CPU_ABI2 := armeabi 33 | TARGET_2ND_CPU_VARIANT := generic 34 | TARGET_2ND_CPU_VARIANT_RUNTIME := kryo385 35 | 36 | # Bootloader 37 | TARGET_BOOTLOADER_BOARD_NAME := sdm845 38 | TARGET_NO_BOOTLOADER := true 39 | 40 | # Kernel 41 | BOARD_BOOT_HEADER_VERSION := 1 42 | BOARD_KERNEL_BASE := 0x00000000 43 | BOARD_KERNEL_CMDLINE := \ 44 | androidboot.configfs=true \ 45 | androidboot.hardware=qcom \ 46 | androidboot.usbcontroller=a600000.dwc3 \ 47 | ehci-hcd.park=3 \ 48 | firmware_class.path=/vendor/firmware_mnt/image \ 49 | loop.max_part=7 \ 50 | lpm_levels.sleep_disabled=1 \ 51 | msm_rtb.filter=0x237 \ 52 | service_locator.enable=1 \ 53 | swiotlb=2048 54 | BOARD_KERNEL_IMAGE_NAME := Image.gz-dtb 55 | BOARD_KERNEL_PAGESIZE := 4096 56 | BOARD_KERNEL_SEPARATED_DTBO := true 57 | BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION) 58 | TARGET_KERNEL_ARCH := arm64 59 | TARGET_KERNEL_CONFIG := enchilada_defconfig vendor/debugfs.config 60 | TARGET_KERNEL_SOURCE := kernel/oneplus/sdm845 61 | 62 | # Platform 63 | BOARD_USES_QCOM_HARDWARE := true 64 | TARGET_BOARD_PLATFORM := sdm845 65 | 66 | # Properties 67 | TARGET_ODM_PROP += $(COMMON_PATH)/odm.prop 68 | TARGET_PRODUCT_PROP += $(COMMON_PATH)/product.prop 69 | TARGET_SYSTEM_EXT_PROP += $(COMMON_PATH)/system_ext.prop 70 | TARGET_SYSTEM_PROP += $(COMMON_PATH)/system.prop 71 | TARGET_VENDOR_PROP += $(COMMON_PATH)/vendor.prop 72 | 73 | # Treble 74 | BOARD_VNDK_VERSION := current 75 | 76 | # A/B 77 | AB_OTA_PARTITIONS += \ 78 | boot \ 79 | dtbo \ 80 | system \ 81 | vbmeta \ 82 | vendor 83 | 84 | # ANT+ 85 | BOARD_ANT_WIRELESS_DEVICE := "qualcomm-hidl" 86 | 87 | # Audio 88 | AUDIO_FEATURE_ENABLED_EXTENDED_COMPRESS_FORMAT := true 89 | AUDIO_FEATURE_ENABLED_GEF_SUPPORT := true 90 | AUDIO_FEATURE_ENABLED_PROXY_DEVICE := true 91 | AUDIO_FEATURE_ENABLED_SSR := true 92 | BOARD_SUPPORTS_SOUND_TRIGGER := true 93 | BOARD_USES_ALSA_AUDIO := true 94 | USE_CUSTOM_AUDIO_POLICY := 1 95 | 96 | # Display 97 | TARGET_SCREEN_DENSITY := 450 98 | TARGET_USES_FOD_ZPOS := true 99 | 100 | # DRM 101 | TARGET_ENABLE_MEDIADRM_64 := true 102 | 103 | # Filesystem 104 | TARGET_FS_CONFIG_GEN := $(COMMON_PATH)/config.fs 105 | 106 | # HIDL 107 | DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE := \ 108 | $(COMMON_PATH)/framework_compatibility_matrix.xml \ 109 | hardware/qcom-caf/common/vendor_framework_compatibility_matrix.xml \ 110 | hardware/qcom-caf/common/vendor_framework_compatibility_matrix_legacy.xml \ 111 | vendor/lineage/config/device_framework_matrix.xml 112 | DEVICE_MATRIX_FILE := $(COMMON_PATH)/compatibility_matrix.xml 113 | DEVICE_MANIFEST_FILE := $(COMMON_PATH)/manifest.xml 114 | 115 | # Media 116 | TARGET_USES_ION := true 117 | 118 | # Partitions 119 | BOARD_BOOTIMAGE_PARTITION_SIZE := 67108864 120 | BOARD_DTBOIMG_PARTITION_SIZE := 8388608 121 | BOARD_SYSTEMIMAGE_PARTITION_SIZE := 2998927360 122 | BOARD_USERDATAIMAGE_PARTITION_SIZE := 118112366592 123 | BOARD_VENDORIMAGE_PARTITION_SIZE := 1073741824 124 | BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4 125 | BOARD_FLASH_BLOCK_SIZE := 262144 # (BOARD_KERNEL_PAGESIZE * 64) 126 | TARGET_COPY_OUT_VENDOR := vendor 127 | 128 | # Power 129 | TARGET_TAP_TO_WAKE_NODE := "/proc/touchpanel/double_tap_enable" 130 | 131 | # Recovery 132 | BOARD_USES_RECOVERY_AS_BOOT := true 133 | TARGET_NO_RECOVERY := true 134 | TARGET_RECOVERY_FSTAB := $(COMMON_PATH)/init/fstab.qcom 135 | TARGET_RECOVERY_PIXEL_FORMAT := BGRA_8888 136 | TARGET_USERIMAGES_USE_EXT4 := true 137 | TARGET_USERIMAGES_USE_F2FS := true 138 | 139 | # RIL 140 | ENABLE_VENDOR_RIL_SERVICE := true 141 | 142 | # Security patch level 143 | VENDOR_SECURITY_PATCH := 2021-11-01 144 | 145 | # Sepolicy 146 | include device/qcom/sepolicy_vndr/SEPolicy.mk 147 | 148 | BOARD_VENDOR_SEPOLICY_DIRS += $(COMMON_PATH)/sepolicy/vendor 149 | PRODUCT_PUBLIC_SEPOLICY_DIRS += $(COMMON_PATH)/sepolicy/public 150 | PRODUCT_PRIVATE_SEPOLICY_DIRS += $(COMMON_PATH)/sepolicy/private 151 | 152 | # Verified Boot 153 | BOARD_AVB_ENABLE := true 154 | BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --set_hashtree_disabled_flag 155 | BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --set_verification_disabled_flag 156 | 157 | # WiFi 158 | BOARD_WLAN_DEVICE := qcwcn 159 | BOARD_HOSTAPD_DRIVER := NL80211 160 | BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE) 161 | BOARD_WPA_SUPPLICANT_DRIVER := NL80211 162 | BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE) 163 | WIFI_DRIVER_DEFAULT := qca_cld3 164 | WIFI_DRIVER_STATE_CTRL_PARAM := "/dev/wlan" 165 | WIFI_DRIVER_STATE_OFF := "OFF" 166 | WIFI_DRIVER_STATE_ON := "ON" 167 | WIFI_HIDL_FEATURE_DUAL_INTERFACE := true 168 | WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY := true 169 | WPA_SUPPLICANT_VERSION := VER_0_8_X 170 | 171 | # Inherit from the proprietary version 172 | include vendor/oneplus/sdm845-common/BoardConfigVendor.mk 173 | -------------------------------------------------------------------------------- /audio/audio_effects.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | -------------------------------------------------------------------------------- /audio/audio_output_policy.conf: -------------------------------------------------------------------------------- 1 | # List of profiles for the output device session where stream is routed. 2 | # A stream opened with the inputs attributes which match the "flags" and 3 | # "formats" as specified in the profile is routed to a device at 4 | # sample rate specified under "sampling_rates" and bit width under 5 | # "bit_width" and the topology extracted from the acdb data against 6 | # the "app_type". 7 | # 8 | # the flags and formats are specified using the strings corresponding to 9 | # enums in audio.h and audio_policy.h. They are concatenated with "|" 10 | # without space or "\n". 11 | # the flags and formats should match the ones in "audio_policy.conf" 12 | 13 | outputs { 14 | default { 15 | flags AUDIO_OUTPUT_FLAG_PRIMARY 16 | formats AUDIO_FORMAT_PCM_16_BIT 17 | sampling_rates 48000 18 | bit_width 16 19 | app_type 69937 20 | } 21 | proaudio { 22 | flags AUDIO_OUTPUT_FLAG_FAST|AUDIO_OUTPUT_FLAG_RAW 23 | formats AUDIO_FORMAT_PCM_16_BIT 24 | sampling_rates 48000 25 | bit_width 16 26 | app_type 69943 27 | } 28 | voip_rx { 29 | flags AUDIO_OUTPUT_FLAG_VOIP_RX 30 | formats AUDIO_FORMAT_PCM_16_BIT 31 | sampling_rates 8000|16000|32000|48000 32 | bit_width 16 33 | app_type 69946 34 | } 35 | deep_buffer { 36 | flags AUDIO_OUTPUT_FLAG_DEEP_BUFFER 37 | formats AUDIO_FORMAT_PCM_16_BIT 38 | sampling_rates 48000 39 | bit_width 16 40 | app_type 69936 41 | } 42 | direct_pcm_16 { 43 | flags AUDIO_OUTPUT_FLAG_DIRECT 44 | formats AUDIO_FORMAT_PCM_16_BIT|AUDIO_FORMAT_PCM_24_BIT_PACKED|AUDIO_FORMAT_PCM_8_24_BIT|AUDIO_FORMAT_PCM_32_BIT 45 | sampling_rates 44100|48000|88200|96000|176400|192000 46 | bit_width 16 47 | app_type 69936 48 | } 49 | direct_pcm_24 { 50 | flags AUDIO_OUTPUT_FLAG_DIRECT 51 | formats AUDIO_FORMAT_PCM_24_BIT_PACKED|AUDIO_FORMAT_PCM_8_24_BIT|AUDIO_FORMAT_PCM_32_BIT 52 | sampling_rates 44100|48000|88200|96000|176400|192000|352800|384000 53 | bit_width 24 54 | app_type 69940 55 | } 56 | direct_pcm_32 { 57 | flags AUDIO_OUTPUT_FLAG_DIRECT 58 | formats AUDIO_FORMAT_PCM_32_BIT 59 | sampling_rates 44100|48000|88200|96000|176400|192000|352800|384000 60 | bit_width 32 61 | app_type 69942 62 | } 63 | compress_passthrough { 64 | flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING|AUDIO_OUTPUT_FLAG_COMPRESS_PASSTHROUGH 65 | formats AUDIO_FORMAT_DTS|AUDIO_FORMAT_DTS_HD|AUDIO_FORMAT_DSD 66 | sampling_rates 32000|44100|48000|88200|96000|176400|192000|352800 67 | bit_width 16 68 | app_type 69941 69 | } 70 | compress_offload_16 { 71 | flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING 72 | formats AUDIO_FORMAT_MP3|AUDIO_FORMAT_PCM_16_BIT_OFFLOAD|AUDIO_FORMAT_PCM_24_BIT_OFFLOAD|AUDIO_FORMAT_FLAC|AUDIO_FORMAT_ALAC|AUDIO_FORMAT_APE|AUDIO_FORMAT_AAC_LC|AUDIO_FORMAT_AAC_HE_V1|AUDIO_FORMAT_AAC_HE_V2|AUDIO_FORMAT_WMA|AUDIO_FORMAT_WMA_PRO|AUDIO_FORMAT_VORBIS|AUDIO_FORMAT_AAC_ADTS_LC|AUDIO_FORMAT_AAC_ADTS_HE_V1|AUDIO_FORMAT_AAC_ADTS_HE_V2 73 | sampling_rates 44100|48000|88200|96000|176400|192000 74 | bit_width 16 75 | app_type 69936 76 | } 77 | compress_offload_24 { 78 | flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING 79 | formats AUDIO_FORMAT_PCM_24_BIT_OFFLOAD|AUDIO_FORMAT_FLAC|AUDIO_FORMAT_ALAC|AUDIO_FORMAT_APE|AUDIO_FORMAT_VORBIS|AUDIO_FORMAT_WMA|AUDIO_FORMAT_WMA_PRO 80 | sampling_rates 44100|48000|88200|96000|176400|192000 81 | bit_width 24 82 | app_type 69940 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /audio/audio_tuning_mixer_tavil.txt: -------------------------------------------------------------------------------- 1 | #ANC_TEST_P_PATH_MIC_STEREO Capture 2 | acdb_dev_id:85 3 | !Capture 4 | Txdevice:0 5 | 6 | enable 7 | AIF1_CAP Mixer SLIM TX7:1 8 | AIF1_CAP Mixer SLIM TX8:1 9 | CDC_IF TX7 MUX:DEC7 10 | ADC MUX7:DMIC 11 | DMIC MUX7:DMIC4 12 | CDC_IF TX8 MUX:DEC8 13 | ADC MUX8:DMIC 14 | DMIC MUX8:DMIC0 15 | SLIM_0_TX Channels:Two 16 | MultiMedia1 Mixer SLIM_0_TX:1 17 | 18 | disable 19 | MultiMedia1 Mixer SLIM_0_TX:0 20 | AIF1_CAP Mixer SLIM TX7:0 21 | AIF1_CAP Mixer SLIM TX8:0 22 | CDC_IF TX7 MUX:ZERO 23 | CDC_IF TX8 MUX:ZERO 24 | DMIC MUX7:ZERO 25 | DMIC MUX8:ZERO 26 | 27 | #ANC_TEST_S_PATH_MIC_STEREO Capture 28 | acdb_dev_id:88 29 | !Capture 30 | Txdevice:0 31 | 32 | enable 33 | AIF1_CAP Mixer SLIM TX7:1 34 | AIF1_CAP Mixer SLIM TX8:1 35 | CDC_IF TX7 MUX:DEC7 36 | ADC MUX7:ANC_FB_TUNE1 37 | ADC MUX10:DMIC 38 | DMIC MUX10:DMIC0 39 | CDC_IF TX8 MUX:DEC8 40 | ADC MUX8:ANC_FB_TUNE2 41 | ADC MUX12:DMIC 42 | DMIC MUX12:DMIC0 43 | ANC0 FB MUX:ANC_IN_EAR_SPKR 44 | ANC OUT EAR SPKR Enable Switch:1 45 | SLIM_0_TX Channels:Two 46 | MultiMedia1 Mixer SLIM_0_TX:1 47 | 48 | disable 49 | MultiMedia1 Mixer SLIM_0_TX:0 50 | AIF1_CAP Mixer SLIM TX7:0 51 | AIF1_CAP Mixer SLIM TX8:0 52 | CDC_IF TX7 MUX:ZERO 53 | CDC_IF TX8 MUX:ZERO 54 | ADC MUX7:DMIC 55 | ADC MUX8:DMIC 56 | DMIC MUX10:ZERO 57 | DMIC MUX12:ZERO 58 | ANC0 FB MUX:ZERO 59 | ANC OUT EAR SPKR Enable Switch:0 60 | 61 | 62 | #ANC_TEST_E_PATH_MIC_STEREO Capture 63 | acdb_dev_id:91 64 | !Capture 65 | Txdevice:0 66 | 67 | enable 68 | AIF1_CAP Mixer SLIM TX7:1 69 | AIF1_CAP Mixer SLIM TX8:1 70 | CDC_IF TX7 MUX:DEC7 71 | ADC MUX7:ANC_FB_TUNE1 72 | ADC MUX10:DMIC 73 | DMIC MUX10:DMIC4 74 | CDC_IF TX8 MUX:DEC8 75 | ADC MUX8:ANC_FB_TUNE2 76 | ADC MUX12:DMIC 77 | DMIC MUX12:DMIC4 78 | ANC0 FB MUX:ANC_IN_EAR_SPKR 79 | ANC OUT EAR SPKR Enable Switch:1 80 | SLIM_0_TX Channels:Two 81 | MultiMedia1 Mixer SLIM_0_TX:1 82 | 83 | disable 84 | MultiMedia1 Mixer SLIM_0_TX:0 85 | AIF1_CAP Mixer SLIM TX7:0 86 | AIF1_CAP Mixer SLIM TX8:0 87 | CDC_IF TX7 MUX:ZERO 88 | CDC_IF TX8 MUX:ZERO 89 | ADC MUX7:DMIC 90 | ADC MUX8:DMIC 91 | DMIC MUX10:ZERO 92 | DMIC MUX12:ZERO 93 | ANC0 FB MUX:ZERO 94 | ANC OUT EAR SPKR Enable Switch:0 95 | 96 | 97 | #ANC_TEST_S_PATH_HANDSET_SPKR_ANC_MONO 98 | acdb_dev_id:86 99 | !Playback 100 | Rxdevice:0 101 | 102 | enable 103 | ANC Function:ON 104 | SLIM RX0 MUX:AIF1_PB 105 | SLIM_0_RX Channels:One 106 | RX INT7_1 MIX1 INP0:RX0 107 | SpkrLeft SWR DAC_Port Switch:1 108 | ANC Slot:7 109 | ANC OUT EAR SPKR Enable Switch:1 110 | ANC SPKR PA Enable Switch:1 111 | SpkrLeft WSA PA Gain:G_6_DB 112 | SLIMBUS_0_RX Audio Mixer MultiMedia1:1 113 | 114 | disable 115 | SLIMBUS_0_RX Audio Mixer MultiMedia1:0 116 | SpkrLeft WSA PA Gain:G_0_DB 117 | ANC SPKR PA Enable Switch:0 118 | ANC OUT EAR SPKR Enable Switch:0 119 | SpkrLeft SWR DAC_Port Switch:0 120 | ANC Slot:0 121 | SLIM RX0 MUX:ZERO 122 | RX INT7_1 MIX1 INP0:ZERO 123 | ANC Function:OFF 124 | 125 | #ANC_TEST_E_PATH_HANDSET_SPKR_ANC_MONO 126 | acdb_dev_id:89 127 | !Playback 128 | Rxdevice:0 129 | 130 | enable 131 | ANC Function:ON 132 | SLIM RX0 MUX:AIF1_PB 133 | SLIM_0_RX Channels:One 134 | RX INT7_1 MIX1 INP0:RX0 135 | SpkrLeft SWR DAC_Port Switch:1 136 | ANC Slot:8 137 | ANC OUT EAR SPKR Enable Switch:1 138 | ANC SPKR PA Enable Switch:1 139 | SpkrLeft WSA PA Gain:G_6_DB 140 | SLIMBUS_0_RX Audio Mixer MultiMedia1:1 141 | 142 | disable 143 | SLIMBUS_0_RX Audio Mixer MultiMedia1:0 144 | SpkrLeft WSA PA Gain:G_0_DB 145 | ANC SPKR PA Enable Switch:0 146 | ANC OUT EAR SPKR Enable Switch:0 147 | SpkrLeft SWR DAC_Port Switch:0 148 | ANC Slot:0 149 | SLIM RX0 MUX:ZERO 150 | RX INT7_1 MIX1 INP0:ZERO 151 | ANC Function:OFF 152 | 153 | #RAS_TEST_SPKR_PHONE_SPKR_STEREO 154 | acdb_dev_id:136 155 | !Playback 156 | Rxdevice:0 157 | 158 | enable 159 | SLIM RX0 MUX:AIF1_PB 160 | SLIM RX1 MUX:AIF1_PB 161 | CDC_IF RX0 MUX:SLIM RX0 162 | CDC_IF RX1 MUX:SLIM RX1 163 | SLIM_0_RX Channels:Two 164 | RX INT7_1 MIX1 INP0:RX0 165 | RX INT8_1 MIX1 INP0:RX1 166 | COMP7 Switch:1 167 | COMP8 Switch:1 168 | SpkrLeft COMP Switch:1 169 | SpkrRight COMP Switch:1 170 | SpkrLeft BOOST Switch:1 171 | SpkrRight BOOST Switch:1 172 | SpkrLeft VISENSE Switch:1 173 | SpkrRight VISENSE Switch:1 174 | SpkrLeft SWR DAC_Port Switch:1 175 | SpkrRight SWR DAC_Port Switch:1 176 | SLIMBUS_0_RX Audio Mixer MultiMedia1:1 177 | 178 | disable 179 | SLIM RX0 MUX:ZERO 180 | SLIM RX1 MUX:ZERO 181 | RX INT7_1 MIX1 INP0:ZERO 182 | RX INT8_1 MIX1 INP0:ZERO 183 | COMP7 Switch:0 184 | COMP8 Switch:0 185 | SpkrLeft COMP Switch:0 186 | SpkrRight COMP Switch:0 187 | SpkrLeft BOOST Switch:0 188 | SpkrRight BOOST Switch:0 189 | SpkrLeft VISENSE Switch:0 190 | SpkrRight VISENSE Switch:0 191 | SpkrLeft SWR DAC_Port Switch:0 192 | SpkrRight SWR DAC_Port Switch:0 193 | SLIMBUS_0_RX Audio Mixer MultiMedia1:0 194 | -------------------------------------------------------------------------------- /audio/bluetooth_hearing_aid_audio_policy_configuration.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /audio/graphite_ipc_platform_info.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 34 | 35 | 36 | 38 | 39 | 40 | 42 | 43 | 44 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /audio/listen_platform_info.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /blob-patches/PowerOffAlarm.patch: -------------------------------------------------------------------------------- 1 | --- a/smali/com/qualcomm/qti/poweroffalarm/PowerOffAlarmUtils.smali 2 | +++ b/smali/com/qualcomm/qti/poweroffalarm/PowerOffAlarmUtils.smali 3 | @@ -624,6 +624,10 @@ 4 | .local v8, "rtcTime":J 5 | sub-long v10, v1, v4 6 | 7 | + const-wide/32 v12, 0xea60 8 | + 9 | + sub-long/2addr v10, v12 10 | + 11 | .line 127 12 | .local v10, "timeDelta":J 13 | const-wide/16 v12, 0x0 14 | -------------------------------------------------------------------------------- /compatibility_matrix.xml: -------------------------------------------------------------------------------- 1 | 28 | 29 | 30 | android.frameworks.schedulerservice 31 | 1.0 32 | 33 | ISchedulingPolicyService 34 | default 35 | 36 | 37 | 38 | android.frameworks.sensorservice 39 | 1.0 40 | 41 | ISensorManager 42 | default 43 | 44 | 45 | 46 | android.hidl.allocator 47 | 1.0 48 | 49 | IAllocator 50 | ashmem 51 | 52 | 53 | 54 | android.hidl.manager 55 | 1.0 56 | 57 | IServiceManager 58 | default 59 | 60 | 61 | 62 | android.hidl.memory 63 | 1.0 64 | 65 | IMapper 66 | ashmem 67 | 68 | 69 | 70 | android.hidl.token 71 | 1.0 72 | 73 | ITokenManager 74 | default 75 | 76 | 77 | 78 | android.system.wifi.keystore 79 | 1.0 80 | 81 | IKeystore 82 | default 83 | 84 | 85 | 86 | vendor.qti.hardware.qccsyshal 87 | 1.0 88 | 89 | IQccsyshal 90 | qccsyshal 91 | 92 | 93 | 94 | vendor.qti.hardware.sigma_miracast 95 | 1.0 96 | 97 | Isigma_miracast 98 | sigmahal 99 | 100 | 101 | 102 | vendor.qti.hardware.wifi.keystore 103 | 1.0 104 | 105 | IKeystoreExt 106 | default 107 | 108 | 109 | 110 | -------------------------------------------------------------------------------- /config.fs: -------------------------------------------------------------------------------- 1 | [AID_VENDOR_QTI_DIAG] 2 | value:2901 3 | 4 | [AID_VENDOR_QDSS] 5 | value:2902 6 | 7 | [AID_VENDOR_RFS] 8 | value:2903 9 | 10 | [AID_VENDOR_RFS_SHARED] 11 | value:2904 12 | 13 | [AID_VENDOR_ADPL_ODL] 14 | value:2905 15 | 16 | [AID_VENDOR_QRTR] 17 | value:2906 18 | 19 | [AID_VENDOR_THERMAL] 20 | value:2907 21 | 22 | [AID_VENDOR_FASTRPC] 23 | value:2908 24 | 25 | [AID_VENDOR_QTR] 26 | value:2909 27 | 28 | [bt_firmware/] 29 | mode: 0771 30 | user: AID_SYSTEM 31 | group: AID_SYSTEM 32 | caps: 0 33 | 34 | [dsp/] 35 | mode: 0771 36 | user: AID_MEDIA 37 | group: AID_MEDIA 38 | caps: 0 39 | 40 | [firmware/] 41 | mode: 0771 42 | user: AID_SYSTEM 43 | group: AID_SYSTEM 44 | caps: 0 45 | 46 | [firmware/image/*] 47 | mode: 0771 48 | user: AID_SYSTEM 49 | group: AID_SYSTEM 50 | caps: 0 51 | 52 | [persist/] 53 | mode: 0771 54 | user: AID_SYSTEM 55 | group: AID_SYSTEM 56 | caps: 0 57 | 58 | [system/bin/cnss-daemon] 59 | mode: 0755 60 | user: AID_BLUETOOTH 61 | group: AID_BLUETOOTH 62 | caps: NET_BIND_SERVICE 63 | 64 | [system/bin/pd-mapper] 65 | mode: 0755 66 | user: AID_SYSTEM 67 | group: AID_SYSTEM 68 | caps: NET_BIND_SERVICE 69 | 70 | [system/bin/pm-service] 71 | mode: 0755 72 | user: AID_SYSTEM 73 | group: AID_SYSTEM 74 | caps: NET_BIND_SERVICE 75 | 76 | [system/vendor/bin/cnd] 77 | mode: 0755 78 | user: AID_SYSTEM 79 | group: AID_SYSTEM 80 | caps: NET_BIND_SERVICE NET_ADMIN BLOCK_SUSPEND 81 | 82 | [system/vendor/bin/hw/android.hardware.bluetooth@1.0-service-qti] 83 | mode: 0755 84 | user: AID_SYSTEM 85 | group: AID_SYSTEM 86 | caps: NET_ADMIN BLOCK_SUSPEND 87 | 88 | [system/vendor/bin/hw/android.hardware.bluetooth@1.0-service-qti-lazy] 89 | mode: 0755 90 | user: AID_SYSTEM 91 | group: AID_SYSTEM 92 | caps: NET_ADMIN BLOCK_SUSPEND 93 | 94 | [system/vendor/bin/ims_rtp_daemon] 95 | mode: 0755 96 | user: AID_RADIO 97 | group: AID_RADIO 98 | caps: NET_BIND_SERVICE 99 | 100 | [system/vendor/bin/imsdatadaemon] 101 | mode: 0755 102 | user: AID_RADIO 103 | group: AID_RADIO 104 | caps: NET_BIND_SERVICE 105 | 106 | [system/vendor/bin/imsrcsd] 107 | mode: 0755 108 | user: AID_RADIO 109 | group: AID_RADIO 110 | caps: NET_BIND_SERVICE WAKE_ALARM BLOCK_SUSPEND 111 | 112 | [system/vendor/bin/loc_launcher] 113 | mode: 0755 114 | user: AID_GPS 115 | group: AID_GPS 116 | caps: SETGID SETUID 117 | 118 | [system/vendor/bin/pd-mapper] 119 | mode: 0755 120 | user: AID_SYSTEM 121 | group: AID_SYSTEM 122 | caps: NET_BIND_SERVICE 123 | 124 | [system/vendor/bin/pm-service] 125 | mode: 0755 126 | user: AID_SYSTEM 127 | group: AID_SYSTEM 128 | caps: NET_BIND_SERVICE 129 | 130 | [system/vendor/bin/slim_daemon] 131 | mode: 0755 132 | user: AID_GPS 133 | group: AID_GPS 134 | caps: NET_BIND_SERVICE 135 | 136 | [system/vendor/bin/wcnss_filter] 137 | mode: 0755 138 | user: AID_BLUETOOTH 139 | group: AID_BLUETOOTH 140 | caps: BLOCK_SUSPEND 141 | 142 | [vendor/bin/cnd] 143 | mode: 0755 144 | user: AID_SYSTEM 145 | group: AID_SYSTEM 146 | caps: NET_BIND_SERVICE NET_ADMIN BLOCK_SUSPEND 147 | 148 | [vendor/bin/hw/android.hardware.bluetooth@1.0-service-qti] 149 | mode: 0755 150 | user: AID_BLUETOOTH 151 | group: AID_BLUETOOTH 152 | caps: NET_ADMIN BLOCK_SUSPEND 153 | 154 | [vendor/bin/hw/android.hardware.bluetooth@1.0-service-qti-lazy] 155 | mode: 0755 156 | user: AID_BLUETOOTH 157 | group: AID_BLUETOOTH 158 | caps: NET_ADMIN BLOCK_SUSPEND 159 | 160 | [vendor/bin/ims_rtp_daemon] 161 | mode: 0755 162 | user: AID_RADIO 163 | group: AID_RADIO 164 | caps: NET_BIND_SERVICE 165 | 166 | [vendor/bin/imsdaemon] 167 | mode: 0755 168 | user: AID_RADIO 169 | group: AID_RADIO 170 | caps: NET_BIND_SERVICE WAKE_ALARM BLOCK_SUSPEND 171 | 172 | [vendor/bin/imsdatadaemon] 173 | mode: 0755 174 | user: AID_RADIO 175 | group: AID_RADIO 176 | caps: NET_BIND_SERVICE 177 | 178 | [vendor/bin/imsrcsd] 179 | mode: 0755 180 | user: AID_RADIO 181 | group: AID_RADIO 182 | caps: NET_BIND_SERVICE WAKE_ALARM BLOCK_SUSPEND 183 | 184 | [vendor/bin/loc_launcher] 185 | mode: 0755 186 | user: AID_GPS 187 | group: AID_GPS 188 | caps: SETGID SETUID 189 | 190 | [vendor/bin/pd-mapper] 191 | mode: 0755 192 | user: AID_SYSTEM 193 | group: AID_SYSTEM 194 | caps: NET_BIND_SERVICE 195 | 196 | [vendor/bin/pm-service] 197 | mode: 0755 198 | user: AID_SYSTEM 199 | group: AID_SYSTEM 200 | caps: NET_BIND_SERVICE 201 | 202 | [vendor/bin/sensors.qti] 203 | mode: 0755 204 | user: AID_SYSTEM 205 | group: AID_SYSTEM 206 | caps: NET_BIND_SERVICE 207 | 208 | [vendor/bin/slim_daemon] 209 | mode: 0755 210 | user: AID_GPS 211 | group: AID_GPS 212 | caps: NET_BIND_SERVICE 213 | 214 | [vendor/bin/wcnss_filter] 215 | mode: 0755 216 | user: AID_BLUETOOTH 217 | group: AID_BLUETOOTH 218 | caps: BLOCK_SUSPEND 219 | 220 | [vendor/bin/xtwifi-client] 221 | mode: 0755 222 | user: AID_GPS 223 | group: AID_GPS 224 | caps: NET_BIND_SERVICE WAKE_ALARM BLOCK_SUSPEND 225 | 226 | [vendor/firmware_mnt/image/*] 227 | mode: 0771 228 | user: AID_SYSTEM 229 | group: AID_SYSTEM 230 | caps: 0 231 | -------------------------------------------------------------------------------- /configs/component-overrides.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /configs/gps/apdr.conf: -------------------------------------------------------------------------------- 1 | # AP DR SENSOR Configuration file 2 | # 3 | # SENSOR_SERVICE options are one of below 4 | # accel,gyro,vehicle_accel,vehicle_gyro,pedometer,vehicle_odometry,accel_temp, 5 | # gyro_temp,baro,mag_calib,mag_uncalib,amd,rmd. 6 | # 7 | # SENSOR_PROVIDER options is one of -- default,native,ssc,samlite. 8 | # 9 | # SENSOR_RATE = 1~100 (Hz) 10 | # 11 | # SENSOR_SAMPLES = 1~N 12 | # 13 | # SENSOR_STATISTIC_ENABLED 14 | # bit 0: Diag Print Enabled 15 | # bit 1: Adb Print Enabled 16 | # SENSOR_STATISTIC_PRINT_COUNT 17 | # Skip Number of Print 18 | # 19 | # QDR_DYNAMIC_LOADING = 1~3 20 | # Configure QDR library to be loaded 21 | # 1: QDR3 22 | # 2: QDR2-GYRO 23 | # 3: QDR2-DWT 24 | # 25 | # 26 | 27 | ###################################### 28 | # # 29 | # QDR3 Configuration # 30 | # # 31 | # For QDR3, # 32 | # comment default configuration above# 33 | # and # 34 | # uncomment below configuration # 35 | # settings. # 36 | # # 37 | ###################################### 38 | # 39 | SENSOR_SERVICE = accel 40 | SENSOR_PROVIDER = native 41 | SENSOR_RATE = 10 42 | SENSOR_SAMPLES = 10 43 | # 44 | SENSOR_SERVICE = vehicle_speed 45 | SENSOR_PROVIDER = native 46 | SENSOR_RATE = 100 47 | SENSOR_SAMPLES = 1 48 | # 49 | SENSOR_SERVICE = gyro 50 | SENSOR_PROVIDER = native 51 | SENSOR_RATE = 10 52 | SENSOR_SAMPLES = 10 53 | # 54 | SENSOR_SERVICE = vehicle_gear 55 | SENSOR_PROVIDER = native 56 | SENSOR_RATE = 100 57 | SENSOR_SAMPLES = 1 58 | # 59 | SENSOR_SERVICE = accel_temp 60 | SENSOR_PROVIDER = native 61 | SENSOR_RATE = 1 62 | SENSOR_SAMPLES = 1 63 | # 64 | # 65 | ##Configure QDR library to be loaded 1: QDR3 2: QDR2-GYRO 3: QDR2-DWS 66 | QDR_DYNAMIC_LOADING = 1 67 | ##Specify CAN sensor type: Valid Options: 14(ODO), 2(ODO_DWT), 3(ODO_DWS) 68 | QDR_CAN_TYPE = 14 69 | ##Reporting offset before PPS boundary 70 | QDR_REPORTING_OFFSET = 20 71 | # 72 | 73 | ##Vehicle Sensor Configuration (CAN data availability) 74 | ##QDR_VEH_SENSOR_CONFIG: 75 | ## 0: VEHICLE_SENSOR_PRESENT - Vehicle Sensor is available (DEFAULT) 76 | ## 1: VEHICLE_SENSOR_OPTIONAL - Vehicle Sensor may or may not be present. 77 | #QDR_VEH_SENSOR_CONFIG = 0 78 | 79 | ##Select Wheel set (E.g.: Front two wheels, Rear two wheels OR All four wheels) 80 | ##To be used for differential wheel tick OR speed service. 81 | ##This configuration is applicable when QDR_CAN_TYPE configured as 82 | ##ODO_DWS(3) or ODO_DWT(2). 83 | ##Value "0": Use Front two wheels 84 | ##Value "1": Use Rear two wheels 85 | ##Value "2": Use All four wheels 86 | #QG_DRIVE_WHEEL_FW_RW_AW = 2 87 | ##Max Wheel tick value above which wheel tick rolls over 88 | ##This configuration is applicable when QDR_CAN_TYPE configured as ODO_DWT(2) 89 | #QG_DWT_MAX_WHEEL_TICK_COUNT = 255.0 90 | ##Configure Wheel constant for DWT based below equation 91 | ##(2 * pi * WHEEL_RADIUS / Pulses Per revolution) 92 | ##This configuration is applicable when QDR_CAN_TYPE configured as ODO_DWT(2) 93 | #QG_DWT_WHEEL_CONSTANT = 0.044 94 | # 95 | 96 | ###################################### 97 | # # 98 | # QDR2-DWT Configuration # 99 | # # 100 | # For QDR2-DWT, # 101 | # comment default configuration above# 102 | # and # 103 | # uncomment below configuration # 104 | # settings. # 105 | # # 106 | ###################################### 107 | # 108 | #SENSOR_SERVICE = vehicle_speed 109 | #SENSOR_PROVIDER = native 110 | #SENSOR_RATE = 100 111 | #SENSOR_SAMPLES = 1 112 | #SENSOR_STATISTIC_ENABLED = 3 113 | #SENSOR_STATISTIC_PRINT_COUNT = 50 114 | # 115 | #SENSOR_SERVICE = vehicle_dws 116 | #SENSOR_PROVIDER = native 117 | #SENSOR_RATE = 100 118 | #SENSOR_SAMPLES = 1 119 | #SENSOR_STATISTIC_ENABLED = 3 120 | #SENSOR_STATISTIC_PRINT_COUNT = 50 121 | # 122 | #SENSOR_SERVICE = vehicle_gear 123 | #SENSOR_PROVIDER = native 124 | #SENSOR_RATE = 100 125 | #SENSOR_SAMPLES = 1 126 | #SENSOR_STATISTIC_ENABLED = 3 127 | #SENSOR_STATISTIC_PRINT_COUNT = 50 128 | # 129 | #GNSS_POS_STATISTIC_ENABLED = 3 130 | #GNSS_POS_STATISTIC_PRNTCNT = 10 131 | #GNSS_MSR_STATISTIC_ENABLED = 3 132 | #GNSS_MSR_STATISTIC_PRNTCNT = 10 133 | # 134 | ##Configure QDR library to be loaded 1: QDR3 2: QDR2-GYRO 3: QDR2-DWS 135 | #QDR_DYNAMIC_LOADING = 3 136 | ##Enable/disable sensor data flashback feature 137 | #QDR_FLASHBACK_ENABLED = 0 138 | ##Enable/disable sensor data batching feature 139 | #QDR_BATCHING_ENABLED = 0 140 | ##Reporting offset before PPS boundary 141 | #QDR_REPORTING_OFFSET = 20 142 | ##Sensor dispatch threshold declaration 143 | #QDR_SENSDISPATCH_MS = 30 144 | 145 | 146 | ###################################### 147 | # # 148 | # QDR2-GYRO Configuration # 149 | # # 150 | # For QDR2-GYRO, # 151 | # comment default configuration above# 152 | # and # 153 | # uncomment below configuration # 154 | # settings. # 155 | # # 156 | ###################################### 157 | # 158 | #SENSOR_SERVICE = vehicle_speed 159 | #SENSOR_PROVIDER = native 160 | #SENSOR_RATE = 100 161 | #SENSOR_SAMPLES = 1 162 | # 163 | #SENSOR_SERVICE = vehicle_gyro 164 | #SENSOR_PROVIDER = native 165 | #SENSOR_RATE = 100 166 | #SENSOR_SAMPLES = 1 167 | # 168 | #SENSOR_SERVICE = vehicle_gear 169 | #SENSOR_PROVIDER = native 170 | #SENSOR_RATE = 100 171 | #SENSOR_SAMPLES = 1 172 | # 173 | ##Configure QDR library to be loaded 1: QDR3 2: QDR2-GYRO 3: QDR2-DWS 174 | #QDR_DYNAMIC_LOADING = 2 175 | ##Enable/disable sensor data flashback feature 176 | #QDR_FLASHBACK_ENABLED = 0 177 | ##Enable/disable sensor data batching feature 178 | #QDR_BATCHING_ENABLED = 0 179 | ##Reporting offset before PPS boundary 180 | #QDR_REPORTING_OFFSET = 20 181 | ##Sensor dispatch threshold declaration 182 | #QDR_SENSDISPATCH_MS = 30 183 | # 184 | -------------------------------------------------------------------------------- /configs/gps/flp.conf: -------------------------------------------------------------------------------- 1 | ################################### 2 | ##### FLP settings ##### 3 | ################################### 4 | 5 | ################################### 6 | # FLP BATCH SIZE 7 | ################################### 8 | # The number of batched locations 9 | # requested to modem. The desired number 10 | # defined below may not be satisfied, as 11 | # the modem can only return the number 12 | # of batched locations that can be allocated, 13 | # which is limited by memory. The default 14 | # batch size defined as 20 as below. 15 | BATCH_SIZE=20 16 | 17 | ################################### 18 | # FLP OUTDOOR TRIP BATCH SIZE 19 | ################################### 20 | # The number of batched locations 21 | # requested to modem for outdoor 22 | # trip batching. The desired number 23 | # defined below may not be satisfied, as 24 | # the modem can only return the number 25 | # of batched locations that can be allocated, 26 | # which is limited by memory. The default 27 | # trip batch size defined as 600 as below. 28 | OUTDOOR_TRIP_BATCH_SIZE=600 29 | 30 | ################################### 31 | # FLP BATCHING SESSION TIMEOUT 32 | ################################### 33 | # Duration with which batch session timeout 34 | # happens in milliseconds. If not specified 35 | # or set to zero, batching session timeout 36 | # defaults to 20 seconds by the modem. 37 | # BATCH_SESSION_TIMEOUT=20000 38 | 39 | ################################### 40 | # FLP BATCHING ACCURACY 41 | ################################### 42 | # Set to one of the defined values below 43 | # to define the accuracy of batching. 44 | # If not specified, accuracy defaults 45 | # to LOW. 46 | # FLP BATCHING ACCURACY values: 47 | # Low accuracy = 0 48 | # Medium accuracy = 1 49 | # High accuracy = 2 50 | ACCURACY=1 51 | 52 | #################################### 53 | # By default if network fixes are not sensor assisted 54 | # these fixes must be dropped. This parameter adds an exception 55 | # for targets where there is no PDR and we still want to 56 | # report out network fixes 57 | # 0: MUST NOT ALLOW NETWORK FIXES 58 | # 1: ALLOW NETWORK FIXES 59 | #################################### 60 | ALLOW_NETWORK_FIXES = 0 61 | -------------------------------------------------------------------------------- /configs/gps/gps.conf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LineageOS/android_device_oneplus_sdm845-common/aeeee118bfa853b682b407de4a3e59dcd72eb0aa/configs/gps/gps.conf -------------------------------------------------------------------------------- /configs/gps/lowi.conf: -------------------------------------------------------------------------------- 1 | #*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====* 2 | # 3 | # LOWI Config file - default 4 | # 5 | # GENERAL DESCRIPTION 6 | # This file contains the config params for LOWI 7 | # 8 | # Copyright (c) 2019 Qualcomm Technologies, Inc. 9 | # All Rights Reserved. 10 | # Confidential and Proprietary - Qualcomm Technologies, Inc. 11 | # 12 | # 2012-2013 Qualcomm Atheros, Inc. 13 | # All Rights Reserved. 14 | # Qualcomm Atheros Confidential and Proprietary. 15 | # 16 | # Export of this technology or software is regulated by the U.S. Government. 17 | # Diversion contrary to U.S. law prohibited. 18 | #=============================================================================*/ 19 | 20 | # X86 ONLY - UBUNTU: 21 | # Copy this file in the same directory where the executable is 22 | 23 | # Log level 24 | # EL_LOG_OFF = 0, EL_ERROR = 1, EL_WARNING = 2, EL_INFO = 3, EL_DEBUG = 4, EL_VERBOSE = 5, EL_LOG_ALL = 100 25 | LOWI_LOG_LEVEL = 4 26 | LOWI_USE_LOWI_LP = 0 27 | 28 | -------------------------------------------------------------------------------- /configs/gps/sap.conf: -------------------------------------------------------------------------------- 1 | ################################ 2 | # Sensor Settings 3 | ################################ 4 | #The following parameters are optional. 5 | #Internal defaults support MEMS sensors 6 | #native to most handset devices. 7 | #Device specific sensor characterization 8 | #for improved performance is possible as 9 | #described in SAP application notes. 10 | #GYRO_BIAS_RANDOM_WALK= 11 | #ACCEL_RANDOM_WALK_SPECTRAL_DENSITY= 12 | #ANGLE_RANDOM_WALK_SPECTRAL_DENSITY= 13 | #RATE_RANDOM_WALK_SPECTRAL_DENSITY= 14 | #VELOCITY_RANDOM_WALK_SPECTRAL_DENSITY= 15 | 16 | # DEBUG LEVELS: 0 - none, 1 - Error, 2 - Warning, 3 - Info 17 | # 4 - Debug, 5 - Verbose 18 | # If DEBUG_LEVEL is commented, Android's logging levels will be used 19 | DEBUG_LEVEL = 0 20 | # Sensor Sampling Rate Parameters for Low-Data Rate Filter (should be greater than 0) 21 | # used in loc_eng_reinit 22 | SENSOR_ACCEL_BATCHES_PER_SEC=2 23 | SENSOR_ACCEL_SAMPLES_PER_BATCH=5 24 | SENSOR_GYRO_BATCHES_PER_SEC=2 25 | SENSOR_GYRO_SAMPLES_PER_BATCH=5 26 | # Sensor Sampling Rate Parameters for High-Data Rate Filter (should be greater than 0) 27 | SENSOR_ACCEL_BATCHES_PER_SEC_HIGH=4 28 | SENSOR_ACCEL_SAMPLES_PER_BATCH_HIGH=25 29 | SENSOR_GYRO_BATCHES_PER_SEC_HIGH=4 30 | SENSOR_GYRO_SAMPLES_PER_BATCH_HIGH=25 31 | 32 | # Sensor Control Mode (0=AUTO, 1=FORCE_ON, 2=MODEM_DEFAULT) 33 | # used in loc_eng_reinit 34 | SENSOR_CONTROL_MODE=1 35 | 36 | # Bit mask used to define which sensor algorithms are used. 37 | # Setting each bit has the following definition: 38 | # 0x1 - DISABLE_INS_POSITIONING_FILTER 39 | # 0x0 - ENABLE_INS_POSITIONING_FILTER 40 | SENSOR_ALGORITHM_CONFIG_MASK=0x00 41 | 42 | #Vehicle Network Provider configuration 43 | 44 | #Service configuration strings 45 | #The number before colon in VN_X items defines version of the format of the rest of the string 46 | #VN_ACCEL_CFG=0:5 47 | #VN_GYRO_CFG=0:5.5 48 | #VN_ODOMETRY_CFG=0:2,4.5 49 | 50 | ################################################ 51 | # QDR3 configurations # 52 | ################################################ 53 | #VN_SPEED_CFG=1:131,5,8,1,2,3,1,1,9,2,14,2 54 | #VN_GEAR_CFG=1:422,20,4,0,4,1,9,0,1,2,3,4,5,6,7,8 55 | VN_SPEED_CFG=1:777,0,0,1,3,1,0.002778,0,40,8,32,8 56 | VN_GEAR_CFG=1:422,20,4,0,4,1,9,0,1,2,3,4,5,6,7,8 57 | 58 | ################################################ 59 | # QDR2-Gyro configurations # 60 | ################################################ 61 | #VN_GYRO_CFG=1:555,0,1,0,0,0,0,-6.5,6.6066,-6.5,-1.00,2,6.607,6.6068,0,0,16,0.0002,0,16,0.0002,0,16,0.0002 62 | #VN_SPEED_CFG=1:555,0,0,1,2,1,0.01,0,56,8,48,8 63 | #VN_GEAR_CFG=1:555,16,4,0,1,1,9,0,1,2,3,4,5,6,7,8 64 | 65 | ################################################ 66 | # QDR2-DWT configurations # 67 | ################################################ 68 | #VN_SPEED_CFG=1:555,22,1,2,1,1,1,0,8,8,23,1,2,0,1,0,8,8,23,1 69 | #VN_GEAR_CFG=1:555,12,4,16,14,16,8,1,2,3,4,5,6,7,8 70 | #VN_DWS_CFG=1:555,0,0,1,3,1,1,0,0,8,0,0,8,8,0,0,16,8,0,0,24,8,0,0 71 | #VN_GYRO_CFG=1:555,40,16,1.0,40,16,1.0,40,16,1.0 72 | 73 | ##################################################################################### 74 | # VNW service batching configuration strings # 75 | # VNW provider will initialize default type as Time based batching # 76 | # Each service batch value is configured to be 100 # 77 | # VN_ACCEL_CFG_BATCH_VALUE will be treated as time in Ms if VN_CFG_BATCH_TYPE # 78 | # is set to time based batching # 79 | # VN_ACCEL_CFG_BATCH_VALUE will be treated as sample count if VN_CFG_BATCH_TYPE # 80 | # is set to count based batching # 81 | # Uncomment and update batch time /sample count as per selected batching type # 82 | ##################################################################################### 83 | # Batching type 84 | # 1 - Time based (default) 85 | # 2 - Count based 86 | VN_CFG_BATCH_TYPE=1 87 | 88 | #Vehicle Accel batching value, it can either accept time in milli seconds or sample count 89 | #VN_ACCEL_CFG_BATCH_VALUE=100 90 | 91 | #Vehicle Gyro batching value, it can either accept time in milli seconds or sample count 92 | VN_GYRO_CFG_BATCH_VALUE=50 93 | 94 | #Vehicle Odo batching value, it can either accept time in milli seconds or sample count 95 | #VN_ODOMETRY_CFG_BATCH_VALUE=100 96 | 97 | #Vehicle Speed batching value, it can either accept time in milli seconds or sample count 98 | VN_SPEED_CFG_BATCH_VALUE=50 99 | 100 | #Vehicle Gear batching value, it can either accept time in milli seconds or sample count 101 | VN_GEAR_CFG_BATCH_VALUE=50 102 | 103 | #Vehicle DWS batching value, it can either accept time in milli seconds or sample count 104 | #VN_DWS_CFG_BATCH_VALUE=100 105 | #################################################################################### 106 | 107 | #Procesors clock ratio: AP and CAN bus microcontroller 108 | ################################################ 109 | # QDR3 configurations # 110 | ################################################ 111 | VN_PROC_CLOCK_RATIO=1.0 112 | 113 | ################################################ 114 | # QDR2-DWT OR QDR2-Gyro configurations # 115 | ################################################ 116 | #VN_PROC_CLOCK_RATIO = 1.0 117 | 118 | # Time source used by Sensor HAL 119 | # Setting this value controls accuracy of location sensor services. 120 | # 0 - Unknown 121 | # 1 - CLOCK_BOOTTIME 122 | # 2 - CLOCK_MONOTONIC 123 | # 3 - CLOCK_REALTIME 124 | # 4 - CLOCK_BOOTTIME using Alarm timer interface 125 | NDK_PROVIDER_TIME_SOURCE=1 126 | 127 | # Sensor Batching Configuration 128 | # 0 - Time based 129 | # 1 - Fixed count based 130 | # 2 - Variable count based 131 | COUNT_BASED_BATCHING=1 132 | SYNC_ONCE=0 133 | 134 | # Vehicle Network Data optimization 135 | # Default value: 0 136 | # Value 0x40000 - Speed(bit 18 eSLIM_SERVICE_VEHICLE_SPEED) 137 | # Value 0x80000 - Speed(bit 19 eSLIM_SERVICE_VEHICLE_DWS) 138 | # Value 0x100000 - Speed(bit 20 eSLIM_SERVICE_VEHICLE_GEAR) 139 | VN_ENABLE_DATA_OPTIMIZATION=0x100000 140 | 141 | # Vehicle Network Data Routing time interval 142 | # This is applicable only if VN_ENABLE_DATA_OPTIMIZATION value is set 143 | # Default value: 5000 msec 144 | VN_DATA_ROUTING_TIME_INTERVAL_MSEC=3000 145 | 146 | #Sensor HAL Provider Configuration HAL Library name including path 147 | ################################################ 148 | # # 149 | # Configuration for BMI 160 Sensor # 150 | # # 151 | ################################################ 152 | #SENSOR_TYPE=2 153 | #SENSOR_HAL_LIB_PATH=/usr/lib/libbmi160sensors.so.1 154 | 155 | ################################################ 156 | # # 157 | # Configuration for ASM330 Sensor # 158 | # # 159 | ################################################ 160 | SENSOR_TYPE=1 161 | SENSOR_HAL_LIB_PATH=/usr/lib/libasm330sensors.so.1 162 | 163 | 164 | ################################################ 165 | # # 166 | # Configuration for IAM20680 Sensor # 167 | # # 168 | ################################################ 169 | #SENSOR_TYPE=3 170 | #SENSOR_HAL_LIB_PATH=/usr/lib/libiam20680sensors.so.1 171 | 172 | 173 | ################################################ 174 | # # 175 | # Configuration for SMI130 Sensor # 176 | # # 177 | ################################################ 178 | #SENSOR_TYPE=4 179 | #SENSOR_HAL_LIB_PATH=/usr/lib/libsmi130sensors.so.1 180 | -------------------------------------------------------------------------------- /configs/gps/xtwifi.conf: -------------------------------------------------------------------------------- 1 | #GTP AP Project client core config file 2 | # 3 | #GENERAL DESCRIPTION 4 | #This is used by client core 5 | # 6 | #Copyright (c) 2012-2014 Qualcomm Atheros, Inc. 7 | #All Rights Reserved. 8 | #Qualcomm Atheros Confidential and Proprietary. 9 | # 10 | #Copyright (c) 2017 Qualcomm Technologies, Inc. 11 | #All Rights Reserved. 12 | #Confidential and Proprietary - Qualcomm Technologies, Inc. 13 | 14 | ############################################################################## 15 | # non-IOT devices configuration items # 16 | # For non-IOT devices, configure below configuration items # 17 | # according to the app note: 80-NK218-1 and remove the configuration items # 18 | # in section of "IOT devices configuration items". # 19 | ############################################################################## 20 | 21 | # ASN URI v2 to be used by some GTP AP modules that 22 | # need to run with ASN URI v2 protocol. 23 | XT_SERVER_ROOT_URL = https://gtp1.izatcloud.net:443/uds/v2 24 | 25 | # ASN URI v3 to be used by GTP AP modules that 26 | # can support ASN URI v3 protocol. 27 | XT_SERVER_ROOT_URL_V3 = https://gtp1.izatcloud.net:443/uds/v3 28 | 29 | # size, in bytes, of the cache on device 30 | SIZE_BYTE_TOTAL_CACHE = 5000000 31 | 32 | ############################################################################## 33 | # IOT devices configuration items # 34 | # For IOT devices, configure below configuration items # 35 | # according to the app note and remove the configuration items in section of # 36 | # "non-IOT devices configuration items". # 37 | ############################################################################## 38 | 39 | # ASN URI v3 to be used by GTP AP modules that 40 | # can support ASN URI v3 protocol. 41 | # XT_SERVER_ROOT_URL_V3 = https://gtpma1.izatcloud.net:443/uds/v3 42 | 43 | # 3: Wi-Fi APDB injection via Izat SDK. GTP server is not accessed 44 | # for any GTP requests, instead notification is sent to Izat SDK. 45 | # WiFi crowdsourcing module is disabled. 46 | # 4: Wi-Fi APDB injection via Izat SDK. GTP server is not accessed 47 | # for any GTP requests, instead notification is sent to Izat SDK. 48 | # WiFi crowdsourcing module is active, also accessed via Izat SDK. 49 | # GTP_AP_MODE = 4 50 | 51 | # 1: MP cell features relies on GTP AP for either download or upload 52 | # 0: MP cell features does not rely on GTP AP 53 | # GTP_AP_NEEDED_BY_MP_CELL = 1 54 | 55 | ############################################################################## 56 | # Configuration items applicable to all devices # 57 | ############################################################################## 58 | 59 | # Log verbosity control for most of the GTP WiFi system, including native and 60 | # Java componenets 61 | # OFF = 0, ERROR = 1, WARNING = 2, INFO = 3, DEBUG = 4, VERBOSE = 5, ALL = 100 62 | DEBUG_GLOBAL_LOG_LEVEL = 2 63 | 64 | # this is used at the server side to distinguish uploads from different maker/model 65 | # default "Qualcomm" 66 | OEM_ID_IN_REQUEST_TO_SERVER = "Qualcomm" 67 | 68 | # this is used at the server side to distinguish uploads from different maker/model 69 | # default "UNKNOWN" 70 | MODEL_ID_IN_REQUEST_TO_SERVER = "UNKNOWN" 71 | 72 | ############################################################################## 73 | # Qualcomm Network Location Provider config # 74 | ############################################################################## 75 | 76 | # Accuracy Threshold for NLP position. Position exceeds thsi threshold will be filtered out. 77 | # Default is 25000 meters. 78 | LARGE_ACCURACY_THRESHOLD_TO_FILTER_NLP_POSITION = 25000 79 | -------------------------------------------------------------------------------- /configs/media_codecs_performance.xml: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | -------------------------------------------------------------------------------- /configs/nfc/libnfc-nci.conf: -------------------------------------------------------------------------------- 1 | ###################### Start of libnfc-nci.conf ############################### 2 | 3 | ############################################################################### 4 | # Application options 5 | APPL_TRACE_LEVEL=0xFF 6 | PROTOCOL_TRACE_LEVEL=0xFFFFFFFF 7 | 8 | NFC_DEBUG_ENABLED=0x00 9 | 10 | ############################################################################### 11 | # File used for NFA storage 12 | NFA_STORAGE="/data/nfc" 13 | 14 | ############################################################################### 15 | # Configure the default Destination Gate used by HCI (the default is 4, which 16 | # is the ETSI loopback gate. 17 | NFA_HCI_DEFAULT_DEST_GATE=0xF0 18 | 19 | ############################################################################### 20 | # Force UICC to only listen to the following technology(s). 21 | # The bits are defined as tNFA_TECHNOLOGY_MASK in nfa_api.h. 22 | # Default is NFA_TECHNOLOGY_MASK_A | NFA_TECHNOLOGY_MASK_B | NFA_TECHNOLOGY_MASK_F 23 | UICC_LISTEN_TECH_MASK=0x07 24 | 25 | ############################################################################### 26 | # Forcing HOST to listen for a selected protocol 27 | # 0x00 : Disable Host Listen 28 | # 0x01 : Enable Host to Listen (A) for ISO-DEP tech A 29 | # 0x02 : Enable Host to Listen (B) for ISO-DEP tech B 30 | # 0x04 : Enable Host to Listen (F) for T3T Tag Type Protocol tech F 31 | # 0x07 : Enable Host to Listen (ABF)for ISO-DEP tech AB & T3T Tag Type Protocol tech F 32 | HOST_LISTEN_TECH_MASK=0x07 33 | 34 | ############################################################################### 35 | # Enabling/Disabling Forward functionality 36 | # Disable 0x00 37 | # Enable 0x01 38 | NXP_FWD_FUNCTIONALITY_ENABLE=0x01 39 | 40 | ############################################################################### 41 | # AID for Empty Select command 42 | # If specified, this AID will be substituted when an Empty SELECT command is 43 | # detected. The first byte is the length of the AID. Maximum length is 16. 44 | AID_FOR_EMPTY_SELECT={08:A0:00:00:01:51:00:00:00} 45 | 46 | ############################################################################### 47 | # When screen is turned off, specify the desired power state of the controller. 48 | # 0: power-off-sleep state; DEFAULT 49 | # 1: full-power state 50 | # 2: screen-off card-emulation (CE4/CE3/CE1 modes are used) 51 | SCREEN_OFF_POWER_STATE=1 52 | 53 | ############################################################################### 54 | # Default poll duration (in ms) 55 | # The default is 500ms if not set (see nfc_target.h) 56 | #NFA_DM_DISC_DURATION_POLL=300 57 | 58 | ############################################################################### 59 | # Force tag polling for the following technology(s). 60 | # The bits are defined as tNFA_TECHNOLOGY_MASK in nfa_api.h. 61 | # Default is NFA_TECHNOLOGY_MASK_A | NFA_TECHNOLOGY_MASK_B | 62 | # NFA_TECHNOLOGY_MASK_F | NFA_TECHNOLOGY_MASK_ISO15693 | 63 | # NFA_TECHNOLOGY_MASK_B_PRIME | NFA_TECHNOLOGY_MASK_KOVIO | 64 | # NFA_TECHNOLOGY_MASK_ACTIVE 65 | # 66 | # Notable bits: 67 | # NFA_TECHNOLOGY_MASK_A 0x01 /* NFC Technology A */ 68 | # NFA_TECHNOLOGY_MASK_B 0x02 /* NFC Technology B */ 69 | # NFA_TECHNOLOGY_MASK_F 0x04 /* NFC Technology F */ 70 | # NFA_TECHNOLOGY_MASK_ISO15693 0x08 /* Proprietary Technology */ 71 | POLLING_TECH_MASK=0x0F 72 | 73 | ############################################################################### 74 | # Force P2P to only listen for the following technology(s). 75 | # The bits are defined as tNFA_TECHNOLOGY_MASK in nfa_api.h. 76 | # Default is NFA_TECHNOLOGY_MASK_A | NFA_TECHNOLOGY_MASK_F | 77 | # NFA_TECHNOLOGY_MASK_A_ACTIVE | NFA_TECHNOLOGY_MASK_F_ACTIVE 78 | # 79 | # Notable bits: 80 | # NFA_TECHNOLOGY_MASK_A 0x01 /* NFC Technology A */ 81 | # NFA_TECHNOLOGY_MASK_F 0x04 /* NFC Technology F */ 82 | # NFA_TECHNOLOGY_MASK_A_ACTIVE 0x40 /* NFC Technology A active mode */ 83 | # NFA_TECHNOLOGY_MASK_F_ACTIVE 0x80 /* NFC Technology F active mode */ 84 | P2P_LISTEN_TECH_MASK=0x05 85 | 86 | ############################################################################### 87 | PRESERVE_STORAGE=0x01 88 | 89 | ############################################################################### 90 | # Deactivate notification wait time out in seconds used in ETSI Reader mode 91 | # 0 - Infinite wait 92 | NFA_DM_DISC_NTF_TIMEOUT=100 93 | 94 | ############################################################################### 95 | # AID_MATCHING constants 96 | # AID_MATCHING_EXACT_ONLY 0x00 97 | # AID_MATCHING_EXACT_OR_PREFIX 0x01 98 | # AID_MATCHING_PREFIX_ONLY 0x02 99 | # AID_MATCHING_EXACT_OR_SUBSET_OR_PREFIX 0x03 100 | AID_MATCHING_MODE=0x01 101 | 102 | ############################################################################### 103 | # NCI_RESET_TYPE options 104 | # Default 0x00, reset configurations everytime. 105 | # 0x01, reset configurations only once every boot. 106 | # 0x02, keep configurations. 107 | NCI_RESET_TYPE=0x02 108 | 109 | ############################################################################### 110 | #Set the default Felica T3T System Code : 111 | #This settings will be used when application does not set this parameter 112 | DEFAULT_SYS_CODE={FE:FE} 113 | 114 | ############################################################################### 115 | #Set the Off-Host AID supported power state: 116 | OFFHOST_AID_ROUTE_PWR_STATE=0x3B 117 | 118 | ############################################################################### 119 | #Set bit to 1 , block list is enabled 120 | #Set bit to 0, to disable block list 121 | NFA_AID_BLOCK_ROUTE=0x00 122 | 123 | ############################################################################### 124 | # Tech route options 125 | # 0x00, Route mute techs to DH, enable block bit and set power state to 0x00 126 | # 0x01, Remove mute techs from rf discover cmd 127 | MUTE_TECH_ROUTE_OPTION=0x01 128 | 129 | ############################################################################### 130 | # Set presence check retry count value. Value Range: 0 to 5 131 | # This value indicates the number of time presence check is repeated in case of 132 | # failure 133 | PRESENCE_CHECK_RETRY_COUNT=0 134 | 135 | ############################################################################### 136 | # Config option to skip ISO15693 GET_SYS_INFO command as NFC forum tool does 137 | # not support this command 138 | # 0 to Disable this behaviour 139 | # 1 to Enable this behaviour 140 | ISO15693_SKIP_GET_SYS_INFO_CMD=0 141 | 142 | ############################################################################## 143 | # Deactivate notification wait time out in seconds used in listen active state 144 | # Default is 8sec if not set or set as 0 (see nfc_target.h) 145 | NFA_DM_LISTEN_ACTIVE_DEACT_NTF_TIMEOUT=3 146 | 147 | ############################################################################## 148 | -------------------------------------------------------------------------------- /configs/nfc/libnfc-nxp_RF.conf: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # NXP RF configuration ALM/PLM settings 3 | # This section needs to be updated with the correct values based on the platform 4 | NXP_RF_CONF_BLK_1={ 5 | 20, 02, FC, 1F, 6 | A0, 0D, 04, 00, 42, FF, FF, 7 | A0, 0D, 03, 02, 43, A0, 8 | A0, 0D, 06, 02, 44, 00, 08, F6, 00, 9 | A0, 0D, 06, 02, 45, 80, 40, 00, 00, 10 | A0, 0D, 06, 02, 4A, 00, 00, 00, 00, 11 | A0, 0D, 03, 02, 40, 00, 12 | A0, 0D, 03, 02, 47, 00, 13 | A0, 0D, 06, 02, 35, 00, 3E, 00, 00, 14 | A0, 0D, 06, 02, 33, 0F, 40, 04, 00, 15 | A0, 0D, 06, 04, 35, F4, 05, 70, 02, 16 | A0, 0D, 06, 04, 42, F8, 40, FF, FF, 17 | A0, 0D, 06, C2, 35, 00, 3E, 00, 03, 18 | A0, 0D, 06, C2, 34, F7, 7F, 10, 08, 19 | A0, 0D, 06, C2, 33, 03, 40, 04, 80, 20 | A0, 0D, 06, 06, 2D, 0D, 25, 2C, 01, 21 | A0, 0D, 06, 06, 44, 04, 04, C4, 00, 22 | A0, 0D, 06, 06, 30, 70, 00, 18, 00, 23 | A0, 0D, 06, 06, 45, 83, 60, 40, 05, 24 | A0, 0D, 06, 06, 42, 00, 02, FF, F1, 25 | A0, 0D, 06, 06, 16, 0E, 00, 1F, 00, 26 | A0, 0D, 03, 06, 15, 00, 27 | A0, 0D, 06, 06, 37, 08, 76, 00, 00, 28 | A0, 0D, 06, 07, 30, 00, 00, 00, 00, 29 | A0, 0D, 06, 07, 37, 00, 00, 00, 00, 30 | A0, 0D, 06, 07, 42, 01, 10, FF, FF, 31 | A0, 0D, 03, 07, 3F, 08, 32 | A0, 0D, 03, 32, 03, 3D, 33 | A0, 0D, 04, 32, 42, F8, 40, 34 | A0, 0D, 03, 32, 16, 01, 35 | A0, 0D, 03, 32, 15, 01, 36 | A0, 0D, 06, 32, 4A, 53, 07, 00, 1B 37 | } 38 | 39 | ############################################################################### 40 | # NXP RF configuration ALM/PLM settings 41 | # This section needs to be updated with the correct values based on the platform 42 | NXP_RF_CONF_BLK_2={ 43 | 20, 02, FB, 22, 44 | A0, 0D, 03, 32, 0D, 24, 45 | A0, 0D, 03, 32, 14, 24, 46 | A0, 0D, 06, 34, 2D, DC, 20, 04, 00, 47 | A0, 0D, 06, 34, 44, 66, 0A, 00, 00, 48 | A0, 0D, 06, 3A, 4A, 56, 07, 01, 1B, 49 | A0, 0D, 04, 3A, 42, 68, 40, 50 | A0, 0D, 03, 3A, 16, 00, 51 | A0, 0D, 03, 3A, 15, 00, 52 | A0, 0D, 03, 3A, 0D, 11, 53 | A0, 0D, 03, 3A, 14, 11, 54 | A0, 0D, 06, 3C, 2D, 05, 35, 1E, 01, 55 | A0, 0D, 06, 3C, 44, 65, 09, 00, 00, 56 | A0, 0D, 06, 3E, 4A, 56, 07, 01, 1B, 57 | A0, 0D, 04, 3E, 42, 68, 40, 58 | A0, 0D, 03, 3E, 16, 00, 59 | A0, 0D, 03, 3E, 15, 00, 60 | A0, 0D, 03, 3E, 0D, 08, 61 | A0, 0D, 03, 3E, 14, 08, 62 | A0, 0D, 06, 40, 2D, 05, 45, 1E, 01, 63 | A0, 0D, 06, 40, 44, 65, 09, 00, 00, 64 | A0, 0D, 04, 42, 42, F0, 40, 65 | A0, 0D, 06, 42, 4A, 11, 07, 01, 1B, 66 | A0, 0D, 03, 42, 16, 00, 67 | A0, 0D, 03, 42, 15, 00, 68 | A0, 0D, 03, 42, 0D, 04, 69 | A0, 0D, 03, 42, 14, 04, 70 | A0, 0D, 06, 48, 44, 65, 0A, 00, 00, 71 | A0, 0D, 06, 48, 2D, 15, 34, 1F, 01, 72 | A0, 0D, 06, 46, 4A, 33, 07, 00, 07, 73 | A0, 0D, 04, 46, 42, 68, 40, 74 | A0, 0D, 03, 46, 16, 00, 75 | A0, 0D, 03, 46, 15, 00, 76 | A0, 0D, 06, 4C, 44, 65, 09, 00, 00, 77 | A0, 0D, 06, 4C, 2D, 05, 35, 1E, 01 78 | } 79 | 80 | ############################################################################### 81 | # NXP RF configuration ALM/PLM settings 82 | # This section needs to be updated with the correct values based on the platform 83 | NXP_RF_CONF_BLK_3={ 84 | 20, 02, F9, 21, 85 | A0, 0D, 06, 4A, 4A, 13, 07, 01, 07, 86 | A0, 0D, 04, 4A, 42, 68, 40, 87 | A0, 0D, 03, 4A, 16, 00, 88 | A0, 0D, 03, 4A, 15, 00, 89 | A0, 0D, 06, 50, 44, 65, 09, 00, 00, 90 | A0, 0D, 06, 50, 2D, 05, 35, 1E, 01, 91 | A0, 0D, 06, 4E, 4A, 12, 07, 01, 07, 92 | A0, 0D, 04, 4E, 42, 68, 40, 93 | A0, 0D, 03, 4E, 16, 00, 94 | A0, 0D, 03, 4E, 15, 00, 95 | A0, 0D, 04, 52, 42, 68, 40, 96 | A0, 0D, 06, 52, 4A, 11, 07, 01, 07, 97 | A0, 0D, 03, 52, 16, 00, 98 | A0, 0D, 03, 52, 15, 00, 99 | A0, 0D, 06, 58, 2D, 0D, 48, 0C, 01, 100 | A0, 0D, 06, 58, 44, 66, 08, 00, 00, 101 | A0, 0D, 06, 5E, 2D, 0D, 5A, 0C, 01, 102 | A0, 0D, 06, 5E, 44, 55, 08, 00, 00, 103 | A0, 0D, 04, 56, 42, 78, 40, 104 | A0, 0D, 06, 56, 4A, 43, 07, 00, 07, 105 | A0, 0D, 03, 56, 16, 00, 106 | A0, 0D, 03, 56, 15, 00, 107 | A0, 0D, 04, 5C, 42, 80, 40, 108 | A0, 0D, 06, 5C, 4A, 11, 07, 01, 07, 109 | A0, 0D, 03, 5C, 16, 00, 110 | A0, 0D, 03, 5C, 15, 00, 111 | A0, 0D, 06, 30, 44, 05, 04, C4, 00, 112 | A0, 0D, 03, 24, 03, 7D, 113 | A0, 0D, 06, 7A, 16, 8E, 00, 1F, 00, 114 | A0, 0D, 03, 28, 16, 00, 115 | A0, 0D, 03, 2C, 16, 00, 116 | A0, 0D, 06, 70, 44, 04, 04, C4, 00, 117 | A0, 0D, 06, 74, 30, E0, 00, 30, 00 118 | } 119 | 120 | ############################################################################### 121 | # NXP RF configuration ALM/PLM settings 122 | # This section needs to be updated with the correct values based on the platform 123 | NXP_RF_CONF_BLK_4={ 124 | 20, 02, FA, 1F, 125 | A0, 0D, 03, 74, 45, 70, 126 | A0, 0D, 03, 75, 45, 60, 127 | A0, 0D, 06, 78, 30, 40, 00, 20, 00, 128 | A0, 0D, 06, 78, 44, 02, 04, C4, 00, 129 | A0, 0D, 06, 7C, 30, 26, 00, 08, 00, 130 | A0, 0D, 06, 7C, 44, 11, 00, C4, 00, 131 | A0, 0D, 06, 80, 30, 70, 00, 18, 00, 132 | A0, 0D, 06, 80, 44, 04, 04, C4, 00, 133 | A0, 0D, 06, 84, 30, B0, 00, 45, 00, 134 | A0, 0D, 06, 88, 30, B0, 00, 45, 00, 135 | A0, 0D, 06, 8C, 30, 70, 00, 18, 00, 136 | A0, 0D, 03, 92, 30, 00, 137 | A0, 0D, 03, 93, 30, 00, 138 | A0, 0D, 06, 08, 45, C3, 82, 71, 05, 139 | A0, 0D, 03, 0A, 44, 60, 140 | A0, 0D, 06, 0A, 30, 70, 00, 18, 00, 141 | A0, 0D, 03, 0A, 48, 10, 142 | A0, 0D, 06, 0A, 45, 80, 40, 00, 00, 143 | A0, 0D, 06, 0A, 2D, 0D, 25, 2C, 01, 144 | A0, 0D, 03, 0A, 35, 0C, 145 | A0, 0D, 06, 0B, 30, 00, 00, 00, 00, 146 | A0, 0D, 03, 0B, 48, 00, 147 | A0, 0D, 06, 0B, 85, 00, 00, 00, 00, 148 | A0, 0D, 06, 1E, 44, 05, 04, C4, 00, 149 | A0, 0D, 06, 36, 44, 04, 04, C4, 00, 150 | A0, 0D, 03, 10, 16, 00, 151 | A0, 0D, 06, 10, 37, 00, 00, 00, 00, 152 | A0, 0D, 03, 10, 35, 0C, 153 | A0, 0D, 06, C4, 42, F8, 40, FF, FF, 154 | A0, 0D, 06, C4, 4A, 53, 07, 00, 1B, 155 | A0, 0D, 06, C6, 42, 78, 40, FF, FF 156 | } 157 | 158 | ############################################################################### 159 | # NXP RF configuration ALM/PLM settings 160 | # This section needs to be updated with the correct values based on the platform 161 | NXP_RF_CONF_BLK_5={ 162 | 20, 02, B3, 0D, 163 | A0, 0D, 06, C6, 4A, 43, 07, 00, 07, 164 | A0, 0D, 06, C8, 42, 80, 40, FF, FF, 165 | A0, 0D, 06, C8, 4A, 11, 07, 01, 07, 166 | A0, 0D, 03, 6C, 16, 01, 167 | A0, 0D, 03, 6C, 15, 01, 168 | A0, 0D, 03, 90, 16, 00, 169 | A0, 0D, 03, 90, 15, 00, 170 | A0, 0D, 03, 96, 16, 00, 171 | A0, 0D, 03, 96, 15, 00, 172 | A0, 0D, 04, CA, 42, 68, 40, 173 | A0, 0D, 06, CA, 44, 65, 0A, 00, 00, 174 | A0, 0D, 06, CA, 2D, 15, 34, 1F, 01, 175 | A0, 0B, 57, 11, 11, 90, 78, 0F, 4E, 00, 3D, 95, 00, 00, 3D, 9F, 00, 00, 50, 9F, 00, 00, 59, 9F, 00, 00, 5A, 9F, 00, 00, 64, 9F, 00, 00, 65, 9F, 00, 00, 6E, 9F, 00, 00, 72, 9F, 00, 00, 79, 9F, 00, 00, 7B, 9F, 00, 00, 84, 9F, 00, 00, 86, 9F, 00, 00, 8F, 9F, 00, 00, 91, 9F, 00, 00, 9A, 9F, 00, 00, A1, 9F, 00, 00, A7, 9F, 00, 00, B0, 1F, 00, 00, B9, 1F, 00, 00 176 | } 177 | 178 | ############################################################################### 179 | # NXP RF configuration ALM/PLM settings 180 | # This section needs to be updated with the correct values based on the platform 181 | NXP_RF_CONF_BLK_6={ 182 | 20, 02, D6, 01, A0, 34, D2, 23, 04, 18, 47, 40, 00, 20, 60, 01, 10, 20, 60, 01, 1A, 20, A0, 02, 28, 20, A0, 02, 3C, 00, 40, 01, 5C, 00, 40, 01, 93, 00, A0, 02, 00, 00, 08, 02, 00, 00, 08, 02, 00, 00, 08, 02, 00, 00, 08, 02, 00, 00, 08, 02, 00, 00, 08, 02, 00, 00, 48, 01, 00, 00, 08, 03, 00, 00, 08, 01, 00, 00, C8, 02, 00, 00, C8, 00, 00, 00, 88, 02, 00, 00, 48, 02, 00, 00, B8, 00, 00, 00, 68, 00, 00, 00, 18, 00, 00, 00, 08, 02, 00, 00, 00, 00, 00, 00, 00, 00, 47, 00, 20, 60, 01, 10, 20, 60, 01, 1A, 20, A0, 02, 28, 20, A0, 02, 3C, 00, 40, 01, 5C, 00, 40, 01, 93, 00, A0, 02, 00, 00, 08, 02, 00, 00, 08, 02, 00, 00, 08, 02, 00, 00, 08, 02, 00, 00, 08, 02, 00, 00, 08, 02, 00, 00, 48, 01, 00, 00, 08, 03, 00, 00, 08, 01, 00, 00, C8, 02, 00, 00, C8, 00, 00, 00, 88, 02, 00, 00, 48, 02, 00, 00, B8, 00, 00, 00, 68, 00, 00, 00, 18, 00, 00, 00, 08, 02, 00, 00, 00, 00 183 | } 184 | 185 | ############################################################################### 186 | -------------------------------------------------------------------------------- /configs/privapp-permissions-hotword.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /configs/privapp-permissions-qti.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 23 | 24 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | -------------------------------------------------------------------------------- /configs/public.libraries.txt: -------------------------------------------------------------------------------- 1 | libqti-perfd-client.so 2 | libadsprpc.so 3 | libcdsprpc.so 4 | libsdsprpc.so 5 | libfastcvopt.so 6 | liblistensoundmodel2.so 7 | libOpenCL.so 8 | -------------------------------------------------------------------------------- /configs/qti_whitelist.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | -------------------------------------------------------------------------------- /configs/system_properties.xml: -------------------------------------------------------------------------------- 1 | 2 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /extract-files.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env -S PYTHONPATH=../../../tools/extract-utils python3 2 | # 3 | # SPDX-FileCopyrightText: 2024 The LineageOS Project 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | 7 | from extract_utils.fixups_blob import ( 8 | blob_fixup, 9 | blob_fixups_user_type, 10 | ) 11 | from extract_utils.fixups_lib import ( 12 | lib_fixups, 13 | lib_fixups_user_type, 14 | ) 15 | from extract_utils.main import ( 16 | ExtractUtils, 17 | ExtractUtilsModule, 18 | ) 19 | 20 | namespace_imports = [ 21 | 'device/oneplus/sdm845-common', 22 | 'hardware/oneplus', 23 | 'hardware/qcom-caf/sdm845', 24 | 'hardware/qcom-caf/wlan', 25 | 'vendor/qcom/opensource/commonsys-intf/display', 26 | 'vendor/qcom/opensource/commonsys/display', 27 | 'vendor/qcom/opensource/dataservices', 28 | 'vendor/qcom/opensource/display', 29 | ] 30 | 31 | 32 | def lib_fixup_vendor_suffix(lib: str, partition: str, *args, **kwargs): 33 | return f'{lib}_{partition}' if partition == 'vendor' else None 34 | 35 | 36 | lib_fixups: lib_fixups_user_type = { 37 | **lib_fixups, 38 | ( 39 | 'com.qualcomm.qti.dpm.api@1.0', 40 | 'libmmosal', 41 | 'vendor.qti.hardware.wifidisplaysession@1.0', 42 | 'vendor.qti.imsrtpservice@3.0', 43 | ): lib_fixup_vendor_suffix, 44 | } 45 | 46 | blob_fixups: blob_fixups_user_type = { 47 | 'product/app/PowerOffAlarm/PowerOffAlarm.apk': blob_fixup() 48 | .apktool_patch('blob-patches/PowerOffAlarm.patch', '-r'), 49 | 'system_ext/bin/wfdservice': blob_fixup() 50 | .add_needed('libwfdservice_shim.so'), 51 | 'system_ext/lib/libwfdmmsrc_system.so': blob_fixup() 52 | .add_needed('libgui_shim.so'), 53 | 'system_ext/lib/libwfdservice.so': blob_fixup() 54 | .replace_needed('android.media.audio.common.types-V2-cpp.so', 'android.media.audio.common.types-V4-cpp.so'), 55 | 'system_ext/lib64/lib-imsvideocodec.so': blob_fixup() 56 | .add_needed('libgui_shim.so'), 57 | 'system_ext/lib64/libwfdnative.so': blob_fixup() 58 | .replace_needed('android.hidl.base@1.0.so', 'libhidlbase.so') 59 | .add_needed('libbinder_shim.so') 60 | .add_needed('libinput_shim.so'), 61 | 'vendor/lib/libVDBlurlessAPI_v2.so': blob_fixup() 62 | .clear_symbol_version('remote_handle_close') 63 | .clear_symbol_version('remote_handle_invoke') 64 | .clear_symbol_version('remote_handle_open'), 65 | 'vendor/lib/libmmcamera_faceproc.so': blob_fixup() 66 | .clear_symbol_version('__aeabi_memcpy') 67 | .clear_symbol_version('__aeabi_memset') 68 | .clear_symbol_version('__gnu_Unwind_Find_exidx'), 69 | ('vendor/lib64/mediadrm/libwvdrmengine.so', 'vendor/lib64/libwvhidl.so'): blob_fixup() 70 | .add_needed('libcrypto_shim.so'), 71 | } # fmt: skip 72 | 73 | module = ExtractUtilsModule( 74 | 'sdm845-common', 75 | 'oneplus', 76 | blob_fixups=blob_fixups, 77 | lib_fixups=lib_fixups, 78 | namespace_imports=namespace_imports, 79 | ) 80 | 81 | if __name__ == '__main__': 82 | utils = ExtractUtils.device(module) 83 | utils.run() 84 | -------------------------------------------------------------------------------- /fastboot-info.txt: -------------------------------------------------------------------------------- 1 | version 1 2 | flash boot 3 | flash dtbo 4 | flash --apply-vbmeta vbmeta 5 | flash system 6 | flash vendor 7 | if-wipe erase userdata 8 | -------------------------------------------------------------------------------- /framework_compatibility_matrix.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | vendor.oneplus.fingerprint.extension 4 | 1.0 5 | 6 | IVendorFingerprintExtensions 7 | default 8 | 9 | 10 | 11 | vendor.oneplus.hardware.CameraMDMHIDL 12 | 1.0 13 | 14 | IOnePlusCameraMDM 15 | default 16 | 17 | 18 | 19 | vendor.oneplus.hardware.camera 20 | 1.0 21 | 22 | IOnePlusCameraProvider 23 | default 24 | 25 | 26 | 27 | vendor.oneplus.hardware.ifaa 28 | 2.0 29 | 30 | IOneplusIfaa 31 | default 32 | 33 | 34 | 35 | vendor.oneplus.hardware.param 36 | 1.0 37 | 38 | IOneplusParam 39 | default 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /idc/gf_input.idc: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2010 The Android Open Source Project 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | # 16 | # Emulator keyboard configuration file #2. 17 | # 18 | 19 | keyboard.hasAssociatedDisplay = 1 20 | keyboard.orientationAware = 1 21 | 22 | -------------------------------------------------------------------------------- /init/Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2024 The LineageOS Project 3 | // 4 | // SPDX-License-Identifier: Apache-2.0 5 | // 6 | 7 | prebuilt_etc { 8 | name: "fstab.qcom", 9 | src: "fstab.qcom", 10 | vendor: true, 11 | ramdisk_available: true, 12 | } 13 | 14 | prebuilt_etc { 15 | name: "init.oem.rc", 16 | src: "init.oem.rc", 17 | sub_dir: "init/hw", 18 | vendor: true, 19 | } 20 | 21 | prebuilt_etc { 22 | name: "init.qcom.rc", 23 | src: "init.qcom.rc", 24 | sub_dir: "init/hw", 25 | vendor: true, 26 | } 27 | 28 | prebuilt_etc { 29 | name: "init.recovery.qcom.rc", 30 | src: "init.recovery.qcom.rc", 31 | sub_dir: "init", 32 | recovery: true, 33 | } 34 | 35 | prebuilt_etc { 36 | name: "init.target.rc", 37 | src: "init.target.rc", 38 | sub_dir: "init/hw", 39 | vendor: true, 40 | } 41 | 42 | prebuilt_etc { 43 | name: "ueventd.qcom.rc", 44 | filename: "ueventd.rc", 45 | src: "ueventd.qcom.rc", 46 | vendor: true, 47 | } 48 | 49 | sh_binary { 50 | name: "init.class_main.sh", 51 | src: "init.class_main.sh", 52 | vendor: true, 53 | } 54 | 55 | sh_binary { 56 | name: "init.qcom.class_core.sh", 57 | src: "init.qcom.class_core.sh", 58 | vendor: true, 59 | } 60 | 61 | sh_binary { 62 | name: "init.qcom.early_boot.sh", 63 | src: "init.qcom.early_boot.sh", 64 | vendor: true, 65 | } 66 | 67 | sh_binary { 68 | name: "init.qcom.post_boot.sh", 69 | src: "init.qcom.post_boot.sh", 70 | vendor: true, 71 | } 72 | 73 | sh_binary { 74 | name: "init.qcom.sh", 75 | src: "init.qcom.sh", 76 | vendor: true, 77 | } 78 | -------------------------------------------------------------------------------- /init/fstab.qcom: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2018, The Linux Foundation. All rights reserved. 2 | # 3 | # Redistribution and use in source and binary forms, with or without 4 | # modification, are permitted provided that the following conditions are 5 | # met: 6 | # * Redistributions of source code must retain the above copyright 7 | # notice, this list of conditions and the following disclaimer. 8 | # * Redistributions in binary form must reproduce the above 9 | # copyright notice, this list of conditions and the following 10 | # disclaimer in the documentation and/or other materials provided 11 | # with the distribution. 12 | # * Neither the name of The Linux Foundation nor the names of its 13 | # contributors may be used to endorse or promote products derived 14 | # from this software without specific prior written permission. 15 | # 16 | # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | 28 | # Android fstab file. 29 | # The filesystem that contains the filesystem checker binary (typically /system) cannot 30 | # specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK 31 | 32 | #TODO: Add 'check' as fs_mgr_flags with data partition. 33 | # Currently we dont have e2fsck compiled. So fs check would failed. 34 | 35 | # 36 | /dev/block/by-name/system /system ext4 ro,barrier=1,discard wait,slotselect,avb,first_stage_mount 37 | /dev/block/by-name/vendor /vendor ext4 ro,barrier=1,discard wait,slotselect,avb,first_stage_mount 38 | /dev/block/bootdevice/by-name/op2 /mnt/vendor/op2 ext4 noatime,nosuid,nodev,barrier=1,data=ordered wait,check 39 | /dev/block/bootdevice/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,noauto_da_alloc,discard wait,check,fileencryption=ice,quota,reservedsize=512M 40 | /dev/block/bootdevice/by-name/modem /vendor/firmware_mnt vfat ro,shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait,slotselect 41 | /dev/block/bootdevice/by-name/dsp /vendor/dsp ext4 ro,nosuid,nodev,barrier=1 wait,slotselect 42 | /dev/block/bootdevice/by-name/persist /mnt/vendor/persist ext4 noatime,nosuid,nodev,barrier=1 wait 43 | /dev/block/bootdevice/by-name/bluetooth /vendor/bt_firmware vfat ro,shortname=lower,uid=1002,gid=3002,dmask=227,fmask=337,context=u:object_r:bt_firmware_file:s0 wait,slotselect 44 | /devices/platform/soc/a600000.ssusb/a600000.dwc3/xhci-hcd.0.auto* /storage/usbotg vfat nosuid,nodev wait,voldmanaged=usbotg:auto 45 | # Need to have this entry in here even though the mount point itself is no longer needed. 46 | # The update_engine code looks for this entry in order to determine the boot device address 47 | # and fails if it does not find it. 48 | /dev/block/bootdevice/by-name/misc /misc emmc defaults defaults 49 | /dev/block/zram0 none swap defaults zramsize=1073741824 50 | -------------------------------------------------------------------------------- /init/init.class_main.sh: -------------------------------------------------------------------------------- 1 | #! /vendor/bin/sh 2 | 3 | # Copyright (c) 2013-2014, 2019 The Linux Foundation. All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without 6 | # modification, are permitted provided that the following conditions are met: 7 | # * Redistributions of source code must retain the above copyright 8 | # notice, this list of conditions and the following disclaimer. 9 | # * Redistributions in binary form must reproduce the above copyright 10 | # notice, this list of conditions and the following disclaimer in the 11 | # documentation and/or other materials provided with the distribution. 12 | # * Neither the name of The Linux Foundation nor 13 | # the names of its contributors may be used to endorse or promote 14 | # products derived from this software without specific prior written 15 | # permission. 16 | # 17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | # IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20 | # NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 21 | # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 22 | # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 23 | # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 24 | # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 26 | # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 27 | # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | # 29 | 30 | # 31 | # start ril-daemon only for targets on which radio is present 32 | # 33 | baseband=`getprop ro.baseband` 34 | sgltecsfb=`getprop persist.vendor.radio.sglte_csfb` 35 | datamode=`getprop persist.vendor.data.mode` 36 | low_ram=`getprop ro.config.low_ram` 37 | qcrild_status=true 38 | 39 | case "$baseband" in 40 | "apq" | "sda" | "qcs" ) 41 | setprop ro.vendor.radio.noril yes 42 | stop vendor.ril-daemon 43 | stop vendor.qcrild 44 | esac 45 | 46 | case "$baseband" in 47 | "msm" | "csfb" | "svlte2a" | "mdm" | "mdm2" | "sglte" | "sglte2" | "dsda2" | "unknown" | "dsda3" | "sdm" | "sdx" | "sm6") 48 | 49 | # For older modem packages launch ril-daemon. 50 | if [ -f /vendor/firmware_mnt/verinfo/ver_info.txt ]; then 51 | modem=`cat /vendor/firmware_mnt/verinfo/ver_info.txt | 52 | sed -n 's/^[^:]*modem[^:]*:[[:blank:]]*//p' | 53 | sed 's/.*MPSS.\(.*\)/\1/g' | cut -d \. -f 1` 54 | if [ "$modem" = "AT" ]; then 55 | version=`cat /vendor/firmware_mnt/verinfo/ver_info.txt | 56 | sed -n 's/^[^:]*modem[^:]*:[[:blank:]]*//p' | 57 | sed 's/.*AT.\(.*\)/\1/g' | cut -d \- -f 1` 58 | if [ ! -z $version ]; then 59 | if [ "$version" \< "3.1" ]; then 60 | qcrild_status=false 61 | fi 62 | fi 63 | elif [ "$modem" = "TA" ]; then 64 | version=`cat /vendor/firmware_mnt/verinfo/ver_info.txt | 65 | sed -n 's/^[^:]*modem[^:]*:[[:blank:]]*//p' | 66 | sed 's/.*TA.\(.*\)/\1/g' | cut -d \- -f 1` 67 | if [ ! -z $version ]; then 68 | if [ "$version" \< "3.0" ]; then 69 | qcrild_status=false 70 | fi 71 | fi 72 | elif [ "$modem" = "JO" ]; then 73 | version=`cat /vendor/firmware_mnt/verinfo/ver_info.txt | 74 | sed -n 's/^[^:]*modem[^:]*:[[:blank:]]*//p' | 75 | sed 's/.*JO.\(.*\)/\1/g' | cut -d \- -f 1` 76 | if [ ! -z $version ]; then 77 | if [ "$version" \< "3.2" ]; then 78 | qcrild_status=false 79 | fi 80 | fi 81 | elif [ "$modem" = "TH" ]; then 82 | qcrild_status=false 83 | fi 84 | fi 85 | 86 | if [ "$qcrild_status" = "true" ]; then 87 | # Make sure both rild, qcrild are not running at same time. 88 | # This is possible with vanilla aosp system image. 89 | stop vendor.ril-daemon 90 | 91 | start vendor.qcrild 92 | else 93 | start vendor.ril-daemon 94 | fi 95 | 96 | case "$baseband" in 97 | "svlte2a" | "csfb") 98 | start qmiproxy 99 | ;; 100 | "sglte" | "sglte2" ) 101 | if [ "x$sgltecsfb" != "xtrue" ]; then 102 | start qmiproxy 103 | else 104 | setprop persist.vendor.radio.voice.modem.index 0 105 | fi 106 | ;; 107 | esac 108 | 109 | multisim=`getprop persist.radio.multisim.config` 110 | 111 | if [ "$multisim" = "dsds" ] || [ "$multisim" = "dsda" ]; then 112 | if [ "$qcrild_status" = "true" ]; then 113 | start vendor.qcrild2 114 | else 115 | start vendor.ril-daemon2 116 | fi 117 | elif [ "$multisim" = "tsts" ]; then 118 | if [ "$qcrild_status" = "true" ]; then 119 | start vendor.qcrild2 120 | start vendor.qcrild3 121 | else 122 | start vendor.ril-daemon2 123 | start vendor.ril-daemon3 124 | fi 125 | fi 126 | 127 | case "$datamode" in 128 | "tethered") 129 | start vendor.dataqti 130 | if [ "$low_ram" != "true" ]; then 131 | start vendor.dataadpl 132 | fi 133 | ;; 134 | "concurrent") 135 | start vendor.dataqti 136 | if [ "$low_ram" != "true" ]; then 137 | start vendor.dataadpl 138 | fi 139 | ;; 140 | *) 141 | ;; 142 | esac 143 | esac 144 | 145 | # 146 | # Allow persistent faking of bms 147 | # User needs to set fake bms charge in persist.vendor.bms.fake_batt_capacity 148 | # 149 | fake_batt_capacity=`getprop persist.vendor.bms.fake_batt_capacity` 150 | case "$fake_batt_capacity" in 151 | "") ;; #Do nothing here 152 | * ) 153 | echo "$fake_batt_capacity" > /sys/class/power_supply/battery/capacity 154 | ;; 155 | esac 156 | -------------------------------------------------------------------------------- /init/init.qcom.class_core.sh: -------------------------------------------------------------------------------- 1 | #!/vendor/bin/sh 2 | 3 | # Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without 6 | # modification, are permitted provided that the following conditions are met: 7 | # * Redistributions of source code must retain the above copyright 8 | # notice, this list of conditions and the following disclaimer. 9 | # * Redistributions in binary form must reproduce the above copyright 10 | # notice, this list of conditions and the following disclaimer in the 11 | # documentation and/or other materials provided with the distribution. 12 | # * Neither the name of The Linux Foundation nor 13 | # the names of its contributors may be used to endorse or promote 14 | # products derived from this software without specific prior written 15 | # permission. 16 | # 17 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | # IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20 | # NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 21 | # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 22 | # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 23 | # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 24 | # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 26 | # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 27 | # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | # 29 | 30 | # Set platform variables 31 | target=`getprop ro.board.platform` 32 | if [ -f /sys/devices/soc0/hw_platform ]; then 33 | soc_hwplatform=`cat /sys/devices/soc0/hw_platform` 2> /dev/null 34 | else 35 | soc_hwplatform=`cat /sys/devices/system/soc/soc0/hw_platform` 2> /dev/null 36 | fi 37 | if [ -f /sys/devices/soc0/soc_id ]; then 38 | soc_hwid=`cat /sys/devices/soc0/soc_id` 2> /dev/null 39 | else 40 | soc_hwid=`cat /sys/devices/system/soc/soc0/id` 2> /dev/null 41 | fi 42 | if [ -f /sys/devices/soc0/platform_version ]; then 43 | soc_hwver=`cat /sys/devices/soc0/platform_version` 2> /dev/null 44 | else 45 | soc_hwver=`cat /sys/devices/system/soc/soc0/platform_version` 2> /dev/null 46 | fi 47 | 48 | 49 | # Dynamic Memory Managment (DMM) provides a sys file system to the userspace 50 | # that can be used to plug in/out memory that has been configured as unstable. 51 | # This unstable memory can be in Active or In-Active State. 52 | # Each of which the userspace can request by writing to a sys file. 53 | # 54 | # ro.dev.dmm = 1; Indicates that DMM is enabled in the Android User Space. This 55 | # property is set in the Android system properties file. 56 | # 57 | # If ro.dev.dmm.dpd.start_address is set here then the target has a memory 58 | # configuration that supports DynamicMemoryManagement. 59 | init_DMM() 60 | { 61 | block=-1 62 | 63 | case "$target" in 64 | "msm7630_surf" | "msm7630_1x" | "msm7630_fusion" | "msm8960") 65 | ;; 66 | *) 67 | return 68 | ;; 69 | esac 70 | 71 | mem="/sys/devices/system/memory" 72 | op=`cat $mem/movable_start_bytes` 73 | case "$op" in 74 | "0") 75 | log -p i -t DMM DMM Disabled. movable_start_bytes not set: $op 76 | ;; 77 | 78 | "$mem/movable_start_bytes: No such file or directory ") 79 | log -p i -t DMM DMM Disabled. movable_start_bytes does not exist: $op 80 | ;; 81 | 82 | *) 83 | log -p i -t DMM DMM available. movable_start_bytes at $op 84 | movable_start_bytes=0x`cat $mem/movable_start_bytes` 85 | block_size_bytes=0x`cat $mem/block_size_bytes` 86 | block=$((#${movable_start_bytes}/${block_size_bytes})) 87 | 88 | chown -h system.system $mem/memory$block/state 89 | chown -h system.system $mem/probe 90 | chown -h system.system $mem/active 91 | chown -h system.system $mem/remove 92 | 93 | case "$target" in 94 | "msm7630_surf" | "msm7630_1x" | "msm7630_fusion") 95 | echo $movable_start_bytes > $mem/probe 96 | case "$?" in 97 | "0") 98 | log -p i -t DMM $movable_start_bytes to physical hotplug succeeded. 99 | ;; 100 | *) 101 | log -p e -t DMM $movable_start_bytes to physical hotplug failed. 102 | return 103 | ;; 104 | esac 105 | 106 | echo online > $mem/memory$block/state 107 | case "$?" in 108 | "0") 109 | log -p i -t DMM \'echo online\' to logical hotplug succeeded. 110 | ;; 111 | *) 112 | log -p e -t DMM \'echo online\' to logical hotplug failed. 113 | return 114 | ;; 115 | esac 116 | ;; 117 | esac 118 | 119 | setprop ro.dev.dmm.dpd.start_address $movable_start_bytes 120 | setprop ro.dev.dmm.dpd.block $block 121 | ;; 122 | esac 123 | 124 | case "$target" in 125 | "msm8960") 126 | return 127 | ;; 128 | esac 129 | 130 | # For 7X30 targets: 131 | # ro.dev.dmm.dpd.start_address is set when the target has a 2x256Mb memory 132 | # configuration. This is also used to indicate that the target is capable of 133 | # setting EBI-1 to Deep Power Down or Self Refresh. 134 | op=`cat $mem/low_power_memory_start_bytes` 135 | case "$op" in 136 | "0") 137 | log -p i -t DMM Self-Refresh-Only Disabled. low_power_memory_start_bytes not set:$op 138 | ;; 139 | "$mem/low_power_memory_start_bytes No such file or directory ") 140 | log -p i -t DMM Self-Refresh-Only Disabled. low_power_memory_start_bytes does not exist:$op 141 | ;; 142 | *) 143 | log -p i -t DMM Self-Refresh-Only available. low_power_memory_start_bytes at $op 144 | ;; 145 | esac 146 | } 147 | 148 | # 149 | # For controlling console and shell on console on 8960 - perist.serial.enable 8960 150 | # On other target use default ro.debuggable property. 151 | # 152 | serial=`getprop persist.serial.enable` 153 | dserial=`getprop ro.debuggable` 154 | case "$target" in 155 | "msm8960") 156 | case "$serial" in 157 | "0") 158 | echo 0 > /sys/devices/platform/msm_serial_hsl.0/console 159 | ;; 160 | "1") 161 | echo 1 > /sys/devices/platform/msm_serial_hsl.0/console 162 | start console 163 | ;; 164 | *) 165 | case "$dserial" in 166 | "1") 167 | start console 168 | ;; 169 | esac 170 | ;; 171 | esac 172 | ;; 173 | 174 | "msm8610" | "msm8974" | "msm8226") 175 | case "$serial" in 176 | "0") 177 | echo 0 > /sys/devices/f991f000.serial/console 178 | ;; 179 | "1") 180 | echo 1 > /sys/devices/f991f000.serial/console 181 | start console 182 | ;; 183 | *) 184 | case "$dserial" in 185 | "1") 186 | start console 187 | ;; 188 | esac 189 | ;; 190 | esac 191 | ;; 192 | *) 193 | case "$dserial" in 194 | "1") 195 | start console 196 | ;; 197 | esac 198 | ;; 199 | esac 200 | 201 | case "$target" in 202 | "msm7630_surf" | "msm7630_1x" | "msm7630_fusion") 203 | insmod /system/lib/modules/ss_mfcinit.ko 204 | insmod /system/lib/modules/ss_vencoder.ko 205 | insmod /system/lib/modules/ss_vdecoder.ko 206 | chmod -h 0666 /dev/ss_mfc_reg 207 | chmod -h 0666 /dev/ss_vdec 208 | chmod -h 0666 /dev/ss_venc 209 | 210 | init_DMM 211 | ;; 212 | 213 | "msm8960") 214 | init_DMM 215 | ;; 216 | esac 217 | -------------------------------------------------------------------------------- /init/init.recovery.qcom.rc: -------------------------------------------------------------------------------- 1 | on fs 2 | wait /dev/block/platform/soc/${ro.boot.bootdevice} 3 | symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice 4 | 5 | on init 6 | setprop sys.usb.configfs 1 7 | 8 | on property:init.svc.fastbootd=running 9 | rm /dev/block/bootdevice/by-name/boot_aging 10 | -------------------------------------------------------------------------------- /keylayout/gf_input.kl: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2012, 2014 The Linux Foundation. All rights reserved. 2 | # 3 | # Redistribution and use in source and binary forms, with or without 4 | # modification, are permitted provided that the following conditions are 5 | # met: 6 | # * Redistributions of source code must retain the above copyright 7 | # notice, this list of conditions and the following disclaimer. 8 | # * Redistributions in binary form must reproduce the above 9 | # copyright notice, this list of conditions and the following 10 | # disclaimer in the documentation and/or other materials provided 11 | # with the distribution. 12 | # * Neither the name of The Linux Foundation nor the names of its 13 | # contributors may be used to endorse or promote products derived 14 | # from this software without specific prior written permission. 15 | # 16 | # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 17 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 19 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 20 | # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 23 | # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 25 | # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 26 | # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | 28 | key 102 HOME 29 | key 116 POWER 30 | #key 60 F2 31 | #key 305 F3 32 | key 103 SYSTEM_NAVIGATION_UP 33 | key 105 SYSTEM_NAVIGATION_LEFT 34 | key 106 SYSTEM_NAVIGATION_RIGHT 35 | key 108 SYSTEM_NAVIGATION_DOWN -------------------------------------------------------------------------------- /lineage.dependencies: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "repository": "android_hardware_oneplus", 4 | "target_path": "hardware/oneplus" 5 | }, 6 | { 7 | "repository": "android_kernel_oneplus_sdm845", 8 | "target_path": "kernel/oneplus/sdm845" 9 | } 10 | ] 11 | -------------------------------------------------------------------------------- /livedisplay/.clang-format: -------------------------------------------------------------------------------- 1 | BasedOnStyle: Google 2 | AccessModifierOffset: -2 3 | AllowShortFunctionsOnASingleLine: Inline 4 | ColumnLimit: 100 5 | CommentPragmas: NOLINT:.* 6 | DerivePointerAlignment: false 7 | IndentWidth: 4 8 | PointerAlignment: Left 9 | TabWidth: 4 10 | UseTab: Never 11 | PenaltyExcessCharacter: 32 12 | -------------------------------------------------------------------------------- /livedisplay/Android.bp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2019 The LineageOS Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | 16 | cc_binary { 17 | name: "vendor.lineage.livedisplay@2.1-service.oneplus_sdm845", 18 | defaults: ["hidl_defaults"], 19 | init_rc: ["vendor.lineage.livedisplay@2.1-service.oneplus_sdm845.rc"], 20 | vintf_fragments: ["vendor.lineage.livedisplay@2.1-service.oneplus_sdm845.xml"], 21 | relative_install_path: "hw", 22 | srcs: [ 23 | ":vendor.lineage.livedisplay@2.0-sdm-pa", 24 | ":vendor.lineage.livedisplay@2.0-sdm-utils", 25 | ":vendor.lineage.livedisplay@2.1-oneplus-af", 26 | "DisplayModes.cpp", 27 | "SunlightEnhancement.cpp", 28 | "service.cpp", 29 | ], 30 | shared_libs: [ 31 | "libbase", 32 | "libbinder", 33 | "libhidlbase", 34 | "libutils", 35 | "vendor.lineage.livedisplay@2.0", 36 | "vendor.lineage.livedisplay@2.1", 37 | ], 38 | header_libs: [ 39 | "vendor.lineage.livedisplay@2.0-sdm-headers", 40 | "vendor.lineage.livedisplay@2.1-oneplus-headers", 41 | ], 42 | proprietary: true, 43 | } 44 | -------------------------------------------------------------------------------- /livedisplay/DisplayModes.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2019 The LineageOS Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #define LOG_TAG "DisplayModesService" 18 | 19 | #include "DisplayModes.h" 20 | #include 21 | #include 22 | 23 | namespace vendor { 24 | namespace lineage { 25 | namespace livedisplay { 26 | namespace V2_1 { 27 | namespace implementation { 28 | 29 | static constexpr const char* kModePath = 30 | "/sys/devices/platform/soc/ae00000.qcom,mdss_mdp/main_display/display_mode"; 31 | static constexpr const char* kDefaultPath = "/data/vendor/display/default_display_mode"; 32 | 33 | const std::map DisplayModes::kModeMap = { 34 | {0, {"Standard", "default"}}, 35 | {1, {"sRGB", "srgb"}}, 36 | {2, {"DCI P3", "dci-p3"}}, 37 | {3, {"Wide Color", "widecolor"}}, 38 | }; 39 | 40 | DisplayModes::DisplayModes() : mDefaultModeId(0) { 41 | std::ifstream defaultFile(kDefaultPath); 42 | std::string value; 43 | 44 | defaultFile >> value; 45 | LOG(DEBUG) << "Default file read result " << value << " fail " << defaultFile.fail(); 46 | if (defaultFile.fail()) { 47 | return; 48 | } 49 | 50 | for (const auto& entry : kModeMap) { 51 | if (value == entry.second.value) { 52 | mDefaultModeId = entry.first; 53 | break; 54 | } 55 | } 56 | 57 | setDisplayMode(mDefaultModeId, false); 58 | } 59 | 60 | // Methods from ::vendor::lineage::livedisplay::V2_1::IDisplayModes follow. 61 | Return DisplayModes::getDisplayModes(getDisplayModes_cb resultCb) { 62 | std::vector modes; 63 | for (const auto& entry : kModeMap) { 64 | modes.push_back({entry.first, entry.second.name}); 65 | } 66 | resultCb(modes); 67 | return Void(); 68 | } 69 | 70 | Return DisplayModes::getCurrentDisplayMode(getCurrentDisplayMode_cb resultCb) { 71 | int32_t currentModeId = mDefaultModeId; 72 | std::ifstream modeFile(kModePath); 73 | std::string value; 74 | 75 | modeFile >> value; 76 | if (!modeFile.fail()) { 77 | for (const auto& entry : kModeMap) { 78 | if (value == entry.second.value) { 79 | currentModeId = entry.first; 80 | break; 81 | } 82 | } 83 | } 84 | resultCb({currentModeId, kModeMap.at(currentModeId).name}); 85 | return Void(); 86 | } 87 | 88 | Return DisplayModes::getDefaultDisplayMode(getDefaultDisplayMode_cb resultCb) { 89 | resultCb({mDefaultModeId, kModeMap.at(mDefaultModeId).name}); 90 | return Void(); 91 | } 92 | 93 | Return DisplayModes::setDisplayMode(int32_t modeID, bool makeDefault) { 94 | const auto iter = kModeMap.find(modeID); 95 | if (iter == kModeMap.end()) { 96 | return false; 97 | } 98 | std::ofstream modeFile(kModePath); 99 | modeFile << iter->second.value; 100 | if (modeFile.fail()) { 101 | return false; 102 | } 103 | 104 | if (makeDefault) { 105 | std::ofstream defaultFile(kDefaultPath); 106 | defaultFile << iter->second.value; 107 | if (defaultFile.fail()) { 108 | return false; 109 | } 110 | mDefaultModeId = iter->first; 111 | } 112 | return true; 113 | } 114 | 115 | } // namespace implementation 116 | } // namespace V2_1 117 | } // namespace livedisplay 118 | } // namespace lineage 119 | } // namespace vendor 120 | -------------------------------------------------------------------------------- /livedisplay/DisplayModes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2019 The LineageOS Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef VENDOR_LINEAGE_LIVEDISPLAY_V2_1_DISPLAYMODES_H 18 | #define VENDOR_LINEAGE_LIVEDISPLAY_V2_1_DISPLAYMODES_H 19 | 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | namespace vendor { 26 | namespace lineage { 27 | namespace livedisplay { 28 | namespace V2_1 { 29 | namespace implementation { 30 | 31 | using ::android::hardware::Return; 32 | using ::android::hardware::Void; 33 | using ::android::sp; 34 | 35 | class DisplayModes : public IDisplayModes { 36 | public: 37 | DisplayModes(); 38 | 39 | // Methods from ::vendor::lineage::livedisplay::V2_1::IDisplayModes follow. 40 | Return getDisplayModes(getDisplayModes_cb resultCb) override; 41 | Return getCurrentDisplayMode(getCurrentDisplayMode_cb resultCb) override; 42 | Return getDefaultDisplayMode(getDefaultDisplayMode_cb ResultCb) override; 43 | Return setDisplayMode(int32_t modeID, bool makeDefault) override; 44 | 45 | private: 46 | struct ModeInfo { 47 | const char* name; 48 | const char* value; 49 | }; 50 | static const std::map kModeMap; 51 | int32_t mDefaultModeId; 52 | }; 53 | 54 | } // namespace implementation 55 | } // namespace V2_1 56 | } // namespace livedisplay 57 | } // namespace lineage 58 | } // namespace vendor 59 | 60 | #endif // VENDOR_LINEAGE_LIVEDISPLAY_V2_1_DISPLAYMODES_H 61 | -------------------------------------------------------------------------------- /livedisplay/SunlightEnhancement.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2019 The LineageOS Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #define LOG_TAG "SunlightEnhancementService" 18 | 19 | #include "SunlightEnhancement.h" 20 | #include 21 | #include 22 | 23 | namespace vendor { 24 | namespace lineage { 25 | namespace livedisplay { 26 | namespace V2_1 { 27 | namespace implementation { 28 | 29 | static constexpr const char* kHbmPath = 30 | "/sys/devices/platform/soc/ae00000.qcom,mdss_mdp/main_display/hbm"; 31 | 32 | Return SunlightEnhancement::isEnabled() { 33 | std::ifstream file(kHbmPath); 34 | int result = -1; 35 | file >> result; 36 | LOG(DEBUG) << "Got result " << result << " fail " << file.fail(); 37 | return !file.fail() && result > 0; 38 | } 39 | 40 | Return SunlightEnhancement::setEnabled(bool enabled) { 41 | std::ofstream file(kHbmPath); 42 | file << (enabled ? "3" : "0"); 43 | LOG(DEBUG) << "setEnabled fail " << file.fail(); 44 | return !file.fail(); 45 | } 46 | 47 | } // namespace implementation 48 | } // namespace V2_1 49 | } // namespace livedisplay 50 | } // namespace lineage 51 | } // namespace vendor 52 | -------------------------------------------------------------------------------- /livedisplay/SunlightEnhancement.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2019 The LineageOS Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef VENDOR_LINEAGE_LIVEDISPLAY_V2_1_SUNLIGHTENHANCEMENT_H 18 | #define VENDOR_LINEAGE_LIVEDISPLAY_V2_1_SUNLIGHTENHANCEMENT_H 19 | 20 | #include 21 | #include 22 | #include 23 | 24 | namespace vendor { 25 | namespace lineage { 26 | namespace livedisplay { 27 | namespace V2_1 { 28 | namespace implementation { 29 | 30 | using ::android::hardware::Return; 31 | using ::android::hardware::Void; 32 | using ::android::sp; 33 | 34 | class SunlightEnhancement : public ISunlightEnhancement { 35 | public: 36 | // Methods from ::vendor::lineage::livedisplay::V2_1::ISunlightEnhancement follow. 37 | Return isEnabled() override; 38 | Return setEnabled(bool enabled) override; 39 | }; 40 | 41 | } // namespace implementation 42 | } // namespace V2_1 43 | } // namespace livedisplay 44 | } // namespace lineage 45 | } // namespace vendor 46 | 47 | #endif // VENDOR_LINEAGE_LIVEDISPLAY_V2_1_SUNLIGHTENHANCEMENT_H 48 | -------------------------------------------------------------------------------- /livedisplay/service.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2019 The LineageOS Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #define LOG_TAG "vendor.lineage.livedisplay@2.1-service.oneplus_sdm845" 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include "DisplayModes.h" 25 | #include "SunlightEnhancement.h" 26 | 27 | using ::vendor::lineage::livedisplay::V2_0::IPictureAdjustment; 28 | using ::vendor::lineage::livedisplay::V2_0::sdm::PictureAdjustment; 29 | using ::vendor::lineage::livedisplay::V2_0::sdm::SDMController; 30 | using ::vendor::lineage::livedisplay::V2_1::IAntiFlicker; 31 | using ::vendor::lineage::livedisplay::V2_1::IDisplayModes; 32 | using ::vendor::lineage::livedisplay::V2_1::ISunlightEnhancement; 33 | using ::vendor::lineage::livedisplay::V2_1::implementation::AntiFlicker; 34 | using ::vendor::lineage::livedisplay::V2_1::implementation::DisplayModes; 35 | using ::vendor::lineage::livedisplay::V2_1::implementation::SunlightEnhancement; 36 | 37 | int main() { 38 | std::shared_ptr controller = std::make_shared(); 39 | android::sp afService = new AntiFlicker(); 40 | android::sp modesService = new DisplayModes(); 41 | android::sp paService = new PictureAdjustment(controller); 42 | android::sp sreService = new SunlightEnhancement(); 43 | 44 | android::hardware::configureRpcThreadpool(2, true /*callerWillJoin*/); 45 | 46 | if (afService->registerAsService() != android::OK) { 47 | LOG(ERROR) << "Cannot register anti flicker HAL service."; 48 | return 1; 49 | } 50 | 51 | if (modesService->registerAsService() != android::OK) { 52 | LOG(ERROR) << "Cannot register display modes HAL service."; 53 | return 1; 54 | } 55 | 56 | if (paService->registerAsService() != android::OK) { 57 | LOG(ERROR) << "Cannot register picture adjustment HAL service."; 58 | return 1; 59 | } 60 | 61 | if (sreService->registerAsService() != android::OK) { 62 | LOG(ERROR) << "Cannot register sunlight enhancement HAL service."; 63 | return 1; 64 | } 65 | 66 | LOG(INFO) << "LiveDisplay HAL service ready."; 67 | 68 | android::hardware::joinRpcThreadpool(); 69 | 70 | LOG(ERROR) << "LiveDisplay HAL service failed to join thread pool."; 71 | return 1; 72 | } 73 | -------------------------------------------------------------------------------- /livedisplay/vendor.lineage.livedisplay@2.1-service.oneplus_sdm845.rc: -------------------------------------------------------------------------------- 1 | on init 2 | chmod 0660 /sys/class/drm/card0-DSI-1/dimlayer_bl_en 3 | chmod 0660 /sys/devices/platform/soc/ae00000.qcom,mdss_mdp/main_display/display_mode 4 | chmod 0660 /sys/devices/platform/soc/ae00000.qcom,mdss_mdp/main_display/hbm 5 | chown system graphics /sys/class/drm/card0-DSI-1/dimlayer_bl_en 6 | chown system system /sys/devices/platform/soc/ae00000.qcom,mdss_mdp/main_display/display_mode 7 | chown system system /sys/devices/platform/soc/ae00000.qcom,mdss_mdp/main_display/hbm 8 | 9 | on post-fs-data 10 | mkdir /data/misc/display 0770 system graphics 11 | 12 | service vendor.livedisplay-hal-2-1 /vendor/bin/hw/vendor.lineage.livedisplay@2.1-service.oneplus_sdm845 13 | class late_start 14 | user system 15 | group system 16 | -------------------------------------------------------------------------------- /livedisplay/vendor.lineage.livedisplay@2.1-service.oneplus_sdm845.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | vendor.lineage.livedisplay 4 | hwbinder 5 | 2.1 6 | 7 | IAntiFlicker 8 | default 9 | 10 | 11 | IDisplayModes 12 | default 13 | 14 | 15 | ISunlightEnhancement 16 | default 17 | 18 | @2.0::IPictureAdjustment/default 19 | 20 | 21 | -------------------------------------------------------------------------------- /odm.prop: -------------------------------------------------------------------------------- 1 | # QC framework value-adds 2 | ro.vendor.qti.va_odm.support=1 3 | -------------------------------------------------------------------------------- /overlay-lineage/hardware/oneplus/doze/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | oneplus.sensor.pickup 20 | oneplus.sensor.pocket 21 | 22 | -------------------------------------------------------------------------------- /overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 21 | true 22 | true 23 | 24 | 36 | 64 37 | 38 | 50 | 64 51 | 52 | 53 | true 54 | 55 | 57 | 58 | com.oneplus.camera 59 | com.oneplus.camera.service 60 | org.codeaurora.snapcam 61 | org.lineageos.aperture 62 | org.lineageos.aperture.dev 63 | 64 | 65 | -------------------------------------------------------------------------------- /overlay-lineage/lineage-sdk/packages/LineageSettingsProvider/res/values/defaults.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 23 | 2 24 | 25 | -------------------------------------------------------------------------------- /overlay-lineage/packages/apps/Aperture/app/src/main/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | true 9 | 10 | 11 | 12 | 3 13 | 14 | 15 | -------------------------------------------------------------------------------- /overlay-lineage/packages/apps/Dialer/java/com/android/dialer/callrecord/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | true 19 | 4 20 | 21 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 22 | true 23 | 24 | 25 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SystemUI/res/values-sw372dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 4dp 20 | 21 | -------------------------------------------------------------------------------- /overlay/frameworks/base/packages/SystemUI/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 22 | 23 | 24 | true 25 | 26 | -------------------------------------------------------------------------------- /overlay/packages/services/Telephony/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 21 | 22 | 24 | 25 | 26 | true 27 | 28 | 29 | true 30 | 31 | 32 | org.codeaurora.ims 33 | 34 | 35 | com.android.service.ims 36 | 37 | -------------------------------------------------------------------------------- /overlay/packages/services/Telephony/res/xml/telephony_injection.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 27 | 29 | 30 | 33 | 34 | 35 | com.android.internal.telephony.ServiceStateTracker 36 | com.android.internal.telephony.SubscriptionController 37 | com.android.internal.telephony.SubscriptionInfoUpdater 38 | com.android.internal.telephony.GsmCdmaPhone 39 | com.android.internal.telephony.PhoneSwitcher 40 | com.android.internal.telephony.IccPhoneBookInterfaceManager 41 | com.android.internal.telephony.dataconnection.DcTracker 42 | com.android.internal.telephony.RIL 43 | com.android.internal.telephony.TelephonyComponentFactory 44 | com.android.internal.telephony.MultiSimSettingController 45 | 46 | 47 | -------------------------------------------------------------------------------- /pocketmode/Android.bp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2024 The LineageOS Project 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | android_app { 8 | name: "OnePlusPocketMode", 9 | 10 | srcs: ["src/**/*.java"], 11 | 12 | certificate: "platform", 13 | platform_apis: true, 14 | privileged: true, 15 | system_ext_specific: true, 16 | 17 | optimize: { 18 | proguard_flags_files: ["proguard.flags"], 19 | }, 20 | } 21 | -------------------------------------------------------------------------------- /pocketmode/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 15 | 16 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /pocketmode/proguard.flags: -------------------------------------------------------------------------------- 1 | -keep class org.lineageos.pocketmode.* { 2 | *; 3 | } 4 | -------------------------------------------------------------------------------- /pocketmode/src/org/lineageos/pocketmode/BootCompletedReceiver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 The CyanogenMod Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.lineageos.pocketmode; 18 | 19 | import android.content.BroadcastReceiver; 20 | import android.content.Context; 21 | import android.content.Intent; 22 | import android.os.UserHandle; 23 | import android.util.Log; 24 | 25 | public class BootCompletedReceiver extends BroadcastReceiver { 26 | private static final String TAG = "OnePlusPocketMode"; 27 | 28 | @Override 29 | public void onReceive(final Context context, Intent intent) { 30 | Log.d(TAG, "Starting"); 31 | context.startServiceAsUser(new Intent(context, PocketModeService.class), 32 | UserHandle.CURRENT); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /pocketmode/src/org/lineageos/pocketmode/PocketModeService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 The CyanogenMod Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.lineageos.pocketmode; 18 | 19 | import android.app.Service; 20 | import android.content.BroadcastReceiver; 21 | import android.content.Context; 22 | import android.content.Intent; 23 | import android.content.IntentFilter; 24 | import android.os.IBinder; 25 | import android.util.Log; 26 | 27 | public class PocketModeService extends Service { 28 | private static final String TAG = "PocketModeService"; 29 | private static final boolean DEBUG = false; 30 | 31 | private PocketSensor mPocketSensor; 32 | 33 | @Override 34 | public void onCreate() { 35 | if (DEBUG) Log.d(TAG, "Creating service"); 36 | mPocketSensor = new PocketSensor(this); 37 | 38 | IntentFilter screenStateFilter = new IntentFilter(); 39 | screenStateFilter.addAction(Intent.ACTION_SCREEN_ON); 40 | screenStateFilter.addAction(Intent.ACTION_SCREEN_OFF); 41 | registerReceiver(mScreenStateReceiver, screenStateFilter); 42 | } 43 | 44 | @Override 45 | public int onStartCommand(Intent intent, int flags, int startId) { 46 | if (DEBUG) Log.d(TAG, "Starting service"); 47 | return START_STICKY; 48 | } 49 | 50 | @Override 51 | public void onDestroy() { 52 | if (DEBUG) Log.d(TAG, "Destroying service"); 53 | this.unregisterReceiver(mScreenStateReceiver); 54 | mPocketSensor.disable(); 55 | super.onDestroy(); 56 | } 57 | 58 | @Override 59 | public IBinder onBind(Intent intent) { 60 | return null; 61 | } 62 | 63 | private BroadcastReceiver mScreenStateReceiver = new BroadcastReceiver() { 64 | @Override 65 | public void onReceive(Context context, Intent intent) { 66 | if (intent.getAction().equals(Intent.ACTION_SCREEN_ON)) { 67 | if (DEBUG) Log.d(TAG, "Display on"); 68 | mPocketSensor.disable(); 69 | } else if (intent.getAction().equals(Intent.ACTION_SCREEN_OFF)) { 70 | if (DEBUG) Log.d(TAG, "Display off"); 71 | mPocketSensor.enable(); 72 | } 73 | } 74 | }; 75 | } 76 | -------------------------------------------------------------------------------- /pocketmode/src/org/lineageos/pocketmode/PocketSensor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 The CyanogenMod Project 3 | * Copyright (c) 2018 The LineageOS Project 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package org.lineageos.pocketmode; 19 | 20 | import android.content.Context; 21 | import android.hardware.Sensor; 22 | import android.hardware.SensorEvent; 23 | import android.hardware.SensorEventListener; 24 | import android.hardware.SensorManager; 25 | import android.os.FileUtils; 26 | import android.text.TextUtils; 27 | import android.util.Log; 28 | 29 | import java.io.IOException; 30 | import java.util.concurrent.ExecutorService; 31 | import java.util.concurrent.Executors; 32 | 33 | public class PocketSensor implements SensorEventListener { 34 | private static final boolean DEBUG = false; 35 | private static final String TAG = "PocketSensor"; 36 | 37 | private static final String GOODIX_FILE = 38 | "/sys/devices/platform/soc/soc:goodix_fp/proximity_state"; 39 | 40 | private ExecutorService mExecutorService; 41 | private SensorManager mSensorManager; 42 | private Sensor mSensor; 43 | private Context mContext; 44 | 45 | public PocketSensor(Context context) { 46 | mContext = context; 47 | mSensorManager = mContext.getSystemService(SensorManager.class); 48 | mExecutorService = Executors.newSingleThreadExecutor(); 49 | 50 | for (Sensor sensor : mSensorManager.getSensorList(Sensor.TYPE_ALL)) { 51 | if (TextUtils.equals(sensor.getStringType(), "oneplus.sensor.pocket")) { 52 | mSensor = sensor; 53 | break; 54 | } 55 | } 56 | } 57 | 58 | @Override 59 | public void onSensorChanged(SensorEvent event) { 60 | setFPProximityState(event.values[0] == 1.0); 61 | } 62 | 63 | @Override 64 | public void onAccuracyChanged(Sensor sensor, int accuracy) { 65 | /* Empty */ 66 | } 67 | 68 | private void setFPProximityState(boolean isNear) { 69 | try { 70 | FileUtils.stringToFile(GOODIX_FILE, isNear ? "1" : "0"); 71 | } catch (IOException e) { 72 | Log.e(TAG, "Failed to write to " + GOODIX_FILE, e); 73 | } 74 | } 75 | 76 | void enable() { 77 | if (DEBUG) Log.d(TAG, "Enabling"); 78 | mExecutorService.submit(() -> { 79 | mSensorManager.registerListener(this, mSensor, SensorManager.SENSOR_DELAY_NORMAL); 80 | }); 81 | } 82 | 83 | void disable() { 84 | if (DEBUG) Log.d(TAG, "Disabling"); 85 | mExecutorService.submit(() -> { 86 | mSensorManager.unregisterListener(this, mSensor); 87 | // Ensure FP is left enabled 88 | setFPProximityState(/* isNear */ false); 89 | }); 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /product.prop: -------------------------------------------------------------------------------- 1 | # Audio 2 | af.fast_track_multiplier=1 3 | audio.deep_buffer.media=true 4 | audio.offload.min.duration.secs=30 5 | audio.offload.video=true 6 | audio.sys.noisy.broadcast.delay=500 7 | audio.sys.offload.pstimeout.secs=3 8 | ro.af.client_heap_size_kbyte=7168 9 | -------------------------------------------------------------------------------- /rro_overlays/WifiOverlay/Android.bp: -------------------------------------------------------------------------------- 1 | runtime_resource_overlay { 2 | name: "WifiOverlay", 3 | theme: "WifiOverlay", 4 | sdk_version: "current", 5 | product_specific: true 6 | } 7 | -------------------------------------------------------------------------------- /rro_overlays/WifiOverlay/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 21 | 22 | 27 | 28 | -------------------------------------------------------------------------------- /rro_overlays/WifiOverlay/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 22 | 23 | 24 | 28 | true 29 | 30 | 34 | true 35 | 36 | 37 | 32 38 | 39 | 40 | false 41 | 42 | 43 | true 44 | 45 | 46 | true 47 | 48 | 49 | true 50 | 51 | 52 | true 53 | 54 | 55 | true 56 | 57 | 58 | true 59 | 60 | 61 | true 62 | 63 | 64 | 1000 65 | 66 | 67 | true 68 | 69 | 70 | true 71 | 72 | -------------------------------------------------------------------------------- /seccomp/mediacodec.policy: -------------------------------------------------------------------------------- 1 | # device specific syscalls 2 | # extension of services/mediacodec/minijail/seccomp_policy/mediacodec-seccomp-arm.policy 3 | pselect6: 1 4 | eventfd2: 1 5 | sendto: 1 6 | recvfrom: 1 7 | _llseek: 1 8 | sysinfo: 1 9 | getcwd: 1 10 | getdents64: 1 11 | ARM_cacheflush: 1 12 | inotify_init1: 1 13 | inotify_add_watch: 1 14 | inotify_rm_watch: 1 15 | uname: 1 16 | ueventd: 1 17 | timer_create: 1 18 | timer_settime: 1 19 | rt_sigtimedwait: 1 20 | -------------------------------------------------------------------------------- /sepolicy/private/pocketmode_app.te: -------------------------------------------------------------------------------- 1 | type pocketmode_app, domain; 2 | 3 | app_domain(pocketmode_app) 4 | 5 | allow pocketmode_app app_api_service:service_manager find; 6 | 7 | allow pocketmode_app system_app_data_file:dir create_dir_perms; 8 | allow pocketmode_app system_app_data_file:{ file lnk_file } create_file_perms; 9 | 10 | allow pocketmode_app sysfs_fpc_proximity:file { w_file_perms getattr }; 11 | -------------------------------------------------------------------------------- /sepolicy/private/seapp_contexts: -------------------------------------------------------------------------------- 1 | user=system seinfo=platform name=org.lineageos.pocketmode domain=pocketmode_app type=system_app_data_file 2 | -------------------------------------------------------------------------------- /sepolicy/public/file.te: -------------------------------------------------------------------------------- 1 | # sysfs 2 | type sysfs_fpc_proximity, fs_type, sysfs_type; 3 | -------------------------------------------------------------------------------- /sepolicy/vendor/attributes: -------------------------------------------------------------------------------- 1 | # HALs 2 | attribute hal_cameraHIDL; 3 | attribute hal_cameraHIDL_client; 4 | attribute hal_cameraHIDL_server; 5 | 6 | attribute hal_ifaa; 7 | attribute hal_ifaa_client; 8 | attribute hal_ifaa_server; 9 | 10 | attribute hal_param; 11 | attribute hal_param_client; 12 | attribute hal_param_server; 13 | -------------------------------------------------------------------------------- /sepolicy/vendor/bluetooth.te: -------------------------------------------------------------------------------- 1 | get_prop(bluetooth, vendor_bluetooth_prop) 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/dashd.te: -------------------------------------------------------------------------------- 1 | type dashd, domain; 2 | type dashd_exec, exec_type, vendor_file_type, file_type; 3 | 4 | init_daemon_domain(dashd) 5 | 6 | allow dashd sysfs_battery_supply:file w_file_perms; 7 | 8 | allow dashd proc_cmdline:file r_file_perms; 9 | 10 | allow dashd dash_device:chr_file rw_file_perms; 11 | allow dashd kmsg_device:chr_file rw_file_perms; 12 | 13 | r_dir_file(dashd, sysfs_battery_supply) 14 | r_dir_file(dashd, sysfs_dash_charger) 15 | r_dir_file(dashd, sysfs_usb_supply) 16 | -------------------------------------------------------------------------------- /sepolicy/vendor/device.te: -------------------------------------------------------------------------------- 1 | type dash_device, dev_type; 2 | type fingerprintd_device, dev_type; 3 | type op1_block_device, dev_type; 4 | type op2_block_device, dev_type; 5 | type param_block_device, dev_type; 6 | type reserve1_block_device, dev_type; 7 | type reserve2_block_device, dev_type; 8 | -------------------------------------------------------------------------------- /sepolicy/vendor/domain.te: -------------------------------------------------------------------------------- 1 | allow domain opf_file:file r_file_perms; 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/file.te: -------------------------------------------------------------------------------- 1 | # files 2 | type oem_file, file_type; 3 | type op1_file, file_type; 4 | type op2_file, file_type; 5 | type opf_file, file_type; 6 | 7 | # procfs 8 | type proc_touchpanel, fs_type, proc_type; 9 | 10 | # sysfs 11 | type sysfs_dash_charger, fs_type, proc_type, sysfs_type; 12 | type sysfs_fod, fs_type, sysfs_type; 13 | type sysfs_fpc, fs_type, sysfs_type; 14 | type sysfs_project_info, fs_type, sysfs_type; 15 | -------------------------------------------------------------------------------- /sepolicy/vendor/file_contexts: -------------------------------------------------------------------------------- 1 | # Binaries 2 | /(vendor|system/vendor)/bin/dashd u:object_r:dashd_exec:s0 3 | /(vendor|system/vendor)/bin/opf-service u:object_r:opf_exec:s0 4 | /(vendor|system/vendor)/bin/wifi-mac-generator u:object_r:wifi-mac-generator_exec:s0 5 | 6 | # Block devices 7 | /dev/block/platform/soc/1d84000\.ufshc/by-name/config u:object_r:frp_block_device:s0 8 | /dev/block/platform/soc/1d84000\.ufshc/by-name/engineering_cdt_[ab] u:object_r:custom_ab_block_device:s0 9 | /dev/block/platform/soc/1d84000\.ufshc/by-name/fw_4j1ed_[ab] u:object_r:custom_ab_block_device:s0 10 | /dev/block/platform/soc/1d84000\.ufshc/by-name/fw_4u1ea_[ab] u:object_r:custom_ab_block_device:s0 11 | /dev/block/platform/soc/1d84000\.ufshc/by-name/LOGO_[ab] u:object_r:custom_ab_block_device:s0 12 | /dev/block/platform/soc/1d84000\.ufshc/by-name/minidump u:object_r:rawdump_block_device:s0 13 | /dev/block/platform/soc/1d84000\.ufshc/by-name/oem_dycnvbk u:object_r:modem_efs_partition_device:s0 14 | /dev/block/platform/soc/1d84000\.ufshc/by-name/oem_stanvbk u:object_r:modem_efs_partition_device:s0 15 | /dev/block/platform/soc/1d84000\.ufshc/by-name/op1 u:object_r:op1_block_device:s0 16 | /dev/block/platform/soc/1d84000\.ufshc/by-name/op2 u:object_r:op2_block_device:s0 17 | /dev/block/platform/soc/1d84000\.ufshc/by-name/param u:object_r:param_block_device:s0 18 | /dev/block/platform/soc/1d84000\.ufshc/by-name/reserve1 u:object_r:reserve1_block_device:s0 19 | /dev/block/platform/soc/1d84000\.ufshc/by-name/reserve2 u:object_r:reserve2_block_device:s0 20 | /dev/block/platform/soc/1d84000\.ufshc/by-name/spunvm u:object_r:efs_boot_dev:s0 21 | 22 | # Devices 23 | /dev/dash u:object_r:dash_device:s0 24 | /dev/goodix_fp u:object_r:fingerprintd_device:s0 25 | /dev/opfeature u:object_r:opf_file:s0 26 | /dev/p73 u:object_r:nfc_device:s0 27 | /dev/pn553 u:object_r:nfc_device:s0 28 | 29 | # HALs 30 | /(vendor|system/vendor)/bin/hw/android\.hardware\.biometrics\.fingerprint@2\.1-service\.oneplus u:object_r:hal_fingerprint_default_exec:s0 31 | /(vendor|system/vendor)/bin/hw/android\.hardware\.biometrics\.fingerprint@2\.3-service\.oneplus u:object_r:hal_fingerprint_default_exec:s0 32 | /(vendor|system/vendor)/bin/hw/vendor\.lineage\.livedisplay@2\.1-service\.oneplus_sdm845 u:object_r:hal_lineage_livedisplay_qti_exec:s0 33 | /(vendor|system/vendor)/bin/hw/vendor\.lineage\.touch@1\.0-service\.oneplus u:object_r:hal_lineage_touch_default_exec:s0 34 | /(vendor|system/vendor)/bin/hw/vendor\.oneplus\.hardware\.camera@1\.0-service u:object_r:hal_cameraHIDL_default_exec:s0 35 | /(vendor|system/vendor)/bin/hw/vendor\.oneplus\.hardware\.CameraMDMHIDL@1\.0-service u:object_r:hal_cameraHIDL_default_exec:s0 36 | /(vendor|system/vendor)/bin/hw/vendor\.oneplus\.hardware\.ifaa@2\.0-service u:object_r:hal_ifaa_default_exec:s0 37 | /(vendor|system/vendor)/bin/hw/vendor\.oneplus\.hardware\.param@1\.0-service u:object_r:hal_param_default_exec:s0 38 | 39 | # OP1, OP2 files 40 | /mnt/vendor/op1(/.*)? u:object_r:op1_file:s0 41 | /mnt/vendor/op2(/.*)? u:object_r:op2_file:s0 42 | 43 | # Sys files 44 | /sys/project_info(/.*)? u:object_r:sysfs_project_info:s0 45 | -------------------------------------------------------------------------------- /sepolicy/vendor/genfs_contexts: -------------------------------------------------------------------------------- 1 | # procfs 2 | genfscon proc /dash_4300_4p45_exit u:object_r:sysfs_dash_charger:s0 3 | genfscon proc /dash_4320_4p45_exit u:object_r:sysfs_dash_charger:s0 4 | genfscon proc /dash_4510_4p45_exit u:object_r:sysfs_dash_charger:s0 5 | genfscon proc /dash_firmware_ok u:object_r:sysfs_dash_charger:s0 6 | genfscon proc /enhance_dash u:object_r:sysfs_dash_charger:s0 7 | genfscon proc /n76e_exit u:object_r:sysfs_dash_charger:s0 8 | genfscon proc /ship_mode u:object_r:sysfs_dash_charger:s0 9 | genfscon proc /swarp_chg_exist u:object_r:sysfs_dash_charger:s0 10 | genfscon proc /touchpanel u:object_r:proc_touchpanel:s0 11 | genfscon proc /warp_chg_exit u:object_r:sysfs_dash_charger:s0 12 | 13 | # sysfs 14 | genfscon sysfs /devices/platform/soc/a90000.i2c/i2c-4/4-0020/tp_gesture_touch_hold u:object_r:sysfs_fod:s0 15 | genfscon sysfs /devices/platform/soc/ae00000.qcom,mdss_mdp/drm/card0/card0-DSI-1/auth_status u:object_r:sysfs_fod:s0 16 | genfscon sysfs /devices/platform/soc/ae00000.qcom,mdss_mdp/drm/card0/card0-DSI-1/dim_alpha u:object_r:sysfs_fod:s0 17 | genfscon sysfs /devices/platform/soc/ae00000.qcom,mdss_mdp/drm/card0/card0-DSI-1/dimlayer_bl_en u:object_r:sysfs_livedisplay_tuneable:s0 18 | genfscon sysfs /devices/platform/soc/ae00000.qcom,mdss_mdp/drm/card0/card0-DSI-1/notify_dim u:object_r:sysfs_fod:s0 19 | genfscon sysfs /devices/platform/soc/ae00000.qcom,mdss_mdp/drm/card0/card0-DSI-1/notify_fppress u:object_r:sysfs_fod:s0 20 | genfscon sysfs /devices/platform/soc/ae00000.qcom,mdss_mdp/drm/card0/card0-DSI-1/power_status u:object_r:sysfs_fod:s0 21 | genfscon sysfs /devices/platform/soc/soc:fpc_fpc1020 u:object_r:sysfs_fpc:s0 22 | genfscon sysfs /devices/platform/soc/soc:goodix_fp/proximity_state u:object_r:sysfs_fpc_proximity:s0 23 | genfscon sysfs /devices/platform/soc/soc:qcom,dsi-display@18/display_mode u:object_r:sysfs_livedisplay_tuneable:s0 24 | genfscon sysfs /devices/platform/soc/soc:qcom,dsi-display@18/hbm u:object_r:sysfs_livedisplay_tuneable:s0 25 | genfscon sysfs /devices/platform/soc/soc:qcom,dsi-display@21/display_mode u:object_r:sysfs_livedisplay_tuneable:s0 26 | genfscon sysfs /devices/platform/soc/soc:qcom,dsi-display@21/hbm u:object_r:sysfs_livedisplay_tuneable:s0 27 | genfscon sysfs /module/qpnp_smb5/parameters/call_on u:object_r:sysfs_dash_charger:s0 28 | 29 | # sysfs (wakeup) 30 | genfscon sysfs /devices/platform/soc/171c0000.slim/tavil-slim-pgd/power/wakeup u:object_r:sysfs_wakeup:s0 31 | genfscon sysfs /devices/platform/soc/18800000.qcom,icnss/power/wakeup u:object_r:sysfs_wakeup:s0 32 | genfscon sysfs /devices/platform/soc/88c000.i2c/i2c-1/1-0028/power/wakeup u:object_r:sysfs_wakeup:s0 33 | genfscon sysfs /devices/platform/soc/88e0000.qcom,msm-eud/power/wakeup u:object_r:sysfs_wakeup:s0 34 | genfscon sysfs /devices/platform/soc/898000.qcom,qup_uart/tty/ttyHS0/power/wakeup u:object_r:sysfs_wakeup:s0 35 | genfscon sysfs /devices/platform/soc/a600000.ssusb/power/wakeup u:object_r:sysfs_wakeup:s0 36 | genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-00/c440000.qcom,spmi:qcom,pm8998@0:qcom,pm8998_rtc/power/wakeup u:object_r:sysfs_wakeup:s0 37 | genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-00/c440000.qcom,spmi:qcom,pm8998@0:qcom,power-on@800/power/wakeup u:object_r:sysfs_wakeup:s0 38 | genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-02/c440000.qcom,spmi:qcom,pmi8998@2:qcom,qpnp-qnovo@1500/power/wakeup u:object_r:sysfs_wakeup:s0 39 | genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-02/c440000.qcom,spmi:qcom,pmi8998@2:qcom,qpnp-smb2/power/wakeup u:object_r:sysfs_wakeup:s0 40 | genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-02/c440000.qcom,spmi:qcom,pmi8998@2:qpnp,fg/power/wakeup u:object_r:sysfs_wakeup:s0 41 | genfscon sysfs /devices/platform/soc/soc:gpio_keys/power/wakeup u:object_r:sysfs_wakeup:s0 42 | genfscon sysfs /devices/platform/vendor/vendor:extcon_usb1/power/wakeup u:object_r:sysfs_wakeup:s0 43 | genfscon sysfs /devices/virtual/misc/msm_aac/power/wakeup u:object_r:sysfs_wakeup:s0 44 | genfscon sysfs /devices/virtual/misc/msm_alac/power/wakeup u:object_r:sysfs_wakeup:s0 45 | genfscon sysfs /devices/virtual/misc/msm_amrnb/power/wakeup u:object_r:sysfs_wakeup:s0 46 | genfscon sysfs /devices/virtual/misc/msm_amrwb/power/wakeup u:object_r:sysfs_wakeup:s0 47 | genfscon sysfs /devices/virtual/misc/msm_amrwbplus/power/wakeup u:object_r:sysfs_wakeup:s0 48 | genfscon sysfs /devices/virtual/misc/msm_ape/power/wakeup u:object_r:sysfs_wakeup:s0 49 | genfscon sysfs /devices/virtual/misc/msm_evrc/power/wakeup u:object_r:sysfs_wakeup:s0 50 | genfscon sysfs /devices/virtual/misc/msm_g711alaw/power/wakeup u:object_r:sysfs_wakeup:s0 51 | genfscon sysfs /devices/virtual/misc/msm_g711mlaw/power/wakeup u:object_r:sysfs_wakeup:s0 52 | genfscon sysfs /devices/virtual/misc/msm_mp3/power/wakeup u:object_r:sysfs_wakeup:s0 53 | genfscon sysfs /devices/virtual/misc/msm_multi_aac/power/wakeup u:object_r:sysfs_wakeup:s0 54 | genfscon sysfs /devices/virtual/misc/msm_qcelp/power/wakeup u:object_r:sysfs_wakeup:s0 55 | genfscon sysfs /devices/virtual/misc/msm_wma/power/wakeup u:object_r:sysfs_wakeup:s0 56 | genfscon sysfs /devices/virtual/misc/msm_wmapro/power/wakeup u:object_r:sysfs_wakeup:s0 57 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_audio_default.te: -------------------------------------------------------------------------------- 1 | get_prop(hal_audio_default, vendor_bluetooth_prop) 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_bluetooth_qti.te: -------------------------------------------------------------------------------- 1 | r_dir_file(hal_bluetooth_qti, vendor_data_file) 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_cameraHIDL.te: -------------------------------------------------------------------------------- 1 | binder_call(hal_cameraHIDL_client, hal_cameraHIDL_server) 2 | binder_call(hal_cameraHIDL_server, hal_cameraHIDL_client) 3 | 4 | hal_attribute_hwservice(hal_cameraHIDL, hal_cameraHIDL_hwservice) 5 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_cameraHIDL_default.te: -------------------------------------------------------------------------------- 1 | type hal_cameraHIDL_default, domain; 2 | hal_server_domain(hal_cameraHIDL_default, hal_cameraHIDL) 3 | 4 | type hal_cameraHIDL_default_exec, exec_type, vendor_file_type, file_type; 5 | init_daemon_domain(hal_cameraHIDL_default) 6 | 7 | add_hwservice(hal_cameraHIDL_default, hal_cameraHIDL_hwservice) 8 | 9 | hwbinder_use(hal_cameraHIDL_default) 10 | 11 | binder_call(hal_cameraHIDL_default, hal_perf_default) 12 | 13 | allow hal_cameraHIDL_default hal_perf_hwservice:hwservice_manager find; 14 | 15 | allow hal_cameraHIDL_default ion_device:chr_file r_file_perms; 16 | allow hal_cameraHIDL_default tee_device:chr_file rw_file_perms; 17 | 18 | allow hal_cameraHIDL_default vendor_camera_data_file:dir create_dir_perms; 19 | 20 | r_dir_file(hal_cameraHIDL_default, firmware_file) 21 | 22 | get_prop(hal_cameraHIDL_default, hwservicemanager_prop) 23 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_camera_default.te: -------------------------------------------------------------------------------- 1 | hal_client_domain(hal_camera_default, hal_cameraHIDL) 2 | 3 | allow hal_camera_default mnt_vendor_file:dir w_dir_perms; 4 | allow hal_camera_default mnt_vendor_file:file create_file_perms; 5 | 6 | allow hal_camera_default oem_file:dir w_dir_perms; 7 | allow hal_camera_default oem_file:file create_file_perms; 8 | 9 | allow hal_camera_default persist_file:dir w_dir_perms; 10 | allow hal_camera_default persist_file:file create_file_perms; 11 | 12 | allow hal_camera_default input_device:dir r_dir_perms; 13 | allow hal_camera_default input_device:chr_file r_file_perms; 14 | 15 | allow hal_camera_default xdsp_device:chr_file r_file_perms; 16 | 17 | allow hal_camera_default proc_meminfo:file r_file_perms; 18 | 19 | get_prop(hal_camera_default, ctl_default_prop) 20 | get_prop(hal_camera_default, vendor_mmi_prop) 21 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_fingerprint_device.te: -------------------------------------------------------------------------------- 1 | typeattribute hal_fingerprint_default data_between_core_and_vendor_violators; 2 | 3 | allow hal_fingerprint_default self:netlink_socket create_socket_perms_no_ioctl; 4 | 5 | binder_call(hal_fingerprint_default, hal_perf_default) 6 | 7 | allow hal_fingerprint_default hal_perf_hwservice:hwservice_manager find; 8 | 9 | allow hal_fingerprint_default fingerprintd_data_file:dir rw_dir_perms; 10 | allow hal_fingerprint_default fingerprintd_data_file:file create_file_perms; 11 | 12 | allow hal_fingerprint_default fingerprintd_device:chr_file rw_file_perms; 13 | allow hal_fingerprint_default tee_device:chr_file rw_file_perms; 14 | allow hal_fingerprint_default qdsp_device:chr_file rw_file_perms; 15 | allow hal_fingerprint_default xdsp_device:chr_file rw_file_perms; 16 | 17 | allow hal_fingerprint_default proc_touchpanel:dir search; 18 | allow hal_fingerprint_default proc_touchpanel:file rw_file_perms; 19 | 20 | allow hal_fingerprint_default sysfs_fod:file rw_file_perms; 21 | 22 | allow hal_fingerprint_default sysfs_fpc:dir r_dir_perms; 23 | allow hal_fingerprint_default sysfs_fpc:file rw_file_perms; 24 | 25 | get_prop(hal_fingerprint_default, adsprpc_prop) 26 | get_prop(hal_fingerprint_default, vendor_default_prop) 27 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_ifaa.te: -------------------------------------------------------------------------------- 1 | binder_call(hal_ifaa_client, hal_ifaa_server) 2 | binder_call(hal_ifaa_server, hal_ifaa_client) 3 | 4 | hal_attribute_hwservice(hal_ifaa, hal_ifaa_hwservice) 5 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_ifaa_default.te: -------------------------------------------------------------------------------- 1 | type hal_ifaa_default, domain; 2 | hal_server_domain(hal_ifaa_default, hal_ifaa) 3 | 4 | type hal_ifaa_default_exec, exec_type, vendor_file_type, file_type; 5 | init_daemon_domain(hal_ifaa_default) 6 | 7 | add_hwservice(hal_ifaa_default, hal_ifaa_hwservice) 8 | 9 | hwbinder_use(hal_ifaa_default) 10 | 11 | binder_call(hal_ifaa_default, hal_perf_default) 12 | 13 | allow hal_ifaa_default hal_perf_hwservice:hwservice_manager find; 14 | 15 | allow hal_ifaa_default ion_device:chr_file r_file_perms; 16 | allow hal_ifaa_default tee_device:chr_file rw_file_perms; 17 | 18 | r_dir_file(hal_ifaa_default, firmware_file) 19 | 20 | get_prop(hal_ifaa_default, hwservicemanager_prop) 21 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_iop_default.te: -------------------------------------------------------------------------------- 1 | allow hal_iop_default proc_meminfo:file r_file_perms; 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_lineage_livedisplay_qti.te: -------------------------------------------------------------------------------- 1 | allow hal_lineage_livedisplay_qti display_vendor_data_file:dir rw_dir_perms; 2 | allow hal_lineage_livedisplay_qti display_vendor_data_file:file create_file_perms; 3 | 4 | allow hal_lineage_livedisplay_qti sysfs_graphics:dir r_dir_perms; 5 | allow hal_lineage_livedisplay_qti sysfs_livedisplay_tuneable:file rw_file_perms; 6 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_lineage_touch_default.te: -------------------------------------------------------------------------------- 1 | allow hal_lineage_touch_default proc_touchpanel:dir search; 2 | allow hal_lineage_touch_default proc_touchpanel:file rw_file_perms; 3 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_nfc_default.te: -------------------------------------------------------------------------------- 1 | hal_client_domain(hal_nfc_default, hal_secure_element) 2 | 3 | allow hal_nfc_default hal_secure_element_hwservice:hwservice_manager find; 4 | 5 | allow hal_nfc_default nfc_vendor_data_file:dir create_dir_perms; 6 | allow hal_nfc_default nfc_vendor_data_file:file create_file_perms; 7 | 8 | get_prop(hal_nfc_default, vendor_nfc_prop) 9 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_param.te: -------------------------------------------------------------------------------- 1 | binder_call(hal_param_client, hal_param_server) 2 | binder_call(hal_param_server, hal_param_client) 3 | 4 | hal_attribute_hwservice(hal_param, hal_param_hwservice) 5 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_param_default.te: -------------------------------------------------------------------------------- 1 | type hal_param_default, domain; 2 | hal_server_domain(hal_param_default, hal_param) 3 | 4 | type hal_param_default_exec, exec_type, vendor_file_type, file_type; 5 | init_daemon_domain(hal_param_default) 6 | 7 | allow hal_param_default self:qipcrtr_socket create_socket_perms_no_ioctl; 8 | 9 | allow hal_param_default block_device:dir search; 10 | 11 | allow hal_param_default param_block_device:blk_file rw_file_perms; 12 | 13 | r_dir_file(hal_param_default, sysfs_project_info) 14 | 15 | get_prop(hal_param_default, exported_default_prop) 16 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_perf_default.te: -------------------------------------------------------------------------------- 1 | allow hal_perf_default proc_meminfo:file r_file_perms; 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/hal_power_default.te: -------------------------------------------------------------------------------- 1 | allow hal_power_default proc_touchpanel:dir search; 2 | allow hal_power_default proc_touchpanel:file rw_file_perms; 3 | -------------------------------------------------------------------------------- /sepolicy/vendor/hwservice.te: -------------------------------------------------------------------------------- 1 | type hal_cameraHIDL_hwservice, hwservice_manager_type; 2 | type hal_ifaa_hwservice, hwservice_manager_type; 3 | type hal_param_hwservice, hwservice_manager_type; 4 | -------------------------------------------------------------------------------- /sepolicy/vendor/hwservice_contexts: -------------------------------------------------------------------------------- 1 | vendor.nxp.eventprocessor::INxpEseEvtProcessor u:object_r:hal_secure_element_hwservice:s0 2 | vendor.nxp.nxpese::INxpEse u:object_r:hal_secure_element_hwservice:s0 3 | vendor.nxp.nxpnfc::INxpNfc u:object_r:hal_nfc_hwservice:s0 4 | vendor.goodix.hardware.biometrics.fingerprint::IGoodixFingerprintDaemon u:object_r:hal_fingerprint_hwservice:s0 5 | vendor.oneplus.camera.CameraHIDL::IOnePlusCameraProvider u:object_r:hal_cameraHIDL_hwservice:s0 6 | vendor.oneplus.fingerprint.extension::IVendorFingerprintExtensions u:object_r:hal_fingerprint_hwservice:s0 7 | vendor.oneplus.hardware.camera::IOnePlusCameraProvider u:object_r:hal_cameraHIDL_hwservice:s0 8 | vendor.oneplus.hardware.CameraMDMHIDL::IOnePlusCameraMDM u:object_r:hal_cameraHIDL_hwservice:s0 9 | vendor.oneplus.hardware.ifaa::IOneplusIfaa u:object_r:hal_ifaa_hwservice:s0 10 | vendor.oneplus.hardware.param::IOneplusParam u:object_r:hal_param_hwservice:s0 11 | -------------------------------------------------------------------------------- /sepolicy/vendor/init.te: -------------------------------------------------------------------------------- 1 | allow init op1_file:dir mounton; 2 | allow init op2_file:dir mounton; 3 | -------------------------------------------------------------------------------- /sepolicy/vendor/opf.te: -------------------------------------------------------------------------------- 1 | type opf, domain; 2 | type opf_exec, exec_type, vendor_file_type, file_type; 3 | 4 | init_daemon_domain(opf) 5 | 6 | type_transition opf device:file opf_file; 7 | 8 | allow opf device:dir create_dir_perms; 9 | allow opf device:file create_file_perms; 10 | 11 | allow opf opf_file:file create_file_perms; 12 | -------------------------------------------------------------------------------- /sepolicy/vendor/platform_app.te: -------------------------------------------------------------------------------- 1 | hal_client_domain(platform_app, hal_ifaa) 2 | 3 | binder_call(platform_app, hal_ifaa_default) 4 | -------------------------------------------------------------------------------- /sepolicy/vendor/property.te: -------------------------------------------------------------------------------- 1 | vendor_public_prop(vendor_nfc_prop) 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/property_contexts: -------------------------------------------------------------------------------- 1 | # Bluetooth 2 | persist.vendor.bluetooth. u:object_r:vendor_bluetooth_prop:s0 3 | 4 | # NFC 5 | persist.vendor.nfc. u:object_r:vendor_nfc_prop:s0 6 | -------------------------------------------------------------------------------- /sepolicy/vendor/rild.te: -------------------------------------------------------------------------------- 1 | hal_client_domain(rild, hal_param) 2 | 3 | allow rild vendor_data_file:dir rw_dir_perms; 4 | allow rild vendor_data_file:file create_file_perms; 5 | 6 | allow rild block_device:dir search; 7 | 8 | allow rild param_block_device:blk_file rw_file_perms; 9 | 10 | allow rild diag_device:chr_file rw_file_perms; 11 | 12 | allow rild proc:file w_file_perms; 13 | allow rild proc_net:file w_file_perms; 14 | -------------------------------------------------------------------------------- /sepolicy/vendor/sensors.te: -------------------------------------------------------------------------------- 1 | allow sensors sensors_vendor_data_file:dir create_dir_perms; 2 | allow sensors sensors_vendor_data_file:file create_file_perms; 3 | 4 | get_prop(sensors, sensors_prop) 5 | -------------------------------------------------------------------------------- /sepolicy/vendor/system_app.te: -------------------------------------------------------------------------------- 1 | typeattribute system_app system_writes_vendor_properties_violators; 2 | 3 | set_prop(system_app, vendor_nfc_prop) 4 | -------------------------------------------------------------------------------- /sepolicy/vendor/tee.te: -------------------------------------------------------------------------------- 1 | typeattribute tee data_between_core_and_vendor_violators; 2 | 3 | allow tee fingerprintd_data_file:dir create_dir_perms; 4 | allow tee fingerprintd_data_file:file create_file_perms; 5 | 6 | allow tee mnt_vendor_file:dir create_dir_perms; 7 | allow tee mnt_vendor_file:file create_file_perms; 8 | -------------------------------------------------------------------------------- /sepolicy/vendor/thermal-engine.te: -------------------------------------------------------------------------------- 1 | allow thermal-engine sysfs:dir r_dir_perms; 2 | 3 | r_dir_file(thermal-engine, sysfs_devfreq) 4 | -------------------------------------------------------------------------------- /sepolicy/vendor/vendor_init.te: -------------------------------------------------------------------------------- 1 | allow vendor_init tmpfs:chr_file { read open }; 2 | allow vendor_init tmpfs:dir { create_dir_perms mounton }; 3 | 4 | allow vendor_init op2_file:file create_file_perms; 5 | -------------------------------------------------------------------------------- /sepolicy/vendor/vendor_qtelephony.te: -------------------------------------------------------------------------------- 1 | set_prop(vendor_qtelephony, radio_prop) 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/wcnss_service.te: -------------------------------------------------------------------------------- 1 | r_dir_file(wcnss_service, sysfs_project_info) 2 | -------------------------------------------------------------------------------- /sepolicy/vendor/wifi-mac-generator.te: -------------------------------------------------------------------------------- 1 | type wifi-mac-generator, domain; 2 | type wifi-mac-generator_exec, exec_type, vendor_file_type, file_type; 3 | 4 | init_daemon_domain(wifi-mac-generator) 5 | 6 | allow wifi-mac-generator vendor_shell_exec:file rx_file_perms; 7 | allow wifi-mac-generator vendor_toolbox_exec:file rx_file_perms; 8 | 9 | r_dir_file(wifi-mac-generator, vendor_data_file) 10 | 11 | allow wifi-mac-generator mnt_vendor_file:dir search; 12 | allow wifi-mac-generator mnt_vendor_file:file w_file_perms; 13 | -------------------------------------------------------------------------------- /setup-makefiles.py: -------------------------------------------------------------------------------- 1 | #!./extract-files.py --regenerate_makefiles 2 | -------------------------------------------------------------------------------- /system.prop: -------------------------------------------------------------------------------- 1 | # AB Update 2 | ro.build.ab_update=true 3 | 4 | # BPF 5 | ro.kernel.ebpf.supported=true 6 | 7 | # CNE 8 | persist.vendor.cne.feature=1 9 | 10 | # CoreSight STM 11 | persist.debug.coresight.config=stm-events 12 | 13 | # Dex2oat 14 | dalvik.vm.dex2oat64.enabled=true 15 | 16 | # Display 17 | debug.sf.enable_hwc_vds=1 18 | 19 | # fastbootd 20 | ro.fastbootd.available=true 21 | 22 | # GPS 23 | persist.vendor.overlay.izat.optin=rro 24 | 25 | # IMS 26 | persist.dbg.volte_avail_ovr=1 27 | persist.dbg.vt_avail_ovr=1 28 | persist.dbg.wfc_avail_ovr=1 29 | 30 | # Media 31 | media.settings.xml=/vendor/etc/media_profiles_vendor.xml 32 | ro.media.recorder-max-base-layer-fps=60 33 | 34 | # NFC 35 | ro.nfc.port=I2C 36 | 37 | # QC framework value-adds 38 | ro.vendor.qti.va_aosp.support=1 39 | 40 | # Radio 41 | persist.netmon.linger=5000 42 | persist.vendor.data.mode=concurrent 43 | ro.vendor.use_data_netmgrd=true 44 | telephony.lteOnCdmaDevice=1 45 | 46 | # RCS 47 | persist.rcs.supported=0 48 | 49 | # Sensors 50 | persist.vendor.sensors.enable.mag_filter=true 51 | 52 | # WiFi 53 | config.disable_rtt=true 54 | 55 | # WiFi Display 56 | persist.debug.wfd.enable=1 57 | persist.sys.wfd.virtual=0 58 | -------------------------------------------------------------------------------- /system_ext.prop: -------------------------------------------------------------------------------- 1 | # DPM 2 | persist.vendor.dpm.feature=11 3 | -------------------------------------------------------------------------------- /touch/include/TouchscreenGestureConfig.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2021 The LineageOS Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef TOUCH_ONEPLUS_TOUCHSCREENGESTURECONFIG_H 18 | #define TOUCH_ONEPLUS_TOUCHSCREENGESTURECONFIG_H 19 | 20 | #include 21 | 22 | namespace vendor { 23 | namespace lineage { 24 | namespace touch { 25 | namespace V1_0 { 26 | namespace implementation { 27 | 28 | const std::map kGestureInfoMap = { 29 | {0, {251, "Two fingers down swipe", "/proc/touchpanel/double_swipe_enable"}}, 30 | {1, {252, "Up arrow", "/proc/touchpanel/up_arrow_enable"}}, 31 | {2, {254, "Right arrow", "/proc/touchpanel/right_arrow_enable"}}, 32 | {3, {255, "Down arrow", "/proc/touchpanel/down_arrow_enable"}}, 33 | {4, {253, "Left arrow", "/proc/touchpanel/left_arrow_enable"}}, 34 | {5, {66, "One finger up swipe", "/proc/touchpanel/up_swipe_enable"}}, 35 | {6, {65, "One finger right swipe", "/proc/touchpanel/right_swipe_enable"}}, 36 | {7, {64, "One finger down swipe", "/proc/touchpanel/down_swipe_enable"}}, 37 | {8, {63, "One finger left swipe", "/proc/touchpanel/left_swipe_enable"}}, 38 | {9, {247, "Letter M", "/proc/touchpanel/letter_m_enable"}}, 39 | {10, {250, "Letter O", "/proc/touchpanel/letter_o_enable"}}, 40 | {11, {248, "Letter S", "/proc/touchpanel/letter_s_enable"}}, 41 | {12, {246, "Letter W", "/proc/touchpanel/letter_w_enable"}}, 42 | {13, {67, "Single Tap", "/proc/touchpanel/single_tap_enable"}}, 43 | }; 44 | 45 | } // namespace implementation 46 | } // namespace V1_0 47 | } // namespace touch 48 | } // namespace lineage 49 | } // namespace vendor 50 | 51 | #endif // TOUCH_ONEPLUS_TOUCHSCREENGESTURECONFIG_H 52 | -------------------------------------------------------------------------------- /vendor.prop: -------------------------------------------------------------------------------- 1 | # Audio 2 | persist.vendor.audio.fluence.speaker=true 3 | persist.vendor.audio.fluence.voicecall=true 4 | persist.vendor.audio.fluence.voicecomm=true 5 | persist.vendor.audio.fluence.voicerec=true 6 | persist.vendor.audio.ha_proxy.enabled=true 7 | persist.vendor.audio.ras.enabled=false 8 | ro.audio.monitorRotation=true 9 | ro.config.media_vol_steps=25 10 | ro.config.vc_call_vol_steps=6 11 | ro.vendor.audio.sdk.fluencetype=fluence 12 | ro.vendor.audio.sdk.ssr=false 13 | vendor.audio.adm.buffering.ms=2 14 | vendor.audio.dolby.ds2.enabled=false 15 | vendor.audio.dolby.ds2.hardbypass=false 16 | vendor.audio.enable.dp.for.voice=false 17 | vendor.audio.feature.a2dp_offload.enable=true 18 | vendor.audio.feature.afe_proxy.enable=true 19 | vendor.audio.feature.anc_headset.enable=true 20 | vendor.audio.feature.battery_listener.enable=false 21 | vendor.audio.feature.compr_cap.enable=false 22 | vendor.audio.feature.compress_in.enable=false 23 | vendor.audio.feature.compress_meta_data.enable=true 24 | vendor.audio.feature.compr_voip.enable=false 25 | vendor.audio.feature.concurrent_capture.enable=false 26 | vendor.audio.feature.custom_stereo.enable=true 27 | vendor.audio.feature.display_port.enable=true 28 | vendor.audio.feature.dsm_feedback.enable=false 29 | vendor.audio.feature.dynamic_ecns.enable=true 30 | vendor.audio.feature.ext_hw_plugin.enable=false 31 | vendor.audio.feature.external_dsp.enable=false 32 | vendor.audio.feature.external_speaker.enable=false 33 | vendor.audio.feature.external_speaker_tfa.enable=false 34 | vendor.audio.feature.fluence.enable=true 35 | vendor.audio.feature.fm.enable=true 36 | vendor.audio.feature.hdmi_edid.enable=true 37 | vendor.audio.feature.hdmi_passthrough.enable=true 38 | vendor.audio.feature.hfp.enable=true 39 | vendor.audio.feature.hifi_audio.enable=false 40 | vendor.audio.feature.hwdep_cal.enable=false 41 | vendor.audio.feature.incall_music.enable=true 42 | vendor.audio.feature.multi_voice_session.enable=true 43 | vendor.audio.feature.keep_alive.enable=false 44 | vendor.audio.feature.kpi_optimize.enable=true 45 | vendor.audio.feature.maxx_audio.enable=false 46 | vendor.audio.feature.ras.enable=true 47 | vendor.audio.feature.record_play_concurency.enable=false 48 | vendor.audio.feature.src_trkn.enable=true 49 | vendor.audio.feature.spkr_prot.enable=true 50 | vendor.audio.feature.ssrec.enable=true 51 | vendor.audio.feature.usb_offload.enable=true 52 | vendor.audio.feature.usb_offload_burst_mode.enable=false 53 | vendor.audio.feature.usb_offload_sidetone_volume.enable=false 54 | vendor.audio.feature.deepbuffer_as_primary.enable=false 55 | vendor.audio.feature.vbat.enable=true 56 | vendor.audio.feature.wsa.enable=false 57 | vendor.audio.feature.audiozoom.enable=false 58 | vendor.audio.feature.snd_mon.enable=true 59 | vendor.audio.flac.sw.decoder.24bit=true 60 | vendor.audio.hal.boot.timeout.ms=20000 61 | vendor.audio.hal.output.suspend.supported=true 62 | vendor.audio.hw.aac.encoder=true 63 | vendor.audio.offload.buffer.size.kb=32 64 | vendor.audio.offload.gapless.enabled=true 65 | vendor.audio.offload.multiaac.enable=true 66 | vendor.audio.offload.multiple.enabled=false 67 | vendor.audio.offload.passthrough=false 68 | vendor.audio.offload.track.enable=true 69 | vendor.audio.parser.ip.buffer.size=262144 70 | vendor.audio.safx.pbe.enabled=true 71 | vendor.audio.tunnel.encode=false 72 | vendor.audio.use.sw.alac.decoder=true 73 | vendor.audio.use.sw.ape.decoder=true 74 | vendor.audio.volume.headset.gain.depcal=true 75 | vendor.audio_hal.in_period_size=144 76 | vendor.audio_hal.period_multiplier=3 77 | vendor.audio_hal.period_size=192 78 | vendor.voice.path.for.pcm.voip=true 79 | 80 | # Bluetooth 81 | bluetooth.device.class_of_device=90,2,12 82 | bluetooth.hardware.power.operating_voltage_mv=3300 83 | bluetooth.profile.a2dp.source.enabled?=true 84 | bluetooth.profile.asha.central.enabled?=true 85 | bluetooth.profile.avrcp.target.enabled?=true 86 | bluetooth.profile.bas.client.enabled?=true 87 | bluetooth.profile.gatt.enabled?=true 88 | bluetooth.profile.hfp.ag.enabled?=true 89 | bluetooth.profile.hid.device.enabled?=true 90 | bluetooth.profile.hid.host.enabled?=true 91 | bluetooth.profile.map.server.enabled?=true 92 | bluetooth.profile.opp.enabled?=true 93 | bluetooth.profile.pan.nap.enabled?=true 94 | bluetooth.profile.pan.panu.enabled?=true 95 | bluetooth.profile.pbap.server.enabled?=true 96 | bluetooth.profile.sap.server.enabled?=true 97 | persist.bluetooth.a2dp_offload.disabled=false 98 | persist.vendor.bt.aac_frm_ctl.enabled=true 99 | persist.vendor.qcom.bluetooth.a2dp_offload_cap=sbc-aptx-aptxtws-aptxhd-aac-ldac 100 | persist.vendor.qcom.bluetooth.aac_frm_ctl.enabled=true 101 | persist.vendor.qcom.bluetooth.aac_vbr_ctl.enabled=false 102 | persist.vendor.qcom.bluetooth.enable.splita2dp=true 103 | persist.vendor.qcom.bluetooth.scram.enabled=true 104 | persist.vendor.qcom.bluetooth.soc=cherokee 105 | persist.vendor.qcom.bluetooth.twsp_state.enabled=false 106 | ro.bluetooth.a2dp_offload.supported=true 107 | 108 | # Camera 109 | persist.vendor.camera.privapp.list=com.oneplus.factorymode,com.oneplus.camera,com.oem.autotest,com.oneplus.healthcheck 110 | 111 | # Chipset 112 | ro.soc.manufacturer=Qualcomm 113 | ro.soc.model=SDM845 114 | 115 | # Display 116 | debug.sf.disable_client_composition_cache=1 117 | debug.sf.enable_transaction_tracing=false 118 | debug.sf.predict_hwc_composition_strategy=0 119 | persist.demo.hdmirotationlock=false 120 | persist.sys.sf.color_saturation=1.0 121 | persist.sys.sf.native_mode=0 122 | ro.hardware.egl=adreno 123 | ro.hardware.vulkan=adreno 124 | ro.opengles.version=196610 125 | ro.surface_flinger.enable_frame_rate_override=false 126 | ro.surface_flinger.force_hwc_copy_for_virtual_displays=true 127 | ro.surface_flinger.has_HDR_display=true 128 | ro.surface_flinger.has_wide_color_display=true 129 | ro.surface_flinger.max_virtual_display_dimension=4096 130 | ro.surface_flinger.protected_contents=true 131 | ro.surface_flinger.use_color_management=true 132 | ro.surface_flinger.wcg_composition_dataspace=143261696 133 | ro.vendor.display.cabl=0 134 | vendor.display.enable_default_color_mode=0 135 | 136 | # DPM 137 | persist.vendor.dpmhalservice.enable=1 138 | 139 | # DRM 140 | drm.service.enabled=true 141 | 142 | # fastbootd 143 | ro.fastbootd.available=true 144 | 145 | # FRP 146 | ro.frp.pst=/dev/block/bootdevice/by-name/config 147 | 148 | # GPS 149 | persist.backup.ntpServer=0.pool.ntp.org 150 | 151 | # Keystore 152 | ro.hardware.keystore_desede=true 153 | 154 | # Media 155 | debug.stagefright.ccodec=1 156 | 157 | # Netflix 158 | ro.netflix.bsp_rev=Q845-14477-1 159 | 160 | # NFC 161 | ro.camera.notify_nfc=1 162 | 163 | # OTG 164 | persist.sys.oem.otg_support=true 165 | 166 | # PASR 167 | vendor.pasr.activemode.enabled=true 168 | vendor.power.pasr.enabled=false 169 | 170 | # Perf 171 | ro.vendor.extension_library=libqti-perfd-client.so 172 | 173 | # Radio 174 | persist.radio.multisim.config=dsds 175 | persist.vendor.data.iwlan.enable=true 176 | persist.vendor.radio.enableadvancedscan=false 177 | persist.vendor.radio.apm_sim_not_pwdn=1 178 | persist.vendor.radio.mt_sms_ack=30 179 | persist.vendor.radio.sib16_support=1 180 | persist.vendor.radio.custom_ecc=1 181 | persist.vendor.radio.procedure_bytes=SKIP 182 | persist.vendor.radio.rat_on=combine 183 | ro.telephony.default_network=22,22 184 | 185 | # Sensors 186 | persist.vendor.sensors.firmware_property_read_support=false 187 | 188 | # USB 189 | vendor.usb.diag.func.name=diag 190 | vendor.usb.dpl.inst.name=dpl 191 | vendor.usb.qdss.inst.name=qdss 192 | vendor.usb.rmnet.func.name=gsi 193 | vendor.usb.rmnet.inst.name=rmnet 194 | vendor.usb.rndis.func.name=gsi 195 | vendor.usb.use_ffs_mtp=0 196 | vendor.usb.use_gadget_hal=0 197 | 198 | # Zygote 199 | zygote.critical_window.minute=10 200 | -------------------------------------------------------------------------------- /wifi/p2p_supplicant_overlay.conf: -------------------------------------------------------------------------------- 1 | disable_scan_offload=1 2 | p2p_no_group_iface=1 3 | persistent_reconnect=1 4 | bss_max_count=400 5 | -------------------------------------------------------------------------------- /wifi/wpa_supplicant_overlay.conf: -------------------------------------------------------------------------------- 1 | disable_scan_offload=1 2 | p2p_disabled=1 3 | tdls_external_control=1 4 | wowlan_triggers=magic_pkt 5 | bss_max_count=400 6 | config_methods=virtual_display virtual_push_button keypad 7 | driver_param="no_rrm=1" 8 | --------------------------------------------------------------------------------