├── Android.mk ├── AndroidBoard.mk ├── BoardConfigCommon.mk ├── README ├── audio └── audio_effects.conf ├── board ├── 00-qcom-platform-msm8916.mk ├── ant.mk ├── bootloader.mk ├── filesystem.mk ├── hardware.mk ├── kernel.mk ├── qcom-audio.mk ├── qcom-bluetooth.mk ├── qcom-crypto.mk ├── qcom-display.mk ├── qcom-fm.mk ├── qcom-media.mk ├── qcom-sepolicy.mk ├── qcom-wlan.mk ├── recovery.mk ├── releasetools.mk └── sepolicy.mk ├── cm.dependencies ├── configs ├── hostapd.accept ├── hostapd.conf ├── hostapd.deny ├── media_codecs_msm8916.xml ├── media_codecs_msm8939.xml ├── msm_irqbalance.conf ├── p2p_supplicant_overlay.conf ├── sec_config └── wpa_supplicant_overlay.conf ├── init ├── Android.mk ├── init_msm8916.cpp └── init_msm8916.h ├── msm8916.mk ├── overlay ├── frameworks │ └── base │ │ └── core │ │ └── res │ │ └── res │ │ └── values │ │ └── config.xml └── packages │ └── services │ └── Telephony │ └── res │ └── values │ └── config.xml ├── product ├── ant.mk ├── audio.mk ├── init.mk ├── media.mk ├── perf.mk ├── qcom-audio.mk ├── qcom-bluetooth.mk ├── qcom-display.mk ├── qcom-fm.mk ├── qcom-keystore.mk ├── qcom-media.mk ├── qcom-perf.mk ├── qcom-radio.mk ├── qcom-wifi.mk ├── recovery.mk ├── touchscreen.mk └── usb.mk ├── recovery ├── Android.mk └── recovery_updater.cpp ├── releasetools.py ├── rootdir ├── Android.mk └── etc │ ├── init.qcom.bt.sh │ ├── init.qcom.power_msm8916.rc │ ├── init.qcom.power_msm8939.rc │ ├── init.qcom.rc │ ├── init.qcom.ssr.rc │ ├── init.qcom.usb.rc │ └── ueventd.qcom.rc └── sepolicy ├── healthd.te ├── mm-qcamerad.te ├── netmgrd.te ├── qseecomd.te └── surfaceflinger.te /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 | ifneq ($(filter msm8916 msm8939,$(TARGET_BOARD_PLATFORM_VARIANT)),) 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) 2016 The CyanogenMod Project 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | VENDOR_PATH := device/cyanogen/msm8916-common 17 | 18 | # Include board config fragments 19 | include $(VENDOR_PATH)/board/*.mk 20 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | Shared device tree for Cyanogen msm8916 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 | -------------------------------------------------------------------------------- /board/00-qcom-platform-msm8916.mk: -------------------------------------------------------------------------------- 1 | # Platform 2 | TARGET_BOARD_PLATFORM := msm8916 3 | 4 | # Architecture 5 | ifneq ($(FORCE_32_BIT),true) 6 | TARGET_BOARD_SUFFIX := _64 7 | TARGET_ARCH := arm64 8 | TARGET_ARCH_VARIANT := armv8-a 9 | TARGET_CPU_ABI := arm64-v8a 10 | TARGET_CPU_ABI2 := 11 | TARGET_CPU_VARIANT := cortex-a53 12 | 13 | TARGET_2ND_ARCH := arm 14 | TARGET_2ND_ARCH_VARIANT := armv7-a-neon 15 | TARGET_2ND_CPU_ABI := armeabi-v7a 16 | TARGET_2ND_CPU_ABI2 := armeabi 17 | TARGET_2ND_CPU_VARIANT := cortex-a53 18 | 19 | TARGET_USES_64_BIT_BINDER := true 20 | else 21 | TARGET_BOARD_SUFFIX := _32 22 | TARGET_ARCH := arm 23 | TARGET_ARCH_VARIANT := armv7-a-neon 24 | TARGET_CPU_ABI := armeabi-v7a 25 | TARGET_CPU_ABI2 := armeabi 26 | TARGET_CPU_VARIANT := cortex-a53 27 | endif 28 | 29 | # Init 30 | TARGET_INIT_VENDOR_LIB := libinit_msm8916 31 | TARGET_PLATFORM_DEVICE_BASE := /devices/soc.0/ 32 | TARGET_RECOVERY_DEVICE_MODULES := libinit_msm8916 33 | 34 | # Qualcomm support 35 | BOARD_USES_QCOM_HARDWARE := true 36 | BOARD_USES_QC_TIME_SERVICES := true 37 | TARGET_POWERHAL_VARIANT := qcom 38 | TARGET_RIL_VARIANT := caf 39 | -------------------------------------------------------------------------------- /board/ant.mk: -------------------------------------------------------------------------------- 1 | BOARD_ANT_WIRELESS_DEVICE := "vfs-prerelease" 2 | -------------------------------------------------------------------------------- /board/bootloader.mk: -------------------------------------------------------------------------------- 1 | TARGET_BOOTLOADER_BOARD_NAME := MSM8916 2 | 3 | TARGET_NO_BOOTLOADER := true 4 | -------------------------------------------------------------------------------- /board/filesystem.mk: -------------------------------------------------------------------------------- 1 | TARGET_USERIMAGES_USE_EXT4 := true 2 | BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4 3 | -------------------------------------------------------------------------------- /board/hardware.mk: -------------------------------------------------------------------------------- 1 | BOARD_HARDWARE_CLASS += hardware/cyanogen/cmhw 2 | BOARD_USES_CYANOGEN_HARDWARE := true 3 | -------------------------------------------------------------------------------- /board/kernel.mk: -------------------------------------------------------------------------------- 1 | BOARD_DTBTOOL_ARGS := -2 2 | 3 | BOARD_KERNEL_BASE := 0x80000000 4 | 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 5 | BOARD_KERNEL_PAGESIZE := 2048 6 | BOARD_KERNEL_SEPARATED_DT := true 7 | BOARD_KERNEL_TAGS_OFFSET := 0x01E00000 8 | BOARD_RAMDISK_OFFSET := 0x02000000 9 | 10 | ENABLE_CPUSETS := true 11 | 12 | TARGET_KERNEL_SOURCE := kernel/cyanogen/msm8916 13 | ifneq ($(FORCE_32_BIT),true) 14 | TARGET_USES_UNCOMPRESSED_KERNEL := true 15 | endif 16 | -------------------------------------------------------------------------------- /board/qcom-audio.mk: -------------------------------------------------------------------------------- 1 | AUDIO_FEATURE_ENABLED_KPI_OPTIMIZE := true 2 | AUDIO_FEATURE_ENABLED_NEW_SAMPLE_RATE := true 3 | BOARD_USES_ALSA_AUDIO := true 4 | USE_CUSTOM_AUDIO_POLICY := 1 5 | -------------------------------------------------------------------------------- /board/qcom-bluetooth.mk: -------------------------------------------------------------------------------- 1 | BOARD_HAVE_BLUETOOTH := true 2 | BOARD_HAVE_BLUETOOTH_QCOM := true 3 | BLUETOOTH_HCI_USE_MCT := true 4 | -------------------------------------------------------------------------------- /board/qcom-crypto.mk: -------------------------------------------------------------------------------- 1 | TARGET_HW_DISK_ENCRYPTION := true 2 | TARGET_KEYMASTER_WAIT_FOR_QSEE := true 3 | -------------------------------------------------------------------------------- /board/qcom-display.mk: -------------------------------------------------------------------------------- 1 | MAX_EGL_CACHE_KEY_SIZE := 12*1024 2 | MAX_EGL_CACHE_SIZE := 2048*1024 3 | 4 | NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3 5 | 6 | OVERRIDE_RS_DRIVER := libRSDriver_adreno.so 7 | 8 | TARGET_CONTINUOUS_SPLASH_ENABLED := true 9 | TARGET_FORCE_HWC_FOR_VIRTUAL_DISPLAYS := true 10 | TARGET_USES_C2D_COMPOSITION := true 11 | TARGET_USES_ION := true 12 | USE_OPENGL_RENDERER := true 13 | -------------------------------------------------------------------------------- /board/qcom-fm.mk: -------------------------------------------------------------------------------- 1 | AUDIO_FEATURE_ENABLED_FM_POWER_OPT := true 2 | TARGET_QCOM_NO_FM_FIRMWARE := true 3 | -------------------------------------------------------------------------------- /board/qcom-media.mk: -------------------------------------------------------------------------------- 1 | TARGET_HAVE_SIGNED_VENUS_FW := true 2 | TARGET_USES_MEDIA_EXTENSIONS := true 3 | -------------------------------------------------------------------------------- /board/qcom-sepolicy.mk: -------------------------------------------------------------------------------- 1 | include device/qcom/sepolicy/sepolicy.mk 2 | -------------------------------------------------------------------------------- /board/qcom-wlan.mk: -------------------------------------------------------------------------------- 1 | BOARD_HAS_QCOM_WLAN := true 2 | BOARD_HAS_QCOM_WLAN_SDK := true 3 | 4 | BOARD_HOSTAPD_DRIVER := NL80211 5 | BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_qcwcn 6 | 7 | BOARD_WLAN_DEVICE := qcwcn 8 | 9 | BOARD_WPA_SUPPLICANT_DRIVER := NL80211 10 | BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_qcwcn 11 | 12 | TARGET_USES_QCOM_WCNSS_QMI := true 13 | TARGET_USES_WCNSS_CTRL := true 14 | 15 | WIFI_DRIVER_FW_PATH_AP := "ap" 16 | WIFI_DRIVER_FW_PATH_STA := "sta" 17 | 18 | WPA_SUPPLICANT_VERSION := VER_0_8_X 19 | -------------------------------------------------------------------------------- /board/recovery.mk: -------------------------------------------------------------------------------- 1 | # Recovery 2 | TARGET_RECOVERY_UPDATER_LIBS := librecovery_updater_cm 3 | -------------------------------------------------------------------------------- /board/releasetools.mk: -------------------------------------------------------------------------------- 1 | TARGET_RELEASETOOLS_EXTENSIONS := $(VENDOR_PATH) 2 | -------------------------------------------------------------------------------- /board/sepolicy.mk: -------------------------------------------------------------------------------- 1 | BOARD_SEPOLICY_DIRS += \ 2 | $(VENDOR_PATH)/sepolicy 3 | -------------------------------------------------------------------------------- /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_msm8916.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 82 | 83 | 99 | 100 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 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/media_codecs_msm8939.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 | 321 | 322 | -------------------------------------------------------------------------------- /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 | /* :: */ 7 | 71:4294967295:1001 8 | /* QMI-SLIM service permitted to gps and net_raw */ 9 | 55:4294967295:1021:3004 10 | /* :: */ 11 | 50:4294967295:1001 12 | /* Allow Sensor services to be used by sensor process */ 13 | 256:4294967295:3011 14 | 257:4294967295:3011 15 | 258:4294967295:3011 16 | 259:4294967295:3011 17 | 260:4294967295:3011 18 | 261:4294967295:3011 19 | 262:4294967295:3011 20 | 263:4294967295:3011 21 | 264:4294967295:3011 22 | 265:4294967295:3011 23 | 266:4294967295:3011 24 | 267:4294967295:3011 25 | 268:4294967295:3011 26 | 269:4294967295:3011 27 | 270:4294967295:3011 28 | 271:4294967295:3011 29 | 272:4294967295:3011 30 | 273:4294967295:3011 31 | 274:4294967295:3011 32 | 275:4294967295:3011 33 | 276:4294967295:3011 34 | 277:4294967295:3011 35 | 278:4294967295:3011 36 | 279:4294967295:3011 37 | 280:4294967295:3011 38 | 281:4294967295:3011 39 | 282:4294967295:3011 40 | 283:4294967295:3011 41 | 284:4294967295:3011 42 | 285:4294967295:3011 43 | 286:4294967295:3011 44 | 287:4294967295:3011 45 | 288:4294967295:3011 46 | 289:4294967295:3011 47 | 290:4294967295:3011 48 | 291:4294967295:3011 49 | 292:4294967295:3011 50 | 293:4294967295:3011 51 | 294:4294967295:3011 52 | 295:4294967295:3011 53 | 296:4294967295:3011 54 | 297:4294967295:3011 55 | 298:4294967295:3011 56 | 299:4294967295:3011 57 | 300:4294967295:3011 58 | 301:4294967295:3011 59 | 302:4294967295:3011 60 | 303:4294967295:3011 61 | 304:4294967295:3011 62 | 305:4294967295:3011 63 | 306:4294967295:3011 64 | 307:4294967295:3011 65 | 308:4294967295:3011 66 | 309:4294967295:3011 67 | 310:4294967295:3011 68 | 311:4294967295:3011 69 | 312:4294967295:3011 70 | 313:4294967295:3011 71 | 314:4294967295:3011 72 | 315:4294967295:3011 73 | 316:4294967295:3011 74 | 317:4294967295:3011 75 | 318:4294967295:3011 76 | 319:4294967295:3011 77 | 320:4294967295:3011 78 | 321:4294967295:3011 79 | 322:4294967295:3011 80 | 323:4294967295:3011 81 | 324:4294967295:3011 82 | 325:4294967295:3011 83 | 326:4294967295:3011 84 | 327:4294967295:3011 85 | 328:4294967295:3011 86 | 329:4294967295:3011 87 | 330:4294967295:3011 88 | 331:4294967295:3011 89 | 332:4294967295:3011 90 | 333:4294967295:3011 91 | 334:4294967295:3011 92 | 335:4294967295:3011 93 | 336:4294967295:3011 94 | 337:4294967295:3011 95 | 338:4294967295:3011 96 | 339:4294967295:3011 97 | 340:4294967295:3011 98 | 341:4294967295:3011 99 | 342:4294967295:3011 100 | 343:4294967295:3011 101 | 344:4294967295:3011 102 | 345:4294967295:3011 103 | 346:4294967295:3011 104 | 347:4294967295:3011 105 | 348:4294967295:3011 106 | 349:4294967295:3011 107 | 350:4294967295:3011 108 | 351:4294967295:3011 109 | 352:4294967295:3011 110 | 353:4294967295:3011 111 | 354:4294967295:3011 112 | 355:4294967295:3011 113 | 356:4294967295:3011 114 | 357:4294967295:3011 115 | 358:4294967295:3011 116 | 359:4294967295:3011 117 | 360:4294967295:3011 118 | 361:4294967295:3011 119 | 362:4294967295:3011 120 | 363:4294967295:3011 121 | 364:4294967295:3011 122 | 365:4294967295:3011 123 | 366:4294967295:3011 124 | 367:4294967295:3011 125 | 368:4294967295:3011 126 | 369:4294967295:3011 127 | 370:4294967295:3011 128 | 371:4294967295:3011 129 | 372:4294967295:3011 130 | 373:4294967295:3011 131 | 374:4294967295:3011 132 | 375:4294967295:3011 133 | 376:4294967295:3011 134 | 377:4294967295:3011 135 | 378:4294967295:3011 136 | 379:4294967295:3011 137 | 380:4294967295:3011 138 | 381:4294967295:3011 139 | 382:4294967295:3011 140 | 383:4294967295:3011 141 | 384:4294967295:3011 142 | 385:4294967295:3011 143 | 386:4294967295:3011 144 | 387:4294967295:3011 145 | 388:4294967295:3011 146 | 389:4294967295:3011 147 | 390:4294967295:3011 148 | 391:4294967295:3011 149 | 392:4294967295:3011 150 | 393:4294967295:3011 151 | 394:4294967295:3011 152 | 395:4294967295:3011 153 | 396:4294967295:3011 154 | 397:4294967295:3011 155 | 398:4294967295:3011 156 | 399:4294967295:3011 157 | 400:4294967295:3011 158 | 401:4294967295:3011 159 | 402:4294967295:3011 160 | 403:4294967295:3011 161 | 404:4294967295:3011 162 | 405:4294967295:3011 163 | 406:4294967295:3011 164 | 407:4294967295:3011 165 | 408:4294967295:3011 166 | 409:4294967295:3011 167 | 410:4294967295:3011 168 | 411:4294967295:3011 169 | 412:4294967295:3011 170 | 413:4294967295:3011 171 | 414:4294967295:3011 172 | 415:4294967295:3011 173 | 416:4294967295:3011 174 | 417:4294967295:3011 175 | 418:4294967295:3011 176 | 419:4294967295:3011 177 | 420:4294967295:3011 178 | 421:4294967295:3011 179 | 422:4294967295:3011 180 | 423:4294967295:3011 181 | 424:4294967295:3011 182 | 425:4294967295:3011 183 | 426:4294967295:3011 184 | 427:4294967295:3011 185 | 428:4294967295:3011 186 | 429:4294967295:3011 187 | 430:4294967295:3011 188 | 431:4294967295:3011 189 | 432:4294967295:3011 190 | 433:4294967295:3011 191 | 434:4294967295:3011 192 | 435:4294967295:3011 193 | 436:4294967295:3011 194 | 437:4294967295:3011 195 | 438:4294967295:3011 196 | 439:4294967295:3011 197 | 440:4294967295:3011 198 | 441:4294967295:3011 199 | 442:4294967295:3011 200 | 443:4294967295:3011 201 | 444:4294967295:3011 202 | 445:4294967295:3011 203 | 446:4294967295:3011 204 | 447:4294967295:3011 205 | 448:4294967295:3011 206 | 449:4294967295:3011 207 | 450:4294967295:3011 208 | 451:4294967295:3011 209 | 452:4294967295:3011 210 | 453:4294967295:3011 211 | 454:4294967295:3011 212 | 455:4294967295:3011 213 | 456:4294967295:3011 214 | 457:4294967295:3011 215 | 458:4294967295:3011 216 | 459:4294967295:3011 217 | 460:4294967295:3011 218 | 461:4294967295:3011 219 | 462:4294967295:3011 220 | 463:4294967295:3011 221 | 464:4294967295:3011 222 | 465:4294967295:3011 223 | 466:4294967295:3011 224 | 467:4294967295:3011 225 | 468:4294967295:3011 226 | 469:4294967295:3011 227 | 470:4294967295:3011 228 | 471:4294967295:3011 229 | 472:4294967295:3011 230 | 473:4294967295:3011 231 | 474:4294967295:3011 232 | 475:4294967295:3011 233 | 476:4294967295:3011 234 | 477:4294967295:3011 235 | 478:4294967295:3011 236 | 479:4294967295:3011 237 | 480:4294967295:3011 238 | 481:4294967295:3011 239 | 482:4294967295:3011 240 | 483:4294967295:3011 241 | 484:4294967295:3011 242 | 485:4294967295:3011 243 | 486:4294967295:3011 244 | 487:4294967295:3011 245 | 488:4294967295:3011 246 | 489:4294967295:3011 247 | 490:4294967295:3011 248 | 491:4294967295:3011 249 | 492:4294967295:3011 250 | 493:4294967295:3011 251 | 494:4294967295:3011 252 | 495:4294967295:3011 253 | 496:4294967295:3011 254 | 497:4294967295:3011 255 | 498:4294967295:3011 256 | 499:4294967295:3011 257 | 500:4294967295:3011 258 | 501:4294967295:3011 259 | 502:4294967295:3011 260 | 503:4294967295:3011 261 | 504:4294967295:3011 262 | 505:4294967295:3011 263 | 506:4294967295:3011 264 | 507:4294967295:3011 265 | 508:4294967295:3011 266 | 509:4294967295:3011 267 | 510:4294967295:3011 268 | 511:4294967295:3011 269 | /* Allow RCS service to aquire net_raw permission */ 270 | 18:4294967295:1001:3004 271 | /* Allow QMID service to aquire net_raw permission */ 272 | 3:4294967295:1001:3004 273 | 2:4294967295:1001:3004 274 | 42:4294967295:1001:3004 275 | 18:4294967295:1001:3004 276 | 9:4294967295:1001:3004 277 | 1:4294967295:1001:3004:1000 278 | 4:4294967295:1001:3004 279 | 2797:4294967295:1001:3004 280 | 2808:4294967295:1001:3004:1000 281 | /* DPM */ 282 | 47:4294967295:1001:3004 283 | /* Allow communication to some QMI services with radio privilages */ 284 | /* Format is :: */ 285 | /* PBM */ 286 | 12:4294967295:1001 287 | /* WMS */ 288 | 5:4294967295:1001 289 | /* IMS VT */ 290 | 32:4294967295:1001 291 | /* IMSP */ 292 | 31:4294967295:1001 293 | /* PDC */ 294 | 36:4294967295:1001 295 | /* SAR */ 296 | 17:4294967295:1001 297 | /* RFRPE */ 298 | 41:4294967295:1001 299 | /*UIM*/ 300 | 11:4294967295:1001 301 | /*CAT*/ 302 | 10:4294967295:1001 303 | /*IMSA*/ 304 | 33:4294967295:1001 305 | /* Allow Data dpmd to access QMI DFS */ 306 | 48:4294967295:1000:3004 307 | /* DIAG */ 308 | 4097:4294967295:3009 309 | /* :: */ 310 | 57:4294967295:1000 311 | -------------------------------------------------------------------------------- /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 := \ 7 | system/core/base/include \ 8 | system/core/init 9 | LOCAL_CFLAGS := -Wall 10 | LOCAL_SRC_FILES := init_msm8916.cpp 11 | ifneq ($(TARGET_LIBINIT_MSM8916_DEFINES_FILE),) 12 | LOCAL_SRC_FILES += ../../../../$(TARGET_LIBINIT_MSM8916_DEFINES_FILE) 13 | endif 14 | LOCAL_MODULE := libinit_msm8916 15 | 16 | include $(BUILD_STATIC_LIBRARY) 17 | -------------------------------------------------------------------------------- /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 | #include 36 | 37 | #include "vendor_init.h" 38 | #include "property_service.h" 39 | #include "log.h" 40 | #include "util.h" 41 | 42 | #include "init_msm8916.h" 43 | 44 | __attribute__ ((weak)) 45 | void init_target_properties() 46 | { 47 | } 48 | 49 | static int read_file2(const char *fname, char *data, int max_size) 50 | { 51 | int fd, rc; 52 | 53 | if (max_size < 1) 54 | return 0; 55 | 56 | fd = open(fname, O_RDONLY); 57 | if (fd < 0) { 58 | ERROR("failed to open '%s'\n", fname); 59 | return 0; 60 | } 61 | 62 | rc = read(fd, data, max_size - 1); 63 | if ((rc > 0) && (rc < max_size)) 64 | data[rc] = '\0'; 65 | else 66 | data[0] = '\0'; 67 | close(fd); 68 | 69 | return 1; 70 | } 71 | 72 | static void init_alarm_boot_properties() 73 | { 74 | char const *alarm_file = "/proc/sys/kernel/boot_reason"; 75 | char buf[64]; 76 | std::string tmp = property_get("ro.boot.alarmboot"); 77 | 78 | if (read_file2(alarm_file, buf, sizeof(buf))) { 79 | /* 80 | * Setup ro.alarm_boot value to true when it is RTC triggered boot up 81 | * For existing PMIC chips, the following mapping applies 82 | * for the value of boot_reason: 83 | * 84 | * 0 -> unknown 85 | * 1 -> hard reset 86 | * 2 -> sudden momentary power loss (SMPL) 87 | * 3 -> real time clock (RTC) 88 | * 4 -> DC charger inserted 89 | * 5 -> USB charger insertd 90 | * 6 -> PON1 pin toggled (for secondary PMICs) 91 | * 7 -> CBLPWR_N pin toggled (for external power supply) 92 | * 8 -> KPDPWR_N pin toggled (power key pressed) 93 | */ 94 | if (buf[0] == '3' || tmp == "true") 95 | property_set("ro.alarm_boot", "true"); 96 | else 97 | property_set("ro.alarm_boot", "false"); 98 | } 99 | } 100 | 101 | void vendor_load_properties() 102 | { 103 | init_target_properties(); 104 | init_alarm_boot_properties(); 105 | } 106 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /msm8916.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2016 The CyanogenMod Project 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | # 16 | 17 | # Overlay 18 | DEVICE_PACKAGE_OVERLAYS += $(LOCAL_PATH)/overlay 19 | 20 | # Include package config fragments 21 | include $(LOCAL_PATH)/product/*.mk 22 | -------------------------------------------------------------------------------- /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 | 5 92 | 93 | 94 | true 95 | 96 | 97 | false 98 | 99 | 101 | true 102 | 103 | 104 | true 105 | 106 | 107 | true 108 | 109 | 110 | false 111 | 112 | 113 | true 114 | 115 | 127 | true 128 | 129 | 141 | true 142 | 143 | 144 | true 145 | 146 | 147 | 148 | true 149 | 150 | 151 | false 152 | 153 | 155 | false 156 | 157 | 158 | 160 | 4dp 161 | 162 | 163 | 4 164 | 165 | true 166 | 167 | 3300 168 | 169 | 173 | 174 | lte:2097152,4194304,8388608,262144,524288,1048576 175 | lte_ca:2097152,4194304,8388608,262144,524288,1048576 176 | umts:4094,87380,110208,4096,16384,110208 177 | hspa:4094,87380,1220608,4096,16384,1220608 178 | hsupa:4094,87380,1220608,4096,16384,1220608 179 | hsdpa:4094,87380,2441216,4096,16384,2441216 180 | hspap:4094,87380,1220608,4096,16384,1220608 181 | edge:4093,26280,35040,4096,16384,35040 182 | gprs:4092,8760,11680,4096,8760,11680 183 | evdo:4094,87380,1048576,4096,16384,262144 184 | ehrpd:4094,87380,1048576,4096,16384,262144 185 | 186 | 187 | 189 | 524288,2097152,4194304,262144,524288,1048576 190 | 191 | 192 | -------------------------------------------------------------------------------- /overlay/packages/services/Telephony/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 22 | true 23 | 24 | 25 | true 26 | -------------------------------------------------------------------------------- /product/ant.mk: -------------------------------------------------------------------------------- 1 | PRODUCT_PACKAGES += \ 2 | AntHalService \ 3 | com.dsi.ant.antradio_library \ 4 | libantradio 5 | 6 | # Permissions 7 | PRODUCT_COPY_FILES += \ 8 | external/ant-wireless/antradio-library/com.dsi.ant.antradio_library.xml:system/etc/permissions/com.dsi.ant.antradio_library.xml 9 | -------------------------------------------------------------------------------- /product/audio.mk: -------------------------------------------------------------------------------- 1 | # Audio 2 | PRODUCT_PACKAGES += \ 3 | audio.a2dp.default \ 4 | audio.r_submix.default \ 5 | audio.usb.default \ 6 | tinymix 7 | 8 | PRODUCT_COPY_FILES += \ 9 | frameworks/native/data/etc/android.software.midi.xml:system/etc/permissions/android.software.midi.xml 10 | -------------------------------------------------------------------------------- /product/init.mk: -------------------------------------------------------------------------------- 1 | # Init scripts 2 | PRODUCT_PACKAGES += \ 3 | init.qcom.rc \ 4 | init.qcom.power.rc \ 5 | init.recovery.qcom.rc \ 6 | ueventd.qcom.rc 7 | 8 | ifeq ($(TARGET_BUILD_VARIANT),user) 9 | PRODUCT_PACKAGES += \ 10 | init.qcom.ssr.rc 11 | endif 12 | -------------------------------------------------------------------------------- /product/media.mk: -------------------------------------------------------------------------------- 1 | # Media 2 | PRODUCT_COPY_FILES += \ 3 | frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:system/etc/media_codecs_google_audio.xml \ 4 | frameworks/av/media/libstagefright/data/media_codecs_google_telephony.xml:system/etc/media_codecs_google_telephony.xml \ 5 | frameworks/av/media/libstagefright/data/media_codecs_google_video_le.xml:system/etc/media_codecs_google_video_le.xml \ 6 | frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:system/etc/media_codecs_google_video.xml 7 | 8 | # Properties 9 | PRODUCT_PROPERTY_OVERRIDES += \ 10 | media.aac_51_output_enabled=true 11 | -------------------------------------------------------------------------------- /product/perf.mk: -------------------------------------------------------------------------------- 1 | # Properties 2 | ifeq ($(TARGET_BOARD_PLATFORM_VARIANT),msm8939) 3 | PRODUCT_PROPERTY_OVERRIDES += \ 4 | ro.sys.fw.dex2oat_thread_count=4 5 | endif 6 | 7 | PRODUCT_PROPERTY_OVERRIDES += \ 8 | ro.am.reschedule_service=true \ 9 | ro.config.max_starting_bg=8 10 | -------------------------------------------------------------------------------- /product/qcom-audio.mk: -------------------------------------------------------------------------------- 1 | # Audio 2 | PRODUCT_PACKAGES += \ 3 | audiod \ 4 | audio.primary.msm8916 \ 5 | libqcompostprocbundle \ 6 | libqcomvisualizer \ 7 | libqcomvoiceprocessing 8 | 9 | PRODUCT_COPY_FILES += \ 10 | $(LOCAL_PATH)/audio/audio_effects.conf:system/vendor/etc/audio_effects.conf 11 | 12 | # Properties 13 | PRODUCT_PROPERTY_OVERRIDES += \ 14 | av.streaming.offload.enable=true \ 15 | audio.deep_buffer.media=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 | audio.offload.video=true \ 22 | use.voice.path.for.pcm.voip=true 23 | -------------------------------------------------------------------------------- /product/qcom-bluetooth.mk: -------------------------------------------------------------------------------- 1 | # Init 2 | PRODUCT_PACKAGES += \ 3 | init.qcom.bt.sh 4 | 5 | # Permissions 6 | PRODUCT_COPY_FILES += \ 7 | frameworks/native/data/etc/android.hardware.bluetooth.xml:system/etc/permissions/android.hardware.bluetooth.xml \ 8 | frameworks/native/data/etc/android.hardware.bluetooth_le.xml:system/etc/permissions/android.hardware.bluetooth_le.xml 9 | 10 | # Properties 11 | PRODUCT_PROPERTY_OVERRIDES += \ 12 | qcom.bluetooth.soc=smd \ 13 | ro.bluetooth.dun=true \ 14 | ro.bluetooth.hfp.ver=1.7 \ 15 | ro.bluetooth.sap=true \ 16 | ro.qualcomm.bluetooth.ftp=true \ 17 | ro.qualcomm.bluetooth.hfp=true \ 18 | ro.qualcomm.bluetooth.hsp=true \ 19 | ro.qualcomm.bluetooth.map=true \ 20 | ro.qualcomm.bluetooth.nap=true \ 21 | ro.qualcomm.bluetooth.opp=true \ 22 | ro.qualcomm.bluetooth.pbap=true \ 23 | ro.qualcomm.bt.hci_transport=smd 24 | -------------------------------------------------------------------------------- /product/qcom-display.mk: -------------------------------------------------------------------------------- 1 | # Display 2 | PRODUCT_PACKAGES += \ 3 | copybit.msm8916 \ 4 | gralloc.msm8916 \ 5 | hwcomposer.msm8916 \ 6 | libtinyxml \ 7 | memtrack.msm8916 8 | 9 | # Permissions 10 | ifeq ($(TARGET_BOARD_PLATFORM_VARIANT),msm8939) 11 | PRODUCT_COPY_FILES += \ 12 | frameworks/native/data/etc/android.hardware.opengles.aep.xml:system/etc/permissions/android.hardware.opengles.aep.xml 13 | endif 14 | 15 | # Properties 16 | PRODUCT_PROPERTY_OVERRIDES += \ 17 | debug.composition.type=c2d \ 18 | debug.mdpcomp.idletime=600 \ 19 | persist.hwc.mdpcomp.enable=true \ 20 | persist.hwc.ptor.enable=true \ 21 | debug.enable.sglscale=1 22 | 23 | ifeq ($(TARGET_BOARD_PLATFORM_VARIANT),msm8916) 24 | PRODUCT_PROPERTY_OVERRIDES += \ 25 | ro.opengles.version=196608 26 | else 27 | ifeq ($(TARGET_BOARD_PLATFORM_VARIANT),msm8939) 28 | PRODUCT_PROPERTY_OVERRIDES += \ 29 | ro.opengles.version=196609 30 | endif 31 | endif 32 | -------------------------------------------------------------------------------- /product/qcom-fm.mk: -------------------------------------------------------------------------------- 1 | # FM 2 | PRODUCT_PACKAGES += \ 3 | FMRadio \ 4 | libfmjni 5 | -------------------------------------------------------------------------------- /product/qcom-keystore.mk: -------------------------------------------------------------------------------- 1 | # Keystore 2 | ifneq ($(TARGET_PROVIDES_KEYMASTER),true) 3 | PRODUCT_PACKAGES += \ 4 | keystore.msm8916 5 | endif 6 | -------------------------------------------------------------------------------- /product/qcom-media.mk: -------------------------------------------------------------------------------- 1 | # Media 2 | PRODUCT_PACKAGES += \ 3 | libextmedia_jni \ 4 | libOmxAacEnc \ 5 | libOmxAmrEnc \ 6 | libOmxCore \ 7 | libOmxEvrcEnc \ 8 | libOmxQcelp13Enc \ 9 | libOmxVdec \ 10 | libOmxVenc \ 11 | libstagefrighthw 12 | 13 | ifneq ($(QCPATH),) 14 | PRODUCT_PACKAGES += \ 15 | libOmxVdecHevc 16 | endif 17 | 18 | PRODUCT_COPY_FILES += \ 19 | $(LOCAL_PATH)/configs/media_codecs_$(TARGET_BOARD_PLATFORM_VARIANT).xml:system/etc/media_codecs.xml 20 | 21 | # Properties 22 | PRODUCT_PROPERTY_OVERRIDES += \ 23 | drm.service.enabled=1 \ 24 | vidc.enc.narrow.searchrange=1 25 | -------------------------------------------------------------------------------- /product/qcom-perf.mk: -------------------------------------------------------------------------------- 1 | # IRQ balance 2 | ifeq ($(TARGET_BOARD_PLATFORM_VARIANT),msm8939) 3 | PRODUCT_COPY_FILES += \ 4 | $(LOCAL_PATH)/configs/msm_irqbalance.conf:system/vendor/etc/msm_irqbalance.conf 5 | endif 6 | 7 | # Power HAL 8 | PRODUCT_PACKAGES += \ 9 | power.msm8916 10 | 11 | # Properties 12 | PRODUCT_PROPERTY_OVERRIDES += \ 13 | ro.vendor.extension_library=libqti-perfd-client.so 14 | 15 | ifeq ($(TARGET_BOARD_PLATFORM_VARIANT),msm8916) 16 | PRODUCT_PROPERTY_OVERRIDES += \ 17 | ro.min_freq_0=800000 18 | else 19 | ifeq ($(TARGET_BOARD_PLATFORM_VARIANT),msm8939) 20 | PRODUCT_PROPERTY_OVERRIDES += \ 21 | ro.min_freq_0=960000 \ 22 | ro.min_freq_4=800000 23 | endif 24 | endif 25 | -------------------------------------------------------------------------------- /product/qcom-radio.mk: -------------------------------------------------------------------------------- 1 | # IRSC 2 | PRODUCT_COPY_FILES += \ 3 | $(LOCAL_PATH)/configs/sec_config:system/etc/sec_config 4 | 5 | # Permissions 6 | PRODUCT_COPY_FILES += \ 7 | frameworks/native/data/etc/android.hardware.telephony.gsm.xml:system/etc/permissions/android.hardware.telephony.gsm.xml \ 8 | frameworks/native/data/etc/android.hardware.telephony.cdma.xml:system/etc/permissions/android.hardware.telephony.cdma.xml \ 9 | frameworks/native/data/etc/android.software.sip.voip.xml:system/etc/permissions/android.software.sip.voip.xml 10 | 11 | # Properties 12 | PRODUCT_PROPERTY_OVERRIDES += \ 13 | persist.data.qmi.adb_logmask=0 \ 14 | persist.radio.apm_sim_not_pwdn=1 \ 15 | ro.telephony.call_ring.multiple=false \ 16 | ro.use_data_netmgrd=true 17 | 18 | # RIL 19 | PRODUCT_PACKAGES += \ 20 | libcnefeatureconfig \ 21 | librmnetctl \ 22 | libxml2 23 | -------------------------------------------------------------------------------- /product/qcom-wifi.mk: -------------------------------------------------------------------------------- 1 | # Permissions 2 | PRODUCT_COPY_FILES += \ 3 | frameworks/native/data/etc/android.hardware.wifi.direct.xml:system/etc/permissions/android.hardware.wifi.direct.xml \ 4 | frameworks/native/data/etc/android.hardware.wifi.xml:system/etc/permissions/android.hardware.wifi.xml 5 | 6 | # Properties 7 | PRODUCT_PROPERTY_OVERRIDES += \ 8 | ro.disableWifiApFirmwareReload=true \ 9 | wifi.interface=wlan0 10 | 11 | # Wifi 12 | PRODUCT_PACKAGES += \ 13 | libqsap_sdk \ 14 | libQWiFiSoftApCfg \ 15 | libwcnss_qmi \ 16 | wcnss_service 17 | 18 | PRODUCT_PACKAGES += \ 19 | hostapd \ 20 | wpa_supplicant \ 21 | wpa_supplicant.conf 22 | 23 | PRODUCT_COPY_FILES += \ 24 | $(LOCAL_PATH)/configs/hostapd.accept:system/etc/hostapd/hostapd.accept \ 25 | $(LOCAL_PATH)/configs/hostapd.conf:system/etc/hostapd/hostapd_default.conf \ 26 | $(LOCAL_PATH)/configs/hostapd.deny:system/etc/hostapd/hostapd.deny \ 27 | $(LOCAL_PATH)/configs/p2p_supplicant_overlay.conf:system/etc/wifi/p2p_supplicant_overlay.conf \ 28 | $(LOCAL_PATH)/configs/wpa_supplicant_overlay.conf:system/etc/wifi/wpa_supplicant_overlay.conf 29 | -------------------------------------------------------------------------------- /product/recovery.mk: -------------------------------------------------------------------------------- 1 | # Recovery 2 | PRODUCT_PACKAGES += \ 3 | librecovery_updater_cm 4 | -------------------------------------------------------------------------------- /product/touchscreen.mk: -------------------------------------------------------------------------------- 1 | # Permissions 2 | PRODUCT_COPY_FILES += \ 3 | frameworks/native/data/etc/android.hardware.touchscreen.multitouch.jazzhand.xml:system/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml 4 | -------------------------------------------------------------------------------- /product/usb.mk: -------------------------------------------------------------------------------- 1 | # Init scripts 2 | PRODUCT_PACKAGES += \ 3 | init.qcom.usb.rc 4 | 5 | # Permissions 6 | PRODUCT_COPY_FILES += \ 7 | frameworks/native/data/etc/android.hardware.usb.accessory.xml:system/etc/permissions/android.hardware.usb.accessory.xml 8 | -------------------------------------------------------------------------------- /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.cpp 6 | LOCAL_MODULE := librecovery_updater_cm 7 | LOCAL_MODULE_TAGS := eng 8 | include $(BUILD_STATIC_LIBRARY) 9 | -------------------------------------------------------------------------------- /recovery/recovery_updater.cpp: -------------------------------------------------------------------------------- 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 | #include "updater/install.h" 30 | 31 | #define MAX(a, b) (((a) > (b)) ? (a) : (b)) 32 | 33 | #define ALPHABET_LEN 256 34 | #define KB 1024 35 | 36 | #define TZ_PART_PATH "/dev/block/platform/7824900.sdhci/by-name/tz" 37 | #define TZ_VER_STR "QC_IMAGE_VERSION_STRING=" 38 | #define TZ_VER_STR_LEN 24 39 | #define TZ_VER_BUF_LEN 255 40 | #define TZ_SZ 500 * KB /* MMAP 500K of TZ, TZ partition is 500K */ 41 | 42 | /* Boyer-Moore string search implementation from Wikipedia */ 43 | 44 | /* Return longest suffix length of suffix ending at str[p] */ 45 | static int max_suffix_len(const char *str, size_t str_len, size_t p) { 46 | uint32_t i; 47 | 48 | for (i = 0; (str[p - i] == str[str_len - 1 - i]) && (i < p); ) { 49 | i++; 50 | } 51 | 52 | return i; 53 | } 54 | 55 | /* Generate table of distance between last character of pat and rightmost 56 | * occurrence of character c in pat 57 | */ 58 | static void bm_make_delta1(int *delta1, const char *pat, size_t pat_len) { 59 | uint32_t i; 60 | for (i = 0; i < ALPHABET_LEN; i++) { 61 | delta1[i] = pat_len; 62 | } 63 | for (i = 0; i < pat_len - 1; i++) { 64 | uint8_t idx = (uint8_t) pat[i]; 65 | delta1[idx] = pat_len - 1 - i; 66 | } 67 | } 68 | 69 | /* Generate table of next possible full match from mismatch at pat[p] */ 70 | static void bm_make_delta2(int *delta2, const char *pat, size_t pat_len) { 71 | int p; 72 | uint32_t last_prefix = pat_len - 1; 73 | 74 | for (p = pat_len - 1; p >= 0; p--) { 75 | /* Compare whether pat[p-pat_len] is suffix of pat */ 76 | if (strncmp(pat + p, pat, pat_len - p) == 0) { 77 | last_prefix = p + 1; 78 | } 79 | delta2[p] = last_prefix + (pat_len - 1 - p); 80 | } 81 | 82 | for (p = 0; p < (int) pat_len - 1; p++) { 83 | /* Get longest suffix of pattern ending on character pat[p] */ 84 | int suf_len = max_suffix_len(pat, pat_len, p); 85 | if (pat[p - suf_len] != pat[pat_len - 1 - suf_len]) { 86 | delta2[pat_len - 1 - suf_len] = pat_len - 1 - p + suf_len; 87 | } 88 | } 89 | } 90 | 91 | static char * bm_search(const char *str, size_t str_len, const char *pat, 92 | size_t pat_len) { 93 | int delta1[ALPHABET_LEN]; 94 | int delta2[pat_len]; 95 | int i; 96 | 97 | bm_make_delta1(delta1, pat, pat_len); 98 | bm_make_delta2(delta2, pat, pat_len); 99 | 100 | if (pat_len == 0) { 101 | return (char *) str; 102 | } 103 | 104 | i = pat_len - 1; 105 | while (i < (int) str_len) { 106 | int j = pat_len - 1; 107 | while (j >= 0 && (str[i] == pat[j])) { 108 | i--; 109 | j--; 110 | } 111 | if (j < 0) { 112 | return (char *) (str + i + 1); 113 | } 114 | i += MAX(delta1[(uint8_t) str[i]], delta2[j]); 115 | } 116 | 117 | return NULL; 118 | } 119 | 120 | static int get_tz_version(char *ver_str, size_t len) { 121 | int ret = 0; 122 | int fd; 123 | char *tz_data = NULL; 124 | char *offset = NULL; 125 | 126 | fd = open(TZ_PART_PATH, O_RDONLY); 127 | if (fd < 0) { 128 | ret = errno; 129 | goto err_ret; 130 | } 131 | 132 | tz_data = (char *) mmap(NULL, TZ_SZ, PROT_READ, MAP_PRIVATE, fd, 0); 133 | if (tz_data == (char *)-1) { 134 | ret = errno; 135 | goto err_fd_close; 136 | } 137 | 138 | /* Do Boyer-Moore search across TZ data */ 139 | offset = bm_search(tz_data, TZ_SZ, TZ_VER_STR, TZ_VER_STR_LEN); 140 | if (offset != NULL) { 141 | strncpy(ver_str, offset + TZ_VER_STR_LEN, len); 142 | } else { 143 | ret = -ENOENT; 144 | } 145 | 146 | munmap(tz_data, TZ_SZ); 147 | err_fd_close: 148 | close(fd); 149 | err_ret: 150 | return ret; 151 | } 152 | 153 | /* verify_trustzone("TZ_VERSION", "TZ_VERSION", ...) */ 154 | Value * VerifyTrustZoneFn(const char *name, State *state, int argc, Expr *argv[]) { 155 | char current_tz_version[TZ_VER_BUF_LEN]; 156 | char *tz_version; 157 | int i, ret; 158 | 159 | ret = get_tz_version(current_tz_version, TZ_VER_BUF_LEN); 160 | if (ret) { 161 | return ErrorAbort(state, "%s() failed to read current TZ version: %d", 162 | name, ret); 163 | } 164 | 165 | for (i = 1; i <= argc; i++) { 166 | ret = ReadArgs(state, argv, i, &tz_version); 167 | if (ret < 0) { 168 | return ErrorAbort(state, "%s() error parsing arguments: %d", 169 | name, ret); 170 | } 171 | 172 | uiPrintf(state, "Comparing TZ version %s to %s", 173 | tz_version, current_tz_version); 174 | if (strncmp(tz_version, current_tz_version, strlen(tz_version)) == 0) { 175 | return StringValue(strdup("1")); 176 | } 177 | } 178 | 179 | return StringValue(strdup("0")); 180 | } 181 | 182 | void Register_librecovery_updater_cm() { 183 | RegisterFunction("cm.verify_trustzone", VerifyTrustZoneFn); 184 | } 185 | -------------------------------------------------------------------------------- /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_$(TARGET_BOARD_PLATFORM_VARIANT).rc 27 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) 28 | include $(BUILD_PREBUILT) 29 | 30 | include $(CLEAR_VARS) 31 | LOCAL_MODULE := init.qcom.ssr.rc 32 | LOCAL_MODULE_TAGS := optional eng 33 | LOCAL_MODULE_CLASS := ETC 34 | LOCAL_SRC_FILES := etc/init.qcom.ssr.rc 35 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) 36 | include $(BUILD_PREBUILT) 37 | 38 | include $(CLEAR_VARS) 39 | LOCAL_MODULE := init.qcom.usb.rc 40 | LOCAL_MODULE_TAGS := optional eng 41 | LOCAL_MODULE_CLASS := ETC 42 | LOCAL_SRC_FILES := etc/init.qcom.usb.rc 43 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) 44 | include $(BUILD_PREBUILT) 45 | 46 | # Copy the power config for recovery too 47 | include $(CLEAR_VARS) 48 | LOCAL_MODULE := init.recovery.qcom.rc 49 | LOCAL_MODULE_TAGS := optional eng 50 | LOCAL_MODULE_CLASS := ETC 51 | LOCAL_SRC_FILES := etc/init.qcom.power_$(TARGET_BOARD_PLATFORM_VARIANT).rc 52 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) 53 | include $(BUILD_PREBUILT) 54 | 55 | include $(CLEAR_VARS) 56 | LOCAL_MODULE := ueventd.qcom.rc 57 | LOCAL_MODULE_TAGS := optional eng 58 | LOCAL_MODULE_CLASS := ETC 59 | LOCAL_SRC_FILES := etc/ueventd.qcom.rc 60 | LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT) 61 | include $(BUILD_PREBUILT) 62 | -------------------------------------------------------------------------------- /rootdir/etc/init.qcom.bt.sh: -------------------------------------------------------------------------------- 1 | #!/system/bin/sh 2 | # Copyright (c) 2009-2016, 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 | LOG_TAG="qcom-bluetooth" 30 | LOG_NAME="${0}:" 31 | 32 | loge () 33 | { 34 | /system/bin/log -t $LOG_TAG -p e "$LOG_NAME $@" 35 | } 36 | 37 | logi () 38 | { 39 | /system/bin/log -t $LOG_TAG -p i "$LOG_NAME $@" 40 | } 41 | 42 | failed () 43 | { 44 | loge "$1: exit code $2" 45 | exit $2 46 | } 47 | 48 | # BR/EDR & LE power class configurations 49 | POWER_CLASS=`getprop qcom.bt.dev_power_class` 50 | LE_POWER_CLASS=`getprop qcom.bt.le_dev_pwr_class` 51 | 52 | setprop bluetooth.status off 53 | 54 | case $POWER_CLASS in 55 | 1) PWR_CLASS="-p 0" ; 56 | logi "Power Class: 1";; 57 | 2) PWR_CLASS="-p 1" ; 58 | logi "Power Class: 2";; 59 | 3) PWR_CLASS="-p 2" ; 60 | logi "Power Class: CUSTOM";; 61 | *) PWR_CLASS=""; 62 | logi "Power Class: Ignored. Default(1) used (1-CLASS1/2-CLASS2/3-CUSTOM)"; 63 | logi "Power Class: To override, Before turning BT ON; setprop qcom.bt.dev_power_class <1 or 2 or 3>";; 64 | esac 65 | 66 | case $LE_POWER_CLASS in 67 | 1) LE_PWR_CLASS="-P 0" ; 68 | logi "LE Power Class: 1";; 69 | 2) LE_PWR_CLASS="-P 1" ; 70 | logi "LE Power Class: 2";; 71 | 3) LE_PWR_CLASS="-P 2" ; 72 | logi "LE Power Class: CUSTOM";; 73 | *) LE_PWR_CLASS="-P 1"; 74 | logi "LE Power Class: Ignored. Default(2) used (1-CLASS1/2-CLASS2/3-CUSTOM)"; 75 | logi "LE Power Class: To override, Before turning BT ON; setprop qcom.bt.le_dev_pwr_class <1 or 2 or 3>";; 76 | esac 77 | 78 | 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") 79 | 80 | case $exit_code_hci_qcomm_init in 81 | 0) logi "Bluetooth QSoC firmware download succeeded, $BTS_DEVICE $BTS_TYPE $BTS_BAUD $BTS_ADDRESS";; 82 | *) failed "Bluetooth QSoC firmware download failed" $exit_code_hci_qcomm_init; 83 | 84 | setprop bluetooth.status off 85 | 86 | exit $exit_code_hci_qcomm_init;; 87 | esac 88 | 89 | setprop bluetooth.status on 90 | 91 | exit 0 92 | -------------------------------------------------------------------------------- /rootdir/etc/init.qcom.power_msm8916.rc: -------------------------------------------------------------------------------- 1 | on enable-low-power 2 | # HMP scheduler load tracking settings 3 | write /proc/sys/kernel/sched_window_stats_policy 3 4 | write /proc/sys/kernel/sched_ravg_hist_size 3 5 | 6 | # HMP Task packing settings for 8916 7 | write /proc/sys/kernel/sched_small_task 20 8 | write /proc/sys/kernel/sched_mostly_idle_load 30 9 | write /proc/sys/kernel/sched_mostly_idle_nr_run 3 10 | 11 | # disable thermal core_control to update interactive governor settings 12 | write /sys/module/msm_thermal/core_control/enabled 0 13 | 14 | # enable governor 15 | write /sys/devices/system/cpu/cpu0/online 1 16 | write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "interactive" 17 | write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 800000 18 | # enable thermal core_control now 19 | write /sys/module/msm_thermal/core_control/enabled 1 20 | 21 | write /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay "25000 1094400:50000" 22 | write /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load 90 23 | write /sys/devices/system/cpu/cpufreq/interactive/timer_rate 30000 24 | write /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq 998400 25 | write /sys/devices/system/cpu/cpufreq/interactive/io_is_busy 0 26 | write /sys/devices/system/cpu/cpufreq/interactive/target_loads "1 800000:85 998400:90 1094400:80" 27 | write /sys/devices/system/cpu/cpufreq/interactive/min_sample_time 50000 28 | write /sys/devices/system/cpu/cpufreq/interactive/max_freq_hysteresis 50000 29 | 30 | # bring all CPUs online 31 | write /sys/devices/system/cpu/cpu1/online 1 32 | write /sys/devices/system/cpu/cpu2/online 1 33 | write /sys/devices/system/cpu/cpu3/online 1 34 | 35 | # Enable low power modes 36 | write /sys/module/lpm_levels/parameters/sleep_disabled 0 37 | 38 | # Set RPS mask 39 | write /sys/class/net/rmnet0/queues/rx-0/rps_cpus 2 40 | 41 | # Update foreground and background cpusets 42 | # Reserve CPU 3 for the top app 43 | write /dev/cpuset/foreground/cpus 0-2 44 | write /dev/cpuset/foreground/boost/cpus 0-3 45 | write /dev/cpuset/background/cpus 0 46 | write /dev/cpuset/system-background/cpus 0-1 47 | write /dev/cpuset/top-app/cpus 0-3 48 | 49 | rm /data/system/perfd/default_values 50 | start perfd 51 | 52 | on charger 53 | write /sys/module/lpm_levels/parameters/sleep_disabled 0 54 | write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "powersave" 55 | 56 | on class_start:late_start 57 | trigger enable-low-power 58 | 59 | on property:init.svc.recovery=running 60 | trigger enable-low-power 61 | 62 | on property:dev.bootcomplete=1 63 | setprop sys.io.scheduler bfq 64 | -------------------------------------------------------------------------------- /rootdir/etc/init.qcom.power_msm8939.rc: -------------------------------------------------------------------------------- 1 | on enable-low-power 2 | write /proc/sys/kernel/sched_boost 1 3 | 4 | # RPS mask 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 | 68 | # Enable low power modes 69 | write /sys/module/lpm_levels/parameters/sleep_disabled 0 70 | 71 | # Update foreground and background cpusets 72 | # Reserve CPU 7 for the top app 73 | write /dev/cpuset/foreground/cpus 0-6 74 | write /dev/cpuset/foreground/boost/cpus 0-3 75 | write /dev/cpuset/background/cpus 4 76 | write /dev/cpuset/system-background/cpus 4-6 77 | write /dev/cpuset/top-app/cpus 0-7 78 | 79 | # Per-process reclaim 80 | write /sys/module/process_reclaim/parameters/enable_process_reclaim 1 81 | write /sys/module/process_reclaim/parameters/pressure_min 10 82 | write /sys/module/process_reclaim/parameters/per_swap_size 1024 83 | write /sys/module/process_reclaim/parameters/pressure_max 70 84 | write /sys/module/process_reclaim/parameters/swap_opt_eff 30 85 | 86 | rm /data/system/perfd/default_values 87 | start perfd 88 | 89 | on charger 90 | write /sys/module/lpm_levels/parameters/sleep_disabled 0 91 | write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "powersave" 92 | 93 | on class_start:late_start 94 | trigger enable-low-power 95 | 96 | on property:init.svc.recovery=running 97 | trigger enable-low-power 98 | 99 | on property:dev.bootcomplete=1 100 | setprop sys.io.scheduler bfq 101 | -------------------------------------------------------------------------------- /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.ssr.rc 30 | import init.qcom.usb.rc 31 | import init.target.rc 32 | 33 | on early-init 34 | mkdir /firmware 0771 system system 35 | mkdir /system 0777 root root 36 | symlink /data/tombstones /tombstones 37 | 38 | mount debugfs debugfs /sys/kernel/debug 39 | chmod 0755 /sys/kernel/debug 40 | 41 | # Turn off backlight on blank 42 | write /sys/class/leds/lcd-backlight/trigger "backlight" 43 | 44 | on init 45 | # Set permissions for persist partition 46 | mkdir /persist 0771 system system 47 | 48 | symlink /sdcard /storage/sdcard0 49 | 50 | on fs 51 | mount_all fstab.qcom 52 | mkdir /persist/data 0700 system system 53 | restorecon_recursive /persist 54 | 55 | # msm specific files that need to be created on /data 56 | on post-fs-data 57 | 58 | mkdir /data/fdAlbum 0770 camera camera 59 | mkdir /data/misc/camera 0770 camera camera 60 | 61 | #Create PERFD deamon related dirs 62 | mkdir /data/misc/perfd 0770 root system 63 | chmod 2770 /data/misc/perfd 64 | mkdir /data/misc/perfd 0755 root system 65 | chmod 2755 /data/misc/perfd 66 | mkdir /data/system/perfd 0770 root system 67 | chmod 2770 /data/system/perfd 68 | 69 | # NFC local data and nfcee xml storage 70 | mkdir /data/nfc 0770 nfc nfc 71 | mkdir /data/nfc/param 0770 nfc nfc 72 | 73 | mkdir /data/tombstones 0771 system system 74 | mkdir /tombstones/modem 0771 system system 75 | mkdir /tombstones/lpass 0771 system system 76 | mkdir /tombstones/wcnss 0771 system system 77 | mkdir /tombstones/dsps 0771 system system 78 | 79 | mkdir /persist/data/sfs 0700 system system 80 | mkdir /persist/data/tz 0700 system system 81 | 82 | mkdir /data/misc/bluetooth 0770 bluetooth bluetooth 83 | 84 | # Create the directories used by the Wireless subsystem 85 | mkdir /data/misc/wifi 0770 wifi wifi 86 | mkdir /data/misc/wifi/sockets 0770 wifi wifi 87 | mkdir /data/misc/wifi/wpa_supplicant 0770 wifi wifi 88 | mkdir /data/misc/dhcp 0770 dhcp dhcp 89 | chown dhcp dhcp /data/misc/dhcp 90 | 91 | # Create the directories used by CnE subsystem 92 | mkdir /data/connectivity 0771 system system 93 | mkdir /data/connectivity/nsrm 0771 system system 94 | 95 | # Create the directories used by DPM subsystem 96 | mkdir /data/dpm 0771 system system 97 | mkdir /data/dpm/fdMgr 0771 system system 98 | mkdir /data/dpm/nsrm 0771 system system 99 | 100 | # Create directory used by audio subsystem 101 | mkdir /data/misc/audio 0770 audio audio 102 | restorecon_recursive /data/misc/audio 103 | 104 | # Create directory used by the DASH client 105 | mkdir /data/misc/dash 0770 media audio 106 | 107 | # Mounting of persist is moved to 'on emmc-fs' and 'on fs' sections 108 | # We chown/chmod /persist again so because mount is run as root + defaults 109 | chown system system /persist 110 | chmod 0771 /persist 111 | chmod 0664 /sys/devices/platform/msm_sdcc.1/polling 112 | chmod 0664 /sys/devices/platform/msm_sdcc.2/polling 113 | chmod 0664 /sys/devices/platform/msm_sdcc.3/polling 114 | chmod 0664 /sys/devices/platform/msm_sdcc.4/polling 115 | 116 | # Chown polling nodes as needed from UI running on system server 117 | chown system system /sys/devices/platform/msm_sdcc.1/polling 118 | chown system system /sys/devices/platform/msm_sdcc.2/polling 119 | chown system system /sys/devices/platform/msm_sdcc.3/polling 120 | chown system system /sys/devices/platform/msm_sdcc.4/polling 121 | 122 | #Create the symlink to qcn wpa_supplicant folder for ar6000 wpa_supplicant 123 | mkdir /data/system 0775 system system 124 | #symlink /data/misc/wifi/wpa_supplicant /data/system/wpa_supplicant 125 | 126 | #Create directories for Location services 127 | mkdir /data/misc/location 0770 gps gps 128 | mkdir /data/misc/location/mq 0770 gps gps 129 | mkdir /data/misc/location/xtwifi 0770 gps gps 130 | mkdir /data/misc/location/gpsone_d 0770 system gps 131 | mkdir /data/misc/location/quipc 0770 gps system 132 | mkdir /data/misc/location/gsiff 0770 gps gps 133 | 134 | #Create directory from IMS services 135 | mkdir /data/shared 0755 136 | chown system system /data/shared 137 | 138 | #Create directory for FOTA 139 | mkdir /data/fota 0771 140 | chown system system /data/fota 141 | 142 | #Create directory for hostapd 143 | mkdir /data/hostapd 0770 system wifi 144 | 145 | # Create /data/time folder for time-services 146 | mkdir /data/time/ 0700 system system 147 | restorecon_recursive /data/time 148 | 149 | mkdir /data/audio/ 0770 media audio 150 | 151 | setprop vold.post_fs_data_done 1 152 | 153 | #Create a folder for SRS to be able to create a usercfg file 154 | mkdir /data/data/media 0770 media media 155 | 156 | mkdir /data/diag_logs 0777 system system 157 | 158 | on early-boot 159 | # set RLIMIT_MEMLOCK to 64MB 160 | setrlimit 8 67108864 67108864 161 | # Allow subsystem (modem etc) debugging 162 | write /sys/module/subsystem_restart/parameters/enable_debug ${persist.sys.ssr.enable_debug} 163 | write /sys/module/pil_msa/parameters/pbl_mba_boot_timeout_ms ${persist.sys.mba_boot_timeout} 164 | write /sys/module/pil_msa/parameters/modem_auth_timeout_ms ${persist.sys.modem_auth_timeout} 165 | write /sys/module/peripheral_loader/parameters/proxy_timeout_ms ${persist.sys.pil_proxy_timeout} 166 | write /sys/kernel/boot_adsp/boot 1 167 | 168 | on boot 169 | chown bluetooth bluetooth /sys/module/bluetooth_power/parameters/power 170 | chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type 171 | chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state 172 | chown bluetooth bluetooth /proc/bluetooth/sleep/proto 173 | chown bluetooth bluetooth /sys/module/hci_uart/parameters/ath_lpm 174 | chown bluetooth bluetooth /sys/module/hci_uart/parameters/ath_btwrite 175 | chown system system /sys/module/sco/parameters/disable_esco 176 | chown bluetooth bluetooth /sys/module/hci_smd/parameters/hcismd_set 177 | chmod 0660 /sys/module/bluetooth_power/parameters/power 178 | chmod 0660 /sys/module/hci_smd/parameters/hcismd_set 179 | chmod 0660 /sys/class/rfkill/rfkill0/state 180 | chmod 0660 /proc/bluetooth/sleep/proto 181 | chown bluetooth bluetooth /dev/ttyHS0 182 | chmod 0660 /sys/module/hci_uart/parameters/ath_lpm 183 | chmod 0660 /sys/module/hci_uart/parameters/ath_btwrite 184 | chmod 0660 /dev/ttyHS0 185 | chown bluetooth bluetooth /sys/devices/platform/msm_serial_hs.0/clock 186 | chmod 0660 /sys/devices/platform/msm_serial_hs.0/clock 187 | 188 | chmod 0660 /dev/ttyHS2 189 | chown bluetooth bluetooth /dev/ttyHS2 190 | 191 | #Create QMUX deamon socket area 192 | mkdir /dev/socket/qmux_radio 0770 radio radio 193 | chmod 2770 /dev/socket/qmux_radio 194 | mkdir /dev/socket/qmux_audio 0770 media audio 195 | chmod 2770 /dev/socket/qmux_audio 196 | mkdir /dev/socket/qmux_bluetooth 0770 bluetooth bluetooth 197 | chmod 2770 /dev/socket/qmux_bluetooth 198 | mkdir /dev/socket/qmux_gps 0770 gps gps 199 | chmod 2770 /dev/socket/qmux_gps 200 | 201 | #Create NETMGR daemon socket area 202 | mkdir /dev/socket/netmgr 0750 radio radio 203 | 204 | chmod 0444 /sys/devices/platform/msm_hsusb/gadget/usb_state 205 | 206 | #For bridgemgr daemon to inform the USB driver of the correct transport 207 | chown radio radio /sys/class/android_usb/f_rmnet_smd_sdio/transport 208 | 209 | # Assign TCP buffer thresholds to be ceiling value of technology maximums 210 | # Increased technology maximums should be reflected here. 211 | write /proc/sys/net/core/rmem_max 8388608 212 | write /proc/sys/net/core/wmem_max 8388608 213 | 214 | #To allow interfaces to get v6 address when tethering is enabled 215 | write /proc/sys/net/ipv6/conf/rmnet0/accept_ra 2 216 | write /proc/sys/net/ipv6/conf/rmnet1/accept_ra 2 217 | write /proc/sys/net/ipv6/conf/rmnet2/accept_ra 2 218 | write /proc/sys/net/ipv6/conf/rmnet3/accept_ra 2 219 | write /proc/sys/net/ipv6/conf/rmnet4/accept_ra 2 220 | write /proc/sys/net/ipv6/conf/rmnet5/accept_ra 2 221 | write /proc/sys/net/ipv6/conf/rmnet6/accept_ra 2 222 | write /proc/sys/net/ipv6/conf/rmnet7/accept_ra 2 223 | write /proc/sys/net/ipv6/conf/rmnet_sdio0/accept_ra 2 224 | write /proc/sys/net/ipv6/conf/rmnet_sdio1/accept_ra 2 225 | write /proc/sys/net/ipv6/conf/rmnet_sdio2/accept_ra 2 226 | write /proc/sys/net/ipv6/conf/rmnet_sdio3/accept_ra 2 227 | write /proc/sys/net/ipv6/conf/rmnet_sdio4/accept_ra 2 228 | write /proc/sys/net/ipv6/conf/rmnet_sdio5/accept_ra 2 229 | write /proc/sys/net/ipv6/conf/rmnet_sdio6/accept_ra 2 230 | write /proc/sys/net/ipv6/conf/rmnet_sdio7/accept_ra 2 231 | write /proc/sys/net/ipv6/conf/rmnet_usb0/accept_ra 2 232 | write /proc/sys/net/ipv6/conf/rmnet_usb1/accept_ra 2 233 | write /proc/sys/net/ipv6/conf/rmnet_usb2/accept_ra 2 234 | write /proc/sys/net/ipv6/conf/rmnet_usb3/accept_ra 2 235 | 236 | # To prevent out of order acknowledgements from making 237 | # connection tracking to treat them as not belonging to 238 | # the connection they belong to. 239 | # Otherwise, a weird issue happens in which some long 240 | # connections on high-throughput links get dropped when 241 | # an ack packet comes out of order 242 | write /proc/sys/net/netfilter/nf_conntrack_tcp_be_liberal 1 243 | 244 | # Set the console loglevel to < KERN_INFO 245 | # Set the default message loglevel to KERN_INFO 246 | write /proc/sys/kernel/printk "6 6 1 7" 247 | 248 | # Allow access for CCID command/response timeout configuration 249 | chown system system /sys/module/ccid_bridge/parameters/bulk_msg_timeout 250 | 251 | # camera sockets 252 | mkdir /data/misc/camera 0770 camera camera 253 | 254 | # Create directory used by display clients 255 | mkdir /data/misc/display 0770 system graphics 256 | mkdir /persist/display 0770 system graphics 257 | 258 | # Graphics node permissions 259 | chmod 0664 /sys/class/graphics/fb0/dyn_pu 260 | chmod 0664 /sys/class/graphics/fb0/dynamic_fps 261 | chmod 0664 /sys/class/graphics/fb0/idle_time 262 | chmod 0664 /sys/class/graphics/fb0/mode 263 | chmod 0664 /sys/class/graphics/fb0/modes 264 | 265 | chown system graphics /sys/class/graphics/fb0/dyn_pu 266 | chown system graphics /sys/class/graphics/fb0/dynamic_fps 267 | chown system graphics /sys/class/graphics/fb0/idle_time 268 | chown system graphics /sys/class/graphics/fb0/mode 269 | chown system graphics /sys/class/graphics/fb0/modes 270 | 271 | on property:bluetooth.isEnabled=true 272 | write /sys/class/bluetooth/hci0/idle_timeout 7000 273 | 274 | on property:vold.decrypt=trigger_restart_framework 275 | start config_bt_addr 276 | 277 | on property:persist.env.fastdorm.enabled=true 278 | setprop persist.radio.data_no_toggle 1 279 | 280 | service irsc_util /system/bin/irsc_util "/etc/sec_config" 281 | class main 282 | user root 283 | oneshot 284 | 285 | service rmt_storage /system/bin/rmt_storage 286 | class core 287 | user root 288 | 289 | service rfs_access /system/bin/rfs_access 290 | class core 291 | user system 292 | group system net_raw 293 | 294 | service config_bt_addr /system/bin/btnvtool -O 295 | class core 296 | user bluetooth 297 | group bluetooth radio 298 | oneshot 299 | 300 | service cnd /system/bin/cnd 301 | class late_start 302 | socket cnd stream 660 root inet 303 | 304 | service dpmd /system/bin/dpmd 305 | class main 306 | socket dpmd stream 660 root system 307 | 308 | service hciattach /system/bin/sh /system/etc/init.qcom.bt.sh 309 | class late_start 310 | user bluetooth 311 | group bluetooth net_bt_admin 312 | disabled 313 | seclabel u:r:bluetooth_loader:s0 314 | oneshot 315 | 316 | on property:bluetooth.hciattach=true 317 | start hciattach 318 | 319 | # FM 320 | on property:hw.fm.init=0 321 | write /sys/module/radio_iris_transport/parameters/fmsmd_set 0 322 | 323 | on property:hw.fm.init=1 324 | write /sys/module/radio_iris_transport/parameters/fmsmd_set 1 325 | 326 | # QMUX must be in multiple groups to support external process connections 327 | service qmuxd /system/bin/qmuxd 328 | class main 329 | user root 330 | group radio audio bluetooth gps qcom_diag 331 | 332 | service msm_irqbalance /system/bin/msm_irqbalance -f /system/vendor/etc/msm_irqbalance.conf 333 | class core 334 | user root 335 | group root 336 | writepid /dev/cpuset/system-background/tasks 337 | 338 | service netmgrd /system/bin/netmgrd 339 | class main 340 | 341 | on property:ro.use_data_netmgrd=false 342 | # netmgr not supported on specific target 343 | stop netmgrd 344 | 345 | # Adjust socket buffer to enlarge TCP receive window for high bandwidth 346 | # but only if ro.data.large_tcp_window_size property is set. 347 | on property:ro.data.large_tcp_window_size=true 348 | write /proc/sys/net/ipv4/tcp_adv_win_scale 2 349 | 350 | service p2p_supplicant /system/bin/wpa_supplicant \ 351 | -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \ 352 | -I/system/etc/wifi/p2p_supplicant_overlay.conf -N \ 353 | -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ 354 | -I/system/etc/wifi/wpa_supplicant_overlay.conf \ 355 | -O/data/misc/wifi/sockets -puse_p2p_group_interface=1 \ 356 | -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0 357 | # we will start as root and wpa_supplicant will switch to user wifi 358 | # after setting up the capabilities required for WEXT 359 | # user wifi 360 | # group wifi inet keystore 361 | class main 362 | socket wpa_wlan0 dgram 660 wifi wifi 363 | disabled 364 | oneshot 365 | 366 | service wpa_supplicant /system/bin/wpa_supplicant \ 367 | -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ 368 | -I/system/etc/wifi/wpa_supplicant_overlay.conf \ 369 | -O/data/misc/wifi/sockets \ 370 | -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0 371 | # we will start as root and wpa_supplicant will switch to user wifi 372 | # after setting up the capabilities required for WEXT 373 | # user wifi 374 | # group wifi inet keystore 375 | class main 376 | socket wpa_wlan0 dgram 660 wifi wifi 377 | disabled 378 | oneshot 379 | 380 | service loc_launcher /system/bin/loc_launcher 381 | #loc_launcher will start as root and set its uid to gps 382 | class late_start 383 | group gps inet net_raw qcom_diag net_admin wifi 384 | 385 | service hostapd /system/bin/hostapd -dd /data/hostapd/hostapd.conf 386 | class late_start 387 | user root 388 | group root 389 | oneshot 390 | disabled 391 | 392 | on property:ro.data.large_tcp_window_size=true 393 | # Adjust socket buffer to enlarge TCP receive window for high bandwidth (e.g. DO-RevB) 394 | write /proc/sys/net/ipv4/tcp_adv_win_scale 2 395 | 396 | service ril-daemon1 /system/bin/rild -c 2 397 | class main 398 | socket rild2 stream 660 root radio 399 | socket rild-debug2 stream 660 radio system 400 | user root 401 | group radio cache inet misc audio sdcard_r sdcard_rw diag qcom_diag log 402 | 403 | service charger /charger 404 | class charger 405 | group log 406 | seclabel u:r:healthd:s0 407 | 408 | service ssr_diag /system/bin/ssr_diag 409 | class late_start 410 | user system 411 | group system 412 | 413 | service hvdcp /system/bin/hvdcp 414 | class core 415 | user root 416 | disabled 417 | 418 | on property:persist.usb.hvdcp.detect=true 419 | start hvdcp 420 | 421 | on property:persist.usb.hvdcp.detect=false 422 | stop hvdcp 423 | 424 | #start camera server as daemon 425 | service qcamerasvr /system/bin/mm-qcamera-daemon 426 | class late_start 427 | user camera 428 | group camera system inet input graphics 429 | writepid /dev/cpuset/system-background/tasks 430 | 431 | # Allow usb charging to be disabled peristently 432 | on property:persist.usb.chgdisabled=1 433 | write /sys/class/power_supply/battery/charging_enabled 0 434 | 435 | on property:persist.usb.chgdisabled=0 436 | write /sys/class/power_supply/battery/charging_enabled 1 437 | 438 | service qseecomd /system/bin/qseecomd 439 | class core 440 | user root 441 | group root 442 | 443 | service perfd /vendor/bin/perfd 444 | class main 445 | user root 446 | group root readproc 447 | disabled 448 | writepid /dev/cpuset/system-background/tasks 449 | 450 | service thermal-engine /vendor/bin/thermal-engine 451 | class main 452 | user root 453 | group root 454 | 455 | service time_daemon /system/bin/time_daemon 456 | class late_start 457 | user root 458 | group root 459 | 460 | service audiod /system/bin/audiod 461 | class late_start 462 | user system 463 | group system 464 | 465 | service ppd /system/bin/mm-pp-daemon 466 | class late_start 467 | disabled 468 | user system 469 | socket pps stream 0660 system system 470 | group system graphics 471 | 472 | on property:init.svc.surfaceflinger=stopped 473 | stop ppd 474 | 475 | on property:init.svc.surfaceflinger=running 476 | start ppd 477 | 478 | service wcnss-service /system/bin/wcnss_service 479 | class main 480 | user system 481 | group system wifi radio 482 | oneshot 483 | -------------------------------------------------------------------------------- /rootdir/etc/init.qcom.ssr.rc: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2016 The CyanogenMod Project 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | on boot 16 | # Subsystem Restart 17 | # Venus 18 | write /sys/bus/msm_subsys/devices/subsys0/restart_level "related" 19 | # WCNSS 20 | write /sys/bus/msm_subsys/devices/subsys1/restart_level "related" 21 | # Modem 22 | write /sys/bus/msm_subsys/devices/subsys2/restart_level "related" 23 | -------------------------------------------------------------------------------- /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 | # the DIAG device node is not world writable/readable. 31 | /dev/diag 0660 system qcom_diag 32 | 33 | /dev/genlock 0666 system system 34 | /dev/kgsl 0666 system system 35 | /dev/kgsl-3d0 0666 system system 36 | /dev/kgsl-2d0 0666 root root 37 | /dev/kgsl-2d1 0666 root root 38 | /dev/ion 0664 system system 39 | /dev/rtc0 0600 system system 40 | /dev/smd0 0660 system system 41 | /dev/smd4 0660 system system 42 | /dev/smd_cxm_qmi 0640 radio radio 43 | /dev/smd5 0660 system system 44 | /dev/smd6 0660 system system 45 | /dev/smd7 0660 bluetooth bluetooth 46 | /dev/ccid_bridge 0660 system system 47 | 48 | #permissions for CSVT 49 | /dev/smd11 0660 radio radio 50 | 51 | /dev/rfcomm0 0660 bluetooth bluetooth 52 | /dev/ttyUSB0 0660 bluetooth bluetooth 53 | /dev/smdcntl0 0640 radio radio 54 | /dev/smdcntl1 0640 radio radio 55 | /dev/smdcntl2 0640 radio radio 56 | /dev/smdcntl3 0640 radio radio 57 | /dev/smdcntl4 0640 radio radio 58 | /dev/smdcntl5 0640 radio radio 59 | /dev/smdcntl6 0640 radio radio 60 | /dev/smdcntl7 0640 radio radio 61 | /dev/smdcnt_rev0 0640 radio radio 62 | /dev/smdcnt_rev1 0640 radio radio 63 | /dev/smdcnt_rev2 0640 radio radio 64 | /dev/smdcnt_rev3 0640 radio radio 65 | /dev/smdcnt_rev4 0640 radio radio 66 | /dev/smdcnt_rev5 0640 radio radio 67 | /dev/smdcnt_rev6 0640 radio radio 68 | /dev/smdcnt_rev7 0640 radio radio 69 | /dev/smdcnt_rev8 0640 radio radio 70 | /dev/smuxctl32 0640 radio radio 71 | /dev/sdioctl0 0640 radio radio 72 | /dev/sdioctl1 0640 radio radio 73 | /dev/sdioctl2 0640 radio radio 74 | /dev/sdioctl3 0640 radio radio 75 | /dev/sdioctl4 0640 radio radio 76 | /dev/sdioctl5 0640 radio radio 77 | /dev/sdioctl6 0640 radio radio 78 | /dev/sdioctl7 0640 radio radio 79 | /dev/sdioctl8 0640 radio radio 80 | /dev/rmnet_mux_ctrl 0640 radio radio 81 | /dev/hsicctl0 0640 radio radio 82 | /dev/hsicctl1 0640 radio radio 83 | /dev/hsicctl2 0640 radio radio 84 | /dev/hsicctl3 0640 radio radio 85 | /dev/hsicctl4 0640 radio radio 86 | /dev/hsicctl5 0640 radio radio 87 | /dev/hsicctl6 0640 radio radio 88 | /dev/hsicctl7 0640 radio radio 89 | /dev/hsicctl8 0640 radio radio 90 | /dev/hsicctl9 0640 radio radio 91 | /dev/hsicctl10 0640 radio radio 92 | /dev/hsicctl11 0640 radio radio 93 | /dev/hsicctl12 0640 radio radio 94 | /dev/hsicctl13 0640 radio radio 95 | /dev/hsicctl14 0640 radio radio 96 | /dev/hsicctl15 0640 radio radio 97 | /dev/hsicctl16 0640 radio radio 98 | /dev/mhi_pipe_14 0640 radio radio 99 | /dev/mhi_pipe_16 0640 radio radio 100 | /dev/mhi_pipe_32 0640 radio radio 101 | /dev/video* 0660 system camera 102 | /dev/media* 0660 system camera 103 | /dev/v4l-subdev* 0660 system camera 104 | /dev/qseecom 0660 system drmrpc 105 | /dev/gemini0 0660 system camera 106 | /dev/jpeg0 0660 system camera 107 | /dev/jpeg1 0660 system camera 108 | /dev/jpeg2 0660 system camera 109 | /dev/adsprpc-smd 0664 system system 110 | /dev/mmc3416x 0660 system system 111 | /dev/msm_camera/* 0660 system camera 112 | /dev/gemini/ 0660 system camera 113 | /dev/mercury0 0660 system camera 114 | /dev/msm_vidc_reg 0660 system audio 115 | /dev/msm_vidc_dec 0660 system audio 116 | /dev/msm_vidc_dec_sec 0660 system audio 117 | /dev/msm_vidc_enc 0660 system audio 118 | /dev/msm_rotator 0660 system system 119 | /dev/hw_random 0600 root root 120 | /dev/adsprpc-smd 0664 system system 121 | 122 | #permissions for audio 123 | /dev/audio_slimslave 0660 system audio 124 | /dev/msm_qcelp 0660 system audio 125 | /dev/msm_evrc 0660 system audio 126 | /dev/msm_wma 0660 system audio 127 | /dev/msm_wmapro 0660 system audio 128 | /dev/msm_amrnb 0660 system audio 129 | /dev/msm_amrwb 0660 system audio 130 | /dev/msm_amrwbplus 0660 system audio 131 | /dev/msm_aac 0660 system audio 132 | /dev/msm_multi_aac 0660 system audio 133 | /dev/msm_aac_in 0660 system audio 134 | /dev/msm_qcelp_in 0660 system audio 135 | /dev/msm_evrc_in 0660 system audio 136 | /dev/msm_amrnb_in 0640 system audio 137 | /dev/msm_a2dp_in 0660 system audio 138 | /dev/msm_ac3 0660 system audio 139 | /dev/msm_audio_cal 0660 system audio 140 | /dev/msm_acdb 0660 system audio 141 | /dev/msm_cad 0660 system audio 142 | /dev/msm_fm 0660 system audio 143 | /dev/msm_mvs 0660 system audio 144 | /dev/msm_pcm_lp_dec 0660 system audio 145 | /dev/msm_preproc_ctl 0660 system audio 146 | /dev/msm_rtac 0660 system audio 147 | /dev/msm_voicememo 0660 system audio 148 | /dev/radio0 0644 system audio 149 | /dev/smd3 0660 bluetooth net_bt_stack 150 | /dev/smd2 0660 bluetooth net_bt_stack 151 | /dev/ttyHSL1 0660 system system 152 | /dev/ttyHS1 0660 system system 153 | /dev/mdm 0660 system radio 154 | /sys/devices/virtual/smdpkt/smdcntl* open_timeout 0664 radio radio 155 | /dev/sdio_tty_ciq_00 0660 system system 156 | /dev/tty_sdio_00 0660 system system 157 | /dev/ttyGS0 0660 system system 158 | /dev/i2c-5 0660 media media 159 | /dev/voice_svc 0660 system audio 160 | /dev/avtimer 0660 system audio 161 | 162 | # DVB devices 163 | /dev/dvb/adapter0/demux* 0440 media media 164 | /dev/dvb/adapter0/dvr* 0660 media media 165 | /dev/dvb/adapter0/video* 0660 media media 166 | 167 | # Broadcast devices 168 | /dev/tsc_mux0 0660 media media 169 | /dev/tsc_ci0 0660 media media 170 | 171 | # sensors 172 | /dev/yl_alsprox_sensor 0660 system system 173 | /dev/yl_params1 0660 system system 174 | /sys/devices/soc.0/78b5000.i2c/i2c-1/1-* enable 0660 input system 175 | /sys/devices/soc.0/78b5000.i2c/i2c-1/1-* poll_delay 0660 input system 176 | /sys/devices/soc.0/78b5000.i2c/i2c-1/1-* enable_wakeup 0660 input system 177 | /sys/devices/soc.0/78b5000.i2c/i2c-1/1-* max_latency 0660 input system 178 | /sys/devices/soc.0/78b5000.i2c/i2c-1/1-* flush 0660 input system 179 | /sys/devices/soc.0/78b5000.i2c/i2c-1/1-* calibrate 0660 input system 180 | /sys/devices/soc.0/78b6000.i2c/i2c-0/0-* accel_enable 0660 input system 181 | /sys/devices/soc.0/78b6000.i2c/i2c-0/0-* accel_delay 0660 input system 182 | /sys/devices/soc.0/78b6000.i2c/i2c-0/0-* calibration 0660 input system 183 | /sys/devices/soc.0/78b6000.i2c/i2c-0/0-* debug 0660 input system 184 | /sys/devices/soc.0/78b6000.i2c/i2c-0/0-* device_delay 0660 input system 185 | /sys/devices/soc.0/78b6000.i2c/i2c-0/0-* enable_als_sensor 0660 input system 186 | /sys/devices/soc.0/78b6000.i2c/i2c-0/0-* enable_ps_sensor 0660 input system 187 | /sys/devices/soc.0/78b6000.i2c/i2c-0/0-* gyro_enable 0660 input system 188 | /sys/devices/soc.0/78b6000.i2c/i2c-0/0-* gyro_delay 0660 input system 189 | /sys/devices/soc.0/78b6000.i2c/i2c-0/0-* ps_calibration 0660 input system 190 | /sys/devices/soc.0/78b6000.i2c/i2c-0/0-* reg 0660 input system 191 | /sys/devices/soc.0/78b6000.i2c/i2c-0/0-* enable 0660 input system 192 | /sys/devices/soc.0/78b6000.i2c/i2c-0/0-* poll_delay 0660 input system 193 | /sys/devices/soc.0/78b6000.i2c/i2c-0/0-* enable_wakeup 0660 input system 194 | /sys/devices/soc.0/78b6000.i2c/i2c-0/0-* max_latency 0660 input system 195 | /sys/devices/soc.0/78b6000.i2c/i2c-0/0-* flush 0660 input system 196 | /sys/devices/soc.0/78b6000.i2c/i2c-0/0-* calibrate 0660 input system 197 | /sys/devices/soc.0/78b6000.i2c/i2c-0/0-* chip_id 0660 input system 198 | 199 | # vm_bms 200 | /dev/vm_bms 0660 system system 201 | /dev/battery_data 0660 system system 202 | 203 | # wlan 204 | /dev/wcnss_wlan 0660 system system 205 | /dev/wcnss_ctrl 0660 system system 206 | 207 | #nfc permissions 208 | /dev/nfc-nci 0660 nfc nfc 209 | /dev/assd 0660 nfc nfc 210 | 211 | # UIO devices 212 | /dev/uio0 0660 system system 213 | /dev/uio1 0660 system system 214 | /dev/uio2 0660 system system 215 | 216 | # ESOC devices 217 | /dev/subsys_esoc* 0640 system radio 218 | 219 | #BST 220 | /sys/devices/virtual/input/input* range 0660 input system 221 | /sys/devices/virtual/input/input* bandwidth 0660 input system 222 | /sys/devices/virtual/input/input* op_mode 0660 input system 223 | /sys/devices/virtual/input/input* delay 0660 input system 224 | /sys/devices/virtual/input/input* SleepDur 0660 input system 225 | /sys/devices/virtual/input/input* fast_calibration_x 0660 input system 226 | /sys/devices/virtual/input/input* fast_calibration_y 0660 input system 227 | /sys/devices/virtual/input/input* fast_calibration_z 0660 input system 228 | /sys/devices/virtual/input/input* fifo_overrun 0660 input system 229 | /sys/devices/virtual/input/input* fifo_data_frame 0660 input system 230 | /sys/devices/virtual/input/input* fifo_mode 0660 input system 231 | /sys/devices/virtual/input/input* fifo_trig 0660 input system 232 | /sys/devices/virtual/input/input* fifo_framecount 0660 input system 233 | /sys/devices/virtual/input/input* fifo_data_sel 0660 input system 234 | /sys/devices/virtual/input/input* reg 0660 input system 235 | /sys/devices/virtual/input/input* offset_x 0660 input system 236 | /sys/devices/virtual/input/input* offset_y 0660 input system 237 | /sys/devices/virtual/input/input* offset_z 0660 input system 238 | /sys/devices/virtual/input/input* enable_int 0660 input system 239 | /sys/devices/virtual/input/input* int_mode 0660 input system 240 | /sys/devices/virtual/input/input* slope_duration 0660 input system 241 | /sys/devices/virtual/input/input* slope_threshold 0660 input system 242 | /sys/devices/virtual/input/input* slope_no_mot_duration 0660 input system 243 | /sys/devices/virtual/input/input* slope_no_mot_threshold 0660 input system 244 | /sys/devices/virtual/input/input* high_g_duration 0660 input system 245 | /sys/devices/virtual/input/input* high_g_threshold 0660 input system 246 | /sys/devices/virtual/input/input* low_g_duration 0660 input system 247 | /sys/devices/virtual/input/input* low_g_threshold 0660 input system 248 | /sys/devices/virtual/input/input* tap_duration 0660 input system 249 | /sys/devices/virtual/input/input* tap_threshold 0660 input system 250 | /sys/devices/virtual/input/input* tap_quiet 0660 input system 251 | /sys/devices/virtual/input/input* tap_shock 0660 input system 252 | /sys/devices/virtual/input/input* tap_samp 0660 input system 253 | /sys/devices/virtual/input/input* orient_mode 0660 input system 254 | /sys/devices/virtual/input/input* orient_blocking 0660 input system 255 | /sys/devices/virtual/input/input* orient_hyst 0660 input system 256 | /sys/devices/virtual/input/input* orient_theta 0660 input system 257 | /sys/devices/virtual/input/input* flat_theta 0660 input system 258 | /sys/devices/virtual/input/input* flat_hold_time 0660 input system 259 | /sys/devices/virtual/input/input* selftest 0660 input system 260 | /sys/devices/virtual/input/input* softreset 0660 input system 261 | /sys/devices/virtual/input/input* en_sig_motion 0660 input system 262 | /sys/devices/virtual/input/input* tap_time_period 0660 input system 263 | /sys/devices/virtual/input/input* en_double_tap 0660 input system 264 | 265 | /sys/devices/virtual/input/input* fastoffset_en 0660 input system 266 | /sys/devices/virtual/input/input* slowoffset_en 0660 input system 267 | /sys/devices/virtual/input/input* sleepdur 0660 input system 268 | /sys/devices/virtual/input/input* autosleepdur 0660 input system 269 | /sys/devices/virtual/input/input* fifo_tag 0660 input system 270 | /sys/devices/virtual/input/input* odr 0660 input system 271 | /sys/devices/virtual/input/input* rept_xy 0660 input system 272 | /sys/devices/virtual/input/input* rept_z 0660 input system 273 | /sys/devices/virtual/input/input* test 0660 input system 274 | 275 | /dev/block/bootdevice/by-name/frp 0600 system system 276 | /dev/block/bootdevice/by-name/config 0600 system system 277 | -------------------------------------------------------------------------------- /sepolicy/healthd.te: -------------------------------------------------------------------------------- 1 | allow healthd rtc_device:chr_file rw_file_perms; 2 | -------------------------------------------------------------------------------- /sepolicy/mm-qcamerad.te: -------------------------------------------------------------------------------- 1 | allow mm-qcamerad camera_data_file:dir r_dir_perms; 2 | allow mm-qcamerad mpctl_socket:dir search; 3 | unix_socket_connect(mm-qcamerad, mpctl, perfd) 4 | -------------------------------------------------------------------------------- /sepolicy/netmgrd.te: -------------------------------------------------------------------------------- 1 | allow netmgrd self:capability dac_override; 2 | -------------------------------------------------------------------------------- /sepolicy/qseecomd.te: -------------------------------------------------------------------------------- 1 | allow tee system_prop:property_service set; 2 | -------------------------------------------------------------------------------- /sepolicy/surfaceflinger.te: -------------------------------------------------------------------------------- 1 | # secure display 2 | allow surfaceflinger persist_file:dir r_dir_perms; 3 | --------------------------------------------------------------------------------