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 | |
| 20 | on post-fs-data |
Nick Kralevich | ee8e279 | 2014-02-25 15:59:23 -0800 | [diff] [blame] | 21 | mkdir /data/media 0770 media_rw media_rw |
snchen | 7bcf785 | 2014-04-23 15:31:13 +0800 | [diff] [blame^] | 22 | mkdir /data/nvcam 0700 media camera |
Martijn Coenen | ce78914 | 2014-02-25 10:50:01 -0800 | [diff] [blame] | 23 | |
| 24 | # NFC: create data/nfc for nv storage |
| 25 | mkdir /data/nfc 0770 nfc nfc |
| 26 | mkdir /data/nfc/param 0770 nfc nfc |
Nick Kralevich | ee8e279 | 2014-02-25 15:59:23 -0800 | [diff] [blame] | 27 | |
Colin Cross | a9e55ed | 2013-10-07 14:15:18 -0700 | [diff] [blame] | 28 | setprop vold.post_fs_data_done 1 |
| 29 | |
| 30 | on boot |
Thomas.TT_lin | a605545 | 2013-11-01 17:18:18 +0800 | [diff] [blame] | 31 | # bluetooth |
| 32 | # change back to bluetooth from system |
| 33 | chown bluetooth net_bt_stack /data/misc/bluetooth |
| 34 | |
| 35 | # power down interface |
| 36 | write /sys/class/rfkill/rfkill0/state 0 |
| 37 | |
Alex Ray | d85a680 | 2013-11-06 14:35:51 -0800 | [diff] [blame] | 38 | mount debugfs /sys/kernel/debug /sys/kernel/debug mode=755 |
Colin Cross | a9e55ed | 2013-10-07 14:15:18 -0700 | [diff] [blame] | 39 | |
Colin Cross | 9752ee9 | 2013-10-11 11:34:55 -0700 | [diff] [blame] | 40 | setprop ro.radio.noril true |
| 41 | |
Colin Cross | a9e55ed | 2013-10-07 14:15:18 -0700 | [diff] [blame] | 42 | # Set up kernel tracing, but disable it by default |
| 43 | chmod 0222 /sys/kernel/debug/tracing/trace_marker |
| 44 | write /sys/kernel/debug/tracing/tracing_on 0 |
| 45 | |
Colin Cross | 11a18c2 | 2014-02-19 17:49:10 -0800 | [diff] [blame] | 46 | write /sys/module/tegra3_emc/parameters/emc_enable 0 |
| 47 | #write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 1000000 |
Roger Hsieh | f2a4966 | 2014-02-20 19:03:07 +0800 | [diff] [blame] | 48 | #write /sys/module/cpu_tegra/parameters/cpu_user_cap 700000 |
| 49 | write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive |
| 50 | write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor interactive |
| 51 | write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 510000 |
| 52 | write /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq 510000 |
Roger Hsieh | f2a4966 | 2014-02-20 19:03:07 +0800 | [diff] [blame] | 53 | #write /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed 700000 |
| 54 | #write /sys/devices/system/cpu/cpu1/cpufreq/scaling_setspeed 700000 |
Colin Cross | 11a18c2 | 2014-02-19 17:49:10 -0800 | [diff] [blame] | 55 | #write /sys/devices/system/cpu/cpufreq/interactive/boost_factor 2 |
| 56 | #write /sys/devices/system/cpu/cpufreq/interactive/sustain_load 80 |
| 57 | write /sys/devices/system/cpu/cpuquiet/tegra_cpuquiet/enable 0 |
Dan Willemsen | 7a6c5be | 2013-10-10 15:23:22 -0700 | [diff] [blame] | 58 | |
Todd Poynor | bd0b1b5 | 2014-01-06 16:17:48 -0800 | [diff] [blame] | 59 | chmod 0444 /sys/kernel/debug/bq2419x-regs |
| 60 | |
Colin Cross | a9e55ed | 2013-10-07 14:15:18 -0700 | [diff] [blame] | 61 | on fs |
| 62 | mount_all /fstab.flounder |
| 63 | setprop ro.crypto.fuse_sdcard true |
| 64 | |
edwin_tung | e98db7e | 2013-12-05 12:08:00 +0800 | [diff] [blame] | 65 | # for GPS files |
| 66 | mkdir /data/gps 0770 gps system |
| 67 | chown gps system /data/gps |
| 68 | chmod 0770 /data/gps |
| 69 | |
Todd Poynor | 6d9f0a4 | 2014-02-26 14:58:02 -0800 | [diff] [blame] | 70 | # HACK: prevent suspend, pending fixes |
| 71 | write /sys/power/wake_lock VolantisHackPreventSuspend |
| 72 | |
Colin Cross | a9e55ed | 2013-10-07 14:15:18 -0700 | [diff] [blame] | 73 | # virtual sdcard daemon running as media_rw (1023) |
| 74 | service sdcard /system/bin/sdcard -u 1023 -g 1023 -l /data/media /mnt/shell/emulated |
| 75 | class late_start |
| 76 | |
| 77 | service battery_charger /charger |
| 78 | class charger |
Nick Kralevich | 56176f8 | 2014-01-27 17:00:49 -0800 | [diff] [blame] | 79 | seclabel u:r:healthd:s0 |
Colin Cross | a9e55ed | 2013-10-07 14:15:18 -0700 | [diff] [blame] | 80 | |
| 81 | # Set watchdog timer to 30 seconds and pet it every 10 seconds to get a 20 second margin |
| 82 | service watchdogd /sbin/watchdogd 10 20 |
| 83 | class core |
Colin Cross | dfae163 | 2013-10-10 16:03:40 -0700 | [diff] [blame] | 84 | disabled |
Colin Cross | a9e55ed | 2013-10-07 14:15:18 -0700 | [diff] [blame] | 85 | seclabel u:r:watchdogd:s0 |
| 86 | |
| 87 | # on userdebug and eng builds, enable kgdb on the serial console |
| 88 | on property:ro.debuggable=1 |
Colin Cross | f6f0fe7 | 2013-11-21 14:28:56 -0800 | [diff] [blame] | 89 | write /sys/module/kgdboc/parameters/kgdboc ttyFIQ0 |
Colin Cross | a9e55ed | 2013-10-07 14:15:18 -0700 | [diff] [blame] | 90 | write /sys/module/fiq_debugger/parameters/kgdb_enable 1 |
| 91 | |
edwin_tung | ac7b5c1 | 2014-01-24 19:46:58 +0800 | [diff] [blame] | 92 | # for loading correct gps hal share libraries |
| 93 | on property:ro.boot.baseband=N/A |
| 94 | setprop ro.hardware.gps bcm47521 |
| 95 | |
| 96 | on property:ro.baseband=unknown |
| 97 | setprop ro.hardware.gps bcm47521 |
| 98 | |
Colin Cross | a9e55ed | 2013-10-07 14:15:18 -0700 | [diff] [blame] | 99 | # bugreport is triggered by holding down volume down, volume up and power |
| 100 | service 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 | |
Colin Cross | 0b50922 | 2013-10-10 17:03:43 -0700 | [diff] [blame] | 107 | service p2p_supplicant /system/bin/wpa_supplicant \ |
| 108 | -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ |
Dmitry Shmidt | 29d7c83 | 2013-10-16 09:28:28 -0700 | [diff] [blame] | 109 | -I/system/etc/wifi/p2p_supplicant_overlay.conf \ |
Dmitry Shmidt | 6402884 | 2013-10-14 17:20:23 -0700 | [diff] [blame] | 110 | -puse_p2p_group_interface=1p2p_device=1 \ |
Dmitry Shmidt | f7a3fd2 | 2014-03-07 12:30:55 -0800 | [diff] [blame] | 111 | -m/data/misc/wifi/p2p_supplicant.conf \ |
Colin Cross | 0b50922 | 2013-10-10 17:03:43 -0700 | [diff] [blame] | 112 | -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0 |
| 113 | class main |
| 114 | socket wpa_wlan0 dgram 660 wifi wifi |
| 115 | disabled |
| 116 | oneshot |
| 117 | |
edwin_tung | e98db7e | 2013-12-05 12:08:00 +0800 | [diff] [blame] | 118 | service gpsd /system/bin/glgps -c /system/etc/gpsconfig.xml |
| 119 | class main |
edwin_tung | ac7b5c1 | 2014-01-24 19:46:58 +0800 | [diff] [blame] | 120 | disabled |
edwin_tung | e98db7e | 2013-12-05 12:08:00 +0800 | [diff] [blame] | 121 | user gps |
| 122 | socket gps seqpacket 0660 gps system |
| 123 | group system inet sdcard_rw sdcard_r |
| 124 | |
edwin_tung | ac7b5c1 | 2014-01-24 19:46:58 +0800 | [diff] [blame] | 125 | on property:ro.hardware.gps=bcm47521 |
| 126 | start gpsd |
| 127 | |
Colin Cross | 0b50922 | 2013-10-10 17:03:43 -0700 | [diff] [blame] | 128 | service wpa_supplicant /system/bin/wpa_supplicant \ |
| 129 | -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ |
| 130 | -I/system/etc/wifi/wpa_supplicant_overlay.conf \ |
Colin Cross | 0b50922 | 2013-10-10 17:03:43 -0700 | [diff] [blame] | 131 | -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0 |
| 132 | class main |
| 133 | socket wpa_wlan0 dgram 660 wifi wifi |
| 134 | disabled |
| 135 | oneshot |
| 136 | |
| 137 | service dhcpcd_wlan0 /system/bin/dhcpcd -aABDKL |
| 138 | class main |
| 139 | disabled |
| 140 | oneshot |
| 141 | |
| 142 | service dhcpcd_p2p /system/bin/dhcpcd -aABKL |
| 143 | class main |
| 144 | disabled |
| 145 | oneshot |
| 146 | |
Thomas.TT_Lin | 4cda858 | 2014-03-13 22:19:36 +0800 | [diff] [blame] | 147 | service dhcpcd_bt-pan /system/bin/dhcpcd -aABDKL |
| 148 | class main |
| 149 | disabled |
| 150 | oneshot |
| 151 | |
Colin Cross | 0b50922 | 2013-10-10 17:03:43 -0700 | [diff] [blame] | 152 | service iprenew_wlan0 /system/bin/dhcpcd -n |
| 153 | class main |
| 154 | disabled |
| 155 | oneshot |
| 156 | |
| 157 | service iprenew_p2p /system/bin/dhcpcd -n |
| 158 | class main |
| 159 | disabled |
| 160 | oneshot |