baadnewz

init.rc

Aug 15th, 2011
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.75 KB | None | 0 0
  1. on early-init
  2.  
  3. start ueventd
  4.  
  5.  
  6.  
  7. on init
  8.  
  9.  
  10.  
  11. sysclktz 0
  12.  
  13.  
  14.  
  15. loglevel 3
  16.  
  17.  
  18.  
  19. # setup the global environment
  20.  
  21. export PATH /sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
  22.  
  23. export LD_LIBRARY_PATH /vendor/lib:/system/lib
  24.  
  25. export ANDROID_BOOTLOGO 1
  26.  
  27. export ANDROID_ROOT /system
  28.  
  29. export ANDROID_ASSETS /system/app
  30.  
  31. export ANDROID_DATA /data
  32.  
  33. export EXTERNAL_STORAGE /mnt/sdcard
  34.  
  35. export ASEC_MOUNTPOINT /mnt/asec
  36.  
  37. export LOOP_MOUNTPOINT /mnt/obb
  38.  
  39. 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:/system/framework/com.htc.commonctrl.jar:/system/framework/com.htc.framework.jar:/system/framework/com.htc.android.pimlib.jar:/system/framework/com.htc.android.easopen.jar:/system/framework/com.scalado.util.ScaladoUtil.jar:/system/framework/com.orange.authentication.simcard.jar:/system/framework/android.supl.jar
  40.  
  41.  
  42.  
  43. # Backward compatibility
  44.  
  45. symlink /system/etc /etc
  46.  
  47. mount debugfs /sys/kernel/debug /sys/kernel/debug
  48.  
  49.  
  50.  
  51. # Right now vendor lives on the same filesystem as system,
  52.  
  53. # but someday that may change.
  54.  
  55. symlink /system/vendor /vendor
  56.  
  57.  
  58.  
  59. # create mountpoints
  60.  
  61. mkdir /mnt 0775 root system
  62.  
  63. mkdir /mnt/sdcard 0000 system system
  64.  
  65.  
  66.  
  67. # Create cgroup mount point for cpu accounting
  68.  
  69. mkdir /acct
  70.  
  71. mount cgroup none /acct cpuacct
  72.  
  73. mkdir /acct/uid
  74.  
  75.  
  76.  
  77. # Backwards Compat - XXX: Going away in G*
  78.  
  79. symlink /mnt/sdcard /sdcard
  80.  
  81.  
  82.  
  83. mkdir /system
  84.  
  85. mkdir /data 0771 system system
  86.  
  87. mkdir /cache 0770 system cache
  88.  
  89. mkdir /config 0500 root root
  90.  
  91.  
  92.  
  93. # Directory for putting things only root should see.
  94.  
  95. mkdir /mnt/secure 0700 root root
  96.  
  97.  
  98.  
  99. # Directory for staging bindmounts
  100.  
  101. mkdir /mnt/secure/staging 0700 root root
  102.  
  103.  
  104.  
  105. # Directory-target for where the secure container
  106.  
  107. # imagefile directory will be bind-mounted
  108.  
  109. mkdir /mnt/secure/asec 0700 root root
  110.  
  111.  
  112.  
  113. # Secure container public mount points.
  114.  
  115. mkdir /mnt/asec 0700 root system
  116.  
  117. mount tmpfs tmpfs /mnt/asec mode=0755,gid=1000
  118.  
  119.  
  120.  
  121. # Filesystem image public mount points.
  122.  
  123. mkdir /mnt/obb 0700 root system
  124.  
  125. mount tmpfs tmpfs /mnt/obb mode=0755,gid=1000
  126.  
  127.  
  128.  
  129. mkdir /app-cache 0700 root system
  130.  
  131. mount tmpfs tmpfs /app-cache size=8m,mode=0755,gid=1000
  132.  
  133.  
  134.  
  135. write /proc/sys/kernel/panic_on_oops 1
  136.  
  137. write /proc/sys/kernel/hung_task_timeout_secs 0
  138.  
  139. write /proc/cpu/alignment 4
  140.  
  141. write /proc/sys/kernel/sched_latency_ns 5000000
  142.  
  143. write /proc/sys/kernel/sched_wakeup_granularity_ns 100000
  144.  
  145. write /proc/sys/kernel/sched_min_granularity_ns 100000
  146.  
  147. write /proc/sys/kernel/sched_compat_yield 1
  148.  
  149. write /proc/sys/kernel/sched_child_runs_first 0
  150.  
  151.  
  152.  
  153. # Create cgroup mount points for process groups
  154.  
  155. mkdir /dev/cpuctl
  156.  
  157. mount cgroup none /dev/cpuctl cpu
  158.  
  159. chown system system /dev/cpuctl
  160.  
  161. chown system system /dev/cpuctl/tasks
  162.  
  163. chmod 0777 /dev/cpuctl/tasks
  164.  
  165. write /dev/cpuctl/cpu.shares 1024
  166.  
  167.  
  168.  
  169. mkdir /dev/cpuctl/fg_boost
  170.  
  171. chown system system /dev/cpuctl/fg_boost/tasks
  172.  
  173. chmod 0777 /dev/cpuctl/fg_boost/tasks
  174.  
  175. write /dev/cpuctl/fg_boost/cpu.shares 1024
  176.  
  177.  
  178.  
  179. mkdir /dev/cpuctl/bg_non_interactive
  180.  
  181. chown system system /dev/cpuctl/bg_non_interactive/tasks
  182.  
  183. chmod 0777 /dev/cpuctl/bg_non_interactive/tasks
  184.  
  185. # 5.0 %
  186.  
  187. write /dev/cpuctl/bg_non_interactive/cpu.shares 52
  188.  
  189.  
  190.  
  191. on fs
  192.  
  193. # mount mtd partitions
  194.  
  195. # Mount /system rw first to give the filesystem a chance to save a checkpoint
  196.  
  197. mount yaffs2 mtd@system /system
  198.  
  199. mount yaffs2 mtd@system /system ro remount
  200.  
  201. mount yaffs2 mtd@userdata /data nosuid nodev
  202.  
  203. mount yaffs2 mtd@cache /cache nosuid nodev
  204.  
  205.  
  206.  
  207. on post-fs
  208.  
  209. # once everything is setup, no need to modify /
  210.  
  211. mount rootfs rootfs / ro remount
  212.  
  213.  
  214.  
  215. # We chown/chmod /data again so because mount is run as root + defaults
  216.  
  217. chown system system /data
  218.  
  219. chmod 0771 /data
  220.  
  221.  
  222.  
  223. # create htcfs
  224.  
  225. mkdir /data/htcfs 0777 root root
  226.  
  227.  
  228.  
  229. # Create dump dir and collect dumps.
  230.  
  231. # Do this before we mount cache so eventually we can use cache for
  232.  
  233. # storing dumps on platforms which do not have a dedicated dump partition.
  234.  
  235.  
  236.  
  237. mkdir /data/dontpanic
  238.  
  239. chown root log /data/dontpanic
  240.  
  241. chmod 0750 /data/dontpanic
  242.  
  243.  
  244.  
  245. # Collect apanic data, free resources and re-arm trigger
  246.  
  247. copy /proc/apanic_console /data/dontpanic/apanic_console
  248.  
  249. chown root log /data/dontpanic/apanic_console
  250.  
  251. chmod 0640 /data/dontpanic/apanic_console
  252.  
  253.  
  254.  
  255. copy /proc/apanic_threads /data/dontpanic/apanic_threads
  256.  
  257. chown root log /data/dontpanic/apanic_threads
  258.  
  259. chmod 0640 /data/dontpanic/apanic_threads
  260.  
  261.  
  262.  
  263. write /proc/apanic_console 1
  264.  
  265.  
  266.  
  267. # Same reason as /data above
  268.  
  269. chown system cache /cache
  270.  
  271. chmod 0770 /cache
  272.  
  273.  
  274.  
  275. # This may have been created by the recovery system with odd permissions
  276.  
  277. chown system cache /cache/recovery
  278.  
  279. chmod 0770 /cache/recovery
  280.  
  281.  
  282.  
  283. #change permissions on vmallocinfo so we can grab it from bugreports
  284.  
  285. chown root log /proc/vmallocinfo
  286.  
  287. chmod 0440 /proc/vmallocinfo
  288.  
  289.  
  290.  
  291. #change permissions on kmsg & sysrq-trigger so bugreports can grab kthread stacks
  292.  
  293. chown root system /proc/kmsg
  294.  
  295. chmod 0440 /proc/kmsg
  296.  
  297. chown root system /proc/sysrq-trigger
  298.  
  299. chmod 0220 /proc/sysrq-trigger
  300.  
  301.  
  302.  
  303. # create basic filesystem structure
  304.  
  305. mkdir /data/misc 01771 system misc
  306.  
  307. mkdir /data/misc/bluetoothd 0770 bluetooth bluetooth
  308.  
  309. mkdir /data/misc/bluetooth 0770 system system
  310.  
  311. mkdir /data/misc/keystore 0700 keystore keystore
  312.  
  313. mkdir /data/misc/vpn 0770 system system
  314.  
  315. mkdir /data/misc/systemkeys 0700 system system
  316.  
  317. mkdir /data/misc/vpn/profiles 0770 system system
  318.  
  319. # give system access to wpa_supplicant.conf for backup and restore
  320.  
  321. mkdir /data/misc/wifi 0770 wifi wifi
  322.  
  323. chmod 0770 /data/misc/wifi
  324.  
  325. chmod 0660 /data/misc/wifi/wpa_supplicant.conf
  326.  
  327. mkdir /data/local 0771 shell shell
  328.  
  329. mkdir /data/local/tmp 0771 shell shell
  330.  
  331. mkdir /data/data 0771 system system
  332.  
  333. mkdir /data/app-private 0771 system system
  334.  
  335. mkdir /data/app 0771 system system
  336.  
  337. mkdir /data/property 0700 root root
  338.  
  339. copy /system/etc/adreno_config.txt /data/local/tmp/adreno_config.txt
  340.  
  341.  
  342.  
  343. # DRMv1 rights storage
  344.  
  345. symlink /data/local /data/drm
  346.  
  347. mkdir /data/local/rights 0774 shell shell
  348.  
  349. chown shell shell /data/drm
  350.  
  351.  
  352.  
  353. # create dalvik-cache and double-check the perms
  354.  
  355. mkdir /data/dalvik-cache 0771 system system
  356.  
  357. chown system system /data/dalvik-cache
  358.  
  359. chmod 0771 /data/dalvik-cache
  360.  
  361.  
  362.  
  363. # create the lost+found directories, so as to enforce our permissions
  364.  
  365. mkdir /data/lost+found 0770
  366.  
  367. mkdir /cache/lost+found 0770
  368.  
  369.  
  370.  
  371. # double check the perms, in case lost+found already exists, and set owner
  372.  
  373. chown root root /data/lost+found
  374.  
  375. chmod 0770 /data/lost+found
  376.  
  377. chown root root /cache/lost+found
  378.  
  379. chmod 0770 /cache/lost+found
  380.  
  381.  
  382.  
  383. # HTC add: for customization wizard folder
  384.  
  385. mkdir /data/data/cw 0777 root root
  386.  
  387.  
  388.  
  389. # HTC add: double check the perms of /data/data for already existed case
  390.  
  391. chown system system /data/data
  392.  
  393. chmod 0771 /data/data
  394.  
  395.  
  396.  
  397. on boot
  398.  
  399. # basic network init
  400.  
  401. ifup lo
  402.  
  403. hostname localhost
  404.  
  405. domainname localdomain
  406.  
  407.  
  408.  
  409. # set RLIMIT_NICE to allow priorities from 19 to -20
  410.  
  411. setrlimit 13 40 40
  412.  
  413. setrlimit 8 268435456 268435456
  414.  
  415.  
  416.  
  417. # Define the oom_adj values for the classes of processes that can be
  418.  
  419. # killed by the kernel. These are used in ActivityManagerService.
  420.  
  421. setprop ro.FOREGROUND_APP_ADJ 0
  422.  
  423. setprop ro.VISIBLE_APP_ADJ 1
  424.  
  425. setprop ro.PERCEPTIBLE_APP_ADJ 2
  426.  
  427. setprop ro.HEAVY_WEIGHT_APP_ADJ 3
  428.  
  429. setprop ro.SECONDARY_SERVER_ADJ 4
  430.  
  431. setprop ro.BACKUP_APP_ADJ 5
  432.  
  433. setprop ro.HOME_APP_ADJ 6
  434.  
  435. setprop ro.HIDDEN_APP_MIN_ADJ 7
  436.  
  437. setprop ro.EMPTY_APP_ADJ 15
  438.  
  439.  
  440.  
  441. # Define the memory thresholds at which the above process classes will
  442.  
  443. # be killed. These numbers are in pages (4k).
  444.  
  445. setprop ro.FOREGROUND_APP_MEM 2048
  446.  
  447. setprop ro.VISIBLE_APP_MEM 3072
  448.  
  449. setprop ro.PERCEPTIBLE_APP_MEM 4096
  450.  
  451. setprop ro.HEAVY_WEIGHT_APP_MEM 4096
  452.  
  453. setprop ro.SECONDARY_SERVER_MEM 6144
  454.  
  455. setprop ro.BACKUP_APP_MEM 6144
  456.  
  457. setprop ro.HOME_APP_MEM 6144
  458.  
  459. setprop ro.HIDDEN_APP_MEM 7168
  460.  
  461. setprop ro.EMPTY_APP_MEM 8192
  462.  
  463.  
  464.  
  465. # Enable Anr history , it would output the debuginfo to data partition
  466.  
  467. # 1: on 0: off
  468.  
  469. setprop debugtool.anrhistory 1
  470.  
  471.  
  472.  
  473. # Set error receiver
  474.  
  475. setprop ro.error.receiver.htc.apps com.htc.feedback
  476.  
  477.  
  478.  
  479. # Write value must be consistent with the above properties.
  480.  
  481. # Note that the driver only supports 6 slots, so we have combined some of
  482.  
  483. # the classes into the same memory level; the associated processes of higher
  484.  
  485. # classes will still be killed first.
  486.  
  487. write /sys/module/lowmemorykiller/parameters/adj 0,1,2,4,7,15
  488.  
  489.  
  490.  
  491. write /proc/sys/vm/overcommit_memory 1
  492.  
  493. write /proc/sys/vm/min_free_order_shift 4
  494.  
  495. write /proc/sys/vm/oom_dump_tasks 1
  496.  
  497. write /sys/module/lowmemorykiller/parameters/minfree 3584,4096,8192,10240,11264,12288
  498.  
  499. write /sys/module/lowmemorykiller/parameters/minfile 3584,4096,8192,10240,11264,12288
  500.  
  501. write /sys/module/lowmemorykiller/parameters/check_filepages 1
  502.  
  503.  
  504.  
  505. # Set init its forked children's oom_adj.
  506.  
  507. write /proc/1/oom_adj -16
  508.  
  509.  
  510.  
  511. # Tweak background writeout
  512.  
  513. write /proc/sys/vm/dirty_expire_centisecs 200
  514.  
  515. write /proc/sys/vm/dirty_background_bytes 1024000
  516.  
  517. write /proc/sys/vm/dirty_bytes 20480000
  518.  
  519. write /proc/sys/vm/highmem_is_dirtyable 1
  520.  
  521.  
  522.  
  523. # Permissions for System Server and daemons.
  524.  
  525. chown radio system /sys/android_power/state
  526.  
  527. chown radio system /sys/android_power/request_state
  528.  
  529. chown radio system /sys/android_power/acquire_full_wake_lock
  530.  
  531. chown radio system /sys/android_power/acquire_partial_wake_lock
  532.  
  533. chown radio system /sys/android_power/release_wake_lock
  534.  
  535. chown radio system /sys/power/state
  536.  
  537. chown radio system /sys/power/wake_lock
  538.  
  539. chown radio system /sys/power/wake_unlock
  540.  
  541. chown radio system /sys/module/gpio_event/parameters/phone_call_status
  542.  
  543. chmod 0444 /sys/android_camera/fps_mode
  544.  
  545. chmod 0660 /sys/android_camera2/htcwc
  546.  
  547. chown media system /sys/android_camera2/htcwc
  548.  
  549. chown media system /sys/android_camera/cam3Dmode
  550.  
  551. chown radio system /sys/camera_led_status/led_ril_status
  552.  
  553. chown system system /sys/camera_led_status/led_wimax_status
  554.  
  555. chown system system /sys/camera_led_status/led_hotspot_status
  556.  
  557. chown media system /sys/android_camera/cam_mode
  558.  
  559. chown radio system /sys/class/cap_sense/sar/sleep
  560.  
  561. chmod 0660 /sys/power/state
  562.  
  563. chmod 0660 /sys/power/wake_lock
  564.  
  565. chmod 0660 /sys/power/wake_unlock
  566.  
  567. chown system system /sys/camera_led_status/led_hotspot_status
  568.  
  569. chown system system /sys/class/timed_output/vibrator/enable
  570.  
  571. chown system system /sys/class/leds/flashlight/brightness
  572.  
  573. chown system system /sys/class/leds/keyboard-backlight/brightness
  574.  
  575. chown system system /sys/class/leds/lcd-backlight/brightness
  576.  
  577. chown system system /sys/class/leds/button-backlight/brightness
  578.  
  579. chown system system /sys/class/leds/jogball-backlight/brightness
  580.  
  581. chown system system /sys/class/leds/caps/brightness
  582.  
  583. chown system system /sys/class/leds/func/brightness
  584.  
  585. chown system system /sys/class/leds/red/brightness
  586.  
  587. chown system system /sys/class/leds/green/brightness
  588.  
  589. chown system system /sys/class/leds/blue/brightness
  590.  
  591. chown system system /sys/class/leds/amber/brightness
  592.  
  593. chown system system /sys/class/leds/red/device/grpfreq
  594.  
  595. chown system system /sys/class/leds/red/device/grppwm
  596.  
  597. chown system system /sys/class/leds/red/device/blink
  598.  
  599. chown system system /sys/class/leds/green/blink
  600.  
  601. chown system system /sys/class/leds/green/off_timer
  602.  
  603. chown system system /sys/class/leds/amber/blink
  604.  
  605. chown system system /sys/class/leds/amber/off_timer
  606.  
  607. chown system system /sys/class/timed_output/vibrator/enable
  608.  
  609. chown system system /sys/module/sco/parameters/disable_esco
  610.  
  611. chown system system /sys/kernel/ipv4/tcp_wmem_min
  612.  
  613. chown system system /sys/kernel/ipv4/tcp_wmem_def
  614.  
  615. chown system system /sys/kernel/ipv4/tcp_wmem_max
  616.  
  617. chown system system /sys/kernel/ipv4/tcp_rmem_min
  618.  
  619. chown system system /sys/kernel/ipv4/tcp_rmem_def
  620.  
  621. chown system system /sys/kernel/ipv4/tcp_rmem_max
  622.  
  623. chown root radio /proc/cmdline
  624.  
  625. # HTC UI - BEGIN
  626.  
  627. chown system system /sys/class/leds/red/blink
  628.  
  629. chown system system /sys/class/leds/red/off_timer
  630.  
  631. chown system system /sys/class/leds/blue/blink
  632.  
  633. chown system system /sys/class/leds/blue/off_timer
  634.  
  635. chown system system /sys/class/leds/button-backlight-portrait/brightness
  636.  
  637. chown system system /sys/class/leds/button-backlight-landscape/brightness
  638.  
  639. chown system system /sys/class/leds/amber-portrait/brightness
  640.  
  641. chown system system /sys/class/leds/green-portrait/brightness
  642.  
  643. chown system system /sys/class/leds/blue-portrait/brightness
  644.  
  645. chown system system /sys/class/leds/amber-landscape/brightness
  646.  
  647. chown system system /sys/class/leds/green-landscape/brightness
  648.  
  649. chown system system /sys/class/leds/blue-landscape/brightness
  650.  
  651. chown system system /sys/class/leds/sharekey/brightness
  652.  
  653. chown system system /sys/class/leds/sharekey/breath_times
  654.  
  655. chown media media /sys/class/leds/green-camera/brightness
  656.  
  657. chown system system /sys/devices/virtual/htc_accessory/fm/flag
  658.  
  659. chown system system /sys/devices/virtual/htc_accessory/tty/flag
  660.  
  661. # HTC UI - END
  662.  
  663. # bluetooth update FM status to keypad
  664.  
  665. chown bluetooth bluetooth /sys/devices/platform/gpio-event.0/fm_radio
  666.  
  667. chown system system /sys/class/switch/dock/dmb_wakeup
  668.  
  669.  
  670.  
  671. #set radio_feedback permissions
  672.  
  673. chown radio radio /dev/radio_feedback
  674.  
  675. chmod 0660 /dev/radio_feedback
  676.  
  677. chown radio radio /dev/sdiotty0
  678.  
  679. chmod 0660 /dev/sdiotty0
  680.  
  681.  
  682.  
  683. #set G-Sensor and Compass permissions
  684.  
  685. chown compass system /dev/akm8976_aot
  686.  
  687. chown compass system /dev/akm8976_daemon
  688.  
  689. chown compass system /dev/akm8973_aot
  690.  
  691. chown compass system /dev/akm8973_daemon
  692.  
  693. chown compass system /dev/akm8975_aot
  694.  
  695. chown compass system /dev/akm8975_daemon
  696.  
  697. chown compass system /dev/bma150
  698.  
  699. chmod 0640 /dev/akm8976_aot
  700.  
  701. chmod 0640 /dev/akm8976_daemon
  702.  
  703. chmod 0640 /dev/akm8973_aot
  704.  
  705. chmod 0640 /dev/akm8973_daemon
  706.  
  707. chmod 0640 /dev/akm8975_aot
  708.  
  709. chmod 0640 /dev/akm8975_daemon
  710.  
  711. chmod 0640 /dev/bma150
  712.  
  713.  
  714.  
  715. #set ntrig touch permissions
  716.  
  717. chown system system dev/ntrig_touch
  718.  
  719. chmod 0666 dev/ntrig_touch
  720.  
  721.  
  722.  
  723. #set atmel touch permissions
  724.  
  725. chown system system /sys/android_touch/unlock
  726.  
  727.  
  728.  
  729. #set diag permissions
  730.  
  731. chown radio radio /dev/diag
  732.  
  733. chown radio radio /dev/diag_mdm
  734.  
  735. chown radio radio /dev/htcdiag
  736.  
  737. chown radio radio /dev/diag_arm9
  738.  
  739. chown radio radio /dev/btdiag
  740.  
  741. chmod 0660 /dev/diag
  742.  
  743. chmod 0660 /dev/diag_mdm
  744.  
  745. chmod 0660 /dev/htcdiag
  746.  
  747. chmod 0660 /dev/diag_arm9
  748.  
  749. chmod 0660 /dev/btdiag
  750.  
  751.  
  752.  
  753. # Define TCP buffer sizes for various networks
  754.  
  755. # ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
  756.  
  757. setprop net.tcp.buffersize.default 4096,87380,110208,4096,16384,110208
  758.  
  759. setprop net.tcp.buffersize.wifi 4095,87380,110208,4096,16384,110208
  760.  
  761. setprop net.tcp.buffersize.hsdpa 4094,87380,393216,4096,16384,110208
  762.  
  763. setprop net.tcp.buffersize.umts 4094,87380,393216,4096,16384,110208
  764.  
  765. setprop net.tcp.buffersize.edge 4093,26280,393216,4096,16384,35040
  766.  
  767. setprop net.tcp.buffersize.gprs 4092,8760,393216,4096,8760,11680
  768.  
  769. setprop net.tcp.buffersize.lte 4094,87380,196608,4096,16384,196608
  770.  
  771. setprop net.tcp.buffersize.evdo_b 4094,87380,262144,4096,16384,262144
  772.  
  773. setprop net.tcp.buffersize.wimax 4096,221184,524288,4096,16384,110208
  774.  
  775.  
  776.  
  777. # Assign TCP buffer thresholds to be ceiling value of technology maximums
  778.  
  779. # Increased technology maximums should be reflected here.
  780.  
  781. write /proc/sys/net/core/rmem_max 262144
  782.  
  783. write /proc/sys/net/core/wmem_max 262144
  784.  
  785.  
  786.  
  787. start sysinit
  788.  
  789.  
  790.  
  791. class_start default
  792.  
  793.  
  794.  
  795. ## Daemon processes to be run by init.
  796.  
  797. ##
  798.  
  799. service ueventd /sbin/ueventd
  800.  
  801. critical
  802.  
  803.  
  804.  
  805. service console /system/bin/sh
  806.  
  807. console
  808.  
  809. disabled
  810.  
  811. user shell
  812.  
  813. group log
  814.  
  815.  
  816.  
  817. on property:ro.secure=0
  818.  
  819. start console
  820.  
  821.  
  822.  
  823. # adbd is controlled by the persist.service.adb.enable system property
  824.  
  825. service adbd /sbin/adbd
  826.  
  827. disabled
  828.  
  829.  
  830.  
  831. # adbd on at boot in emulator
  832.  
  833. on property:ro.kernel.qemu=1
  834.  
  835. start adbd
  836.  
  837.  
  838.  
  839. on property:persist.service.adb.enable=1
  840.  
  841. start adbd
  842.  
  843.  
  844.  
  845. on property:persist.service.adb.enable=0
  846.  
  847. stop adbd
  848.  
  849.  
  850.  
  851. service servicemanager /system/bin/servicemanager
  852.  
  853. user system
  854.  
  855. critical
  856.  
  857. onrestart restart zygote
  858.  
  859. onrestart restart media
  860.  
  861.  
  862.  
  863. service vold /system/bin/vold
  864.  
  865. socket vold stream 0660 root mount
  866.  
  867. ioprio be 2
  868.  
  869.  
  870.  
  871. service netd /system/bin/netd
  872.  
  873. socket netd stream 0660 root system
  874.  
  875.  
  876.  
  877. service debuggerd /system/bin/debuggerd
  878.  
  879.  
  880.  
  881. service ril-daemon /system/bin/rild
  882.  
  883. socket rild stream 660 root radio
  884.  
  885. socket rild-debug stream 660 radio system
  886.  
  887. socket rild-htc stream 660 radio system
  888.  
  889. socket rild-htc-dmagent stream 660 radio system
  890.  
  891. socket rild-htc-simapi stream 660 radio system
  892.  
  893. user root
  894.  
  895. group radio cache inet misc audio sdcard_rw
  896.  
  897.  
  898.  
  899. service ril-ims-daemon /system/bin/rild_ims
  900.  
  901. socket rild-ims stream 660 root radio
  902.  
  903. user root
  904.  
  905. group radio cache inet misc audio
  906.  
  907.  
  908.  
  909. service zygote /system/bin/app_process -Xzygote /system/bin --zygote --start-system-server
  910.  
  911. socket zygote stream 666
  912.  
  913. onrestart write /sys/android_power/request_state wake
  914.  
  915. onrestart write /sys/power/state on
  916.  
  917. onrestart restart media
  918.  
  919. onrestart restart netd
  920.  
  921.  
  922.  
  923. service sysinit /system/bin/logwrapper /system/xbin/busybox run-parts /system/etc/init.d
  924.  
  925. disabled
  926.  
  927. oneshot
  928.  
  929.  
  930.  
  931. service media /system/bin/mediaserver
  932.  
  933. user media
  934.  
  935. group system audio camera graphics inet net_bt net_bt_admin net_raw qcom_oncrpc
  936.  
  937. ioprio rt 4
  938.  
  939.  
  940.  
  941. service fusermount /system/bin/fusermount -u /data/htcfs
  942.  
  943. disabled
  944.  
  945. oneshot
  946.  
  947.  
  948.  
  949. service htcfs /system/bin/htcfs /data/htcfs -f -o allow_other
  950.  
  951. onrestart restart fusermount
  952.  
  953.  
  954.  
  955. service bootanim /system/bin/bootanimation
  956.  
  957. user graphics
  958.  
  959. group system audio graphics
  960.  
  961. disabled
  962.  
  963. oneshot
  964.  
  965.  
  966.  
  967. service dbus /system/bin/dbus-daemon --system --nofork
  968.  
  969. socket dbus stream 666 bluetooth bluetooth
  970.  
  971. user bluetooth
  972.  
  973. group bluetooth net_bt_admin
  974.  
  975.  
  976.  
  977. service bluetoothd /system/bin/bluetoothd -n
  978.  
  979. socket bluetooth stream 660 bluetooth bluetooth
  980.  
  981. socket dbus_bluetooth stream 660 bluetooth bluetooth
  982.  
  983. # init.rc does not yet support applying capabilities, so run as root and
  984.  
  985. # let bluetoothd drop uid to bluetooth with the right linux capabilities
  986.  
  987. group bluetooth net_bt_admin misc
  988.  
  989. disabled
  990.  
  991.  
  992.  
  993. service hfag /system/bin/sdptool add --channel=10 HFAG
  994.  
  995. user bluetooth
  996.  
  997. group bluetooth net_bt_admin
  998.  
  999. disabled
  1000.  
  1001. oneshot
  1002.  
  1003.  
  1004.  
  1005. service hsag /system/bin/sdptool add --channel=11 HSAG
  1006.  
  1007. user bluetooth
  1008.  
  1009. group bluetooth net_bt_admin
  1010.  
  1011. disabled
  1012.  
  1013. oneshot
  1014.  
  1015.  
  1016.  
  1017. service opush /system/bin/sdptool add --channel=12 OPUSH
  1018.  
  1019. user bluetooth
  1020.  
  1021. group bluetooth net_bt_admin
  1022.  
  1023. disabled
  1024.  
  1025. oneshot
  1026.  
  1027.  
  1028.  
  1029. service pbap /system/bin/sdptool add --channel=19 PBAP
  1030.  
  1031. user bluetooth
  1032.  
  1033. group bluetooth net_bt_admin
  1034.  
  1035. disabled
  1036.  
  1037. oneshot
  1038.  
  1039.  
  1040.  
  1041. service installd /system/bin/installd
  1042.  
  1043. socket installd stream 600 system system
  1044.  
  1045.  
  1046.  
  1047. service flash_recovery /system/etc/install-recovery.sh
  1048.  
  1049. oneshot
  1050.  
  1051.  
  1052.  
  1053. service racoon /system/bin/racoon
  1054.  
  1055. socket racoon stream 600 system system
  1056.  
  1057. # racoon will setuid to vpn after getting necessary resources.
  1058.  
  1059. group net_admin
  1060.  
  1061. disabled
  1062.  
  1063. oneshot
  1064.  
  1065.  
  1066.  
  1067. service mtpd /system/bin/mtpd
  1068.  
  1069. socket mtpd stream 600 system system
  1070.  
  1071. user vpn
  1072.  
  1073. group vpn net_admin net_raw
  1074.  
  1075. disabled
  1076.  
  1077. oneshot
  1078.  
  1079.  
  1080.  
  1081. service keystore /system/bin/keystore /data/misc/keystore
  1082.  
  1083. user keystore
  1084.  
  1085. group keystore
  1086.  
  1087. socket keystore stream 666
  1088.  
  1089.  
  1090.  
  1091. service dumpstate /system/bin/dumpstate -s
  1092.  
  1093. socket dumpstate stream 0660 shell log
  1094.  
  1095. disabled
  1096.  
  1097. oneshot
  1098.  
  1099.  
  1100.  
  1101. service ipd /system/bin/ipd
  1102.  
  1103. socket ipd stream 666 root inet
  1104.  
  1105.  
  1106.  
  1107. on property:dev.bootcomplete=1
  1108.  
  1109. start bootcomplete
  1110.  
  1111.  
  1112.  
  1113. service bootcomplete /system/bin/bootcomplete
  1114.  
  1115. user root
  1116.  
  1117. group root
  1118.  
  1119. disabled
  1120.  
  1121. oneshot
  1122.  
  1123.  
  1124.  
  1125. service shutdown /system/bin/shutdown
  1126.  
  1127. user root
  1128.  
  1129. group root
  1130.  
  1131. disabled
  1132.  
  1133. oneshot
  1134.  
  1135.  
  1136.  
  1137. service charging /system/bin/charging
  1138.  
  1139. user root
  1140.  
  1141. group root
  1142.  
  1143. disabled
  1144.  
  1145. oneshot
  1146.  
  1147.  
  1148.  
  1149. service post-boot /system/bin/sh /system/etc/init.post_boot.sh
  1150.  
  1151. user root
  1152.  
  1153. oneshot
  1154.  
  1155.  
  1156.  
  1157. on property:crypto.driver.load=1
  1158.  
  1159. insmod /system/lib/modules/qce.ko
  1160.  
  1161. insmod /system/lib/modules/qcedev.ko
  1162.  
  1163.  
  1164.  
  1165. on property:crypto.driver.load=0
  1166.  
  1167. exec /system/bin/rmmod qcedev.ko
  1168.  
  1169. exec /system/bin/rmmod qce.ko
Add Comment
Please, Sign In to add comment