blob: 6f1cd67579b6c9e3531ad17552bf1955c6bf118c [file] [log] [blame]
Colin Crossa9e55ed2013-10-07 14:15:18 -07001import init.flounder.usb.rc
2
3on init
4 # See storage config details at http://source.android.com/tech/storage/
5 mkdir /mnt/shell/emulated 0700 shell shell
6 mkdir /storage/emulated 0555 root root
7
8 export EXTERNAL_STORAGE /storage/emulated/legacy
9 export EMULATED_STORAGE_SOURCE /mnt/shell/emulated
10 export EMULATED_STORAGE_TARGET /storage/emulated
11
12 # Support legacy paths
13 symlink /storage/emulated/legacy /sdcard
14 symlink /storage/emulated/legacy /mnt/sdcard
15 symlink /storage/emulated/legacy /storage/sdcard0
16 symlink /mnt/shell/emulated/0 /storage/emulated/legacy
17
Colin Cross4ace0af2013-10-10 19:38:59 -070018 mkdir /factory
19
Colin Crossa9e55ed2013-10-07 14:15:18 -070020on post-fs-data
21 setprop vold.post_fs_data_done 1
Colin Cross0b509222013-10-10 17:03:43 -070022 mkdir /data/misc/wifi 0770 wifi wifi
23 mkdir /data/misc/wifi/sockets 0770 wifi wifi
24 mkdir /data/misc/dhcp 0770 dhcp dhcp
25 chown dhcp dhcp /data/misc/dhcp
Colin Crossa9e55ed2013-10-07 14:15:18 -070026
27on boot
Thomas.TT_lina6055452013-11-01 17:18:18 +080028 # bluetooth
29 # change back to bluetooth from system
30 chown bluetooth net_bt_stack /data/misc/bluetooth
31
32 # power down interface
33 write /sys/class/rfkill/rfkill0/state 0
34
Alex Rayd85a6802013-11-06 14:35:51 -080035 mount debugfs /sys/kernel/debug /sys/kernel/debug mode=755
Colin Crossa9e55ed2013-10-07 14:15:18 -070036
Colin Cross9752ee92013-10-11 11:34:55 -070037 setprop ro.radio.noril true
38
Colin Crossa9e55ed2013-10-07 14:15:18 -070039 # Set up kernel tracing, but disable it by default
40 chmod 0222 /sys/kernel/debug/tracing/trace_marker
41 write /sys/kernel/debug/tracing/tracing_on 0
42
Dan Willemsen9d50dba2013-10-10 15:27:47 -070043 write /sys/devices/system/cpu/cpuquiet/tegra_cpuquiet/no_lp 0
44
Dan Willemsen9d50dba2013-10-10 15:27:47 -070045 write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive
Dan Willemsen7c786712013-11-18 18:01:18 -080046 write /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq 624000
47 write /sys/devices/system/cpu/cpufreq/interactive/target_loads "65 228000:75 624000:85"
48 write /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay 20000
Dan Willemsen9d50dba2013-10-10 15:27:47 -070049
50 write /sys/devices/system/cpu/cpuquiet/tegra_cpuquiet/down_delay 500
Dan Willemsen7c786712013-11-18 18:01:18 -080051 write /sys/devices/system/cpu/cpuquiet/tegra_cpuquiet/idle_top_freq 444000
Dan Willemsen9d50dba2013-10-10 15:27:47 -070052 write /sys/devices/system/cpu/cpuquiet/current_governor runnable
53
54 # Enable power gating of fast CPU's
55 write /sys/module/cpuidle_t11x/parameters/cpu_power_gating_in_idle 31
Dan Willemsen7c786712013-11-18 18:01:18 -080056 write /sys/module/cpuidle_t11x/parameters/slow_cluster_power_gating_noncpu 1
Dan Willemsen9d50dba2013-10-10 15:27:47 -070057 write /sys/module/cpuidle/parameters/power_down_in_idle 1
58
Dan Willemsen7c786712013-11-18 18:01:18 -080059 write /sys/module/cpuidle_t11x/parameters/stop_mc_clk_in_idle 1
Dan Willemsen7a6c5be2013-10-10 15:23:22 -070060 write /sys/devices/system/cpu/cpuquiet/current_governor runnable
61 write /sys/devices/system/cpu/cpuquiet/tegra_cpuquiet/enable 1
62
Todd Poynorbd0b1b52014-01-06 16:17:48 -080063 chmod 0444 /sys/kernel/debug/bq2419x-regs
64
Colin Crossa9e55ed2013-10-07 14:15:18 -070065on fs
66 mount_all /fstab.flounder
67 setprop ro.crypto.fuse_sdcard true
68
edwin_tunge98db7e2013-12-05 12:08:00 +080069 # for GPS files
70 mkdir /data/gps 0770 gps system
71 chown gps system /data/gps
72 chmod 0770 /data/gps
73
74 # GPS init
75 write /sys/class/gpio/export 61
76 write /sys/class/gpio/gpio61/value 0
77 write /sys/class/gpio/gpio61/direction out
78 chown gps system /sys/class/gpio/gpio61/value
79 chmod 0660 /sys/class/gpio/gpio61/value
80
joe_kao80c34712014-01-08 21:53:52 +080081 # Touch init
82 chmod 0770 /system/vendor/bin/touch_fusion
83 chmod 0660 /system/vendor/firmware/touch_fusion.cfg
84 chmod 0660 /system/vendor/firmware/maxim_fp35.bin
85
Colin Crossa9e55ed2013-10-07 14:15:18 -070086# virtual sdcard daemon running as media_rw (1023)
87service sdcard /system/bin/sdcard -u 1023 -g 1023 -l /data/media /mnt/shell/emulated
88 class late_start
89
90service battery_charger /charger
91 class charger
Nick Kralevich56176f82014-01-27 17:00:49 -080092 seclabel u:r:healthd:s0
Colin Crossa9e55ed2013-10-07 14:15:18 -070093
94# Set watchdog timer to 30 seconds and pet it every 10 seconds to get a 20 second margin
95service watchdogd /sbin/watchdogd 10 20
96 class core
Colin Crossdfae1632013-10-10 16:03:40 -070097 disabled
Colin Crossa9e55ed2013-10-07 14:15:18 -070098 seclabel u:r:watchdogd:s0
99
100# on userdebug and eng builds, enable kgdb on the serial console
101on property:ro.debuggable=1
Colin Crossf6f0fe72013-11-21 14:28:56 -0800102 write /sys/module/kgdboc/parameters/kgdboc ttyFIQ0
Colin Crossa9e55ed2013-10-07 14:15:18 -0700103 write /sys/module/fiq_debugger/parameters/kgdb_enable 1
104
105# bugreport is triggered by holding down volume down, volume up and power
106service bugreport /system/bin/dumpstate -d -p -B \
107 -o /data/data/com.android.shell/files/bugreports/bugreport
108 class main
109 disabled
110 oneshot
111 keycodes 114 115 116
112
113service rm_ts_service /vendor/bin/rm_ts_server
114 class main
115 user system
116 group system input
Colin Cross0b509222013-10-10 17:03:43 -0700117
118service p2p_supplicant /system/bin/wpa_supplicant \
119 -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
Dmitry Shmidt29d7c832013-10-16 09:28:28 -0700120 -I/system/etc/wifi/p2p_supplicant_overlay.conf \
Colin Cross0b509222013-10-10 17:03:43 -0700121 -O/data/misc/wifi/sockets \
Dmitry Shmidt64028842013-10-14 17:20:23 -0700122 -puse_p2p_group_interface=1p2p_device=1 \
Colin Cross0b509222013-10-10 17:03:43 -0700123 -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
124 class main
125 socket wpa_wlan0 dgram 660 wifi wifi
126 disabled
127 oneshot
128
edwin_tunge98db7e2013-12-05 12:08:00 +0800129service gpsd /system/bin/glgps -c /system/etc/gpsconfig.xml
130 class main
131 user gps
132 socket gps seqpacket 0660 gps system
133 group system inet sdcard_rw sdcard_r
134
Colin Cross0b509222013-10-10 17:03:43 -0700135service wpa_supplicant /system/bin/wpa_supplicant \
136 -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
137 -I/system/etc/wifi/wpa_supplicant_overlay.conf \
138 -O/data/misc/wifi/sockets \
139 -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
140 class main
141 socket wpa_wlan0 dgram 660 wifi wifi
142 disabled
143 oneshot
144
145service dhcpcd_wlan0 /system/bin/dhcpcd -aABDKL
146 class main
147 disabled
148 oneshot
149
150service dhcpcd_p2p /system/bin/dhcpcd -aABKL
151 class main
152 disabled
153 oneshot
154
155service iprenew_wlan0 /system/bin/dhcpcd -n
156 class main
157 disabled
158 oneshot
159
160service iprenew_p2p /system/bin/dhcpcd -n
161 class main
162 disabled
163 oneshot
joe_kao80c34712014-01-08 21:53:52 +0800164
165# Maxim touch setting
166service touch_fusion \
167 /vendor/bin/touch_fusion \
168 daemon touch_fusion /vendor/firmware/touch_fusion.cfg
169 class main
170 user root