1 import init.grouper.usb.rc 2 3 on early-init 4 mount debugfs debugfs /sys/kernel/debug 5 6 on init 7 # See storage config details at http://source.android.com/tech/storage/ 8 mkdir /mnt/shell/emulated 0700 shell shell 9 mkdir /storage/emulated 0555 root root 10 11 export EXTERNAL_STORAGE /storage/emulated/legacy 12 export EMULATED_STORAGE_SOURCE /mnt/shell/emulated 13 export EMULATED_STORAGE_TARGET /storage/emulated 14 15 # Support legacy paths 16 symlink /storage/emulated/legacy /sdcard 17 symlink /storage/emulated/legacy /mnt/sdcard 18 symlink /storage/emulated/legacy /storage/sdcard0 19 symlink /mnt/shell/emulated/0 /storage/emulated/legacy 20 21 on early-boot 22 write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive 23 write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor interactive 24 write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor interactive 25 write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor interactive 26 27 on fs 28 mkdir /factory 0775 radio radio 29 30 setprop ro.crypto.umount_sd false 31 mount_all /fstab.grouper 32 33 on post-fs-data 34 mkdir /data/misc/wifi 0770 wifi wifi 35 mkdir /data/misc/wifi/sockets 0770 wifi wifi 36 mkdir /data/misc/dhcp 0770 dhcp dhcp 37 chown dhcp dhcp /data/misc/dhcp 38 39 mkdir /data/media 0770 media_rw media_rw 40 41 # change back to bluetooth from system 42 chown bluetooth net_bt_stack /data/misc/bluetooth 43 44 mkdir /data/radio 0775 radio radio 45 mkdir /data/radio/log 0775 radio radio 46 47 # Set indication (checked by vold) that we have finished this action 48 setprop vold.post_fs_data_done 1 49 50 on boot 51 52 # bluetooth 53 # UART device 54 chmod 0660 /dev/ttyHS2 55 chown bluetooth net_bt_stack /dev/ttyHS2 56 57 # power up/down interface 58 chmod 0660 /sys/class/rfkill/rfkill0/state 59 chmod 0660 /sys/class/rfkill/rfkill0/type 60 chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/state 61 chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/type 62 63 # bluetooth MAC address programming 64 chown bluetooth net_bt_stack ro.bt.bdaddr_path 65 chown bluetooth net_bt_stack /system/etc/bluetooth 66 chown bluetooth net_bt_stack /data/misc/bluetooth 67 setprop ro.bt.bdaddr_path "/data/misc/bluetooth/bdaddr" 68 69 # bluetooth LPM 70 chmod 0220 /proc/bluetooth/sleep/lpm 71 chmod 0220 /proc/bluetooth/sleep/btwrite 72 chown bluetooth net_bt_stack /proc/bluetooth/sleep/lpm 73 chown bluetooth net_bt_stack /proc/bluetooth/sleep/btwrite 74 75 # NFC 76 setprop ro.nfc.port "I2C" 77 chmod 0660 /dev/pn544 78 chown nfc nfc /dev/pn544 79 80 # Proximity for RIL BODYSAR 81 chmod 0660 /sys/devices/platform/tegra-i2c.2/i2c-2/2-0028/sensor_onoff 82 chown root radio /sys/devices/platform/tegra-i2c.2/i2c-2/2-0028/sensor_onoff 83 84 # backlight 85 chown system system /sys/class/backlight/pwm-backlight/brightness 86 87 # didim 88 chown system system /sys/class/graphics/fb0/device/smartdimmer/enable 89 chown system system /sys/class/graphics/fb0/device/smartdimmer/aggressiveness 90 91 # power 92 chown system system /sys/kernel/tegra_cap/core_cap_level 93 chown system system /sys/kernel/tegra_cap/core_cap_state 94 chown system system /sys/module/cpu_tegra/parameters/cpu_user_cap 95 96 # Sensor 97 # iio 98 chown system system /dev/iio:device0 99 chown system system /sys/bus/iio/devices/trigger0/name 100 chown system system /sys/bus/iio/devices/iio:device0/accl_enable 101 chown system system /sys/bus/iio/devices/iio:device0/accl_matrix 102 chown system system /sys/bus/iio/devices/iio:device0/buffer/length 103 chown system system /sys/bus/iio/devices/iio:device0/buffer/enable 104 chown system system /sys/bus/iio/devices/iio:device0/compass_enable 105 chown system system /sys/bus/iio/devices/iio:device0/compass_matrix 106 chown system system /sys/bus/iio/devices/iio:device0/dmp_on 107 chown system system /sys/bus/iio/devices/iio:device0/dmp_int_on 108 chown system system /sys/bus/iio/devices/iio:device0/gyro_enable 109 chown system system /sys/bus/iio/devices/iio:device0/gyro_matrix 110 chown system system /sys/bus/iio/devices/iio:device0/in_accel_scale 111 chown system system /sys/bus/iio/devices/iio:device0/in_anglvel_scale 112 chown system system /sys/bus/iio/devices/iio:device0/in_magn_scale 113 chown system system /sys/bus/iio/devices/iio:device0/key 114 chown system system /sys/bus/iio/devices/iio:device0/power_state 115 chown system system /sys/bus/iio/devices/iio:device0/sampling_frequency 116 chown system system /sys/bus/iio/devices/iio:device0/scan_elements/in_accel_x_en 117 chown system system /sys/bus/iio/devices/iio:device0/scan_elements/in_accel_y_en 118 chown system system /sys/bus/iio/devices/iio:device0/scan_elements/in_accel_z_en 119 chown system system /sys/bus/iio/devices/iio:device0/scan_elements/in_anglvel_x_en 120 chown system system /sys/bus/iio/devices/iio:device0/scan_elements/in_anglvel_y_en 121 chown system system /sys/bus/iio/devices/iio:device0/scan_elements/in_anglvel_z_en 122 chown system system /sys/bus/iio/devices/iio:device0/scan_elements/in_magn_x_en 123 chown system system /sys/bus/iio/devices/iio:device0/scan_elements/in_magn_y_en 124 chown system system /sys/bus/iio/devices/iio:device0/scan_elements/in_magn_z_en 125 chown system system /sys/bus/iio/devices/iio:device0/scan_elements/in_timestamp_en 126 chown system system /sys/bus/iio/devices/iio:device0/temperature 127 chown system system /sys/bus/iio/devices/iio:device0/trigger/current_trigger 128 129 # new in MA 5.1.5 130 chown system system /sys/bus/iio/devices/iio:device0/secondary_name 131 chown system system /sys/bus/iio/devices/iio:device0/dmp_firmware 132 chown system system /sys/bus/iio/devices/iio:device0/firmware_loaded 133 chown system system /sys/bus/iio/devices/iio:device0/dmp_event_int_on 134 chown system system /sys/bus/iio/devices/iio:device0/dmp_output_rate 135 chown system system /sys/bus/iio/devices/iio:device0/in_accel_x_offset 136 chown system system /sys/bus/iio/devices/iio:device0/in_accel_y_offset 137 chown system system /sys/bus/iio/devices/iio:device0/in_accel_z_offset 138 chown system system /sys/bus/iio/devices/iio:device0/gyro_fsr 139 ## LPQ 140 chown system system /sys/bus/iio/devices/iio:device0/quaternion_on 141 chown system system /sys/bus/iio/devices/iio:device0/scan_elements/in_quaternion_z_en 142 chown system system /sys/bus/iio/devices/iio:device0/scan_elements/in_quaternion_y_en 143 chown system system /sys/bus/iio/devices/iio:device0/scan_elements/in_quaternion_x_en 144 chown system system /sys/bus/iio/devices/iio:device0/scan_elements/in_quaternion_r_en 145 ## Screen orientation 146 chown system system /sys/bus/iio/devices/iio:device0/event_display_orientation 147 chown system system /sys/bus/iio/devices/iio:device0/display_orientation_on 148 ## SMD 149 chown system system /sys/bus/iio/devices/iio:device0/event_smd 150 chown system system /sys/bus/iio/devices/iio:device0/smd_enable 151 chown system system /sys/bus/iio/devices/iio:device0/smd_threshold 152 chown system system /sys/bus/iio/devices/iio:device0/smd_delay_threshold 153 chown system system /sys/bus/iio/devices/iio:device0/smd_delay_threshold2 154 155 ## AMI compass sensor 156 chown system system /dev/iio:device1 157 chown system system /sys/bus/iio/devices/trigger1/name 158 chown system system /sys/bus/iio/devices/iio:device1/buffer/length 159 chown system system /sys/bus/iio/devices/iio:device1/buffer/enable 160 chown system system /sys/bus/iio/devices/iio:device1/compass_enable 161 chown system system /sys/bus/iio/devices/iio:device1/compass_matrix 162 chown system system /sys/bus/iio/devices/iio:device1/in_magn_scale 163 chown system system /sys/bus/iio/devices/iio:device1/power_state 164 chown system system /sys/bus/iio/devices/iio:device1/sampling_frequency 165 chown system system /sys/bus/iio/devices/iio:device1/scan_elements/in_magn_x_en 166 chown system system /sys/bus/iio/devices/iio:device1/scan_elements/in_magn_y_en 167 chown system system /sys/bus/iio/devices/iio:device1/scan_elements/in_magn_z_en 168 chown system system /sys/bus/iio/devices/iio:device1/scan_elements/in_timestamp_en 169 chown system system /sys/bus/iio/devices/iio:device1/trigger/current_trigger 170 171 chmod 600 /dev/iio:device0 172 chmod 600 /sys/bus/iio/devices/trigger0/name 173 chmod 600 /sys/bus/iio/devices/iio:device0/accl_enable 174 chmod 600 /sys/bus/iio/devices/iio:device0/accl_matrix 175 chmod 600 /sys/bus/iio/devices/iio:device0/buffer/length 176 chmod 600 /sys/bus/iio/devices/iio:device0/buffer/enable 177 chmod 600 /sys/bus/iio/devices/iio:device0/compass_enable 178 chmod 600 /sys/bus/iio/devices/iio:device0/compass_matrix 179 chmod 600 /sys/bus/iio/devices/iio:device0/dmp_on 180 chmod 600 /sys/bus/iio/devices/iio:device0/dmp_int_on 181 chmod 600 /sys/bus/iio/devices/iio:device0/gyro_enable 182 chmod 600 /sys/bus/iio/devices/iio:device0/gyro_matrix 183 chmod 600 /sys/bus/iio/devices/iio:device0/in_accel_scale 184 chmod 600 /sys/bus/iio/devices/iio:device0/in_anglvel_scale 185 chmod 600 /sys/bus/iio/devices/iio:device0/in_magn_scale 186 chmod 600 /sys/bus/iio/devices/iio:device0/key 187 chmod 600 /sys/bus/iio/devices/iio:device0/power_state 188 chmod 600 /sys/bus/iio/devices/iio:device0/sampling_frequency 189 chmod 600 /sys/bus/iio/devices/iio:device0/scan_elements/in_accel_x_en 190 chmod 600 /sys/bus/iio/devices/iio:device0/scan_elements/in_accel_y_en 191 chmod 600 /sys/bus/iio/devices/iio:device0/scan_elements/in_accel_z_en 192 chmod 600 /sys/bus/iio/devices/iio:device0/scan_elements/in_anglvel_x_en 193 chmod 600 /sys/bus/iio/devices/iio:device0/scan_elements/in_anglvel_y_en 194 chmod 600 /sys/bus/iio/devices/iio:device0/scan_elements/in_anglvel_z_en 195 chmod 600 /sys/bus/iio/devices/iio:device0/scan_elements/in_magn_x_en 196 chmod 600 /sys/bus/iio/devices/iio:device0/scan_elements/in_magn_y_en 197 chmod 600 /sys/bus/iio/devices/iio:device0/scan_elements/in_magn_z_en 198 chmod 600 /sys/bus/iio/devices/iio:device0/scan_elements/in_timestamp_en 199 chmod 600 /sys/bus/iio/devices/iio:device0/temperature 200 chmod 600 /sys/bus/iio/devices/iio:device0/trigger/current_trigger 201 202 # new in MA 5.1.5 203 chmod 600 /sys/bus/iio/devices/iio:device0/secondary_name 204 chmod 600 /sys/bus/iio/devices/iio:device0/dmp_firmware 205 chmod 600 /sys/bus/iio/devices/iio:device0/firmware_loaded 206 chmod 600 /sys/bus/iio/devices/iio:device0/dmp_event_int_on 207 chmod 600 /sys/bus/iio/devices/iio:device0/dmp_output_rate 208 chmod 600 /sys/bus/iio/devices/iio:device0/in_accel_x_offset 209 chmod 600 /sys/bus/iio/devices/iio:device0/in_accel_y_offset 210 chmod 600 /sys/bus/iio/devices/iio:device0/in_accel_z_offset 211 chmod 600 /sys/bus/iio/devices/iio:device0/gyro_fsr 212 ## LPQ 213 chmod 600 /sys/bus/iio/devices/iio:device0/quaternion_on 214 chmod 600 /sys/bus/iio/devices/iio:device0/scan_elements/in_quaternion_z_en 215 chmod 600 /sys/bus/iio/devices/iio:device0/scan_elements/in_quaternion_y_en 216 chmod 600 /sys/bus/iio/devices/iio:device0/scan_elements/in_quaternion_x_en 217 chmod 600 /sys/bus/iio/devices/iio:device0/scan_elements/in_quaternion_r_en 218 ## Screen orientation 219 chmod 600 /sys/bus/iio/devices/iio:device0/event_display_orientation 220 chmod 600 /sys/bus/iio/devices/iio:device0/display_orientation_on 221 ## SMD 222 chmod 600 /sys/bus/iio/devices/iio:device0/event_smd 223 chmod 600 /sys/bus/iio/devices/iio:device0/smd_enable 224 chmod 600 /sys/bus/iio/devices/iio:device0/smd_threshold 225 chmod 600 /sys/bus/iio/devices/iio:device0/smd_delay_threshold 226 chmod 600 /sys/bus/iio/devices/iio:device0/smd_delay_threshold2 227 228 ## AMI compass sensor 229 chmod 600 /dev/iio:device1 230 chmod 600 /sys/bus/iio/devices/trigger1/name 231 chmod 600 /sys/bus/iio/devices/iio:device1/buffer/length 232 chmod 600 /sys/bus/iio/devices/iio:device1/buffer/enable 233 chmod 600 /sys/bus/iio/devices/iio:device1/compass_enable 234 chmod 600 /sys/bus/iio/devices/iio:device1/compass_matrix 235 chmod 600 /sys/bus/iio/devices/iio:device1/in_magn_scale 236 chmod 600 /sys/bus/iio/devices/iio:device1/power_state 237 chmod 600 /sys/bus/iio/devices/iio:device1/sampling_frequency 238 chmod 600 /sys/bus/iio/devices/iio:device1/scan_elements/in_magn_x_en 239 chmod 600 /sys/bus/iio/devices/iio:device1/scan_elements/in_magn_y_en 240 chmod 600 /sys/bus/iio/devices/iio:device1/scan_elements/in_magn_z_en 241 chmod 600 /sys/bus/iio/devices/iio:device1/scan_elements/in_timestamp_en 242 chmod 600 /sys/bus/iio/devices/iio:device1/trigger/current_trigger 243 244 # Power management settings 245 write /sys/module/cpu_tegra3/parameters/no_lp 0 246 #write /sys/module/tegra3_emc/parameters/emc_enable 0 247 #write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 1000000 248 write /sys/devices/system/cpu/cpufreq/interactive/boost_factor 2 249 write /sys/devices/system/cpu/cpufreq/interactive/input_boost 1 250 write /sys/devices/system/cpu/cpufreq/interactive/sustain_load 80 251 write /sys/module/cpu_tegra3/parameters/auto_hotplug 1 252 #write /sys/module/cpuidle_t3/parameters/lp2_0_in_idle 0 253 write /sys/module/cpuidle/parameters/lp2_in_idle 0 254 255 # Interactive governor settings 256 chown system system /sys/devices/system/cpu/cpufreq/interactive/boost_factor 257 chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/boost_factor 258 chown system system /sys/devices/system/cpu/cpufreq/interactive/go_maxspeed_load 259 chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/go_maxspeed_load 260 chown system system /sys/devices/system/cpu/cpufreq/interactive/io_is_busy 261 chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/io_is_busy 262 chown system system /sys/devices/system/cpu/cpufreq/interactive/max_boost 263 chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/max_boost 264 chown system system /sys/devices/system/cpu/cpufreq/interactive/sustain_load 265 chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/sustain_load 266 267 # Default Read Ahead value for sdcards 268 write /sys/block/mmcblk0/queue/read_ahead_kb 2048 269 write /sys/block/mmcblk1/queue/read_ahead_kb 2048 270 271 # GPS init 272 write /sys/class/gpio/export 162 273 write /sys/class/gpio/gpio162/value 0 274 write /sys/class/gpio/gpio162/direction out 275 chown gps system /sys/class/gpio/gpio162/value 276 chmod 0664 /sys/class/gpio/gpio162/value 277 mkdir /data/gps 278 chown gps system /data/gps 279 chmod 770 /data/gps 280 chown gps system /dev/ttyHS1 281 chmod 0660 /dev/ttyHS1 282 283 # ril 284 chown radio system /sys/devices/virtual/ril/files/crash_dump_onoff 285 chown radio system /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor 286 chmod 0660 /sys/devices/virtual/ril/files/crash_dump_onoff 287 chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor 288 chown radio system /sys/devices/platform/baseband_xmm_power/xmm_nml_reset 289 chown radio system /sys/devices/platform/baseband_xmm_power/xmm_force_crash 290 chown radio system /sys/class/ril/files/stop_hotplug_detect 291 292 293 # Load WiFi driver 294 295 # BB mapping symbolic name to the logging ttyACM port 296 symlink /dev/ttyACM2 /dev/log_modem 297 298 # Touch 299 chown system system /dev/elan-iap 300 chown system system /proc/ektf_dbg 301 start touch_fw_update 302 303 # the following settings are used to disable ipv6 on cellular networks that cannot 304 # support it. 305 306 on property:ril.ipv6.rmnet0.enable=1 307 write /proc/sys/net/ipv6/conf/rmnet0/disable_ipv6 0 308 309 on property:ril.ipv6.rmnet0.enable=0 310 write /proc/sys/net/ipv6/conf/rmnet0/disable_ipv6 1 311 312 on property:ril.ipv6.rmnet1.enable=1 313 write /proc/sys/net/ipv6/conf/rmnet1/disable_ipv6 0 314 315 on property:ril.ipv6.rmnet1.enable=0 316 write /proc/sys/net/ipv6/conf/rmnet1/disable_ipv6 1 317 318 service wpa_supplicant /system/bin/wpa_supplicant \ 319 -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ 320 -I/system/etc/wifi/wpa_supplicant_overlay.conf \ 321 -e/data/misc/wifi/entropy.bin 322 # we will start as root and wpa_supplicant will switch to user wifi 323 # after setting up the capabilities required for WEXT 324 # user wifi 325 # group wifi inet keystore 326 class main 327 socket wpa_wlan0 dgram 660 wifi wifi 328 disabled 329 oneshot 330 331 service p2p_supplicant /system/bin/wpa_supplicant \ 332 -iwlan0 -Dnl80211 -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf \ 333 -I/system/etc/wifi/wpa_supplicant_overlay.conf -N \ 334 -ip2p0 -Dnl80211 -c /data/misc/wifi/p2p_supplicant.conf \ 335 -I/system/etc/wifi/wpa_supplicant_overlay.conf \ 336 -e/data/misc/wifi/entropy.bin -puse_p2p_group_interface=1 337 # we will start as root and wpa_supplicant will switch to user wifi 338 # after setting up the capabilities required for WEXT 339 # user wifi 340 # group wifi inet keystore 341 class main 342 socket wpa_wlan0 dgram 660 wifi wifi 343 disabled 344 oneshot 345 346 service dhcpcd_wlan0 /system/bin/dhcpcd -aABDKL 347 class main 348 disabled 349 oneshot 350 351 service dhcpcd_p2p /system/bin/dhcpcd -aABKL 352 class main 353 disabled 354 oneshot 355 356 service dhcpcd_eth0 /system/bin/dhcpcd -ABDKL -f/system/etc/dhcpcd/dhcpcd.conf 357 class main 358 disabled 359 oneshot 360 361 service dhcpcd_bt-pan /system/bin/dhcpcd -ABKL 362 class main 363 disabled 364 oneshot 365 366 service iprenew_wlan0 /system/bin/dhcpcd -n 367 class main 368 disabled 369 oneshot 370 371 service iprenew_p2p /system/bin/dhcpcd -n 372 class main 373 disabled 374 oneshot 375 376 service iprenew_eth0 /system/bin/dhcpcd -n 377 class main 378 disabled 379 oneshot 380 381 service iprenew_bt-pan /system/bin/dhcpcd -n 382 class main 383 disabled 384 oneshot 385 386 #Sensor: load calibration files. 387 service sensors-config /system/bin/sensors-config 388 class main 389 user root 390 oneshot 391 #Sensor load calibration files end 392 393 # virtual sdcard daemon running as media_rw (1023) 394 service sdcard /system/bin/sdcard /data/media /mnt/shell/emulated 1023 1023 395 class late_start 396 397 # bugreport is triggered by the VOLUME-DOWN and VOLUME-UP keys 398 service bugreport /system/bin/dumpstate -d -p -B \ 399 -o /data/data/com.android.shell/files/bugreports/bugreport \ 400 -b /system/media/audio/ui/Dock.ogg -e /system/media/audio/ui/Undock.ogg 401 class main 402 disabled 403 oneshot 404 keycodes 115 114 405 406 # Start GPS daemon 407 service gps-daemon /system/bin/glgps -c /system/etc/gps/gpsconfig.xml 408 user gps 409 group system 410 class late_start 411 412 # Recovery daemon: configure MSC partition 413 service recoveryd /system/bin/recoveryd /dev/block/platform/sdhci-tegra.3/by-name/MSC 414 disabled 415 class main 416 user root 417 group root 418 oneshot 419 420 on property:sys.shutdown.requested=1recovery 421 start recoveryd 422 423 # start tf_daemon service 424 service tf_daemon /system/bin/tf_daemon -storageDir /data/tf -d 425 class main 426 user root 427 group shell 428 429 # may restart due to /data/tf not existing yet 430 on property:init.svc.tf_daemon=restarting 431 mkdir /data/tf 432 433 #Raydium touch setting 434 service rm_ts_service /system/bin/rm_ts_server 435 class main 436 437 # create filesystems if necessary 438 service setup_fs /system/bin/setup_fs \ 439 /dev/block/platform/sdhci-tegra.3/by-name/UDA \ 440 /dev/block/platform/sdhci-tegra.3/by-name/CAC 441 class core 442 user root 443 group root 444 oneshot 445 446 service touch_fw_update /system/bin/sh -c "echo /system/etc/firmware/touch_fw.ekt > /sys/bus/i2c/drivers/elan-ktf3k/1-0010/update_fw" 447 class main 448 disabled 449 user root 450 group root 451 oneshot 452 453