blob: 7a771ee254656d9945f942c715b6cda35a0e00b1 [file] [log] [blame]
Steve Kondika89711a2010-07-07 09:06:13 -04001# CyanogenMod Extras
Koushik Dutta5af62eb2013-07-27 19:52:40 -07002import /init.superuser.rc
Steve Kondika89711a2010-07-07 09:06:13 -04003
Ricardo Cerqueira8f412cb2012-10-18 16:38:25 +01004on init
5 export ANDROID_CACHE /cache
6 export TERMINFO /system/etc/terminfo
Ricardo Cerqueira8f412cb2012-10-18 16:38:25 +01007
8on 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 Desaice885402013-05-12 16:28:01 +053012 mkdir /data/.ssh 0750 root shell
Ricardo Cerqueira8f412cb2012-10-18 16:38:25 +010013
Ricardo Cerqueira6698e5e2012-11-23 17:15:16 +000014 # Run sysinit
15 start sysinit
16
Ricardo Cerqueira79ba9972013-06-12 12:12:18 +010017on boot
Giulio Cerveraa76d8982013-05-21 14:23:19 +020018 # 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 Bestas7a46cf72013-10-24 05:04:24 +030032 chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/boostpulse
Giulio Cerveraa76d8982013-05-21 14:23:19 +020033 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 Cervera989a3132013-07-12 17:44:16 +020037 chown system system /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
38 chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
Steve Kondik9d1a8612014-01-15 01:44:07 +080039 chown system system /sys/devices/system/cpu/cpufreq/interactive/sync_freq
40 chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/sync_freq
41 chown system system /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_load
42 chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_load
43 chown system system /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor
44 chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor
45
Giulio Cerveraa76d8982013-05-21 14:23:19 +020046
47 # ondemand governor
48 chown system system /sys/devices/system/cpu/cpufreq/ondemand/boostfreq
49 chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/boostfreq
50 chown system system /sys/devices/system/cpu/cpufreq/ondemand/boostpulse
51 chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/boostpulse
52 chown system system /sys/devices/system/cpu/cpufreq/ondemand/boosttime
Jon Mooney461e4ec2013-10-21 13:22:30 -040053 chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/boosttime
Giulio Cerveraa76d8982013-05-21 14:23:19 +020054 chown system system /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
55 chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
56 chown system system /sys/devices/system/cpu/cpufreq/ondemand/down_differential
57 chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/down_differential
58 chown system system /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
59 chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
60 chown system system /sys/devices/system/cpu/cpufreq/ondemand/powersave_bias
61 chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/powersave_bias
62 chown system system /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
63 chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
64 chown system system /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
65 chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
Steve Kondik686cbf22013-10-04 04:31:56 -070066 chown system system /sys/devices/system/cpu/cpufreq/ondemand/input_boost
Steve Kondikf9bb7772013-10-07 23:39:12 -070067 chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/input_boost
68 chown system system /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core
69 chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core
70 chown system system /sys/devices/system/cpu/cpufreq/ondemand/down_differential_multi_core
71 chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/down_differential_multi_core
72 chown system system /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
73 chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
74 chown system system /sys/devices/system/cpu/cpufreq/ondemand/sync_freq
75 chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/sync_freq
76 chown system system /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load
77 chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load
Giulio Cerveraa76d8982013-05-21 14:23:19 +020078
79 # Assume SMP uses shared cpufreq policy for all CPUs
80 chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
Jon Mooney461e4ec2013-10-21 13:22:30 -040081 chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
Giulio Cerveraa76d8982013-05-21 14:23:19 +020082 chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
Jon Mooney461e4ec2013-10-21 13:22:30 -040083 chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
Giulio Cerveraa76d8982013-05-21 14:23:19 +020084 chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
Jon Mooney461e4ec2013-10-21 13:22:30 -040085 chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
Giulio Cerveraa76d8982013-05-21 14:23:19 +020086
Ricardo Cerqueira8f412cb2012-10-18 16:38:25 +010087 chown system system /sys/block/mmcblk0/queue/scheduler
88 chmod 0664 /sys/block/mmcblk0/queue/scheduler
89
Michael Bestas7a46cf72013-10-24 05:04:24 +030090 # allow system to modify ksm control files
Ricardo Cerqueira8f412cb2012-10-18 16:38:25 +010091 chown root system /sys/kernel/mm/ksm/pages_to_scan
92 chmod 0664 /sys/kernel/mm/ksm/pages_to_scan
93 chown root system /sys/kernel/mm/ksm/sleep_millisecs
94 chmod 0664 /sys/kernel/mm/ksm/sleep_millisecs
95 chown root system /sys/kernel/mm/ksm/run
96 chmod 0664 /sys/kernel/mm/ksm/run
Michael Bestas0ccf7ef2014-01-10 02:46:18 +020097 write /sys/kernel/mm/ksm/sleep_millisecs 500
98 write /sys/kernel/mm/ksm/pages_to_scan 100
Ricardo Cerqueira8f412cb2012-10-18 16:38:25 +010099
Steve Kondik6a0f5302013-10-02 11:28:28 -0700100 chown system system /dev/cpuctl/apps/cpu.notify_on_migrate
101 chmod 0644 /dev/cpuctl/apps/cpu.notify_on_migrate
102
Ricardo Cerqueira8f412cb2012-10-18 16:38:25 +0100103# adb over network
104on property:service.adb.tcp.port=5555
105 stop adbd
106 start adbd
107on property:service.adb.tcp.port=-1
108 stop adbd
109 start adbd
110
Ricardo Cerqueira6698e5e2012-11-23 17:15:16 +0000111# sysinit (/system/etc/init.d)
112service sysinit /system/bin/sysinit
113 user root
114 oneshot
Ricardo Cerqueira79ba9972013-06-12 12:12:18 +0100115 disabled