Advertisement
superr

init.rc

Feb 4th, 2013
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 25.14 KB | None | 0 0
  1. # Copyright (C) 2012 The Android Open Source Project
  2. #
  3. # IMPORTANT: Do not create world writable files or directories.
  4. # This is a common source of Android security bugs.
  5. #
  6.  
  7. import /init.${ro.hardware}.rc
  8. import /init.usb.rc
  9. import /init.trace.rc
  10.  
  11. on early-init
  12. # Set init and its forked children's oom_adj.
  13. write /proc/1/oom_adj -16
  14.  
  15. start ueventd
  16.  
  17. # create mountpoints
  18. mkdir /mnt 0775 root system
  19.  
  20. on init
  21.  
  22. sysclktz 0
  23.  
  24. loglevel 3
  25.  
  26. # setup the global environment
  27. export PATH /sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
  28. export LD_LIBRARY_PATH /vendor/lib:/system/lib
  29. export ANDROID_BOOTLOGO 1
  30. export ANDROID_ROOT /system
  31. export ANDROID_ASSETS /system/app
  32. export ANDROID_DATA /data
  33. export EXTERNAL_STORAGE /mnt/sdcard
  34. export ASEC_MOUNTPOINT /mnt/asec
  35. export LOOP_MOUNTPOINT /mnt/obb
  36. export BOOTCLASSPATH /system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/framework2.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar
  37.  
  38. # Backward compatibility
  39. symlink /system/etc /etc
  40. symlink /sys/kernel/debug /d
  41.  
  42. # Right now vendor lives on the same filesystem as system,
  43. # but someday that may change.
  44. symlink /system/vendor /vendor
  45.  
  46. # create mountpoints
  47. mkdir /mnt 0775 root system
  48. mkdir /mnt/sdcard 0000 system system
  49.  
  50. # Create cgroup mount point for cpu accounting
  51. mkdir /acct
  52. mount cgroup none /acct cpuacct
  53. mkdir /acct/uid
  54.  
  55. # Backwards Compat - XXX: Going away in G*
  56. symlink /mnt/sdcard /sdcard
  57.  
  58. mkdir /system
  59. mkdir /data 0771 system system
  60. mkdir /cache 0771 system cache
  61. mkdir /config 0500 root root
  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. write /proc/sys/kernel/randomize_va_space 2
  89. write /proc/sys/kernel/kptr_restrict 2
  90. write /proc/sys/kernel/dmesg_restrict 1
  91. write /proc/sys/vm/mmap_min_addr 32768
  92. write /proc/sys/kernel/sched_rt_runtime_us 950000
  93. write /proc/sys/kernel/sched_rt_period_us 1000000
  94.  
  95. # Create cgroup mount points for process groups
  96. mkdir /dev/cpuctl
  97. mount cgroup none /dev/cpuctl cpu
  98. chown system system /dev/cpuctl
  99. chown system system /dev/cpuctl/tasks
  100. chmod 0777 /dev/cpuctl/tasks
  101. write /dev/cpuctl/cpu.shares 1024
  102. write /dev/cpuctl/cpu.rt_runtime_us 950000
  103. write /dev/cpuctl/cpu.rt_period_us 1000000
  104.  
  105. mkdir /dev/cpuctl/apps
  106. chown system system /dev/cpuctl/apps/tasks
  107. chmod 0777 /dev/cpuctl/apps/tasks
  108. write /dev/cpuctl/apps/cpu.shares 1024
  109. write /dev/cpuctl/apps/cpu.rt_runtime_us 800000
  110. write /dev/cpuctl/apps/cpu.rt_period_us 1000000
  111.  
  112. mkdir /dev/cpuctl/apps/bg_non_interactive
  113. chown system system /dev/cpuctl/apps/bg_non_interactive/tasks
  114. chmod 0777 /dev/cpuctl/apps/bg_non_interactive/tasks
  115. # 5.0 %
  116. write /dev/cpuctl/apps/bg_non_interactive/cpu.shares 52
  117. write /dev/cpuctl/apps/bg_non_interactive/cpu.rt_runtime_us 700000
  118. write /dev/cpuctl/apps/bg_non_interactive/cpu.rt_period_us 1000000
  119.  
  120. # Allow everybody to read the xt_qtaguid resource tracking misc dev.
  121. # This is needed by any process that uses socket tagging.
  122. chmod 0644 /dev/xt_qtaguid
  123.  
  124. on fs
  125. # mount mtd partitions
  126. # Mount /system rw first to give the filesystem a chance to save a checkpoint
  127. mount yaffs2 mtd@system /system
  128. mount yaffs2 mtd@system /system ro remount
  129. mount yaffs2 mtd@userdata /data nosuid nodev
  130. mount yaffs2 mtd@persist /persist nosuid nodev
  131. mount yaffs2 mtd@cache /cache nosuid nodev
  132. mount yaffs2 mtd@persist /persist nosuid nodev
  133.  
  134. on emmc-fs
  135. #-----system---------------------
  136. wait /dev/block/mmcblk0p15
  137. mount ext4 /dev/block/mmcblk0p15 /system ro barrier=1
  138. chmod 0777 /system/bin/ext4check.sh
  139. #------carrier parition----------
  140. wait /dev/block/mmcblk0p19
  141. exec /system/bin/sh -c "/system/bin/ext4check.sh CARRIER /dev/block/mmcblk0p19"
  142. mount ext4 /dev/block/mmcblk0p19 /carrier nosuid nodev barrier=1
  143. #------userdata----------
  144. wait /dev/block/mmcblk0p18
  145. exec /system/bin/sh -c "/system/bin/ext4check.sh USERDATA /dev/block/mmcblk0p18"
  146. mount ext4 /dev/block/mmcblk0p18 /data nosuid nodev barrier=1
  147. #------persist----------
  148. wait /dev/block/mmcblk0p7
  149. exec /system/bin/sh -c "/system/bin/ext4check.sh PERSIST /dev/block/mmcblk0p7"
  150. mount ext4 /dev/block/mmcblk0p7 /persist nosuid nodev barrier=1
  151. #------cache----------
  152. wait /dev/block/mmcblk0p17
  153. exec /system/bin/sh -c "/system/bin/ext4check.sh CACHE /dev/block/mmcblk0p17"
  154. mount ext4 /dev/block/mmcblk0p17 /cache nosuid nodev barrier=1
  155.  
  156. on post-fs
  157. # once everything is setup, no need to modify /
  158. mount rootfs rootfs / ro remount
  159.  
  160. # We chown/chmod /cache again so because mount is run as root + defaults
  161. chown system cache /cache
  162. chmod 0771 /cache
  163.  
  164. # This may have been created by the recovery system with odd permissions
  165. chown system cache /cache/recovery
  166. chmod 0770 /cache/recovery
  167.  
  168. #change permissions on vmallocinfo so we can grab it from bugreports
  169. chown root log /proc/vmallocinfo
  170. chmod 0440 /proc/vmallocinfo
  171.  
  172. #change permissions on kmsg & sysrq-trigger so bugreports can grab kthread stacks
  173. chown root system /proc/kmsg
  174. chmod 0440 /proc/kmsg
  175. chown root system /proc/sysrq-trigger
  176. chmod 0220 /proc/sysrq-trigger
  177.  
  178. # create the lost+found directories, so as to enforce our permissions
  179. mkdir /cache/lost+found 0770 root root
  180.  
  181. on post-fs-data
  182. # We chown/chmod /data again so because mount is run as root + defaults
  183. chown system system /data
  184. chmod 0771 /data
  185.  
  186. # Create dump dir and collect dumps.
  187. # Do this before we mount cache so eventually we can use cache for
  188. # storing dumps on platforms which do not have a dedicated dump partition.
  189. mkdir /data/dontpanic 0750 root log
  190.  
  191. # Collect apanic data, free resources and re-arm trigger
  192. copy /proc/apanic_console /data/dontpanic/apanic_console
  193. chown root log /data/dontpanic/apanic_console
  194. chmod 0640 /data/dontpanic/apanic_console
  195.  
  196. copy /proc/apanic_threads /data/dontpanic/apanic_threads
  197. chown root log /data/dontpanic/apanic_threads
  198. chmod 0640 /data/dontpanic/apanic_threads
  199.  
  200. write /proc/apanic_console 1
  201.  
  202. # create basic filesystem structure
  203. mkdir /data/misc 01771 system misc
  204. mkdir /data/misc/bluetoothd 0770 bluetooth bluetooth
  205. mkdir /data/misc/bluetooth 0770 system system
  206. mkdir /data/misc/keystore 0700 keystore keystore
  207. mkdir /data/misc/keychain 0771 system system
  208. mkdir /data/misc/vpn 0770 system vpn
  209. mkdir /data/misc/systemkeys 0700 system system
  210. # give system access to wpa_supplicant.conf for backup and restore
  211. mkdir /data/misc/wifi 0770 wifi wifi
  212. chmod 0660 /data/misc/wifi/wpa_supplicant.conf
  213. mkdir /data/local 0751 root root
  214.  
  215. #ZTE_JHT_20120423+++
  216. mkdir /data/misc/wifi/hostapd 0770 wifi wifi
  217. #ZTE_JHT_20120423---
  218. #Hector 20120611 add for autoIP property+++
  219. setprop persist.service.wlan.autoIP
  220.  
  221. # For security reasons, /data/local/tmp should always be empty.
  222. # Do not place files or directories in /data/local/tmp
  223. mkdir /data/local 0771 shell shell
  224. mkdir /data/local/tmp 0771 shell shell
  225. mkdir /data/data 0771 system system
  226. mkdir /data/app-private 0771 system system
  227. mkdir /data/app-asec 0700 root root
  228. mkdir /data/app 0771 system system
  229. mkdir /data/property 0700 root root
  230. mkdir /data/ssh 0750 root shell
  231. mkdir /data/ssh/empty 0700 root root
  232. mkdir /data/radio 0770 radio radio
  233. chmod 2770 /data/radio
  234. #ZTE_WSH_QMI_20120428,begin
  235. mkdir /dev/socket/qmux_radio 0770 radio radio
  236. mkdir /dev/socket/qmux_bluetooth 0770 bluetooth bluetooth
  237. mkdir /dev/socket/qmux_audio 0770 audio audio
  238. #ZTE_WSH_QMI_20120428,end
  239.  
  240. # create dalvik-cache and double-check the perms, so as to enforce our permissions
  241. mkdir /data/dalvik-cache 0771 system system
  242. chown system system /data/dalvik-cache
  243. chmod 0771 /data/dalvik-cache
  244.  
  245. # create resource-cache and double-check the perms
  246. mkdir /data/resource-cache 0771 system system
  247. chown system system /data/resource-cache
  248. chmod 0771 /data/resource-cache
  249.  
  250. # create the lost+found directories, so as to enforce our permissions
  251. mkdir /data/lost+found 0770 root root
  252.  
  253. # create directory for DRM plug-ins - give drm the read/write access to
  254. # the following directory.
  255. mkdir /data/drm 0770 drm drm
  256.  
  257. # If there is no fs-post-data action in the init.<device>.rc file, you
  258. # must uncomment this line, otherwise encrypted filesystems
  259. # won't work.
  260. # Set indication (checked by vold) that we have finished this action
  261. #setprop vold.post_fs_data_done 1
  262.  
  263. chown system system /sys/class/android_usb/android0/f_mass_storage/lun/file
  264. chmod 0660 /sys/class/android_usb/android0/f_mass_storage/lun/file
  265. chown system system /sys/class/android_usb/android0/f_rndis/ethaddr
  266. chmod 0660 /sys/class/android_usb/android0/f_rndis/ethaddr
  267.  
  268. # Include extra init file
  269. import /init.cm.rc
  270.  
  271. on boot
  272. # basic network init
  273. ifup lo
  274. hostname localhost
  275. domainname localdomain
  276.  
  277. # set RLIMIT_NICE to allow priorities from 19 to -20
  278. setrlimit 13 40 40
  279.  
  280. # Memory management. Basic kernel parameters, and allow the high
  281. # level system server to be able to adjust the kernel OOM driver
  282. # parameters to match how it is managing things.
  283. write /proc/sys/vm/overcommit_memory 1
  284. write /proc/sys/vm/min_free_order_shift 4
  285. chown root system /sys/module/lowmemorykiller/parameters/adj
  286. chmod 0664 /sys/module/lowmemorykiller/parameters/adj
  287. chown root system /sys/module/lowmemorykiller/parameters/minfree
  288. chmod 0664 /sys/module/lowmemorykiller/parameters/minfree
  289.  
  290. # Tweak background writeout
  291. write /proc/sys/vm/dirty_expire_centisecs 200
  292. write /proc/sys/vm/dirty_background_ratio 5
  293.  
  294. # Permissions for System Server and daemons.
  295. chown radio system /sys/android_power/state
  296. chown radio system /sys/android_power/request_state
  297. chown radio system /sys/android_power/acquire_full_wake_lock
  298. chown radio system /sys/android_power/acquire_partial_wake_lock
  299. chown radio system /sys/android_power/release_wake_lock
  300. chown radio system /sys/power/state
  301. chown system system /sys/power/wakeup_count
  302. chown radio system /sys/power/wake_lock
  303. chown radio system /sys/power/wake_unlock
  304. chmod 0660 /sys/power/state
  305. chmod 0660 /sys/power/wake_lock
  306. chmod 0660 /sys/power/wake_unlock
  307.  
  308. chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_rate
  309. chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/timer_rate
  310. chown system system /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
  311. chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
  312. chown system system /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
  313. chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
  314. chown system system /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
  315. chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
  316. chown system system /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
  317. chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
  318. chown system system /sys/devices/system/cpu/cpufreq/interactive/boost
  319. chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/boost
  320. chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse
  321. chown system system /sys/devices/system/cpu/cpufreq/interactive/input_boost
  322. chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/input_boost
  323.  
  324. # Assume SMP uses shared cpufreq policy for all CPUs
  325. chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
  326. chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
  327. chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
  328. chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
  329. chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
  330. chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
  331.  
  332. chown system camera /sys/class/leds/flashlight/brightness
  333. chown system system /sys/class/timed_output/vibrator/enable
  334. chown system system /sys/class/leds/keyboard-backlight/brightness
  335. chown system system /sys/class/leds/lcd-backlight/brightness
  336. chown system system /sys/class/leds/button-backlight/brightness
  337. chown system system /sys/class/leds/jogball-backlight/brightness
  338. chown system system /sys/class/leds/red/brightness
  339. chown system system /sys/class/leds/green/brightness
  340. chown system system /sys/class/leds/blue/brightness
  341. chown system system /sys/class/leds/red/device/grpfreq
  342. chown system system /sys/class/leds/red/device/grppwm
  343. chown system system /sys/class/leds/red/device/blink
  344. chown system system /sys/class/leds/red/brightness
  345. chown system system /sys/class/leds/green/brightness
  346. chown system system /sys/class/leds/blue/brightness
  347. chown system system /sys/class/leds/red/device/grpfreq
  348. chown system system /sys/class/leds/red/device/grppwm
  349. chown system system /sys/class/leds/red/device/blink
  350. chown system system /sys/class/timed_output/vibrator/enable
  351. chown root system /sys/module/msm_battery/parameters/usb_charger_enable
  352. chown system system /sys/module/sco/parameters/disable_esco
  353. chown system system /sys/kernel/ipv4/tcp_wmem_min
  354. chown system system /sys/kernel/ipv4/tcp_wmem_def
  355. chown system system /sys/kernel/ipv4/tcp_wmem_max
  356. chown system system /sys/kernel/ipv4/tcp_rmem_min
  357. chown system system /sys/kernel/ipv4/tcp_rmem_def
  358. chown system system /sys/kernel/ipv4/tcp_rmem_max
  359. chown root radio /proc/cmdline
  360.  
  361. # Define TCP buffer sizes for various networks
  362. # ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
  363. setprop net.tcp.buffersize.default 4096,87380,704512,4096,16384,110208
  364. setprop net.tcp.buffersize.wifi 524288,1048576,2097152,262144,524288,1048576
  365. setprop net.tcp.buffersize.lte 4096,87380,1220608,4096,16384,563200
  366. setprop net.tcp.buffersize.umts 4096,87380,563200,4096,16384,110208
  367. setprop net.tcp.buffersize.hspa 4096,87380,704512,4096,16384,110208
  368. setprop net.tcp.buffersize.hsupa 4096,87380,704512,4096,16384,262144
  369. setprop net.tcp.buffersize.hsdpa 4096,87380,704512,4096,16384,262144
  370. setprop net.tcp.buffersize.hspap 4096,87380,1220608,4096,16384,393216
  371. setprop net.tcp.buffersize.edge 4096,26280,35040,4096,16384,35040
  372. setprop net.tcp.buffersize.gprs 4096,8760,11680,4096,8760,11680
  373. setprop net.tcp.buffersize.evdo 4096,87380,563200,4096,16384,262144
  374. setprop net.tcp.buffersize.evdo_b 4096,87380,704512,4096,16384,262144
  375.  
  376. # Assign TCP buffer thresholds to be ceiling value of technology maximums
  377. # Increased technology maximums should be reflected here.
  378. write /proc/sys/net/core/rmem_max 3461120
  379. write /proc/sys/net/core/wmem_max 3461120
  380.  
  381. # Set this property so surfaceflinger is not started by system_init
  382. setprop system_init.startsurfaceflinger 0
  383.  
  384. # Run sysinit
  385. exec /system/bin/sysinit
  386.  
  387. class_start core
  388. class_start main
  389.  
  390. on nonencrypted
  391. class_start late_start
  392.  
  393. on charger
  394. class_start charger
  395.  
  396. on property:vold.decrypt=trigger_reset_main
  397. class_reset main
  398.  
  399. on property:vold.decrypt=trigger_load_persist_props
  400. load_persist_props
  401.  
  402. on property:vold.decrypt=trigger_post_fs_data
  403. trigger post-fs-data
  404.  
  405. on property:vold.decrypt=trigger_restart_min_framework
  406. class_start main
  407.  
  408. on property:vold.decrypt=trigger_restart_framework
  409. class_start main
  410. class_start late_start
  411.  
  412. on property:vold.decrypt=trigger_shutdown_framework
  413. class_reset late_start
  414. class_reset main
  415.  
  416. # Used to disable USB when switching states
  417. on property:sys.usb.config=none
  418. stop adbd
  419. write /sys/class/android_usb/android0/enable 0
  420. write /sys/class/android_usb/android0/bDeviceClass 0
  421. setprop sys.usb.state $sys.usb.config
  422.  
  423. # adb only USB configuration
  424. # This should only be used during device bringup
  425. # and as a fallback if the USB manager fails to set a standard configuration
  426. on property:sys.usb.config=adb
  427. write /sys/class/android_usb/android0/enable 0
  428. write /sys/class/android_usb/android0/idVendor 19D2
  429. write /sys/class/android_usb/android0/idProduct 1352
  430. write /sys/class/android_usb/android0/functions adb
  431. write /sys/class/android_usb/android0/enable 1
  432. start adbd
  433. setprop sys.usb.state $sys.usb.config
  434.  
  435. # USB accessory configuration
  436. on property:sys.usb.config=accessory
  437. write /sys/class/android_usb/android0/enable 0
  438. write /sys/class/android_usb/android0/idVendor 18d1
  439. write /sys/class/android_usb/android0/idProduct 2d00
  440. write /sys/class/android_usb/android0/functions $sys.usb.config
  441. write /sys/class/android_usb/android0/enable 1
  442. setprop sys.usb.state $sys.usb.config
  443.  
  444. # USB accessory configuration, with adb
  445. on property:sys.usb.config=accessory,adb
  446. write /sys/class/android_usb/android0/enable 0
  447. write /sys/class/android_usb/android0/idVendor 18d1
  448. write /sys/class/android_usb/android0/idProduct 2d01
  449. write /sys/class/android_usb/android0/functions $sys.usb.config
  450. write /sys/class/android_usb/android0/enable 1
  451. start adbd
  452. setprop sys.usb.state $sys.usb.config
  453.  
  454. # Used to set USB configuration at boot and to switch the configuration
  455. # when changing the default configuration
  456. on property:persist.sys.usb.config=*
  457. setprop sys.usb.config $persist.sys.usb.config
  458.  
  459. ## Daemon processes to be run by init.
  460. ##
  461. service ueventd /sbin/ueventd
  462. class core
  463. critical
  464.  
  465. service console /system/bin/sh
  466. class core
  467. console
  468. disabled
  469. user shell
  470. group log
  471.  
  472. on property:ro.debuggable=1
  473. start console
  474.  
  475. # adbd is controlled via property triggers in init.<platform>.usb.rc
  476. service adbd /sbin/adbd
  477. class core
  478. disabled
  479.  
  480. # adbd on at boot in emulator
  481. on property:ro.kernel.qemu=1
  482. start adbd
  483.  
  484. # This property trigger has added to imitiate the previous behavior of "adb root".
  485. # The adb gadget driver used to reset the USB bus when the adbd daemon exited,
  486. # and the host side adb relied on this behavior to force it to reconnect with the
  487. # new adbd instance after init relaunches it. So now we force the USB bus to reset
  488. # here when adbd sets the service.adb.root property to 1. We also restart adbd here
  489. # rather than waiting for init to notice its death and restarting it so the timing
  490. # of USB resetting and adb restarting more closely matches the previous behavior.
  491. on property:service.adb.root=1
  492. write /sys/class/android_usb/android0/enable 0
  493. restart adbd
  494. write /sys/class/android_usb/android0/enable 1
  495.  
  496. service servicemanager /system/bin/servicemanager
  497. class core
  498. user system
  499. group system
  500. critical
  501. onrestart restart zygote
  502. onrestart restart media
  503. onrestart restart surfaceflinger
  504. onrestart restart drm
  505.  
  506. service vold /system/bin/vold
  507. class core
  508. socket vold stream 0660 root mount
  509. ioprio be 2
  510.  
  511. service netd /system/bin/netd
  512. class main
  513. socket netd stream 0660 root system
  514. socket dnsproxyd stream 0660 root inet
  515. socket mdns stream 0660 root system
  516.  
  517. service debuggerd /system/bin/debuggerd
  518. class main
  519.  
  520. service ril-daemon /system/bin/rild
  521. class main
  522. socket rild stream 660 root radio
  523. socket rild-debug stream 660 radio system
  524. user root
  525. group radio cache inet misc audio sdcard_r sdcard_rw qcom_oncrpc diag qcom_diag log
  526.  
  527. service surfaceflinger /system/bin/surfaceflinger
  528. class main
  529. user system
  530. group graphics
  531. onrestart restart zygote
  532.  
  533. service zygote /system/bin/app_process -Xzygote /system/bin --zygote --start-system-server
  534. class main
  535. socket zygote stream 666 root system
  536. onrestart write /sys/android_power/request_state wake
  537. onrestart write /sys/power/state on
  538. onrestart restart media
  539. onrestart restart netd
  540.  
  541. service drm /system/bin/drmserver
  542. class main
  543. user drm
  544. group drm system inet drmrpc sdcard_r qcom_oncrpc
  545.  
  546. #** ZTE_MODIFY yangyang10099103, 2011-08-01, for start DRM service #
  547. service DrmHost /system/bin/DrmHost
  548. class late_start
  549. disabled
  550. #** ZTE_MODIFY end
  551.  
  552. on property:ro.feature.ztedrm.support=1
  553. mkdir /data/oma 1777
  554. chmod 1777 /data/oma
  555. mkdir /data/oma/conf 1777
  556. chmod 1777 /data/oma/conf
  557. start DrmHost
  558.  
  559. service media /system/bin/mediaserver
  560. class main
  561. user media
  562. group audio camera inet net_bt net_bt_admin net_bw_acct drmrpc
  563. ioprio rt 4
  564.  
  565. service bootanim /system/bin/bootanimation
  566. class main
  567. user graphics
  568. group graphics
  569. disabled
  570. oneshot
  571.  
  572. service sysinit /system/bin/logwrapper /system/xbin/busybox run-parts /system/etc/init.d
  573. class late_start
  574. user root
  575. group shell
  576. oneshot
  577.  
  578. service dbus /system/bin/dbus-daemon --system --nofork
  579. class main
  580. socket dbus stream 660 bluetooth bluetooth
  581. user bluetooth
  582. group bluetooth net_bt_admin
  583.  
  584. service bluetoothd /system/bin/bluetoothd -n /system/etc/bluetooth/main.conf
  585. class main
  586. socket bluetooth stream 660 bluetooth bluetooth
  587. socket dbus_bluetooth stream 660 bluetooth bluetooth
  588. # init.rc does not yet support applying capabilities, so run as root and
  589. # let bluetoothd drop uid to bluetooth with the right linux capabilities
  590. group bluetooth net_bt_admin misc
  591. disabled
  592.  
  593. service installd /system/bin/installd
  594. class main
  595. socket installd stream 600 system system
  596.  
  597. service racoon /system/bin/racoon
  598. class main
  599. socket racoon stream 600 system system
  600. # IKE uses UDP port 500. Racoon will setuid to vpn after binding the port.
  601. group vpn net_admin inet
  602. disabled
  603. oneshot
  604.  
  605. service mtpd /system/bin/mtpd
  606. class main
  607. socket mtpd stream 600 system system
  608. user vpn
  609. group vpn net_admin inet net_raw
  610. disabled
  611. oneshot
  612.  
  613. service keystore /system/bin/keystore /data/misc/keystore
  614. class main
  615. user keystore
  616. group keystore drmrpc
  617. socket keystore stream 666
  618.  
  619. service dumpstate /system/bin/dumpstate -s
  620. class main
  621. socket dumpstate stream 0660 shell log
  622. disabled
  623. oneshot
  624.  
  625. service sshd /system/bin/start-ssh
  626. class main
  627. disabled
  628.  
  629. service mdnsd /system/bin/mdnsd
  630. class main
  631. user mdnsr
  632. group inet net_raw
  633. socket mdnsd stream 0660 mdnsr inet
  634. disabled
  635. oneshot
  636.  
  637. #ZTE_shuangdan_20120306 start
  638. service getlog /system/bin/getlogtofile
  639. user root
  640. disabled
  641. oneshot
  642.  
  643. #tcd add start
  644. service activatelog /system/bin/sh /system/bin/checklog.sh
  645. user root
  646. disabled
  647. oneshot
  648. #ZTE_JHT_20120418+++
  649. service wlan_prop /system/bin/sh /system/etc/init.wlanprop.sh
  650. class late_start
  651. oneshot
  652. #ZTE_JHT_20120418---
  653.  
  654. on property:persist.service.adb.enable=1
  655. start activatelog
  656.  
  657. on property:persist.service.adb.enable=0
  658. start activatelog
  659.  
  660. #tcd add end
  661. on property:persist.sys.ztelog.enable=1
  662. start getlog
  663.  
  664. on property:persist.sys.ztelog.enable=0
  665. stop getlog
  666.  
  667. #ZTE_shuangdan_20120306
  668. #ruanmeisi
  669. service hibernate /system/bin/hibernate
  670. class late_start
  671. disabled
  672. oneshot
  673.  
  674. service dhcpcd_wlan0 /system/bin/dhcpcd -BKLG
  675. class late_start
  676. disabled
  677. oneshot
  678.  
  679. service dhcpcd_p2p /system/bin/dhcpcd -BKLG
  680. class late_start
  681. disabled
  682. oneshot
  683.  
  684. service iprenew_wlan0 /system/bin/dhcpcd -n
  685. class late_start
  686. disabled
  687. oneshot
  688.  
  689. service iprenew_p2p /system/bin/dhcpcd -n p2p
  690. class late_start
  691. disabled
  692. oneshot
  693.  
  694. service iprelease_wlan0 /system/bin/dhcpcd -k
  695. class late_start
  696. disabled
  697. oneshot
  698.  
  699. #ZTE_JHT_20120423+++
  700. service hostapd /system/bin/hostapd -dddd /data/misc/wifi/hostapd.conf
  701. class late_start
  702. # socket hostapd_wlan0 dgram 660 root wifi
  703. user root
  704. group wifi
  705. oneshot
  706. disabled
  707. #ZTE_JHT_20120423---
  708.  
  709. #ZTE_LILEYANG_PARTNERAPP
  710. service copypartnerapp /system/bin/copypartnerapp
  711. class late_start
  712. oneshot
  713. #end ZTE_LILEYANG_PARTNERAPP
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement