Update/Add init scripts from T825N0KOU3CTD1, update fstab, add more OMX related files

Signed-off-by: Deokgyu Yang <secugyu@gmail.com>
Change-Id: I538a2196a27a78100c915ccb3ccac7831feb4695
This commit is contained in:
Deokgyu Yang 2021-05-12 22:30:36 +09:00
parent aefed99fcd
commit 8a8554d540
22 changed files with 3832 additions and 1226 deletions

View file

@ -1,2 +0,0 @@
PRIO=1,1,0,0
IGNORED_IRQ=27,62,171

View file

@ -1,125 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
/* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
* Copyright (c) 2018, The LineageOS Project.
*
* 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
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-->
<HintConfigs>
<Powerhint>
<!--preview-->
<!-- B CPU - above_hispeed_delay of 40 ms -->
<!-- B CPU - go hispeed load 95 -->
<!-- B CPU - hispeed freq of 556 MHz -->
<!-- B CPU - target load of 90 -->
<!-- L CPU - above_hispeed_delay of 40 ms -->
<!-- L CPU - go hispeed load 95 -->
<!-- L CPU - hispeed freq of 556 MHz- -->
<!-- L CPU - target load of 90 -->
<!-- CPUBW low power ceil mpbs of 2500 -->
<!-- CPUBW low power io percent of 50 -->
<Config
Id="0x00001300" Enable="true" Target="msm8996"
Resources="0x41400000, 0x4, 0x41410000, 0x5F, 0x41414000, 0x22C, 0x41420000, 0x5A, 0x41400100, 0x4, 0x41410100, 0x5F
, 0x41414100, 0x22C, 0x41420100, 0x5A, 0x41810000, 0x9C4, 0x41814000, 0x32" />
<!--video encode 30 fps-->
<!-- B CPU - above_hispeed_delay of 40 ms -->
<!-- B CPU - go hispeed load 95 -->
<!-- B CPU - hispeed freq of 806 MHz -->
<!-- B CPU - target load of 90 -->
<!-- L CPU - above_hispeed_delay of 40 ms -->
<!-- L CPU - go hispeed load 95 -->
<!-- L CPU - hispeed freq of 556 MHz- -->
<!-- L CPU - target load of 90 -->
<!-- CPUBW low power ceil mpbs of 2500 -->
<!-- CPUBW low power io percent of 50 -->
<!-- CPUBW disable hysteresis -->
<!-- CPUBW sample_ms of 10ms -->
<!-- L CPU - disable ignore_hispeed_notif -->
<!-- B CPU - disable ignore_hispeed_notif -->
<Config
Id="0x00001203" Enable="true" Target="msm8996"
Resources="0x41400000, 0x4, 0x41410000, 0x5F ,0x41414000, 0x326, 0x41420000, 0x5A, 0x41400100, 0x4, 0x41410100
, 0x5F, 0x41414100, 0x22C, 0x41420100, 0x5A, 0x41810000 ,0x9C4, 0x41814000,
0x32, 0x4180C000 ,0x0, 0x41820000, 0xA, 0x41438100, 0x0, 0x41438000, 0x0" />
<!--video decode-->
<!-- L CPU - above_hispeed_delay of 40 ms -->
<!-- L CPU - go hispeed load 95 -->
<!-- L CPU - hispeed freq of 768 MHz- -->
<!-- L CPU - target load of 90 -->
<!-- B CPU - above_hispeed_delay of 40 ms -->
<!-- B CPU - go hispeed load 95 -->
<!-- B CPU - hispeed freq of 729 MHz -->
<!-- B CPU - target load of 90 -->
<Config
Id="0x00001204" Enable="true" Target="msm8996"
Resources="0x41400100, 0x4, 0x41410100, 0x5F ,0x41414100, 0x2D9, 0x41420100, 0x5A, 0x41400000, 0x4, 0x41410000
, 0x5F, 0x41414000, 0x2D9, 0x41420000, 0x5A" />
<!--sustained performance-->
<!-- B CPU - Cluster min freq uncapped -->
<!-- L CPU - Cluster min freq uncapped -->
<!-- B CPU - Cluster max freq ~1.2 GHz -->
<!-- L CPU - Cluster max freq ~1.2 Ghz -->
<!-- GPU - min freq 180 Mhz -->
<!-- GPU - max freq 342 Mhz -->
<!-- GPUBW freq uncapped -->
<Config
Id="0x00001206" Enable="true" Target="msm8996"
Resources="0x40800000, 0x0, 0x40800100, 0x0, 0x40804000, 0x4E0, 0x40804100, 0x4E0,
0x4280C000, 0xB4, 0x42810000, 0x156, 0x42814000, 0x0"/>
<!--vr mode-->
<!-- B CPU - Cluster min freq ~1.4 Ghz -->
<!-- L CPU - Cluster min freq ~1.4 Ghz -->
<!-- B CPU - Cluster max freq ~1.4 Ghz -->
<!-- L CPU - Cluster max freq ~1.4 Ghz -->
<!-- GPU - min freq 510 Mhz -->
<!-- GPU - max freq 510 Mhz -->
<!-- GPUBW freq 775 Mhz-->
<Config
Id="0x00001207" Enable="true" Target="msm8996"
Resources="0x40800000, 0x579, 0x40800100, 0x579, 0x40804000, 0x579, 0x40804100, 0x579,
0x4280C000, 0x203, 0x42810000, 0x203, 0x42814000, 0x1E4F"/>
<!--vr mode sustained performance-->
<!-- B CPU - Cluster min freq ~1.2 Ghz -->
<!-- L CPU - Cluster min freq ~1.2 Ghz -->
<!-- B CPU - Cluster max freq ~1.2 Ghz -->
<!-- L CPU - Cluster max freq ~1.2 Ghz -->
<!-- GPU - min freq 342 Mhz -->
<!-- GPU - max freq 342 Mhz -->
<!-- GPUBW freq 775 Mhz -->
<Config
Id="0x00001301" Enable="true" Target="msm8996"
Resources="0x40800000, 0x4E0, 0x40800100, 0x4E0, 0x40804000, 0x4E0, 0x40804100, 0x4E0, 0x4280C000, 0x156,
0x42810000, 0x156, 0x42814000, 0x1E4F"/>
</Powerhint>
</HintConfigs>

View file

@ -1,150 +0,0 @@
[SS-CLUSTER1-SP0]
algo_type ss
sampling 250
sensor xo_therm_buf
device cluster1
set_point 41000
set_point_clr 38000
time_constant 0
device_perf_floor 1824000
[SS-CLUSTER1-SP1]
algo_type ss
sampling 250
sensor xo_therm_buf
device cluster1
set_point 43000
set_point_clr 41000
time_constant 0
device_perf_floor 1478400
[SS-CLUSTER1-SP2]
algo_type ss
sampling 250
sensor xo_therm_buf
device cluster1
set_point 45000
set_point_clr 43000
time_constant 0
device_perf_floor 940800
[SS-CLUSTER0-SP0]
algo_type ss
sampling 250
sensor xo_therm_buf
device cluster0
set_point 41000
set_point_clr 38000
time_constant 0
device_perf_floor 1401600
[SS-CLUSTER0-SP1]
algo_type ss
sampling 250
sensor xo_therm_buf
device cluster0
set_point 43000
set_point_clr 41000
time_constant 0
device_perf_floor 1190400
[SS-CLUSTER0-SP2]
algo_type ss
sampling 250
sensor xo_therm_buf
device cluster0
set_point 45000
set_point_clr 43000
time_constant 0
device_perf_floor 960000
[SKIN-SS-CPUS-ALL-1]
algo_type ss
sampling 250
sensor xo_therm_buf
device cpu_voltage
set_point 50000
set_point_clr 45000
time_constant 0
[SS-GPU]
#algo_type ss
sampling 250
sensor xo_therm_buf
device gpu
set_point 47000
set_point_clr 43000
time_constant 0
[GPU_management]
algo_type monitor
sensor xo_therm_buf
sampling 1000
thresholds 41000 43000
thresholds_clr 38000 41000
actions gpu gpu
action_info 510000000 401800000
[SKIN-BATTERY-MONITOR]
algo_type monitor
sampling 1000
sensor xo_therm_buf
thresholds 43000 45000 48000 60000
thresholds_clr 41000 43000 45000 48000
actions battery battery battery battery
action_info 0 1 2 3
[CAMERA-CAMCORDER-MONITOR]
algo_type monitor
sampling 1000
sensor xo_therm_buf
thresholds 42000 45000 50000
thresholds_clr 40000 42000 45000
actions camera+camcorder camera+camcorder camera+camcorder
action_info 1 2 3
[HISTORY-XO]
algo_type history
sampling 1000
sensor xo_therm_buf
thresholds 31000 41000 46000 51000 56000 61000
thresholds_clr 30000 40000 45000 50000 55000 60000
actions history_log history_log history_log history_log history_log history_log
action_info 0 1 2 3 4 5
[HISTORY-CPU0]
algo_type history
sampling 1000
sensor tsens_tz_sensor3
thresholds 61000 76000 91000
thresholds_clr 60000 75000 90000
actions history_log history_log history_log
action_info 0 1 2
[HISTORY-CPU4]
algo_type history
sampling 1000
sensor tsens_tz_sensor8
thresholds 61000 76000 91000
thresholds_clr 60000 75000 90000
actions history_log history_log history_log
action_info 0 1 2
[HISTORY-MODEM-PA0]
algo_type history
sampling 1000
sensor pa_therm0
thresholds 31000 36000 41000 46000 51000 56000 61000
thresholds_clr 30000 35000 40000 45000 50000 55000 60000
actions history_log history_log history_log history_log history_log history_log history_log
action_info 0 1 2 3 4 5 6
[HISTORY-MODEM-PA1]
algo_type history
sampling 1000
sensor pa_therm1
thresholds 31000 36000 41000 46000 51000 56000 61000
thresholds_clr 30000 35000 40000 45000 50000 55000 60000
actions history_log history_log history_log history_log history_log history_log history_log
action_info 0 1 2 3 4 5 6

View file

@ -242,10 +242,6 @@ PRODUCT_PACKAGES += \
ethertypes \ ethertypes \
libebtc libebtc
# IRQ
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/msm_irqbalance.conf:$(TARGET_COPY_OUT_VENDOR)/etc/msm_irqbalance.conf
# Keylayout # Keylayout
PRODUCT_COPY_FILES += \ PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/keylayout/gpio-keys.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/gpio-keys.kl \ $(LOCAL_PATH)/configs/keylayout/gpio-keys.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/gpio-keys.kl \
@ -295,23 +291,22 @@ PRODUCT_PACKAGES += \
# OMX # OMX
PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \
libc2dcolorconvert \ libc2dcolorconvert \
libextmedia_jni \ libgui_vendor \
libOmxAacEnc \ libOmxAacEnc \
libOmxAmrEnc \ libOmxAmrEnc \
libOmxCore \ libOmxCore \
libOmxEvrcEnc \ libOmxEvrcEnc \
libOmxG711Enc \
libOmxQcelp13Enc \ libOmxQcelp13Enc \
libOmxVdec \ libOmxVdec \
libOmxVenc \ libOmxVenc \
libOmxVidcCommon \
libstagefrighthw libstagefrighthw
# Power # Power
PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \
android.hardware.power@1.2-service-qti android.hardware.power@1.2-service-qti
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/powerhint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/powerhint.xml
# QMI # QMI
PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \
libjson libjson
@ -326,11 +321,20 @@ PRODUCT_PACKAGES += \
# Ramdisk # Ramdisk
PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \
fstab.qcom \ fstab.qcom \
init.qcom.rc \ init.class_main.sh \
init.msm.usb.configfs.rc \
init.qcom.early_boot.sh \
init.qcom.post_boot.sh \
init.qcom.power.rc \ init.qcom.power.rc \
init.qcom.rc \
init.qcom.sensors.sh \
init.qcom.sh \
init.qcom.usb.rc \ init.qcom.usb.rc \
init.samsung.rc \ init.qcom.usb.sh \
ueventd.qcom.rc init.target.rc \
ueventd.qcom.rc \
wifi_qcom.rc \
wifi_sec.rc
# RenderScript # RenderScript
PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \
@ -360,10 +364,6 @@ PRODUCT_SOONG_NAMESPACES += \
$(LOCAL_PATH) \ $(LOCAL_PATH) \
hardware/samsung hardware/samsung
# Thermal engine
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/thermal-engine-8996.conf:$(TARGET_COPY_OUT_VENDOR)/etc/thermal-engine-8996.conf
# TextClassifier # TextClassifier
PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \
textclassifier.bundle1 textclassifier.bundle1

View file

@ -791,12 +791,13 @@ vendor/lib/libvqzip.so
# OMX # OMX
etc/somxreg.conf etc/somxreg.conf
vendor/lib64/libAlacSwDec.so
vendor/lib64/libApeSwDec.so
vendor/lib64/libFlacSwDec.so
vendor/lib64/libOmxAacDec.so vendor/lib64/libOmxAacDec.so
vendor/lib64/libOmxAacEnc.so
vendor/lib64/libOmxAlacDec.so vendor/lib64/libOmxAlacDec.so
vendor/lib64/libOmxAlacDecSw.so vendor/lib64/libOmxAlacDecSw.so
vendor/lib64/libOmxAmrDec.so vendor/lib64/libOmxAmrDec.so
vendor/lib64/libOmxAmrEnc.so
vendor/lib64/libOmxAmrwbplusDec.so vendor/lib64/libOmxAmrwbplusDec.so
vendor/lib64/libOmxApeDec.so vendor/lib64/libOmxApeDec.so
vendor/lib64/libOmxApeDecSw.so vendor/lib64/libOmxApeDecSw.so
@ -811,6 +812,29 @@ vendor/lib64/libOmxVdec.so
vendor/lib64/libOmxVenc.so vendor/lib64/libOmxVenc.so
vendor/lib64/libOmxVpp.so vendor/lib64/libOmxVpp.so
vendor/lib64/libOmxWmaDec.so vendor/lib64/libOmxWmaDec.so
vendor/lib/libAlacSwDec.so
vendor/lib/libApeSwDec.so
vendor/lib/libFlacSwDec.so
vendor/lib/libdsd2pcm.so
vendor/lib/libOmxAacDec.so
vendor/lib/libOmxAlacDec.so
vendor/lib/libOmxAlacDecSw.so
vendor/lib/libOmxAmrDec.so
vendor/lib/libOmxAmrwbplusDec.so
vendor/lib/libOmxApeDec.so
vendor/lib/libOmxApeDecSw.so
vendor/lib/libOmxCore.so
vendor/lib/libOmxDsdDec.so
vendor/lib/libOmxEvrcDec.so
vendor/lib/libOmxEvrcEnc.so
vendor/lib/libOmxG711Dec.so
vendor/lib/libOmxG711Enc.so
vendor/lib/libOmxQcelp13Dec.so
vendor/lib/libOmxQcelp13Enc.so
vendor/lib/libOmxVdec.so
vendor/lib/libOmxVenc.so
vendor/lib/libOmxVpp.so
vendor/lib/libOmxWmaDec.so
lib64/libsomx263dsw.so lib64/libsomx263dsw.so
lib64/libsomx264dsw.so lib64/libsomx264dsw.so
lib64/libsomxaacd.so lib64/libsomxaacd.so
@ -830,27 +854,17 @@ lib64/libsomxvp8d.so
lib64/libsomxwmad.so lib64/libsomxwmad.so
lib64/libsomxwmv7d.so lib64/libsomxwmv7d.so
lib64/libsomxwmv8d.so lib64/libsomxwmv8d.so
vendor/lib/libOmxAacDec.so lib64/libarac.so
vendor/lib/libOmxAacEnc.so lib64/libsavsac.so
vendor/lib/libOmxAlacDec.so lib64/libsavscmn.so
vendor/lib/libOmxAlacDecSw.so lib64/libsavsff.so
vendor/lib/libOmxAmrDec.so lib64/libsavsmeta.so
vendor/lib/libOmxAmrEnc.so lib64/libsavsvc.so
vendor/lib/libOmxAmrwbplusDec.so lib64/libsnaace.so
vendor/lib/libOmxApeDec.so lib64/libsnamrnb.so
vendor/lib/libOmxApeDecSw.so lib64/libsnamrwb.so
vendor/lib/libOmxCore.so lib64/libsxqk.so
vendor/lib/libOmxDsdDec.so lib64/libsxqk_skia.so
vendor/lib/libOmxEvrcDec.so
vendor/lib/libOmxEvrcEnc.so
vendor/lib/libOmxG711Dec.so
vendor/lib/libOmxG711Enc.so
vendor/lib/libOmxQcelp13Dec.so
vendor/lib/libOmxQcelp13Enc.so
vendor/lib/libOmxVdec.so
vendor/lib/libOmxVenc.so
vendor/lib/libOmxVpp.so
vendor/lib/libOmxWmaDec.so
lib/libsomx263dsw.so lib/libsomx263dsw.so
lib/libsomx264dsw.so lib/libsomx264dsw.so
lib/libsomxaacd.so lib/libsomxaacd.so
@ -870,6 +884,16 @@ lib/libsomxvp8d.so
lib/libsomxwmad.so lib/libsomxwmad.so
lib/libsomxwmv7d.so lib/libsomxwmv7d.so
lib/libsomxwmv8d.so lib/libsomxwmv8d.so
lib/libarac.so
lib/libsavsac.so
lib/libsavscmn.so
lib/libsavsff.so
lib/libsavsmeta.so
lib/libsavsvc.so
lib/libsnaace.so
lib/libsnamrnb.so
lib/libsnamrwb.so
lib/libsxqk.so
# QMI # QMI
vendor/bin/irsc_util vendor/bin/irsc_util

132
rootdir/Android.mk Executable file → Normal file
View file

@ -1,46 +1,126 @@
LOCAL_PATH := $(call my-dir) LOCAL_PATH := $(call my-dir)
# Device init scripts # Common config scripts
include $(CLEAR_VARS) include $(CLEAR_VARS)
LOCAL_MODULE := fstab.qcom LOCAL_MODULE := init.class_main.sh
LOCAL_MODULE_CLASS := ETC LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := etc/fstab.qcom LOCAL_MODULE_CLASS := ETC
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC) LOCAL_SRC_FILES := bin/init.class_main.sh
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
include $(BUILD_PREBUILT) include $(BUILD_PREBUILT)
include $(CLEAR_VARS) include $(CLEAR_VARS)
LOCAL_MODULE := init.qcom.rc LOCAL_MODULE := init.qcom.early_boot.sh
LOCAL_MODULE_CLASS := ETC LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := etc/init.qcom.rc LOCAL_MODULE_CLASS := ETC
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw LOCAL_SRC_FILES := bin/init.qcom.early_boot.sh
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
include $(BUILD_PREBUILT) include $(BUILD_PREBUILT)
include $(CLEAR_VARS) include $(CLEAR_VARS)
LOCAL_MODULE := init.samsung.rc LOCAL_MODULE := init.qcom.post_boot.sh
LOCAL_MODULE_CLASS := ETC LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := etc/init.samsung.rc LOCAL_MODULE_CLASS := ETC
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw LOCAL_SRC_FILES := bin/init.qcom.post_boot.sh
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
include $(BUILD_PREBUILT) include $(BUILD_PREBUILT)
include $(CLEAR_VARS) include $(CLEAR_VARS)
LOCAL_MODULE := init.qcom.usb.rc LOCAL_MODULE := init.qcom.sensors.sh
LOCAL_MODULE_CLASS := ETC LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := etc/init.qcom.usb.rc LOCAL_MODULE_CLASS := ETC
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw LOCAL_SRC_FILES := bin/init.qcom.sensors.sh
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
include $(BUILD_PREBUILT) include $(BUILD_PREBUILT)
include $(CLEAR_VARS) include $(CLEAR_VARS)
LOCAL_MODULE := ueventd.qcom.rc LOCAL_MODULE := init.qcom.sh
LOCAL_MODULE_STEM := ueventd.rc LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := etc/ueventd.qcom.rc LOCAL_SRC_FILES := bin/init.qcom.sh
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR) LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
include $(BUILD_PREBUILT) include $(BUILD_PREBUILT)
include $(CLEAR_VARS) include $(CLEAR_VARS)
LOCAL_MODULE := init.qcom.power.rc LOCAL_MODULE := init.qcom.usb.sh
LOCAL_MODULE_CLASS := ETC LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := etc/init.qcom.power.rc LOCAL_MODULE_CLASS := ETC
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw LOCAL_SRC_FILES := bin/init.qcom.usb.sh
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
include $(BUILD_PREBUILT)
# Common init scripts
include $(CLEAR_VARS)
LOCAL_MODULE := fstab.qcom
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := etc/fstab.qcom
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := init.msm.usb.configfs.rc
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := etc/init.msm.usb.configfs.rc
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := init.qcom.rc
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := etc/init.qcom.rc
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := init.qcom.power.rc
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := etc/init.qcom.power.rc
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := init.qcom.usb.rc
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := etc/init.qcom.usb.rc
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := init.target.rc
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := etc/init.target.rc
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := ueventd.qcom.rc
LOCAL_MODULE_STEM := ueventd.rc
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := etc/ueventd.qcom.rc
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := wifi_qcom.rc
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := etc/wifi_qcom.rc
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := wifi_sec.rc
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := etc/wifi_sec.rc
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init
include $(BUILD_PREBUILT) include $(BUILD_PREBUILT)

View file

@ -0,0 +1,170 @@
#! /vendor/bin/sh
# Copyright (c) 2013-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.
#
#
# start ril-daemon only for targets on which radio is present
#
baseband=`getprop ro.baseband`
sgltecsfb=`getprop persist.vendor.radio.sglte_csfb`
datamode=`getprop persist.vendor.data.mode`
qcrild_status=false
case "$baseband" in
"apq" | "sda" | "qcs" )
setprop ro.vendor.radio.noril yes
stop ril-daemon
stop vendor.ril-daemon
stop vendor.qcrild
start vendor.ipacm
esac
case "$baseband" in
"sa8")
start vendor.ipacm
esac
case "$baseband" in
"msm" | "csfb" | "svlte2a" | "mdm" | "mdm2" | "sglte" | "sglte2" | "dsda2" | "unknown" | "dsda3")
start vendor.qmuxd
esac
case "$baseband" in
"msm" | "csfb" | "svlte2a" | "mdm" | "mdm2" | "sglte" | "sglte2" | "dsda2" | "unknown" | "dsda3" | "sdm" | "sdx" | "sm6")
# For older modem packages launch ril-daemon.
if [ -f /vendor/firmware_mnt/verinfo/ver_info.txt ]; then
modem=`cat /vendor/firmware_mnt/verinfo/ver_info.txt |
sed -n 's/^[^:]*modem[^:]*:[[:blank:]]*//p' |
sed 's/.*MPSS.\(.*\)/\1/g' | cut -d \. -f 1`
if [ "$modem" = "AT" ]; then
version=`cat /vendor/firmware_mnt/verinfo/ver_info.txt |
sed -n 's/^[^:]*modem[^:]*:[[:blank:]]*//p' |
sed 's/.*AT.\(.*\)/\1/g' | cut -d \- -f 1`
if [ ! -z $version ]; then
if [ "$version" \< "3.1" ]; then
qcrild_status=false
fi
fi
elif [ "$modem" = "TA" ]; then
version=`cat /vendor/firmware_mnt/verinfo/ver_info.txt |
sed -n 's/^[^:]*modem[^:]*:[[:blank:]]*//p' |
sed 's/.*TA.\(.*\)/\1/g' | cut -d \- -f 1`
if [ ! -z $version ]; then
if [ "$version" \< "3.0" ]; then
qcrild_status=false
fi
fi
elif [ "$modem" = "JO" ]; then
version=`cat /vendor/firmware_mnt/verinfo/ver_info.txt |
sed -n 's/^[^:]*modem[^:]*:[[:blank:]]*//p' |
sed 's/.*JO.\(.*\)/\1/g' | cut -d \- -f 1`
if [ ! -z $version ]; then
if [ "$version" \< "3.2" ]; then
qcrild_status=false
fi
fi
elif [ "$modem" = "TH" ]; then
qcrild_status=false
fi
fi
if [ "$qcrild_status" = "true" ]; then
# Make sure both rild, qcrild are not running at same time.
# This is possible with vanilla aosp system image.
stop ril-daemon
stop vendor.ril-daemon
start vendor.qcrild
else
start ril-daemon
start vendor.ril-daemon
fi
start vendor.ipacm-diag
start vendor.ipacm
case "$baseband" in
"svlte2a" | "csfb")
start qmiproxy
;;
"sglte" | "sglte2" )
if [ "x$sgltecsfb" != "xtrue" ]; then
start qmiproxy
else
setprop persist.vendor.radio.voice.modem.index 0
fi
;;
esac
multisim=`getprop persist.radio.multisim.config`
if [ "$multisim" = "dsds" ] || [ "$multisim" = "dsda" ]; then
if [ "$qcrild_status" = "true" ]; then
start vendor.qcrild2
else
start vendor.ril-daemon2
fi
elif [ "$multisim" = "tsts" ]; then
if [ "$qcrild_status" = "true" ]; then
start vendor.qcrild2
start vendor.qcrild3
else
start vendor.ril-daemon2
start vendor.ril-daemon3
fi
fi
case "$datamode" in
"tethered")
start vendor.dataqti
start vendor.dataadpl
start vendor.port-bridge
;;
"concurrent")
start vendor.dataqti
start vendor.dataadpl
start vendor.netmgrd
start vendor.port-bridge
;;
*)
start vendor.netmgrd
;;
esac
esac
#
# Allow persistent faking of bms
# User needs to set fake bms charge in persist.vendor.bms.fake_batt_capacity
#
fake_batt_capacity=`getprop persist.vendor.bms.fake_batt_capacity`
case "$fake_batt_capacity" in
"") ;; #Do nothing here
* )
echo "$fake_batt_capacity" > /sys/class/power_supply/battery/capacity
;;
esac

View file

@ -0,0 +1,239 @@
#! /vendor/bin/sh
# Copyright (c) 2012-2013,2016,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.
#
# Set platform variables
if [ -f /sys/devices/soc0/hw_platform ]; then
soc_hwplatform=`cat /sys/devices/soc0/hw_platform` 2> /dev/null
else
soc_hwplatform=`cat /sys/devices/system/soc/soc0/hw_platform` 2> /dev/null
fi
if [ -f /sys/devices/soc0/soc_id ]; then
soc_hwid=`cat /sys/devices/soc0/soc_id` 2> /dev/null
else
soc_hwid=`cat /sys/devices/system/soc/soc0/id` 2> /dev/null
fi
if [ -f /sys/devices/soc0/platform_version ]; then
soc_hwver=`cat /sys/devices/soc0/platform_version` 2> /dev/null
else
soc_hwver=`cat /sys/devices/system/soc/soc0/platform_version` 2> /dev/null
fi
if [ -f /sys/class/drm/card0-DSI-1/modes ]; then
echo "detect" > /sys/class/drm/card0-DSI-1/status
mode_file=/sys/class/drm/card0-DSI-1/modes
while read line; do
fb_width=${line%%x*};
break;
done < $mode_file
elif [ -f /sys/class/graphics/fb0/virtual_size ]; then
res=`cat /sys/class/graphics/fb0/virtual_size` 2> /dev/null
fb_width=${res%,*}
fi
log -t BOOT -p i "MSM target '$1', SoC '$soc_hwplatform', HwID '$soc_hwid', SoC ver '$soc_hwver'"
#For drm based display driver
vbfile=/sys/module/drm/parameters/vblankoffdelay
if [ -w $vbfile ]; then
echo -1 > $vbfile
else
log -t DRM_BOOT -p w "file: '$vbfile' or perms doesn't exist"
fi
function set_density_by_fb() {
#put default density based on width
if [ -z $fb_width ]; then
setprop vendor.display.lcd_density 320
else
if [ $fb_width -ge 1600 ]; then
setprop vendor.display.lcd_density 640
elif [ $fb_width -ge 1440 ]; then
setprop vendor.display.lcd_density 560
elif [ $fb_width -ge 1080 ]; then
setprop vendor.display.lcd_density 480
elif [ $fb_width -ge 720 ]; then
setprop vendor.display.lcd_density 320 #for 720X1280 resolution
elif [ $fb_width -ge 480 ]; then
setprop vendor.display.lcd_density 240 #for 480X854 QRD resolution
else
setprop vendor.display.lcd_density 160
fi
fi
}
target=`getprop ro.board.platform`
case "$target" in
"msm8996")
case "$soc_hwplatform" in
"Dragon")
setprop vendor.display.lcd_density 240
setprop qemu.hw.mainkeys 0
;;
"ADP")
setprop vendor.display.lcd_density 160
setprop qemu.hw.mainkeys 0
;;
"SBC")
setprop vendor.display.lcd_density 240
setprop qemu.hw.mainkeys 0
;;
*)
setprop vendor.display.lcd_density 560
;;
esac
;;
esac
baseband=`getprop ro.baseband`
#enable atfwd daemon all targets except sda, apq, qcs
case "$baseband" in
"apq" | "sda" | "qcs" )
setprop persist.vendor.radio.atfwd.start false;;
*)
setprop persist.vendor.radio.atfwd.start true;;
esac
#set default lcd density
#Since lcd density has read only
#property, it will not overwrite previous set
#property if any target is setting forcefully.
set_density_by_fb
# Setup display nodes & permissions
# HDMI can be fb1 or fb2
# Loop through the sysfs nodes and determine
# the HDMI(dtv panel)
##### moved to init.target.rc (booting performance team)#####
#function set_perms() {
# #Usage set_perms <filename> <ownership> <permission>
# chown -h $2 $1
# chmod $3 $1
#}
#
#function setHDMIPermission() {
# file=/sys/class/graphics/fb$1
# dev_file=/dev/graphics/fb$1
# dev_gfx_hdmi=/devices/virtual/switch/hdmi
#
# set_perms $file/hpd system.graphics 0664
# set_perms $file/res_info system.graphics 0664
# set_perms $file/vendor_name system.graphics 0664
# set_perms $file/product_description system.graphics 0664
# set_perms $file/video_mode system.graphics 0664
# set_perms $file/format_3d system.graphics 0664
# set_perms $file/s3d_mode system.graphics 0664
# set_perms $file/dynamic_fps system.graphics 0664
# set_perms $file/msm_fb_dfps_mode system.graphics 0664
# set_perms $file/hdr_stream system.graphics 0664
# set_perms $file/cec/enable system.graphics 0664
# set_perms $file/cec/logical_addr system.graphics 0664
# set_perms $file/cec/rd_msg system.graphics 0664
# set_perms $file/pa system.graphics 0664
# set_perms $file/cec/wr_msg system.graphics 0600
# set_perms $file/hdcp/tp system.graphics 0664
# set_perms $file/hdcp2p2/min_level_change system.graphics 0660
# set_perms $file/hdmi_audio_cb audioserver.audio 0600
# ln -s $dev_file $dev_gfx_hdmi
#}
# check for the type of driver FB or DRM
fb_driver=/sys/class/graphics/fb0
if [ -e "$fb_driver" ]
then
# # check for HDMI connection
# for fb_cnt in 0 1 2 3
# do
# file=/sys/class/graphics/fb$fb_cnt/msm_fb_panel_info
# if [ -f "$file" ]
# then
# cat $file | while read line; do
# case "$line" in
# *"is_pluggable"*)
# case "$line" in
# *"1"*)
# setHDMIPermission $fb_cnt
# esac
# esac
# done
# fi
# done
# check for mdp caps
file=/sys/class/graphics/fb0/mdp/caps
if [ -f "$file" ]
then
setprop vendor.gralloc.disable_ubwc 1
cat $file | while read line; do
case "$line" in
*"ubwc"*)
setprop vendor.gralloc.enable_fb_ubwc 1
setprop vendor.gralloc.disable_ubwc 0
esac
done
fi
# file=/sys/class/graphics/fb0
# if [ -d "$file" ]
# then
# set_perms $file/idle_time system.graphics 0664
# set_perms $file/dynamic_fps system.graphics 0664
# set_perms $file/dyn_pu system.graphics 0664
# set_perms $file/modes system.graphics 0664
# set_perms $file/mode system.graphics 0664
# set_perms $file/msm_cmd_autorefresh_en system.graphics 0664
# fi
#
# # set lineptr permissions for all displays
# for fb_cnt in 0 1 2 3
# do
# file=/sys/class/graphics/fb$fb_cnt
# if [ -f "$file/lineptr_value" ]; then
# set_perms $file/lineptr_value system.graphics 0664
# fi
# if [ -f "$file/msm_fb_persist_mode" ]; then
# set_perms $file/msm_fb_persist_mode system.graphics 0664
# fi
# done
#else
# set_perms /sys/devices/virtual/hdcp/msm_hdcp/min_level_change system.graphics 0660
fi
boot_reason=`cat /proc/sys/kernel/boot_reason`
reboot_reason=`getprop ro.boot.alarmboot`
if [ "$boot_reason" = "3" ] || [ "$reboot_reason" = "true" ]; then
setprop ro.vendor.alarm_boot true
else
setprop ro.vendor.alarm_boot false
fi
# copy GPU frequencies to vendor property
if [ -f /sys/class/kgsl/kgsl-3d0/gpu_available_frequencies ]; then
gpu_freq=`cat /sys/class/kgsl/kgsl-3d0/gpu_available_frequencies` 2> /dev/null
setprop vendor.gpu.available_frequencies "$gpu_freq"
fi

View file

@ -0,0 +1,56 @@
#! /vendor/bin/sh
# Copyright (c) 2012-2013, 2016-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.
#
# Let kernel know our image version/variant/crm_version
if [ -f /sys/devices/soc0/select_image ]; then
image_version="10:"
image_version+=`getprop ro.build.id`
image_version+=":"
image_version+=`getprop ro.build.version.incremental`
image_variant=`getprop ro.product.name`
image_variant+="-"
image_variant+=`getprop ro.build.type`
oem_version=`getprop ro.build.version.codename`
echo 10 > /sys/devices/soc0/select_image
echo $image_version > /sys/devices/soc0/image_version
echo $image_variant > /sys/devices/soc0/image_variant
echo $oem_version > /sys/devices/soc0/image_crm_version
fi
# Change console log level as per console config property
console_config=`getprop persist.console.silent.config`
case "$console_config" in
"1")
echo "Enable console config to $console_config"
echo 0 > /proc/sys/kernel/printk
;;
*)
echo "Enable console config to $console_config"
;;
esac

View file

@ -0,0 +1,46 @@
#!/vendor/bin/sh
# Copyright (c) 2015,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.
#
#
# Function to start sensors for SSC enabled platforms
#
start_sensors()
{
sscrpcd_status=`getprop init.svc.vendor.sensors`
chmod -h 664 /persist/sensors/sensors_settings
chown -h -R system.system /persist/sensors
#start vendor.sensors.qti
start factory_adsp
# Only for SLPI
if [ -c /dev/msm_dsps -o -c /dev/sensors ] && [ -z "$sscrpcd_status" ]; then
start vendor.sensors
fi
}
start_sensors

435
rootdir/bin/init.qcom.sh Executable file
View file

@ -0,0 +1,435 @@
#! /vendor/bin/sh
# Copyright (c) 2009-2016, 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.
#
target=`getprop ro.board.platform`
low_ram=`getprop ro.config.low_ram`
if [ -f /sys/devices/soc0/soc_id ]; then
platformid=`cat /sys/devices/soc0/soc_id`
else
platformid=`cat /sys/devices/system/soc/soc0/id`
fi
start_battery_monitor()
{
if ls /sys/bus/spmi/devices/qpnp-bms-*/fcc_data ; then
chown -h root.system /sys/module/pm8921_bms/parameters/*
chown -h root.system /sys/module/qpnp_bms/parameters/*
chown -h root.system /sys/bus/spmi/devices/qpnp-bms-*/fcc_data
chown -h root.system /sys/bus/spmi/devices/qpnp-bms-*/fcc_temp
chown -h root.system /sys/bus/spmi/devices/qpnp-bms-*/fcc_chgcyl
chmod 0660 /sys/module/qpnp_bms/parameters/*
chmod 0660 /sys/module/pm8921_bms/parameters/*
mkdir -p /data/bms
chown -h root.system /data/bms
chmod 0770 /data/bms
start battery_monitor
fi
}
start_charger_monitor()
{
if ls /sys/module/qpnp_charger/parameters/charger_monitor; then
chown -h root.system /sys/module/qpnp_charger/parameters/*
chown -h root.system /sys/class/power_supply/battery/input_current_max
chown -h root.system /sys/class/power_supply/battery/input_current_trim
chown -h root.system /sys/class/power_supply/battery/input_current_settled
chown -h root.system /sys/class/power_supply/battery/voltage_min
chmod 0664 /sys/class/power_supply/battery/input_current_max
chmod 0664 /sys/class/power_supply/battery/input_current_trim
chmod 0664 /sys/class/power_supply/battery/input_current_settled
chmod 0664 /sys/class/power_supply/battery/voltage_min
chmod 0664 /sys/module/qpnp_charger/parameters/charger_monitor
start charger_monitor
fi
}
start_vm_bms()
{
if [ -e /dev/vm_bms ]; then
chown -h root.system /sys/class/power_supply/bms/current_now
chown -h root.system /sys/class/power_supply/bms/voltage_ocv
chmod 0664 /sys/class/power_supply/bms/current_now
chmod 0664 /sys/class/power_supply/bms/voltage_ocv
start vm_bms
fi
}
start_msm_irqbalance_8939()
{
if [ -f /vendor/bin/msm_irqbalance ]; then
case "$platformid" in
"239" | "293" | "294" | "295" | "304" | "338" | "313" |"353")
start vendor.msm_irqbalance;;
"349" | "350" )
start vendor.msm_irqbal_lb;;
esac
fi
}
start_msm_irqbalance_msmnile()
{
if [ -f /vendor/bin/msm_irqbalance ]; then
start vendor.msm_irqbalance
fi
}
start_msm_irqbalance660()
{
if [ -f /vendor/bin/msm_irqbalance ]; then
case "$platformid" in
"317" | "324" | "325" | "326" | "345" | "346")
start vendor.msm_irqbalance;;
"318" | "327" | "385")
start vendor.msm_irqbl_sdm630;;
esac
fi
}
start_msm_irqbalance()
{
if [ -f /vendor/bin/msm_irqbalance ]; then
start vendor.msm_irqbalance
fi
}
baseband=`getprop ro.baseband`
echo 1 > /proc/sys/net/ipv6/conf/default/accept_ra_defrtr
case "$baseband" in
"svlte2a")
start bridgemgrd
;;
esac
case "$target" in
"msm7630_surf" | "msm7630_1x" | "msm7630_fusion")
if [ -f /sys/devices/soc0/hw_platform ]; then
value=`cat /sys/devices/soc0/hw_platform`
else
value=`cat /sys/devices/system/soc/soc0/hw_platform`
fi
case "$value" in
"Fluid")
start profiler_daemon;;
esac
;;
"msm8660" )
if [ -f /sys/devices/soc0/hw_platform ]; then
platformvalue=`cat /sys/devices/soc0/hw_platform`
else
platformvalue=`cat /sys/devices/system/soc/soc0/hw_platform`
fi
case "$platformvalue" in
"Fluid")
start profiler_daemon;;
esac
;;
"msm8960")
case "$baseband" in
"msm")
start_battery_monitor;;
esac
if [ -f /sys/devices/soc0/hw_platform ]; then
platformvalue=`cat /sys/devices/soc0/hw_platform`
else
platformvalue=`cat /sys/devices/system/soc/soc0/hw_platform`
fi
case "$platformvalue" in
"Fluid")
start profiler_daemon;;
"Liquid")
start profiler_daemon;;
esac
;;
"msm8974")
platformvalue=`cat /sys/devices/soc0/hw_platform`
case "$platformvalue" in
"Fluid")
start profiler_daemon;;
"Liquid")
start profiler_daemon;;
esac
case "$baseband" in
"msm")
start_battery_monitor
;;
esac
start_charger_monitor
;;
"sdm660")
if [ -f /sys/devices/soc0/soc_id ]; then
soc_id=`cat /sys/devices/soc0/soc_id`
else
soc_id=`cat /sys/devices/system/soc/soc0/id`
fi
if [ -f /sys/devices/soc0/hw_platform ]; then
hw_platform=`cat /sys/devices/soc0/hw_platform`
else
hw_platform=`cat /sys/devices/system/soc/soc0/hw_platform`
fi
case "$soc_id" in
"317" | "324" | "325" | "326" | "318" | "327" | "385" )
case "$hw_platform" in
"Surf")
setprop qemu.hw.mainkeys 0
;;
"MTP")
setprop qemu.hw.mainkeys 0
;;
"RCM")
setprop qemu.hw.mainkeys 0
;;
"QRD")
setprop qemu.hw.mainkeys 0
;;
esac
;;
esac
start_msm_irqbalance660
;;
"apq8084")
platformvalue=`cat /sys/devices/soc0/hw_platform`
case "$platformvalue" in
"Fluid")
start profiler_daemon;;
"Liquid")
start profiler_daemon;;
esac
;;
"msm8226")
start_charger_monitor
;;
"msm8610")
start_charger_monitor
;;
"msm8916")
start_vm_bms
start_msm_irqbalance_8939
if [ -f /sys/devices/soc0/soc_id ]; then
soc_id=`cat /sys/devices/soc0/soc_id`
else
soc_id=`cat /sys/devices/system/soc/soc0/id`
fi
if [ -f /sys/devices/soc0/platform_subtype_id ]; then
platform_subtype_id=`cat /sys/devices/soc0/platform_subtype_id`
fi
if [ -f /sys/devices/soc0/hw_platform ]; then
hw_platform=`cat /sys/devices/soc0/hw_platform`
fi
case "$soc_id" in
"239")
case "$hw_platform" in
"Surf")
case "$platform_subtype_id" in
"1")
setprop qemu.hw.mainkeys 0
;;
esac
;;
"MTP")
case "$platform_subtype_id" in
"3")
setprop qemu.hw.mainkeys 0
;;
esac
;;
esac
;;
esac
;;
"msm8994" | "msm8992" | "msm8998" | "apq8098_latv" | "sdm845" | "sdm710" | "qcs605" | "sm6150" | "trinket")
start_msm_irqbalance
;;
"msm8996")
if [ -f /sys/devices/soc0/hw_platform ]; then
hw_platform=`cat /sys/devices/soc0/hw_platform`
fi
case "$hw_platform" in
"MTP" | "CDP")
#Loop through the sysfs nodes and determine the correct sysfs to change the permission and ownership.
for count in 0 1 2 3 4 5 6 7 8 9 10
do
dir="/sys/devices/soc/75ba000.i2c/i2c-12/12-0020/input/input"$count
if [ -d "$dir" ]; then
chmod 0660 $dir/secure_touch_enable
chmod 0440 $dir/secure_touch
chown system.drmrpc $dir/secure_touch_enable
chown system.drmrpc $dir/secure_touch
break
fi
done
;;
esac
;;
"msm8909")
start_vm_bms
;;
"msmnile")
start_msm_irqbalance_msmnile
;;
"msm8937")
start_msm_irqbalance_8939
if [ -f /sys/devices/soc0/soc_id ]; then
soc_id=`cat /sys/devices/soc0/soc_id`
else
soc_id=`cat /sys/devices/system/soc/soc0/id`
fi
if [ -f /sys/devices/soc0/hw_platform ]; then
hw_platform=`cat /sys/devices/soc0/hw_platform`
else
hw_platform=`cat /sys/devices/system/soc/soc0/hw_platform`
fi
if [ "$low_ram" != "true" ]; then
case "$soc_id" in
"294" | "295" | "303" | "307" | "308" | "309" | "313" | "320" | "353" | "354" | "363" | "364")
case "$hw_platform" in
"Surf")
setprop qemu.hw.mainkeys 0
;;
"MTP")
setprop qemu.hw.mainkeys 0
;;
"RCM")
setprop qemu.hw.mainkeys 0
;;
"QRD")
setprop qemu.hw.mainkeys 0
;;
esac
;;
esac
fi
;;
"msm8953")
start_msm_irqbalance_8939
if [ -f /sys/devices/soc0/soc_id ]; then
soc_id=`cat /sys/devices/soc0/soc_id`
else
soc_id=`cat /sys/devices/system/soc/soc0/id`
fi
if [ -f /sys/devices/soc0/hw_platform ]; then
hw_platform=`cat /sys/devices/soc0/hw_platform`
else
hw_platform=`cat /sys/devices/system/soc/soc0/hw_platform`
fi
case "$soc_id" in
"293" | "304" | "338" | "351" | "349" | "350" )
case "$hw_platform" in
"Surf")
setprop qemu.hw.mainkeys 0
;;
"MTP")
setprop qemu.hw.mainkeys 0
;;
"RCM")
setprop qemu.hw.mainkeys 0
;;
"QRD")
setprop qemu.hw.mainkeys 0
;;
esac
;;
esac
;;
"sdm710")
if [ -f /sys/devices/soc0/soc_id ]; then
soc_id=`cat /sys/devices/soc0/soc_id`
else
soc_id=`cat /sys/devices/system/soc/soc0/id`
fi
if [ -f /sys/devices/soc0/hw_platform ]; then
hw_platform=`cat /sys/devices/soc0/hw_platform`
else
hw_platform=`cat /sys/devices/system/soc/soc0/hw_platform`
fi
case "$soc_id" in
"336" | "337" | "347" | "360" | "393" )
case "$hw_platform" in
"Surf")
setprop qemu.hw.mainkeys 0
;;
"MTP")
setprop qemu.hw.mainkeys 0
;;
"RCM")
setprop qemu.hw.mainkeys 0
;;
"QRD")
setprop qemu.hw.mainkeys 0
;;
esac
;;
esac
;;
esac
#
# Make modem config folder and copy firmware config to that folder for RIL
#
if [ -f /data/vendor/modem_config/ver_info.txt ]; then
prev_version_info=`cat /data/vendor/modem_config/ver_info.txt`
else
prev_version_info=""
fi
cur_version_info=`cat /vendor/firmware_mnt/verinfo/ver_info.txt`
if [ ! -f /vendor/firmware_mnt/verinfo/ver_info.txt -o "$prev_version_info" != "$cur_version_info" ]; then
# add W for group recursively before delete
chmod g+w -R /data/vendor/modem_config/*
rm -rf /data/vendor/modem_config/*
# preserve the read only mode for all subdir and files
cp --preserve=m -dr /vendor/firmware_mnt/image/modem_pr/mcfg/configs/* /data/vendor/modem_config
cp --preserve=m -d /vendor/firmware_mnt/verinfo/ver_info.txt /data/vendor/modem_config/
cp --preserve=m -d /vendor/firmware_mnt/image/modem_pr/mbn_ota.txt /data/vendor/modem_config/
# the group must be root, otherwise this script could not add "W" for group recursively
chown -hR radio.root /data/vendor/modem_config/*
fi
chmod g-w /data/vendor/modem_config
setprop ro.vendor.ril.mbn_copy_completed 1
#check build variant for printk logging
#current default minimum boot-time-default
buildvariant=`getprop ro.build.type`
case "$buildvariant" in
"userdebug" | "eng")
#set default loglevel to KERN_INFO
echo "6 6 1 7" > /proc/sys/kernel/printk
;;
*)
#set default loglevel to KERN_WARNING
echo "4 4 1 4" > /proc/sys/kernel/printk
;;
esac

View file

44
rootdir/etc/fstab.qcom Executable file → Normal file
View file

@ -1,19 +1,25 @@
# Android fstab file. # Android fstab file.
# The filesystem that contains the filesystem checker binary (typically /system) cannot # The filesystem that contains the filesystem e2fsck binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK # specify 'check', and must come before any filesystems that do specify 'check'
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
/dev/block/bootdevice/by-name/system /system ext4 ro,barrier=1 wait,recoveryonly /dev/block/bootdevice/by-name/system /system ext4 ro,barrier=1 wait,recoveryonly
/dev/block/bootdevice/by-name/userdata /data ext4 nosuid,nodev,noatime,barrier=1,noauto_da_alloc wait,check,encryptable=footer,quota,formattable /dev/block/bootdevice/by-name/userdata /data f2fs nosuid,nodev,noatime,nodiratime,inline_xattr,data_flush wait,check,encryptable=footer,formattable,length=-16384
/dev/block/bootdevice/by-name/cache /cache ext4 nosuid,nodev,noatime,barrier=1 wait,check,formattable /dev/block/bootdevice/by-name/userdata /data ext4 nosuid,nodev,noatime,nodiratime,barrier=1,noauto_da_alloc wait,check,encryptable=footer,formattable,length=-16384
/dev/block/bootdevice/by-name/apnhlos /firmware vfat ro,shortname=lower,dmask=222,fmask=333,context=u:object_r:firmware_file:s0 wait /dev/block/bootdevice/by-name/cache /cache f2fs nosuid,nodev,noatime,nodiratime,inline_xattr,flush_merge,data_flush wait,check,formattable
/dev/block/bootdevice/by-name/modem /firmware-modem vfat ro,shortname=lower,dmask=222,fmask=333,context=u:object_r:firmware_file:s0 wait /dev/block/bootdevice/by-name/cache /cache ext4 nosuid,nodev,noatime,nodiratime,barrier=1 wait,check,formattable
/dev/block/bootdevice/by-name/efs /efs ext4 nosuid,nodev,noauto_da_alloc,journal_async_commit,data=ordered,errors=panic wait,check /dev/block/bootdevice/by-name/apnhlos /vendor/firmware_mnt vfat ro,shortname=lower,dmask=222,fmask=333,context=u:object_r:firmware_file:s0 wait
/dev/block/bootdevice/by-name/persist /persist ext4 nosuid,nodev,barrier=1 wait /dev/block/bootdevice/by-name/modem /vendor/firmware-modem vfat ro,shortname=lower,dmask=222,fmask=333,context=u:object_r:firmware_file:s0 wait
/dev/block/bootdevice/by-name/dsp /vendor/dsp ext4 nosuid,nodev,barrier=1 wait
/dev/block/bootdevice/by-name/boot /boot emmc defaults recoveryonly /dev/block/bootdevice/by-name/persist /mnt/vendor/persist ext4 nosuid,nodev,barrier=1 wait
/dev/block/bootdevice/by-name/recovery /recovery emmc defaults recoveryonly /dev/block/bootdevice/by-name/config /frp emmc defaults defaults
/dev/block/bootdevice/by-name/fota /misc emmc defaults defaults
# SDCard /dev/block/bootdevice/by-name/efs /mnt/vendor/efs ext4 nosuid,nodev,noauto_da_alloc,journal_async_commit,data=ordered,errors=panic wait,check
/devices/soc/74a4900.sdhci/mmc_host/mmc* auto auto defaults voldmanaged=sdcard:auto,encryptable=userdata
/devices/soc/6a00000.ssusb/6a00000.dwc3/xhci-hcd.0.auto/usb* auto auto defaults voldmanaged=usb:auto # Recovery
/dev/block/bootdevice/by-name/boot /boot emmc defaults recoveryonly
/dev/block/bootdevice/by-name/recovery /recovery emmc defaults recoveryonly
# SDCard
/devices/soc/74a4900.sdhci/mmc_host/mmc* auto auto defaults voldmanaged=sdcard:auto,encryptable=userdata
/devices/soc/6a00000.ssusb/6a00000.dwc3/xhci-hcd.0.auto/usb* auto auto defaults voldmanaged=usb:auto

File diff suppressed because it is too large Load diff

10
rootdir/etc/init.qcom.power.rc Executable file → Normal file
View file

@ -166,7 +166,7 @@ on enable-low-power
write /sys/module/lpm_levels/parameters/sleep_disabled "N" write /sys/module/lpm_levels/parameters/sleep_disabled "N"
# Set perfd properties # Set perfd properties
setprop sys.post_boot.parsed 1 setprop vendor.post_boot.parsed 1
on property:sys.boot_completed=1 on property:sys.boot_completed=1
trigger enable-low-power trigger enable-low-power
@ -186,10 +186,12 @@ on property:sys.boot_completed=1
on property:init.svc.recovery=running on property:init.svc.recovery=running
trigger enable-low-power trigger enable-low-power
service charger /charger service vendor.charger /system/bin/chargeonlymode
class charger class charger
group system graphics user system
seclabel u:r:healthd:s0 group system graphics input
capabilities SYS_BOOT
seclabel u:r:charger:s0
service energy-awareness /vendor/bin/energy-awareness service energy-awareness /vendor/bin/energy-awareness
class main class main

1108
rootdir/etc/init.qcom.rc Executable file → Normal file

File diff suppressed because it is too large Load diff

66
rootdir/etc/init.qcom.usb.rc Executable file → Normal file
View file

@ -1,4 +1,4 @@
# Copyright (c) 2011-2016, The Linux Foundation. All rights reserved. # Copyright (c) 2011-2016, 2018 The Linux Foundation. All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met: # modification, are permitted provided that the following conditions are met:
@ -97,13 +97,13 @@ on boot
symlink /config/usb_gadget/g1/configs/b.1 /config/usb_gadget/g1/os_desc/b.1 symlink /config/usb_gadget/g1/configs/b.1 /config/usb_gadget/g1/os_desc/b.1
mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000 mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000
write /sys/class/android_usb/android0/f_ffs/aliases adb write /sys/class/android_usb/android0/f_ffs/aliases adb
enable qcom-usb-sh
chown -h root.system /sys/devices/platform/msm_hsusb/gadget/wakeup service qcom-usb-sh /vendor/bin/init.qcom.usb.sh
# chmod -h 220 /sys/devices/platform/msm_hsusb/gadget/wakeup class core
user root
# echo 1 > /sys/module/rmnet_usb/parameters/mux_enabled oneshot
# echo 8 > /sys/module/rmnet_usb/parameters/no_fwd_rmnet_links disabled
# echo 17 > /sys/module/rmnet_usb/parameters/no_rmnet_insts_per_dev
# Following are the parameters required for usb functionality. They provide configurable options like # Following are the parameters required for usb functionality. They provide configurable options like
# product_id/vendor id and allows specifying required functions: # product_id/vendor id and allows specifying required functions:
@ -256,6 +256,50 @@ on property:sys.usb.config=mtp,adb
start adbd start adbd
setprop sys.usb.state ${sys.usb.config} setprop sys.usb.state ${sys.usb.config}
#[For Smart MTP CHN
on property:sys.usb.config=mtp,categories
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/iSerial ${ro.serialno}
write /sys/class/android_usb/android0/idVendor 04E8
write /sys/class/android_usb/android0/idProduct 6860
write /sys/class/android_usb/android0/f_acm/acm_transports tty
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,categories,adb
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/iSerial ${ro.serialno}
write /sys/class/android_usb/android0/idVendor 04E8
write /sys/class/android_usb/android0/idProduct 6860
write /sys/class/android_usb/android0/f_acm/acm_transports tty
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=mass_storage,mtp,categories
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/iSerial ${ro.serialno}
write /sys/class/android_usb/android0/idVendor 04E8
write /sys/class/android_usb/android0/idProduct 6860
write /sys/class/android_usb/android0/f_acm/acm_transports tty
write /sys/class/android_usb/android0/functions mtp,mass_storage,acm
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=mass_storage,mtp,categories,adb
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/iSerial ${ro.serialno}
write /sys/class/android_usb/android0/idVendor 04E8
write /sys/class/android_usb/android0/idProduct 6860
write /sys/class/android_usb/android0/f_acm/acm_transports tty
write /sys/class/android_usb/android0/functions mtp,mass_storage,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 on property:sys.usb.config=ptp
write /sys/class/android_usb/android0/enable 0 write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/iSerial ${ro.serialno} write /sys/class/android_usb/android0/iSerial ${ro.serialno}
@ -380,7 +424,7 @@ on property:sys.usb.config=rndis,acm,diag,adb
start adbd start adbd
setprop sys.usb.state ${sys.usb.config} setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=rmnet,acm,diag on property:sys.usb.config=acm,diag,rmnet
write /sys/class/android_usb/android0/enable 0 write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/iSerial ${ro.serialno} write /sys/class/android_usb/android0/iSerial ${ro.serialno}
write /sys/class/android_usb/android0/idVendor 04E8 write /sys/class/android_usb/android0/idVendor 04E8
@ -392,7 +436,7 @@ on property:sys.usb.config=rmnet,acm,diag
write /sys/class/android_usb/android0/enable 1 write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config} setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=rmnet,acm,diag,adb on property:sys.usb.config=acm,diag,rmnet,adb
write /sys/class/android_usb/android0/enable 0 write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/iSerial ${ro.serialno} write /sys/class/android_usb/android0/iSerial ${ro.serialno}
write /sys/class/android_usb/android0/idVendor 04E8 write /sys/class/android_usb/android0/idVendor 04E8
@ -405,7 +449,7 @@ on property:sys.usb.config=rmnet,acm,diag,adb
start adbd start adbd
setprop sys.usb.state ${sys.usb.config} setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=diag,acm on property:sys.usb.config=acm,diag
write /sys/class/android_usb/android0/enable 0 write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/iSerial ${ro.serialno} write /sys/class/android_usb/android0/iSerial ${ro.serialno}
write /sys/class/android_usb/android0/idVendor 04E8 write /sys/class/android_usb/android0/idVendor 04E8
@ -417,7 +461,7 @@ on property:sys.usb.config=diag,acm
write /sys/class/android_usb/android0/enable 1 write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config} setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=diag,acm,adb on property:sys.usb.config=acm,diag,adb
write /sys/class/android_usb/android0/enable 0 write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/iSerial ${ro.serialno} write /sys/class/android_usb/android0/iSerial ${ro.serialno}
write /sys/class/android_usb/android0/idVendor 04E8 write /sys/class/android_usb/android0/idVendor 04E8

View file

@ -1,441 +0,0 @@
# Copyright (C) 2012 The Android Open Source Project
#
# IMPORTANT: Do not create world writable files or directories.
# This is a common source of Android security bugs.
#
on post-fs-data
# Permissions for Fingerprint sensor
chown system radio /sys/class/fingerprint/fingerprint/type_check
chown system radio /sys/class/fingerprint/fingerprint/name
chown system radio /sys/class/fingerprint/fingerprint/vendor
chown system radio /sys/class/fingerprint/fingerprint/adm
chown system radio /sys/class/fingerprint/fingerprint/bfs_values
# If there is no post-fs-data action in the init.<device>.rc file, you
# must uncomment this line, otherwise encrypted filesystems
# won't work.
# Set indication (checked by vold) that we have finished this action
#setprop vold.post_fs_data_done 1
# FINGERPRINT
# fp_migration /data/biometrics /data/vendor/biometrics
mkdir /data/vendor/biometrics 0770 system system
mkdir /data/vendor/fpSnrTest 0770 system system
restorecon_recursive /data/vendor/biometrics
on init
# MUIC
chown system radio /sys/class/sec/switch/adc
chown system radio /sys/class/sec/switch/otg_test
chown system radio /sys/class/sec/switch/uart_sel
chown system radio /sys/class/sec/switch/usb_sel
chown system system /sys/class/sec/switch/afc_off
chown system radio /sys/class/sec/switch/afc_disable
chown system radio /sys/class/sec/switch/apo_factory
chown system radio /sys/class/sec/switch/afc_set_voltage
chown system radio /sys/class/sec/switch/vbus_value
chown system radio /sys/class/sec/switch/vbus_value_pd
chown system radio /sys/class/sec/switch/vbus_rawdata
chown system radio /sys/class/sec/switch/keyboard_test
on boot
#Create directories for Fingerprint
mkdir /data/vendor/misc/qti_fp 0770 system system
mkdir /data/vendor/misc/qti_fp/bg_estimation 0770 system system
mkdir /data/vendor/misc/qti_fp/calib_test 0770 system system
mkdir /data/vendor/misc/qti_fp/database 0770 system system
# Permissions for svc led
chown system system /sys/class/sec/led/led_r
chown system system /sys/class/sec/led/led_g
chown system system /sys/class/sec/led/led_b
chown system system /sys/class/sec/led/led_pattern
chown system system /sys/class/sec/led/led_blink
chown system system /sys/class/sec/led/led_lowpower
chown system system /sys/class/sec/led/led_brightness
chown system system /sys/class/sec/led/delay_on
chown system system /sys/class/sec/led/delay_off
chown system system /sys/class/sec/led/blink
chown system system /sys/class/timed_output/vibrator/enable
chown system system /sys/class/timed_output/vibrator/intensity
chown system system /sys/class/timed_output/vibrator/multi_freq
# Permissions for Camera
chown cameraserver cameraserver /sys/kernel/mm/vmscan/mem_boost_mode
chown system system /sys/class/camera/rear/rear_camfw
chown system system /sys/class/camera/rear/rear_camfw_full
chown system system /sys/class/camera/rear/rear_camfw_load
chown system system /sys/class/camera/rear/rear_camtype
chown system system /sys/class/camera/rear/rear_companionfw_full
chown system system /sys/class/camera/rear/rear_calcheck
chown system system /sys/class/camera/rear/rear_fwcheck
chown system system /sys/class/camera/rear/rear_checkfw_user
chown system system /sys/class/camera/rear/rear_checkfw_factory
chown system system /sys/class/camera/rear/rear_moduleinfo
chown system system /sys/class/camera/rear/rear_afcal
chown system system /sys/class/camera/rear/isp_core
chown system system /sys/class/camera/rear/rear_caminfo
chown system system /sys/class/camera/rear/rear_sensorid_exif
chown system system /sys/class/camera/rear/rear_moduleid
chown system system /sys/class/camera/rear/companion_ic_check
chown system system /sys/class/camera/rear/ssrm_camera_info
chown system system /sys/class/camera/flash/rear_flash
chown system system /sys/class/camera/front/front_camfw
chown system system /sys/class/camera/front/front_camtype
chown system system /sys/class/camera/front/front_caminfo
chown system system /sys/class/camera/front/front_camfw_full
chown system system /sys/class/camera/front/front_camfw_load
chown system system /sys/class/camera/front/front_checkfw_user
chown system system /sys/class/camera/front/front_checkfw_factory
chown system system /sys/class/camera/front/front_afcal
chown system system /sys/class/camera/front/front_sensorid_exif
chown system system /sys/class/camera/ois/selftest
chown system system /sys/class/camera/ois/ois_power
chown system system /sys/class/camera/ois/ois_rawdata
chown system system /sys/class/camera/ois/oisfw
chown system system /sys/class/camera/ois/ois_diff
chown system system /sys/class/camera/ois/ois_exif
chown system system /sys/class/camera/ois/autotest
chown system system /sys/class/camera/secure/iris_camfw
chown system system /sys/class/camera/secure/iris_camfw_full
chown system system /sys/class/camera/secure/iris_checkfw_factory
chown system system /sys/class/camera/secure/iris_checkfw_user
chown system system /sys/class/camera/secure/iris_caminfo
chown system system /sys/devices/svc/Camera/SVC_rear_module
# Permissions for InputDevices.
chown system radio /sys/class/sec/tsp/cmd
chown system system /sys/class/sec/tsp/input/enabled
chmod 0660 /sys/class/sec/tsp/input/enabled
chown system system /sys/class/sec/sec_touchkey/input/enabled
chmod 0660 /sys/class/sec/sec_touchkey/input/enabled
chown system system /sys/class/sec/sec_touchkey/brightness
chown system radio /sys/class/sec/sec_touchkey/keyboard_mode
chown system radio /sys/class/sec/sec_touchkey/flip_mode
chown system radio /sys/class/sec/sec_touchkey/touchkey_firm_update
chown system radio /sys/class/sec/sec_touchkey/touch_sensitivity
chown system radio /sys/class/sec/sec_touchkey/touchkey_light_version
chown system radio /sys/class/sec/sec_touchkey/touchkey_light_update
chown system radio /sys/class/sec/sec_touchkey/touchkey_light_id_compare
chown system radio /sys/class/sec/sec_touchkey/touchkey_light_table_write
chown system radio /sys/class/sec/sec_touchkey/glove_mode
chown system system /sys/class/sec/sec_epen/input/enabled
chmod 0660 /sys/class/sec/sec_epen/input/enabled
chown system radio /sys/class/sec/sec_epen/epen_firm_update
chown system radio /sys/class/sec/sec_epen/epen_reset
chown system radio /sys/class/sec/sec_epen/epen_reset_result
chown system radio /sys/class/sec/sec_epen/epen_checksum
chown system radio /sys/class/sec/sec_epen/epen_checksum_result
chown system radio /sys/class/sec/sec_epen/epen_saving_mode
chown system radio /sys/class/sec/sec_epen/epen_wcharging_mode
chown system radio /sys/class/sec/sec_epen/epen_disable_mode
chown system radio /sys/class/sec/sec_epen/epen_aop_mode
chown system radio /sys/class/sec/sec_epen/screen_off_memo_enable
# Permissions for SecureDevice
chown system system /sys/class/sec/tsp/input/secure_touch_enable
# Permissions for gpio_keys
chown system radio /sys/class/sec/sec_key/wakeup_keys
write /sys/class/sec/sec_key/wakeup_keys 116,172
# Permissions for SENSORS
# HRM_sensor
chown system radio /sys/class/sensors/hrm_sensor/name
chown system radio /sys/class/sensors/hrm_sensor/vendor
chown system radio /sys/class/sensors/hrm_sensor/led_current
chown system radio /sys/class/sensors/hrm_sensor/led_current1
chown system radio /sys/class/sensors/hrm_sensor/led_current2
chown system radio /sys/class/sensors/hrm_sensor/led_current3
chown system radio /sys/class/sensors/hrm_sensor/led_current4
chown system radio /sys/class/sensors/hrm_sensor/hr_range
chown system radio /sys/class/sensors/hrm_sensor/hr_range2
chown system radio /sys/class/sensors/hrm_sensor/look_mode_ir
chown system radio /sys/class/sensors/hrm_sensor/look_mode_red
chown system radio /sys/class/sensors/hrm_sensor/eol_test
chown system radio /sys/class/sensors/hrm_sensor/eol_test_result
chown system radio /sys/class/sensors/hrm_sensor/eol_test_status
chown system radio /sys/class/sensors/hrm_sensor/int_pin_check
chown system radio /sys/class/sensors/hrm_sensor/lib_ver
chown system radio /sys/class/sensors/hrm_sensor/regulator
chown system radio /sys/class/sensors/hrm_sensor/part_type
chown system radio /sys/class/sensors/hrm_sensor/device_id
chown system radio /sys/class/sensors/hrm_sensor/hrm_flush
chown system radio /sys/class/sensors/hrm_sensor/threshold
chown system radio /sys/class/sensors/hrm_sensor/eol_lib_ver
chown system radio /sys/class/sensors/hrm_sensor/elf_lib_ver
chown system radio /sys/class/sensors/hrm_sensor/adpd_reg_read
chown system radio /sys/class/sensors/hrm_sensor/adpd_reg_write
chown system radio /sys/class/sensors/hrm_sensor/adpd_mode
chown system radio /sys/class/sensors/hrm_sensor/adpd_configuration
chown system radio /sys/class/sensors/hrm_sensor/adpd_stat
chown system radio /sys/class/sensors/hrm_sensor/alc_enable
chmod 0600 /dev/max_hrm
chown system system /dev/max_hrm
# HRMLED_sensor
chown system radio /sys/class/sensors/hrmled_sensor/name
chown system radio /sys/class/sensors/hrmled_sensor/vendor
chown system radio /sys/class/sensors/hrmled_sensor/hrmled_flush
# Grip_sensor
chown system radio /sys/class/sensors/grip_sensor/name
chown system radio /sys/class/sensors/grip_sensor/vendor
chown system radio /sys/class/sensors/grip_sensor/raw_data
chown system radio /sys/class/sensors/grip_sensor/threshold
chown system radio /sys/class/sensors/grip_sensor/calibration
chown system radio /sys/class/sensors/grip_sensor/onoff
chown system radio /sys/class/sensors/grip_sensor/reset
chown system radio /sys/class/sensors/grip_sensor/mode
chown system radio /sys/class/sensors/grip_sensor/gain
chown system radio /sys/class/sensors/grip_sensor/start
chown system radio /sys/class/sensors/grip_sensor/normal_threshold
chown system radio /sys/class/sensors/grip_sensor/gain_ch2
chown system radio /sys/class/sensors/grip_sensor/raw_data_ch2
chown system radio /sys/class/sensors/grip_sensor/diff_avg_ch2
chown system radio /sys/class/sensors/grip_sensor/normal_threshold_ch2
chown system radio /sys/class/sensors/grip_sensor/ch_state
chown system radio /sys/class/sensors/grip_sensor/body_threshold
chown system radio /sys/class/sensors/grip_sensor/grip_flush
chown system radio /sys/class/sensors/grip_sensor/irq_count
# Grip_sensor_wifi
chown system radio /sys/class/sensors/grip_sensor_wifi/name
chown system radio /sys/class/sensors/grip_sensor_wifi/vendor
chown system radio /sys/class/sensors/grip_sensor_wifi/raw_data
chown system radio /sys/class/sensors/grip_sensor_wifi/threshold
chown system radio /sys/class/sensors/grip_sensor_wifi/calibration
chown system radio /sys/class/sensors/grip_sensor_wifi/onoff
chown system radio /sys/class/sensors/grip_sensor_wifi/reset
chown system radio /sys/class/sensors/grip_sensor_wifi/mode
chown system radio /sys/class/sensors/grip_sensor_wifi/gain
chown system radio /sys/class/sensors/grip_sensor_wifi/start
chown system radio /sys/class/sensors/grip_sensor_wifi/normal_threshold
chown system radio /sys/class/sensors/grip_sensor_wifi/gain_ch2
chown system radio /sys/class/sensors/grip_sensor_wifi/raw_data_ch2
chown system radio /sys/class/sensors/grip_sensor_wifi/diff_avg_ch2
chown system radio /sys/class/sensors/grip_sensor_wifi/normal_threshold_ch2
chown system radio /sys/class/sensors/grip_sensor_wifi/ch_state
chown system radio /sys/class/sensors/grip_sensor_wifi/body_threshold
chown system radio /sys/class/sensors/grip_sensor_wifi/grip_flush
# Accelerometer Sensor
chown system radio /sys/class/sensors/accelerometer_sensor/name
chown system radio /sys/class/sensors/accelerometer_sensor/vendor
chown system radio /sys/class/sensors/accelerometer_sensor/raw_data
chown system radio /sys/class/sensors/accelerometer_sensor/calibration
chown system radio /sys/class/sensors/accelerometer_sensor/selftest
chown system radio /sys/class/sensors/accelerometer_sensor/reactive_alert
chown system radio /sys/class/sensors/accelerometer_sensor/lowpassfilter
# Gyro Sensor
chown system radio /sys/class/sensors/gyro_sensor/name
chown system radio /sys/class/sensors/gyro_sensor/vendor
chown system radio /sys/class/sensors/gyro_sensor/power_on
chown system radio /sys/class/sensors/gyro_sensor/power_off
chown system radio /sys/class/sensors/gyro_sensor/selftest
chown system radio /sys/class/sensors/gyro_sensor/temperature
# Magnetic Sensor
chown system radio /sys/class/sensors/magnetic_sensor/name
chown system radio /sys/class/sensors/magnetic_sensor/vendor
chown system radio /sys/class/sensors/magnetic_sensor/raw_data
chown system radio /sys/class/sensors/magnetic_sensor/adc
chown system radio /sys/class/sensors/magnetic_sensor/asa
chown system radio /sys/class/sensors/magnetic_sensor/dac
chown system radio /sys/class/sensors/magnetic_sensor/chk_registers
chown system radio /sys/class/sensors/magnetic_sensor/selftest
# Barometer Sensor
chown system radio /sys/class/sensors/barometer_sensor/name
chown system radio /sys/class/sensors/barometer_sensor/vendor
chown system radio /sys/class/sensors/barometer_sensor/sea_level_pressure
chown system radio /sys/class/sensors/barometer_sensor/calibration
chown system radio /sys/class/sensors/barometer_sensor/eeprom_check
chown system radio /sys/class/sensors/barometer_sensor/temperature
# Proximity Sensor
chown system radio /sys/class/sensors/proximity_sensor/name
chown system radio /sys/class/sensors/proximity_sensor/vendor
chown system radio /sys/class/sensors/proximity_sensor/state
chown system radio /sys/class/sensors/proximity_sensor/raw_data
chown system radio /sys/class/sensors/proximity_sensor/barcode_emul_en
chown system radio /sys/class/sensors/proximity_sensor/prox_avg
chown system radio /sys/class/sensors/proximity_sensor/prox_cal
chown system radio /sys/class/sensors/proximity_sensor/thresh_high
chown system radio /sys/class/sensors/proximity_sensor/thresh_low
chown system radio /sys/class/sensors/proximity_sensor/prox_offset_pass
chown system radio /sys/class/sensors/proximity_sensor/prox_trim
chown system radio /sys/class/sensors/proximity_sensor/thresh_detect_high
chown system radio /sys/class/sensors/proximity_sensor/thresh_detect_low
chown system radio /sys/class/sensors/proximity_sensor/prox_alert_thresh
# Light Sensor
chown system radio /sys/class/sensors/light_sensor/name
chown system radio /sys/class/sensors/light_sensor/vendor
chown system radio /sys/class/sensors/light_sensor/lux
chown system radio /sys/class/sensors/light_sensor/raw_data
# Hidden Hole
chown system radio /sys/class/sensors/hidden_hole/hh_ver
chown system radio /sys/class/sensors/hidden_hole/hh_write_all_data
chown system radio /sys/class/sensors/hidden_hole/hh_is_exist_efs
# MOBEAM
chown system radio /sys/class/sec/sec_barcode_emul/vendor
chown system radio /sys/class/sec/sec_barcode_emul/name
chown system radio /sys/class/sec/sec_barcode_emul/barcode_send
chown system radio /sys/class/sec/sec_barcode_emul/barcode_led_status
chown system radio /sys/class/sec/sec_barcode_emul/barcode_ver_check
# SSC CORE
chown system radio /sys/class/sensors/ssc_core/operation_mode
chown system log /sys/class/sensors/ssc_core/dumpstate
chown system radio /sys/class/sensors/ssc_core/ssc_pid
chown system radio /sys/class/sensors/ssc_core/mode
chown system system /sys/class/sensors/ssc_core/remove_sysfs
setprop debug.sensor.logging.slpi true
#Meta event
chown system radio /sys/class/sensors/sensor_dev/flush
# MSP FactoryApp
mkdir /efs/FactoryApp 0775 system system
# Permissions for Charging
mkdir /efs/Battery 0775 radio system
chown radio system /efs/Battery
chmod 0775 /efs/Battery
copy /system/vendor/firmware/battery_data.dat /efs/Battery/battery_data.dat
chmod 0400 /efs/Battery/battery_data.dat
write /sys/class/power_supply/battery/batt_update_data "/efs/Battery/battery_data.dat"
chown system radio /sys/class/power_supply/battery/batt_ext_dev_chg
chown system radio /efs/Battery/fg_full_voltage
chown system radio /sys/class/power_supply/battery/fg_full_voltage
chown system radio /sys/class/power_supply/battery/batt_self_discharging_control
chown system radio /sys/class/power_supply/battery/batt_inbat_wireless_cs100
chmod 0664 /efs/Battery/fg_full_voltage
chmod 0664 /sys/class/power_supply/battery/fg_full_voltage
chown system radio /sys/class/power_supply/battery/batt_reset_soc
chown system radio /sys/class/power_supply/battery/batt_slate_mode
chown system radio /sys/class/power_supply/battery/factory_mode
chown system radio /sys/class/power_supply/battery/siop_level
chown system radio /sys/class/power_supply/battery/siop_event
chown system radio /sys/class/power_supply/battery/wc_enable
chown system nfc /sys/class/power_supply/battery/wc_control
chown system nfc /sys/class/power_supply/battery/wc_control_cnt
chown system radio /sys/class/power_supply/battery/update
chown system radio /sys/class/power_supply/battery/batt_wdt_control
chown media sdcard_rw /sys/class/power_supply/battery/store_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/lcd
chown system radio /sys/class/power_supply/ps/status
chmod 0664 /sys/class/power_supply/battery/wc_control
chmod 0664 /sys/class/power_supply/battery/wc_control_cnt
chmod 0664 /sys/class/power_supply/ps/status
chmod 0664 /sys/class/power_supply/battery/batt_temp_table
chown system radio /sys/class/power_supply/battery/batt_temp_table
chown system radio /sys/class/power_supply/battery/batt_high_current_usb
chown system radio /sys/class/power_supply/battery/batt_inbat_voltage
chmod 0664 /sys/class/power_supply/battery/batt_high_current_usb
chown system radio /sys/class/power_supply/battery/hmt_ta_connected
chown system radio /sys/class/power_supply/battery/hmt_ta_charge
chown system radio /sys/class/power_supply/battery/battery_cycle
chown system radio /sys/class/power_supply/otg/online
chmod 0664 /sys/class/power_supply/otg/online
chown system radio /sys/class/power_supply/battery/charge_otg_control
chown system radio /sys/class/power_supply/battery/charge_uno_control
chown system radio /sys/class/power_supply/battery/batt_wireless_firmware_update
chown system radio /sys/class/power_supply/battery/otp_firmware_result
chown system radio /sys/class/power_supply/battery/wc_ic_grade
chown system radio /sys/class/power_supply/battery/otp_firmware_ver_bin
chown system radio /sys/class/power_supply/battery/otp_firmware_ver
chown system radio /sys/class/power_supply/battery/tx_firmware_result
chown system radio /sys/class/power_supply/battery/batt_tx_firmware
chown system radio /sys/class/power_supply/battery/batt_hv_wireless_status
chown system radio /sys/class/power_supply/battery/batt_hv_wireless_pad_ctrl
chmod 0664 /sys/class/power_supply/battery/charge_otg_control
chmod 0664 /sys/class/power_supply/battery/charge_uno_control
chmod 0664 /sys/class/power_supply/battery/batt_wireless_firmware_update
chmod 0664 /sys/class/power_supply/battery/otp_firmware_result
chmod 0664 /sys/class/power_supply/battery/wc_ic_grade
chmod 0664 /sys/class/power_supply/battery/otp_firmware_ver_bin
chmod 0664 /sys/class/power_supply/battery/otp_firmware_ver
chmod 0664 /sys/class/power_supply/battery/tx_firmware_result
chmod 0664 /sys/class/power_supply/battery/tx_firmware_ver
chmod 0664 /sys/class/power_supply/battery/batt_tx_firmware
chmod 0664 /sys/class/power_supply/battery/batt_hv_wireless_status
chmod 0664 /sys/class/power_supply/battery/batt_hv_wireless_pad_ctrl
chown system radio /sys/class/power_supply/battery/tx_firmware_result
chown system radio /sys/class/power_supply/battery/batt_tune_chg_limit_cur
chown system radio /sys/class/power_supply/battery/batt_tune_chg_temp_high
chown system radio /sys/class/power_supply/battery/batt_tune_chg_temp_rec
chown system radio /sys/class/power_supply/battery/batt_tune_coil_limit_cur
chown system radio /sys/class/power_supply/battery/batt_tune_coil_temp_high
chown system radio /sys/class/power_supply/battery/batt_tune_coil_temp_rec
chown system radio /sys/class/power_supply/battery/batt_tune_fast_charge_current
chown system radio /sys/class/power_supply/battery/batt_tune_float_voltage
chown system radio /sys/class/power_supply/battery/batt_tune_intput_charge_current
chown system radio /sys/class/power_supply/battery/batt_tune_temp_high_normal
chown system radio /sys/class/power_supply/battery/batt_tune_temp_high_rec_normal
chown system radio /sys/class/power_supply/battery/batt_tune_temp_low_normal
chown system radio /sys/class/power_supply/battery/batt_tune_temp_low_rec_normal
chown system radio /sys/class/power_supply/battery/batt_tune_ui_term_cur_1st
chown system radio /sys/class/power_supply/battery/batt_tune_ui_term_cur_2nd
chmod 0664 /sys/class/power_supply/battery/batt_tune_chg_limit_cur
chmod 0664 /sys/class/power_supply/battery/batt_tune_chg_temp_high
chmod 0664 /sys/class/power_supply/battery/batt_tune_chg_temp_rec
chmod 0664 /sys/class/power_supply/battery/batt_tune_coil_limit_cur
chmod 0664 /sys/class/power_supply/battery/batt_tune_coil_temp_high
chmod 0664 /sys/class/power_supply/battery/batt_tune_coil_temp_rec
chmod 0664 /sys/class/power_supply/battery/batt_tune_fast_charge_current
chmod 0664 /sys/class/power_supply/battery/batt_tune_float_voltage
chmod 0664 /sys/class/power_supply/battery/batt_tune_intput_charge_current
chmod 0664 /sys/class/power_supply/battery/batt_tune_temp_high_normal
chmod 0664 /sys/class/power_supply/battery/batt_tune_temp_high_rec_normal
chmod 0664 /sys/class/power_supply/battery/batt_tune_temp_low_normal
chmod 0664 /sys/class/power_supply/battery/batt_tune_temp_low_rec_normal
chmod 0664 /sys/class/power_supply/battery/batt_tune_ui_term_cur_1st
chmod 0664 /sys/class/power_supply/battery/batt_tune_ui_term_cur_2nd
chown system radio /sys/class/power_supply/battery/batt_filter_cfg
chown system radio /sys/class/power_supply/battery/batt_current_ua_avg
chown system radio /sys/class/power_supply/battery/batt_current_ua_now
chown system radio /sys/class/power_supply/battery/voltage_avg
chown system radio /sys/class/power_supply/battery/voltage_now
chown system radio /sys/class/power_supply/battery/mode
chmod 0664 /sys/class/power_supply/battery/mode
chown system radio /sys/class/power_supply/battery/safety_timer_set
chown system radio /sys/class/power_supply/battery/safety_timer_info
chown system radio /sys/class/power_supply/battery/wc_op_freq
chmod 0664 /sys/class/power_supply/battery/wc_op_freq
chown system radio /sys/class/power_supply/battery/wc_cmd_info
chmod 0664 /sys/class/power_supply/battery/wc_cmd_info
chown system radio /sys/class/power_supply/smb1351-charger/mode
chown system radio /sys/class/power_supply/battery/cisd_fullcaprep_max
chmod 0660 /sys/class/power_supply/battery/cisd_fullcaprep_max
chown system radio /sys/class/power_supply/battery/cisd_wire_count
chmod 0660 /sys/class/power_supply/battery/cisd_wire_count
chown system radio /sys/class/power_supply/battery/cisd_data
chmod 0660 /sys/class/power_supply/battery/cisd_data
chown system system /efs/FactoryApp/cisd_data
chmod 0640 /efs/FactoryApp/cisd_data
service wifiloader /system/bin/wifiloader
class main
oneshot

482
rootdir/etc/init.target.rc Normal file
View file

@ -0,0 +1,482 @@
# Copyright (c) 2013-2017, 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
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
#
on fs
wait /dev/block/platform/soc/${ro.boot.bootdevice}
symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice
mount_all /vendor/etc/fstab.qcom
setprop ro.crypto.fde_algorithm AES-256-XTS
mkdir /mnt/vendor/efs 0771 system radio
mkdir /mnt/vendor/persist 0771 root system
mkdir /mnt/vendor/persist/data 0700 system system
mkdir /mnt/vendor/persist/rfs 0700 system system
restorecon_recursive /mnt/vendor/efs
restorecon_recursive /mnt/vendor/persist
on post-fs
# set RLIMIT_MEMLOCK to 64MB
setrlimit 8 67108864 67108864
write /dev/ipa 1
on init
write /sys/module/qpnp_rtc/parameters/poweron_alarm 1
on late-fs
mount_all /vendor/etc/fstab.qcom --late
on post-fs-data
mkdir /persist/data/sfs 0700 system system
mkdir /persist/data/tz 0700 system system
mkdir /persist/qti_fp 0700 system system
mkdir /data/misc/dts 0770 media audio
mkdir /data/misc/seemp 0700 system system
mkdir /data/usf 0700 system system
mkdir /data/misc/audio_pp 0771 media audio
#Create folder for mm-qcamera-daemon
mkdir /data/vendor/camera 0770 camera camera
on property:init.svc.bootanim=running
write /sys/class/leds/wled/brightness 4095
##### added by init.qcom.early_boot.sh (booting performance team)#####
on early-boot
# Setup display nodes & permissions
chown system graphics /sys/class/graphics/fb1/hpd
chown system graphics /sys/class/graphics/fb1/res_info
chown system graphics /sys/class/graphics/fb1/vendor_name
chown system graphics /sys/class/graphics/fb1/product_description
chown system graphics /sys/class/graphics/fb1/video_mode
chown system graphics /sys/class/graphics/fb1/format_3d
chown system graphics /sys/class/graphics/fb1/s3d_mode
chown system graphics /sys/class/graphics/fb1/dynamic_fps
chown system graphics /sys/class/graphics/fb1/msm_fb_dfps_mode
chown system graphics /sys/class/graphics/fb1/hdr_stream
chown system graphics /sys/class/graphics/fb1/cec/enable
chown system graphics /sys/class/graphics/fb1/cec/logical_addr
chown system graphics /sys/class/graphics/fb1/cec/rd_msg
chown system graphics /sys/class/graphics/fb1/pa
chown system graphics /sys/class/graphics/fb1/cec/wr_msg
chown system graphics /sys/class/graphics/fb1/hdcp/tp
chown system graphics /sys/class/graphics/fb1/pll_enable
chown system graphics /sys/class/graphics/fb1/hdmi_ppm
chown audioserver audio /sys/class/graphics/fb1/hdmi_audio_cb
chown system graphics /sys/devices/virtual/hdcp/msm_hdcp/min_level_change
chmod 0664 /sys/class/graphics/fb1/hpd
chmod 0664 /sys/class/graphics/fb1/res_info
chmod 0664 /sys/class/graphics/fb1/vendor_name
chmod 0664 /sys/class/graphics/fb1/product_description
chmod 0664 /sys/class/graphics/fb1/video_mode
chmod 0664 /sys/class/graphics/fb1/format_3d
chmod 0664 /sys/class/graphics/fb1/s3d_mode
chmod 0664 /sys/class/graphics/fb1/dynamic_fps
chmod 0664 /sys/class/graphics/fb1/msm_fb_dfps_mode
chmod 0664 /sys/class/graphics/fb1/hdr_stream
chmod 0664 /sys/class/graphics/fb1/cec/enable
chmod 0664 /sys/class/graphics/fb1/cec/logical_addr
chmod 0664 /sys/class/graphics/fb1/cec/rd_msg
chmod 0664 /sys/class/graphics/fb1/pa
chmod 0600 /sys/class/graphics/fb1/cec/wr_msg
chmod 0664 /sys/class/graphics/fb1/hdcp/tp
chmod 0664 /sys/class/graphics/fb1/pll_enable
chmod 0664 /sys/class/graphics/fb1/hdmi_ppm
chmod 0600 /sys/class/graphics/fb1/hdmi_audio_cb
chmod 0660 /sys/devices/virtual/hdcp/msm_hdcp/min_level_change
symlink /dev/graphics/fb1 /devices/virtual/switch/hdmi
# Set permissions "/sys/class/graphics/fb0"
chown system graphics /sys/class/graphics/fb0/idle_time
chown system graphics /sys/class/graphics/fb0/dynamic_fps
chown system graphics /sys/class/graphics/fb0/dyn_pu
chown system graphics /sys/class/graphics/fb0/modes
chown system graphics /sys/class/graphics/fb0/mode
# chown system graphics /sys/class/graphics/fb0/msm_cmd_autorefresh_en
chmod 0664 /sys/class/graphics/fb0/idle_time
chmod 0664 /sys/class/graphics/fb0/dynamic_fps
chmod 0664 /sys/class/graphics/fb0/dyn_pu
chmod 0664 /sys/class/graphics/fb0/modes
chmod 0664 /sys/class/graphics/fb0/mode
# chmod 0664 /sys/class/graphics/fb0/msm_cmd_autorefresh_en
# Set lineptr permissions for all displays
chown system graphics /sys/class/graphics/fb0/lineptr_value
chown system graphics /sys/class/graphics/fb1/lineptr_value
chown system graphics /sys/class/graphics/fb2/lineptr_value
chown system graphics /sys/class/graphics/fb3/lineptr_value
chmod 0664 /sys/class/graphics/fb0/lineptr_value
chmod 0664 /sys/class/graphics/fb1/lineptr_value
chmod 0664 /sys/class/graphics/fb2/lineptr_value
chmod 0664 /sys/class/graphics/fb3/lineptr_value
chown system graphics /sys/class/graphics/fb0/msm_fb_persist_mode
chown system graphics /sys/class/graphics/fb1/msm_fb_persist_mode
chown system graphics /sys/class/graphics/fb2/msm_fb_persist_mode
chown system graphics /sys/class/graphics/fb3/msm_fb_persist_mode
chmod 0664 /sys/class/graphics/fb0/msm_fb_persist_mode
chmod 0664 /sys/class/graphics/fb1/msm_fb_persist_mode
chmod 0664 /sys/class/graphics/fb2/msm_fb_persist_mode
chmod 0664 /sys/class/graphics/fb3/msm_fb_persist_mode
##### added by init.qcom.early_boot.sh (booting performance team)#####
on boot
start rmt_storage
start rfs_access
# access permission for secure touch
chmod 0660 /sys/devices/soc/75ba000.i2c/i2c-12/12-004a/secure_touch_enable
chmod 0440 /sys/devices/soc/75ba000.i2c/i2c-12/12-004a/secure_touch
chown system drmrpc /sys/devices/soc/75ba000.i2c/i2c-12/12-004a/secure_touch_enable
chown system drmrpc /sys/devices/soc/75ba000.i2c/i2c-12/12-004a/secure_touch
write /sys/devices/soc/75ba000.i2c/i2c-12/12-0020/input/input0/update_fw 1
#USB controller configuration
write /sys/module/g_android/parameters/mtp_tx_req_len 131072
write /sys/module/g_android/parameters/mtp_rx_req_len 131072
write /sys/class/android_usb/android0/f_rndis_qc/rndis_transports BAM2BAM_IPA
#start camera server as daemon
service qcamerasvr /system/vendor/bin/mm-qcamera-daemon
class late_start
user camera
group camera system inet input graphics
#fingerprint service
service fingerprintd /system/vendor/bin/fingerprintd
class late_start
user system
group system
service qfp-daemon /system/vendor/bin/qfp-daemon
class late_start
user system
group system drmrpc diag input
service fps_hal /system/vendor/bin/fingerprint.qcom
class late_start
user system
group system input
#Start up peripheral manager
service per_mgr /vendor/bin/pm-service
class core
user system
group system net_raw
ioprio rt 4
service per_proxy /vendor/bin/pm-proxy
class core
user system
group system
disabled
on property:init.svc.per_mgr=running
start per_proxy
on property:sys.shutdown.requested=*
stop per_proxy
stop vendor.ims_rtp_daemon
service mdm_launcher /system/bin/sh init.mdm.sh
class core
oneshot
service mdm_helper /system/bin/mdm_helper
class core
group root system
disabled
#service qrngd /system/bin/qrngd -f
# class main
# user root
# group root
#
#service qrngp /system/bin/qrngp
# class main
# user root
# group root
# oneshot
# disabled
#
#on property:sys.boot_completed=1
# start qrngp
service qseecomd /vendor/bin/qseecomd
class core
user root
group root
service gamed /system/vendor/bin/gamed
class main
user system
group system
disabled
socket gamed seqpacket 0640 system system
service seempd /system/vendor/bin/seempd
class late_start
user system
group system
socket seempdw dgram 0666 system system
service secotad /system/vendor/bin/secotad
class late_start
user system
group system
#service mpdecision /system/vendor/bin/mpdecision --avg_comp
# user root
# disabled
#
#service qosmgrd /system/bin/qosmgr /system/etc/qosmgr_rules.xml
# user system
# group system
# disabled
#
service thermal-engine /system/vendor/bin/thermal-engine
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
socket thermal-send-rule stream 0660 system system
group root
#service security-check1 /sbin/security_boot_check system
# class core
# oneshot
#
#service security-check2 /sbin/security_boot_check recovery
# class core
# oneshot
#
service time_daemon /system/vendor/bin/time_daemon
class late_start
user root
group root
service adsprpcd /system/vendor/bin/adsprpcd
class main
user media
group media
service audiod /system/vendor/bin/audiod
class late_start
user system
group system
service usf_tester /system/vendor/bin/usf_tester
user system
group system inet
disabled
oneshot
service usf_epos /system/vendor/bin/usf_epos
class main
user system
group system inet
disabled
oneshot
service usf_gesture /system/vendor/bin/usf_gesture
user system
group system inet
disabled
oneshot
service usf_sync_gesture /system/vendor/bin/usf_sync_gesture
user system
group system inet audio
disabled
oneshot
service usf_p2p /system/vendor/bin/usf_p2p
user system
group system inet
disabled
oneshot
service usf_hovering /system/vendor/bin/usf_hovering
user system
group system inet
disabled
oneshot
service usf_proximity /system/vendor/bin/usf_proximity
class late_start
user system
group system inet audio
service usf_pairing /system/vendor/bin/usf_pairing
user system
group system inet
disabled
oneshot
service usf_sw_calib /system/vendor/bin/usf_sw_calib
user system
group system inet
disabled
oneshot
service usf-post-boot /system/vendor/bin/sh /system/etc/usf_post_boot.sh
class late_start
user root
disabled
oneshot
on property:init.svc.bootanim=stopped
start usf-post-boot
## imsdatadaemon starts with root and UID will be downgraded to SYSTEM.
service vendor.imsqmidaemon /system/vendor/bin/imsqmidaemon
class main
user system
socket ims_qmid stream 0660 system radio
group radio log diag
# imsdatadaemon starts with root and UID will be downgraded to SYSTEM.
service vendor.imsdatadaemon /system/vendor/bin/imsdatadaemon
class main
user system
socket ims_datad stream 0660 system radio
group system wifi radio inet log diag
disabled
service pd_mapper /system/vendor/bin/pd-mapper
class core
disabled
on property:persist.sys.pd_enable=1
start pd_mapper
write /sys/class/service_locator/service_locator_status 1
on property:persist.sys.pd_enable=0
write /sys/class/service_locator/service_locator_status 0
#
## QCA1530 SoC late_start group trigger
#service gnss-init /system/vendor/bin/gnss.qca1530.sh init
# class late_start
# oneshot
#
on property:vendor.ims.QMI_DAEMON_STATUS=1
start vendor.imsdatadaemon
service vendor.ims_rtp_daemon /system/vendor/bin/ims_rtp_daemon
class main
user system
group radio diag inet log
service vendor.imsrcsservice /system/vendor/bin/imsrcsd
class main
user system
group radio diag inet log wakelock
on property:vendor.ims.DATA_DAEMON_STATUS=1
restart vendor.ims_rtp_daemon
service dts_configurator /system/vendor/bin/dts_configurator
class late_start
user system
group system media audio
oneshot
service dtseagleservice /system/vendor/bin/dts_eagle_service
class late_start
user system
group audio media
disabled
on property:init.svc.dts_configurator=stopped
start dtseagleservice
on property:init.svc.surfaceflinger=stopped
stop ppd
on property:init.svc.surfaceflinger=running
start ppd
on property:init.svc.surfaceflinger=restarting
stop ppd
on property:init.svc.zygote=stopped
stop ppd
on property:init.svc.zygote=running
start ppd
on property:init.svc.zygote=restarting
stop ppd
service energy-awareness /system/vendor/bin/energy-awareness
class main
user root
group system
oneshot
service vendor.hvdcp_opti /system/vendor/bin/hvdcp_opti
class main
user root
group system wakelock
service mdtpd /system/vendor/bin/mdtpd
class late_start
user root
group system radio drmrpc
service dhcpcd_eth0 /system/vendor/bin/dhcpcd -ABKLG
class late_start
disabled
oneshot
service iprenew_eth0 /system/vendor/bin/dhcpcd -n
class late_start
disabled
oneshot
service ppd /vendor/bin/mm-pp-dpps
class late_start
user system
group system graphics
socket pps stream 0660 system system
disabled
service vendor.contexthub-hal-1-0 /vendor/bin/hw/android.hardware.contexthub@1.0-service
override
class hal
interface android.hardware.contexthub@1.0::IContexthub default
user system
group system
disabled

144
rootdir/etc/ueventd.qcom.rc Executable file → Normal file
View file

@ -1,4 +1,4 @@
# Copyright (c) 2012-2015, 2017, The Linux Foundation. All rights reserved. # Copyright (c) 2012-2015, 2017-2018, The Linux Foundation. All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met: # modification, are permitted provided that the following conditions are met:
@ -25,6 +25,11 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# #
# Firmware directory Path
# Below macro will be read by uevent and path will
# be added to search path for firmware loading
firmware_directories /vendor/firmware_mnt/image/
# the DIAG device node is not world writable/readable. # the DIAG device node is not world writable/readable.
/dev/diag 0660 system oem_2901 /dev/diag 0660 system oem_2901
@ -35,7 +40,7 @@
/dev/kgsl-2d0 0666 root root /dev/kgsl-2d0 0666 root root
/dev/kgsl-2d1 0666 root root /dev/kgsl-2d1 0666 root root
/dev/ion 0664 system system /dev/ion 0664 system system
/dev/rtc0 0640 system system /dev/rtc0 0660 system system
/dev/smd0 0660 system system /dev/smd0 0660 system system
/dev/smd4 0660 system system /dev/smd4 0660 system system
/dev/smd_cxm_qmi 0640 radio radio /dev/smd_cxm_qmi 0640 radio radio
@ -48,6 +53,8 @@
/dev/ipaNatTable 0660 radio radio /dev/ipaNatTable 0660 radio radio
/dev/rmnet_ctrl 0660 usb usb /dev/rmnet_ctrl 0660 usb usb
/dev/dpl_ctrl 0660 usb usb /dev/dpl_ctrl 0660 usb usb
/dev/ipa_odl_ctl 0660 radio radio
/dev/ipa_adpl 0660 system oem_2905
#permissions for CSVT #permissions for CSVT
/dev/smd11 0660 radio radio /dev/smd11 0660 radio radio
@ -109,15 +116,16 @@
/dev/hsicctl14 0640 radio radio /dev/hsicctl14 0640 radio radio
/dev/hsicctl15 0640 radio radio /dev/hsicctl15 0640 radio radio
/dev/hsicctl16 0640 radio radio /dev/hsicctl16 0640 radio radio
/dev/mhi_pipe_14 0640 radio radio /dev/mhi_*_pipe_14 0640 radio radio
/dev/mhi_pipe_16 0640 radio radio /dev/mhi_*_pipe_16 0640 radio radio
/dev/mhi_pipe_32 0640 radio radio /dev/mhi_*_pipe_32 0640 radio radio
/dev/at_usb0 0640 radio radio /dev/at_usb0 0640 radio radio
/dev/at_mdm0 0640 radio radio /dev/at_mdm0 0640 radio radio
/dev/video* 0660 system camera /dev/video* 0660 system camera
/dev/media* 0660 system camera /dev/media* 0660 system camera
/dev/v4l-subdev* 0660 system camera /dev/v4l-subdev* 0660 system camera
/dev/qseecom 0660 system drmrpc /dev/qseecom 0660 system drmrpc
/dev/qce 0660 system drmrpc
/dev/smcinvoke 0660 system system /dev/smcinvoke 0660 system system
/dev/qsee_ipc_irq_spss 0660 system drmrpc /dev/qsee_ipc_irq_spss 0660 system drmrpc
/dev/seemplog 0660 system system /dev/seemplog 0660 system system
@ -126,15 +134,24 @@
/dev/sp_kernel 0660 system system /dev/sp_kernel 0660 system system
/dev/sp_ssr 0660 system system /dev/sp_ssr 0660 system system
/dev/sp_keymaster 0660 system system /dev/sp_keymaster 0660 system system
/dev/sec_nvm_* 0660 system system
/dev/cryptoapp 0660 system system /dev/cryptoapp 0660 system system
/dev/spdaemon_ssr 0660 system system
/dev/gemini0 0660 system camera /dev/gemini0 0660 system camera
/dev/jpeg0 0660 system camera /dev/jpeg0 0660 system camera
/dev/jpeg1 0660 system camera /dev/jpeg1 0660 system camera
/dev/jpeg2 0660 system camera /dev/jpeg2 0660 system camera
/dev/jpeg3 0660 system camera /dev/jpeg3 0660 system camera
/dev/adsprpc-smd 0664 system system /dev/adsprpc-smd 0664 system system
/dev/adsprpc-smd-secure 0644 system system
/dev/system_health_monitor 0644 radio system /dev/system_health_monitor 0644 radio system
/dev/mdss_rotator 0664 system system /dev/mdss_rotator 0664 system system
#QDSS
/dev/byte-cntr 0660 system oem_2902
/dev/mhi_qdss 0660 system oem_2902
/sys/class/qdss_bridge/mhi_qdss mode 0660 system oem_2902
# wlan # wlan
/dev/wcnss_wlan 0660 system system /dev/wcnss_wlan 0660 system system
/dev/wcnss_ctrl 0660 system system /dev/wcnss_ctrl 0660 system system
@ -149,7 +166,6 @@
/dev/msm_vidc_dec_sec 0660 system audio /dev/msm_vidc_dec_sec 0660 system audio
/dev/msm_vidc_enc 0660 system audio /dev/msm_vidc_enc 0660 system audio
/dev/msm_rotator 0660 system system /dev/msm_rotator 0660 system system
/dev/hw_random 0600 root root
/dev/sdsprpc-smd 0660 system system /dev/sdsprpc-smd 0660 system system
#permissions for audio #permissions for audio
@ -192,6 +208,7 @@
/dev/ttyGS0 0660 system system /dev/ttyGS0 0660 system system
/dev/i2c-5 0660 media media /dev/i2c-5 0660 media media
/dev/avtimer 0660 system audio /dev/avtimer 0660 system audio
/dev/spidev2.0 0660 system audio
# DVB devices # DVB devices
/dev/dvb/adapter0/demux* 0440 media media /dev/dvb/adapter0/demux* 0440 media media
@ -233,6 +250,29 @@
/sys/devices/soc/78b7000.i2c/i2c-3/3-004b/input/input* secure_touch_enable 0660 system drmrpc /sys/devices/soc/78b7000.i2c/i2c-3/3-004b/input/input* secure_touch_enable 0660 system drmrpc
/sys/devices/soc/c179000.i2c/i2c-5/5-0020/input/input* secure_touch 0440 system drmrpc /sys/devices/soc/c179000.i2c/i2c-5/5-0020/input/input* secure_touch 0440 system drmrpc
/sys/devices/soc/c179000.i2c/i2c-5/5-0020/input/input* secure_touch_enable 0660 system drmrpc /sys/devices/soc/c179000.i2c/i2c-5/5-0020/input/input* secure_touch_enable 0660 system drmrpc
/sys/devices/platform/soc/a98000.i2c/i2c-2/2-0020/input/input* secure_touch 0440 system drmrpc
/sys/devices/platform/soc/a98000.i2c/i2c-2/2-0020/input/input* secure_touch_enable 0660 system drmrpc
/sys/devices/platform/soc/a84000.i2c/i2c-2/2-0020/input/input* secure_touch 0440 system drmrpc
/sys/devices/platform/soc/a84000.i2c/i2c-2/2-0020/input/input* secure_touch_enable 0660 system drmrpc
# native sensors input
/sys/devices/virtual/input/input* enable_int 0660 system input
/sys/devices/virtual/input/input* gyro_op_mode 0660 system input
/sys/devices/virtual/input/input* acc_range 0660 system input
/sys/devices/virtual/input/input* acc_value 0660 system input
/sys/devices/virtual/input/input* gyro_odr 0660 system input
/sys/devices/virtual/input/input* fifo_data_sel 0660 system input
/sys/devices/virtual/input/input* fifo_watermark 0660 system input
/sys/devices/virtual/input/input* enable 0660 system input
/sys/devices/virtual/input/input* acc_odr 0660 system input
/sys/devices/virtual/input/input* temperature 0660 system input
/sys/devices/virtual/input/input* acc_op_mode 0660 system input
/sys/devices/virtual/input/input* fifo_bytecount 0660 system input
/sys/devices/virtual/input/input* gyro_range 0660 system input
/sys/devices/virtual/input/input* gyro_value 0660 system input
# GNSS PPS Device premissions
/dev/pps* 0660 gps gps
# laser sensor access # laser sensor access
/sys/devices/virtual/input/input* enable_ps_sensor 0660 system input /sys/devices/virtual/input/input* enable_ps_sensor 0660 system input
@ -252,6 +292,7 @@
# wigig # wigig
/sys/bus/pci/drivers/wil6210* 0000:01:00.0/wil6210/fst_link_loss 0660 wifi wifi /sys/bus/pci/drivers/wil6210* 0000:01:00.0/wil6210/fst_link_loss 0660 wifi wifi
/sys/bus/pci/drivers/wil6210* 0000:01:00.0/wil6210/thermal_throttling 0660 system system /sys/bus/pci/drivers/wil6210* 0000:01:00.0/wil6210/thermal_throttling 0660 system system
/sys/bus/pci/drivers/wil6210* 0000:01:00.0/wil6210/snr_thresh 0660 wifi wifi
/sys/bus/pci/drivers/wil6210* 0000:01:00.0/net/wigig0/queues/rx-0/rps_cpus 0660 system system /sys/bus/pci/drivers/wil6210* 0000:01:00.0/net/wigig0/queues/rx-0/rps_cpus 0660 system system
/sys/bus/pci/drivers/wil6210* 0000:01:00.0/net/wigig0/gro_flush_timeout 0660 system system /sys/bus/pci/drivers/wil6210* 0000:01:00.0/net/wigig0/gro_flush_timeout 0660 system system
/sys/devices/virtual/net/bond0 queues/rx-0/rps_cpus 0660 system system /sys/devices/virtual/net/bond0 queues/rx-0/rps_cpus 0660 system system
@ -278,10 +319,6 @@
# Fingerprint device # Fingerprint device
/dev/qbt1000 0660 system system /dev/qbt1000 0660 system system
# Fingerprint Sensor
/dev/vfsspi 0660 system system
/dev/esfp0 0660 system system
#ImproveTouch device #ImproveTouch device
/dev/hbtp_input 0660 system system /dev/hbtp_input 0660 system system
/dev/hbtp_vm 0660 system system /dev/hbtp_vm 0660 system system
@ -293,22 +330,81 @@
/dev/block/platform/soc/1da4000.ufshc/by-name/frp 0600 system system /dev/block/platform/soc/1da4000.ufshc/by-name/frp 0600 system system
/dev/block/platform/soc/c0c4000.sdhci/by-name/frp 0600 system system /dev/block/platform/soc/c0c4000.sdhci/by-name/frp 0600 system system
/dev/block/platform/soc/1d84000.ufshc/by-name/frp 0600 system system /dev/block/platform/soc/1d84000.ufshc/by-name/frp 0600 system system
/dev/block/platform/soc/7c4000.sdhci/by-name/frp 0600 system system
# This is temporary while using SD card for initial bring-up
/dev/block/platform/soc/8804000.sdhci/by-name/frp 0600 system system
# Kmsg device # Kmsg device
/dev/kmsg 0620 root system /dev/kmsg 0620 root system
# LED class devices
/sys/class/leds/red delay_on 0640 system system
/sys/class/leds/red delay_off 0640 system system
/sys/class/leds/red breath 0640 system system
/sys/class/leds/green delay_on 0640 system system
/sys/class/leds/green delay_off 0640 system system
/sys/class/leds/green breath 0640 system system
/sys/class/leds/blue delay_on 0640 system system
/sys/class/leds/blue delay_off 0640 system system
/sys/class/leds/blue breath 0640 system system
# NPU device
/dev/msm_npu 0644 system system
# USB role switch
/sys/class/dual_role_usb/* data_role 0660 system system
/sys/class/dual_role_usb/* power_role 0660 system system
/sys/class/dual_role_usb/* mode 0660 system system
#Memory Offline
/sys/devices/system/memory/memory* state 0660 system system
# sys-fs display
/sys/class/graphics/fb* hpd 0664 system graphics
/sys/class/graphics/fb* res_info 0664 system graphics
/sys/class/graphics/fb* vendor_name 0664 system graphics
/sys/class/graphics/fb* product_description 0664 system graphics
/sys/class/graphics/fb* video_mode 0664 system graphics
/sys/class/graphics/fb* format_3d 0664 system graphics
/sys/class/graphics/fb* s3d_mode 0664 system graphics
/sys/class/graphics/fb* dynamic_fps 0664 system graphics
/sys/class/graphics/fb* msm_fb_dfps_mode 0664 system graphics
/sys/class/graphics/fb* hdr_stream 0664 system graphics
/sys/class/graphics/fb* cec/enable 0664 system graphics
/sys/class/graphics/fb* cec/logical_addr 0664 system graphics
/sys/class/graphics/fb* cec/rd_msg 0664 system graphics
/sys/class/graphics/fb* pa 0664 system graphics
/sys/class/graphics/fb* cec/wr_msg 0600 system graphics
/sys/class/graphics/fb* hdcp/tp 0664 system graphics
/sys/class/graphics/fb* hdcp2p2/min_level_change 0660 system graphics
/sys/class/graphics/fb* hdmi_audio_cb 0600 audioserver audio
/sys/class/graphics/fb* lineptr_value 0664 system graphics
/sys/class/graphics/fb* msm_fb_persist_mode 0664 system graphics
/sys/class/graphics/fb0 idle_time 0664 system graphics
/sys/class/graphics/fb0 dynamic_fps 0664 system graphics
/sys/class/graphics/fb0 dyn_pu 0664 system graphics
/sys/class/graphics/fb0 modes 0664 system graphics
/sys/class/graphics/fb0 mode 0664 system graphics
/sys/class/graphics/fb0 msm_cmd_autorefresh_en 0664 system graphics
/sys/class/graphics/fb0 dynamic_bitclk 0664 system graphics
/sys/devices/virtual/hdcp/msm_hdcp min_level_change 0664 system graphics
# interactive governor parameters # interactive governor parameters
/sys/devices/system/cpu/cpu* cpufreq/interactive/timer_rate 0660 system system /sys/devices/system/cpu/cpu* cpufreq/interactive/above_hispeed_delay 0664 system system
/sys/devices/system/cpu/cpu* cpufreq/interactive/min_sample_time 0660 system system /sys/devices/system/cpu/cpu* cpufreq/interactive/fast_ramp_down 0664 system system
/sys/devices/system/cpu/cpu* cpufreq/interactive/hispeed_freq 0660 system system /sys/devices/system/cpu/cpu* cpufreq/interactive/go_hispeed_load 0664 system system
/sys/devices/system/cpu/cpu* cpufreq/interactive/target_loads 0660 system system /sys/devices/system/cpu/cpu* cpufreq/interactive/hispeed_freq 0664 system system
/sys/devices/system/cpu/cpu* cpufreq/interactive/go_hispeed_load 0660 system system /sys/devices/system/cpu/cpu* cpufreq/interactive/ignore_hispeed_on_notif 0664 system system
/sys/devices/system/cpu/cpu* cpufreq/interactive/above_hispeed_delay 0660 system system /sys/devices/system/cpu/cpu* cpufreq/interactive/io_is_busy 0664 system system
/sys/devices/system/cpu/cpu* cpufreq/interactive/io_is_busy 0660 system system /sys/devices/system/cpu/cpu* cpufreq/interactive/max_freq_hysteresis 0664 system system
/sys/devices/system/cpu/cpu* cpufreq/interactive/fast_ramp_down 0660 system system /sys/devices/system/cpu/cpu* cpufreq/interactive/min_sample_time 0664 system system
/sys/devices/system/cpu/cpu* cpufreq/interactive/ignore_hispeed_on_notif 0660 system system /sys/devices/system/cpu/cpu* cpufreq/interactive/mode 0664 system system
/sys/devices/system/cpu/cpu* cpufreq/interactive/max_freq_hysteresis 0660 system system /sys/devices/system/cpu/cpu* cpufreq/interactive/param_index 0664 system system
/sys/devices/system/cpu/cpu* cpufreq/interactive/mode 0660 system system /sys/devices/system/cpu/cpu* cpufreq/interactive/target_loads 0664 system system
/sys/devices/system/cpu/cpu* cpufreq/interactive/param_index 0660 system system /sys/devices/system/cpu/cpu* cpufreq/interactive/timer_rate 0664 system system
/sys/devices/system/cpu/cpu* cpufreq/interactive/use_migration_notif 0660 system system /sys/devices/system/cpu/cpu* cpufreq/interactive/use_migration_notif 0664 system system
/sys/devices/system/cpu/cpu* cpufreq/interactive/use_sched_load 0660 system system /sys/devices/system/cpu/cpu* cpufreq/interactive/use_sched_load 0664 system system

33
rootdir/etc/wifi_qcom.rc Normal file
View file

@ -0,0 +1,33 @@
on post-fs-data
# for fwpath
chmod 0666 /sys/module/wlan/parameters/fwpath
chown wifi root /sys/wifi/wifiver
chmod 0660 /sys/wifi/wifiver
chown wifi root /sys/wifi/softap
chmod 0660 /sys/wifi/softap
# for WIFI Antenna
write /data/vendor/conn/.wificable.info E
chown system root /data/vendor/conn/.wificable.info
chmod 0666 /data/vendor/conn/.wificable.info
chown wifi root /sys/wifi/wificable
chmod 0664 /sys/wifi/wificable
# for WIFI TRP/TIS
chown wifi root /data/vendor/conn/.psm.info
chmod 0664 /data/vendor/conn/.psm.info
chown wifi root /sys/wifi/pm
chmod 0660 /sys/wifi/pm
# for WIFI Antenna Selection
chown wifi root /data/vendor/conn/.ant.info
chmod 0664 /data/vendor/conn/.ant.info
on boot
# for wlan FTM app
service ftm_ptt /system/bin/ftm_ptt -d
user root
group radio system
disabled

50
rootdir/etc/wifi_sec.rc Normal file
View file

@ -0,0 +1,50 @@
# Wi-Fi init file
on post-fs-data
mkdir /data/vendor/conn 0771 wifi root
mkdir /data/vendor/wifi 0771 wifi wifi
mkdir /data/vendor/wifi/wpa 0770 wifi wifi
mkdir /data/vendor/wifi/wpa/sockets 0770 wifi wifi
mkdir /data/vendor/log/wifi 0770 wifi system
# for WIFI TRP/TIS
chown wifi root /data/vendor/conn/.psm.info
chmod 0660 /data/vendor/conn/.psm.info
# for WIFI Antenna Selection
chown wifi root /data/vendor/conn/.ant.info
chmod 0660 /data/vendor/conn/.ant.info
# for WIFI Version
chown wifi root /data/vendor/conn/.wifiver.info
chmod 0664 /data/vendor/conn/.wifiver.info
# for WIFI MEMDUMP
# The default value of below memdump file is set in SecProductFeature
#write /data/vendor/conn/.memdump.info 2
chown wifi root /data/vendor/conn/.memdump.info
chmod 0660 /data/vendor/conn/.memdump.info
# for WIFI hotspot
chown wifi root /data/vendor/conn/.softap.info
chmod 0664 /data/vendor/conn/.softap.info
chown system wifi /vendor/etc/wifi/indoorchannel.info
chmod 0664 /vendor/etc/wifi/indoorchannel.info
# for WIFI MAC
chown wifi root /sys/wifi/mac_addr
chmod 0660 /sys/wifi/mac_addr
on boot
setprop wifi.interface wlan0
# start for WiFi MFG (TestMode)
service mfgloader /system/vendor/bin/hw/mfgloader
class main
disabled
oneshot
service macloader /system/vendor/bin/hw/macloader
class main
oneshot
# end of WiFi MFG (TestMode)