android_device_samsung_msm8.../rootdir/etc/init.samsung.rc
Deokgyu Yang c484f16bcb gts3l-common: lpm: Enable the power-off mode charging using Samsung LPM
Signed-off-by: Deokgyu Yang <secugyu@gmail.com>
Change-Id: I834d67453b2057e88d3e1cd1b1a4c6fac0c85f72
2021-09-22 21:59:35 +09:00

877 lines
44 KiB
Text

# Copyright (C) 2012 The Android Open Source Project
#
# IMPORTANT: Do not create world writable files or directories.
# This is a common source of Android security bugs.
#
on init
symlink /dev/block/bootdevice/by-name/persistent /dev/block/persistent
symlink /dev/block/bootdevice/by-name/steady /dev/block/steady
# MUIC
chown system radio /sys/class/sec/switch/adc
chown system radio /sys/class/sec/switch/otg_test
chown system radio /sys/class/sec/switch/uart_sel
chown system radio /sys/class/sec/switch/usb_sel
chown system system /sys/class/sec/switch/afc_off
chown system radio /sys/class/sec/switch/afc_disable
chown system radio /sys/class/sec/switch/apo_factory
chown system radio /sys/class/sec/switch/afc_set_voltage
chown system radio /sys/class/sec/switch/vbus_value
chown system radio /sys/class/sec/switch/vbus_value_pd
chown system radio /sys/class/sec/switch/vbus_rawdata
chown system radio /sys/class/sec/switch/keyboard_test
# Create energy-aware scheduler tuning nodes
mkdir /dev/stune
mount cgroup none /dev/stune nodev noexec nosuid schedtune
mkdir /dev/stune/foreground
mkdir /dev/stune/background
mkdir /dev/stune/top-app
mkdir /dev/stune/rt
mkdir /dev/stune/audio-app
chown system system /dev/stune
chown system system /dev/stune/foreground
chown system system /dev/stune/background
chown system system /dev/stune/top-app
chown system system /dev/stune/rt
chown system system /dev/stune/audio-app
chown system system /dev/stune/tasks
chown system system /dev/stune/foreground/tasks
chown system system /dev/stune/background/tasks
chown system system /dev/stune/top-app/tasks
chown system system /dev/stune/rt/tasks
chown system system /dev/stune/audio-app/tasks
chmod 0664 /dev/stune/tasks
chmod 0664 /dev/stune/foreground/tasks
chmod 0664 /dev/stune/background/tasks
chmod 0664 /dev/stune/top-app/tasks
chmod 0664 /dev/stune/rt/tasks
chmod 0664 /dev/stune/audio-app/tasks
mkdir /efs 0771 radio system
# Mount staging areas for devices managed by vold
# See storage config details at http://source.android.com/tech/storage/
#mount tmpfs tmpfs /mnt mode=0755,uid=0,gid=1000
restorecon_recursive /mnt
mount configfs none /config nodev noexec nosuid
chmod 0770 /config/sdcardfs
chown system package_info /config/sdcardfs
mkdir /mnt/asec 0755 root system
mkdir /mnt/obb 0755 root system
mkdir /mnt/media_rw 0750 root media_rw
mkdir /mnt/user 0755 root root
mkdir /mnt/user/0 0755 root root
mkdir /mnt/expand 0771 system system
mkdir /mnt/appfuse 0711 root root
# Add qseecomd default property
setprop vendor.sys.qseecomd.enable stopped
# Storage views to support runtime permissions
mkdir /mnt/runtime 0700 root root
mkdir /mnt/runtime/default 0755 root root
mkdir /mnt/runtime/default/self 0755 root root
mkdir /mnt/runtime/read 0755 root root
mkdir /mnt/runtime/read/self 0755 root root
mkdir /mnt/runtime/write 0755 root root
mkdir /mnt/runtime/write/self 0755 root root
# Symlink to keep legacy apps working in multi-user world
symlink /storage/self/primary /sdcard
symlink /storage/self/primary /mnt/sdcard
symlink /mnt/user/0/primary /mnt/runtime/default/self/primary
write /proc/sys/kernel/panic_on_oops 1
write /proc/sys/kernel/hung_task_timeout_secs 0
write /proc/cpu/alignment 4
# scheduler tunables
# Disable auto-scaling of scheduler tunables with hotplug. The tunables
# will vary across devices in unpredictable ways if allowed to scale with
# cpu cores.
write /proc/sys/kernel/sched_tunable_scaling 0
write /proc/sys/kernel/sched_latency_ns 10000000
write /proc/sys/kernel/sched_wakeup_granularity_ns 2000000
write /proc/sys/kernel/sched_child_runs_first 0
write /proc/sys/kernel/randomize_va_space 2
write /proc/sys/vm/mmap_min_addr 32768
write /proc/sys/net/ipv4/ping_group_range "0 2147483647"
write /proc/sys/net/unix/max_dgram_qlen 600
write /proc/sys/kernel/sched_rt_runtime_us 950000
write /proc/sys/kernel/sched_rt_period_us 1000000
# Assign reasonable ceiling values for socket rcv/snd buffers.
# These should almost always be overridden by the target per the
# the corresponding technology maximums.
write /proc/sys/net/core/rmem_max 262144
write /proc/sys/net/core/wmem_max 262144
# reflect fwmark from incoming packets onto generated replies
write /proc/sys/net/ipv4/fwmark_reflect 1
write /proc/sys/net/ipv6/fwmark_reflect 1
# set fwmark on accepted sockets
write /proc/sys/net/ipv4/tcp_fwmark_accept 1
# disable icmp redirects
write /proc/sys/net/ipv4/conf/all/accept_redirects 0
write /proc/sys/net/ipv6/conf/all/accept_redirects 0
# /proc/net/fib_trie leaks interface IP addresses
chmod 0400 /proc/net/fib_trie
# Create cgroup mount points for process groups
mkdir /dev/cpuctl
mount cgroup none /dev/cpuctl nodev noexec nosuid cpu
chown system system /dev/cpuctl
chown system system /dev/cpuctl/tasks
chmod 0666 /dev/cpuctl/tasks
write /dev/cpuctl/cpu.rt_period_us 1000000
write /dev/cpuctl/cpu.rt_runtime_us 950000
# sets up initial cpusets for ActivityManager
mkdir /dev/cpuset
mount cpuset none /dev/cpuset nodev noexec nosuid
# this ensures that the cpusets are present and usable, but the device's
# init.rc must actually set the correct cpus
mkdir /dev/cpuset/foreground
copy /dev/cpuset/cpus /dev/cpuset/foreground/cpus
copy /dev/cpuset/mems /dev/cpuset/foreground/mems
mkdir /dev/cpuset/background
copy /dev/cpuset/cpus /dev/cpuset/background/cpus
copy /dev/cpuset/mems /dev/cpuset/background/mems
# system-background is for system tasks that should only run on
# little cores, not on bigs
# to be used only by init, so don't change system-bg permissions
mkdir /dev/cpuset/system-background
copy /dev/cpuset/cpus /dev/cpuset/system-background/cpus
copy /dev/cpuset/mems /dev/cpuset/system-background/mems
# restricted is for system tasks that are being throttled
# due to screen off.
mkdir /dev/cpuset/restricted
copy /dev/cpuset/cpus /dev/cpuset/restricted/cpus
copy /dev/cpuset/mems /dev/cpuset/restricted/mems
mkdir /dev/cpuset/top-app
copy /dev/cpuset/cpus /dev/cpuset/top-app/cpus
copy /dev/cpuset/mems /dev/cpuset/top-app/mems
mkdir /dev/cpuset/audio-app
copy /dev/cpuset/cpus /dev/cpuset/audio-app/cpus
copy /dev/cpuset/mems /dev/cpuset/audio-app/mems
# change permissions for all cpusets we'll touch at runtime
chown system system /dev/cpuset
chown system system /dev/cpuset/foreground
chown system system /dev/cpuset/background
chown system system /dev/cpuset/system-background
chown system system /dev/cpuset/top-app
chown system system /dev/cpuset/audio-app
chown system system /dev/cpuset/restricted
chown system system /dev/cpuset/tasks
chown system system /dev/cpuset/foreground/tasks
chown system system /dev/cpuset/background/tasks
chown system system /dev/cpuset/system-background/tasks
chown system system /dev/cpuset/top-app/tasks
chown system system /dev/cpuset/audio-app/tasks
chown system system /dev/cpuset/restricted/tasks
# set system-background to 0775 so SurfaceFlinger can touch it
chmod 0775 /dev/cpuset/system-background
chmod 0664 /dev/cpuset/foreground/tasks
chmod 0664 /dev/cpuset/background/tasks
chmod 0664 /dev/cpuset/system-background/tasks
chmod 0664 /dev/cpuset/top-app/tasks
chmod 0664 /dev/cpuset/audio-app/tasks
chmod 0664 /dev/cpuset/restricted/tasks
chmod 0664 /dev/cpuset/tasks
# This allows the ledtrig-transient properties to be created here so
# that they can be chown'd to system:system later on boot
write /sys/class/leds/vibrator/trigger "transient"
# Indicate to fw loaders that the relevant mounts are up.
on firmware_mounts_complete
rm /dev/.booting
on early-fs
chown system net_bt_admin /dev/tzic
chmod 0660 /dev/tzic
on boot
# IPsec SA default expiration length
write /proc/sys/net/core/xfrm_acq_expires 3600
# Memory management. Basic kernel parameters, and allow the high
# level system server to be able to adjust the kernel OOM driver
# parameters to match how it is managing things.
write /proc/sys/vm/overcommit_memory 1
write /proc/sys/vm/min_free_order_shift 4
chown root system /sys/module/lowmemorykiller/parameters/adj
chmod 0664 /sys/module/lowmemorykiller/parameters/adj
chown root system /sys/module/lowmemorykiller/parameters/minfree
chmod 0664 /sys/module/lowmemorykiller/parameters/minfree
# Tweak background writeout
write /proc/sys/vm/dirty_expire_centisecs 200
write /proc/sys/vm/dirty_background_ratio 5
# Permissions for System Server and daemons.
chown radio system /sys/android_power/state
chown radio system /sys/android_power/request_state
chown radio system /sys/android_power/acquire_full_wake_lock
chown radio system /sys/android_power/acquire_partial_wake_lock
chown radio system /sys/android_power/release_wake_lock
chown system system /sys/power/autosleep
chown system system /sys/power/state
chown system system /sys/power/wakeup_count
chown radio wakelock /sys/power/wake_lock
chown radio wakelock /sys/power/wake_unlock
chmod 0660 /sys/power/state
chmod 0660 /sys/power/wake_lock
chmod 0660 /sys/power/wake_unlock
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/timer_slack
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/timer_slack
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/target_loads
chmod 0660 /sys/devices/system/cpu/cpufreq/interactive/target_loads
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
# Assume SMP uses shared cpufreq policy for all CPUs
chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chown system system /sys/class/timed_output/vibrator/enable
chown system system /sys/class/timed_output/vibrator/intensity
chown system system /sys/class/timed_output/vibrator/multi_freq
chown system system /sys/class/leds/vibrator/trigger
chown system system /sys/class/leds/vibrator/activate
chown system system /sys/class/leds/vibrator/brightness
chown system system /sys/class/leds/vibrator/duration
chown system system /sys/class/leds/vibrator/state
chown system system /sys/class/timed_output/vibrator/enable
chown system system /sys/class/leds/keyboard-backlight/brightness
chown system system /sys/class/leds/lcd-backlight/brightness
chown system system /sys/class/leds/button-backlight/brightness
chown system system /sys/class/leds/jogball-backlight/brightness
chown system system /sys/class/leds/red/brightness
chown system system /sys/class/leds/green/brightness
chown system system /sys/class/leds/blue/brightness
chown system system /sys/class/leds/red/device/grpfreq
chown system system /sys/class/leds/red/device/grppwm
chown system system /sys/class/leds/red/device/blink
chown system system /sys/module/sco/parameters/disable_esco
chown system system /sys/kernel/ipv4/tcp_wmem_min
chown system system /sys/kernel/ipv4/tcp_wmem_def
chown system system /sys/kernel/ipv4/tcp_wmem_max
chown system system /sys/kernel/ipv4/tcp_rmem_min
chown system system /sys/kernel/ipv4/tcp_rmem_def
chown system system /sys/kernel/ipv4/tcp_rmem_max
chown root radio /proc/cmdline
# Permissions for Power
chown radio system /sys/power/cpufreq_max_limit
chown radio system /sys/power/cpufreq_min_limit
chown radio system /sys/power/cpufreq_table
chmod 664 /sys/power/cpufreq_max_limit
chmod 664 /sys/power/cpufreq_min_limit
chmod 664 /sys/power/cpufreq_table
chown radio system /sys/devices/system/cpu/kernel_max
chmod 664 /sys/devices/system/cpu/kernel_max
# Permissions for booster
chown radio system /sys/class/kgsl/kgsl-3d0/max_pwrlevel
chmod 664 /sys/class/kgsl/kgsl-3d0/max_pwrlevel
chown radio system /sys/class/kgsl/kgsl-3d0/min_pwrlevel
chmod 664 /sys/class/kgsl/kgsl-3d0/min_pwrlevel
chown radio system /sys/class/kgsl/kgsl-3d0/gpu_available_frequencies
chmod 664 /sys/class/kgsl/kgsl-3d0/gpu_available_frequencies
chown radio system /sys/bus/workqueue/devices/kgsl-events/cpumask
chmod 664 /sys/bus/workqueue/devices/kgsl-events/cpumask
chown radio system /sys/bus/workqueue/devices/kgsl-events/nice
chmod 664 /sys/bus/workqueue/devices/kgsl-events/nice
chown radio system /sys/bus/workqueue/devices/kgsl-workqueue/cpumask
chmod 664 /sys/bus/workqueue/devices/kgsl-workqueue/cpumask
chown radio system /sys/bus/workqueue/devices/kgsl-workqueue/nice
chmod 664 /sys/bus/workqueue/devices/kgsl-workqueue/nice
chown radio system /sys/class/kgsl/kgsl-3d0/pwrscale
chmod 664 /sys/class/kgsl/kgsl-3d0/pwrscale
chown system system /sys/class/devfreq/soc:qcom,cpubw/available_frequencies
chown system system /sys/class/devfreq/soc:qcom,cpubw/min_freq
chown system system /sys/class/devfreq/soc:qcom,cpubw/max_freq
chmod 664 /sys/class/devfreq/soc:qcom,cpubw/available_frequencies
chmod 664 /sys/class/devfreq/soc:qcom,cpubw/min_freq
chmod 664 /sys/class/devfreq/soc:qcom,cpubw/max_freq
# Permissions for input_booster
chown system radio /sys/class/input_booster/level
chown system radio /sys/class/input_booster/head
chown system radio /sys/class/input_booster/tail
chown system radio /sys/class/input_booster/touchkey/level
chown system radio /sys/class/input_booster/touchkey/freq
chown system radio /sys/class/input_booster/touchkey/time
chmod 0664 /sys/class/input_booster/level
chmod 0664 /sys/class/input_booster/head
chmod 0664 /sys/class/input_booster/tail
chmod 0664 /sys/class/input_booster/touchkey/level
chmod 0664 /sys/class/input_booster/touchkey/freq
chmod 0664 /sys/class/input_booster/touchkey/time
# Permissions for Camera
chown cameraserver cameraserver /sys/kernel/mm/vmscan/mem_boost_mode
chown system system /sys/class/camera/rear/rear_camfw
chown system system /sys/class/camera/rear/rear_camfw_full
chown system system /sys/class/camera/rear/rear_camfw_load
chown system system /sys/class/camera/rear/rear_camtype
chown system system /sys/class/camera/rear/rear_companionfw_full
chown system system /sys/class/camera/rear/rear_calcheck
chown system system /sys/class/camera/rear/rear_fwcheck
chown system system /sys/class/camera/rear/rear_checkfw_user
chown system system /sys/class/camera/rear/rear_checkfw_factory
chown system system /sys/class/camera/rear/rear_moduleinfo
chown system system /sys/class/camera/rear/rear_afcal
chown system system /sys/class/camera/rear/isp_core
chown system system /sys/class/camera/rear/rear_caminfo
chown system system /sys/class/camera/rear/rear_sensorid_exif
chown system system /sys/class/camera/rear/rear_moduleid
chown system system /sys/class/camera/rear/companion_ic_check
chown system system /sys/class/camera/rear/ssrm_camera_info
chown system system /sys/class/camera/flash/rear_flash
chown system system /sys/class/camera/front/front_camfw
chown system system /sys/class/camera/front/front_camtype
chown system system /sys/class/camera/front/front_caminfo
chown system system /sys/class/camera/front/front_camfw_full
chown system system /sys/class/camera/front/front_camfw_load
chown system system /sys/class/camera/front/front_checkfw_user
chown system system /sys/class/camera/front/front_checkfw_factory
chown system system /sys/class/camera/front/front_afcal
chown system system /sys/class/camera/front/front_sensorid_exif
chown system system /sys/class/camera/ois/selftest
chown system system /sys/class/camera/ois/ois_power
chown system system /sys/class/camera/ois/ois_rawdata
chown system system /sys/class/camera/ois/oisfw
chown system system /sys/class/camera/ois/ois_diff
chown system system /sys/class/camera/ois/ois_exif
chown system system /sys/class/camera/ois/autotest
chown system system /sys/class/camera/secure/iris_camfw
chown system system /sys/class/camera/secure/iris_camfw_full
chown system system /sys/class/camera/secure/iris_checkfw_factory
chown system system /sys/class/camera/secure/iris_checkfw_user
chown system system /sys/class/camera/secure/iris_caminfo
chown system system /sys/devices/svc/Camera/SVC_rear_module
# Permissions for InputDevices.
chown system radio /sys/class/sec/tsp/cmd
chown system system /sys/class/sec/tsp/input/enabled
chmod 0660 /sys/class/sec/tsp/input/enabled
chown system system /sys/class/sec/sec_touchkey/input/enabled
chmod 0660 /sys/class/sec/sec_touchkey/input/enabled
chown system system /sys/class/sec/sec_touchkey/brightness
chown system radio /sys/class/sec/sec_touchkey/keyboard_mode
chown system radio /sys/class/sec/sec_touchkey/flip_mode
chown system radio /sys/class/sec/sec_touchkey/touchkey_firm_update
chown system radio /sys/class/sec/sec_touchkey/touch_sensitivity
chown system radio /sys/class/sec/sec_touchkey/touchkey_light_version
chown system radio /sys/class/sec/sec_touchkey/touchkey_light_update
chown system radio /sys/class/sec/sec_touchkey/touchkey_light_id_compare
chown system radio /sys/class/sec/sec_touchkey/touchkey_light_table_write
chown system radio /sys/class/sec/sec_touchkey/glove_mode
chown system system /sys/class/sec/sec_epen/input/enabled
chmod 0660 /sys/class/sec/sec_epen/input/enabled
chown system radio /sys/class/sec/sec_epen/epen_firm_update
chown system radio /sys/class/sec/sec_epen/epen_reset
chown system radio /sys/class/sec/sec_epen/epen_reset_result
chown system radio /sys/class/sec/sec_epen/epen_checksum
chown system radio /sys/class/sec/sec_epen/epen_checksum_result
chown system radio /sys/class/sec/sec_epen/epen_saving_mode
chown system radio /sys/class/sec/sec_epen/epen_wcharging_mode
chown system radio /sys/class/sec/sec_epen/epen_disable_mode
chown system radio /sys/class/sec/sec_epen/epen_aop_mode
chown system radio /sys/class/sec/sec_epen/screen_off_memo_enable
# Permissions for SecureDevice
chown system system /sys/class/sec/tsp/input/secure_touch_enable
# Permissions for HW parameter
chown system system /sys/class/sec/tsp/ito_check
chown system system /sys/class/sec/tsp/raw_check
chown system system /sys/class/sec/tsp/multi_count
chown system system /sys/class/sec/tsp/wet_mode
chown system system /sys/class/sec/tsp/comm_err_count
chown system system /sys/class/sec/tsp/module_id
# Permissions for gpio_keys
chown system radio /sys/class/sec/sec_key/wakeup_keys
write /sys/class/sec/sec_key/wakeup_keys 116,172
# MSP FactoryApp
mkdir /efs/FactoryApp 0775 system system
# Permissions for Charging
mkdir /efs/Battery 0775 radio system
chown radio system /efs/Battery
chmod 0775 /efs/Battery
copy /system/vendor/firmware/battery_data.dat /efs/Battery/battery_data.dat
chmod 0400 /efs/Battery/battery_data.dat
write /sys/class/power_supply/battery/batt_update_data "/efs/Battery/battery_data.dat"
chown system radio /sys/class/power_supply/battery/batt_ext_dev_chg
chown system radio /efs/Battery/fg_full_voltage
chown system radio /sys/class/power_supply/battery/fg_full_voltage
chown system radio /sys/class/power_supply/battery/batt_self_discharging_control
chown system radio /sys/class/power_supply/battery/batt_inbat_wireless_cs100
chmod 0664 /efs/Battery/fg_full_voltage
chmod 0664 /sys/class/power_supply/battery/fg_full_voltage
chown system radio /sys/class/power_supply/battery/batt_reset_soc
chown system radio /sys/class/power_supply/battery/batt_slate_mode
chown system radio /sys/class/power_supply/battery/factory_mode
chown system radio /sys/class/power_supply/battery/siop_level
chown system radio /sys/class/power_supply/battery/siop_event
chown system radio /sys/class/power_supply/battery/wc_enable
chown system nfc /sys/class/power_supply/battery/wc_control
chown system nfc /sys/class/power_supply/battery/wc_control_cnt
chown system radio /sys/class/power_supply/battery/update
chown system radio /sys/class/power_supply/battery/batt_wdt_control
chown system sdcard_rw /sys/class/power_supply/battery/store_mode
chown sdcard_rw sdcard_rw /sys/class/power_supply/battery/call
chown sdcard_rw sdcard_rw /sys/class/power_supply/battery/video
chown sdcard_rw sdcard_rw /sys/class/power_supply/battery/music
chown sdcard_rw sdcard_rw /sys/class/power_supply/battery/browser
chown sdcard_rw sdcard_rw /sys/class/power_supply/battery/hotspot
chown sdcard_rw sdcard_rw /sys/class/power_supply/battery/camera
chown system radio /sys/class/power_supply/battery/talk_wcdma
chown system radio /sys/class/power_supply/battery/talk_gsm
chown system radio /sys/class/power_supply/battery/call
chown system radio /sys/class/power_supply/battery/data_call
chown system radio /sys/class/power_supply/battery/gps
chown system radio /sys/class/power_supply/battery/wifi
chown system radio /sys/class/power_supply/battery/lte
chown system radio /sys/class/power_supply/battery/lcd
chown system radio /sys/class/power_supply/ps/status
chmod 0664 /sys/class/power_supply/battery/wc_control
chmod 0664 /sys/class/power_supply/battery/wc_control_cnt
chmod 0664 /sys/class/power_supply/ps/status
chmod 0664 /sys/class/power_supply/battery/batt_temp_table
chown system radio /sys/class/power_supply/battery/batt_temp_table
chown system radio /sys/class/power_supply/battery/batt_high_current_usb
chown system radio /sys/class/power_supply/battery/batt_inbat_voltage
chmod 0664 /sys/class/power_supply/battery/batt_high_current_usb
chown system radio /sys/class/power_supply/battery/hmt_ta_connected
chown system radio /sys/class/power_supply/battery/hmt_ta_charge
chown system radio /sys/class/power_supply/battery/battery_cycle
chown system radio /sys/class/power_supply/otg/online
chmod 0664 /sys/class/power_supply/otg/online
chown system radio /sys/class/power_supply/battery/charge_otg_control
chown system radio /sys/class/power_supply/battery/charge_uno_control
chown system radio /sys/class/power_supply/battery/batt_wireless_firmware_update
chown system radio /sys/class/power_supply/battery/otp_firmware_result
chown system radio /sys/class/power_supply/battery/wc_ic_grade
chown system radio /sys/class/power_supply/battery/otp_firmware_ver_bin
chown system radio /sys/class/power_supply/battery/otp_firmware_ver
chown system radio /sys/class/power_supply/battery/tx_firmware_result
chown system radio /sys/class/power_supply/battery/batt_tx_firmware
chown system radio /sys/class/power_supply/battery/batt_hv_wireless_status
chown system radio /sys/class/power_supply/battery/batt_hv_wireless_pad_ctrl
chmod 0664 /sys/class/power_supply/battery/charge_otg_control
chmod 0664 /sys/class/power_supply/battery/charge_uno_control
chmod 0664 /sys/class/power_supply/battery/batt_wireless_firmware_update
chmod 0664 /sys/class/power_supply/battery/otp_firmware_result
chmod 0664 /sys/class/power_supply/battery/wc_ic_grade
chmod 0664 /sys/class/power_supply/battery/otp_firmware_ver_bin
chmod 0664 /sys/class/power_supply/battery/otp_firmware_ver
chmod 0664 /sys/class/power_supply/battery/tx_firmware_result
chmod 0664 /sys/class/power_supply/battery/tx_firmware_ver
chmod 0664 /sys/class/power_supply/battery/batt_tx_firmware
chmod 0664 /sys/class/power_supply/battery/batt_hv_wireless_status
chmod 0664 /sys/class/power_supply/battery/batt_hv_wireless_pad_ctrl
chown system radio /sys/class/power_supply/battery/tx_firmware_result
chown system radio /sys/class/power_supply/battery/batt_tune_chg_limit_cur
chown system radio /sys/class/power_supply/battery/batt_tune_chg_temp_high
chown system radio /sys/class/power_supply/battery/batt_tune_chg_temp_rec
chown system radio /sys/class/power_supply/battery/batt_tune_coil_limit_cur
chown system radio /sys/class/power_supply/battery/batt_tune_coil_temp_high
chown system radio /sys/class/power_supply/battery/batt_tune_coil_temp_rec
chown system radio /sys/class/power_supply/battery/batt_tune_fast_charge_current
chown system radio /sys/class/power_supply/battery/batt_tune_float_voltage
chown system radio /sys/class/power_supply/battery/batt_tune_intput_charge_current
chown system radio /sys/class/power_supply/battery/batt_tune_temp_high_normal
chown system radio /sys/class/power_supply/battery/batt_tune_temp_high_rec_normal
chown system radio /sys/class/power_supply/battery/batt_tune_temp_low_normal
chown system radio /sys/class/power_supply/battery/batt_tune_temp_low_rec_normal
chown system radio /sys/class/power_supply/battery/batt_tune_ui_term_cur_1st
chown system radio /sys/class/power_supply/battery/batt_tune_ui_term_cur_2nd
chmod 0664 /sys/class/power_supply/battery/batt_tune_chg_limit_cur
chmod 0664 /sys/class/power_supply/battery/batt_tune_chg_temp_high
chmod 0664 /sys/class/power_supply/battery/batt_tune_chg_temp_rec
chmod 0664 /sys/class/power_supply/battery/batt_tune_coil_limit_cur
chmod 0664 /sys/class/power_supply/battery/batt_tune_coil_temp_high
chmod 0664 /sys/class/power_supply/battery/batt_tune_coil_temp_rec
chmod 0664 /sys/class/power_supply/battery/batt_tune_fast_charge_current
chmod 0664 /sys/class/power_supply/battery/batt_tune_float_voltage
chmod 0664 /sys/class/power_supply/battery/batt_tune_intput_charge_current
chmod 0664 /sys/class/power_supply/battery/batt_tune_temp_high_normal
chmod 0664 /sys/class/power_supply/battery/batt_tune_temp_high_rec_normal
chmod 0664 /sys/class/power_supply/battery/batt_tune_temp_low_normal
chmod 0664 /sys/class/power_supply/battery/batt_tune_temp_low_rec_normal
chmod 0664 /sys/class/power_supply/battery/batt_tune_ui_term_cur_1st
chmod 0664 /sys/class/power_supply/battery/batt_tune_ui_term_cur_2nd
chown system radio /sys/class/power_supply/battery/batt_filter_cfg
chown system radio /sys/class/power_supply/battery/batt_current_ua_avg
chown system radio /sys/class/power_supply/battery/batt_current_ua_now
chown system radio /sys/class/power_supply/battery/voltage_avg
chown system radio /sys/class/power_supply/battery/voltage_now
chown system radio /sys/class/power_supply/battery/mode
chmod 0664 /sys/class/power_supply/battery/mode
chown system radio /sys/class/power_supply/battery/safety_timer_set
chown system radio /sys/class/power_supply/battery/safety_timer_info
chown system radio /sys/class/power_supply/battery/wc_op_freq
chmod 0664 /sys/class/power_supply/battery/wc_op_freq
chown system radio /sys/class/power_supply/battery/wc_cmd_info
chmod 0664 /sys/class/power_supply/battery/wc_cmd_info
chown system radio /sys/class/power_supply/smb1351-charger/mode
chown system radio /sys/class/power_supply/battery/cisd_fullcaprep_max
chmod 0660 /sys/class/power_supply/battery/cisd_fullcaprep_max
chown system radio /sys/class/power_supply/battery/cisd_wire_count
chmod 0660 /sys/class/power_supply/battery/cisd_wire_count
chown system radio /sys/class/power_supply/battery/cisd_data
chmod 0660 /sys/class/power_supply/battery/cisd_data
chown system system /efs/FactoryApp/cisd_data
chmod 0640 /efs/FactoryApp/cisd_data
chown system radio /sys/class/power_supply/battery/batt_capacity_max
chmod 0660 /sys/class/power_supply/battery/batt_capacity_max
chown radio system /efs/Battery/batt_capacity_max
chmod 0664 /efs/Battery/batt_capacity_max
# Permissions for Display
# Multi resolution
chown system graphics /sys/class/graphics/fb0/modes
chmod 0660 /sys/class/graphics/fb0/modes
chown system graphics /sys/class/graphics/fb0/mode
chmod 0660 /sys/class/graphics/fb0/mode
# systrace
chown root shell /sys/kernel/debug/tracing/events/mdss/enable
chmod 0664 /sys/kernel/debug/tracing/events/mdss/enable
# binder
chown system system /sys/module/binder/parameters/trace_pid
chmod 0600 /sys/module/binder/parameters/trace_pid
# Auto Brightness
chown system system /sys/class/backlight/panel/brightness
chmod 0660 /sys/class/backlight/panel/brightness
chown system system /sys/class/backlight/panel/max_brightness
chmod 0660 /sys/class/backlight/panel/max_brightness
chown system system /sys/class/backlight/panel/auto_brightness
chmod 0660 /sys/class/backlight/panel/auto_brightness
chown system system /sys/class/backlight/panel/auto_brightness_level
chmod 0660 /sys/class/backlight/panel/auto_brightness_level
# adaptive control
chown system system /sys/class/lcd/panel/adaptive_control
chmod 0660 /sys/class/lcd/panel/adaptive_control
# CCB (color waekness)
chown system system /sys/class/backlight/panel/weakness_ccb
chmod 0660 /sys/class/backlight/panel/weakness_ccb
# weakness_hbm_comp (Gallery Max brightness == 2)
chown system system /sys/class/backlight/panel/weakness_hbm_comp
chmod 0660 /sys/class/backlight/panel/weakness_hbm_comp
# AOD(Always On Display)
chown system system /sys/class/lcd/panel/alpm
chmod 0660 /sys/class/lcd/panel/alpm
# HMT
chown system system /sys/class/lcd/panel/hmt_on
chmod 0660 /sys/class/lcd/panel/hmt_on
chown system system /sys/class/lcd/panel/hmt_bright
chmod 0660 /sys/class/lcd/panel/hmt_bright
chown system system /sys/class/mdnie/mdnie/hmt_color_temperature
chmod 0660 /sys/class/mdnie/mdnie/hmt_color_temperature
# HMT autorefresh
chown system system /sys/class/graphics/fb0/msm_cmd_autorefresh_en
chmod 0660 /sys/class/graphics/fb0/msm_cmd_autorefresh_en
# IRC
chown system system /sys/class/lcd/panel/irc
chmod 0660 /sys/class/lcd/panel/irc
# MCD
chown system system /sys/class/lcd/panel/mcd_mode
chmod 0660 /sys/class/lcd/panel/mcd_mode
# DDI H/W Cursor
chown system system /sys/class/lcd/panel/hw_cursor
chmod 0660 /sys/class/lcd/panel/hw_cursor
# Adjust YUV to RGB Conversion(CSC_Conversion)
chown system media_rw /sys/class/graphics/fb0/csc_cfg
chmod 0660 /sys/class/graphics/fb0/csc_cfg
# LCD mdnie and panel work
chown system system /sys/class/mdnie/mdnie/lcdtype
chown system system /sys/class/mdnie/mdnie/lcd_power
chown system media_rw /sys/class/mdnie/mdnie/scenario
chmod 0660 /sys/class/mdnie/mdnie/scenario
chown system system /sys/class/mdnie/mdnie/tuning
chown system media_rw /sys/class/mdnie/mdnie/outdoor
chown system system /sys/class/mdnie/mdnie/mdnie_temp
chown system media_rw /sys/class/mdnie/mdnie/mode
chown system system /sys/class/mdnie/mdnie/negative
chown system media_rw /sys/class/mdnie/mdnie/playspeed
chown system media_rw /sys/class/mdnie/mdnie/accessibility
chown system system /sys/class/mdnie/mdnie/cabc
chown system system /sys/class/mdnie/mdnie/bypass
chown system media_rw /sys/class/mdnie/mdnie/sensorRGB
chmod 0660 /sys/class/mdnie/mdnie/sensorRGB
chown system media_rw /sys/class/mdnie/mdnie/mdnie_ldu
chmod 0660 /sys/class/mdnie/mdnie/mdnie_ldu
chown system media_rw /sys/class/mdnie/mdnie/night_mode
chmod 0660 /sys/class/mdnie/mdnie/night_mode
chown system media_rw /sys/class/mdnie/mdnie/hdr
chmod 0660 /sys/class/mdnie/mdnie/hdr
chown system media_rw /sys/class/mdnie/mdnie/whiteRGB
chmod 0660 /sys/class/mdnie/mdnie/whiteRGB
chown system media_rw /sys/class/mdnie/mdnie/light_notification
chmod 0660 /sys/class/mdnie/mdnie/light_notification
chown system media_rw /sys/class/mdnie/mdnie/color_lens
chmod 0660 /sys/class/mdnie/mdnie/color_lens
chown system system /sys/class/lcd/panel/window_type
chown system system /sys/class/lcd/panel/read_copr
chown radio system /sys/class/lcd/panel/power_reduce
chown radio system /sys/class/lcd/panel/siop_enable
chown radio system /sys/class/lcd/panel/temperature
chown radio system /sys/class/lcd/panel/tuning
chown radio system /sys/class/lcd/panel/lux
chown radio system /sys/class/lcd/panel/partial_disp
chmod 0660 /sys/class/lcd/panel/partial_disp
chown radio system /sys/class/lcd/panel/cover_control
chmod 0660 /sys/class/lcd/panel/cover_control
chown system system /sys/class/lcd/panel/ldu_correction
chmod 0660 /sys/class/lcd/panel/ldu_correction
chown system system /sys/class/lcd/panel/dpui
chown system system /sys/class/lcd/panel/dpui_dbg
# Permissions for SENSORS
# HRM_sensor
chown system radio /sys/class/sensors/hrm_sensor/name
chown system radio /sys/class/sensors/hrm_sensor/vendor
chown system radio /sys/class/sensors/hrm_sensor/led_current
chown system radio /sys/class/sensors/hrm_sensor/led_current1
chown system radio /sys/class/sensors/hrm_sensor/led_current2
chown system radio /sys/class/sensors/hrm_sensor/led_current3
chown system radio /sys/class/sensors/hrm_sensor/led_current4
chown system radio /sys/class/sensors/hrm_sensor/hr_range
chown system radio /sys/class/sensors/hrm_sensor/hr_range2
chown system radio /sys/class/sensors/hrm_sensor/look_mode_ir
chown system radio /sys/class/sensors/hrm_sensor/look_mode_red
chown system radio /sys/class/sensors/hrm_sensor/eol_test
chown system radio /sys/class/sensors/hrm_sensor/eol_test_result
chown system radio /sys/class/sensors/hrm_sensor/eol_test_status
chown system radio /sys/class/sensors/hrm_sensor/int_pin_check
chown system radio /sys/class/sensors/hrm_sensor/lib_ver
chown system radio /sys/class/sensors/hrm_sensor/regulator
chown system radio /sys/class/sensors/hrm_sensor/part_type
chown system radio /sys/class/sensors/hrm_sensor/device_id
chown system radio /sys/class/sensors/hrm_sensor/hrm_flush
chown system radio /sys/class/sensors/hrm_sensor/threshold
chown system radio /sys/class/sensors/hrm_sensor/eol_lib_ver
chown system radio /sys/class/sensors/hrm_sensor/elf_lib_ver
chown system radio /sys/class/sensors/hrm_sensor/adpd_reg_read
chown system radio /sys/class/sensors/hrm_sensor/adpd_reg_write
chown system radio /sys/class/sensors/hrm_sensor/adpd_mode
chown system radio /sys/class/sensors/hrm_sensor/adpd_configuration
chown system radio /sys/class/sensors/hrm_sensor/adpd_stat
chown system radio /sys/class/sensors/hrm_sensor/alc_enable
chmod 0600 /dev/max_hrm
chown system system /dev/max_hrm
# HRMLED_sensor
chown system radio /sys/class/sensors/hrmled_sensor/name
chown system radio /sys/class/sensors/hrmled_sensor/vendor
chown system radio /sys/class/sensors/hrmled_sensor/hrmled_flush
# Grip_sensor
chown system radio /sys/class/sensors/grip_sensor/name
chown system radio /sys/class/sensors/grip_sensor/vendor
chown system radio /sys/class/sensors/grip_sensor/raw_data
chown system radio /sys/class/sensors/grip_sensor/threshold
chown system radio /sys/class/sensors/grip_sensor/calibration
chown system radio /sys/class/sensors/grip_sensor/onoff
chown system radio /sys/class/sensors/grip_sensor/reset
chown system radio /sys/class/sensors/grip_sensor/mode
chown system radio /sys/class/sensors/grip_sensor/gain
chown system radio /sys/class/sensors/grip_sensor/start
chown system radio /sys/class/sensors/grip_sensor/normal_threshold
chown system radio /sys/class/sensors/grip_sensor/gain_ch2
chown system radio /sys/class/sensors/grip_sensor/raw_data_ch2
chown system radio /sys/class/sensors/grip_sensor/diff_avg_ch2
chown system radio /sys/class/sensors/grip_sensor/normal_threshold_ch2
chown system radio /sys/class/sensors/grip_sensor/ch_state
chown system radio /sys/class/sensors/grip_sensor/body_threshold
chown system radio /sys/class/sensors/grip_sensor/grip_flush
chown system radio /sys/class/sensors/grip_sensor/irq_count
# Grip_sensor_wifi
chown system radio /sys/class/sensors/grip_sensor_wifi/name
chown system radio /sys/class/sensors/grip_sensor_wifi/vendor
chown system radio /sys/class/sensors/grip_sensor_wifi/raw_data
chown system radio /sys/class/sensors/grip_sensor_wifi/threshold
chown system radio /sys/class/sensors/grip_sensor_wifi/calibration
chown system radio /sys/class/sensors/grip_sensor_wifi/onoff
chown system radio /sys/class/sensors/grip_sensor_wifi/reset
chown system radio /sys/class/sensors/grip_sensor_wifi/mode
chown system radio /sys/class/sensors/grip_sensor_wifi/gain
chown system radio /sys/class/sensors/grip_sensor_wifi/start
chown system radio /sys/class/sensors/grip_sensor_wifi/normal_threshold
chown system radio /sys/class/sensors/grip_sensor_wifi/gain_ch2
chown system radio /sys/class/sensors/grip_sensor_wifi/raw_data_ch2
chown system radio /sys/class/sensors/grip_sensor_wifi/diff_avg_ch2
chown system radio /sys/class/sensors/grip_sensor_wifi/normal_threshold_ch2
chown system radio /sys/class/sensors/grip_sensor_wifi/ch_state
chown system radio /sys/class/sensors/grip_sensor_wifi/body_threshold
chown system radio /sys/class/sensors/grip_sensor_wifi/grip_flush
# Accelerometer Sensor
chown system radio /sys/class/sensors/accelerometer_sensor/name
chown system radio /sys/class/sensors/accelerometer_sensor/vendor
chown system radio /sys/class/sensors/accelerometer_sensor/raw_data
chown system radio /sys/class/sensors/accelerometer_sensor/calibration
chown system radio /sys/class/sensors/accelerometer_sensor/selftest
chown system radio /sys/class/sensors/accelerometer_sensor/reactive_alert
chown system radio /sys/class/sensors/accelerometer_sensor/lowpassfilter
# Gyro Sensor
chown system radio /sys/class/sensors/gyro_sensor/name
chown system radio /sys/class/sensors/gyro_sensor/vendor
chown system radio /sys/class/sensors/gyro_sensor/power_on
chown system radio /sys/class/sensors/gyro_sensor/power_off
chown system radio /sys/class/sensors/gyro_sensor/selftest
chown system radio /sys/class/sensors/gyro_sensor/temperature
# Magnetic Sensor
chown system radio /sys/class/sensors/magnetic_sensor/name
chown system radio /sys/class/sensors/magnetic_sensor/vendor
chown system radio /sys/class/sensors/magnetic_sensor/raw_data
chown system radio /sys/class/sensors/magnetic_sensor/adc
chown system radio /sys/class/sensors/magnetic_sensor/asa
chown system radio /sys/class/sensors/magnetic_sensor/dac
chown system radio /sys/class/sensors/magnetic_sensor/chk_registers
chown system radio /sys/class/sensors/magnetic_sensor/selftest
# Barometer Sensor
chown system radio /sys/class/sensors/barometer_sensor/name
chown system radio /sys/class/sensors/barometer_sensor/vendor
chown system radio /sys/class/sensors/barometer_sensor/sea_level_pressure
chown system radio /sys/class/sensors/barometer_sensor/calibration
chown system radio /sys/class/sensors/barometer_sensor/eeprom_check
chown system radio /sys/class/sensors/barometer_sensor/temperature
# Proximity Sensor
chown system radio /sys/class/sensors/proximity_sensor/name
chown system radio /sys/class/sensors/proximity_sensor/vendor
chown system radio /sys/class/sensors/proximity_sensor/state
chown system radio /sys/class/sensors/proximity_sensor/raw_data
chown system radio /sys/class/sensors/proximity_sensor/barcode_emul_en
chown system radio /sys/class/sensors/proximity_sensor/prox_avg
chown system radio /sys/class/sensors/proximity_sensor/prox_cal
chown system radio /sys/class/sensors/proximity_sensor/thresh_high
chown system radio /sys/class/sensors/proximity_sensor/thresh_low
chown system radio /sys/class/sensors/proximity_sensor/prox_offset_pass
chown system radio /sys/class/sensors/proximity_sensor/prox_trim
chown system radio /sys/class/sensors/proximity_sensor/thresh_detect_high
chown system radio /sys/class/sensors/proximity_sensor/thresh_detect_low
chown system radio /sys/class/sensors/proximity_sensor/prox_alert_thresh
# Light Sensor
chown system radio /sys/class/sensors/light_sensor/name
chown system radio /sys/class/sensors/light_sensor/vendor
chown system radio /sys/class/sensors/light_sensor/lux
chown system radio /sys/class/sensors/light_sensor/raw_data
# Hidden Hole
chown system radio /sys/class/sensors/hidden_hole/hh_ver
chown system radio /sys/class/sensors/hidden_hole/hh_write_all_data
chown system radio /sys/class/sensors/hidden_hole/hh_is_exist_efs
# MOBEAM
chown system radio /sys/class/sec/sec_barcode_emul/vendor
chown system radio /sys/class/sec/sec_barcode_emul/name
chown system radio /sys/class/sec/sec_barcode_emul/barcode_send
chown system radio /sys/class/sec/sec_barcode_emul/barcode_led_status
chown system radio /sys/class/sec/sec_barcode_emul/barcode_ver_check
# SSC CORE
chown system radio /sys/class/sensors/ssc_core/operation_mode
chown system log /sys/class/sensors/ssc_core/dumpstate
chown system radio /sys/class/sensors/ssc_core/ssc_pid
chown system radio /sys/class/sensors/ssc_core/mode
chown system system /sys/class/sensors/ssc_core/remove_sysfs
setprop debug.sensor.logging.slpi true
#Meta event
chown system radio /sys/class/sensors/sensor_dev/flush
# Define default initial receive window size in segments.
setprop net.tcp.default_init_rwnd 60
# MMC / SDcard
chown system system /sys/block/mmcblk0/device/unique_number
chmod 440 /sys/block/mmcblk0/device/unique_number
chown system system /sys/class/sec/mmc/mmc_data
chmod 444 /sys/class/sec/mmc/mmc_data
chown system system /sys/class/sec/mmc/mmc_summary
chmod 444 /sys/class/sec/mmc/mmc_summary
chown system system /sys/block/mmcblk0/device/cid
chmod 444 /sys/block/mmcblk0/device/cid
chown system system /sys/block/mmcblk1/device/cid
chmod 444 /sys/block/mmcblk1/device/cid
chown system system /sys/class/sec/sdcard/cd_cnt
chmod 444 /sys/class/sec/sdcard/cd_cnt
chown system system /sys/class/sec/sdcard/sdcard_summary
chmod 444 /sys/class/sec/sdcard/sdcard_summary
chown system system /sys/class/sec/sddata/sd_data
chmod 444 /sys/class/sec/sddata/sd_data
chown system system /sys/class/sec/sdinfo/sd_count
chmod 444 /sys/class/sec/sdinfo/sd_count
chown system system /sys/class/sec/sdinfo/data
chmod 444 /sys/class/sec/sdinfo/data
chown system system /sys/block/mmcblk0/diskios
chmod 660 /sys/block/mmcblk0/diskios