blob: 5968bd2104fa0c5ef908d801e066c379c8eac2da [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
Steve Kondikb4fb9532014-02-23 21:49:00 +010020 chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/timer_rate
Giulio Cerveraa76d8982013-05-21 14:23:19 +020021 chown system system /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
Steve Kondikb4fb9532014-02-23 21:49:00 +010022 chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
Giulio Cerveraa76d8982013-05-21 14:23:19 +020023 chown system system /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
Steve Kondikb4fb9532014-02-23 21:49:00 +010024 chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
Giulio Cerveraa76d8982013-05-21 14:23:19 +020025 chown system system /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
Steve Kondikb4fb9532014-02-23 21:49:00 +010026 chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
Giulio Cerveraa76d8982013-05-21 14:23:19 +020027 chown system system /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
Steve Kondikb4fb9532014-02-23 21:49:00 +010028 chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
Giulio Cerveraa76d8982013-05-21 14:23:19 +020029 chown system system /sys/devices/system/cpu/cpufreq/interactive/boost
Steve Kondikb4fb9532014-02-23 21:49:00 +010030 chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/boost
Giulio Cerveraa76d8982013-05-21 14:23:19 +020031 chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse
Steve Kondikb4fb9532014-02-23 21:49:00 +010032 chmod 0664 /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
Steve Kondikb4fb9532014-02-23 21:49:00 +010034 chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/input_boost
Giulio Cerveraa76d8982013-05-21 14:23:19 +020035 chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
Steve Kondikb4fb9532014-02-23 21:49:00 +010036 chmod 0664 /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
Steve Kondikb4fb9532014-02-23 21:49:00 +010038 chmod 0664 /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
Steve Kondikb4fb9532014-02-23 21:49:00 +010040 chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/sync_freq
Steve Kondik9d1a8612014-01-15 01:44:07 +080041 chown system system /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_load
Steve Kondikb4fb9532014-02-23 21:49:00 +010042 chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_load
Steve Kondik9d1a8612014-01-15 01:44:07 +080043 chown system system /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor
Steve Kondikb4fb9532014-02-23 21:49:00 +010044 chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor
Steve Kondik9d1a8612014-01-15 01:44:07 +080045
Giulio Cerveraa76d8982013-05-21 14:23:19 +020046
47 # ondemand governor
48 chown system system /sys/devices/system/cpu/cpufreq/ondemand/boostfreq
Steve Kondikb4fb9532014-02-23 21:49:00 +010049 chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/boostfreq
Giulio Cerveraa76d8982013-05-21 14:23:19 +020050 chown system system /sys/devices/system/cpu/cpufreq/ondemand/boostpulse
Steve Kondikb4fb9532014-02-23 21:49:00 +010051 chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/boostpulse
Giulio Cerveraa76d8982013-05-21 14:23:19 +020052 chown system system /sys/devices/system/cpu/cpufreq/ondemand/boosttime
Steve Kondikb4fb9532014-02-23 21:49:00 +010053 chmod 0664 /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
Steve Kondikb4fb9532014-02-23 21:49:00 +010055 chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
Giulio Cerveraa76d8982013-05-21 14:23:19 +020056 chown system system /sys/devices/system/cpu/cpufreq/ondemand/down_differential
Steve Kondikb4fb9532014-02-23 21:49:00 +010057 chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/down_differential
Giulio Cerveraa76d8982013-05-21 14:23:19 +020058 chown system system /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
Steve Kondikb4fb9532014-02-23 21:49:00 +010059 chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
Giulio Cerveraa76d8982013-05-21 14:23:19 +020060 chown system system /sys/devices/system/cpu/cpufreq/ondemand/powersave_bias
Steve Kondikb4fb9532014-02-23 21:49:00 +010061 chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/powersave_bias
Giulio Cerveraa76d8982013-05-21 14:23:19 +020062 chown system system /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
Steve Kondikb4fb9532014-02-23 21:49:00 +010063 chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
Giulio Cerveraa76d8982013-05-21 14:23:19 +020064 chown system system /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
Steve Kondikb4fb9532014-02-23 21:49:00 +010065 chmod 0664 /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 Kondikb4fb9532014-02-23 21:49:00 +010067 chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/input_boost
Steve Kondikf9bb7772013-10-07 23:39:12 -070068 chown system system /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core
Steve Kondikb4fb9532014-02-23 21:49:00 +010069 chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core
Steve Kondikf9bb7772013-10-07 23:39:12 -070070 chown system system /sys/devices/system/cpu/cpufreq/ondemand/down_differential_multi_core
Steve Kondikb4fb9532014-02-23 21:49:00 +010071 chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/down_differential_multi_core
Steve Kondikf9bb7772013-10-07 23:39:12 -070072 chown system system /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
Steve Kondikb4fb9532014-02-23 21:49:00 +010073 chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
Steve Kondikf9bb7772013-10-07 23:39:12 -070074 chown system system /sys/devices/system/cpu/cpufreq/ondemand/sync_freq
Steve Kondikb4fb9532014-02-23 21:49:00 +010075 chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/sync_freq
Steve Kondikf9bb7772013-10-07 23:39:12 -070076 chown system system /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load
Steve Kondikb4fb9532014-02-23 21:49:00 +010077 chmod 0664 /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
Steve Kondikb4fb9532014-02-23 21:49:00 +010081 chmod 0664 /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
Steve Kondikb4fb9532014-02-23 21:49:00 +010083 chmod 0664 /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
Steve Kondikb4fb9532014-02-23 21:49:00 +010085 chmod 0664 /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