Advertisement
Guest User

Untitled

a guest
Dec 7th, 2011
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.52 KB | None | 0 0
  1. on post-fs
  2.  
  3.  
  4.  
  5.  
  6.  
  7. # prepare generic keypad name
  8. exec /init_prep_keypad.sh
  9. mount yaffs2 mtd@system /system ro remount
  10. mount ext3 mmc@system /system ro noatime nodiratime remount
  11.  
  12. mount rootfs rootfs / rw remount
  13.  
  14. mkdir /cdrom 0770 system system
  15. mount yaffs2 mtd@cdrom /cdrom ro
  16.  
  17. symlink /dev/ttyGS0 /dev/acm0
  18.  
  19. # Create mountpoints and mount tmpfs
  20. mkdir /pds 0775 system system
  21. mkdir /tmp 0777 system system
  22. mount tmpfs tmpfs /tmp size=2m
  23.  
  24. # Configure kernel options
  25.  
  26. # Disable automatic power control for OHCI USB IPC Temporarily
  27.  
  28.  
  29.  
  30. write /sys/devices/platform/ohci.0/usb1/1-3/power/level auto
  31. # Reset system time
  32. write /sys/class/rtc/rtc0/unsecured_rtc on
  33. # Disable a system-wide task dump on OOM in default
  34. write /proc/sys/vm/oom_dump_tasks 0
  35. write /proc/sys/fs/suid_dumpable 2
  36. # Set core pattern
  37. write /proc/sys/kernel/core_pattern "|/system/bin/coredump %e %p %t"
  38. # Power Management
  39. write /sys/power/sleep_while_idle 1
  40. write /sys/power/enable_off_mode 1
  41. write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ondemand
  42. write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 250000
  43. write /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold 86
  44. write /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate 46875
  45. write /sys/power/sr_vdd1_autocomp 1
  46. write /sys/power/sr_vdd2_autocomp 1
  47. write /sys/power/enable_abb_mode 1
  48. # Change ownership for vibrators
  49. chown system system /sys/class/timed_output/lvibrator/enable
  50. chown system system /sys/class/timed_output/vibrator/enable
  51. chown system system /sys/class/timed_output/vibrator/sweep
  52. # Change permission of vibrators
  53. chmod 0660 /sys/class/timed_output/lvibrator/enable
  54. chmod 0660 /sys/class/timed_output/vibrator/enable
  55. chmod 0660 /sys/class/timed_output/vibrator/sweep
  56. # Mount mtd partitions
  57. # mount /pds as r/w
  58. # We chown/chmod /pds again so because mount is run as root + defaults
  59. mount yaffs2 mtd@pds /pds nosuid nodev no-checkpoint
  60. exec /system/bin/logwrapper /system/bin/mount_ext3.sh pds /pds
  61. chown system system /pds
  62. chmod 0775 /pds
  63. mkdir /pds/public 0775 system shell
  64. chown system shell /pds/public
  65. chmod 0775 /pds/public
  66. #change perms for already created /pds/camera directory
  67. chown system media /pds/camera
  68. chmod 0775 /pds/camera
  69. # setting 0755 permission to scim dir
  70. mkdir /pds/scim 0755 root radio
  71. chown root radio /pds/scim
  72. chmod 0755 /pds/scim
  73. # Mount preinstall partition
  74. mkdir /preinstall 0771 system system
  75. exec /system/bin/logwrapper /system/bin/mount_ext3.sh preinstall /preinstall
  76. chmod 0771 /preinstall
  77. chown system system /preinstall
  78. # Create basic filesystem structure
  79. # create moto specific dirs for mystuff
  80. mkdir /data/download 0775 system system
  81. mkdir /data/download/mystuff 0775 system system
  82. # create moto specific dirs for wifi
  83. mkdir /data/system 0771 system system
  84. # wifi dirs
  85. mkdir /data/misc/wifi 0770 wifi wifi
  86. mkdir /data/misc/wifi/sockets 0770 wifi wifi
  87. mkdir /data/misc/dhcp 0770 dhcp dhcp
  88. chown dhcp dhcp /data/misc/dhcp
  89. mkdir /pds/wifi 0771 wifi wifi
  90. chmod 0664 /pds/wifi/nvs_map.bin
  91. # bluetooth power up/down interface
  92. chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
  93. chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
  94. chmod 0660 /sys/class/rfkill/rfkill0/state
  95. chown bluetooth bluetooth /sys/class/rfkill/rfkill1/type
  96. chown bluetooth bluetooth /sys/class/rfkill/rfkill1/state
  97. chmod 0660 /sys/class/rfkill/rfkill1/state
  98. # create logger folder
  99. mkdir /data/logger 0770 radio log
  100. chown radio log /data/logger
  101. chmod 0770 /data/logger
  102. mkdir /data/panicreports
  103. chown root radio /data/panicreports
  104. chmod 0777 /data/panicreports
  105. # create the lost+found directories, so as to enforce our permissions
  106. mkdir /pds/lost+found 0770
  107. # double check the perms, in case lost+found already exists, and set owner
  108. chown root root /pds/lost+found
  109. chmod 0770 /pds/lost+found
  110. #Create location directory
  111. mkdir /data/location 0771 radio radio
  112. # Create anr directory and change permission to 777 to save trace.txt
  113. mkdir /data/anr
  114. chmod 0777 /data/anr
  115. # create the necessary dirs for tpapi with proper permission
  116. mkdir /pds/security
  117. mkdir /data/tpapi
  118. mkdir /data/tpapi/etc
  119. mkdir /data/tpapi/etc/tpa
  120. mkdir /data/tpapi/etc/tpa/persistent
  121. chmod 2770 /pds/security
  122. chmod 2770 /data/tpapi
  123. chmod 2770 /data/tpapi/etc
  124. chmod 2770 /data/tpapi/etc/tpa
  125. chmod 2770 /data/tpapi/etc/tpa/persistent
  126. chown mot_tpapi mot_tpapi /pds/security
  127. chown mot_tpapi mot_tpapi /data/tpapi
  128. chown mot_tpapi mot_tpapi /data/tpapi/etc
  129. chown mot_tpapi mot_tpapi /data/tpapi/etc/tpa
  130. chown mot_tpapi mot_tpapi /data/tpapi/etc/tpa/persistent
  131. # directory for encryption management tool, enc_mgt_tool
  132. mkdir /data/emt
  133. chmod 0700 /data/emt
  134. # Create wmdrm directory
  135. mkdir /pds/wmdrm 0775 mot_drm mot_drm
  136. # Temp workaround for HP library cleanup
  137. symlink /dev/hp3a-omap /dev/hp3A-omap
  138. # Permissions for video
  139. chmod 0770 /dev/hp3a-omap
  140. chmod 0770 /dev/hplens-omap
  141. chmod 0770 /dev/video0
  142. chmod 0770 /dev/video1
  143. chmod 0770 /dev/video2
  144. chown media camera /dev/hp3a-omap
  145. chown media camera /dev/hplens-omap
  146. chown media camera /dev/video0
  147. chown media graphics /dev/video1
  148. chown media graphics /dev/video2
  149. mount rootfs rootfs / ro remount
  150. # Install kernel modules
  151. insmod /system/lib/modules/sec.ko
  152. # Install product specific kernel modules
  153. exec /system/bin/load_modules.sh
  154. # chown/chmod for FOTA
  155. chown system system /cache/fota
  156. chmod 0770 /cache/fota
  157. on early-boot
  158. # Adjust the out of memory thresholds to account for the larget
  159. # space on sholes. These numbers are in pages (4k). Must be kept
  160. # in sync with init.rc. This must be done before the regular init.rc
  161. # since these properies can't change once set.
  162. setprop ro.FOREGROUND_APP_MEM 2464
  163. setprop ro.VISIBLE_APP_MEM 3712
  164. setprop ro.PERCEPTIBLE_APP_MEM 5632
  165. setprop ro.HEAVY_WEIGHT_APP_MEM 5632
  166. setprop ro.SECONDARY_SERVER_MEM 7392
  167. setprop ro.BACKUP_APP_MEM 7392
  168. setprop ro.HOME_APP_MEM 7392
  169. setprop ro.HIDDEN_APP_MEM 8608
  170. setprop ro.EMPTY_APP_MEM 9856
  171. # Define the BLAN interface
  172. setprop ro.blan.interface usb0
  173. # mount eCryptFS if required
  174. exec /system/bin/sh /system/bin/startup_smc.sh
  175. exec /system/bin/enc_mgt_tool
  176. class_start media_early_init
  177. on boot
  178. # Overwrite what init.rc selected for the memory killer params to match above.
  179. write /sys/module/lowmemorykiller/parameters/minfree 2464,3712,5632,7392,8608,9856
  180. # Define Motorola DBVC ATVC Property defaults (failsafe properties)
  181. setprop ro.sys.atvc_allow_netmon_usb 0
  182. setprop ro.sys.atvc_allow_netmon_ih 0
  183. setprop ro.sys.atvc_allow_res_core 0
  184. setprop ro.sys.atvc_allow_res_panic 0
  185. setprop ro.sys.atvc_allow_all_adb 0
  186. setprop ro.sys.atvc_allow_all_core 0
  187. setprop ro.sys.atvc_allow_efem 0
  188. setprop ro.sys.atvc_allow_bp_log 0
  189. setprop ro.sys.atvc_allow_ap_mot_log 0
  190. # Change the ownership of led files.
  191. chown system system /sys/class/leds/lcd-backlight/als
  192. chown system system /sys/class/leds/lcd-backlight/pwm_mode
  193. chown system system /sys/class/leds/lcd-backlight/brightness
  194. chmod 0660 /sys/class/leds/lcd-backlight/brightness
  195. chown system system /sys/class/leds/keyboard-backlight/brightness
  196. chmod 0660 /sys/class/leds/keyboard-backlight/brightness
  197. chown system system /sys/class/leds/keyboard1-backlight/brightness
  198. chmod 0660 /sys/class/leds/keyboard1-backlight/brightness
  199. chown system system /sys/class/leds/keyboard2-backlight/brightness
  200. chmod 0660 /sys/class/leds/keyboard2-backlight/brightness
  201. chown system system /sys/class/leds/button-backlight/brightness
  202. chmod 0660 /sys/class/leds/button-backlight/brightness
  203. chown system system /sys/class/leds/red/blink
  204. chmod 0660 /sys/class/leds/red/blink
  205. chown system system /sys/class/leds/red/brightness
  206. chmod 0660 /sys/class/leds/red/brightness
  207. chown system system /sys/class/leds/green/brightness
  208. chmod 0660 /sys/class/leds/green/brightness
  209. chown system system /sys/class/leds/blue/brightness
  210. chmod 0660 /sys/class/leds/blue/brightness
  211. chmod 0660 /sys/class/leds/torch-flash/camera_strobe
  212. chmod 0660 /sys/class/leds/torch-flash/flash_light
  213. chown system system /sys/class/leds/torch-flash/camera_strobe
  214. chown system system /sys/class/leds/torch-flash/flash_light
  215. chown system system /sys/class/leds/spotlight/brightness
  216. chmod 0660 /sys/class/backlight/adp8870_bl/brightness
  217. chown system system /sys/class/backlight/adp8870_bl/brightness
  218. chmod 0660 /sys/class/leds/adp8870-led7/brightness
  219. chown system system /sys/class/leds/adp8870-led7/brightness
  220. chmod 0660 /sys/class/backlight/lm3532_bl/brightness
  221. chown system system /sys/class/backlight/lm3532_bl/brightness
  222. # Change the ownership of touch screen file
  223. chown root mot_tcmd /sys/devices/platform/i2c_omap.1/i2c-1/1-004a/irq_enable
  224. # Camera related
  225. chmod 0660 /dev/hplens-omap
  226. chown media camera /dev/hplens-omap
  227. # Enable panic on softlockup
  228. write /proc/sys/kernel/softlockup_panic 1
  229. # Load traffic shaping modules
  230. insmod /system/lib/modules/ifb.ko
  231. insmod /system/lib/modules/act_mirred.ko
  232. insmod /system/lib/modules/sch_ingress.ko
  233. insmod /system/lib/modules/act_police.ko
  234. insmod /system/lib/modules/cls_u32.ko
  235. insmod /system/lib/modules/sch_htb.ko
  236. insmod /system/lib/modules/em_u32.ko
  237. # Load Authentec VPN kernel module
  238. insmod /system/lib/modules/vpnclient.ko
  239. # Start services
  240. exec /system/bin/mot_boot_mode
  241. # Set core max size (2G)
  242. setrlimit 4 2147483648 2147483648
  243. # The properties introduced by moto
  244. on property:sys.chargeonly.mode=1
  245. start battd
  246. start console
  247. write /data/chargeonlymode charging
  248. exec /system/bin/charge_only_mode
  249.  
  250. # aplogd on at boot in emulator
  251. on property:ro.kernel.qemu=1
  252. start aplogd
  253. on property:persist.service.aplogd.enable=1
  254. start aplogd
  255. on property:persist.service.aplogd.enable=0
  256. stop aplogd
  257. #start console for userdebug and eng builds
  258. on property:ro.debuggable=1
  259. start console
  260. # Moto safe power down
  261. on property:sys.reboot=1
  262. exec /system/bin/sleep 10
  263. exec /system/bin/reboot
  264. on property:sys.shutdown=1
  265. exec /system/bin/sleep 10
  266. exec /system/bin/reboot -p
  267. on property:init.svc.wpa_supplicant=stopped
  268. stop dhcpcd_tiwlan0
  269. # The following services are added by moto
  270. # Set property strings for ATVC logging
  271. # This conditionally sets :
  272. # ro.sys.atvc_allow_bp_log
  273. # ro.sys.atvc_allow_gki_log
  274. # ro.sys.atvc_allow_ap_mot_log
  275. # ro.sys.atvc_allow_all_core
  276. # ro.sys.atvc_allow_res_core
  277. # ro.sys.atvc_allow_res_panic
  278. # ro.sys.atvc_allow_efem
  279. # ro.sys.atvc_allow_netmon_usb
  280. # ro.sys.atvc_allow_netmon_ih
  281. # ro.sys.atvc_allow_all_adb
  282. service atvc /system/bin/dbvc_atvc_property_set
  283. user system
  284. group system
  285. oneshot
  286.  
  287. service telnet /system/bin/telnetd
  288. oneshot
  289. service usbd /system/bin/usbd
  290. service battd /system/bin/battd
  291. socket battdsock stream 0660 mot_accy mot_accy
  292. user root
  293. group mot_accy mot_pwric
  294. oneshot
  295. service catcommands /system/bin/catcommands
  296. group radio
  297. service hciattach /system/bin/hciattach -n -t 10 /dev/ttyS1 texasalt 3000000 flow
  298. user bluetooth
  299. group bluetooth net_bt_admin
  300. disabled
  301. service bt_init /system/bin/bt_init
  302. oneshot
  303. service hciattach_rfmd /system/bin/hciattach -n -t 10 /dev/ttyS1 texasalt_rfmd 3000000 flow
  304. user bluetooth
  305. group bluetooth net_bt_admin
  306. disabled
  307. service nap /system/bin/sdptool add NAP
  308. user bluetooth
  309. group bluetooth net_bt_admin
  310. disabled
  311. oneshot
  312. service del_nap /system/bin/sdptool remove NAP
  313. user bluetooth
  314. group bluetooth net_bt_admin
  315. disabled
  316. oneshot
  317. service panu /system/bin/sdptool add PANU
  318. user bluetooth
  319. group bluetooth net_bt_admin
  320. disabled
  321. oneshot
  322. service del_panu /system/bin/sdptool remove PANU
  323. user bluetooth
  324. group bluetooth net_bt_admin
  325. disabled
  326. oneshot
  327. service napics /system/bin/sh /system/bin/napics.sh
  328. user root
  329. disabled
  330. oneshot
  331. service btdhcpd /system/bin/dnsmasq -C /system/etc/btpan.conf
  332. user root
  333. disabled
  334. oneshot
  335. service map /system/bin/sdptool add --channel=20 --network=2 MAP
  336. user bluetooth
  337. group bluetooth net_bt_admin
  338. disabled
  339. oneshot
  340. service tcmd /system/bin/tcmd
  341. group mot_tcmd radio mot_pwric input system log camera graphics mot_accy sdcard_rw audio inet bluetooth wifi compass net_bt_admin mot_tombstone mot_tpapi mount net_raw net_admin
  342. socket local_tcmd stream 0660 mot_tcmd mot_tcmd
  343. socket batch_socket stream 0600 mot_tcmd mot_tcmd
  344. oneshot
  345. service tcmdhelp /system/bin/tcmdhelp
  346. socket tcmdhelp stream 0600 mot_tcmd mot_tcmd
  347. oneshot
  348. disabled
  349. # turn on wifi for tcmd step one
  350. on property:tcmd.load_wlan=1
  351. insmod /system/lib/modules/tiwlan_drv.ko
  352. # turn on wifi for tcmd step two
  353. on property:tcmd.load_wlan=2
  354. start wlan_loader
  355. # turn on wifi for tcmd step three
  356. on property:tcmd.load_wlan=3
  357. exec /system/bin/ifconfig tiwlan0 up
  358. # turn on rfmd wifi for tcmd step four
  359. on property:tcmd.load_wlan=4
  360. start wlan_loader_rfmd
  361. # turn off wifi for tcmd step one
  362. on property:tcmd.unload_wlan=1
  363. exec /system/bin/ifconfig tiwlan0 down
  364. # turn off wifi for tcmd step two
  365. on property:tcmd.unload_wlan=2
  366. exec /system/bin/rmmod tiwlan_drv
  367. setprop wlan.driver.status unloaded
  368. # turn on bluetooth for FM tcmd
  369. on property:tcmd.fm_mod=1
  370. stop hciattach
  371. stop hciattach_rfmd
  372. start bt_init
  373. # turn off bluetooth for FM tcmd
  374. on property:tcmd.fm_mod=0
  375. stop hciattach
  376. stop hciattach_rfmd
  377. # turn on bluetooth for tcmd
  378. on property:tcmd.bt_mod=1
  379. stop hciattach
  380. stop hciattach_rfmd
  381. insmod /system/lib/modules/wl127x_test.ko
  382. #turn off bluetooth for tcmd
  383. on property:tcmd.bt_mod=0
  384. exec /system/bin/rmmod wl127x_test
  385. #execute tcmdhelp
  386. on property:tcmd.start_tcmdhelp=1
  387. start tcmdhelp
  388. # Ecompass daemon
  389. service akmd2 /system/bin/akmd2
  390. user compass
  391. group compass misc input
  392. service wlan_loader /system/bin/wlan_loader -f /system/etc/wifi/fw_wlan1271.bin -i /system/etc/wifi/tiwlan.ini -e /pds/wifi/nvs_map.bin
  393. disabled
  394. oneshot
  395. service wlan_loader_rfmd /system/bin/wlan_loader -f /system/etc/wifi/fw_wlan1271_rfmd.bin -i /system/etc/wifi/tiwlan_rfmd.ini -e /pds/wifi/nvs_map.bin
  396. disabled
  397. oneshot
  398. service wpa_supplicant /system/bin/wpa_supplicant -Dtiwlan0 -itiwlan0 -c/data/misc/wifi/wpa_supplicant.conf
  399. # we will start as root and wpa_supplicant will switch to user wifi
  400. # after setting up the capabilities required for WEXT
  401. # user wifi
  402. # group wifi inet keystore
  403. socket wpa_tiwlan0 dgram 660 wifi wifi
  404. disabled
  405. oneshot
  406. service dhcpcd_tiwlan0 /system/bin/dhcpcd
  407. disabled
  408. oneshot
  409. service dhcpcd_bnep0 /system/bin/dhcpcd
  410. disabled
  411. oneshot
  412. service baseimage /system/bin/dspexec -v -T /system/lib/dsp/baseimage.dof
  413. user media
  414. group media graphics
  415. oneshot
  416. service pvrsrv /system/bin/pvrsrvinit
  417. user root
  418. oneshot
  419. service bugtogo /system/bin/bugtogo.sh
  420. disabled
  421. user root
  422. oneshot
  423. keycodes 114 115 # default to VOLUME_DOWN + VOLUME_UP
  424. service pppd-ril /system/bin/pppd-ril /dev/ttyUSB0 call pppd-ril.options plugin /system/lib/libpppd_plugin-ril.so
  425. user root
  426. disabled
  427. oneshot
  428. service pppd /system/bin/pppd silent ipparam dun plugin /system/lib/libpppd_plugin.so
  429. user root
  430. disabled
  431. oneshot
  432. service pm_init /system/bin/sh /system/usr/bin/pm_init.sh
  433. oneshot
  434. service modemlog /system/bin/modemlog
  435. oneshot
  436. # aplogd is controlled by the persist.service.aplogd.enable system property
  437. service aplogd /system/bin/aplogd
  438. socket ap_aol_cmd stream 666 system system
  439. group log system sdcard_rw
  440. oneshot
  441. service fmradio /system/bin/fmradioserver
  442. disabled
  443. user system
  444. group bluetooth net_bt_admin net_raw net_admin misc
  445. service ftmipcd /system/bin/ftmipcd
  446. user radio
  447. group radio inet
  448. oneshot
  449. service qbplogd /system/bin/qbplogd
  450. user radio
  451. group sdcard_rw radio inet
  452. oneshot
  453. disabled
  454. service dlnasrv /system/bin/dlnasrv
  455. user mot_dlna
  456. group system net_admin sdcard_rw new_raw inet mount misc
  457. oneshot
  458. disabled
  459. service dund_dialup /system/bin/dund --listen --channel=6 --nodetach --dialup
  460. group net_bt net_bt_admin
  461. disabled
  462. oneshot
  463. on property:dev.bootcomplete=1
  464. start savebpver
  465. start loadpreinstalls
  466. service mdm_panicd /system/bin/mdm_panicd
  467. oneshot
  468. #get BP version and save to misc
  469. service savebpver /system/bin/SaveBPVer
  470. oneshot
  471.  
  472. service mot_backup /system/bin/logwrapper /system/xbin/run_backup /system/etc/backup_targets.csv
  473. disabled
  474. user root
  475. oneshot
  476. service mot_restore /system/bin/logwrapper /system/xbin/run_restore /system/etc/backup_targets.csv
  477. disabled
  478. user root
  479. oneshot
  480.  
  481. # ecckeyd daemon has dependency on SMC
  482. # It needs to be root because it needs to be able to read client's /proc/<pid>/status.
  483. # user/group as mot_tpapi/mot_tpapi does not give it enough permission
  484. service ecckeydaemon /system/bin/ecckeyd
  485. socket ecckey_socket stream 660 mot_tpapi mot_tpapi
  486. group mot_tpapi
  487. disabled
  488. oneshot
  489. on property:ro.service.start.smc=1
  490. start ecckeydaemon
  491. service secclkd /system/bin/secclkd
  492. socket secclk_socket stream 660 mot_secclkd mot_secclkd
  493. user mot_tpapi
  494. group mot_tpapi mot_sec_rtc mot_secclkd
  495. oneshot
  496. on property:tcmd.ctrl_adb=1
  497. setprop persist.service.adb.enable 1
  498. setprop persist.factory.allow_adb 1
  499. stop usbd
  500. start usbd
  501. on property:tcmd.ctrl_adb=0
  502. setprop persist.service.adb.enable 0
  503. setprop persist.factory.allow_adb 0
  504. stop usbd
  505. start usbd
  506. #start Authentec VPN service
  507. service vpnclientpm /system/bin/vpnclientpm
  508. oneshot
  509. user root
  510. service loadpreinstalls /system/bin/logwrapper /system/bin/loadpreinstalls.sh
  511. disabled
  512. oneshot
  513. #IKCBS-229 start RescueStarter for MobileRescue
  514. service RescueStarter /system/bin/RescueStarter
  515. user nobody
  516. group input graphics
  517.  
  518. #Check available storage space to execute device encryption or decryprion
  519. on property:sys.mot.encrypt.test=1
  520. exec /system/bin/encryption_test
  521. exec /system/bin/setprop sys.mot.encrypt.test ""
  522.  
  523.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement