blob: df1a672a856d72b35c13da38d7d26d7dfb678ce9 [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
Colin Crossa9e55ed2013-10-07 14:15:18 -070031 setprop vold.post_fs_data_done 1
32
33on boot
Thomas.TT_lina6055452013-11-01 17:18:18 +080034 # bluetooth
35 # change back to bluetooth from system
36 chown bluetooth net_bt_stack /data/misc/bluetooth
37
38 # power down interface
39 write /sys/class/rfkill/rfkill0/state 0
40
Alex Rayd85a6802013-11-06 14:35:51 -080041 mount debugfs /sys/kernel/debug /sys/kernel/debug mode=755
Colin Crossa9e55ed2013-10-07 14:15:18 -070042
Colin Cross9752ee92013-10-11 11:34:55 -070043 setprop ro.radio.noril true
44
Colin Crossa9e55ed2013-10-07 14:15:18 -070045 # Set up kernel tracing, but disable it by default
46 chmod 0222 /sys/kernel/debug/tracing/trace_marker
47 write /sys/kernel/debug/tracing/tracing_on 0
48
Colin Cross11a18c22014-02-19 17:49:10 -080049 write /sys/module/tegra3_emc/parameters/emc_enable 0
50 #write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 1000000
Roger Hsiehf2a49662014-02-20 19:03:07 +080051 #write /sys/module/cpu_tegra/parameters/cpu_user_cap 700000
52 write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive
53 write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor interactive
54 write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 510000
55 write /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq 510000
Roger Hsiehf2a49662014-02-20 19:03:07 +080056 #write /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed 700000
57 #write /sys/devices/system/cpu/cpu1/cpufreq/scaling_setspeed 700000
Colin Cross11a18c22014-02-19 17:49:10 -080058 #write /sys/devices/system/cpu/cpufreq/interactive/boost_factor 2
59 #write /sys/devices/system/cpu/cpufreq/interactive/sustain_load 80
60 write /sys/devices/system/cpu/cpuquiet/tegra_cpuquiet/enable 0
Dan Willemsen7a6c5be2013-10-10 15:23:22 -070061
Todd Poynorbd0b1b52014-01-06 16:17:48 -080062 chmod 0444 /sys/kernel/debug/bq2419x-regs
63
Colin Crossa9e55ed2013-10-07 14:15:18 -070064on fs
65 mount_all /fstab.flounder
66 setprop ro.crypto.fuse_sdcard true
67
Todd Poynor6d9f0a42014-02-26 14:58:02 -080068 # HACK: prevent suspend, pending fixes
69 write /sys/power/wake_lock VolantisHackPreventSuspend
70
Colin Crossa9e55ed2013-10-07 14:15:18 -070071# virtual sdcard daemon running as media_rw (1023)
72service sdcard /system/bin/sdcard -u 1023 -g 1023 -l /data/media /mnt/shell/emulated
73 class late_start
74
75service battery_charger /charger
76 class charger
Nick Kralevich56176f82014-01-27 17:00:49 -080077 seclabel u:r:healthd:s0
Colin Crossa9e55ed2013-10-07 14:15:18 -070078
79# Set watchdog timer to 30 seconds and pet it every 10 seconds to get a 20 second margin
80service watchdogd /sbin/watchdogd 10 20
81 class core
Colin Crossdfae1632013-10-10 16:03:40 -070082 disabled
Colin Crossa9e55ed2013-10-07 14:15:18 -070083 seclabel u:r:watchdogd:s0
84
85# on userdebug and eng builds, enable kgdb on the serial console
86on property:ro.debuggable=1
Colin Crossf6f0fe72013-11-21 14:28:56 -080087 write /sys/module/kgdboc/parameters/kgdboc ttyFIQ0
Colin Crossa9e55ed2013-10-07 14:15:18 -070088 write /sys/module/fiq_debugger/parameters/kgdb_enable 1
89
edwin_tungac7b5c12014-01-24 19:46:58 +080090# for loading correct gps hal share libraries
91on property:ro.boot.baseband=N/A
92 setprop ro.hardware.gps bcm47521
JP Abgrall0921d062014-05-05 13:43:17 -070093 enable gpsd
edwin_tungac7b5c12014-01-24 19:46:58 +080094
95on property:ro.baseband=unknown
96 setprop ro.hardware.gps bcm47521
JP Abgrall0921d062014-05-05 13:43:17 -070097 enable gpsd
edwin_tungac7b5c12014-01-24 19:46:58 +080098
Colin Crossa9e55ed2013-10-07 14:15:18 -070099# bugreport is triggered by holding down volume down, volume up and power
100service bugreport /system/bin/dumpstate -d -p -B \
101 -o /data/data/com.android.shell/files/bugreports/bugreport
JP Abgrall0921d062014-05-05 13:43:17 -0700102 class late_start
Colin Crossa9e55ed2013-10-07 14:15:18 -0700103 disabled
104 oneshot
105 keycodes 114 115 116
106
Colin Cross0b509222013-10-10 17:03:43 -0700107service p2p_supplicant /system/bin/wpa_supplicant \
108 -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
Dmitry Shmidt29d7c832013-10-16 09:28:28 -0700109 -I/system/etc/wifi/p2p_supplicant_overlay.conf \
Dmitry Shmidt64028842013-10-14 17:20:23 -0700110 -puse_p2p_group_interface=1p2p_device=1 \
Dmitry Shmidtf7a3fd22014-03-07 12:30:55 -0800111 -m/data/misc/wifi/p2p_supplicant.conf \
Colin Cross0b509222013-10-10 17:03:43 -0700112 -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
JP Abgrall0921d062014-05-05 13:43:17 -0700113 class late_start
Colin Cross0b509222013-10-10 17:03:43 -0700114 socket wpa_wlan0 dgram 660 wifi wifi
115 disabled
116 oneshot
117
JP Abgrallc8d00112014-05-07 11:14:27 -0700118service gpsd /system/bin/glgps -c /system/etc/gpsconfig.xml
JP Abgrall0921d062014-05-05 13:43:17 -0700119 class late_start
edwin_tungac7b5c12014-01-24 19:46:58 +0800120 disabled
edwin_tunge98db7e2013-12-05 12:08:00 +0800121 user gps
122 socket gps seqpacket 0660 gps system
123 group system inet sdcard_rw sdcard_r
124
Colin Cross0b509222013-10-10 17:03:43 -0700125service wpa_supplicant /system/bin/wpa_supplicant \
126 -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
127 -I/system/etc/wifi/wpa_supplicant_overlay.conf \
Colin Cross0b509222013-10-10 17:03:43 -0700128 -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
JP Abgrall0921d062014-05-05 13:43:17 -0700129 class late_start
Colin Cross0b509222013-10-10 17:03:43 -0700130 socket wpa_wlan0 dgram 660 wifi wifi
131 disabled
132 oneshot
133
134service dhcpcd_wlan0 /system/bin/dhcpcd -aABDKL
135 class main
136 disabled
137 oneshot
138
139service dhcpcd_p2p /system/bin/dhcpcd -aABKL
140 class main
141 disabled
142 oneshot
143
Thomas.TT_Lin4cda8582014-03-13 22:19:36 +0800144service dhcpcd_bt-pan /system/bin/dhcpcd -aABDKL
145 class main
146 disabled
147 oneshot
148
Colin Cross0b509222013-10-10 17:03:43 -0700149service iprenew_wlan0 /system/bin/dhcpcd -n
150 class main
151 disabled
152 oneshot
153
154service iprenew_p2p /system/bin/dhcpcd -n
155 class main
156 disabled
157 oneshot