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 |
| 21 | setprop vold.post_fs_data_done 1 |
Colin Cross | 0b50922 | 2013-10-10 17:03:43 -0700 | [diff] [blame] | 22 | 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 Cross | a9e55ed | 2013-10-07 14:15:18 -0700 | [diff] [blame] | 26 | |
| 27 | on boot |
Thomas.TT_lin | a605545 | 2013-11-01 17:18:18 +0800 | [diff] [blame^] | 28 | # 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 Ray | d85a680 | 2013-11-06 14:35:51 -0800 | [diff] [blame] | 35 | mount debugfs /sys/kernel/debug /sys/kernel/debug mode=755 |
Colin Cross | a9e55ed | 2013-10-07 14:15:18 -0700 | [diff] [blame] | 36 | |
Colin Cross | 9752ee9 | 2013-10-11 11:34:55 -0700 | [diff] [blame] | 37 | setprop ro.radio.noril true |
| 38 | |
Colin Cross | a9e55ed | 2013-10-07 14:15:18 -0700 | [diff] [blame] | 39 | # 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 Willemsen | 9d50dba | 2013-10-10 15:27:47 -0700 | [diff] [blame] | 43 | write /sys/devices/system/cpu/cpuquiet/tegra_cpuquiet/no_lp 0 |
| 44 | |
| 45 | write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor conservative |
| 46 | write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor conservative |
| 47 | write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor conservative |
| 48 | write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor conservative |
| 49 | |
| 50 | write /sys/devices/system/cpu/cpufreq/conservative/up_threshold 95 |
| 51 | write /sys/devices/system/cpu/cpufreq/conservative/down_threshold 50 |
| 52 | write /sys/devices/system/cpu/cpufreq/conservative/freq_step 3 |
| 53 | |
| 54 | write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive |
| 55 | write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor interactive |
| 56 | write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor interactive |
| 57 | write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor interactive |
| 58 | write /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq 696000 |
| 59 | write /sys/devices/system/cpu/cpufreq/interactive/target_loads "75 228000:85 696000:90 1530000:95" |
| 60 | write /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay "20000 1530000:50000" |
| 61 | |
| 62 | write /sys/devices/system/cpu/cpuquiet/tegra_cpuquiet/down_delay 500 |
| 63 | write /sys/devices/system/cpu/cpuquiet/current_governor runnable |
| 64 | |
| 65 | # Enable power gating of fast CPU's |
| 66 | write /sys/module/cpuidle_t11x/parameters/cpu_power_gating_in_idle 31 |
| 67 | write /sys/module/cpuidle/parameters/power_down_in_idle 1 |
| 68 | |
Dan Willemsen | 7a6c5be | 2013-10-10 15:23:22 -0700 | [diff] [blame] | 69 | write /sys/devices/system/cpu/cpuquiet/current_governor runnable |
| 70 | write /sys/devices/system/cpu/cpuquiet/tegra_cpuquiet/enable 1 |
| 71 | |
Dan Willemsen | 9d50dba | 2013-10-10 15:27:47 -0700 | [diff] [blame] | 72 | write /sys/kernel/debug/cpuidle/force_clkgt_at_vmin 0x2 |
| 73 | |
Colin Cross | a9e55ed | 2013-10-07 14:15:18 -0700 | [diff] [blame] | 74 | on fs |
| 75 | mount_all /fstab.flounder |
| 76 | setprop ro.crypto.fuse_sdcard true |
| 77 | |
| 78 | # virtual sdcard daemon running as media_rw (1023) |
| 79 | service sdcard /system/bin/sdcard -u 1023 -g 1023 -l /data/media /mnt/shell/emulated |
| 80 | class late_start |
| 81 | |
| 82 | service battery_charger /charger |
| 83 | class charger |
| 84 | |
| 85 | # Set watchdog timer to 30 seconds and pet it every 10 seconds to get a 20 second margin |
| 86 | service watchdogd /sbin/watchdogd 10 20 |
| 87 | class core |
Colin Cross | dfae163 | 2013-10-10 16:03:40 -0700 | [diff] [blame] | 88 | disabled |
Colin Cross | a9e55ed | 2013-10-07 14:15:18 -0700 | [diff] [blame] | 89 | seclabel u:r:watchdogd:s0 |
| 90 | |
| 91 | # on userdebug and eng builds, enable kgdb on the serial console |
| 92 | on property:ro.debuggable=1 |
| 93 | write /sys/module/kgdboc/parameters/kgdboc ttyFIQ2 |
| 94 | write /sys/module/fiq_debugger/parameters/kgdb_enable 1 |
| 95 | |
| 96 | # bugreport is triggered by holding down volume down, volume up and power |
| 97 | service bugreport /system/bin/dumpstate -d -p -B \ |
| 98 | -o /data/data/com.android.shell/files/bugreports/bugreport |
| 99 | class main |
| 100 | disabled |
| 101 | oneshot |
| 102 | keycodes 114 115 116 |
| 103 | |
| 104 | service rm_ts_service /vendor/bin/rm_ts_server |
| 105 | class main |
| 106 | user system |
| 107 | group system input |
Colin Cross | 0b50922 | 2013-10-10 17:03:43 -0700 | [diff] [blame] | 108 | |
| 109 | service p2p_supplicant /system/bin/wpa_supplicant \ |
| 110 | -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ |
Dmitry Shmidt | 29d7c83 | 2013-10-16 09:28:28 -0700 | [diff] [blame] | 111 | -I/system/etc/wifi/p2p_supplicant_overlay.conf \ |
Colin Cross | 0b50922 | 2013-10-10 17:03:43 -0700 | [diff] [blame] | 112 | -O/data/misc/wifi/sockets \ |
Dmitry Shmidt | 6402884 | 2013-10-14 17:20:23 -0700 | [diff] [blame] | 113 | -puse_p2p_group_interface=1p2p_device=1 \ |
Colin Cross | 0b50922 | 2013-10-10 17:03:43 -0700 | [diff] [blame] | 114 | -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0 |
| 115 | class main |
| 116 | socket wpa_wlan0 dgram 660 wifi wifi |
| 117 | disabled |
| 118 | oneshot |
| 119 | |
| 120 | service wpa_supplicant /system/bin/wpa_supplicant \ |
| 121 | -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ |
| 122 | -I/system/etc/wifi/wpa_supplicant_overlay.conf \ |
| 123 | -O/data/misc/wifi/sockets \ |
| 124 | -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0 |
| 125 | class main |
| 126 | socket wpa_wlan0 dgram 660 wifi wifi |
| 127 | disabled |
| 128 | oneshot |
| 129 | |
| 130 | service dhcpcd_wlan0 /system/bin/dhcpcd -aABDKL |
| 131 | class main |
| 132 | disabled |
| 133 | oneshot |
| 134 | |
| 135 | service dhcpcd_p2p /system/bin/dhcpcd -aABKL |
| 136 | class main |
| 137 | disabled |
| 138 | oneshot |
| 139 | |
| 140 | service iprenew_wlan0 /system/bin/dhcpcd -n |
| 141 | class main |
| 142 | disabled |
| 143 | oneshot |
| 144 | |
| 145 | service iprenew_p2p /system/bin/dhcpcd -n |
| 146 | class main |
| 147 | disabled |
| 148 | oneshot |