blob: 81074ab49369047d31076660bbed84118d248c7a [file] [log] [blame]
Colin Crossa9e55ed2013-10-07 14:15:18 -07001import init.flounder.usb.rc
2
3on init
Colin Cross455af6d2014-04-22 14:33:04 -07004 start watchdogd
5
Colin Crossa9e55ed2013-10-07 14:15:18 -07006 # 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
20on post-fs-data
Nick Kralevichee8e2792014-02-25 15:59:23 -080021 mkdir /data/media 0770 media_rw media_rw
snchen7bcf7852014-04-23 15:31:13 +080022 mkdir /data/nvcam 0700 media camera
Martijn Coenence789142014-02-25 10:50:01 -080023
24 # NFC: create data/nfc for nv storage
25 mkdir /data/nfc 0770 nfc nfc
26 mkdir /data/nfc/param 0770 nfc nfc
Nick Kralevichee8e2792014-02-25 15:59:23 -080027
JP Abgrall0921d062014-05-05 13:43:17 -070028 # for GPS files
29 mkdir /data/gps 0770 gps system
30
tim.tm_lin66eb40d2014-06-11 16:25:38 +080031 # modem init
32 mkdir /data/qcks 0770 system system
33 mkdir /data/efs 0771 system system
tim.tm_lin3dcf3082014-07-01 17:50:41 +080034 mkdir /data/qcks/mdm 0770 system system
tim.tm_lin66eb40d2014-06-11 16:25:38 +080035
Colin Crossa9e55ed2013-10-07 14:15:18 -070036 setprop vold.post_fs_data_done 1
37
38on boot
Thomas.TT_lina6055452013-11-01 17:18:18 +080039 # bluetooth
40 # change back to bluetooth from system
41 chown bluetooth net_bt_stack /data/misc/bluetooth
42
43 # power down interface
44 write /sys/class/rfkill/rfkill0/state 0
45
Alex Rayd85a6802013-11-06 14:35:51 -080046 mount debugfs /sys/kernel/debug /sys/kernel/debug mode=755
Colin Crossa9e55ed2013-10-07 14:15:18 -070047
48 # Set up kernel tracing, but disable it by default
49 chmod 0222 /sys/kernel/debug/tracing/trace_marker
50 write /sys/kernel/debug/tracing/tracing_on 0
51
Colin Cross11a18c22014-02-19 17:49:10 -080052 write /sys/module/tegra3_emc/parameters/emc_enable 0
53 #write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 1000000
Roger Hsiehf2a49662014-02-20 19:03:07 +080054 #write /sys/module/cpu_tegra/parameters/cpu_user_cap 700000
55 write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive
56 write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor interactive
57 write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 510000
58 write /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq 510000
Roger Hsiehf2a49662014-02-20 19:03:07 +080059 #write /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed 700000
60 #write /sys/devices/system/cpu/cpu1/cpufreq/scaling_setspeed 700000
Colin Cross11a18c22014-02-19 17:49:10 -080061 #write /sys/devices/system/cpu/cpufreq/interactive/boost_factor 2
62 #write /sys/devices/system/cpu/cpufreq/interactive/sustain_load 80
63 write /sys/devices/system/cpu/cpuquiet/tegra_cpuquiet/enable 0
Dan Willemsen7a6c5be2013-10-10 15:23:22 -070064
Ruchi Kandoida9413a2014-08-05 17:19:24 -070065 restorecon_recursive /sys/devices/system/cpu/cpufreq/interactive
66 chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_rate
67 chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/timer_rate
68 chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_slack
69 chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/timer_slack
70 chown system system /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
71 chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
72 chown system system /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
73 chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
74 chown system system /sys/devices/system/cpu/cpufreq/interactive/target_loads
75 chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/target_loads
76 chown system system /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
77 chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
78 chown system system /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
79 chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
80 chown system system /sys/devices/system/cpu/cpufreq/interactive/boost
81 chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/boost
82 chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse
83 chown system system /sys/devices/system/cpu/cpufreq/interactive/input_boost
84 chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/input_boost
85 chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
86 chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
87 chown system system /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
88 chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
89
Colin Crosse35e4462014-05-23 14:38:33 -070090 # Enable CC4
91 write /sys/devices/system/cpu/cpu0/cpuidle/state1/disabled 0
92 write /sys/devices/system/cpu/cpu1/cpuidle/state1/disabled 0
93
Colin Cross2b58cd92014-07-02 12:56:24 -070094 # b/13568411: make lazy vfree flush thresholds match flush_tlb_range
95 write /proc/sys/vm/lazy_vfree_tlb_flush_all_threshold 524288
96
Todd Poynorbd0b1b52014-01-06 16:17:48 -080097 chmod 0444 /sys/kernel/debug/bq2419x-regs
98
mark_tzengb06eb942014-05-09 14:30:08 +080099 write /proc/sys/net/core/rmem_max 1048576
100 write /proc/sys/net/core/wmem_max 1048576
101
Colin Crossa9e55ed2013-10-07 14:15:18 -0700102on fs
103 mount_all /fstab.flounder
104 setprop ro.crypto.fuse_sdcard true
105
106# virtual sdcard daemon running as media_rw (1023)
107service sdcard /system/bin/sdcard -u 1023 -g 1023 -l /data/media /mnt/shell/emulated
108 class late_start
109
110service battery_charger /charger
111 class charger
Nick Kralevich56176f82014-01-27 17:00:49 -0800112 seclabel u:r:healthd:s0
Colin Crossa9e55ed2013-10-07 14:15:18 -0700113
114# Set watchdog timer to 30 seconds and pet it every 10 seconds to get a 20 second margin
115service watchdogd /sbin/watchdogd 10 20
116 class core
Colin Crossdfae1632013-10-10 16:03:40 -0700117 disabled
Colin Crossa9e55ed2013-10-07 14:15:18 -0700118 seclabel u:r:watchdogd:s0
119
120# on userdebug and eng builds, enable kgdb on the serial console
121on property:ro.debuggable=1
Colin Crossf6f0fe72013-11-21 14:28:56 -0800122 write /sys/module/kgdboc/parameters/kgdboc ttyFIQ0
Colin Crossa9e55ed2013-10-07 14:15:18 -0700123 write /sys/module/fiq_debugger/parameters/kgdb_enable 1
124
edwin_tungac7b5c12014-01-24 19:46:58 +0800125# for loading correct gps hal share libraries
126on property:ro.boot.baseband=N/A
127 setprop ro.hardware.gps bcm47521
JP Abgrall0921d062014-05-05 13:43:17 -0700128 enable gpsd
edwin_tungac7b5c12014-01-24 19:46:58 +0800129
Dmitry Shmidt4690f5c2014-06-12 14:31:01 -0700130on property:ro.boot.baseband=US
131 write /sys/module/bcmdhd/parameters/nvram_path /system/etc/wifi/bcmdhd_lte.cal
132
133on property:ro.boot.baseband=ROW
134 write /sys/module/bcmdhd/parameters/nvram_path /system/etc/wifi/bcmdhd_lte.cal
135
edwin_tungac7b5c12014-01-24 19:46:58 +0800136on property:ro.baseband=unknown
137 setprop ro.hardware.gps bcm47521
JP Abgrall0921d062014-05-05 13:43:17 -0700138 enable gpsd
edwin_tungac7b5c12014-01-24 19:46:58 +0800139
tim.tm_line5976c12014-05-16 14:41:26 +0800140# for telephony function
141on property:ro.boot.baseband=N/A
142 setprop ro.radio.noril true
143 stop ril-daemon
144
tim.tm_lin3dcf3082014-07-01 17:50:41 +0800145on property:ro.hw.ks.ready=1
146 start ril-daemon
147
148on property:ro.boot.baseband=ROW
tim.tm_line5976c12014-05-16 14:41:26 +0800149 stop ril-daemon
tim.tm_lin3dcf3082014-07-01 17:50:41 +0800150 enable kickstart
tim.tm_line5976c12014-05-16 14:41:26 +0800151 mkdir /dev/socket/qmux_radio 0770 radio radio
152 chmod 2770 /dev/socket/qmux_radio
153 setprop ro.baseband.arch mdm
tim.tm_lin3dcf3082014-07-01 17:50:41 +0800154 enable qmuxd
155 enable netmgrd
Daniel Rosenberg4cefd4a2014-06-09 17:50:22 -0700156 setprop rild.libpath /vendor/lib64/libril-qc-qmi-1.so
tim.tm_line5976c12014-05-16 14:41:26 +0800157 setprop rild.libargs "-e wwan0"
tim.tm_lin3dcf3082014-07-01 17:50:41 +0800158
159on property:ro.boot.baseband=US
160 stop ril-daemon
161 enable kickstart
162 mkdir /dev/socket/qmux_radio 0770 radio radio
163 chmod 2770 /dev/socket/qmux_radio
164 setprop ro.baseband.arch mdm
165 enable qmuxd
166 enable netmgrd
167 setprop rild.libpath /vendor/lib64/libril-qc-qmi-1.so
168 setprop rild.libargs "-e wwan0"
tim.tm_line5976c12014-05-16 14:41:26 +0800169
Colin Crossa9e55ed2013-10-07 14:15:18 -0700170# bugreport is triggered by holding down volume down, volume up and power
171service bugreport /system/bin/dumpstate -d -p -B \
172 -o /data/data/com.android.shell/files/bugreports/bugreport
JP Abgrall0921d062014-05-05 13:43:17 -0700173 class late_start
Colin Crossa9e55ed2013-10-07 14:15:18 -0700174 disabled
175 oneshot
176 keycodes 114 115 116
177
Colin Cross0b509222013-10-10 17:03:43 -0700178service p2p_supplicant /system/bin/wpa_supplicant \
179 -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
Dmitry Shmidt29d7c832013-10-16 09:28:28 -0700180 -I/system/etc/wifi/p2p_supplicant_overlay.conf \
Dmitry Shmidt64028842013-10-14 17:20:23 -0700181 -puse_p2p_group_interface=1p2p_device=1 \
Dmitry Shmidtf7a3fd22014-03-07 12:30:55 -0800182 -m/data/misc/wifi/p2p_supplicant.conf \
Colin Cross0b509222013-10-10 17:03:43 -0700183 -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
JP Abgrall0921d062014-05-05 13:43:17 -0700184 class late_start
Colin Cross0b509222013-10-10 17:03:43 -0700185 socket wpa_wlan0 dgram 660 wifi wifi
186 disabled
187 oneshot
188
JP Abgrallc8d00112014-05-07 11:14:27 -0700189service gpsd /system/bin/glgps -c /system/etc/gpsconfig.xml
JP Abgrall0921d062014-05-05 13:43:17 -0700190 class late_start
edwin_tungac7b5c12014-01-24 19:46:58 +0800191 disabled
edwin_tunge98db7e2013-12-05 12:08:00 +0800192 user gps
193 socket gps seqpacket 0660 gps system
194 group system inet sdcard_rw sdcard_r
195
Colin Cross0b509222013-10-10 17:03:43 -0700196service wpa_supplicant /system/bin/wpa_supplicant \
197 -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
198 -I/system/etc/wifi/wpa_supplicant_overlay.conf \
Colin Cross0b509222013-10-10 17:03:43 -0700199 -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
JP Abgrall0921d062014-05-05 13:43:17 -0700200 class late_start
Colin Cross0b509222013-10-10 17:03:43 -0700201 socket wpa_wlan0 dgram 660 wifi wifi
202 disabled
203 oneshot
204
205service dhcpcd_wlan0 /system/bin/dhcpcd -aABDKL
206 class main
207 disabled
208 oneshot
209
210service dhcpcd_p2p /system/bin/dhcpcd -aABKL
211 class main
212 disabled
213 oneshot
214
Thomas.TT_Lin4cda8582014-03-13 22:19:36 +0800215service dhcpcd_bt-pan /system/bin/dhcpcd -aABDKL
216 class main
217 disabled
218 oneshot
219
Colin Cross0b509222013-10-10 17:03:43 -0700220service iprenew_wlan0 /system/bin/dhcpcd -n
221 class main
222 disabled
223 oneshot
224
225service iprenew_p2p /system/bin/dhcpcd -n
226 class main
227 disabled
228 oneshot
tim.tm_line5976c12014-05-16 14:41:26 +0800229
Daniel Rosenberg4cefd4a2014-06-09 17:50:22 -0700230service kickstart /vendor/bin/qcks -i /vendor/firmware/mdm/image/ -r /data/qcks/mdm/
tim.tm_lin3dcf3082014-07-01 17:50:41 +0800231 class late_start
232 disabled
tim.tm_line5976c12014-05-16 14:41:26 +0800233 user system
234 group system
235 oneshot
236
Daniel Rosenberg4cefd4a2014-06-09 17:50:22 -0700237service qmuxd /vendor/bin/qmuxd
tim.tm_lin3dcf3082014-07-01 17:50:41 +0800238 class late_start
tim.tm_line5976c12014-05-16 14:41:26 +0800239 disabled
240 user system
241 group system radio
242
Daniel Rosenberg4cefd4a2014-06-09 17:50:22 -0700243service netmgrd /vendor/bin/netmgrd
tim.tm_lin3dcf3082014-07-01 17:50:41 +0800244 class late_start
tim.tm_line5976c12014-05-16 14:41:26 +0800245 disabled
246 group system radio