Advertisement
Guest User

Untitled

a guest
Nov 28th, 2011
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.51 KB | None | 0 0
  1. import init.aries.usb.rc
  2.  
  3.  
  4. on boot
  5. mount debugfs /sys/kernel/debug /sys/kernel/debug
  6.  
  7. # Backwards Compat - XXX: Going away in G*
  8. symlink /system/etc /etc
  9. symlink /mnt/sdcard /sdcard
  10. symlink /mnt/emmc /emmc
  11.  
  12. # Include extra init file
  13. import /system/etc/init.local.rc
  14. import /device.rc
  15.  
  16. # Run sysinit
  17. exec /system/bin/sysinit
  18.  
  19. setprop ro.build.product aries
  20. setprop ro.product.device aries
  21. setprop ro.radio.noril yes
  22.  
  23. # fake some battery state
  24. setprop status.battery.state Slow
  25. setprop status.battery.level 5
  26. setprop status.battery.level_raw 50
  27. setprop status.battery.level_scale 9
  28.  
  29. # wi-fi
  30. mkdir /data/misc/wifi/sockets 0770 wifi wifi
  31. mkdir /data/misc/dhcp 0770 dhcp dhcp
  32.  
  33. # phone
  34. setprop ro.telephony.call_ring.multiple 0
  35.  
  36. # change permission for uart_switch
  37. chown radio radio /sys/class/sec/uart_switch/UART_SEL/value
  38. chown compass root /sys/class/input/input3/distortion
  39. chown compass root /sys/class/input/input3/offsets
  40. chown compass root /sys/class/input/input3/shape
  41. chown compass root /sys/class/input/input3/threshold
  42. chmod 660 /sys/class/sec/uart_switch/UART_SEL/value
  43.  
  44. # change permission for compass
  45. chown compass input /sys/class/input/input3/offsets
  46. chown compass input /sys/class/input/input3/shape
  47. chown compass input /sys/class/input/input3/distortion
  48. chown compass input /sys/class/input/input3/threshold
  49. # create data/gps for GPS demon
  50. mkdir /data/gps 700 gps system
  51. chown gps system /data/gps
  52. chown gps root /sys/class/sec/gps/GPS_PWR_EN/value
  53. chmod 660 /sys/class/sec/gps/GPS_PWR_EN/value
  54.  
  55. on fs
  56. mkdir /radio 0775 radio radio
  57. mount yaffs2 mtd@system /system
  58. mount yaffs2 mtd@system /system ro remount
  59. mount yaffs2 mtd@cache /cache
  60. mount yaffs2 mtd@radio /radio
  61. mount ext4 /dev/block/mmcblk0p2 /data wait nosuid nodev noatime nodiratime noauto_da_alloc
  62. mount yaffs2 mtd@datadata /datadata
  63.  
  64. chown radio radio /radio/modem.bin
  65.  
  66. # We chown/chmod /efs because mount is run as root + defaults
  67. mkdir /efs 0775 radio radio
  68. mount yaffs2 /dev/block/mtdblock4 /efs
  69. chown radio radio /efs
  70. chmod 770 /efs/bluetooth
  71. chmod 770 /efs/imei
  72.  
  73. # permissions for bluetooth.
  74. chown bluetooth bluetooth /dev/s3c2410_serial0
  75. chmod 0600 /dev/s3c2410_serial0
  76. chmod 0660 /sys/class/rfkill/rfkill0/state
  77. chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
  78. chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
  79.  
  80. # Permissions for System Server and daemons.
  81. chown system system /sys/class/backlight/s5p_bl/brightness
  82.  
  83. on post-fs
  84.  
  85. # remove /sbin/sh so that "adb install" can work properly
  86. exec /sbin/setupenv.sh
  87.  
  88. # We chown/chmod /data and /datadata again so because mount is run as root + defaults
  89. chown system system /data
  90. chmod 0771 /data
  91. chown system system /datadata
  92. chmod 0771 /datadata
  93.  
  94. # Create dump dir and collect dumps.
  95. # Do this before we mount cache so eventually we can use cache for
  96. # storing dumps on platforms which do not have a dedicated dump partition.
  97.  
  98. mkdir /data/dontpanic
  99. chown root log /data/dontpanic
  100. chmod 0750 /data/dontpanic
  101.  
  102. # Collect apanic data, free resources and re-arm trigger
  103. copy /proc/apanic_console /data/dontpanic/apanic_console
  104. chown root log /data/dontpanic/apanic_console
  105. chmod 0640 /data/dontpanic/apanic_console
  106.  
  107. copy /proc/apanic_threads /data/dontpanic/apanic_threads
  108. chown root log /data/dontpanic/apanic_threads
  109. chmod 0640 /data/dontpanic/apanic_threads
  110.  
  111. write /proc/apanic_console 1
  112.  
  113. # Same reason as /data above
  114. chown system cache /cache
  115. chmod 0771 /cache
  116.  
  117. # This may have been created by the recovery system with odd permissions
  118. chown system cache /cache/recovery
  119. chmod 0770 /cache/recovery
  120.  
  121. #change permissions on vmallocinfo so we can grab it from bugreports
  122. chown root log /proc/vmallocinfo
  123. chmod 0440 /proc/vmallocinfo
  124.  
  125. #change permissions on kmsg & sysrq-trigger so bugreports can grab kthread stacks
  126. chown root system /proc/kmsg
  127. chmod 0440 /proc/kmsg
  128. chown root system /proc/sysrq-trigger
  129. chmod 0220 /proc/sysrq-trigger
  130.  
  131. # create basic filesystem structure
  132. mkdir /data/misc 01771 system misc
  133. mkdir /data/misc/bluetoothd 0770 bluetooth bluetooth
  134. mkdir /data/misc/bluetooth 0770 system system
  135. mkdir /data/misc/keystore 0700 keystore keystore
  136. mkdir /data/misc/vpn 0770 system system
  137. mkdir /data/misc/systemkeys 0700 system system
  138. mkdir /data/misc/vpn/profiles 0770 system system
  139. # give system access to wpa_supplicant.conf for backup and restore
  140. mkdir /data/misc/wifi 0770 wifi wifi
  141. chmod 0770 /data/misc/wifi
  142. chmod 0660 /data/misc/wifi/wpa_supplicant.conf
  143. mkdir /data/local 0771 shell shell
  144. mkdir /data/local/tmp 0771 shell shell
  145. #mkdir /data/data 0771 system system
  146. # symlink /data/data to /datadata for performance
  147. symlink /datadata /data/data
  148.  
  149. mkdir /data/app-private 0771 system system
  150. mkdir /data/app 0771 system system
  151. mkdir /data/property 0700 root root
  152.  
  153. # create dalvik-cache and double-check the perms
  154. mkdir /data/dalvik-cache 0771 system system
  155. chown system system /data/dalvik-cache
  156. chmod 0771 /data/dalvik-cache
  157.  
  158. mkdir /cache/dalvik-cache 0771 system system
  159. chown system system /cache/dalvik-cache
  160. chmod 0771 /cache/dalvik-cache
  161.  
  162. # create the lost+found directories, so as to enforce our permissions
  163. mkdir /data/lost+found 0770
  164. mkdir /cache/lost+found 0770
  165.  
  166. # double check the perms, in case lost+found already exists, and set owner
  167. chown root root /data/lost+found
  168. chmod 0770 /data/lost+found
  169. chown root root /cache/lost+found
  170. chmod 0770 /cache/lost+found
  171.  
  172. #DRM directory creation
  173. mkdir /system/etc/security/drm 0775
  174. chown root root /system/etc/security/drm 0775
  175. chmod 0775 /system/etc/security/drm
  176. # WMDRM
  177. mkdir /data/data/.drm 0775
  178. mkdir /data/data.drm/.wmdrm 0775
  179. chown media system /data/data/.drm
  180. chown media system /data/data/.drm/.wmdrm
  181.  
  182. # allow net_raw to have access to /dev/socket directory
  183. chown root net_raw /dev/socket
  184. chmod 0775 /dev/socket
  185.  
  186. #symlinks for samsung RIL
  187. symlink /radio/modem.bin /dev/block/bml12
  188.  
  189.  
  190. # allow system to modify cpufreq control files
  191. chown root system /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
  192. chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
  193. chown root system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
  194. chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
  195. chown root system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
  196. chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
  197.  
  198. # 3D init
  199. service pvrsrvinit /system/vendor/bin/pvrsrvinit
  200. user root
  201. group root
  202. oneshot
  203.  
  204. service gpsd /system/vendor/bin/gpsd -c /vendor/etc/gps.xml
  205. socket gps seqpacket 0660 gps system
  206. user gps
  207. group system inet
  208.  
  209. service wpa_supplicant /system/bin/wpa_supplicant -Dwext -ieth0 -c/data/misc/wifi/wpa_supplicant.conf
  210. socket wpa_eth0 dgram 0660 wifi wifi
  211. disabled
  212. oneshot
  213.  
  214. service dhcpcd_eth0 /system/bin/dhcpcd -ABKL
  215. disabled
  216. oneshot
  217.  
  218. service iprenew_eth0 /system/bin/dhcpcd -n
  219. disabled
  220. oneshot
  221.  
  222. service bdaddr /system/bin/bdaddr_read
  223. user root
  224. disabled
  225. oneshot
  226.  
  227. on property:init.svc.bootanim=running
  228. start bdaddr
  229.  
  230. service hciattach /system/bin/brcm_patchram_plus --enable_hci --enable_lpm \
  231. --baudrate 3000000 --patchram /vendor/firmware/bcm4329.hcd /dev/s3c2410_serial0
  232. user bluetooth
  233. group bluetooth net_bt_admin
  234. disabled
  235. oneshot
  236.  
  237. # bugreport is triggered by holding down volume down, volume up and power
  238. service bugreport /system/bin/dumpstate -d -v -o /sdcard/bugreports/bugreport
  239. disabled
  240. oneshot
  241. keycodes 114 115 116
  242.  
  243. service servicemanager /system/bin/servicemanager
  244. user system
  245. critical
  246. onrestart restart zygote
  247. onrestart restart media
  248.  
  249. service vold /system/bin/vold
  250. socket vold stream 0660 root mount
  251. ioprio be 2
  252.  
  253. service netd /system/bin/netd
  254. socket netd stream 0660 root system
  255. socket dnsproxyd stream 0660 root inet
  256.  
  257. service debuggerd /system/bin/debuggerd
  258.  
  259. service ril-daemon /system/bin/rild
  260. socket rild stream 660 root radio
  261. socket rild-debug stream 660 radio system
  262. user root
  263. group radio cache inet misc audio sdcard_rw net_admin net_raw
  264.  
  265. service zygote /system/bin/app_process -Xzygote /system/bin --zygote --start-system-server
  266. socket zygote stream 666
  267. onrestart write /sys/android_power/request_state wake
  268. onrestart write /sys/power/state on
  269. onrestart restart media
  270. onrestart restart netd
  271.  
  272. service drm /system/bin/drmserver
  273. user root
  274. group root system inet drmrpc
  275.  
  276. service media /system/bin/mediaserver
  277. user media
  278. group system audio camera graphics inet net_bt net_bt_admin net_raw drmrpc
  279. ioprio rt 4
  280.  
  281. service bootanim /system/bin/bootanimation
  282. user graphics
  283. group graphics
  284. disabled
  285. oneshot
  286.  
  287. service dbus /system/bin/dbus-daemon --system --nofork
  288. socket dbus stream 660 bluetooth bluetooth
  289. user bluetooth
  290. group bluetooth net_bt_admin
  291.  
  292. service bluetoothd /system/bin/bluetoothd -n
  293. socket bluetooth stream 660 bluetooth bluetooth
  294. socket dbus_bluetooth stream 660 bluetooth bluetooth
  295. # init.rc does not yet support applying capabilities, so run as root and
  296. # let bluetoothd drop uid to bluetooth with the right linux capabilities
  297. group bluetooth net_bt_admin misc
  298. disabled
  299.  
  300. service hfag /system/bin/sdptool add --channel=10 HFAG
  301. user bluetooth
  302. group bluetooth net_bt_admin
  303. disabled
  304. oneshot
  305.  
  306. service hsag /system/bin/sdptool add --channel=11 HSAG
  307. user bluetooth
  308. group bluetooth net_bt_admin
  309. disabled
  310. oneshot
  311.  
  312. service opush /system/bin/sdptool add --channel=12 OPUSH
  313. user bluetooth
  314. group bluetooth net_bt_admin
  315. disabled
  316. oneshot
  317.  
  318. service pbap /system/bin/sdptool add --channel=19 PBAP
  319. user bluetooth
  320. group bluetooth net_bt_admin
  321. disabled
  322. oneshot
  323.  
  324. service installd /system/bin/installd
  325. socket installd stream 600 system system
  326.  
  327. service racoon /system/bin/racoon
  328. socket racoon stream 600 system system
  329. # racoon will setuid to vpn after getting necessary resources.
  330. group net_admin
  331. disabled
  332. oneshot
  333.  
  334. service mtpd /system/bin/mtpd
  335. socket mtpd stream 600 system system
  336. user vpn
  337. group vpn net_admin net_raw inet
  338. disabled
  339. oneshot
  340.  
  341. service keystore /system/bin/keystore /data/misc/keystore
  342. user keystore
  343. group keystore
  344. socket keystore stream 666
  345.  
  346. service dumpstate /system/bin/dumpstate -s
  347. socket dumpstate stream 0660 shell log
  348. disabled
  349. oneshot
  350.  
  351. service orientationd /system/vendor/bin/orientationd
  352. user compass
  353. group system input
  354.  
  355. service geomagneticd /system/vendor/bin/geomagneticd
  356. user compass
  357. group system input
  358.  
  359. service tvout /system/bin/tvoutserver
  360. user system
  361. group graphics
  362.  
  363. service console /system/bin/sh
  364. console
  365. disabled
  366. user shell
  367. group log
  368.  
  369. service initd_support /sbin/initd_support.sh
  370. user root
  371. oneshot
  372.  
  373. service 3g_route /system/bin/route add default dev pdp0
  374. disabled
  375. oneshot
  376.  
  377. on property:ro.secure=0
  378. start console
  379.  
  380.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement