replicant-vendor_replicant/prebuilt/common/etc/init.local.rc
Arne Coucheron 1a1b4dc7da cm: Update and add additional permissions
Change-Id: Iec6a6938209d8bdfa9f8cdc31a9929d2fbc27f76
2014-11-19 05:48:47 +00:00

132 lines
6.9 KiB
Plaintext

# CyanogenMod Extras
import /init.superuser.rc
on init
export ANDROID_CACHE /cache
export TERMINFO /system/etc/terminfo
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 0664 /sys/devices/system/cpu/cpufreq/interactive/timer_rate
chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_slack
chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/timer_slack
chown system system /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
chown system system /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
chown system system /sys/devices/system/cpu/cpufreq/interactive/target_loads
chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/target_loads
chown system system /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
chown system system /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
chown system system /sys/devices/system/cpu/cpufreq/interactive/boost
chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/boost
chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse
chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/boostpulse
chown system system /sys/devices/system/cpu/cpufreq/interactive/input_boost
chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/input_boost
chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
chown system system /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
chown system system /sys/devices/system/cpu/cpufreq/interactive/sync_freq
chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/sync_freq
chown system system /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_freq
chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_freq
chown system system /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_load
chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/up_threshold_any_cpu_load
chown system system /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor
chmod 0664 /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor
# ondemand governor
chown system system /sys/devices/system/cpu/cpufreq/ondemand/boostfreq
chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/boostfreq
chown system system /sys/devices/system/cpu/cpufreq/ondemand/boostpulse
chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/boostpulse
chown system system /sys/devices/system/cpu/cpufreq/ondemand/boosttime
chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/boosttime
chown system system /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
chown system system /sys/devices/system/cpu/cpufreq/ondemand/down_differential
chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/down_differential
chown system system /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
chown system system /sys/devices/system/cpu/cpufreq/ondemand/powersave_bias
chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/powersave_bias
chown system system /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
chown system system /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
chown system system /sys/devices/system/cpu/cpufreq/ondemand/input_boost
chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/input_boost
chown system system /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core
chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core
chown system system /sys/devices/system/cpu/cpufreq/ondemand/down_differential_multi_core
chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/down_differential_multi_core
chown system system /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq
chown system system /sys/devices/system/cpu/cpufreq/ondemand/sync_freq
chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/sync_freq
chown system system /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load
chmod 0664 /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load
# 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 500
write /sys/kernel/mm/ksm/pages_to_scan 100
write /sys/kernel/mm/ksm/deferred_timer 1
chown system system /dev/cpuctl/apps/cpu.notify_on_migrate
chmod 0664 /dev/cpuctl/apps/cpu.notify_on_migrate
# Define TCP delayed ack settings for WiFi & LTE
chown system system /sys/kernel/ipv4/tcp_delack_seg
chown system system /sys/kernel/ipv4/tcp_use_userconfig
setprop net.tcp.delack.default 1
setprop net.tcp.delack.wifi 20
setprop net.tcp.delack.lte 8
setprop net.tcp.usercfg.default 0
setprop net.tcp.usercfg.wifi 1
setprop net.tcp.usercfg.lte 1
# 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
# sysinit (/system/etc/init.d)
service sysinit /system/bin/sysinit
user root
oneshot
disabled