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 | |
| 40 | on fs |
Ken Sumrall | fa170c7 | 2012-04-12 14:40:39 -0700 | [diff] [blame] | 41 | mount_all /fstab.manta |
Colin Cross | 29380e6 | 2012-03-06 17:41:22 -0800 | [diff] [blame] | 42 | setprop ro.crypto.fuse_sdcard true |
| 43 | |
| 44 | # Permissions for backlight |
Colin Cross | 37a83b9 | 2012-05-31 13:31:21 -0700 | [diff] [blame] | 45 | chmod 0660 /sys/class/backlight/pwm-backlight.0/brightness |
Colin Cross | 29380e6 | 2012-03-06 17:41:22 -0800 | [diff] [blame] | 46 | chown system system /sys/class/backlight/pwm-backlight.0/brightness |
| 47 | |
Bono Koo | c3e28db | 2012-06-21 13:41:36 +0900 | [diff] [blame] | 48 | # 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 Coenen | 779f93b | 2012-07-30 13:18:09 -0700 | [diff] [blame^] | 56 | # NFC: create data/nfc for nv storage |
| 57 | mkdir /data/nfc 770 nfc nfc |
| 58 | mkdir /data/nfc/param 770 nfc nfc |
| 59 | |
Jeff Sharkey | 3379311 | 2012-04-09 17:34:07 -0700 | [diff] [blame] | 60 | # 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] | 61 | # 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) |
| 63 | service sdcard /system/bin/sdcard /data/media 1023 1023 |
| 64 | class late_start |
Dmitry Shmidt | e87ec97 | 2012-03-16 09:43:07 -0700 | [diff] [blame] | 65 | |
Dmitry Shmidt | 0295d70 | 2012-07-10 13:17:12 -0700 | [diff] [blame] | 66 | service 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 Shmidt | e87ec97 | 2012-03-16 09:43:07 -0700 | [diff] [blame] | 78 | service wpa_supplicant /system/bin/wpa_supplicant \ |
Dmitry Shmidt | 0295d70 | 2012-07-10 13:17:12 -0700 | [diff] [blame] | 79 | -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] | 80 | # 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 | |
| 89 | service dhcpcd_wlan0 /system/bin/dhcpcd -aABKL |
| 90 | class main |
| 91 | disabled |
| 92 | oneshot |
| 93 | |
Dmitry Shmidt | 0295d70 | 2012-07-10 13:17:12 -0700 | [diff] [blame] | 94 | service dhcpcd_p2p /system/bin/dhcpcd -aABKL |
| 95 | class main |
| 96 | disabled |
| 97 | oneshot |
| 98 | |
| 99 | service dhcpcd_eth0 /system/bin/dhcpcd -ABKL |
| 100 | class main |
| 101 | disabled |
| 102 | oneshot |
| 103 | |
Dmitry Shmidt | e87ec97 | 2012-03-16 09:43:07 -0700 | [diff] [blame] | 104 | service iprenew_wlan0 /system/bin/dhcpcd -n |
| 105 | class main |
| 106 | disabled |
| 107 | oneshot |
Colin Cross | 989b65a | 2012-03-18 16:03:42 -0700 | [diff] [blame] | 108 | |
Dmitry Shmidt | 0295d70 | 2012-07-10 13:17:12 -0700 | [diff] [blame] | 109 | service iprenew_p2p /system/bin/dhcpcd -n |
| 110 | class main |
| 111 | disabled |
| 112 | oneshot |
| 113 | |
Jeong-Seok Yang | 4801b7f | 2012-04-30 14:25:27 +0900 | [diff] [blame] | 114 | service battery_charger /charger |
| 115 | class charger |
| 116 | |
Arve Hjønnevåg | 481ffe6 | 2012-06-13 22:01:38 -0700 | [diff] [blame] | 117 | # Set watchdog timer to 30 seconds and pet it every 10 seconds to get a 20 second margin |
| 118 | service watchdogd /sbin/watchdogd 10 20 |
| 119 | class core |
| 120 | |
Bono Koo | c3e28db | 2012-06-21 13:41:36 +0900 | [diff] [blame] | 121 | service 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 Cross | 989b65a | 2012-03-18 16:03:42 -0700 | [diff] [blame] | 127 | # on userdebug and eng builds, enable kgdb on the serial console |
| 128 | on property:ro.debuggable=1 |
| 129 | write /sys/module/kgdboc/parameters/kgdboc ttyFIQ2 |
| 130 | write /sys/module/fiq_debugger/parameters/kgdb_enable 1 |
Jason Chen | 73da459 | 2012-06-08 08:50:25 -0700 | [diff] [blame] | 131 | |
| 132 | # bugreport is triggered by holding down volume down, volume up and power |
| 133 | service bugreport /system/bin/bugmailer.sh -v |
| 134 | class main |
| 135 | disabled |
| 136 | oneshot |
| 137 | keycodes 114 115 116 |