Advertisement
fosser22

Untitled

Jan 30th, 2013
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.97 KB | None | 0 0
  1. import init.stingray.usb.rc
  2.  
  3. on init
  4. # See storage config details at http://source.android.com/tech/storage/
  5. mkdir /mnt/shell/emulated 0700 shell shell
  6. mkdir /storage 0550 system sdcard_r
  7. mkdir /storage/emulated 0555 root root
  8. mkdir /storage/sdcard1 0000 system system
  9. mkdir /storage/usbdisk0 0000 system system
  10.  
  11. export EXTERNAL_STORAGE /storage/emulated/legacy
  12. export SECONDARY_STORAGE /storage/sdcard1
  13. export EMULATED_STORAGE_SOURCE /mnt/shell/emulated
  14. export EMULATED_STORAGE_TARGET /storage/emulated
  15.  
  16. # Support legacy paths
  17. symlink /storage/emulated/legacy /sdcard
  18. symlink /storage/emulated/legacy /mnt/sdcard
  19. symlink /storage/emulated/legacy /storage/sdcard0
  20. symlink /mnt/shell/emulated/0 /storage/emulated/legacy
  21. symlink /storage/sdcard1 /mnt/external1
  22. symlink /storage/usbdisk0 /mnt/usbdisk
  23. mkdir /pds 0777 system system
  24.  
  25. on fs
  26. mount_all /fstab.stingray
  27. setprop ro.crypto.fuse_sdcard true
  28. mount debugfs debugfs /sys/kernel/debug
  29.  
  30. on post-fs-data
  31. mkdir /data/misc/wifi 0770 wifi wifi
  32. mkdir /data/misc/wifi/sockets 0770 wifi wifi
  33. mkdir /data/misc/dhcp 0770 dhcp dhcp
  34. chown dhcp dhcp /data/misc/dhcp
  35.  
  36. mkdir /data/tpapi 0771 system system
  37. mkdir /data/tpapi/etc 0771 system system
  38. mkdir /data/tpapi/etc/tpa 0771 system system
  39. mkdir /data/tpapi/etc/tpa/persistent 0771 system system
  40. chown system system /data/tpapi/etc/tpa/mmap_vars.dat
  41. chmod 0660 /data/tpapi/etc/tpa/mmap_vars.dat
  42. chown system system /data/tpapi/etc/tpa/keymgr.lock
  43. chmod 0660 /data/tpapi/etc/tpa/keymgr.lock
  44. chown system system /data/tpapi/etc/tpa/persistent/keymaptable.lock
  45. chmod 0660 /data/tpapi/etc/tpa/persistent/keymaptable.lock
  46. chown system system /data/tpapi/etc/tpa/persistent/keyring.lock
  47. chmod 0660 /data/tpapi/etc/tpa/persistent/keyring.lock
  48. chown system system /data/tpapi/etc/tpa/persistent/iprm.lock
  49. chmod 0660 /data/tpapi/etc/tpa/persistent/iprm.lock
  50.  
  51. # cleanup obsolete symlink hack that may be lying around
  52. rm /data/misc/ril
  53.  
  54. # we will remap this as /storage/sdcard0 with the sdcard fuse tool
  55. mkdir /data/media 0770 media_rw media_rw
  56. chown media_rw media_rw /data/media
  57.  
  58. # GPS
  59. #Create location directory, BRCM guci library stores LTO file and read/write
  60. # config file.
  61. mkdir /data/location 0770 radio radio
  62.  
  63. # Set indication (checked by vold) that we have finished this action
  64. setprop vold.post_fs_data_done 1
  65.  
  66. on boot
  67. # bluetooth
  68. # power up/down interface
  69. chmod 0660 /sys/class/rfkill/rfkill0/state
  70. chmod 0660 /sys/class/rfkill/rfkill0/type
  71. chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/state
  72. chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/type
  73.  
  74. # UART device
  75. chmod 0660 /dev/ttyHS2
  76. chown bluetooth net_bt_stack /dev/ttyHS2
  77.  
  78. # bluetooth MAC address programming
  79. chown bluetooth net_bt_stack /sys/module/board_stingray/parameters/bdaddr
  80. setprop ro.bt.bdaddr_path /sys/module/board_stingray/parameters/bdaddr
  81.  
  82. # Sensor
  83. chown compass compass /dev/kxtf9
  84. chmod 660 /dev/kxtf9
  85. chown compass compass /dev/max9635
  86. chmod 660 /dev/max9635
  87. chown compass compass /dev/bmp085
  88. chmod 660 /dev/bmp085
  89. chown compass compass /dev/l3g4200d
  90. chmod 660 /dev/l3g4200d
  91. chown compass compass /dev/akm8975_dev
  92. chmod 660 /dev/akm8975_dev
  93. chown compass compass /dev/akm8975_aot
  94. chmod 660 /dev/akm8975_aot
  95.  
  96. # light
  97. chown system system /sys/class/leds/notification-led/brightness
  98. chmod 660 /sys/class/leds/notification-led/brightness
  99. chown system system /sys/class/leds/notification-led/blink
  100. chmod 660 /sys/class/leds/notification-led/blink
  101.  
  102. chmod 666 /dev/nvhost-ctrl
  103. chmod 666 /dev/nvhost-display
  104. chmod 666 /dev/nvhost-dsi
  105. chmod 666 /dev/nvhost-gr2d
  106. chmod 666 /dev/nvhost-gr3d
  107. chmod 666 /dev/nvhost-isp
  108. chmod 666 /dev/nvhost-mpe
  109. chmod 666 /dev/nvhost-vi
  110.  
  111. # Camera
  112. chown media camera /sys/class/leds/privacy-led/brightness
  113. chown media camera /sys/class/leds/flash/brightness
  114. chown media camera /sys/class/leds/torch/brightness
  115. chmod 660 /sys/class/leds/privacy-led/brightness
  116. chmod 660 /sys/class/leds/flash/brightness
  117. chmod 660 /sys/class/leds/torch/brightness
  118.  
  119. # UART Device
  120. chown radio radio /dev/ttyHS4
  121. chmod 640 /dev/ttyHS4
  122.  
  123. # broadcom 4750 device
  124. chown radio radio /dev/gps_brcm4750
  125. chmod 660 /dev/gps_brcm4750
  126.  
  127. # Whisper UART Device
  128. chown radio radio /dev/ttyHS0
  129. chmod 640 /dev/ttyHS0
  130.  
  131. # Whisper audio settings
  132. chown media media /sys/class/switch/dock/dock_prop
  133. chmod 660 /sys/class/switch/dock/dock_prop
  134.  
  135. # Modem Control CDMA
  136. chown radio radio /sys/class/radio/mdm6600/command
  137. chmod 220 /sys/class/radio/mdm6600/command
  138. chown radio radio /sys/bus/usb/devices/usb2/power/control
  139. chmod 660 /sys/bus/usb/devices/usb2/power/control
  140.  
  141. # Modem Control LTE
  142. chown radio radio /sys/class/radio/wrigley/command
  143. chmod 220 /sys/class/radio/wrigley/command
  144. chown radio radio /sys/bus/usb/devices/usb1/power/control
  145. chmod 660 /sys/bus/usb/devices/usb1/power/control
  146.  
  147. # StingrayParts: Control charging LED
  148. chown root system /sys/class/gpio/gpio168/value
  149. chmod 664 /sys/class/gpio/gpio168/value
  150.  
  151. # Power Management Settings
  152. # cpufreq defaults
  153. write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 216000
  154. write /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 1000000
  155. write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive
  156. write /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq 216000
  157. write /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq 1000000
  158. write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor interactive
  159. # timer 20ms, min sample 80ms, go max at 80%
  160. write /sys/devices/system/cpu/cpufreq/interactive/timer_rate 20000
  161. write /sys/devices/system/cpu/cpufreq/interactive/min_sample_time 80000
  162. write /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load 80
  163. write /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay 20000
  164. write /sys/devices/system/cpu/cpufreq/interactive/input_boost 1
  165. # Wakelock debug
  166. write /sys/module/wakelock/parameters/debug_mask 7
  167. # No need to continuously scan w1 bus
  168. write /sys/devices/w1\ bus\ master/w1_master_search 1
  169. # Disable charging LED by default
  170. write /sys/class/gpio/gpio168/value 1
  171.  
  172. # LTE specific TCP buffer setting for stingray
  173. # ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
  174. setprop net.tcp.buffersize.lte 524288,1048576,2097152,262144,524288,1048576
  175.  
  176. # make binder state/stats readable by root only, so that they are not
  177. # captured by default in bugreports
  178. chmod 0400 /sys/kernel/debug/binder/stats
  179. chmod 0400 /sys/kernel/debug/binder/state
  180.  
  181. # Ecompass daemon
  182. service akmd2 /system/bin/akmd2
  183. class late_start
  184. user compass
  185. group compass misc input
  186.  
  187. service wpa_supplicant /system/bin/wpa_supplicant \
  188. -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -e/data/misc/wifi/entropy.bin
  189. # we will start as root and wpa_supplicant will switch to user wifi
  190. # after setting up the capabilities required for WEXT
  191. # user wifi
  192. # group wifi inet keystore
  193. class main
  194. socket wpa_wlan0 dgram 660 wifi wifi
  195. disabled
  196. oneshot
  197.  
  198. service dhcpcd_wlan0 /system/bin/dhcpcd -aABDKL
  199. class main
  200. disabled
  201. oneshot
  202.  
  203. service dhcpcd_p2p /system/bin/dhcpcd -aABKL
  204. class main
  205. disabled
  206. oneshot
  207.  
  208. service dhcpcd_eth0 /system/bin/dhcpcd -ABDKL -f/system/etc/dhcpcd/dhcpcd.conf
  209. class main
  210. disabled
  211. oneshot
  212.  
  213. service iprenew_wlan0 /system/bin/dhcpcd -n
  214. class main
  215. disabled
  216. oneshot
  217.  
  218. service iprenew_p2p /system/bin/dhcpcd -n
  219. class main
  220. disabled
  221. oneshot
  222.  
  223. service iprenew_eth0 /system/bin/dhcpcd -n
  224. class main
  225. disabled
  226. oneshot
  227.  
  228. # bluetooth
  229. service dhcpcd_bnep0 /system/bin/dhcpcd -ABKL
  230. class main
  231. disabled
  232. oneshot
  233.  
  234. service iprenew_bnep0 /system/bin/dhcpcd -n
  235. class main
  236. disabled
  237. oneshot
  238.  
  239. # bugreport is triggered by the VOLUME-DOWN and VOLUME-UP keys.
  240. # bugtogo.sh tool will invoke bugreport and propt email composer
  241. # if not in user build.
  242. service bugreport /system/bin/bugmailer.sh -b /system/media/audio/ui/Dock.ogg -e /system/media/audio/ui/Undock.ogg
  243. class main
  244. disabled
  245. oneshot
  246. keycodes 115 114
  247.  
  248. service location /system/bin/location
  249. class late_start
  250. socket gpshal_socket stream 660 radio system
  251. socket location_shim stream 660 system system
  252. socket gps_tcmd stream 660 radio system
  253. user radio
  254. group radio system mot_accy
  255. oneshot
  256.  
  257. service locDrv /system/bin/brcm_guci_drv -config /system/etc/gpsconfig.xml
  258. class late_start
  259. user radio
  260. group radio inet sdcard_rw sdcard_r
  261.  
  262. service tcmd /system/bin/tcmd
  263. class core
  264. socket local_tcmd stream 0660 root root
  265. socket batch_socket stream 0600 root root
  266. disabled
  267.  
  268. service ftmipcd /system/bin/ftmipcd
  269. class core
  270. disabled
  271.  
  272. # Immediately drops to user radio, after starting the real-time thread
  273. service whisper /system/bin/whisperd
  274. class late_start
  275. group radio system mot_accy
  276.  
  277. # create virtual SD card at /storage/sdcard0, based on the /data/media directory
  278. # daemon will drop to user/group system/media_rw after initializing
  279. # underlying files in /data/media will be created with user and group media_rw (1023)
  280. service sdcard /system/bin/sdcard /data/media /mnt/shell/emulated 1023 1023
  281. class late_start
  282.  
  283. service motolocation /system/bin/sh /system/bin/am startservice -n com.motorola.android.locationproxy/com.motorola.android.locationproxy.LocationProxyService
  284. class late_start
  285. disabled
  286. oneshot
  287.  
  288. on property:gsm.mot.locatonproxy=start
  289. start motolocation
  290.  
  291. # Get BP version and save to misc
  292. service savebpver /system/bin/savebpver
  293. class main
  294. oneshot
  295. disabled
  296.  
  297. on property:dev.bootcomplete=1
  298. start savebpver
  299.  
  300. service gadget-lte-modem /system/bin/tty2ttyd ril.wrigley.modem.tty /dev/ttyGS0 0 512
  301. disabled
  302.  
  303. service gadget-qbp-modem /system/bin/tty2ttyd persist.ril.modem.ttydevice /dev/ttyGS1 0 1024
  304. disabled
  305.  
  306. service gadget-qbp-diag /system/bin/tty2ttyd persist.ril.diag.ttydevice /dev/ttyGS2 0 1024
  307. disabled
  308.  
  309. service wrigley-diag /system/bin/wrigley-diag.sh
  310. oneshot
  311. disabled
  312.  
  313. service logcatd-blan /system/bin/logcatd-blan
  314. user root
  315. # Immediately drops root, keeps CAP_SYS_ADMIN, and runs as below
  316. # user system
  317. # group system log inet
  318. disabled
  319.  
  320. on property:ro.bootmode=factorycable
  321. start tcmd
  322. start ftmipcd
  323.  
  324. on property:ro.bootmode=qbp-hw-bypass
  325. setprop ril.moto-qc.usb-hw-bypass.state "on"
  326.  
  327. on property:ro.bootmode=bp-tools
  328. start tcmd
  329. start gadget-lte-modem
  330. start gadget-qbp-diag
  331. start gadget-qbp-modem
  332. start wrigley-diag
  333. start logcatd-blan
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement