Advertisement
Ozols

Untitled

Feb 11th, 2013
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.86 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. mkdir /mnt/shell/emulated 0700 shell shell
  8. mkdir /storage 0775 system sdcard_rw
  9. mkdir /storage/emulated 0555 root root
  10. export EXTERNAL_STORAGE /storage/emulated/legacy
  11. export SECONDARY_STORAGE /storage/sdcard1
  12. export SECOND_VOLUME_STORAGE /storage/sdcard1
  13. export THIRD_VOLUME_STORAGE /storage/sdcard2
  14. export EMULATED_STORAGE_SOURCE /mnt/shell/emulated
  15. export EMULATED_STORAGE_TARGET /storage/emulated
  16.  
  17. # for backwards compatibility
  18. symlink /storage/emulated/legacy /sdcard
  19. symlink /storage/emulated/legacy /mnt/sdcard
  20. symlink /storage/emulated/legacy /storage/sdcard0
  21. symlink /mnt/shell/emulated/0 /storage/emulated/legacy
  22.  
  23. # make the pathes for the external media mounts
  24. mkdir /storage/sdcard1 0000 system system
  25. mkdir /storage/sdcard2 0000 system system
  26. mkdir /mnt/usbdrive1 0666 system system
  27. mkdir /mnt/usbdrive2 0666 system system
  28.  
  29. # for backwards compatibility
  30. symlink /mnt/usbdrive1 /usbdrive1
  31. symlink /mnt/usbdrive2 /usbdrive2
  32. symlink /storage/sdcard1 /internal_sd
  33. symlink /storage/sdcard1 /mnt/internal_sd
  34. symlink /storage/sdcard2 /microsd
  35. symlink /storage/sdcard2 /mnt/microsd
  36.  
  37. symlink /emmc /mnt/emmc
  38. symlink /emmc /storage/emmc
  39.  
  40. on fs
  41. # Mount /system rw first to give the filesystem a chance to save a checkpoint
  42. setprop ro.crypto.tmpfs_options size=128m,mode=0771,uid=1000,gid=1000
  43. setprop ro.crypto.umount_sd false
  44. setprop ro.crypto.fuse_sdcard true
  45. mount ext4 /dev/block/mmcblk0p2 /data wait noatime nosuid nodev
  46. mount_all /fstab.harmony
  47.  
  48. mount ext4 /dev/block/mmcblk0p1 /emmc wait noatime nosuid nodev
  49.  
  50. on post-fs
  51. # Keep rootfs rw since FUSE needs dir creation
  52. mount rootfs rootfs / rw remount
  53.  
  54. on post-fs-data
  55. mkdir /data/misc/wifi 0770 wifi wifi
  56. mkdir /data/misc/wifi/sockets 0770 wifi wifi
  57. mkdir /data/misc/dhcp 0770 dhcp dhcp
  58. chown dhcp dhcp /data/misc/dhcp
  59.  
  60. # we will remap this as /mnt/sdcard with the sdcard fuse tool
  61. mkdir /data/media 0770 media_rw media_rw
  62. chown media_rw media_rw /data/media
  63.  
  64. mkdir /emmc/media 0775 media_rw media_rw
  65. chown media_rw media_rw /emmc/media
  66.  
  67. # Set indication (checked by vold) that we have finished this action
  68. setprop vold.post_fs_data_done 1
  69.  
  70.  
  71. on boot
  72. # PQi Permissions
  73. chmod 0666 /sys/class/gpio/gpio27/value
  74.  
  75. # bluetooth permissions
  76. chmod 0660 /dev/ttyHS2
  77. chown bluetooth net_bt_stack /dev/ttyHS2
  78. chmod 0660 /sys/class/rfkill/rfkill0/state
  79. chmod 0660 /sys/class/rfkill/rfkill0/type
  80. chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/state
  81. chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/type
  82. write /sys/class/rfkill/rfkill0/state 0
  83. symlink /system/lib/hw/wlan/bcm4329B1.hcd /data/BCM4329B1.hcd
  84. symlink /system/lib/hw/wlan/bcm4329B1.hcd /data/bcm4329B1.hcd
  85. chmod 0777 /data/bcm4329B1.hcd
  86.  
  87. # bluetooth LPM
  88. chmod 0220 /proc/bluetooth/sleep/lpm
  89. chmod 0220 /proc/bluetooth/sleep/btwrite
  90. chown bluetooth net_bt_stack /proc/bluetooth/sleep/lpm
  91. chown bluetooth net_bt_stack /proc/bluetooth/sleep/btwrite
  92.  
  93. # backlight
  94. chown system system /sys/class/backlight/pwm-backlight/brightness
  95.  
  96. # Sensor
  97. chmod 666 /dev/tegra_mediaserver
  98. chmod 666 /dev/tegra_dc_0
  99. chmod 666 /dev/tegra_dc_1
  100. chmod 666 /dev/nvhost-ctrl
  101. chmod 666 /dev/nvhost-display
  102. chmod 666 /dev/nvhost-dsi
  103. chmod 666 /dev/nvhost-gr2d
  104. chmod 666 /dev/nvhost-gr3d
  105. chmod 666 /dev/nvhost-isp
  106. chmod 666 /dev/nvhost-mpe
  107. chmod 666 /dev/nvhost-vi
  108. chmod 664 /sys/bus/iio/devices/device0/lux
  109. chmod 664 /sys/bus/iio/devices/device0/proxim_ir
  110.  
  111.  
  112. # Power management settings
  113. write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 216000
  114. write /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 1000000
  115. write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive
  116. write /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq 216000
  117. write /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq 1000000
  118. write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor interactive
  119. write /sys/devices/system/cpu/cpufreq/interactive/go_maxspeed_load 80
  120.  
  121. # GPS
  122. mkdir /data/gps
  123. chown system system /data/gps
  124. chmod 770 /data/gps
  125.  
  126. # Default Read Ahead value for sdcards
  127. write /sys/block/mmcblk0/queue/read_ahead_kb 2048
  128. write /sys/block/mmcblk1/queue/read_ahead_kb 2048
  129.  
  130. service wpa_supplicant /system/bin/wpa_supplicant \
  131. -Dnl80211 -iwlan0 -puse_p2p_group_interface=1 -c/data/misc/wifi/wpa_supplicant.conf -e/data/misc/wifi/entropy.bin
  132. # we will start as root and wpa_supplicant will switch to user wifi
  133. # after setting up the capabilities required for WEXT
  134. # user wifi
  135. # group wifi inet keystore
  136. class main
  137. socket wpa_wlan0 dgram 660 wifi wifi
  138. disabled
  139. oneshot
  140.  
  141. service p2p_supplicant /system/bin/wpa_supplicant \
  142. -Dnl80211 -iwlan0 -puse_p2p_group_interface=1 -c/data/misc/wifi/wpa_supplicant.conf
  143. # we will start as root and wpa_supplicant will switch to user wifi
  144. # after setting up the capabilities required for WEXT
  145. # user wifi
  146. # group wifi inet keystore
  147. class main
  148. socket wpa_wlan0 dgram 660 wifi wifi
  149. disabled
  150. oneshot
  151.  
  152. service dhcpcd_wlan0 /system/bin/dhcpcd -aABDKL
  153. class main
  154. disabled
  155. oneshot
  156.  
  157. service dhcpcd_eth0 /system/bin/dhcpcd -ABDKL -f/system/etc/dhcpcd/dhcpcd.conf
  158. class main
  159. disabled
  160. oneshot
  161.  
  162. service dhcpcd_usb0 /system/bin/dhcpcd -ABDKL -f/system/etc/dhcpcd/dhcpcd.conf
  163. class main
  164. disabled
  165. oneshot
  166.  
  167. service dhcpcd_p2p /system/bin/dhcpcd -aABKL
  168. class main
  169. disabled
  170. oneshot
  171.  
  172. # bluetooth
  173. service dhcpcd_bnep0 /system/bin/dhcpcd -ABKL
  174. disabled
  175. oneshot
  176.  
  177. service iprenew_wlan0 /system/bin/dhcpcd -n
  178. class main
  179. disabled
  180. oneshot
  181.  
  182. service iprenew_p2p /system/bin/dhcpcd -n
  183. class main
  184. disabled
  185. oneshot
  186.  
  187. service iprenew_eth0 /system/bin/dhcpcd -n
  188. class main
  189. disabled
  190. oneshot
  191.  
  192. service iprenew_eth0 /system/bin/dhcpcd -n
  193. class main
  194. disabled
  195. oneshot
  196.  
  197. # create virtual SD card at /mnt/sdcard, based on the /data/media directory
  198. # deamon will drop to user/group system/media_rw after initializing
  199. # underlying files in /data/media wil be created with user and group media_rw (1023)
  200. # service sdcard /system/bin/sdcard /data/media /mnt/shell/emulated 1023 1023
  201. service sdcard /system/bin/sdcard /emmc/media /mnt/shell/emulated 1023 1023
  202. class late_start
  203.  
  204. #BCM
  205. #service hciattach /system/bin/brcm_patchram_plus --enable_hci \
  206. # --baudrate 921600 --patchram /system/etc/firmware/bcm4329.hcd --tosleep 50000 \
  207. # --i2s=1,1,0,1 --enable_lpm /dev/ttyHS2
  208. # class main
  209. # user root
  210. # group system bluetooth net_bt_admin misc
  211. # oneshot
  212. # disabled
  213.  
  214. # Enable tcpdump-service
  215. #service netdump-service /system/xbin/tcpdump -i any -C 5 -p -s 0 -w /sdcard/netdump.cap
  216. # user root
  217. # disabled
  218. #
  219. #on property:net.netdump.enable=1
  220. # start netdump-service
  221. #
  222. #on property:net.netdump.enable=0
  223. # stop netdump-service
  224.  
  225. # 3G library selection
  226. service wwlanselect /system/bin/sh /system/bin/wwlan_select.sh
  227. disabled
  228. class main
  229. user root
  230. group shell
  231. oneshot
  232.  
  233. on device-added-/dev/ttyUSB0
  234. start wwlanselect
  235. on device-added-/dev/ttyUSB1
  236. start wwlanselect
  237. on device-added-/dev/ttyUSB2
  238. start wwlanselect
  239. on device-added-/dev/ttyUSB3
  240. start wwlanselect
  241.  
  242. on device-removed-/dev/ttyUSB0
  243. stop ril-daemon
  244. on device-removed-/dev/ttyUSB1
  245. stop ril-daemon
  246. on device-removed-/dev/ttyUSB2
  247. stop ril-daemon
  248. on device-removed-/dev/ttyUSB3
  249. stop ril-daemon
  250.  
  251. on property:init.svc.bootanim=stopped
  252. start wwlanselect
  253.  
  254. # Postboot service
  255. service adam_postboot /system/bin/sh /system/etc/adam_postboot.sh
  256. user root
  257. oneshot
  258.  
  259. on property:init.svc.bootanim=stopped
  260. start adam_postboot
  261. class_start postbootinit
  262.  
  263. on property:init.svc.vold=running
  264. start sdcard
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement