[Samsung Captivate Glide] Epsylon3:
vermagic: 3.1.10-I927UCLG9-CL970642 SMP preempt mod_unload ARMv7

init.n1.rc :

import init.n1.usb.rc

on early-init
mount debugfs debugfs /sys/kernel/debug
write /sys/class/firmware/timeout 5

mkdir /efs 0771 system system

on init
# Vibetonz
export VIBE_PIPE_PATH /dev/pipes
mkdir /dev/pipes 0771 shell shell

# for backwards compatibility
export EXTERNAL_STORAGE /mnt/sdcard
mkdir /mnt/sdcard 0000 system system
mkdir /preload 0771 system system
symlink /mnt/sdcard /sdcard

# mkdir /mnt/sdcard2 0000 system system
# MHL
chown system radio /sys/devices/platform/mhl/MHD_file
chmod 0644 /sys/devices/platform/mhl/MHD_file
on fs
mount ext4 /dev/block/platform/sdhci-tegra.3/by-num/p2 /system wait ro
exec sfsck /dev/block/platform/sdhci-tegra.3/by-num/p1 ext4
mount ext4 /dev/block/platform/sdhci-tegra.3/by-num/p1 /efs wait noatime nosuid nodev
chown radio system /efs
chmod 0775 /efs
chmod 0775 /efs/bluetooth

# Device Encryption by Security R&D Group.
exec set_crypt_meta_info /dev/block/platform/sdhci-tegra.3/by-num/p1 /efs
exec sfsck /dev/block/platform/sdhci-tegra.3/by-num/p6 ext4 encryptable

mount ext4 /dev/block/platform/sdhci-tegra.3/by-num/p6 /data wait noatime nosuid nodev journal_async_commit,noauto_da_alloc,errors=panic
mount ext4 /dev/block/platform/sdhci-tegra.3/by-num/p3 /cache wait noatime nosuid nodev journal_async_commit,errors=panic
mkdir /mnt/modem 0770 radio system

# MTP Device permission.
chmod 0660 /dev/usb_mtp_gadget
chown system system /dev/usb_mtp_gadget

on boot
mkdir /efs/wifi
chown radio system /efs/wifi
chmod 0775 /efs/wifi

chown system system /efs/wifi/.mac.info
chown system system /data/.mac.info
chmod 0664 /efs/wifi/.mac.info
chmod 0664 /data/.mac.info

mkdir /data/misc/wifi 0770 wifi system
mkdir /data/misc/wifi/sockets 0770 wifi wifi
mkdir /data/misc/dhcp 0775 dhcp dhcp
mkdir /data/nvcam 0775 system system
chown dhcp dhcp /data/misc/dhcp
mkdir /data/wifi 0770 wifi wifi

# Hdcp
chown system system /dev/nvhdcp1
chmod 0660 /dev/nvhdcp1
chown system system /system/etc/hdmi/dectable.dat
chmod 0440 /system/etc/hdmi/dectable.dat
chown system system /system/etc/hdmi/dectable1.dat
chmod 0440 /system/etc/hdmi/dectable1.dat

# external storage emulation
# mkdir /data/media 0775 media_rw media_rw
# chown media_rw media_rw /data/media

# OTG Test
chown system radio /sys/class/host_notify/usb_otg/booster
chmod 0664 /sys/class/host_notify/usb_otg/booster

# usb detect
mkdir /dev/bus 0755 root root
mkdir /dev/bus/usb 0755 root root

# bluetooth
# UART device
chmod 0660 /dev/ttyHS2
chown bluetooth bluetooth /dev/ttyHS2

# power up/down interface
chmod 0660 /sys/class/rfkill/rfkill0/state
chmod 0660 /sys/class/rfkill/rfkill0/type
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type

# bluetooth MAC address programming
chown bluetooth bluetooth ro.bt.bdaddr_path
chown bluetooth bluetooth /system/etc/bluetooth
setprop ro.bt.bdaddr_path "/efs/bluetooth/bt_addr"

# GPS
chown root system /dev/ttyHS0
chmod 0664 /dev/ttyHS0

mkdir /data/gps 0771 system system
chown system system /data/gps

