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 | |
Arve Hjønnevåg | 481ffe6 | 2012-06-13 22:01:38 -0700 | [diff] [blame] | 3 | on init |
| 4 | start watchdogd |
| 5 | |
Jeff Sharkey | 4d8468d | 2012-08-21 10:38:32 -0700 | [diff] [blame] | 6 | # See storage config details at http://source.android.com/tech/storage/ |
Jeff Sharkey | 56ec91d | 2012-09-11 23:20:56 -0700 | [diff] [blame] | 7 | mkdir /mnt/shell/emulated 0700 shell shell |
Jeff Sharkey | b9928aa | 2012-09-30 17:20:20 -0700 | [diff] [blame] | 8 | mkdir /storage/emulated 0555 root root |
Benoit Goby | e5d653c | 2012-08-16 20:40:35 -0700 | [diff] [blame] | 9 | |
Jeff Sharkey | 4e67a17 | 2012-09-30 12:49:03 -0700 | [diff] [blame] | 10 | export EXTERNAL_STORAGE /storage/emulated/legacy |
Jeff Sharkey | 56ec91d | 2012-09-11 23:20:56 -0700 | [diff] [blame] | 11 | export EMULATED_STORAGE_SOURCE /mnt/shell/emulated |
| 12 | export EMULATED_STORAGE_TARGET /storage/emulated |
Jeff Sharkey | dc3015d | 2012-08-20 13:24:32 -0700 | [diff] [blame] | 13 | |
Jeff Sharkey | 4d8468d | 2012-08-21 10:38:32 -0700 | [diff] [blame] | 14 | # Support legacy paths |
Jeff Sharkey | 4e67a17 | 2012-09-30 12:49:03 -0700 | [diff] [blame] | 15 | symlink /storage/emulated/legacy /sdcard |
| 16 | symlink /storage/emulated/legacy /mnt/sdcard |
| 17 | symlink /storage/emulated/legacy /storage/sdcard0 |
| 18 | symlink /mnt/shell/emulated/0 /storage/emulated/legacy |
Jeff Sharkey | 233e588 | 2012-08-16 13:52:00 -0700 | [diff] [blame] | 19 | |
Colin Cross | 29380e6 | 2012-03-06 17:41:22 -0800 | [diff] [blame] | 20 | on post-fs-data |
Jeff Sharkey | 3379311 | 2012-04-09 17:34:07 -0700 | [diff] [blame] | 21 | mkdir /data/media 0770 media_rw media_rw |
Jeff Sharkey | 233e588 | 2012-08-16 13:52:00 -0700 | [diff] [blame] | 22 | |
Colin Cross | 29380e6 | 2012-03-06 17:41:22 -0800 | [diff] [blame] | 23 | setprop vold.post_fs_data_done 1 |
Dmitry Shmidt | e87ec97 | 2012-03-16 09:43:07 -0700 | [diff] [blame] | 24 | mkdir /data/misc/wifi 0770 wifi wifi |
| 25 | mkdir /data/misc/wifi/sockets 0770 wifi wifi |
| 26 | mkdir /data/misc/dhcp 0770 dhcp dhcp |
| 27 | chown dhcp dhcp /data/misc/dhcp |
Colin Cross | 29380e6 | 2012-03-06 17:41:22 -0800 | [diff] [blame] | 28 | |
Matthew Xie | e90682b | 2012-07-27 19:53:47 -0700 | [diff] [blame] | 29 | # permissions for bluetooth. |
Chunho Park | 362e654 | 2012-09-18 14:42:27 +0900 | [diff] [blame] | 30 | setprop ro.bt.bdaddr_path "/factory/bluetooth/bt_addr" |
Matthew Xie | 7f32e6f | 2012-10-04 21:51:09 -0700 | [diff] [blame] | 31 | chown bluetooth net_bt_stack ro.bt.bdaddr_path |
| 32 | chown bluetooth net_bt_stack /dev/ttySAC0 |
| 33 | chmod 0660 /dev/ttySAC0 |
Matthew Xie | e90682b | 2012-07-27 19:53:47 -0700 | [diff] [blame] | 34 | chmod 0660 /sys/class/rfkill/rfkill0/state |
Matthew Xie | 7f32e6f | 2012-10-04 21:51:09 -0700 | [diff] [blame] | 35 | chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/state |
| 36 | chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/type |
Matthew Xie | e90682b | 2012-07-27 19:53:47 -0700 | [diff] [blame] | 37 | |
Colin Cross | 29380e6 | 2012-03-06 17:41:22 -0800 | [diff] [blame] | 38 | on boot |
Colin Cross | 3a15c64 | 2012-10-19 14:32:23 -0700 | [diff] [blame] | 39 | # override init.rc to keep plenty of large order chunks around |
| 40 | # to improve allocation times |
| 41 | write /proc/sys/vm/min_free_kbytes 32768 |
| 42 | write /proc/sys/vm/min_free_order_shift 1 |
| 43 | |
Colin Cross | 29380e6 | 2012-03-06 17:41:22 -0800 | [diff] [blame] | 44 | mount debugfs /sys/kernel/debug /sys/kernel/debug |
| 45 | setprop ro.radio.noril yes |
| 46 | |
Arve Hjønnevåg | 0099ab2 | 2012-09-26 17:25:36 -0700 | [diff] [blame] | 47 | # Reduce reserved lowmem from ~48MB to ~12MB |
| 48 | write /proc/sys/vm/lowmem_reserve_ratio "128 128" |
| 49 | |
Colin Cross | 29380e6 | 2012-03-06 17:41:22 -0800 | [diff] [blame] | 50 | # Set up kernel tracing, but disable it by default |
| 51 | chmod 0222 /sys/kernel/debug/tracing/trace_marker |
| 52 | write /sys/kernel/debug/tracing/tracing_on 0 |
| 53 | |
Todd Poynor | 37b2e3b | 2012-07-26 12:32:09 -0700 | [diff] [blame] | 54 | chmod 0444 /sys/kernel/debug/smb347-regs |
| 55 | |
Seho Kim | 836d6ee | 2012-09-19 14:46:22 -0700 | [diff] [blame] | 56 | # Set Mali power policy as Coarse demand |
| 57 | write /sys/devices/platform/mali.0/power_policy coarse_demand |
| 58 | |
Colin Cross | 29380e6 | 2012-03-06 17:41:22 -0800 | [diff] [blame] | 59 | on fs |
Dima Zavin | 0dbbcf3 | 2012-08-20 23:37:22 -0700 | [diff] [blame] | 60 | mkdir /factory 0775 radio radio |
| 61 | |
Ken Sumrall | fa170c7 | 2012-04-12 14:40:39 -0700 | [diff] [blame] | 62 | mount_all /fstab.manta |
Colin Cross | 29380e6 | 2012-03-06 17:41:22 -0800 | [diff] [blame] | 63 | setprop ro.crypto.fuse_sdcard true |
| 64 | |
| 65 | # Permissions for backlight |
Colin Cross | 37a83b9 | 2012-05-31 13:31:21 -0700 | [diff] [blame] | 66 | chmod 0660 /sys/class/backlight/pwm-backlight.0/brightness |
Colin Cross | 29380e6 | 2012-03-06 17:41:22 -0800 | [diff] [blame] | 67 | chown system system /sys/class/backlight/pwm-backlight.0/brightness |
| 68 | |
Bono Koo | c3e28db | 2012-06-21 13:41:36 +0900 | [diff] [blame] | 69 | # create data/gps for GPS daemon |
| 70 | chown root system /sys/class/gps/bcm475x/GPS_PWR_EN/value |
| 71 | chmod 0664 /sys/class/gps/bcm475x/GPS_PWR_EN/value |
| 72 | chown root system /sys/class/gps/bcm475x/GPS_nRST/value |
| 73 | chmod 0664 /sys/class/gps/bcm475x/GPS_nRST/value |
| 74 | mkdir /data/gps 771 system system |
| 75 | chown system system /data/gps |
| 76 | |
Martijn Coenen | 779f93b | 2012-07-30 13:18:09 -0700 | [diff] [blame] | 77 | # NFC: create data/nfc for nv storage |
| 78 | mkdir /data/nfc 770 nfc nfc |
| 79 | mkdir /data/nfc/param 770 nfc nfc |
| 80 | |
Eric Laurent | 688880c | 2012-09-07 16:46:00 -0700 | [diff] [blame] | 81 | # audio: permissions for voice processing |
Jean-Michel Trivi | e04f7c9 | 2012-09-30 16:01:41 -0700 | [diff] [blame] | 82 | # global switch for voice processing effects |
Eric Laurent | 688880c | 2012-09-07 16:46:00 -0700 | [diff] [blame] | 83 | chown root audio /sys/class/i2c-dev/i2c-4/device/4-003e/voice_processing |
| 84 | chmod 0660 /sys/class/i2c-dev/i2c-4/device/4-003e/voice_processing |
Jean-Michel Trivi | e04f7c9 | 2012-09-30 16:01:41 -0700 | [diff] [blame] | 85 | # voice processing chip sleep |
Jean-Michel Trivi | 0427d43 | 2012-10-04 15:42:04 -0700 | [diff] [blame] | 86 | chown root audio /sys/class/i2c-dev/i2c-4/device/4-003e/sleep |
| 87 | chmod 0660 /sys/class/i2c-dev/i2c-4/device/4-003e/sleep |
Jean-Michel Trivi | e04f7c9 | 2012-09-30 16:01:41 -0700 | [diff] [blame] | 88 | # voice processing usecase preset |
| 89 | chown root audio /sys/class/i2c-dev/i2c-4/device/4-003e/preset |
| 90 | chmod 0660 /sys/class/i2c-dev/i2c-4/device/4-003e/preset |
| 91 | # voice processing noise suppression level |
| 92 | chown root audio /sys/class/i2c-dev/i2c-4/device/4-003e/tx_ns_level |
| 93 | chmod 0660 /sys/class/i2c-dev/i2c-4/device/4-003e/tx_ns_level |
| 94 | # voice processing AGC enable (TX) |
| 95 | chown root audio /sys/class/i2c-dev/i2c-4/device/4-003e/tx_agc_enable |
| 96 | chmod 0660 /sys/class/i2c-dev/i2c-4/device/4-003e/tx_agc_enable |
| 97 | # voice processing AEC enable |
| 98 | chown root audio /sys/class/i2c-dev/i2c-4/device/4-003e/aec_enable |
| 99 | chmod 0660 /sys/class/i2c-dev/i2c-4/device/4-003e/aec_enable |
Eric Laurent | 688880c | 2012-09-07 16:46:00 -0700 | [diff] [blame] | 100 | |
Jeff Sharkey | 233e588 | 2012-08-16 13:52:00 -0700 | [diff] [blame] | 101 | # virtual sdcard daemon running as media_rw (1023) |
Jeff Sharkey | 56ec91d | 2012-09-11 23:20:56 -0700 | [diff] [blame] | 102 | service sdcard /system/bin/sdcard /data/media /mnt/shell/emulated 1023 1023 |
Colin Cross | 29380e6 | 2012-03-06 17:41:22 -0800 | [diff] [blame] | 103 | class late_start |
Dmitry Shmidt | e87ec97 | 2012-03-16 09:43:07 -0700 | [diff] [blame] | 104 | |
Dmitry Shmidt | 0295d70 | 2012-07-10 13:17:12 -0700 | [diff] [blame] | 105 | service p2p_supplicant /system/bin/wpa_supplicant \ |
Dmitry Shmidt | ee69be6 | 2012-08-08 13:51:38 -0700 | [diff] [blame] | 106 | -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ |
| 107 | -puse_multi_chan_concurrent=1 -N -ip2p0 -Dnl80211 \ |
Irfan Sheriff | 69cebe0 | 2012-08-16 05:29:31 -0700 | [diff] [blame] | 108 | -c/data/misc/wifi/p2p_supplicant.conf \ |
| 109 | -puse_p2p_group_interface=1use_multi_chan_concurrent=1 -e/data/misc/wifi/entropy.bin |
Dmitry Shmidt | 0295d70 | 2012-07-10 13:17:12 -0700 | [diff] [blame] | 110 | # we will start as root and wpa_supplicant will switch to user wifi |
| 111 | # after setting up the capabilities required for WEXT |
| 112 | # user wifi |
| 113 | # group wifi inet keystore |
| 114 | class main |
| 115 | socket wpa_wlan0 dgram 660 wifi wifi |
| 116 | disabled |
| 117 | oneshot |
| 118 | |
Dmitry Shmidt | e87ec97 | 2012-03-16 09:43:07 -0700 | [diff] [blame] | 119 | service wpa_supplicant /system/bin/wpa_supplicant \ |
Dmitry Shmidt | 0295d70 | 2012-07-10 13:17:12 -0700 | [diff] [blame] | 120 | -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] | 121 | # we will start as root and wpa_supplicant will switch to user wifi |
| 122 | # after setting up the capabilities required for WEXT |
| 123 | # user wifi |
| 124 | # group wifi inet keystore |
| 125 | class main |
| 126 | socket wpa_wlan0 dgram 660 wifi wifi |
| 127 | disabled |
| 128 | oneshot |
| 129 | |
Dmitry Shmidt | c2c962a | 2012-09-20 11:12:34 -0700 | [diff] [blame] | 130 | service dhcpcd_wlan0 /system/bin/dhcpcd -aABDKL |
Dmitry Shmidt | e87ec97 | 2012-03-16 09:43:07 -0700 | [diff] [blame] | 131 | class main |
| 132 | disabled |
| 133 | oneshot |
| 134 | |
Dmitry Shmidt | 0295d70 | 2012-07-10 13:17:12 -0700 | [diff] [blame] | 135 | service dhcpcd_p2p /system/bin/dhcpcd -aABKL |
| 136 | class main |
| 137 | disabled |
| 138 | oneshot |
| 139 | |
Dmitry Shmidt | c2c962a | 2012-09-20 11:12:34 -0700 | [diff] [blame] | 140 | service dhcpcd_eth0 /system/bin/dhcpcd -ABDKL |
Dmitry Shmidt | 0295d70 | 2012-07-10 13:17:12 -0700 | [diff] [blame] | 141 | class main |
| 142 | disabled |
| 143 | oneshot |
| 144 | |
Dmitry Shmidt | e87ec97 | 2012-03-16 09:43:07 -0700 | [diff] [blame] | 145 | service iprenew_wlan0 /system/bin/dhcpcd -n |
| 146 | class main |
| 147 | disabled |
| 148 | oneshot |
Colin Cross | 989b65a | 2012-03-18 16:03:42 -0700 | [diff] [blame] | 149 | |
Dmitry Shmidt | 0295d70 | 2012-07-10 13:17:12 -0700 | [diff] [blame] | 150 | service iprenew_p2p /system/bin/dhcpcd -n |
| 151 | class main |
| 152 | disabled |
| 153 | oneshot |
| 154 | |
Jeong-Seok Yang | 4801b7f | 2012-04-30 14:25:27 +0900 | [diff] [blame] | 155 | service battery_charger /charger |
| 156 | class charger |
| 157 | |
Arve Hjønnevåg | 481ffe6 | 2012-06-13 22:01:38 -0700 | [diff] [blame] | 158 | # Set watchdog timer to 30 seconds and pet it every 10 seconds to get a 20 second margin |
| 159 | service watchdogd /sbin/watchdogd 10 20 |
| 160 | class core |
| 161 | |
Bono Koo | c3e28db | 2012-06-21 13:41:36 +0900 | [diff] [blame] | 162 | service gpsd /system/vendor/bin/gpsd -c /system/vendor/etc/gps.xml |
| 163 | class main |
| 164 | socket gps seqpacket 0660 gps system |
| 165 | user gps |
Jeff Sharkey | d20a7a6 | 2012-08-20 14:29:13 -0700 | [diff] [blame] | 166 | group system inet |
Bono Koo | c3e28db | 2012-06-21 13:41:36 +0900 | [diff] [blame] | 167 | |
DongJin Park | e2fd4f3 | 2012-08-03 15:55:39 +0900 | [diff] [blame] | 168 | # MobiCore startup |
Dima Zavin | f9883d7 | 2012-08-20 23:37:57 -0700 | [diff] [blame] | 169 | service mobicore /system/bin/mcDriverDaemon -r /system/vendor/secapp/020a0000000000000000000000000000.drbin |
| 170 | setenv MC_REGISTRY_PATH /system/vendor/secapp |
DongJin Park | e2fd4f3 | 2012-08-03 15:55:39 +0900 | [diff] [blame] | 171 | user drmrpc |
| 172 | group drmrpc |
| 173 | class main |
| 174 | |
Colin Cross | 989b65a | 2012-03-18 16:03:42 -0700 | [diff] [blame] | 175 | # on userdebug and eng builds, enable kgdb on the serial console |
| 176 | on property:ro.debuggable=1 |
| 177 | write /sys/module/kgdboc/parameters/kgdboc ttyFIQ2 |
| 178 | write /sys/module/fiq_debugger/parameters/kgdb_enable 1 |
Jason Chen | 73da459 | 2012-06-08 08:50:25 -0700 | [diff] [blame] | 179 | |
| 180 | # bugreport is triggered by holding down volume down, volume up and power |
| 181 | service bugreport /system/bin/bugmailer.sh -v |
| 182 | class main |
| 183 | disabled |
| 184 | oneshot |
| 185 | keycodes 114 115 116 |