blob: 82f30044213ea61171b1d25ebf8250cae2c69bd7 [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 Xiee90682b2012-07-27 19:53:47 -070031 chown bluetooth bluetooth ro.bt.bdaddr_path
32 chown bluetooth bluetooth /dev/ttySAC0
33 chmod 0600 /dev/ttySAC0
34 chmod 0660 /sys/class/rfkill/rfkill0/state
35 chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
36 chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
37
Colin Cross29380e62012-03-06 17:41:22 -080038on boot
39 mount debugfs /sys/kernel/debug /sys/kernel/debug
40 setprop ro.radio.noril yes
41
Arve Hjønnevåg0099ab22012-09-26 17:25:36 -070042 # Reduce reserved lowmem from ~48MB to ~12MB
43 write /proc/sys/vm/lowmem_reserve_ratio "128 128"
44
Colin Cross29380e62012-03-06 17:41:22 -080045 # Set up kernel tracing, but disable it by default
46 chmod 0222 /sys/kernel/debug/tracing/trace_marker
47 write /sys/kernel/debug/tracing/tracing_on 0
48
Todd Poynor37b2e3b2012-07-26 12:32:09 -070049 chmod 0444 /sys/kernel/debug/smb347-regs
50
Seho Kim836d6ee2012-09-19 14:46:22 -070051# Set Mali power policy as Coarse demand
52 write /sys/devices/platform/mali.0/power_policy coarse_demand
53
Colin Cross29380e62012-03-06 17:41:22 -080054on fs
Dima Zavin0dbbcf32012-08-20 23:37:22 -070055 mkdir /factory 0775 radio radio
56
Ken Sumrallfa170c72012-04-12 14:40:39 -070057 mount_all /fstab.manta
Colin Cross29380e62012-03-06 17:41:22 -080058 setprop ro.crypto.fuse_sdcard true
59
60# Permissions for backlight
Colin Cross37a83b92012-05-31 13:31:21 -070061 chmod 0660 /sys/class/backlight/pwm-backlight.0/brightness
Colin Cross29380e62012-03-06 17:41:22 -080062 chown system system /sys/class/backlight/pwm-backlight.0/brightness
63
Bono Kooc3e28db2012-06-21 13:41:36 +090064# create data/gps for GPS daemon
65 chown root system /sys/class/gps/bcm475x/GPS_PWR_EN/value
66 chmod 0664 /sys/class/gps/bcm475x/GPS_PWR_EN/value
67 chown root system /sys/class/gps/bcm475x/GPS_nRST/value
68 chmod 0664 /sys/class/gps/bcm475x/GPS_nRST/value
69 mkdir /data/gps 771 system system
70 chown system system /data/gps
71
Martijn Coenen779f93b2012-07-30 13:18:09 -070072# NFC: create data/nfc for nv storage
73 mkdir /data/nfc 770 nfc nfc
74 mkdir /data/nfc/param 770 nfc nfc
75
Eric Laurent688880c2012-09-07 16:46:00 -070076# audio: permissions for voice processing
77 chown root audio /sys/class/i2c-dev/i2c-4/device/4-003e/voice_processing
78 chmod 0660 /sys/class/i2c-dev/i2c-4/device/4-003e/voice_processing
79 chown root audio /sys/class/i2c-dev/i2c-4/device/4-003e/preset
80 chmod 0660 /sys/class/i2c-dev/i2c-4/device/4-003e/preset
81
Jeff Sharkey233e5882012-08-16 13:52:00 -070082# virtual sdcard daemon running as media_rw (1023)
Jeff Sharkey56ec91d2012-09-11 23:20:56 -070083service sdcard /system/bin/sdcard /data/media /mnt/shell/emulated 1023 1023
Colin Cross29380e62012-03-06 17:41:22 -080084 class late_start
Dmitry Shmidte87ec972012-03-16 09:43:07 -070085
Dmitry Shmidt0295d702012-07-10 13:17:12 -070086service p2p_supplicant /system/bin/wpa_supplicant \
Dmitry Shmidtee69be62012-08-08 13:51:38 -070087 -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
88 -puse_multi_chan_concurrent=1 -N -ip2p0 -Dnl80211 \
Irfan Sheriff69cebe02012-08-16 05:29:31 -070089 -c/data/misc/wifi/p2p_supplicant.conf \
90 -puse_p2p_group_interface=1use_multi_chan_concurrent=1 -e/data/misc/wifi/entropy.bin
Dmitry Shmidt0295d702012-07-10 13:17:12 -070091 # we will start as root and wpa_supplicant will switch to user wifi
92 # after setting up the capabilities required for WEXT
93 # user wifi
94 # group wifi inet keystore
95 class main
96 socket wpa_wlan0 dgram 660 wifi wifi
97 disabled
98 oneshot
99
Dmitry Shmidte87ec972012-03-16 09:43:07 -0700100service wpa_supplicant /system/bin/wpa_supplicant \
Dmitry Shmidt0295d702012-07-10 13:17:12 -0700101 -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -e/data/misc/wifi/entropy.bin
Dmitry Shmidte87ec972012-03-16 09:43:07 -0700102 # we will start as root and wpa_supplicant will switch to user wifi
103 # after setting up the capabilities required for WEXT
104 # user wifi
105 # group wifi inet keystore
106 class main
107 socket wpa_wlan0 dgram 660 wifi wifi
108 disabled
109 oneshot
110
Dmitry Shmidtc2c962a2012-09-20 11:12:34 -0700111service dhcpcd_wlan0 /system/bin/dhcpcd -aABDKL
Dmitry Shmidte87ec972012-03-16 09:43:07 -0700112 class main
113 disabled
114 oneshot
115
Dmitry Shmidt0295d702012-07-10 13:17:12 -0700116service dhcpcd_p2p /system/bin/dhcpcd -aABKL
117 class main
118 disabled
119 oneshot
120
Dmitry Shmidtc2c962a2012-09-20 11:12:34 -0700121service dhcpcd_eth0 /system/bin/dhcpcd -ABDKL
Dmitry Shmidt0295d702012-07-10 13:17:12 -0700122 class main
123 disabled
124 oneshot
125
Dmitry Shmidte87ec972012-03-16 09:43:07 -0700126service iprenew_wlan0 /system/bin/dhcpcd -n
127 class main
128 disabled
129 oneshot
Colin Cross989b65a2012-03-18 16:03:42 -0700130
Dmitry Shmidt0295d702012-07-10 13:17:12 -0700131service iprenew_p2p /system/bin/dhcpcd -n
132 class main
133 disabled
134 oneshot
135
Jeong-Seok Yang4801b7f2012-04-30 14:25:27 +0900136service battery_charger /charger
137 class charger
138
Arve Hjønnevåg481ffe62012-06-13 22:01:38 -0700139# Set watchdog timer to 30 seconds and pet it every 10 seconds to get a 20 second margin
140service watchdogd /sbin/watchdogd 10 20
141 class core
142
Bono Kooc3e28db2012-06-21 13:41:36 +0900143service gpsd /system/vendor/bin/gpsd -c /system/vendor/etc/gps.xml
144 class main
145 socket gps seqpacket 0660 gps system
146 user gps
Jeff Sharkeyd20a7a62012-08-20 14:29:13 -0700147 group system inet
Bono Kooc3e28db2012-06-21 13:41:36 +0900148
DongJin Parke2fd4f32012-08-03 15:55:39 +0900149# MobiCore startup
Dima Zavinf9883d72012-08-20 23:37:57 -0700150service mobicore /system/bin/mcDriverDaemon -r /system/vendor/secapp/020a0000000000000000000000000000.drbin
151 setenv MC_REGISTRY_PATH /system/vendor/secapp
DongJin Parke2fd4f32012-08-03 15:55:39 +0900152 user drmrpc
153 group drmrpc
154 class main
155
Colin Cross989b65a2012-03-18 16:03:42 -0700156# on userdebug and eng builds, enable kgdb on the serial console
157on property:ro.debuggable=1
158 write /sys/module/kgdboc/parameters/kgdboc ttyFIQ2
159 write /sys/module/fiq_debugger/parameters/kgdb_enable 1
Jason Chen73da4592012-06-08 08:50:25 -0700160
161# bugreport is triggered by holding down volume down, volume up and power
162service bugreport /system/bin/bugmailer.sh -v
163 class main
164 disabled
165 oneshot
166 keycodes 114 115 116