Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7140ae24 authored by Darren Landoll's avatar Darren Landoll
Browse files

Fix PowerHAL cpufreq permissions

The process containing PowerHAL didn't have group permissions to open
/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor|max_freq|min_freq.

Modified permissions to match AOSP using the system user as the owner.

Change-Id: Idbdad8b00b8ad7d7d2a845287cccbabb58fc5aba
parent b0d94241
Loading
Loading
Loading
Loading
+5 −9
Original line number Diff line number Diff line
@@ -277,8 +277,12 @@ on boot
    chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/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 0660 /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/class/timed_output/vibrator/enable
    chown system system /sys/class/leds/keyboard-backlight/brightness
@@ -307,14 +311,6 @@ on boot
    chown system system /sys/kernel/ipv4/tcp_rmem_max
    chown root radio /proc/cmdline

    # 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

# Define TCP buffer sizes for various networks
#   ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
    setprop net.tcp.buffersize.default 4096,87380,110208,4096,16384,110208