sanders: rootdir: add sensors init script from LA.UM.7.6.2.r1-03200-89xx.0

This commit is contained in:
therootlord
2018-09-25 14:03:31 -03:00
parent 361be56624
commit 070727ce81
5 changed files with 82 additions and 6 deletions

View File

@@ -326,6 +326,7 @@ PRODUCT_PACKAGES += \
init.mmi.rc \
init.mmi.usb.rc \
init.qcom.rc \
init.qcom.sensors.sh
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/rootdir/etc/ueventd.qcom.rc:$(TARGET_COPY_OUT_VENDOR)/ueventd.rc

View File

@@ -42,6 +42,14 @@ LOCAL_SRC_FILES := etc/init.qcom.ril.sh
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES)
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := init.qcom.sensors.sh
LOCAL_MODULE_TAGS := optional eng
LOCAL_MODULE_CLASS := EXECUTABLES
LOCAL_SRC_FILES := etc/init.qcom.sensors.sh
LOCAL_VENDOR_MODULE := true
include $(BUILD_PREBUILT)
# Init scripts
include $(CLEAR_VARS)
LOCAL_MODULE := fstab.qcom

View File

@@ -280,12 +280,6 @@ service vendor.mmi-boot-sh /vendor/bin/sh /vendor/bin/init.mmi.boot.sh
oneshot
disabled
# Sanders uses qti sensor service
service vendor.sensors.qti /vendor/bin/sensors.qti
class core
user root
group root
service vendor.charge_only_mode /vendor/bin/charge_only_mode
user root
group graphics system input

View File

@@ -84,6 +84,24 @@ on early-boot
# Motorola uses external sensorhub, do not boot the slpi
# write /sys/kernel/boot_slpi/boot 1
# for backward compatibility
chown system system /persist/sensors
chown system system /persist/sensors/registry
chown system system /persist/sensors/registry/registry
chown system system /persist/sensors/registry/registry/sensors_registry
chown system system /persist/sensors/sensors_settings
chown system system /persist/sensors/registry/config
chmod 0664 /persist/sensors/sensors_settings
chown system system /mnt/vendor/persist/sensors
chown system system /mnt/vendor/persist/sensors/registry
chown system system /mnt/vendor/persist/sensors/registry/registry
chown system system /mnt/vendor/persist/sensors/registry/registry/sensors_registry
chown system system /mnt/vendor/persist/sensors/sensors_settings
chown system system /mnt/vendor/persist/sensors/registry/sns_reg_config
chown system system /mnt/vendor/persist/sensors/registry/config
chmod 0664 /mnt/vendor/persist/sensors/sensors_settings
on boot
# access permission for secure touch
chmod 0660 /sys/devices/soc/78b7000.i2c/i2c-3/3-0020/input/input0/secure_touch_enable
@@ -685,6 +703,12 @@ service vendor.qti /vendor/bin/qti
group radio net_raw oem_2950 usb net_admin
writepid /dev/cpuset/system-background/tasks
service vendor.sensors.qti /vendor/bin/sensors.qti
class core
user system
group system
disabled
on property:ro.use_data_netmgrd=false
# netmgr not supported on specific target
stop vendor.netmgrd
@@ -823,6 +847,11 @@ on property:crypto.driver.load=1
insmod /vendor/lib/modules/qce.ko
insmod /vendor/lib/modules/qcedev.ko
service vendor-sensor-sh /vendor/bin/init.qcom.sensors.sh
class core
user root
oneshot
service atfwd /vendor/bin/ATFWD-daemon
class late_start
user system

View File

@@ -0,0 +1,44 @@
#!/vendor/bin/sh
# Copyright (c) 2015, 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()
{
chmod -h 664 /persist/sensors/sensors_settings
chown -h -R system.system /persist/sensors
start vendor.sensors.qti
# Only for SLPI
if [ -c /dev/msm_dsps -o -c /dev/sensors ]; then
start vendor.sensors
fi
}
start_sensors