PageRenderTime 27ms CodeModel.GetById 15ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 0ms

/init.rc

http://github.com/kyapa/sc02b_initramfs
text | 828 lines | 681 code | 147 blank | 0 comment | 0 complexity | 5a1964b6b37102181fe1972cb7b43feb MD5 | raw file
  1on early-init
  2    start ueventd
  3
  4on init
  5
  6sysclktz 0
  7
  8loglevel 3
  9
 10# setup the global environment
 11    export PATH /sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
 12    export LD_LIBRARY_PATH /vendor/lib:/system/lib
 13    export ANDROID_BOOTLOGO 1
 14    export ANDROID_ROOT /system
 15    export ANDROID_ASSETS /system/app
 16    export ANDROID_DATA /data
 17    
 18    export EXTERNAL_STORAGE /mnt/sdcard
 19    export EXTERNAL_STORAGE2 /mnt/sdcard/external_sd
 20    export USBHOST_STORAGE /mnt/sdcard/usbStorage
 21
 22    export ASEC_MOUNTPOINT /mnt/asec
 23    export LOOP_MOUNTPOINT /mnt/obb
 24    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
 25
 26# Backward compatibility
 27    symlink /system/etc /etc
 28    symlink /sys/kernel/debug /d
 29
 30# Right now vendor lives on the same filesystem as system,
 31# but someday that may change.
 32    symlink /system/vendor /vendor
 33
 34# create mountpoints
 35    mkdir /mnt 0775 root system
 36    mkdir /mnt/sdcard 0000 system system
 37
 38# Create cgroup mount point for cpu accounting
 39    mkdir /acct
 40    mount cgroup none /acct cpuacct
 41    mkdir /acct/uid
 42
 43#add booting sound property 
 44	setprop audioflinger.bootsnd 1
 45
 46#S1_JPN_NTT
 47#add camera sound property
 48    setprop ro.camera.sound.forced 1  	       
 49
 50# Backwards Compat - XXX: Going away in G*
 51    symlink /mnt/sdcard /sdcard
 52
 53    mkdir /system
 54    mkdir /dbdata 0771 system system
 55    mkdir /data 0771 system system
 56    mkdir /cache 0770 system cache
 57    mkdir /config 0500 root root
 58
 59    mkdir /efs 0771 system system
 60    chown system system /efs
 61    chmod 0771 /efs
 62
 63    # Directory for putting things only root should see.
 64    mkdir /mnt/secure 0700 root root
 65
 66    # Directory for staging bindmounts
 67    mkdir /mnt/secure/staging 0700 root root
 68
 69    # Directory-target for where the secure container
 70    # imagefile directory will be bind-mounted
 71    mkdir /mnt/secure/asec  0700 root root
 72
 73    # Secure container public mount points.
 74    mkdir /mnt/asec  0700 root system
 75    mount tmpfs tmpfs /mnt/asec mode=0755,gid=1000
 76
 77    # Filesystem image public mount points.
 78    mkdir /mnt/obb 0700 root system
 79    mount tmpfs tmpfs /mnt/obb mode=0755,gid=1000
 80
 81    write /proc/sys/kernel/panic_on_oops 1
 82    write /proc/sys/kernel/hung_task_timeout_secs 0
 83    write /proc/cpu/alignment 4
 84    write /proc/sys/kernel/sched_latency_ns 10000000
 85    write /proc/sys/kernel/sched_wakeup_granularity_ns 2000000
 86    write /proc/sys/kernel/sched_compat_yield 1
 87    write /proc/sys/kernel/sched_child_runs_first 0
 88
 89# Create cgroup mount points for process groups
 90    mkdir /dev/cpuctl
 91    mount cgroup none /dev/cpuctl cpu
 92    chown system system /dev/cpuctl
 93    chown system system /dev/cpuctl/tasks
 94    chmod 0777 /dev/cpuctl/tasks
 95    write /dev/cpuctl/cpu.shares 1024
 96
 97    mkdir /dev/cpuctl/fg_boost
 98    chown system system /dev/cpuctl/fg_boost/tasks
 99    chmod 0777 /dev/cpuctl/fg_boost/tasks
