summaryrefslogtreecommitdiffstats
path: root/prebuilt/common/etc/init.local.rc
blob: a0ac39f1de9f37203f9f9fa56881d72c5746a987 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# CyanogenMod Extras
import /init.superuser.rc

on init
    export ANDROID_CACHE /cache
    export TERMINFO /system/etc/terminfo
    export TERM linux

on post-fs-data
    mkdir /cache/dalvik-cache 0771 system system
    chown system system /cache/dalvik-cache
    chmod 0771 /cache/dalvik-cache
    mkdir /data/.ssh 0750 root shell

    # Run sysinit
    start sysinit

on boot
    # interactive governor
    chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_rate
    chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/timer_rate
    chown system system /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
    chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
    chown system system /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
    chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
    chown system system /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
    chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
    chown system system /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
    chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
    chown system system /sys/devices/system/cpu/cpufreq/interactive/boost
    chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/boost
    chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse
    chown system system /sys/devices/system/cpu/cpufreq/interactive/input_boost
    chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/input_boost
    chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
    chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
    chown system system /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
    chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/io_is_busy

    # ondemand governor
    chown system system /sys/devices/system/cpu/cpufreq/ondemand/boostfreq
    chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/boostfreq
    chown system system /sys/devices/system/cpu/cpufreq/ondemand/boostpulse
    chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/boostpulse
    chown system system /sys/devices/system/cpu/cpufreq/ondemand/boosttime
    chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
    chown system system /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
    chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
    chown system system /sys/devices/system/cpu/cpufreq/ondemand/down_differential
    chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/down_differential
    chown system system /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
    chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
    chown system system /sys/devices/system/cpu/cpufreq/ondemand/powersave_bias
    chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/powersave_bias
    chown system system /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
    chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
    chown system system /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
    chmod 0660 /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
    chown system system /sys/devices/system/cpu/cpufreq/ondemand/input_boost
    chmod 0600 /sys/devices/system/cpu/cpufreq/ondemand/input_boost

    # Assume SMP uses shared cpufreq policy for all CPUs
    chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
    chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
    chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
    chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
    chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
    chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq

    chown system system /sys/block/mmcblk0/queue/scheduler
    chmod 0664 /sys/block/mmcblk0/queue/scheduler

# allow system to modify ksm control files
    chown root system /sys/kernel/mm/ksm/pages_to_scan
    chmod 0664 /sys/kernel/mm/ksm/pages_to_scan
    chown root system /sys/kernel/mm/ksm/sleep_millisecs
    chmod 0664 /sys/kernel/mm/ksm/sleep_millisecs
    chown root system /sys/kernel/mm/ksm/run
    chmod 0664 /sys/kernel/mm/ksm/run
    write /sys/kernel/mm/ksm/sleep_millisecs 1500
    write /sys/kernel/mm/ksm/pages_to_scan 256

    # allow system to modify cpufreq control files
    chown root system /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
    chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
    chown root system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
    chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
    chown root system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
    chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq

    chown system system /dev/cpuctl/apps/cpu.notify_on_migrate
    chmod 0644 /dev/cpuctl/apps/cpu.notify_on_migrate

# adb over network
on property:service.adb.tcp.port=5555
    stop adbd
    start adbd
on property:service.adb.tcp.port=-1
    stop adbd
    start adbd

# Compcache - handle at boot
service compcache /system/bin/handle_compcache
    class main
    user root
    group root
    oneshot

# sysinit (/system/etc/init.d)
service sysinit /system/bin/sysinit
    user root
    oneshot
    disabled