Colin Cross | a9e55ed | 2013-10-07 14:15:18 -0700 | [diff] [blame] | 1 | import init.flounder.usb.rc |
| 2 | |
| 3 | on init |
Colin Cross | 455af6d | 2014-04-22 14:33:04 -0700 | [diff] [blame] | 4 | start watchdogd |
| 5 | |
Colin Cross | a9e55ed | 2013-10-07 14:15:18 -0700 | [diff] [blame] | 6 | # See storage config details at http://source.android.com/tech/storage/ |
| 7 | mkdir /mnt/shell/emulated 0700 shell shell |
| 8 | mkdir /storage/emulated 0555 root root |
| 9 | |
| 10 | export EXTERNAL_STORAGE /storage/emulated/legacy |
| 11 | export EMULATED_STORAGE_SOURCE /mnt/shell/emulated |
| 12 | export EMULATED_STORAGE_TARGET /storage/emulated |
| 13 | |
| 14 | # Support legacy paths |
| 15 | symlink /storage/emulated/legacy /sdcard |
| 16 | symlink /storage/emulated/legacy /mnt/sdcard |
| 17 | symlink /storage/emulated/legacy /storage/sdcard0 |
| 18 | symlink /mnt/shell/emulated/0 /storage/emulated/legacy |
| 19 | |
Greg Hackmann | 8823583 | 2014-08-08 13:17:45 -0700 | [diff] [blame] | 20 | on post-fs |
weizhung_ding | 15e890a | 2014-08-19 17:41:15 +0800 | [diff] [blame] | 21 | write /sys/power/gpu_power_on 1 |
Greg Hackmann | 8823583 | 2014-08-08 13:17:45 -0700 | [diff] [blame] | 22 | write /sys/module/input_cfboost/parameters/gpu_wakeup 1 |
Daniel Rosenberg | 85a3394 | 2014-09-12 19:58:51 +0000 | [diff] [blame] | 23 | # Turn on swap |
| 24 | swapon_all /fstab.flounder |
| 25 | |
| 26 | # Swap in only 1 page at a time |
| 27 | write /proc/sys/vm/page-cluster 0 |
Greg Hackmann | 8823583 | 2014-08-08 13:17:45 -0700 | [diff] [blame] | 28 | |
Colin Cross | a9e55ed | 2013-10-07 14:15:18 -0700 | [diff] [blame] | 29 | on post-fs-data |
Nick Kralevich | ee8e279 | 2014-02-25 15:59:23 -0800 | [diff] [blame] | 30 | mkdir /data/media 0770 media_rw media_rw |
snchen | 7bcf785 | 2014-04-23 15:31:13 +0800 | [diff] [blame] | 31 | mkdir /data/nvcam 0700 media camera |
Martijn Coenen | ce78914 | 2014-02-25 10:50:01 -0800 | [diff] [blame] | 32 | |
| 33 | # NFC: create data/nfc for nv storage |
| 34 | mkdir /data/nfc 0770 nfc nfc |
| 35 | mkdir /data/nfc/param 0770 nfc nfc |
Nick Kralevich | ee8e279 | 2014-02-25 15:59:23 -0800 | [diff] [blame] | 36 | |
Arve Hjønnevåg | 36dff43 | 2014-08-28 15:16:57 -0700 | [diff] [blame] | 37 | # secure os storage |
| 38 | mkdir /data/ss 0700 system system |
| 39 | |
JP Abgrall | 0921d06 | 2014-05-05 13:43:17 -0700 | [diff] [blame] | 40 | # for GPS files |
| 41 | mkdir /data/gps 0770 gps system |
| 42 | |
tim.tm_lin | 66eb40d | 2014-06-11 16:25:38 +0800 | [diff] [blame] | 43 | # modem init |
| 44 | mkdir /data/qcks 0770 system system |
| 45 | mkdir /data/efs 0771 system system |
tim.tm_lin | 3dcf308 | 2014-07-01 17:50:41 +0800 | [diff] [blame] | 46 | mkdir /data/qcks/mdm 0770 system system |
tim.tm_lin | 66eb40d | 2014-06-11 16:25:38 +0800 | [diff] [blame] | 47 | |
Colin Cross | a9e55ed | 2013-10-07 14:15:18 -0700 | [diff] [blame] | 48 | setprop vold.post_fs_data_done 1 |
| 49 | |
| 50 | on boot |
Thomas.TT_lin | a605545 | 2013-11-01 17:18:18 +0800 | [diff] [blame] | 51 | # bluetooth |
| 52 | # change back to bluetooth from system |
| 53 | chown bluetooth net_bt_stack /data/misc/bluetooth |
| 54 | |
| 55 | # power down interface |
| 56 | write /sys/class/rfkill/rfkill0/state 0 |
| 57 | |
Alex Ray | d85a680 | 2013-11-06 14:35:51 -0800 | [diff] [blame] | 58 | mount debugfs /sys/kernel/debug /sys/kernel/debug mode=755 |
Colin Cross | a9e55ed | 2013-10-07 14:15:18 -0700 | [diff] [blame] | 59 | |
| 60 | # Set up kernel tracing, but disable it by default |
| 61 | chmod 0222 /sys/kernel/debug/tracing/trace_marker |
| 62 | write /sys/kernel/debug/tracing/tracing_on 0 |
| 63 | |
Colin Cross | 11a18c2 | 2014-02-19 17:49:10 -0800 | [diff] [blame] | 64 | write /sys/module/tegra3_emc/parameters/emc_enable 0 |
| 65 | #write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 1000000 |
Roger Hsieh | f2a4966 | 2014-02-20 19:03:07 +0800 | [diff] [blame] | 66 | #write /sys/module/cpu_tegra/parameters/cpu_user_cap 700000 |
| 67 | write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive |
| 68 | write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor interactive |
| 69 | write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 510000 |
| 70 | write /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq 510000 |
Roger Hsieh | f2a4966 | 2014-02-20 19:03:07 +0800 | [diff] [blame] | 71 | #write /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed 700000 |
| 72 | #write /sys/devices/system/cpu/cpu1/cpufreq/scaling_setspeed 700000 |
Colin Cross | 11a18c2 | 2014-02-19 17:49:10 -0800 | [diff] [blame] | 73 | #write /sys/devices/system/cpu/cpufreq/interactive/boost_factor 2 |
| 74 | #write /sys/devices/system/cpu/cpufreq/interactive/sustain_load 80 |
| 75 | write /sys/devices/system/cpu/cpuquiet/tegra_cpuquiet/enable 0 |
Dan Willemsen | 7a6c5be | 2013-10-10 15:23:22 -0700 | [diff] [blame] | 76 | |
Ruchi Kandoi | da9413a | 2014-08-05 17:19:24 -0700 | [diff] [blame] | 77 | restorecon_recursive /sys/devices/system/cpu/cpufreq/interactive |
| 78 | chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_rate |
| 79 | chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/timer_rate |
| 80 | chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_slack |
| 81 | chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/timer_slack |
| 82 | chown system system /sys/devices/system/cpu/cpufreq/interactive/min_sample_time |
| 83 | chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/min_sample_time |
| 84 | chown system system /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq |
| 85 | chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq |
| 86 | chown system system /sys/devices/system/cpu/cpufreq/interactive/target_loads |
| 87 | chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/target_loads |
| 88 | chown system system /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load |
| 89 | chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load |
| 90 | chown system system /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay |
| 91 | chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay |
| 92 | chown system system /sys/devices/system/cpu/cpufreq/interactive/boost |
| 93 | chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/boost |
| 94 | chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse |
| 95 | chown system system /sys/devices/system/cpu/cpufreq/interactive/input_boost |
| 96 | chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/input_boost |
| 97 | chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration |
| 98 | chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration |
| 99 | chown system system /sys/devices/system/cpu/cpufreq/interactive/io_is_busy |
| 100 | chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/io_is_busy |
| 101 | |
Colin Cross | e35e446 | 2014-05-23 14:38:33 -0700 | [diff] [blame] | 102 | # Enable CC4 |
| 103 | write /sys/devices/system/cpu/cpu0/cpuidle/state1/disabled 0 |
| 104 | write /sys/devices/system/cpu/cpu1/cpuidle/state1/disabled 0 |
| 105 | |
Colin Cross | 2b58cd9 | 2014-07-02 12:56:24 -0700 | [diff] [blame] | 106 | # b/13568411: make lazy vfree flush thresholds match flush_tlb_range |
| 107 | write /proc/sys/vm/lazy_vfree_tlb_flush_all_threshold 524288 |
| 108 | |
Todd Poynor | bd0b1b5 | 2014-01-06 16:17:48 -0800 | [diff] [blame] | 109 | chmod 0444 /sys/kernel/debug/bq2419x-regs |
| 110 | |
mark_tzeng | b06eb94 | 2014-05-09 14:30:08 +0800 | [diff] [blame] | 111 | write /proc/sys/net/core/rmem_max 1048576 |
| 112 | write /proc/sys/net/core/wmem_max 1048576 |
| 113 | |
Colin Cross | a9e55ed | 2013-10-07 14:15:18 -0700 | [diff] [blame] | 114 | on fs |
| 115 | mount_all /fstab.flounder |
| 116 | setprop ro.crypto.fuse_sdcard true |
| 117 | |
| 118 | # virtual sdcard daemon running as media_rw (1023) |
| 119 | service sdcard /system/bin/sdcard -u 1023 -g 1023 -l /data/media /mnt/shell/emulated |
| 120 | class late_start |
| 121 | |
| 122 | service battery_charger /charger |
| 123 | class charger |
Nick Kralevich | 56176f8 | 2014-01-27 17:00:49 -0800 | [diff] [blame] | 124 | seclabel u:r:healthd:s0 |
Colin Cross | a9e55ed | 2013-10-07 14:15:18 -0700 | [diff] [blame] | 125 | |
| 126 | # Set watchdog timer to 30 seconds and pet it every 10 seconds to get a 20 second margin |
| 127 | service watchdogd /sbin/watchdogd 10 20 |
| 128 | class core |
Colin Cross | dfae163 | 2013-10-10 16:03:40 -0700 | [diff] [blame] | 129 | disabled |
Colin Cross | a9e55ed | 2013-10-07 14:15:18 -0700 | [diff] [blame] | 130 | seclabel u:r:watchdogd:s0 |
| 131 | |
| 132 | # on userdebug and eng builds, enable kgdb on the serial console |
| 133 | on property:ro.debuggable=1 |
Colin Cross | f6f0fe7 | 2013-11-21 14:28:56 -0800 | [diff] [blame] | 134 | write /sys/module/kgdboc/parameters/kgdboc ttyFIQ0 |
Colin Cross | a9e55ed | 2013-10-07 14:15:18 -0700 | [diff] [blame] | 135 | write /sys/module/fiq_debugger/parameters/kgdb_enable 1 |
| 136 | |
edwin_tung | ac7b5c1 | 2014-01-24 19:46:58 +0800 | [diff] [blame] | 137 | # for loading correct gps hal share libraries |
| 138 | on property:ro.boot.baseband=N/A |
| 139 | setprop ro.hardware.gps bcm47521 |
JP Abgrall | 0921d06 | 2014-05-05 13:43:17 -0700 | [diff] [blame] | 140 | enable gpsd |
edwin_tung | ac7b5c1 | 2014-01-24 19:46:58 +0800 | [diff] [blame] | 141 | |
Dmitry Shmidt | 4690f5c | 2014-06-12 14:31:01 -0700 | [diff] [blame] | 142 | on property:ro.boot.baseband=US |
| 143 | write /sys/module/bcmdhd/parameters/nvram_path /system/etc/wifi/bcmdhd_lte.cal |
| 144 | |
| 145 | on property:ro.boot.baseband=ROW |
| 146 | write /sys/module/bcmdhd/parameters/nvram_path /system/etc/wifi/bcmdhd_lte.cal |
| 147 | |
edwin_tung | ac7b5c1 | 2014-01-24 19:46:58 +0800 | [diff] [blame] | 148 | on property:ro.baseband=unknown |
| 149 | setprop ro.hardware.gps bcm47521 |
JP Abgrall | 0921d06 | 2014-05-05 13:43:17 -0700 | [diff] [blame] | 150 | enable gpsd |
edwin_tung | ac7b5c1 | 2014-01-24 19:46:58 +0800 | [diff] [blame] | 151 | |
tim.tm_lin | e5976c1 | 2014-05-16 14:41:26 +0800 | [diff] [blame] | 152 | # for telephony function |
| 153 | on property:ro.boot.baseband=N/A |
| 154 | setprop ro.radio.noril true |
| 155 | stop ril-daemon |
| 156 | |
tim.tm_lin | 3dcf308 | 2014-07-01 17:50:41 +0800 | [diff] [blame] | 157 | on property:ro.hw.ks.ready=1 |
| 158 | start ril-daemon |
| 159 | |
| 160 | on property:ro.boot.baseband=ROW |
tim.tm_lin | e5976c1 | 2014-05-16 14:41:26 +0800 | [diff] [blame] | 161 | stop ril-daemon |
tim.tm_lin | 3dcf308 | 2014-07-01 17:50:41 +0800 | [diff] [blame] | 162 | enable kickstart |
tim.tm_lin | e5976c1 | 2014-05-16 14:41:26 +0800 | [diff] [blame] | 163 | mkdir /dev/socket/qmux_radio 0770 radio radio |
| 164 | chmod 2770 /dev/socket/qmux_radio |
| 165 | setprop ro.baseband.arch mdm |
tim.tm_lin | 3dcf308 | 2014-07-01 17:50:41 +0800 | [diff] [blame] | 166 | enable qmuxd |
| 167 | enable netmgrd |
Daniel Rosenberg | 4cefd4a | 2014-06-09 17:50:22 -0700 | [diff] [blame] | 168 | setprop rild.libpath /vendor/lib64/libril-qc-qmi-1.so |
tim.tm_lin | e5976c1 | 2014-05-16 14:41:26 +0800 | [diff] [blame] | 169 | setprop rild.libargs "-e wwan0" |
tim.tm_lin | 3dcf308 | 2014-07-01 17:50:41 +0800 | [diff] [blame] | 170 | |
| 171 | on property:ro.boot.baseband=US |
| 172 | stop ril-daemon |
| 173 | enable kickstart |
| 174 | mkdir /dev/socket/qmux_radio 0770 radio radio |
| 175 | chmod 2770 /dev/socket/qmux_radio |
| 176 | setprop ro.baseband.arch mdm |
| 177 | enable qmuxd |
| 178 | enable netmgrd |
| 179 | setprop rild.libpath /vendor/lib64/libril-qc-qmi-1.so |
| 180 | setprop rild.libargs "-e wwan0" |
tim.tm_lin | e5976c1 | 2014-05-16 14:41:26 +0800 | [diff] [blame] | 181 | |
Colin Cross | a9e55ed | 2013-10-07 14:15:18 -0700 | [diff] [blame] | 182 | # bugreport is triggered by holding down volume down, volume up and power |
| 183 | service bugreport /system/bin/dumpstate -d -p -B \ |
| 184 | -o /data/data/com.android.shell/files/bugreports/bugreport |
JP Abgrall | 0921d06 | 2014-05-05 13:43:17 -0700 | [diff] [blame] | 185 | class late_start |
Colin Cross | a9e55ed | 2013-10-07 14:15:18 -0700 | [diff] [blame] | 186 | disabled |
| 187 | oneshot |
| 188 | keycodes 114 115 116 |
| 189 | |
Colin Cross | 0b50922 | 2013-10-10 17:03:43 -0700 | [diff] [blame] | 190 | service p2p_supplicant /system/bin/wpa_supplicant \ |
| 191 | -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ |
Dmitry Shmidt | 29d7c83 | 2013-10-16 09:28:28 -0700 | [diff] [blame] | 192 | -I/system/etc/wifi/p2p_supplicant_overlay.conf \ |
Dmitry Shmidt | 6402884 | 2013-10-14 17:20:23 -0700 | [diff] [blame] | 193 | -puse_p2p_group_interface=1p2p_device=1 \ |
Dmitry Shmidt | f7a3fd2 | 2014-03-07 12:30:55 -0800 | [diff] [blame] | 194 | -m/data/misc/wifi/p2p_supplicant.conf \ |
Colin Cross | 0b50922 | 2013-10-10 17:03:43 -0700 | [diff] [blame] | 195 | -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0 |
JP Abgrall | 0921d06 | 2014-05-05 13:43:17 -0700 | [diff] [blame] | 196 | class late_start |
Colin Cross | 0b50922 | 2013-10-10 17:03:43 -0700 | [diff] [blame] | 197 | socket wpa_wlan0 dgram 660 wifi wifi |
| 198 | disabled |
| 199 | oneshot |
| 200 | |
JP Abgrall | c8d0011 | 2014-05-07 11:14:27 -0700 | [diff] [blame] | 201 | service gpsd /system/bin/glgps -c /system/etc/gpsconfig.xml |
JP Abgrall | 0921d06 | 2014-05-05 13:43:17 -0700 | [diff] [blame] | 202 | class late_start |
edwin_tung | ac7b5c1 | 2014-01-24 19:46:58 +0800 | [diff] [blame] | 203 | disabled |
edwin_tung | e98db7e | 2013-12-05 12:08:00 +0800 | [diff] [blame] | 204 | user gps |
| 205 | socket gps seqpacket 0660 gps system |
| 206 | group system inet sdcard_rw sdcard_r |
| 207 | |
Colin Cross | 0b50922 | 2013-10-10 17:03:43 -0700 | [diff] [blame] | 208 | service wpa_supplicant /system/bin/wpa_supplicant \ |
| 209 | -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ |
| 210 | -I/system/etc/wifi/wpa_supplicant_overlay.conf \ |
Colin Cross | 0b50922 | 2013-10-10 17:03:43 -0700 | [diff] [blame] | 211 | -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0 |
JP Abgrall | 0921d06 | 2014-05-05 13:43:17 -0700 | [diff] [blame] | 212 | class late_start |
Colin Cross | 0b50922 | 2013-10-10 17:03:43 -0700 | [diff] [blame] | 213 | socket wpa_wlan0 dgram 660 wifi wifi |
| 214 | disabled |
| 215 | oneshot |
| 216 | |
| 217 | service dhcpcd_wlan0 /system/bin/dhcpcd -aABDKL |
| 218 | class main |
| 219 | disabled |
| 220 | oneshot |
| 221 | |
| 222 | service dhcpcd_p2p /system/bin/dhcpcd -aABKL |
| 223 | class main |
| 224 | disabled |
| 225 | oneshot |
| 226 | |
Thomas.TT_Lin | 4cda858 | 2014-03-13 22:19:36 +0800 | [diff] [blame] | 227 | service dhcpcd_bt-pan /system/bin/dhcpcd -aABDKL |
| 228 | class main |
| 229 | disabled |
| 230 | oneshot |
| 231 | |
Badhri Jagan Sridharan | 52976e2 | 2014-09-29 12:12:33 -0700 | [diff] [blame] | 232 | service dhcpcd_eth0 /system/bin/dhcpcd -aABDKL |
| 233 | class late_start |
| 234 | disabled |
| 235 | oneshot |
| 236 | |
Colin Cross | 0b50922 | 2013-10-10 17:03:43 -0700 | [diff] [blame] | 237 | service iprenew_wlan0 /system/bin/dhcpcd -n |
| 238 | class main |
| 239 | disabled |
| 240 | oneshot |
| 241 | |
Badhri Jagan Sridharan | 52976e2 | 2014-09-29 12:12:33 -0700 | [diff] [blame] | 242 | service iprenew_eth0 /system/bin/dhcpcd -n |
| 243 | class late_start |
| 244 | disabled |
| 245 | oneshot |
| 246 | |
Colin Cross | 0b50922 | 2013-10-10 17:03:43 -0700 | [diff] [blame] | 247 | service iprenew_p2p /system/bin/dhcpcd -n |
| 248 | class main |
| 249 | disabled |
| 250 | oneshot |
tim.tm_lin | e5976c1 | 2014-05-16 14:41:26 +0800 | [diff] [blame] | 251 | |
Dmitry Shmidt | 4966d6b | 2014-10-01 11:17:41 -0700 | [diff] [blame^] | 252 | service iprenew_bt-pan /system/bin/dhcpcd -n |
| 253 | class main |
| 254 | disabled |
| 255 | oneshot |
| 256 | |
Daniel Rosenberg | 4cefd4a | 2014-06-09 17:50:22 -0700 | [diff] [blame] | 257 | service kickstart /vendor/bin/qcks -i /vendor/firmware/mdm/image/ -r /data/qcks/mdm/ |
tim.tm_lin | 3dcf308 | 2014-07-01 17:50:41 +0800 | [diff] [blame] | 258 | class late_start |
| 259 | disabled |
tim.tm_lin | e5976c1 | 2014-05-16 14:41:26 +0800 | [diff] [blame] | 260 | user system |
| 261 | group system |
| 262 | oneshot |
| 263 | |
Daniel Rosenberg | 4cefd4a | 2014-06-09 17:50:22 -0700 | [diff] [blame] | 264 | service qmuxd /vendor/bin/qmuxd |
tim.tm_lin | 3dcf308 | 2014-07-01 17:50:41 +0800 | [diff] [blame] | 265 | class late_start |
tim.tm_lin | e5976c1 | 2014-05-16 14:41:26 +0800 | [diff] [blame] | 266 | disabled |
| 267 | user system |
| 268 | group system radio |
| 269 | |
Daniel Rosenberg | 4cefd4a | 2014-06-09 17:50:22 -0700 | [diff] [blame] | 270 | service netmgrd /vendor/bin/netmgrd |
tim.tm_lin | 3dcf308 | 2014-07-01 17:50:41 +0800 | [diff] [blame] | 271 | class late_start |
tim.tm_lin | e5976c1 | 2014-05-16 14:41:26 +0800 | [diff] [blame] | 272 | disabled |
| 273 | group system radio |
Arve Hjønnevåg | 36dff43 | 2014-08-28 15:16:57 -0700 | [diff] [blame] | 274 | |
| 275 | service tlk_daemon /vendor/bin/tlk_daemon --storagedir /data/ss |
| 276 | class main |
| 277 | group system |