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 |
| 8 | mkdir /storage/emulated 0000 root root |
| 9 | mkdir /storage/emulated_legacy 0000 root root |
Benoit Goby | e5d653c | 2012-08-16 20:40:35 -0700 | [diff] [blame] | 10 | |
Jeff Sharkey | 56ec91d | 2012-09-11 23:20:56 -0700 | [diff] [blame^] | 11 | 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 Sharkey | dc3015d | 2012-08-20 13:24:32 -0700 | [diff] [blame] | 16 | |
Jeff Sharkey | 4d8468d | 2012-08-21 10:38:32 -0700 | [diff] [blame] | 17 | # Support legacy paths |
Jeff Sharkey | 56ec91d | 2012-09-11 23:20:56 -0700 | [diff] [blame^] | 18 | symlink /storage/emulated_legacy /sdcard |
| 19 | symlink /storage/emulated_legacy /mnt/sdcard |
Jeff Sharkey | 233e588 | 2012-08-16 13:52:00 -0700 | [diff] [blame] | 20 | |
| 21 | # Save bugreports as owner |
Jeff Sharkey | 56ec91d | 2012-09-11 23:20:56 -0700 | [diff] [blame^] | 22 | export BUGREPORT_WRITE_PATH /mnt/shell/emulated/0 |
| 23 | export BUGREPORT_READ_PATH /storage/emulated |
Jeff Sharkey | 233e588 | 2012-08-16 13:52:00 -0700 | [diff] [blame] | 24 | |
Colin Cross | 29380e6 | 2012-03-06 17:41:22 -0800 | [diff] [blame] | 25 | on post-fs-data |
Jeff Sharkey | 3379311 | 2012-04-09 17:34:07 -0700 | [diff] [blame] | 26 | mkdir /data/media 0770 media_rw media_rw |
Jeff Sharkey | 233e588 | 2012-08-16 13:52:00 -0700 | [diff] [blame] | 27 | |
Colin Cross | 29380e6 | 2012-03-06 17:41:22 -0800 | [diff] [blame] | 28 | setprop vold.post_fs_data_done 1 |
Dmitry Shmidt | e87ec97 | 2012-03-16 09:43:07 -0700 | [diff] [blame] | 29 | 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 Cross | 29380e6 | 2012-03-06 17:41:22 -0800 | [diff] [blame] | 33 | |
Matthew Xie | e90682b | 2012-07-27 19:53:47 -0700 | [diff] [blame] | 34 | # 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 Cross | 29380e6 | 2012-03-06 17:41:22 -0800 | [diff] [blame] | 43 | on 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 Poynor | 37b2e3b | 2012-07-26 12:32:09 -0700 | [diff] [blame] | 51 | chmod 0444 /sys/kernel/debug/smb347-regs |
| 52 | |
Colin Cross | 0aa1456 | 2012-08-20 21:55:30 -0700 | [diff] [blame] | 53 | # HACK: set maximum memory bus frequency to 667 MHz to fix memory corruption |
| 54 | # b/7005327 |
Colin Cross | de77daf | 2012-08-20 21:55:30 -0700 | [diff] [blame] | 55 | write /sys/class/devfreq/exynos5-bus-mif.0/max_freq 667000 |
Colin Cross | 0aa1456 | 2012-08-20 21:55:30 -0700 | [diff] [blame] | 56 | |
Colin Cross | 29380e6 | 2012-03-06 17:41:22 -0800 | [diff] [blame] | 57 | on fs |
Dima Zavin | 0dbbcf3 | 2012-08-20 23:37:22 -0700 | [diff] [blame] | 58 | mkdir /factory 0775 radio radio |
| 59 | |
Ken Sumrall | fa170c7 | 2012-04-12 14:40:39 -0700 | [diff] [blame] | 60 | mount_all /fstab.manta |
Colin Cross | 29380e6 | 2012-03-06 17:41:22 -0800 | [diff] [blame] | 61 | setprop ro.crypto.fuse_sdcard true |
| 62 | |
| 63 | # Permissions for backlight |
Colin Cross | 37a83b9 | 2012-05-31 13:31:21 -0700 | [diff] [blame] | 64 | chmod 0660 /sys/class/backlight/pwm-backlight.0/brightness |
Colin Cross | 29380e6 | 2012-03-06 17:41:22 -0800 | [diff] [blame] | 65 | chown system system /sys/class/backlight/pwm-backlight.0/brightness |
| 66 | |
Bono Koo | c3e28db | 2012-06-21 13:41:36 +0900 | [diff] [blame] | 67 | # 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 Coenen | 779f93b | 2012-07-30 13:18:09 -0700 | [diff] [blame] | 75 | # NFC: create data/nfc for nv storage |
| 76 | mkdir /data/nfc 770 nfc nfc |
| 77 | mkdir /data/nfc/param 770 nfc nfc |
| 78 | |
Jeff Sharkey | 233e588 | 2012-08-16 13:52:00 -0700 | [diff] [blame] | 79 | # virtual sdcard daemon running as media_rw (1023) |
Jeff Sharkey | 56ec91d | 2012-09-11 23:20:56 -0700 | [diff] [blame^] | 80 | service sdcard /system/bin/sdcard /data/media /mnt/shell/emulated 1023 1023 |
Colin Cross | 29380e6 | 2012-03-06 17:41:22 -0800 | [diff] [blame] | 81 | class late_start |
Dmitry Shmidt | e87ec97 | 2012-03-16 09:43:07 -0700 | [diff] [blame] | 82 | |
Dmitry Shmidt | 0295d70 | 2012-07-10 13:17:12 -0700 | [diff] [blame] | 83 | service p2p_supplicant /system/bin/wpa_supplicant \ |
Dmitry Shmidt | ee69be6 | 2012-08-08 13:51:38 -0700 | [diff] [blame] | 84 | -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ |
| 85 | -puse_multi_chan_concurrent=1 -N -ip2p0 -Dnl80211 \ |
Irfan Sheriff | 69cebe0 | 2012-08-16 05:29:31 -0700 | [diff] [blame] | 86 | -c/data/misc/wifi/p2p_supplicant.conf \ |
| 87 | -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] | 88 | # 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 Shmidt | e87ec97 | 2012-03-16 09:43:07 -0700 | [diff] [blame] | 97 | service wpa_supplicant /system/bin/wpa_supplicant \ |
Dmitry Shmidt | 0295d70 | 2012-07-10 13:17:12 -0700 | [diff] [blame] | 98 | -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] | 99 | # 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 | |
| 108 | service dhcpcd_wlan0 /system/bin/dhcpcd -aABKL |
| 109 | class main |
| 110 | disabled |
| 111 | oneshot |
| 112 | |
Dmitry Shmidt | 0295d70 | 2012-07-10 13:17:12 -0700 | [diff] [blame] | 113 | service dhcpcd_p2p /system/bin/dhcpcd -aABKL |
| 114 | class main |
| 115 | disabled |
| 116 | oneshot |
| 117 | |
| 118 | service dhcpcd_eth0 /system/bin/dhcpcd -ABKL |
| 119 | class main |
| 120 | disabled |
| 121 | oneshot |
| 122 | |
Dmitry Shmidt | e87ec97 | 2012-03-16 09:43:07 -0700 | [diff] [blame] | 123 | service iprenew_wlan0 /system/bin/dhcpcd -n |
| 124 | class main |
| 125 | disabled |
| 126 | oneshot |
Colin Cross | 989b65a | 2012-03-18 16:03:42 -0700 | [diff] [blame] | 127 | |
Dmitry Shmidt | 0295d70 | 2012-07-10 13:17:12 -0700 | [diff] [blame] | 128 | service iprenew_p2p /system/bin/dhcpcd -n |
| 129 | class main |
| 130 | disabled |
| 131 | oneshot |
| 132 | |
Jeong-Seok Yang | 4801b7f | 2012-04-30 14:25:27 +0900 | [diff] [blame] | 133 | service battery_charger /charger |
| 134 | class charger |
| 135 | |
Arve Hjønnevåg | 481ffe6 | 2012-06-13 22:01:38 -0700 | [diff] [blame] | 136 | # Set watchdog timer to 30 seconds and pet it every 10 seconds to get a 20 second margin |
| 137 | service watchdogd /sbin/watchdogd 10 20 |
| 138 | class core |
| 139 | |
Bono Koo | c3e28db | 2012-06-21 13:41:36 +0900 | [diff] [blame] | 140 | service 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 Sharkey | d20a7a6 | 2012-08-20 14:29:13 -0700 | [diff] [blame] | 144 | group system inet |
Bono Koo | c3e28db | 2012-06-21 13:41:36 +0900 | [diff] [blame] | 145 | |
DongJin Park | e2fd4f3 | 2012-08-03 15:55:39 +0900 | [diff] [blame] | 146 | # MobiCore startup |
Dima Zavin | f9883d7 | 2012-08-20 23:37:57 -0700 | [diff] [blame] | 147 | service mobicore /system/bin/mcDriverDaemon -r /system/vendor/secapp/020a0000000000000000000000000000.drbin |
| 148 | setenv MC_REGISTRY_PATH /system/vendor/secapp |
DongJin Park | e2fd4f3 | 2012-08-03 15:55:39 +0900 | [diff] [blame] | 149 | user drmrpc |
| 150 | group drmrpc |
| 151 | class main |
| 152 | |
Colin Cross | 989b65a | 2012-03-18 16:03:42 -0700 | [diff] [blame] | 153 | # on userdebug and eng builds, enable kgdb on the serial console |
| 154 | on property:ro.debuggable=1 |
| 155 | write /sys/module/kgdboc/parameters/kgdboc ttyFIQ2 |
| 156 | write /sys/module/fiq_debugger/parameters/kgdb_enable 1 |
Jason Chen | 73da459 | 2012-06-08 08:50:25 -0700 | [diff] [blame] | 157 | |
| 158 | # bugreport is triggered by holding down volume down, volume up and power |
| 159 | service bugreport /system/bin/bugmailer.sh -v |
| 160 | class main |
| 161 | disabled |
| 162 | oneshot |
| 163 | keycodes 114 115 116 |