blob: 0f9faa4a7dc42aba4d75f8eda8f68652a8dca9af [file] [log] [blame]
# Copyright (c) 2010, Code Aurora Forum. 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 Code Aurora Forum, Inc. 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 early-init
mkdir /firmware 0771 system system
symlink /data/tombstones /tombstones
mkdir /efs 0771 system system
on fs
mkdir /data/tombstones 0771 system system
mkdir /tombstones/modem 0771 system system
mkdir /tombstones/mdm 0771 system system
mkdir /tombstones/lpass 0771 system system
mount_all fstab.qcom
on post-fs-data
mkdir /system/etc/firmware/misc 0771 system system
mkdir /system/etc/firmware/misc_mdm 0771 system system
write /sys/devices/i2c-0/0-0024/cyttsp_update_fw 1
chown radio system /efs
chmod 0771 /efs
mkdir /efs/imei 0775
chown radio system /efs/imei
chown radio system /efs/imei/keystr
chmod 0775 /efs/imei
chmod 0775 /efs/imei/keystr
mkdir /efs/bluetooth
mkdir /efs/wifi
chown radio system /efs/bluetooth
chown radio system /efs/wifi
chmod 0775 /efs/bluetooth
chmod 0775 /efs/wifi
write /sys/block/mmcblk0/queue/iosched/front_merges 0
write /sys/block/mmcblk0/queue/iosched/read_expire 100
write /sys/block/mmcblk0/queue/iosched/write_expire 1000
mkdir /data/radio 0770 radio radio
mkdir /data/misc/radio 0775 radio system
mkdir /data/misc/sensors 0775 root root
write /data/system/sensors/settings 0
chmod 0664 /data/system/sensors/settings
# for parameter
chown system radio /dev/block/mmcblk0p12
chmod 0660 /dev/block/mmcblk0p12
# DLEVEL
chown system radio /sys/devices/platform/sec_debug_level
chmod 0664 /sys/devices/platform/sec_debug_level
chown system radio /sys/devices/virtual/misc/level/control
chmod 0664 /sys/devices/virtual/misc/level/control
# permission for qc modem silrent reset
chown radio system /sys/module/subsystem_restart/parameters/restart_level
# permission for fast dormacy for RIL
chown radio system /sys/devices/virtual/sec/sdio_al/waketime
# Vibetonz
chmod 0660 /dev/tspdrv
chown root shell /dev/tspdrv
chown system system /sys/power/cpufreq_max_limit
chown system system /sys/power/cpufreq_min_limit
chown system system /sys/power/cpufreq_table
chmod 664 /sys/power/cpufreq_max_limit
chmod 664 /sys/power/cpufreq_min_limit
chmod 664 /sys/power/cpufreq_table
# Permissions for LCD
chown radio system /sys/class/lcd/panel/lcd_type
chown radio system /sys/class/lcd/panel/lcd_power
chown system media_rw /sys/class/lcd/panel/power_reduce
chown radio system /sys/class/backlight/panel/auto_brightness
# Permissions for mDNIe
chown system media_rw /sys/class/mdnie/mdnie/scenario
chown system media_rw /sys/class/mdnie/mdnie/mode
chown system media_rw /sys/class/mdnie/mdnie/outdoor
chown media system /sys/devices/virtual/jack/jack_reselector/reselect_jack
chown radio system /sys/devices/virtual/misc/sec_touchkey/touch_sensitivity
chown radio system /sys/devices/virtual/misc/sec_touchkey/enable_disable
chown radio system /sys/devices/virtual/misc/sec_touchkey/touch_update
chown radio system /sys/devices/virtual/misc/sec_touchkey/touch_version
chown radio system /sys/devices/virtual/misc/sec_touchkey/brightness
chown radio system /sys/devices/virtual/sec/sec_touchkey/touchkey_firm_version_panel
chown radio system /sys/devices/virtual/sec/sec_touchkey/touchkey_firm_version_phone
chown radio system /sys/devices/virtual/sec/sec_touchkey/touchkey_firm_update_status
chown radio system /sys/devices/virtual/sec/sec_touchkey/touchkey_firm_update
chown radio system /sys/devices/virtual/sec/sec_touchkey/touchkey_brightness
# Permissions for TSP
chown radio system /sys/devices/virtual/sec/tsp_noise_test/set_firm_version
chown radio system /sys/devices/virtual/sec/tsp_noise_test/set_threshold
chown radio system /sys/devices/virtual/sec/tsp_noise_test/set_all_refer
chown radio system /sys/devices/virtual/sec/tsp_noise_test/disp_all_refdata
chown radio system /sys/devices/virtual/sec/tsp_noise_test/set_all_delta
chown radio system /sys/devices/virtual/sec/tsp_noise_test/disp_all_deltadata
chown radio system /sys/devices/virtual/sec/tsp_noise_test/set_delta4
chown radio system /sys/devices/virtual/sec/tsp_noise_test/set_refer4
chown radio system /sys/devices/virtual/sec/tsp_noise_test/set_delta3
chown radio system /sys/devices/virtual/sec/tsp_noise_test/set_refer3
chown radio system /sys/devices/virtual/sec/tsp_noise_test/set_delta2
chown radio system /sys/devices/virtual/sec/tsp_noise_test/set_refer2
chown radio system /sys/devices/virtual/sec/tsp_noise_test/set_delta1
chown radio system /sys/devices/virtual/sec/tsp_noise_test/set_refer1
chown radio system /sys/devices/virtual/sec/tsp_noise_test/set_delta0
chown radio system /sys/devices/virtual/sec/tsp_noise_test/set_refer0
chown radio system /sys/devices/virtual/sec/sec_touchscreen/tsp_firm_version_panel
chown radio system /sys/devices/virtual/sec/sec_touchscreen/tsp_firm_version_phone
chown radio system /sys/devices/virtual/sec/sec_touchscreen/tsp_firm_update_status
chown radio system /sys/devices/virtual/sec/sec_touchscreen/tsp_firm_update
chown radio system /sys/devices/virtual/sec/sec_touchscreen/tsp_threshold
chown radio system /sys/devices/virtual/sec/sec_touchscreen/set_tsp_for_drawing
# Permissions for Wacom
chown radio system /sys/class/sec/sec_epen/epen_firm_update
chown radio system /sys/class/sec/sec_epen/epen_rotation
chown radio system /sys/class/sec/sec_epen/epen_hand
chown radio system /sys/class/sec/sec_epen/epen_reset
chown radio system /sys/class/sec/sec_epen/epen_reset_result
chown radio system /sys/class/sec/sec_epen/epen_checksum
chown radio system /sys/class/sec/sec_epen/epen_checksum_result
chown radio system /sys/class/sec/sec_epen/epen_firm_version
chown radio system /sys/devices/platform/android_usb/UsbMenuSel
chown radio system /sys/devices/platform/android_usb/tethering
chown radio system /sys/devices/platform/android_usb/ums
chown radio system /sys/devices/virtual/sec/switch/uart_sel
chown radio system /sys/devices/virtual/sec/switch/usb_sel
chown radio system /sys/devices/virtual/sec/switch/.usb_lock/enable
chown radio system /sys/devices/virtual/sec/switch/device_type
chown radio system /sys/devices/virtual/sec/switch/disable_vbus
chown radio system /sys/devices/virtual/sec/switch/usb_state
# Permissions for Battery driver
chown radio system /sys/class/power_supply/battery/batt_esus_test
chown radio system /sys/class/power_supply/battery/batt_test_value
chown radio system /sys/class/power_supply/battery/batt_lpm_state
chown radio system /sys/class/power_supply/battery/fg_psoc
chown radio system /sys/class/power_supply/battery/system_rev
chown radio system /sys/class/power_supply/battery/batt_current_adc
chown radio system /sys/class/power_supply/battery/batt_test_value
chown radio system /sys/class/power_supply/battery/batt_temp_adc_spec
chown radio system /sys/class/power_supply/battery/batt_temp_check
chown radio system /sys/class/power_supply/battery/batt_full_check
chown radio system /sys/class/power_supply/battery/batt_type
chown radio system /sys/class/power_supply/battery/batt_lp_charging
chown radio system /sys/class/power_supply/battery/charging_source
chown radio system /sys/class/power_supply/battery/batt_temp_adc
chown radio system /sys/class/power_supply/battery/batt_temp
chown radio system /sys/class/power_supply/battery/batt_vfocv
chown radio system /sys/class/power_supply/battery/batt_soc
chown radio system /sys/class/power_supply/battery/batt_vol
chown radio system /sys/class/power_supply/battery/batt_esus_test
chown radio system /sys/class/power_supply/battery/camera
chown sdcard_rw sdcard_rw /sys/class/power_supply/battery/mp3
chown sdcard_rw sdcard_rw /sys/class/power_supply/battery/video
chown radio system /sys/class/power_supply/battery/talk_wcdma
chown radio system /sys/class/power_supply/battery/talk_gsm
chown radio system /sys/class/power_supply/battery/data_call
chown radio system /sys/class/power_supply/battery/batt_wifi
chown radio system /sys/class/power_supply/battery/gps
chown radio system /sys/class/power_supply/battery/device_state
# allow system to modify cpufreq control files
chown root system /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
chown root system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chown root system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
# Define TCP buffer sizes for various networks
# ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
setprop net.tcp.buffersize.default 4096,87380,110208,4096,16384,110208
# setprop net.tcp.buffersize.wifi 524288,1048576,2097152,262144,524288,1048576
setprop net.tcp.buffersize.wifi 4095,131072,196608,4096,16384,110208
setprop net.tcp.buffersize.lte 4094,87380,2560000,4096,16384,1220608
setprop net.tcp.buffersize.umts 4094,87380,196608,4096,16384,110208
setprop net.tcp.buffersize.hspa 4094,87380,704512,4096,16384,110208
setprop net.tcp.buffersize.hsupa 4094,87380,704512,4096,16384,110208
setprop net.tcp.buffersize.hsdpa 4094,87380,704512,4096,16384,110208
setprop net.tcp.buffersize.edge 4093,26280,35040,4096,16384,35040
setprop net.tcp.buffersize.gprs 4092,8760,11680,4096,8760,11680
setprop net.tcp.buffersize.evdo_b 4094,87380,262144,4096,16384,262144
# Assign TCP buffer thresholds to be ceiling value of technology maximums
# Increased technology maximums should be reflected here.
write /proc/sys/net/core/rmem_max 1220608
write /proc/sys/net/core/wmem_max 1220608
# Set this property so surfaceflinger is not started by system_init
setprop system_init.startsurfaceflinger 0
# Device Encryption by B2B Security Lab.
setprop ro.crypto.keyfile.userdata /efs/metadata
# klaatu tdmb ownership
chown system system /dev/tdmb
chmod 0660 /dev/tdmb
# create directory for DRM plug-ins
mkdir /data/drm 0774 drm drm
#SISO-PLAYREADY-CHANGES
# [ save OMA DB, when upgrading from GB to ICS
mkdir /data/system/databases 0771 system system
copy /data/data/com.sec.android.providers.drm/databases/drmdatabase.db /data/system/databases/drmdatabase.db
chown system system /data/system/databases/drmdatabase.db
chmod 0774 /data/system/databases/drmdatabase.db
# ]
#DRM directory creation
mkdir /system/etc/security/.drm 0775
chown root root /system/etc/security/.drm
chmod 0775 /system/etc/security/.drm
# Added for Playready DRM Support
mkdir /data/data/.drm 0775
chown drm system /data/data/.drm
chmod 0775 /data/data/.drm
mkdir /data/data/.drm/.playready 0775
chown drm system /data/data/.drm/.playready
chmod 0775 /data/data/.drm/.playready
#Added drm folder to copy drm plugins
mkdir /system/lib/drm 0775
chown root root /system/lib/drm
chmod 0775 /system/lib/drm
#SISO-PLAYREADY-CHANGES
# DivX DRM
mkdir /efs/.files 0775
mkdir /efs/.files/.dx1 0775
mkdir /efs/.files/.dm33 0775
mkdir /efs/.files/.mp301 0775
chown media system /efs/.files/.dx1
chown media system /efs/.files/.dm33
chown media system /efs/.files/.mp301
chmod 0775 /efs/.files/.dx1
chmod 0775 /efs/.files/.dm33
chmod 0775 /efs/.files/.mp301
# SKT PM PlayReady
mkdir /data/playready 0777 system system
chown system system /sys/class/android_usb/android0/f_mass_storage/lun/file
chmod 0660 /sys/class/android_usb/android0/f_mass_storage/lun/file
chown system system /sys/class/android_usb/android0/f_rndis/ethaddr
chmod 0660 /sys/class/android_usb/android0/f_rndis/ethaddr
#OTG Test
chown system radio /sys/class/host_notify/usb_otg/booster
chmod 0660 /sys/class/host_notify/usb_otg/booster
#Essential node for usbservice
mkdir /dev/bus/ 755 root root
mkdir /dev/bus/usb 755 root root
# create fota delta dir
mkdir /data/fota_test 0775 system log
chown system log /data/fota_test
chmod 0775 /data/fota_test
mkdir /cache/fota 0775 system cache
chmod 0775 /cache/fota
on boot
chown system system /dev/accelerometer
chown system system /dev/akm8975
chmod 664 /dev/accelerometer
chmod 664 /dev/akm8975
chown system system /sys/class/K3G_GYRO-dev/k3g/gyro_selftest_dps
chown system system /sys/class/sec/gsensorcal/calibration
chown system system /sys/class/proximity/proximity/proximity_avg
chown system system /sys/devices/virtual/K3G_GYRO-dev/k3g/gyro_selftest
chown system system /sys/devices/virtual/K3G_GYRO-dev/k3g/gyro_get_temp
chown system system /sys/devices/virtual/K3G_GYRO-dev/k3g/gyro_power_on
chown system system /sys/devices/virtual/K3G_GYRO-dev/k3g/gyro_selftest_dps
chown system system /sys/devices/virtual/accelerometer/accelerometer/acc_file
chown system system /sys/devices/virtual/sec/gsensorcal/calibration
chown system system /sys/class/sensors/barometer_sensor/sea_level_pressure
chown system system /sys/class/sensors/barometer_sensor/eeprom_check
#bln
chown system system /sys/class/misc/backlightnotification/notification_led
chown system system /sys/class/misc/backlightnotification/enabled
#camera
chown system camera /sys/class/ledflash/sec_ledflash/torch
# ko files for vibrator (block this cmd temporary. vibrato driver cause reset during boot)
insmod /system/lib/modules/vibrator.ko
chown system system /sys/class/timed_output/vibrator/enable
chmod 0664 /sys/class/timed_output/vibrator/enable
chown system system /sys/class/timed_output/vibrator/pwm_value
chmod 0660 /sys/class/timed_output/vibrator/pwm_value
chown system system /sys/class/timed_output/vibrator/pwm_max
chmod 0660 /sys/class/timed_output/vibrator/pwm_max
chown system system /sys/class/timed_output/vibrator/pwm_min
chmod 0660 /sys/class/timed_output/vibrator/pwm_min
chown system system /sys/class/timed_output/vibrator/pwm_default
chmod 0660 /sys/class/timed_output/vibrator/pwm_default
chown system system /sys/class/timed_output/vibrator/pwm_threshold
chmod 0660 /sys/class/timed_output/vibrator/pwm_threshold
# Services begin here
service secril-daemon /system/bin/sec-ril
class main
user root
group radio cache inet misc audio sdcard_rw qcom_diag log
service kickstart /system/bin/qcks l
oneshot
disabled
# Start kickstart if csfb or svlte2a target
on property:ro.baseband=csfb
wait /dev/ttyHSL1
mkdir /data/qcks 0770 system system
start kickstart
on property:ro.baseband=svlte2a
wait /dev/ttyHSL1
mkdir /data/qcks 0770 system system
start kickstart
service dcvsd0 /system/bin/dcvsd -c 0 -f /data/misc/dcvsd/dcvsd0.conf
user root
disabled
service dcvsd1 /system/bin/dcvsd -c 1 -f /data/misc/dcvsd/dcvsd1.conf
user root
disabled
service mpdecision /system/bin/mpdecision --no_sleep --avg_comp
user root
disabled
service thermald /system/bin/thermald
class main
user root
group root
disabled
# qrngd will drop permissions after startup
service qrngd /system/bin/qrngd -f
class main
user root
group root
on property:ro.baseband=svlte2a
setprop ro.config.ehrpd true
setprop ro.ril.svlte1x true
on property:sys.radio.shutdown=true
exec /system/bin/sh /system/etc/init.qcom.efs.sync.sh