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