Alberto97 | d3359a0 | 2014-11-30 17:20:55 +0100 | [diff] [blame] | 1 | # CyanogenMod Extras |
| 2 | import /init.superuser.rc |
| 3 | |
| 4 | on init |
| 5 | export ANDROID_CACHE /cache |
| 6 | export TERMINFO /system/etc/terminfo |
| 7 | |
| 8 | on post-fs-data |
Alberto97 | d3359a0 | 2014-11-30 17:20:55 +0100 | [diff] [blame] | 9 | mkdir /data/.ssh 0750 root shell |
| 10 | |
| 11 | # Run sysinit |
| 12 | start sysinit |
| 13 | |
| 14 | on boot |
| 15 | # interactive governor |
| 16 | chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_rate |
| 17 | chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/timer_rate |
| 18 | chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_slack |
| 19 | chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/timer_slack |
| 20 | chown system system /sys/devices/system/cpu/cpufreq/interactive/min_sample_time |
| 21 | chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/min_sample_time |
| 22 | chown system system /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq |
| 23 | chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq |
| 24 | chown system system /sys/devices/system/cpu/cpufreq/interactive/target_loads |
| 25 | chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/target_loads |
| 26 | chown system system /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load |
| 27 | chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load |
| 28 | chown system system /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay |
| 29 | chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay |
| 30 | chown system system /sys/devices/system/cpu/cpufreq/interactive/boost |
| 31 | chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/boost |
| 32 | chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse |
| 33 | chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/boostpulse |
| 34 | chown system system /sys/devices/system/cpu/cpufreq/interactive/input_boost |
| 35 | chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/input_boost |
| 36 | chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration |
| 37 | chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration |
| 38 | chown system system /sys/devices/system/cpu/cpufreq/interactive/io_is_busy |
| 39 | chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/io_is_busy |
| 40 | chown system system /sys/devices/system/cpu/cpufreq/interactive/sync_freq |
| 41 | chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/sync_freq |
| 42 | chown system system /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_freq |
| 43 | chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_freq |
| 44 | chown system system /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_load |
| 45 | chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_load |
| 46 | chown system system /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor |
| 47 | chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor |
| 48 | |
| 49 | # ondemand governor |
| 50 | chown system system /sys/devices/system/cpu/cpufreq/ondemand/boostfreq |
| 51 | chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/boostfreq |
| 52 | chown system system /sys/devices/system/cpu/cpufreq/ondemand/boostpulse |
| 53 | chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/boostpulse |
| 54 | chown system system /sys/devices/system/cpu/cpufreq/ondemand/boosttime |
| 55 | chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/boosttime |
| 56 | chown system system /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy |
| 57 | chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy |
| 58 | chown system system /sys/devices/system/cpu/cpufreq/ondemand/down_differential |
| 59 | chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/down_differential |
| 60 | chown system system /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate |
| 61 | chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate |
| 62 | chown system system /sys/devices/system/cpu/cpufreq/ondemand/powersave_bias |
| 63 | chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/powersave_bias |
| 64 | chown system system /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor |
| 65 | chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor |
| 66 | chown system system /sys/devices/system/cpu/cpufreq/ondemand/up_threshold |
| 67 | chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/up_threshold |
| 68 | chown system system /sys/devices/system/cpu/cpufreq/ondemand/input_boost |
| 69 | chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/input_boost |
| 70 | chown system system /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core |
| 71 | chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core |
| 72 | chown system system /sys/devices/system/cpu/cpufreq/ondemand/down_differential_multi_core |
| 73 | chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/down_differential_multi_core |
| 74 | chown system system /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq |
| 75 | chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq |
| 76 | chown system system /sys/devices/system/cpu/cpufreq/ondemand/sync_freq |
| 77 | chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/sync_freq |
| 78 | chown system system /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load |
| 79 | chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load |
| 80 | |
| 81 | # Assume SMP uses shared cpufreq policy for all CPUs |
| 82 | chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor |
| 83 | chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor |
| 84 | chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq |
| 85 | chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq |
| 86 | chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq |
| 87 | chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq |
| 88 | |
| 89 | chown system system /sys/block/mmcblk0/queue/scheduler |
| 90 | chmod 0664 /sys/block/mmcblk0/queue/scheduler |
Pawit Pornkitprasan | 7e4f300 | 2015-01-03 12:44:43 +0700 | [diff] [blame] | 91 | restorecon /sys/block/mmcblk0/queue/scheduler |
Alberto97 | d3359a0 | 2014-11-30 17:20:55 +0100 | [diff] [blame] | 92 | |
Arne Coucheron | 55b7398 | 2015-04-03 02:01:36 +0200 | [diff] [blame] | 93 | chown system system /dev/cpuctl/cpu.notify_on_migrate |
| 94 | chmod 0664 /dev/cpuctl/cpu.notify_on_migrate |
Alberto97 | d3359a0 | 2014-11-30 17:20:55 +0100 | [diff] [blame] | 95 | |
| 96 | # Define TCP delayed ack settings for WiFi & LTE |
| 97 | chown system system /sys/kernel/ipv4/tcp_delack_seg |
| 98 | chown system system /sys/kernel/ipv4/tcp_use_userconfig |
| 99 | setprop net.tcp.delack.default 1 |
| 100 | setprop net.tcp.delack.wifi 20 |
| 101 | setprop net.tcp.delack.lte 8 |
| 102 | setprop net.tcp.usercfg.default 0 |
| 103 | setprop net.tcp.usercfg.wifi 1 |
| 104 | setprop net.tcp.usercfg.lte 1 |
| 105 | |
Alberto97 | d3359a0 | 2014-11-30 17:20:55 +0100 | [diff] [blame] | 106 | # sysinit (/system/etc/init.d) |
| 107 | service sysinit /system/bin/sysinit |
| 108 | user root |
| 109 | oneshot |
| 110 | disabled |
Ethan Chen | 6b30a16 | 2015-05-05 12:30:59 -0700 | [diff] [blame] | 111 | |
| 112 | # bugreport is triggered by holding down volume down, volume up and power |
| 113 | service bugreport /system/bin/dumpstate -d -p -B \ |
| 114 | -o /data/data/com.android.shell/files/bugreports/bugreport |
| 115 | oneshot |
| 116 | disabled |
| 117 | keycodes 114 115 116 |