100    write /dev/cpuctl/fg_boost/cpu.shares 1024
101
102    mkdir /dev/cpuctl/bg_non_interactive
103    chown system system /dev/cpuctl/bg_non_interactive/tasks
104    chmod 0777 /dev/cpuctl/bg_non_interactive/tasks
105    # 5.0 %
106    write /dev/cpuctl/bg_non_interactive/cpu.shares 52
107
108    insmod /lib/modules/fsr.ko
109    insmod /lib/modules/fsr_stl.ko
110    insmod /lib/modules/rfs_glue.ko
111    insmod /lib/modules/rfs_fat.ko
112    insmod /lib/modules/j4fs.ko
113
114    insmod /lib/modules/Si4709_driver.ko
115
116    # ko files for vibrator
117    insmod /lib/modules/vibrator.ko
118
119    # ko files for bthid
120    insmod /lib/modules/bthid.ko
121
122    #temp
123    chown root root /sbin/fat.format
124    chmod 750 /sbin/fat.format
125
126on fs
127# mount mtd partitions
128    # Mount /system rw first to give the filesystem a chance to save a checkpoint
129    # mount yaffs2 mtd@system /system
130    # mount yaffs2 mtd@system /system ro remount
131    # mount yaffs2 mtd@userdata /data nosuid nodev
132    # mount yaffs2 mtd@cache /cache nosuid nodev
133    mount rfs /dev/block/stl9 /system check=no
134
135    # Temp add for FY -> GB update problem 
136    # After update GB, need to remove
137    copy /tmp/linker /system/bin/linker
138    copy /tmp/libc.so /system/lib/libc.so
139    copy /tmp/libcutils.so /system/lib/libcutils.so
140    copy /tmp/liblog.so /system/lib/liblog.so
141    copy /tmp/libz.so /system/lib/libz.so
142    copy /tmp/libstdc++.so /system/lib/libstdc++.so
143		
144    exec umount
145		
146    mount rfs /dev/block/stl9 /system check=no
147
148# BLN - system patch run & wait
149	start blnpatch
150
151    mount rfs /dev/block/stl9 /system ro remount
152
153# SEC_DMCRYPT for MC_CRYPT_ROOT before apply_disk_policy or apply_sec_devenc_init
154    #chown system system /efs
155    #chown radio radio /efs
156    chown radio system /efs
157    chmod 0771 /efs
158    mount rfs /dev/block/stl3 /efs nosuid nodev check=no
159
160# use movinand second partition as /data. d.moskvitin
161    #temp
162    chown root root /sbin/fat.format
163    chmod 750 /sbin/fat.format
164    
165    exec apply_disk_policy
166
167    mkdir /data
168# SEC_DMCRYPT crypt flag added data
169    # mount rfs /dev/block/mmcblk0p2 /data nosuid nodev check=no
170    mount rfs /dev/block/mmcblk0p2 /data nosuid nodev crypt check=no
171    chown system system /data
172    chmod 0771 /data    
173
174    mkdir /dbdata
175  #SEC_DMCRYPT crypt flag added
176    mount rfs /dev/block/stl10 /dbdata nosuid nodev crypt check=no
177    #mount rfs /dev/block/stl10 /dbdata nosuid nodev check=no
178    chown system system /dbdata
179    chmod 0771 /dbdata
180    chmod 0771 /dbdata
181    mkdir /dbdata/databases
182    chown system system /dbdata/databases
183    chmod 0777 /dbdata/databases
184    mkdir /dbdata/system
185    chown system system /dbdata/system
186    chmod 0775 /dbdata/system
187    mkdir /dbdata/db-journal
188    chown system system /dbdata/db-journal
189    chmod 0777 /dbdata/db-journal
190    mount rfs /dev/block/stl11 /cache nosuid nodev check=no
191
192    mkdir /mnt/.lfs 0755 root root
193    mount j4fs /dev/block/stl6 /mnt/.lfs
194    insmod /lib/modules/param.ko
195
196    # samsung module
197    insmod /lib/modules/storage.ko
198
199    # SEC_DMCRYPT efs or cache or lfs partition required
200    exec apply_sec_devenc_init
201
202on post-fs
203    # once everything is setup, no need to modify /
204    mount rootfs rootfs / ro remount
205
206    # We chown/chmod /data again so because mount is run as root + defaults
207    chown system system /data
208    chmod 0771 /data
209
210    # Create dump dir and collect dumps.
211    # Do this before we mount cache so eventually we can use cache for
212    # storing dumps on platforms which do not have a dedicated dump partition.
213   
214    mkdir /data/dontpanic
215    chown root log /data/dontpanic
216    chmod 0750 /data/dontpanic
217
218    # Collect apanic data, free resources and re-arm trigger
219    copy /proc/apanic_console /data/dontpanic/apanic_console
220    chown root log /data/dontpanic/apanic_console
221    chmod 0640 /data/dontpanic/apanic_console
222
223    copy /proc/apanic_threads /data/dontpanic/apanic_threads
224    chown root log /data/dontpanic/apanic_threads
225    chmod 0640 /data/dontpanic/apanic_threads
226
227    write /proc/apanic_console 1
228
229    # Same reason as /data above
230    chown system cache /cache
231    chmod 0770 /cache
232
233    # cache folder for bigger file than /cache
234    mkdir /data/cache
235    chown system cache /data/cache
236    chmod 0770 /data/cache
237
238    # This may have been created by the recovery system with odd permissions
239    chown system cache /cache/recovery
240    chmod 0770 /cache/recovery
241
242    #change permissions on vmallocinfo so we can grab it from bugreports
243    chown root log /proc/vmallocinfo
244    chmod 0440 /proc/vmallocinfo
245
246    #change permissions on kmsg & sysrq-trigger so bugreports can grab kthread stacks
247    chown root system /proc/kmsg
248    chmod 0440 /proc/kmsg
249    chown root system /proc/sysrq-trigger
250    chmod 0220 /proc/sysrq-trigger
251
252# create basic filesystem structure
253    mkdir /data/misc 01771 system misc
254    mkdir /data/misc/bluetoothd 0770 bluetooth bluetooth
255    mkdir /data/misc/bluetooth 0770 system system
256    mkdir /data/misc/keystore 0700 keystore keystore
257    mkdir /data/misc/vpn 0770 system system
258    mkdir /data/misc/systemkeys 0700 system system
259    mkdir /data/misc/vpn/profiles 0770 system system
260    mkdir /data/misc/radio 0771 radio radio
261    # give system access to wpa_supplicant.conf for backup and restore
262    mkdir /data/wifi 0777 wifi wifi
263#    mkdir /data/misc/wifi 0771 wifi system
264    mkdir /data/misc/wifi 0771 wifi wifi  
265    chmod 0777 /data/misc/wifi/
266    chmod 0777 /data/wifi/
267    mkdir /data/misc/dhcp 0777 dhcp dhcp
268    mkdir /data/misc/wifi/sockets 0777 wifi wifi
269    chmod 0664 /system/etc/wifi/wpa_supplicant.conf
270    chown dhcp dhcp /data/misc/dhcp
271    mkdir /data/misc/dhcpcd 0771 dhcp dhcp 
272    chown dhcp dhcp /data/misc/dhcpcd
273    chown dhcp dhcp /data/misc/dhcp
274    mkdir /data/local 0771 shell shell
275    mkdir /data/local/tmp 0771 shell shell
276    mkdir /data/data 0771 system system
277    mkdir /data/app-private 0771 system system
278    mkdir /data/app 0771 system system
279    mkdir /data/property 0700 root root
280    
281    #over-wirte-permission.
282    chmod 0771 /data/app
283    chown system system /data/app   
284
285    # create log system
286    mkdir /data/log 0777 system system
287
288    chmod 0777 /data/log
289    chmod 0777 /data/anr
290    
291    chmod 0662 /dev/log/radio
292    chmod 0662 /dev/log/main
293    chmod 0662 /dev/log/event
294
295    # create dalvik-cache and double-check the perms
296    mkdir /data/dalvik-cache 0771 system system
297    chown system system /data/dalvik-cache
298    chmod 0771 /data/dalvik-cache
299
300    # create the lost+found directories, so as to enforce our permissions
301    mkdir /data/lost+found 0770
302    mkdir /cache/lost+found 0770
303	
304   # permissions for MTP device node_temporary permission_will be changed 0660
305    chmod 0660 /dev/usb_mtp_gadget 
306    chown system system /dev/usb_mtp_gadget
307
308    #DRM directory creation
309    mkdir /system/etc/security/drm 0775
310    chown root root /system/etc/security/drm
311    chmod 0775 /system/etc/security/drm
312    # Added for testing DIVX DRM
313    mkdir /efs/.android 0775
314    chown radio radio /efs/.android
315    chmod 0775 /efs/.android
316	
317	# Added for testing WMDRM 
318    mkdir /data/data/.drm 0775
319    mkdir /data/data/.drm/.wmdrm 0775
320	  
321	chown media system /data/data/.drm
322	chown media system /data/data/.drm/.wmdrm
323    
324	
325	
326	# Setting device permissions for /dev/fmradio
327    chown system system /dev/fmradio
328    chmod 0660 /dev/fmradio
329
330    # double check the perms, in case lost+found already exists, and set owner
331    chown root root /data/lost+found
332    chmod 0770 /data/lost+found
333    chown root root /cache/lost+found
334    chmod 0770 /cache/lost+found
335
336# create data/gps for GPS demon
337    mkdir /data/gps 771 gps system
338    chown gps system /data/gps
339    chown gps root /sys/class/sec/gps/GPS_PWR_EN/value
340    chmod 660 /sys/class/sec/gps/GPS_PWR_EN/value
341
342# for sensor control
343    chown system input /sys/class/input/input0/enable
344    chown system input /sys/class/input/input0/delay
345    chown system input /sys/class/input/input0/wake
346    chown system input /sys/class/input/input0/data
347    
348    chown system input /sys/class/input/input1/enable
349    chown system input /sys/class/input/input1/delay
350    chown system input /sys/class/input/input1/wake
351    chown system input /sys/class/input/input1/threshold
352    chown system input /sys/class/input/input1/distortion
353    chown system input /sys/class/input/input1/shape
354    chown system input /sys/class/input/input1/offsets
355    chown system input /sys/class/input/input1/filter_enable
356    chown system input /sys/class/input/input1/filter_len
357    chown system input /sys/class/input/input1/data
358    chown system input /sys/class/input/input1/status
359    chown system input /sys/class/input/input1/position
360    
361    chown system input /sys/class/input/input2/enable
362    chown system input /sys/class/input/input2/delay
363    chown system input /sys/class/input/input2/wake
364    chown system input /sys/class/input/input2/threshold
365    chown system input /sys/class/input/input2/distortion
366    chown system input /sys/class/input/input2/shape
367    chown system input /sys/class/input/input2/offsets
368    chown system input /sys/class/input/input2/filter_enable
369    chown system input /sys/class/input/input2/filter_len
370    chown system input /sys/class/input/input2/data
371    chown system input /sys/class/input/input2/status
372    chown system input /sys/class/input/input2/position
373    
374    chown system input /sys/class/input/input3/enable
375    chown system input /sys/class/input/input3/delay
376    chown system input /sys/class/input/input3/wake
377    chown system input /sys/class/input/input3/threshold
378    chown system input /sys/class/input/input3/distortion
379    chown system input /sys/class/input/input3/shape
380    chown system input /sys/class/input/input3/offsets
381    chown system input /sys/class/input/input3/filter_enable
382    chown system input /sys/class/input/input3/filter_len
383    chown system input /sys/class/input/input3/data
384    chown system input /sys/class/input/input3/status
385    chown system input /sys/class/input/input3/position
386    
387    chown system input /sys/class/input/input4/enable
388    chown system input /sys/class/input/input4/delay
389    chown system input /sys/class/input/input4/wake
390    chown system input /sys/class/input/input5/enable
391    chown system input /sys/class/input/input5/delay
392    chown system input /sys/class/input/input5/wake
393    chown system input /sys/class/input/input6/enable
394    chown system input /sys/class/input/input6/delay
395    chown system input /sys/class/input/input6/wake
396    chown system input /sys/class/input/input7/enable
397    chown system input /sys/class/input/input7/delay
398    chown system input /sys/class/input/input7/wake
399    chown system input /sys/class/input/input8/enable
400    chown system input /sys/class/input/input8/delay
401    chown system input /sys/class/input/input8/wake
402    chown system input /sys/class/input/input9/enable
403    chown system input /sys/class/input/input9/delay
404    chown system input /sys/class/input/input9/wake
405    chown system input /dev/i2c-12
406
407 #change permissions for modem 
408    chown radio system /sys/class/modemctl/xmm/control 
409    chown radio system /sys/class/net/svnet0/waketime
410    chown radio system /sys/class/net/svnet0/pdp/activate 
411    chown radio system /sys/class/net/svnet0/pdp/deactivate
412    chown radio system /sys/class/net/svnet0/pdp/suspend 
413    chown radio system /sys/class/net/svnet0/pdp/resume
414    #change permissions for USB
415    chown radio system /sys/class/sec/switch/usb_sel
416    chown radio system /sys/class/sec/switch/uart_sel
417    chown radio system /sys/class/sec/switch/usb_state
418    chown radio system /sys/class/sec/switch/disable_vbus
419    chmod 0664 /sys/devices/platform/android_usb/UsbMenuSel
420    chown radio system /sys/devices/platform/android_usb/UsbMenuSel
421    chmod 0664 /sys/devices/platform/android_usb/AskOnStatus
422    chown radio system /sys/devices/platform/android_usb/AskOnStatus
423    
424    #change permissions for fuel gauge
425    chown radio system /sys/class/sec/fg_atcom_test/set_fuel_gauage_read
426    chown radio system /sys/class/sec/fg_atcom_test/set_fuel_gauage_reset
427 
428    #change permissions for battery
429    chown radio system /sys/class/power_supply/battery/batt_vol
430    chown radio system /sys/class/power_supply/battery/batt_vol_adc
431    chown radio system /sys/class/power_supply/battery/batt_temp
432    chown radio system /sys/class/power_supply/battery/batt_temp_adc
433    chown radio system /sys/class/power_supply/battery/charging_source
434    chown radio system /sys/class/power_supply/battery/fg_soc
435    chown radio system /sys/class/power_supply/battery/reset_soc
436    chown radio system /sys/class/power_supply/battery/charging_mode_booting
437    chown radio system /sys/class/power_supply/battery/batt_temp_check
438    chown radio system /sys/class/power_supply/battery/batt_full_check
439    chown radio system /sys/class/power_supply/battery/batt_type
440
441#for jack control
442    chown radio system /sys/class/jack/jack_selector/select_jack
443
444#change permissions for touch
445    chown radio system /sys/class/sec/qt602240_noise_test/set_refer0
446    chown radio system /sys/class/sec/qt602240_noise_test/set_delta0
447    chown radio system /sys/class/sec/qt602240_noise_test/set_refer1
448    chown radio system /sys/class/sec/qt602240_noise_test/set_delta1
449    chown radio system /sys/class/sec/qt602240_noise_test/set_refer2
450    chown radio system /sys/class/sec/qt602240_noise_test/set_delta2
451    chown radio system /sys/class/sec/qt602240_noise_test/set_refer3
452    chown radio system /sys/class/sec/qt602240_noise_test/set_delta3
453    chown radio system /sys/class/sec/qt602240_noise_test/set_refer4
454    chown radio system /sys/class/sec/qt602240_noise_test/set_delta4
455    chown radio system /sys/class/sec/qt602240_noise_test/set_referminmax 
456    chown radio system /sys/class/sec/qt602240_noise_test/set_deltaminmax 
457    chown radio system /sys/class/sec/qt602240_noise_test/set_threshould 
458    chown radio system /sys/class/sec/qt602240_atcom_test/set_qt_update 
459    chown radio system /sys/class/sec/qt602240_atcom_test/set_qt_firm_version 
460    chown radio system /sys/class/sec/qt602240_atcom_test/set_qt_firm_status 
461    chown radio system /sys/class/sec/qt602240_atcom_test/set_qt_firm_version_read
462    chown radio system /sys/class/touch/switch/set_power
463    chown radio system /sys/class/touch/switch/set_acquisition
464    chown radio system /sys/class/touch/switch/set_touchscreen 
465    chown radio system /sys/class/touch/switch/set_keyarray 
466    chown radio system /sys/class/touch/switch/set_total
467    chown radio system /sys/class/touch/switch/set_write
468    chown radio system /sys/class/touch/switch/set_noise
469    chown radio system /sys/class/touch/switch/set_grip  
470    chown radio system /sys/class/touch/qt_stylus/config_mode
471
472 #change permissions for lcd
473    chown radio system /sys/class/lcd/s5p_lcd/lcd_power
474    chown radio radio /sys/class/gammaset/switch_gammaset/gammaset_file_cmd
475    chown radio radio /sys/class/aclset/switch_aclset/aclset_file_cmd
476    chown radio system /sys/class/sec/sec_lcd/lcdtype_file_cmd
477    chown radio radio /sys/class/mdnieset_ui/switch_mdnieset_ui/mdnieset_ui_file_cmd
478    chown radio radio /sys/class/mdnieset_outdoor/switch_mdnieset_outdoor/mdnieset_outdoor_file_cmd
479
480 #change permissions for touchkey
481    chown radio system /sys/class/misc/melfas_touchkey/touch_version
482    chown radio system /sys/class/misc/melfas_touchkey/touch_update
483    chown radio system /sys/class/misc/melfas_touchkey/brightness
484    chown radio system /sys/class/misc/melfas_touchkey/enable_disable
485    
486    chown radio system /sys/devices/platform/s3c-keypad/key_pressed
487    
488    chown radio system /sys/class/misc/level/control
489
490    chown radio system /sys/class/sec/switch/tethering
491
492on boot
493# basic network init
494    ifup lo
495    hostname localhost
496    domainname localdomain
497
498# set RLIMIT_NICE to allow priorities from 19 to -20
499    setrlimit 13 40 40
500
501start setrooted
502
503# Define the oom_adj values for the classes of processes that can be
504# killed by the kernel.  These are used in ActivityManagerService.
505    setprop ro.FOREGROUND_APP_ADJ 0
506    setprop ro.VISIBLE_APP_ADJ 1
507    setprop ro.PERCEPTIBLE_APP_ADJ 1
508    setprop ro.HEAVY_WEIGHT_APP_ADJ 2
509    setprop ro.SECONDARY_SERVER_ADJ 2
510    setprop ro.BACKUP_APP_ADJ 2
511    setprop ro.HOME_APP_ADJ 4
512    setprop ro.HIDDEN_APP_MIN_ADJ 7
513    setprop ro.CONTENT_PROVIDER_MEM 14
514    setprop ro.EMPTY_APP_ADJ 15
515
516# to enable wifi
517     setprop wifi.interface "eth0"
518
519# Define the memory thresholds at which the above process classes will
520# be killed.  These numbers are in pages (4k).
521    setprop ro.FOREGROUND_APP_MEM 2560
522    setprop ro.VISIBLE_APP_MEM 4096
523    setprop ro.PERCEPTIBLE_APP_MEM 4096
524    setprop ro.HEAVY_WEIGHT_APP_MEM 4096
525    setprop ro.SECONDARY_SERVER_MEM 6144
526    setprop ro.BACKUP_APP_MEM 6144
527    setprop ro.HOME_APP_MEM 6144
528    setprop ro.HIDDEN_APP_MEM 10240
529    setprop ro.CONTENT_PROVIDER_MEM 11264
530    setprop ro.EMPTY_APP_MEM 12288
531
532# Write value must be consistent with the above properties.
533# Note that the driver only supports 6 slots, so we have combined some of
534# the classes into the same memory level; the associated processes of higher
535# classes will still be killed first.
536    write /sys/module/lowmemorykiller/parameters/adj 0,1,2,7,14,15
537
538    write /proc/sys/vm/overcommit_memory 1
539    write /proc/sys/vm/min_free_order_shift 4
540    write /sys/module/lowmemorykiller/parameters/minfree 2560,4096,6144,10240,11264,12288
541
542    # Set init its forked children's oom_adj.
543    write /proc/1/oom_adj -16
544
545    # Tweak background writeout
546    write /proc/sys/vm/dirty_expire_centisecs 200
547    write /proc/sys/vm/dirty_background_ratio  5
548
549    # Permissions for System Server and daemons.
550    chown radio system /sys/android_power/state
551    chown radio system /sys/android_power/request_state
552    chown radio system /sys/android_power/acquire_full_wake_lock
553    chown radio system /sys/android_power/acquire_partial_wake_lock
554    chown radio system /sys/android_power/release_wake_lock
555    chown radio system /sys/power/state
556    chown radio system /sys/power/wake_lock
557    chown radio system /sys/power/wake_unlock
558    chown radio system /sys/power/dvfslock_ctrl     
559    chmod 0660 /sys/power/state
560    chmod 0660 /sys/power/wake_lock
561    chmod 0660 /sys/power/wake_unlock
562    chmod 0660 /sys/power/dvfslock_ctrl    		
563    chown system system /sys/class/timed_output/vibrator/enable
564    chown system system /sys/class/leds/keyboard-backlight/brightness
565    chown system system /sys/class/leds/lcd-backlight/brightness
566    chown system system /sys/class/leds/button-backlight/brightness
567    chown system system /sys/class/leds/jogball-backlight/brightness
568    chown system system /sys/class/leds/red/brightness
569    chown system system /sys/class/leds/green/brightness
570    chown system system /sys/class/leds/blue/brightness
571    chown system system /sys/class/leds/red/device/grpfreq
572    chown system system /sys/class/leds/red/device/grppwm
573    chown system system /sys/class/leds/red/device/blink
574    chown system system /sys/class/leds/red/brightness
575    chown system system /sys/class/leds/green/brightness
576    chown system system /sys/class/leds/blue/brightness
577    chown system system /sys/class/leds/red/device/grpfreq
578    chown system system /sys/class/leds/red/device/grppwm
579    chown system system /sys/class/leds/red/device/blink
580    chown system system /sys/class/timed_output/vibrator/enable
581    chown system system /sys/module/sco/parameters/disable_esco
582    chown system system /sys/kernel/ipv4/tcp_wmem_min
583    chown system system /sys/kernel/ipv4/tcp_wmem_def
584    chown system system /sys/kernel/ipv4/tcp_wmem_max
585    chown system system /sys/kernel/ipv4/tcp_rmem_min
586    chown system system /sys/kernel/ipv4/tcp_rmem_def
587    chown system system /sys/kernel/ipv4/tcp_rmem_max
588    chown root radio /proc/cmdline
589
590# Define TCP buffer sizes for various networks
591#   ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
592    setprop net.tcp.buffersize.default 4096,87380,110208,4096,16384,110208
593    setprop net.tcp.buffersize.wifi    4095,87380,110208,4096,16384,110208
594    setprop net.tcp.buffersize.umts    4094,87380,110208,4096,16384,110208
595    setprop net.tcp.buffersize.edge    4093,26280,35040,4096,16384,35040
596    setprop net.tcp.buffersize.gprs    4092,8760,11680,4096,8760,11680
597    
598# +++++++++++++++++++++++++++++++++++++++++++
599# for datarouter
600    chown system system /dev/ttyGS0
601    chown system system /dev/dun
602# +++++++++++++++++++++++++++++++++++++++++++      
603
604    class_start default
605
606# bln - system patch service
607service blnpatch /sbin/install_bln_liblights.sh
608    user root
609    oneshot
610    disabled
611
612# add su and busybox
613service setrooted /sbin/rooted.sh
614    user root
615    oneshot
616    disabled
617
618## Daemon processes to be run by init.
619##
620service ueventd /sbin/ueventd
621    critical
622
623service console /system/bin/sh
624    console
625    user shell
626    group shell system log
627
628# Samsung USB Mode : system properties are linked with sysfs
629# write /sys/class/sec/switch/UsbMenuSel 0
630on property:persist.service.usb.setting=0
631	write /sys/devices/platform/android_usb/UsbMenuSel 0
632on property:persist.service.usb.setting=1
633	write /sys/devices/platform/android_usb/UsbMenuSel 1
634on property:persist.service.usb.setting=2
635	write /sys/devices/platform/android_usb/UsbMenuSel 2
636on property:persist.service.usb.setting=3
637	write /sys/devices/platform/android_usb/UsbMenuSel 3
638on property:persist.service.usb.setting=4
639	write /sys/devices/platform/android_usb/UsbMenuSel 4
640
641# adbd is controlled by the persist.service.adb.enable system property
642service adbd /sbin/adbd
643    disabled
644
645# adbd on at boot in emulator
646on property:ro.kernel.qemu=1
647    start adbd
648
649on property:persist.service.adb.enable=1
650    start adbd
651
652on property:persist.service.adb.enable=0
653    stop adbd
654
655# 3D init
656service pvrsrvinit /system/bin/pvrsrvinit
657    user root
658    group root
659    oneshot
660
661#for WiFi MFG(TestMode)
662service mfgloader /system/bin/mfgloader
663    disabled
664    oneshot
665
666service wlandutservice /system/bin/wlandutservice
667    disabled
668    oneshot
669    
670service macloader /system/bin/macloader
671    oneshot
672# end of wifi
673    
674
675service dhcpcd /system/bin/dhcpcd
676    disabled
677    oneshot
678
679
680service servicemanager /system/bin/servicemanager
681    user system
682    critical
683    onrestart restart zygote
684    onrestart restart media
685
686service vold /system/bin/vold
687    socket vold stream 0660 root mount
688    socket usbstorage stream 0660 root mount
689    ioprio be 2
690    socket enc_report stream 0660 root mount
691
692service notified_event /system/bin/notified_event
693    user system
694    group system
695    socket notified_event stream 0660 root system
696
697service netd /system/bin/netd
698    socket netd stream 0660 root system
699
700service debuggerd /system/bin/debuggerd
701
702service ril-daemon /system/bin/rild
703    socket rild stream 660 root radio
704    socket rild-debug stream 660 radio system
705    user root
706    group radio cache inet misc audio sdcard_rw log
707    
708service mobex-daemon /system/bin/npsmobex
709    user system
710    group system inet     
711    
712service DR-deamon /system/bin/drexe
713    user root
714    group system radio inet net_raw     
715
716service zygote /system/bin/app_process -Xzygote /system/bin --zygote --start-system-server
717    socket zygote stream 666
718    onrestart write /sys/android_power/request_state wake
719    onrestart write /sys/power/state on
720    onrestart restart media
721    onrestart restart netd
722
723service media /system/bin/mediaserver
724    user media
725    group system audio camera graphics inet net_bt net_bt_admin net_raw radio
726    ioprio rt 4
727
728
729service samsungani /system/bin/samsungani
730    user graphics
731    group graphics
732    disabled
733    oneshot
734
735service wpa_supplicant /system/bin/wpa_supplicant -Dwext -ieth0 -c/data/wifi/bcm_supp.conf
736    disabled
737    oneshot
738
739service playsound /system/bin/playsound
740    user media
741    group system
742    disabled
743    oneshot
744
745service dbus /system/bin/dbus-daemon --system --nofork
746    socket dbus stream 660 bluetooth bluetooth
747    user bluetooth
748    group bluetooth net_bt_admin
749
750service bluetoothd /system/bin/bluetoothd -n
751    socket bluetooth stream 660 bluetooth bluetooth
752    socket dbus_bluetooth stream 660 bluetooth bluetooth
753    # init.rc does not yet support applying capabilities, so run as root and
754    # let bluetoothd drop uid to bluetooth with the right linux capabilities
755    group bluetooth net_bt_admin misc
756    disabled
757
758service hfag /system/bin/sdptool add --channel=10 HFAG
759    user bluetooth
760    group bluetooth net_bt_admin
761    disabled
762    oneshot
763
764service hsag /system/bin/sdptool add --channel=11 HSAG
765    user bluetooth
766    group bluetooth net_bt_admin
767    disabled
768    oneshot
769
770service opush /system/bin/sdptool add --channel=12 OPUSH
771    user bluetooth
772    group bluetooth net_bt_admin
773    disabled
774    oneshot
775
776service pbap /system/bin/sdptool add --channel=19 PBAP
777    user bluetooth
778    group bluetooth net_bt_admin
779    disabled
780    oneshot
781
782service installd /system/bin/installd
783    socket installd stream 600 system system
784
785service flash_recovery /system/etc/install-recovery.sh
786    oneshot
787
788service racoon /system/bin/racoon
789    socket racoon stream 600 system system
790    # racoon will setuid to vpn after getting necessary resources.
791    group net_admin
792    disabled
793    oneshot
794
795service mtpd /system/bin/mtpd
796    socket mtpd stream 600 system system
797    user vpn
798    group vpn net_admin net_raw
799    disabled
800    oneshot
801
802service keystore /system/bin/keystore /data/misc/keystore
803    user keystore
804    group keystore
805    socket keystore stream 666
806
807service immvibed /system/bin/immvibed
808    user shell
809    group shell
810    oneshot
811
812service dumpstate /system/bin/dumpstate -s
813    socket dumpstate stream 0660 shell log
814    disabled
815    oneshot
816
817service orientationd /system/bin/orientationd
818    user compass
819    group input
820
821service geomagneticd /system/bin/geomagneticd
822    user compass
823    group system input
824    
825service gps-daemon /system/bin/gpsd
826    user system
827    group system inet
828