blob: f62fcd60307f9261978815c0b21a75c4bd0abba3 [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
7 export TERM linux
8
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
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
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
37
38 # ondemand governor
39 chown system system /sys/devices/system/cpu/cpufreq/ondemand/boostfreq
40 chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/boostfreq
41 chown system system /sys/devices/system/cpu/cpufreq/ondemand/boostpulse
42 chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/boostpulse
43 chown system system /sys/devices/system/cpu/cpufreq/ondemand/boosttime
44 chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
45 chown system system /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
46 chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
47 chown system system /sys/devices/system/cpu/cpufreq/ondemand/down_differential
48 chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/down_differential
49 chown system system /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
50 chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
51 chown system system /sys/devices/system/cpu/cpufreq/ondemand/powersave_bias
52 chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/powersave_bias
53 chown system system /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
54 chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
55 chown system system /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
56 chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
57
58 # Assume SMP uses shared cpufreq policy for all CPUs
59 chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
60 chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
61 chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
62 chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
63 chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
64 chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
65
Ricardo Cerqueira8f412cb2012-10-18 16:38:25 +010066 chown system system /sys/block/mmcblk0/queue/scheduler
67 chmod 0664 /sys/block/mmcblk0/queue/scheduler
68
69# allow system to modify ksm control files
70 chown root system /sys/kernel/mm/ksm/pages_to_scan
71 chmod 0664 /sys/kernel/mm/ksm/pages_to_scan
72 chown root system /sys/kernel/mm/ksm/sleep_millisecs
73 chmod 0664 /sys/kernel/mm/ksm/sleep_millisecs
74 chown root system /sys/kernel/mm/ksm/run
75 chmod 0664 /sys/kernel/mm/ksm/run
76 write /sys/kernel/mm/ksm/sleep_millisecs 1500
77 write /sys/kernel/mm/ksm/pages_to_scan 256
78
NameLess, the Jediff4b2052010-12-31 10:00:10 +010079 # allow system to modify cpufreq control files
80 chown root system /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
81 chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
82 chown root system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
83 chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
84 chown root system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
85 chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
86
Ricardo Cerqueira8f412cb2012-10-18 16:38:25 +010087# adb over network
88on property:service.adb.tcp.port=5555
89 stop adbd
90 start adbd
91on property:service.adb.tcp.port=-1
92 stop adbd
93 start adbd
94
Steve Kondikfe18fc32010-08-20 13:17:37 -040095# Compcache - handle at boot
96service compcache /system/bin/handle_compcache
Ricardo Cerqueira8f412cb2012-10-18 16:38:25 +010097 class main
Steve Kondikfe18fc32010-08-20 13:17:37 -040098 user root
99 group root
100 oneshot
Ricardo Cerqueira6698e5e2012-11-23 17:15:16 +0000101
102# sysinit (/system/etc/init.d)
103service sysinit /system/bin/sysinit
104 user root
105 oneshot
Ricardo Cerqueira79ba9972013-06-12 12:12:18 +0100106 disabled