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 |
| 9 | mkdir /cache/dalvik-cache 0771 system system |
| 10 | chown system system /cache/dalvik-cache |
| 11 | chmod 0771 /cache/dalvik-cache |
| 12 | mkdir /data/.ssh 0750 root shell |
| 13 | |
| 14 | # Run sysinit |
| 15 | start sysinit |
| 16 | |
| 17 | on boot |
| 18 | # interactive governor |
| 19 | chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_rate |
| 20 | chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/timer_rate |
| 21 | chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_slack |
| 22 | chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/timer_slack |
| 23 | chown system system /sys/devices/system/cpu/cpufreq/interactive/min_sample_time |
| 24 | chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/min_sample_time |
| 25 | chown system system /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq |
| 26 | chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq |
| 27 | chown system system /sys/devices/system/cpu/cpufreq/interactive/target_loads |
| 28 | chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/target_loads |
| 29 | chown system system /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load |
| 30 | chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load |
| 31 | chown system system /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay |
| 32 | chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay |
| 33 | chown system system /sys/devices/system/cpu/cpufreq/interactive/boost |
| 34 | chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/boost |
| 35 | chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse |
| 36 | chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/boostpulse |
| 37 | chown system system /sys/devices/system/cpu/cpufreq/interactive/input_boost |
| 38 | chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/input_boost |
| 39 | chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration |
| 40 | chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration |
| 41 | chown system system /sys/devices/system/cpu/cpufreq/interactive/io_is_busy |
| 42 | chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/io_is_busy |
| 43 | chown system system /sys/devices/system/cpu/cpufreq/interactive/sync_freq |
| 44 | chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/sync_freq |
| 45 | chown system system /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_freq |
| 46 | chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_freq |
| 47 | chown system system /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_load |
| 48 | chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_load |
| 49 | chown system system /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor |
| 50 | chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor |
| 51 | |
| 52 | # ondemand governor |
| 53 | chown system system /sys/devices/system/cpu/cpufreq/ondemand/boostfreq |
| 54 | chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/boostfreq |
| 55 | chown system system /sys/devices/system/cpu/cpufreq/ondemand/boostpulse |
| 56 | chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/boostpulse |
| 57 | chown system system /sys/devices/system/cpu/cpufreq/ondemand/boosttime |
| 58 | chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/boosttime |
| 59 | chown system system /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy |
| 60 | chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy |
| 61 | chown system system /sys/devices/system/cpu/cpufreq/ondemand/down_differential |
| 62 | chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/down_differential |
| 63 | chown system system /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate |
| 64 | chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate |
| 65 | chown system system /sys/devices/system/cpu/cpufreq/ondemand/powersave_bias |
| 66 | chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/powersave_bias |
| 67 | chown system system /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor |
| 68 | chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor |
| 69 | chown system system /sys/devices/system/cpu/cpufreq/ondemand/up_threshold |
| 70 | chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/up_threshold |
| 71 | chown system system /sys/devices/system/cpu/cpufreq/ondemand/input_boost |
| 72 | chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/input_boost |
| 73 | chown system system /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core |
| 74 | chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core |
| 75 | chown system system /sys/devices/system/cpu/cpufreq/ondemand/down_differential_multi_core |
| 76 | chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/down_differential_multi_core |
| 77 | chown system system /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq |
| 78 | chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq |
| 79 | chown system system /sys/devices/system/cpu/cpufreq/ondemand/sync_freq |
| 80 | chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/sync_freq |
| 81 | chown system system /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load |
| 82 | chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load |
| 83 | |
| 84 | # Assume SMP uses shared cpufreq policy for all CPUs |
| 85 | chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor |
| 86 | chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor |
| 87 | chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq |
| 88 | chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq |
| 89 | chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq |
| 90 | chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq |
| 91 | |
| 92 | chown system system /sys/block/mmcblk0/queue/scheduler |
| 93 | chmod 0664 /sys/block/mmcblk0/queue/scheduler |
| 94 | |
Alberto97 | d3359a0 | 2014-11-30 17:20:55 +0100 | [diff] [blame] | 95 | chown system system /dev/cpuctl/apps/cpu.notify_on_migrate |
| 96 | chmod 0664 /dev/cpuctl/apps/cpu.notify_on_migrate |
| 97 | |
| 98 | # Define TCP delayed ack settings for WiFi & LTE |
| 99 | chown system system /sys/kernel/ipv4/tcp_delack_seg |
| 100 | chown system system /sys/kernel/ipv4/tcp_use_userconfig |
| 101 | setprop net.tcp.delack.default 1 |
| 102 | setprop net.tcp.delack.wifi 20 |
| 103 | setprop net.tcp.delack.lte 8 |
| 104 | setprop net.tcp.usercfg.default 0 |
| 105 | setprop net.tcp.usercfg.wifi 1 |
| 106 | setprop net.tcp.usercfg.lte 1 |
| 107 | |
Alberto97 | d3359a0 | 2014-11-30 17:20:55 +0100 | [diff] [blame] | 108 | # sysinit (/system/etc/init.d) |
| 109 | service sysinit /system/bin/sysinit |
| 110 | user root |
| 111 | oneshot |
| 112 | disabled |