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 24 # create data/gps for GPS demon 25 mkdir /data/gps 770 gps system 26 chown gps system /data/gps 27 chown gps root /sys/class/sec/gps/GPS_PWR_EN/value 28 chmod 660 /sys/class/sec/gps/GPS_PWR_EN/value 29 30 # cpufreq, set ondemand governor 31 write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ondemand 32 33 on fs 34 mkdir /efs 0775 radio radio 35 mount yaffs2 mtd@efs /efs noatime nosuid nodev 36 chmod 770 /efs/bluetooth 37 chmod 770 /efs/imei 38 mount_all /fstab.herring 39 40 export EXTERNAL_STORAGE /storage/sdcard0 41 mkdir /storage 0050 system sdcard_r 42 mkdir /storage/sdcard0 0000 system system 43 symlink /storage/sdcard0 /sdcard 44 symlink /storage/sdcard0 /mnt/sdcard 45 46 # permissions for bluetooth. 47 chown bluetooth bluetooth /efs/bluetooth 48 chown bluetooth bluetooth ro.bt.bdaddr_path 49 chown bluetooth bluetooth /dev/s3c2410_serial0 50 chmod 0600 /dev/s3c2410_serial0 51 chmod 0660 /sys/class/rfkill/rfkill0/state 52 chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state 53 chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type 54 55 # We chown/chmod /efs because mount is run as root + defaults 56 chown radio radio /efs 57 chmod 0775 /efs 58 59 # permissions for NFC 60 setprop ro.nfc.port "I2C" 61 chmod 0600 /dev/pn544 62 chown nfc nfc /dev/pn544 63 64 # Permissions for System Server and daemons. 65 chown system system /sys/class/backlight/s5p_bl/brightness 66 67 # Configure and enable KSM 68 write /sys/kernel/mm/ksm/pages_to_scan 100 69 write /sys/kernel/mm/ksm/sleep_millisecs 500 70 write /sys/kernel/mm/ksm/run 1 71 72 on post-fs-data 73 # wi-fi 74 mkdir /data/misc/wifi/sockets 0770 wifi wifi 75 mkdir /data/misc/dhcp 0770 dhcp dhcp 76 77 # create radio & log for ril daemon 78 mkdir /data/radio 0775 radio radio 79 mkdir /data/radio/log 0775 radio radio 80 81 setprop vold.post_fs_data_done 1 82 83 service gpsd /system/vendor/bin/gpsd -c /vendor/etc/gps.xml 84 class main 85 socket gps seqpacket 0660 gps system 86 user gps 87 group system inet 88 89 # create filesystems if necessary 90 service setup_fs /system/bin/setup_fs /dev/block/platform/s3c-sdhci.0/by-name/userdata 91 class core 92 user root 93 group root 94 oneshot 95 96 # 3D init 97 service pvrsrvinit /system/vendor/bin/pvrsrvinit 98 class core 99 user root 100 group root 101 oneshot 102 103 service wpa_supplicant /system/bin/wpa_supplicant -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -e/data/misc/wifi/entropy.bin 104 class main 105 socket wpa_wlan0 dgram 0660 wifi wifi 106 disabled 107 oneshot 108 109 # DHCPCD 110 # wi-fi 111 service dhcpcd_wlan0 /system/bin/dhcpcd -aABKL 112 class main 113 disabled 114 oneshot 115 116 # wimax 117 service dhcpcd_uwbr0 /system/bin/dhcpcd -ABKL 118 class main 119 disabled 120 oneshot 121 122 # bluetooth 123 service dhcpcd_bnep0 /system/bin/dhcpcd -ABKL 124 class main 125 disabled 126 oneshot 127 128 # IP Renew 129 # wi-fi 130 service iprenew_wlan0 /system/bin/dhcpcd -n 131 class main 132 disabled 133 oneshot 134 135 # wimax 136 service iprenew_uwbr0 /system/bin/dhcpcd -n 137 class main 138 disabled 139 oneshot 140 141 # bluetooth 142 service iprenew_bnep0 /system/bin/dhcpcd -n 143 class main 144 disabled 145 oneshot 146 147 service hciattach /system/bin/brcm_patchram_plus --enable_hci --enable_lpm \ 148 --baudrate 3000000 --patchram /vendor/firmware/bcm4329.hcd /dev/s3c2410_serial0 149 class main 150 user bluetooth 151 group bluetooth net_bt_admin 152 disabled 153 oneshot 154 155 # bugreport is triggered by holding down volume down, volume up and power 156 service bugreport /system/bin/bugmailer.sh -v 157 class main 158 disabled 159 oneshot 160 keycodes 114 115 116 161 162 service wimax_route /system/bin/route add default dev uwbr0 163 class main 164 disabled 165 oneshot 166