├── Android.mk ├── AndroidBoard.mk ├── BoardConfigCommon.mk ├── README ├── audio └── audio_effects.conf ├── cm.dependencies ├── configs ├── hostapd.accept ├── hostapd.conf ├── hostapd.deny ├── media_codecs.xml ├── msm_irqbalance.conf ├── p2p_supplicant_overlay.conf ├── sec_config └── wpa_supplicant_overlay.conf ├── init ├── Android.mk ├── init_msm8916.cpp └── init_msm8916.h ├── msm8939.mk ├── overlay ├── frameworks │ └── base │ │ └── core │ │ └── res │ │ └── res │ │ └── values │ │ └── config.xml └── packages │ └── services │ ├── Telecomm │ └── res │ │ └── values │ │ └── config.xml │ └── Telephony │ └── res │ └── values │ └── config.xml ├── recovery ├── Android.mk └── recovery_updater.c ├── releasetools.py ├── rootdir ├── Android.mk └── etc │ ├── init.qcom.bt.sh │ ├── init.qcom.power.rc │ ├── init.qcom.rc │ ├── init.qcom.usb.rc │ └── ueventd.qcom.rc ├── sepolicy ├── bluetooth_loader.te ├── file_contexts ├── mm-qcamerad.te └── property_contexts ├── system.prop └── wifi ├── WCNSS_cfg.dat ├── WCNSS_qcom_cfg.ini └── WCNSS_qcom_wlan_nv.bin /Android.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2014 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 | LOCAL_PATH := $(call my-dir) 17 | 18 | ifeq ($(TARGET_CYANOGEN_COMMON),msm8939) 19 | 20 | include $(call all-makefiles-under,$(LOCAL_PATH)) 21 | 22 | include $(CLEAR_VARS) 23 | 24 | CMN_IMAGES := \ 25 | cmnlib.b00 cmnlib.b01 cmnlib.b02 cmnlib.b03 cmnlib.mdt 26 | 27 | CMN_SYMLINKS := $(addprefix $(TARGET_OUT_ETC)/firmware/,$(notdir $(CMN_IMAGES))) 28 | $(CMN_SYMLINKS): $(LOCAL_INSTALLED_MODULE) 29 | @echo "CMN firmware link: $@" 30 | @mkdir -p $(dir $@) 31 | @rm -rf $@ 32 | $(hide) ln -sf /firmware/image/$(notdir $@) $@ 33 | 34 | ALL_DEFAULT_INSTALLED_MODULES += $(CMN_SYMLINKS) 35 | 36 | ISDB_IMAGES := \ 37 | isdbtmm.b00 isdbtmm.b01 isdbtmm.b02 isdbtmm.b03 isdbtmm.mdt 38 | 39 | ISDB_SYMLINKS := $(addprefix $(TARGET_OUT_ETC)/firmware/,$(notdir $(ISDB_IMAGES))) 40 | $(ISDB_SYMLINKS): $(LOCAL_INSTALLED_MODULE) 41 | @echo "ISDB firmware link: $@" 42 | @mkdir -p $(dir $@) 43 | @rm -rf $@ 44 | $(hide) ln -sf /firmware/image/$(notdir $@) $@ 45 | 46 | ALL_DEFAULT_INSTALLED_MODULES += $(ISDB_SYMLINKS) 47 | 48 | KM_IMAGES := \ 49 | keymaste.b00 keymaste.b01 keymaste.b02 keymaste.b03 keymaste.mdt 50 | 51 | KM_SYMLINKS := $(addprefix $(TARGET_OUT_ETC)/firmware/,$(notdir $(KM_IMAGES))) 52 | $(KM_SYMLINKS): $(LOCAL_INSTALLED_MODULE) 53 | @echo "Keymaster firmware link: $@" 54 | @mkdir -p $(dir $@) 55 | @rm -rf $@ 56 | $(hide) ln -sf /firmware/image/$(notdir $@) $@ 57 | 58 | ALL_DEFAULT_INSTALLED_MODULES += $(KM_SYMLINKS) 59 | 60 | MODEM_IMAGES := \ 61 | modem.b00 modem.b01 modem.b02 modem.b03 modem.b04 modem.b05 \ 62 | modem.b06 modem.b07 modem.b10 modem.b12 modem.b13 modem.b15 \ 63 | modem.b16 modem.b17 modem.b18 modem.b19 modem.b20 modem.b21 \ 64 | modem.b24 modem.b25 modem.b26 modem.b27 modem.mdt 65 | 66 | MODEM_SYMLINKS := $(addprefix $(TARGET_OUT_ETC)/firmware/,$(notdir $(MODEM_IMAGES))) 67 | $(MODEM_SYMLINKS): $(LOCAL_INSTALLED_MODULE) 68 | @echo "Modem firmware link: $@" 69 | @mkdir -p $(dir $@) 70 | @rm -rf $@ 71 | $(hide) ln -sf /firmware/image/$(notdir $@) $@ 72 | 73 | ALL_DEFAULT_INSTALLED_MODULES += $(MODEM_SYMLINKS) 74 | 75 | PLAYREADY_IMAGES := \ 76 | playread.b00 playread.b01 playread.b02 playread.b03 playread.mdt 77 | 78 | PLAYREADY_SYMLINKS := $(addprefix $(TARGET_OUT_ETC)/firmware/,$(notdir $(PLAYREADY_IMAGES))) 79 | $(PLAYREADY_SYMLINKS): $(LOCAL_INSTALLED_MODULE) 80 | @echo "Playready firmware link: $@" 81 | @mkdir -p $(dir $@) 82 | @rm -rf $@ 83 | $(hide) ln -sf /firmware/image/$(notdir $@) $@ 84 | 85 | ALL_DEFAULT_INSTALLED_MODULES += $(PLAYREADY_SYMLINKS) 86 | 87 | WCNSS_IMAGES := \ 88 | wcnss.b00 wcnss.b01 wcnss.b02 wcnss.b04 wcnss.b06 \ 89 | wcnss.b09 wcnss.b10 wcnss.b11 wcnss.mdt 90 | 91 | WCNSS_SYMLINKS := $(addprefix $(TARGET_OUT_ETC)/firmware/,$(notdir $(WCNSS_IMAGES))) 92 | $(WCNSS_SYMLINKS): $(LOCAL_INSTALLED_MODULE) 93 | @echo "WCNSS firmware link: $@" 94 | @mkdir -p $(dir $@) 95 | @rm -rf $@ 96 | $(hide) ln -sf /firmware/image/$(notdir $@) $@ 97 | 98 | ALL_DEFAULT_INSTALLED_MODULES += $(WCNSS_SYMLINKS) 99 | 100 | WV_IMAGES := \ 101 | widevine.b00 widevine.b01 widevine.b02 widevine.b03 widevine.mdt 102 | 103 | WV_SYMLINKS := $(addprefix $(TARGET_OUT_ETC)/firmware/,$(notdir $(WV_IMAGES))) 104 | $(WV_SYMLINKS): $(LOCAL_INSTALLED_MODULE) 105 | @echo "Widevine firmware link: $@" 106 | @mkdir -p $(dir $@) 107 | @rm -rf $@ 108 | $(hide) ln -sf /firmware/image/$(notdir $@) $@ 109 | 110 | ALL_DEFAULT_INSTALLED_MODULES += $(WV_SYMLINKS) 111 | 112 | # Create a link for the WCNSS config file, which ends up as a writable 113 | # version in /data/misc/wifi 114 | $(shell mkdir -p $(TARGET_OUT)/etc/firmware/wlan/prima; \ 115 | ln -sf /data/misc/wifi/WCNSS_qcom_cfg.ini \ 116 | $(TARGET_OUT)/etc/firmware/wlan/prima/WCNSS_qcom_cfg.ini) 117 | 118 | endif 119 | -------------------------------------------------------------------------------- /AndroidBoard.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | #---------------------------------------------------------------------- 4 | # extra images 5 | #---------------------------------------------------------------------- 6 | include build/core/generate_extra_images.mk 7 | -------------------------------------------------------------------------------- /BoardConfigCommon.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2015 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 | VENDOR_PATH := device/cyanogen/msm8939-common 17 | 18 | TARGET_SPECIFIC_HEADER_PATH := $(VENDOR_PATH)/include 19 | 20 | TARGET_CYANOGEN_COMMON := msm8939 21 | 22 | # Architecture 23 | TARGET_ARCH := arm64 24 | TARGET_ARCH_VARIANT := armv8-a 25 | TARGET_CPU_ABI := arm64-v8a 26 | TARGET_CPU_ABI2 := 27 | TARGET_CPU_VARIANT := cortex-a53 28 | 29 | TARGET_2ND_ARCH := arm 30 | TARGET_2ND_ARCH_VARIANT := armv7-a-neon 31 | TARGET_2ND_CPU_ABI := armeabi-v7a 32 | TARGET_2ND_CPU_ABI2 := armeabi 33 | TARGET_2ND_CPU_VARIANT := cortex-a53 34 | 35 | TARGET_BOARD_SUFFIX := _64 36 | TARGET_USES_64_BIT_BINDER := true 37 | TARGET_BOARD_PLATFORM := msm8916 38 | TARGET_BOARD_PLATFORM_GPU := qcom-adreno405 39 | 40 | # Properties 41 | TARGET_SYSTEM_PROP := $(VENDOR_PATH)/system.prop 42 | 43 | # Bootloader 44 | TARGET_BOOTLOADER_BOARD_NAME := MSM8916 45 | TARGET_NO_BOOTLOADER := true 46 | 47 | # Kernel 48 | BOARD_DTBTOOL_ARGS := -2 49 | BOARD_KERNEL_BASE := 0x80000000 50 | BOARD_KERNEL_CMDLINE := console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=qcom msm_rtb.filter=0x237 ehci-hcd.park=3 androidboot.bootdevice=7824900.sdhci lpm_levels.sleep_disabled=1 51 | BOARD_KERNEL_PAGESIZE := 2048 52 | BOARD_KERNEL_SEPARATED_DT := true 53 | BOARD_KERNEL_TAGS_OFFSET := 0x01E00000 54 | BOARD_RAMDISK_OFFSET := 0x02000000 55 | TARGET_KERNEL_SOURCE := kernel/cyanogen/msm8916 56 | TARGET_KERNEL_ARCH := arm64 57 | TARGET_KERNEL_CROSS_COMPILE_PREFIX := aarch64-linux-android- 58 | TARGET_KERNEL_HEADER_ARCH := arm64 59 | TARGET_USES_UNCOMPRESSED_KERNEL := true 60 | 61 | # ANT+ 62 | BOARD_ANT_WIRELESS_DEVICE := "vfs-prerelease" 63 | 64 | # Audio 65 | AUDIO_FEATURE_ENABLED_KPI_OPTIMIZE := true 66 | AUDIO_FEATURE_ENABLED_NEW_SAMPLE_RATE := true 67 | BOARD_USES_ALSA_AUDIO := true 68 | USE_CUSTOM_AUDIO_POLICY := 1 69 | 70 | # Bluetooth 71 | BOARD_HAVE_BLUETOOTH := true 72 | BOARD_HAVE_BLUETOOTH_QCOM := true 73 | BLUETOOTH_HCI_USE_MCT := true 74 | 75 | # CMHW 76 | BOARD_USES_CYANOGEN_HARDWARE := true 77 | BOARD_HARDWARE_CLASS += hardware/cyanogen/cmhw 78 | 79 | # Crypto 80 | TARGET_HW_DISK_ENCRYPTION := true 81 | 82 | # Display 83 | MAX_EGL_CACHE_KEY_SIZE := 12*1024 84 | MAX_EGL_CACHE_SIZE := 2048*1024 85 | NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3 86 | OVERRIDE_RS_DRIVER := libRSDriver_adreno.so 87 | TARGET_CONTINUOUS_SPLASH_ENABLED := true 88 | TARGET_FORCE_HWC_FOR_VIRTUAL_DISPLAYS := true 89 | TARGET_USES_C2D_COMPOSITION := true 90 | TARGET_USES_ION := true 91 | USE_OPENGL_RENDERER := true 92 | 93 | # FM 94 | AUDIO_FEATURE_ENABLED_FM_POWER_OPT := true 95 | TARGET_QCOM_NO_FM_FIRMWARE := true 96 | 97 | # Init 98 | TARGET_INIT_VENDOR_LIB := libinit_msm8916 99 | TARGET_PLATFORM_DEVICE_BASE := /devices/soc.0/ 100 | TARGET_RECOVERY_DEVICE_MODULES := libinit_msm8916 101 | 102 | # Keymaster 103 | TARGET_KEYMASTER_WAIT_FOR_QSEE := true 104 | 105 | # Malloc 106 | MALLOC_IMPL := dlmalloc 107 | 108 | # Power 109 | TARGET_POWERHAL_VARIANT := qcom 110 | 111 | # Qualcomm support 112 | BOARD_USES_QC_TIME_SERVICES := true 113 | ifneq ($(QCPATH),) 114 | BOARD_USES_QCNE := true 115 | TARGET_LDPRELOAD := libNimsWrap.so 116 | endif 117 | BOARD_USES_QCOM_HARDWARE := true 118 | 119 | # Recovery 120 | TARGET_RECOVERY_UPDATER_LIBS := librecovery_updater_cm 121 | 122 | # Releasetools 123 | TARGET_RELEASETOOLS_EXTENSIONS := $(VENDOR_PATH) 124 | 125 | # RIL 126 | TARGET_RIL_VARIANT := caf 127 | 128 | # SELinux 129 | include device/qcom/sepolicy/sepolicy.mk 130 | 131 | BOARD_SEPOLICY_DIRS += \ 132 | $(VENDOR_PATH)/sepolicy 133 | 134 | # Video 135 | TARGET_HAVE_SIGNED_VENUS_FW := true 136 | 137 | # Wifi 138 | BOARD_HAS_QCOM_WLAN := true 139 | BOARD_HAS_QCOM_WLAN_SDK := true 140 | BOARD_HOSTAPD_DRIVER := NL80211 141 | BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_qcwcn 142 | BOARD_WLAN_DEVICE := qcwcn 143 | BOARD_WPA_SUPPLICANT_DRIVER := NL80211 144 | BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_qcwcn 145 | WIFI_DRIVER_FW_PATH_AP := "ap" 146 | WIFI_DRIVER_FW_PATH_STA := "sta" 147 | WPA_SUPPLICANT_VERSION := VER_0_8_X 148 | 149 | # inherit from the proprietary version 150 | -include vendor/cyanogen/msm8939-common/BoardConfigVendor.mk 151 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | Device tree for Cyanogen MSM8939 devices 2 | -------------------------------------------------------------------------------- /audio/audio_effects.conf: -------------------------------------------------------------------------------- 1 | # List of effect libraries to load. Each library element must contain a "path" element 2 | # giving the full path of the library .so file. 3 | # libraries { 4 | # { 5 | # path 6 | # } 7 | # } 8 | libraries { 9 | bundle { 10 | path /system/lib/soundfx/libbundlewrapper.so 11 | } 12 | reverb { 13 | path /system/lib/soundfx/libreverbwrapper.so 14 | } 15 | qcbassboost { 16 | path /vendor/lib/soundfx/libqcbassboost.so 17 | } 18 | qcvirt { 19 | path /vendor/lib/soundfx/libqcvirt.so 20 | } 21 | qcreverb { 22 | path /vendor/lib/soundfx/libqcreverb.so 23 | } 24 | visualizer_sw { 25 | path /system/lib/soundfx/libvisualizer.so 26 | } 27 | visualizer_hw { 28 | path /system/lib/soundfx/libqcomvisualizer.so 29 | } 30 | downmix { 31 | path /system/lib/soundfx/libdownmix.so 32 | } 33 | loudness_enhancer { 34 | path /system/lib/soundfx/libldnhncr.so 35 | } 36 | proxy { 37 | path /system/lib/soundfx/libeffectproxy.so 38 | } 39 | offload_bundle { 40 | path /system/lib/soundfx/libqcompostprocbundle.so 41 | } 42 | audio_pre_processing { 43 | path /system/lib/soundfx/libqcomvoiceprocessing.so 44 | } 45 | } 46 | 47 | # Default pre-processing library. Add to audio_effect.conf "libraries" section if 48 | # audio HAL implements support for default software audio pre-processing effects 49 | # 50 | # pre_processing { 51 | # path /system/lib/soundfx/libaudiopreprocessing.so 52 | # } 53 | 54 | # list of effects to load. Each effect element must contain a "library" and a "uuid" element. 55 | # The value of the "library" element must correspond to the name of one library element in the 56 | # "libraries" element. 57 | # The name of the effect element is indicative, only the value of the "uuid" element 58 | # designates the effect. 59 | # The uuid is the implementation specific UUID as specified by the effect vendor. This is not the 60 | # generic effect type UUID. 61 | # effects { 62 | # { 63 | # library 64 | # uuid 65 | # } 66 | # ... 67 | # } 68 | 69 | effects { 70 | 71 | # additions for the proxy implementation 72 | # Proxy implementation 73 | #effectname { 74 | #library proxy 75 | #uuid xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx 76 | 77 | # SW implemetation of the effect. Added as a node under the proxy to 78 | # indicate this as a sub effect. 79 | #libsw { 80 | #library libSW 81 | #uuid yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy 82 | #} End of SW effect 83 | 84 | # HW implementation of the effect. Added as a node under the proxy to 85 | # indicate this as a sub effect. 86 | #libhw { 87 | #library libHW 88 | #uuid zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzzz 89 | #}End of HW effect 90 | #} End of effect proxy 91 | 92 | bassboost { 93 | library proxy 94 | uuid 14804144-a5ee-4d24-aa88-0002a5d5c51b 95 | 96 | libsw { 97 | library qcbassboost 98 | uuid 23aca180-44bd-11e2-bcfd-0800200c9a66 99 | } 100 | 101 | libhw { 102 | library offload_bundle 103 | uuid 2c4a8c24-1581-487f-94f6-0002a5d5c51b 104 | } 105 | } 106 | virtualizer { 107 | library proxy 108 | uuid d3467faa-acc7-4d34-acaf-0002a5d5c51b 109 | 110 | libsw { 111 | library qcvirt 112 | uuid e6c98a16-22a3-11e2-b87b-f23c91aec05e 113 | } 114 | 115 | libhw { 116 | library offload_bundle 117 | uuid 509a4498-561a-4bea-b3b1-0002a5d5c51b 118 | } 119 | } 120 | equalizer { 121 | library proxy 122 | uuid c8e70ecd-48ca-456e-8a4f-0002a5d5c51b 123 | 124 | libsw { 125 | library bundle 126 | uuid ce772f20-847d-11df-bb17-0002a5d5c51b 127 | } 128 | 129 | libhw { 130 | library offload_bundle 131 | uuid a0dac280-401c-11e3-9379-0002a5d5c51b 132 | } 133 | } 134 | volume { 135 | library bundle 136 | uuid 119341a0-8469-11df-81f9-0002a5d5c51b 137 | } 138 | reverb_env_aux { 139 | library proxy 140 | uuid 48404ac9-d202-4ccc-bf84-0002a5d5c51b 141 | 142 | libsw { 143 | library qcreverb 144 | uuid a8c1e5f3-293d-43cd-95ec-d5e26c02e217 145 | } 146 | 147 | libhw { 148 | library offload_bundle 149 | uuid 79a18026-18fd-4185-8233-0002a5d5c51b 150 | } 151 | } 152 | reverb_env_ins { 153 | library proxy 154 | uuid b707403a-a1c1-4291-9573-0002a5d5c51b 155 | 156 | libsw { 157 | library qcreverb 158 | uuid 791fff8b-8129-4655-83a4-59bc61034c3a 159 | } 160 | 161 | libhw { 162 | library offload_bundle 163 | uuid eb64ea04-973b-43d2-8f5e-0002a5d5c51b 164 | } 165 | } 166 | reverb_pre_aux { 167 | library proxy 168 | uuid 1b78f587-6d1c-422e-8b84-0002a5d5c51b 169 | 170 | libsw { 171 | library qcreverb 172 | uuid 53ef1db5-c0c0-445b-b060-e34d20ebb70a 173 | } 174 | 175 | libhw { 176 | library offload_bundle 177 | uuid 6987be09-b142-4b41-9056-0002a5d5c51b 178 | } 179 | } 180 | reverb_pre_ins { 181 | library proxy 182 | uuid f3e178d2-ebcb-408e-8357-0002a5d5c51b 183 | 184 | libsw { 185 | library qcreverb 186 | uuid b08a0e38-22a5-11e2-b87b-f23c91aec05e 187 | } 188 | 189 | libhw { 190 | library offload_bundle 191 | uuid aa2bebf6-47cf-4613-9bca-0002a5d5c51b 192 | } 193 | } 194 | visualizer { 195 | library proxy 196 | uuid 1d0a1a53-7d5d-48f2-8e71-27fbd10d842c 197 | 198 | libsw { 199 | library visualizer_sw 200 | uuid d069d9e0-8329-11df-9168-0002a5d5c51b 201 | } 202 | 203 | libhw { 204 | library visualizer_hw 205 | uuid 7a8044a0-1a71-11e3-a184-0002a5d5c51b 206 | } 207 | } 208 | downmix { 209 | library downmix 210 | uuid 93f04452-e4fe-41cc-91f9-e475b6d1d69f 211 | } 212 | loudness_enhancer { 213 | library loudness_enhancer 214 | uuid fa415329-2034-4bea-b5dc-5b381c8d1e2c 215 | } 216 | aec { 217 | library audio_pre_processing 218 | uuid 0f8d0d2a-59e5-45fe-b6e4-248c8a799109 219 | } 220 | ns { 221 | library audio_pre_processing 222 | uuid 1d97bb0b-9e2f-4403-9ae3-58c2554306f8 223 | } 224 | } 225 | 226 | # Default pre-processing effects. Add to audio_effect.conf "effects" section if 227 | # audio HAL implements support for them. 228 | # 229 | # agc { 230 | # library pre_processing 231 | # uuid aa8130e0-66fc-11e0-bad0-0002a5d5c51b 232 | # } 233 | # aec { 234 | # library pre_processing 235 | # uuid bb392ec0-8d4d-11e0-a896-0002a5d5c51b 236 | # } 237 | # ns { 238 | # library pre_processing 239 | # uuid c06c8400-8e06-11e0-9cb6-0002a5d5c51b 240 | # } 241 | 242 | # Audio preprocessor configurations. 243 | # The pre processor configuration consists in a list of elements each describing 244 | # pre processor settings for a given input source. Valid input source names are: 245 | # "mic", "camcorder", "voice_recognition", "voice_communication" 246 | # Each input source element contains a list of effects elements. The name of the effect 247 | # element must be the name of one of the effects in the "effects" list of the file. 248 | # Each effect element may optionally contain a list of parameters and their 249 | # default value to apply when the pre processor effect is created. 250 | # A parameter is defined by a "param" element and a "value" element. Each of these elements 251 | # consists in one or more elements specifying a type followed by a value. 252 | # The types defined are: "int", "short", "float", "bool" and "string" 253 | # When both "param" and "value" are a single int, a simple form is allowed where just 254 | # the param and value pair is present in the parameter description 255 | # pre_processing { 256 | # { 257 | # { 258 | # { 259 | # param { 260 | # int|short|float|bool|string 261 | # [ int|short|float|bool|string ] 262 | # ... 263 | # } 264 | # value { 265 | # int|short|float|bool|string 266 | # [ int|short|float|bool|string ] 267 | # ... 268 | # } 269 | # } 270 | # { } 271 | # ... 272 | # } 273 | # ... 274 | # } 275 | # ... 276 | # } 277 | 278 | # 279 | # TODO: add default audio pre processor configurations after debug and tuning phase 280 | # 281 | -------------------------------------------------------------------------------- /cm.dependencies: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "repository": "android_device_qcom_common", 4 | "target_path": "device/qcom/common" 5 | } 6 | ] 7 | -------------------------------------------------------------------------------- /configs/hostapd.accept: -------------------------------------------------------------------------------- 1 | # List of MAC addresses that are allowed to authenticate (IEEE 802.11) 2 | # with the AP. Optional VLAN ID can be assigned for clients based on the 3 | # MAC address if dynamic VLANs (hostapd.conf dynamic_vlan option) are used. 4 | -------------------------------------------------------------------------------- /configs/hostapd.conf: -------------------------------------------------------------------------------- 1 | ##### hostapd configuration file ############################################## 2 | # Empty lines and lines starting with # are ignored 3 | 4 | # AP netdevice name (without 'ap' postfix, i.e., wlan0 uses wlan0ap for 5 | # management frames); ath0 for madwifi 6 | interface=wlan0 7 | 8 | # In case of madwifi and nl80211 driver interfaces, an additional configuration 9 | # parameter, bridge, must be used to notify hostapd if the interface is 10 | # included in a bridge. This parameter is not used with Host AP driver. 11 | #bridge=br0 12 | 13 | # Driver interface type (hostap/wired/madwifi/prism54/test/none/nl80211/bsd); 14 | # default: hostap). nl80211 is used with all Linux mac80211 drivers. 15 | # Use driver=none if building hostapd as a standalone RADIUS server that does 16 | # not control any wireless/wired driver. 17 | driver=nl80211 18 | 19 | # hostapd event logger configuration 20 | # 21 | # Two output method: syslog and stdout (only usable if not forking to 22 | # background). 23 | # 24 | # Module bitfield (ORed bitfield of modules that will be logged; -1 = all 25 | # modules): 26 | # bit 0 (1) = IEEE 802.11 27 | # bit 1 (2) = IEEE 802.1X 28 | # bit 2 (4) = RADIUS 29 | # bit 3 (8) = WPA 30 | # bit 4 (16) = driver interface 31 | # bit 5 (32) = IAPP 32 | # bit 6 (64) = MLME 33 | # 34 | # Levels (minimum value for logged events): 35 | # 0 = verbose debugging 36 | # 1 = debugging 37 | # 2 = informational messages 38 | # 3 = notification 39 | # 4 = warning 40 | # 41 | logger_syslog=-1 42 | logger_syslog_level=2 43 | logger_stdout=-1 44 | logger_stdout_level=2 45 | 46 | # Dump file for state information (on SIGUSR1) 47 | dump_file=/tmp/hostapd.dump 48 | 49 | # Interface for separate control program. If this is specified, hostapd 50 | # will create this directory and a UNIX domain socket for listening to requests 51 | # from external programs (CLI/GUI, etc.) for status information and 52 | # configuration. The socket file will be named based on the interface name, so 53 | # multiple hostapd processes/interfaces can be run at the same time if more 54 | # than one interface is used. 55 | # /var/run/hostapd is the recommended directory for sockets and by default, 56 | # hostapd_cli will use it when trying to connect with hostapd. 57 | ctrl_interface=/data/misc/wifi/hostapd 58 | 59 | 60 | # Access control for the control interface can be configured by setting the 61 | # directory to allow only members of a group to use sockets. This way, it is 62 | # possible to run hostapd as root (since it needs to change network 63 | # configuration and open raw sockets) and still allow GUI/CLI components to be 64 | # run as non-root users. However, since the control interface can be used to 65 | # change the network configuration, this access needs to be protected in many 66 | # cases. By default, hostapd is configured to use gid 0 (root). If you 67 | # want to allow non-root users to use the contron interface, add a new group 68 | # and change this value to match with that group. Add users that should have 69 | # control interface access to this group. 70 | # 71 | # This variable can be a group name or gid. 72 | #ctrl_interface_group=wheel 73 | #ctrl_interface_group=0 74 | 75 | 76 | ##### IEEE 802.11 related configuration ####################################### 77 | 78 | # SSID to be used in IEEE 802.11 management frames 79 | ssid=QualcommSoftAP 80 | 81 | # Country code (ISO/IEC 3166-1). Used to set regulatory domain. 82 | # Set as needed to indicate country in which device is operating. 83 | # This can limit available channels and transmit power. 84 | #country_code=US 85 | 86 | # Enable IEEE 802.11d. This advertises the country_code and the set of allowed 87 | # channels and transmit power levels based on the regulatory limits. The 88 | # country_code setting must be configured with the correct country for 89 | # IEEE 802.11d functions. 90 | # (default: 0 = disabled) 91 | #ieee80211d=1 92 | 93 | # Operation mode (a = IEEE 802.11a, b = IEEE 802.11b, g = IEEE 802.11g, 94 | # n = IEEE 802.11n, g_only = IEEE 802.11g_only, n_only = IEEE 802.11n_only, 95 | # Default: IEEE 802.11n 96 | hw_mode=g 97 | 98 | # Channel number (IEEE 802.11) 99 | # (default: 0, i.e., not set) 100 | # Please note that some drivers (e.g., madwifi) do not use this value from 101 | # hostapd and the channel will need to be configuration separately with 102 | # iwconfig. 103 | channel=6 104 | 105 | # Beacon interval in kus (1.024 ms) (default: 100; range 15..65535) 106 | beacon_int=100 107 | 108 | # DTIM (delivery trafic information message) period (range 1..255): 109 | # number of beacons between DTIMs (1 = every beacon includes DTIM element) 110 | # (default: 2) 111 | dtim_period=2 112 | 113 | # Maximum number of stations allowed in station table. New stations will be 114 | # rejected after the station table is full. IEEE 802.11 has a limit of 2007 115 | # different association IDs, so this number should not be larger than that. 116 | # (default: 2007) 117 | max_num_sta=255 118 | 119 | # RTS/CTS threshold; 2347 = disabled (default); range 0..2347 120 | # If this field is not included in hostapd.conf, hostapd will not control 121 | # RTS threshold and 'iwconfig wlan# rts ' can be used to set it. 122 | #rts_threshold=2347 123 | 124 | # Fragmentation threshold; 2346 = disabled (default); range 256..2346 125 | # If this field is not included in hostapd.conf, hostapd will not control 126 | # fragmentation threshold and 'iwconfig wlan# frag ' can be used to set 127 | # it. 128 | #fragm_threshold=2346 129 | 130 | # Rate configuration 131 | # Default is to enable all rates supported by the hardware. This configuration 132 | # item allows this list be filtered so that only the listed rates will be left 133 | # in the list. If the list is empty, all rates are used. This list can have 134 | # entries that are not in the list of rates the hardware supports (such entries 135 | # are ignored). The entries in this list are in 100 kbps, i.e., 11 Mbps = 110. 136 | # If this item is present, at least one rate have to be matching with the rates 137 | # hardware supports. 138 | # default: use the most common supported rate setting for the selected 139 | # hw_mode (i.e., this line can be removed from configuration file in most 140 | # cases) 141 | #supported_rates=10 20 55 110 60 90 120 180 240 360 480 540 142 | 143 | # Basic rate set configuration 144 | # List of rates (in 100 kbps) that are included in the basic rate set. 145 | # If this item is not included, usually reasonable default set is used. 146 | # This basic rates set is currently used for g-only profile 147 | #basic_rates=60 148 | 149 | # Short Preamble 150 | # This parameter can be used to enable optional use of short preamble for 151 | # frames sent at 2 Mbps, 5.5 Mbps, and 11 Mbps to improve network performance. 152 | # This applies only to IEEE 802.11b-compatible networks and this should only be 153 | # enabled if the local hardware supports use of short preamble. If any of the 154 | # associated STAs do not support short preamble, use of short preamble will be 155 | # disabled (and enabled when such STAs disassociate) dynamically. 156 | # 0 = do not allow use of short preamble (default) 157 | # 1 = allow use of short preamble 158 | #preamble=1 159 | 160 | # Station MAC address -based authentication 161 | # Please note that this kind of access control requires a driver that uses 162 | # hostapd to take care of management frame processing and as such, this can be 163 | # used with driver=hostap or driver=nl80211, but not with driver=madwifi. 164 | # 0 = accept unless in deny list 165 | # 1 = deny unless in accept list 166 | # 2 = use external RADIUS server (accept/deny lists are searched first) 167 | macaddr_acl=0 168 | 169 | # Accept/deny lists are read from separate files (containing list of 170 | # MAC addresses, one per line). Use absolute path name to make sure that the 171 | # files can be read on SIGHUP configuration reloads. 172 | accept_mac_file=/data/misc/wifi/hostapd.accept 173 | deny_mac_file=/data/misc/wifi/hostapd.deny 174 | 175 | # IEEE 802.11 specifies two authentication algorithms. hostapd can be 176 | # configured to allow both of these or only one. Open system authentication 177 | # should be used with IEEE 802.1X. 178 | # Bit fields of allowed authentication algorithms: 179 | # bit 0 = Open System Authentication 180 | # bit 1 = Shared Key Authentication (requires WEP) 181 | auth_algs=3 182 | 183 | # Send empty SSID in beacons and ignore probe request frames that do not 184 | # specify full SSID, i.e., require stations to know SSID. 185 | # default: disabled (0) 186 | # 1 = send empty (length=0) SSID in beacon and ignore probe request for 187 | # broadcast SSID 188 | # 2 = clear SSID (ASCII 0), but keep the original length (this may be required 189 | # with some clients that do not support empty SSID) and ignore probe 190 | # requests for broadcast SSID 191 | ignore_broadcast_ssid=0 192 | 193 | # TX queue parameters (EDCF / bursting) 194 | # default for all these fields: not set, use hardware defaults 195 | # tx_queue__ 196 | # queues: data0, data1, data2, data3, after_beacon, beacon 197 | # (data0 is the highest priority queue) 198 | # parameters: 199 | # aifs: AIFS (default 2) 200 | # cwmin: cwMin (1, 3, 7, 15, 31, 63, 127, 255, 511, 1023) 201 | # cwmax: cwMax (1, 3, 7, 15, 31, 63, 127, 255, 511, 1023); cwMax >= cwMin 202 | # burst: maximum length (in milliseconds with precision of up to 0.1 ms) for 203 | # bursting 204 | # 205 | # Default WMM parameters (IEEE 802.11 draft; 11-03-0504-03-000e): 206 | # These parameters are used by the access point when transmitting frames 207 | # to the clients. 208 | # 209 | # Low priority / AC_BK = background 210 | #tx_queue_data3_aifs=7 211 | #tx_queue_data3_cwmin=15 212 | #tx_queue_data3_cwmax=1023 213 | #tx_queue_data3_burst=0 214 | # Note: for IEEE 802.11b mode: cWmin=31 cWmax=1023 burst=0 215 | # 216 | # Normal priority / AC_BE = best effort 217 | #tx_queue_data2_aifs=3 218 | #tx_queue_data2_cwmin=15 219 | #tx_queue_data2_cwmax=63 220 | #tx_queue_data2_burst=0 221 | # Note: for IEEE 802.11b mode: cWmin=31 cWmax=127 burst=0 222 | # 223 | # High priority / AC_VI = video 224 | #tx_queue_data1_aifs=1 225 | #tx_queue_data1_cwmin=7 226 | #tx_queue_data1_cwmax=15 227 | #tx_queue_data1_burst=3.0 228 | # Note: for IEEE 802.11b mode: cWmin=15 cWmax=31 burst=6.0 229 | # 230 | # Highest priority / AC_VO = voice 231 | #tx_queue_data0_aifs=1 232 | #tx_queue_data0_cwmin=3 233 | #tx_queue_data0_cwmax=7 234 | #tx_queue_data0_burst=1.5 235 | # Note: for IEEE 802.11b mode: cWmin=7 cWmax=15 burst=3.3 236 | # 237 | # Special queues; normally not user configurable 238 | # 239 | #tx_queue_after_beacon_aifs=2 240 | #tx_queue_after_beacon_cwmin=15 241 | #tx_queue_after_beacon_cwmax=1023 242 | #tx_queue_after_beacon_burst=0 243 | # 244 | #tx_queue_beacon_aifs=2 245 | #tx_queue_beacon_cwmin=3 246 | #tx_queue_beacon_cwmax=7 247 | #tx_queue_beacon_burst=1.5 248 | 249 | # 802.1D Tag (= UP) to AC mappings 250 | # WMM specifies following mapping of data frames to different ACs. This mapping 251 | # can be configured using Linux QoS/tc and sch_pktpri.o module. 252 | # 802.1D Tag 802.1D Designation Access Category WMM Designation 253 | # 1 BK AC_BK Background 254 | # 2 - AC_BK Background 255 | # 0 BE AC_BE Best Effort 256 | # 3 EE AC_BE Best Effort 257 | # 4 CL AC_VI Video 258 | # 5 VI AC_VI Video 259 | # 6 VO AC_VO Voice 260 | # 7 NC AC_VO Voice 261 | # Data frames with no priority information: AC_BE 262 | # Management frames: AC_VO 263 | # PS-Poll frames: AC_BE 264 | 265 | # Default WMM parameters (IEEE 802.11 draft; 11-03-0504-03-000e): 266 | # for 802.11a or 802.11g networks 267 | # These parameters are sent to WMM clients when they associate. 268 | # The parameters will be used by WMM clients for frames transmitted to the 269 | # access point. 270 | # 271 | # note - txop_limit is in units of 32microseconds 272 | # note - acm is admission control mandatory flag. 0 = admission control not 273 | # required, 1 = mandatory 274 | # note - here cwMin and cmMax are in exponent form. the actual cw value used 275 | # will be (2^n)-1 where n is the value given here 276 | # 277 | wmm_enabled=1 278 | # 279 | # Low priority / AC_BK = background 280 | wmm_ac_bk_cwmin=4 281 | wmm_ac_bk_cwmax=10 282 | wmm_ac_bk_aifs=7 283 | wmm_ac_bk_txop_limit=0 284 | wmm_ac_bk_acm=0 285 | # Note: for IEEE 802.11b mode: cWmin=5 cWmax=10 286 | # 287 | # Normal priority / AC_BE = best effort 288 | wmm_ac_be_aifs=3 289 | wmm_ac_be_cwmin=4 290 | wmm_ac_be_cwmax=10 291 | wmm_ac_be_txop_limit=0 292 | wmm_ac_be_acm=0 293 | # Note: for IEEE 802.11b mode: cWmin=5 cWmax=7 294 | # 295 | # High priority / AC_VI = video 296 | wmm_ac_vi_aifs=2 297 | wmm_ac_vi_cwmin=3 298 | wmm_ac_vi_cwmax=4 299 | wmm_ac_vi_txop_limit=94 300 | wmm_ac_vi_acm=0 301 | # Note: for IEEE 802.11b mode: cWmin=4 cWmax=5 txop_limit=188 302 | # 303 | # Highest priority / AC_VO = voice 304 | wmm_ac_vo_aifs=2 305 | wmm_ac_vo_cwmin=2 306 | wmm_ac_vo_cwmax=3 307 | wmm_ac_vo_txop_limit=47 308 | wmm_ac_vo_acm=0 309 | # Note: for IEEE 802.11b mode: cWmin=3 cWmax=4 burst=102 310 | 311 | # Static WEP key configuration 312 | # 313 | # The key number to use when transmitting. 314 | # It must be between 0 and 3, and the corresponding key must be set. 315 | # default: not set 316 | #wep_default_key=0 317 | # The WEP keys to use. 318 | # A key may be a quoted string or unquoted hexadecimal digits. 319 | # The key length should be 5, 13, or 16 characters, or 10, 26, or 32 320 | # digits, depending on whether 40-bit (64-bit), 104-bit (128-bit), or 321 | # 128-bit (152-bit) WEP is used. 322 | # Only the default key must be supplied; the others are optional. 323 | # default: not set 324 | #wep_key0=1234567890 325 | #wep_key1=1234567890 326 | #wep_key2=1234567890 327 | #wep_key3=1234567890 328 | 329 | # Station inactivity limit 330 | # 331 | # If a station does not send anything in ap_max_inactivity seconds, an 332 | # empty data frame is sent to it in order to verify whether it is 333 | # still in range. If this frame is not ACKed, the station will be 334 | # disassociated and then deauthenticated. This feature is used to 335 | # clear station table of old entries when the STAs move out of the 336 | # range. 337 | # 338 | # The station can associate again with the AP if it is still in range; 339 | # this inactivity poll is just used as a nicer way of verifying 340 | # inactivity; i.e., client will not report broken connection because 341 | # disassociation frame is not sent immediately without first polling 342 | # the STA with a data frame. 343 | # default: 300 (i.e., 5 minutes) 344 | #ap_max_inactivity=300 345 | 346 | # Enable/disable internal bridge for packets between associated stations. 347 | # 348 | # When IEEE 802.11 is used in managed mode, packets are usually send through 349 | # the AP even if they are from a wireless station to another wireless station. 350 | # This functionality requires that the AP has a bridge functionality that sends 351 | # frames back to the same interface if their destination is another associated 352 | # station. In addition, broadcast/multicast frames from wireless stations will 353 | # be sent both to the host system net stack (e.g., to eventually wired network) 354 | # and back to the wireless interface. 355 | # 356 | # The internal bridge is implemented within the wireless kernel module and it 357 | # bypasses kernel filtering (netfilter/iptables/ebtables). If direct 358 | # communication between the stations needs to be prevented, the internal 359 | # bridge can be disabled by setting bridge_packets=0. 360 | # 361 | # Note: If this variable is not included in hostapd.conf, hostapd does not 362 | # change the configuration and iwpriv can be used to set the value with 363 | # 'iwpriv wlan# param 10 0' command. If the variable is in hostapd.conf, 364 | # hostapd will override possible iwpriv configuration whenever configuration 365 | # file is reloaded. 366 | # 367 | # default: do not control from hostapd (80211.o defaults to 1=enabled) 368 | #bridge_packets=1 369 | 370 | # Maximum allowed Listen Interval (how many Beacon periods STAs are allowed to 371 | # remain asleep). Default: 65535 (no limit apart from field size) 372 | #max_listen_interval=100 373 | 374 | # Client isolation can be used to prevent low-level bridging of frames between 375 | # associated stations in the BSS. By default, this bridging is allowed. 376 | #ap_isolate=1 377 | 378 | ##### IEEE 802.11n related configuration ###################################### 379 | 380 | # ieee80211n: Whether IEEE 802.11n (HT) is enabled 381 | # 0 = disabled (default) 382 | # 1 = enabled 383 | # Note: You will also need to enable WMM for full HT functionality. 384 | ieee80211n=1 385 | 386 | #require_ht=1 387 | 388 | # ht_capab: HT capabilities (list of flags) 389 | # LDPC coding capability: [LDPC] = supported 390 | # Supported channel width set: [HT40-] = both 20 MHz and 40 MHz with secondary 391 | # channel below the primary channel; [HT40+] = both 20 MHz and 40 MHz 392 | # with secondary channel below the primary channel 393 | # (20 MHz only if neither is set) 394 | # Note: There are limits on which channels can be used with HT40- and 395 | # HT40+. Following table shows the channels that may be available for 396 | # HT40- and HT40+ use per IEEE 802.11n Annex J: 397 | # freq HT40- HT40+ 398 | # 2.4 GHz 5-13 1-7 (1-9 in Europe/Japan) 399 | # 5 GHz 40,48,56,64 36,44,52,60 400 | # (depending on the location, not all of these channels may be available 401 | # for use) 402 | # Spatial Multiplexing (SM) Power Save: [SMPS-STATIC] or [SMPS-DYNAMIC] 403 | # (SMPS disabled if neither is set) 404 | # HT-greenfield: [GF] (disabled if not set) 405 | # Short GI for 20 MHz: [SHORT-GI-20] (disabled if not set) 406 | # Short GI for 40 MHz: [SHORT-GI-40] (disabled if not set) 407 | # Tx STBC: [TX-STBC] (disabled if not set) 408 | # Rx STBC: [RX-STBC1] (one spatial stream), [RX-STBC12] (one or two spatial 409 | # streams), or [RX-STBC123] (one, two, or three spatial streams); Rx STBC 410 | # disabled if none of these set 411 | # HT-delayed Block Ack: [DELAYED-BA] (disabled if not set) 412 | # Maximum A-MSDU length: [MAX-AMSDU-7935] for 7935 octets (3839 octets if not 413 | # set) 414 | # DSSS/CCK Mode in 40 MHz: [DSSS_CCK-40] = allowed (not allowed if not set) 415 | # PSMP support: [PSMP] (disabled if not set) 416 | # L-SIG TXOP protection support: [LSIG-TXOP-PROT] (disabled if not set) 417 | # QcHostapd: 418 | # LOWER byte for associated stations 419 | # UPPER byte for overlapping stations 420 | # each byte will have the following info 421 | # bit15 bit14 bit13 bit12 bit11 bit10 bit9 bit8 422 | # OBSS RIFS LSIG_TXOP NON_GF HT20 FROM_11G FROM_11B FROM_11A 423 | # bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 424 | # OBSS RIFS LSIG_TXOP NON_GF HT_20 FROM_11G FROM_11B FROM_11A 425 | #ht_capab=[HT40-] [SHORT-GI-20] [SHORT-GI-40] 426 | ht_capab=[SHORT-GI-20] [GF] [DSSS_CCK-40] [LSIG-TXOP-PROT] 427 | #ht_capab=[LDPC] [HT40-] [HT40+] [SMPS-STATIC] [SMPS-DYNAMIC] [GF] [SHORT-GI-20] [SHORT-GI-40] [TX-STBC] [RX-STBC1] [RX-STBC12] [RX-STBC123] [DELAYED-BA] [MAX-AMSDU-7935] [DSSS_CCK-40] [PSMP] [LSIG-TXOP-PROT] 428 | 429 | ##### IEEE 802.1X-2004 related configuration ################################## 430 | 431 | # Require IEEE 802.1X authorization 432 | #ieee8021x=1 433 | 434 | # IEEE 802.1X/EAPOL version 435 | # hostapd is implemented based on IEEE Std 802.1X-2004 which defines EAPOL 436 | # version 2. However, there are many client implementations that do not handle 437 | # the new version number correctly (they seem to drop the frames completely). 438 | # In order to make hostapd interoperate with these clients, the version number 439 | # can be set to the older version (1) with this configuration value. 440 | #eapol_version=2 441 | 442 | # Optional displayable message sent with EAP Request-Identity. The first \0 443 | # in this string will be converted to ASCII-0 (nul). This can be used to 444 | # separate network info (comma separated list of attribute=value pairs); see, 445 | # e.g., RFC 4284. 446 | #eap_message=hello 447 | #eap_message=hello\0networkid=netw,nasid=foo,portid=0,NAIRealms=example.com 448 | 449 | # WEP rekeying (disabled if key lengths are not set or are set to 0) 450 | # Key lengths for default/broadcast and individual/unicast keys: 451 | # 5 = 40-bit WEP (also known as 64-bit WEP with 40 secret bits) 452 | # 13 = 104-bit WEP (also known as 128-bit WEP with 104 secret bits) 453 | #wep_key_len_broadcast=5 454 | #wep_key_len_unicast=5 455 | # Rekeying period in seconds. 0 = do not rekey (i.e., set keys only once) 456 | #wep_rekey_period=300 457 | 458 | # EAPOL-Key index workaround (set bit7) for WinXP Supplicant (needed only if 459 | # only broadcast keys are used) 460 | eapol_key_index_workaround=0 461 | 462 | # EAP reauthentication period in seconds (default: 3600 seconds; 0 = disable 463 | # reauthentication). 464 | #eap_reauth_period=3600 465 | 466 | # Use PAE group address (01:80:c2:00:00:03) instead of individual target 467 | # address when sending EAPOL frames with driver=wired. This is the most common 468 | # mechanism used in wired authentication, but it also requires that the port 469 | # is only used by one station. 470 | #use_pae_group_addr=1 471 | 472 | ##### Integrated EAP server ################################################### 473 | 474 | # Optionally, hostapd can be configured to use an integrated EAP server 475 | # to process EAP authentication locally without need for an external RADIUS 476 | # server. This functionality can be used both as a local authentication server 477 | # for IEEE 802.1X/EAPOL and as a RADIUS server for other devices. 478 | 479 | # Use integrated EAP server instead of external RADIUS authentication 480 | # server. This is also needed if hostapd is configured to act as a RADIUS 481 | # authentication server. 482 | eap_server=1 483 | 484 | # Path for EAP server user database 485 | #eap_user_file=/etc/hostapd.eap_user 486 | 487 | # CA certificate (PEM or DER file) for EAP-TLS/PEAP/TTLS 488 | #ca_cert=/etc/hostapd.ca.pem 489 | 490 | # Server certificate (PEM or DER file) for EAP-TLS/PEAP/TTLS 491 | #server_cert=/etc/hostapd.server.pem 492 | 493 | # Private key matching with the server certificate for EAP-TLS/PEAP/TTLS 494 | # This may point to the same file as server_cert if both certificate and key 495 | # are included in a single file. PKCS#12 (PFX) file (.p12/.pfx) can also be 496 | # used by commenting out server_cert and specifying the PFX file as the 497 | # private_key. 498 | #private_key=/etc/hostapd.server.prv 499 | 500 | # Passphrase for private key 501 | #private_key_passwd=secret passphrase 502 | 503 | # Enable CRL verification. 504 | # Note: hostapd does not yet support CRL downloading based on CDP. Thus, a 505 | # valid CRL signed by the CA is required to be included in the ca_cert file. 506 | # This can be done by using PEM format for CA certificate and CRL and 507 | # concatenating these into one file. Whenever CRL changes, hostapd needs to be 508 | # restarted to take the new CRL into use. 509 | # 0 = do not verify CRLs (default) 510 | # 1 = check the CRL of the user certificate 511 | # 2 = check all CRLs in the certificate path 512 | #check_crl=1 513 | 514 | # dh_file: File path to DH/DSA parameters file (in PEM format) 515 | # This is an optional configuration file for setting parameters for an 516 | # ephemeral DH key exchange. In most cases, the default RSA authentication does 517 | # not use this configuration. However, it is possible setup RSA to use 518 | # ephemeral DH key exchange. In addition, ciphers with DSA keys always use 519 | # ephemeral DH keys. This can be used to achieve forward secrecy. If the file 520 | # is in DSA parameters format, it will be automatically converted into DH 521 | # params. This parameter is required if anonymous EAP-FAST is used. 522 | # You can generate DH parameters file with OpenSSL, e.g., 523 | # "openssl dhparam -out /etc/hostapd.dh.pem 1024" 524 | #dh_file=/etc/hostapd.dh.pem 525 | 526 | # Configuration data for EAP-SIM database/authentication gateway interface. 527 | # This is a text string in implementation specific format. The example 528 | # implementation in eap_sim_db.c uses this as the UNIX domain socket name for 529 | # the HLR/AuC gateway (e.g., hlr_auc_gw). In this case, the path uses "unix:" 530 | # prefix. 531 | #eap_sim_db=unix:/tmp/hlr_auc_gw.sock 532 | 533 | # Encryption key for EAP-FAST PAC-Opaque values. This key must be a secret, 534 | # random value. It is configured as a 16-octet value in hex format. It can be 535 | # generated, e.g., with the following command: 536 | # od -tx1 -v -N16 /dev/random | colrm 1 8 | tr -d ' ' 537 | #pac_opaque_encr_key=000102030405060708090a0b0c0d0e0f 538 | 539 | # EAP-FAST authority identity (A-ID) 540 | # A-ID indicates the identity of the authority that issues PACs. The A-ID 541 | # should be unique across all issuing servers. In theory, this is a variable 542 | # length field, but due to some existing implementations required A-ID to be 543 | # 16 octets in length, it is strongly recommended to use that length for the 544 | # field to provided interoperability with deployed peer implementation. This 545 | # field is configured in hex format. 546 | #eap_fast_a_id=101112131415161718191a1b1c1d1e1f 547 | 548 | # EAP-FAST authority identifier information (A-ID-Info) 549 | # This is a user-friendly name for the A-ID. For example, the enterprise name 550 | # and server name in a human-readable format. This field is encoded as UTF-8. 551 | #eap_fast_a_id_info=test server 552 | 553 | # Enable/disable different EAP-FAST provisioning modes: 554 | #0 = provisioning disabled 555 | #1 = only anonymous provisioning allowed 556 | #2 = only authenticated provisioning allowed 557 | #3 = both provisioning modes allowed (default) 558 | #eap_fast_prov=3 559 | 560 | # EAP-FAST PAC-Key lifetime in seconds (hard limit) 561 | #pac_key_lifetime=604800 562 | 563 | # EAP-FAST PAC-Key refresh time in seconds (soft limit on remaining hard 564 | # limit). The server will generate a new PAC-Key when this number of seconds 565 | # (or fewer) of the lifetime remains. 566 | #pac_key_refresh_time=86400 567 | 568 | # EAP-SIM and EAP-AKA protected success/failure indication using AT_RESULT_IND 569 | # (default: 0 = disabled). 570 | #eap_sim_aka_result_ind=1 571 | 572 | # Trusted Network Connect (TNC) 573 | # If enabled, TNC validation will be required before the peer is allowed to 574 | # connect. Note: This is only used with EAP-TTLS and EAP-FAST. If any other 575 | # EAP method is enabled, the peer will be allowed to connect without TNC. 576 | #tnc=1 577 | 578 | 579 | ##### IEEE 802.11f - Inter-Access Point Protocol (IAPP) ####################### 580 | 581 | # Interface to be used for IAPP broadcast packets 582 | #iapp_interface=eth0 583 | 584 | 585 | ##### RADIUS client configuration ############################################# 586 | # for IEEE 802.1X with external Authentication Server, IEEE 802.11 587 | # authentication with external ACL for MAC addresses, and accounting 588 | 589 | # The own IP address of the access point (used as NAS-IP-Address) 590 | own_ip_addr=127.0.0.1 591 | 592 | # Optional NAS-Identifier string for RADIUS messages. When used, this should be 593 | # a unique to the NAS within the scope of the RADIUS server. For example, a 594 | # fully qualified domain name can be used here. 595 | # When using IEEE 802.11r, nas_identifier must be set and must be between 1 and 596 | # 48 octets long. 597 | #nas_identifier=ap.example.com 598 | 599 | # RADIUS authentication server 600 | #auth_server_addr=127.0.0.1 601 | #auth_server_port=1812 602 | #auth_server_shared_secret=secret 603 | 604 | # RADIUS accounting server 605 | #acct_server_addr=127.0.0.1 606 | #acct_server_port=1813 607 | #acct_server_shared_secret=secret 608 | 609 | # Secondary RADIUS servers; to be used if primary one does not reply to 610 | # RADIUS packets. These are optional and there can be more than one secondary 611 | # server listed. 612 | #auth_server_addr=127.0.0.2 613 | #auth_server_port=1812 614 | #auth_server_shared_secret=secret2 615 | # 616 | #acct_server_addr=127.0.0.2 617 | #acct_server_port=1813 618 | #acct_server_shared_secret=secret2 619 | 620 | # Retry interval for trying to return to the primary RADIUS server (in 621 | # seconds). RADIUS client code will automatically try to use the next server 622 | # when the current server is not replying to requests. If this interval is set, 623 | # primary server will be retried after configured amount of time even if the 624 | # currently used secondary server is still working. 625 | #radius_retry_primary_interval=600 626 | 627 | 628 | # Interim accounting update interval 629 | # If this is set (larger than 0) and acct_server is configured, hostapd will 630 | # send interim accounting updates every N seconds. Note: if set, this overrides 631 | # possible Acct-Interim-Interval attribute in Access-Accept message. Thus, this 632 | # value should not be configured in hostapd.conf, if RADIUS server is used to 633 | # control the interim interval. 634 | # This value should not be less 600 (10 minutes) and must not be less than 635 | # 60 (1 minute). 636 | #radius_acct_interim_interval=600 637 | 638 | # Dynamic VLAN mode; allow RADIUS authentication server to decide which VLAN 639 | # is used for the stations. This information is parsed from following RADIUS 640 | # attributes based on RFC 3580 and RFC 2868: Tunnel-Type (value 13 = VLAN), 641 | # Tunnel-Medium-Type (value 6 = IEEE 802), Tunnel-Private-Group-ID (value 642 | # VLANID as a string). vlan_file option below must be configured if dynamic 643 | # VLANs are used. Optionally, the local MAC ACL list (accept_mac_file) can be 644 | # used to set static client MAC address to VLAN ID mapping. 645 | # 0 = disabled (default) 646 | # 1 = option; use default interface if RADIUS server does not include VLAN ID 647 | # 2 = required; reject authentication if RADIUS server does not include VLAN ID 648 | #dynamic_vlan=0 649 | 650 | # VLAN interface list for dynamic VLAN mode is read from a separate text file. 651 | # This list is used to map VLAN ID from the RADIUS server to a network 652 | # interface. Each station is bound to one interface in the same way as with 653 | # multiple BSSIDs or SSIDs. Each line in this text file is defining a new 654 | # interface and the line must include VLAN ID and interface name separated by 655 | # white space (space or tab). 656 | #vlan_file=/etc/hostapd.vlan 657 | 658 | # Interface where 802.1q tagged packets should appear when a RADIUS server is 659 | # used to determine which VLAN a station is on. hostapd creates a bridge for 660 | # each VLAN. Then hostapd adds a VLAN interface (associated with the interface 661 | # indicated by 'vlan_tagged_interface') and the appropriate wireless interface 662 | # to the bridge. 663 | #vlan_tagged_interface=eth0 664 | 665 | 666 | ##### RADIUS authentication server configuration ############################## 667 | 668 | # hostapd can be used as a RADIUS authentication server for other hosts. This 669 | # requires that the integrated EAP server is also enabled and both 670 | # authentication services are sharing the same configuration. 671 | 672 | # File name of the RADIUS clients configuration for the RADIUS server. If this 673 | # commented out, RADIUS server is disabled. 674 | #radius_server_clients=/etc/hostapd.radius_clients 675 | 676 | # The UDP port number for the RADIUS authentication server 677 | #radius_server_auth_port=1812 678 | 679 | # Use IPv6 with RADIUS server (IPv4 will also be supported using IPv6 API) 680 | #radius_server_ipv6=1 681 | 682 | 683 | ##### WPA/IEEE 802.11i configuration ########################################## 684 | 685 | # Enable WPA. Setting this variable configures the AP to require WPA (either 686 | # WPA-PSK or WPA-RADIUS/EAP based on other configuration). For WPA-PSK, either 687 | # wpa_psk or wpa_passphrase must be set and wpa_key_mgmt must include WPA-PSK. 688 | # For WPA-RADIUS/EAP, ieee8021x must be set (but without dynamic WEP keys), 689 | # RADIUS authentication server must be configured, and WPA-EAP must be included 690 | # in wpa_key_mgmt. 691 | # This field is a bit field that can be used to enable WPA (IEEE 802.11i/D3.0) 692 | # and/or WPA2 (full IEEE 802.11i/RSN): 693 | # bit0 = WPA 694 | # bit1 = IEEE 802.11i/RSN (WPA2) (dot11RSNAEnabled) 695 | #wpa=1 696 | 697 | # WPA pre-shared keys for WPA-PSK. This can be either entered as a 256-bit 698 | # secret in hex format (64 hex digits), wpa_psk, or as an ASCII passphrase 699 | # (8..63 characters) that will be converted to PSK. This conversion uses SSID 700 | # so the PSK changes when ASCII passphrase is used and the SSID is changed. 701 | # wpa_psk (dot11RSNAConfigPSKValue) 702 | # wpa_passphrase (dot11RSNAConfigPSKPassPhrase) 703 | #wpa_psk=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef 704 | #wpa_passphrase=qualcomm 705 | 706 | # Optionally, WPA PSKs can be read from a separate text file (containing list 707 | # of (PSK,MAC address) pairs. This allows more than one PSK to be configured. 708 | # Use absolute path name to make sure that the files can be read on SIGHUP 709 | # configuration reloads. 710 | #wpa_psk_file=/etc/hostapd.wpa_psk 711 | 712 | # Set of accepted key management algorithms (WPA-PSK, WPA-EAP, or both). The 713 | # entries are separated with a space. WPA-PSK-SHA256 and WPA-EAP-SHA256 can be 714 | # added to enable SHA256-based stronger algorithms. 715 | # (dot11RSNAConfigAuthenticationSuitesTable) 716 | #wpa_key_mgmt=WPA-PSK 717 | #wpa_key_mgmt=WPA-EAP 718 | 719 | # Set of accepted cipher suites (encryption algorithms) for pairwise keys 720 | # (unicast packets). This is a space separated list of algorithms: 721 | # CCMP = AES in Counter mode with CBC-MAC [RFC 3610, IEEE 802.11i/D7.0] 722 | # TKIP = Temporal Key Integrity Protocol [IEEE 802.11i/D7.0] 723 | # Group cipher suite (encryption algorithm for broadcast and multicast frames) 724 | # is automatically selected based on this configuration. If only CCMP is 725 | # allowed as the pairwise cipher, group cipher will also be CCMP. Otherwise, 726 | # TKIP will be used as the group cipher. 727 | # (dot11RSNAConfigPairwiseCiphersTable) 728 | # Pairwise cipher for WPA (v1) (default: TKIP) 729 | #wpa_pairwise=TKIP CCMP 730 | # Pairwise cipher for RSN/WPA2 (default: use wpa_pairwise value) 731 | #rsn_pairwise=CCMP 732 | 733 | # Time interval for rekeying GTK (broadcast/multicast encryption keys) in 734 | # seconds. (dot11RSNAConfigGroupRekeyTime) 735 | wpa_group_rekey=86400 736 | 737 | # Rekey GTK when any STA that possesses the current GTK is leaving the BSS. 738 | # (dot11RSNAConfigGroupRekeyStrict) 739 | #wpa_strict_rekey=1 740 | 741 | # Time interval for rekeying GMK (master key used internally to generate GTKs 742 | # (in seconds). 743 | #wpa_gmk_rekey=86400 744 | 745 | # Maximum lifetime for PTK in seconds. This can be used to enforce rekeying of 746 | # PTK to mitigate some attacks against TKIP deficiencies. 747 | #wpa_ptk_rekey=600 748 | 749 | # Enable IEEE 802.11i/RSN/WPA2 pre-authentication. This is used to speed up 750 | # roaming be pre-authenticating IEEE 802.1X/EAP part of the full RSN 751 | # authentication and key handshake before actually associating with a new AP. 752 | # (dot11RSNAPreauthenticationEnabled) 753 | #rsn_preauth=1 754 | # 755 | # Space separated list of interfaces from which pre-authentication frames are 756 | # accepted (e.g., 'eth0' or 'eth0 wlan0wds0'. This list should include all 757 | # interface that are used for connections to other APs. This could include 758 | # wired interfaces and WDS links. The normal wireless data interface towards 759 | # associated stations (e.g., wlan0) should not be added, since 760 | # pre-authentication is only used with APs other than the currently associated 761 | # one. 762 | #rsn_preauth_interfaces=eth0 763 | 764 | # peerkey: Whether PeerKey negotiation for direct links (IEEE 802.11e) is 765 | # allowed. This is only used with RSN/WPA2. 766 | # 0 = disabled (default) 767 | # 1 = enabled 768 | #peerkey=1 769 | 770 | # ieee80211w: Whether management frame protection (MFP) is enabled 771 | # 0 = disabled (default) 772 | # 1 = optional 773 | # 2 = required 774 | #ieee80211w=0 775 | 776 | # Association SA Query maximum timeout (in TU = 1.024 ms; for MFP) 777 | # (maximum time to wait for a SA Query response) 778 | # dot11AssociationSAQueryMaximumTimeout, 1...4294967295 779 | #assoc_sa_query_max_timeout=1000 780 | 781 | # Association SA Query retry timeout (in TU = 1.024 ms; for MFP) 782 | # (time between two subsequent SA Query requests) 783 | # dot11AssociationSAQueryRetryTimeout, 1...4294967295 784 | #assoc_sa_query_retry_timeout=201 785 | 786 | 787 | # okc: Opportunistic Key Caching (aka Proactive Key Caching) 788 | # Allow PMK cache to be shared opportunistically among configured interfaces 789 | # and BSSes (i.e., all configurations within a single hostapd process). 790 | # 0 = disabled (default) 791 | # 1 = enabled 792 | #okc=1 793 | 794 | 795 | ##### IEEE 802.11r configuration ############################################## 796 | 797 | # Mobility Domain identifier (dot11FTMobilityDomainID, MDID) 798 | # MDID is used to indicate a group of APs (within an ESS, i.e., sharing the 799 | # same SSID) between which a STA can use Fast BSS Transition. 800 | # 2-octet identifier as a hex string. 801 | #mobility_domain=a1b2 802 | 803 | # PMK-R0 Key Holder identifier (dot11FTR0KeyHolderID) 804 | # 1 to 48 octet identifier. 805 | # This is configured with nas_identifier (see RADIUS client section above). 806 | 807 | # Default lifetime of the PMK-RO in minutes; range 1..65535 808 | # (dot11FTR0KeyLifetime) 809 | #r0_key_lifetime=10000 810 | 811 | # PMK-R1 Key Holder identifier (dot11FTR1KeyHolderID) 812 | # 6-octet identifier as a hex string. 813 | #r1_key_holder=000102030405 814 | 815 | # Reassociation deadline in time units (TUs / 1.024 ms; range 1000..65535) 816 | # (dot11FTReassociationDeadline) 817 | #reassociation_deadline=1000 818 | 819 | # List of R0KHs in the same Mobility Domain 820 | # format: <128-bit key as hex string> 821 | # This list is used to map R0KH-ID (NAS Identifier) to a destination MAC 822 | # address when requesting PMK-R1 key from the R0KH that the STA used during the 823 | # Initial Mobility Domain Association. 824 | #r0kh=02:01:02:03:04:05 r0kh-1.example.com 000102030405060708090a0b0c0d0e0f 825 | #r0kh=02:01:02:03:04:06 r0kh-2.example.com 00112233445566778899aabbccddeeff 826 | # And so on.. One line per R0KH. 827 | 828 | # List of R1KHs in the same Mobility Domain 829 | # format: <128-bit key as hex string> 830 | # This list is used to map R1KH-ID to a destination MAC address when sending 831 | # PMK-R1 key from the R0KH. This is also the list of authorized R1KHs in the MD 832 | # that can request PMK-R1 keys. 833 | #r1kh=02:01:02:03:04:05 02:11:22:33:44:55 000102030405060708090a0b0c0d0e0f 834 | #r1kh=02:01:02:03:04:06 02:11:22:33:44:66 00112233445566778899aabbccddeeff 835 | # And so on.. One line per R1KH. 836 | 837 | # Whether PMK-R1 push is enabled at R0KH 838 | # 0 = do not push PMK-R1 to all configured R1KHs (default) 839 | # 1 = push PMK-R1 to all configured R1KHs whenever a new PMK-R0 is derived 840 | #pmk_r1_push=1 841 | 842 | ##### Passive scanning ######################################################## 843 | # Scan different channels every N seconds. 0 = disable passive scanning. 844 | #passive_scan_interval=60 845 | 846 | # Listen N usecs on each channel when doing passive scanning. 847 | # This value plus the time needed for changing channels should be less than 848 | # 32 milliseconds (i.e. 32000 usec) to avoid interruptions to normal 849 | # operations. Time needed for channel changing varies based on the used wlan 850 | # hardware. 851 | # default: disabled (0) 852 | #passive_scan_listen=10000 853 | 854 | # Passive scanning mode: 855 | # 0 = scan all supported modes (802.11a/b/g/Turbo) (default) 856 | # 1 = scan only the mode that is currently used for normal operations 857 | #passive_scan_mode=1 858 | 859 | # Maximum number of entries kept in AP table (either for passive scanning or 860 | # for detecting Overlapping Legacy BSS Condition). The oldest entry will be 861 | # removed when adding a new entry that would make the list grow over this 862 | # limit. Note! Wi-Fi certification for IEEE 802.11g requires that OLBC is 863 | # enabled, so this field should not be set to 0 when using IEEE 802.11g. 864 | # default: 255 865 | #ap_table_max_size=255 866 | 867 | # Number of seconds of no frames received after which entries may be deleted 868 | # from the AP table. Since passive scanning is not usually performed frequently 869 | # this should not be set to very small value. In addition, there is no 870 | # guarantee that every scan cycle will receive beacon frames from the 871 | # neighboring APs. 872 | # default: 60 873 | #ap_table_expiration_time=3600 874 | 875 | 876 | ##### Wi-Fi Protected Setup (WPS) ############################################# 877 | 878 | # WPS state 879 | # 0 = WPS disabled (default) 880 | # 1 = WPS enabled, not configured 881 | # 2 = WPS enabled, configured 882 | #wps_state=2 883 | 884 | # AP can be configured into a locked state where new WPS Registrar are not 885 | # accepted, but previously authorized Registrars (including the internal one) 886 | # can continue to add new Enrollees. 887 | ap_setup_locked=1 888 | 889 | # Universally Unique IDentifier (UUID; see RFC 4122) of the device 890 | # This value is used as the UUID for the internal WPS Registrar. If the AP 891 | # is also using UPnP, this value should be set to the device's UPnP UUID. 892 | # If not configured, UUID will be generated based on the local MAC address. 893 | #uuid=12345678-9abc-def0-1234-56789abcdef0 894 | 895 | # Note: If wpa_psk_file is set, WPS is used to generate random, per-device PSKs 896 | # that will be appended to the wpa_psk_file. If wpa_psk_file is not set, the 897 | # default PSK (wpa_psk/wpa_passphrase) will be delivered to Enrollees. Use of 898 | # per-device PSKs is recommended as the more secure option (i.e., make sure to 899 | # set wpa_psk_file when using WPS with WPA-PSK). 900 | 901 | # When an Enrollee requests access to the network with PIN method, the Enrollee 902 | # PIN will need to be entered for the Registrar. PIN request notifications are 903 | # sent to hostapd ctrl_iface monitor. In addition, they can be written to a 904 | # text file that could be used, e.g., to populate the AP administration UI with 905 | # pending PIN requests. If the following variable is set, the PIN requests will 906 | # be written to the configured file. 907 | #wps_pin_requests=/var/run/hostapd_wps_pin_requests 908 | 909 | # Device Name 910 | # User-friendly description of device; up to 32 octets encoded in UTF-8 911 | #device_name=Wireless AP 912 | 913 | # Manufacturer 914 | # The manufacturer of the device (up to 64 ASCII characters) 915 | #manufacturer=Qualcomm 916 | 917 | # Model Name 918 | # Model of the device (up to 32 ASCII characters) 919 | #model_name=QualcommSoftAP 920 | 921 | # Model Number 922 | # Additional device description (up to 32 ASCII characters) 923 | #model_number=123 924 | 925 | # Serial Number 926 | # Serial number of the device (up to 32 characters) 927 | #serial_number=12345 928 | 929 | # Primary Device Type 930 | # Used format: -- 931 | # categ = Category as an integer value 932 | # OUI = OUI and type octet as a 4-octet hex-encoded value; 0050F204 for 933 | # default WPS OUI 934 | # subcateg = OUI-specific Sub Category as an integer value 935 | # Examples: 936 | # 1-0050F204-1 (Computer / PC) 937 | # 1-0050F204-2 (Computer / Server) 938 | # 5-0050F204-1 (Storage / NAS) 939 | # 6-0050F204-1 (Network Infrastructure / AP) 940 | #device_type=6-0050F204-1 941 | 942 | # OS Version 943 | # 4-octet operating system version number (hex string) 944 | #os_version=01020300 945 | 946 | # Config Methods 947 | # List of the supported configuration methods 948 | config_methods=label display push_button keypad 949 | 950 | # Access point PIN for initial configuration and adding Registrars 951 | # If not set, hostapd will not allow external WPS Registrars to control the 952 | # access point. 953 | #ap_pin=12345670 954 | 955 | # Skip building of automatic WPS credential 956 | # This can be used to allow the automatically generated Credential attribute to 957 | # be replaced with pre-configured Credential(s). 958 | #skip_cred_build=1 959 | 960 | # Additional Credential attribute(s) 961 | # This option can be used to add pre-configured Credential attributes into M8 962 | # message when acting as a Registrar. If skip_cred_build=1, this data will also 963 | # be able to override the Credential attribute that would have otherwise been 964 | # automatically generated based on network configuration. This configuration 965 | # option points to an external file that much contain the WPS Credential 966 | # attribute(s) as binary data. 967 | #extra_cred=hostapd.cred 968 | 969 | # Credential processing 970 | # 0 = process received credentials internally (default) 971 | # 1 = do not process received credentials; just pass them over ctrl_iface to 972 | # external program(s) 973 | # 2 = process received credentials internally and pass them over ctrl_iface 974 | # to external program(s) 975 | # Note: With wps_cred_processing=1, skip_cred_build should be set to 1 and 976 | # extra_cred be used to provide the Credential data for Enrollees. 977 | # 978 | # wps_cred_processing=1 will disabled automatic updates of hostapd.conf file 979 | # both for Credential processing and for marking AP Setup Locked based on 980 | # validation failures of AP PIN. An external program is responsible on updating 981 | # the configuration appropriately in this case. 982 | #wps_cred_processing=0 983 | 984 | # AP Settings Attributes for M7 985 | # By default, hostapd generates the AP Settings Attributes for M7 based on the 986 | # current configuration. It is possible to override this by providing a file 987 | # with pre-configured attributes. This is similar to extra_cred file format, 988 | # but the AP Settings attributes are not encapsulated in a Credential 989 | # attribute. 990 | #ap_settings=hostapd.ap_settings 991 | 992 | # WPS UPnP interface 993 | # If set, support for external Registrars is enabled. 994 | #upnp_iface=br0 995 | 996 | # Friendly Name (required for UPnP) 997 | # Short description for end use. Should be less than 64 characters. 998 | #friendly_name=Qualcomm Access Point 999 | 1000 | # Manufacturer URL (optional for UPnP) 1001 | #manufacturer_url=http://www.qualcomm.com/ 1002 | 1003 | # Model Description (recommended for UPnP) 1004 | # Long description for end user. Should be less than 128 characters. 1005 | #model_description=Wireless Access Point 1006 | 1007 | # Model URL (optional for UPnP) 1008 | #model_url=http://www.qualcomm.com/ 1009 | 1010 | # Universal Product Code (optional for UPnP) 1011 | # 12-digit, all-numeric code that identifies the consumer package. 1012 | #upc=123456789012 1013 | 1014 | ##### Multiple BSSID support ################################################## 1015 | # 1016 | # Above configuration is using the default interface (wlan#, or multi-SSID VLAN 1017 | # interfaces). Other BSSIDs can be added by using separator 'bss' with 1018 | # default interface name to be allocated for the data packets of the new BSS. 1019 | # 1020 | # hostapd will generate BSSID mask based on the BSSIDs that are 1021 | # configured. hostapd will verify that dev_addr & MASK == dev_addr. If this is 1022 | # not the case, the MAC address of the radio must be changed before starting 1023 | # hostapd (ifconfig wlan0 hw ether ). 1024 | # 1025 | # BSSIDs are assigned in order to each BSS, unless an explicit BSSID is 1026 | # specified using the 'bssid' parameter. 1027 | # If an explicit BSSID is specified, it must be chosen such that it: 1028 | # - results in a valid MASK that covers it and the dev_addr 1029 | # - is not the same as the MAC address of the radio 1030 | # - is not the same as any other explicitly specified BSSID 1031 | # 1032 | # Please note that hostapd uses some of the values configured for the first BSS 1033 | # as the defaults for the following BSSes. However, it is recommended that all 1034 | # BSSes include explicit configuration of all relevant configuration items. 1035 | # 1036 | #bss=wlan0_0 1037 | #ssid=test2 1038 | # most of the above items can be used here (apart from radio interface specific 1039 | # items, like channel) 1040 | 1041 | #bss=wlan0_1 1042 | #bssid=00:13:10:95:fe:0b 1043 | # ... 1044 | -------------------------------------------------------------------------------- /configs/hostapd.deny: -------------------------------------------------------------------------------- 1 | # List of MAC addresses that are not allowed to authenticate (IEEE 802.11) 2 | # with the AP. 3 | -------------------------------------------------------------------------------- /configs/media_codecs.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 82 | 83 | 100 | 101 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | -------------------------------------------------------------------------------- /configs/msm_irqbalance.conf: -------------------------------------------------------------------------------- 1 | PRIO=0,0,0,0,1,1,1,1 2 | IGNORED_IRQ=20,39,200,203,155,157 3 | -------------------------------------------------------------------------------- /configs/p2p_supplicant_overlay.conf: -------------------------------------------------------------------------------- 1 | disable_scan_offload=1 2 | p2p_no_group_iface=1 3 | -------------------------------------------------------------------------------- /configs/sec_config: -------------------------------------------------------------------------------- 1 | /* IPC Security Config */ 2 | /* :: */ 3 | 16:4294967295:1000:3004 4 | /* Allow SS CTL service to be used by system and net_raw processes */ 5 | 43:4294967295:1000:3004 6 | /* QMI-SLIM service permitted to gps and net_raw */ 7 | 55:4294967295:1021:3004 8 | /* Allow Sensor services to be used by sensor process */ 9 | 256:4294967295:3011 10 | 257:4294967295:3011 11 | 258:4294967295:3011 12 | 259:4294967295:3011 13 | 260:4294967295:3011 14 | 261:4294967295:3011 15 | 262:4294967295:3011 16 | 263:4294967295:3011 17 | 264:4294967295:3011 18 | 265:4294967295:3011 19 | 266:4294967295:3011 20 | 267:4294967295:3011 21 | 268:4294967295:3011 22 | 269:4294967295:3011 23 | 270:4294967295:3011 24 | 271:4294967295:3011 25 | 272:4294967295:3011 26 | 273:4294967295:3011 27 | 274:4294967295:3011 28 | 275:4294967295:3011 29 | 276:4294967295:3011 30 | 277:4294967295:3011 31 | 278:4294967295:3011 32 | 279:4294967295:3011 33 | 280:4294967295:3011 34 | 281:4294967295:3011 35 | 282:4294967295:3011 36 | 283:4294967295:3011 37 | 284:4294967295:3011 38 | 285:4294967295:3011 39 | 286:4294967295:3011 40 | 287:4294967295:3011 41 | 288:4294967295:3011 42 | 289:4294967295:3011 43 | 290:4294967295:3011 44 | 291:4294967295:3011 45 | 292:4294967295:3011 46 | 293:4294967295:3011 47 | 294:4294967295:3011 48 | 295:4294967295:3011 49 | 296:4294967295:3011 50 | 297:4294967295:3011 51 | 298:4294967295:3011 52 | 299:4294967295:3011 53 | 300:4294967295:3011 54 | 301:4294967295:3011 55 | 302:4294967295:3011 56 | 303:4294967295:3011 57 | 304:4294967295:3011 58 | 305:4294967295:3011 59 | 306:4294967295:3011 60 | 307:4294967295:3011 61 | 308:4294967295:3011 62 | 309:4294967295:3011 63 | 310:4294967295:3011 64 | 311:4294967295:3011 65 | 312:4294967295:3011 66 | 313:4294967295:3011 67 | 314:4294967295:3011 68 | 315:4294967295:3011 69 | 316:4294967295:3011 70 | 317:4294967295:3011 71 | 318:4294967295:3011 72 | 319:4294967295:3011 73 | 320:4294967295:3011 74 | 321:4294967295:3011 75 | 322:4294967295:3011 76 | 323:4294967295:3011 77 | 324:4294967295:3011 78 | 325:4294967295:3011 79 | 326:4294967295:3011 80 | 327:4294967295:3011 81 | 328:4294967295:3011 82 | 329:4294967295:3011 83 | 330:4294967295:3011 84 | 331:4294967295:3011 85 | 332:4294967295:3011 86 | 333:4294967295:3011 87 | 334:4294967295:3011 88 | 335:4294967295:3011 89 | 336:4294967295:3011 90 | 337:4294967295:3011 91 | 338:4294967295:3011 92 | 339:4294967295:3011 93 | 340:4294967295:3011 94 | 341:4294967295:3011 95 | 342:4294967295:3011 96 | 343:4294967295:3011 97 | 344:4294967295:3011 98 | 345:4294967295:3011 99 | 346:4294967295:3011 100 | 347:4294967295:3011 101 | 348:4294967295:3011 102 | 349:4294967295:3011 103 | 350:4294967295:3011 104 | 351:4294967295:3011 105 | 352:4294967295:3011 106 | 353:4294967295:3011 107 | 354:4294967295:3011 108 | 355:4294967295:3011 109 | 356:4294967295:3011 110 | 357:4294967295:3011 111 | 358:4294967295:3011 112 | 359:4294967295:3011 113 | 360:4294967295:3011 114 | 361:4294967295:3011 115 | 362:4294967295:3011 116 | 363:4294967295:3011 117 | 364:4294967295:3011 118 | 365:4294967295:3011 119 | 366:4294967295:3011 120 | 367:4294967295:3011 121 | 368:4294967295:3011 122 | 369:4294967295:3011 123 | 370:4294967295:3011 124 | 371:4294967295:3011 125 | 372:4294967295:3011 126 | 373:4294967295:3011 127 | 374:4294967295:3011 128 | 375:4294967295:3011 129 | 376:4294967295:3011 130 | 377:4294967295:3011 131 | 378:4294967295:3011 132 | 379:4294967295:3011 133 | 380:4294967295:3011 134 | 381:4294967295:3011 135 | 382:4294967295:3011 136 | 383:4294967295:3011 137 | 384:4294967295:3011 138 | 385:4294967295:3011 139 | 386:4294967295:3011 140 | 387:4294967295:3011 141 | 388:4294967295:3011 142 | 389:4294967295:3011 143 | 390:4294967295:3011 144 | 391:4294967295:3011 145 | 392:4294967295:3011 146 | 393:4294967295:3011 147 | 394:4294967295:3011 148 | 395:4294967295:3011 149 | 396:4294967295:3011 150 | 397:4294967295:3011 151 | 398:4294967295:3011 152 | 399:4294967295:3011 153 | 400:4294967295:3011 154 | 401:4294967295:3011 155 | 402:4294967295:3011 156 | 403:4294967295:3011 157 | 404:4294967295:3011 158 | 405:4294967295:3011 159 | 406:4294967295:3011 160 | 407:4294967295:3011 161 | 408:4294967295:3011 162 | 409:4294967295:3011 163 | 410:4294967295:3011 164 | 411:4294967295:3011 165 | 412:4294967295:3011 166 | 413:4294967295:3011 167 | 414:4294967295:3011 168 | 415:4294967295:3011 169 | 416:4294967295:3011 170 | 417:4294967295:3011 171 | 418:4294967295:3011 172 | 419:4294967295:3011 173 | 420:4294967295:3011 174 | 421:4294967295:3011 175 | 422:4294967295:3011 176 | 423:4294967295:3011 177 | 424:4294967295:3011 178 | 425:4294967295:3011 179 | 426:4294967295:3011 180 | 427:4294967295:3011 181 | 428:4294967295:3011 182 | 429:4294967295:3011 183 | 430:4294967295:3011 184 | 431:4294967295:3011 185 | 432:4294967295:3011 186 | 433:4294967295:3011 187 | 434:4294967295:3011 188 | 435:4294967295:3011 189 | 436:4294967295:3011 190 | 437:4294967295:3011 191 | 438:4294967295:3011 192 | 439:4294967295:3011 193 | 440:4294967295:3011 194 | 441:4294967295:3011 195 | 442:4294967295:3011 196 | 443:4294967295:3011 197 | 444:4294967295:3011 198 | 445:4294967295:3011 199 | 446:4294967295:3011 200 | 447:4294967295:3011 201 | 448:4294967295:3011 202 | 449:4294967295:3011 203 | 450:4294967295:3011 204 | 451:4294967295:3011 205 | 452:4294967295:3011 206 | 453:4294967295:3011 207 | 454:4294967295:3011 208 | 455:4294967295:3011 209 | 456:4294967295:3011 210 | 457:4294967295:3011 211 | 458:4294967295:3011 212 | 459:4294967295:3011 213 | 460:4294967295:3011 214 | 461:4294967295:3011 215 | 462:4294967295:3011 216 | 463:4294967295:3011 217 | 464:4294967295:3011 218 | 465:4294967295:3011 219 | 466:4294967295:3011 220 | 467:4294967295:3011 221 | 468:4294967295:3011 222 | 469:4294967295:3011 223 | 470:4294967295:3011 224 | 471:4294967295:3011 225 | 472:4294967295:3011 226 | 473:4294967295:3011 227 | 474:4294967295:3011 228 | 475:4294967295:3011 229 | 476:4294967295:3011 230 | 477:4294967295:3011 231 | 478:4294967295:3011 232 | 479:4294967295:3011 233 | 480:4294967295:3011 234 | 481:4294967295:3011 235 | 482:4294967295:3011 236 | 483:4294967295:3011 237 | 484:4294967295:3011 238 | 485:4294967295:3011 239 | 486:4294967295:3011 240 | 487:4294967295:3011 241 | 488:4294967295:3011 242 | 489:4294967295:3011 243 | 490:4294967295:3011 244 | 491:4294967295:3011 245 | 492:4294967295:3011 246 | 493:4294967295:3011 247 | 494:4294967295:3011 248 | 495:4294967295:3011 249 | 496:4294967295:3011 250 | 497:4294967295:3011 251 | 498:4294967295:3011 252 | 499:4294967295:3011 253 | 500:4294967295:3011 254 | 501:4294967295:3011 255 | 502:4294967295:3011 256 | 503:4294967295:3011 257 | 504:4294967295:3011 258 | 505:4294967295:3011 259 | 506:4294967295:3011 260 | 507:4294967295:3011 261 | 508:4294967295:3011 262 | 509:4294967295:3011 263 | 510:4294967295:3011 264 | 511:4294967295:3011 265 | /* Allow RCS service to aquire net_raw permission */ 266 | 18:4294967295:1001:3004 267 | /* Allow QMID service to aquire net_raw permission */ 268 | 3:4294967295:1001:3004 269 | 2:4294967295:1001:3004 270 | 42:4294967295:1001:3004 271 | 18:4294967295:1001:3004 272 | 9:4294967295:1001:3004 273 | 1:4294967295:1001:3004 274 | /*Data Power Manager Daemon dpmd */ 275 | 1:4294967295:1000:3004 276 | 48:4294967295:1000:3004 277 | 4:4294967295:1001:3004 278 | 2797:4294967295:1001:3004 279 | 2808:4294967295:1001:3004:1000 280 | /* DPM */ 281 | 47:4294967295:1001:3004 282 | /* Allow communication to some QMI services with radio privilages */ 283 | /* Format is :: */ 284 | /* PBM */ 285 | 12:4294967295:1001 286 | /* WMS */ 287 | 5:4294967295:1001 288 | /* IMS VT */ 289 | 32:4294967295:1001 290 | /* IMSP */ 291 | 31:4294967295:1001 292 | /* PDC */ 293 | 36:4294967295:1001 294 | /* SAR */ 295 | 17:4294967295:1001 296 | /* RFRPE */ 297 | 41:4294967295:1001 298 | /*UIM*/ 299 | 11:4294967295:1001 300 | /*CAT*/ 301 | 10:4294967295:1001 302 | /*IMSA*/ 303 | 33:4294967295:1001 304 | /* Allow Data dpmd to access QMI DFS */ 305 | 48:4294967295:1000:3004 306 | /* DIAG */ 307 | 4097:4294967295:3009 308 | -------------------------------------------------------------------------------- /configs/wpa_supplicant_overlay.conf: -------------------------------------------------------------------------------- 1 | disable_scan_offload=1 2 | p2p_disabled=1 3 | p2p_no_group_iface=1 4 | -------------------------------------------------------------------------------- /init/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | 5 | LOCAL_MODULE_TAGS := optional 6 | LOCAL_C_INCLUDES := system/core/init 7 | LOCAL_CFLAGS := -Wall 8 | LOCAL_SRC_FILES := init_msm8916.cpp 9 | ifneq ($(TARGET_LIBINIT_MSM8916_DEFINES_FILE),) 10 | LOCAL_SRC_FILES += ../../../../$(TARGET_LIBINIT_MSM8916_DEFINES_FILE) 11 | endif 12 | LOCAL_MODULE := libinit_msm8916 13 | 14 | include $(BUILD_STATIC_LIBRARY) 15 | -------------------------------------------------------------------------------- /init/init_msm8916.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2016, The CyanogenMod Project 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | 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 10 | copyright notice, this list of conditions and the following 11 | disclaimer in the documentation and/or other materials provided 12 | with the distribution. 13 | * Neither the name of The Linux Foundation nor the names of its 14 | contributors may be used to endorse or promote products derived 15 | from this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 18 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 19 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 20 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 21 | BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 24 | BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 26 | OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 27 | IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | 36 | #include "vendor_init.h" 37 | #include "property_service.h" 38 | #include "log.h" 39 | #include "util.h" 40 | 41 | #include "init_msm8916.h" 42 | 43 | __attribute__ ((weak)) 44 | void init_target_properties() 45 | { 46 | } 47 | 48 | static int read_file2(const char *fname, char *data, int max_size) 49 | { 50 | int fd, rc; 51 | 52 | if (max_size < 1) 53 | return 0; 54 | 55 | fd = open(fname, O_RDONLY); 56 | if (fd < 0) { 57 | ERROR("failed to open '%s'\n", fname); 58 | return 0; 59 | } 60 | 61 | rc = read(fd, data, max_size - 1); 62 | if ((rc > 0) && (rc < max_size)) 63 | data[rc] = '\0'; 64 | else 65 | data[0] = '\0'; 66 | close(fd); 67 | 68 | return 1; 69 | } 70 | 71 | static void init_alarm_boot_properties() 72 | { 73 | char const *alarm_file = "/proc/sys/kernel/boot_reason"; 74 | char buf[64]; 75 | 76 | if (read_file2(alarm_file, buf, sizeof(buf))) { 77 | /* 78 | * Setup ro.alarm_boot value to true when it is RTC triggered boot up 79 | * For existing PMIC chips, the following mapping applies 80 | * for the value of boot_reason: 81 | * 82 | * 0 -> unknown 83 | * 1 -> hard reset 84 | * 2 -> sudden momentary power loss (SMPL) 85 | * 3 -> real time clock (RTC) 86 | * 4 -> DC charger inserted 87 | * 5 -> USB charger insertd 88 | * 6 -> PON1 pin toggled (for secondary PMICs) 89 | * 7 -> CBLPWR_N pin toggled (for external power supply) 90 | * 8 -> KPDPWR_N pin toggled (power key pressed) 91 | */ 92 | if (buf[0] == '3') 93 | property_set("ro.alarm_boot", "true"); 94 | else 95 | property_set("ro.alarm_boot", "false"); 96 | } 97 | } 98 | 99 | void vendor_load_properties() 100 | { 101 | init_target_properties(); 102 | init_alarm_boot_properties(); 103 | } 104 | -------------------------------------------------------------------------------- /init/init_msm8916.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2016, The CyanogenMod Project 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | 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 10 | copyright notice, this list of conditions and the following 11 | disclaimer in the documentation and/or other materials provided 12 | with the distribution. 13 | * Neither the name of The Linux Foundation nor the names of its 14 | contributors may be used to endorse or promote products derived 15 | from this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED 18 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 19 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT 20 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 21 | BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 24 | BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 25 | WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 26 | OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN 27 | IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #ifndef __INIT_MSM8916__H__ 31 | #define __INIT_MSM8916__H__ 32 | 33 | void init_target_properties(); 34 | 35 | #endif /* __INIT_MSM8916__H__ */ 36 | -------------------------------------------------------------------------------- /msm8939.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2015 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 | # Overlay 18 | DEVICE_PACKAGE_OVERLAYS += $(LOCAL_PATH)/overlay 19 | 20 | # Permissions 21 | PRODUCT_COPY_FILES += \ 22 | frameworks/native/data/etc/android.hardware.audio.low_latency.xml:system/etc/permissions/android.hardware.audio.low_latency.xml \ 23 | frameworks/native/data/etc/android.hardware.bluetooth.xml:system/etc/permissions/android.hardware.bluetooth.xml \ 24 | frameworks/native/data/etc/android.hardware.bluetooth_le.xml:system/etc/permissions/android.hardware.bluetooth_le.xml \ 25 | frameworks/native/data/etc/android.hardware.camera.flash-autofocus.xml:system/etc/permissions/android.hardware.camera.flash-autofocus.xml \ 26 | frameworks/native/data/etc/android.hardware.camera.front.xml:system/etc/permissions/android.hardware.camera.front.xml \ 27 | frameworks/native/data/etc/android.hardware.ethernet.xml:system/etc/permissions/android.hardware.ethernet.xml \ 28 | frameworks/native/data/etc/android.hardware.location.gps.xml:system/etc/permissions/android.hardware.location.gps.xml \ 29 | frameworks/native/data/etc/android.hardware.opengles.aep.xml:system/etc/permissions/android.hardware.opengles.aep.xml \ 30 | frameworks/native/data/etc/android.hardware.telephony.gsm.xml:system/etc/permissions/android.hardware.telephony.gsm.xml \ 31 | frameworks/native/data/etc/android.hardware.telephony.cdma.xml:system/etc/permissions/android.hardware.telephony.cdma.xml \ 32 | frameworks/native/data/etc/android.hardware.touchscreen.multitouch.jazzhand.xml:system/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml \ 33 | frameworks/native/data/etc/android.hardware.usb.accessory.xml:system/etc/permissions/android.hardware.usb.accessory.xml \ 34 | frameworks/native/data/etc/android.hardware.usb.host.xml:system/etc/permissions/android.hardware.usb.host.xml \ 35 | frameworks/native/data/etc/android.hardware.wifi.direct.xml:system/etc/permissions/android.hardware.wifi.direct.xml \ 36 | frameworks/native/data/etc/android.hardware.wifi.xml:system/etc/permissions/android.hardware.wifi.xml \ 37 | frameworks/native/data/etc/android.software.midi.xml:system/etc/permissions/android.software.midi.xml \ 38 | frameworks/native/data/etc/android.software.sip.voip.xml:system/etc/permissions/android.software.sip.voip.xml 39 | 40 | # Audio 41 | PRODUCT_PACKAGES += \ 42 | audiod \ 43 | audio.a2dp.default \ 44 | audio.primary.msm8916 \ 45 | audio.r_submix.default \ 46 | audio.usb.default \ 47 | libqcompostprocbundle \ 48 | libqcomvisualizer \ 49 | libqcomvoiceprocessing \ 50 | tinymix 51 | 52 | # Audio configuration 53 | PRODUCT_COPY_FILES += \ 54 | $(LOCAL_PATH)/audio/audio_effects.conf:system/vendor/etc/audio_effects.conf 55 | 56 | # ANT+ 57 | PRODUCT_PACKAGES += \ 58 | AntHalService \ 59 | com.dsi.ant.antradio_library \ 60 | libantradio 61 | 62 | # Charger 63 | PRODUCT_PACKAGES += \ 64 | charger_res_images 65 | 66 | # Connectivity Engine support 67 | PRODUCT_PACKAGES += \ 68 | libcnefeatureconfig 69 | 70 | ifeq ($(BOARD_USES_QCNE),true) 71 | PRODUCT_PROPERTY_OVERRIDES += \ 72 | persist.cne.feature=4 73 | endif 74 | 75 | # Display 76 | PRODUCT_PACKAGES += \ 77 | copybit.msm8916 \ 78 | gralloc.msm8916 \ 79 | hwcomposer.msm8916 \ 80 | libtinyxml \ 81 | memtrack.msm8916 82 | 83 | # FM 84 | PRODUCT_PACKAGES += \ 85 | FMRadio \ 86 | libfmjni 87 | 88 | # IRQ balance 89 | PRODUCT_COPY_FILES += \ 90 | $(LOCAL_PATH)/configs/msm_irqbalance.conf:system/vendor/etc/msm_irqbalance.conf 91 | 92 | # IRSC 93 | PRODUCT_COPY_FILES += \ 94 | $(LOCAL_PATH)/configs/sec_config:system/etc/sec_config 95 | 96 | # Keystore 97 | PRODUCT_PACKAGES += \ 98 | keystore.msm8916 99 | 100 | # Media 101 | PRODUCT_COPY_FILES += \ 102 | frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:system/etc/media_codecs_google_audio.xml \ 103 | frameworks/av/media/libstagefright/data/media_codecs_google_telephony.xml:system/etc/media_codecs_google_telephony.xml \ 104 | frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:system/etc/media_codecs_google_video.xml \ 105 | $(LOCAL_PATH)/configs/media_codecs.xml:system/etc/media_codecs.xml 106 | 107 | PRODUCT_PACKAGES += \ 108 | libOmxAacEnc \ 109 | libOmxAmrEnc \ 110 | libOmxCore \ 111 | libOmxEvrcEnc \ 112 | libOmxQcelp13Enc \ 113 | libOmxVdec \ 114 | libOmxVenc \ 115 | libstagefrighthw 116 | 117 | # Power HAL 118 | PRODUCT_PACKAGES += \ 119 | power.msm8916 120 | 121 | # Ramdisk 122 | PRODUCT_PACKAGES += \ 123 | init.qcom.bt.sh 124 | 125 | PRODUCT_PACKAGES += \ 126 | init.qcom.rc \ 127 | init.qcom.power.rc \ 128 | init.qcom.usb.rc \ 129 | init.recovery.qcom.rc \ 130 | ueventd.qcom.rc 131 | 132 | # Recovery 133 | PRODUCT_PACKAGES += \ 134 | librecovery_updater_cm 135 | 136 | # RIL 137 | PRODUCT_PACKAGES += \ 138 | librmnetctl \ 139 | libxml2 140 | 141 | # Wifi 142 | PRODUCT_PACKAGES += \ 143 | libqsap_sdk \ 144 | libQWiFiSoftApCfg \ 145 | libwpa_client \ 146 | hostapd \ 147 | dhcpcd.conf \ 148 | wpa_supplicant \ 149 | wpa_supplicant.conf \ 150 | wcnss_service 151 | 152 | PRODUCT_COPY_FILES += \ 153 | $(LOCAL_PATH)/configs/hostapd.accept:system/etc/hostapd/hostapd.accept \ 154 | $(LOCAL_PATH)/configs/hostapd.conf:system/etc/hostapd/hostapd_default.conf \ 155 | $(LOCAL_PATH)/configs/hostapd.deny:system/etc/hostapd/hostapd.deny \ 156 | $(LOCAL_PATH)/configs/p2p_supplicant_overlay.conf:system/etc/wifi/p2p_supplicant_overlay.conf \ 157 | $(LOCAL_PATH)/configs/wpa_supplicant_overlay.conf:system/etc/wifi/wpa_supplicant_overlay.conf 158 | 159 | PRODUCT_COPY_FILES += \ 160 | $(LOCAL_PATH)/wifi/WCNSS_qcom_cfg.ini:system/etc/wifi/WCNSS_qcom_cfg.ini \ 161 | $(LOCAL_PATH)/wifi/WCNSS_cfg.dat:system/etc/firmware/wlan/prima/WCNSS_cfg.dat \ 162 | $(LOCAL_PATH)/wifi/WCNSS_qcom_wlan_nv.bin:system/etc/firmware/wlan/prima/WCNSS_qcom_wlan_nv.bin 163 | 164 | # WiFi Display 165 | ifneq ($(QCPATH),) 166 | PRODUCT_BOOT_JARS += WfdCommon 167 | endif 168 | -------------------------------------------------------------------------------- /overlay/frameworks/base/core/res/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 22 | 25 | 27 | 30 | 31 | 32 | "wifi,1,1,1,-1,true" 33 | "mobile,0,0,0,-1,true" 34 | "mobile_mms,2,0,2,60000,true" 35 | "mobile_supl,3,0,2,60000,true" 36 | "mobile_dun,4,0,2,60000,true" 37 | "mobile_hipri,5,0,3,60000,true" 38 | "mobile_fota,10,0,2,60000,true" 39 | "mobile_ims,11,0,2,60000,true" 40 | "mobile_cbs,12,0,2,60000,true" 41 | "mobile_ia,14,0,2,-1,true" 42 | "bluetooth,7,7,2,-1,true" 43 | 44 | 45 | 48 | 50 | 51 | "1,1" 52 | "0,1" 53 | "7,1" 54 | 55 | 56 | 59 | 60 | "usb\\d" 61 | "rndis\\d" 62 | 63 | 64 | 67 | 68 | "wlan\\d" 69 | 70 | 71 | 74 | 75 | "bnep\\d" 76 | "bt-pan" 77 | 78 | 79 | 80 | 82 | 83 | 0 84 | 1 85 | 4 86 | 5 87 | 7 88 | 89 | 90 | 91 | true 92 | 93 | 94 | false 95 | 96 | 98 | true 99 | 100 | 101 | true 102 | 103 | 104 | true 105 | 106 | 110 | 111 | lte:2097152,4194304,8388608,262144,524288,1048576 112 | lte_ca:2097152,4194304,8388608,262144,524288,1048576 113 | umts:4094,87380,110208,4096,16384,110208 114 | hspa:4094,87380,1220608,4096,16384,1220608 115 | hsupa:4094,87380,1220608,4096,16384,1220608 116 | hsdpa:4094,87380,2441216,4096,16384,2441216 117 | hspap:4094,87380,1220608,4096,16384,1220608 118 | edge:4093,26280,35040,4096,16384,35040 119 | gprs:4092,8760,11680,4096,8760,11680 120 | evdo:4094,87380,1048576,4096,16384,262144 121 | ehrpd:4094,87380,1048576,4096,16384,262144 122 | 123 | 124 | 126 | 524288,2097152,4194304,262144,524288,1048576 127 | 128 | 129 | false 130 | 131 | 132 | true 133 | 134 | 146 | true 147 | 148 | 160 | true 161 | 162 | 163 | true 164 | 165 | 166 | 167 | true 168 | 169 | 170 | false 171 | 172 | 174 | false 175 | 176 | 178 | 4dp 179 | 180 | 181 | 4 182 | 183 | true 184 | 185 | 3300 186 | 187 | 188 | -------------------------------------------------------------------------------- /overlay/packages/services/Telecomm/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 20 | true 21 | 22 | 23 | -------------------------------------------------------------------------------- /overlay/packages/services/Telephony/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 22 | true 23 | 24 | 25 | -------------------------------------------------------------------------------- /recovery/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | LOCAL_C_INCLUDES := bootable/recovery 5 | LOCAL_SRC_FILES := recovery_updater.c 6 | LOCAL_MODULE := librecovery_updater_cm 7 | LOCAL_MODULE_TAGS := eng 8 | include $(BUILD_STATIC_LIBRARY) 9 | -------------------------------------------------------------------------------- /recovery/recovery_updater.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015, 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 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | 28 | #include "edify/expr.h" 29 | 30 | #define MAX(a, b) (((a) > (b)) ? (a) : (b)) 31 | 32 | #define ALPHABET_LEN 256 33 | #define KB 1024 34 | 35 | #define TZ_PART_PATH "/dev/block/platform/7824900.sdhci/by-name/tz" 36 | #define TZ_VER_STR "QC_IMAGE_VERSION_STRING=" 37 | #define TZ_VER_STR_LEN 24 38 | #define TZ_VER_BUF_LEN 255 39 | #define TZ_SZ 500 * KB /* MMAP 500K of TZ, TZ partition is 500K */ 40 | 41 | /* Boyer-Moore string search implementation from Wikipedia */ 42 | 43 | /* Return longest suffix length of suffix ending at str[p] */ 44 | static int max_suffix_len(const char *str, size_t str_len, size_t p) { 45 | uint32_t i; 46 | 47 | for (i = 0; (str[p - i] == str[str_len - 1 - i]) && (i < p); ) { 48 | i++; 49 | } 50 | 51 | return i; 52 | } 53 | 54 | /* Generate table of distance between last character of pat and rightmost 55 | * occurrence of character c in pat 56 | */ 57 | static void bm_make_delta1(int *delta1, const char *pat, size_t pat_len) { 58 | uint32_t i; 59 | for (i = 0; i < ALPHABET_LEN; i++) { 60 | delta1[i] = pat_len; 61 | } 62 | for (i = 0; i < pat_len - 1; i++) { 63 | uint8_t idx = (uint8_t) pat[i]; 64 | delta1[idx] = pat_len - 1 - i; 65 | } 66 | } 67 | 68 | /* Generate table of next possible full match from mismatch at pat[p] */ 69 | static void bm_make_delta2(int *delta2, const char *pat, size_t pat_len) { 70 | int p; 71 | uint32_t last_prefix = pat_len - 1; 72 | 73 | for (p = pat_len - 1; p >= 0; p--) { 74 | /* Compare whether pat[p-pat_len] is suffix of pat */ 75 | if (strncmp(pat + p, pat, pat_len - p) == 0) { 76 | last_prefix = p + 1; 77 | } 78 | delta2[p] = last_prefix + (pat_len - 1 - p); 79 | } 80 | 81 | for (p = 0; p < (int) pat_len - 1; p++) { 82 | /* Get longest suffix of pattern ending on character pat[p] */ 83 | int suf_len = max_suffix_len(pat, pat_len, p); 84 | if (pat[p - suf_len] != pat[pat_len - 1 - suf_len]) { 85 | delta2[pat_len - 1 - suf_len] = pat_len - 1 - p + suf_len; 86 | } 87 | } 88 | } 89 | 90 | static char * bm_search(const char *str, size_t str_len, const char *pat, 91 | size_t pat_len) { 92 | int delta1[ALPHABET_LEN]; 93 | int delta2[pat_len]; 94 | int i; 95 | 96 | bm_make_delta1(delta1, pat, pat_len); 97 | bm_make_delta2(delta2, pat, pat_len); 98 | 99 | if (pat_len == 0) { 100 | return (char *) str; 101 | } 102 | 103 | i = pat_len - 1; 104 | while (i < (int) str_len) { 105 | int j = pat_len - 1; 106 | while (j >= 0 && (str[i] == pat[j])) { 107 | i--; 108 | j--; 109 | } 110 | if (j < 0) { 111 | return (char *) (str + i + 1); 112 | } 113 | i += MAX(delta1[(uint8_t) str[i]], delta2[j]); 114 | } 115 | 116 | return NULL; 117 | } 118 | 119 | static int get_tz_version(char *ver_str, size_t len) { 120 | int ret = 0; 121 | int fd; 122 | char *tz_data = NULL; 123 | char *offset = NULL; 124 | 125 | fd = open(TZ_PART_PATH, O_RDONLY); 126 | if (fd < 0) { 127 | ret = errno; 128 | goto err_ret; 129 | } 130 | 131 | tz_data = (char *) mmap(NULL, TZ_SZ, PROT_READ, MAP_PRIVATE, fd, 0); 132 | if (tz_data == (char *)-1) { 133 | ret = errno; 134 | goto err_fd_close; 135 | } 136 | 137 | /* Do Boyer-Moore search across TZ data */ 138 | offset = bm_search(tz_data, TZ_SZ, TZ_VER_STR, TZ_VER_STR_LEN); 139 | if (offset != NULL) { 140 | strncpy(ver_str, offset + TZ_VER_STR_LEN, len); 141 | } else { 142 | ret = -ENOENT; 143 | } 144 | 145 | munmap(tz_data, TZ_SZ); 146 | err_fd_close: 147 | close(fd); 148 | err_ret: 149 | return ret; 150 | } 151 | 152 | /* verify_trustzone("TZ_VERSION", "TZ_VERSION", ...) */ 153 | Value * VerifyTrustZoneFn(const char *name, State *state, int argc, Expr *argv[]) { 154 | char current_tz_version[TZ_VER_BUF_LEN]; 155 | char *tz_version; 156 | int i, ret; 157 | 158 | ret = get_tz_version(current_tz_version, TZ_VER_BUF_LEN); 159 | if (ret) { 160 | return ErrorAbort(state, "%s() failed to read current TZ version: %d", 161 | name, ret); 162 | } 163 | 164 | for (i = 1; i <= argc; i++) { 165 | ret = ReadArgs(state, argv, i, &tz_version); 166 | if (ret < 0) { 167 | return ErrorAbort(state, "%s() error parsing arguments: %d", 168 | name, ret); 169 | } 170 | 171 | uiPrintf(state, "Comparing TZ version %s to %s", 172 | tz_version, current_tz_version); 173 | if (strncmp(tz_version, current_tz_version, strlen(tz_version)) == 0) { 174 | return StringValue(strdup("1")); 175 | } 176 | } 177 | 178 | return StringValue(strdup("0")); 179 | } 180 | 181 | void Register_librecovery_updater_cm() { 182 | RegisterFunction("cm.verify_trustzone", VerifyTrustZoneFn); 183 | } 184 | -------------------------------------------------------------------------------- /releasetools.py: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2009 The Android Open Source Project 2 | # Copyright (c) 2011, The Linux Foundation. All rights reserved. 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 | """Emit commands needed for QCOM devices during OTA installation 17 | (installing the radio image).""" 18 | 19 | import hashlib 20 | import common 21 | import re 22 | 23 | def LoadFilesMap(zip): 24 | try: 25 | data = zip.read("RADIO/filesmap") 26 | except KeyError: 27 | print "Warning: could not find RADIO/filesmap in %s." % zip 28 | data = "" 29 | d = {} 30 | for line in data.split("\n"): 31 | line = line.strip() 32 | if not line or line.startswith("#"): continue 33 | pieces = line.split() 34 | if not (len(pieces) == 2 or len(pieces) == 3): 35 | raise ValueError("malformed filesmap line: \"%s\"" % (line,)) 36 | file_size = zip.getinfo("RADIO/"+pieces[0]).file_size 37 | sha1 = hashlib.sha1() 38 | sha1.update(zip.read("RADIO/"+pieces[0])) 39 | d[pieces[0]] = (pieces[1], sha1.hexdigest(), file_size) 40 | return d 41 | 42 | def GetRadioFiles(z): 43 | out = {} 44 | for info in z.infolist(): 45 | if info.filename.startswith("RADIO/") and (info.filename.__len__() > len("RADIO/")): 46 | fn = "RADIO/" + info.filename[6:] 47 | out[fn] = fn 48 | return out 49 | 50 | def FullOTA_Assertions(info): 51 | AddTrustZoneAssertion(info) 52 | return 53 | 54 | def IncrementalOTA_Assertions(info): 55 | AddTrustZoneAssertion(info) 56 | return 57 | 58 | def InstallRawImage(image_data, api_version, input_zip, fn, info, filesmap): 59 | #fn is in RADIO/* format. Extracting just file name. 60 | filename = fn[6:] 61 | if api_version >= 3: 62 | if filename not in filesmap: 63 | return 64 | partition = filesmap[filename][0] 65 | checksum = filesmap[filename][1] 66 | file_size = filesmap[filename][2] 67 | # read_file returns a blob or NULL. Use sha1_check to convert to a string 68 | # that can be evaluated (a NULL results in an empty string) 69 | info.script.AppendExtra('ifelse((sha1_check(read_file("EMMC:%s:%d:%s")) != ""),' 70 | '(ui_print("%s already up to date")),' 71 | '(package_extract_file("%s", "%s")));' 72 | % (partition, file_size, checksum, partition, filename, partition)) 73 | common.ZipWriteStr(info.output_zip, filename, image_data) 74 | return 75 | else: 76 | print "warning radio-update: no support for api_version less than 3." 77 | 78 | def InstallRadioFiles(info): 79 | files = GetRadioFiles(info.input_zip) 80 | if files == {}: 81 | print "warning radio-update: no radio image in input target_files; not flashing radio" 82 | return 83 | info.script.Print("Writing radio image...") 84 | #Load filesmap file 85 | filesmap = LoadFilesMap(info.input_zip) 86 | if filesmap == {}: 87 | print "warning radio-update: no or invalid filesmap file found. not flashing radio" 88 | return 89 | if hasattr(info, 'source_zip'): 90 | source_filesmap = LoadFilesMap(info.source_zip) 91 | else: 92 | source_filesmap = None 93 | for f in files: 94 | if source_filesmap: 95 | filename = f[6:] 96 | source_checksum = source_filesmap.get(filename, [None, 'no_source'])[1] 97 | target_checksum = filesmap.get(filename, [None, 'no_target'])[1] 98 | if source_checksum == target_checksum: 99 | print "info radio-update: source and target match for %s... skipping" % filename 100 | continue 101 | image_data = info.input_zip.read(f) 102 | InstallRawImage(image_data, info.input_version, info.input_zip, f, info, filesmap) 103 | return 104 | 105 | def FullOTA_InstallEnd(info): 106 | InstallRadioFiles(info) 107 | 108 | def IncrementalOTA_InstallEnd(info): 109 | InstallRadioFiles(info) 110 | 111 | def AddTrustZoneAssertion(info): 112 | # Presence of filesmap indicates packaged firmware 113 | filesmap = LoadFilesMap(info.input_zip) 114 | if filesmap != {}: 115 | return 116 | android_info = info.input_zip.read("OTA/android-info.txt") 117 | m = re.search(r'require\s+version-trustzone\s*=\s*(\S+)', android_info) 118 | if m: 119 | versions = m.group(1).split('|') 120 | if len(versions) and '*' not in versions: 121 | cmd = 'assert(cm.verify_trustzone(' + ','.join(['"%s"' % tz for tz in versions]) + ') == "1");' 122 | info.script.AppendExtra(cmd) 123 | return 124 | -------------------------------------------------------------------------------- /rootdir/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH:= $(call my-dir) 2 | 3 | # Configuration scripts 4 | 5 | include $(CLEAR_VARS) 6 | LOCAL_MODULE := init.qcom.bt.sh 7 | LOCAL_MODULE_TAGS := optional eng 8 | LOCAL_MODULE_CLASS := ETC 9 | LOCAL_SRC_FILES := etc/init.qcom.bt.sh 10 | include $(BUILD_PREBUILT) 11 | 12 | # Init scripts 13 | 14 | include $(CLEAR_VARS) 15 | LOCAL_MODULE := init.qcom.rc 16 | LOCAL_MODULE_TAGS := optional eng 17 | LOCAL_MODULE_CLASS := ETC 18 | LOCAL_SRC_FILES := etc/init.qcom.rc 19 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) 20 | include $(BUILD_PREBUILT) 21 | 22 | include $(CLEAR_VARS) 23 | LOCAL_MODULE := init.qcom.power.rc 24 | LOCAL_MODULE_TAGS := optional eng 25 | LOCAL_MODULE_CLASS := ETC 26 | LOCAL_SRC_FILES := etc/init.qcom.power.rc 27 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) 28 | include $(BUILD_PREBUILT) 29 | 30 | include $(CLEAR_VARS) 31 | LOCAL_MODULE := init.qcom.usb.rc 32 | LOCAL_MODULE_TAGS := optional eng 33 | LOCAL_MODULE_CLASS := ETC 34 | LOCAL_SRC_FILES := etc/init.qcom.usb.rc 35 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) 36 | include $(BUILD_PREBUILT) 37 | 38 | include $(CLEAR_VARS) 39 | LOCAL_MODULE := init.recovery.qcom.rc 40 | LOCAL_MODULE_TAGS := optional eng 41 | LOCAL_MODULE_CLASS := ETC 42 | LOCAL_SRC_FILES := etc/init.qcom.power.rc 43 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) 44 | include $(BUILD_PREBUILT) 45 | 46 | include $(CLEAR_VARS) 47 | LOCAL_MODULE := ueventd.qcom.rc 48 | LOCAL_MODULE_TAGS := optional eng 49 | LOCAL_MODULE_CLASS := ETC 50 | LOCAL_SRC_FILES := etc/ueventd.qcom.rc 51 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) 52 | include $(BUILD_PREBUILT) 53 | -------------------------------------------------------------------------------- /rootdir/etc/init.qcom.bt.sh: -------------------------------------------------------------------------------- 1 | #!/system/bin/sh 2 | # Copyright (c) 2009-2013, The Linux Foundation. All rights reserved. 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions are 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 copyright 9 | # notice, this list of conditions and the following disclaimer in the 10 | # documentation and/or other materials provided with the distribution. 11 | # * Neither the name of The Linux Foundation nor 12 | # the names of its contributors may be used to endorse or promote 13 | # products derived from this software without specific prior written 14 | # permission. 15 | # 16 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | # IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | # NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 20 | # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 21 | # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 23 | # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 24 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 25 | # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 26 | # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | # 28 | 29 | #Read the arguments passed to the script 30 | config="$1" 31 | 32 | BLUETOOTH_SLEEP_PATH=/proc/bluetooth/sleep/proto 33 | LOG_TAG="qcom-bluetooth" 34 | LOG_NAME="${0}:" 35 | 36 | hciattach_pid="" 37 | 38 | loge () 39 | { 40 | /system/bin/log -t $LOG_TAG -p e "$LOG_NAME $@" 41 | } 42 | 43 | logi () 44 | { 45 | /system/bin/log -t $LOG_TAG -p i "$LOG_NAME $@" 46 | } 47 | 48 | failed () 49 | { 50 | loge "$1: exit code $2" 51 | exit $2 52 | } 53 | 54 | # 55 | # enable bluetooth profiles dynamically 56 | # 57 | config_bt () 58 | { 59 | baseband=`getprop ro.baseband` 60 | target=`getprop ro.board.platform` 61 | if [ -f /sys/devices/soc0/soc_id ]; then 62 | soc_hwid=`cat /sys/devices/soc0/soc_id` 63 | else 64 | soc_hwid=`cat /sys/devices/system/soc/soc0/id` 65 | fi 66 | btsoc=`getprop qcom.bluetooth.soc` 67 | 68 | case $baseband in 69 | "apq") 70 | setprop ro.qualcomm.bluetooth.opp true 71 | setprop ro.qualcomm.bluetooth.ftp true 72 | setprop ro.qualcomm.bluetooth.nap false 73 | setprop ro.bluetooth.sap false 74 | setprop ro.bluetooth.dun false 75 | # For MPQ as baseband is same for both 76 | case $soc_hwid in 77 | "130") 78 | setprop ro.qualcomm.bluetooth.hsp true 79 | setprop ro.qualcomm.bluetooth.hfp true 80 | setprop ro.qualcomm.bluetooth.pbap false 81 | setprop ro.qualcomm.bluetooth.map false 82 | ;; 83 | *) 84 | setprop ro.qualcomm.bluetooth.hsp false 85 | setprop ro.qualcomm.bluetooth.hfp false 86 | setprop ro.qualcomm.bluetooth.pbap true 87 | setprop ro.qualcomm.bluetooth.map true 88 | ;; 89 | esac 90 | ;; 91 | "mdm" | "svlte2a" | "svlte1" | "csfb") 92 | setprop ro.qualcomm.bluetooth.opp true 93 | setprop ro.qualcomm.bluetooth.hfp true 94 | setprop ro.qualcomm.bluetooth.hsp true 95 | setprop ro.qualcomm.bluetooth.pbap true 96 | setprop ro.qualcomm.bluetooth.ftp true 97 | setprop ro.qualcomm.bluetooth.map true 98 | setprop ro.qualcomm.bluetooth.nap true 99 | setprop ro.bluetooth.sap true 100 | case $target in 101 | "apq8084") 102 | setprop ro.bluetooth.dun true 103 | logi "Enabling BT-DUN for APQ8084" 104 | ;; 105 | *) 106 | setprop ro.bluetooth.dun false 107 | ;; 108 | esac 109 | ;; 110 | "msm") 111 | setprop ro.qualcomm.bluetooth.opp true 112 | setprop ro.qualcomm.bluetooth.hfp true 113 | setprop ro.qualcomm.bluetooth.hsp true 114 | setprop ro.qualcomm.bluetooth.pbap true 115 | setprop ro.qualcomm.bluetooth.ftp true 116 | setprop ro.qualcomm.bluetooth.nap true 117 | setprop ro.bluetooth.sap true 118 | setprop ro.bluetooth.dun true 119 | case $btsoc in 120 | "ath3k") 121 | setprop ro.qualcomm.bluetooth.map false 122 | ;; 123 | *) 124 | setprop ro.qualcomm.bluetooth.map true 125 | ;; 126 | esac 127 | ;; 128 | *) 129 | setprop ro.qualcomm.bluetooth.opp true 130 | setprop ro.qualcomm.bluetooth.hfp true 131 | setprop ro.qualcomm.bluetooth.hsp true 132 | setprop ro.qualcomm.bluetooth.pbap true 133 | setprop ro.qualcomm.bluetooth.ftp true 134 | setprop ro.qualcomm.bluetooth.map true 135 | setprop ro.qualcomm.bluetooth.nap true 136 | setprop ro.bluetooth.sap true 137 | setprop ro.bluetooth.dun true 138 | ;; 139 | esac 140 | 141 | #Enable Bluetooth Profiles specific to target Dynamically 142 | case $target in 143 | "msm8960") 144 | if [ "$btsoc" != "ath3k" ] && [ "$soc_hwid" != "130" ] 145 | then 146 | setprop ro.bluetooth.hfp.ver 1.6 147 | setprop ro.qualcomm.bt.hci_transport smd 148 | fi 149 | ;; 150 | "msm8974" | "msm8226" | "msm8610" | "msm8916" ) 151 | if [ "$btsoc" != "ath3k" ] 152 | then 153 | setprop ro.bluetooth.hfp.ver 1.7 154 | setprop ro.qualcomm.bt.hci_transport smd 155 | fi 156 | ;; 157 | "apq8084" | "mpq8092" ) 158 | if [ "$btsoc" != "rome" ] 159 | then 160 | setprop ro.qualcomm.bt.hci_transport smd 161 | elif [ "$btsoc" = "rome" ] 162 | then 163 | setprop ro.bluetooth.hfp.ver 1.6 164 | fi 165 | ;; 166 | *) 167 | ;; 168 | esac 169 | 170 | if [ -f /system/etc/bluetooth/stack.conf ]; then 171 | stack=`cat /system/etc/bluetooth/stack.conf` 172 | fi 173 | 174 | case "$stack" in 175 | "bluez") 176 | logi "Bluetooth stack is $stack" 177 | setprop ro.qc.bluetooth.stack $stack 178 | reason=`getprop vold.decrypt` 179 | case "$reason" in 180 | "trigger_restart_framework") 181 | start dbus 182 | ;; 183 | esac 184 | ;; 185 | *) 186 | logi "Bluetooth stack is Bluedroid" 187 | ;; 188 | esac 189 | 190 | } 191 | 192 | start_hciattach () 193 | { 194 | /system/bin/hciattach -n $BTS_DEVICE $BTS_TYPE $BTS_BAUD & 195 | hciattach_pid=$! 196 | logi "start_hciattach: pid = $hciattach_pid" 197 | echo 1 > $BLUETOOTH_SLEEP_PATH 198 | } 199 | 200 | kill_hciattach () 201 | { 202 | echo 0 > $BLUETOOTH_SLEEP_PATH 203 | logi "kill_hciattach: pid = $hciattach_pid" 204 | ## careful not to kill zero or null! 205 | kill -TERM $hciattach_pid 206 | # this shell doesn't exit now -- wait returns for normal exit 207 | } 208 | 209 | logi "init.qcom.bt.sh config = $config" 210 | case "$config" in 211 | "onboot") 212 | config_bt 213 | exit 0 214 | ;; 215 | *) 216 | ;; 217 | esac 218 | 219 | # mimic hciattach options parsing -- maybe a waste of effort 220 | USAGE="hciattach [-n] [-p] [-b] [-t timeout] [-s initial_speed] [speed] [flow|noflow] [bdaddr]" 221 | 222 | while getopts "blnpt:s:" f 223 | do 224 | case $f in 225 | b | l | n | p) opt_flags="$opt_flags -$f" ;; 226 | t) timeout=$OPTARG;; 227 | s) initial_speed=$OPTARG;; 228 | \?) echo $USAGE; exit 1;; 229 | esac 230 | done 231 | shift $(($OPTIND-1)) 232 | 233 | # Note that "hci_qcomm_init -e" prints expressions to set the shell variables 234 | # BTS_DEVICE, BTS_TYPE, BTS_BAUD, and BTS_ADDRESS. 235 | 236 | #Selectively Disable sleep 237 | BOARD=`getprop ro.board.platform` 238 | STACK=`getprop ro.qc.bluetooth.stack` 239 | 240 | # BR/EDR & LE power class configurations 241 | POWER_CLASS=`getprop qcom.bt.dev_power_class` 242 | LE_POWER_CLASS=`getprop qcom.bt.le_dev_pwr_class` 243 | 244 | #find the transport type 245 | TRANSPORT=`getprop ro.qualcomm.bt.hci_transport` 246 | logi "Transport : $TRANSPORT" 247 | case $STACK in 248 | "bluez") 249 | logi "** Bluez stack **" 250 | ;; 251 | *) 252 | logi "** Bluedroid stack **" 253 | setprop bluetooth.status off 254 | ;; 255 | esac 256 | 257 | 258 | case $POWER_CLASS in 259 | 1) PWR_CLASS="-p 0" ; 260 | logi "Power Class: 1";; 261 | 2) PWR_CLASS="-p 1" ; 262 | logi "Power Class: 2";; 263 | 3) PWR_CLASS="-p 2" ; 264 | logi "Power Class: CUSTOM";; 265 | *) PWR_CLASS=""; 266 | logi "Power Class: Ignored. Default(1) used (1-CLASS1/2-CLASS2/3-CUSTOM)"; 267 | logi "Power Class: To override, Before turning BT ON; setprop qcom.bt.dev_power_class <1 or 2 or 3>";; 268 | esac 269 | 270 | case $LE_POWER_CLASS in 271 | 1) LE_PWR_CLASS="-P 0" ; 272 | logi "LE Power Class: 1";; 273 | 2) LE_PWR_CLASS="-P 1" ; 274 | logi "LE Power Class: 2";; 275 | 3) LE_PWR_CLASS="-P 2" ; 276 | logi "LE Power Class: CUSTOM";; 277 | *) LE_PWR_CLASS="-P 1"; 278 | logi "LE Power Class: Ignored. Default(2) used (1-CLASS1/2-CLASS2/3-CUSTOM)"; 279 | logi "LE Power Class: To override, Before turning BT ON; setprop qcom.bt.le_dev_pwr_class <1 or 2 or 3>";; 280 | esac 281 | 282 | eval $(/system/bin/hci_qcomm_init -e $PWR_CLASS $LE_PWR_CLASS && echo "exit_code_hci_qcomm_init=0" || echo "exit_code_hci_qcomm_init=1") 283 | 284 | case $exit_code_hci_qcomm_init in 285 | 0) logi "Bluetooth QSoC firmware download succeeded, $BTS_DEVICE $BTS_TYPE $BTS_BAUD $BTS_ADDRESS";; 286 | *) failed "Bluetooth QSoC firmware download failed" $exit_code_hci_qcomm_init; 287 | case $STACK in 288 | "bluez") 289 | logi "** Bluez stack **" 290 | ;; 291 | *) 292 | logi "** Bluedroid stack **" 293 | setprop bluetooth.status off 294 | ;; 295 | esac 296 | 297 | exit $exit_code_hci_qcomm_init;; 298 | esac 299 | 300 | # init does SIGTERM on ctl.stop for service 301 | trap "kill_hciattach" TERM INT 302 | 303 | case $TRANSPORT in 304 | "smd") 305 | case $STACK in 306 | "bluez") 307 | logi "** Bluez stack **" 308 | echo 1 > /sys/module/hci_smd/parameters/hcismd_set 309 | ;; 310 | *) 311 | logi "** Bluedroid stack **" 312 | setprop bluetooth.status on 313 | ;; 314 | esac 315 | ;; 316 | *) 317 | logi "start hciattach" 318 | start_hciattach 319 | case $STACK in 320 | "bluez") 321 | logi "Bluetooth is turning On with Bluez stack " 322 | ;; 323 | *) 324 | logi "** Bluedroid stack **" 325 | setprop bluetooth.status on 326 | ;; 327 | esac 328 | 329 | wait $hciattach_pid 330 | logi "Bluetooth stopped" 331 | ;; 332 | esac 333 | 334 | exit 0 335 | -------------------------------------------------------------------------------- /rootdir/etc/init.qcom.power.rc: -------------------------------------------------------------------------------- 1 | on enable-low-power 2 | 3 | write /proc/sys/kernel/sched_boost 1 4 | 5 | write /sys/class/net/rmnet0/queues/rx-0/rps_cpus 10 6 | 7 | # Adaptive LMK 8 | write /sys/module/lowmemorykiller/parameters/enable_adaptive_lmk 1 9 | write /sys/module/lowmemorykiller/parameters/vmpressure_file_min 81250 10 | 11 | # HMP scheduler load tracking settings 12 | write /proc/sys/kernel/sched_window_stats_policy 3 13 | write /proc/sys/kernel/sched_ravg_hist_size 5 14 | 15 | # HMP Task packing settings for 8939, 8929 16 | write /proc/sys/kernel/sched_small_task 20 17 | write /proc/sys/kernel/sched_mostly_idle_load 30 18 | write /proc/sys/kernel/sched_mostly_idle_nr_run 3 19 | 20 | write /sys/class/devfreq/qcom,cpubw.64/governor "bw_hwmon" 21 | write /sys/class/devfreq/qcom,cpubw.64/bw_hwmon/io_percent 20 22 | write /sys/class/devfreq/qcom,gpubw.61/governor "bw_hwmon" 23 | write /sys/class/devfreq/qcom,gpubw.61/bw_hwmon/io_percent 40 24 | write /sys/class/devfreq/qcom,mincpubw.65/governor "cpufreq" 25 | 26 | # disable thermal core_control to update interactive gov settings 27 | write /sys/module/msm_thermal/core_control/enabled 0 28 | 29 | # enable governor for perf cluster 30 | write /sys/devices/system/cpu/cpu0/online 1 31 | write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "interactive" 32 | write /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay "20000 1113600:50000" 33 | write /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load 85 34 | write /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate 20000 35 | write /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq 1113600 36 | write /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy 0 37 | write /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads "1 960000:85 1113600:90 1344000:80" 38 | write /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time 50000 39 | write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 960000 40 | 41 | # enable governor for power cluster 42 | write /sys/devices/system/cpu/cpu4/online 1 43 | write /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor "interactive" 44 | write /sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay "25000 800000:50000" 45 | write /sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load 90 46 | write /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_rate 40000 47 | write /sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq 998400 48 | write /sys/devices/system/cpu/cpu4/cpufreq/interactive/io_is_busy 0 49 | write /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads "1 800000:90" 50 | write /sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time 40000 51 | write /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq 800000 52 | 53 | # enable thermal core_control now 54 | write /sys/module/msm_thermal/core_control/enabled 1 55 | 56 | # HMP scheduler (big.Little cluster related) settings 57 | write /proc/sys/kernel/sched_upmigrate 75 58 | write /proc/sys/kernel/sched_downmigrate 60 59 | 60 | # bring all CPUs online 61 | write /sys/devices/system/cpu/cpu1/online 1 62 | write /sys/devices/system/cpu/cpu2/online 1 63 | write /sys/devices/system/cpu/cpu3/online 1 64 | write /sys/devices/system/cpu/cpu5/online 1 65 | write /sys/devices/system/cpu/cpu6/online 1 66 | write /sys/devices/system/cpu/cpu7/online 1 67 | write /sys/module/lpm_levels/parameters/sleep_disabled 0 68 | 69 | # Per-process reclaim 70 | write /sys/module/process_reclaim/parameters/enable_process_reclaim 1 71 | write /sys/module/process_reclaim/parameters/pressure_min 10 72 | write /sys/module/process_reclaim/parameters/per_swap_size 1024 73 | write /sys/module/process_reclaim/parameters/pressure_max 70 74 | write /sys/module/process_reclaim/parameters/swap_opt_eff 30 75 | 76 | rm /data/system/perfd/default_values 77 | start perfd 78 | 79 | on charger 80 | write /sys/module/lpm_levels/parameters/sleep_disabled 0 81 | write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "powersave" 82 | 83 | on class_start:late_start 84 | trigger enable-low-power 85 | 86 | on property:init.svc.recovery=running 87 | trigger enable-low-power 88 | 89 | on property:dev.bootcomplete=1 90 | setprop sys.io.scheduler bfq 91 | -------------------------------------------------------------------------------- /rootdir/etc/init.qcom.rc: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2009-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 met: 5 | # * Redistributions of source code must retain the above copyright 6 | # notice, this list of conditions and the following disclaimer. 7 | # * Redistributions in binary form must reproduce the above copyright 8 | # notice, this list of conditions and the following disclaimer in the 9 | # documentation and/or other materials provided with the distribution. 10 | # * Neither the name of The Linux Foundation nor 11 | # the names of its contributors may be used to endorse or promote 12 | # products derived from this software without specific prior written 13 | # permission. 14 | # 15 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | # IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | # NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 19 | # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | # 27 | 28 | import init.qcom.power.rc 29 | import init.qcom.usb.rc 30 | import init.target.rc 31 | 32 | on early-init 33 | mount debugfs debugfs /sys/kernel/debug 34 | mkdir /firmware 0771 system system 35 | mkdir /system 0777 root root 36 | symlink /data/tombstones /tombstones 37 | 38 | # Turn off backlight on blank 39 | write /sys/class/leds/lcd-backlight/trigger "backlight" 40 | 41 | on init 42 | # Set permissions for persist partition 43 | mkdir /persist 0771 system system 44 | 45 | symlink /sdcard /mnt/sdcard 46 | symlink /sdcard /storage/sdcard0 47 | 48 | on fs 49 | mount_all fstab.qcom 50 | mkdir /persist/data 0700 system system 51 | restorecon_recursive /persist 52 | 53 | # msm specific files that need to be created on /data 54 | on post-fs-data 55 | 56 | mkdir /data/fdAlbum 0770 camera camera 57 | mkdir /data/misc/camera 0770 camera camera 58 | 59 | #Create PERFD deamon related dirs 60 | mkdir /data/misc/perfd 0770 root system 61 | chmod 2770 /data/misc/perfd 62 | mkdir /data/misc/perfd 0755 root system 63 | chmod 2755 /data/misc/perfd 64 | mkdir /data/system/perfd 0770 root system 65 | chmod 2770 /data/system/perfd 66 | 67 | # NFC local data and nfcee xml storage 68 | mkdir /data/nfc 0770 nfc nfc 69 | mkdir /data/nfc/param 0770 nfc nfc 70 | 71 | mkdir /data/media 0770 media_rw media_rw 72 | restorecon_recursive /data/media 73 | 74 | mkdir /data/tombstones 0771 system system 75 | mkdir /tombstones/modem 0771 system system 76 | mkdir /tombstones/lpass 0771 system system 77 | mkdir /tombstones/wcnss 0771 system system 78 | mkdir /tombstones/dsps 0771 system system 79 | 80 | mkdir /persist/data/sfs 0700 system system 81 | mkdir /persist/data/tz 0700 system system 82 | 83 | mkdir /data/misc/bluetooth 0770 bluetooth bluetooth 84 | 85 | # Create the directories used by the Wireless subsystem 86 | mkdir /data/misc/wifi 0770 wifi wifi 87 | mkdir /data/misc/wifi/sockets 0770 wifi wifi 88 | mkdir /data/misc/wifi/wpa_supplicant 0770 wifi wifi 89 | mkdir /data/misc/dhcp 0770 dhcp dhcp 90 | chown dhcp dhcp /data/misc/dhcp 91 | 92 | # Create the directories used by CnE subsystem 93 | mkdir /data/connectivity 0771 system system 94 | chown system system /data/connectivity 95 | 96 | mkdir /data/connectivity/nsrm 0771 system system 97 | chown system system /data/connectivity/nsrm 98 | 99 | # Create the directories used by DPM subsystem 100 | mkdir /data/dpm 0771 system system 101 | chown system system /data/dpm 102 | 103 | mkdir /data/dpm/fdMgr 0771 system system 104 | chown system system /data/dpm/fdMgr 105 | 106 | # Create directory used by audio subsystem 107 | mkdir /data/misc/audio 0770 audio audio 108 | restorecon_recursive /data/misc/audio 109 | 110 | # Create directory used by the DASH client 111 | mkdir /data/misc/dash 0770 media audio 112 | 113 | # Mounting of persist is moved to 'on emmc-fs' and 'on fs' sections 114 | # We chown/chmod /persist again so because mount is run as root + defaults 115 | chown system system /persist 116 | chmod 0771 /persist 117 | chmod 0664 /sys/devices/platform/msm_sdcc.1/polling 118 | chmod 0664 /sys/devices/platform/msm_sdcc.2/polling 119 | chmod 0664 /sys/devices/platform/msm_sdcc.3/polling 120 | chmod 0664 /sys/devices/platform/msm_sdcc.4/polling 121 | 122 | # Chown polling nodes as needed from UI running on system server 123 | chown system system /sys/devices/platform/msm_sdcc.1/polling 124 | chown system system /sys/devices/platform/msm_sdcc.2/polling 125 | chown system system /sys/devices/platform/msm_sdcc.3/polling 126 | chown system system /sys/devices/platform/msm_sdcc.4/polling 127 | 128 | #Create the symlink to qcn wpa_supplicant folder for ar6000 wpa_supplicant 129 | mkdir /data/system 0775 system system 130 | #symlink /data/misc/wifi/wpa_supplicant /data/system/wpa_supplicant 131 | 132 | #Create directories for Location services 133 | mkdir /data/misc/location 0770 gps gps 134 | mkdir /data/misc/location/mq 0770 gps gps 135 | mkdir /data/misc/location/xtwifi 0770 gps gps 136 | mkdir /data/misc/location/gpsone_d 0770 system gps 137 | mkdir /data/misc/location/quipc 0770 gps system 138 | mkdir /data/misc/location/gsiff 0770 gps gps 139 | 140 | #Create directory from IMS services 141 | mkdir /data/shared 0755 142 | chown system system /data/shared 143 | 144 | #Create directory for FOTA 145 | mkdir /data/fota 0771 146 | chown system system /data/fota 147 | 148 | #Create directory for hostapd 149 | mkdir /data/hostapd 0770 system wifi 150 | 151 | # Create /data/time folder for time-services 152 | mkdir /data/time/ 0700 system system 153 | restorecon_recursive /data/time 154 | 155 | mkdir /data/audio/ 0770 media audio 156 | 157 | setprop vold.post_fs_data_done 1 158 | 159 | #Create a folder for SRS to be able to create a usercfg file 160 | mkdir /data/data/media 0770 media media 161 | 162 | on early-boot 163 | # set RLIMIT_MEMLOCK to 64MB 164 | setrlimit 8 67108864 67108864 165 | # Allow subsystem (modem etc) debugging 166 | write /sys/module/subsystem_restart/parameters/enable_debug ${persist.sys.ssr.enable_debug} 167 | write /sys/module/pil_msa/parameters/pbl_mba_boot_timeout_ms ${persist.sys.mba_boot_timeout} 168 | write /sys/module/pil_msa/parameters/modem_auth_timeout_ms ${persist.sys.modem_auth_timeout} 169 | write /sys/module/peripheral_loader/parameters/proxy_timeout_ms ${persist.sys.pil_proxy_timeout} 170 | write /sys/kernel/boot_adsp/boot 1 171 | 172 | on boot 173 | chown bluetooth bluetooth /sys/module/bluetooth_power/parameters/power 174 | chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type 175 | chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state 176 | chown bluetooth bluetooth /proc/bluetooth/sleep/proto 177 | chown bluetooth bluetooth /sys/module/hci_uart/parameters/ath_lpm 178 | chown bluetooth bluetooth /sys/module/hci_uart/parameters/ath_btwrite 179 | chown system system /sys/module/sco/parameters/disable_esco 180 | chown bluetooth bluetooth /sys/module/hci_smd/parameters/hcismd_set 181 | chmod 0660 /sys/module/bluetooth_power/parameters/power 182 | chmod 0660 /sys/module/hci_smd/parameters/hcismd_set 183 | chmod 0660 /sys/class/rfkill/rfkill0/state 184 | chmod 0660 /proc/bluetooth/sleep/proto 185 | chown bluetooth bluetooth /dev/ttyHS0 186 | chmod 0660 /sys/module/hci_uart/parameters/ath_lpm 187 | chmod 0660 /sys/module/hci_uart/parameters/ath_btwrite 188 | chmod 0660 /dev/ttyHS0 189 | chown bluetooth bluetooth /sys/devices/platform/msm_serial_hs.0/clock 190 | chmod 0660 /sys/devices/platform/msm_serial_hs.0/clock 191 | 192 | chmod 0660 /dev/ttyHS2 193 | chown bluetooth bluetooth /dev/ttyHS2 194 | 195 | #Create QMUX deamon socket area 196 | mkdir /dev/socket/qmux_radio 0770 radio radio 197 | chmod 2770 /dev/socket/qmux_radio 198 | mkdir /dev/socket/qmux_audio 0770 media audio 199 | chmod 2770 /dev/socket/qmux_audio 200 | mkdir /dev/socket/qmux_bluetooth 0770 bluetooth bluetooth 201 | chmod 2770 /dev/socket/qmux_bluetooth 202 | mkdir /dev/socket/qmux_gps 0770 gps gps 203 | chmod 2770 /dev/socket/qmux_gps 204 | 205 | #Create NETMGR daemon socket area 206 | mkdir /dev/socket/netmgr 0750 radio radio 207 | 208 | #Set SUID bit for usbhub 209 | chmod 4755 /system/bin/usbhub 210 | chmod 755 /system/bin/usbhub_init 211 | 212 | #Remove SUID bit for iproute2 ip tool 213 | chmod 0755 /system/bin/ip 214 | 215 | 216 | chmod 0444 /sys/devices/platform/msm_hsusb/gadget/usb_state 217 | 218 | #For bridgemgr daemon to inform the USB driver of the correct transport 219 | chown radio radio /sys/class/android_usb/f_rmnet_smd_sdio/transport 220 | 221 | # Assign TCP buffer thresholds to be ceiling value of technology maximums 222 | # Increased technology maximums should be reflected here. 223 | write /proc/sys/net/core/rmem_max 8388608 224 | write /proc/sys/net/core/wmem_max 8388608 225 | 226 | #To allow interfaces to get v6 address when tethering is enabled 227 | write /proc/sys/net/ipv6/conf/rmnet0/accept_ra 2 228 | write /proc/sys/net/ipv6/conf/rmnet1/accept_ra 2 229 | write /proc/sys/net/ipv6/conf/rmnet2/accept_ra 2 230 | write /proc/sys/net/ipv6/conf/rmnet3/accept_ra 2 231 | write /proc/sys/net/ipv6/conf/rmnet4/accept_ra 2 232 | write /proc/sys/net/ipv6/conf/rmnet5/accept_ra 2 233 | write /proc/sys/net/ipv6/conf/rmnet6/accept_ra 2 234 | write /proc/sys/net/ipv6/conf/rmnet7/accept_ra 2 235 | write /proc/sys/net/ipv6/conf/rmnet_sdio0/accept_ra 2 236 | write /proc/sys/net/ipv6/conf/rmnet_sdio1/accept_ra 2 237 | write /proc/sys/net/ipv6/conf/rmnet_sdio2/accept_ra 2 238 | write /proc/sys/net/ipv6/conf/rmnet_sdio3/accept_ra 2 239 | write /proc/sys/net/ipv6/conf/rmnet_sdio4/accept_ra 2 240 | write /proc/sys/net/ipv6/conf/rmnet_sdio5/accept_ra 2 241 | write /proc/sys/net/ipv6/conf/rmnet_sdio6/accept_ra 2 242 | write /proc/sys/net/ipv6/conf/rmnet_sdio7/accept_ra 2 243 | write /proc/sys/net/ipv6/conf/rmnet_usb0/accept_ra 2 244 | write /proc/sys/net/ipv6/conf/rmnet_usb1/accept_ra 2 245 | write /proc/sys/net/ipv6/conf/rmnet_usb2/accept_ra 2 246 | write /proc/sys/net/ipv6/conf/rmnet_usb3/accept_ra 2 247 | 248 | # To prevent out of order acknowledgements from making 249 | # connection tracking to treat them as not belonging to 250 | # the connection they belong to. 251 | # Otherwise, a weird issue happens in which some long 252 | # connections on high-throughput links get dropped when 253 | # an ack packet comes out of order 254 | write /proc/sys/net/netfilter/nf_conntrack_tcp_be_liberal 1 255 | 256 | # Set the console loglevel to < KERN_INFO 257 | # Set the default message loglevel to KERN_INFO 258 | write /proc/sys/kernel/printk "6 6 1 7" 259 | 260 | # Allow access for CCID command/response timeout configuration 261 | chown system system /sys/module/ccid_bridge/parameters/bulk_msg_timeout 262 | 263 | # charger 264 | chown system system /sys/bus/i2c/drivers/lc709203/batt_capacity 265 | chmod 0660 /sys/bus/i2c/drivers/lc709203/batt_capacity 266 | 267 | # camera sockets 268 | mkdir /data/misc/camera 0770 camera camera 269 | 270 | # Create directory used by display clients 271 | mkdir /data/misc/display 0770 system graphics 272 | mkdir /persist/display 0770 system graphics 273 | 274 | # Graphics node permissions 275 | chmod 0664 /sys/class/graphics/fb0/dyn_pu 276 | chmod 0664 /sys/class/graphics/fb0/dynamic_fps 277 | chmod 0664 /sys/class/graphics/fb0/idle_time 278 | chmod 0664 /sys/class/graphics/fb0/mode 279 | chmod 0664 /sys/class/graphics/fb0/modes 280 | 281 | chown system graphics /sys/class/graphics/fb0/dyn_pu 282 | chown system graphics /sys/class/graphics/fb0/dynamic_fps 283 | chown system graphics /sys/class/graphics/fb0/idle_time 284 | chown system graphics /sys/class/graphics/fb0/mode 285 | chown system graphics /sys/class/graphics/fb0/modes 286 | 287 | on property:init.svc.wpa_supplicant=stopped 288 | stop dhcpcd 289 | 290 | on property:bluetooth.isEnabled=true 291 | write /sys/class/bluetooth/hci0/idle_timeout 7000 292 | 293 | on property:vold.decrypt=trigger_restart_framework 294 | start config_bt_addr 295 | start config_bluetooth 296 | 297 | on property:persist.env.fastdorm.enabled=true 298 | setprop persist.radio.data_no_toggle 1 299 | 300 | # FM enable/disable triggers 301 | on property:hw.fm.init=1 302 | write /sys/module/radio_iris_transport/parameters/fmsmd_set 1 303 | 304 | on property:hw.fm.init=0 305 | write /sys/module/radio_iris_transport/parameters/fmsmd_set 0 306 | 307 | service irsc_util /system/bin/irsc_util "/etc/sec_config" 308 | class main 309 | user root 310 | oneshot 311 | 312 | service rmt_storage /system/bin/rmt_storage 313 | class core 314 | user root 315 | disabled 316 | 317 | on property:ro.boot.emmc=true 318 | start rmt_storage 319 | 320 | service rfs_access /system/bin/rfs_access 321 | class core 322 | user system 323 | group system net_raw 324 | 325 | on property:ro.boot.emmc=true 326 | start rfs_access 327 | 328 | service config_bt_addr /system/bin/btnvtool -O 329 | class core 330 | user bluetooth 331 | group bluetooth radio 332 | oneshot 333 | 334 | service config_bluetooth /system/bin/sh /system/etc/init.qcom.bt.sh "onboot" 335 | class core 336 | user root 337 | seclabel u:r:bluetooth_loader:s0 338 | oneshot 339 | 340 | service hciattach /system/bin/sh /system/etc/init.qcom.bt.sh 341 | class late_start 342 | user bluetooth 343 | group bluetooth net_bt_admin 344 | disabled 345 | seclabel u:r:bluetooth_loader:s0 346 | oneshot 347 | 348 | on property:bluetooth.hciattach=true 349 | start hciattach 350 | 351 | on property:bluetooth.hciattach=false 352 | setprop bluetooth.status off 353 | 354 | # QMUX must be in multiple groups to support external process connections 355 | service qmuxd /system/bin/qmuxd 356 | class main 357 | user root 358 | group radio audio bluetooth gps qcom_diag 359 | 360 | service netmgrd /system/bin/netmgrd 361 | class main 362 | 363 | on property:ro.use_data_netmgrd=false 364 | # netmgr not supported on specific target 365 | stop netmgrd 366 | 367 | # Adjust socket buffer to enlarge TCP receive window for high bandwidth 368 | # but only if ro.data.large_tcp_window_size property is set. 369 | on property:ro.data.large_tcp_window_size=true 370 | write /proc/sys/net/ipv4/tcp_adv_win_scale 2 371 | 372 | service p2p_supplicant /system/bin/wpa_supplicant \ 373 | -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \ 374 | -I/system/etc/wifi/p2p_supplicant_overlay.conf -N \ 375 | -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ 376 | -I/system/etc/wifi/wpa_supplicant_overlay.conf \ 377 | -O/data/misc/wifi/sockets -puse_p2p_group_interface=1 \ 378 | -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0 379 | # we will start as root and wpa_supplicant will switch to user wifi 380 | # after setting up the capabilities required for WEXT 381 | # user wifi 382 | # group wifi inet keystore 383 | class main 384 | socket wpa_wlan0 dgram 660 wifi wifi 385 | disabled 386 | oneshot 387 | 388 | service wpa_supplicant /system/bin/wpa_supplicant \ 389 | -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ 390 | -I/system/etc/wifi/wpa_supplicant_overlay.conf \ 391 | -O/data/misc/wifi/sockets \ 392 | -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0 393 | # we will start as root and wpa_supplicant will switch to user wifi 394 | # after setting up the capabilities required for WEXT 395 | # user wifi 396 | # group wifi inet keystore 397 | class main 398 | socket wpa_wlan0 dgram 660 wifi wifi 399 | disabled 400 | oneshot 401 | 402 | service dhcpcd_wlan0 /system/bin/dhcpcd -ABKLG 403 | class late_start 404 | disabled 405 | oneshot 406 | 407 | service dhcpcd_p2p /system/bin/dhcpcd -ABKLG 408 | class late_start 409 | disabled 410 | oneshot 411 | 412 | service iprenew_wlan0 /system/bin/dhcpcd -n 413 | class late_start 414 | disabled 415 | oneshot 416 | 417 | service iprenew_p2p /system/bin/dhcpcd -n 418 | class late_start 419 | disabled 420 | oneshot 421 | 422 | service dhcpcd_bt-pan /system/bin/dhcpcd -BKLG 423 | class late_start 424 | disabled 425 | oneshot 426 | 427 | service iprenew_bt-pan /system/bin/dhcpcd -n 428 | class late_start 429 | disabled 430 | oneshot 431 | 432 | service dhcpcd_bnep0 /system/bin/dhcpcd -BKLG 433 | disabled 434 | oneshot 435 | 436 | service dhcpcd_bnep1 /system/bin/dhcpcd -BKLG 437 | disabled 438 | oneshot 439 | 440 | service dhcpcd_bnep2 /system/bin/dhcpcd -BKLG 441 | disabled 442 | oneshot 443 | 444 | service dhcpcd_bnep3 /system/bin/dhcpcd -BKLG 445 | disabled 446 | oneshot 447 | 448 | service dhcpcd_bnep4 /system/bin/dhcpcd -BKLG 449 | disabled 450 | oneshot 451 | 452 | service dhcpcd_eth0 /system/bin/dhcpcd -aABDKL 453 | class late_start 454 | disabled 455 | oneshot 456 | 457 | service iprenew_eth0 /system/bin/dhcpcd -n 458 | class late_start 459 | disabled 460 | oneshot 461 | 462 | service loc_launcher /system/bin/loc_launcher 463 | #loc_launcher will start as root and set its uid to gps 464 | class late_start 465 | group gps inet net_raw qcom_diag net_admin wifi 466 | 467 | service hostapd /system/bin/hostapd -dd /data/hostapd/hostapd.conf 468 | class late_start 469 | user root 470 | group root 471 | oneshot 472 | disabled 473 | 474 | on property:ro.data.large_tcp_window_size=true 475 | # Adjust socket buffer to enlarge TCP receive window for high bandwidth (e.g. DO-RevB) 476 | write /proc/sys/net/ipv4/tcp_adv_win_scale 2 477 | 478 | service ril-daemon1 /system/bin/rild -c 2 479 | class main 480 | socket rild2 stream 660 root radio 481 | socket rild-debug2 stream 660 radio system 482 | user root 483 | group radio cache inet misc audio sdcard_r sdcard_rw diag qcom_diag log 484 | 485 | service charger /charger 486 | class charger 487 | group log 488 | seclabel u:r:healthd:s0 489 | 490 | service ssr_diag /system/bin/ssr_diag 491 | class late_start 492 | user system 493 | group system 494 | 495 | service hvdcp /system/bin/hvdcp 496 | class core 497 | user root 498 | disabled 499 | 500 | on property:persist.usb.hvdcp.detect=true 501 | start hvdcp 502 | 503 | on property:persist.usb.hvdcp.detect=false 504 | stop hvdcp 505 | 506 | #start camera server as daemon 507 | service qcamerasvr /system/bin/mm-qcamera-daemon 508 | class main 509 | user camera 510 | group camera system inet input graphics 511 | 512 | # Allow usb charging to be disabled peristently 513 | on property:persist.usb.chgdisabled=1 514 | write /sys/class/power_supply/battery/charging_enabled 0 515 | 516 | on property:persist.usb.chgdisabled=0 517 | write /sys/class/power_supply/battery/charging_enabled 1 518 | 519 | service qseecomd /system/bin/qseecomd 520 | class core 521 | user root 522 | group root 523 | 524 | service perfd /system/vendor/bin/perfd 525 | class main 526 | user root 527 | group root 528 | disabled 529 | 530 | service thermal-engine /system/vendor/bin/thermal-engine 531 | class main 532 | user root 533 | group root 534 | 535 | service time_daemon /system/bin/time_daemon 536 | class late_start 537 | user root 538 | group root 539 | 540 | service audiod /system/bin/audiod 541 | class late_start 542 | user system 543 | group system 544 | 545 | service ppd /system/bin/mm-pp-daemon 546 | class late_start 547 | disabled 548 | user system 549 | socket pps stream 0660 system system 550 | group system graphics 551 | 552 | on property:init.svc.surfaceflinger=stopped 553 | stop ppd 554 | 555 | on property:init.svc.surfaceflinger=running 556 | start ppd 557 | 558 | service wcnss-service /system/bin/wcnss_service 559 | class main 560 | user system 561 | group system wifi radio 562 | oneshot 563 | 564 | service msm_irqbalance /system/bin/msm_irqbalance -f /system/vendor/etc/msm_irqbalance.conf 565 | class core 566 | user root 567 | group root 568 | -------------------------------------------------------------------------------- /rootdir/etc/ueventd.qcom.rc: -------------------------------------------------------------------------------- 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 met: 5 | # * Redistributions of source code must retain the above copyright 6 | # notice, this list of conditions and the following disclaimer. 7 | # * Redistributions in binary form must reproduce the above copyright 8 | # notice, this list of conditions and the following disclaimer in the 9 | # documentation and/or other materials provided with the distribution. 10 | # * Neither the name of The Linux Foundation nor 11 | # the names of its contributors may be used to endorse or promote 12 | # products derived from this software without specific prior written 13 | # permission. 14 | # 15 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 16 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17 | # IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 18 | # NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 19 | # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | # 27 | 28 | /dev/color_enhancement 0660 system system 29 | 30 | /dev/genlock 0666 system system 31 | /dev/kgsl 0666 system system 32 | /dev/kgsl-3d0 0666 system system 33 | /dev/kgsl-2d0 0666 root root 34 | /dev/kgsl-2d1 0666 root root 35 | /dev/ion 0664 system system 36 | /dev/rtc0 0600 system system 37 | /dev/smd0 0660 system system 38 | /dev/smd4 0660 system system 39 | /dev/smd_cxm_qmi 0640 radio radio 40 | /dev/smd5 0660 system system 41 | /dev/smd6 0660 system system 42 | /dev/smd7 0660 bluetooth bluetooth 43 | /dev/ccid_bridge 0660 system system 44 | 45 | #permissions for CSVT 46 | /dev/smd11 0660 radio radio 47 | 48 | /dev/rfcomm0 0660 bluetooth bluetooth 49 | /dev/ttyUSB0 0660 bluetooth bluetooth 50 | /dev/smdcntl0 0640 radio radio 51 | /dev/smdcntl1 0640 radio radio 52 | /dev/smdcntl2 0640 radio radio 53 | /dev/smdcntl3 0640 radio radio 54 | /dev/smdcntl4 0640 radio radio 55 | /dev/smdcntl5 0640 radio radio 56 | /dev/smdcntl6 0640 radio radio 57 | /dev/smdcntl7 0640 radio radio 58 | /dev/smdcnt_rev0 0640 radio radio 59 | /dev/smdcnt_rev1 0640 radio radio 60 | /dev/smdcnt_rev2 0640 radio radio 61 | /dev/smdcnt_rev3 0640 radio radio 62 | /dev/smdcnt_rev4 0640 radio radio 63 | /dev/smdcnt_rev5 0640 radio radio 64 | /dev/smdcnt_rev6 0640 radio radio 65 | /dev/smdcnt_rev7 0640 radio radio 66 | /dev/smdcnt_rev8 0640 radio radio 67 | /dev/smuxctl32 0640 radio radio 68 | /dev/sdioctl0 0640 radio radio 69 | /dev/sdioctl1 0640 radio radio 70 | /dev/sdioctl2 0640 radio radio 71 | /dev/sdioctl3 0640 radio radio 72 | /dev/sdioctl4 0640 radio radio 73 | /dev/sdioctl5 0640 radio radio 74 | /dev/sdioctl6 0640 radio radio 75 | /dev/sdioctl7 0640 radio radio 76 | /dev/sdioctl8 0640 radio radio 77 | /dev/rmnet_mux_ctrl 0640 radio radio 78 | /dev/hsicctl0 0640 radio radio 79 | /dev/hsicctl1 0640 radio radio 80 | /dev/hsicctl2 0640 radio radio 81 | /dev/hsicctl3 0640 radio radio 82 | /dev/hsicctl4 0640 radio radio 83 | /dev/hsicctl5 0640 radio radio 84 | /dev/hsicctl6 0640 radio radio 85 | /dev/hsicctl7 0640 radio radio 86 | /dev/hsicctl8 0640 radio radio 87 | /dev/hsicctl9 0640 radio radio 88 | /dev/hsicctl10 0640 radio radio 89 | /dev/hsicctl11 0640 radio radio 90 | /dev/hsicctl12 0640 radio radio 91 | /dev/hsicctl13 0640 radio radio 92 | /dev/hsicctl14 0640 radio radio 93 | /dev/hsicctl15 0640 radio radio 94 | /dev/hsicctl16 0640 radio radio 95 | /dev/mhi_pipe_14 0640 radio radio 96 | /dev/mhi_pipe_16 0640 radio radio 97 | /dev/mhi_pipe_32 0640 radio radio 98 | /dev/video* 0660 system camera 99 | /dev/media* 0660 system camera 100 | /dev/v4l-subdev* 0660 system camera 101 | /dev/qseecom 0660 system drmrpc 102 | /dev/gemini0 0660 system camera 103 | /dev/jpeg0 0660 system camera 104 | /dev/jpeg1 0660 system camera 105 | /dev/jpeg2 0660 system camera 106 | /dev/adsprpc-smd 0664 system system 107 | /dev/msm_camera/* 0660 system camera 108 | /dev/gemini/ 0660 system camera 109 | /dev/mercury0 0660 system camera 110 | /dev/msm_vidc_reg 0660 system audio 111 | /dev/msm_vidc_dec 0660 system audio 112 | /dev/msm_vidc_dec_sec 0660 system audio 113 | /dev/msm_vidc_enc 0660 system audio 114 | /dev/msm_rotator 0660 system system 115 | /dev/hw_random 0600 root root 116 | /dev/adsprpc-smd 0664 system system 117 | 118 | #permissions for audio 119 | /dev/audio_slimslave 0660 system audio 120 | /dev/msm_qcelp 0660 system audio 121 | /dev/msm_evrc 0660 system audio 122 | /dev/msm_wma 0660 system audio 123 | /dev/msm_wmapro 0660 system audio 124 | /dev/msm_amrnb 0660 system audio 125 | /dev/msm_amrwb 0660 system audio 126 | /dev/msm_amrwbplus 0660 system audio 127 | /dev/msm_aac 0660 system audio 128 | /dev/msm_multi_aac 0660 system audio 129 | /dev/msm_aac_in 0660 system audio 130 | /dev/msm_qcelp_in 0660 system audio 131 | /dev/msm_evrc_in 0660 system audio 132 | /dev/msm_amrnb_in 0640 system audio 133 | /dev/msm_a2dp_in 0660 system audio 134 | /dev/msm_ac3 0660 system audio 135 | /dev/msm_audio_cal 0660 system audio 136 | /dev/msm_acdb 0660 system audio 137 | /dev/msm_cad 0660 system audio 138 | /dev/msm_fm 0660 system audio 139 | /dev/msm_mvs 0660 system audio 140 | /dev/msm_pcm_lp_dec 0660 system audio 141 | /dev/msm_preproc_ctl 0660 system audio 142 | /dev/msm_rtac 0660 system audio 143 | /dev/msm_voicememo 0660 system audio 144 | /dev/radio0 0644 system audio 145 | /dev/smd3 0660 bluetooth net_bt_stack 146 | /dev/smd2 0660 bluetooth net_bt_stack 147 | /dev/ttyHSL1 0660 system system 148 | /dev/ttyHS1 0660 system system 149 | /dev/mdm 0660 system radio 150 | /sys/devices/virtual/smdpkt/smdcntl* open_timeout 0664 radio radio 151 | /dev/sdio_tty_ciq_00 0660 system system 152 | /dev/tty_sdio_00 0660 system system 153 | /dev/ttyGS0 0660 system system 154 | /dev/i2c-5 0660 media media 155 | /dev/voice_svc 0660 system audio 156 | /dev/avtimer 0660 system audio 157 | 158 | # Factory reset protection 159 | /dev/block/bootdevice/by-name/frp 0600 system system 160 | 161 | # DVB devices 162 | /dev/dvb/adapter0/demux* 0440 media media 163 | /dev/dvb/adapter0/dvr* 0660 media media 164 | /dev/dvb/adapter0/video* 0660 media media 165 | 166 | # Broadcast devices 167 | /dev/tsc_mux0 0660 media media 168 | /dev/tsc_ci0 0660 media media 169 | 170 | # sensors 171 | /sys/devices/soc.0/78b6000.i2c/i2c-0/0-* accel_enable 0660 input system 172 | /sys/devices/soc.0/78b6000.i2c/i2c-0/0-* accel_delay 0660 input system 173 | /sys/devices/soc.0/78b6000.i2c/i2c-0/0-* calibration 0660 input system 174 | /sys/devices/soc.0/78b6000.i2c/i2c-0/0-* debug 0660 input system 175 | /sys/devices/soc.0/78b6000.i2c/i2c-0/0-* device_delay 0660 input system 176 | /sys/devices/soc.0/78b6000.i2c/i2c-0/0-* enable_als_sensor 0660 input system 177 | /sys/devices/soc.0/78b6000.i2c/i2c-0/0-* enable_ps_sensor 0660 input system 178 | /sys/devices/soc.0/78b6000.i2c/i2c-0/0-* gyro_enable 0660 input system 179 | /sys/devices/soc.0/78b6000.i2c/i2c-0/0-* gyro_delay 0660 input system 180 | /sys/devices/soc.0/78b6000.i2c/i2c-0/0-* ps_calibration 0660 input system 181 | /sys/devices/soc.0/78b6000.i2c/i2c-0/0-* reg 0660 input system 182 | /sys/devices/soc.0/78b5000.i2c/i2c-1/1-* enable 0660 input system 183 | /sys/devices/soc.0/78b5000.i2c/i2c-1/1-* poll_delay 0660 input system 184 | /sys/devices/soc.0/78b5000.i2c/i2c-1/1-* enable_wakeup 0660 input system 185 | /sys/devices/soc.0/78b5000.i2c/i2c-1/1-* max_latency 0660 input system 186 | /sys/devices/soc.0/78b5000.i2c/i2c-1/1-* flush 0660 input system 187 | /sys/devices/soc.0/78b5000.i2c/i2c-1/1-* calibrate 0660 input system 188 | 189 | # vm_bms 190 | /dev/vm_bms 0660 system system 191 | /dev/battery_data 0660 system system 192 | 193 | # wlan 194 | /dev/wcnss_wlan 0660 system system 195 | /dev/wcnss_ctrl 0660 system system 196 | #nfc permissions 197 | /dev/nfc-nci 0660 nfc nfc 198 | /dev/assd 0660 nfc nfc 199 | 200 | # UIO devices 201 | /dev/uio0 0660 system system 202 | /dev/uio1 0660 system system 203 | /dev/uio2 0660 system system 204 | 205 | # ESOC devices 206 | /dev/subsys_esoc* 0640 system radio 207 | 208 | # Sensors 209 | /dev/yl_alsprox_sensor 0660 system system 210 | 211 | # YL params 212 | /dev/yl_params1 0660 system system 213 | -------------------------------------------------------------------------------- /sepolicy/bluetooth_loader.te: -------------------------------------------------------------------------------- 1 | # Bluetooth executables and scripts 2 | type bluetooth_loader, domain; 3 | type bluetooth_loader_exec, exec_type, file_type; 4 | 5 | # Start bdAddrLoader from init 6 | init_daemon_domain(bluetooth_loader) 7 | 8 | # Run init.qcom.bt.sh 9 | allow bluetooth_loader shell_exec:file { entrypoint read }; 10 | allow bluetooth_loader bluetooth_loader_exec:file { getattr open execute_no_trans }; 11 | 12 | # init.qcom.bt.sh needs /system/bin/log access 13 | allow bluetooth_loader devpts:chr_file rw_file_perms; 14 | 15 | # Run hci_qcomm_init from init.qcom.bt.sh 16 | domain_auto_trans(bluetooth_loader, hci_attach_exec, hci_attach) 17 | allow hci_attach bluetooth_loader:fd use; 18 | 19 | # Set persist.service.bdroid.* and bluetooth.* property values 20 | set_prop(bluetooth_loader, bluetooth_prop) 21 | 22 | # Allow getprop/setprop for init.qcom.bt.sh 23 | allow bluetooth_loader system_file:file execute_no_trans; 24 | 25 | # Access the smd device 26 | allow bluetooth_loader hci_attach_dev:chr_file rw_file_perms; 27 | 28 | # And qmuxd 29 | allow bluetooth_loader qmuxd_socket:dir { write add_name remove_name search }; 30 | allow bluetooth_loader qmuxd_socket:sock_file { create setattr getattr write unlink }; 31 | allow bluetooth_loader qmuxd:unix_stream_socket { connectto }; 32 | -------------------------------------------------------------------------------- /sepolicy/file_contexts: -------------------------------------------------------------------------------- 1 | /persist/.bt_nv.bin u:object_r:bluetooth_data_file:s0 2 | 3 | /system/etc/init\.qcom\.bt\.sh u:object_r:bluetooth_loader_exec:s0 4 | 5 | /dev/smd3 u:object_r:hci_attach_dev:s0 6 | -------------------------------------------------------------------------------- /sepolicy/mm-qcamerad.te: -------------------------------------------------------------------------------- 1 | allow mm-qcamerad camera_data_file:dir r_dir_perms; 2 | -------------------------------------------------------------------------------- /sepolicy/property_contexts: -------------------------------------------------------------------------------- 1 | qualcomm.bt. u:object_r:bluetooth_prop:s0 2 | -------------------------------------------------------------------------------- /system.prop: -------------------------------------------------------------------------------- 1 | # Art 2 | ro.sys.fw.dex2oat_thread_count=4 3 | 4 | # ActivityManager 5 | ro.config.max_starting_bg=8 6 | ro.sys.fw.use_trim_settings=true 7 | 8 | # Audio 9 | ro.qc.sdk.audio.fluencetype=fluence 10 | persist.audio.fluence.voicecall=true 11 | persist.audio.fluence.voicerec=false 12 | persist.audio.fluence.speaker=false 13 | 14 | av.offload.enable=true 15 | av.streaming.offload.enable=true 16 | audio.offload.buffer.size.kb=64 17 | audio.offload.gapless.enabled=true 18 | audio.offload.min.duration.secs=30 19 | audio.offload.pcm.16bit.enable=false 20 | audio.offload.pcm.24bit.enable=true 21 | use.voice.path.for.pcm.voip=true 22 | vidc.enc.narrow.searchrange=1 23 | 24 | # Bluetooth 25 | ro.qualcomm.bt.hci_transport=smd 26 | 27 | # Display 28 | debug.composition.type=c2d 29 | debug.sf.gpu_comp_tiling=1 30 | debug.mdpcomp.idletime=600 31 | persist.hwc.mdpcomp.enable=true 32 | persist.hwc.ptor.enable=true 33 | ro.opengles.version=196609 34 | debug.enable.sglscale=1 35 | 36 | # GPS 37 | persist.gps.qc_nlp_in_use=0 38 | ro.gps.agps_provider=1 39 | ro.qc.sdk.izat.premium.enabled=0 40 | ro.qc.sdk.izat.service_mask=0x0 41 | 42 | # Media 43 | mm.enable.smoothstreaming=true 44 | mm.disable.sec_smoothstreaming=true 45 | media.aac_51_output_enabled=true 46 | drm.service.enabled=1 47 | 48 | # NITZ 49 | persist.rild.nitz_plmn= 50 | persist.rild.nitz_long_ons_0= 51 | persist.rild.nitz_long_ons_1= 52 | persist.rild.nitz_long_ons_2= 53 | persist.rild.nitz_long_ons_3= 54 | persist.rild.nitz_short_ons_0= 55 | persist.rild.nitz_short_ons_1= 56 | persist.rild.nitz_short_ons_2= 57 | persist.rild.nitz_short_ons_3= 58 | 59 | # perf 60 | ro.min_freq_0=960000 61 | ro.min_freq_4=800000 62 | ro.vendor.extension_library=libqti-perfd-client.so 63 | 64 | # Radio 65 | persist.data.qmi.adb_logmask=0 66 | persist.radio.apm_sim_not_pwdn=1 67 | rild.libargs=-d /dev/smd0 68 | rild.libpath=/system/vendor/lib64/libril-qc-qmi-1.so 69 | ro.telephony.call_ring.multiple=false 70 | ro.use_data_netmgrd=true 71 | 72 | # Time 73 | persist.timed.enable=true 74 | 75 | # WiFi 76 | ro.disableWifiApFirmwareReload=true 77 | wifi.interface=wlan0 78 | -------------------------------------------------------------------------------- /wifi/WCNSS_cfg.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_device_cyanogen_msm8939-common/30642c0bd40cd3e48a35b229c62167e1ffe4e52d/wifi/WCNSS_cfg.dat -------------------------------------------------------------------------------- /wifi/WCNSS_qcom_cfg.ini: -------------------------------------------------------------------------------- 1 | # This file allows user to override the factory 2 | 3 | # defaults for the WLAN Driver 4 | 5 | 6 | # Enable IMPS or not 7 | gEnableImps=1 8 | 9 | # Enable/Disable Idle Scan 10 | 11 | gEnableIdleScan=0 12 | 13 | 14 | # Increase sleep duration (seconds) during IMPS 15 | # 0 implies no periodic wake up from IMPS. Periodic wakeup is 16 | # unnecessary if Idle Scan is disabled. 17 | gImpsModSleepTime=0 18 | 19 | 20 | # Enable BMPS or not 21 | gEnableBmps=1 22 | 23 | # Enable suspend or not 24 | 25 | # 1: Enable standby, 2: Enable Deep sleep, 3: Enable Mcast/Bcast Filter 26 | 27 | gEnableSuspend=3 28 | 29 | 30 | # Phy Mode (auto, b, g, n, etc) 31 | # Valid values are 0-9, with 0 = Auto, 4 = 11n, 9 = 11ac 32 | gDot11Mode=0 33 | 34 | 35 | # CSR Roaming Enable(1) Disable(0) 36 | 37 | gRoamingTime=0 38 | 39 | #yulong add for userspace set channel 40 | gSapAllowAllChannel=1 41 | 42 | # Assigned MAC Addresses - This will be used until NV items are in place 43 | 44 | # Each byte of MAC address is represented in Hex format as XX 45 | 46 | Intf0MacAddress=000AF58989FF 47 | Intf1MacAddress=000AF58989FE 48 | Intf2MacAddress=000AF58989FD 49 | 50 | Intf3MacAddress=000AF58989FC 51 | 52 | 53 | # UAPSD service interval for VO,VI, BE, BK traffic 54 | 55 | InfraUapsdVoSrvIntv=0 56 | 57 | InfraUapsdViSrvIntv=0 58 | 59 | InfraUapsdBeSrvIntv=0 60 | 61 | InfraUapsdBkSrvIntv=0 62 | 63 | # Flag to allow STA send AddTspec even when ACM is Off 64 | gAddTSWhenACMIsOff=1 65 | 66 | # Make 1x1 the default antenna configuration 67 | 68 | gNumRxAnt=1 69 | 70 | 71 | # Beacon filtering frequency (unit in beacon intervals) 72 | 73 | gNthBeaconFilter=50 74 | 75 | 76 | # Enable WAPI or not 77 | 78 | # WAPIIsEnabled=0 79 | 80 | 81 | # Flags to filter Mcast abd Bcast RX packets. 82 | 83 | # Value 0: No filtering, 1: Filter all Multicast. 84 | 85 | # 2: Filter all Broadcast. 3: Filter all Mcast abd Bcast 86 | 87 | McastBcastFilter=3 88 | 89 | 90 | #Flag to enable HostARPOffload feature or not 91 | 92 | hostArpOffload=1 93 | 94 | 95 | #SoftAP Related Parameters 96 | 97 | # AP MAc addr 98 | 99 | gAPMacAddr=000AF589dcab 100 | 101 | 102 | # 802.11n Protection flag 103 | 104 | gEnableApProt=1 105 | 106 | 107 | #Enable OBSS protection 108 | 109 | gEnableApOBSSProt=1 110 | 111 | 112 | #Enable/Disable UAPSD for SoftAP 113 | 114 | gEnableApUapsd=1 115 | 116 | 117 | # Fixed Rate 118 | 119 | gFixedRate=0 120 | 121 | 122 | # Maximum Tx power 123 | 124 | # gTxPowerCap=30 125 | 126 | 127 | # Fragmentation Threshold 128 | 129 | # gFragmentationThreshold=2346 130 | 131 | 132 | # RTS threshold 133 | 134 | RTSThreshold=2347 135 | 136 | 137 | # Intra-BSS forward 138 | 139 | gDisableIntraBssFwd=0 140 | 141 | 142 | # WMM Enable/Disable 143 | 144 | WmmIsEnabled=0 145 | 146 | 147 | # 802.11d support 148 | 149 | g11dSupportEnabled=0 150 | 151 | # CCX Support and fast transition 152 | CcxEnabled=0 153 | FastTransitionEnabled=1 154 | ImplicitQosIsEnabled=0 155 | gNeighborScanTimerPeriod=200 156 | 157 | # default value of this parameter is zero to enable dynamic threshold allocation 158 | # to set static roming threshold uncomment below parameter and set vaule 159 | #gNeighborLookupThreshold=78 160 | 161 | gNeighborScanChannelMinTime=20 162 | gNeighborScanChannelMaxTime=30 163 | 164 | # Legacy (non-CCX, non-802.11r) Fast Roaming Support 165 | # To enable, set FastRoamEnabled=1 166 | # To disable, set FastRoamEnabled=0 167 | FastRoamEnabled=1 168 | 169 | #Check if the AP to which we are roaming is better than current AP in terms of RSSI. 170 | #Checking is disabled if set to Zero.Otherwise it will use this value as to how better 171 | #the RSSI of the new/roamable AP should be for roaming 172 | RoamRssiDiff=5 173 | 174 | # SAP Country code 175 | 176 | # Default Country Code is 2 bytes, 3rd byte is optional indoor or out door. 177 | 178 | # Example 179 | 180 | # US Indoor, USI 181 | 182 | # Korea Outdoor, KRO 183 | 184 | # Japan without optional byte, JP 185 | 186 | # France without optional byte, FR 187 | 188 | #gAPCntryCode=USI 189 | 190 | 191 | #Short Guard Interval Enable/disable 192 | 193 | gShortGI20Mhz=1 194 | 195 | gShortGI40Mhz=1 196 | 197 | 198 | #Auto Shutdown Value in seconds. A value of 0 means Auto shutoff is disabled 199 | 200 | gAPAutoShutOff=0 201 | 202 | 203 | # SAP auto channel selection configuration 204 | 205 | # 0 = disable auto channel selection 206 | 207 | # 1 = enable auto channel selection, channel provided by supplicant will be ignored 208 | 209 | gApAutoChannelSelection=0 210 | 211 | 212 | # Listen Energy Detect Mode Configuration 213 | 214 | # Valid values 0-128 215 | 216 | # 128 means disable Energy Detect feature 217 | 218 | # 0-9 are threshold code and 7 is recommended value from system if feature is to be enabled. 219 | 220 | # 10-128 are reserved. 221 | 222 | # The EDET threshold mapping is as follows in 3dB step: 223 | 224 | # 0 = -60 dBm 225 | 226 | # 1 = -63 dBm 227 | 228 | # 2 = -66 dBm 229 | 230 | # ... 231 | 232 | # 7 = -81 dBm 233 | 234 | # 8 = -84 dBm 235 | 236 | # 9 = -87 dBm 237 | 238 | # Note: Any of these settings are valid. Setting 0 would yield the highest power saving (in a noisy environment) at the cost of more range. The range impact is approximately #calculated as: 239 | 240 | # 241 | 242 | # Range Loss (dB) = EDET threshold level (dBm) + 97 dBm. 243 | 244 | # 245 | 246 | gEnablePhyAgcListenMode=128 247 | 248 | 249 | #Preferred channel to start BT AMP AP mode (0 means, any channel) 250 | 251 | BtAmpPreferredChannel=0 252 | 253 | 254 | #Preferred band (both or 2.4 only or 5 only) 255 | 256 | BandCapability=0 257 | 258 | 259 | #Beacon Early Termination (1 = enable the BET feature, 0 = disable) 260 | 261 | enableBeaconEarlyTermination=1 262 | 263 | beaconEarlyTerminationWakeInterval=11 264 | 265 | 266 | #Bluetooth Alternate Mac Phy (1 = enable the BT AMP feature, 0 = disable) 267 | 268 | gEnableBtAmp=0 269 | 270 | 271 | #SOFTAP Channel Range selection 272 | 273 | gAPChannelSelectStartChannel=1 274 | 275 | gAPChannelSelectEndChannel=11 276 | 277 | 278 | #SOFTAP Channel Range selection Operating band 279 | 280 | # 0:2.4GHZ 1: LOW-5GHZ 2:MID-5GHZ 3:HIGH-5GHZ 4: 4.9HZ BAND 281 | 282 | gAPChannelSelectOperatingBand=0 283 | 284 | 285 | #Channel Bonding 286 | gChannelBondingMode5GHz=1 287 | 288 | gEnableModulatedDTIM = 3 289 | gMaxLIModulatedDTIM = 3 290 | gEnableDatainactivity = 200 291 | 292 | #Enable Keep alive with non-zero period value 293 | 294 | gStaKeepAlivePeriod=30 295 | 296 | 297 | #Say gGoKeepAlivePeriod(5 seconds) and gGoLinkMonitorPeriod(10 seconds). 298 | #For every 10 seconds DUT sends Qos Null frame(i.e., Keep Alive frame if link is idle for last 10 seconds.) 299 | #For both active and power save clients. 300 | 301 | #Power save clients: DUT set TIM bit from 10th second onwards and till client honors TIM bit. 302 | #If doesn't honor for 5 seconds then Driver remove client. 303 | 304 | #Active clients: DUT send Qos Null frame for 10th seconds onwards if it is not success still DUT try on 305 | #11th second if not tries on 12th and so on till 15th second. Hence before disconnection DUT will send 5 NULL frames. 306 | #Hence in any case DUT will detect client got removed in (10+5) seconds. i.e., (gGoKeepAlivePeriod +gGoLinkMonitorPeriod).. 307 | 308 | #gGoLinkMonitorPeriod/ gApLinkMonitorPeriod is period where link is idle and it is period 309 | #where we send NULL frame. 310 | 311 | #gApLinkMonitorPeriod = 10 312 | 313 | #gGoLinkMonitorPeriod = 10 314 | 315 | #gGoKeepAlivePeriod/gApKeepAlivePeriod is time to spend to check whether frame are succeed to send or not. 316 | #Hence total effective detection time is gGoLinkMonitorPeriod+ gGoKeepAlivePeriod/gApLinkMonitorPeriod+ gApKeepAlivePeriod. 317 | gGoKeepAlivePeriod = 10 318 | 319 | gApKeepAlivePeriod = 30 320 | #If set will start with active scan after driver load, otherwise will start with 321 | 322 | #passive scan to find out the domain 323 | 324 | #gEnableBypass11d=1 325 | 326 | 327 | #If set to 0, will not scan DFS channels 328 | 329 | gEnableDFSChnlScan=1 330 | 331 | gEnableLogp=1 332 | 333 | 334 | # Enable Automatic Tx Power control 335 | 336 | gEnableAutomaticTxPowerControl=1 337 | 338 | # 0 for OLPC 1 for CLPC and SCPC 339 | gEnableCloseLoop=1 340 | 341 | #Data Inactivity Timeout when in powersave (in ms) 342 | gDataInactivityTimeout=200 343 | 344 | gEnableLpwrImgTransition=1 345 | 346 | # Scan Timing Parameters 347 | # gPassiveMaxChannelTime=110 348 | # gPassiveMinChannelTime=60 349 | # Enable Tx LDPC 350 | #gTxLdpcEnable = 1 for HT mode, 2 for VHT mode,3 for both HT and VHT 351 | gTxLdpcEnable=3 352 | # gActiveMaxChannelTime=40 353 | # gActiveMinChannelTime=20 354 | 355 | # Valid values are 2048,4096,8192 and so on 356 | # Please don't use values other than the ones mentioned above 357 | gMaxMediumTime=4096 358 | 359 | # 802.11K support 360 | gRrmEnable=1 361 | gRrmOperChanMax=8 362 | gRrmNonOperChanMax=8 363 | gRrmRandIntvl=100 364 | 365 | #Scan offload 366 | gEnableDirectedScanOffload=0 367 | 368 | #FlexConnect Power Factor 369 | #Default is set to 0 (disable) 370 | gFlexConnectPowerFactor=0 371 | 372 | END 373 | 374 | # Note: Configuration parser would not read anything past the END marker 375 | 376 | -------------------------------------------------------------------------------- /wifi/WCNSS_qcom_wlan_nv.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CyanogenMod/android_device_cyanogen_msm8939-common/30642c0bd40cd3e48a35b229c62167e1ffe4e52d/wifi/WCNSS_qcom_wlan_nv.bin --------------------------------------------------------------------------------