Advertisement
fosser22

Untitled

Feb 11th, 2013
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.83 KB | None | 0 0
  1. import init.harmony.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.  
  24. on fs
  25. mount_all /fstab.harmony
  26. setprop ro.crypto.fuse_sdcard true
  27. mount debugfs debugfs /sys/kernel/debug
  28.  
  29. on post-fs-data
  30. mkdir /data/misc/wifi 0770 wifi wifi
  31. mkdir /data/misc/wifi/sockets 0770 wifi wifi
  32. mkdir /data/misc/dhcp 0770 dhcp dhcp
  33. chown dhcp dhcp /data/misc/dhcp
  34.  
  35. # we will remap this as /storage/sdcard0 with the sdcard fuse tool
  36. mkdir /data/media 0770 media_rw media_rw
  37. chown media_rw media_rw /data/media
  38.  
  39. # Set indication (checked by vold) that we have finished this action
  40. setprop vold.post_fs_data_done 1
  41.  
  42.  
  43. on boot
  44. # bluetooth permissions
  45. chmod 0660 /dev/ttyHS2
  46. chown bluetooth net_bt_stack /dev/ttyHS2
  47. chmod 0660 /sys/class/rfkill/rfkill0/state
  48. chmod 0660 /sys/class/rfkill/rfkill0/type
  49. chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/state
  50. chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/type
  51. write /sys/class/rfkill/rfkill0/state 0
  52. symlink /system/lib/hw/wlan/bcm4329B1.hcd /data/BCM4329B1.hcd
  53. symlink /system/lib/hw/wlan/bcm4329B1.hcd /data/bcm4329B1.hcd
  54. chmod 0777 /data/bcm4329B1.hcd
  55.  
  56. # bluetooth LPM
  57. chmod 0220 /proc/bluetooth/sleep/lpm
  58. chmod 0220 /proc/bluetooth/sleep/btwrite
  59. chown bluetooth net_bt_stack /proc/bluetooth/sleep/lpm
  60. chown bluetooth net_bt_stack /proc/bluetooth/sleep/btwrite
  61.  
  62. # backlight
  63. chown system system /sys/class/backlight/pwm-backlight/brightness
  64.  
  65. # Sensor
  66. chmod 664 /sys/bus/iio/devices/device0/lux
  67. chmod 664 /sys/bus/iio/devices/device0/proxim_ir
  68.  
  69.  
  70. # Power management settings
  71. # cpufreq defaults
  72. write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 216000
  73. write /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 1000000
  74. write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive
  75. write /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq 216000
  76. write /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq 1000000
  77. write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor interactive
  78. # timer 20ms, min sample 80ms, go max at 80%
  79. write /sys/devices/system/cpu/cpufreq/interactive/timer_rate 20000
  80. write /sys/devices/system/cpu/cpufreq/interactive/min_sample_time 80000
  81. write /sys/module/cpuidle/parameters/lp2_in_idle 1
  82. write /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load 80
  83. write /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay 20000
  84. write /sys/devices/system/cpu/cpufreq/interactive/input_boost 1
  85. # Wakelock debug
  86. write /sys/module/wakelock/parameters/debug_mask 7
  87.  
  88. # GPS
  89. mkdir /data/gps
  90. chown gps system /data/gps
  91. chmod 770 /data/gps
  92. chown gps system /dev/ttyHS3
  93. chmod 0664 /dev/ttyHS3
  94.  
  95. # GPS init
  96. write /sys/class/gpio/export 171
  97. write /sys/class/gpio/gpio171/value 0
  98. write /sys/class/gpio/gpio171/direction out
  99. chown gps system /sys/class/gpio/gpio171/value
  100. chmod 0664 /sys/class/gpio/gpio171/value
  101.  
  102. # Default Read Ahead value for sdcards
  103. write /sys/block/mmcblk0/queue/read_ahead_kb 2048
  104. write /sys/block/mmcblk1/queue/read_ahead_kb 2048
  105.  
  106.  
  107. service wpa_supplicant /system/bin/wpa_supplicant \
  108. -Dnl80211 -iwlan0 -puse_p2p_group_interface=1 -c/data/misc/wifi/wpa_supplicant.conf -e/data/misc/wifi/entropy.bin
  109. # we will start as root and wpa_supplicant will switch to user wifi
  110. # after setting up the capabilities required for WEXT
  111. # user wifi
  112. # group wifi inet keystore
  113. class main
  114. socket wpa_wlan0 dgram 660 wifi wifi
  115. disabled
  116. oneshot
  117.  
  118. service p2p_supplicant /system/bin/wpa_supplicant \
  119. -Dnl80211 -iwlan0 -puse_p2p_group_interface=1 -c/data/misc/wifi/wpa_supplicant.conf
  120. # we will start as root and wpa_supplicant will switch to user wifi
  121. # after setting up the capabilities required for WEXT
  122. # user wifi
  123. # group wifi inet keystore
  124. class main
  125. socket wpa_wlan0 dgram 660 wifi wifi
  126. disabled
  127. oneshot
  128.  
  129. service dhcpcd_wlan0 /system/bin/dhcpcd -ABKL
  130. class main
  131. disabled
  132. oneshot
  133.  
  134. service dhcpcd_eth0 /system/bin/dhcpcd -ABDKL -f/system/etc/dhcpcd/dhcpcd.conf
  135. class main
  136. disabled
  137. oneshot
  138.  
  139. service dhcpcd_p2p /system/bin/dhcpcd -aABKL
  140. class main
  141. disabled
  142. oneshot
  143.  
  144. # bluetooth
  145. service dhcpcd_bnep0 /system/bin/dhcpcd -ABKL
  146. disabled
  147. oneshot
  148.  
  149. service iprenew_wlan0 /system/bin/dhcpcd -n
  150. disabled
  151. oneshot
  152.  
  153. service iprenew_p2p /system/bin/dhcpcd -n
  154. class main
  155. disabled
  156. oneshot
  157.  
  158. service iprenew_eth0 /system/bin/dhcpcd -n
  159. class main
  160. disabled
  161. oneshot
  162.  
  163. # Start GPS daemon
  164. on boot
  165. service gps-daemon /system/bin/glgps -c /system/etc/gps/gpsconfig.xml
  166. socket gps seqpacket 660 gps system
  167. user gps
  168. group system inet
  169. class late_start
  170.  
  171. # create virtual SD card at /mnt/sdcard, based on the /data/media directory
  172. # deamon will drop to user/group system/media_rw after initializing
  173. # underlying files in /data/media wil be created with user and group media_rw (1023)
  174. service sdcard /system/bin/sdcard /data/media /mnt/shell/emulated 1023 1023
  175. class late_start
  176.  
  177. # Postboot service
  178.  
  179. on property:init.svc.vold=running
  180. start sdcard
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement