1 import init.herring.usb.rc 2 3 on boot 4 mount debugfs /sys/kernel/debug /sys/kernel/debug 5 6 setprop ro.build.product herring 7 setprop ro.product.device herring 8 setprop ro.radio.noril yes 9 setprop ro.bt.bdaddr_path "/efs/bluetooth/bt_addr" 10 11 # fake some battery state 12 setprop status.battery.state Slow 13 setprop status.battery.level 5 14 setprop status.battery.level_raw 50 15 setprop status.battery.level_scale 9 16 17 # phone 18 setprop ro.telephony.call_ring.multiple 0 19 20 # change permission for uart_switch 21 chown radio radio /sys/class/sec/uart_switch/UART_SEL/value 22 chmod 660 /sys/class/sec/uart_switch/UART_SEL/value 23 chown radio radio /sys/class/sec/uart_switch/UART_SEL1/value 24 chmod 660 /sys/class/sec/uart_switch/UART_SEL1/value 25 26 # change permission for usb_switch 27 chown radio radio /sys/bus/i2c/drivers/fsa9480/7-0025/switch 28 chmod 660 /sys/bus/i2c/drivers/fsa9480/7-0025/switch 29 30 # create data/gps for GPS demon 31 mkdir /data/gps 770 gps system 32 chown gps system /data/gps 33 34 # cpufreq, set ondemand governor 35 write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ondemand 36 37 on fs 38 mkdir /efs 0775 radio radio 39 mount yaffs2 mtd@efs /efs nosuid nodev 40 chmod 770 /efs/bluetooth 41 chmod 770 /efs/imei 42 mount_all /fstab.herring 43 44 export EXTERNAL_STORAGE /storage/sdcard0 45 mkdir /storage 0050 system sdcard_r 46 mkdir /storage/sdcard0 0000 system system 47 symlink /storage/sdcard0 /sdcard 48 symlink /storage/sdcard0 /mnt/sdcard 49 50 # permissions for bluetooth. 51 chown bluetooth bluetooth /efs/bluetooth 52 chown bluetooth bluetooth ro.bt.bdaddr_path 53 chown bluetooth bluetooth /dev/s3c2410_serial0 54 chmod 0600 /dev/s3c2410_serial0 55 chmod 0660 /sys/class/rfkill/rfkill0/state 56 chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state 57 chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type 58 59 # We chown/chmod /efs because mount is run as root + defaults 60 chown radio radio /efs 61 chmod 0775 /efs 62 63 # permissions for NFC 64 setprop ro.nfc.port "I2C" 65 chmod 0600 /dev/pn544 66 chown nfc nfc /dev/pn544 67 68 # Permissions for System Server and daemons. 69 chown system system /sys/class/backlight/s5p_bl/brightness 70 71 # Configure and enable KSM 72 write /sys/kernel/mm/ksm/pages_to_scan 100 73 write /sys/kernel/mm/ksm/sleep_millisecs 500 74 write /sys/kernel/mm/ksm/run 1 75 76 on post-fs-data 77 # wi-fi 78 mkdir /data/misc/wifi/sockets 0770 wifi wifi 79 mkdir /data/misc/dhcp 0770 dhcp dhcp 80 81 setprop vold.post_fs_data_done 1 82 83 # Define TCP buffer sizes for wimax network 84 # ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax, 85 setprop net.tcp.buffersize.wimax 4096,524288,1048576,4096,16384,110208 86 87 service gpsd /system/vendor/bin/gpsd -c /vendor/etc/gps.xml 88 class main 89 user system 90 group system inet 91 92 # create filesystems if necessary 93 service setup_fs /system/bin/setup_fs /dev/block/platform/s3c-sdhci.0/by-name/userdata 94 class core 95 user root 96 group root 97 oneshot 98 99 # 3D init 100 service pvrsrvinit /system/vendor/bin/pvrsrvinit 101 class core 102 user root 103 group root 104 oneshot 105 106 service wpa_supplicant /system/bin/wpa_supplicant -Dnl80211 -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf 107 class main 108 socket wpa_wlan0 dgram 0660 wifi wifi 109 disabled 110 oneshot 111 112 # DHCPCD 113 # wi-fi 114 service dhcpcd_wlan0 /system/bin/dhcpcd -ABKL 115 class main 116 disabled 117 oneshot 118 119 # wimax 120 service dhcpcd_uwbr0 /system/bin/dhcpcd -ABKL 121 class main 122 disabled 123 oneshot 124 125 # bluetooth 126 service dhcpcd_bnep0 /system/bin/dhcpcd -ABKL 127 class main 128 disabled 129 oneshot 130 131 # IP Renew 132 # wi-fi 133 service iprenew_wlan0 /system/bin/dhcpcd -n 134 class main 135 disabled 136 oneshot 137 138 # wimax 139 service iprenew_uwbr0 /system/bin/dhcpcd -n 140 class main 141 disabled 142 oneshot 143 144 # bluetooth 145 service iprenew_bnep0 /system/bin/dhcpcd -n 146 class main 147 disabled 148 oneshot 149 150 service hciattach /system/bin/brcm_patchram_plus --enable_hci --enable_lpm \ 151 --baudrate 3000000 --patchram /vendor/firmware/bcm4329.hcd /dev/s3c2410_serial0 152 class main 153 user bluetooth 154 group bluetooth net_bt_admin 155 disabled 156 oneshot 157 158 # bugreport is triggered by holding down volume down, volume up and power 159 service bugreport /system/bin/bugmailer.sh -v 160 class main 161 disabled 162 oneshot 163 keycodes 114 115 116 164 165 service wimax_route /system/bin/route add default dev uwbr0 166 class main 167 disabled 168 oneshot 169