blob: 7fcad65380187f12eaed1663751c8ee545239bdf [file] [log] [blame]
Benoit Goby25cc3052012-03-29 19:35:36 -07001import init.manta.usb.rc
Colin Cross29380e62012-03-06 17:41:22 -08002
3on early-init
Jeff Sharkey33793112012-04-09 17:34:07 -07004 export EXTERNAL_STORAGE /storage/sdcard0
Jeff Sharkey72871d22012-04-23 10:54:07 -07005 mkdir /storage 0050 system sdcard_r
Jeff Sharkey33793112012-04-09 17:34:07 -07006 mkdir /storage/sdcard0 0000 system system
7 symlink /storage/sdcard0 /sdcard
8 symlink /storage/sdcard0 /mnt/sdcard
Colin Cross29380e62012-03-06 17:41:22 -08009
Arve Hjønnevåg481ffe62012-06-13 22:01:38 -070010on init
11 start watchdogd
12
Colin Cross29380e62012-03-06 17:41:22 -080013on post-fs-data
Jeff Sharkey33793112012-04-09 17:34:07 -070014 # we will remap this as /storage/sdcard0 with the sdcard fuse tool
15 mkdir /data/media 0770 media_rw media_rw
Colin Cross29380e62012-03-06 17:41:22 -080016 chown media_rw media_rw /data/media
17 setprop vold.post_fs_data_done 1
Dmitry Shmidte87ec972012-03-16 09:43:07 -070018 mkdir /data/misc/wifi 0770 wifi wifi
19 mkdir /data/misc/wifi/sockets 0770 wifi wifi
20 mkdir /data/misc/dhcp 0770 dhcp dhcp
21 chown dhcp dhcp /data/misc/dhcp
Colin Cross29380e62012-03-06 17:41:22 -080022
Matthew Xiee90682b2012-07-27 19:53:47 -070023# permissions for bluetooth.
24 setprop ro.bt.bdaddr_path "/efs/bluetooth/bt_addr"
25 chown bluetooth bluetooth ro.bt.bdaddr_path
26 chown bluetooth bluetooth /dev/ttySAC0
27 chmod 0600 /dev/ttySAC0
28 chmod 0660 /sys/class/rfkill/rfkill0/state
29 chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
30 chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
31
Colin Cross29380e62012-03-06 17:41:22 -080032on boot
33 mount debugfs /sys/kernel/debug /sys/kernel/debug
34 setprop ro.radio.noril yes
35
36 # Set up kernel tracing, but disable it by default
37 chmod 0222 /sys/kernel/debug/tracing/trace_marker
38 write /sys/kernel/debug/tracing/tracing_on 0
39
Todd Poynor37b2e3b2012-07-26 12:32:09 -070040 chmod 0444 /sys/kernel/debug/smb347-regs
41
Colin Cross29380e62012-03-06 17:41:22 -080042on fs
Ken Sumrallfa170c72012-04-12 14:40:39 -070043 mount_all /fstab.manta
Colin Cross29380e62012-03-06 17:41:22 -080044 setprop ro.crypto.fuse_sdcard true
45
46# Permissions for backlight
Colin Cross37a83b92012-05-31 13:31:21 -070047 chmod 0660 /sys/class/backlight/pwm-backlight.0/brightness
Colin Cross29380e62012-03-06 17:41:22 -080048 chown system system /sys/class/backlight/pwm-backlight.0/brightness
49
Bono Kooc3e28db2012-06-21 13:41:36 +090050# create data/gps for GPS daemon
51 chown root system /sys/class/gps/bcm475x/GPS_PWR_EN/value
52 chmod 0664 /sys/class/gps/bcm475x/GPS_PWR_EN/value
53 chown root system /sys/class/gps/bcm475x/GPS_nRST/value
54 chmod 0664 /sys/class/gps/bcm475x/GPS_nRST/value
55 mkdir /data/gps 771 system system
56 chown system system /data/gps
57
Martijn Coenen779f93b2012-07-30 13:18:09 -070058# NFC: create data/nfc for nv storage
59 mkdir /data/nfc 770 nfc nfc
60 mkdir /data/nfc/param 770 nfc nfc
61
Jeff Sharkey33793112012-04-09 17:34:07 -070062# create virtual SD card at /storage/sdcard0, based on the /data/media directory
Colin Cross29380e62012-03-06 17:41:22 -080063# daemon will drop to user/group system/media_rw after initializing
64# underlying files in /data/media will be created with user and group media_rw (1023)
65service sdcard /system/bin/sdcard /data/media 1023 1023
66 class late_start
Dmitry Shmidte87ec972012-03-16 09:43:07 -070067
Dmitry Shmidt0295d702012-07-10 13:17:12 -070068service p2p_supplicant /system/bin/wpa_supplicant \
Dmitry Shmidtee69be62012-08-08 13:51:38 -070069 -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
70 -puse_multi_chan_concurrent=1 -N -ip2p0 -Dnl80211 \
71 -c/data/misc/wifi/p2p_supplicant.conf -puse_multi_chan_concurrent=1 \
72 -puse_p2p_group_interface=1 -e/data/misc/wifi/entropy.bin
Dmitry Shmidt0295d702012-07-10 13:17:12 -070073 # we will start as root and wpa_supplicant will switch to user wifi
74 # after setting up the capabilities required for WEXT
75 # user wifi
76 # group wifi inet keystore
77 class main
78 socket wpa_wlan0 dgram 660 wifi wifi
79 disabled
80 oneshot
81
Dmitry Shmidte87ec972012-03-16 09:43:07 -070082service wpa_supplicant /system/bin/wpa_supplicant \
Dmitry Shmidt0295d702012-07-10 13:17:12 -070083 -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -e/data/misc/wifi/entropy.bin
Dmitry Shmidte87ec972012-03-16 09:43:07 -070084 # we will start as root and wpa_supplicant will switch to user wifi
85 # after setting up the capabilities required for WEXT
86 # user wifi
87 # group wifi inet keystore
88 class main
89 socket wpa_wlan0 dgram 660 wifi wifi
90 disabled
91 oneshot
92
93service dhcpcd_wlan0 /system/bin/dhcpcd -aABKL
94 class main
95 disabled
96 oneshot
97
Dmitry Shmidt0295d702012-07-10 13:17:12 -070098service dhcpcd_p2p /system/bin/dhcpcd -aABKL
99 class main
100 disabled
101 oneshot
102
103service dhcpcd_eth0 /system/bin/dhcpcd -ABKL
104 class main
105 disabled
106 oneshot
107
Dmitry Shmidte87ec972012-03-16 09:43:07 -0700108service iprenew_wlan0 /system/bin/dhcpcd -n
109 class main
110 disabled
111 oneshot
Colin Cross989b65a2012-03-18 16:03:42 -0700112
Dmitry Shmidt0295d702012-07-10 13:17:12 -0700113service iprenew_p2p /system/bin/dhcpcd -n
114 class main
115 disabled
116 oneshot
117
Jeong-Seok Yang4801b7f2012-04-30 14:25:27 +0900118service battery_charger /charger
119 class charger
120
Arve Hjønnevåg481ffe62012-06-13 22:01:38 -0700121# Set watchdog timer to 30 seconds and pet it every 10 seconds to get a 20 second margin
122service watchdogd /sbin/watchdogd 10 20
123 class core
124
Bono Kooc3e28db2012-06-21 13:41:36 +0900125service gpsd /system/vendor/bin/gpsd -c /system/vendor/etc/gps.xml
126 class main
127 socket gps seqpacket 0660 gps system
128 user gps
129 group system inet sdcard_rw
130
Colin Cross989b65a2012-03-18 16:03:42 -0700131# on userdebug and eng builds, enable kgdb on the serial console
132on property:ro.debuggable=1
133 write /sys/module/kgdboc/parameters/kgdboc ttyFIQ2
134 write /sys/module/fiq_debugger/parameters/kgdb_enable 1
Jason Chen73da4592012-06-08 08:50:25 -0700135
136# bugreport is triggered by holding down volume down, volume up and power
137service bugreport /system/bin/bugmailer.sh -v
138 class main
139 disabled
140 oneshot
141 keycodes 114 115 116