blob: 0f0f361784c14c7de90dd76ff49139d48de8aa4b [file] [log] [blame]
Benoit Goby25cc3052012-03-29 19:35:36 -07001import init.manta.usb.rc
Colin Cross29380e62012-03-06 17:41:22 -08002
Arve Hjønnevåg481ffe62012-06-13 22:01:38 -07003on init
4 start watchdogd
5
Jeff Sharkey4d8468d2012-08-21 10:38:32 -07006 # See storage config details at http://source.android.com/tech/storage/
Jeff Sharkey56ec91d2012-09-11 23:20:56 -07007 mkdir /mnt/shell/emulated 0700 shell shell
Jeff Sharkeyb9928aa2012-09-30 17:20:20 -07008 mkdir /storage/emulated 0555 root root
Benoit Gobye5d653c2012-08-16 20:40:35 -07009
Jeff Sharkey4e67a172012-09-30 12:49:03 -070010 export EXTERNAL_STORAGE /storage/emulated/legacy
Jeff Sharkey56ec91d2012-09-11 23:20:56 -070011 export EMULATED_STORAGE_SOURCE /mnt/shell/emulated
12 export EMULATED_STORAGE_TARGET /storage/emulated
Jeff Sharkeydc3015d2012-08-20 13:24:32 -070013
Jeff Sharkey4d8468d2012-08-21 10:38:32 -070014 # Support legacy paths
Jeff Sharkey4e67a172012-09-30 12:49:03 -070015 symlink /storage/emulated/legacy /sdcard
16 symlink /storage/emulated/legacy /mnt/sdcard
17 symlink /storage/emulated/legacy /storage/sdcard0
18 symlink /mnt/shell/emulated/0 /storage/emulated/legacy
Jeff Sharkey233e5882012-08-16 13:52:00 -070019
Colin Cross29380e62012-03-06 17:41:22 -080020on post-fs-data
Jeff Sharkey33793112012-04-09 17:34:07 -070021 mkdir /data/media 0770 media_rw media_rw
Jeff Sharkey233e5882012-08-16 13:52:00 -070022
Colin Cross29380e62012-03-06 17:41:22 -080023 setprop vold.post_fs_data_done 1
Dmitry Shmidte87ec972012-03-16 09:43:07 -070024 mkdir /data/misc/wifi 0770 wifi wifi
25 mkdir /data/misc/wifi/sockets 0770 wifi wifi
26 mkdir /data/misc/dhcp 0770 dhcp dhcp
27 chown dhcp dhcp /data/misc/dhcp
Colin Cross29380e62012-03-06 17:41:22 -080028
Matthew Xiee90682b2012-07-27 19:53:47 -070029# permissions for bluetooth.
Chunho Park362e6542012-09-18 14:42:27 +090030 setprop ro.bt.bdaddr_path "/factory/bluetooth/bt_addr"
Matthew Xie7f32e6f2012-10-04 21:51:09 -070031 chown bluetooth net_bt_stack ro.bt.bdaddr_path
32 chown bluetooth net_bt_stack /dev/ttySAC0
33 chmod 0660 /dev/ttySAC0
Matthew Xiee90682b2012-07-27 19:53:47 -070034 chmod 0660 /sys/class/rfkill/rfkill0/state
Matthew Xie7f32e6f2012-10-04 21:51:09 -070035 chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/state
36 chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/type
Matthew Xiee90682b2012-07-27 19:53:47 -070037
Colin Cross29380e62012-03-06 17:41:22 -080038on boot
Colin Cross3a15c642012-10-19 14:32:23 -070039 # override init.rc to keep plenty of large order chunks around
40 # to improve allocation times
41 write /proc/sys/vm/min_free_kbytes 32768
42 write /proc/sys/vm/min_free_order_shift 1
43
Colin Cross29380e62012-03-06 17:41:22 -080044 mount debugfs /sys/kernel/debug /sys/kernel/debug
45 setprop ro.radio.noril yes
46
Arve Hjønnevåg0099ab22012-09-26 17:25:36 -070047 # Reduce reserved lowmem from ~48MB to ~12MB
48 write /proc/sys/vm/lowmem_reserve_ratio "128 128"
49
Colin Cross29380e62012-03-06 17:41:22 -080050 # Set up kernel tracing, but disable it by default
51 chmod 0222 /sys/kernel/debug/tracing/trace_marker
52 write /sys/kernel/debug/tracing/tracing_on 0
53
Todd Poynor37b2e3b2012-07-26 12:32:09 -070054 chmod 0444 /sys/kernel/debug/smb347-regs
55
Seho Kim836d6ee2012-09-19 14:46:22 -070056# Set Mali power policy as Coarse demand
57 write /sys/devices/platform/mali.0/power_policy coarse_demand
58
Colin Cross29380e62012-03-06 17:41:22 -080059on fs
Dima Zavin0dbbcf32012-08-20 23:37:22 -070060 mkdir /factory 0775 radio radio
61
Ken Sumrallfa170c72012-04-12 14:40:39 -070062 mount_all /fstab.manta
Colin Cross29380e62012-03-06 17:41:22 -080063 setprop ro.crypto.fuse_sdcard true
64
65# Permissions for backlight
Colin Cross37a83b92012-05-31 13:31:21 -070066 chmod 0660 /sys/class/backlight/pwm-backlight.0/brightness
Colin Cross29380e62012-03-06 17:41:22 -080067 chown system system /sys/class/backlight/pwm-backlight.0/brightness
68
Bono Kooc3e28db2012-06-21 13:41:36 +090069# create data/gps for GPS daemon
70 chown root system /sys/class/gps/bcm475x/GPS_PWR_EN/value
71 chmod 0664 /sys/class/gps/bcm475x/GPS_PWR_EN/value
72 chown root system /sys/class/gps/bcm475x/GPS_nRST/value
73 chmod 0664 /sys/class/gps/bcm475x/GPS_nRST/value
74 mkdir /data/gps 771 system system
75 chown system system /data/gps
76
Martijn Coenen779f93b2012-07-30 13:18:09 -070077# NFC: create data/nfc for nv storage
78 mkdir /data/nfc 770 nfc nfc
79 mkdir /data/nfc/param 770 nfc nfc
80
Eric Laurent688880c2012-09-07 16:46:00 -070081# audio: permissions for voice processing
Jean-Michel Trivie04f7c92012-09-30 16:01:41 -070082 # global switch for voice processing effects
Eric Laurent688880c2012-09-07 16:46:00 -070083 chown root audio /sys/class/i2c-dev/i2c-4/device/4-003e/voice_processing
84 chmod 0660 /sys/class/i2c-dev/i2c-4/device/4-003e/voice_processing
Jean-Michel Trivie04f7c92012-09-30 16:01:41 -070085 # voice processing chip sleep
Jean-Michel Trivi0427d432012-10-04 15:42:04 -070086 chown root audio /sys/class/i2c-dev/i2c-4/device/4-003e/sleep
87 chmod 0660 /sys/class/i2c-dev/i2c-4/device/4-003e/sleep
Jean-Michel Trivie04f7c92012-09-30 16:01:41 -070088 # voice processing usecase preset
89 chown root audio /sys/class/i2c-dev/i2c-4/device/4-003e/preset
90 chmod 0660 /sys/class/i2c-dev/i2c-4/device/4-003e/preset
91 # voice processing noise suppression level
92 chown root audio /sys/class/i2c-dev/i2c-4/device/4-003e/tx_ns_level
93 chmod 0660 /sys/class/i2c-dev/i2c-4/device/4-003e/tx_ns_level
94 # voice processing AGC enable (TX)
95 chown root audio /sys/class/i2c-dev/i2c-4/device/4-003e/tx_agc_enable
96 chmod 0660 /sys/class/i2c-dev/i2c-4/device/4-003e/tx_agc_enable
97 # voice processing AEC enable
98 chown root audio /sys/class/i2c-dev/i2c-4/device/4-003e/aec_enable
99 chmod 0660 /sys/class/i2c-dev/i2c-4/device/4-003e/aec_enable
Eric Laurent688880c2012-09-07 16:46:00 -0700100
Jeff Sharkey233e5882012-08-16 13:52:00 -0700101# virtual sdcard daemon running as media_rw (1023)
Jeff Sharkey56ec91d2012-09-11 23:20:56 -0700102service sdcard /system/bin/sdcard /data/media /mnt/shell/emulated 1023 1023
Colin Cross29380e62012-03-06 17:41:22 -0800103 class late_start
Dmitry Shmidte87ec972012-03-16 09:43:07 -0700104
Dmitry Shmidt0295d702012-07-10 13:17:12 -0700105service p2p_supplicant /system/bin/wpa_supplicant \
Dmitry Shmidtee69be62012-08-08 13:51:38 -0700106 -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
107 -puse_multi_chan_concurrent=1 -N -ip2p0 -Dnl80211 \
Irfan Sheriff69cebe02012-08-16 05:29:31 -0700108 -c/data/misc/wifi/p2p_supplicant.conf \
109 -puse_p2p_group_interface=1use_multi_chan_concurrent=1 -e/data/misc/wifi/entropy.bin
Dmitry Shmidt0295d702012-07-10 13:17:12 -0700110 # we will start as root and wpa_supplicant will switch to user wifi
111 # after setting up the capabilities required for WEXT
112 # user wifi
113 # group wifi inet keystore
114 class main
115 socket wpa_wlan0 dgram 660 wifi wifi
116 disabled
117 oneshot
118
Dmitry Shmidte87ec972012-03-16 09:43:07 -0700119service wpa_supplicant /system/bin/wpa_supplicant \
Dmitry Shmidt0295d702012-07-10 13:17:12 -0700120 -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -e/data/misc/wifi/entropy.bin
Dmitry Shmidte87ec972012-03-16 09:43:07 -0700121 # we will start as root and wpa_supplicant will switch to user wifi
122 # after setting up the capabilities required for WEXT
123 # user wifi
124 # group wifi inet keystore
125 class main
126 socket wpa_wlan0 dgram 660 wifi wifi
127 disabled
128 oneshot
129
Dmitry Shmidtc2c962a2012-09-20 11:12:34 -0700130service dhcpcd_wlan0 /system/bin/dhcpcd -aABDKL
Dmitry Shmidte87ec972012-03-16 09:43:07 -0700131 class main
132 disabled
133 oneshot
134
Dmitry Shmidt0295d702012-07-10 13:17:12 -0700135service dhcpcd_p2p /system/bin/dhcpcd -aABKL
136 class main
137 disabled
138 oneshot
139
Dmitry Shmidtc2c962a2012-09-20 11:12:34 -0700140service dhcpcd_eth0 /system/bin/dhcpcd -ABDKL
Dmitry Shmidt0295d702012-07-10 13:17:12 -0700141 class main
142 disabled
143 oneshot
144
Dmitry Shmidte87ec972012-03-16 09:43:07 -0700145service iprenew_wlan0 /system/bin/dhcpcd -n
146 class main
147 disabled
148 oneshot
Colin Cross989b65a2012-03-18 16:03:42 -0700149
Dmitry Shmidt0295d702012-07-10 13:17:12 -0700150service iprenew_p2p /system/bin/dhcpcd -n
151 class main
152 disabled
153 oneshot
154
Jeong-Seok Yang4801b7f2012-04-30 14:25:27 +0900155service battery_charger /charger
156 class charger
157
Arve Hjønnevåg481ffe62012-06-13 22:01:38 -0700158# Set watchdog timer to 30 seconds and pet it every 10 seconds to get a 20 second margin
159service watchdogd /sbin/watchdogd 10 20
160 class core
161
Bono Kooc3e28db2012-06-21 13:41:36 +0900162service gpsd /system/vendor/bin/gpsd -c /system/vendor/etc/gps.xml
163 class main
164 socket gps seqpacket 0660 gps system
165 user gps
Jeff Sharkeyd20a7a62012-08-20 14:29:13 -0700166 group system inet
Bono Kooc3e28db2012-06-21 13:41:36 +0900167
DongJin Parke2fd4f32012-08-03 15:55:39 +0900168# MobiCore startup
Dima Zavinf9883d72012-08-20 23:37:57 -0700169service mobicore /system/bin/mcDriverDaemon -r /system/vendor/secapp/020a0000000000000000000000000000.drbin
170 setenv MC_REGISTRY_PATH /system/vendor/secapp
DongJin Parke2fd4f32012-08-03 15:55:39 +0900171 user drmrpc
172 group drmrpc
173 class main
174
Colin Cross989b65a2012-03-18 16:03:42 -0700175# on userdebug and eng builds, enable kgdb on the serial console
176on property:ro.debuggable=1
177 write /sys/module/kgdboc/parameters/kgdboc ttyFIQ2
178 write /sys/module/fiq_debugger/parameters/kgdb_enable 1
Jason Chen73da4592012-06-08 08:50:25 -0700179
180# bugreport is triggered by holding down volume down, volume up and power
181service bugreport /system/bin/bugmailer.sh -v
182 class main
183 disabled
184 oneshot
185 keycodes 114 115 116