blob: 37f825823b1e952baa36e4f1d6f368f8299f78d6 [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
40on fs
Ken Sumrallfa170c72012-04-12 14:40:39 -070041 mount_all /fstab.manta
Colin Cross29380e62012-03-06 17:41:22 -080042 setprop ro.crypto.fuse_sdcard true
43
44# Permissions for backlight
Colin Cross37a83b92012-05-31 13:31:21 -070045 chmod 0660 /sys/class/backlight/pwm-backlight.0/brightness
Colin Cross29380e62012-03-06 17:41:22 -080046 chown system system /sys/class/backlight/pwm-backlight.0/brightness
47
Bono Kooc3e28db2012-06-21 13:41:36 +090048# create data/gps for GPS daemon
49 chown root system /sys/class/gps/bcm475x/GPS_PWR_EN/value
50 chmod 0664 /sys/class/gps/bcm475x/GPS_PWR_EN/value
51 chown root system /sys/class/gps/bcm475x/GPS_nRST/value
52 chmod 0664 /sys/class/gps/bcm475x/GPS_nRST/value
53 mkdir /data/gps 771 system system
54 chown system system /data/gps
55
Martijn Coenen779f93b2012-07-30 13:18:09 -070056# NFC: create data/nfc for nv storage
57 mkdir /data/nfc 770 nfc nfc
58 mkdir /data/nfc/param 770 nfc nfc
59
Jeff Sharkey33793112012-04-09 17:34:07 -070060# create virtual SD card at /storage/sdcard0, based on the /data/media directory
Colin Cross29380e62012-03-06 17:41:22 -080061# daemon will drop to user/group system/media_rw after initializing
62# underlying files in /data/media will be created with user and group media_rw (1023)
63service sdcard /system/bin/sdcard /data/media 1023 1023
64 class late_start
Dmitry Shmidte87ec972012-03-16 09:43:07 -070065
Dmitry Shmidt0295d702012-07-10 13:17:12 -070066service p2p_supplicant /system/bin/wpa_supplicant \
67 -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -N \
68 -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf -e/data/misc/wifi/entropy.bin -puse_p2p_group_interface=1
69 # we will start as root and wpa_supplicant will switch to user wifi
70 # after setting up the capabilities required for WEXT
71 # user wifi
72 # group wifi inet keystore
73 class main
74 socket wpa_wlan0 dgram 660 wifi wifi
75 disabled
76 oneshot
77
Dmitry Shmidte87ec972012-03-16 09:43:07 -070078service wpa_supplicant /system/bin/wpa_supplicant \
Dmitry Shmidt0295d702012-07-10 13:17:12 -070079 -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -e/data/misc/wifi/entropy.bin
Dmitry Shmidte87ec972012-03-16 09:43:07 -070080 # we will start as root and wpa_supplicant will switch to user wifi
81 # after setting up the capabilities required for WEXT
82 # user wifi
83 # group wifi inet keystore
84 class main
85 socket wpa_wlan0 dgram 660 wifi wifi
86 disabled
87 oneshot
88
89service dhcpcd_wlan0 /system/bin/dhcpcd -aABKL
90 class main
91 disabled
92 oneshot
93
Dmitry Shmidt0295d702012-07-10 13:17:12 -070094service dhcpcd_p2p /system/bin/dhcpcd -aABKL
95 class main
96 disabled
97 oneshot
98
99service dhcpcd_eth0 /system/bin/dhcpcd -ABKL
100 class main
101 disabled
102 oneshot
103
Dmitry Shmidte87ec972012-03-16 09:43:07 -0700104service iprenew_wlan0 /system/bin/dhcpcd -n
105 class main
106 disabled
107 oneshot
Colin Cross989b65a2012-03-18 16:03:42 -0700108
Dmitry Shmidt0295d702012-07-10 13:17:12 -0700109service iprenew_p2p /system/bin/dhcpcd -n
110 class main
111 disabled
112 oneshot
113
Jeong-Seok Yang4801b7f2012-04-30 14:25:27 +0900114service battery_charger /charger
115 class charger
116
Arve Hjønnevåg481ffe62012-06-13 22:01:38 -0700117# Set watchdog timer to 30 seconds and pet it every 10 seconds to get a 20 second margin
118service watchdogd /sbin/watchdogd 10 20
119 class core
120
Bono Kooc3e28db2012-06-21 13:41:36 +0900121service gpsd /system/vendor/bin/gpsd -c /system/vendor/etc/gps.xml
122 class main
123 socket gps seqpacket 0660 gps system
124 user gps
125 group system inet sdcard_rw
126
Colin Cross989b65a2012-03-18 16:03:42 -0700127# on userdebug and eng builds, enable kgdb on the serial console
128on property:ro.debuggable=1
129 write /sys/module/kgdboc/parameters/kgdboc ttyFIQ2
130 write /sys/module/fiq_debugger/parameters/kgdb_enable 1
Jason Chen73da4592012-06-08 08:50:25 -0700131
132# bugreport is triggered by holding down volume down, volume up and power
133service bugreport /system/bin/bugmailer.sh -v
134 class main
135 disabled
136 oneshot
137 keycodes 114 115 116