FirehaK

init.rc

Jan 23rd, 2012
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 29.70 KB | None | 0 0
  1. on early-init
  2.     start ueventd
  3.  
  4.     write /sys/block/stl12/queue/read_ahead_kb 4
  5.     write /sys/block/stl13/queue/read_ahead_kb 4
  6.     write /sys/block/stl14/queue/read_ahead_kb 4
  7.     write /sys/devices/virtual/block/stl12/queue/read_ahead_kb 4
  8.     write /sys/devices/virtual/block/stl13/queue/read_ahead_kb 4
  9.     write /sys/devices/virtual/block/stl14/queue/read_ahead_kb 4
  10. on init
  11.  
  12. sysclktz 0
  13.  
  14. loglevel 3
  15.  
  16. # setup the global environment
  17.     export PATH /sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
  18.     export LD_LIBRARY_PATH /vendor/lib:/system/lib
  19.     export ANDROID_BOOTLOGO 1
  20.     export ANDROID_ROOT /system
  21.     export ANDROID_ASSETS /system/app
  22.     export ANDROID_DATA /data
  23.     export EXTERNAL_STORAGE /mnt/sdcard
  24.     export EXTERNAL_STORAGE2 /mnt/sdcard
  25.     export ASEC_MOUNTPOINT /mnt/asec
  26.     export LOOP_MOUNTPOINT /mnt/obb
  27.     export BOOTCLASSPATH /system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/core-junit.jar
  28. # insmod fsr/rfs modules
  29.     insmod /lib/modules/fsr.ko
  30.     insmod /lib/modules/fsr_stl.ko
  31.     insmod /lib/modules/rfs_glue.ko
  32.     insmod /lib/modules/rfs_fat.ko
  33.     insmod /lib/modules/ext4.ko
  34.     insmod /lib/modules/jbd2.ko
  35.     insmod /lib/modules/dpram.ko
  36. # Samsung Paramter driver
  37.     insmod /lib/modules/sec_param.ko
  38.  
  39. # Backward compatibility
  40.     symlink /system/etc /etc
  41.     symlink /sys/kernel/debug /d
  42.  
  43. # Right now vendor lives on the same filesystem as system,
  44. # but someday that may change.
  45.     symlink /system/vendor /vendor
  46.  
  47. # create mountpoints
  48.     mkdir /mnt 0775 root system
  49.     mkdir /mnt/sdcard 0000 system system
  50.  
  51. # Create cgroup mount point for cpu accounting
  52.     mkdir /acct
  53.     mount cgroup none /acct cpuacct
  54.     mkdir /acct/uid
  55.  
  56. # Backwards Compat - XXX: Going away in G*
  57.     symlink /mnt/sdcard /sdcard
  58.  
  59.     mkdir /system
  60.     mkdir /data 0771 system system
  61.     mkdir /persist 0771 system system
  62.     mkdir /cache 0770 system cache
  63.     mkdir /config 0500 root root
  64.     mkdir /persist 0771 system system
  65.  
  66.     # Directory for putting things only root should see.
  67.     mkdir /mnt/secure 0700 root root
  68.  
  69.     # Directory for staging bindmounts
  70.     mkdir /mnt/secure/staging 0700 root root
  71.  
  72.     # Directory-target for where the secure container
  73.     # imagefile directory will be bind-mounted
  74.     mkdir /mnt/secure/asec  0700 root root
  75.  
  76.     # Secure container public mount points.
  77.     mkdir /mnt/asec  0700 root system
  78.     mount tmpfs tmpfs /mnt/asec mode=0755,gid=1000
  79.  
  80.     # Filesystem image public mount points.
  81.     mkdir /mnt/obb 0700 root system
  82.     mount tmpfs tmpfs /mnt/obb mode=0755,gid=1000
  83.  
  84.     write /proc/sys/kernel/panic_on_oops 1
  85.     write /proc/sys/kernel/hung_task_timeout_secs 0
  86.     write /proc/cpu/alignment 4
  87.     write /proc/sys/kernel/sched_latency_ns 10000000
  88.     write /proc/sys/kernel/sched_wakeup_granularity_ns 2000000
  89.     write /proc/sys/kernel/sched_compat_yield 1
  90.     write /proc/sys/kernel/sched_child_runs_first 0
  91.    
  92.    # Mounting of /cache
  93.     mount ext4 /dev/stl14 /cache nosuid nodev check=no
  94.  
  95.     # Mounting of system/userdata is moved to 'on emmc' and 'on nand' sections
  96.     # We chown/chmod /data again so because mount is run as root + defaults
  97.     mount ext4 /dev/stl13 /data nosuid nodev check=no
  98.     chown system system /data
  99.     chmod 0771 /data
  100.  
  101.     # Mount /system rw first to give the filesystem a chance to save a checkpoint
  102. # MBjdpark 20110412 : Fixed for testSystemPermission
  103. #    mount ext4 /dev/stl12 /system rw check=no
  104.     mount ext4 /dev/stl12 /system ro check=no
  105. #    mount ext4 /dev/stl12 /system check=no
  106.     chmod 0770 /dev/stl9
  107.     chmod 0770 /dev/stl10
  108.     chmod 0770 /dev/stl11
  109.     chmod 0770 /dev/stl12
  110.     chmod 0770 /dev/stl13
  111.     chmod 0770 /dev/stl14
  112.     chmod 0770 /dev/stl15
  113.  
  114.     chmod 0770 /dev/bml7
  115.     chmod 0770 /dev/bml9
  116.     chmod 0770 /dev/bml10
  117.     chmod 0770 /dev/bml11
  118.     chmod 0770 /dev/bml12
  119.     chmod 0770 /dev/bml13
  120.     chmod 0770 /dev/bml14
  121.     chmod 0770 /dev/bml15
  122.  
  123. # Create cgroup mount points for process groups
  124.     mkdir /dev/cpuctl
  125.     mount cgroup none /dev/cpuctl cpu
  126.     chown system system /dev/cpuctl
  127.     chown system system /dev/cpuctl/tasks
  128.     chmod 0777 /dev/cpuctl/tasks
  129.     write /dev/cpuctl/cpu.shares 1024
  130.  
  131.     mkdir /dev/cpuctl/fg_boost
  132.     chown system system /dev/cpuctl/fg_boost/tasks
  133.     chmod 0777 /dev/cpuctl/fg_boost/tasks
  134.     write /dev/cpuctl/fg_boost/cpu.shares 1024
  135.  
  136.     mkdir /dev/cpuctl/bg_non_interactive
  137.     chown system system /dev/cpuctl/bg_non_interactive/tasks
  138.     chmod 0777 /dev/cpuctl/bg_non_interactive/tasks
  139.     # 5.0 %
  140.     write /dev/cpuctl/bg_non_interactive/cpu.shares 52
  141.  
  142. on fs
  143. # mount mtd partitions
  144.     # Mount /system rw first to give the filesystem a chance to save a checkpoint
  145.     # mount yaffs2 mtd@system /system
  146.     #mount yaffs2 mtd@system /system rw remount
  147.     #mount yaffs2 mtd@userdata /data nosuid nodev
  148.     #mount yaffs2 mtd@persist /persist nosuid nodev
  149.     #mount yaffs2 mtd@cache /cache nosuid nodev
  150.     #mount yaffs2 mtd@persist /persist nosuid nodev
  151.     mount ext4 mtd@system /system check=no
  152.     mount ext4 mtd@userdata /dbdata nosuid nodev check=no
  153.     mount ext4 mtd@cache /cache nosuid nodev check=no
  154.     mount ext4 mtd@data /data nosuid nodev check=no
  155. #on emmc-fs
  156. # mount mmc partitions
  157.     #wait /dev/block/mmcblk0p12
  158.     #mount ext4 /dev/block/mmcblk0p12 /system rw barrier=1
  159.     #wait /dev/block/mmcblk0p13
  160.     #exec /system/bin/e2fsck -p /dev/block/mmcblk0p13
  161.     #mount ext4 /dev/block/mmcblk0p13 /data nosuid nodev barrier=1 noauto_da_alloc
  162.     #mount ext4 /dev/block/mmcblk0p14 /persist nosuid nodev barrier=1
  163.     #mount ext4 /dev/block/mmcblk0p15 /cache nosuid nodev barrier=1
  164.  
  165. on post-fs
  166.     # once everything is setup, no need to modify /
  167.     mount rootfs rootfs / ro remount
  168.  
  169.     # We chown/chmod /data again so because mount is run as root + defaults
  170.     chown system system /data
  171.     chmod 0771 /data
  172.  
  173.     # Mounting of persist is moved to 'on emmc-fs' and 'on fs' sections
  174.     # We chown/chmod /persist again so because mount is run as root + defaults
  175.     #chown system system /persist
  176.     #chmod 0771 /persist
  177.     #chmod 0666 /sys/devices/platform/msm_sdcc.1/polling
  178.     #chmod 0666 /sys/devices/platform/msm_sdcc.2/polling
  179.     #chmod 0666 /sys/devices/platform/msm_sdcc.3/polling
  180.     #chmod 0666 /sys/devices/platform/msm_sdcc.4/polling
  181.  
  182.     # Chown polling nodes as needed from UI running on system server
  183.     #chown system system /sys/devices/platform/msm_sdcc.1/polling
  184.     #chown system system /sys/devices/platform/msm_sdcc.2/polling
  185.     #chown system system /sys/devices/platform/msm_sdcc.3/polling
  186.     #chown system system /sys/devices/platform/msm_sdcc.4/polling
  187.  
  188.     # Create dump dir and collect dumps.
  189.     # Do this before we mount cache so eventually we can use cache for
  190.     # storing dumps on platforms which do not have a dedicated dump partition.
  191.    
  192.     mkdir /data/dontpanic
  193.     chown root log /data/dontpanic
  194.     chmod 0750 /data/dontpanic
  195.  
  196.     #bnd_stkim 20110316 for Cricket Hiddenmenu
  197.     mkdir /data/hiddenmenu/
  198.     chown radio radio /data/hiddenmenu/
  199.     chmod 0750 /data/hiddenmenu/
  200.  
  201.     # for Gps Clp certificates
  202.  
  203.     mkdir /data/clp
  204.     chmod 0777 /data/clp
  205.  
  206.     # For Factory reset Imaplementation on System partition (once cache is implemented we can remove it)
  207.     # mkdir /system/recovery
  208.     # chmod 0777 /system/recovery
  209.  
  210.     # Collect apanic data, free resources and re-arm trigger
  211.     copy /proc/apanic_console /data/dontpanic/apanic_console
  212.     chown root log /data/dontpanic/apanic_console
  213.     chmod 0640 /data/dontpanic/apanic_console
  214.  
  215.     copy /proc/apanic_threads /data/dontpanic/apanic_threads
  216.     chown root log /data/dontpanic/apanic_threads
  217.     chmod 0640 /data/dontpanic/apanic_threads
  218.  
  219.     write /proc/apanic_console 1
  220.  
  221.     # Collect ramconsole data
  222.     copy /proc/last_kmsg /data/dontpanic/last_kmsg
  223.     chown root log /data/dontpanic/last_kmsg
  224.     chmod 0640 /data/dontpanic/last_kmsg
  225.  
  226.     # Same reason as /data above
  227.     chown system cache /cache
  228.     chmod 0770 /cache
  229.  
  230.     # cache folder for bigger file than /cache
  231.     mkdir /data/cache
  232.     chown system cache /data/cache
  233.     chmod 0770 /data/cache
  234.  
  235.     # This may have been created by the recovery system with odd permissions
  236.     chown system cache /cache/recovery
  237.     chmod 0770 /cache/recovery
  238.  
  239.     chmod 0660 /dev/graphics/fb0
  240.  
  241.     #change permissions on vmallocinfo so we can grab it from bugreports
  242.     chown root log /proc/vmallocinfo
  243.     chmod 0440 /proc/vmallocinfo
  244.  
  245.     #change permissions on kmsg & sysrq-trigger so bugreports can grab kthread stacks
  246.     chown root system /proc/kmsg
  247.     chmod 0440 /proc/kmsg
  248.     chown root system /proc/sysrq-trigger
  249.     chmod 0220 /proc/sysrq-trigger
  250.  
  251. # create basic filesystem structure
  252.     mkdir /data/misc 01771 system misc
  253.     mkdir /data/misc/bluetoothd 0770 bluetooth bluetooth
  254.     mkdir /data/misc/bluetooth 0770 system system
  255.     mkdir /data/misc/keystore 0700 keystore keystore
  256.     mkdir /data/misc/vpn 0770 system system
  257.     mkdir /data/misc/systemkeys 0700 system system
  258.     mkdir /data/misc/vpn/profiles 0770 system system
  259.     # give system access to wpa_supplicant.conf for backup and restore
  260.  
  261. #    mkdir /data/misc/wifi 0770 wifi wifi
  262. #    chmod 0770 /data/misc/wifi
  263. #    chmod 0660 /data/misc/wifi/wpa_supplicant.conf
  264. # to enable wifi
  265.     mkdir /data/wifi 0777 wifi wifi
  266.     chown wifi wifi /data/wifi
  267.     chmod 0777 /data/wifi
  268.     mkdir /data/misc/wifi 0771 wifi wifi
  269.     chown wifi wifi /data/misc/wifi
  270.     chmod 0777 /data/misc/wifi
  271.     mkdir /data/misc/dhcp 0777 dhcp dhcp
  272.     chown dhcp dhcp /data/misc/dhcp
  273.     chmod 0777 /data/misc/dhcp
  274.     mkdir /data/misc/wifi/sockets 0777 wifi wifi
  275.     chown wifi wifi /data/misc/wifi/sockets
  276.     chmod 0777 /data/misc/wifi/sockets
  277.     chmod 0664 /system/etc/wifi/wpa_supplicant.conf
  278. # end of wifi
  279.  
  280.     mkdir /data/local 0771 shell shell
  281.     mkdir /data/local/tmp 0771 shell shell
  282.     mkdir /data/data 0771 system system
  283.     mkdir /data/app-private 0771 system system
  284.     mkdir /data/app 0771 system system
  285.     chown system system /data/app
  286.     chmod 0771 /data/app
  287.     mkdir /data/property 0700 root root
  288.     mkdir /data/radio 0770 radio radio
  289.     mkdir /data/misc/sensors 0777 system misc
  290.     # create log system
  291.     mkdir /data/log  0777 root root
  292.     chmod 0777 /data/log
  293.     mkdir /data/anr  0777 system system
  294.  
  295. # MBjdpark 2010.12.13 : Fixed problem with transferring carrier image to PDA in user mode
  296. # CONFIG_IPC_GENERIC_PST
  297.     mkdir /data/local/PST 0755 radio radio
  298.     chown radio radio /data/local/PST
  299.     chmod 0755 /data/local/PST
  300.     # create dalvik-cache and double-check the perms
  301.     mkdir /data/dalvik-cache 0771 system system
  302.     chown system system /data/dalvik-cache
  303.     chmod 0771 /data/dalvik-cache
  304.  
  305.     # create the lost+found directories, so as to enforce our permissions
  306.     mkdir /data/lost+found 0770
  307.     mkdir /cache/lost+found 0770
  308.  
  309.     # double check the perms, in case lost+found already exists, and set owner
  310.     chown root root /data/lost+found
  311.     chmod 0770 /data/lost+found
  312.     chown root root /cache/lost+found
  313.     chmod 0770 /cache/lost+found
  314.  
  315.     # create fumo
  316.     mkdir /cache/fumo 0770
  317.     chown system system /cache/fumo
  318.     chmod 0770 /cache/fumo
  319.  
  320. # to enable wifi
  321.     setprop wifi.interface "eth0"
  322.  
  323.     chown root root /system/bin/wlservice
  324.     chmod 6777 /system/bin/wlservice
  325.     mkdir /data/misc/wifi 0777 wifi wifi
  326.     chmod 0777 /data/misc/wifi/
  327.     mkdir /data/misc/dhcp 0777 dhcp dhcp
  328.     mkdir /data/misc/wifi/sockets 0777 wifi wifi
  329. # for WAPI CERT
  330. #    mkdir /data/misc/wifi/cert 0777 wifi wifi
  331. #    mkdir /data/misc/wifi/cert/as 0777 wifi wifi
  332. #    mkdir /data/misc/wifi/cert/user 0777 wifi wifi
  333. # end of wifi
  334.  
  335.     # change the permissionsensor chips
  336.     chmod 0660 /dev/proximity
  337.     chmod 0660 /dev/mmc31xx
  338.     chmod 0660 /dev/bma_accel
  339.     chmod 0660 /dev/kr3dm_accel
  340.     chmod 0666 /data/misc/sensors/ecs_nvm
  341.     chmod 0666 /data/misc/sensors/accel_offset
  342.     chmod 0660 /dev/ecompass_ctrl
  343.  
  344.     chown system system /dev/mmc31xx   
  345.     chown system system /dev/kr3dm_accel   
  346.     chown system system /dev/ecompass_ctrl 
  347.     chown system system /dev/proximity 
  348.  
  349.     # give read permission for others
  350.     # this allows dumpsate to execute procrank
  351.     # remove this for final build!
  352.     chmod 0444 /proc/kpagecount
  353.     chmod 0444 /proc/kpageflags
  354.  
  355. on boot
  356. # basic network init
  357.     ifup lo
  358.     hostname localhost
  359.     domainname localdomain
  360.  
  361. # set RLIMIT_NICE to allow priorities from 19 to -20
  362.     setrlimit 13 40 40
  363.  
  364. # bootsnd
  365.     setprop audioflinger.bootsnd 1
  366. # end of bootsnd
  367. # Define the oom_adj values for the classes of processes that can be
  368. # killed by the kernel.  These are used in ActivityManagerService.
  369.     setprop ro.FOREGROUND_APP_ADJ 0
  370.     setprop ro.VISIBLE_APP_ADJ 1
  371.     setprop ro.PERCEPTIBLE_APP_ADJ 2
  372.     setprop ro.HEAVY_WEIGHT_APP_ADJ 3
  373.     setprop ro.SECONDARY_SERVER_ADJ 4
  374.     setprop ro.BACKUP_APP_ADJ 5
  375.     setprop ro.HOME_APP_ADJ 6
  376.     setprop ro.HIDDEN_APP_MIN_ADJ 7
  377.     setprop ro.EMPTY_APP_ADJ 15
  378.  
  379. # Define the memory thresholds at which the above process classes will
  380. # be killed.  These numbers are in pages (4k).
  381.     setprop ro.FOREGROUND_APP_MEM 2048
  382.     setprop ro.VISIBLE_APP_MEM 3072
  383.     setprop ro.PERCEPTIBLE_APP_MEM 4096
  384.     setprop ro.HEAVY_WEIGHT_APP_MEM 4096
  385.     setprop ro.SECONDARY_SERVER_MEM 6144
  386.     setprop ro.BACKUP_APP_MEM 6144
  387.     setprop ro.HOME_APP_MEM 6144
  388.     setprop ro.HIDDEN_APP_MEM 7168
  389.     setprop ro.EMPTY_APP_MEM 10240
  390.  
  391. # Write value must be consistent with the above properties.
  392. # Note that the driver only supports 6 slots, so we have combined some of
  393. # the classes into the same memory level; the associated processes of higher
  394. # classes will still be killed first.
  395.     write /sys/module/lowmemorykiller/parameters/adj 0,1,2,4,7,15
  396.  
  397.     write /proc/sys/vm/overcommit_memory 1
  398.     write /proc/sys/vm/min_free_order_shift 4
  399.     write /sys/module/lowmemorykiller/parameters/minfree 2048,3072,4096,6144,7168,10240
  400.  
  401.     # Set init its forked children's oom_adj.
  402.     write /proc/1/oom_adj -16
  403.  
  404.     # Tweak background writeout
  405.     write /proc/sys/vm/dirty_expire_centisecs 200
  406.     write /proc/sys/vm/dirty_background_ratio  5
  407.  
  408.     # Permissions for System Server and daemons.
  409.     chown radio system /sys/android_power/state
  410.     chown radio system /sys/android_power/request_state
  411.     chown radio system /sys/android_power/acquire_full_wake_lock
  412.     chown radio system /sys/android_power/acquire_partial_wake_lock
  413.     chown radio system /sys/android_power/release_wake_lock
  414.     chown radio system /sys/power/state
  415.     chown radio system /sys/power/wake_lock
  416.     chown radio system /sys/power/wake_unlock
  417.     chmod 0660 /sys/power/state
  418.     chmod 0660 /sys/power/wake_lock
  419.     chmod 0660 /sys/power/wake_unlock
  420.     chown system system /sys/class/timed_output/vibrator/enable
  421.     chown system system /sys/class/leds/keyboard-backlight/brightness
  422.     chown system system /sys/class/leds/lcd-backlight/brightness
  423.     chown system system /sys/class/leds/button-backlight/brightness
  424.     chown system system /sys/class/leds/jogball-backlight/brightness
  425.     chown system system /sys/class/leds/red/trigger
  426.     chown system system /sys/class/leds/blue/trigger
  427.     chown system system /sys/class/leds/red/brightness
  428.     chown system system /sys/class/leds/green/brightness
  429.     chown system system /sys/class/leds/blue/brightness
  430.     chown system system /sys/class/leds/red/device/grpfreq
  431.     chown system system /sys/class/leds/red/device/grppwm
  432.     chown system system /sys/class/leds/red/device/blink
  433.     chown system system /sys/class/leds/red/brightness
  434.     chown system system /sys/class/leds/green/brightness
  435.     chown system system /sys/class/leds/blue/brightness
  436.     chown system system /sys/class/leds/red/device/grpfreq
  437.     chown system system /sys/class/leds/red/device/grppwm
  438.     chown system system /sys/class/leds/red/device/blink
  439.     chown system system /sys/class/keypad-backlight/backlight/keypad_bl_time    
  440.     chown system system /sys/class/timed_output/vibrator/enable
  441.     chown system system /sys/module/sco/parameters/disable_esco
  442.     chown system system /sys/kernel/ipv4/tcp_wmem_min
  443.     chown system system /sys/kernel/ipv4/tcp_wmem_def
  444.     chown system system /sys/kernel/ipv4/tcp_wmem_max
  445.     chown system system /sys/kernel/ipv4/tcp_rmem_min
  446.     chown system system /sys/kernel/ipv4/tcp_rmem_def
  447.     chown system system /sys/kernel/ipv4/tcp_rmem_max
  448.     chown root radio /proc/cmdline
  449.    
  450.     chown system system /sys/class/power_supply/battery/vibrator
  451.     chown system system /sys/class/power_supply/battery/keypad_backlight
  452.     chown system system /sys/class/power_supply/battery/lcd_backlightl
  453.     chown system system /sys/class/power_supply/battery/lcd_dimming
  454.     chown system system /sys/class/power_supply/battery/camera_down
  455.     chown system system /sys/class/power_supply/battery/camcoder_down
  456.     chown system system /sys/class/power_supply/battery/amp_down
  457.     chown system system /sys/class/power_supply/battery/video_down
  458.     chown system system /sys/class/power_supply/battery/bt_down
  459.     chown system system /sys/class/power_supply/battery/camera_flash_down
  460.     chown system system /sys/class/power_supply/battery/batt_low_noty
  461.     chown radio radio /sys/class/power_supply/battery/talk_wcdma
  462.     chown radio radio /sys/class/power_supply/battery/talk_gsm
  463.     chown radio radio /sys/class/power_supply/battery/data_call
  464.     chown system system /sys/class/power_supply/battery/control_tmp
  465.     chown radio radio /sys/class/power_supply/battery/fg_soc
  466.     chown system system /sys/class/power_supply/battery/reset_soc
  467.     chown sdcard_rw sdcard_rw /sys/class/power_supply/battery/chg_temp_err_except_check
  468.     chown system system /sys/class/power_supply/battery/batt_chg_current
  469.     chown system system /sys/class/power_supply/battery/solar_status
  470.    
  471. # sound text data file
  472.     chmod 0777 /system/etc/audio/soundbooster.txt
  473.     chmod 0777 /system/etc/audio/aeqcoe.txt
  474.     chmod 0777 /system/etc/audio/lmfilter.txt
  475.     chmod 0777 /system/etc/audio/eqfilter.txt
  476.     chmod 0777 /system/etc/audio/situation.txt
  477.     chmod 0777 /system/etc/audio/stream_headset.txt
  478.     chmod 0777 /system/etc/audio/stream_speaker.txt
  479.  
  480. #Touch multi-touch permissions
  481. #    chmod 0666 /sys/class/sec/ts/firmware1
  482.  
  483. #Permissions for qmuxd
  484.     chown radio radio /dev/smdcntl0
  485.     chown radio radio /dev/smdcntl1
  486.     chown radio radio /dev/smdcntl2
  487.  
  488. # +++++++++++++++++++++++++++++++++++++++++++
  489.  
  490. #Define modem related settings
  491.     setprop ro.radio.use-ppp yes
  492. # for Bluetooth
  493.     chown bluetooth bluetooth /sys/module/bluetooth_power/parameters/power
  494.     chown bluetooth bluetooth /proc/bluetooth/sleep/proto
  495.     chown system system /sys/module/sco/parameters/disable_esco
  496.     chmod 0660 /sys/module/bluetooth_power/parameters/power
  497.     chmod 0660 /proc/bluetooth/sleep/proto
  498.  
  499.     chown bluetooth bluetooth /dev/uinput
  500.     chmod 0660 /dev/uinput
  501.     chown bluetooth bluetooth /dev/ttyHS0
  502.     chmod 0660 /dev/ttyHS0
  503.  
  504.     chmod 0775 /sys/class/rfkill/rfkill0/state
  505.     chmod 0775 /sys/class/rfkill/rfkill1/state
  506.     chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
  507.     chown bluetooth bluetooth /sys/class/rfkill/rfkill1/state
  508.  
  509.     # chmod 6777 /system/bin/brcm_dutMode
  510. #SecFeature.SprintHotspot start
  511.     chown system system /system/bin/softap_event
  512.     chmod 4775 /system/bin/softap_event
  513. ##SecFeature.SprintHotspot end
  514. # +++++++++++++++++++++++++++++++++++++++++++
  515.  
  516.     chown system system /sys/module/g_android/parameters/product_id
  517.     chown system system /sys/devices/platform/msm_sdcc.1/polling
  518.     chown system system /sys/devices/platform/msm_sdcc.2/polling
  519.     chown system system /sys/devices/platform/msm_sdcc.3/polling
  520.     chown system system /sys/devices/platform/msm_sdcc.4/polling
  521.     chown system system /sys/devices/platform/android_usb/composition
  522.     chown system system /sys/devices/platform/android_usb/remote_wakeup
  523. # MAX8899 headset detect
  524.     chown radio system /sys/class/switch/h2w/state
  525.     chown radio system /sys/class/switch/sec_earbutton/state
  526.  
  527. # Force Power Down
  528.     chmod 0660 /sys/class/sec/pm/power_down
  529.     chown root system /sys/class/sec/pm/power_down
  530.  
  531. # CPU Governor
  532.     #chmod 0660 /sys/class/sec/cpu/cpu_gov
  533.     #chown root system /sys/class/sec/cpu/cpu_gov
  534.  
  535.     chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
  536.     chown root system /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
  537.     chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
  538.     chown root system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
  539.  
  540. # Define TCP buffer sizes for various networks
  541. #   ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
  542.     setprop net.tcp.buffersize.default 4096,87380,110208,4096,16384,110208
  543.     setprop net.tcp.buffersize.wifi    4095,87380,110208,4096,16384,110208
  544.     setprop net.tcp.buffersize.umts    4094,87380,110208,4096,16384,110208
  545.     setprop net.tcp.buffersize.edge    4093,26280,35040,4096,16384,35040
  546.     setprop net.tcp.buffersize.gprs    4092,8760,11680,4096,8760,11680
  547.     setprop net.tcp.buffersize.lte     4094,87380,196608,4096,16384,196608
  548.     setprop net.tcp.buffersize.evdo_b  4094,87380,262144,4096,16384,262144
  549.  
  550. # Assign TCP buffer thresholds to be ceiling value of technology maximums
  551. # Increased technology maximums should be reflected here.
  552.     write /proc/sys/net/core/rmem_max  262144
  553.     write /proc/sys/net/core/wmem_max  262144
  554.  
  555.     class_start default
  556.  
  557. #  MBkjpark 2011.04.15 : CTS Permission fail issue (remove others write permission, so chown group)
  558.     chown root system /sys/class/lightsensor/switch_cmd/lightsensor_file_cmd
  559.     chown root system /sys/class/proxsensor/switch_cmd/proxsensor_onoff_ctrl
  560.     chown root system /sys/class/sec/ts/firmware1
  561.     chown root system /sys/class/sec/ts/raw
  562. #  MBjslee 2011.04.17 : Factory CMD (Fuel Gauge Reset CMD)Permission fail
  563.     chown root system /sys/class/power_supply/battery/reset_soc
  564.    
  565. # CIQ
  566.     chown system system /dev/ttyCIQ00
  567.     chown system system /dev/ttyCIQ10
  568.  
  569. # create data/gps for GPS daemon
  570.     mkdir /data/gps 770 gps system
  571.     chown gps system /data/gps 
  572.  
  573. #RescueStarter
  574. chown root root /system/bin/RescueStarter
  575. chmod 755 /system/bin/RescueStarter
  576. chown root root /system/bin/RescueServer
  577. chmod 755 /system/bin/RescueServer
  578.  
  579.  
  580. ## Daemon processes to be run by init.
  581. ##
  582. service ueventd /sbin/ueventd
  583.     critical
  584.  
  585. service console /system/bin/sh
  586.     console
  587. #    disabled
  588.     user shell
  589.     group log
  590.  
  591. #on property:ro.secure=0
  592. #    start console
  593.  
  594. # adbd is controlled by the persist.service.adb.enable system property
  595. service adbd /sbin/adbd
  596.     disabled
  597.  
  598. # adbd on at boot in emulator
  599. on property:ro.kernel.qemu=1
  600.     start adbd
  601.  
  602. on property:persist.service.adb.enable=1
  603.     start adbd
  604.  
  605. on property:persist.service.adb.enable=0
  606.     stop adbd
  607. on property:persist.service.slate_mode=1
  608.     write /sys/class/power_supply/battery/batt_slate_mode 1
  609.  
  610. on property:persist.service.slate_mode=0
  611.     write /sys/class/power_supply/battery/batt_slate_mode 0
  612.  
  613. service playlogo /system/bin/playlogo
  614.     user root
  615.     oneshot
  616.  
  617. service servicemanager /system/bin/servicemanager
  618.     user system
  619.     critical
  620.     onrestart restart zygote
  621.     onrestart restart media
  622.  
  623. service playsound /system/bin/playsound
  624.     user media
  625.     group system
  626.     disabled
  627.     oneshot
  628.  
  629.  
  630. service vold /system/bin/vold
  631.     socket vold stream 0660 root mount
  632.     ioprio be 2
  633.     socket enc_report stream 0660 root mount
  634.  
  635. # to enable wifi
  636. service wpa_supplicant /system/bin/wpa_supplicant -Dwext -ieth0 -c/data/wifi/bcm_supp.conf
  637.    disabled
  638.    oneshot
  639.  
  640. service dhcpcd /system/bin/dhcpcd -BKL eth0
  641.    disabled
  642.    oneshot
  643.  
  644. service softap_event /system/bin/softap_event
  645.     user system
  646.     group wifi net_raw net_admin system inet
  647.     disabled
  648.     oneshot
  649.  
  650. service ifcfg_eth0 /system/bin/ifconfig eth0 up
  651.     disabled
  652.     oneshot
  653.  
  654. #for WiFi MFG(TestMode)
  655. #SecFeatue.CDMA_WIFI
  656. service mfgloader /system/bin/mfgloader
  657.     disabled
  658.     oneshot
  659.  
  660. service wlandutservice /system/bin/wlandutservice
  661.     disabled
  662.     oneshot
  663.  
  664. service macloader /system/bin/macloader
  665.     oneshot
  666.  
  667. service wlservice /system/bin/wlservice
  668.     disabled
  669.     oneshot
  670. # end of wifi
  671.  
  672. service netd /system/bin/netd
  673.     socket netd stream 0660 root system
  674.  
  675. service debuggerd /system/bin/debuggerd
  676.  
  677. service qmuxd /system/bin/qmuxd
  678.     user radio
  679.     group system radio inet
  680. # MBjdpark 2010.12.13 : Fixed problem with transferring carrier image to PDA in user mode
  681. # CONFIG_IPC_GENERIC_PST
  682. service ril-daemon /system/bin/rild
  683.     socket rild stream 660 root radio
  684.     socket rild-debug stream 660 radio system
  685.     user root
  686.     group radio cache inet misc audio sdcard_rw qcom_oncrpc diag log graphics system
  687. #service port-bridge /system/bin/port-bridge /dev/smd0 /dev/ttyGS0
  688.  
  689. # GPS Daemon
  690. service gps-daemon /system/bin/gpsd
  691.     socket gps seqpacket 0660 gps system
  692.     user gps
  693.     group system inet
  694.  
  695. service DR-daemon /system/bin/drexe
  696.     user root
  697.     group system radio inet net_raw
  698.  
  699. service mobex-daemon /system/bin/npsmobex
  700.     user root
  701.  
  702. service pppd_cdma /system/bin/pppd_runner
  703.    user root
  704.    group radio cache inet misc system
  705.    disabled
  706.    oneshot
  707.  
  708. service zygote /system/bin/app_process -Xzygote /system/bin --zygote --start-system-server
  709.     socket zygote stream 666
  710.     onrestart write /sys/android_power/request_state wake
  711.     onrestart write /sys/power/state on
  712.     onrestart restart media
  713.     onrestart restart netd
  714.  
  715. service media /system/bin/mediaserver
  716.     user media
  717.     group system audio camera graphics inet net_bt net_bt_admin net_raw  qcom_oncrpc
  718.     ioprio rt 4
  719.     onrestart setprop audioflinger.bootsnd 0
  720.  
  721. service oovoo /system/bin/ovmservice
  722.     user media
  723.     group system audio camera graphics inet net_bt net_bt_admin
  724. service samsungloop /system/bin/samsungloop
  725.     user graphics
  726.     group graphics
  727.     disabled
  728.     oneshot
  729.  
  730. # Start Bluetooth =========================================================================
  731. service dbus /system/bin/dbus-daemon --system --nofork
  732.     socket dbus stream 660 bluetooth bluetooth
  733.     user bluetooth
  734.     group bluetooth net_bt_admin
  735.  
  736. service btld /system/bin/logwrapper /system/bin/btld -hb 3000000 -hp /dev/ttyHS0 -lpm 1
  737. #    user root
  738.     group bluetooth net_bt_admin
  739.     disabled
  740.     oneshot
  741.  
  742. service obexd /system/bin/logwrapper /system/bin/obexd
  743.     #socket bluetooth stream 660 bluetooth bluetooth
  744.     #socket dbus_bluetooth stream 660 bluetooth bluetooth
  745.     # init.rc does not yet support applying capabilities, so run as root and
  746.     # let obexd drop uid to bluetooth with the right linux capabilities
  747. #    user root
  748.     group bluetooth net_bt_admin
  749.     disabled
  750.     oneshot
  751.  
  752. service bluetoothd /system/bin/logwrapper /system/bin/bluetoothd -n /etc/bluez/main.conf
  753.     socket bluetooth stream 660 bluetooth bluetooth
  754.     socket dbus_bluetooth stream 660 bluetooth bluetooth
  755.     # init.rc does not yet support applying capabilities, so run as root and
  756.     # let bluetoothd drop uid to bluetooth with the right linux capabilities
  757.     group bluetooth net_bt_admin misc
  758.     disabled
  759.  
  760. service hfag /system/bin/sdptool add --channel=10 HFAG
  761.     user bluetooth
  762.     group bluetooth net_bt_admin
  763.     disabled
  764.     oneshot
  765.  
  766. service hsag /system/bin/sdptool add --channel=11 HSAG
  767.     user bluetooth
  768.     group bluetooth net_bt_admin
  769.     disabled
  770.     oneshot
  771.  
  772. service opush /system/bin/sdptool add --channel=12 OPUSH
  773.     user bluetooth
  774.     group bluetooth net_bt_admin
  775.     disabled
  776.     oneshot
  777.  
  778. service pbap /system/bin/sdptool add --channel=19 PBAP
  779.     user bluetooth
  780.     group bluetooth net_bt_admin
  781.     disabled
  782.     oneshot
  783. # End of Bluetooth =========================================================================
  784.  
  785.  
  786. service abtfilt /system/bin/abtfilt -c -d -z -n
  787.     disabled
  788.     oneshot
  789.  
  790. service installd /system/bin/installd
  791.     socket installd stream 600 system system
  792.  
  793. service flash_recovery /system/etc/install-recovery.sh
  794.     oneshot
  795.  
  796. service racoon /system/bin/racoon
  797.     socket racoon stream 600 system system
  798.     # racoon will setuid to vpn after getting necessary resources.
  799.     group net_admin
  800.     disabled
  801.     oneshot
  802.  
  803. service mtpd /system/bin/mtpd
  804.     socket mtpd stream 600 system system
  805.     user vpn
  806.     group vpn net_admin net_raw
  807.     disabled
  808.     oneshot
  809.    
  810. service iqmsd /system/bin/iqmsd
  811.     disabled
  812.  
  813. on property:service.iq.active=1
  814.     start iqmsd
  815.  
  816. on property:service.iq.active=0
  817.     stop iqmsd
  818.  
  819. service keystore /system/bin/keystore /data/misc/keystore
  820.     user keystore
  821.     group keystore
  822.     socket keystore stream 666
  823.  
  824. service dumpstate /system/bin/dumpstate -s
  825.     socket dumpstate stream 0660 shell log
  826.     disabled
  827.     oneshot
  828.  
  829. service qcom-post-boot /system/bin/sh /init.qcom.post_boot.sh
  830.     user root
  831.     disabled
  832.     oneshot
  833.  
  834. on property:dev.bootdone=1
  835.     start qcom-post-boot
  836.  
  837. #service dhcp-service /system/bin/netcfg eth0 dhcp
  838. #        oneshot
  839. #
  840. on property:dev.bootcomplete=1
  841.         stop dhcp-service
  842.         start dhcp-service
  843.        
  844. service memsicd /system/bin/memsicd
  845.     user system
  846.     group system
  847.     oneshot
  848.  
  849. #added by JH
  850. # for Mobile AP
  851. service mobileAP /system/bin/wlp2pservice
  852.  
  853. chmod 555 /system/etc/mobileap/enable_ppp.sh
  854. chmod 555 /system/etc/mobileap/enable_eth.sh
  855. chmod 555 /system/etc/mobileap/initialize_nat.sh
  856. chmod 555 /system/etc/mobileap/tethering_enable.sh
  857. chmod 555 /system/etc/mobileap/enable_uwbr.sh
  858. # end of Mobile AP
  859. #added by JH
  860.  
  861. ## Sprint 3rd party - LogMeIn - js0516.park
  862. chown nobody.shell /RescueStarter
  863. chmod 755 /RescueStarter
  864. chown nobody.shell /RescueServer
  865. chmod 755 /RescueServer
  866.  
  867. #Start RescueStarter for Rescue+Mobile
  868. service RescueStarter /system/bin/RescueStarter
  869. user nobody
  870. group input graphics
  871. oneshot
Add Comment
Please, Sign In to add comment