chmod 0664 /sys/class/sec/gps/GPS_PWR_EN/value
chown root system /sys/class/sec/gps/GPS_PWR_EN/value

chmod 0664 /sys/class/sec/gps/GPS_nRST/value
chown root system /sys/class/sec/gps/GPS_nRST/value

# UART/USB path switching
chown system radio /sys/devices/platform/i2c-gpio.11/i2c-11/11-0025/uartsel
chown system radio /sys/devices/platform/i2c-gpio.11/i2c-11/11-0025/usbsel
chown system radio /sys/class/sec/switch/uart_sel/value
chown system radio /sys/class/sec/switch/usb_sel

# audio
chmod 0664 /sys/power/suspend/mode
chown system audio /sys/power/suspend/mode
chown system audio /sys/devices/virtual/jack/jack_reselector/reselect_jack

# backlight (N1_ICS)
chown system system /sys/class/backlight/pwm-backlight/brightness
chown system system /sys/class/misc/melfas_touchkey/brightness

# LCD
chmod 664 /sys/devices/virtual/sec/sec_tune_lcd/lcdtype
chmod 664 /sys/devices/virtual/sec/sec_tune_lcd/lcd_onoff

chown system radio /sys/devices/virtual/sec/sec_tune_lcd/lcdtype
chown system radio /sys/devices/virtual/sec/sec_tune_lcd/lcd_onoff

chmod 664 /sys/class/backlight/pwm-backlight/device/acl_set
chown system media_rw /sys/class/backlight/pwm-backlight/device/acl_set

# Sensor
chmod 666 /dev/nvhost-ctrl
chmod 666 /dev/nvhost-display
chmod 666 /dev/nvhost-dsi
chmod 666 /dev/nvhost-gr2d
chmod 666 /dev/nvhost-gr3d
chmod 666 /dev/nvhost-isp
chmod 666 /dev/nvhost-mpe
chmod 666 /dev/nvhost-vi

# Accelerometer
chown root system /dev/mpu
chown root system /dev/mpuirq
chown root system /dev/accelirq
chown root system /dev/timerirq
chown root system /sys/class/proximity/proximity/proximity_avg

chmod 0660 /dev/mpu
chmod 0660 /dev/mpuirq
chmod 0660 /dev/accelirq
chmod 0660 /dev/timerirq

chmod 664 /sys/class/sensors/accelerometer_sensor/calibration
chown system system /sys/class/sensors/accelerometer_sensor/calibration

chmod 666 /sys/class/input/input2/device/rate
chmod 666 /sys/class/input/input2/device/autosleep

# BB UART settings
chown radio system /dev/ttyHS0

# BB remote file system
mkdir /data/rfs
mkdir /data/rfs/data
mkdir /data/rfs/data/modem
mkdir /data/rfs/data/debug
chown radio system /data/rfs/data
chown radio system /data/rfs/data/modem
chown radio system /data/rfs/data/debug
symlink /system/vendor/firmware/data/config /data/rfs/data/config
symlink /system/vendor/firmware/app /data/rfs/app
symlink /mnt/modem/data/factory /data/rfs/data/factory

# 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.lte 524288,1048576,2560000,262144,524288,1048576
setprop net.tcp.buffersize.umts 4094,87380,110208,4096,16384,110208
setprop net.tcp.buffersize.hspa 4094,87380,704512,4096,16384,262144
setprop net.tcp.buffersize.hsdpa 4094,87380,704512,4096,16384,110208
setprop net.tcp.buffersize.hsupa 4094,87380,704512,4096,16384,262144
setprop net.tcp.buffersize.hspap 4094,87380,704512,4096,16384,262144
setprop net.tcp.buffersize.edge 4093,26280,35040,4096,16384,35040
setprop net.tcp.buffersize.gprs 4092,8760,11680,4096,8760,11680

# N1_ICS
# GPIO BB access for user radio
# chown radio system /sys/class/gpio/gpio169/value

