Steve Kondik | a89711a | 2010-07-07 09:06:13 -0400 | [diff] [blame] | 1 | # CyanogenMod Extras |
Koushik Dutta | 5af62eb | 2013-07-27 19:52:40 -0700 | [diff] [blame] | 2 | import /init.superuser.rc |
Steve Kondik | a89711a | 2010-07-07 09:06:13 -0400 | [diff] [blame] | 3 | |
Ricardo Cerqueira | 8f412cb | 2012-10-18 16:38:25 +0100 | [diff] [blame] | 4 | on init |
| 5 | export ANDROID_CACHE /cache |
| 6 | export TERMINFO /system/etc/terminfo |
Ricardo Cerqueira | 8f412cb | 2012-10-18 16:38:25 +0100 | [diff] [blame] | 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 |
Chirayu Desai | ce88540 | 2013-05-12 16:28:01 +0530 | [diff] [blame] | 12 | mkdir /data/.ssh 0750 root shell |
Ricardo Cerqueira | 8f412cb | 2012-10-18 16:38:25 +0100 | [diff] [blame] | 13 | |
Ricardo Cerqueira | 6698e5e | 2012-11-23 17:15:16 +0000 | [diff] [blame] | 14 | # Run sysinit |
| 15 | start sysinit |
| 16 | |
Ricardo Cerqueira | 79ba997 | 2013-06-12 12:12:18 +0100 | [diff] [blame] | 17 | on boot |
Giulio Cervera | a76d898 | 2013-05-21 14:23:19 +0200 | [diff] [blame] | 18 | # interactive governor |
| 19 | chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_rate |
| 20 | chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/timer_rate |
| 21 | chown system system /sys/devices/system/cpu/cpufreq/interactive/min_sample_time |
| 22 | chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/min_sample_time |
| 23 | chown system system /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq |
| 24 | chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq |
| 25 | chown system system /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load |
| 26 | chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load |
| 27 | chown system system /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay |
| 28 | chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay |
| 29 | chown system system /sys/devices/system/cpu/cpufreq/interactive/boost |
| 30 | chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/boost |
| 31 | chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse |
Michael Bestas | 7a46cf7 | 2013-10-24 05:04:24 +0300 | [diff] [blame] | 32 | chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/boostpulse |
Giulio Cervera | a76d898 | 2013-05-21 14:23:19 +0200 | [diff] [blame] | 33 | chown system system /sys/devices/system/cpu/cpufreq/interactive/input_boost |
| 34 | chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/input_boost |
| 35 | chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration |
| 36 | chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration |
Giulio Cervera | 989a313 | 2013-07-12 17:44:16 +0200 | [diff] [blame] | 37 | chown system system /sys/devices/system/cpu/cpufreq/interactive/io_is_busy |
| 38 | chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/io_is_busy |
Giulio Cervera | a76d898 | 2013-05-21 14:23:19 +0200 | [diff] [blame] | 39 | |
| 40 | # ondemand governor |
| 41 | chown system system /sys/devices/system/cpu/cpufreq/ondemand/boostfreq |
| 42 | chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/boostfreq |
| 43 | chown system system /sys/devices/system/cpu/cpufreq/ondemand/boostpulse |
| 44 | chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/boostpulse |
| 45 | chown system system /sys/devices/system/cpu/cpufreq/ondemand/boosttime |
Jon Mooney | 461e4ec | 2013-10-21 13:22:30 -0400 | [diff] [blame] | 46 | chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/boosttime |
Giulio Cervera | a76d898 | 2013-05-21 14:23:19 +0200 | [diff] [blame] | 47 | chown system system /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy |
| 48 | chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy |
| 49 | chown system system /sys/devices/system/cpu/cpufreq/ondemand/down_differential |
| 50 | chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/down_differential |
| 51 | chown system system /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate |
| 52 | chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate |
| 53 | chown system system /sys/devices/system/cpu/cpufreq/ondemand/powersave_bias |
| 54 | chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/powersave_bias |
| 55 | chown system system /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor |
| 56 | chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor |
| 57 | chown system system /sys/devices/system/cpu/cpufreq/ondemand/up_threshold |
| 58 | chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/up_threshold |
Steve Kondik | 686cbf2 | 2013-10-04 04:31:56 -0700 | [diff] [blame] | 59 | chown system system /sys/devices/system/cpu/cpufreq/ondemand/input_boost |
Steve Kondik | f9bb777 | 2013-10-07 23:39:12 -0700 | [diff] [blame] | 60 | chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/input_boost |
| 61 | chown system system /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core |
| 62 | chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core |
| 63 | chown system system /sys/devices/system/cpu/cpufreq/ondemand/down_differential_multi_core |
| 64 | chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/down_differential_multi_core |
| 65 | chown system system /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq |
| 66 | chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq |
| 67 | chown system system /sys/devices/system/cpu/cpufreq/ondemand/sync_freq |
| 68 | chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/sync_freq |
| 69 | chown system system /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load |
| 70 | chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load |
Giulio Cervera | a76d898 | 2013-05-21 14:23:19 +0200 | [diff] [blame] | 71 | |
| 72 | # Assume SMP uses shared cpufreq policy for all CPUs |
| 73 | chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor |
Jon Mooney | 461e4ec | 2013-10-21 13:22:30 -0400 | [diff] [blame] | 74 | chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor |
Giulio Cervera | a76d898 | 2013-05-21 14:23:19 +0200 | [diff] [blame] | 75 | chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq |
Jon Mooney | 461e4ec | 2013-10-21 13:22:30 -0400 | [diff] [blame] | 76 | chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq |
Giulio Cervera | a76d898 | 2013-05-21 14:23:19 +0200 | [diff] [blame] | 77 | chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq |
Jon Mooney | 461e4ec | 2013-10-21 13:22:30 -0400 | [diff] [blame] | 78 | chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq |
Giulio Cervera | a76d898 | 2013-05-21 14:23:19 +0200 | [diff] [blame] | 79 | |
Ricardo Cerqueira | 8f412cb | 2012-10-18 16:38:25 +0100 | [diff] [blame] | 80 | chown system system /sys/block/mmcblk0/queue/scheduler |
| 81 | chmod 0664 /sys/block/mmcblk0/queue/scheduler |
| 82 | |
Michael Bestas | 7a46cf7 | 2013-10-24 05:04:24 +0300 | [diff] [blame] | 83 | # allow system to modify ksm control files |
Ricardo Cerqueira | 8f412cb | 2012-10-18 16:38:25 +0100 | [diff] [blame] | 84 | chown root system /sys/kernel/mm/ksm/pages_to_scan |
| 85 | chmod 0664 /sys/kernel/mm/ksm/pages_to_scan |
| 86 | chown root system /sys/kernel/mm/ksm/sleep_millisecs |
| 87 | chmod 0664 /sys/kernel/mm/ksm/sleep_millisecs |
| 88 | chown root system /sys/kernel/mm/ksm/run |
| 89 | chmod 0664 /sys/kernel/mm/ksm/run |
Michael Bestas | 0ccf7ef | 2014-01-10 02:46:18 +0200 | [diff] [blame] | 90 | write /sys/kernel/mm/ksm/sleep_millisecs 500 |
| 91 | write /sys/kernel/mm/ksm/pages_to_scan 100 |
Ricardo Cerqueira | 8f412cb | 2012-10-18 16:38:25 +0100 | [diff] [blame] | 92 | |
Steve Kondik | 6a0f530 | 2013-10-02 11:28:28 -0700 | [diff] [blame] | 93 | chown system system /dev/cpuctl/apps/cpu.notify_on_migrate |
| 94 | chmod 0644 /dev/cpuctl/apps/cpu.notify_on_migrate |
| 95 | |
Ricardo Cerqueira | 8f412cb | 2012-10-18 16:38:25 +0100 | [diff] [blame] | 96 | # adb over network |
| 97 | on property:service.adb.tcp.port=5555 |
| 98 | stop adbd |
| 99 | start adbd |
| 100 | on property:service.adb.tcp.port=-1 |
| 101 | stop adbd |
| 102 | start adbd |
| 103 | |
Ricardo Cerqueira | 6698e5e | 2012-11-23 17:15:16 +0000 | [diff] [blame] | 104 | # sysinit (/system/etc/init.d) |
| 105 | service sysinit /system/bin/sysinit |
| 106 | user root |
| 107 | oneshot |
Ricardo Cerqueira | 79ba997 | 2013-06-12 12:12:18 +0100 | [diff] [blame] | 108 | disabled |