bigrushdog

latest stingray.rc

May 24th, 2011
402
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 10.43 KB | None | 0 0
  1. on early-init
  2.     mount debugfs debugfs /sys/kernel/debug
  3.  
  4.     export EXTERNAL_STORAGE /mnt/sdcard
  5.     mkdir /mnt/sdcard 0000 system system
  6.     mkdir /mnt/usbOTG 0000 system system
  7.  
  8.     # for backwards compatibility
  9.     symlink /mnt/sdcard /sdcard
  10.     symlink /mnt/usbOTG /usbOTG
  11.     mkdir /pds 0777 system system
  12.  
  13. on fs
  14.     mount ext4 /dev/block/platform/sdhci-tegra.3/by-name/system /system wait ro noatime nodiratime
  15.     setprop ro.crypto.tmpfs_options size=128m,mode=0771,uid=1000,gid=1000
  16.     mount ext4 /dev/block/platform/sdhci-tegra.3/by-name/userdata /data wait nosuid nodev noatime nodiratime noauto_da_alloc
  17.     mount ext4 /dev/block/platform/sdhci-tegra.3/by-name/cache /cache wait nosuid nodev noatime nodiratime noauto_da_alloc
  18.     mount ext2 /dev/block/platform/sdhci-tegra.3/by-name/pdsb /pds wait ro noatime nodiratime
  19.     mkdir /data/media/external 0000 system system
  20.     mount vfat /dev/block/platform/sdhci-tegra.2/mmcblk0p1 /data/media/external wait rw
  21.  
  22. on post-fs-data
  23.     mkdir /data/misc/wifi 0770 wifi wifi
  24.     mkdir /data/misc/wifi/sockets 0770 wifi wifi
  25.     mkdir /data/misc/dhcp 0770 dhcp dhcp
  26.     chown dhcp dhcp /data/misc/dhcp
  27.  
  28.     mkdir /data/tpapi 0771 system system
  29.     mkdir /data/tpapi/etc 0771 system system
  30.     mkdir /data/tpapi/etc/tpa 0771 system system
  31.     mkdir /data/tpapi/etc/tpa/persistent 0771 system system
  32.     chown system system /data/tpapi/etc/tpa/mmap_vars.dat
  33.     chmod 0660 /data/tpapi/etc/tpa/mmap_vars.dat
  34.     chown system system /data/tpapi/etc/tpa/keymgr.lock
  35.     chmod 0660 /data/tpapi/etc/tpa/keymgr.lock
  36.     chown system system /data/tpapi/etc/tpa/persistent/keymaptable.lock
  37.     chmod 0660 /data/tpapi/etc/tpa/persistent/keymaptable.lock
  38.     chown system system /data/tpapi/etc/tpa/persistent/keyring.lock
  39.     chmod 0660 /data/tpapi/etc/tpa/persistent/keyring.lock
  40.     chown system system /data/tpapi/etc/tpa/persistent/iprm.lock
  41.     chmod 0660 /data/tpapi/etc/tpa/persistent/iprm.lock
  42.  
  43.     # cleanup obsolete symlink hack that may be lying around
  44.     rm /data/misc/ril
  45.  
  46.     # we will remap this as /mnt/sdcard with the sdcard fuse tool
  47.     mkdir /data/media 0775 media_rw media_rw
  48.     chown media_rw media_rw /data/media
  49.  
  50.     # GPS
  51.     #Create location directory, BRCM guci library stores LTO file and read/write
  52.     # config file.
  53.     mkdir /data/location 0770 radio radio
  54.  
  55.     # Set indication (checked by vold) that we have finished this action
  56.     setprop vold.post_fs_data_done 1
  57.  
  58. on boot
  59. # bluetooth
  60.     # power up/down interface
  61.     chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
  62.     chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
  63.     chmod 0660                /sys/class/rfkill/rfkill0/state
  64.  
  65.     # UART device
  66.     chown bluetooth bluetooth /dev/ttyHS2
  67.     chmod 0660                /dev/ttyHS2
  68.  
  69.     # bluetooth MAC address programming
  70.     chown bluetooth bluetooth /sys/module/board_stingray/parameters/bdaddr
  71.     setprop ro.bt.bdaddr_path /sys/module/board_stingray/parameters/bdaddr
  72.  
  73. # Sensor
  74.     chown compass compass /dev/kxtf9
  75.     chmod 660 /dev/kxtf9
  76.     chown compass compass /dev/max9635
  77.     chmod 660 /dev/max9635
  78.     chown compass compass /dev/bmp085
  79.     chmod 660 /dev/bmp085
  80.     chown compass compass /dev/l3g4200d
  81.     chmod 660 /dev/l3g4200d
  82.     chown compass compass /dev/akm8975_dev
  83.     chmod 660 /dev/akm8975_dev
  84.     chown compass compass /dev/akm8975_aot
  85.     chmod 660 /dev/akm8975_aot
  86.  
  87. # light
  88.     chown system system /sys/class/leds/notification-led/brightness
  89.     chmod 660 /sys/class/leds/notification-led/brightness
  90.     chown system system /sys/class/leds/notification-led/blink
  91.     chmod 660 /sys/class/leds/notification-led/blink
  92.  
  93.     chmod 666 /dev/nvhost-ctrl
  94.     chmod 666 /dev/nvhost-display
  95.     chmod 666 /dev/nvhost-dsi
  96.     chmod 666 /dev/nvhost-gr2d
  97.     chmod 666 /dev/nvhost-gr3d
  98.     chmod 666 /dev/nvhost-isp
  99.     chmod 666 /dev/nvhost-mpe
  100.     chmod 666 /dev/nvhost-vi
  101.  
  102. # Camera
  103.     chown media camera /sys/class/leds/privacy-led/brightness
  104.     chown media camera /sys/class/leds/flash/brightness
  105.     chown media camera /sys/class/leds/torch/brightness
  106.     chmod 660 /sys/class/leds/privacy-led/brightness
  107.     chmod 660 /sys/class/leds/flash/brightness
  108.     chmod 660 /sys/class/leds/torch/brightness
  109.  
  110. # UART Device
  111.     chown radio radio /dev/ttyHS4
  112.     chmod 640 /dev/ttyHS4
  113.  
  114. # broadcom 4750 device
  115.     chown radio radio /dev/gps_brcm4750
  116.     chmod 660 /dev/gps_brcm4750
  117.  
  118. # Whisper UART Device
  119.     chown radio radio /dev/ttyHS0
  120.     chmod 640 /dev/ttyHS0
  121.  
  122. # Whisper audio settings
  123.     chown media media /sys/class/switch/dock/dock_prop
  124.     chmod 660 /sys/class/switch/dock/dock_prop
  125.  
  126. # Modem Control CDMA
  127.     chown radio radio /sys/class/radio/mdm6600/command
  128.     chmod 220 /sys/class/radio/mdm6600/command
  129.     chown radio radio /sys/bus/usb/devices/usb2/power/control
  130.     chmod 660 /sys/bus/usb/devices/usb2/power/control
  131.  
  132. # Modem Control LTE
  133. # DELETE the following write once LTE card is supported
  134.     write /sys/class/radio/wrigley/command shutdown
  135.     chown radio radio /sys/class/radio/wrigley/command
  136.     chmod 220 /sys/class/radio/wrigley/command
  137.     chown radio radio /sys/bus/usb/devices/usb1/power/control
  138.     chmod 660 /sys/bus/usb/devices/usb1/power/control
  139.  
  140. # Power Management Settings
  141.     #write /sys/devices/platform/ohci.0/usb2/2-3/power/level auto
  142.     write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 216000
  143.     write /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
  144.     write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive
  145.     write /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq 216000
  146.     write /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
  147.     write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor interactive
  148.     write /sys/devices/system/cpu/cpufreq/interactive/go_maxspeed_load 80
  149.     # Wakelock debug
  150.     write /sys/module/wakelock/parameters/debug_mask 7
  151.     # No need to continuously scan w1 bus
  152.     write /sys/devices/w1\ bus\ master/w1_master_search 1
  153.     # Disable charging LED Enable with 0 value
  154.     write /sys/class/gpio/gpio168/value 0
  155.  
  156. # Ecompass daemon
  157. service akmd2 /system/bin/akmd2
  158.     class late_start
  159.     user compass
  160.     group compass misc input
  161.  
  162. service wpa_supplicant /system/bin/wpa_supplicant \
  163.     -Dwext -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf
  164. #   we will start as root and wpa_supplicant will switch to user wifi
  165. #   after setting up the capabilities required for WEXT
  166. #   user wifi
  167. #   group wifi inet keystore
  168.     class main
  169.     socket wpa_wlan0 dgram 660 wifi wifi
  170.     disabled
  171.     oneshot
  172.  
  173. service dhcpcd /system/bin/dhcpcd -ABKL
  174.     class main
  175.     disabled
  176.     oneshot
  177.  
  178. # bugreport is triggered by the VOLUME-DOWN and VOLUME-UP keys.
  179. # bugtogo.sh tool will invoke bugreport and propt email composer
  180. # if not in user build.
  181. service bugreport /system/bin/bugtogo.sh
  182.     class main
  183.     disabled
  184.     oneshot
  185.     keycodes 115 114
  186.  
  187. service hciattach /system/bin/brcm_patchram_plus --enable_hci --enable_lpm \
  188.     --baudrate 3000000 --patchram /etc/firmware/bcm4329.hcd --pcm_role slave \
  189.     --use_baudrate_for_download /dev/ttyHS2
  190.     class main
  191.     user bluetooth
  192.     group bluetooth net_bt_admin
  193.     disabled
  194.  
  195. service location /system/bin/location
  196.     class late_start
  197.     socket gpshal_socket stream 660 radio system
  198.     socket location_shim stream 660 system system
  199.     socket gps_tcmd stream 660 radio system
  200.     user radio
  201.     group radio system mot_accy
  202.     oneshot
  203.  
  204. service locDrv /system/bin/brcm_guci_drv -config /system/etc/gpsconfig.xml
  205.     class late_start
  206.     user radio
  207.     group radio inet sdcard_rw
  208.  
  209. service tcmd /system/bin/tcmd
  210.     class main
  211.     oneshot
  212.     socket local_tcmd stream 0660 root root
  213.     socket batch_socket stream 0600 root root
  214.     disabled
  215.  
  216. service ftmipcd /system/bin/ftmipcd
  217.     class main
  218.     oneshot
  219.     disabled
  220.  
  221. # Immediately drops to user radio, after starting the real-time thread
  222. service whisper /system/bin/whisperd
  223.     class late_start
  224.     group radio system mot_accy
  225.  
  226. # create virtual SD card at /mnt/sdcard, based on the /data/media directory
  227. # daemon will drop to user/group system/media_rw after initializing
  228. # underlying files in /data/media will be created with user and group media_rw (1023)
  229. service sdcard /system/bin/sdcard /data/media 1023 1023
  230.     class late_start
  231.  
  232. service motolocation /system/bin/sh /system/bin/am startservice -n com.motorola.android.locationproxy/com.motorola.android.locationproxy.LocationProxyService
  233.     class late_start
  234.     disabled
  235.     oneshot
  236.  
  237. on property:gsm.mot.locatonproxy=start
  238.     start motolocation
  239.  
  240. # Get BP version and save to misc
  241. service savebpver /system/bin/savebpver
  242.    class main
  243.    oneshot
  244.    disabled
  245.  
  246. on property:dev.bootcomplete=1
  247.    start savebpver
  248.  
  249. service gadget-lte-modem /system/bin/tty2ttyd /dev/ttyACM0 /dev/ttyGS0 0 512
  250.     oneshot
  251.     disabled
  252.  
  253. service gadget-qbp-modem /system/bin/tty2ttyd /dev/ttyUSB4 /dev/ttyGS1 0 1024
  254.     oneshot
  255.     disabled
  256.  
  257. service gadget-qbp-diag /system/bin/tty2ttyd /dev/ttyUSB0 /dev/ttyGS2 0 1024
  258.     oneshot
  259.     disabled
  260.  
  261. on property:ro.bootmode=factorycable
  262.     start tcmd
  263.     start ftmipcd
  264.  
  265. on property:ro.bootmode=qbp-hw-bypass
  266.     setprop ril.moto-qc.usb-hw-bypass.state "on"
  267.  
  268. on property:ro.bootmode=bp-tools
  269.     start tcmd
  270.     start gadget-lte-modem
  271.     start gadget-qbp-diag
  272.     write /proc/sys/net/ipv4/ip_forward 1
  273.  
  274. on property:ril.moto-qc.port.modem.owner=gadget
  275.     stop ril-daemon
  276.     start gadget-qbp-modem
  277.     start ril-daemon
  278.  
  279. on property:ril.moto-qc.port.modem.owner=rild
  280.     stop ril-daemon
  281.     stop gadget-qbp-modem
  282.     start ril-daemon
  283.  
  284. service wlan_prod /system/bin/insmod /system/lib/modules/bcm4329.ko "firmware_path=/vendor/firmware/fw_bcm4329.bin nvram_path=/system/etc/wifi/bcm4329.cal"
  285.     group wifi mot_tcmd system
  286.     oneshot
  287.     disabled
  288.  
  289. service wlan_mfg /system/bin/insmod /system/lib/modules/bcm4329.ko "firmware_path=/vendor/firmware/fw_bcm4329_mfg.bin nvram_path=/system/etc/wifi/bcm4329.cal"
  290.     group wifi mot_tcmd system
  291.     oneshot
  292.     disabled
  293.  
  294. service wlan_unload /system/bin/rmmod bcm4329
  295.     group wifi mot_tcmd system
  296.     oneshot
  297.     disabled
  298.  
  299. # turn on wifi for tcmd load production firmware
  300. on property:tcmd.load_wlan="production"
  301.     start wlan_prod
  302.  
  303. # turn on wifi for tcmd load manufacturing firmware
  304. on property:tcmd.load_wlan="manufacturing"
  305.     start wlan_mfg
  306.  
  307. # turn off wifi for tcmd
  308. on property:tcmd.load_wlan="unload"
  309.     start wlan_unload
Advertisement
Add Comment
Please, Sign In to add comment