# DVFS upper/under lock sysfs
chown radio system /sys/power/cpufreq_min_limit
chmod 0664 /sys/power/cpufreq_min_limit
chown radio system /sys/power/cpufreq_max_limit
chmod 0664 /sys/power/cpufreq_max_limit
chown radio system /sys/power/cpufreq_table
chmod 0444 /sys/power/cpufreq_table

# Power management settings
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 216000
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 1200000
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq 216000
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq 1200000
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor interactive
write /sys/devices/system/cpu/cpufreq/interactive/go_maxspeed_load 80
write /sys/devices/system/cpu/cpufreq/interactive/boost_factor 2
write /sys/devices/system/cpu/cpufreq/interactive/sustain_load 80
write /sys/module/cpuidle/parameters/lp2_in_idle 1

# COM port settings
symlink /dev/ttyACM3 /dev/log_modem
chmod 775 /data/rfs/data/debug

# Default Read Ahead value for sdcards
# write /sys/block/mmcblk0/queue/read_ahead_kb 2048
# write /sys/block/mmcblk1/queue/read_ahead_kb 2048

# Vibetonz
chmod 0660 /dev/tspdrv
chown root shell /dev/tspdrv

#SISO-PLAYREADY-CHANGES
#DRM directory creation
mkdir /system/etc/security/.drm 0775
chown system media /system/etc/security/.drm
chmod 0775 /system/etc/security/.drm
#Added for CLMA certs for Manufacturing app in OMADRM Version2
mkdir /data/mrd 0744
mkdir /data/mrd/almc 0744
mkdir /data/mrd/almc/adabip 0744
chown radio radio /data/mrd/almc/adabip/
chmod 0744 /data/mrd/almc/adabip/
# Added for Playready DRM Support
mkdir /data/data/.drm 0775
chown media system /data/data/.drm
chmod 0775 /data/data/.drm
mkdir /data/data/.drm/.playready 0775
chown media system /data/data/.drm/.playready
chmod 0775 /data/data/.drm/.playready
# Added for 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
#SISO-PLAYREADY-CHANGES

# Permissions for Camera
chown system system /sys/class/camera/rear/rear_flash
chmod 0775 /sys/class/camera/rear/rear_flash
chown system system /sys/class/camera/rear/rear_camtype
chmod 0775 /sys/class/camera/rear/rear_camtype
chown system system /sys/class/camera/rear/rear_camfw
chmod 0775 /sys/class/camera/rear/rear_camfw
chown system system /sys/class/camera/front/front_camtype
chmod 0775 /sys/class/camera/front/front_camtype

# Debug_Level
chown system radio /sys/devices/platform/sec_debug_level
chmod 664 /sys/devices/platform/sec_debug_level
chown system radio /sys/devices/virtual/misc/level/control
chmod 664 /sys/devices/virtual/misc/level/control

# battery sysfile
chown system radio /sys/class/power_supply/battery/batt_vol
chown system radio /sys/class/power_supply/battery/batt_vol_adc
chown system radio /sys/class/power_supply/battery/batt_vol_adc_cal
chown system radio /sys/class/power_supply/battery/batt_vol_adc_aver
chown system radio /sys/class/power_supply/battery/batt_vol_aver
chown system radio /sys/class/power_supply/battery/batt_temp
chown system radio /sys/class/power_supply/battery/batt_temp_adc
chown system radio /sys/class/power_supply/battery/batt_temp_adc_cal
chown system radio /sys/class/power_supply/battery/batt_temp_adc_aver
chown system radio /sys/class/power_supply/battery/batt_temp_aver
chown system radio /sys/class/power_supply/battery/batt_soc
chown system radio /sys/class/power_supply/battery/batt_reset_soc
chown system radio /sys/class/power_supply/battery/batt_fg_soc
chown system radio /sys/class/power_supply/battery/batt_test_mode
chown system radio /sys/class/power_supply/battery/batt_vibrator
chown system radio /sys/class/power_supply/battery/batt_camera
chown system radio /sys/class/power_supply/battery/batt_mp3
chown system radio /sys/class/power_supply/battery/batt_video
chown system radio /sys/class/power_supply/battery/batt_voice_call_2g
chown system radio /sys/class/power_supply/battery/batt_voice_call_3g
chown system radio /sys/class/power_supply/battery/batt_data_call
chown system radio /sys/class/power_supply/battery/batt_wifi
chown system radio /sys/class/power_supply/battery/batt_gps
chown system radio /sys/class/power_supply/battery/batt_temp_check
chown system radio /sys/class/power_supply/battery/batt_full_check
chown system radio /sys/class/power_supply/battery/batt_v_f_adc
chown system radio /sys/class/power_supply/battery/batt_chg_current
chown system radio /sys/class/power_supply/battery/batt_type
chown system radio /sys/class/power_supply/battery/batt_dev_state
chown system radio /sys/class/power_supply/battery/batt_compensation
chown system radio /sys/class/power_supply/battery/batt_booting
chown system radio /sys/class/power_supply/battery/batt_charging_source
chown system radio /sys/class/power_supply/battery/batt_lp_charging

