blob: f045fd84e30074cc66d21241102139367026fcda [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
23on boot
24 mount debugfs /sys/kernel/debug /sys/kernel/debug
25 setprop ro.radio.noril yes
26
27 # Set up kernel tracing, but disable it by default
28 chmod 0222 /sys/kernel/debug/tracing/trace_marker
29 write /sys/kernel/debug/tracing/tracing_on 0
30
31on fs
Ken Sumrallfa170c72012-04-12 14:40:39 -070032 mount_all /fstab.manta
Colin Cross29380e62012-03-06 17:41:22 -080033 setprop ro.crypto.fuse_sdcard true
34
35# Permissions for backlight
Colin Cross37a83b92012-05-31 13:31:21 -070036 chmod 0660 /sys/class/backlight/pwm-backlight.0/brightness
Colin Cross29380e62012-03-06 17:41:22 -080037 chown system system /sys/class/backlight/pwm-backlight.0/brightness
38
Bono Kooc3e28db2012-06-21 13:41:36 +090039# create data/gps for GPS daemon
40 chown root system /sys/class/gps/bcm475x/GPS_PWR_EN/value
41 chmod 0664 /sys/class/gps/bcm475x/GPS_PWR_EN/value
42 chown root system /sys/class/gps/bcm475x/GPS_nRST/value
43 chmod 0664 /sys/class/gps/bcm475x/GPS_nRST/value
44 mkdir /data/gps 771 system system
45 chown system system /data/gps
46
Jeff Sharkey33793112012-04-09 17:34:07 -070047# create virtual SD card at /storage/sdcard0, based on the /data/media directory
Colin Cross29380e62012-03-06 17:41:22 -080048# daemon will drop to user/group system/media_rw after initializing
49# underlying files in /data/media will be created with user and group media_rw (1023)
50service sdcard /system/bin/sdcard /data/media 1023 1023
51 class late_start
Dmitry Shmidte87ec972012-03-16 09:43:07 -070052
Dmitry Shmidt0295d702012-07-10 13:17:12 -070053service p2p_supplicant /system/bin/wpa_supplicant \
54 -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -N \
55 -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf -e/data/misc/wifi/entropy.bin -puse_p2p_group_interface=1
56 # we will start as root and wpa_supplicant will switch to user wifi
57 # after setting up the capabilities required for WEXT
58 # user wifi
59 # group wifi inet keystore
60 class main
61 socket wpa_wlan0 dgram 660 wifi wifi
62 disabled
63 oneshot
64
Dmitry Shmidte87ec972012-03-16 09:43:07 -070065service wpa_supplicant /system/bin/wpa_supplicant \
Dmitry Shmidt0295d702012-07-10 13:17:12 -070066 -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -e/data/misc/wifi/entropy.bin
Dmitry Shmidte87ec972012-03-16 09:43:07 -070067 # we will start as root and wpa_supplicant will switch to user wifi
68 # after setting up the capabilities required for WEXT
69 # user wifi
70 # group wifi inet keystore
71 class main
72 socket wpa_wlan0 dgram 660 wifi wifi
73 disabled
74 oneshot
75
76service dhcpcd_wlan0 /system/bin/dhcpcd -aABKL
77 class main
78 disabled
79 oneshot
80
Dmitry Shmidt0295d702012-07-10 13:17:12 -070081service dhcpcd_p2p /system/bin/dhcpcd -aABKL
82 class main
83 disabled
84 oneshot
85
86service dhcpcd_eth0 /system/bin/dhcpcd -ABKL
87 class main
88 disabled
89 oneshot
90
Dmitry Shmidte87ec972012-03-16 09:43:07 -070091service iprenew_wlan0 /system/bin/dhcpcd -n
92 class main
93 disabled
94 oneshot
Colin Cross989b65a2012-03-18 16:03:42 -070095
Dmitry Shmidt0295d702012-07-10 13:17:12 -070096service iprenew_p2p /system/bin/dhcpcd -n
97 class main
98 disabled
99 oneshot
100
Jeong-Seok Yang4801b7f2012-04-30 14:25:27 +0900101service battery_charger /charger
102 class charger
103
Arve Hjønnevåg481ffe62012-06-13 22:01:38 -0700104# Set watchdog timer to 30 seconds and pet it every 10 seconds to get a 20 second margin
105service watchdogd /sbin/watchdogd 10 20
106 class core
107
Bono Kooc3e28db2012-06-21 13:41:36 +0900108service gpsd /system/vendor/bin/gpsd -c /system/vendor/etc/gps.xml
109 class main
110 socket gps seqpacket 0660 gps system
111 user gps
112 group system inet sdcard_rw
113
Colin Cross989b65a2012-03-18 16:03:42 -0700114# on userdebug and eng builds, enable kgdb on the serial console
115on property:ro.debuggable=1
116 write /sys/module/kgdboc/parameters/kgdboc ttyFIQ2
117 write /sys/module/fiq_debugger/parameters/kgdb_enable 1
Jason Chen73da4592012-06-08 08:50:25 -0700118
119# bugreport is triggered by holding down volume down, volume up and power
120service bugreport /system/bin/bugmailer.sh -v
121 class main
122 disabled
123 oneshot
124 keycodes 114 115 116