blob: d7b57537292737526c96c61e5ed083ecd9b7041f [file] [log] [blame]
Steve Kondika89711a2010-07-07 09:06:13 -04001# CyanogenMod Extras
Koushik Dutta5af62eb2013-07-27 19:52:40 -07002import /init.superuser.rc
Ethan Chen1d689262015-03-09 16:34:43 -07003import /init.prebundle.rc
Steve Kondika89711a2010-07-07 09:06:13 -04004
Ricardo Cerqueira8f412cb2012-10-18 16:38:25 +01005on init
6 export ANDROID_CACHE /cache
7 export TERMINFO /system/etc/terminfo
Ricardo Cerqueira8f412cb2012-10-18 16:38:25 +01008
9on 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 Desaice885402013-05-12 16:28:01 +053013 mkdir /data/.ssh 0750 root shell
Ricardo Cerqueira8f412cb2012-10-18 16:38:25 +010014
Ricardo Cerqueira6698e5e2012-11-23 17:15:16 +000015 # Run sysinit
16 start sysinit
17
Ricardo Cerqueira79ba9972013-06-12 12:12:18 +010018on boot
Giulio Cerveraa76d8982013-05-21 14:23:19 +020019 # interactive governor
20 chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_rate
Steve Kondikb4fb9532014-02-23 21:49:00 +010021 chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/timer_rate
Arne Coucheron1a1b4dc2014-11-19 01:48:30 +010022 chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_slack
23 chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/timer_slack
Giulio Cerveraa76d8982013-05-21 14:23:19 +020024 chown system system /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
Steve Kondikb4fb9532014-02-23 21:49:00 +010025 chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
Giulio Cerveraa76d8982013-05-21 14:23:19 +020026 chown system system /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
Steve Kondikb4fb9532014-02-23 21:49:00 +010027 chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
Arne Coucheron1a1b4dc2014-11-19 01:48:30 +010028 chown system system /sys/devices/system/cpu/cpufreq/interactive/target_loads
29 chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/target_loads
Giulio Cerveraa76d8982013-05-21 14:23:19 +020030 chown system system /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
Steve Kondikb4fb9532014-02-23 21:49:00 +010031 chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
Giulio Cerveraa76d8982013-05-21 14:23:19 +020032 chown system system /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
Steve Kondikb4fb9532014-02-23 21:49:00 +010033 chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
Giulio Cerveraa76d8982013-05-21 14:23:19 +020034 chown system system /sys/devices/system/cpu/cpufreq/interactive/boost
Steve Kondikb4fb9532014-02-23 21:49:00 +010035 chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/boost
Giulio Cerveraa76d8982013-05-21 14:23:19 +020036 chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse
Steve Kondikb4fb9532014-02-23 21:49:00 +010037 chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/boostpulse
Giulio Cerveraa76d8982013-05-21 14:23:19 +020038 chown system system /sys/devices/system/cpu/cpufreq/interactive/input_boost
Steve Kondikb4fb9532014-02-23 21:49:00 +010039 chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/input_boost
Giulio Cerveraa76d8982013-05-21 14:23:19 +020040 chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
Steve Kondikb4fb9532014-02-23 21:49:00 +010041 chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
Giulio Cervera989a3132013-07-12 17:44:16 +020042 chown system system /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
Steve Kondikb4fb9532014-02-23 21:49:00 +010043 chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
Steve Kondik9d1a8612014-01-15 01:44:07 +080044 chown system system /sys/devices/system/cpu/cpufreq/interactive/sync_freq
Steve Kondikb4fb9532014-02-23 21:49:00 +010045 chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/sync_freq
Arne Coucheron1a1b4dc2014-11-19 01:48:30 +010046 chown system system /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_freq
47 chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_freq
Steve Kondik9d1a8612014-01-15 01:44:07 +080048 chown system system /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_load
Steve Kondikb4fb9532014-02-23 21:49:00 +010049 chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_load
Steve Kondik9d1a8612014-01-15 01:44:07 +080050 chown system system /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor
Steve Kondikb4fb9532014-02-23 21:49:00 +010051 chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor
Steve Kondik9d1a8612014-01-15 01:44:07 +080052
Giulio Cerveraa76d8982013-05-21 14:23:19 +020053 # ondemand governor
54 chown system system /sys/devices/system/cpu/cpufreq/ondemand/boostfreq
Steve Kondikb4fb9532014-02-23 21:49:00 +010055 chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/boostfreq
Giulio Cerveraa76d8982013-05-21 14:23:19 +020056 chown system system /sys/devices/system/cpu/cpufreq/ondemand/boostpulse
Steve Kondikb4fb9532014-02-23 21:49:00 +010057 chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/boostpulse
Giulio Cerveraa76d8982013-05-21 14:23:19 +020058 chown system system /sys/devices/system/cpu/cpufreq/ondemand/boosttime
Steve Kondikb4fb9532014-02-23 21:49:00 +010059 chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/boosttime
Giulio Cerveraa76d8982013-05-21 14:23:19 +020060 chown system system /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
Steve Kondikb4fb9532014-02-23 21:49:00 +010061 chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
Giulio Cerveraa76d8982013-05-21 14:23:19 +020062 chown system system /sys/devices/system/cpu/cpufreq/ondemand/down_differential
Steve Kondikb4fb9532014-02-23 21:49:00 +010063 chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/down_differential
Giulio Cerveraa76d8982013-05-21 14:23:19 +020064 chown system system /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
Steve Kondikb4fb9532014-02-23 21:49:00 +010065 chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
Giulio Cerveraa76d8982013-05-21 14:23:19 +020066 chown system system /sys/devices/system/cpu/cpufreq/ondemand/powersave_bias
Steve Kondikb4fb9532014-02-23 21:49:00 +010067 chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/powersave_bias
Giulio Cerveraa76d8982013-05-21 14:23:19 +020068 chown system system /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
Steve Kondikb4fb9532014-02-23 21:49:00 +010069 chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
Giulio Cerveraa76d8982013-05-21 14:23:19 +020070 chown system system /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
Steve Kondikb4fb9532014-02-23 21:49:00 +010071 chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
Steve Kondik686cbf22013-10-04 04:31:56 -070072 chown system system /sys/devices/system/cpu/cpufreq/ondemand/input_boost
Steve Kondikb4fb9532014-02-23 21:49:00 +010073 chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/input_boost
Steve Kondikf9bb7772013-10-07 23:39:12 -070074 chown system system /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core
Steve Kondikb4fb9532014-02-23 21:49:00 +010075 chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core
Steve Kondikf9bb7772013-10-07 23:39:12 -070076 chown system system /sys/devices/system/cpu/cpufreq/ondemand/down_differential_multi_core
Steve Kondikb4fb9532014-02-23 21:49:00 +010077 chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/down_differential_multi_core
Steve Kondikf9bb7772013-10-07 23:39:12 -070078 chown system system /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
Steve Kondikb4fb9532014-02-23 21:49:00 +010079 chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
Steve Kondikf9bb7772013-10-07 23:39:12 -070080 chown system system /sys/devices/system/cpu/cpufreq/ondemand/sync_freq
Steve Kondikb4fb9532014-02-23 21:49:00 +010081 chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/sync_freq
Steve Kondikf9bb7772013-10-07 23:39:12 -070082 chown system system /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load
Steve Kondikb4fb9532014-02-23 21:49:00 +010083 chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load
Giulio Cerveraa76d8982013-05-21 14:23:19 +020084
85 # Assume SMP uses shared cpufreq policy for all CPUs
86 chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
Steve Kondikb4fb9532014-02-23 21:49:00 +010087 chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
Giulio Cerveraa76d8982013-05-21 14:23:19 +020088 chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
Steve Kondikb4fb9532014-02-23 21:49:00 +010089 chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
Giulio Cerveraa76d8982013-05-21 14:23:19 +020090 chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
Steve Kondikb4fb9532014-02-23 21:49:00 +010091 chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
Giulio Cerveraa76d8982013-05-21 14:23:19 +020092
Ricardo Cerqueira8f412cb2012-10-18 16:38:25 +010093 chown system system /sys/block/mmcblk0/queue/scheduler
94 chmod 0664 /sys/block/mmcblk0/queue/scheduler
Pawit Pornkitprasan24a971a2015-01-03 12:44:43 +070095 restorecon /sys/block/mmcblk0/queue/scheduler
Ricardo Cerqueira8f412cb2012-10-18 16:38:25 +010096
Arne Coucheron08297ed2015-04-03 02:01:36 +020097 chown system system /dev/cpuctl/cpu.notify_on_migrate
98 chmod 0664 /dev/cpuctl/cpu.notify_on_migrate
Steve Kondik6a0f5302013-10-02 11:28:28 -070099
Arne Coucheron1f3653e2014-05-20 23:52:30 +0200100 # Define TCP delayed ack settings for WiFi & LTE
101 chown system system /sys/kernel/ipv4/tcp_delack_seg
102 chown system system /sys/kernel/ipv4/tcp_use_userconfig
103 setprop net.tcp.delack.default 1
104 setprop net.tcp.delack.wifi 20
105 setprop net.tcp.delack.lte 8
106 setprop net.tcp.usercfg.default 0
107 setprop net.tcp.usercfg.wifi 1
108 setprop net.tcp.usercfg.lte 1
109
Ricardo Cerqueira8f412cb2012-10-18 16:38:25 +0100110# adb over network
111on property:service.adb.tcp.port=5555
112 stop adbd
113 start adbd
114on property:service.adb.tcp.port=-1
115 stop adbd
116 start adbd
117
Ricardo Cerqueira6698e5e2012-11-23 17:15:16 +0000118# sysinit (/system/etc/init.d)
119service sysinit /system/bin/sysinit
120 user root
121 oneshot
Ricardo Cerqueira79ba9972013-06-12 12:12:18 +0100122 disabled