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