| Colin Cross | 3fdd43a | 2010-06-01 17:41:42 -0700 | [diff] [blame] | 1 | on early-init |
| 2 | mount debugfs debugfs /sys/kernel/debug |
| makarand.karvekar | be4a81f | 2010-07-02 16:26:51 -0500 | [diff] [blame] | 3 | write /sys/class/firmware/timeout 5 |
| Colin Cross | 3fdd43a | 2010-06-01 17:41:42 -0700 | [diff] [blame] | 4 | |
| Mike Lockwood | 9d036e3 | 2010-08-16 14:23:21 -0400 | [diff] [blame] | 5 | export EXTERNAL_STORAGE /mnt/sdcard |
| 6 | mkdir /mnt/sdcard 0000 system system |
| Mike Lockwood | 9de469d | 2010-06-15 21:15:42 -0700 | [diff] [blame] | 7 | # for backwards compatibility |
| Mike Lockwood | 9d036e3 | 2010-08-16 14:23:21 -0400 | [diff] [blame] | 8 | symlink /mnt/sdcard /sdcard |
| Mike Lockwood | 9de469d | 2010-06-15 21:15:42 -0700 | [diff] [blame] | 9 | |
| Colin Cross | 3fdd43a | 2010-06-01 17:41:42 -0700 | [diff] [blame] | 10 | on fs |
| 11 | mount ext4 /dev/block/platform/sdhci-tegra.3/by-name/system /system wait ro |
| Ken Sumrall | a65c10b | 2010-09-29 18:18:15 -0700 | [diff] [blame] | 12 | mount ext4 /dev/block/platform/sdhci-tegra.3/by-name/userdata /data wait noatime nosuid nodev |
| 13 | mount ext4 /dev/block/platform/sdhci-tegra.3/by-name/cache /cache wait noatime nosuid nodev |
| Colin Cross | 3fdd43a | 2010-06-01 17:41:42 -0700 | [diff] [blame] | 14 | |
| 15 | on boot |
| 16 | mkdir /data/misc/wifi 0770 wifi wifi |
| 17 | mkdir /data/misc/wifi/sockets 0770 wifi wifi |
| 18 | mkdir /data/misc/dhcp 0770 dhcp dhcp |
| 19 | chown dhcp dhcp /data/misc/dhcp |
| 20 | |
| Mike Lockwood | 9d036e3 | 2010-08-16 14:23:21 -0400 | [diff] [blame] | 21 | # we will remap this as /mnt/sdcard with the sdcard fuse tool |
| Mike Lockwood | 3d65c7f | 2010-07-02 14:56:28 -0400 | [diff] [blame] | 22 | mkdir /data/media 0775 system sdcard_rw |
| Mike Lockwood | 9d036e3 | 2010-08-16 14:23:21 -0400 | [diff] [blame] | 23 | setprop ro.media.storage /data/media |
| Mike Lockwood | 9de469d | 2010-06-15 21:15:42 -0700 | [diff] [blame] | 24 | |
| Jaikumar Ganesh | 0542853 | 2010-06-14 19:56:56 -0700 | [diff] [blame] | 25 | # bluetooth |
| 26 | # power up/down interface |
| 27 | chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type |
| 28 | chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state |
| 29 | chmod 0660 /sys/class/rfkill/rfkill0/state |
| 30 | |
| 31 | # UART device |
| 32 | chown bluetooth bluetooth /dev/ttyHS2 |
| 33 | chmod 0660 /dev/ttyHS2 |
| 34 | |
| 35 | # bluetooth MAC address programming |
| 36 | chown bluetooth bluetooth /sys/module/board_stingray/parameters/bdaddr |
| 37 | setprop ro.bt.bdaddr_path /sys/module/board_stingray/parameters/bdaddr |
| 38 | |
| Dan Murphy | 45bfa93 | 2010-05-27 07:55:53 -0500 | [diff] [blame] | 39 | # Sensor |
| 40 | chown compass compass /dev/kxtf9 |
| 41 | chmod 660 /dev/kxtf9 |
| 42 | chown compass compass /dev/max9635 |
| 43 | chmod 660 /dev/max9635 |
| 44 | chown compass compass /dev/bmp085 |
| 45 | chmod 660 /dev/bmp085 |
| makarand.karvekar | 7e41fb5 | 2010-08-09 15:26:43 -0500 | [diff] [blame] | 46 | chown compass compass /dev/l3g4200d |
| 47 | chmod 660 /dev/l3g4200d |
| Praveen Bharathi | a249a28 | 2010-06-22 15:28:55 -0500 | [diff] [blame] | 48 | chown compass compass /dev/akm8975_dev |
| 49 | chmod 660 /dev/akm8975_dev |
| 50 | chown compass compass /dev/akm8975_aot |
| 51 | chmod 660 /dev/akm8975_aot |
| Dan Murphy | 45bfa93 | 2010-05-27 07:55:53 -0500 | [diff] [blame] | 52 | |
| makarand.karvekar | 70b5da7 | 2010-09-17 11:13:36 -0500 | [diff] [blame] | 53 | # light |
| 54 | chown system system /sys/class/leds/notification-led/brightness |
| 55 | chmod 660 /sys/class/leds/notification-led/brightness |
| 56 | chown system system /sys/class/leds/notification-led/trigger |
| 57 | chmod 660 /sys/class/leds/notification-led/trigger |
| 58 | chown system system /sys/class/leds/notification-led/delay_on |
| 59 | chmod 660 /sys/class/leds/notification-led/delay_on |
| 60 | |
| Erik Gilling | 466c74b | 2010-07-08 13:11:10 -0700 | [diff] [blame] | 61 | chmod 666 /dev/nvhost-ctrl |
| 62 | chmod 666 /dev/nvhost-display |
| 63 | chmod 666 /dev/nvhost-dsi |
| 64 | chmod 666 /dev/nvhost-gr2d |
| 65 | chmod 666 /dev/nvhost-gr3d |
| 66 | chmod 666 /dev/nvhost-isp |
| 67 | chmod 666 /dev/nvhost-mpe |
| 68 | chmod 666 /dev/nvhost-vi |
| 69 | |
| David Schalig | 4ca74a3 | 2010-09-16 09:45:26 +0900 | [diff] [blame] | 70 | # Camera flash |
| 71 | chown media camera /sys/class/leds/flash/brightness |
| 72 | chown media camera /sys/class/leds/torch/brightness |
| 73 | chmod 660 /sys/class/leds/flash/brightness |
| 74 | chmod 660 /sys/class/leds/torch/brightness |
| 75 | |
| prabhu.annabathula | cb4e54d | 2010-07-08 01:34:25 -0500 | [diff] [blame] | 76 | # GPS |
| 77 | #Create location directory, BRCM guci library stores LTO file and read/write |
| 78 | # config file. |
| 79 | mkdir /data/location 0770 radio radio |
| 80 | |
| 81 | # UART Device |
| 82 | chown radio radio /dev/ttyHS4 |
| 83 | chmod 640 /dev/ttyHS4 |
| 84 | |
| 85 | # broadcom 4750 device |
| 86 | chown radio radio /dev/gps_brcm4750 |
| 87 | chmod 660 /dev/gps_brcm4750 |
| 88 | |
| Ramesh Sudini | 15a2679 | 2010-07-16 11:05:45 -0500 | [diff] [blame] | 89 | # Whisper UART Device |
| 90 | chown radio radio /dev/ttyHS0 |
| 91 | chmod 640 /dev/ttyHS0 |
| 92 | |
| Kazuhiro Ondo | 8f9826a | 2010-10-13 00:10:13 -0500 | [diff] [blame^] | 93 | # Modem Control |
| 94 | chown radio radio /sys/class/radio/mdm6600/command |
| 95 | chmod 220 /sys/class/radio/mdm6600/command |
| 96 | chown radio radio /sys/bus/usb/devices/usb2/power/control |
| 97 | chmod 660 /sys/bus/usb/devices/usb2/power/control |
| 98 | |
| Colin Cross | b1ad708 | 2010-07-15 20:01:19 -0700 | [diff] [blame] | 99 | # Power Management Settings |
| 100 | #write /sys/devices/platform/ohci.0/usb2/2-3/power/level auto |
| 101 | write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 312000 |
| 102 | write /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 1000000 |
| 103 | write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ondemand |
| 104 | write /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold 93 |
| 105 | write /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate 30000 |
| 106 | write /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq 312000 |
| 107 | write /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq 1000000 |
| 108 | write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor ondemand |
| 109 | write /sys/devices/system/cpu/cpu1/cpufreq/ondemand/up_threshold 93 |
| 110 | write /sys/devices/system/cpu/cpu1/cpufreq/ondemand/sampling_rate 30000 |
| 111 | # Wakelock debug |
| 112 | write /sys/module/wakelock/parameters/debug_mask 7 |
| 113 | |
| Colin Cross | 71ec3fd | 2010-10-06 19:54:41 -0700 | [diff] [blame] | 114 | # HACK prevent LP0 |
| 115 | write /d/suspend_mode lp1 |
| 116 | |
| Erik Gilling | 1fc5796 | 2010-06-07 18:01:22 -0700 | [diff] [blame] | 117 | service nvrm_daemon /system/bin/nvrm_daemon |
| 118 | user root |
| 119 | onrestart restart servicemanager |
| 120 | |
| Praveen Bharathi | a249a28 | 2010-06-22 15:28:55 -0500 | [diff] [blame] | 121 | # Ecompass daemon |
| 122 | service akmd2 /system/bin/akmd2 |
| 123 | user compass |
| 124 | group compass misc input |
| 125 | |
| Colin Cross | 3fdd43a | 2010-06-01 17:41:42 -0700 | [diff] [blame] | 126 | service wpa_supplicant /system/bin/wpa_supplicant \ |
| 127 | -Dwext -ieth0 -c/data/misc/wifi/wpa_supplicant.conf |
| 128 | # we will start as root and wpa_supplicant will switch to user wifi |
| 129 | # after setting up the capabilities required for WEXT |
| 130 | # user wifi |
| 131 | # group wifi inet keystore |
| 132 | socket wpa_eth0 dgram 660 wifi wifi |
| 133 | disabled |
| 134 | oneshot |
| 135 | |
| 136 | service dhcpcd /system/bin/dhcpcd -ABKL |
| 137 | disabled |
| 138 | oneshot |
| Paul Eastham | f770f43 | 2010-06-17 13:08:37 -0700 | [diff] [blame] | 139 | |
| Paul Eastham | 05d4614 | 2010-08-06 15:01:12 -0700 | [diff] [blame] | 140 | # bugreport is triggered by the VOLUME-DOWN and VOLUME-UP keys. |
| Kazuhiro Ondo | 231d759 | 2010-10-08 21:11:04 -0500 | [diff] [blame] | 141 | # bugtogo.sh tool will invoke bugreport and propt email composer |
| 142 | # if not in user build. |
| 143 | service bugreport /system/bin/bugtogo.sh |
| Paul Eastham | f770f43 | 2010-06-17 13:08:37 -0700 | [diff] [blame] | 144 | disabled |
| 145 | oneshot |
| 146 | keycodes 115 114 |
| Jaikumar Ganesh | 0542853 | 2010-06-14 19:56:56 -0700 | [diff] [blame] | 147 | |
| 148 | service hciattach /system/bin/brcm_patchram_plus --enable_hci \ |
| Jaikumar Ganesh | 4572f1e | 2010-08-23 16:32:42 -0700 | [diff] [blame] | 149 | --baudrate 3000000 --patchram /etc/firmware/bcm4329.hcd /dev/ttyHS2 |
| Jaikumar Ganesh | 0542853 | 2010-06-14 19:56:56 -0700 | [diff] [blame] | 150 | user bluetooth |
| 151 | group bluetooth net_bt_admin |
| 152 | disabled |
| prabhu.annabathula | cb4e54d | 2010-07-08 01:34:25 -0500 | [diff] [blame] | 153 | |
| 154 | service location /system/bin/location |
| 155 | socket gpshal_socket stream 660 radio system |
| prabhu annabathula | 85bda42 | 2010-08-02 00:06:29 -0500 | [diff] [blame] | 156 | socket location_shim stream 660 system system |
| prabhu.annabathula | cb4e54d | 2010-07-08 01:34:25 -0500 | [diff] [blame] | 157 | socket gps_tcmd stream 660 radio system |
| 158 | user radio |
| 159 | group radio system mot_accy |
| 160 | oneshot |
| 161 | |
| 162 | service locDrv /system/bin/brcm_guci_drv -config /system/etc/gpsconfig.xml |
| 163 | user radio |
| 164 | group radio inet sdcard_rw |
| Kazuhiro Ondo | c8b1b8f | 2010-08-09 18:23:50 -0500 | [diff] [blame] | 165 | |
| Kazuhiro Ondo | c8b1b8f | 2010-08-09 18:23:50 -0500 | [diff] [blame] | 166 | service tcmd /system/bin/tcmd |
| 167 | oneshot |
| Kazuhiro Ondo | 227d243 | 2010-09-14 19:23:13 -0500 | [diff] [blame] | 168 | disabled |
| Kazuhiro Ondo | c8b1b8f | 2010-08-09 18:23:50 -0500 | [diff] [blame] | 169 | |
| 170 | service ftmipcd /system/bin/ftmipcd |
| 171 | oneshot |
| Kazuhiro Ondo | 227d243 | 2010-09-14 19:23:13 -0500 | [diff] [blame] | 172 | disabled |
| Ramesh Sudini | 15a2679 | 2010-07-16 11:05:45 -0500 | [diff] [blame] | 173 | |
| 174 | # Immediately drops to user radio, after starting the real-time thread |
| 175 | service whisper /system/bin/whisperd |
| 176 | group radio system mot_accy |
| Mike Lockwood | 9d036e3 | 2010-08-16 14:23:21 -0400 | [diff] [blame] | 177 | |
| 178 | # create virtual SD card at /mnt/sdcard, based on the /data/media directory |
| 179 | # daemon will drop to user/group system/sdcard_rw after initializing |
| 180 | service sdcard /system/bin/sdcard /data/media 1000 1015 |
| prabhu annabathula | 85bda42 | 2010-08-02 00:06:29 -0500 | [diff] [blame] | 181 | |
| 182 | service motolocation /system/bin/sh /system/bin/am startservice -n com.motorola.android.locationproxy/com.motorola.android.locationproxy.LocationProxyService |
| 183 | disabled |
| 184 | oneshot |
| 185 | |
| 186 | on property:gsm.mot.locatonproxy=start |
| 187 | start motolocation |
| Kazuhiro Ondo | 78c782f | 2010-08-26 14:36:32 -0500 | [diff] [blame] | 188 | |
| 189 | # Get BP version and save to misc |
| 190 | service savebpver /system/bin/savebpver |
| 191 | oneshot |
| Kazuhiro Ondo | 227d243 | 2010-09-14 19:23:13 -0500 | [diff] [blame] | 192 | disabled |
| Kazuhiro Ondo | 78c782f | 2010-08-26 14:36:32 -0500 | [diff] [blame] | 193 | |
| 194 | on property:dev.bootcomplete=1 |
| 195 | start savebpver |
| Kazuhiro Ondo | 227d243 | 2010-09-14 19:23:13 -0500 | [diff] [blame] | 196 | |
| 197 | on property:ro.bootmode=factorycable |
| 198 | start tcmd |
| 199 | start ftmipcd |