439 lines
15 KiB
Plaintext
Executable File
439 lines
15 KiB
Plaintext
Executable File
# Copyright (c) 2012, The Linux Foundation. All rights reserved.
|
|
#
|
|
# Redistribution and use in source and binary forms, with or without
|
|
# modification, are permitted provided that the following conditions are
|
|
# met:
|
|
# * Redistributions of source code must retain the above copyright
|
|
# notice, this list of conditions and the following disclaimer.
|
|
# * Redistributions in binary form must reproduce the above
|
|
# copyright notice, this list of conditions and the following
|
|
# disclaimer in the documentation and/or other materials provided
|
|
# with the distribution.
|
|
# * Neither the name of The Linux Foundation nor the names of its
|
|
# contributors may be used to endorse or promote products derived
|
|
# from this software without specific prior written permission.
|
|
#
|
|
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
|
|
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
|
|
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
|
|
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
|
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
|
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
|
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
|
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
#
|
|
#
|
|
|
|
import init.mdm.rc
|
|
|
|
on early-init
|
|
mkdir /firmware 0771 system system
|
|
symlink /data/tombstones /tombstones
|
|
mount debugfs debugfs /sys/kernel/debug
|
|
|
|
#on init
|
|
# This is no longer supported from KK release.
|
|
#export BOOTCLASSPATH ${BOOTCLASSPATH}:/system/framework/WfdCommon.jar:/system/framework/qcmediaplayer.jar
|
|
on fs
|
|
mount_all fstab.qcom
|
|
|
|
# Keeping following partitions outside fstab file. As user may not have
|
|
# these partition flashed on the device. Failure to mount any partition in fstab file
|
|
# results in failure to launch late-start class.
|
|
|
|
wait /dev/block/platform/msm_sdcc.1/by-name/cache
|
|
check_fs /dev/block/platform/msm_sdcc.1/by-name/cache ext4
|
|
mount ext4 /dev/block/platform/msm_sdcc.1/by-name/cache /cache nosuid nodev noatime noauto_da_alloc,discard,journal_async_commit,errors=panic
|
|
|
|
wait /dev/block/platform/msm_sdcc.1/by-name/persist
|
|
check_fs /dev/block/platform/msm_sdcc.1/by-name/persist ext4
|
|
mount ext4 /dev/block/platform/msm_sdcc.1/by-name/persist /persist nosuid nodev noatime noauto_da_alloc,discard,journal_async_commit,errors=panic
|
|
|
|
wait /dev/block/platform/msm_sdcc.1/by-name/efs
|
|
check_fs /dev/block/platform/msm_sdcc.1/by-name/efs ext4
|
|
mount ext4 /dev/block/platform/msm_sdcc.1/by-name/efs /efs nosuid nodev noatime noauto_da_alloc,discard,journal_async_commit,errors=panic
|
|
chown system radio /efs
|
|
chmod 0771 /efs
|
|
|
|
chown system radio /dev/block/platform/msm_sdcc.1/by-name
|
|
chmod 0775 /dev/block/platform/msm_sdcc.1/by-name
|
|
|
|
on fs_selinux
|
|
setprop ro.crypto.fuse_sdcard true
|
|
|
|
on fs_selinux_disable
|
|
# for LogMeIn
|
|
mount ext4 /dev/block/platform/msm_sdcc.1/by-name/system /system rw wait errors=panic remount
|
|
|
|
chown graphics /system/bin/RescueStarter
|
|
chmod 0755 /system/bin/RescueStarter
|
|
chown graphics /system/bin/RescueServer
|
|
chmod 0755 /system/bin/RescueServer
|
|
|
|
mount ext4 /dev/block/platform/msm_sdcc.1/by-name/system /system ro wait errors=panic remount
|
|
|
|
# Keeping following partitions outside fstab file. As user may not have
|
|
# these partition flashed on the device. Failure to mount any partition in fstab file
|
|
# results in failure to launch late-start class.
|
|
|
|
wait /dev/block/platform/msm_sdcc.1/by-name/cache
|
|
check_fs /dev/block/platform/msm_sdcc.1/by-name/cache ext4
|
|
mount ext4 /dev/block/platform/msm_sdcc.1/by-name/cache /cache nosuid nodev noatime noauto_da_alloc,discard,journal_async_commit,errors=panic
|
|
|
|
#wait /dev/block/platform/msm_sdcc.1/by-name/persist
|
|
#check_fs /dev/block/platform/msm_sdcc.1/by-name/persist ext4
|
|
#mount ext4 /dev/block/platform/msm_sdcc.1/by-name/persist /persist nosuid nodev barrier=1
|
|
|
|
wait /dev/block/platform/msm_sdcc.1/by-name/efs
|
|
check_fs /dev/block/platform/msm_sdcc.1/by-name/efs ext4
|
|
mount ext4 /dev/block/platform/msm_sdcc.1/by-name/efs /efs nosuid nodev noatime noauto_da_alloc,discard,journal_async_commit,errors=panic
|
|
chown system radio /efs
|
|
chmod 0771 /efs
|
|
restorecon -R /efs
|
|
|
|
chown system radio /dev/block/platform/msm_sdcc.1/by-name
|
|
chmod 0775 /dev/block/platform/msm_sdcc.1/by-name
|
|
|
|
on boot
|
|
write /sys/devices/i2c-3/3-0024/cyttsp_update_fw 1
|
|
write /sys/devices/i2c-3/3-005b/update_fw 1
|
|
start qcamerasvr
|
|
|
|
on post-fs-data
|
|
mkdir /data/tombstones 0771 system system
|
|
mkdir /tombstones/modem 0771 system system
|
|
mkdir /tombstones/lpass 0771 system system
|
|
mkdir /tombstones/wcnss 0771 system system
|
|
mkdir /tombstones/dsps 0771 system system
|
|
mkdir /tombstones/mdm 0771 system system
|
|
mkdir /tombstones/mdm2 0771 system system
|
|
|
|
|
|
#sensors
|
|
write /sys/class/input/input5/distortion "400 50 15"
|
|
write /sys/class/input/input6/distortion "400 50 15"
|
|
write /sys/class/input/input7/distortion "400 50 15"
|
|
|
|
# geomagnetic_raw
|
|
chown compass input /sys/class/input/input4/offsets
|
|
chown compass input /sys/class/input/input4/dynamic_matrix
|
|
chown system input /sys/class/input/input4/threshold
|
|
chown system input /sys/class/input/input4/distortion
|
|
chown system input /sys/class/input/input4/shape
|
|
chown compass input /sys/class/input/input5/offsets
|
|
chown compass input /sys/class/input/input5/dynamic_matrix
|
|
chown system input /sys/class/input/input5/threshold
|
|
chown system input /sys/class/input/input5/distortion
|
|
chown system input /sys/class/input/input5/shape
|
|
chown compass input /sys/class/input/input6/offsets
|
|
chown compass input /sys/class/input/input6/dynamic_matrix
|
|
chown system input /sys/class/input/input6/threshold
|
|
chown system input /sys/class/input/input6/distortion
|
|
chown system input /sys/class/input/input6/shape
|
|
chown compass input /sys/class/input/input7/offsets
|
|
chown compass input /sys/class/input/input7/dynamic_matrix
|
|
chown system input /sys/class/input/input7/threshold
|
|
chown system input /sys/class/input/input7/distortion
|
|
chown system input /sys/class/input/input7/shape
|
|
chown compass input /sys/class/input/input8/offsets
|
|
chown compass input /sys/class/input/input8/dynamic_matrix
|
|
chown system input /sys/class/input/input8/threshold
|
|
chown system input /sys/class/input/input8/distortion
|
|
chown system input /sys/class/input/input8/shape
|
|
|
|
# light_sensor
|
|
chown system input /sys/class/input/input7/enable
|
|
chown system input /sys/class/input/input7/poll_delay
|
|
chown system input /sys/class/input/input8/enable
|
|
chown system input /sys/class/input/input8/poll_delay
|
|
chown system input /sys/class/input/input9/enable
|
|
chown system input /sys/class/input/input9/poll_delay
|
|
|
|
# mpu6500_input
|
|
chown system input /sys/class/input/input3/acc_enable
|
|
chown system input /sys/class/input/input3/acc_delay
|
|
chown system input /sys/class/input/input3/gyro_enable
|
|
chown system input /sys/class/input/input3/gyro_delay
|
|
chown system input /sys/class/input/input3/self_test
|
|
chown system input /sys/class/input/input4/acc_enable
|
|
chown system input /sys/class/input/input4/acc_delay
|
|
chown system input /sys/class/input/input4/gyro_enable
|
|
chown system input /sys/class/input/input4/gyro_delay
|
|
chown system input /sys/class/input/input4/self_test
|
|
chown system input /sys/class/input/input5/acc_enable
|
|
chown system input /sys/class/input/input5/acc_delay
|
|
chown system input /sys/class/input/input5/gyro_enable
|
|
chown system input /sys/class/input/input5/gyro_delay
|
|
chown system input /sys/class/input/input5/self_test
|
|
|
|
# accelerometer
|
|
chown system input /sys/class/input/input3/enable
|
|
chown system input /sys/class/input/input3/delay
|
|
chown system input /sys/class/input/input3/filter_enable
|
|
chown system input /sys/class/input/input3/data
|
|
chown system input /sys/class/input/input3/status
|
|
chown system input /sys/class/input/input3/wake
|
|
chown system input /sys/class/input/input3/position
|
|
chown system input /sys/class/input/input4/enable
|
|
chown system input /sys/class/input/input4/delay
|
|
chown system input /sys/class/input/input4/filter_enable
|
|
chown system input /sys/class/input/input4/data
|
|
chown system input /sys/class/input/input4/status
|
|
chown system input /sys/class/input/input4/wake
|
|
chown system input /sys/class/input/input4/position
|
|
|
|
# geomagnetic
|
|
chown system input /sys/class/input/input3/enable
|
|
chown system input /sys/class/input/input3/delay
|
|
chown system input /sys/class/input/input3/filter_enable
|
|
chown system input /sys/class/input/input3/filter_len
|
|
chown system input /sys/class/input/input3/data
|
|
chown system input /sys/class/input/input3/status
|
|
chown system input /sys/class/input/input3/wake
|
|
chown system input /sys/class/input/input3/position
|
|
chown system input /sys/class/input/input4/enable
|
|
chown system input /sys/class/input/input4/delay
|
|
chown system input /sys/class/input/input4/filter_enable
|
|
chown system input /sys/class/input/input4/filter_len
|
|
chown system input /sys/class/input/input4/data
|
|
chown system input /sys/class/input/input4/status
|
|
chown system input /sys/class/input/input4/wake
|
|
chown system input /sys/class/input/input4/position
|
|
chown system input /sys/class/input/input5/enable
|
|
chown system input /sys/class/input/input5/delay
|
|
chown system input /sys/class/input/input5/filter_enable
|
|
chown system input /sys/class/input/input5/filter_len
|
|
chown system input /sys/class/input/input5/data
|
|
chown system input /sys/class/input/input5/status
|
|
chown system input /sys/class/input/input5/wake
|
|
chown system input /sys/class/input/input5/position
|
|
chown system input /sys/class/input/input6/enable
|
|
chown system input /sys/class/input/input6/delay
|
|
chown system input /sys/class/input/input6/filter_enable
|
|
chown system input /sys/class/input/input6/filter_len
|
|
chown system input /sys/class/input/input6/data
|
|
chown system input /sys/class/input/input6/status
|
|
chown system input /sys/class/input/input6/wake
|
|
chown system input /sys/class/input/input6/position
|
|
|
|
# proximity_sensor
|
|
chown system input /sys/class/input/input6/enable
|
|
chown system input /sys/class/input/input7/enable
|
|
chown system input /sys/class/input/input8/enable
|
|
|
|
# NFC_BROADCOM
|
|
chmod 0600 /dev/bcm2079x
|
|
chown nfc nfc /dev/bcm2079x
|
|
mkdir /data/bcmnfc
|
|
mkdir /data/bcmnfc/param
|
|
chmod 0700 /data/bcmnfc
|
|
chmod 0700 /data/bcmnfc/param
|
|
chown nfc nfc /data/bcmnfc
|
|
chown nfc nfc /data/bcmnfc/param
|
|
|
|
#start camera server as daemon
|
|
service qcamerasvr /system/bin/mm-qcamera-daemon
|
|
class late_start
|
|
user camera
|
|
group camera system inet input graphics net_bt_stack
|
|
|
|
#start GNSS/Sensor interface daemon
|
|
service gsiff_daemon /system/bin/gsiff_daemon
|
|
class late_start
|
|
user system
|
|
group gps qcom_oncrpc net_raw
|
|
|
|
service thermald /system/bin/thermald
|
|
class main
|
|
user root
|
|
group root
|
|
disabled
|
|
|
|
service thermal-engine /system/bin/thermal-engine
|
|
class main
|
|
user root
|
|
group root
|
|
disabled
|
|
|
|
service mpdecision /system/bin/mpdecision --no_sleep --avg_comp
|
|
user root
|
|
disabled
|
|
|
|
service rf4ce /system/bin/rf4ce
|
|
class main
|
|
user root
|
|
group root
|
|
|
|
service qosmgrd /system/bin/qosmgr /system/etc/qosmgr_rules.xml
|
|
user system
|
|
group system
|
|
disabled
|
|
|
|
service kickstart /system/bin/qcks -i /firmware-mdm/image/
|
|
user root
|
|
group radio cache inet misc audio sdcard_rw log system
|
|
oneshot
|
|
disabled
|
|
|
|
service mdm_helper /system/bin/mdm_helper
|
|
class main
|
|
onrestart setprop ro.service.mdm_helper_restarted "true"
|
|
disabled
|
|
|
|
service qrngd /system/bin/qrngd -f
|
|
class main
|
|
user root
|
|
group root
|
|
|
|
service qseecomd /system/bin/qseecomd
|
|
class core
|
|
user system
|
|
group system
|
|
|
|
# Start kickstart if mdm is detected
|
|
on property:ro.baseband=mdm
|
|
mkdir /data/qcks 0770 system system
|
|
start kickstart
|
|
|
|
# Start up mdm_helper if sglte detected
|
|
on property:ro.baseband=sglte
|
|
mkdir /data/misc/mdmhelperdata 0700
|
|
start mdm_helper
|
|
|
|
# Start up mdm_helper if dsda2 detected
|
|
on property:ro.baseband=dsda2
|
|
mkdir /data/misc/mdmhelperdata 0700
|
|
start mdm_helper
|
|
|
|
on property:ro.baseband=sglte2
|
|
mkdir /data/misc/mdmhelperdata 0700
|
|
start mdm_helper
|
|
|
|
service usf_tester /system/bin/usf_tester
|
|
user system
|
|
group system inet
|
|
disabled
|
|
|
|
service usf_epos /system/bin/usf_epos
|
|
user system
|
|
group system inet
|
|
disabled
|
|
|
|
service usf_gesture /system/bin/usf_gesture
|
|
user system
|
|
group system inet
|
|
disabled
|
|
|
|
service usf_p2p /system/bin/usf_p2p
|
|
user system
|
|
group system inet
|
|
disabled
|
|
|
|
service usf_hovering /system/bin/usf_hovering
|
|
user system
|
|
group system inet
|
|
disabled
|
|
|
|
service usf-post-boot /system/bin/sh /system/etc/usf_post_boot.sh
|
|
class late_start
|
|
user root
|
|
disabled
|
|
oneshot
|
|
|
|
service prepare-mobicore /system/bin/sh /system/bin/mobicore-presetup.sh
|
|
class core
|
|
user root
|
|
group root
|
|
oneshot
|
|
|
|
service run-mobicore /system/bin/sh /system/bin/mobicore-startup.sh
|
|
class core
|
|
user system
|
|
group system
|
|
|
|
on property:init.svc.bootanim=stopped
|
|
start usf-post-boot
|
|
start run-mobicore
|
|
|
|
service time_daemon /system/bin/time_daemon
|
|
class late_start
|
|
user root
|
|
group root
|
|
|
|
service imsqmidaemon /system/bin/imsqmidaemon
|
|
class main
|
|
user system
|
|
group radio net_raw log qcom_diag
|
|
disabled
|
|
|
|
on boot
|
|
start imsqmidaemon
|
|
|
|
# imsdatadaemon starts with root and UID will be downgraded to SYSTEM.
|
|
service imsdatadaemon /system/bin/imsdatadaemon
|
|
class main
|
|
user root
|
|
group system wifi radio net_raw log qcom_diag net_admin
|
|
disabled
|
|
|
|
service wcnss-service /system/bin/wcnss_service
|
|
class main
|
|
user system
|
|
group system wifi
|
|
oneshot
|
|
|
|
on property:sys.ims.QMI_DAEMON_STATUS=1
|
|
start imsdatadaemon
|
|
|
|
service ims_rtp_daemon /system/bin/ims_rtp_daemon
|
|
class main
|
|
user system
|
|
group radio net_raw diag qcom_diag log
|
|
disabled
|
|
|
|
on property:sys.ims.DATA_DAEMON_STATUS=1
|
|
start ims_rtp_daemon
|
|
|
|
service orientationd /system/bin/orientationd
|
|
class main
|
|
user compass
|
|
group input
|
|
|
|
service geomagneticd /system/bin/geomagneticd
|
|
class main
|
|
user compass
|
|
group system input
|
|
|
|
# Secure Storage startup
|
|
service secure_storage /system/bin/secure_storage_daemon
|
|
class core
|
|
user system
|
|
group system
|
|
disabled
|
|
|
|
on property:ro.securestorage.support=true
|
|
mkdir /dev/.secure_storage
|
|
chmod 0711 /dev/.secure_storage
|
|
chown system system /dev/.secure_storage
|
|
restorecon -R /dev/.secure_storage
|
|
start secure_storage
|
|
|
|
on property:ro.securestorage.knox=true
|
|
mkdir /dev/.secure_storage
|
|
chmod 0711 /dev/.secure_storage
|
|
chown system system /dev/.secure_storage
|
|
restorecon -R /dev/.secure_storage
|
|
start secure_storage
|
|
|
|
# SecEDS
|
|
service TvoutService_C /system/bin/bintvoutservice
|
|
class main
|
|
user system
|
|
group graphics
|
|
on property:ro.SecEDS.enable=false
|
|
stop TvoutService_C
|
|
|