Benoit Goby | 25cc305 | 2012-03-29 19:35:36 -0700 | [diff] [blame] | 1 | import init.manta.usb.rc |
Colin Cross | 29380e6 | 2012-03-06 17:41:22 -0800 | [diff] [blame] | 2 | |
| 3 | on early-init |
Jeff Sharkey | 3379311 | 2012-04-09 17:34:07 -0700 | [diff] [blame] | 4 | export EXTERNAL_STORAGE /storage/sdcard0 |
Jeff Sharkey | 72871d2 | 2012-04-23 10:54:07 -0700 | [diff] [blame] | 5 | mkdir /storage 0050 system sdcard_r |
Jeff Sharkey | 3379311 | 2012-04-09 17:34:07 -0700 | [diff] [blame] | 6 | mkdir /storage/sdcard0 0000 system system |
| 7 | symlink /storage/sdcard0 /sdcard |
| 8 | symlink /storage/sdcard0 /mnt/sdcard |
Colin Cross | 29380e6 | 2012-03-06 17:41:22 -0800 | [diff] [blame] | 9 | |
Arve Hjønnevåg | 481ffe6 | 2012-06-13 22:01:38 -0700 | [diff] [blame] | 10 | on init |
| 11 | start watchdogd |
| 12 | |
Colin Cross | 29380e6 | 2012-03-06 17:41:22 -0800 | [diff] [blame] | 13 | on post-fs-data |
Jeff Sharkey | 3379311 | 2012-04-09 17:34:07 -0700 | [diff] [blame] | 14 | # we will remap this as /storage/sdcard0 with the sdcard fuse tool |
| 15 | mkdir /data/media 0770 media_rw media_rw |
Colin Cross | 29380e6 | 2012-03-06 17:41:22 -0800 | [diff] [blame] | 16 | chown media_rw media_rw /data/media |
| 17 | setprop vold.post_fs_data_done 1 |
Dmitry Shmidt | e87ec97 | 2012-03-16 09:43:07 -0700 | [diff] [blame] | 18 | 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 Cross | 29380e6 | 2012-03-06 17:41:22 -0800 | [diff] [blame] | 22 | |
Matthew Xie | e90682b | 2012-07-27 19:53:47 -0700 | [diff] [blame] | 23 | # 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 Cross | 29380e6 | 2012-03-06 17:41:22 -0800 | [diff] [blame] | 32 | on 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 Poynor | 37b2e3b | 2012-07-26 12:32:09 -0700 | [diff] [blame] | 40 | chmod 0444 /sys/kernel/debug/smb347-regs |
| 41 | |
Colin Cross | 29380e6 | 2012-03-06 17:41:22 -0800 | [diff] [blame] | 42 | on fs |
Ken Sumrall | fa170c7 | 2012-04-12 14:40:39 -0700 | [diff] [blame] | 43 | mount_all /fstab.manta |
Colin Cross | 29380e6 | 2012-03-06 17:41:22 -0800 | [diff] [blame] | 44 | setprop ro.crypto.fuse_sdcard true |
| 45 | |
| 46 | # Permissions for backlight |
Colin Cross | 37a83b9 | 2012-05-31 13:31:21 -0700 | [diff] [blame] | 47 | chmod 0660 /sys/class/backlight/pwm-backlight.0/brightness |
Colin Cross | 29380e6 | 2012-03-06 17:41:22 -0800 | [diff] [blame] | 48 | chown system system /sys/class/backlight/pwm-backlight.0/brightness |
| 49 | |
Bono Koo | c3e28db | 2012-06-21 13:41:36 +0900 | [diff] [blame] | 50 | # 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 Coenen | 779f93b | 2012-07-30 13:18:09 -0700 | [diff] [blame] | 58 | # NFC: create data/nfc for nv storage |
| 59 | mkdir /data/nfc 770 nfc nfc |
| 60 | mkdir /data/nfc/param 770 nfc nfc |
| 61 | |
Jeff Sharkey | 3379311 | 2012-04-09 17:34:07 -0700 | [diff] [blame] | 62 | # create virtual SD card at /storage/sdcard0, based on the /data/media directory |
Colin Cross | 29380e6 | 2012-03-06 17:41:22 -0800 | [diff] [blame] | 63 | # 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) |
| 65 | service sdcard /system/bin/sdcard /data/media 1023 1023 |
| 66 | class late_start |
Dmitry Shmidt | e87ec97 | 2012-03-16 09:43:07 -0700 | [diff] [blame] | 67 | |
Dmitry Shmidt | 0295d70 | 2012-07-10 13:17:12 -0700 | [diff] [blame] | 68 | service p2p_supplicant /system/bin/wpa_supplicant \ |
Dmitry Shmidt | ee69be6 | 2012-08-08 13:51:38 -0700 | [diff] [blame] | 69 | -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 Shmidt | 0295d70 | 2012-07-10 13:17:12 -0700 | [diff] [blame] | 73 | # 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 Shmidt | e87ec97 | 2012-03-16 09:43:07 -0700 | [diff] [blame] | 82 | service wpa_supplicant /system/bin/wpa_supplicant \ |
Dmitry Shmidt | 0295d70 | 2012-07-10 13:17:12 -0700 | [diff] [blame] | 83 | -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -e/data/misc/wifi/entropy.bin |
Dmitry Shmidt | e87ec97 | 2012-03-16 09:43:07 -0700 | [diff] [blame] | 84 | # 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 | |
| 93 | service dhcpcd_wlan0 /system/bin/dhcpcd -aABKL |
| 94 | class main |
| 95 | disabled |
| 96 | oneshot |
| 97 | |
Dmitry Shmidt | 0295d70 | 2012-07-10 13:17:12 -0700 | [diff] [blame] | 98 | service dhcpcd_p2p /system/bin/dhcpcd -aABKL |
| 99 | class main |
| 100 | disabled |
| 101 | oneshot |
| 102 | |
| 103 | service dhcpcd_eth0 /system/bin/dhcpcd -ABKL |
| 104 | class main |
| 105 | disabled |
| 106 | oneshot |
| 107 | |
Dmitry Shmidt | e87ec97 | 2012-03-16 09:43:07 -0700 | [diff] [blame] | 108 | service iprenew_wlan0 /system/bin/dhcpcd -n |
| 109 | class main |
| 110 | disabled |
| 111 | oneshot |
Colin Cross | 989b65a | 2012-03-18 16:03:42 -0700 | [diff] [blame] | 112 | |
Dmitry Shmidt | 0295d70 | 2012-07-10 13:17:12 -0700 | [diff] [blame] | 113 | service iprenew_p2p /system/bin/dhcpcd -n |
| 114 | class main |
| 115 | disabled |
| 116 | oneshot |
| 117 | |
Jeong-Seok Yang | 4801b7f | 2012-04-30 14:25:27 +0900 | [diff] [blame] | 118 | service battery_charger /charger |
| 119 | class charger |
| 120 | |
Arve Hjønnevåg | 481ffe6 | 2012-06-13 22:01:38 -0700 | [diff] [blame] | 121 | # Set watchdog timer to 30 seconds and pet it every 10 seconds to get a 20 second margin |
| 122 | service watchdogd /sbin/watchdogd 10 20 |
| 123 | class core |
| 124 | |
Bono Koo | c3e28db | 2012-06-21 13:41:36 +0900 | [diff] [blame] | 125 | service 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 | |
DongJin Park | e2fd4f3 | 2012-08-03 15:55:39 +0900 | [diff] [blame^] | 131 | # MobiCore startup |
| 132 | service mobicore /system/bin/mcDriverDaemon |
| 133 | user drmrpc |
| 134 | group drmrpc |
| 135 | class main |
| 136 | |
Colin Cross | 989b65a | 2012-03-18 16:03:42 -0700 | [diff] [blame] | 137 | # on userdebug and eng builds, enable kgdb on the serial console |
| 138 | on property:ro.debuggable=1 |
| 139 | write /sys/module/kgdboc/parameters/kgdboc ttyFIQ2 |
| 140 | write /sys/module/fiq_debugger/parameters/kgdb_enable 1 |
Jason Chen | 73da459 | 2012-06-08 08:50:25 -0700 | [diff] [blame] | 141 | |
| 142 | # bugreport is triggered by holding down volume down, volume up and power |
| 143 | service bugreport /system/bin/bugmailer.sh -v |
| 144 | class main |
| 145 | disabled |
| 146 | oneshot |
| 147 | keycodes 114 115 116 |