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