blob: 5120bc2638b9092523ed7dc548253f72c591ce5d [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
8 mkdir /storage/emulated 0000 root root
9 mkdir /storage/emulated_legacy 0000 root root
Benoit Gobye5d653c2012-08-16 20:40:35 -070010
Jeff Sharkey56ec91d2012-09-11 23:20:56 -070011 export EXTERNAL_STORAGE /storage/emulated_legacy
12 export ADB_EXTERNAL_STORAGE /mnt/shell/emulated/0
13
14 export EMULATED_STORAGE_SOURCE /mnt/shell/emulated
15 export EMULATED_STORAGE_TARGET /storage/emulated
Jeff Sharkeydc3015d2012-08-20 13:24:32 -070016
Jeff Sharkey4d8468d2012-08-21 10:38:32 -070017 # Support legacy paths
Jeff Sharkey56ec91d2012-09-11 23:20:56 -070018 symlink /storage/emulated_legacy /sdcard
19 symlink /storage/emulated_legacy /mnt/sdcard
Jeff Sharkey233e5882012-08-16 13:52:00 -070020
21 # Save bugreports as owner
Jeff Sharkey56ec91d2012-09-11 23:20:56 -070022 export BUGREPORT_WRITE_PATH /mnt/shell/emulated/0
23 export BUGREPORT_READ_PATH /storage/emulated
Jeff Sharkey233e5882012-08-16 13:52:00 -070024
Colin Cross29380e62012-03-06 17:41:22 -080025on post-fs-data
Jeff Sharkey33793112012-04-09 17:34:07 -070026 mkdir /data/media 0770 media_rw media_rw
Jeff Sharkey233e5882012-08-16 13:52:00 -070027
Colin Cross29380e62012-03-06 17:41:22 -080028 setprop vold.post_fs_data_done 1
Dmitry Shmidte87ec972012-03-16 09:43:07 -070029 mkdir /data/misc/wifi 0770 wifi wifi
30 mkdir /data/misc/wifi/sockets 0770 wifi wifi
31 mkdir /data/misc/dhcp 0770 dhcp dhcp
32 chown dhcp dhcp /data/misc/dhcp
Colin Cross29380e62012-03-06 17:41:22 -080033
Matthew Xiee90682b2012-07-27 19:53:47 -070034# permissions for bluetooth.
35 setprop ro.bt.bdaddr_path "/efs/bluetooth/bt_addr"
36 chown bluetooth bluetooth ro.bt.bdaddr_path
37 chown bluetooth bluetooth /dev/ttySAC0
38 chmod 0600 /dev/ttySAC0
39 chmod 0660 /sys/class/rfkill/rfkill0/state
40 chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
41 chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
42
Colin Cross29380e62012-03-06 17:41:22 -080043on boot
44 mount debugfs /sys/kernel/debug /sys/kernel/debug
45 setprop ro.radio.noril yes
46
47 # Set up kernel tracing, but disable it by default
48 chmod 0222 /sys/kernel/debug/tracing/trace_marker
49 write /sys/kernel/debug/tracing/tracing_on 0
50
Todd Poynor37b2e3b2012-07-26 12:32:09 -070051 chmod 0444 /sys/kernel/debug/smb347-regs
52
Colin Cross0aa14562012-08-20 21:55:30 -070053 # HACK: set maximum memory bus frequency to 667 MHz to fix memory corruption
54 # b/7005327
Colin Crossde77daf2012-08-20 21:55:30 -070055 write /sys/class/devfreq/exynos5-bus-mif.0/max_freq 667000
Colin Cross0aa14562012-08-20 21:55:30 -070056
Colin Cross29380e62012-03-06 17:41:22 -080057on fs
Dima Zavin0dbbcf32012-08-20 23:37:22 -070058 mkdir /factory 0775 radio radio
59
Ken Sumrallfa170c72012-04-12 14:40:39 -070060 mount_all /fstab.manta
Colin Cross29380e62012-03-06 17:41:22 -080061 setprop ro.crypto.fuse_sdcard true
62
63# Permissions for backlight
Colin Cross37a83b92012-05-31 13:31:21 -070064 chmod 0660 /sys/class/backlight/pwm-backlight.0/brightness
Colin Cross29380e62012-03-06 17:41:22 -080065 chown system system /sys/class/backlight/pwm-backlight.0/brightness
66
Bono Kooc3e28db2012-06-21 13:41:36 +090067# create data/gps for GPS daemon
68 chown root system /sys/class/gps/bcm475x/GPS_PWR_EN/value
69 chmod 0664 /sys/class/gps/bcm475x/GPS_PWR_EN/value
70 chown root system /sys/class/gps/bcm475x/GPS_nRST/value
71 chmod 0664 /sys/class/gps/bcm475x/GPS_nRST/value
72 mkdir /data/gps 771 system system
73 chown system system /data/gps
74
Martijn Coenen779f93b2012-07-30 13:18:09 -070075# NFC: create data/nfc for nv storage
76 mkdir /data/nfc 770 nfc nfc
77 mkdir /data/nfc/param 770 nfc nfc
78
Jeff Sharkey233e5882012-08-16 13:52:00 -070079# virtual sdcard daemon running as media_rw (1023)
Jeff Sharkey56ec91d2012-09-11 23:20:56 -070080service sdcard /system/bin/sdcard /data/media /mnt/shell/emulated 1023 1023
Colin Cross29380e62012-03-06 17:41:22 -080081 class late_start
Dmitry Shmidte87ec972012-03-16 09:43:07 -070082
Dmitry Shmidt0295d702012-07-10 13:17:12 -070083service p2p_supplicant /system/bin/wpa_supplicant \
Dmitry Shmidtee69be62012-08-08 13:51:38 -070084 -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
85 -puse_multi_chan_concurrent=1 -N -ip2p0 -Dnl80211 \
Irfan Sheriff69cebe02012-08-16 05:29:31 -070086 -c/data/misc/wifi/p2p_supplicant.conf \
87 -puse_p2p_group_interface=1use_multi_chan_concurrent=1 -e/data/misc/wifi/entropy.bin
Dmitry Shmidt0295d702012-07-10 13:17:12 -070088 # we will start as root and wpa_supplicant will switch to user wifi
89 # after setting up the capabilities required for WEXT
90 # user wifi
91 # group wifi inet keystore
92 class main
93 socket wpa_wlan0 dgram 660 wifi wifi
94 disabled
95 oneshot
96
Dmitry Shmidte87ec972012-03-16 09:43:07 -070097service wpa_supplicant /system/bin/wpa_supplicant \
Dmitry Shmidt0295d702012-07-10 13:17:12 -070098 -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -e/data/misc/wifi/entropy.bin
Dmitry Shmidte87ec972012-03-16 09:43:07 -070099 # we will start as root and wpa_supplicant will switch to user wifi
100 # after setting up the capabilities required for WEXT
101 # user wifi
102 # group wifi inet keystore
103 class main
104 socket wpa_wlan0 dgram 660 wifi wifi
105 disabled
106 oneshot
107
108service dhcpcd_wlan0 /system/bin/dhcpcd -aABKL
109 class main
110 disabled
111 oneshot
112
Dmitry Shmidt0295d702012-07-10 13:17:12 -0700113service dhcpcd_p2p /system/bin/dhcpcd -aABKL
114 class main
115 disabled
116 oneshot
117
118service dhcpcd_eth0 /system/bin/dhcpcd -ABKL
119 class main
120 disabled
121 oneshot
122
Dmitry Shmidte87ec972012-03-16 09:43:07 -0700123service iprenew_wlan0 /system/bin/dhcpcd -n
124 class main
125 disabled
126 oneshot
Colin Cross989b65a2012-03-18 16:03:42 -0700127
Dmitry Shmidt0295d702012-07-10 13:17:12 -0700128service iprenew_p2p /system/bin/dhcpcd -n
129 class main
130 disabled
131 oneshot
132
Jeong-Seok Yang4801b7f2012-04-30 14:25:27 +0900133service battery_charger /charger
134 class charger
135
Arve Hjønnevåg481ffe62012-06-13 22:01:38 -0700136# Set watchdog timer to 30 seconds and pet it every 10 seconds to get a 20 second margin
137service watchdogd /sbin/watchdogd 10 20
138 class core
139
Bono Kooc3e28db2012-06-21 13:41:36 +0900140service gpsd /system/vendor/bin/gpsd -c /system/vendor/etc/gps.xml
141 class main
142 socket gps seqpacket 0660 gps system
143 user gps
Jeff Sharkeyd20a7a62012-08-20 14:29:13 -0700144 group system inet
Bono Kooc3e28db2012-06-21 13:41:36 +0900145
DongJin Parke2fd4f32012-08-03 15:55:39 +0900146# MobiCore startup
Dima Zavinf9883d72012-08-20 23:37:57 -0700147service mobicore /system/bin/mcDriverDaemon -r /system/vendor/secapp/020a0000000000000000000000000000.drbin
148 setenv MC_REGISTRY_PATH /system/vendor/secapp
DongJin Parke2fd4f32012-08-03 15:55:39 +0900149 user drmrpc
150 group drmrpc
151 class main
152
Colin Cross989b65a2012-03-18 16:03:42 -0700153# on userdebug and eng builds, enable kgdb on the serial console
154on property:ro.debuggable=1
155 write /sys/module/kgdboc/parameters/kgdboc ttyFIQ2
156 write /sys/module/fiq_debugger/parameters/kgdb_enable 1
Jason Chen73da4592012-06-08 08:50:25 -0700157
158# bugreport is triggered by holding down volume down, volume up and power
159service bugreport /system/bin/bugmailer.sh -v
160 class main
161 disabled
162 oneshot
163 keycodes 114 115 116