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