| import init.pecan.usb.rc |
| |
| on early-init |
| |
| mkdir /system |
| mkdir /data 0771 system system |
| mkdir /cache 0771 system cache |
| mkdir /mnt/sdcard 0000 system system |
| mkdir /sd-ext 0771 system system |
| |
| |
| on init |
| |
| # setup the global environment |
| export EXTERNAL_STORAGE /mnt/sdcard |
| export SD_EXT_DIRECTORY /sd-ext |
| export DOWNLOAD_CACHE /cache/download |
| |
| # Backwards Compat - XXX: Going away in G* |
| symlink /mnt/sdcard /sdcard |
| |
| # Add permissions for camera access |
| chmod 0666 /dev/msm_camera/config0 |
| chmod 0666 /dev/msm_camera/control0 |
| chmod 0666 /dev/msm_camera/frame0 |
| chmod 0666 /dev/msm_camera/pic0 |
| |
| # Define the memory thresholds at which the above process classes will |
| # be killed. These numbers are in pages (4k). |
| setprop ro.FOREGROUND_APP_MEM 1536 |
| setprop ro.VISIBLE_APP_MEM 2048 |
| setprop ro.SECONDARY_SERVER_MEM 4096 |
| setprop ro.BACKUP_APP_MEM 4096 |
| setprop ro.HOME_APP_MEM 4096 |
| setprop ro.HIDDEN_APP_MEM 5120 |
| setprop ro.CONTENT_PROVIDER_MEM 5632 |
| setprop ro.EMPTY_APP_MEM 6144 |
| |
| # Import Froyo LMK settings due to its less aggressive nature |
| write /sys/module/lowmemorykiller/parameters/minfree 1536,2048,4096,5120,5632,6144 |
| # Enable low memory killer to check file pages |
| write /sys/module/lowmemorykiller/parameters/minfile 0,0,0,5120,5632,6144 |
| write /sys/module/lowmemorykiller/parameters/check_filepages 1 |
| |
| # fix for enropy service and some other that failed |
| chmod 0755 /data/system/appwidgets.xml |
| chmod 0755 /data/system/entropy.dat |
| chmod 0755 /data/system/wallpaper_info.xml |
| |
| |
| on fs |
| |
| # framebuffer permission for copybit |
| chmod 0666 /dev/graphics/fb0 |
| |
| on post-fs |
| |
| # nv |
| mkdir /data/nv |
| chown system system /data/nv |
| chmod 0711 /data/nv |
| |
| mkdir /data/local/download 0771 system cache |
| mkdir /cache/download 0771 system cache |
| |
| # wifi |
| chmod 0777 /data/misc/wifi/config_mac |
| mkdir /data/audioprop 0777 system system |
| mkdir /data/misc/wifi/sockets 0770 wifi wifi |
| setprop wifi.supplicant_scan_interval 20 |
| setprop wifi.interface wlan0 |
| mkdir /data/misc/dhcp 0777 system system |
| |
| |
| on post-fs-data |
| |
| # wifi |
| mkdir /data/misc/wifi 0770 wifi wifi |
| mkdir /data/misc/wifi/sockets 0770 wifi wifi |
| mkdir /data/misc/dhcp 0770 dhcp dhcp |
| chown dhcp dhcp /data/misc/dhcp |
| |
| |
| # last line for post-fs-data |
| setprop vold.post_fs_data_done 1 |
| |
| |
| on early-boot |
| # set RLIMIT_MEMLOCK to 64MB |
| setrlimit 8 67108864 67108864 |
| |
| on boot |
| |
| # Temporary hack to prevent framebuffer flicker |
| chmod 0777 /sys/class/graphics/fb0/state |
| write /sys/class/graphics/fb0/state 1 |
| |
| # radio |
| mkdir /data/radio 0770 radio radio |
| chmod 2770 /data/radio |
| |
| ## SENSOR |
| mkdir /data/amit 0777 ami304d ami304d |
| chmod 0666 /data/amit/AMI306_Config.ini |
| chmod 0666 /data/amit/AMI306_Config2.ini |
| |
| # liblights |
| chown system system /sys/class/leds/green/brightness |
| chown system system /sys/class/leds/green/blink |
| chown system system /sys/class/leds/amber/brightness |
| chown system system /sys/class/leds/amber/blink |
| chown system system /sys/class/leds/button-backlight/brightness |
| chown system system /sys/class/leds/flashlight/brightness |
| chown system system /sys/class/leds/lcd-backlight/brightness |
| chown system system /sys/class/leds/keyboard-backlight/brightness |
| |
| # wifi |
| mkdir /data/misc 01771 system misc |
| mkdir /data/misc/wifi 0770 system wifi |
| mkdir /data/misc/wifi/sockets |
| chmod 770 /data/misc/wifi/sockets |
| mkdir /data/misc/dhcp 0770 dhcp dhcp |
| chown dhcp dhcp /data/misc/dhcp |
| mkdir /data/system 0775 system system |
| |
| # bluetooth |
| chmod 0660 /dev/ttyHS0 |
| chown bluetooth bluetooth /dev/ttyHS0 |
| chown bluetooth bluetooth /proc/bluetooth/sleep/proto |
| chmod 0660 /sys/class/rfkill/rfkill0/state |
| chmod 0660 /sys/class/rfkill/rfkill0/type |
| |
| chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state |
| chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type |
| write /sys/class/rfkill/rfkill0/state 0 |
| |
| # allow interfaces to get IPv6 address when tethering is enabled |
| write /proc/sys/net/ipv6/conf/rmnet0/accept_ra 2 |
| write /proc/sys/net/ipv6/conf/rmnet1/accept_ra 2 |
| write /proc/sys/net/ipv6/conf/rmnet2/accept_ra 2 |
| |
| # Fast dormancy |
| setprop ro.ril.fast.dormancy.rule 1 |
| setprop ro.ril.fd.scron.timeout 4 |
| setprop ro.ril.fd.scroff.timeout 3 |
| |
| |
| # I/O scheduler |
| chown system system /sys/block/mmcblk0/queue/scheduler |
| chmod 0664 /sys/block/mmcblk0/queue/scheduler |
| |
| # Wakelock debug |
| write /sys/module/wakelock/parameters/debug_mask 7 |
| |
| |
| |
| ############################################################################# |
| ### S E R V I C E S ## |
| ############################################################################# |
| |
| service qmuxd /system/bin/qmuxd |
| class core |
| user radio |
| group radio audio inet bluetooth |
| |
| service ami304d /system/bin/ami304d |
| class main |
| user compass |
| group system |
| |
| service hciattach /system/bin/sh /system/bin/init.qcom.bt.sh |
| class main |
| user bluetooth |
| group bluetooth net_bt_admin |
| disabled |
| |
| service wpa_supplicant /system/bin/logwrapper /system/bin/wpa_supplicant -Dwext -iwlan0 -W -c/data/misc/wifi/wpa_supplicant.conf |
| class main |
| socket wpa_wlan0 dgram 660 wifi wifi |
| group system wifi inet |
| disabled |
| oneshot |
| |
| service dhcpcd_wlan0 /system/bin/dhcpcd -BKA |
| class core |
| disabled |
| oneshot |
| |
| service iprenew_wlan0 /system/bin/dhcpcd -n |
| class main |
| disabled |
| oneshot |
| |
| service dhcpcd_bnep0 /system/bin/dhcpcd -B |
| class main |
| disabled |
| oneshot |
| |
| service iprenew_bnep0 /system/bin/dhcpcd -n |
| class main |
| disabled |
| oneshot |
| |
| service dhcpservice /system/bin/netcfg wlan0 dhcp |
| class main |
| oneshot |
| |
| on property:dev.bootcomplete=1 |
| stop dhcp-service |
| start dhcp-service |
| |
| service setapversion /system/bin/lgapversion |
| class main |
| user radio |
| group radio |
| disabled |
| oneshot |
| |
| on property:gsm.version.baseband=V07u-000-000-MAR-23-2009 |
| start setapversion |
| |
| service hfag /system/bin/sdptool add --channel=10 HFAG |
| class main |
| user bluetooth |
| group bluetooth net_bt_admin |
| disabled |
| oneshot |
| |
| service hsag /system/bin/sdptool add --channel=11 HSAG |
| class main |
| user bluetooth |
| group bluetooth net_bt_admin |
| disabled |
| oneshot |
| |
| service opush /system/bin/sdptool add --channel=12 OPUSH |
| class main |
| user bluetooth |
| group bluetooth net_bt_admin |
| disabled |
| oneshot |
| |
| service pbap /system/bin/sdptool add --channel=19 PBAP |
| class main |
| user bluetooth |
| group bluetooth net_bt_admin |
| disabled |
| oneshot |
| |
| service map /system/bin/sdptool add --channel=16 MAS |
| class main |
| user bluetooth |
| group bluetooth net_bt_admin |
| disabled |
| oneshot |
| |
| service qcom-sh /system/bin/sh /init.qcom.sh |
| class core |
| user root |
| oneshot |
| |
| service qcom-post-boot /system/bin/sh /system/etc/init.qcom.post_boot.sh |
| class main |
| user root |
| disabled |
| oneshot |
| |
| ## Stop dhcpcd when wifi was stopped |
| on property:init.svc.wpa_supplicant=stopped |
| stop dhcpcd_wlan0 |
| |
| ## start qcom-post-boot |
| on property:init.svc.bootanim=stopped |
| start qcom-post-boot |
| |
| ## Read BT address |
| on property:service.brcm.bt.mac=* |
| exec /system/bin/hwaddrs |
| |
| on property:gsm.current.phone-type=1 |
| start setapversion |
| |
| on property:gsm.version.baseband=V07u-000-000-MAR-23-2009 |
| start setapversion |
| |
| # Triggered by the KEY_VOLUME_DOWN+KEY_MENU keycodes |
| service bugreport /system/bin/logwrapper /system/bin/dumpstate -d -v -o /sdcard/bugreports/bugreport |
| keycodes 114 139 |
| class main |
| disabled |
| oneshot |