Advertisement
fosser22

Untitled

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