mirror of
https://github.com/S3NEO/android_device_samsung_msm8226-common.git
synced 2024-11-06 21:55:45 +00:00
[SQUASH]: initial bringup of samsung msm8226-common repo from msm8974-common
* Rename msm8974-common -> msm8226-common * Import the old msm8226-common camera wrapper and apply : -45e3438b26 (diff-dd6d2dcc679d12b9430a9787bab45b33)
-737bd8c396 (diff-dd6d2dcc679d12b9430a9787bab45b33)
-a79e72b246 (diff-dd6d2dcc679d12b9430a9787bab45b33)
-d4dadbaff0 (diff-dd6d2dcc679d12b9430a9787bab45b33)
-c2eb30c314 (diff-dd6d2dcc679d12b9430a9787bab45b33)
-9ac995b901 (diff-dd6d2dcc679d12b9430a9787bab45b33)
* Remove msm8974 keylayout in favour of msm8226 ones * Add wifi/prima relate configs for Qualcomm WIFI * Import libwncss from our old msm8226-common branch * Remove AvancedDisplay overlay as our panel does not support mDNIe * Import rootdir files from stock SM-G800H release, rework it taking as example klte one and import stock ondemand governor parameters * Adapt seccomp policy for msm8226 * Adapt sensor multihal for msm8226 * Adapt sepolicy for msm8226-common
This commit is contained in:
parent
96eaf0aaba
commit
f89d1e5ca3
54 changed files with 4705 additions and 1231 deletions
161
Android.mk
161
Android.mk
|
@ -1,5 +1,4 @@
|
|||
#
|
||||
# Copyright (C) 2012 The Android Open-Source Project
|
||||
# Copyright (C) 2014 The CyanogenMod Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
@ -12,22 +11,13 @@
|
|||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
# WARNING: Everything listed here will be built on ALL platforms,
|
||||
# including x86, the emulator, and the SDK. Modules must be uniquely
|
||||
# named (liblights.tuna), and must build everywhere, or limit themselves
|
||||
# to only building on ARM if they include assembly. Individual makefiles
|
||||
# are responsible for having their own logic, for fine-grained control.
|
||||
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
ifeq ($(BOARD_VENDOR),samsung)
|
||||
ifeq ($(TARGET_BOARD_PLATFORM),msm8974)
|
||||
ifeq ($(TARGET_BOARD_PLATFORM),msm8226)
|
||||
include $(call all-subdir-makefiles,$(LOCAL_PATH))
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
ADSP_IMAGES := \
|
||||
adsp.b00 adsp.b01 adsp.b02 adsp.b03 adsp.b04 adsp.b05 adsp.b06 \
|
||||
adsp.b08 adsp.b09 adsp.b10 adsp.b11 adsp.b12 adsp.b13 adsp.mdt
|
||||
|
@ -41,17 +31,29 @@ $(ADSP_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
|
|||
|
||||
ALL_DEFAULT_INSTALLED_MODULES += $(ADSP_SYMLINKS)
|
||||
|
||||
DTCPIP_IMAGES := \
|
||||
dtcpip.b00 dtcpip.b01 dtcpip.b02 dtcpip.b03 dtcpip.mdt
|
||||
FIRMWARE_CMNLIB_IMAGES := \
|
||||
cmnlib.b00 cmnlib.b01 cmnlib.b02 cmnlib.b03 cmnlib.mdt
|
||||
|
||||
DTCPIP_SYMLINKS := $(addprefix $(TARGET_OUT_ETC)/firmware/,$(notdir $(DTCPIP_IMAGES)))
|
||||
$(DTCPIP_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
|
||||
@echo "DTCPIP firmware link: $@"
|
||||
FIRMWARE_CMNLIB_SYMLINKS := $(addprefix $(TARGET_OUT_ETC)/firmware/,$(notdir $(FIRMWARE_CMNLIB_IMAGES)))
|
||||
$(FIRMWARE_CMNLIB_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
|
||||
@echo "CMNLIB Firmware link: $@"
|
||||
@mkdir -p $(dir $@)
|
||||
@rm -rf $@
|
||||
$(hide) ln -sf /firmware/image/$(notdir $@) $@
|
||||
|
||||
ALL_DEFAULT_INSTALLED_MODULES += $(DTCPIP_SYMLINKS)
|
||||
ALL_DEFAULT_INSTALLED_MODULES += $(FIRMWARE_CMNLIB_SYMLINKS)
|
||||
|
||||
ISDB_IMAGES := \
|
||||
isdbtmm.b00 isdbtmm.b01 isdbtmm.b02 isdbtmm.b03 isdbtmm.mdt
|
||||
|
||||
ISDB_SYMLINKS := $(addprefix $(TARGET_OUT_ETC)/firmware/,$(notdir $(ISDB_IMAGES)))
|
||||
$(ISDB_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
|
||||
@echo "ISDB firmware link: $@"
|
||||
@mkdir -p $(dir $@)
|
||||
@rm -rf $@
|
||||
$(hide) ln -sf /firmware/image/$(notdir $@) $@
|
||||
|
||||
ALL_DEFAULT_INSTALLED_MODULES += $(ISDB_SYMLINKS)
|
||||
|
||||
KM_IMAGES := \
|
||||
keymaster.b00 keymaster.b01 keymaster.b02 keymaster.b03 keymaster.mdt
|
||||
|
@ -77,30 +79,6 @@ $(MBA_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
|
|||
|
||||
ALL_DEFAULT_INSTALLED_MODULES += $(MBA_SYMLINKS)
|
||||
|
||||
DXPRDY_IMAGES := \
|
||||
dxprdy.b00 dxprdy.b01 dxprdy.b02 dxprdy.b03 dxprdy.mdt
|
||||
|
||||
DXPRDY_SYMLINKS := $(addprefix $(TARGET_OUT_ETC)/firmware/,$(notdir $(DXPRDY_IMAGES)))
|
||||
$(DXPRDY_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
|
||||
@echo "DXPRDY firmware link: $@"
|
||||
@mkdir -p $(dir $@)
|
||||
@rm -rf $@
|
||||
$(hide) ln -sf /firmware/image/$(notdir $@) $@
|
||||
|
||||
ALL_DEFAULT_INSTALLED_MODULES += $(DXPRDY_SYMLINKS)
|
||||
|
||||
MLDAP_IMAGES := \
|
||||
mldap.b00 mldap.b01 mldap.b02 mldap.b03 mldap.mdt
|
||||
|
||||
MLDAP_SYMLINKS := $(addprefix $(TARGET_OUT_ETC)/firmware/,$(notdir $(MLDAP_IMAGES)))
|
||||
$(MLDAP_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
|
||||
@echo "MLDAP firmware link: $@"
|
||||
@mkdir -p $(dir $@)
|
||||
@rm -rf $@
|
||||
$(hide) ln -sf /firmware/image/$(notdir $@) $@
|
||||
|
||||
ALL_DEFAULT_INSTALLED_MODULES += $(MLDAP_SYMLINKS)
|
||||
|
||||
MC_IMAGES := \
|
||||
mc_v2.b00 mc_v2.b01 mc_v2.b02 mc_v2.b03 mc_v2.mdt
|
||||
|
||||
|
@ -114,10 +92,11 @@ $(MC_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
|
|||
ALL_DEFAULT_INSTALLED_MODULES += $(MC_SYMLINKS)
|
||||
|
||||
MODEM_IMAGES := \
|
||||
modem.b00 modem.b01 modem.b02 modem.b03 modem.b04 modem.b05 modem.b06 \
|
||||
modem.b08 modem.b09 modem.b10 modem.b11 modem.b12 modem.b13 modem.b14 \
|
||||
modem.b15 modem.b16 modem.b17 modem.b18 modem.b19 modem.b20 modem.b21 \
|
||||
modem.b22 modem.b23 modem.b24 modem.b25 modem.b26 modem.b27 modem.mdt
|
||||
modem.b00 modem.b01 modem.b02 modem.b03 modem.b04 modem.b05 \
|
||||
modem.b06 modem.b08 modem.b09 modem.b10 modem.b11 modem.b13 \
|
||||
modem.b14 modem.b15 modem.b16 modem.b17 modem.b18 modem.b19 \
|
||||
modem.b20 modem.b21 modem.b22 modem.b23 modem.b24 modem.b25 \
|
||||
modem.b26 modem.b27 modem.b28 modem.b29 modem.mdt
|
||||
|
||||
MODEM_SYMLINKS := $(addprefix $(TARGET_OUT_ETC)/firmware/,$(notdir $(MODEM_IMAGES)))
|
||||
$(MODEM_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
|
||||
|
@ -128,53 +107,17 @@ $(MODEM_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
|
|||
|
||||
ALL_DEFAULT_INSTALLED_MODULES += $(MODEM_SYMLINKS)
|
||||
|
||||
PROV_MODEM_IMAGES := \
|
||||
prov.b00 prov.b01 prov.b02 prov.b03 prov.mdt
|
||||
PROV_IMAGES := \
|
||||
prov.b00 prov.b01 prov.b02 prov.b03 prov.mtd \
|
||||
|
||||
PROV_MODEM_SYMLINKS := $(addprefix $(TARGET_OUT_ETC)/firmware/,$(notdir $(PROV_MODEM_IMAGES)))
|
||||
$(PROV_MODEM_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
|
||||
@echo "Prov Firmware link: $@"
|
||||
PROV_SYMLINKS := $(addprefix $(TARGET_OUT_ETC)/firmware/,$(notdir $(PROV_IMAGES)))
|
||||
$(PROV_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
|
||||
@echo "Prov firmware link: $@"
|
||||
@mkdir -p $(dir $@)
|
||||
@rm -rf $@
|
||||
$(hide) ln -sf /firmware/image/$(notdir $@) $@
|
||||
|
||||
ALL_DEFAULT_INSTALLED_MODULES += $(PROV_MODEM_SYMLINKS)
|
||||
|
||||
ACTLOCK_IMAGES := \
|
||||
act_lock.b00 act_lock.b01 act_lock.b02 act_lock.b03 act_lock.mdt
|
||||
|
||||
ACTLOCK_SYMLINKS := $(addprefix $(TARGET_OUT_ETC)/firmware/,$(notdir $(ACTLOCK_IMAGES)))
|
||||
$(ACTLOCK_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
|
||||
@echo "Actlock firmware link: $@"
|
||||
@mkdir -p $(dir $@)
|
||||
@rm -rf $@
|
||||
$(hide) ln -sf /firmware/image/$(notdir $@) $@
|
||||
|
||||
ALL_DEFAULT_INSTALLED_MODULES += $(ACTLOCK_SYMLINKS)
|
||||
|
||||
TKM_IMAGES := \
|
||||
t2_ks_mi.b00 t2_ks_mi.b01 t2_ks_mi.b02 t2_ks_mi.b03 t2_ks_mi.mdt
|
||||
|
||||
TKM_SYMLINKS := $(addprefix $(TARGET_OUT_ETC)/firmware/,$(notdir $(TKM_IMAGES)))
|
||||
$(TKM_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
|
||||
@echo "TKM firmware link: $@"
|
||||
@mkdir -p $(dir $@)
|
||||
@rm -rf $@
|
||||
$(hide) ln -sf /firmware/image/$(notdir $@) $@
|
||||
|
||||
ALL_DEFAULT_INSTALLED_MODULES += $(TKM_SYMLINKS)
|
||||
|
||||
PLAYREADY_IMAGES := \
|
||||
playread.b00 playread.b01 playread.b02 playread.b03 playread.mdt
|
||||
|
||||
PLAYREADY_SYMLINKS := $(addprefix $(TARGET_OUT_ETC)/firmware/,$(notdir $(PLAYREADY_IMAGES)))
|
||||
$(PLAYREADY_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
|
||||
@echo "Playready firmware link: $@"
|
||||
@mkdir -p $(dir $@)
|
||||
@rm -rf $@
|
||||
$(hide) ln -sf /firmware/image/$(notdir $@) $@
|
||||
|
||||
ALL_DEFAULT_INSTALLED_MODULES += $(PLAYREADY_SYMLINKS)
|
||||
ALL_DEFAULT_INSTALLED_MODULES += $(PROV_SYMLINKS)
|
||||
|
||||
SECSTOR_IMAGES := \
|
||||
sec_stor.b00 sec_stor.b01 sec_stor.b02 sec_stor.b03 sec_stor.mdt
|
||||
|
@ -224,20 +167,17 @@ $(SSHDCPAP_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
|
|||
|
||||
ALL_DEFAULT_INSTALLED_MODULES += $(SSHDCPAP_SYMLINKS)
|
||||
|
||||
TIMA_IMAGES := \
|
||||
tima_atn.b00 tima_atn.b01 tima_atn.b02 tima_atn.b03 tima_atn.mdt \
|
||||
tima_key.b00 tima_key.b01 tima_key.b02 tima_key.b03 tima_key.mdt \
|
||||
tima_lkm.b00 tima_lkm.b01 tima_lkm.b02 tima_lkm.b03 tima_lkm.mdt \
|
||||
tima_pkm.b00 tima_pkm.b01 tima_pkm.b02 tima_pkm.b03 tima_pkm.mdt
|
||||
TBASE_IMAGES := \
|
||||
tbase300.b00 tbase300.b01 tbase300.b02 tbase300.b03 tbase300.mdt
|
||||
|
||||
TIMA_SYMLINKS := $(addprefix $(TARGET_OUT_ETC)/firmware/,$(notdir $(TIMA_IMAGES)))
|
||||
$(TIMA_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
|
||||
@echo "Tima firmware link: $@"
|
||||
SSHDCPAP_SYMLINKS := $(addprefix $(TARGET_OUT_ETC)/firmware/,$(notdir $(SSHDCPAP_IMAGES)))
|
||||
$(TBASE_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
|
||||
@echo "SSHDCPAP firmware link: $@"
|
||||
@mkdir -p $(dir $@)
|
||||
@rm -rf $@
|
||||
$(hide) ln -sf /firmware/image/$(notdir $@) $@
|
||||
|
||||
ALL_DEFAULT_INSTALLED_MODULES += $(TIMA_SYMLINKS)
|
||||
ALL_DEFAULT_INSTALLED_MODULES += $(TBASE_SYMLINKS)
|
||||
|
||||
TZPR_IMAGES := \
|
||||
tzpr25.b00 tzpr25.b01 tzpr25.b02 tzpr25.b03 tzpr25.mdt
|
||||
|
@ -275,8 +215,20 @@ $(VENUS_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
|
|||
|
||||
ALL_DEFAULT_INSTALLED_MODULES += $(VENUS_SYMLINKS)
|
||||
|
||||
WCNSS_IMAGES := \
|
||||
wcnss.b00 wcnss.b01 wcnss.b02 wcnss.b04 wcnss.b06 \
|
||||
wcnss.b07 wcnss.b08 wcnss.b09 wcnss.mdt
|
||||
|
||||
WCNSS_SYMLINKS := $(addprefix $(TARGET_OUT_ETC)/firmware/,$(notdir $(WCNSS_IMAGES)))
|
||||
$(WCNSS_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
|
||||
@echo "WCNSS firmware link: $@"
|
||||
@mkdir -p $(dir $@)
|
||||
@rm -rf $@
|
||||
$(hide) ln -sf /firmware/image/$(notdir $@) $@
|
||||
|
||||
ALL_DEFAULT_INSTALLED_MODULES += $(WCNSS_SYMLINKS)
|
||||
|
||||
WV_IMAGES := \
|
||||
cmnlib.b00 cmnlib.b01 cmnlib.b02 cmnlib.b03 cmnlib.mdt \
|
||||
widevine.b00 widevine.b01 widevine.b02 widevine.b03 widevine.mdt
|
||||
|
||||
WV_SYMLINKS := $(addprefix $(TARGET_OUT_VENDOR)/firmware/,$(notdir $(WV_IMAGES)))
|
||||
|
@ -289,13 +241,12 @@ $(WV_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
|
|||
ALL_DEFAULT_INSTALLED_MODULES += $(WV_SYMLINKS)
|
||||
|
||||
# Create links for audcal data files
|
||||
$(shell mkdir -p $(TARGET_OUT)/etc/firmware/wcd9320; \
|
||||
ln -sf /data/misc/audio/wcd9320_anc.bin \
|
||||
$(TARGET_OUT)/etc/firmware/wcd9320/wcd9320_anc.bin;\
|
||||
ln -sf /data/misc/audio/mbhc.bin \
|
||||
$(TARGET_OUT)/etc/firmware/wcd9320/wcd9320_mbhc.bin; \
|
||||
ln -sf /data/misc/audio/wcd9320_mad_audio.bin \
|
||||
$(TARGET_OUT)/etc/firmware/wcd9320/wcd9320_mad_audio.bin)
|
||||
$(shell mkdir -p $(TARGET_OUT_ETC)/firmware/wcd9306; \
|
||||
ln -sf /data/misc/audio/wcd9320_anc.bin \
|
||||
$(TARGET_OUT_ETC)/firmware/wcd9306/wcd9306_anc.bin; \
|
||||
ln -sf /data/misc/audio/mbhc.bin \
|
||||
$(TARGET_OUT_ETC)/firmware/wcd9306/wcd9306_mbhc.bin)
|
||||
|
||||
|
||||
endif
|
||||
endif
|
||||
|
|
|
@ -17,13 +17,14 @@
|
|||
-include device/samsung/qcom-common/BoardConfigCommon.mk
|
||||
|
||||
# Platform
|
||||
TARGET_BOARD_PLATFORM := msm8974
|
||||
TARGET_BOARD_PLATFORM_GPU := qcom-adreno330
|
||||
TARGET_BOARD_PLATFORM := msm8226
|
||||
TARGET_BOARD_PLATFORM_GPU := qcom-adreno305
|
||||
|
||||
# Architecture
|
||||
TARGET_CPU_VARIANT := krait
|
||||
|
||||
# Audio
|
||||
AUDIO_FEATURE_ENABLED_LOW_LATENCY_CAPTURE := true
|
||||
BOARD_USES_ALSA_AUDIO := true
|
||||
|
||||
# Binder API version
|
||||
|
@ -35,15 +36,17 @@ BOARD_HAVE_BLUETOOTH := true
|
|||
# Camera
|
||||
TARGET_HAS_LEGACY_CAMERA_HAL1 := true
|
||||
TARGET_NEEDS_LEGACY_CAMERA_HAL1_DYN_NATIVE_HANDLE := true
|
||||
TARGET_USES_MEDIA_EXTENSIONS := true
|
||||
|
||||
# Charger
|
||||
BOARD_BATTERY_DEVICE_NAME := "battery"
|
||||
BOARD_CHARGING_CMDLINE_NAME := "androidboot.bootchg"
|
||||
BOARD_CHARGING_CMDLINE_VALUE := "true"
|
||||
BOARD_CHARGING_CMDLINE_NAME := "androidboot.mode"
|
||||
BOARD_CHARGING_CMDLINE_VALUE := "charger"
|
||||
BOARD_CHARGER_ENABLE_SUSPEND := true
|
||||
WITH_LINEAGE_CHARGER := false
|
||||
|
||||
# CMHW
|
||||
BOARD_HARDWARE_CLASS += device/samsung/msm8974-common/lineagehw
|
||||
# LineageHW
|
||||
BOARD_HARDWARE_CLASS += device/samsung/msm8226-common/lineagehw
|
||||
|
||||
# Dexpreopt
|
||||
ifeq ($(HOST_OS),linux)
|
||||
|
@ -53,9 +56,13 @@ ifeq ($(HOST_OS),linux)
|
|||
endif
|
||||
endif
|
||||
|
||||
WITH_DEXPREOPT_DEBUG_INFO := false
|
||||
USE_DEX2OAT_DEBUG := false
|
||||
DONT_DEXPREOPT_PREBUILTS := true
|
||||
|
||||
# Display
|
||||
NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3
|
||||
OVERRIDE_RS_DRIVER:= libRSDriver_adreno.so
|
||||
OVERRIDE_RS_DRIVER := libRSDriver_adreno.so
|
||||
|
||||
# Shader cache config options
|
||||
# Maximum size of the GLES Shaders that can be cached for reuse.
|
||||
|
@ -68,26 +75,50 @@ MAX_EGL_CACHE_KEY_SIZE := 12*1024
|
|||
MAX_EGL_CACHE_SIZE := 2048*1024
|
||||
|
||||
# Filesystem
|
||||
TARGET_FS_CONFIG_GEN := device/samsung/msm8974-common/config.fs
|
||||
TARGET_FS_CONFIG_GEN := device/samsung/msm8226-common/config.fs
|
||||
|
||||
# HIDL
|
||||
DEVICE_MANIFEST_FILE := device/samsung/msm8974-common/manifest.xml
|
||||
DEVICE_MATRIX_FILE := device/samsung/msm8974-common/compatibility_matrix.xml
|
||||
DEVICE_MANIFEST_FILE := device/samsung/msm8226-common/manifest.xml
|
||||
DEVICE_MATRIX_FILE := device/samsung/msm8226-common/compatibility_matrix.xml
|
||||
|
||||
# SELinux
|
||||
include device/samsung/msm8974-common/sepolicy/sepolicy.mk
|
||||
include device/samsung/msm8226-common/sepolicy/sepolicy.mk
|
||||
|
||||
# Shims
|
||||
TARGET_LD_SHIM_LIBS += \
|
||||
/system/lib/libcrypto.so|libboringssl-compat.so
|
||||
|
||||
# Init
|
||||
TARGET_INIT_VENDOR_LIB := libinit_msm8974
|
||||
TARGET_RECOVERY_DEVICE_MODULES := libinit_msm8974
|
||||
TARGET_INIT_VENDOR_LIB := libinit_msm8226
|
||||
TARGET_RECOVERY_DEVICE_MODULES := libinit_msm8226
|
||||
|
||||
# Partitions
|
||||
TARGET_USERIMAGES_USE_EXT4 := true
|
||||
TARGET_USERIMAGES_USE_F2FS := true
|
||||
BOARD_VOLD_EMMC_SHARES_DEV_MAJOR := true
|
||||
|
||||
# Power
|
||||
TARGET_HAS_LEGACY_POWER_STATS := true
|
||||
TARGET_HAS_NO_POWER_STATS := true
|
||||
TARGET_HAS_NO_WIFI_STATS := true
|
||||
TARGET_USES_INTERACTION_BOOST := true
|
||||
|
||||
# Time services
|
||||
BOARD_USES_QC_TIME_SERVICES := true
|
||||
|
||||
# Wifi
|
||||
BOARD_WLAN_DEVICE := qcwcn
|
||||
BOARD_HAS_QCOM_WLAN := true
|
||||
BOARD_HAS_QCOM_WLAN_SDK := true
|
||||
BOARD_HOSTAPD_DRIVER := NL80211
|
||||
BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
|
||||
BOARD_WPA_SUPPLICANT_DRIVER := NL80211
|
||||
BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
|
||||
TARGET_PROVIDES_WCNSS_QMI := true
|
||||
TARGET_USES_QCOM_WCNSS_QMI := true
|
||||
TARGET_USES_WCNSS_CTRL := true
|
||||
WPA_SUPPLICANT_VERSION := VER_0_8_X
|
||||
WIFI_DRIVER_FW_PATH_STA := "sta"
|
||||
WIFI_DRIVER_FW_PATH_AP := "ap"
|
||||
|
||||
# inherit from the proprietary version
|
||||
-include vendor/samsung/msm8974-common/BoardConfigVendor.mk
|
||||
-include vendor/samsung/msm8226-common/BoardConfigVendor.mk
|
||||
|
|
2
README
2
README
|
@ -1,3 +1,3 @@
|
|||
Copyright 2012 - The CyanogenMod Project
|
||||
|
||||
Common Samsung 8974 repository
|
||||
Common Samsung 8226 repository
|
||||
|
|
23
camera/Android.mk
Normal file
23
camera/Android.mk
Normal file
|
@ -0,0 +1,23 @@
|
|||
LOCAL_PATH := $(call my-dir)
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
system/media/camera/include
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
CameraWrapper.cpp
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := libbase libarect
|
||||
LOCAL_SHARED_LIBRARIES := \
|
||||
libhardware liblog libcamera_client libutils libcutils libdl libgui libhidltransport libsensor \
|
||||
android.hidl.token@1.0-utils \
|
||||
android.hardware.graphics.bufferqueue@1.0
|
||||
|
||||
LOCAL_HEADER_LIBRARIES := libnativebase_headers
|
||||
|
||||
LOCAL_MODULE := camera.$(TARGET_BOARD_PLATFORM)
|
||||
LOCAL_MODULE_RELATIVE_PATH := hw
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_PROPRIETARY_MODULE := true
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
681
camera/CameraWrapper.cpp
Normal file
681
camera/CameraWrapper.cpp
Normal file
|
@ -0,0 +1,681 @@
|
|||
/*
|
||||
* Copyright (C) 2013-2016, The CyanogenMod Project
|
||||
* Copyright (C) 2017, The LineageOS Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file CameraWrapper.cpp
|
||||
*
|
||||
* This file wraps a vendor camera module.
|
||||
*
|
||||
*/
|
||||
|
||||
#define LOG_NDEBUG 0
|
||||
|
||||
#define LOG_TAG "CameraWrapper"
|
||||
#include <cutils/log.h>
|
||||
|
||||
#include <utils/threads.h>
|
||||
#include <utils/String8.h>
|
||||
#include <hardware/hardware.h>
|
||||
#include <hardware/camera.h>
|
||||
#include <camera/Camera.h>
|
||||
#include <camera/CameraParameters.h>
|
||||
|
||||
#define BACK_CAMERA_ID 0
|
||||
#define FRONT_CAMERA_ID 1
|
||||
|
||||
#define OPEN_RETRIES 10
|
||||
#define OPEN_RETRY_MSEC 40
|
||||
|
||||
using namespace android;
|
||||
|
||||
const char KEY_SUPPORTED_ISO_MODES[] = "iso-values";
|
||||
const char KEY_SAMSUNG_CAMERA_MODE[] = "cam_mode";
|
||||
const char KEY_ISO_MODE[] = "iso";
|
||||
const char KEY_ZSL[] = "zsl";
|
||||
const char KEY_CAMERA_MODE[] = "camera-mode";
|
||||
|
||||
static Mutex gCameraWrapperLock;
|
||||
static camera_module_t* gVendorModule = 0;
|
||||
|
||||
static char** fixed_set_params = NULL;
|
||||
static camera_notify_callback gUserNotifyCb = NULL;
|
||||
static camera_data_callback gUserDataCb = NULL;
|
||||
static camera_data_timestamp_callback gUserDataCbTimestamp = NULL;
|
||||
static camera_request_memory gUserGetMemory = NULL;
|
||||
static void *gUserCameraDevice = NULL;
|
||||
|
||||
static int camera_device_open(const hw_module_t* module, const char* name, hw_device_t** device);
|
||||
static int camera_get_number_of_cameras(void);
|
||||
static int camera_get_camera_info(int camera_id, struct camera_info* info);
|
||||
static int camera_send_command(struct camera_device* device, int32_t cmd, int32_t arg1,
|
||||
int32_t arg2);
|
||||
|
||||
static struct hw_module_methods_t camera_module_methods = {
|
||||
.open = camera_device_open,
|
||||
};
|
||||
|
||||
camera_module_t HAL_MODULE_INFO_SYM = {
|
||||
.common =
|
||||
{
|
||||
.tag = HARDWARE_MODULE_TAG,
|
||||
.module_api_version = CAMERA_MODULE_API_VERSION_1_0,
|
||||
.hal_api_version = HARDWARE_HAL_API_VERSION,
|
||||
.id = CAMERA_HARDWARE_MODULE_ID,
|
||||
.name = "Samsung msm8226 Camera Wrapper",
|
||||
.author = "The CyanogenMod Project",
|
||||
.methods = &camera_module_methods,
|
||||
.dso = NULL, /* remove compilation warnings */
|
||||
.reserved = {0}, /* remove compilation warnings */
|
||||
},
|
||||
|
||||
.get_number_of_cameras = camera_get_number_of_cameras,
|
||||
.get_camera_info = camera_get_camera_info,
|
||||
.set_callbacks = NULL, /* remove compilation warnings */
|
||||
.get_vendor_tag_ops = NULL, /* remove compilation warnings */
|
||||
.open_legacy = NULL, /* remove compilation warnings */
|
||||
.set_torch_mode = NULL, /* remove compilation warnings */
|
||||
.init = NULL, /* remove compilation warnings */
|
||||
.reserved = {0}, /* remove compilation warnings */
|
||||
};
|
||||
|
||||
typedef struct wrapper_camera_device {
|
||||
camera_device_t base;
|
||||
int camera_released;
|
||||
int id;
|
||||
camera_device_t* vendor;
|
||||
} wrapper_camera_device_t;
|
||||
|
||||
void camera_notify_cb(int32_t msg_type, int32_t ext1, int32_t ext2, void * /*user*/) {
|
||||
gUserNotifyCb(msg_type, ext1, ext2, gUserCameraDevice);
|
||||
}
|
||||
|
||||
void camera_data_cb(int32_t msg_type, const camera_memory_t *data, unsigned int index,
|
||||
camera_frame_metadata_t *metadata, void * /*user*/) {
|
||||
gUserDataCb(msg_type, data, index, metadata, gUserCameraDevice);
|
||||
}
|
||||
|
||||
void camera_data_cb_timestamp(nsecs_t timestamp, int32_t msg_type,
|
||||
const camera_memory_t *data, unsigned index, void * /*user*/) {
|
||||
gUserDataCbTimestamp(timestamp, msg_type, data, index, gUserCameraDevice);
|
||||
}
|
||||
|
||||
camera_memory_t* camera_get_memory(int fd, size_t buf_size,
|
||||
uint_t num_bufs, void * /*user*/) {
|
||||
return gUserGetMemory(fd, buf_size, num_bufs, gUserCameraDevice);
|
||||
}
|
||||
|
||||
#define VENDOR_CALL(device, func, ...) \
|
||||
({ \
|
||||
wrapper_camera_device_t* __wrapper_dev = (wrapper_camera_device_t*)device; \
|
||||
__wrapper_dev->vendor->ops->func(__wrapper_dev->vendor, ##__VA_ARGS__); \
|
||||
})
|
||||
|
||||
#define CAMERA_ID(device) (((wrapper_camera_device_t*)(device))->id)
|
||||
|
||||
static int check_vendor_module() {
|
||||
int rv = 0;
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
|
||||
if (gVendorModule) return 0;
|
||||
|
||||
rv = hw_get_module_by_class("camera", "vendor", (const hw_module_t**)&gVendorModule);
|
||||
if (rv) ALOGE("failed to open vendor camera module");
|
||||
return rv;
|
||||
}
|
||||
|
||||
const static char* iso_values[] = {
|
||||
"auto,"
|
||||
#ifdef ISO_MODE_50
|
||||
"ISO50,"
|
||||
#endif
|
||||
#ifdef ISO_MODE_HJR
|
||||
"ISO_HJR,"
|
||||
#endif
|
||||
"ISO100,ISO200,ISO400,ISO800"
|
||||
#ifdef ISO_MODE_1600
|
||||
",ISO1600"
|
||||
#endif
|
||||
};
|
||||
|
||||
static char* camera_fixup_getparams(int id, const char* settings) {
|
||||
CameraParameters params;
|
||||
params.unflatten(String8(settings));
|
||||
|
||||
#if !LOG_NDEBUG
|
||||
ALOGV("%s: original parameters:", __FUNCTION__);
|
||||
params.dump();
|
||||
#endif
|
||||
|
||||
params.set(KEY_SUPPORTED_ISO_MODES, iso_values[id]);
|
||||
params.set(CameraParameters::KEY_PREFERRED_PREVIEW_SIZE_FOR_VIDEO, "1280x720");
|
||||
params.set(CameraParameters::KEY_SUPPORTED_SCENE_MODES,
|
||||
"auto,asd,action,portrait,landscape,night,night-portrait,theatre,beach,snow,sunset,"
|
||||
"steadyphoto,fireworks,sports,party,candlelight,backlight,flowers,AR");
|
||||
|
||||
#if !LOG_NDEBUG
|
||||
ALOGV("%s: fixed parameters:", __FUNCTION__);
|
||||
params.dump();
|
||||
#endif
|
||||
|
||||
if (id == BACK_CAMERA_ID) {
|
||||
params.set(CameraParameters::KEY_SUPPORTED_FLASH_MODES, "auto,on,off,torch");
|
||||
}
|
||||
|
||||
String8 strParams = params.flatten();
|
||||
char* ret = strdup(strParams.string());
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static bool wasVideo = false;
|
||||
|
||||
static char* camera_fixup_setparams(struct camera_device* device, const char* settings) {
|
||||
int id = CAMERA_ID(device);
|
||||
CameraParameters params;
|
||||
params.unflatten(String8(settings));
|
||||
const char* camMode = params.get(KEY_SAMSUNG_CAMERA_MODE);
|
||||
|
||||
const char* recordingHint = params.get(CameraParameters::KEY_RECORDING_HINT);
|
||||
bool isVideo = false;
|
||||
if (recordingHint) isVideo = !strcmp(recordingHint, "true");
|
||||
|
||||
#if !LOG_NDEBUG
|
||||
ALOGV("%s: original parameters:", __FUNCTION__);
|
||||
params.dump();
|
||||
#endif
|
||||
|
||||
if (params.get("iso")) {
|
||||
const char* isoMode = params.get(KEY_ISO_MODE);
|
||||
if (strcmp(isoMode, "ISO50") == 0)
|
||||
params.set(KEY_ISO_MODE, "50");
|
||||
else if (strcmp(isoMode, "ISO100") == 0)
|
||||
params.set(KEY_ISO_MODE, "100");
|
||||
else if (strcmp(isoMode, "ISO200") == 0)
|
||||
params.set(KEY_ISO_MODE, "200");
|
||||
else if (strcmp(isoMode, "ISO400") == 0)
|
||||
params.set(KEY_ISO_MODE, "400");
|
||||
else if (strcmp(isoMode, "ISO800") == 0)
|
||||
params.set(KEY_ISO_MODE, "800");
|
||||
else if (strcmp(isoMode, "ISO1600") == 0)
|
||||
params.set(KEY_ISO_MODE, "1600");
|
||||
}
|
||||
|
||||
if (id != 1) {
|
||||
params.set(KEY_ZSL, isVideo ? "off" : "on");
|
||||
params.set(KEY_CAMERA_MODE, isVideo ? "0" : "1");
|
||||
}
|
||||
|
||||
#if !LOG_NDEBUG
|
||||
ALOGV("%s: fixed parameters:", __FUNCTION__);
|
||||
params.dump();
|
||||
#endif
|
||||
|
||||
String8 strParams = params.flatten();
|
||||
|
||||
if (fixed_set_params[id]) free(fixed_set_params[id]);
|
||||
fixed_set_params[id] = strdup(strParams.string());
|
||||
char* ret = fixed_set_params[id];
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
* implementation of camera_device_ops functions
|
||||
*******************************************************************/
|
||||
|
||||
static int camera_set_preview_window(struct camera_device* device,
|
||||
struct preview_stream_ops* window) {
|
||||
|
||||
if (!device) return -EINVAL;
|
||||
|
||||
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
||||
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
||||
|
||||
return VENDOR_CALL(device, set_preview_window, window);
|
||||
}
|
||||
|
||||
static void camera_set_callbacks(struct camera_device* device, camera_notify_callback notify_cb,
|
||||
camera_data_callback data_cb,
|
||||
camera_data_timestamp_callback data_cb_timestamp,
|
||||
camera_request_memory get_memory, void* user) {
|
||||
|
||||
if (!device) return;
|
||||
|
||||
gUserNotifyCb = notify_cb;
|
||||
gUserDataCb = data_cb;
|
||||
gUserDataCbTimestamp = data_cb_timestamp;
|
||||
gUserGetMemory = get_memory;
|
||||
gUserCameraDevice = user;
|
||||
|
||||
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
||||
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
||||
|
||||
VENDOR_CALL(device, set_callbacks, camera_notify_cb, camera_data_cb,
|
||||
camera_data_cb_timestamp, camera_get_memory, user);
|
||||
|
||||
}
|
||||
|
||||
static void camera_enable_msg_type(struct camera_device* device, int32_t msg_type) {
|
||||
|
||||
if (!device) return;
|
||||
|
||||
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
||||
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
||||
|
||||
VENDOR_CALL(device, enable_msg_type, msg_type);
|
||||
}
|
||||
|
||||
static void camera_disable_msg_type(struct camera_device* device, int32_t msg_type) {
|
||||
|
||||
if (!device) return;
|
||||
|
||||
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
||||
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
||||
|
||||
VENDOR_CALL(device, disable_msg_type, msg_type);
|
||||
}
|
||||
|
||||
static int camera_msg_type_enabled(struct camera_device* device, int32_t msg_type) {
|
||||
|
||||
if (!device) return 0;
|
||||
|
||||
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
||||
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
||||
|
||||
return VENDOR_CALL(device, msg_type_enabled, msg_type);
|
||||
}
|
||||
|
||||
static int camera_start_preview(struct camera_device* device) {
|
||||
|
||||
if (!device) return -EINVAL;
|
||||
|
||||
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
||||
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
||||
|
||||
return VENDOR_CALL(device, start_preview);
|
||||
}
|
||||
|
||||
static void camera_stop_preview(struct camera_device* device) {
|
||||
|
||||
if (!device) return;
|
||||
|
||||
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
||||
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
||||
|
||||
VENDOR_CALL(device, stop_preview);
|
||||
}
|
||||
|
||||
static int camera_preview_enabled(struct camera_device* device) {
|
||||
|
||||
if (!device) return -EINVAL;
|
||||
|
||||
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
||||
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
||||
|
||||
return VENDOR_CALL(device, preview_enabled);
|
||||
}
|
||||
|
||||
static int camera_store_meta_data_in_buffers(struct camera_device* device, int enable) {
|
||||
|
||||
if (!device) return -EINVAL;
|
||||
|
||||
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
||||
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
||||
|
||||
return VENDOR_CALL(device, store_meta_data_in_buffers, enable);
|
||||
}
|
||||
|
||||
static int camera_start_recording(struct camera_device* device) {
|
||||
|
||||
if (!device) return EINVAL;
|
||||
|
||||
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
||||
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
||||
|
||||
return VENDOR_CALL(device, start_recording);
|
||||
}
|
||||
|
||||
static void camera_stop_recording(struct camera_device* device) {
|
||||
|
||||
if (!device) return;
|
||||
|
||||
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
||||
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
||||
|
||||
VENDOR_CALL(device, stop_recording);
|
||||
}
|
||||
|
||||
static int camera_recording_enabled(struct camera_device* device) {
|
||||
|
||||
if (!device) return -EINVAL;
|
||||
|
||||
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
||||
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
||||
|
||||
return VENDOR_CALL(device, recording_enabled);
|
||||
}
|
||||
|
||||
static void camera_release_recording_frame(struct camera_device* device, const void* opaque) {
|
||||
|
||||
if (!device) return;
|
||||
|
||||
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
||||
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
||||
|
||||
VENDOR_CALL(device, release_recording_frame, opaque);
|
||||
}
|
||||
|
||||
static int camera_auto_focus(struct camera_device* device) {
|
||||
|
||||
if (!device) return -EINVAL;
|
||||
|
||||
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
||||
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
||||
|
||||
return VENDOR_CALL(device, auto_focus);
|
||||
}
|
||||
|
||||
static int camera_cancel_auto_focus(struct camera_device* device) {
|
||||
int ret = 0;
|
||||
|
||||
if (!device) return -EINVAL;
|
||||
|
||||
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
||||
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
||||
|
||||
/* APEXQ/EXPRESS: Calling cancel_auto_focus causes the camera to crash for unknown reasons.
|
||||
* Disabling it has no adverse effect. For others, only call cancel_auto_focus when the
|
||||
* preview is enabled. This is needed so some 3rd party camera apps don't lock up. */
|
||||
#ifndef DISABLE_AUTOFOCUS
|
||||
if (camera_preview_enabled(device)) ret = VENDOR_CALL(device, cancel_auto_focus);
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int camera_take_picture(struct camera_device* device) {
|
||||
|
||||
if (!device) return -EINVAL;
|
||||
|
||||
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
||||
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
||||
|
||||
return VENDOR_CALL(device, take_picture);
|
||||
}
|
||||
|
||||
static int camera_cancel_picture(struct camera_device* device) {
|
||||
|
||||
if (!device) return -EINVAL;
|
||||
|
||||
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
||||
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
||||
|
||||
return VENDOR_CALL(device, cancel_picture);
|
||||
}
|
||||
|
||||
static int camera_set_parameters(struct camera_device* device, const char* params) {
|
||||
|
||||
if (!device) return -EINVAL;
|
||||
|
||||
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
||||
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
||||
|
||||
char* tmp = NULL;
|
||||
tmp = camera_fixup_setparams(device, params);
|
||||
|
||||
int ret = VENDOR_CALL(device, set_parameters, tmp);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static char* camera_get_parameters(struct camera_device* device) {
|
||||
|
||||
if (!device) return NULL;
|
||||
|
||||
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
||||
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
||||
|
||||
char* params = VENDOR_CALL(device, get_parameters);
|
||||
|
||||
char* tmp = camera_fixup_getparams(CAMERA_ID(device), params);
|
||||
VENDOR_CALL(device, put_parameters, params);
|
||||
params = tmp;
|
||||
|
||||
return params;
|
||||
}
|
||||
|
||||
static void camera_put_parameters(struct camera_device* device, char* params) {
|
||||
|
||||
if (params) free(params);
|
||||
}
|
||||
|
||||
static int camera_send_command(struct camera_device* device, int32_t cmd, int32_t arg1,
|
||||
int32_t arg2) {
|
||||
|
||||
if (!device) return -EINVAL;
|
||||
|
||||
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
||||
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
||||
|
||||
return VENDOR_CALL(device, send_command, cmd, arg1, arg2);
|
||||
}
|
||||
|
||||
static void camera_release(struct camera_device* device) {
|
||||
wrapper_camera_device_t* wrapper_dev = NULL;
|
||||
|
||||
if (!device) return;
|
||||
|
||||
wrapper_dev = (wrapper_camera_device_t*) device;
|
||||
|
||||
|
||||
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
||||
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
||||
|
||||
VENDOR_CALL(device, release);
|
||||
|
||||
wrapper_dev->camera_released = true;
|
||||
}
|
||||
|
||||
static int camera_dump(struct camera_device* device, int fd) {
|
||||
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
||||
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
||||
|
||||
if (!device) return -EINVAL;
|
||||
|
||||
return VENDOR_CALL(device, dump, fd);
|
||||
}
|
||||
|
||||
extern "C" void heaptracker_free_leaked_memory(void);
|
||||
|
||||
static int camera_device_close(hw_device_t* device) {
|
||||
int ret = 0;
|
||||
wrapper_camera_device_t* wrapper_dev = NULL;
|
||||
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
|
||||
Mutex::Autolock lock(gCameraWrapperLock);
|
||||
|
||||
if (!device) {
|
||||
ret = -EINVAL;
|
||||
goto done;
|
||||
}
|
||||
|
||||
for (int i = 0; i < camera_get_number_of_cameras(); i++) {
|
||||
if (fixed_set_params[i]) free(fixed_set_params[i]);
|
||||
}
|
||||
|
||||
wrapper_dev = (wrapper_camera_device_t*)device;
|
||||
|
||||
if (!wrapper_dev->camera_released) {
|
||||
ALOGI("%s: releasing camera device with id %d", __FUNCTION__,
|
||||
wrapper_dev->id);
|
||||
|
||||
VENDOR_CALL(wrapper_dev, release);
|
||||
|
||||
wrapper_dev->camera_released = true;
|
||||
}
|
||||
|
||||
wrapper_dev->vendor->common.close((hw_device_t*)wrapper_dev->vendor);
|
||||
if (wrapper_dev->base.ops) free(wrapper_dev->base.ops);
|
||||
free(wrapper_dev);
|
||||
done:
|
||||
#ifdef HEAPTRACKER
|
||||
heaptracker_free_leaked_memory();
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
* implementation of camera_module functions
|
||||
*******************************************************************/
|
||||
|
||||
/* open device handle to one of the cameras
|
||||
*
|
||||
* assume camera service will keep singleton of each camera
|
||||
* so this function will always only be called once per camera instance
|
||||
*/
|
||||
|
||||
static int camera_device_open(const hw_module_t* module, const char* name, hw_device_t** device) {
|
||||
int rv = 0;
|
||||
int num_cameras = 0;
|
||||
int cameraid;
|
||||
wrapper_camera_device_t* camera_device = NULL;
|
||||
camera_device_ops_t* camera_ops = NULL;
|
||||
wasVideo = false;
|
||||
|
||||
Mutex::Autolock lock(gCameraWrapperLock);
|
||||
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
|
||||
if (name != NULL) {
|
||||
if (check_vendor_module()) return -EINVAL;
|
||||
|
||||
cameraid = atoi(name);
|
||||
num_cameras = gVendorModule->get_number_of_cameras();
|
||||
|
||||
fixed_set_params = (char**)malloc(sizeof(char*) * num_cameras);
|
||||
if (!fixed_set_params) {
|
||||
ALOGE("parameter memory allocation fail");
|
||||
rv = -ENOMEM;
|
||||
goto fail;
|
||||
}
|
||||
memset(fixed_set_params, 0, sizeof(char*) * num_cameras);
|
||||
|
||||
if (cameraid > num_cameras) {
|
||||
ALOGE(
|
||||
"camera service provided cameraid out of bounds, "
|
||||
"cameraid = %d, num supported = %d",
|
||||
cameraid, num_cameras);
|
||||
rv = -EINVAL;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
camera_device = (wrapper_camera_device_t*)malloc(sizeof(*camera_device));
|
||||
if (!camera_device) {
|
||||
ALOGE("camera_device allocation fail");
|
||||
rv = -ENOMEM;
|
||||
goto fail;
|
||||
}
|
||||
memset(camera_device, 0, sizeof(*camera_device));
|
||||
camera_device->camera_released = false;
|
||||
camera_device->id = cameraid;
|
||||
|
||||
int retries = OPEN_RETRIES;
|
||||
bool retry;
|
||||
do {
|
||||
rv = gVendorModule->common.methods->open(
|
||||
(const hw_module_t*)gVendorModule, name,
|
||||
(hw_device_t**)&(camera_device->vendor));
|
||||
retry = --retries > 0 && rv;
|
||||
if (retry)
|
||||
usleep(OPEN_RETRY_MSEC * 1000);
|
||||
} while (retry);
|
||||
if (rv) {
|
||||
ALOGE("vendor camera open fail");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
ALOGV("%s: got vendor camera device 0x%08X", __FUNCTION__,
|
||||
(uintptr_t)(camera_device->vendor));
|
||||
|
||||
camera_ops = (camera_device_ops_t*)malloc(sizeof(*camera_ops));
|
||||
if (!camera_ops) {
|
||||
ALOGE("camera_ops allocation fail");
|
||||
rv = -ENOMEM;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
memset(camera_ops, 0, sizeof(*camera_ops));
|
||||
|
||||
camera_device->base.common.tag = HARDWARE_DEVICE_TAG;
|
||||
camera_device->base.common.version = HARDWARE_DEVICE_API_VERSION(1, 0);
|
||||
camera_device->base.common.module = (hw_module_t*)(module);
|
||||
camera_device->base.common.close = camera_device_close;
|
||||
camera_device->base.ops = camera_ops;
|
||||
|
||||
camera_ops->set_preview_window = camera_set_preview_window;
|
||||
camera_ops->set_callbacks = camera_set_callbacks;
|
||||
camera_ops->enable_msg_type = camera_enable_msg_type;
|
||||
camera_ops->disable_msg_type = camera_disable_msg_type;
|
||||
camera_ops->msg_type_enabled = camera_msg_type_enabled;
|
||||
camera_ops->start_preview = camera_start_preview;
|
||||
camera_ops->stop_preview = camera_stop_preview;
|
||||
camera_ops->preview_enabled = camera_preview_enabled;
|
||||
camera_ops->store_meta_data_in_buffers = camera_store_meta_data_in_buffers;
|
||||
camera_ops->start_recording = camera_start_recording;
|
||||
camera_ops->stop_recording = camera_stop_recording;
|
||||
camera_ops->recording_enabled = camera_recording_enabled;
|
||||
camera_ops->release_recording_frame = camera_release_recording_frame;
|
||||
camera_ops->auto_focus = camera_auto_focus;
|
||||
camera_ops->cancel_auto_focus = camera_cancel_auto_focus;
|
||||
camera_ops->take_picture = camera_take_picture;
|
||||
camera_ops->cancel_picture = camera_cancel_picture;
|
||||
camera_ops->set_parameters = camera_set_parameters;
|
||||
camera_ops->get_parameters = camera_get_parameters;
|
||||
camera_ops->put_parameters = camera_put_parameters;
|
||||
camera_ops->send_command = camera_send_command;
|
||||
camera_ops->release = camera_release;
|
||||
camera_ops->dump = camera_dump;
|
||||
|
||||
*device = &camera_device->base.common;
|
||||
}
|
||||
|
||||
return rv;
|
||||
|
||||
fail:
|
||||
if (camera_device) {
|
||||
free(camera_device);
|
||||
camera_device = NULL;
|
||||
}
|
||||
if (camera_ops) {
|
||||
free(camera_ops);
|
||||
camera_ops = NULL;
|
||||
}
|
||||
*device = NULL;
|
||||
return rv;
|
||||
}
|
||||
|
||||
static int camera_get_number_of_cameras(void) {
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
if (check_vendor_module()) return 0;
|
||||
return gVendorModule->get_number_of_cameras();
|
||||
}
|
||||
|
||||
static int camera_get_camera_info(int camera_id, struct camera_info* info) {
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
if (check_vendor_module()) return 0;
|
||||
return gVendorModule->get_camera_info(camera_id, info);
|
||||
}
|
|
@ -18,9 +18,11 @@ vendor/lib/libllvm-qcom.so|fc96c949b662fb34b287a4c0aa194984fbb57d7d
|
|||
vendor/lib/libsc-a3xx.so|231201bcfead5f930537d2fba22d89b00e673386
|
||||
vendor/lib/libscale.so|b44f44c633fa404d10e76aaa23593b516e08e2b8
|
||||
|
||||
# Graphics firmware (same everywhere, so lets say Samsung G900FXXS1CQI4_G900FPHN1CQI2_PHN)
|
||||
vendor/firmware/a330_pfp.fw|3e2fcee7276ded819cf2d95864fdd6788a484ee1
|
||||
vendor/firmware/a330_pm4.fw|ae739ea812f9e4462d7bba8b9ead5782d4496618
|
||||
# Graphics firmware (Samsung Galaxy S5 Mini G800HXXU1CQC1_G800HXEO1CQB1)
|
||||
etc/firmware/a330_pfp.fw
|
||||
etc/firmware/a330_pm4.fw
|
||||
etc/firmware/a330_pfp.fw
|
||||
etc/firmware/a330_pm4.fw
|
||||
|
||||
# GPS (OnePlus bacon - lineage-14.1-20170807-nightly-bacon-signed.zip)
|
||||
vendor/lib/libloc_api_v02.so|9a8401afc86b54e73aa29995f228fd0243cee793
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2012-2013 The Android Open Source Project
|
||||
Copyright (C) 2014 The Linux Foundation. All rights reserved.
|
||||
<!-- Copyright (C) 2012-2013, The Linux Foundation. All rights reserved.
|
||||
Not a contribution.
|
||||
|
||||
Copyright (C) 2012 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
@ -17,34 +18,31 @@
|
|||
-->
|
||||
|
||||
<!--
|
||||
8974 Encoder capabilities
|
||||
8226 Encoder capabilities
|
||||
______________________________________________________
|
||||
| Codec | W H fps Mbps MB/s |
|
||||
|__________|_________________________________________|
|
||||
| h264 | 3840 2160 30 100 972000 |
|
||||
| | 4096 2160 24 100 829440 |
|
||||
| mpeg4 | 1920 1088 30 40 244800 |
|
||||
| vp8 | 1920 1088 30 20 244800 |
|
||||
| h264 | 1920 1088 30 20 244800 |
|
||||
| mpeg4 | 1920 1088 30 20 244800 |
|
||||
| h263 | 864 480 30 2 48600 |
|
||||
|__________|_________________________________________|
|
||||
|
||||
8974 Decoder capabilities
|
||||
8226 Decoder capabilities
|
||||
______________________________________________________
|
||||
| Codec | W H fps Mbps MB/s |
|
||||
|__________|_________________________________________|
|
||||
| h264 | 3840 2160 30 100 972000 |
|
||||
| | 4096 2160 24 100 829440 |
|
||||
| mpeg4 | 1920 1088 60 60 489600 |
|
||||
| vc1 | 1920 1088 60 60 489600 |
|
||||
| vp8 | 3820 2160 30 20 972000 |
|
||||
| h264 | 1920 1088 30 20 244800 |
|
||||
| hevc | 1280 720 30 2 108000 |
|
||||
| mpeg4 | 1920 1088 30 20 244800 |
|
||||
| vc1 | 1920 1088 30 20 244800 |
|
||||
| vp8 | 1920 1088 30 20 244800 |
|
||||
| divx3 | 720 480 30 2 40500 |
|
||||
| div4/5/6 | 1920 1088 30 10 244800 |
|
||||
| h263 | 864 480 30 2 48600 |
|
||||
| mpeg2 | 1920 1088 30 40 244800 |
|
||||
| mpeg2 | 1920 1088 30 20 244800 |
|
||||
|__________|_________________________________________|
|
||||
|
||||
-->
|
||||
|
||||
<MediaCodecs>
|
||||
<Include href="media_codecs_google_audio.xml" />
|
||||
<Include href="media_codecs_google_telephony.xml" />
|
||||
|
@ -52,16 +50,25 @@
|
|||
<Setting name="max-video-encoder-input-buffers" value="9" />
|
||||
</Settings>
|
||||
<Encoders>
|
||||
<!-- Audio Hardware -->
|
||||
<MediaCodec name="OMX.qcom.audio.encoder.evrc" type="audio/evrc" >
|
||||
<Quirk name="requires-allocate-on-input-ports" />
|
||||
<Quirk name="requires-allocate-on-output-ports" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.qcom.audio.encoder.qcelp13" type="audio/qcelp" >
|
||||
<Quirk name="requires-allocate-on-input-ports" />
|
||||
<Quirk name="requires-allocate-on-output-ports" />
|
||||
</MediaCodec>
|
||||
<!-- Video Hardware -->
|
||||
<MediaCodec name="OMX.qcom.video.encoder.avc" type="video/avc" >
|
||||
<Quirk name="requires-allocate-on-input-ports" />
|
||||
<Quirk name="requires-allocate-on-output-ports" />
|
||||
<Quirk name="requires-loaded-to-idle-after-allocation" />
|
||||
<Limit name="size" min="96x64" max="4096x2160" />
|
||||
<Limit name="size" min="96x64" max="1920x1088" />
|
||||
<Limit name="alignment" value="2x2" />
|
||||
<Limit name="block-size" value="16x16" />
|
||||
<Limit name="blocks-per-second" min="1" max="972000" />
|
||||
<Limit name="bitrate" range="1-100000000" />
|
||||
<Limit name="blocks-per-second" min="1" max="244800" />
|
||||
<Limit name="bitrate" range="1-20000000" />
|
||||
<Limit name="concurrent-instances" max="13" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.qcom.video.encoder.mpeg4" type="video/mp4v-es" >
|
||||
|
@ -72,7 +79,7 @@
|
|||
<Limit name="alignment" value="2x2" />
|
||||
<Limit name="block-size" value="16x16" />
|
||||
<Limit name="blocks-per-second" min="1" max="244800" />
|
||||
<Limit name="bitrate" range="1-40000000" />
|
||||
<Limit name="bitrate" range="1-20000000" />
|
||||
<Limit name="concurrent-instances" max="13" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.qcom.video.encoder.h263" type="video/3gpp" >
|
||||
|
@ -86,43 +93,51 @@
|
|||
<Limit name="bitrate" range="1-2000000" />
|
||||
<Limit name="concurrent-instances" max="13" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.qcom.video.encoder.vp8" type="video/x-vnd.on2.vp8" >
|
||||
<Quirk name="requires-allocate-on-input-ports" />
|
||||
<Quirk name="requires-allocate-on-output-ports" />
|
||||
<Quirk name="requires-loaded-to-idle-after-allocation" />
|
||||
<Limit name="size" min="96x64" max="1920x1088" />
|
||||
<Limit name="alignment" value="2x2" />
|
||||
<Limit name="block-size" value="16x16" />
|
||||
<Limit name="blocks-per-second" min="1" max="244800" />
|
||||
<Limit name="bitrate" range="1-20000000" />
|
||||
<Limit name="concurrent-instances" max="13" />
|
||||
</MediaCodec>
|
||||
</Encoders>
|
||||
|
||||
<Decoders>
|
||||
<!-- Audio Hardware -->
|
||||
<MediaCodec name="OMX.qcom.audio.decoder.wma" type="audio/x-ms-wma" >
|
||||
<Quirk name="requires-global-flush" />
|
||||
<Quirk name="requires-wma-pro-component" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.qcom.audio.decoder.wmaLossLess" type="audio/x-ms-wma" >
|
||||
<Quirk name="requires-global-flush" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.qcom.audio.decoder.wma10Pro" type="audio/x-ms-wma" >
|
||||
<Quirk name="requires-global-flush" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.qcom.audio.decoder.amrwbplus" type="audio/amr-wb-plus" >
|
||||
</MediaCodec>
|
||||
<!-- Audio Software -->
|
||||
<MediaCodec name="OMX.qcom.audio.decoder.Qcelp13" type="audio/qcelp" >
|
||||
<Quirk name="requires-global-flush" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.qcom.audio.decoder.evrc" type="audio/evrc" >
|
||||
<Quirk name="requires-global-flush" />
|
||||
</MediaCodec>
|
||||
<!-- Video Hardware -->
|
||||
<MediaCodec name="OMX.qcom.video.decoder.avc" type="video/avc" >
|
||||
<Quirk name="requires-allocate-on-input-ports" />
|
||||
<Quirk name="requires-allocate-on-output-ports" />
|
||||
<Limit name="size" min="64x64" max="4096x2160" />
|
||||
<Limit name="size" min="64x64" max="1920x1088" />
|
||||
<Limit name="alignment" value="2x2" />
|
||||
<Limit name="block-size" value="16x16" />
|
||||
<Limit name="blocks-per-second" min="1" max="972000" />
|
||||
<Limit name="bitrate" range="1-100000000" />
|
||||
<Limit name="blocks-per-second" min="1" max="244800" />
|
||||
<Limit name="bitrate" range="1-20000000" />
|
||||
<Feature name="adaptive-playback" />
|
||||
<Limit name="concurrent-instances" max="13" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.qcom.video.decoder.avc.secure" type="video/avc" >
|
||||
<Quirk name="requires-allocate-on-input-ports" />
|
||||
<Quirk name="requires-allocate-on-output-ports" />
|
||||
<Limit name="size" min="64x64" max="4096x2160" />
|
||||
<Limit name="size" min="64x64" max="1920x1088" />
|
||||
<Limit name="alignment" value="2x2" />
|
||||
<Limit name="block-size" value="16x16" />
|
||||
<Limit name="blocks-per-second" min="1" max="972000" />
|
||||
<Limit name="bitrate" range="1-100000000" />
|
||||
<Limit name="blocks-per-second" min="1" max="244800" />
|
||||
<Limit name="bitrate" range="1-20000000" />
|
||||
<Feature name="adaptive-playback" />
|
||||
<Feature name="secure-playback" required="true" />
|
||||
<Limit name="concurrent-instances" max="4" />
|
||||
<Limit name="concurrent-instances" max="3" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.qcom.video.decoder.mpeg2" type="video/mpeg2" >
|
||||
<Quirk name="requires-allocate-on-input-ports" />
|
||||
|
@ -131,30 +146,18 @@
|
|||
<Limit name="alignment" value="2x2" />
|
||||
<Limit name="block-size" value="16x16" />
|
||||
<Limit name="blocks-per-second" min="1" max="244800" />
|
||||
<Limit name="bitrate" range="1-40000000" />
|
||||
<Limit name="bitrate" range="1-20000000" />
|
||||
<Feature name="adaptive-playback" />
|
||||
<Limit name="concurrent-instances" max="13" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.qcom.video.decoder.mpeg2.secure" type="video/mpeg2" >
|
||||
<Quirk name="requires-allocate-on-input-ports" />
|
||||
<Quirk name="requires-allocate-on-output-ports" />
|
||||
<Limit name="size" min="96x64" max="1920x1088" />
|
||||
<Limit name="alignment" value="2x2" />
|
||||
<Limit name="block-size" value="16x16" />
|
||||
<Limit name="blocks-per-second" min="1" max="244800" />
|
||||
<Limit name="bitrate" range="1-40000000" />
|
||||
<Feature name="adaptive-playback" />
|
||||
<Feature name="secure-playback" required="true" />
|
||||
<Limit name="concurrent-instances" max="13" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.qcom.video.decoder.mpeg4" type="video/mp4v-es" >
|
||||
<Quirk name="requires-allocate-on-input-ports" />
|
||||
<Quirk name="requires-allocate-on-output-ports" />
|
||||
<Limit name="size" min="64x64" max="1920x1088" />
|
||||
<Limit name="alignment" value="2x2" />
|
||||
<Limit name="block-size" value="16x16" />
|
||||
<Limit name="blocks-per-second" min="1" max="489600" />
|
||||
<Limit name="bitrate" range="1-60000000" />
|
||||
<Limit name="blocks-per-second" min="1" max="244800" />
|
||||
<Limit name="bitrate" range="1-20000000" />
|
||||
<Feature name="adaptive-playback" />
|
||||
<Limit name="concurrent-instances" max="13" />
|
||||
</MediaCodec>
|
||||
|
@ -175,10 +178,10 @@
|
|||
<Limit name="size" min="64x64" max="1920x1088" />
|
||||
<Limit name="alignment" value="2x2" />
|
||||
<Limit name="block-size" value="16x16" />
|
||||
<Limit name="blocks-per-second" min="1" max="489600" />
|
||||
<Limit name="bitrate" range="1-60000000" />
|
||||
<Limit name="blocks-per-second" min="1" max="244800" />
|
||||
<Limit name="bitrate" range="1-20000000" />
|
||||
<Feature name="adaptive-playback" />
|
||||
<Limit name="concurrent-instances" max="13" />
|
||||
<Limit name="concurrent-instances" max="8" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.qcom.video.decoder.divx" type="video/divx" >
|
||||
<Quirk name="requires-allocate-on-input-ports" />
|
||||
|
@ -189,7 +192,7 @@
|
|||
<Limit name="blocks-per-second" min="1" max="244800" />
|
||||
<Limit name="bitrate" range="1-10000000" />
|
||||
<Feature name="adaptive-playback" />
|
||||
<Limit name="concurrent-instances" max="13" />
|
||||
<Limit name="concurrent-instances" max="8" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.qcom.video.decoder.divx311" type="video/divx311" >
|
||||
<Quirk name="requires-allocate-on-input-ports" />
|
||||
|
@ -200,7 +203,7 @@
|
|||
<Limit name="blocks-per-second" min="1" max="40500" />
|
||||
<Limit name="bitrate" range="1-2000000" />
|
||||
<Feature name="adaptive-playback" />
|
||||
<Limit name="concurrent-instances" max="13" />
|
||||
<Limit name="concurrent-instances" max="8" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.qcom.video.decoder.divx4" type="video/divx4" >
|
||||
<Quirk name="requires-allocate-on-input-ports" />
|
||||
|
@ -211,19 +214,32 @@
|
|||
<Limit name="blocks-per-second" min="1" max="244800" />
|
||||
<Limit name="bitrate" range="1-10000000" />
|
||||
<Feature name="adaptive-playback" />
|
||||
<Limit name="concurrent-instances" max="13" />
|
||||
<Limit name="concurrent-instances" max="8" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.qcom.video.decoder.vp8" type="video/x-vnd.on2.vp8" >
|
||||
<Quirk name="requires-allocate-on-input-ports" />
|
||||
<Quirk name="requires-allocate-on-output-ports" />
|
||||
<Limit name="size" min="64x64" max="3840x2160" />
|
||||
<Limit name="size" min="64x64" max="1920x1088" />
|
||||
<Limit name="alignment" value="2x2" />
|
||||
<Limit name="block-size" value="16x16" />
|
||||
<Limit name="blocks-per-second" min="1" max="972000" />
|
||||
<Limit name="blocks-per-second" min="1" max="244800" />
|
||||
<Limit name="bitrate" range="1-20000000" />
|
||||
<Feature name="adaptive-playback" />
|
||||
<Limit name="concurrent-instances" max="13" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.qcom.video.decoder.hevchybrid" type="video/hevc" >
|
||||
<Quirk name="requires-allocate-on-input-ports" />
|
||||
<Quirk name="requires-allocate-on-output-ports" />
|
||||
<Limit name="size" min="64x64" max="1280x720" />
|
||||
<Limit name="alignment" value="2x2" />
|
||||
<Limit name="block-size" value="16x16" />
|
||||
<Limit name="blocks-per-second" min="1" max="108000" />
|
||||
<Limit name="bitrate" range="1-2000000" />
|
||||
<Feature name="adaptive-playback" />
|
||||
<Limit name="concurrent-instances" max="3" />
|
||||
</MediaCodec>
|
||||
</Decoders>
|
||||
<Include href="media_codecs_google_video.xml" />
|
||||
<Include href="media_codecs_google_audio.xml" />
|
||||
<Include href="media_codecs_google_video_le.xml" />
|
||||
<Include href="media_codecs_google_telephony.xml" />
|
||||
</MediaCodecs>
|
||||
|
|
1043
configs/wifi/hostapd_default.conf
Normal file
1043
configs/wifi/hostapd_default.conf
Normal file
File diff suppressed because it is too large
Load diff
10
configs/wifi/p2p_supplicant_overlay.conf
Normal file
10
configs/wifi/p2p_supplicant_overlay.conf
Normal file
|
@ -0,0 +1,10 @@
|
|||
disable_scan_offload=1
|
||||
p2p_listen_reg_class=81
|
||||
p2p_listen_channel=1
|
||||
p2p_oper_reg_class=124
|
||||
p2p_oper_channel=149
|
||||
manufacturer=SAMSUNG_ELECTRONICS
|
||||
model_name=SAMSUNG_MOBILE
|
||||
model_number=2014
|
||||
serial_number=19691101
|
||||
update_config=1
|
4
configs/wifi/wpa_supplicant_overlay.conf
Normal file
4
configs/wifi/wpa_supplicant_overlay.conf
Normal file
|
@ -0,0 +1,4 @@
|
|||
disable_scan_offload=1
|
||||
p2p_disabled=1
|
||||
update_config=1
|
||||
p2p_no_group_iface=1
|
|
@ -23,7 +23,7 @@ if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi
|
|||
|
||||
# Override anything that may come from the calling environment
|
||||
CM_ROOT="$MY_DIR"/../../..
|
||||
BOARD=msm8974
|
||||
BOARD=msm8226
|
||||
DEVICE_COMMON=${BOARD}-common
|
||||
VENDOR=samsung
|
||||
|
||||
|
|
|
@ -21,11 +21,11 @@ include $(CLEAR_VARS)
|
|||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_C_INCLUDES := system/core/init
|
||||
LOCAL_CFLAGS := -Wall -DANDROID_TARGET=\"$(TARGET_BOARD_PLATFORM)\"
|
||||
LOCAL_SRC_FILES := init_msm8974.cpp
|
||||
ifneq ($(TARGET_LIBINIT_MSM8974_DEFINES_FILE),)
|
||||
LOCAL_SRC_FILES += ../../../../$(TARGET_LIBINIT_MSM8974_DEFINES_FILE)
|
||||
LOCAL_SRC_FILES := init_msm8226.cpp
|
||||
ifneq ($(TARGET_LIBINIT_MSM8226_DEFINES_FILE),)
|
||||
LOCAL_SRC_FILES += ../../../../$(TARGET_LIBINIT_MSM8226_DEFINES_FILE)
|
||||
endif
|
||||
LOCAL_MODULE := libinit_msm8974
|
||||
LOCAL_MODULE := libinit_msm8226
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := libbase
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
#include "vendor_init.h"
|
||||
#include "property_service.h"
|
||||
|
||||
#include "init_msm8974.h"
|
||||
#include "init_msm8226.h"
|
||||
|
||||
using android::init::property_set;
|
||||
|
||||
|
@ -70,59 +70,8 @@ void property_override_dual(char const system_prop[],
|
|||
property_override(vendor_prop, value);
|
||||
}
|
||||
|
||||
static int read_file2(const char *fname, char *data, int max_size)
|
||||
{
|
||||
int fd, rc;
|
||||
|
||||
if (max_size < 1)
|
||||
return 0;
|
||||
|
||||
fd = open(fname, O_RDONLY);
|
||||
if (fd < 0) {
|
||||
LOG(ERROR) << "failed to open " << fname << std::endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
rc = read(fd, data, max_size - 1);
|
||||
if ((rc > 0) && (rc < max_size))
|
||||
data[rc] = '\0';
|
||||
else
|
||||
data[0] = '\0';
|
||||
close(fd);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void init_alarm_boot_properties()
|
||||
{
|
||||
char const *alarm_file = "/proc/sys/kernel/boot_reason";
|
||||
char buf[64];
|
||||
|
||||
if (read_file2(alarm_file, buf, sizeof(buf))) {
|
||||
/*
|
||||
* Setup ro.alarm_boot value to true when it is RTC triggered boot up
|
||||
* For existing PMIC chips, the following mapping applies
|
||||
* for the value of boot_reason:
|
||||
*
|
||||
* 0 -> unknown
|
||||
* 1 -> hard reset
|
||||
* 2 -> sudden momentary power loss (SMPL)
|
||||
* 3 -> real time clock (RTC)
|
||||
* 4 -> DC charger inserted
|
||||
* 5 -> USB charger insertd
|
||||
* 6 -> PON1 pin toggled (for secondary PMICs)
|
||||
* 7 -> CBLPWR_N pin toggled (for external power supply)
|
||||
* 8 -> KPDPWR_N pin toggled (power key pressed)
|
||||
*/
|
||||
if (buf[0] == '3')
|
||||
property_set("ro.alarm_boot", "true");
|
||||
else
|
||||
property_set("ro.alarm_boot", "false");
|
||||
}
|
||||
}
|
||||
|
||||
void vendor_load_properties()
|
||||
{
|
||||
init_target_properties();
|
||||
init_alarm_boot_properties();
|
||||
}
|
|
@ -28,12 +28,12 @@
|
|||
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef __INIT_MSM8974__H__
|
||||
#define __INIT_MSM8974__H__
|
||||
#ifndef __INIT_MSM8226__H__
|
||||
#define __INIT_MSM8226__H__
|
||||
|
||||
void init_target_properties();
|
||||
void property_override(char const prop[], char const value[]);
|
||||
void property_override_dual(char const system_prop[],
|
||||
char const vendor_prop[], char const value[]);
|
||||
|
||||
#endif /* __INIT_MSM8974__H__ */
|
||||
#endif /* __INIT_MSM8226__H__ */
|
3
keylayout/Button_Jack.kl
Normal file
3
keylayout/Button_Jack.kl
Normal file
|
@ -0,0 +1,3 @@
|
|||
key 256 HEADSETHOOK
|
||||
key 257 VOLUME_UP
|
||||
key 258 VOLUME_DOWN
|
|
@ -1,393 +0,0 @@
|
|||
# Copyright (C) 2010 The Android Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
#
|
||||
# Generic key layout file for full alphabetic US English PC style external keyboards.
|
||||
#
|
||||
# This file is intentionally very generic and is intended to support a broad rang of keyboards.
|
||||
# Do not edit the generic key layout to support a specific keyboard; instead, create
|
||||
# a new key layout file with the required keyboard configuration.
|
||||
#
|
||||
|
||||
key 1 BACK
|
||||
key 2 1
|
||||
key 3 2
|
||||
key 4 3
|
||||
key 5 4
|
||||
key 6 5
|
||||
key 7 6
|
||||
key 8 7
|
||||
key 9 8
|
||||
key 10 9
|
||||
key 11 0
|
||||
key 12 MINUS
|
||||
key 13 EQUALS
|
||||
key 14 DEL
|
||||
key 15 TAB
|
||||
key 16 Q
|
||||
key 17 W
|
||||
key 18 E
|
||||
key 19 R
|
||||
key 20 T
|
||||
key 21 Y
|
||||
key 22 U
|
||||
key 23 I
|
||||
key 24 O
|
||||
key 25 P
|
||||
key 26 LEFT_BRACKET
|
||||
key 27 RIGHT_BRACKET
|
||||
key 28 ENTER
|
||||
key 29 CTRL_LEFT
|
||||
key 30 A
|
||||
key 31 S
|
||||
key 32 D
|
||||
key 33 F
|
||||
key 34 G
|
||||
key 35 H
|
||||
key 36 J
|
||||
key 37 K
|
||||
key 38 L
|
||||
key 39 SEMICOLON
|
||||
key 40 APOSTROPHE
|
||||
key 41 GRAVE
|
||||
key 42 SHIFT_LEFT
|
||||
key 43 BACKSLASH
|
||||
key 44 Z
|
||||
key 45 X
|
||||
key 46 C
|
||||
key 47 V
|
||||
key 48 B
|
||||
key 49 N
|
||||
key 50 M
|
||||
key 51 COMMA
|
||||
key 52 PERIOD
|
||||
key 53 SLASH
|
||||
key 54 SHIFT_RIGHT
|
||||
key 55 NUMPAD_MULTIPLY
|
||||
key 56 ALT_LEFT
|
||||
key 57 SPACE
|
||||
key 58 CAPS_LOCK
|
||||
key 59 F1
|
||||
key 60 F2
|
||||
key 61 F3
|
||||
key 62 F4
|
||||
key 63 F5
|
||||
key 64 F6
|
||||
key 65 F7
|
||||
key 66 F8
|
||||
key 67 F9
|
||||
key 68 F10
|
||||
key 69 NUM_LOCK
|
||||
key 70 SCROLL_LOCK
|
||||
key 71 NUMPAD_7
|
||||
key 72 NUMPAD_8
|
||||
key 73 NUMPAD_9
|
||||
key 74 NUMPAD_SUBTRACT
|
||||
key 75 NUMPAD_4
|
||||
key 76 NUMPAD_5
|
||||
key 77 NUMPAD_6
|
||||
key 78 NUMPAD_ADD
|
||||
key 79 NUMPAD_1
|
||||
key 80 NUMPAD_2
|
||||
key 81 NUMPAD_3
|
||||
key 82 NUMPAD_0
|
||||
key 83 NUMPAD_DOT
|
||||
# key 84 (undefined)
|
||||
# key 85 "KEY_ZENKAKUHANKAKU"
|
||||
key 86 BACKSLASH
|
||||
key 87 F11
|
||||
key 88 F12
|
||||
# key 89 "KEY_RO"
|
||||
# key 90 "KEY_KATAKANA"
|
||||
# key 91 "KEY_HIRAGANA"
|
||||
# key 92 "KEY_HENKAN"
|
||||
# key 93 "KEY_KATAKANAHIRAGANA"
|
||||
# key 94 "KEY_MUHENKAN"
|
||||
key 95 NUMPAD_COMMA
|
||||
key 96 NUMPAD_ENTER
|
||||
key 97 CTRL_RIGHT
|
||||
key 98 NUMPAD_DIVIDE
|
||||
key 99 SYSRQ
|
||||
key 100 ALT_GR
|
||||
# key 101 "KEY_LINEFEED"
|
||||
key 102 MOVE_HOME
|
||||
key 103 DPAD_UP
|
||||
key 104 PAGE_UP
|
||||
key 105 DPAD_LEFT
|
||||
key 106 DPAD_RIGHT
|
||||
key 107 MOVE_END
|
||||
key 108 DPAD_DOWN
|
||||
key 109 PAGE_DOWN
|
||||
key 110 INSERT
|
||||
key 111 FORWARD_DEL
|
||||
# key 112 "KEY_MACRO"
|
||||
key 113 MUTE
|
||||
key 114 VOLUME_DOWN
|
||||
key 115 VOLUME_UP
|
||||
key 116 POWER WAKE
|
||||
key 117 NUMPAD_EQUALS
|
||||
# key 118 "KEY_KPPLUSMINUS"
|
||||
key 119 BREAK
|
||||
# key 120 (undefined)
|
||||
key 121 NUMPAD_COMMA
|
||||
# key 122 "KEY_HANGEUL"
|
||||
# key 123 "KEY_HANJA"
|
||||
# key 124 "KEY_YEN"
|
||||
key 125 META_LEFT
|
||||
key 126 META_RIGHT
|
||||
key 127 MENU WAKE_DROPPED
|
||||
key 128 MEDIA_STOP
|
||||
# key 129 "KEY_AGAIN"
|
||||
# key 130 "KEY_PROPS"
|
||||
# key 131 "KEY_UNDO"
|
||||
# key 132 "KEY_FRONT"
|
||||
# key 133 "KEY_COPY"
|
||||
# key 134 "KEY_OPEN"
|
||||
# key 135 "KEY_PASTE"
|
||||
# key 136 "KEY_FIND"
|
||||
# key 137 "KEY_CUT"
|
||||
# key 138 "KEY_HELP"
|
||||
key 139 MENU WAKE_DROPPED
|
||||
# key 140 "KEY_CALC"
|
||||
# key 141 "KEY_SETUP"
|
||||
# key 142 "KEY_SLEEP"
|
||||
# key 143 "KEY_WAKEUP"
|
||||
# key 144 "KEY_FILE"
|
||||
# key 145 "KEY_SENDFILE"
|
||||
# key 146 "KEY_DELETEFILE"
|
||||
# key 147 "KEY_XFER"
|
||||
# key 148 "KEY_PROG1"
|
||||
# key 149 "KEY_PROG2"
|
||||
key 150 EXPLORER
|
||||
# key 151 "KEY_MSDOS"
|
||||
# key 152 "KEY_COFFEE"
|
||||
key 152 POWER WAKE
|
||||
# key 153 "KEY_DIRECTION"
|
||||
# key 154 "KEY_CYCLEWINDOWS"
|
||||
key 155 EMAIL
|
||||
key 156 BOOKMARK
|
||||
# key 157 "KEY_COMPUTER"
|
||||
key 158 BACK WAKE_DROPPED
|
||||
key 159 FORWARD
|
||||
key 160 MEDIA_CLOSE
|
||||
key 161 MEDIA_EJECT
|
||||
key 162 MEDIA_EJECT
|
||||
key 163 MEDIA_NEXT
|
||||
key 164 MEDIA_PLAY_PAUSE
|
||||
key 165 MEDIA_PREVIOUS
|
||||
key 166 MEDIA_STOP
|
||||
key 167 MEDIA_RECORD
|
||||
key 168 MEDIA_REWIND
|
||||
key 169 CALL
|
||||
# key 170 "KEY_ISO"
|
||||
# key 171 "KEY_CONFIG"
|
||||
key 172 HOME
|
||||
# key 173 "KEY_REFRESH"
|
||||
# key 174 "KEY_EXIT"
|
||||
# key 175 "KEY_MOVE"
|
||||
# key 176 "KEY_EDIT"
|
||||
key 177 PAGE_UP
|
||||
key 178 PAGE_DOWN
|
||||
key 179 NUMPAD_LEFT_PAREN
|
||||
key 180 NUMPAD_RIGHT_PAREN
|
||||
# key 181 "KEY_NEW"
|
||||
# key 182 "KEY_REDO"
|
||||
# key 183 F13
|
||||
# key 184 F14
|
||||
# key 185 F15
|
||||
# key 186 F16
|
||||
# key 187 F17
|
||||
# key 188 F18
|
||||
# key 189 F19
|
||||
# key 190 F20
|
||||
# key 191 F21
|
||||
# key 192 F22
|
||||
# key 193 F23
|
||||
# key 194 F24
|
||||
# key 195 (undefined)
|
||||
# key 196 (undefined)
|
||||
# key 197 (undefined)
|
||||
# key 198 (undefined)
|
||||
# key 199 (undefined)
|
||||
key 200 MEDIA_PLAY
|
||||
key 201 MEDIA_PAUSE
|
||||
# key 202 "KEY_PROG3"
|
||||
# key 203 "KEY_PROG4"
|
||||
# key 204 (undefined)
|
||||
# key 205 "KEY_SUSPEND"
|
||||
# key 206 "KEY_CLOSE"
|
||||
key 207 MEDIA_PLAY
|
||||
key 208 MEDIA_FAST_FORWARD
|
||||
# key 209 "KEY_BASSBOOST"
|
||||
# key 210 "KEY_PRINT"
|
||||
# key 211 "KEY_HP"
|
||||
key 212 CAMERA
|
||||
# key 213 "KEY_SOUND"
|
||||
# key 214 "KEY_QUESTION"
|
||||
key 215 ENVELOPE
|
||||
# key 216 "KEY_CHAT"
|
||||
key 217 SEARCH
|
||||
# key 218 "KEY_CONNECT"
|
||||
# key 219 "KEY_FINANCE"
|
||||
# key 220 "KEY_SPORT"
|
||||
# key 221 "KEY_SHOP"
|
||||
# key 222 "KEY_ALTERASE"
|
||||
# key 223 "KEY_CANCEL"
|
||||
key 224 BRIGHTNESS_DOWN
|
||||
key 225 BRIGHTNESS_UP
|
||||
key 226 HEADSETHOOK
|
||||
key 227 STAR
|
||||
key 228 POUND
|
||||
key 229 SOFT_LEFT
|
||||
key 230 SOFT_RIGHT
|
||||
key 231 CALL
|
||||
key 232 DPAD_CENTER
|
||||
key 233 HEADSETHOOK
|
||||
# key 234 "KEY_0_5" or "KEY_SAVE"
|
||||
# key 235 "KEY_2_5" or "KEY_DOCUMENTS"
|
||||
# key 236 "KEY_SWITCHVIDEOMODE" or "KEY_BATTERY"
|
||||
# key 237 "KEY_KBDILLUMTOGGLE"
|
||||
# key 238 "KEY_KBDILLUMDOWN"
|
||||
# key 239 "KEY_KBDILLUMUP"
|
||||
# key 240 "KEY_UNKNOWN"
|
||||
|
||||
|
||||
key 304 BUTTON_A
|
||||
key 305 BUTTON_B
|
||||
key 306 BUTTON_C
|
||||
key 307 BUTTON_X
|
||||
key 308 BUTTON_Y
|
||||
key 309 BUTTON_Z
|
||||
key 310 BUTTON_L1
|
||||
key 311 BUTTON_R1
|
||||
key 312 BUTTON_L2
|
||||
key 313 BUTTON_R2
|
||||
key 314 BUTTON_SELECT
|
||||
key 315 BUTTON_START
|
||||
key 316 BUTTON_MODE
|
||||
key 317 BUTTON_THUMBL
|
||||
key 318 BUTTON_THUMBR
|
||||
|
||||
|
||||
# key 352 "KEY_OK"
|
||||
# key 353 "KEY_SELECT"
|
||||
# key 354 "KEY_GOTO"
|
||||
# key 355 "KEY_CLEAR"
|
||||
# key 356 "KEY_POWER2"
|
||||
# key 357 "KEY_OPTION"
|
||||
# key 358 "KEY_INFO"
|
||||
# key 359 "KEY_TIME"
|
||||
# key 360 "KEY_VENDOR"
|
||||
# key 361 "KEY_ARCHIVE"
|
||||
key 362 GUIDE
|
||||
# key 363 "KEY_CHANNEL"
|
||||
# key 364 "KEY_FAVORITES"
|
||||
# key 365 "KEY_EPG"
|
||||
key 366 DVR
|
||||
# key 367 "KEY_MHP"
|
||||
# key 368 "KEY_LANGUAGE"
|
||||
key 368 LANG
|
||||
# key 369 "KEY_TITLE"
|
||||
# key 370 "KEY_SUBTITLE"
|
||||
# key 371 "KEY_ANGLE"
|
||||
# key 372 "KEY_ZOOM"
|
||||
# key 373 "KEY_MODE"
|
||||
# key 374 "KEY_KEYBOARD"
|
||||
# key 375 "KEY_SCREEN"
|
||||
# key 376 "KEY_PC"
|
||||
key 377 TV
|
||||
# key 378 "KEY_TV2"
|
||||
# key 379 "KEY_VCR"
|
||||
# key 380 "KEY_VCR2"
|
||||
# key 381 "KEY_SAT"
|
||||
# key 382 "KEY_SAT2"
|
||||
# key 383 "KEY_CD"
|
||||
# key 384 "KEY_TAPE"
|
||||
# key 385 "KEY_RADIO"
|
||||
# key 386 "KEY_TUNER"
|
||||
# key 387 "KEY_PLAYER"
|
||||
# key 388 "KEY_TEXT"
|
||||
# key 389 "KEY_DVD"
|
||||
# key 390 "KEY_AUX"
|
||||
# key 391 "KEY_MP3"
|
||||
# key 392 "KEY_AUDIO"
|
||||
# key 393 "KEY_VIDEO"
|
||||
# key 394 "KEY_DIRECTORY"
|
||||
# key 395 "KEY_LIST"
|
||||
# key 396 "KEY_MEMO"
|
||||
# key 397 "KEY_CALENDAR"
|
||||
# key 398 "KEY_RED"
|
||||
# key 399 "KEY_GREEN"
|
||||
# key 400 "KEY_YELLOW"
|
||||
# key 401 "KEY_BLUE"
|
||||
key 402 CHANNEL_UP
|
||||
key 403 CHANNEL_DOWN
|
||||
# key 404 "KEY_FIRST"
|
||||
# key 405 "KEY_LAST"
|
||||
# key 406 "KEY_AB"
|
||||
# key 407 "KEY_NEXT"
|
||||
# key 408 "KEY_RESTART"
|
||||
# key 409 "KEY_SLOW"
|
||||
# key 410 "KEY_SHUFFLE"
|
||||
# key 411 "KEY_BREAK"
|
||||
# key 412 "KEY_PREVIOUS"
|
||||
# key 413 "KEY_DIGITS"
|
||||
# key 414 "KEY_TEEN"
|
||||
# key 415 "KEY_TWEN"
|
||||
|
||||
|
||||
# key 448 "KEY_DEL_EOL"
|
||||
# key 449 "KEY_DEL_EOS"
|
||||
# key 450 "KEY_INS_LINE"
|
||||
# key 451 "KEY_DEL_LINE"
|
||||
|
||||
|
||||
key 464 FUNCTION
|
||||
key 465 ESCAPE FUNCTION
|
||||
key 466 F1 FUNCTION
|
||||
key 467 F2 FUNCTION
|
||||
key 468 F3 FUNCTION
|
||||
key 469 F4 FUNCTION
|
||||
key 470 F5 FUNCTION
|
||||
key 471 F6 FUNCTION
|
||||
key 472 F7 FUNCTION
|
||||
key 473 F8 FUNCTION
|
||||
key 474 F9 FUNCTION
|
||||
key 475 F10 FUNCTION
|
||||
key 476 F11 FUNCTION
|
||||
key 477 F12 FUNCTION
|
||||
key 478 1 FUNCTION
|
||||
key 479 2 FUNCTION
|
||||
key 480 D FUNCTION
|
||||
key 481 E FUNCTION
|
||||
key 482 F FUNCTION
|
||||
key 483 S FUNCTION
|
||||
key 484 B FUNCTION
|
||||
|
||||
|
||||
# key 497 KEY_BRL_DOT1
|
||||
# key 498 KEY_BRL_DOT2
|
||||
# key 499 KEY_BRL_DOT3
|
||||
# key 500 KEY_BRL_DOT4
|
||||
# key 501 KEY_BRL_DOT5
|
||||
# key 502 KEY_BRL_DOT6
|
||||
# key 503 KEY_BRL_DOT7
|
||||
# key 504 KEY_BRL_DOT8
|
||||
|
||||
|
||||
key 704 RECENTAPPS
|
||||
key 705 APPLICATION
|
||||
key 706 SIP_ON_OFF
|
||||
key 707 VOICESEARCH
|
||||
key 708 QPANEL_ON_OFF
|
|
@ -1,116 +0,0 @@
|
|||
# Copyright (c) 2011, Code Aurora Forum. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
# Function keys
|
||||
key 59 MENU WAKE
|
||||
key 60 HOME WAKE
|
||||
key 61 CALL WAKE_DROPPED
|
||||
key 62 BACK WAKE_DROPPED
|
||||
key 63 ENDCALL WAKE_DROPPED
|
||||
key 64 MEDIA_NEXT WAKE
|
||||
key 65 MEDIA_PLAY_PAUSE WAKE
|
||||
key 66 MEDIA_PREVIOUS WAKE
|
||||
key 67 MEDIA_STOP WAKE
|
||||
key 68 CAMERA
|
||||
key 87 POWER WAKE
|
||||
key 217 SEARCH WAKE_DROPPED
|
||||
|
||||
# Row 2
|
||||
key 2 1 WAKE_DROPPED
|
||||
key 3 2 WAKE_DROPPED
|
||||
key 4 3 WAKE_DROPPED
|
||||
key 5 4 WAKE_DROPPED
|
||||
key 6 5 WAKE_DROPPED
|
||||
key 7 6 WAKE_DROPPED
|
||||
key 8 7 WAKE_DROPPED
|
||||
key 9 8 WAKE_DROPPED
|
||||
key 10 9 WAKE_DROPPED
|
||||
key 11 0 WAKE_DROPPED
|
||||
key 110 MENU WAKE
|
||||
key 102 HOME WAKE
|
||||
|
||||
# Row 3
|
||||
key 16 Q WAKE_DROPPED
|
||||
key 17 W WAKE_DROPPED
|
||||
key 18 E WAKE_DROPPED
|
||||
key 19 R WAKE_DROPPED
|
||||
key 20 T WAKE_DROPPED
|
||||
key 21 Y WAKE_DROPPED
|
||||
key 22 U WAKE_DROPPED
|
||||
key 23 I WAKE_DROPPED
|
||||
key 24 O WAKE_DROPPED
|
||||
key 25 P WAKE_DROPPED
|
||||
key 158 BACK WAKE_DROPPED
|
||||
key 104 DPAD_UP WAKE_DROPPED
|
||||
|
||||
# Row 4
|
||||
key 58 SHIFT_LEFT WAKE
|
||||
key 30 A WAKE_DROPPED
|
||||
key 31 S WAKE_DROPPED
|
||||
key 32 D WAKE_DROPPED
|
||||
key 33 F WAKE_DROPPED
|
||||
key 34 G WAKE_DROPPED
|
||||
key 35 H WAKE_DROPPED
|
||||
key 36 J WAKE_DROPPED
|
||||
key 37 K WAKE_DROPPED
|
||||
key 38 L WAKE_DROPPED
|
||||
key 28 DPAD_CENTER WAKE_DROPPED
|
||||
key 109 DPAD_DOWN WAKE_DROPPED
|
||||
|
||||
# Row 5
|
||||
key 183 SYM WAKE_DROPPED
|
||||
key 44 Z WAKE_DROPPED
|
||||
key 45 X WAKE_DROPPED
|
||||
key 46 C WAKE_DROPPED
|
||||
key 47 V WAKE_DROPPED
|
||||
key 48 B WAKE_DROPPED
|
||||
key 49 N WAKE_DROPPED
|
||||
key 50 M WAKE_DROPPED
|
||||
key 51 COMMA WAKE_DROPPED
|
||||
key 52 PERIOD WAKE_DROPPED
|
||||
key 103 DPAD_UP WAKE_DROPPED
|
||||
key 107 ENDCALL WAKE_DROPPED
|
||||
key 152 ENDCALL WAKE_DROPPED
|
||||
|
||||
# Row 6
|
||||
key 42 SHIFT_LEFT WAKE_DROPPED
|
||||
key 464 MENU WAKE_DROPPED
|
||||
key 29 MENU WAKE_DROPPED
|
||||
key 56 MENU WAKE_DROPPED
|
||||
key 151 MENU WAKE_DROPPED
|
||||
key 57 SPACE WAKE_DROPPED
|
||||
key 111 DEL WAKE_DROPPED
|
||||
key 54 SHIFT_RIGHT WAKE_DROPPED
|
||||
key 105 DPAD_LEFT WAKE_DROPPED
|
||||
key 108 DPAD_DOWN WAKE_DROPPED
|
||||
key 106 DPAD_RIGHT WAKE_DROPPED
|
||||
|
||||
# Volume keys
|
||||
key 115 VOLUME_UP WAKE_DROPPED
|
||||
key 114 VOLUME_DOWN WAKE_DROPPED
|
||||
|
||||
# Numeric keypad
|
||||
key 522 STAR WAKE_DROPPED
|
||||
key 523 POUND WAKE_DROPPED
|
||||
key 355 DEL WAKE_DROPPED
|
||||
#L- Mapping
|
||||
key 139 MENU WAKE
|
||||
#SEND Key Mapping
|
||||
key 231 CALL WAKE_DROPPED
|
||||
# R+ Mapping
|
||||
key 142 HOME WAKE_DROPPED
|
||||
# Camera Keys
|
||||
key 766 FOCUS
|
||||
key 528 CAMERA
|
|
@ -1,116 +0,0 @@
|
|||
# Copyright (c) 2011, Code Aurora Forum.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
# Function keys
|
||||
key 59 MENU WAKE
|
||||
key 60 HOME WAKE
|
||||
key 61 CALL WAKE_DROPPED
|
||||
key 62 BACK WAKE_DROPPED
|
||||
key 63 ENDCALL WAKE_DROPPED
|
||||
key 64 MEDIA_NEXT WAKE
|
||||
key 65 MEDIA_PLAY_PAUSE WAKE
|
||||
key 66 MEDIA_PREVIOUS WAKE
|
||||
key 67 MEDIA_STOP WAKE
|
||||
key 68 CAMERA
|
||||
key 87 POWER WAKE
|
||||
key 217 SEARCH WAKE_DROPPED
|
||||
|
||||
# Row 2
|
||||
key 2 1 WAKE_DROPPED
|
||||
key 3 2 WAKE_DROPPED
|
||||
key 4 3 WAKE_DROPPED
|
||||
key 5 4 WAKE_DROPPED
|
||||
key 6 5 WAKE_DROPPED
|
||||
key 7 6 WAKE_DROPPED
|
||||
key 8 7 WAKE_DROPPED
|
||||
key 9 8 WAKE_DROPPED
|
||||
key 10 9 WAKE_DROPPED
|
||||
key 11 0 WAKE_DROPPED
|
||||
key 110 MENU WAKE
|
||||
key 102 HOME WAKE
|
||||
|
||||
# Row 3
|
||||
key 16 Q WAKE_DROPPED
|
||||
key 17 W WAKE_DROPPED
|
||||
key 18 E WAKE_DROPPED
|
||||
key 19 R WAKE_DROPPED
|
||||
key 20 T WAKE_DROPPED
|
||||
key 21 Y WAKE_DROPPED
|
||||
key 22 U WAKE_DROPPED
|
||||
key 23 I WAKE_DROPPED
|
||||
key 24 O WAKE_DROPPED
|
||||
key 25 P WAKE_DROPPED
|
||||
key 158 BACK WAKE_DROPPED
|
||||
key 104 DPAD_UP WAKE_DROPPED
|
||||
|
||||
# Row 4
|
||||
key 58 SHIFT_LEFT WAKE
|
||||
key 30 A WAKE_DROPPED
|
||||
key 31 S WAKE_DROPPED
|
||||
key 32 D WAKE_DROPPED
|
||||
key 33 F WAKE_DROPPED
|
||||
key 34 G WAKE_DROPPED
|
||||
key 35 H WAKE_DROPPED
|
||||
key 36 J WAKE_DROPPED
|
||||
key 37 K WAKE_DROPPED
|
||||
key 38 L WAKE_DROPPED
|
||||
key 28 DPAD_CENTER WAKE_DROPPED
|
||||
key 109 DPAD_DOWN WAKE_DROPPED
|
||||
|
||||
# Row 5
|
||||
key 183 SYM WAKE_DROPPED
|
||||
key 44 Z WAKE_DROPPED
|
||||
key 45 X WAKE_DROPPED
|
||||
key 46 C WAKE_DROPPED
|
||||
key 47 V WAKE_DROPPED
|
||||
key 48 B WAKE_DROPPED
|
||||
key 49 N WAKE_DROPPED
|
||||
key 50 M WAKE_DROPPED
|
||||
key 51 COMMA WAKE_DROPPED
|
||||
key 52 PERIOD WAKE_DROPPED
|
||||
key 103 DPAD_UP WAKE_DROPPED
|
||||
key 107 ENDCALL WAKE_DROPPED
|
||||
key 152 ENDCALL WAKE_DROPPED
|
||||
|
||||
# Row 6
|
||||
key 42 SHIFT_LEFT WAKE_DROPPED
|
||||
key 464 MENU WAKE_DROPPED
|
||||
key 29 MENU WAKE_DROPPED
|
||||
key 56 MENU WAKE_DROPPED
|
||||
key 151 MENU WAKE_DROPPED
|
||||
key 57 SPACE WAKE_DROPPED
|
||||
key 111 DEL WAKE_DROPPED
|
||||
key 54 SHIFT_RIGHT WAKE_DROPPED
|
||||
key 105 DPAD_LEFT WAKE_DROPPED
|
||||
key 108 DPAD_DOWN WAKE_DROPPED
|
||||
key 106 DPAD_RIGHT WAKE_DROPPED
|
||||
|
||||
# Volume keys
|
||||
key 115 VOLUME_UP WAKE_DROPPED
|
||||
key 114 VOLUME_DOWN WAKE_DROPPED
|
||||
|
||||
# Numeric keypad
|
||||
key 522 STAR WAKE_DROPPED
|
||||
key 523 POUND WAKE_DROPPED
|
||||
key 355 DEL WAKE_DROPPED
|
||||
#L- Mapping
|
||||
key 139 MENU WAKE
|
||||
#SEND Key Mapping
|
||||
key 231 CALL WAKE_DROPPED
|
||||
# R+ Mapping
|
||||
key 142 HOME WAKE_DROPPED
|
||||
# Camera Keys
|
||||
key 766 FOCUS
|
||||
key 528 CAMERA
|
30
keylayout/synaptics_rmi4_i2c.kl
Normal file
30
keylayout/synaptics_rmi4_i2c.kl
Normal file
|
@ -0,0 +1,30 @@
|
|||
# Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above
|
||||
# copyright notice, this list of conditions and the following
|
||||
# disclaimer in the documentation and/or other materials provided
|
||||
# with the distribution.
|
||||
# * Neither the name of The Linux Foundation nor the names of its
|
||||
# contributors may be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
|
||||
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
||||
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||
|
||||
key 139 MENU
|
||||
key 102 HOME
|
||||
key 158 BACK
|
||||
key 217 SEARCH
|
28
libwcnss_qmi/Android.mk
Normal file
28
libwcnss_qmi/Android.mk
Normal file
|
@ -0,0 +1,28 @@
|
|||
# Copyright (C) 2015 The CyanogenMod Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
LOCAL_PATH:= $(call my-dir)
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_SRC_FILES := wcnss_qmi_client.c
|
||||
|
||||
LOCAL_C_INCLUDES += hardware/qcom/wlan/wcnss_service
|
||||
LOCAL_CFLAGS += -Wall
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libc libcutils libutils liblog
|
||||
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_MODULE := libwcnss_qmi
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
61
libwcnss_qmi/wcnss_qmi_client.c
Normal file
61
libwcnss_qmi/wcnss_qmi_client.c
Normal file
|
@ -0,0 +1,61 @@
|
|||
/*
|
||||
* Copyright (C) 2015, The CyanogenMod Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
//#define LOG_NDEBUG 0
|
||||
|
||||
#define LOG_TAG "wcnss_qmi"
|
||||
|
||||
#define SUCCESS 0
|
||||
#define FAILED -1
|
||||
|
||||
#define MAC_INFO_FILE "/efs/wifi/.mac.info"
|
||||
|
||||
#include <cutils/log.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int wcnss_init_qmi(void)
|
||||
{
|
||||
/* empty */
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
int wcnss_qmi_get_wlan_address(unsigned char *mac)
|
||||
{
|
||||
int i;
|
||||
int tmp[6];
|
||||
FILE *f;
|
||||
|
||||
if ((f = fopen(MAC_INFO_FILE, "r")) == NULL) {
|
||||
ALOGE("%s: failed to open %s", __func__, MAC_INFO_FILE);
|
||||
return FAILED;
|
||||
}
|
||||
|
||||
if (fscanf(f, "%02X:%02X:%02X:%02X:%02X:%02X", &tmp[0], &tmp[1], &tmp[2], &tmp[3], &tmp[4], &tmp[5]) != 6) {
|
||||
ALOGE("%s: %s: file contents are not valid", __func__, MAC_INFO_FILE);
|
||||
fclose(f);
|
||||
return FAILED;
|
||||
} else {
|
||||
for (i = 0; i < 6; i++) mac[i] = tmp[i];
|
||||
}
|
||||
|
||||
fclose(f);
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
void wcnss_qmi_deinit(void)
|
||||
{
|
||||
/* empty */
|
||||
}
|
|
@ -77,15 +77,6 @@
|
|||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>android.hardware.ir</name>
|
||||
<transport arch="32">passthrough</transport>
|
||||
<version>1.0</version>
|
||||
<interface>
|
||||
<name>IConsumerIr</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>android.hardware.keymaster</name>
|
||||
<transport arch="32">passthrough</transport>
|
||||
|
|
|
@ -14,36 +14,43 @@
|
|||
# limitations under the License.
|
||||
|
||||
# Overlays
|
||||
DEVICE_PACKAGE_OVERLAYS += device/samsung/msm8974-common/overlay
|
||||
DEVICE_PACKAGE_OVERLAYS += device/samsung/msm8226-common/overlay
|
||||
|
||||
# Permissions
|
||||
PRODUCT_COPY_FILES += \
|
||||
frameworks/native/data/etc/android.hardware.bluetooth.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth.xml \
|
||||
frameworks/native/data/etc/android.hardware.bluetooth_le.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth_le.xml \
|
||||
frameworks/native/data/etc/android.hardware.consumerir.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.consumerir.xml \
|
||||
frameworks/native/data/etc/android.hardware.camera.autofocus.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.autofocus.xml \
|
||||
frameworks/native/data/etc/android.hardware.camera.flash-autofocus.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.flash-autofocus.xml \
|
||||
frameworks/native/data/etc/android.hardware.camera.front.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.front.xml \
|
||||
frameworks/native/data/etc/android.hardware.ethernet.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.ethernet.xml \
|
||||
frameworks/native/data/etc/android.hardware.camera.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.xml \
|
||||
frameworks/native/data/etc/android.hardware.location.gps.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.location.gps.xml \
|
||||
frameworks/native/data/etc/android.hardware.sensor.barometer.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.barometer.xml \
|
||||
frameworks/native/data/etc/android.hardware.sensor.gyroscope.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.gyroscope.xml \
|
||||
frameworks/native/data/etc/android.hardware.sensor.accelerometer.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.accelerometer.xml \
|
||||
frameworks/native/data/etc/android.hardware.sensor.compass.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.compass.xml \
|
||||
frameworks/native/data/etc/android.hardware.sensor.light.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.light.xml \
|
||||
frameworks/native/data/etc/android.hardware.sensor.proximity.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.proximity.xml \
|
||||
frameworks/native/data/etc/android.hardware.sensor.gyroscope.xml:$(TARGET_COPY_OUT_VENDOR)/permissions/android.hardware.sensor.gyroscope.xml \
|
||||
frameworks/native/data/etc/android.hardware.touchscreen.multitouch.jazzhand.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml \
|
||||
frameworks/native/data/etc/android.hardware.usb.accessory.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.accessory.xml \
|
||||
frameworks/native/data/etc/android.hardware.usb.host.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.host.xml \
|
||||
frameworks/native/data/etc/android.hardware.wifi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.xml \
|
||||
frameworks/native/data/etc/android.hardware.wifi.direct.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.direct.xml \
|
||||
frameworks/native/data/etc/android.software.sip.voip.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.sip.voip.xml
|
||||
frameworks/native/data/etc/android.hardware.wifi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.xml \
|
||||
frameworks/native/data/etc/android.software.sip.voip.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.sip.voip.xml \
|
||||
frameworks/native/data/etc/android.software.midi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.midi.xml
|
||||
|
||||
# System properties
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
audio.offload.buffer.size.kb=32 \
|
||||
audio.offload.gapless.enabled=false \
|
||||
av.offload.enable=true
|
||||
av.offload.enable=true\
|
||||
ro.af.client_heap_size_kbyte=7168
|
||||
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
ro.opengles.version=196608
|
||||
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
persist.graphics.vulkan.disable=true
|
||||
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
persist.rild.nitz_plmn="" \
|
||||
persist.rild.nitz_long_ons_0="" \
|
||||
|
@ -53,22 +60,37 @@ PRODUCT_PROPERTY_OVERRIDES += \
|
|||
persist.rild.nitz_short_ons_0="" \
|
||||
persist.rild.nitz_short_ons_1="" \
|
||||
persist.rild.nitz_short_ons_2="" \
|
||||
persist.rild.nitz_short_ons_3=""
|
||||
persist.rild.nitz_short_ons_3="" \
|
||||
ril.subscription.types=NV,RUIM
|
||||
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
dalvik.vm.heapstartsize=8m \
|
||||
dalvik.vm.heapgrowthlimit=192m \
|
||||
dalvik.vm.heapsize=256m \
|
||||
dalvik.vm.heaptargetutilization=0.75 \
|
||||
dalvik.vm.heapminfree=512k \
|
||||
dalvik.vm.heapmaxfree=8m
|
||||
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
dalvik.vm.boot-dex2oat-threads=4 \
|
||||
dalvik.vm.dex2oat-swap=false \
|
||||
dalvik.vm.checkjni=false \
|
||||
dalvik.vm.dex2oat-flags=--no-watch-dog \
|
||||
dalvik.vm.dex2oat-threads=4 \
|
||||
dalvik.vm.image-dex2oat-threads=4 \
|
||||
dalvik.vm.verify-bytecode=false \
|
||||
persist.sys.purgeable_assets=1
|
||||
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
persist.timed.enable=true
|
||||
|
||||
# Advanced Display
|
||||
PRODUCT_PACKAGES += \
|
||||
AdvancedDisplay
|
||||
|
||||
# Audio
|
||||
PRODUCT_PACKAGES += \
|
||||
android.hardware.audio@2.0-impl \
|
||||
android.hardware.audio.effect@2.0-impl \
|
||||
audio_policy.msm8974 \
|
||||
audio_policy.msm8226 \
|
||||
audio.a2dp.default \
|
||||
audio.primary.msm8974 \
|
||||
audio.primary.msm8226 \
|
||||
audio.r_submix.default \
|
||||
audio.usb.default \
|
||||
libaudio-resampler \
|
||||
|
@ -91,10 +113,10 @@ PRODUCT_PACKAGES += \
|
|||
android.hardware.graphics.allocator@2.0-service \
|
||||
android.hardware.graphics.mapper@2.0-impl \
|
||||
android.hardware.memtrack@1.0-impl \
|
||||
copybit.msm8974 \
|
||||
gralloc.msm8974 \
|
||||
hwcomposer.msm8974 \
|
||||
memtrack.msm8974
|
||||
copybit.msm8226 \
|
||||
gralloc.msm8226 \
|
||||
hwcomposer.msm8226 \
|
||||
memtrack.msm8226
|
||||
|
||||
# DRM
|
||||
PRODUCT_PACKAGES += \
|
||||
|
@ -104,7 +126,7 @@ PRODUCT_PACKAGES += \
|
|||
# GPS
|
||||
PRODUCT_PACKAGES += \
|
||||
android.hardware.gnss@1.0-impl \
|
||||
gps.msm8974
|
||||
gps.msm8226
|
||||
|
||||
PRODUCT_COPY_FILES += \
|
||||
$(LOCAL_PATH)/gps/etc/flp.conf:system/etc/flp.conf \
|
||||
|
@ -112,16 +134,10 @@ PRODUCT_COPY_FILES += \
|
|||
$(LOCAL_PATH)/gps/etc/izat.conf:system/etc/izat.conf \
|
||||
$(LOCAL_PATH)/gps/etc/sap.conf:system/etc/sap.conf
|
||||
|
||||
# IR Blaster
|
||||
PRODUCT_PACKAGES += \
|
||||
android.hardware.ir@1.0-impl \
|
||||
consumerir.msm8974
|
||||
|
||||
# Keylayouts
|
||||
PRODUCT_COPY_FILES += \
|
||||
device/samsung/msm8974-common/keylayout/cyttsp-i2c.kl:system/usr/keylayout/cyttsp-i2c.kl \
|
||||
device/samsung/msm8974-common/keylayout/keypad_8960.kl:system/usr/keylayout/keypad_8960.kl \
|
||||
device/samsung/msm8974-common/keylayout/Vendor_04e8_Product_7021.kl:system/usr/keylayout/Vendor_04e8_Product_7021.kl
|
||||
$(LOCAL_PATH)/keylayout/Button_Jack.kl:system/usr/keylayout/Button_Jack.kl \
|
||||
$(LOCAL_PATH)/keylayout/synaptics_rmi4_i2c.kl:system/usr/keylayout/synaptics_rmi4_i2c.kl
|
||||
|
||||
# Keymaster
|
||||
PRODUCT_PACKAGES += \
|
||||
|
@ -132,7 +148,8 @@ PRODUCT_COPY_FILES += \
|
|||
frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:system/etc/media_codecs_google_audio.xml \
|
||||
frameworks/av/media/libstagefright/data/media_codecs_google_telephony.xml:system/etc/media_codecs_google_telephony.xml \
|
||||
frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:system/etc/media_codecs_google_video.xml \
|
||||
device/samsung/msm8974-common/configs/media_codecs.xml:system/etc/media_codecs.xml
|
||||
frameworks/av/media/libstagefright/data/media_codecs_google_video_le.xml:system/etc/media_codecs_google_video_le.xml \
|
||||
device/samsung/msm8226-common/configs/media_codecs.xml:system/etc/media_codecs.xml
|
||||
|
||||
# OMX
|
||||
PRODUCT_PACKAGES += \
|
||||
|
@ -150,6 +167,18 @@ PRODUCT_PACKAGES += \
|
|||
PRODUCT_PACKAGES += \
|
||||
android.hardware.power@1.0-service-qti
|
||||
|
||||
# Ramdisk
|
||||
PRODUCT_PACKAGES += \
|
||||
init.qcom.bt.sh \
|
||||
init.ril.sh
|
||||
|
||||
PRODUCT_PACKAGES += \
|
||||
init.qcom.power.rc \
|
||||
init.qcom.rc \
|
||||
init.qcom.usb.rc \
|
||||
init.recovery.qcom.rc \
|
||||
ueventd.qcom.rc
|
||||
|
||||
# RenderScript HAL
|
||||
PRODUCT_PACKAGES += \
|
||||
android.hardware.renderscript@1.0-impl
|
||||
|
@ -170,13 +199,27 @@ PRODUCT_PACKAGES += \
|
|||
# Wifi
|
||||
PRODUCT_PACKAGES += \
|
||||
android.hardware.wifi@1.0-service \
|
||||
dhcpcd.conf \
|
||||
hostapd \
|
||||
wificond \
|
||||
wpa_supplicant \
|
||||
wpa_supplicant.conf
|
||||
wpa_supplicant.conf \
|
||||
libwpa_client
|
||||
|
||||
PRODUCT_PACKAGES += \
|
||||
libcurl \
|
||||
libwcnss_qmi \
|
||||
wcnss_service
|
||||
|
||||
PRODUCT_COPY_FILES += \
|
||||
$(LOCAL_PATH)/configs/wifi/wpa_supplicant_overlay.conf:system/etc/wifi/wpa_supplicant_overlay.conf \
|
||||
$(LOCAL_PATH)/configs/wifi/p2p_supplicant_overlay.conf:system/etc/wifi/p2p_supplicant_overlay.conf \
|
||||
$(LOCAL_PATH)/configs/wifi/hostapd_default.conf:system/etc/hostapd/hostapd_default.conf \
|
||||
$(LOCAL_PATH)/prima/WCNSS_cfg.dat:system/etc/firmware/wlan/prima/WCNSS_cfg.dat \
|
||||
$(LOCAL_PATH)/prima/WCNSS_qcom_cfg.ini:system/etc/firmware/wlan/prima/WCNSS_qcom_cfg.ini \
|
||||
$(LOCAL_PATH)/prima/WCNSS_qcom_wlan_nv.bin:system/etc/firmware/wlan/prima/WCNSS_qcom_wlan_nv.bin
|
||||
# Get non-open-source specific aspects
|
||||
$(call inherit-product-if-exists, vendor/samsung/msm8974-common/msm8974-common-vendor.mk)
|
||||
$(call inherit-product-if-exists, vendor/samsung/msm8226-common/msm8226-common-vendor.mk)
|
||||
|
||||
# common msm8974
|
||||
# common msm8226
|
||||
$(call inherit-product, device/samsung/qcom-common/qcom-common.mk)
|
|
@ -32,4 +32,13 @@
|
|||
<item>SUPL_MODE=1</item>
|
||||
<item>LPP_PROFILE=0</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Default list of files pinned by the Pinner Service -->
|
||||
<string-array translatable="false" name="config_defaultPinnerServiceFiles">
|
||||
<item>"/system/priv-app/SystemUI/SystemUI.apk"</item>
|
||||
<item>"/data/dalvik-cache/arm/system@priv-app@SystemUI@SystemUI.apk@classes.dex"</item>
|
||||
<item>"/data/dalvik-cache/arm/system@priv-app@SystemUI@SystemUI.apk@classes.vdex"</item>
|
||||
<item>"/system/lib/libsurfaceflinger.so"</item>
|
||||
</string-array>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -1,64 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2012-2014 The CyanogenMod Project
|
||||
Copyright (C) 2018 The LineageOS Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<string-array name="mdnie_scenario_entries" translatable="false">
|
||||
<item>@string/mdnie_scenario_ui</item>
|
||||
<item>@string/mdnie_scenario_video</item>
|
||||
<item>@string/mdnie_scenario_video_warm</item>
|
||||
<item>@string/mdnie_scenario_video_cold</item>
|
||||
<item>@string/mdnie_scenario_camera</item>
|
||||
<item>@string/mdnie_scenario_navigation</item>
|
||||
<item>@string/mdnie_scenario_gallery</item>
|
||||
<item>@string/mdnie_scenario_vt</item>
|
||||
<item>@string/mdnie_scenario_browser</item>
|
||||
<item>@string/mdnie_scenario_ebook</item>
|
||||
<item>@string/mdnie_scenario_email</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="mdnie_scenario_entries_values" translatable="false">
|
||||
<item>0</item>
|
||||
<item>1</item>
|
||||
<item>2</item>
|
||||
<item>3</item>
|
||||
<item>4</item>
|
||||
<item>5</item>
|
||||
<item>6</item>
|
||||
<item>7</item>
|
||||
<item>8</item>
|
||||
<item>9</item>
|
||||
<item>10</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="mdnie_accessibility_entries" translatable="false">
|
||||
<item>@string/mdnie_accessibility_normal</item>
|
||||
<item>@string/mdnie_accessibility_inverse</item>
|
||||
<item>@string/mdnie_accessibility_color_blind</item>
|
||||
<item>@string/mdnie_accessibility_screen_curtain</item>
|
||||
<item>@string/mdnie_accessibility_grayscale</item>
|
||||
<item>@string/mdnie_accessibility_gray_negative</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="mdnie_accessibility_entries_values" translatable="false">
|
||||
<item>0</item>
|
||||
<item>1</item>
|
||||
<item>2</item>
|
||||
<item>3</item>
|
||||
<item>4</item>
|
||||
<item>5</item>
|
||||
</string-array>
|
||||
</resources>
|
|
@ -1,25 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2013 The CyanogenMod Project
|
||||
Copyright (C) 2018 The LineageOS Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<!-- These resources are around just to allow their values to be customized
|
||||
for different hardware and product builds. -->
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<!-- MDNIE -->
|
||||
<string name="mdnie_scenario_sysfs_file" translatable="false">"/sys/class/mdnie/mdnie/scenario"</string>
|
||||
<string name="mdnie_accessibility_sysfs_file" translatable="false">"/sys/class/mdnie/mdnie/accessibility"</string>
|
||||
</resources>
|
|
@ -22,29 +22,4 @@
|
|||
<boolean name="world_phone_bool" value="true" />
|
||||
<boolean name="allow_adding_apns_bool" value="true" />
|
||||
</carrier_config>
|
||||
|
||||
<!-- Verizon hackery -->
|
||||
<carrier_config mcc="204" mnc="04" gid1="BAE0000000000000">
|
||||
<boolean name="disable_cdma_activation_code_bool" value="true" />
|
||||
</carrier_config>
|
||||
<carrier_config mcc="310" mnc="004">
|
||||
<boolean name="disable_cdma_activation_code_bool" value="true" />
|
||||
</carrier_config>
|
||||
<carrier_config mcc="311" mnc="480">
|
||||
<boolean name="disable_cdma_activation_code_bool" value="true" />
|
||||
</carrier_config>
|
||||
|
||||
<!-- Sprint hackery -->
|
||||
<carrier_config mcc="310" mnc="120">
|
||||
<boolean name="sprint_mwi_quirk" value="true" />
|
||||
</carrier_config>
|
||||
<carrier_config mcc="311" mnc="490">
|
||||
<boolean name="sprint_mwi_quirk" value="true" />
|
||||
</carrier_config>
|
||||
<carrier_config mcc="311" mnc="870">
|
||||
<boolean name="sprint_mwi_quirk" value="true" />
|
||||
</carrier_config>
|
||||
<carrier_config mcc="312" mnc="530">
|
||||
<boolean name="sprint_mwi_quirk" value="true" />
|
||||
</carrier_config>
|
||||
</carrier_config_list>
|
||||
|
|
BIN
prima/WCNSS_cfg.dat
Normal file
BIN
prima/WCNSS_cfg.dat
Normal file
Binary file not shown.
419
prima/WCNSS_qcom_cfg.ini
Normal file
419
prima/WCNSS_qcom_cfg.ini
Normal file
|
@ -0,0 +1,419 @@
|
|||
# This file allows user to override the factory
|
||||
|
||||
# defaults for the WLAN Driver
|
||||
|
||||
|
||||
# Enable IMPS or not
|
||||
gEnableImps=1
|
||||
|
||||
# Enable/Disable Idle Scan
|
||||
|
||||
gEnableIdleScan=0
|
||||
|
||||
|
||||
# Enable/Disable vsta based on MAX Assoc limit
|
||||
gEnableVSTASupport=1
|
||||
|
||||
|
||||
# Increase sleep duration (seconds) during IMPS
|
||||
# 0 implies no periodic wake up from IMPS. Periodic wakeup is
|
||||
# unnecessary if Idle Scan is disabled.
|
||||
gImpsModSleepTime=0
|
||||
|
||||
|
||||
# Enable BMPS or not
|
||||
gEnableBmps=1
|
||||
|
||||
# Enable suspend or not
|
||||
|
||||
# 1: Enable standby, 2: Enable Deep sleep, 3: Enable Mcast/Bcast Filter
|
||||
|
||||
gEnableSuspend=3
|
||||
|
||||
# Phy Mode (auto, b, g, n, etc)
|
||||
# Valid values are 0-9, with 0 = Auto, 4 = 11n, 9 = 11ac
|
||||
gDot11Mode=0
|
||||
|
||||
|
||||
# CSR Roaming Enable(1) Disable(0)
|
||||
|
||||
gRoamingTime=0
|
||||
|
||||
|
||||
# Assigned MAC Addresses - This will be used until NV items are in place
|
||||
|
||||
# Each byte of MAC address is represented in Hex format as XX
|
||||
|
||||
Intf0MacAddress=000AF58989FF
|
||||
Intf1MacAddress=000AF58989FE
|
||||
Intf2MacAddress=000AF58989FD
|
||||
|
||||
Intf3MacAddress=000AF58989FC
|
||||
|
||||
|
||||
# UAPSD service interval for VO,VI, BE, BK traffic
|
||||
|
||||
InfraUapsdVoSrvIntv=0
|
||||
|
||||
InfraUapsdViSrvIntv=0
|
||||
|
||||
InfraUapsdBeSrvIntv=0
|
||||
|
||||
InfraUapsdBkSrvIntv=0
|
||||
|
||||
# Flag to allow STA send AddTspec even when ACM is Off
|
||||
gAddTSWhenACMIsOff=1
|
||||
|
||||
# Make 1x1 the default antenna configuration
|
||||
|
||||
gNumRxAnt=1
|
||||
|
||||
|
||||
# Beacon filtering frequency (unit in beacon intervals)
|
||||
|
||||
gNthBeaconFilter=50
|
||||
|
||||
|
||||
# Enable WAPI or not
|
||||
|
||||
# WAPIIsEnabled=0
|
||||
|
||||
|
||||
# Flags to filter Mcast abd Bcast RX packets.
|
||||
|
||||
# Value 0: No filtering, 1: Filter all Multicast.
|
||||
|
||||
# 2: Filter all Broadcast. 3: Filter all Mcast abd Bcast
|
||||
|
||||
McastBcastFilter=3
|
||||
|
||||
|
||||
#Flag to enable HostARPOffload feature or not
|
||||
|
||||
hostArpOffload=1
|
||||
|
||||
|
||||
#Flag to enable HostNSOffload feature or not
|
||||
|
||||
hostNSOffload=0
|
||||
|
||||
#SoftAP Related Parameters
|
||||
|
||||
# AP MAc addr
|
||||
|
||||
gAPMacAddr=000AF589dcab
|
||||
|
||||
|
||||
# 802.11n Protection flag
|
||||
|
||||
gEnableApProt=1
|
||||
|
||||
|
||||
#Enable OBSS protection
|
||||
|
||||
gEnableApOBSSProt=1
|
||||
|
||||
|
||||
#Enable/Disable UAPSD for SoftAP
|
||||
|
||||
gEnableApUapsd=0
|
||||
|
||||
|
||||
# Fixed Rate
|
||||
|
||||
gFixedRate=0
|
||||
|
||||
|
||||
# Maximum Tx power
|
||||
|
||||
# gTxPowerCap=30
|
||||
|
||||
|
||||
# Fragmentation Threshold
|
||||
|
||||
# gFragmentationThreshold=2346
|
||||
|
||||
|
||||
# RTS threshold
|
||||
|
||||
RTSThreshold=2347
|
||||
|
||||
|
||||
# Intra-BSS forward
|
||||
|
||||
gDisableIntraBssFwd=0
|
||||
|
||||
|
||||
# WMM Enable/Disable
|
||||
|
||||
WmmIsEnabled=0
|
||||
|
||||
|
||||
# 802.11d support
|
||||
|
||||
g11dSupportEnabled=1
|
||||
|
||||
# 802.11h support
|
||||
|
||||
g11hSupportEnabled=1
|
||||
|
||||
# CCX Support and fast transition
|
||||
CcxEnabled=0
|
||||
FastTransitionEnabled=1
|
||||
ImplicitQosIsEnabled=0
|
||||
gNeighborScanTimerPeriod=200
|
||||
|
||||
gNeighborLookupThreshold=76
|
||||
gNeighborReassocThreshold=81
|
||||
|
||||
gNeighborScanChannelMinTime=20
|
||||
gNeighborScanChannelMaxTime=30
|
||||
gMaxNeighborReqTries=3
|
||||
|
||||
# Legacy (non-CCX, non-802.11r) Fast Roaming Support
|
||||
# To enable, set FastRoamEnabled=1
|
||||
# To disable, set FastRoamEnabled=0
|
||||
FastRoamEnabled=1
|
||||
|
||||
#Check if the AP to which we are roaming is better than current AP in terms of RSSI.
|
||||
#Checking is disabled if set to Zero.Otherwise it will use this value as to how better
|
||||
#the RSSI of the new/roamable AP should be for roaming
|
||||
RoamRssiDiff=3
|
||||
|
||||
# If the RSSI of any available candidate is better than currently associated
|
||||
# AP by at least gImmediateRoamRssiDiff, then being to roam immediately (without
|
||||
# registering for reassoc threshold).
|
||||
# NOTE: Value of 0 means that we would register for reassoc threshold.
|
||||
gImmediateRoamRssiDiff=10
|
||||
|
||||
# To enable, set gRoamIntraBand=1 (Roaming within band)
|
||||
# To disable, set gRoamIntraBand=0 (Roaming across band)
|
||||
|
||||
gRoamIntraBand=0
|
||||
|
||||
#SAP Country code
|
||||
|
||||
# Default Country Code is 2 bytes, 3rd byte is optional indoor or out door.
|
||||
|
||||
# Example
|
||||
|
||||
# US Indoor, USI
|
||||
|
||||
# Korea Outdoor, KRO
|
||||
|
||||
# Japan without optional byte, JP
|
||||
|
||||
# France without optional byte, FR
|
||||
|
||||
#gAPCntryCode=USI
|
||||
|
||||
|
||||
#Short Guard Interval Enable/disable
|
||||
|
||||
gShortGI20Mhz=1
|
||||
|
||||
gShortGI40Mhz=1
|
||||
|
||||
|
||||
#Auto Shutdown Value in seconds. A value of 0 means Auto shutoff is disabled
|
||||
|
||||
gAPAutoShutOff=0
|
||||
|
||||
|
||||
# SAP auto channel selection configuration
|
||||
|
||||
# 0 = disable auto channel selection
|
||||
|
||||
# 1 = enable auto channel selection, channel provided by supplicant will be ignored
|
||||
|
||||
gApAutoChannelSelection=0
|
||||
|
||||
|
||||
# Listen Energy Detect Mode Configuration
|
||||
|
||||
# Valid values 0-128
|
||||
|
||||
# 128 means disable Energy Detect feature
|
||||
|
||||
# 0-9 are threshold code and 7 is recommended value from system if feature is to be enabled.
|
||||
|
||||
# 10-128 are reserved.
|
||||
|
||||
# The EDET threshold mapping is as follows in 3dB step:
|
||||
|
||||
# 0 = -60 dBm
|
||||
|
||||
# 1 = -63 dBm
|
||||
|
||||
# 2 = -66 dBm
|
||||
|
||||
# ...
|
||||
|
||||
# 7 = -81 dBm
|
||||
|
||||
# 8 = -84 dBm
|
||||
|
||||
# 9 = -87 dBm
|
||||
|
||||
# Note: Any of these settings are valid. Setting 0 would yield the highest power saving (in a noisy environment) at the cost of more range. The range impact is approximately #calculated as:
|
||||
|
||||
#
|
||||
|
||||
# Range Loss (dB) = EDET threshold level (dBm) + 97 dBm.
|
||||
|
||||
#
|
||||
|
||||
gEnablePhyAgcListenMode=128
|
||||
|
||||
|
||||
#Preferred channel to start BT AMP AP mode (0 means, any channel)
|
||||
|
||||
BtAmpPreferredChannel=0
|
||||
|
||||
|
||||
#Preferred band (both or 2.4 only or 5 only)
|
||||
|
||||
BandCapability=0
|
||||
|
||||
|
||||
#Beacon Early Termination (1 = enable the BET feature, 0 = disable)
|
||||
|
||||
enableBeaconEarlyTermination=0
|
||||
|
||||
beaconEarlyTerminationWakeInterval=3
|
||||
|
||||
|
||||
#Bluetooth Alternate Mac Phy (1 = enable the BT AMP feature, 0 = disable)
|
||||
|
||||
gEnableBtAmp=0
|
||||
|
||||
|
||||
#SOFTAP Channel Range selection
|
||||
|
||||
gAPChannelSelectStartChannel=1
|
||||
|
||||
gAPChannelSelectEndChannel=11
|
||||
|
||||
|
||||
#SOFTAP Channel Range selection Operating band
|
||||
|
||||
# 0:2.4GHZ 1: LOW-5GHZ 2:MID-5GHZ 3:HIGH-5GHZ 4: 4.9HZ BAND
|
||||
|
||||
gAPChannelSelectOperatingBand=0
|
||||
|
||||
|
||||
#Channel Bonding
|
||||
gChannelBondingMode5GHz=1
|
||||
|
||||
|
||||
#Enable Keep alive with non-zero period value
|
||||
|
||||
#gStaKeepAlivePeriod = 30
|
||||
|
||||
#AP LINK MONITOR TIMEOUT is used for both SAP and GO mode.
|
||||
#It is used to change the frequency of keep alive packets in the AP Link Monitor period which is by
|
||||
#default 20s. Currently the keep alive packets are sent as an interval of 3s but after this change
|
||||
#the keep alive packet frequency can be changed.
|
||||
|
||||
#gApLinkMonitorPeriod = 3
|
||||
|
||||
|
||||
#If set will start with active scan after driver load, otherwise will start with
|
||||
|
||||
#passive scan to find out the domain
|
||||
|
||||
gEnableBypass11d=1
|
||||
|
||||
|
||||
#If set to 0, will not scan DFS channels
|
||||
|
||||
gEnableDFSChnlScan=1
|
||||
|
||||
|
||||
gVhtChannelWidth=2
|
||||
gEnableLogp=1
|
||||
|
||||
|
||||
# Enable Automatic Tx Power control
|
||||
|
||||
gEnableAutomaticTxPowerControl=1
|
||||
|
||||
# 0 for OLPC 1 for CLPC and SCPC
|
||||
gEnableCloseLoop=1
|
||||
|
||||
#Data Inactivity Timeout when in powersave (in ms)
|
||||
gDataInactivityTimeout=200
|
||||
|
||||
# VHT Tx/Rx MCS values
|
||||
# Valid values are 0,1,2. If commented out, the default value is 0.
|
||||
# 0=MCS0-7, 1=MCS0-8, 2=MCS0-9
|
||||
gVhtRxMCS=2
|
||||
gVhtTxMCS=2
|
||||
|
||||
# Enable CRDA regulatory support by settings default country code
|
||||
#gCrdaDefaultCountryCode=TW
|
||||
|
||||
# Scan Timing Parameters
|
||||
# gPassiveMaxChannelTime=110
|
||||
# gPassiveMinChannelTime=60
|
||||
# gActiveMaxChannelTime=40
|
||||
# gActiveMinChannelTime=20
|
||||
|
||||
#If set to 0, MCC is not allowed.
|
||||
gEnableMCCMode=1
|
||||
|
||||
# 1=enable STBC; 0=disable STBC
|
||||
gEnableRXSTBC=1
|
||||
|
||||
# Enable Active mode offload
|
||||
gEnableActiveModeOffload=1
|
||||
|
||||
#Enable Scan Results Aging based on timer
|
||||
#Timer value is in seconds
|
||||
#If Set to 0 it will not enable the feature
|
||||
gScanAgingTime=0
|
||||
|
||||
#Enable Power saving mechanism Based on Android Framework
|
||||
#If set to 0 Driver internally control the Power saving mechanism
|
||||
#If set to 1 Android Framwrok control the Power saving mechanism
|
||||
isAndroidPsEn=0
|
||||
|
||||
#disable LDPC in STA mode if the AP is TXBF capable
|
||||
gDisableLDPCWithTxbfAP=1
|
||||
|
||||
#Enable thermal mitigation
|
||||
gThermalMitigationEnable=1
|
||||
|
||||
gEnableFastRoamInConcurrency=1
|
||||
|
||||
#List of Country codes for which 11ac needs to be disabled
|
||||
#Each country code must be delimited by comma(,)
|
||||
gListOfNon11acCountryCode=RU,UA,ZA
|
||||
|
||||
#Maxium Channel time in msec
|
||||
gMaxMediumTime = 6000
|
||||
|
||||
# 802.11K support
|
||||
gRrmEnable=1
|
||||
gRrmOperChanMax=8
|
||||
gRrmNonOperChanMax=8
|
||||
gRrmRandIntvl=100
|
||||
|
||||
#Scan offload
|
||||
gEnableDirectedScanOffload=0
|
||||
|
||||
# Oxygen network (prop IE for IBSS)
|
||||
gEnableOxygenNwk=0
|
||||
|
||||
#FlexConnect Power Factor
|
||||
#Default is set to 0 (disable)
|
||||
gFlexConnectPowerFactor=0
|
||||
|
||||
#SAP/P2P-GO mode traffic monitor
|
||||
gEnableTrafficMonitor=1
|
||||
gTrafficIdleTimeout=3000
|
||||
|
||||
END
|
||||
|
||||
# Note: Configuration parser would not read anything past the END marker
|
||||
|
BIN
prima/WCNSS_qcom_wlan_nv.bin
Normal file
BIN
prima/WCNSS_qcom_wlan_nv.bin
Normal file
Binary file not shown.
59
rootdir/Android.mk
Normal file
59
rootdir/Android.mk
Normal file
|
@ -0,0 +1,59 @@
|
|||
LOCAL_PATH:= $(call my-dir)
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
# Init
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.qcom.rc
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/init.qcom.rc
|
||||
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.qcom.usb.rc
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/init.qcom.usb.rc
|
||||
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
# Copy the power config for recovery too
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.recovery.qcom.rc
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/init.qcom.power.rc
|
||||
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := ueventd.qcom.rc
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/ueventd.qcom.rc
|
||||
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.qcom.power.rc
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/init.qcom.power.rc
|
||||
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
# Configuration scripts
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.qcom.bt.sh
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/scripts/init.qcom.bt.sh
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.ril.sh
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/scripts/init.ril.sh
|
||||
include $(BUILD_PREBUILT)
|
132
rootdir/etc/init.qcom.power.rc
Normal file
132
rootdir/etc/init.qcom.power.rc
Normal file
|
@ -0,0 +1,132 @@
|
|||
# Copyright (c) 2009-2012, The Linux Foundation. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of The Linux Foundation nor
|
||||
# the names of its contributors may be used to endorse or promote
|
||||
# products derived from this software without specific prior written
|
||||
# permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
on init
|
||||
# HMP scheduler settings
|
||||
write /proc/sys/kernel/sched_ravg_hist_size 3
|
||||
write /proc/sys/kernel/sched_window_stats_policy 3
|
||||
|
||||
# HMP Task packing settings for 8226
|
||||
write /proc/sys/kernel/sched_small_task 50
|
||||
|
||||
# disable thermal core_control to update interactive governor settings
|
||||
write /sys/module/msm_thermal/core_control/enabled 0
|
||||
|
||||
# Switch to interactive and let PowerHAL configure it
|
||||
write /sys/devices/system/cpu/cpu0/online 1
|
||||
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "interactive"
|
||||
chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse
|
||||
chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/boostpulse
|
||||
chown system system /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
|
||||
chmod 0644 /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
|
||||
chown system system /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq
|
||||
chmod 0644 /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq
|
||||
chown system system /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
|
||||
chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
|
||||
chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_rate
|
||||
chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/timer_rate
|
||||
chown system system /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
|
||||
chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
|
||||
chown system system /sys/devices/system/cpu/cpufreq/interactive/target_loads
|
||||
chmod 0644 /sys/devices/system/cpu/cpufreq/interactive/target_loads
|
||||
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
|
||||
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
|
||||
|
||||
# enable thermal core_control now
|
||||
write /sys/module/msm_thermal/core_control/enabled 1
|
||||
|
||||
# bring all CPUs online
|
||||
write /sys/devices/system/cpu/cpu1/online 1
|
||||
write /sys/devices/system/cpu/cpu2/online 1
|
||||
write /sys/devices/system/cpu/cpu3/online 1
|
||||
|
||||
# Enable low power modes
|
||||
write /sys/module/lpm_levels/parameters/sleep_disabled 0
|
||||
write /sys/module/lpm_levels/enable_low_power/l2 4
|
||||
|
||||
# Set RPS mask
|
||||
write /sys/class/net/rmnet0/queues/rx-0/rps_cpus 2
|
||||
|
||||
# add a cpuset for the camera daemon
|
||||
# we want all the cores for camera
|
||||
mkdir /dev/cpuset/camera-daemon
|
||||
chown system system /dev/cpuset/camera-daemon
|
||||
chown system system /dev/cpuset/camera-daemon/tasks
|
||||
chmod 0664 /dev/cpuset/camera-daemon/tasks
|
||||
|
||||
# Update foreground and background cpusets
|
||||
# Reserve CPU 3 for the top app
|
||||
write /dev/cpuset/foreground/cpus 0-2
|
||||
write /dev/cpuset/background/cpus 0-2
|
||||
write /dev/cpuset/system-background/cpus 0-1
|
||||
write /dev/cpuset/top-app/cpus 0-3
|
||||
write /dev/cpuset/camera-daemon/cpus 0-3
|
||||
|
||||
on charger
|
||||
mount ext4 /dev/block/platform/msm_sdcc.1/by-name/system /system wait ro
|
||||
|
||||
wait /dev/block/platform/msm_sdcc.1/by-name/userdata
|
||||
check_fs /dev/block/platform/msm_sdcc.1/by-name/userdata ext4
|
||||
mount ext4 /dev/block/platform/msm_sdcc.1/by-name/userdata /data nosuid nodev noatime noauto_da_alloc,discard,journal_async_commit,errors=panic
|
||||
chown system system /data
|
||||
chmod 0771 /data
|
||||
|
||||
class_start charger
|
||||
write /sys/devices/system/cpu/cpu1/online 1
|
||||
write /sys/devices/system/cpu/cpu2/online 1
|
||||
write /sys/devices/system/cpu/cpu3/online 1
|
||||
write /sys/module/msm_pm/modes/cpu0/power_collapse/suspend_enabled 1
|
||||
write /sys/module/msm_pm/modes/cpu1/power_collapse/suspend_enabled 1
|
||||
write /sys/module/msm_pm/modes/cpu2/power_collapse/suspend_enabled 1
|
||||
write /sys/module/msm_pm/modes/cpu3/power_collapse/suspend_enabled 1
|
||||
write /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/suspend_enabled 1
|
||||
write /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/suspend_enabled 1
|
||||
write /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/suspend_enabled 1
|
||||
write /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/suspend_enabled 1
|
||||
write /sys/module/msm_pm/modes/cpu0/standalone_power_collapse/idle_enabled 1
|
||||
write /sys/module/msm_pm/modes/cpu1/standalone_power_collapse/idle_enabled 1
|
||||
write /sys/module/msm_pm/modes/cpu2/standalone_power_collapse/idle_enabled 1
|
||||
write /sys/module/msm_pm/modes/cpu3/standalone_power_collapse/idle_enabled 1
|
||||
write /sys/module/msm_pm/modes/cpu0/power_collapse/idle_enabled 0
|
||||
write /sys/module/msm_pm/modes/cpu1/power_collapse/idle_enabled 0
|
||||
write /sys/module/msm_pm/modes/cpu2/power_collapse/idle_enabled 0
|
||||
write /sys/module/msm_pm/modes/cpu3/power_collapse/idle_enabled 0
|
||||
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "interactive"
|
||||
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor "interactive"
|
||||
write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor "interactive"
|
||||
write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor "interactive"
|
||||
|
||||
on property:sys.boot_completed=1
|
||||
# Post boot services
|
||||
rm /data/system/perfd/default_values
|
||||
start mpdecision
|
||||
|
||||
on class_start:late_start
|
||||
trigger enable-low-power
|
||||
|
||||
on property:init.svc.recovery=running
|
||||
trigger enable-low-power
|
751
rootdir/etc/init.qcom.rc
Normal file
751
rootdir/etc/init.qcom.rc
Normal file
|
@ -0,0 +1,751 @@
|
|||
# Copyright (c) 2009-2012, The Linux Foundation. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of The Linux Foundation nor
|
||||
# the names of its contributors may be used to endorse or promote
|
||||
# products derived from this software without specific prior written
|
||||
# permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
import init.qcom.power.rc
|
||||
import init.qcom.usb.rc
|
||||
import init.target.rc
|
||||
|
||||
on early-init
|
||||
mount debugfs debugfs /sys/kernel/debug
|
||||
chmod 0755 /sys/kernel/debug
|
||||
|
||||
# Increase max readahead size to 512 KB
|
||||
restorecon --recursive /sys/block/mmcblk0/queue
|
||||
write /sys/block/mmcblk0/queue/read_ahead_kb 512
|
||||
write /sys/block/mmcblk0/queue/scheduler noop
|
||||
|
||||
write /sys/block/zram0/comp_algorithm lz4
|
||||
|
||||
mkdir /firmware 0771 system system
|
||||
mkdir /firmware-modem 0771 system system
|
||||
|
||||
mkdir /persist 0771 system system
|
||||
|
||||
mkdir /efs 0771 system radio
|
||||
|
||||
symlink /data/tombstones /tombstones
|
||||
|
||||
# Set permissions so radio can read
|
||||
chmod 0444 /proc/cmdline
|
||||
|
||||
on init
|
||||
# Support legacy paths
|
||||
symlink /sdcard /mnt/sdcard
|
||||
symlink /sdcard /storage/sdcard0
|
||||
|
||||
write /proc/sys/vm/page-cluster 0
|
||||
|
||||
on fs
|
||||
wait /dev/block/platform/soc.0/${ro.boot.bootdevice}
|
||||
symlink /dev/block/platform/soc.0/${ro.boot.bootdevice} /dev/block/bootdevice
|
||||
|
||||
mount_all fstab.qcom
|
||||
swapon_all fstab.qcom
|
||||
|
||||
restorecon_recursive /efs
|
||||
|
||||
write /sys/kernel/boot_adsp/boot 1
|
||||
setprop qcom.audio.init complete
|
||||
|
||||
# Kickstart the Wireless subsystem
|
||||
write /dev/wcnss_wlan 1
|
||||
|
||||
# Adaptive LMK
|
||||
write /sys/module/lowmemorykiller/parameters/enable_adaptive_lmk 1
|
||||
write /sys/module/lowmemorykiller/parameters/vmpressure_file_min 53059
|
||||
|
||||
on post-fs-data
|
||||
mkdir /data/misc/bluetooth 0770 bluetooth bluetooth
|
||||
|
||||
# Create the directories used by the Wireless subsystem
|
||||
mkdir /data/misc/wifi 0770 wifi wifi
|
||||
chmod 0660 /data/misc/wifi/wpa_supplicant.conf
|
||||
mkdir /data/misc/wifi/sockets 0770 wifi wifi
|
||||
mkdir /data/misc/wifi/wpa_supplicant 0770 wifi wifi
|
||||
mkdir /data/misc/dhcp 0775 dhcp dhcp
|
||||
|
||||
# Create the directories used by CnE subsystem
|
||||
mkdir /data/connectivity 0771 system system
|
||||
chown system system /data/connectivity
|
||||
|
||||
# For WIFI TRP/TIS
|
||||
chown system root /data/.psm.info
|
||||
chmod 0664 /data/.psm.info
|
||||
|
||||
# For WIFI Antena Selection
|
||||
chown system root /data/.ant.info
|
||||
chmod 0664 /data/.ant.info
|
||||
|
||||
# For WIFI Version
|
||||
write /data/.wifiver.info 0
|
||||
chown system root /data/.wifiver.info
|
||||
chmod 0664 /data/.wifiver.info
|
||||
|
||||
# For WIFI Cert
|
||||
chmod 0664 /data/.bustxglom.info
|
||||
chmod 0664 /data/.roamoff.info
|
||||
chmod 0664 /data/.frameburst.info
|
||||
chmod 0664 /data/.txbf.info
|
||||
|
||||
# For WIFI MAC address
|
||||
mkdir /efs/wifi 0775 radio system
|
||||
chown system wifi /efs/wifi/.mac.info
|
||||
chmod 0660 /efs/wifi/.mac.info
|
||||
#restorecon /efs/wifi/.mac.info
|
||||
chmod 0660 /efs/wifi/.mac.cob
|
||||
|
||||
# Create directory used by audio subsystem
|
||||
mkdir /data/misc/audio 0770 audio audio
|
||||
|
||||
# Create directory used by radio subsystem
|
||||
mkdir /data/radio 0770 radio radio
|
||||
|
||||
# Create directory used by the DASH client
|
||||
mkdir /data/misc/dash 0770 media audio
|
||||
|
||||
# Mounting of persist is moved to 'on emmc-fs' and 'on fs' sections
|
||||
# We chown/chmod /persist again so because mount is run as root + defaults
|
||||
chown system system /persist
|
||||
chmod 0771 /persist
|
||||
|
||||
chmod 0664 /sys/devices/platform/msm_sdcc.1/polling
|
||||
chmod 0664 /sys/devices/platform/msm_sdcc.2/polling
|
||||
chmod 0664 /sys/devices/platform/msm_sdcc.3/polling
|
||||
chmod 0664 /sys/devices/platform/msm_sdcc.4/polling
|
||||
|
||||
# Chown polling nodes as needed from UI running on system server
|
||||
chown system system /sys/devices/platform/msm_sdcc.1/polling
|
||||
chown system system /sys/devices/platform/msm_sdcc.2/polling
|
||||
chown system system /sys/devices/platform/msm_sdcc.3/polling
|
||||
chown system system /sys/devices/platform/msm_sdcc.4/polling
|
||||
|
||||
#Create the symlink to qcn wpa_supplicant folder for ar6000 wpa_supplicant
|
||||
mkdir /data/system 0775 system system
|
||||
|
||||
# Create directory from IMS services
|
||||
mkdir /data/shared 0755
|
||||
chown system system /data/shared
|
||||
|
||||
# Create directory for FOTA
|
||||
mkdir /data/fota 0771
|
||||
chown system system /data/fota
|
||||
|
||||
# Create /data/time folder for time-services
|
||||
mkdir /data/time/ 0700 system system
|
||||
|
||||
mkdir /data/bluetooth 0770 bluetooth bluetooth
|
||||
# Enable the setgid bit on the directory
|
||||
chmod 2770 /data/bluetooth
|
||||
|
||||
mkdir /data/audio/ 0770 media audio
|
||||
# Enable the setgid bit on the directory
|
||||
chmod 2770 /data/audio
|
||||
|
||||
# Gpio DVS
|
||||
chown radio system /sys/class/secgpio_check/secgpio_check_all/secgpio_ctrl
|
||||
|
||||
# Create thombstones folders
|
||||
mkdir /data/tombstones 0771 system system
|
||||
mkdir /tombstones/modem 0771 system system
|
||||
mkdir /tombstones/lpass 0771 system system
|
||||
mkdir /tombstones/wcnss 0771 system system
|
||||
mkdir /tombstones/dsps 0771 system system
|
||||
mkdir /tombstones/mdm 0771 system system
|
||||
|
||||
# Create directory for ril data
|
||||
mkdir /data/misc/radio 0775 radio radio
|
||||
mkdir /data/misc/radio/hatp 0775 radio system
|
||||
|
||||
# DRM and related files in EFS
|
||||
mkdir /efs/drm 0774 drm system
|
||||
mkdir /efs/drm/sdrm 0774 drm system
|
||||
mkdir /efs/drm/sdrm/data_agent 0774 drm system
|
||||
#restorecon /efs/drm
|
||||
#restorecon /efs/drm/sdrm
|
||||
#restorecon /efs/drm/sdrm/data_agent
|
||||
|
||||
# DivX DRM
|
||||
mkdir /efs/.files 0775
|
||||
mkdir /efs/.files/.dx1 0775
|
||||
mkdir /efs/.files/.dm33 0775
|
||||
mkdir /efs/.files/.mp301 0775
|
||||
chown media system /efs/.files/.dx1
|
||||
chown media system /efs/.files/.dm33
|
||||
chown media system /efs/.files/.mp301
|
||||
chmod 0775 /efs/.files/.dx1
|
||||
chmod 0775 /efs/.files/.dm33
|
||||
chmod 0775 /efs/.files/.mp301
|
||||
|
||||
# h2k permission
|
||||
chmod 0644 /efs/redata.bin
|
||||
chown radio radio /efs/h2k.dat
|
||||
chmod 0644 /efs/h2k.dat
|
||||
|
||||
# DRK permission
|
||||
mkdir /efs/prov 0770 radio system
|
||||
chown radio system /efs/prov/libdevkm.lock
|
||||
chmod 0660 /efs/prov/libdevkm.lock
|
||||
|
||||
#OTG Test
|
||||
chown system radio /sys/class/host_notify/usb_otg/booster
|
||||
chmod 0660 /sys/class/host_notify/usb_otg/booster
|
||||
|
||||
# wifi
|
||||
mkdir /efs/wifi 0775 system system
|
||||
|
||||
# Permission for fast dormacy for RIL
|
||||
chown system radio /sys/devices/virtual/sec/bamdmux/waketime
|
||||
|
||||
# ICD
|
||||
exec check_icd
|
||||
chown system system /dev/icd
|
||||
chmod 0644 /dev/icd
|
||||
chown system system /dev/icdr
|
||||
chmod 0644 /dev/icdr
|
||||
chown system system /dev/tzic
|
||||
|
||||
# Symlink to bugreport storage location
|
||||
symlink /data/data/com.android.shell/files/bugreports /data/bugreports
|
||||
|
||||
# Create perfd deamon related dirs
|
||||
mkdir /data/misc/perfd 0755 root system
|
||||
chmod 2755 /data/misc/perfd
|
||||
mkdir /data/system/perfd 0770 root system
|
||||
chmod 2770 /data/system/perfd
|
||||
|
||||
# Remove symlinks to avoid issues with migrate after nandroid restores
|
||||
# Will be recreated at end of boot
|
||||
rm /data/data/com.android.providers.telephony/databases
|
||||
rm /data/data/com.android.providers.telephony/shared_prefs
|
||||
|
||||
# Remove the current apn as sometimes after a reboot it cant connect to 3g
|
||||
# It will be regenerated by the system
|
||||
rmdir /data/user_de/0/com.android.providers.telephony/shared_prefs
|
||||
|
||||
setprop vold.post_fs_data_done 1
|
||||
|
||||
on early-boot
|
||||
# Set RLIMIT_MEMLOCK to 64MB
|
||||
setrlimit 8 67108864 67108864
|
||||
|
||||
# Allow subsystem (modem etc) debugging
|
||||
write /sys/module/subsystem_restart/parameters/enable_debug ${persist.sys.ssr.enable_debug}
|
||||
|
||||
on boot
|
||||
# Permissions for bluetooth
|
||||
mkdir /efs/bluetooth 0775 radio system
|
||||
setprop ro.bt.bdaddr_path "/efs/bluetooth/bt_addr"
|
||||
chown bluetooth net_bt_stack ro.bt.bdaddr_path
|
||||
chown radio net_bt_stack /efs/bluetooth/bt_addr
|
||||
chmod 0755 /efs/bluetooth/bt_addr
|
||||
#restorecon_recursive /efs/bluetooth
|
||||
|
||||
# IMEI
|
||||
mkdir /efs/imei 0775 radio radio
|
||||
|
||||
# Create QMUX deamon socket area
|
||||
mkdir /dev/socket/qmux_radio 0770 radio radio
|
||||
chmod 2770 /dev/socket/qmux_radio
|
||||
mkdir /dev/socket/qmux_audio 0770 media audio
|
||||
chmod 2770 /dev/socket/qmux_audio
|
||||
mkdir /dev/socket/qmux_bluetooth 0770 bluetooth bluetooth
|
||||
chmod 2770 /dev/socket/qmux_bluetooth
|
||||
mkdir /dev/socket/qmux_gps 0770 gps gps
|
||||
chmod 2770 /dev/socket/qmux_gps
|
||||
|
||||
# Allow QMUX daemon to assign port open wait time
|
||||
chown radio radio /sys/devices/virtual/hsicctl/hsicctl0/modem_wait
|
||||
|
||||
# Modem requires this
|
||||
chown root radio /proc/cmdline
|
||||
chmod 0644 /proc/cmdline
|
||||
|
||||
# Remove SUID bit for iproute2 ip tool
|
||||
chmod 0755 /system/bin/ip
|
||||
|
||||
# For bridgemgr daemon to inform the USB driver of the correct transport
|
||||
chown radio radio /sys/class/android_usb/f_rmnet_smd_sdio/transport
|
||||
|
||||
# Allow RIL daemon to assign port open fd_wakelock
|
||||
chown system radio /sys/devices/virtual/sec/mdm_hsic_pm/waketime
|
||||
|
||||
# To allow interfaces to get v6 address when tethering is enabled
|
||||
write /proc/sys/net/ipv6/conf/rmnet0/accept_ra 2
|
||||
write /proc/sys/net/ipv6/conf/rmnet1/accept_ra 2
|
||||
write /proc/sys/net/ipv6/conf/rmnet2/accept_ra 2
|
||||
write /proc/sys/net/ipv6/conf/rmnet3/accept_ra 2
|
||||
write /proc/sys/net/ipv6/conf/rmnet4/accept_ra 2
|
||||
write /proc/sys/net/ipv6/conf/rmnet5/accept_ra 2
|
||||
write /proc/sys/net/ipv6/conf/rmnet6/accept_ra 2
|
||||
write /proc/sys/net/ipv6/conf/rmnet7/accept_ra 2
|
||||
write /proc/sys/net/ipv6/conf/rmnet_sdio0/accept_ra 2
|
||||
write /proc/sys/net/ipv6/conf/rmnet_sdio1/accept_ra 2
|
||||
write /proc/sys/net/ipv6/conf/rmnet_sdio2/accept_ra 2
|
||||
write /proc/sys/net/ipv6/conf/rmnet_sdio3/accept_ra 2
|
||||
write /proc/sys/net/ipv6/conf/rmnet_sdio4/accept_ra 2
|
||||
write /proc/sys/net/ipv6/conf/rmnet_sdio5/accept_ra 2
|
||||
write /proc/sys/net/ipv6/conf/rmnet_sdio6/accept_ra 2
|
||||
write /proc/sys/net/ipv6/conf/rmnet_sdio7/accept_ra 2
|
||||
write /proc/sys/net/ipv6/conf/rmnet_usb0/accept_ra 2
|
||||
write /proc/sys/net/ipv6/conf/rmnet_usb1/accept_ra 2
|
||||
write /proc/sys/net/ipv6/conf/rmnet_usb2/accept_ra 2
|
||||
write /proc/sys/net/ipv6/conf/rmnet_usb3/accept_ra 2
|
||||
|
||||
# To prevent out of order acknowledgements from making
|
||||
# connection tracking to treat them as not belonging to
|
||||
# the connection they belong to.
|
||||
# Otherwise, a weird issue happens in which some long
|
||||
# connections on high-throughput links get dropped when
|
||||
# an ack packet comes out of order
|
||||
write /proc/sys/net/netfilter/nf_conntrack_tcp_be_liberal 1
|
||||
|
||||
# Set the console loglevel to < KERN_INFO
|
||||
# Set the default message loglevel to KERN_INFO
|
||||
# modified by SEC, SEC use a loglevel path with another way.
|
||||
# write /proc/sys/kernel/printk "6 6 1 7"
|
||||
|
||||
# Flash storage isn't a good entropy source, and only causes locking
|
||||
# overhead in the kernel. Turn it off.
|
||||
write /sys/block/mmcblk0/queue/add_random 0
|
||||
|
||||
# MUIC
|
||||
chown system radio /sys/class/sec/switch/adc
|
||||
chown system radio /sys/class/sec/switch/reset_switch
|
||||
chown radio system /sys/class/sec/switch/usb_state
|
||||
|
||||
chown radio system /sys/devices/system/cpu/kernel_max
|
||||
chmod 664 /sys/devices/system/cpu/kernel_max
|
||||
|
||||
chown radio system /sys/class/kgsl/kgsl-3d0/max_pwrlevel
|
||||
chmod 664 /sys/class/kgsl/kgsl-3d0/max_pwrlevel
|
||||
chown radio system /sys/class/kgsl/kgsl-3d0/min_pwrlevel
|
||||
chmod 664 /sys/class/kgsl/kgsl-3d0/min_pwrlevel
|
||||
chown radio system /sys/class/kgsl/kgsl-3d0/gpu_available_frequencies
|
||||
chmod 664 /sys/class/kgsl/kgsl-3d0/gpu_available_frequencies
|
||||
|
||||
chown radio system /sys/class/devfreq/qcom,cpubw.68/available_frequencies
|
||||
chmod 664 /sys/class/devfreq/qcom,cpubw.68/available_frequencies
|
||||
chown radio system /sys/class/devfreq/qcom,cpubw.68/available_governors
|
||||
chmod 664 /sys/class/devfreq/qcom,cpubw.68/available_governors
|
||||
chown radio system /sys/class/devfreq/qcom,cpubw.68/governor
|
||||
chmod 664 /sys/class/devfreq/qcom,cpubw.68/governor
|
||||
chown radio system /sys/class/devfreq/qcom,cpubw.68/max_freq
|
||||
chmod 664 /sys/class/devfreq/qcom,cpubw.68/max_freq
|
||||
chown radio system /sys/class/devfreq/qcom,cpubw.68/min_freq
|
||||
chmod 664 /sys/class/devfreq/qcom,cpubw.68/min_freq
|
||||
|
||||
chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_rate
|
||||
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/timer_rate
|
||||
chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_slack
|
||||
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/timer_slack
|
||||
chown system system /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
|
||||
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
|
||||
chown system system /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
|
||||
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
|
||||
chown system system /sys/devices/system/cpu/cpufreq/interactive/target_loads
|
||||
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/target_loads
|
||||
chown system system /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
|
||||
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
|
||||
chown system system /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
|
||||
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
|
||||
chown system system /sys/devices/system/cpu/cpufreq/interactive/boost
|
||||
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/boost
|
||||
chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse
|
||||
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/boostpulse
|
||||
chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
|
||||
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
|
||||
chown system system /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
|
||||
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
|
||||
|
||||
# Assume SMP uses shared cpufreq policy for all CPUs
|
||||
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
|
||||
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
|
||||
chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
|
||||
chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
|
||||
|
||||
# Auto Brightness
|
||||
chown system system /sys/class/backlight/panel/auto_brightness
|
||||
chmod 0660 /sys/class/backlight/panel/auto_brightness
|
||||
|
||||
# LCD mdnie and panel work
|
||||
chown system system /sys/class/mdnie/mdnie/negative
|
||||
chown system media_rw /sys/class/mdnie/mdnie/accessibility
|
||||
|
||||
chown radio system /sys/class/lcd/panel/lcd_power
|
||||
chown radio system /sys/class/lcd/panel/lcd_type
|
||||
chown radio system /sys/class/lcd/panel/power_reduce
|
||||
chown radio system /sys/class/lcd/panel/siop_enable
|
||||
|
||||
chown system system /sys/class/leds/keyboard-backlight/brightness
|
||||
chown system system /sys/class/leds/lcd-backlight/brightness
|
||||
chown system system /sys/class/leds/button-backlight/brightness
|
||||
|
||||
chown system system /sys/kernel/ipv4/tcp_wmem_min
|
||||
chown system system /sys/kernel/ipv4/tcp_wmem_def
|
||||
chown system system /sys/kernel/ipv4/tcp_wmem_max
|
||||
chown system system /sys/kernel/ipv4/tcp_rmem_min
|
||||
chown system system /sys/kernel/ipv4/tcp_rmem_def
|
||||
chown system system /sys/kernel/ipv4/tcp_rmem_max
|
||||
|
||||
# Adjust YUV to RGB Conversion(CSC_Conversion)
|
||||
chown system media_rw /sys/class/graphics/fb0/csc_cfg
|
||||
chmod 0660 /sys/class/graphics/fb0/csc_cfg
|
||||
|
||||
#OTG Test
|
||||
chown system radio /sys/class/host_notify/usb_otg/booster
|
||||
chmod 0660 /sys/class/host_notify/usb_otg/booster
|
||||
|
||||
# Display color calibration
|
||||
chown system system /sys/devices/virtual/graphics/fb0/rgb
|
||||
chmod 0660 /sys/devices/virtual/graphics/fb0/rgb
|
||||
|
||||
# Essential node for usbservice
|
||||
mkdir /dev/bus/ 755 root root
|
||||
mkdir /dev/bus/usb 755 root root
|
||||
|
||||
# Permissions for Camera
|
||||
chown root system /sys/class/camera/rear/rear_camantibanding
|
||||
chown system radio /sys/class/camera/rear/rear_camfw
|
||||
chown system radio /sys/class/camera/rear/rear_camfw_full
|
||||
chown system radio /sys/class/camera/rear/rear_camfw_load
|
||||
chown system radio /sys/class/camera/rear/rear_camtype
|
||||
chown system radio /sys/class/camera/rear/rear_corever
|
||||
chown system radio /sys/class/camera/rear/rear_companionfw_full
|
||||
chown system radio /sys/class/camera/rear/rear_calcheck
|
||||
chown system radio /sys/class/camera/rear/rear_fwcheck
|
||||
chown system radio /sys/class/camera/rear/isp_core
|
||||
chown system radio /sys/class/camera/flash/rear_flash
|
||||
chown system radio /sys/class/camera/front/front_camfw
|
||||
chown system radio /sys/class/camera/front/front_camtype
|
||||
|
||||
#OTG Test
|
||||
chown system radio /sys/class/host_notify/usb_otg/booster
|
||||
chmod 0660 /sys/class/host_notify/usb_otg/booster
|
||||
|
||||
# Permissions for SSRM
|
||||
chmod 0664 /sys/devices/platform/sec-thermistor/temperature
|
||||
chmod 0664 /sys/class/power_supply/battery/siop_level
|
||||
chmod 0664 /sys/class/power_supply/battery/test_charge_current
|
||||
chown radio system /sys/devices/platform/sec-thermistor/temperature
|
||||
chown radio system /sys/class/power_supply/battery/siop_level
|
||||
chown radio system /sys/class/power_supply/battery/test_charge_current
|
||||
|
||||
# Permissions for Charging
|
||||
chown system radio /sys/class/power_supply/battery/batt_reset_soc
|
||||
chown system radio /sys/class/power_supply/battery/update
|
||||
chown system radio /sys/class/power_supply/battery/factory_mode
|
||||
chown system radio /sys/class/power_supply/battery/batt_slate_mode
|
||||
chown sdcard_rw sdcard_rw /sys/class/power_supply/battery/call
|
||||
chown sdcard_rw sdcard_rw /sys/class/power_supply/battery/video
|
||||
chown sdcard_rw sdcard_rw /sys/class/power_supply/battery/music
|
||||
chown sdcard_rw sdcard_rw /sys/class/power_supply/battery/browser
|
||||
chown sdcard_rw sdcard_rw /sys/class/power_supply/battery/hotspot
|
||||
chown sdcard_rw sdcard_rw /sys/class/power_supply/battery/camera
|
||||
chown system radio /sys/class/power_supply/battery/talk_wcdma
|
||||
chown system radio /sys/class/power_supply/battery/talk_gsm
|
||||
chown system radio /sys/class/power_supply/battery/call
|
||||
chown system radio /sys/class/power_supply/battery/data_call
|
||||
chown system radio /sys/class/power_supply/battery/gps
|
||||
chown system radio /sys/class/power_supply/battery/wifi
|
||||
chown system radio /sys/class/power_supply/battery/lte
|
||||
chown system radio /sys/class/power_supply/battery/wc_enable
|
||||
chown system radio /sys/class/power_supply/battery/lcd
|
||||
|
||||
# Permission for fast dormancy for RIL
|
||||
chown system radio /sys/devices/virtual/sec/bamdmux/waketime
|
||||
#chmod 777 /sys/devices/virtual/sec/bamdmux/waketime
|
||||
|
||||
# Permissions for gpio_keys
|
||||
chown system radio /sys/class/sec/sec_key/wakeup_keys
|
||||
write /sys/class/sec/sec_key/wakeup_keys 116,172
|
||||
|
||||
# HDCP 2.x
|
||||
mkdir /data/system/hdcp2 0775 system system
|
||||
|
||||
# h2k permission
|
||||
chown radio system /efs/redata.bin
|
||||
chmod 0644 /efs/h2k.dat
|
||||
mkdir /data/misc/radio/hatp 0775 radio system
|
||||
|
||||
# Permission for HALL IC
|
||||
chown system radio /sys/class/sec/sec_key/hall_detect
|
||||
|
||||
# Vibetonz
|
||||
chmod 0660 /dev/tspdrv
|
||||
chown vibe vibe /dev/tspdrv
|
||||
|
||||
# Vibrator
|
||||
chmod 0644 /sys/class/timed_output/vibrator/pwm_value
|
||||
chown system system /sys/class/timed_output/vibrator/pwm_value
|
||||
chown system system /sys/class/timed_output/vibrator/enable
|
||||
|
||||
# Permissions for TSP
|
||||
chown system system /sys/class/sec/tsp/cmd
|
||||
chown system system /sys/class/sec/tsp/input/enabled
|
||||
chown system system /sys/class/input/input0/enabled
|
||||
chown system system /sys/class/input/input1/enabled
|
||||
chown system system /sys/class/input/input2/enabled
|
||||
chmod 0664 /sys/class/sec/tsp/cmd
|
||||
chmod 0660 /sys/class/sec/tsp/input/enabled
|
||||
chmod 0664 /sys/class/input/input0/enabled
|
||||
chmod 0664 /sys/class/input/input1/enabled
|
||||
chmod 0664 /sys/class/input/input2/enabled
|
||||
|
||||
# Permission for touchkey
|
||||
chown system system /sys/class/sec/sec_touchkey/keypad_enable
|
||||
chown system system /sys/class/sec/sec_touchkey/touchkey_brightness
|
||||
chown system system /sys/class/sec/sec_touchkey/touchkey_menu
|
||||
chown system system /sys/class/sec/sec_touchkey/touchkey_back
|
||||
chown system system /sys/class/sec/sec_touchkey/touch_version
|
||||
chown system system /sys/class/sec/sec_touchkey/touchkey_firm_version_panel
|
||||
chown system system /sys/class/sec/sec_touchkey/touchkey_firm_version_phone
|
||||
chown system system /sys/class/sec/sec_touchkey/touchkey_firm_update_status
|
||||
chown system system /sys/class/sec/sec_touchkey/touchkey_firm_update
|
||||
chown system system /sys/class/sec/sec_touchkey/touch_sensitivity
|
||||
chown system system /sys/class/sec/sec_touchkey/touchkey_threshold
|
||||
chown system system /sys/devices/virtual/sec/sec_touchkey/brightness
|
||||
chmod 0664 /sys/class/sec/sec_touchkey/keypad_enable
|
||||
chmod 0664 /sys/class/sec/sec_touchkey/touchkey_brightness
|
||||
chmod 0664 /sys/class/sec/sec_touchkey/touchkey_menu
|
||||
chmod 0664 /sys/class/sec/sec_touchkey/touchkey_back
|
||||
chmod 0664 /sys/class/sec/sec_touchkey/touch_version
|
||||
chmod 0664 /sys/class/sec/sec_touchkey/touchkey_firm_version_panel
|
||||
chmod 0664 /sys/class/sec/sec_touchkey/touchkey_firm_version_phone
|
||||
chmod 0664 /sys/class/sec/sec_touchkey/touchkey_firm_update_status
|
||||
chmod 0664 /sys/class/sec/sec_touchkey/touchkey_firm_update
|
||||
chmod 0664 /sys/class/sec/sec_touchkey/touch_sensitivity
|
||||
chmod 0664 /sys/class/sec/sec_touchkey/touchkey_threshold
|
||||
chmod 0664 /sys/devices/virtual/sec/sec_touchkey/brightness
|
||||
restorecon /sys/class/sec/sec_touchkey/keypad_enable
|
||||
|
||||
# Assign TCP buffer thresholds to be ceiling value of technology maximums
|
||||
# Increased technology maximums should be reflected here.
|
||||
write /proc/sys/net/core/rmem_max 8388608
|
||||
write /proc/sys/net/core/wmem_max 8388608
|
||||
|
||||
# Wifi firmware reload path
|
||||
chmod 0660 /sys/module/wlan/parameters/fwpath
|
||||
chown wifi wifi /sys/module/wlan/parameters/fwpath
|
||||
|
||||
# Mark wifi driver as unloaded - "ok" indicates loaded
|
||||
setprop wlan.driver.status not_ok
|
||||
|
||||
on property:dev.bootcomplete=1
|
||||
setprop sys.io.scheduler "bfq"
|
||||
|
||||
# Symlink directories to access telephony.db and preferred-apn.xml required by libsec-ril
|
||||
symlink /data/user_de/0/com.android.providers.telephony/databases /data/data/com.android.providers.telephony/databases
|
||||
symlink /data/user_de/0/com.android.providers.telephony/shared_prefs /data/data/com.android.providers.telephony/shared_prefs
|
||||
restorecon /data/data/com.android.providers.telephony/databases
|
||||
restorecon /data/data/com.android.providers.telephony/shared_pref
|
||||
|
||||
# Services begin here
|
||||
|
||||
service adsprpcd /vendor/bin/adsprpcd
|
||||
class main
|
||||
user media
|
||||
group media
|
||||
|
||||
service charger /charger
|
||||
class charger
|
||||
critical
|
||||
group root system
|
||||
seclabel u:r:charger:s0
|
||||
|
||||
service healthd /sbin/healthd
|
||||
class core
|
||||
critical
|
||||
seclabel u:r:healthd:s0
|
||||
|
||||
service lpm /vendor/bin/lpm
|
||||
class charger
|
||||
critical
|
||||
|
||||
service healthd-charger /sbin/healthd -n
|
||||
class charger
|
||||
critical
|
||||
seclabel u:r:healthd:s0
|
||||
|
||||
service charger_monitor /vendor/bin/charger_monitor
|
||||
user system
|
||||
group system
|
||||
disabled
|
||||
|
||||
service ds_fmc_appd /vendor/bin/ds_fmc_appd -p "rmnet0" -D
|
||||
class late_start
|
||||
user root
|
||||
group radio wifi inet
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
on property:persist.data.ds_fmc_app.mode=1
|
||||
start ds_fmc_appd
|
||||
|
||||
service hciattach /system/bin/sh /system/etc/init.qcom.bt.sh
|
||||
class late_start
|
||||
user bluetooth
|
||||
group bluetooth net_bt_admin
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
on property:bluetooth.hciattach=true
|
||||
start hciattach
|
||||
|
||||
on property:bluetooth.hciattach=false
|
||||
setprop bluetooth.status off
|
||||
|
||||
service irsc_util /vendor/bin/irsc_util "/vendor/etc/sec_config"
|
||||
class main
|
||||
user root
|
||||
oneshot
|
||||
|
||||
service mpdecision /vendor/bin/mpdecision --avg_comp
|
||||
class main
|
||||
user root
|
||||
group root readproc
|
||||
disabled
|
||||
|
||||
service qcamerasvr /vendor/bin/mm-qcamera-daemon
|
||||
class main
|
||||
user camera
|
||||
group camera system inet input graphics bluetooth
|
||||
|
||||
service qmuxd /vendor/bin/qmuxd
|
||||
class core
|
||||
user radio
|
||||
group radio audio bluetooth gps diag oem_2950 log
|
||||
|
||||
service qseecomd /vendor/bin/qseecomd
|
||||
class core
|
||||
user root
|
||||
group root
|
||||
|
||||
service rfs_access /vendor/bin/rfs_access
|
||||
class core
|
||||
user system
|
||||
group system net_raw
|
||||
|
||||
service rmt_storage /vendor/bin/rmt_storage
|
||||
class core
|
||||
user root
|
||||
group system wakelock
|
||||
|
||||
service thermal-engine /vendor/bin/thermal-engine -c /vendor/etc/thermal-engine-8226.conf
|
||||
class main
|
||||
user root
|
||||
socket thermal-send-client stream 0666 system system
|
||||
socket thermal-recv-client stream 0660 system system
|
||||
socket thermal-recv-passive-client stream 0666 system system
|
||||
group root
|
||||
|
||||
service time_daemon /vendor/bin/time_daemon
|
||||
class late_start
|
||||
user root
|
||||
group root
|
||||
|
||||
service wcnss-service /system/bin/wcnss_service
|
||||
class late_start
|
||||
user system
|
||||
group system wifi oem_2950 diag radio
|
||||
oneshot
|
||||
|
||||
# WPA
|
||||
service wpa_supplicant /vendor/bin/hw/wpa_supplicant \
|
||||
-ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \
|
||||
-I/system/etc/wifi/p2p_supplicant_overlay.conf -N \
|
||||
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
|
||||
-I/system/etc/wifi/wpa_supplicant_overlay.conf \
|
||||
-puse_p2p_group_interface=1 \
|
||||
-e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
|
||||
# we will start as root and wpa_supplicant will switch to user wifi
|
||||
# after setting up the capabilities required for WEXT
|
||||
# user wifi
|
||||
# group wifi inet keystore
|
||||
class main
|
||||
socket wpa_wlan0 dgram 660 wifi wifi
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
on property:init.svc.wpa_supplicant=stopped
|
||||
stop dhcpcd
|
||||
|
||||
service dhcpcd_wlan0 /system/bin/dhcpcd -ABKLG
|
||||
class late_start
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
service dhcpcd_p2p /system/bin/dhcpcd -ABKLG
|
||||
class late_start
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
service iprenew_wlan0 /system/bin/dhcpcd -n
|
||||
class late_start
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
service iprenew_p2p /system/bin/dhcpcd -n
|
||||
class late_start
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
service dhcpcd_bt-pan /system/bin/dhcpcd -BKLG
|
||||
class late_start
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
service iprenew_bt-pan /system/bin/dhcpcd -n
|
||||
class late_start
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
service dhcpcd_bnep0 /system/bin/dhcpcd -BKLG
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
service dhcpcd_bnep1 /system/bin/dhcpcd -BKLG
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
service dhcpcd_bnep2 /system/bin/dhcpcd -BKLG
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
service dhcpcd_bnep3 /system/bin/dhcpcd -BKLG
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
service dhcpcd_bnep4 /system/bin/dhcpcd -BKLG
|
||||
disabled
|
||||
oneshot
|
||||
|
||||
# Limit to SoC reset (1) and independent SSR (3)
|
||||
on property:persist.sys.ssr.restart_level=1
|
||||
write /sys/module/subsystem_restart/parameters/restart_level 1
|
||||
|
||||
on property:persist.sys.ssr.restart_level=3
|
||||
write /sys/module/subsystem_restart/parameters/restart_level 3
|
818
rootdir/etc/init.qcom.usb.rc
Normal file
818
rootdir/etc/init.qcom.usb.rc
Normal file
|
@ -0,0 +1,818 @@
|
|||
# Copyright (c) 2011-2018, The Linux Foundation. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of The Linux Foundation nor
|
||||
# the names of its contributors may be used to endorse or promote
|
||||
# products derived from this software without specific prior written
|
||||
# permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
on init
|
||||
write /sys/class/android_usb/android0/iSerial ${ro.serialno}
|
||||
write /sys/class/android_usb/android0/f_rndis/wceis 1
|
||||
write /sys/bus/platform/drivers/msm_hsic_host/unbind "msm_hsic_host"
|
||||
chown system system /sys/class/android_usb/android0/usb30en
|
||||
chmod 0660 /sys/class/android_usb/android0/usb30en
|
||||
chown system system /sys/class/android_usb/android0/terminal_version
|
||||
chmod 0660 /sys/class/android_usb/android0/terminal_version
|
||||
|
||||
on charger
|
||||
setprop sys.usb.config mass_storage
|
||||
|
||||
on fs
|
||||
mkdir /dev/usb-ffs 0770 shell shell
|
||||
mkdir /dev/usb-ffs/adb 0770 shell shell
|
||||
mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000
|
||||
write /sys/class/android_usb/android0/f_ffs/aliases adb
|
||||
|
||||
setprop sys.usb.ffs.aio_compat 1
|
||||
|
||||
# Following are the parameters required for usb functionality. They provide configurable options like
|
||||
# product_id/vendor id and allows specifying required functions:
|
||||
#
|
||||
# Required parameters:
|
||||
#
|
||||
# /sys/class/android_usb/android0/enable: Enables/disables usb composition
|
||||
# Value: 0 (disable), 1 (enable)
|
||||
#
|
||||
# /sys/class/android_usb/android0/idVendor: Stores Vendor ID
|
||||
# Value: 05c6 (Vendor id for Qualcomm Inc)
|
||||
#
|
||||
# /sys/class/android_usb/android0/idProduct: Stores Product id corresponding to usb composition
|
||||
# Value: 0x9xxx for composite interface, 0xFxxx for single interface
|
||||
#
|
||||
# /sys/class/android_usb/android0/f_diag/clients: Stores name of clients representing a diag interface.
|
||||
# Value: Passed one per interface. e.g. diag[,diag_mdm, diag_qsc, diag_mdm2]
|
||||
#
|
||||
# /sys/class/android_usb/android0/functions: Stores name of the function drivers used in usb composition.
|
||||
# Value: Passed one per function driver. e.g. diag[,adb]
|
||||
#
|
||||
#Optional parameters:
|
||||
#
|
||||
# /sys/class/android_usb/android0/f_serial/transports: Stores type of underlying transports used to
|
||||
# communicate to serial interface.
|
||||
# Value: Passed one per interface. One value represents control and data transport together.
|
||||
# e.g. smd[,sdio,tty,hsic]
|
||||
# Only required if serial interface is present.
|
||||
#
|
||||
# /sys/class/android_usb/android0/f_serial/transport_names: Stores name of the underlying transports
|
||||
# used to communicate to serial interface. This is used to distinguish between more than one interface
|
||||
# using same transport type.
|
||||
# Value: Passed one per interface. One value represents control and data transport together.
|
||||
# e.g. serial_hsic[,serial_hsusb]
|
||||
# Only required for transport type hsic, optional for other transport types.
|
||||
#
|
||||
# /sys/class/android_usb/android0/f_rmnet/transports: Stores type of underlying transports used to
|
||||
# communicate to rmnet interface.
|
||||
# Value: Passed two per interface as control, data transport type pair.
|
||||
# e.g. smd,bam[,hsuart,hsuart]
|
||||
# Only required if rmnet interface is present.
|
||||
#
|
||||
# /sys/class/android_usb/android0/f_rmnet/transport_names: Stores name of the underlying transports
|
||||
# used to communicate to rmnet interface. This is used to distinguish between more than one interface
|
||||
# using same transport type.
|
||||
# Value: Passed one per interface. One value represents control and data transport together.
|
||||
# e.g. rmnet_hsic[,rmnet_hsusb]
|
||||
# Only required for transport type hsic, optional for other transport types.
|
||||
|
||||
|
||||
# USB Composite for Samsung USB Driver
|
||||
|
||||
on property:sys.usb.config=mtp,conn_gadget
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 04E8
|
||||
write /sys/class/android_usb/android0/idProduct 6860
|
||||
write /sys/class/android_usb/android0/f_acm/instances 1
|
||||
write /sys/class/android_usb/android0/functions mtp,acm,conn_gadget
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=mtp,conn_gadget,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 04E8
|
||||
write /sys/class/android_usb/android0/idProduct 6860
|
||||
write /sys/class/android_usb/android0/f_acm/instances 1
|
||||
write /sys/class/android_usb/android0/functions mtp,acm,conn_gadget,adb
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=mtp
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 04E8
|
||||
write /sys/class/android_usb/android0/idProduct 6860
|
||||
write /sys/class/android_usb/android0/f_acm/instances 1
|
||||
write /sys/class/android_usb/android0/functions mtp,acm
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=mtp,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 04E8
|
||||
write /sys/class/android_usb/android0/idProduct 6860
|
||||
write /sys/class/android_usb/android0/functions mtp,adb
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=mtp,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 04E8
|
||||
write /sys/class/android_usb/android0/idProduct 6860
|
||||
write /sys/class/android_usb/android0/f_acm/instances 1
|
||||
write /sys/class/android_usb/android0/functions mtp,acm,adb
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
|
||||
on property:sys.usb.config=ptp
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 04E8
|
||||
write /sys/class/android_usb/android0/idProduct 6865
|
||||
write /sys/class/android_usb/android0/functions ptp
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=ptp,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 04E8
|
||||
write /sys/class/android_usb/android0/idProduct 6866
|
||||
write /sys/class/android_usb/android0/functions ptp,adb
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=rndis
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 04E8
|
||||
write /sys/class/android_usb/android0/idProduct 6863
|
||||
write /sys/class/android_usb/android0/functions rndis
|
||||
write /sys/class/android_usb/android0/bDeviceClass 224
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=rndis,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 04E8
|
||||
write /sys/class/android_usb/android0/idProduct 6864
|
||||
write /sys/class/android_usb/android0/functions rndis,adb
|
||||
write /sys/class/android_usb/android0/bDeviceClass 224
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=ncm
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 04E8
|
||||
write /sys/class/android_usb/android0/idProduct 685D
|
||||
write /sys/class/android_usb/android0/functions ncm
|
||||
write /sys/class/android_usb/android0/bDeviceClass 2
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=ncm,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 04E8
|
||||
write /sys/class/android_usb/android0/idProduct 685D
|
||||
write /sys/class/android_usb/android0/functions ncm,adb
|
||||
write /sys/class/android_usb/android0/bDeviceClass 2
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# rndis,acm,diag and rmnet,acm,diag are used for IOT Hidden Menu
|
||||
on property:sys.usb.config=rndis,acm,diag
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 04E8
|
||||
write /sys/class/android_usb/android0/idProduct 6864
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_acm/instances 1
|
||||
write /sys/class/android_usb/android0/functions rndis,acm,diag
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=rmnet,acm,diag
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 04E8
|
||||
write /sys/class/android_usb/android0/idProduct 685D
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_acm/instances 1
|
||||
write /sys/class/android_usb/android0/f_rmnet/transports smd,bam
|
||||
write /sys/class/android_usb/android0/functions diag,acm,rmnet
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,acm,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 04E8
|
||||
write /sys/class/android_usb/android0/idProduct 685D
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_acm/instances 1
|
||||
write /sys/class/android_usb/android0/functions diag,acm,adb
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# For CDFS composite
|
||||
on property:sys.usb.config=mass_storage
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 04E8
|
||||
write /sys/class/android_usb/android0/idProduct 685B
|
||||
write /sys/class/android_usb/android0/functions mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=mass_storage,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 04E8
|
||||
write /sys/class/android_usb/android0/idProduct 685E
|
||||
write /sys/class/android_usb/android0/f_acm/instances 1
|
||||
write /sys/class/android_usb/android0/functions mass_storage,adb
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=mass_storage,mtp
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 04E8
|
||||
write /sys/class/android_usb/android0/idProduct 6860
|
||||
write /sys/class/android_usb/android0/functions mtp,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=mass_storage,mtp,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 04E8
|
||||
write /sys/class/android_usb/android0/idProduct 6860
|
||||
write /sys/class/android_usb/android0/functions mtp,mass_storage,adb
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# As request from the CHINA GOVERNMENT SECURITY POLICY
|
||||
on property:sys.usb.config=askon
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=askon,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_bam,mass_storage,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9025
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_serial/transports smd,tty
|
||||
write /sys/class/android_usb/android0/f_rmnet/transports smd,bam
|
||||
write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,acm_smd,acm_tty,rmnet_bam,mass_storage,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 903D
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_acm/acm_transports smd,tty
|
||||
write /sys/class/android_usb/android0/f_rmnet/transports smd,bam
|
||||
write /sys/class/android_usb/android0/functions diag,adb,acm,rmnet,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_bam,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9026
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_serial/transports smd,tty
|
||||
write /sys/class/android_usb/android0/f_rmnet/transports smd,bam
|
||||
write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,acm_smd,acm_tty,rmnet_bam,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 903E
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_acm/acm_transports smd,tty
|
||||
write /sys/class/android_usb/android0/f_rmnet/transports smd,bam
|
||||
write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,diag_mdm,serial_sdio,serial_smd,rmnet_smd_sdio,mass_storage,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9037
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
|
||||
write /sys/class/android_usb/android0/f_serial/transports sdio,smd
|
||||
write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet_smd_sdio,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,diag_mdm,acm_sdio,acm_smd,rmnet_smd_sdio,mass_storage,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 903B
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
|
||||
write /sys/class/android_usb/android0/f_acm/acm_transports sdio,smd
|
||||
write /sys/class/android_usb/android0/functions diag,adb,acm,rmnet_smd_sdio,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,diag_mdm,serial_sdio,serial_smd,rmnet_smd_sdio,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9038
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
|
||||
write /sys/class/android_usb/android0/f_serial/transports sdio,smd
|
||||
write /sys/class/android_usb/android0/functions diag,serial,rmnet_smd_sdio,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,diag_mdm,acm_sdio,acm_smd,rmnet_smd_sdio,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 903C
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
|
||||
write /sys/class/android_usb/android0/f_acm/acm_transports sdio,smd
|
||||
write /sys/class/android_usb/android0/functions diag,acm,rmnet_smd_sdio,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,diag_mdm,serial_sdio,serial_tty,rmnet_sdio,mass_storage,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9031
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
|
||||
write /sys/class/android_usb/android0/f_serial/transports sdio,tty
|
||||
write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet_sdio,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,diag_mdm,acm_sdio,acm_tty,rmnet_sdio,mass_storage,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 903B
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
|
||||
write /sys/class/android_usb/android0/f_acm/acm_transports sdio,tty
|
||||
write /sys/class/android_usb/android0/functions diag,adb,acm,rmnet_sdio,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,diag_mdm,serial_sdio,serial_tty,rmnet_sdio,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9032
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
|
||||
write /sys/class/android_usb/android0/f_serial/transports sdio,tty
|
||||
write /sys/class/android_usb/android0/functions diag,serial,rmnet_sdio,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,diag_mdm,acm_sdio,acm_tty,rmnet_sdio,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 903C
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
|
||||
write /sys/class/android_usb/android0/f_acm/acm_transports sdio,tty
|
||||
write /sys/class/android_usb/android0/functions diag,acm,rmnet_sdio,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,serial_tty,serial_tty,rmnet_smd,mass_storage,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9025
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_serial/transports tty,tty
|
||||
write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet_smd,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
start port-bridge
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,acm_tty,acm_tty,rmnet_smd,mass_storage,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 903D
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_acm/acm_transports tty,tty
|
||||
write /sys/class/android_usb/android0/functions diag,adb,acm,rmnet_smd,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
start port-bridge
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,serial_tty,serial_tty,rmnet_smd,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9026
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_serial/transports tty,tty
|
||||
write /sys/class/android_usb/android0/functions diag,serial,rmnet_smd,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start port-bridge
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,acm_tty,acm_tty,rmnet_smd,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 903E
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_acm/acm_transports tty,tty
|
||||
write /sys/class/android_usb/android0/functions diag,serial,rmnet_smd,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_smd,mass_storage,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9025
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_serial/transports smd,tty
|
||||
write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet_smd,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,acm_smd,acm_tty,rmnet_smd,mass_storage,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 903D
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_acm/acm_transports smd,tty
|
||||
write /sys/class/android_usb/android0/functions diag,adb,acm,rmnet_smd,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
start port-bridge
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_smd,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9026
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_serial/transports smd,tty
|
||||
write /sys/class/android_usb/android0/functions diag,serial,rmnet_smd,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,acm_smd,acm_tty,rmnet_smd,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 903E
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_acm/acm_transports smd,tty
|
||||
write /sys/class/android_usb/android0/functions diag,serial,rmnet_smd,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# Fusion 3 composition
|
||||
on property:sys.usb.config=diag,serial_hsic,serial_tty,rmnet_hsic,mass_storage,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9025
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_serial/transports hsic,tty
|
||||
write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic
|
||||
write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic
|
||||
write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic
|
||||
write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# Fusion 3 composition with diag_mdm and adb
|
||||
on property:sys.usb.config=diag,diag_mdm,serial_hsic,serial_tty,rmnet_hsic,mass_storage,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9031
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
|
||||
write /sys/class/android_usb/android0/f_serial/transports hsic,tty
|
||||
write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic
|
||||
write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic
|
||||
write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic
|
||||
write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# Fusion 3 composition with diag_mdm
|
||||
on property:sys.usb.config=diag,diag_mdm,serial_hsic,serial_tty,rmnet_hsic,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9032
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
|
||||
write /sys/class/android_usb/android0/f_serial/transports hsic,tty
|
||||
write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic
|
||||
write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic
|
||||
write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic
|
||||
write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# Fusion 3 DSDA composition with adb
|
||||
on property:sys.usb.config=diag,diag_mdm,diag_qsc,serial_hsic,serial_hsuart,rmnet_hsic,rmnet_hsuart,mass_storage,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9065
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_qsc
|
||||
write /sys/class/android_usb/android0/f_serial/transports hsic,hsuart
|
||||
write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic,serial_hsuart
|
||||
write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic,hsuart,hsuart
|
||||
write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic,rmnet_hsuart
|
||||
write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# Fusion 3 DSDA composition without adb
|
||||
on property:sys.usb.config=diag,diag_mdm,diag_qsc,serial_hsic,serial_hsuart,rmnet_hsic,rmnet_hsuart,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9066
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_qsc
|
||||
write /sys/class/android_usb/android0/f_serial/transports hsic,hsuart
|
||||
write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic,serial_hsuart
|
||||
write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic,hsuart,hsuart
|
||||
write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic,rmnet_hsuart
|
||||
write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# Fusion 3 DSDA2 composition with adb
|
||||
on property:sys.usb.config=diag,diag_mdm,diag_mdm2,serial_hsic,serial_hsusb,rmnet_hsic,rmnet_hsusb,mass_storage,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9065
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_mdm2
|
||||
write /sys/class/android_usb/android0/f_serial/transports hsic,hsic
|
||||
write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic,serial_hsusb
|
||||
write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic,hsic,hsic
|
||||
write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic,rmnet_hsusb
|
||||
write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# Fusion 3 DSDA2 composition without adb
|
||||
on property:sys.usb.config=diag,diag_mdm,diag_mdm2,serial_hsic,serial_hsusb,rmnet_hsic,rmnet_hsusb,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9066
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_mdm2
|
||||
write /sys/class/android_usb/android0/f_serial/transports hsic,hsic
|
||||
write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic,serial_hsusb
|
||||
write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic,hsic,hsic
|
||||
write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic,rmnet_hsusb
|
||||
write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# Fusion 2.2 composition with diag_qsc and adb
|
||||
on property:sys.usb.config=diag,diag_qsc,serial_smd,serial_tty,serial_hsuart,rmnet_hsuart,mass_storage,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9053
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_qsc
|
||||
write /sys/class/android_usb/android0/f_serial/transports smd,tty,hsuart
|
||||
write /sys/class/android_usb/android0/f_rmnet/transports smd,bam,hsuart,hsuart
|
||||
write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# Fusion 2.2 composition with diag_qsc
|
||||
on property:sys.usb.config=diag,diag_qsc,serial_smd,serial_tty,serial_hsuart,rmnet_hsuart,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9054
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_qsc
|
||||
write /sys/class/android_usb/android0/f_serial/transports smd,tty,hsuart
|
||||
write /sys/class/android_usb/android0/f_rmnet/transports smd,bam,hsuart,hsuart
|
||||
write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=rndis,diag,diag_mdm
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9041
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
|
||||
write /sys/class/android_usb/android0/functions rndis,diag
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=rndis,diag,diag_mdm,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9042
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
|
||||
write /sys/class/android_usb/android0/functions rndis,diag,adb
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=rndis,diag,diag_mdm,diag_qsc
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9086
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_qsc
|
||||
write /sys/class/android_usb/android0/functions rndis,diag
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=rndis,diag,diag_mdm,diag_qsc,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9087
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_qsc
|
||||
write /sys/class/android_usb/android0/functions rndis,diag,adb
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=mtp,diag,diag_mdm
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9040
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
|
||||
write /sys/class/android_usb/android0/functions mtp,diag
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=mtp,diag,diag_mdm,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 903F
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
|
||||
write /sys/class/android_usb/android0/functions mtp,diag,adb
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=mtp,diag,diag_mdm,diag_qsc
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9088
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_qsc
|
||||
write /sys/class/android_usb/android0/functions mtp,diag
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=mtp,diag,diag_mdm,diag_qsc,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9089
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_qsc
|
||||
write /sys/class/android_usb/android0/functions mtp,diag,adb
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,diag_mdm,ccid
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9045
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
|
||||
write /sys/class/android_usb/android0/functions diag,ccid
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,diag_mdm,ccid,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9044
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
|
||||
write /sys/class/android_usb/android0/functions diag,adb,ccid
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,qdss
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 904A
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/functions diag,qdss
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,qdss,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9060
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/functions diag,qdss,adb
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,qdss,rmnet_bam
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9083
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_rmnet/transports smd,bam
|
||||
write /sys/class/android_usb/android0/functions diag,qdss,rmnet
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,qdss,rmnet_bam,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9084
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_rmnet/transports smd,bam
|
||||
write /sys/class/android_usb/android0/functions diag,qdss,adb,rmnet
|
||||
write /sys/module/dwc3/parameters/tx_fifo_resize_enable 1
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=rndis,diag,qdss
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9081
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/functions rndis,diag,qdss
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=rndis,diag,qdss,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9082
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/functions rndis,diag,qdss,adb
|
||||
write /sys/module/dwc3/parameters/tx_fifo_resize_enable 1
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=ncm
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 0525
|
||||
write /sys/class/android_usb/android0/idProduct A4A1
|
||||
write /sys/class/android_usb/android0/functions ncm
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=ncm,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 908C
|
||||
write /sys/class/android_usb/android0/functions ncm,adb
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# USB midi configuration
|
||||
on property:sys.usb.config=midi
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 18D1
|
||||
write /sys/class/android_usb/android0/idProduct 4EE8
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# USB midi configuration, with adb
|
||||
on property:sys.usb.config=midi,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 18D1
|
||||
write /sys/class/android_usb/android0/idProduct 4EE9
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
68
rootdir/etc/scripts/init.qcom.bt.sh
Normal file
68
rootdir/etc/scripts/init.qcom.bt.sh
Normal file
|
@ -0,0 +1,68 @@
|
|||
#!/system/bin/sh
|
||||
|
||||
LOG_TAG="qcom-bluetooth"
|
||||
LOG_NAME="${0}:"
|
||||
|
||||
loge ()
|
||||
{
|
||||
/system/bin/log -t $LOG_TAG -p e "$LOG_NAME $@"
|
||||
}
|
||||
|
||||
logi ()
|
||||
{
|
||||
/system/bin/log -t $LOG_TAG -p i "$LOG_NAME $@"
|
||||
}
|
||||
|
||||
failed ()
|
||||
{
|
||||
loge "$1: exit code $2"
|
||||
exit $2
|
||||
}
|
||||
|
||||
setprop ro.qualcomm.bt.hci_transport smd
|
||||
|
||||
# Note that "hci_qcomm_init -e" prints expressions to set the shell variables
|
||||
# BTS_DEVICE, BTS_TYPE, BTS_BAUD, and BTS_ADDRESS.
|
||||
|
||||
# BR/EDR & LE power class configurations
|
||||
POWER_CLASS=`getprop qcom.bt.dev_power_class`
|
||||
LE_POWER_CLASS=`getprop qcom.bt.le_dev_pwr_class`
|
||||
|
||||
setprop bluetooth.status off
|
||||
|
||||
case $POWER_CLASS in
|
||||
1) PWR_CLASS="-p 0" ;
|
||||
logi "Power Class: 1";;
|
||||
2) PWR_CLASS="-p 1" ;
|
||||
logi "Power Class: 2";;
|
||||
3) PWR_CLASS="-p 2" ;
|
||||
logi "Power Class: CUSTOM";;
|
||||
*) PWR_CLASS="";
|
||||
logi "Power Class: Ignored. Default(1) used (1-CLASS1/2-CLASS2/3-CUSTOM)";
|
||||
logi "Power Class: To override, Before turning BT ON; setprop qcom.bt.dev_power_class <1 or 2 or 3>";;
|
||||
esac
|
||||
|
||||
case $LE_POWER_CLASS in
|
||||
1) LE_PWR_CLASS="-P 0" ;
|
||||
logi "LE Power Class: 1";;
|
||||
2) LE_PWR_CLASS="-P 1" ;
|
||||
logi "LE Power Class: 2";;
|
||||
3) LE_PWR_CLASS="-P 2" ;
|
||||
logi "LE Power Class: CUSTOM";;
|
||||
*) LE_PWR_CLASS="-P 1";
|
||||
logi "LE Power Class: Ignored. Default(2) used (1-CLASS1/2-CLASS2/3-CUSTOM)";
|
||||
logi "LE Power Class: To override, Before turning BT ON; setprop qcom.bt.le_dev_pwr_class <1 or 2 or 3>";;
|
||||
esac
|
||||
|
||||
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")
|
||||
|
||||
case $exit_code_hci_qcomm_init in
|
||||
0) logi "Bluetooth QSoC firmware download succeeded, $BTS_DEVICE $BTS_TYPE $BTS_BAUD $BTS_ADDRESS";;
|
||||
*) failed "Bluetooth QSoC firmware download failed" $exit_code_hci_qcomm_init;
|
||||
setprop bluetooth.status off
|
||||
exit $exit_code_hci_qcomm_init;;
|
||||
esac
|
||||
|
||||
setprop bluetooth.status on
|
||||
|
||||
exit 0
|
4
rootdir/etc/scripts/init.ril.sh
Normal file
4
rootdir/etc/scripts/init.ril.sh
Normal file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
|
||||
rm -rf /data/user_de/0/com.android.providers.telephony/databases/telephony.db*
|
||||
rm -rf /data/user_de/0/com.android.providers.telephony/shared_prefs
|
205
rootdir/etc/ueventd.qcom.rc
Normal file
205
rootdir/etc/ueventd.qcom.rc
Normal file
|
@ -0,0 +1,205 @@
|
|||
# Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
# * Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
# * Neither the name of The Linux Foundation nor
|
||||
# the names of its contributors may be used to endorse or promote
|
||||
# products derived from this software without specific prior written
|
||||
# permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
# the DIAG device node HAS TO BE world writable/readable, otherwise libdiag cant open the socket :/
|
||||
/dev/diag 0777 system oem_2950
|
||||
|
||||
/dev/genlock 0666 system system
|
||||
/dev/kgsl 0666 system system
|
||||
/dev/kgsl-3d0 0666 system system
|
||||
/dev/kgsl-2d0 0666 root root
|
||||
/dev/kgsl-2d1 0666 root root
|
||||
/dev/ion 0664 system system
|
||||
/dev/rtc0 0600 system system
|
||||
/dev/smd0 0660 system system
|
||||
/dev/smd4 0660 system system
|
||||
/dev/smd_cxm_qmi 0640 radio radio
|
||||
/dev/smd5 0660 system system
|
||||
/dev/smd6 0660 system system
|
||||
/dev/smd7 0660 bluetooth bluetooth
|
||||
|
||||
# Permissions for CSVT
|
||||
/dev/smd11 0660 radio radio
|
||||
|
||||
/dev/radio0 0640 system system
|
||||
/dev/rfcomm0 0660 bluetooth bluetooth
|
||||
/dev/smdcntl0 0640 radio radio
|
||||
/dev/smdcntl1 0640 radio radio
|
||||
/dev/smdcntl2 0640 radio radio
|
||||
/dev/smdcntl3 0640 radio radio
|
||||
/dev/smdcntl4 0640 radio radio
|
||||
/dev/smdcntl5 0640 radio radio
|
||||
/dev/smdcntl6 0640 radio radio
|
||||
/dev/smdcntl7 0640 radio radio
|
||||
/dev/smdcntl8 0640 radio radio
|
||||
/dev/smdcntl9 0640 radio radio
|
||||
/dev/smdcntl10 0640 radio radio
|
||||
/dev/smdcntl11 0640 radio radio
|
||||
/dev/smdcnt_rev0 0640 radio radio
|
||||
/dev/smdcnt_rev1 0640 radio radio
|
||||
/dev/smdcnt_rev2 0640 radio radio
|
||||
/dev/smdcnt_rev3 0640 radio radio
|
||||
/dev/smdcnt_rev4 0640 radio radio
|
||||
/dev/smdcnt_rev5 0640 radio radio
|
||||
/dev/smdcnt_rev6 0640 radio radio
|
||||
/dev/smdcnt_rev7 0640 radio radio
|
||||
/dev/smdcnt_rev8 0640 radio radio
|
||||
/dev/smuxctl32 0640 radio radio
|
||||
/dev/sdioctl0 0640 radio radio
|
||||
/dev/sdioctl1 0640 radio radio
|
||||
/dev/sdioctl2 0640 radio radio
|
||||
/dev/sdioctl3 0640 radio radio
|
||||
/dev/sdioctl4 0640 radio radio
|
||||
/dev/sdioctl5 0640 radio radio
|
||||
/dev/sdioctl6 0640 radio radio
|
||||
/dev/sdioctl7 0640 radio radio
|
||||
/dev/sdioctl8 0640 radio radio
|
||||
/dev/rmnet_mux_ctrl 0640 radio radio
|
||||
/dev/hsicctl0 0640 radio radio
|
||||
/dev/hsicctl1 0640 radio radio
|
||||
/dev/hsicctl2 0640 radio radio
|
||||
/dev/hsicctl3 0640 radio radio
|
||||
/dev/hsicctl4 0640 radio radio
|
||||
/dev/hsicctl5 0640 radio radio
|
||||
/dev/hsicctl6 0640 radio radio
|
||||
/dev/hsicctl7 0640 radio radio
|
||||
/dev/hsicctl8 0640 radio radio
|
||||
/dev/hsicctl9 0640 radio radio
|
||||
/dev/hsicctl10 0640 radio radio
|
||||
/dev/hsicctl11 0640 radio radio
|
||||
/dev/hsicctl12 0640 radio radio
|
||||
/dev/hsicctl13 0640 radio radio
|
||||
/dev/hsicctl14 0640 radio radio
|
||||
/dev/hsicctl15 0640 radio radio
|
||||
/dev/hsicctl16 0640 radio radio
|
||||
/dev/video* 0660 system camera
|
||||
/dev/media* 0660 system camera
|
||||
/dev/v4l-subdev* 0660 system camera
|
||||
/dev/qseecom 0660 system drmrpc
|
||||
/dev/gemini0 0660 system camera
|
||||
/dev/jpeg0 0660 system camera
|
||||
/dev/jpeg1 0660 system camera
|
||||
/dev/jpeg2 0660 system camera
|
||||
/dev/msm_camera/* 0660 system camera
|
||||
/dev/gemini/ 0660 system camera
|
||||
/dev/mercury0 0660 system camera
|
||||
/dev/msm_vidc_reg 0660 system audio
|
||||
/dev/msm_vidc_dec 0660 system audio
|
||||
/dev/msm_vidc_dec_sec 0660 system audio
|
||||
/dev/msm_vidc_enc 0660 system audio
|
||||
/dev/msm_vidc_enc_sec 0660 system audio
|
||||
/dev/msm_rotator 0660 system system
|
||||
/dev/hw_random 0660 system system
|
||||
/dev/adsprpc-smd 0664 media camera
|
||||
/dev/graphics/* 0660 system graphics
|
||||
/dev/tun 0660 system vpn
|
||||
|
||||
# Permissions for audio
|
||||
/dev/msm_qcelp 0660 system audio
|
||||
/dev/msm_evrc 0660 system audio
|
||||
/dev/msm_wma 0660 system audio
|
||||
/dev/msm_wmapro 0660 system audio
|
||||
/dev/msm_amrnb 0660 system audio
|
||||
/dev/msm_amrwb 0660 system audio
|
||||
/dev/msm_amrwb_in 0660 system audio
|
||||
/dev/msm_amrwbplus 0660 system audio
|
||||
/dev/msm_aac 0660 system audio
|
||||
/dev/msm_multi_aac 0660 system audio
|
||||
/dev/msm_aac_in 0660 system audio
|
||||
/dev/msm_qcelp_in 0660 system audio
|
||||
/dev/msm_evrc_in 0660 system audio
|
||||
/dev/msm_amrnb_in 0640 system audio
|
||||
/dev/msm_a2dp_in 0660 system audio
|
||||
/dev/msm_ac3 0660 system audio
|
||||
/dev/msm_acdb 0660 system audio
|
||||
/dev/msm_cad 0660 system audio
|
||||
/dev/msm_fm 0660 system audio
|
||||
/dev/msm_mvs 0660 system audio
|
||||
/dev/msm_pcm_lp_dec 0660 system audio
|
||||
/dev/msm_preproc_ctl 0660 system audio
|
||||
/dev/msm_rtac 0660 system audio
|
||||
/dev/msm_sps 0660 system audio
|
||||
/dev/msm_voicememo 0660 system audio
|
||||
/dev/radio0 0640 fm_radio fm_radio
|
||||
/dev/smd3 0660 bluetooth bluetooth
|
||||
/dev/smd2 0660 bluetooth bluetooth
|
||||
/dev/ttyHSL0 0660 radio system
|
||||
/dev/ttyHSL1 0660 system system
|
||||
/dev/mdm 0660 system radio
|
||||
/dev/sdio_tty_ciq_00 0660 system system
|
||||
/dev/tty_sdio_00 0660 system system
|
||||
/dev/ttyGS0 0660 system system
|
||||
/dev/i2c-5 0660 media media
|
||||
/sys/devices/virtual/smdpkt/smdcntl* open_timeout 0664 radio radio
|
||||
|
||||
# DVB devices
|
||||
/dev/dvb/adapter0/demux* 0440 media media
|
||||
/dev/dvb/adapter0/dvr* 0660 media media
|
||||
/dev/dvb/adapter0/video* 0660 media media
|
||||
|
||||
# Charger
|
||||
/dev/keychord 0660 system system
|
||||
|
||||
# Broadcast devices
|
||||
/dev/tsc_mux0 0660 media media
|
||||
/dev/tsc_ci0 0660 media media
|
||||
|
||||
# Sensors
|
||||
/sys/devices/i2c-12/12-* pollrate_ms 0664 system system
|
||||
/sys/devices/f9925000.i2c/i2c-0/0-* enable 0660 input system
|
||||
/sys/devices/f9925000.i2c/i2c-0/0-* poll_delay 0660 input system
|
||||
/sys/devices/virtual/optical_sensors/proximity ps_adc 0660 input system
|
||||
/sys/devices/virtual/optical_sensors/proximity ps_poll_delay 0660 input system
|
||||
/sys/devices/virtual/optical_sensors/lightsensor ls_auto 0660 input system
|
||||
/sys/devices/virtual/optical_sensors/lightsensor ls_poll_delay 0660 input system
|
||||
/sys/devices/virtual/input/input* poll 0660 input system
|
||||
/sys/devices/virtual/input/input* pollrate_ms 0660 input system
|
||||
|
||||
# WLAN
|
||||
/dev/rfkill 0600 wifi wifi
|
||||
/dev/wcnss_wlan 0660 system system
|
||||
/dev/wcnss_ctrl 0660 system system
|
||||
|
||||
# NFC permissions
|
||||
/dev/nfc-nci 0660 nfc nfc
|
||||
/dev/pn547 0660 nfc nfc
|
||||
/sys/devices/f9925000.i2c/i2c-2/2-0028 init_deinit 0200 nfc nfc
|
||||
/sys/devices/f9925000.i2c/i2c-2/2-0028 set_pwr 0200 nfc nfc
|
||||
/sys/devices/f9925000.i2c/i2c-2/2-0028 res_ready 0400 nfc nfc
|
||||
/sys/devices/f9925000.i2c/i2c-2/2-0028 recv_rsp 0600 nfc nfc
|
||||
/sys/devices/f9925000.i2c/i2c-2/2-0028 send_cmd 0200 nfc nfc
|
||||
|
||||
# UIO devices
|
||||
/dev/uio0 0660 system system
|
||||
/dev/uio1 0660 system system
|
||||
/dev/uio2 0660 system system
|
||||
|
||||
# Permission for dun
|
||||
/dev/dun 0660 system system
|
||||
|
||||
# Latin Mobile TV
|
||||
/dev/isdbt 0660 system system
|
|
@ -5,3 +5,8 @@ eventfd2: 1
|
|||
sendto: 1
|
||||
recvfrom: 1
|
||||
_llseek: 1
|
||||
sysinfo: 1
|
||||
getcwd: 1
|
||||
getsockopt: 1
|
||||
# ffmpeg needs this
|
||||
getdents64: 1
|
||||
|
|
|
@ -2,3 +2,6 @@
|
|||
# extension of services/mediaextractor/minijail/seccomp_policy/mediaextractor-seccomp-arm.policy
|
||||
readlinkat: 1
|
||||
pread64: 1
|
||||
getsockopt: 1
|
||||
# ffmpeg needs this
|
||||
nanosleep: 1
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
cc_library_static {
|
||||
name: "multihal-samsung8974",
|
||||
name: "multihal-samsung8226",
|
||||
vendor: true,
|
||||
srcs: [
|
||||
"multihal.cpp",
|
||||
|
|
|
@ -14,13 +14,11 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#include <hardware/sensors.h>
|
||||
#include <algorithm>
|
||||
|
||||
#include <pthread.h>
|
||||
#include <log/log.h>
|
||||
|
||||
#include <hardware/sensors.h>
|
||||
#include "SensorEventQueue.h"
|
||||
|
||||
SensorEventQueue::SensorEventQueue(int capacity) {
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#include "multihal.h"
|
||||
|
||||
#define LOG_NDEBUG 1
|
||||
#include <cutils/log.h>
|
||||
#include <log/log.h>
|
||||
#include <cutils/atomic.h>
|
||||
#include <hardware/sensors.h>
|
||||
|
||||
|
@ -49,11 +49,10 @@ static pthread_mutex_t queue_mutex = PTHREAD_MUTEX_INITIALIZER;
|
|||
static pthread_cond_t data_available_cond = PTHREAD_COND_INITIALIZER;
|
||||
bool waiting_for_data = false;
|
||||
|
||||
// Vector of sub modules, whose indexes are referred to in this file as module_index.
|
||||
static std::vector<hw_module_t *> *sub_hw_modules = nullptr;
|
||||
|
||||
// Vector of sub modules shared object handles
|
||||
static std::vector<void *> *so_handles = nullptr;
|
||||
/*
|
||||
* Vector of sub modules, whose indexes are referred to in this file as module_index.
|
||||
*/
|
||||
static std::vector<hw_module_t *> *sub_hw_modules = NULL;
|
||||
|
||||
/*
|
||||
* Comparable class that globally identifies a sensor, by module index and local handle.
|
||||
|
@ -197,12 +196,7 @@ struct sensors_poll_context_t {
|
|||
int poll(sensors_event_t* data, int count);
|
||||
int batch(int handle, int flags, int64_t period_ns, int64_t timeout);
|
||||
int flush(int handle);
|
||||
int inject_sensor_data(const sensors_event_t *data);
|
||||
int register_direct_channel(const struct sensors_direct_mem_t* mem,
|
||||
int channel_handle);
|
||||
int config_direct_report(int sensor_handle,
|
||||
int channel_handle,
|
||||
const struct sensors_direct_cfg_t *config);
|
||||
int inject_sensor_data(struct sensors_poll_device_1 *dev, const sensors_event_t *data);
|
||||
int close();
|
||||
|
||||
std::vector<hw_device_t*> sub_hw_devices;
|
||||
|
@ -212,7 +206,6 @@ struct sensors_poll_context_t {
|
|||
|
||||
sensors_poll_device_t* get_v0_device_by_handle(int global_handle);
|
||||
sensors_poll_device_1_t* get_v1_device_by_handle(int global_handle);
|
||||
sensors_poll_device_1_t* get_primary_v1_device();
|
||||
int get_device_version_by_handle(int global_handle);
|
||||
|
||||
void copy_event_remap_handle(sensors_event_t* src, sensors_event_t* dest, int sub_index);
|
||||
|
@ -252,14 +245,6 @@ sensors_poll_device_1_t* sensors_poll_context_t::get_v1_device_by_handle(int glo
|
|||
return (sensors_poll_device_1_t*) this->sub_hw_devices[sub_index];
|
||||
}
|
||||
|
||||
// Returns the device pointer, or NULL if primary hal does not exist
|
||||
sensors_poll_device_1_t* sensors_poll_context_t::get_primary_v1_device() {
|
||||
if (sub_hw_devices.size() < 1) {
|
||||
return nullptr;
|
||||
}
|
||||
return (sensors_poll_device_1_t*) this->sub_hw_devices[0];
|
||||
}
|
||||
|
||||
// Returns the device version, or -1 if the handle is invalid.
|
||||
int sensors_poll_context_t::get_device_version_by_handle(int handle) {
|
||||
sensors_poll_device_t* v0 = this->get_v0_device_by_handle(handle);
|
||||
|
@ -270,26 +255,6 @@ int sensors_poll_context_t::get_device_version_by_handle(int handle) {
|
|||
}
|
||||
}
|
||||
|
||||
// Android N and hire require sensor HALs to be at least 1_3 compliant
|
||||
#define HAL_VERSION_IS_COMPLIANT(version) \
|
||||
(version >= SENSORS_DEVICE_API_VERSION_1_3)
|
||||
|
||||
// Returns true if HAL is compliant, false if HAL is not compliant or if handle is invalid
|
||||
static bool halIsCompliant(sensors_poll_context_t *ctx, int handle) {
|
||||
int version = ctx->get_device_version_by_handle(handle);
|
||||
return version != -1 && HAL_VERSION_IS_COMPLIANT(version);
|
||||
}
|
||||
|
||||
static bool halIsAPILevelCompliant(sensors_poll_context_t *ctx, int handle, int level) {
|
||||
int version = ctx->get_device_version_by_handle(handle);
|
||||
return version != -1 && (version >= level);
|
||||
}
|
||||
|
||||
static bool halSupportDirectSensorReport(sensors_poll_device_1_t* v1) {
|
||||
return v1 != nullptr && HAL_VERSION_IS_COMPLIANT(v1->common.version) &&
|
||||
v1->register_direct_channel != nullptr && v1->config_direct_report != nullptr;
|
||||
}
|
||||
|
||||
const char *apiNumToStr(int version) {
|
||||
switch(version) {
|
||||
case SENSORS_DEVICE_API_VERSION_1_0:
|
||||
|
@ -312,12 +277,7 @@ int sensors_poll_context_t::activate(int handle, int enabled) {
|
|||
ALOGV("activate");
|
||||
int local_handle = get_local_handle(handle);
|
||||
sensors_poll_device_t* v0 = this->get_v0_device_by_handle(handle);
|
||||
if (halIsCompliant(this, handle) && local_handle >= 0 && v0) {
|
||||
retval = v0->activate(v0, local_handle, enabled);
|
||||
} else {
|
||||
ALOGE("IGNORING activate(enable %d) call to non-API-compliant sensor handle=%d !",
|
||||
enabled, handle);
|
||||
}
|
||||
retval = v0->activate(v0, local_handle, enabled);
|
||||
ALOGV("retval %d", retval);
|
||||
return retval;
|
||||
}
|
||||
|
@ -327,11 +287,7 @@ int sensors_poll_context_t::setDelay(int handle, int64_t ns) {
|
|||
ALOGV("setDelay");
|
||||
int local_handle = get_local_handle(handle);
|
||||
sensors_poll_device_t* v0 = this->get_v0_device_by_handle(handle);
|
||||
if (halIsCompliant(this, handle) && local_handle >= 0 && v0) {
|
||||
retval = v0->setDelay(v0, local_handle, ns);
|
||||
} else {
|
||||
ALOGE("IGNORING setDelay() call for non-API-compliant sensor handle=%d !", handle);
|
||||
}
|
||||
retval = v0->setDelay(v0, local_handle, ns);
|
||||
ALOGV("retval %d", retval);
|
||||
return retval;
|
||||
}
|
||||
|
@ -375,7 +331,7 @@ int sensors_poll_context_t::poll(sensors_event_t *data, int maxReads) {
|
|||
} else {
|
||||
empties = 0;
|
||||
this->copy_event_remap_handle(&data[eventsRead], event, nextReadIndex);
|
||||
if (data[eventsRead].sensor == SENSORS_HANDLE_BASE - 1) {
|
||||
if (data[eventsRead].sensor == -1) {
|
||||
// Bad handle, do not pass corrupted event upstream !
|
||||
ALOGW("Dropping bad local handle event packet on the floor");
|
||||
} else {
|
||||
|
@ -405,11 +361,7 @@ int sensors_poll_context_t::batch(int handle, int flags, int64_t period_ns, int6
|
|||
int retval = -EINVAL;
|
||||
int local_handle = get_local_handle(handle);
|
||||
sensors_poll_device_1_t* v1 = this->get_v1_device_by_handle(handle);
|
||||
if (halIsCompliant(this, handle) && local_handle >= 0 && v1) {
|
||||
retval = v1->batch(v1, local_handle, flags, period_ns, timeout);
|
||||
} else {
|
||||
ALOGE("IGNORING batch() call to non-API-compliant sensor handle=%d !", handle);
|
||||
}
|
||||
retval = v1->batch(v1, local_handle, flags, period_ns, timeout);
|
||||
ALOGV("retval %d", retval);
|
||||
return retval;
|
||||
}
|
||||
|
@ -419,84 +371,24 @@ int sensors_poll_context_t::flush(int handle) {
|
|||
int retval = -EINVAL;
|
||||
int local_handle = get_local_handle(handle);
|
||||
sensors_poll_device_1_t* v1 = this->get_v1_device_by_handle(handle);
|
||||
if (halIsCompliant(this, handle) && local_handle >= 0 && v1) {
|
||||
retval = v1->flush(v1, local_handle);
|
||||
} else {
|
||||
ALOGE("IGNORING flush() call to non-API-compliant sensor handle=%d !", handle);
|
||||
}
|
||||
retval = v1->flush(v1, local_handle);
|
||||
ALOGV("retval %d", retval);
|
||||
return retval;
|
||||
}
|
||||
|
||||
int sensors_poll_context_t::inject_sensor_data(const sensors_event_t *data) {
|
||||
int sensors_poll_context_t::inject_sensor_data(struct sensors_poll_device_1 *dev,
|
||||
const sensors_event_t *data) {
|
||||
int retval = -EINVAL;
|
||||
ALOGV("inject_sensor_data");
|
||||
if (data->sensor == -1) {
|
||||
// operational parameter
|
||||
sensors_poll_device_1_t* v1 = get_primary_v1_device();
|
||||
if (v1 && v1->common.version >= SENSORS_DEVICE_API_VERSION_1_4) {
|
||||
retval = v1->inject_sensor_data(v1, data);
|
||||
} else {
|
||||
ALOGE("IGNORED inject_sensor_data(operational param) call to non-API-compliant sensor");
|
||||
return -ENOSYS;
|
||||
}
|
||||
} else {
|
||||
// Get handle for the sensor owning the event being injected
|
||||
int local_handle = get_local_handle(data->sensor);
|
||||
sensors_poll_device_1_t* v1 = this->get_v1_device_by_handle(data->sensor);
|
||||
if (halIsAPILevelCompliant(this, data->sensor, SENSORS_DEVICE_API_VERSION_1_4) &&
|
||||
local_handle >= 0 && v1) {
|
||||
// if specific sensor is used, we have to replace global sensor handle
|
||||
// with local one, before passing to concrete HAL
|
||||
sensors_event_t data_copy = *data;
|
||||
data_copy.sensor = local_handle;
|
||||
retval = v1->inject_sensor_data(v1, &data_copy);
|
||||
} else {
|
||||
ALOGE("IGNORED inject_sensor_data(type=%d, handle=%d) call to non-API-compliant sensor",
|
||||
data->type, data->sensor);
|
||||
retval = -ENOSYS;
|
||||
}
|
||||
}
|
||||
// Get handle for the sensor owning the event being injected
|
||||
int local_handle = get_local_handle(data->sensor);
|
||||
sensors_poll_device_1_t* v1 = this->get_v1_device_by_handle(data->sensor);
|
||||
retval = v1->inject_sensor_data(dev, data);
|
||||
ALOGV("retval %d", retval);
|
||||
return retval;
|
||||
|
||||
}
|
||||
|
||||
int sensors_poll_context_t::register_direct_channel(const struct sensors_direct_mem_t* mem,
|
||||
int channel_handle) {
|
||||
int retval = -EINVAL;
|
||||
ALOGV("register_direct_channel");
|
||||
sensors_poll_device_1_t* v1 = get_primary_v1_device();
|
||||
if (v1 && halSupportDirectSensorReport(v1)) {
|
||||
retval = v1->register_direct_channel(v1, mem, channel_handle);
|
||||
} else {
|
||||
ALOGE("IGNORED register_direct_channel(mem=%p, handle=%d) call to non-API-compliant sensor",
|
||||
mem, channel_handle);
|
||||
retval = -ENOSYS;
|
||||
}
|
||||
ALOGV("retval %d", retval);
|
||||
return retval;
|
||||
}
|
||||
|
||||
int sensors_poll_context_t::config_direct_report(int sensor_handle,
|
||||
int channel_handle,
|
||||
const struct sensors_direct_cfg_t *config) {
|
||||
int retval = -EINVAL;
|
||||
ALOGV("config_direct_report");
|
||||
|
||||
if (config != nullptr) {
|
||||
int local_handle = get_local_handle(sensor_handle);
|
||||
sensors_poll_device_1_t* v1 = get_primary_v1_device();
|
||||
if (v1 && halSupportDirectSensorReport(v1)) {
|
||||
retval = v1->config_direct_report(v1, local_handle, channel_handle, config);
|
||||
} else {
|
||||
ALOGE("IGNORED config_direct_report(sensor=%d, channel=%d, rate_level=%d) call to "
|
||||
"non-API-compliant sensor", sensor_handle, channel_handle, config->rate_level);
|
||||
retval = -ENOSYS;
|
||||
}
|
||||
}
|
||||
ALOGV("retval %d", retval);
|
||||
return retval;
|
||||
}
|
||||
int sensors_poll_context_t::close() {
|
||||
ALOGV("close");
|
||||
for (std::vector<hw_device_t*>::iterator it = this->sub_hw_devices.begin();
|
||||
|
@ -510,26 +402,11 @@ int sensors_poll_context_t::close() {
|
|||
|
||||
|
||||
static int device__close(struct hw_device_t *dev) {
|
||||
pthread_mutex_lock(&init_modules_mutex);
|
||||
sensors_poll_context_t* ctx = (sensors_poll_context_t*) dev;
|
||||
if (ctx != NULL) {
|
||||
int retval = ctx->close();
|
||||
delete ctx;
|
||||
}
|
||||
|
||||
if (sub_hw_modules != nullptr) {
|
||||
delete sub_hw_modules;
|
||||
sub_hw_modules = nullptr;
|
||||
}
|
||||
|
||||
if (so_handles != nullptr) {
|
||||
for (auto handle : *so_handles) {
|
||||
dlclose(handle);
|
||||
}
|
||||
delete so_handles;
|
||||
so_handles = nullptr;
|
||||
}
|
||||
pthread_mutex_unlock(&init_modules_mutex);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -554,7 +431,9 @@ static int device__poll(struct sensors_poll_device_t *dev, sensors_event_t* data
|
|||
static int device__batch(struct sensors_poll_device_1 *dev, int handle,
|
||||
int flags, int64_t period_ns, int64_t timeout) {
|
||||
sensors_poll_context_t* ctx = (sensors_poll_context_t*) dev;
|
||||
|
||||
ctx->setDelay(handle, period_ns);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -565,22 +444,7 @@ static int device__flush(struct sensors_poll_device_1 *dev, int handle) {
|
|||
static int device__inject_sensor_data(struct sensors_poll_device_1 *dev,
|
||||
const sensors_event_t *data) {
|
||||
sensors_poll_context_t* ctx = (sensors_poll_context_t*) dev;
|
||||
return ctx->inject_sensor_data(data);
|
||||
}
|
||||
|
||||
static int device__register_direct_channel(struct sensors_poll_device_1 *dev,
|
||||
const struct sensors_direct_mem_t* mem,
|
||||
int channel_handle) {
|
||||
sensors_poll_context_t* ctx = (sensors_poll_context_t*) dev;
|
||||
return ctx->register_direct_channel(mem, channel_handle);
|
||||
}
|
||||
|
||||
static int device__config_direct_report(struct sensors_poll_device_1 *dev,
|
||||
int sensor_handle,
|
||||
int channel_handle,
|
||||
const struct sensors_direct_cfg_t *config) {
|
||||
sensors_poll_context_t* ctx = (sensors_poll_context_t*) dev;
|
||||
return ctx->config_direct_report(sensor_handle, channel_handle, config);
|
||||
return ctx->inject_sensor_data(dev, data);
|
||||
}
|
||||
|
||||
static int open_sensors(const struct hw_module_t* module, const char* name,
|
||||
|
@ -599,9 +463,7 @@ static bool starts_with(const char* s, const char* prefix) {
|
|||
* Adds valid paths from the config file to the vector passed in.
|
||||
* The vector must not be null.
|
||||
*/
|
||||
static std::vector<std::string> get_so_paths() {
|
||||
std::vector<std::string> so_paths;
|
||||
|
||||
static void get_so_paths(std::vector<std::string> *so_paths) {
|
||||
const std::vector<const char *> config_path_list(
|
||||
{ MULTI_HAL_CONFIG_FILE_PATH, DEPRECATED_MULTI_HAL_CONFIG_FILE_PATH });
|
||||
|
||||
|
@ -617,7 +479,7 @@ static std::vector<std::string> get_so_paths() {
|
|||
}
|
||||
if(!stream) {
|
||||
ALOGW("No multihal config file found");
|
||||
return so_paths;
|
||||
return;
|
||||
}
|
||||
|
||||
ALOGE_IF(strcmp(path, DEPRECATED_MULTI_HAL_CONFIG_FILE_PATH) == 0,
|
||||
|
@ -629,9 +491,8 @@ static std::vector<std::string> get_so_paths() {
|
|||
std::string line;
|
||||
while (std::getline(stream, line)) {
|
||||
ALOGV("config file line: '%s'", line.c_str());
|
||||
so_paths.push_back(line);
|
||||
so_paths->push_back(line);
|
||||
}
|
||||
return so_paths;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -644,15 +505,15 @@ static void lazy_init_modules() {
|
|||
pthread_mutex_unlock(&init_modules_mutex);
|
||||
return;
|
||||
}
|
||||
std::vector<std::string> so_paths(get_so_paths());
|
||||
std::vector<std::string> *so_paths = new std::vector<std::string>();
|
||||
get_so_paths(so_paths);
|
||||
|
||||
// dlopen the module files and cache their module symbols in sub_hw_modules
|
||||
sub_hw_modules = new std::vector<hw_module_t *>();
|
||||
so_handles = new std::vector<void *>();
|
||||
dlerror(); // clear any old errors
|
||||
const char* sym = HAL_MODULE_INFO_SYM_AS_STR;
|
||||
for (const auto &s : so_paths) {
|
||||
const char* path = s.c_str();
|
||||
for (std::vector<std::string>::iterator it = so_paths->begin(); it != so_paths->end(); it++) {
|
||||
const char* path = it->c_str();
|
||||
void* lib_handle = dlopen(path, RTLD_LAZY);
|
||||
if (lib_handle == NULL) {
|
||||
ALOGW("dlerror(): %s", dlerror());
|
||||
|
@ -670,13 +531,8 @@ static void lazy_init_modules() {
|
|||
} else {
|
||||
ALOGV("Loaded symbols from \"%s\"", sym);
|
||||
sub_hw_modules->push_back(module);
|
||||
so_handles->push_back(lib_handle);
|
||||
lib_handle = nullptr;
|
||||
}
|
||||
}
|
||||
if (lib_handle != nullptr) {
|
||||
dlclose(lib_handle);
|
||||
}
|
||||
}
|
||||
pthread_mutex_unlock(&init_modules_mutex);
|
||||
}
|
||||
|
@ -687,11 +543,27 @@ static void lazy_init_modules() {
|
|||
*/
|
||||
static void fix_sensor_fields(sensor_t& sensor) {
|
||||
/*
|
||||
* Because batching and flushing don't work modify the
|
||||
* Becasue batching and flushing don't work modify the
|
||||
* sensor fields to not report any fifo counts.
|
||||
*/
|
||||
sensor.fifoReservedEventCount = 0;
|
||||
sensor.fifoMaxEventCount = 0;
|
||||
|
||||
switch (sensor.type) {
|
||||
/*
|
||||
* Use the flags suggested by the sensors documentation.
|
||||
*/
|
||||
case SENSOR_TYPE_TILT_DETECTOR:
|
||||
sensor.flags = SENSOR_FLAG_WAKE_UP | SENSOR_FLAG_ON_CHANGE_MODE;
|
||||
break;
|
||||
/*
|
||||
* Report a proper range to fix doze proximity check.
|
||||
*/
|
||||
case SENSOR_TYPE_PROXIMITY:
|
||||
sensor.flags = SENSOR_FLAG_WAKE_UP | SENSOR_FLAG_ON_CHANGE_MODE;
|
||||
sensor.maxRange = 5.0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -746,12 +618,6 @@ static void lazy_init_sensors_list() {
|
|||
memcpy(&mutable_sensor_list[mutable_sensor_index], local_sensor,
|
||||
sizeof(struct sensor_t));
|
||||
|
||||
// sensor direct report is only for primary module
|
||||
if (module_index != 0) {
|
||||
mutable_sensor_list[mutable_sensor_index].flags &=
|
||||
~(SENSOR_FLAG_MASK_DIRECT_REPORT | SENSOR_FLAG_MASK_DIRECT_CHANNEL);
|
||||
}
|
||||
|
||||
// Overwrite the global version's handle with a global handle.
|
||||
int global_handle = assign_global_handle(module_index, local_handle);
|
||||
|
||||
|
@ -816,7 +682,7 @@ static int open_sensors(const struct hw_module_t* hw_module, const char* name,
|
|||
sensors_poll_context_t *dev = new sensors_poll_context_t();
|
||||
memset(dev, 0, sizeof(sensors_poll_device_1_t));
|
||||
dev->proxy_device.common.tag = HARDWARE_DEVICE_TAG;
|
||||
dev->proxy_device.common.version = SENSORS_DEVICE_API_VERSION_1_4;
|
||||
dev->proxy_device.common.version = SENSORS_DEVICE_API_VERSION_1_3;
|
||||
dev->proxy_device.common.module = const_cast<hw_module_t*>(hw_module);
|
||||
dev->proxy_device.common.close = device__close;
|
||||
dev->proxy_device.activate = device__activate;
|
||||
|
@ -825,8 +691,6 @@ static int open_sensors(const struct hw_module_t* hw_module, const char* name,
|
|||
dev->proxy_device.batch = device__batch;
|
||||
dev->proxy_device.flush = device__flush;
|
||||
dev->proxy_device.inject_sensor_data = device__inject_sensor_data;
|
||||
dev->proxy_device.register_direct_channel = device__register_direct_channel;
|
||||
dev->proxy_device.config_direct_report = device__config_direct_report;
|
||||
|
||||
dev->nextReadIndex = 0;
|
||||
|
||||
|
@ -837,12 +701,6 @@ static int open_sensors(const struct hw_module_t* hw_module, const char* name,
|
|||
struct hw_device_t* sub_hw_device;
|
||||
int sub_open_result = sensors_module->common.methods->open(*it, name, &sub_hw_device);
|
||||
if (!sub_open_result) {
|
||||
if (!HAL_VERSION_IS_COMPLIANT(sub_hw_device->version)) {
|
||||
ALOGE("SENSORS_DEVICE_API_VERSION_1_3 or newer is required for all sensor HALs");
|
||||
ALOGE("This HAL reports non-compliant API level : %s",
|
||||
apiNumToStr(sub_hw_device->version));
|
||||
ALOGE("Sensors belonging to this HAL will get ignored !");
|
||||
}
|
||||
dev->addSubHwDevice(sub_hw_device);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,14 +13,13 @@
|
|||
/dev/pn547 u:object_r:nfc_device:s0
|
||||
/dev/rfkill u:object_r:wlan_device:s0
|
||||
/dev/sec-nfc u:object_r:nfc_device:s0
|
||||
# this should be needed but it says it is already defined
|
||||
#/dev/keychord u:object_r:keychord_device:s0
|
||||
|
||||
# efs files
|
||||
/efs/bluetooth(/.*)? u:object_r:bluetooth_efs_file:s0
|
||||
/efs/wifi(/.*)? u:object_r:wifi_efs_file:s0
|
||||
|
||||
# executeables
|
||||
/system/vendor/bin/macloader u:object_r:macloader_exec:s0
|
||||
|
||||
# firmware
|
||||
/system/vendor/firmware/bcm(.*).hcd u:object_r:bt_fw_file:s0
|
||||
/system/vendor/firmware/bcm2079x(.*).ncd u:object_r:nfc_fw_file:s0
|
||||
|
@ -36,10 +35,6 @@
|
|||
/sys/devices/platform/bcm[0-9]+_bluetooth/rfkill/rfkill0/state u:object_r:sysfs_bluetooth_writable:s0
|
||||
/sys/devices/virtual/camera(/.*)? u:object_r:sysfs_camera:s0
|
||||
/sys/devices/virtual/sec/sec_key/hall_irq_ctrl u:object_r:sysfs_sec:s0
|
||||
/sys/devices/.*bcl.*(/.*)? u:object_r:sysfs_thermal:s0
|
||||
|
||||
|
||||
# mdnie sysfs
|
||||
/sys/devices/virtual/lcd/panel/panel/auto_brightness u:object_r:sysfs_mdnie:s0
|
||||
/sys/devices/virtual/mdnie/mdnie/accessibility u:object_r:sysfs_mdnie:s0
|
||||
/sys/devices/virtual/mdnie/mdnie/mode u:object_r:sysfs_mdnie:s0
|
||||
/sys/devices/virtual/mdnie/mdnie/outdoor u:object_r:sysfs_mdnie:s0
|
||||
/sys/devices/virtual/mdnie/mdnie/scenario u:object_r:sysfs_mdnie:s0
|
||||
|
|
2
sepolicy/common/hal_keymaster_default.te
Normal file
2
sepolicy/common/hal_keymaster_default.te
Normal file
|
@ -0,0 +1,2 @@
|
|||
allow hal_keymaster_default vfat:dir search;
|
||||
allow hal_keymaster_default vfat:file { getattr open read };
|
|
@ -1 +1,2 @@
|
|||
allow hal_power_default sysfs_hal_pwr:file w_file_perms;
|
||||
allow hal_power_default sysfs:file { open write };
|
||||
|
|
9
sepolicy/common/init.te
Normal file
9
sepolicy/common/init.te
Normal file
|
@ -0,0 +1,9 @@
|
|||
allow init debugfs:dir mounton;
|
||||
allow init kernel:security check_context;
|
||||
allow init rtc_device:chr_file ioctl;
|
||||
allow init self:netlink_kobject_uevent_socket read;
|
||||
allow init self:socket create;
|
||||
allow init smd_device:chr_file write;
|
||||
allow init tee_device:chr_file { ioctl write };
|
||||
allow init video_device:chr_file { ioctl write };
|
||||
allow init wcnss_device:chr_file write;
|
3
sepolicy/common/keystore.te
Normal file
3
sepolicy/common/keystore.te
Normal file
|
@ -0,0 +1,3 @@
|
|||
allow keystore vfat:dir search;
|
||||
allow keystore vfat:file getattr;
|
||||
allow keystore vfat:file { open read };
|
|
@ -5,3 +5,4 @@ allow mediaserver sysfs_camera:dir search;
|
|||
allow mediaserver sysfs_camera:file r_file_perms;
|
||||
allow mediaserver thermal-engine:unix_stream_socket connectto;
|
||||
allow mediaserver vendor_file:file execmod;
|
||||
allow mediaserver system_data_file:sock_file write;
|
||||
|
|
|
@ -2,8 +2,9 @@ type_transition mm-qcamerad system_data_file:sock_file camera_socket "cam_socket
|
|||
|
||||
#allow mm-qcamerad camera_socket:sock_file create_file_perms;
|
||||
|
||||
# Allow mm-qcamera-daemon to create the socket camera_socket
|
||||
# Allow mm-qcamera-daemon to create and unlink the socket camera_socket
|
||||
allow mm-qcamerad system_data_file:dir w_dir_perms;
|
||||
allow mm-qcamerad system_data_file:sock_file unlink;
|
||||
|
||||
allow mm-qcamerad sysfs_camera:dir search;
|
||||
allow mm-qcamerad sysfs_camera:file rw_file_perms;
|
||||
|
|
|
@ -6,3 +6,6 @@ allow rild radio_data_file:lnk_file read;
|
|||
|
||||
allow rild proc_net:file w_file_perms;
|
||||
allow rild sysfs_sec:file rw_file_perms;
|
||||
allow rild unlabeled:dir search;
|
||||
|
||||
allow rild unlabeled:file { getattr open read };
|
||||
|
|
2
sepolicy/common/ueventd.te
Normal file
2
sepolicy/common/ueventd.te
Normal file
|
@ -0,0 +1,2 @@
|
|||
allow ueventd vfat:dir search;
|
||||
allow ueventd vfat:file { getattr open read };
|
1
sepolicy/common/wcnss.te
Normal file
1
sepolicy/common/wcnss.te
Normal file
|
@ -0,0 +1 @@
|
|||
allow wcnss_service efs_file:dir search;
|
|
@ -19,4 +19,4 @@ include device/qcom/sepolicy/legacy-sepolicy.mk
|
|||
|
||||
# Board specific SELinux policy variable definitions
|
||||
BOARD_SEPOLICY_DIRS += \
|
||||
device/samsung/msm8974-common/sepolicy/common
|
||||
device/samsung/msm8226-common/sepolicy/common
|
||||
|
|
|
@ -24,7 +24,7 @@ if [[ ! -d "$MY_DIR" ]]; then MY_DIR="$PWD"; fi
|
|||
|
||||
# Override anything that may come from the calling environment
|
||||
CM_ROOT="$MY_DIR"/../../..
|
||||
BOARD=msm8974
|
||||
BOARD=msm8226
|
||||
DEVICE_COMMON=${BOARD}-common
|
||||
INITIAL_COPYRIGHT_YEAR=2017
|
||||
VENDOR=samsung
|
||||
|
|
Loading…
Reference in a new issue