blob: 0477009afec94a98241777bf55a920bd3f976961 [file] [log] [blame]
import init.lt26.usb.rc
on early-init
export EXTERNAL_STORAGE /storage/sdcard0
mkdir /storage 0050 system sdcard_r
mkdir /storage/sdcard0 0000 system system
mkdir /storage/sdcard1 0000 system system
# for backwards compatibility
symlink /storage/sdcard0 /sdcard
symlink /storage/sdcard0 /mnt/sdcard
on fs
mount_all /fstab.lt26
setprop ro.crypto.state unsupported
setprop ro.emmc 1
# SEMC, TA Daemon
class_start trimarea
exec /system/bin/wait4tad
on post-fs
mkdir /system/etc/firmware/misc 0771 system system
mkdir /data/tombstones 0755 system system
mkdir /data/mediaserver 0740 media media
# Change to socket location on libkeyctrl/suntory for /data encryption
mkdir /dev/socket/suntory 0755 system system
chmod 0664 /sys/devices/platform/msm_sdcc.1/polling
chmod 0664 /sys/devices/platform/msm_sdcc.3/polling
chmod 0664 /sys/devices/platform/msm_sdcc.4/polling
mkdir /data/radio 0770 radio radio
mkdir /data/idd 0755 idd idd
mount ext4 /dev/block/mmcblk0p10 /data/idd nosuid nodev noatime barrier=0
chown idd idd /data/idd
chmod 0755 /data/idd
# Camera
mkdir /data/camera 0771 root camera
#Create QMUX deamon socket area
mkdir /dev/socket/qmux_radio 0770 radio radio
chmod 2770 /dev/socket/qmux_radio
mkdir /dev/socket/qmux_audio 0770 media audio
chmod 2770 /dev/socket/qmux_audio
mkdir /dev/socket/qmux_bluetooth 0770 bluetooth bluetooth
chmod 2770 /dev/socket/qmux_bluetooth
on early-boot
# set RLIMIT_MEMLOCK to 64MB
setrlimit 8 67108864 67108864
# Remove write permissions to video related nodes
chmod 0660 /sys/devices/virtual/graphics/fb1/video_mode
chmod 0440 /sys/devices/virtual/graphics/fb1/video_mode_str
chmod 0440 /sys/devices/virtual/graphics/fb1/connected
chmod 0440 /sys/devices/virtual/graphics/fb1/edid_modes
chmod 0440 /sys/devices/virtual/graphics/fb1/hdcp
chmod 0660 /sys/devices/virtual/graphics/fb1/hpd
chmod 0440 /sys/devices/virtual/graphics/fb1/3d_present
chmod 0440 /sys/devices/virtual/graphics/fb1/hdcp_present
chmod 0660 /sys/devices/virtual/graphics/fb1/format_3d
chmod 0660 /sys/devices/virtual/graphics/fb1/edid_3d_modes
chmod 0440 /sys/devices/virtual/graphics/fb1/underscan
chmod 0440 /sys/devices/virtual/graphics/fb1/dvi
chmod 0440 /sys/devices/virtual/graphics/fb1/pa
chmod 0660 /sys/devices/virtual/graphics/fb1/cec
chmod 0660 /sys/devices/virtual/graphics/fb1/cec_logical_addr
chmod 0660 /sys/devices/virtual/graphics/fb1/cec_wr_frame
chmod 0660 /sys/devices/virtual/graphics/fb1/product_description
chmod 0660 /sys/devices/virtual/graphics/fb1/vendor_name
# Change owner and group for system server and surface flinger
chown system graphics /sys/devices/virtual/graphics/fb1/video_mode
chown system graphics /sys/devices/virtual/graphics/fb1/video_mode_str
chown system graphics /sys/devices/virtual/graphics/fb1/connected
chown system graphics /sys/devices/virtual/graphics/fb1/edid_modes
chown system graphics /sys/devices/virtual/graphics/fb1/hdcp
chown system graphics /sys/devices/virtual/graphics/fb1/hpd
chown system graphics /sys/devices/virtual/graphics/fb1/3d_present
chown system graphics /sys/devices/virtual/graphics/fb1/hdcp_present
chown system graphics /sys/devices/virtual/graphics/fb1/format_3d
chown system graphics /sys/devices/virtual/graphics/fb1/edid_3d_modes
chown system graphics /sys/devices/virtual/graphics/fb1/underscan
chown system graphics /sys/devices/virtual/graphics/fb1/dvi
chown system graphics /sys/devices/virtual/graphics/fb1/pa
chown system graphics /sys/devices/virtual/graphics/fb1/cec
chown system graphics /sys/devices/virtual/graphics/fb1/cec_logical_addr
chown system graphics /sys/devices/virtual/graphics/fb1/cec_wr_frame
chown system graphics /sys/devices/virtual/graphics/fb1/product_description
chown system graphics /sys/devices/virtual/graphics/fb1/vendor_name
# Permissions for AKM897x sensor
chown system system /data/misc/akm_set.txt
chown system system /sys/class/compass/akm8972/interval
chown system system /sys/class/compass/akm8972/single
chown system system /sys/class/compass/akm8972/registers
chown system system /sys/class/compass/akm8975/interval
chown system system /sys/class/compass/akm8975/single
chown system system /sys/class/compass/akm8975/registers
on boot
# Optimized browser caching and connection handling
setprop net.http.idle_cache.size 40
setprop net.http.threads 10
setprop net.webkit.cache.size 12582912
setprop net.nw.cache.prioadvstep 86400000
setprop net.nw.cache.weightadvstep 3600000
setprop net.nw.cache.orderby weight
setprop net.http.idle_cache.shutdown true
setprop net.webkit.cache.mindeadsize 4194304
setprop net.webkit.cache.maxdeadsize 4194304
# USB Host support
mkdir /dev/bus 0711 system system
mkdir /dev/bus/usb 0711 system system
write /sys/class/android_usb/android0/iManufacturer $ro.product.manufacturer
write /sys/class/android_usb/android0/iProduct $ro.product.model
setprop ro.wifi.wps_enable true
write /proc/sys/kernel/sysrq 0
write /proc/sys/kernel/watchdog_thresh 5
exec /system/bin/cal_data_manager
# Enable Wifi EAP SIM
setprop ro.wifi.eap_sim_enabled true
chown system system /sys/module/sco/parameters/disable_esco
chmod 0660 /sys/devices/platform/msm_serial_hs.0/clock
#Set SUID bit for diag_mdlog
chmod 4755 /system/bin/diag_mdlog
# LM35xx/cameralight
chown system camera /sys/devices/i2c-3/3-0053/torch_enable
chown system camera /sys/devices/i2c-3/3-0053/torch_current
chown system camera /sys/devices/i2c-3/3-0053/privacy_enable
chown system camera /sys/devices/i2c-3/3-0053/privacy_current
chown system camera /sys/devices/i2c-3/3-0053/flash_enable
chown system camera /sys/devices/i2c-3/3-0053/flash_duration
chown system camera /sys/devices/i2c-3/3-0053/flash_synchronization
chown system camera /sys/devices/i2c-3/3-0053/flash_current
chown system camera /sys/devices/i2c-3/3-0053/status
# Owner for the proximity sensor
chown system system /sys/devices/i2c-3/3-0054/threshold
chown system system /sys/devices/i2c-3/3-0054/nburst
# Default tcp buffersizes for hsdpa
setprop net.tcp.buffersize.hsdpa 4094,87380,1220608,4096,16384,1220608
setprop net.tcp.buffersize.hspa 4094,87380,1220608,4096,16384,1220608
# bluetooth power up/down interface
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
chmod 0660 /sys/class/rfkill/rfkill0/state
# bluetooth address programming
setprop ro.bt.bdaddr_path /data/etc/bluetooth_bdaddr
# power-management
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ondemand
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor ondemand
write /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate 50000
write /sys/devices/system/cpu/cpufreq/ondemand/up_threshold 90
write /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy 1
write /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor 4
write /sys/devices/system/cpu/cpufreq/ondemand/down_differential 10
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 384000
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq 384000
write /sys/module/rpm_resources/enable_low_power/L2_cache 1
write /sys/module/rpm_resources/enable_low_power/pxo 1
write /sys/module/rpm_resources/enable_low_power/vdd_dig 2
write /sys/module/rpm_resources/enable_low_power/vdd_mem 2
write /sys/module/rpm_resources/enable_low_power/rpm_cpu 1
write /sys/module/pm_8x60/modes/cpu0/power_collapse/suspend_enabled 1
write /sys/module/pm_8x60/modes/cpu1/power_collapse/suspend_enabled 1
write /sys/module/pm_8x60/modes/cpu0/standalone_power_collapse/suspend_enabled 1
write /sys/module/pm_8x60/modes/cpu1/standalone_power_collapse/suspend_enabled 1
write /sys/module/pm_8x60/modes/cpu0/power_collapse/idle_enabled 1
write /sys/module/pm_8x60/modes/cpu1/power_collapse/idle_enabled 1
write /sys/module/pm_8x60/modes/cpu0/standalone_power_collapse/idle_enabled 1
write /sys/module/pm_8x60/modes/cpu1/standalone_power_collapse/idle_enabled 1
chown root.system /sys/devices/system/cpu/mfreq
chmod 220 /sys/devices/system/cpu/mfreq
chown root.system /sys/devices/system/cpu/cpu1/online
chmod 664 /sys/devices/system/cpu/cpu1/online
# Create the directories and files expected by the lcatp service
# only found in eng builds.
# Preferably the ONLY_IN_VARIANT macro should be used but
# seems like the build system does not parse this file properly.
mkdir /data/misc/tsce 0770 system system
write /data/misc/tsce/userfile.txt 0
write /data/misc/tsce/userfile2.txt 0
write /data/misc/tsce/logfile.txt 0
chown system system /data/misc/tsce/userfile.txt
chown system system /data/misc/tsce/userfile2.txt
chown system system /data/misc/tsce/logfile.txt
chmod 0660 /data/misc/tsce/userfile.txt
chmod 0660 /data/misc/tsce/userfile2.txt
chmod 0660 /data/misc/tsce/logfile.txt
mount debugfs /sys/kernel/debug /sys/kernel/debug
insmod /system/lib/modules/bcmdhd.ko nvram_path=/system/etc/wifi/calibration iface_name=wlan0
on init
write /sys/class/android_usb/android0/iSerial $ro.serialno
write /sys/class/android_usb/android0/f_rndis/manufacturer $ro.product.manufacturer
write /sys/class/android_usb/android0/f_rndis/vendorID 0fce
write /sys/class/android_usb/android0/f_rndis/wceis 1
# setup the global environment
export EXTERNAL_STORAGE_USB /mnt/usbdisk
# create mountpoint
mkdir /mnt/usbdisk 0000 system system
# Create symlink
symlink /mnt/usbdisk /usbdisk
# setup the global environment
export SECONDARY_STORAGE /mnt/usbdisk
on post-fs-data
mkdir /data/media 0770 media_rw media_rw
chown media_rw media_rw /data/media
mkdir /data/misc/wifi 0770 wifi wifi
mkdir /data/misc/wifi/sockets 0770 wifi wifi
mkdir /data/misc/dhcp 0770 dhcp dhcp
chown dhcp dhcp /data/misc/dhcp
chown system system /sys/devices/platform/msm_hsusb/gadget/lun1/file
chmod 0660 /sys/devices/platform/msm_hsusb/gadget/lun1/file
write /sys/class/android_usb/f_mass_storage/inquiry_string "SONY Mass Storage 0100"
write /sys/class/android_usb/f_cdrom/cdrom_inquiry_string "SONY CD-ROM 0100"
write /sys/class/android_usb/f_mass_storage/serial_number $ro.serialno
write /sys/class/android_usb/f_mass_storage/eui64_id 000AD90000000000
write /sys/devices/platform/msm_hsusb/gadget/lun0/nofua 1
write /sys/devices/platform/msm_hsusb/gadget/lun1/nofua 1
setprop vold.post_fs_data_done 1
# Start suntrold
service suntrold /system/bin/suntrold
class main
user system
group system
oneshot
service secchan /system/bin/secchand
class main
user system
group system
service time_daemon /system/bin/time_daemon
class main
user root
group root
oneshot
disabled
on property:persist.timed.enable=true
mkdir /data/time/ 0700 system system
start time_daemon
service hciattach /system/bin/brcm_patchram_plus --enable_hci --enable_lpm \
--use_baudrate_for_download --tosleep 20000 --scopcm 0,4,0,0,0,0,0,0,3,0 \
--no2bytes --baudrate 3000000 --patchram /system/etc/firmware/BCM4330.hcd \
/dev/ttyHS0
class main
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service updatemiscta /system/bin/updatemiscta
class core
user root
disabled
oneshot
service rmt_storage /system/bin/rmt_storage
class main
user root
# SEMC, TA rmt service
service ta_rmt_service /system/bin/ta_rmt_service
class main
user root
# Copy calibration data from NV to kernel drivers
service nvimport /system/bin/nvimport
class main
user root
oneshot
service p2p_supplicant /system/bin/wpa_supplicant \
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -N \
-ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf -e/data/misc/wifi/entropy.bin -puse_p2p_group_interface=1
# we will start as root and wpa_supplicant will switch to user wifi
# after setting up the capabilities required for WEXT
# user wifi
# group wifi inet keystore
class main
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot
service wpa_supplicant /system/bin/wpa_supplicant \
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -e/data/misc/wifi/entropy.bin
# we will start as root and wpa_supplicant will switch to user wifi
# after setting up the capabilities required for WEXT
# user wifi
# group wifi inet keystore
class main
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot
service dhcpcd_wlan0 /system/bin/dhcpcd -aABKL
class main
disabled
oneshot
service dhcpcd_p2p /system/bin/dhcpcd -aABKL
class main
disabled
oneshot
service dhcpcd_bnep0 /system/bin/dhcpcd -ABKL
class main
disabled
oneshot
service iprenew_wlan0 /system/bin/dhcpcd -n
class main
disabled
oneshot
service iprenew_p2p /system/bin/dhcpcd -n
class main
disabled
oneshot
service iprenew_bnep0 /system/bin/dhcpcd -n
class main
disabled
oneshot
service qmuxd /system/bin/qmuxd
class late_start
user radio
group radio audio bluetooth gps
service netmgrd /system/bin/netmgrd
class late_start
# SEMC, TA Daemon
service tad /system/bin/tad /dev/block/mmcblk0p1 0,16,256
class trimarea
user root
group root
socket tad stream 0660 system system
service hw_config /system/bin/sh /system/etc/hw_config.sh
class main
user root
oneshot
on property:ro.use_data_netmgrd=false
# netmgr not supported on specific target
stop netmgrd
service mpdecision /system/bin/mpdecision --no_sleep --avg_comp
class main
user root
disabled
service thermald /system/bin/thermald -c /system/etc/thermald-lt26.conf
class main
socket thermald stream 0666 root root
user root
disabled
on property:init.svc.bootanim=stopped
start mpdecision
start thermald
service nvcustomizer /system/bin/nvcustomizer
class late_start
user root
oneshot
disabled
on property:ro.nvcust=1
start nvcustomizer
on property:vold.decrypt=trigger_post_fs_data
mkdir /data/idd 0755 idd idd
mount ext4 /dev/block/mmcblk0p10 /data/idd nosuid nodev noatime barrier=0
chown idd idd /data/idd
service hdmid /system/bin/hdmid
class late_start
socket hdmid stream 0660 root system graphics
disabled
on property:ro.hdmi.enable=true
start hdmid
on property:sys.radio.shutdown=true
exec /system/bin/sh /system/etc/init.qcom.efs.sync.sh