Colin Cross | f83d0b9 | 2010-04-21 12:04:20 -0700 | [diff] [blame] | 1 | on early-init |
| 2 | start ueventd |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 3 | |
| 4 | on init |
| 5 | |
| 6 | sysclktz 0 |
| 7 | |
| 8 | loglevel 3 |
| 9 | |
| 10 | # setup the global environment |
| 11 | export PATH /sbin:/system/sbin:/system/bin:/system/xbin |
| 12 | export LD_LIBRARY_PATH /system/lib |
| 13 | export ANDROID_BOOTLOGO 1 |
| 14 | export ANDROID_ROOT /system |
| 15 | export ANDROID_ASSETS /system/app |
| 16 | export ANDROID_DATA /data |
San Mehat | 6ea3cc6 | 2010-02-19 18:25:22 -0800 | [diff] [blame] | 17 | export EXTERNAL_STORAGE /mnt/sdcard |
San Mehat | a9db22f | 2010-02-24 10:17:32 -0800 | [diff] [blame] | 18 | export ASEC_MOUNTPOINT /mnt/asec |
Jesse Wilson | 9811671 | 2010-05-04 16:32:37 -0700 | [diff] [blame] | 19 | export BOOTCLASSPATH /system/framework/core.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/core-junit.jar |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 20 | |
| 21 | # Backward compatibility |
| 22 | symlink /system/etc /etc |
Brian Swetland | bb6f68c | 2009-09-18 15:31:23 -0700 | [diff] [blame] | 23 | symlink /sys/kernel/debug /d |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 24 | |
Vasu Nori | 55a1f08 | 2010-01-26 23:12:37 -0800 | [diff] [blame] | 25 | # create mountpoints |
San Mehat | 6ea3cc6 | 2010-02-19 18:25:22 -0800 | [diff] [blame] | 26 | mkdir /mnt 0775 root system |
| 27 | mkdir /mnt/sdcard 0000 system system |
| 28 | |
Mike Chan | 89f235c | 2010-03-01 11:36:10 -0800 | [diff] [blame] | 29 | # Create cgroup mount point for cpu accounting |
| 30 | mkdir /acct |
| 31 | mount cgroup none /acct cpuacct |
| 32 | mkdir /acct/uid |
| 33 | |
San Mehat | 6ea3cc6 | 2010-02-19 18:25:22 -0800 | [diff] [blame] | 34 | # Backwards Compat - XXX: Going away in G* |
| 35 | symlink /mnt/sdcard /sdcard |
| 36 | |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 37 | mkdir /system |
| 38 | mkdir /data 0771 system system |
| 39 | mkdir /cache 0770 system cache |
Dmitry Shmidt | 720f08f | 2009-06-09 14:38:56 -0700 | [diff] [blame] | 40 | mkdir /config 0500 root root |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 41 | |
San Mehat | 6ea3cc6 | 2010-02-19 18:25:22 -0800 | [diff] [blame] | 42 | # Directory for putting things only root should see. |
| 43 | mkdir /mnt/secure 0700 root root |
| 44 | |
| 45 | # Directory for staging bindmounts |
| 46 | mkdir /mnt/secure/staging 0700 root root |
| 47 | |
| 48 | # Directory-target for where the secure container |
| 49 | # imagefile directory will be bind-mounted |
| 50 | mkdir /mnt/secure/asec 0700 root root |
| 51 | |
| 52 | # Secure container public mount points. |
| 53 | mkdir /mnt/asec 0700 root system |
| 54 | mount tmpfs tmpfs /mnt/asec mode=0755,gid=1000 |
San Mehat | 900570e | 2010-01-06 10:38:49 -0800 | [diff] [blame] | 55 | |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 56 | mount rootfs rootfs / ro remount |
| 57 | |
| 58 | write /proc/sys/kernel/panic_on_oops 1 |
| 59 | write /proc/sys/kernel/hung_task_timeout_secs 0 |
| 60 | write /proc/cpu/alignment 4 |
| 61 | write /proc/sys/kernel/sched_latency_ns 10000000 |
| 62 | write /proc/sys/kernel/sched_wakeup_granularity_ns 2000000 |
San Mehat | 4322f2d | 2009-06-29 08:47:43 -0700 | [diff] [blame] | 63 | write /proc/sys/kernel/sched_compat_yield 1 |
San Mehat | 7baff71 | 2009-09-16 13:32:23 -0700 | [diff] [blame] | 64 | write /proc/sys/kernel/sched_child_runs_first 0 |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 65 | |
San Mehat | 529520e | 2009-10-06 11:22:55 -0700 | [diff] [blame] | 66 | # Create cgroup mount points for process groups |
| 67 | mkdir /dev/cpuctl |
San Mehat | b91bf4b | 2010-02-27 08:20:11 -0800 | [diff] [blame] | 68 | mount cgroup none /dev/cpuctl cpu |
San Mehat | 92175e0 | 2010-01-17 12:21:42 -0800 | [diff] [blame] | 69 | chown system system /dev/cpuctl |
San Mehat | 529520e | 2009-10-06 11:22:55 -0700 | [diff] [blame] | 70 | chown system system /dev/cpuctl/tasks |
| 71 | chmod 0777 /dev/cpuctl/tasks |
| 72 | write /dev/cpuctl/cpu.shares 1024 |
| 73 | |
| 74 | mkdir /dev/cpuctl/fg_boost |
| 75 | chown system system /dev/cpuctl/fg_boost/tasks |
| 76 | chmod 0777 /dev/cpuctl/fg_boost/tasks |
| 77 | write /dev/cpuctl/fg_boost/cpu.shares 1024 |
| 78 | |
| 79 | mkdir /dev/cpuctl/bg_non_interactive |
| 80 | chown system system /dev/cpuctl/bg_non_interactive/tasks |
| 81 | chmod 0777 /dev/cpuctl/bg_non_interactive/tasks |
| 82 | # 5.0 % |
| 83 | write /dev/cpuctl/bg_non_interactive/cpu.shares 52 |
San Mehat | 4933098 | 2009-04-21 14:34:19 -0700 | [diff] [blame] | 84 | |
Colin Cross | 31712be | 2010-04-09 12:26:06 -0700 | [diff] [blame] | 85 | on fs |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 86 | # mount mtd partitions |
| 87 | # Mount /system rw first to give the filesystem a chance to save a checkpoint |
Chung-yih Wang | 1f75d70 | 2009-06-01 19:04:05 +0800 | [diff] [blame] | 88 | mount yaffs2 mtd@system /system |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 89 | mount yaffs2 mtd@system /system ro remount |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 90 | mount yaffs2 mtd@userdata /data nosuid nodev |
Colin Cross | 31712be | 2010-04-09 12:26:06 -0700 | [diff] [blame] | 91 | mount yaffs2 mtd@cache /cache nosuid nodev |
| 92 | |
| 93 | on post-fs |
| 94 | # We chown/chmod /data again so because mount is run as root + defaults |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 95 | chown system system /data |
| 96 | chmod 0771 /data |
| 97 | |
San Mehat | f26d6ce | 2009-09-01 09:11:04 -0700 | [diff] [blame] | 98 | # Create dump dir and collect dumps. |
| 99 | # Do this before we mount cache so eventually we can use cache for |
| 100 | # storing dumps on platforms which do not have a dedicated dump partition. |
| 101 | |
| 102 | mkdir /data/dontpanic |
Mike Lockwood | 25f1a5a | 2009-09-11 17:13:28 -0400 | [diff] [blame] | 103 | chown root log /data/dontpanic |
Mike Lockwood | 9332482 | 2009-09-08 22:55:59 -0400 | [diff] [blame] | 104 | chmod 0750 /data/dontpanic |
San Mehat | f26d6ce | 2009-09-01 09:11:04 -0700 | [diff] [blame] | 105 | |
| 106 | # Collect apanic data, free resources and re-arm trigger |
| 107 | copy /proc/apanic_console /data/dontpanic/apanic_console |
Mike Lockwood | 25f1a5a | 2009-09-11 17:13:28 -0400 | [diff] [blame] | 108 | chown root log /data/dontpanic/apanic_console |
Mike Lockwood | 9332482 | 2009-09-08 22:55:59 -0400 | [diff] [blame] | 109 | chmod 0640 /data/dontpanic/apanic_console |
San Mehat | 020f35f | 2009-09-01 15:38:18 -0700 | [diff] [blame] | 110 | |
San Mehat | f26d6ce | 2009-09-01 09:11:04 -0700 | [diff] [blame] | 111 | copy /proc/apanic_threads /data/dontpanic/apanic_threads |
Mike Lockwood | 25f1a5a | 2009-09-11 17:13:28 -0400 | [diff] [blame] | 112 | chown root log /data/dontpanic/apanic_threads |
Mike Lockwood | 9332482 | 2009-09-08 22:55:59 -0400 | [diff] [blame] | 113 | chmod 0640 /data/dontpanic/apanic_threads |
San Mehat | 020f35f | 2009-09-01 15:38:18 -0700 | [diff] [blame] | 114 | |
San Mehat | f26d6ce | 2009-09-01 09:11:04 -0700 | [diff] [blame] | 115 | write /proc/apanic_console 1 |
| 116 | |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 117 | # Same reason as /data above |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 118 | chown system cache /cache |
| 119 | chmod 0770 /cache |
| 120 | |
| 121 | # This may have been created by the recovery system with odd permissions |
Doug Zongker | eb67fac | 2009-11-19 16:52:02 -0800 | [diff] [blame] | 122 | chown system cache /cache/recovery |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 123 | chmod 0770 /cache/recovery |
| 124 | |
Rebecca Schultz Zavin | 14d898e | 2009-10-08 15:25:52 -0700 | [diff] [blame] | 125 | #change permissions on vmallocinfo so we can grab it from bugreports |
| 126 | chown root log /proc/vmallocinfo |
| 127 | chmod 0440 /proc/vmallocinfo |
| 128 | |
Christopher Tate | 230cb33 | 2010-06-01 17:46:09 -0700 | [diff] [blame] | 129 | #change permissions on kmsg & sysrq-trigger so bugreports can grab kthread stacks |
| 130 | chown root system /proc/kmsg |
| 131 | chmod 0440 /proc/kmsg |
| 132 | chown root system /proc/sysrq-trigger |
| 133 | chmod 0220 /proc/sysrq-trigger |
| 134 | |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 135 | # create basic filesystem structure |
| 136 | mkdir /data/misc 01771 system misc |
Jaikumar Ganesh | 1d36696 | 2009-05-05 22:28:54 -0700 | [diff] [blame] | 137 | mkdir /data/misc/bluetoothd 0770 bluetooth bluetooth |
Jaikumar Ganesh | eafdd86 | 2010-01-07 20:24:55 -0800 | [diff] [blame] | 138 | mkdir /data/misc/bluetooth 0770 system system |
Chia-chi Yeh | 9b4f1ff | 2009-09-18 10:35:26 +0800 | [diff] [blame] | 139 | mkdir /data/misc/keystore 0700 keystore keystore |
Chung-yih Wang | 1f75d70 | 2009-06-01 19:04:05 +0800 | [diff] [blame] | 140 | mkdir /data/misc/vpn 0770 system system |
Oscar Montemayor | d0aa32c | 2010-01-06 13:18:12 -0800 | [diff] [blame] | 141 | mkdir /data/misc/systemkeys 0700 system system |
Chung-yih Wang | 1f75d70 | 2009-06-01 19:04:05 +0800 | [diff] [blame] | 142 | mkdir /data/misc/vpn/profiles 0770 system system |
Mike Lockwood | 48d116e | 2009-07-08 18:42:08 -0400 | [diff] [blame] | 143 | # give system access to wpa_supplicant.conf for backup and restore |
| 144 | mkdir /data/misc/wifi 0770 wifi wifi |
| 145 | chmod 0770 /data/misc/wifi |
Amith Yamasani | eefef32 | 2009-07-02 12:08:13 -0700 | [diff] [blame] | 146 | chmod 0660 /data/misc/wifi/wpa_supplicant.conf |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 147 | mkdir /data/local 0771 shell shell |
| 148 | mkdir /data/local/tmp 0771 shell shell |
| 149 | mkdir /data/data 0771 system system |
| 150 | mkdir /data/app-private 0771 system system |
| 151 | mkdir /data/app 0771 system system |
| 152 | mkdir /data/property 0700 root root |
| 153 | |
| 154 | # create dalvik-cache and double-check the perms |
| 155 | mkdir /data/dalvik-cache 0771 system system |
| 156 | chown system system /data/dalvik-cache |
| 157 | chmod 0771 /data/dalvik-cache |
| 158 | |
| 159 | # create the lost+found directories, so as to enforce our permissions |
| 160 | mkdir /data/lost+found 0770 |
| 161 | mkdir /cache/lost+found 0770 |
| 162 | |
| 163 | # double check the perms, in case lost+found already exists, and set owner |
| 164 | chown root root /data/lost+found |
| 165 | chmod 0770 /data/lost+found |
| 166 | chown root root /cache/lost+found |
| 167 | chmod 0770 /cache/lost+found |
| 168 | |
| 169 | on boot |
| 170 | # basic network init |
| 171 | ifup lo |
| 172 | hostname localhost |
| 173 | domainname localdomain |
| 174 | |
| 175 | # set RLIMIT_NICE to allow priorities from 19 to -20 |
| 176 | setrlimit 13 40 40 |
| 177 | |
| 178 | # Define the oom_adj values for the classes of processes that can be |
| 179 | # killed by the kernel. These are used in ActivityManagerService. |
| 180 | setprop ro.FOREGROUND_APP_ADJ 0 |
| 181 | setprop ro.VISIBLE_APP_ADJ 1 |
| 182 | setprop ro.SECONDARY_SERVER_ADJ 2 |
Christopher Tate | 17df71e | 2009-06-05 18:20:08 -0700 | [diff] [blame] | 183 | setprop ro.BACKUP_APP_ADJ 2 |
The Android Open Source Project | e4749f3 | 2009-03-09 11:52:15 -0700 | [diff] [blame] | 184 | setprop ro.HOME_APP_ADJ 4 |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 185 | setprop ro.HIDDEN_APP_MIN_ADJ 7 |
| 186 | setprop ro.CONTENT_PROVIDER_ADJ 14 |
| 187 | setprop ro.EMPTY_APP_ADJ 15 |
| 188 | |
| 189 | # Define the memory thresholds at which the above process classes will |
| 190 | # be killed. These numbers are in pages (4k). |
| 191 | setprop ro.FOREGROUND_APP_MEM 1536 |
| 192 | setprop ro.VISIBLE_APP_MEM 2048 |
| 193 | setprop ro.SECONDARY_SERVER_MEM 4096 |
Christopher Tate | 17df71e | 2009-06-05 18:20:08 -0700 | [diff] [blame] | 194 | setprop ro.BACKUP_APP_MEM 4096 |
The Android Open Source Project | e4749f3 | 2009-03-09 11:52:15 -0700 | [diff] [blame] | 195 | setprop ro.HOME_APP_MEM 4096 |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 196 | setprop ro.HIDDEN_APP_MEM 5120 |
| 197 | setprop ro.CONTENT_PROVIDER_MEM 5632 |
| 198 | setprop ro.EMPTY_APP_MEM 6144 |
| 199 | |
| 200 | # Write value must be consistent with the above properties. |
The Android Open Source Project | e4749f3 | 2009-03-09 11:52:15 -0700 | [diff] [blame] | 201 | # Note that the driver only supports 6 slots, so we have HOME_APP at the |
| 202 | # same memory level as services. |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 203 | write /sys/module/lowmemorykiller/parameters/adj 0,1,2,7,14,15 |
| 204 | |
| 205 | write /proc/sys/vm/overcommit_memory 1 |
The Android Open Source Project | e037fd7 | 2009-03-13 13:04:37 -0700 | [diff] [blame] | 206 | write /proc/sys/vm/min_free_order_shift 4 |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 207 | write /sys/module/lowmemorykiller/parameters/minfree 1536,2048,4096,5120,5632,6144 |
| 208 | |
| 209 | # Set init its forked children's oom_adj. |
| 210 | write /proc/1/oom_adj -16 |
| 211 | |
San Mehat | 831d8e1 | 2009-10-13 12:24:47 -0700 | [diff] [blame] | 212 | # Tweak background writeout |
| 213 | write /proc/sys/vm/dirty_expire_centisecs 200 |
| 214 | write /proc/sys/vm/dirty_background_ratio 5 |
| 215 | |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 216 | # Permissions for System Server and daemons. |
| 217 | chown radio system /sys/android_power/state |
| 218 | chown radio system /sys/android_power/request_state |
| 219 | chown radio system /sys/android_power/acquire_full_wake_lock |
| 220 | chown radio system /sys/android_power/acquire_partial_wake_lock |
| 221 | chown radio system /sys/android_power/release_wake_lock |
| 222 | chown radio system /sys/power/state |
| 223 | chown radio system /sys/power/wake_lock |
| 224 | chown radio system /sys/power/wake_unlock |
| 225 | chmod 0660 /sys/power/state |
| 226 | chmod 0660 /sys/power/wake_lock |
| 227 | chmod 0660 /sys/power/wake_unlock |
| 228 | chown system system /sys/class/timed_output/vibrator/enable |
| 229 | chown system system /sys/class/leds/keyboard-backlight/brightness |
| 230 | chown system system /sys/class/leds/lcd-backlight/brightness |
| 231 | chown system system /sys/class/leds/button-backlight/brightness |
The Android Open Source Project | f614d64 | 2009-03-18 17:39:49 -0700 | [diff] [blame] | 232 | chown system system /sys/class/leds/jogball-backlight/brightness |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 233 | chown system system /sys/class/leds/red/brightness |
| 234 | chown system system /sys/class/leds/green/brightness |
| 235 | chown system system /sys/class/leds/blue/brightness |
| 236 | chown system system /sys/class/leds/red/device/grpfreq |
| 237 | chown system system /sys/class/leds/red/device/grppwm |
| 238 | chown system system /sys/class/leds/red/device/blink |
| 239 | chown system system /sys/class/leds/red/brightness |
| 240 | chown system system /sys/class/leds/green/brightness |
| 241 | chown system system /sys/class/leds/blue/brightness |
| 242 | chown system system /sys/class/leds/red/device/grpfreq |
| 243 | chown system system /sys/class/leds/red/device/grppwm |
| 244 | chown system system /sys/class/leds/red/device/blink |
| 245 | chown system system /sys/class/timed_output/vibrator/enable |
| 246 | chown system system /sys/module/sco/parameters/disable_esco |
| 247 | chown system system /sys/kernel/ipv4/tcp_wmem_min |
| 248 | chown system system /sys/kernel/ipv4/tcp_wmem_def |
| 249 | chown system system /sys/kernel/ipv4/tcp_wmem_max |
| 250 | chown system system /sys/kernel/ipv4/tcp_rmem_min |
| 251 | chown system system /sys/kernel/ipv4/tcp_rmem_def |
| 252 | chown system system /sys/kernel/ipv4/tcp_rmem_max |
| 253 | chown root radio /proc/cmdline |
| 254 | |
| 255 | # Define TCP buffer sizes for various networks |
| 256 | # ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax, |
| 257 | setprop net.tcp.buffersize.default 4096,87380,110208,4096,16384,110208 |
| 258 | setprop net.tcp.buffersize.wifi 4095,87380,110208,4096,16384,110208 |
| 259 | setprop net.tcp.buffersize.umts 4094,87380,110208,4096,16384,110208 |
| 260 | setprop net.tcp.buffersize.edge 4093,26280,35040,4096,16384,35040 |
| 261 | setprop net.tcp.buffersize.gprs 4092,8760,11680,4096,8760,11680 |
| 262 | |
| 263 | class_start default |
| 264 | |
| 265 | ## Daemon processes to be run by init. |
| 266 | ## |
| 267 | service console /system/bin/sh |
| 268 | console |
| 269 | |
Colin Cross | f83d0b9 | 2010-04-21 12:04:20 -0700 | [diff] [blame] | 270 | service ueventd /sbin/ueventd |
| 271 | critical |
| 272 | |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 273 | # adbd is controlled by the persist.service.adb.enable system property |
| 274 | service adbd /sbin/adbd |
| 275 | disabled |
| 276 | |
| 277 | # adbd on at boot in emulator |
| 278 | on property:ro.kernel.qemu=1 |
| 279 | start adbd |
| 280 | |
| 281 | on property:persist.service.adb.enable=1 |
| 282 | start adbd |
| 283 | |
| 284 | on property:persist.service.adb.enable=0 |
| 285 | stop adbd |
| 286 | |
| 287 | service servicemanager /system/bin/servicemanager |
| 288 | user system |
| 289 | critical |
| 290 | onrestart restart zygote |
| 291 | onrestart restart media |
| 292 | |
The Android Open Source Project | e4749f3 | 2009-03-09 11:52:15 -0700 | [diff] [blame] | 293 | service vold /system/bin/vold |
| 294 | socket vold stream 0660 root mount |
San Mehat | f0cb74e | 2010-02-26 10:01:14 -0800 | [diff] [blame] | 295 | ioprio be 2 |
The Android Open Source Project | e4749f3 | 2009-03-09 11:52:15 -0700 | [diff] [blame] | 296 | |
San Mehat | 192277c | 2010-01-15 07:48:35 -0800 | [diff] [blame] | 297 | service netd /system/bin/netd |
| 298 | socket netd stream 0660 root system |
| 299 | |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 300 | service debuggerd /system/bin/debuggerd |
| 301 | |
| 302 | service ril-daemon /system/bin/rild |
| 303 | socket rild stream 660 root radio |
| 304 | socket rild-debug stream 660 radio system |
| 305 | user root |
Jean-Michel Trivi | 5e7db23 | 2009-11-02 15:22:18 -0800 | [diff] [blame] | 306 | group radio cache inet misc audio |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 307 | |
| 308 | service zygote /system/bin/app_process -Xzygote /system/bin --zygote --start-system-server |
| 309 | socket zygote stream 666 |
| 310 | onrestart write /sys/android_power/request_state wake |
| 311 | onrestart write /sys/power/state on |
Dan Bornstein | 1dec503 | 2009-10-09 14:24:51 -0700 | [diff] [blame] | 312 | onrestart restart media |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 313 | |
| 314 | service media /system/bin/mediaserver |
| 315 | user media |
Nick Pelly | c741f22 | 2010-03-23 17:38:12 -0700 | [diff] [blame] | 316 | group system audio camera graphics inet net_bt net_bt_admin net_raw |
San Mehat | f0cb74e | 2010-02-26 10:01:14 -0800 | [diff] [blame] | 317 | ioprio rt 4 |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 318 | |
Mathias Agopian | 8b2cf9f | 2009-05-20 18:09:51 -0700 | [diff] [blame] | 319 | service bootanim /system/bin/bootanimation |
| 320 | user graphics |
| 321 | group graphics |
| 322 | disabled |
| 323 | oneshot |
| 324 | |
Jaikumar Ganesh | 1320687 | 2009-09-18 15:45:43 -0700 | [diff] [blame] | 325 | service dbus /system/bin/dbus-daemon --system --nofork |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 326 | socket dbus stream 660 bluetooth bluetooth |
| 327 | user bluetooth |
| 328 | group bluetooth net_bt_admin |
| 329 | |
Jaikumar Ganesh | 1320687 | 2009-09-18 15:45:43 -0700 | [diff] [blame] | 330 | service bluetoothd /system/bin/bluetoothd -n |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 331 | socket bluetooth stream 660 bluetooth bluetooth |
| 332 | socket dbus_bluetooth stream 660 bluetooth bluetooth |
| 333 | # init.rc does not yet support applying capabilities, so run as root and |
Jaikumar Ganesh | 1d36696 | 2009-05-05 22:28:54 -0700 | [diff] [blame] | 334 | # let bluetoothd drop uid to bluetooth with the right linux capabilities |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 335 | group bluetooth net_bt_admin misc |
| 336 | disabled |
| 337 | |
| 338 | service hfag /system/bin/sdptool add --channel=10 HFAG |
| 339 | user bluetooth |
| 340 | group bluetooth net_bt_admin |
| 341 | disabled |
| 342 | oneshot |
| 343 | |
| 344 | service hsag /system/bin/sdptool add --channel=11 HSAG |
| 345 | user bluetooth |
| 346 | group bluetooth net_bt_admin |
| 347 | disabled |
| 348 | oneshot |
| 349 | |
Nick Pelly | b44aeb7 | 2009-07-14 21:29:15 -0700 | [diff] [blame] | 350 | service opush /system/bin/sdptool add --channel=12 OPUSH |
| 351 | user bluetooth |
| 352 | group bluetooth net_bt_admin |
| 353 | disabled |
| 354 | oneshot |
| 355 | |
Jaikumar Ganesh | 630f5f0 | 2009-07-23 21:19:04 -0700 | [diff] [blame] | 356 | service pbap /system/bin/sdptool add --channel=19 PBAP |
| 357 | user bluetooth |
| 358 | group bluetooth net_bt_admin |
| 359 | disabled |
| 360 | oneshot |
| 361 | |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 362 | service installd /system/bin/installd |
| 363 | socket installd stream 600 system system |
| 364 | |
Doug Zongker | d52f54c | 2009-07-23 15:18:34 -0700 | [diff] [blame] | 365 | service flash_recovery /system/etc/install-recovery.sh |
The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 366 | oneshot |
Chung-yih Wang | 1f75d70 | 2009-06-01 19:04:05 +0800 | [diff] [blame] | 367 | |
Chia-chi Yeh | 51afbf5 | 2009-07-01 07:06:47 +0800 | [diff] [blame] | 368 | service racoon /system/bin/racoon |
Chung-yih Wang | 1f75d70 | 2009-06-01 19:04:05 +0800 | [diff] [blame] | 369 | socket racoon stream 600 system system |
Chia-chi Yeh | 51afbf5 | 2009-07-01 07:06:47 +0800 | [diff] [blame] | 370 | # racoon will setuid to vpn after getting necessary resources. |
Chia-chi Yeh | 9b4f1ff | 2009-09-18 10:35:26 +0800 | [diff] [blame] | 371 | group net_admin |
Chung-yih Wang | 1f75d70 | 2009-06-01 19:04:05 +0800 | [diff] [blame] | 372 | disabled |
| 373 | oneshot |
| 374 | |
| 375 | service mtpd /system/bin/mtpd |
| 376 | socket mtpd stream 600 system system |
Chia-chi Yeh | 51afbf5 | 2009-07-01 07:06:47 +0800 | [diff] [blame] | 377 | user vpn |
| 378 | group vpn net_admin net_raw |
Chung-yih Wang | 1f75d70 | 2009-06-01 19:04:05 +0800 | [diff] [blame] | 379 | disabled |
| 380 | oneshot |
| 381 | |
Chia-chi Yeh | 9b4f1ff | 2009-09-18 10:35:26 +0800 | [diff] [blame] | 382 | service keystore /system/bin/keystore /data/misc/keystore |
Chung-yih Wang | 1f75d70 | 2009-06-01 19:04:05 +0800 | [diff] [blame] | 383 | user keystore |
| 384 | group keystore |
| 385 | socket keystore stream 666 |
| 386 | |
Mike Lockwood | abe3a9c | 2009-09-02 18:09:26 -0400 | [diff] [blame] | 387 | service dumpstate /system/bin/dumpstate -s |
| 388 | socket dumpstate stream 0660 shell log |
| 389 | disabled |
| 390 | oneshot |