service wpa_supplicant /system/bin/wpa_supplicant \
-Dnl80211 -puse_p2p_group_interface=1 -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 -ABKL
class main
disabled
oneshot

service dhcpcd_p2p /system/bin/dhcpcd -aABKL
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

#Tvout
service TvoutService_C /system/bin/bintvoutservice
class main
user system
group graphics

#for WiFi MFG(TestMode)
service mfgloader /system/bin/mfgloader
class main
disabled
oneshot

service wlandutservice /system/bin/wlandutservice
class main
user system
group wifi net_raw net_admin system inet
disabled
oneshot

service macloader /system/bin/macloader
class main
oneshot
# end of wifi

service dhcpcd_bnep0 /system/bin/dhcpcd -ABKL
class main
disabled
oneshot

# Enable NvCpuD, and set it to never poll config again
on boot
setprop nvcpud.enabled true
setprop nvcpud.config_refresh_ms -1

service nvcpud /system/bin/nvcpud
class main
user root
group root

# N1_ICS : we don't use emulated device
#service sdcard /system/bin/sdcard /data/media 1023 1023
# class late_start

# bugreport is triggered by the VOLUME-DOWN and VOLUME-UP keys
service bugreport /system/bin/dumpstate -d -v -o /data/storage/bugreports/bugreport
disabled
oneshot
keycodes 115 114
#BCM
service hciattach /system/bin/brcm_patchram_plus --enable_hci --scopcm=0,2,0,0,0,0,0,0,0,0 --i2s=1,0,0,1 \
--baudrate 3000000 --patchramdir /etc/firmware/ --enable_lpm --tosleep=5000 /dev/ttyHS2
user bluetooth
group bluetooth net_bt_admin
disabled

# for bluetooth rf test.
service bt_dut_cmd /system/bin/bcm_dut
group bluetooth net_bt_admin
disabled
oneshot

# Start FIL daemon
service fil-daemon /system/bin/fild -p /dev/ttyHS0 -s /dev/ttyACM0 -f /dev/ttyACM0 --with-bt3
class main
user radio
group log

# Recovery daemon: configure MSC partition
#service recoveryd /system/bin/recoveryd /dev/block/platform/sdhci-tegra.3/by-num/p5
# disabled
# class main
# user root
# group root
# oneshot

#on property:sys.shutdown.requested=1recovery
# start recoveryd

# test mode for RIL: Should probably be removed from production phones
service ril-daemon-test /system/bin/rild
socket rild-testmode stream 666 root radio
socket rild-debug stream 660 radio system
user root
group radio cache inet misc audio sdcard_rw
disabled

on property:ril.testmode=1
stop ril-daemon
start ril-daemon-test

on property:ril.testmode=0
stop ril-daemon-test
start ril-daemon

# End of testmode patches.

# Vibetonz
service immvibed /system/bin/immvibed
class core
user shell
group shell
oneshot

on property:persist.sys.storage_preload=1
mount ext4 /dev/block/mmcblk0p11 /preload nosuid nodev noatime wait ro
setprop storage.preload.complete 1

on property:persist.sys.storage_preload=0
exec /system/bin/umount /preload

#2012-06-25 framework hang detector
service sysmon /system/bin/sysmon
class main
user root
oneshot