Advertisement
fosser22

init.harmony.rc

Jan 30th, 2013
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.19 KB | None | 0 0
  1. import init.harmony.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 0550 system sdcard_r
  10. mkdir /storage/emulated 0555 root root
  11. mkdir /storage/sdcard1 0000 system system
  12. mkdir /storage/usbdisk0 0000 system system
  13.  
  14. export EXTERNAL_STORAGE /storage/emulated/legacy
  15. export SECONDARY_STORAGE /storage/sdcard1
  16. export EMULATED_STORAGE_SOURCE /mnt/shell/emulated
  17. export EMULATED_STORAGE_TARGET /storage/emulated
  18.  
  19. # Support legacy paths
  20. symlink /storage/emulated/legacy /sdcard
  21. symlink /storage/emulated/legacy /mnt/sdcard
  22. symlink /storage/emulated/legacy /storage/sdcard0
  23. symlink /mnt/shell/emulated/0 /storage/emulated/legacy
  24. symlink /storage/sdcard1 /mnt/external1
  25. symlink /storage/usbdisk0 /mnt/usbdisk
  26. mkdir /pds 0777 system system
  27.  
  28. on fs
  29. mount_all /fstab.harmony
  30. setprop ro.crypto.fuse_sdcard true
  31. mount debugfs debugfs /sys/kernel/debug
  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. # we will remap this as /mnt/sdcard with the sdcard fuse tool
  40. mkdir /data/media 0770 media_rw media_rw
  41. chown media_rw media_rw /data/media
  42.  
  43. # Set indication (checked by vold) that we have finished this action
  44. setprop vold.post_fs_data_done 1
  45.  
  46.  
  47. on boot
  48. # bluetooth permissions
  49. chmod 0660 /dev/ttyHS2
  50. chown bluetooth net_bt_stack /dev/ttyHS2
  51. chmod 0660 /sys/class/rfkill/rfkill0/state
  52. chmod 0660 /sys/class/rfkill/rfkill0/type
  53. chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/state
  54. chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/type
  55. write /sys/class/rfkill/rfkill0/state 0
  56. symlink /system/lib/hw/wlan/bcm4329B1.hcd /data/BCM4329B1.hcd
  57. symlink /system/lib/hw/wlan/bcm4329B1.hcd /data/bcm4329B1.hcd
  58. chmod 0777 /data/bcm4329B1.hcd
  59.  
  60. # bluetooth LPM
  61. chmod 0220 /proc/bluetooth/sleep/lpm
  62. chmod 0220 /proc/bluetooth/sleep/btwrite
  63. chown bluetooth net_bt_stack /proc/bluetooth/sleep/lpm
  64. chown bluetooth net_bt_stack /proc/bluetooth/sleep/btwrite
  65.  
  66. # backlight
  67. chown system system /sys/class/backlight/pwm-backlight/brightness
  68.  
  69. # Sensor
  70. chmod 666 /dev/tegra_mediaserver
  71. chmod 666 /dev/tegra_dc_0
  72. chmod 666 /dev/tegra_dc_1
  73. chmod 666 /dev/nvhost-ctrl
  74. chmod 666 /dev/nvhost-display
  75. chmod 666 /dev/nvhost-dsi
  76. chmod 666 /dev/nvhost-gr2d
  77. chmod 666 /dev/nvhost-gr3d
  78. chmod 666 /dev/nvhost-isp
  79. chmod 666 /dev/nvhost-mpe
  80. chmod 666 /dev/nvhost-vi
  81. chmod 664 /sys/bus/iio/devices/device0/lux
  82. chmod 664 /sys/bus/iio/devices/device0/proxim_ir
  83.  
  84.  
  85. # Power management settings
  86. write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 216000
  87. write /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 1000000
  88. write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive
  89. write /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq 216000
  90. write /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq 1000000
  91. write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor interactive
  92. write /sys/devices/system/cpu/cpufreq/interactive/go_maxspeed_load 80
  93.  
  94. # GPS
  95. mkdir /data/gps
  96. chown system system /data/gps
  97. chmod 770 /data/gps
  98.  
  99. # Default Read Ahead value for sdcards
  100. write /sys/block/mmcblk0/queue/read_ahead_kb 2048
  101. write /sys/block/mmcblk1/queue/read_ahead_kb 2048
  102.  
  103.  
  104. service wpa_supplicant /system/bin/wpa_supplicant \
  105. -Dnl80211 -iwlan0 -puse_p2p_group_interface=1 -c/data/misc/wifi/wpa_supplicant.conf -e/data/misc/wifi/entropy.bin
  106. # we will start as root and wpa_supplicant will switch to user wifi
  107. # after setting up the capabilities required for WEXT
  108. # user wifi
  109. # group wifi inet keystore
  110. class main
  111. socket wpa_wlan0 dgram 660 wifi wifi
  112. disabled
  113. oneshot
  114.  
  115. service p2p_supplicant /system/bin/wpa_supplicant \
  116. -Dnl80211 -iwlan0 -puse_p2p_group_interface=1 -c/data/misc/wifi/wpa_supplicant.conf
  117. # we will start as root and wpa_supplicant will switch to user wifi
  118. # after setting up the capabilities required for WEXT
  119. # user wifi
  120. # group wifi inet keystore
  121. class main
  122. socket wpa_wlan0 dgram 660 wifi wifi
  123. disabled
  124. oneshot
  125.  
  126. service dhcpcd_wlan0 /system/bin/dhcpcd -aABKL
  127. class main
  128. disabled
  129. oneshot
  130.  
  131. service dhcpcd_eth0 /system/bin/dhcpcd -ABDKL -f/system/etc/dhcpcd/dhcpcd.conf
  132. class main
  133. disabled
  134. oneshot
  135.  
  136. service dhcpcd_usb0 /system/bin/dhcpcd -ABDKL -f/system/etc/dhcpcd/dhcpcd.conf
  137. class main
  138. disabled
  139. oneshot
  140.  
  141. service dhcpcd_p2p /system/bin/dhcpcd -aABKL
  142. class main
  143. disabled
  144. oneshot
  145.  
  146. # bluetooth
  147. service dhcpcd_bnep0 /system/bin/dhcpcd -ABKL
  148. class main
  149. disabled
  150. oneshot
  151.  
  152. service iprenew_wlan0 /system/bin/dhcpcd -n
  153. class main
  154. disabled
  155. oneshot
  156.  
  157. service iprenew_eth0 /system/bin/dhcpcd -n
  158. class main
  159. disabled
  160. oneshot
  161.  
  162. service iprenew_usb0 /system/bin/dhcpcd -n
  163. class main
  164. disabled
  165. oneshot
  166.  
  167. service iprenew_p2p /system/bin/dhcpcd -n
  168. class main
  169. disabled
  170. oneshot
  171.  
  172. service iprenew_bnep0 /system/bin/dhcpcd -n
  173. class main
  174. disabled
  175. oneshot
  176.  
  177. # create virtual SD card at /mnt/sdcard, based on the /data/media directory
  178. # deamon will drop to user/group system/media_rw after initializing
  179. # underlying files in /data/media wil be created with user and group media_rw (1023)
  180. service sdcard /system/bin/sdcard /data/media /mnt/shell/emulated 1023 1023
  181. class late_start
  182.  
  183. #BCM
  184. #service hciattach /system/bin/brcm_patchram_plus --enable_hci \
  185. # --baudrate 921600 --use_baudrate_for_download \
  186. --patchram /system/etc/firmware/bcm4329.hcd --tosleep 50000 \
  187. # --i2s=1,1,0,1 --scopcm 0,2,0,0,0,0,0,0,0,0 --enable_lpm /dev/ttyHS2
  188. # class main
  189. # user root
  190. # group system bluetooth net_bt_admin misc
  191. # oneshot
  192. # disabled
  193.  
  194. # Enable tcpdump-service
  195. #service netdump-service /system/xbin/tcpdump -i any -C 5 -p -s 0 -w /sdcard/netdump.cap
  196. # user root
  197. # disabled
  198. #
  199. #on property:net.netdump.enable=1
  200. # start netdump-service
  201. #
  202. #on property:net.netdump.enable=0
  203. # stop netdump-service
  204.  
  205.  
  206.  
  207. # Postboot service
  208.  
  209. on property:init.svc.vold=running
  210. start sdcard
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement