Advertisement
fosser22

Untitled

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