blob: 762ccfdc5a9203da461292813ee2dbdf21d2ff3c [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
Nick Kralevichee8e2792014-02-25 15:59:23 -080021 mkdir /data/media 0770 media_rw media_rw
22 restorecon_recursive /data/media
23
Colin Crossa9e55ed2013-10-07 14:15:18 -070024 setprop vold.post_fs_data_done 1
25
26on boot
Thomas.TT_lina6055452013-11-01 17:18:18 +080027 # bluetooth
28 # change back to bluetooth from system
29 chown bluetooth net_bt_stack /data/misc/bluetooth
30
31 # power down interface
32 write /sys/class/rfkill/rfkill0/state 0
33
Alex Rayd85a6802013-11-06 14:35:51 -080034 mount debugfs /sys/kernel/debug /sys/kernel/debug mode=755
Colin Crossa9e55ed2013-10-07 14:15:18 -070035
Colin Cross9752ee92013-10-11 11:34:55 -070036 setprop ro.radio.noril true
37
Colin Crossa9e55ed2013-10-07 14:15:18 -070038 # Set up kernel tracing, but disable it by default
39 chmod 0222 /sys/kernel/debug/tracing/trace_marker
40 write /sys/kernel/debug/tracing/tracing_on 0
41
Colin Cross11a18c22014-02-19 17:49:10 -080042 write /sys/module/tegra3_emc/parameters/emc_enable 0
43 #write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 1000000
Roger Hsiehf2a49662014-02-20 19:03:07 +080044 #write /sys/module/cpu_tegra/parameters/cpu_user_cap 700000
45 write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive
46 write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor interactive
47 write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 510000
48 write /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq 510000
49 write /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 1224000
50 write /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq 1224000
51 #write /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed 700000
52 #write /sys/devices/system/cpu/cpu1/cpufreq/scaling_setspeed 700000
Colin Cross11a18c22014-02-19 17:49:10 -080053 #write /sys/devices/system/cpu/cpufreq/interactive/boost_factor 2
54 #write /sys/devices/system/cpu/cpufreq/interactive/sustain_load 80
55 write /sys/devices/system/cpu/cpuquiet/tegra_cpuquiet/enable 0
Dan Willemsen7a6c5be2013-10-10 15:23:22 -070056
Todd Poynorbd0b1b52014-01-06 16:17:48 -080057 chmod 0444 /sys/kernel/debug/bq2419x-regs
58
Colin Crossa9e55ed2013-10-07 14:15:18 -070059on fs
60 mount_all /fstab.flounder
61 setprop ro.crypto.fuse_sdcard true
62
edwin_tunge98db7e2013-12-05 12:08:00 +080063 # for GPS files
64 mkdir /data/gps 0770 gps system
65 chown gps system /data/gps
66 chmod 0770 /data/gps
67
68 # GPS init
69 write /sys/class/gpio/export 61
70 write /sys/class/gpio/gpio61/value 0
71 write /sys/class/gpio/gpio61/direction out
72 chown gps system /sys/class/gpio/gpio61/value
73 chmod 0660 /sys/class/gpio/gpio61/value
74
joe_kao80c34712014-01-08 21:53:52 +080075 # Touch init
76 chmod 0770 /system/vendor/bin/touch_fusion
77 chmod 0660 /system/vendor/firmware/touch_fusion.cfg
78 chmod 0660 /system/vendor/firmware/maxim_fp35.bin
79
Colin Crossa9e55ed2013-10-07 14:15:18 -070080# virtual sdcard daemon running as media_rw (1023)
81service sdcard /system/bin/sdcard -u 1023 -g 1023 -l /data/media /mnt/shell/emulated
82 class late_start
83
84service battery_charger /charger
85 class charger
Nick Kralevich56176f82014-01-27 17:00:49 -080086 seclabel u:r:healthd:s0
Colin Crossa9e55ed2013-10-07 14:15:18 -070087
88# Set watchdog timer to 30 seconds and pet it every 10 seconds to get a 20 second margin
89service watchdogd /sbin/watchdogd 10 20
90 class core
Colin Crossdfae1632013-10-10 16:03:40 -070091 disabled
Colin Crossa9e55ed2013-10-07 14:15:18 -070092 seclabel u:r:watchdogd:s0
93
94# on userdebug and eng builds, enable kgdb on the serial console
95on property:ro.debuggable=1
Colin Crossf6f0fe72013-11-21 14:28:56 -080096 write /sys/module/kgdboc/parameters/kgdboc ttyFIQ0
Colin Crossa9e55ed2013-10-07 14:15:18 -070097 write /sys/module/fiq_debugger/parameters/kgdb_enable 1
98
99# 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
102 class main
103 disabled
104 oneshot
105 keycodes 114 115 116
106
107service rm_ts_service /vendor/bin/rm_ts_server
108 class main
109 user system
110 group system input
Colin Cross0b509222013-10-10 17:03:43 -0700111
112service p2p_supplicant /system/bin/wpa_supplicant \
113 -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
Dmitry Shmidt29d7c832013-10-16 09:28:28 -0700114 -I/system/etc/wifi/p2p_supplicant_overlay.conf \
Colin Cross0b509222013-10-10 17:03:43 -0700115 -O/data/misc/wifi/sockets \
Dmitry Shmidt64028842013-10-14 17:20:23 -0700116 -puse_p2p_group_interface=1p2p_device=1 \
Colin Cross0b509222013-10-10 17:03:43 -0700117 -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
118 class main
119 socket wpa_wlan0 dgram 660 wifi wifi
120 disabled
121 oneshot
122
edwin_tunge98db7e2013-12-05 12:08:00 +0800123service gpsd /system/bin/glgps -c /system/etc/gpsconfig.xml
124 class main
125 user gps
126 socket gps seqpacket 0660 gps system
127 group system inet sdcard_rw sdcard_r
128
Colin Cross0b509222013-10-10 17:03:43 -0700129service wpa_supplicant /system/bin/wpa_supplicant \
130 -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
131 -I/system/etc/wifi/wpa_supplicant_overlay.conf \
132 -O/data/misc/wifi/sockets \
133 -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
134 class main
135 socket wpa_wlan0 dgram 660 wifi wifi
136 disabled
137 oneshot
138
139service dhcpcd_wlan0 /system/bin/dhcpcd -aABDKL
140 class main
141 disabled
142 oneshot
143
144service dhcpcd_p2p /system/bin/dhcpcd -aABKL
145 class main
146 disabled
147 oneshot
148
149service 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