| on early-init |
| mkdir /mnt/vendor/efs 0771 radio system |
| mkdir /mnt/vendor/cpefs 0771 radio system |
| mkdir /mnt/vendor/persist 0771 system system |
| |
| on init |
| # Set permissions for persist partition |
| mkdir /persist 0771 system system |
| |
| #Reactivation Lock |
| symlink /dev/block/platform/13520000.ufs/by-name/steady /dev/block/steady |
| |
| #Google FRP solution |
| symlink /dev/block/platform/13520000.ufs/by-name/persistent /dev/block/persistent |
| |
| ## SCSC WLAN |
| # SD-755: Increase default socket rx buffer limit |
| # Apply network parameters for high data performance. |
| write /proc/sys/net/core/rmem_default 4194304 |
| write /proc/sys/net/core/rmem_max 8388608 |
| write /proc/sys/net/core/wmem_default 327680 |
| write /proc/sys/net/core/wmem_max 8388608 |
| write /proc/sys/net/core/optmem_max 20480 |
| write /proc/sys/net/core/netdev_max_backlog 10000 |
| write /proc/sys/net/ipv4/tcp_rmem "2097152 4194304 8388608" |
| write /proc/sys/net/ipv4/tcp_wmem "262144 524288 1048576" |
| write /proc/sys/net/ipv4/tcp_mem "44259 59012 88518" |
| write /proc/sys/net/ipv4/udp_mem "88518 118025 177036" |
| |
| write /sys/class/net/rmnet0/queues/rx-0/rps_cpus fe |
| write /sys/class/net/rmnet0/queues/rx-0/rps_flow_cnt 64 |
| write /sys/class/net/rmnet1/queues/rx-0/rps_cpus fe |
| write /sys/class/net/rmnet1/queues/rx-0/rps_flow_cnt 64 |
| write /sys/class/net/rmnet2/queues/rx-0/rps_cpus fe |
| write /sys/class/net/rmnet2/queues/rx-0/rps_flow_cnt 64 |
| write /sys/class/net/rmnet3/queues/rx-0/rps_cpus fe |
| write /sys/class/net/rmnet3/queues/rx-0/rps_flow_cnt 64 |
| write /sys/class/net/rmnet4/queues/rx-0/rps_cpus fe |
| write /sys/class/net/rmnet4/queues/rx-0/rps_flow_cnt 64 |
| write /sys/class/net/rmnet5/queues/rx-0/rps_cpus fe |
| write /sys/class/net/rmnet5/queues/rx-0/rps_flow_cnt 64 |
| write /sys/class/net/rmnet6/queues/rx-0/rps_cpus fe |
| write /sys/class/net/rmnet6/queues/rx-0/rps_flow_cnt 64 |
| write /sys/class/net/rmnet7/queues/rx-0/rps_cpus fe |
| write /sys/class/net/rmnet7/queues/rx-0/rps_flow_cnt 64 |
| write /proc/sys/net/core/rps_sock_flow_entries 64 |
| |
| ## SCSC BT |
| chown bluetooth bluetooth /sys/module/scsc_bt/parameters/bluetooth_address |
| |
| |
| # add stune/hot |
| mkdir /dev/stune/hot |
| chown system system /dev/stune/hot |
| chown system system /dev/stune/hot/tasks |
| chmod 0664 /dev/stune/hot/tasks |
| |
| # EAS stune boosting interfaces |
| chown system system /dev/stune/top-app/schedtune.boost |
| chown system system /dev/stune/top-app/schedtune.prefer_idle |
| chown system system /dev/stune/top-app/schedtune.prefer_perf |
| chown system system /dev/stune/top-app/cgroup.procs |
| |
| chown system system /dev/stune/foreground/schedtune.boost |
| chown system system /dev/stune/foreground/schedtune.prefer_idle |
| chown system system /dev/stune/foreground/schedtune.prefer_perf |
| chown system system /dev/stune/foreground/cgroup.procs |
| |
| chown system system /dev/stune/background/schedtune.boost |
| chown system system /dev/stune/background/schedtune.prefer_idle |
| chown system system /dev/stune/background/schedtune.prefer_perf |
| chown system system /dev/stune/background/cgroup.procs |
| |
| chown system system /dev/stune/schedtune.boost |
| chown system system /dev/stune/schedtune.prefer_idle |
| chown system system /dev/stune/schedtune.prefer_perf |
| chown system system /dev/stune/cgroup.procs |
| |
| write /dev/stune/top-app/schedtune.boost 0 |
| write /dev/stune/top-app/schedtune.prefer_idle 1 |
| write /dev/stune/top-app/schedtune.prefer_perf 0 |
| write /dev/stune/top-app/schedtune.util_est_en 1 |
| write /dev/stune/top-app/schedtune.ontime_en 1 |
| |
| write /dev/stune/foreground/schedtune.boost 0 |
| write /dev/stune/foreground/schedtune.prefer_idle 0 |
| write /dev/stune/foreground/schedtune.prefer_perf 0 |
| write /dev/stune/foreground/schedtune.util_est_en 1 |
| write /dev/stune/foreground/schedtune.ontime_en 1 |
| |
| write /dev/stune/background/schedtune.boost 0 |
| write /dev/stune/background/schedtune.prefer_idle 0 |
| write /dev/stune/background/schedtune.prefer_perf 0 |
| |
| write /dev/stune/schedtune.boost 0 |
| |
| chown system system /dev/cpuset/tasks |
| chown system system /dev/cpuset/cgroup.procs |
| chmod 0664 /dev/cpuset/tasks |
| |
| # for power hal |
| chown system radio /dev/cluster0_freq_min |
| chown system radio /dev/cluster0_freq_max |
| chown system radio /dev/cluster1_freq_min |
| chown system radio /dev/cluster1_freq_max |
| chown system radio /dev/cpu_dma_latency |
| chown system radio /dev/stune/top-app/schedtune.boost |
| chmod 0664 /dev/cluster0_freq_min |
| chmod 0664 /dev/cluster0_freq_max |
| chmod 0664 /dev/cluster1_freq_min |
| chmod 0664 /dev/cluster1_freq_max |
| chmod 0664 /dev/cpu_dma_latency |
| chmod 0664 /dev/stune/top-app/schedtune.boost |
| |
| #sensor |
| chmod 0664 /dev/nanohub |
| chmod 0664 /dev/nanohub_comms |
| chown system system /dev/nanohub |
| chown system system /dev/nanohub_comms |
| |
| # Configuration to G2D blocking mode |
| write /sys/module/g2d_task/parameters/block_on_contension 1 |
| |
| start watchdogd |
| |
| setprop ro.boot.hardware.revision ${ro.revision} |
| |
| on post-fs |
| # set RLIMIT_MEMLOCK to 64MB |
| setrlimit 8 67108864 67108864 |
| |
| on post-fs-data |
| # setup cgroup freezer for freecess |
| mkdir /dev/freezer |
| mount cgroup none /dev/freezer freezer |
| mkdir /dev/freezer/frozen |
| mkdir /dev/freezer/thaw |
| write /dev/freezer/frozen/freezer.state FROZEN |
| write /dev/freezer/thaw/freezer.state THAWED |
| |
| # MARs for freecess |
| chown system system /dev/freezer |
| chown system system /dev/freezer/frozen |
| chown system system /dev/freezer/frozen/tasks |
| chown system system /dev/freezer/frozen/cgroup.procs |
| chown system system /dev/freezer/frozen/freezer.state |
| chown system system /dev/freezer/thaw |
| chown system system /dev/freezer/thaw/tasks |
| chown system system /dev/freezer/thaw/cgroup.procs |
| |
| # MARs for freecess |
| chmod 0644 /dev/freezer/frozen/tasks |
| chmod 0644 /dev/freezer/frozen/cgroup.procs |
| chmod 0644 /dev/freezer/frozen/freezer.state |
| chmod 0644 /dev/freezer/thaw/tasks |
| chmod 0644 /dev/freezer/thaw/cgroup.procs |
| |
| # OLAF setup |
| mkdir /dev/freezer/olaf |
| write /dev/freezer/olaf/freezer.state THAWED |
| chown system system /dev/freezer/olaf |
| chown system system /dev/freezer/olaf/tasks |
| chown system system /dev/freezer/olaf/cgroup.procs |
| chown system system /dev/freezer/olaf/freezer.state |
| chmod 0644 /dev/freezer/olaf/tasks |
| chmod 0644 /dev/freezer/olaf/cgroup.procs |
| chmod 0644 /dev/freezer/olaf/freezer.state |
| |
| # Slowdown freezer |
| mkdir /dev/freezer/abnormal |
| write /dev/freezer/abnormal/freezer.state THAWED |
| chown system system /dev/freezer/abnormal |
| chown system system /dev/freezer/abnormal/tasks |
| chown system system /dev/freezer/abnormal/cgroup.procs |
| chown system system /dev/freezer/abnormal/freezer.state |
| chmod 0644 /dev/freezer/abnormal/tasks |
| chmod 0644 /dev/freezer/abnormal/cgroup.procs |
| chmod 0644 /dev/freezer/abnormal/freezer.state |
| |
| # TEEGRIS service |
| mkdir /data/vendor/tee 0700 system system |
| |
| # Log data folder |
| mkdir /data/vendor 0771 root system |
| mkdir /data/vendor/log 0771 root system |
| mkdir /data/vendor/log/abox 0771 audioserver system |
| |
| setprop vold.post_fs_data_done 1 |
| |
| # SensorHub Log folder |
| mkdir /data/vendor/sensorhub/ 0771 root system |
| |
| # swap |
| swapon_all /vendor/etc/fstab.exynos9611 |
| |
| # Permissions Camera |
| mkdir /data/vendor/camera 0770 cameraserver system |
| chown cameraserver cameraserver /sys/kernel/mm/vmscan/mem_boost_mode |
| chown system radio /sys/class/camera/rear/rear_camfw |
| chown system radio /sys/class/camera/rear/rear_camfw_full |
| chown system radio /sys/class/camera/rear/rear_checkfw_user |
| chown system radio /sys/class/camera/rear/rear_checkfw_factory |
| chown system radio /sys/class/camera/rear/rear_sensor_standby |
| chown system radio /sys/class/camera/rear/rear_camtype |
| chown system radio /sys/class/camera/rear/rear_calcheck |
| chown system radio /sys/class/camera/rear/rear_afcal |
| chown system system /sys/class/camera/rear/rear_hwparam |
| chown cameraserver system /sys/class/camera/rear/rear_dualcal |
| chown cameraserver cameraserver /sys/class/camera/rear/rear_awb_master |
| chown cameraserver cameraserver /sys/class/camera/rear/rear_awb_module |
| chown cameraserver cameraserver /sys/class/camera/rear/rear_sensorid_exif |
| chown cameraserver cameraserver /sys/class/camera/rear/rear_sensorid |
| chown cameraserver cameraserver /sys/class/camera/rear/ssrm_camera_info |
| chown system radio /sys/class/camera/rear/isp_core |
| chown system radio /sys/class/camera/rear/fw_update |
| chown system radio /sys/class/camera/rear/rear_moduleid |
| chown system radio /sys/class/camera/front/front_camfw |
| chown system radio /sys/class/camera/front/front_camfw_full |
| chown system radio /sys/class/camera/front/front_checkfw_user |
| chown system radio /sys/class/camera/front/front_checkfw_factory |
| chown system radio /sys/class/camera/front/front_camtype |
| chown system radio /sys/class/camera/front/front_moduleid |
| chown system system /sys/class/camera/front/front_hwparam |
| chown cameraserver cameraserver /sys/class/camera/front/front_sensorid_exif |
| chown cameraserver cameraserver /sys/class/camera/front/front_sensorid |
| chown cameraserver cameraserver /sys/class/camera/front/front_xtalkcal |
| chown system radio /sys/class/camera/rear/supported_cameraIds |
| |
| chown system radio /sys/class/camera/flash/rear_flash |
| chown cameraserver system /sys/class/camera/flash/rear_torch_flash |
| |
| ## Rear2 camera permission |
| chown system radio /sys/class/camera/rear/rear2_camfw |
| chown system radio /sys/class/camera/rear/rear2_camfw_full |
| chown system radio /sys/class/camera/rear/rear2_checkfw_user |
| chown system radio /sys/class/camera/rear/rear2_checkfw_factory |
| chown system system /sys/class/camera/rear/rear2_hwparam |
| chown cameraserver cameraserver /sys/class/camera/rear/rear2_sensorid_exif |
| chown cameraserver cameraserver /sys/class/camera/rear/rear2_sensorid |
| chown system radio /sys/class/camera/rear/rear2_moduleid |
| |
| ## Rear3 camera permission |
| chown system radio /sys/class/camera/rear/rear3_camfw |
| chown system radio /sys/class/camera/rear/rear3_camfw_full |
| chown system radio /sys/class/camera/rear/rear3_checkfw_user |
| chown system radio /sys/class/camera/rear/rear3_checkfw_factory |
| chown system system /sys/class/camera/rear/rear3_hwparam |
| chown cameraserver cameraserver /sys/class/camera/rear/rear3_sensorid_exif |
| chown cameraserver cameraserver /sys/class/camera/rear/rear3_sensorid |
| chown system radio /sys/class/camera/rear/rear3_moduleid |
| chown system radio /sys/class/camera/rear/rear3_tilt |
| |
| ## rear4 camera permission |
| chown system radio /sys/class/camera/rear/rear4_camfw |
| chown system radio /sys/class/camera/rear/rear4_camfw_full |
| chown system radio /sys/class/camera/rear/rear4_checkfw_user |
| chown system radio /sys/class/camera/rear/rear4_checkfw_factory |
| chown system system /sys/class/camera/rear/rear4_hwparam |
| chown cameraserver cameraserver /sys/class/camera/rear/rear4_sensorid_exif |
| chown cameraserver cameraserver /sys/class/camera/rear/rear4_sensorid |
| chown system radio /sys/class/camera/rear/rear4_moduleid |
| chown system radio /sys/class/camera/rear/rear4_tilt |
| |
| # Permission for flashlight control for HAL3.3 |
| # The Istor espresso board does not have the flash led h/w, So the below permission line are blocked. |
| # If you want to test the flashlight in universal board which have the flash led h/w, Enable the below blocked lines. |
| chmod 0660 /sys/class/camera/flash/rear_flash |
| chown cameraserver system /sys/class/camera/flash/rear_flash |
| |
| # Permissions for SVC |
| chown system system /sys/devices/svc/Camera/SVC_rear_module |
| chown system system /sys/devices/svc/Camera/SVC_front_module |
| |
| # HWC data |
| mkdir /data/vendor/log/hwc 0771 system graphics |
| |
| # permissions for bluetooth. |
| setprop ro.bt.bdaddr_path "/mnt/vendor/efs/bluetooth/bt_addr" |
| chown bluetooth bluetooth ro.bt.bdaddr_path |
| |
| # Permissions for GNSS |
| chown root system /dev/ttySAC6 |
| chmod 0660 /dev/ttySAC6 |
| |
| # for BT MAC address |
| mkdir /mnt/vendor/efs/bluetooth 0770 system bluetooth |
| # if already exist |
| chown system bluetooth /mnt/vendor/efs/bluetooth |
| chown system bluetooth /mnt/vendor/efs/bluetooth/bt_addr |
| chmod 0770 /mnt/vendor/efs/bluetooth |
| chmod 0660 /mnt/vendor/efs/bluetooth/bt_addr |
| |
| # for WIFI MAC address |
| mkdir /mnt/vendor/efs/wifi 0775 wifi root |
| chown wifi root /mnt/vendor/efs/wifi/.mac.info |
| chmod 0664 /mnt/vendor/efs/wifi/.mac.info |
| chown wifi root /mnt/vendor/efs/wifi/.mac.cob |
| chmod 0664 /mnt/vendor/efs/wifi/.mac.cob |
| |
| # write /sys/module/scsc_mx/parameters/disable_recovery_handling 0 |
| |
| # Samsung Pay |
| # mkdir /efs/pfw_data 0760 vendor_spay vendor_spay |
| |
| # MST/NFC Switch |
| # chown vendor_spay system /dev/mst_ctrl |
| # chmod 0660 /dev/mst_ctrl |
| |
| on boot |
| # SSWAP |
| write /proc/sys/vm/swappiness 145 |
| |
| write /proc/sys/vm/min_free_order_shift 4 |
| |
| # Permissions for NAD |
| symlink /dev/block/platform/13520000.ufs/by-name/nad_refer /dev/block/NAD_REFER |
| |
| # CPU dynamic hotplug |
| chown system system /sys/power/cpuhp/enabled |
| chown system system /sys/power/cpuhp/online_cpu |
| chown system system /sys/power/cpuhp/set_online_cpu |
| chmod 0664 /sys/power/cpuhp/enabled |
| chmod 0664 /sys/power/cpuhp/set_online_cpu |
| |
| # CPU C-state node |
| chown radio system /sys/module/cpuidle/parameters/off |
| chmod 0664 /sys/module/cpuidle/parameters/off |
| |
| # CPU online status |
| chown system system /sys/devices/system/cpu/cpu1/online |
| chown system system /sys/devices/system/cpu/cpu2/online |
| chown system system /sys/devices/system/cpu/cpu3/online |
| chown system system /sys/devices/system/cpu/cpu4/online |
| chown system system /sys/devices/system/cpu/cpu5/online |
| chown system system /sys/devices/system/cpu/cpu6/online |
| chown system system /sys/devices/system/cpu/cpu7/online |
| |
| # RTC reset status (bigdata) |
| chown system system /sys/power/rtc_status |
| chown system system /efs/FactoryApp/rtc_status |
| chmod 0664 /efs/FactoryApp/rtc_status |
| |
| # Change permission for A-Box firmware logs file & GPR dump |
| chown audioserver system /sys/devices/platform/14a50000.abox/reset |
| chown audioserver system /sys/devices/platform/14a50000.abox/service |
| chown audioserver system /sys/devices/platform/14a50000.abox/0.abox_debug/gpr |
| chown audioserver system /sys/devices/platform/14a50000.abox/0.abox_debug/calliope_sram |
| chown audioserver system /sys/devices/platform/14a50000.abox/0.abox_debug/calliope_dram |
| |
| # BarTender |
| mkdir /dev/cpuctl/bg_cached |
| chown system system /dev/cpuctl/bg_cached/tasks |
| chown system system /dev/cpuctl/bg_cached/cpu.cfs_period_us |
| chown system system /dev/cpuctl/bg_cached/cpu.cfs_quota_us |
| chmod 0666 /dev/cpuctl/bg_cached/tasks |
| chmod 0664 /dev/cpuctl/bg_cached/cpu.cfs_period_us |
| chmod 0664 /dev/cpuctl/bg_cached/cpu.cfs_quota_us |
| write /dev/cpuctl/bg_cached/cpu.rt_runtime_us 950000 |
| write /dev/cpuctl/bg_cached/cpu.rt_period_us 1000000 |
| write /dev/cpuctl/bg_cached/cpu.cfs_period_us 20000 |
| write /dev/cpuctl/bg_cached/cpu.cfs_quota_us 10000 |
| |
| mkdir /dev/cpuctl/bg_abnormal |
| chown system system /dev/cpuctl/bg_abnormal/tasks |
| chown system system /dev/cpuctl/bg_abnormal/cpu.cfs_period_us |
| chown system system /dev/cpuctl/bg_abnormal/cpu.cfs_quota_us |
| chmod 0666 /dev/cpuctl/bg_abnormal/tasks |
| chmod 0664 /dev/cpuctl/bg_abnormal/cpu.cfs_period_us |
| chmod 0664 /dev/cpuctl/bg_abnormal/cpu.cfs_quota_us |
| write /dev/cpuctl/bg_abnormal/cpu.rt_runtime_us 950000 |
| write /dev/cpuctl/bg_abnormal/cpu.rt_period_us 1000000 |
| write /dev/cpuctl/bg_abnormal/cpu.cfs_period_us 20000 |
| write /dev/cpuctl/bg_abnormal/cpu.cfs_quota_us 10000 |
| |
| mkdir /dev/cpuset/cached |
| write /dev/cpuset/cached/cpus 0-3 |
| copy /dev/cpuset/mems /dev/cpuset/cached/mems |
| mkdir /dev/cpuset/abnormal |
| write /dev/cpuset/abnormal/cpus 0-3 |
| copy /dev/cpuset/mems /dev/cpuset/abnormal/mems |
| |
| # change permissions for BarTender's cpusets we'll touch at runtime |
| chown system system /dev/cpuset/cached |
| chown system system /dev/cpuset/abnormal |
| chown system system /dev/cpuset/cached/tasks |
| chown system system /dev/cpuset/abnormal/tasks |
| chown system system /dev/cpuset/cached/cpus |
| chown system system /dev/cpuset/abnormal/cpus |
| chmod 0664 /dev/cpuset/cached/tasks |
| chmod 0664 /dev/cpuset/abnormal/tasks |
| chmod 0664 /dev/cpuset/cached/cpus |
| chmod 0664 /dev/cpuset/abnormal/cpus |
| |
| #Performance |
| #CPUFREQ |
| chown system system /sys/power/cpufreq_min_limit |
| chown system system /sys/power/cpufreq_max_limit |
| chown system system /sys/power/cpufreq_table |
| |
| chmod 0664 /sys/power/cpufreq_min_limit |
| chmod 0664 /sys/power/cpufreq_max_limit |
| |
| #CPUSET |
| chown system system /dev/cpuset/top-app/cpus |
| chown system system /dev/cpuset/foreground/cpus |
| chown system system /dev/cpuset/background/cpus |
| chown system system /dev/cpuset/system-background/cpus |
| chown system system /dev/cpuset/restricted/cpus |
| chown system system /dev/cpuset/cpus |
| chmod 0664 /dev/cpuset/top-app/cpus |
| chmod 0664 /dev/cpuset/foreground/cpus |
| chmod 0664 /dev/cpuset/background/cpus |
| chmod 0664 /dev/cpuset/system-background/cpus |
| chmod 0664 /dev/cpuset/restricted/cpus |
| chmod 0664 /dev/cpuset/cpus |
| write /dev/cpuset/top-app/cpus 0-7 |
| write /dev/cpuset/foreground/cpus 0-7 |
| write /dev/cpuset/background/cpus 0-7 |
| write /dev/cpuset/system-background/cpus 0-7 |
| write /dev/cpuset/restricted/cpus 0-3 |
| |
| # Cstate node |
| chown radio system /sys/module/cpuidle/parameters/off |
| chmod 0664 /sys/module/cpuidle/parameters/off |
| |
| # 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 |
| |
| # LPM Info |
| chown system system /efs/lpm_info.log |
| chmod 0660 /efs/lpm_info.log |
| |
| #GPU |
| chown radio system /sys/devices/platform/11500000.mali/cl_boost_disable |
| chown radio system /sys/devices/platform/11500000.mali/dvfs_min_lock |
| chown radio system /sys/devices/platform/11500000.mali/dvfs_max_lock |
| chown radio system /sys/devices/platform/11500000.mali/dvfs_table |
| chmod 0664 /sys/devices/platform/11500000.mali/cl_boost_disable |
| chmod 0664 /sys/devices/platform/11500000.mali/dvfs_min_lock |
| chmod 0664 /sys/devices/platform/11500000.mali/dvfs_max_lock |
| chmod 0664 /sys/devices/platform/11500000.mali/dvfs_table |
| |
| #BUS |
| chown system radio /sys/devices/platform/17000010.devfreq_mif/devfreq/17000010.devfreq_mif/scaling_devfreq_min |
| chown system radio /sys/devices/platform/17000010.devfreq_mif/devfreq/17000010.devfreq_mif/available_frequencies |
| chmod 0664 /sys/devices/platform/17000010.devfreq_mif/devfreq/17000010.devfreq_mif/scaling_devfreq_min |
| chmod 0444 /sys/devices/platform/17000010.devfreq_mif/devfreq/17000010.devfreq_mif/available_frequencies |
| |
| #Secure OS |
| chown system radio /sys/devices/system/sec_os_ctrl/migrate_os |
| chmod 0664 sys/devices/system/sec_os_ctrl/migrate_os |
| |
| # Permission for USB SELECT |
| chown system system /sys/class/android_usb/android0/enable |
| chmod 0660 /sys/class/android_usb/android0/enable |
| chown system system /sys/class/android_usb/android0/idVendor |
| chmod 0660 /sys/class/android_usb/android0/idVendor |
| chown system system /sys/class/android_usb/android0/idProduct |
| chmod 0660 /sys/class/android_usb/android0/idProduct |
| chown system system /sys/class/android_usb/android0/f_diag/clients |
| chmod 0660 /sys/class/android_usb/android0/f_diag/clients |
| chown system system /sys/class/android_usb/android0/functions |
| chmod 0660 /sys/class/android_usb/android0/functions |
| chown system system /sys/class/android_usb/android0/bDeviceClass |
| chmod 0660 /sys/class/android_usb/android0/bDeviceClass |
| |
| # Permission for UART SWITCH |
| chmod 0660 /sys/class/sec/switch/uart_sel |
| chown system system /sys/class/sec/switch/uart_sel |
| |
| on late-fs |
| wait_for_prop hwservicemanager.ready true |
| mount_all /vendor/etc/fstab.exynos9611 --late |
| |
| on fs |
| mount_all /vendor/etc/fstab.exynos9611 --early |
| # We need to seperate mounting SEC_EFS partition from fstab file due to GSI image loading case |
| wait /dev/block/platform/13520000.ufs/by-name/sec_efs |
| mount ext4 /dev/block/platform/13520000.ufs/by-name/sec_efs /efs nosuid nodev noatime noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic,no_sehash_xattr |
| |
| restorecon_recursive /mnt/vendor/efs |
| restorecon_recursive /mnt/vendor/cpefs |
| restorecon_recursive /mnt/vendor/persist |
| |
| mkdir /mnt/vendor/persist/data/sfs 0700 system system |
| mkdir /mnt/vendor/persist/data/tz 0700 system system |
| |
| chown radio system /mnt/vendor/efs |
| chmod 0771 /mnt/vendor/efs |
| chown radio system /mnt/vendor/cpefs |
| chmod 0771 /mnt/vendor/cpefs |
| chown system system /mnt/vendor/persist |
| |
| # Permissions for ION |
| chmod 0660 /sys/class/ion_cma/ion_video_ext/isolated |
| chown system system /sys/class/ion_cma/ion_video_ext/isolated |
| |
| # Permissions for backlight |
| chown system system /sys/class/backlight/panel/brightness |
| |
| # Permissions for LCD |
| chown system radio /sys/class/lcd/panel/lcd_type |
| chown system system /sys/class/lcd/panel/lux |
| chown system radio /sys/class/lcd/panel/conn_det |
| chown system radio /sys/class/lcd/panel/abnormal_temperature |
| |
| # Permissions for MDNIE |
| chown system media_rw /sys/class/mdnie/mdnie/mode |
| chown system media_rw /sys/class/mdnie/mdnie/scenario |
| chown system system /sys/class/mdnie/mdnie/accessibility |
| chown system system /sys/class/mdnie/mdnie/sensorRGB |
| chown system system /sys/class/mdnie/mdnie/whiteRGB |
| chown system system /sys/class/mdnie/mdnie/night_mode |
| chown system system /sys/class/mdnie/mdnie/light_notification |
| chown system system /sys/class/mdnie/mdnie/color_lens |
| chown system system /sys/class/mdnie/mdnie/bypass |
| |
| # Sensors permissions |
| # Permissions for Fingerprint sensor |
| chmod 0660 /dev/esfp0 |
| chown system system /dev/esfp0 |
| chown system radio /sys/class/fingerprint/fingerprint/type_check |
| chown system radio /sys/class/fingerprint/fingerprint/name |
| chown system radio /sys/class/fingerprint/fingerprint/vendor |
| chown system radio /sys/class/fingerprint/fingerprint/adm |
| chown system radio /sys/class/fingerprint/fingerprint/bfs_values |
| mkdir /efs/biometrics 0770 system system |
| mkdir /efs/biometrics/meta 0770 system system |
| |
| # Sensors permissions |
| # FactoryApp(SensorHub) |
| chown root system /efs/FactoryApp/baro_delta |
| chown root system /efs/FactoryApp/gyro_cal_data |
| chown root system /efs/FactoryApp/cal_data |
| chown root system /efs/FactoryApp/mag_cal_data |
| |
| # Accelerometer_sensor |
| 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/reactive_alert |
| chown system radio /sys/class/sensors/accelerometer_sensor/vendor |
| chown system radio /sys/class/sensors/accelerometer_sensor/name |
| chown system radio /sys/class/sensors/accelerometer_sensor/selftest |
| chown system radio /sys/class/sensors/accelerometer_sensor/lowpassfilter |
| chown system system /sys/class/sensors/accelerometer_sensor/dhr_sensor_info |
| chown system system /efs/calibration_data |
| chmod 0666 /efs/calibration_data |
| |
| # Gyro_sensor |
| 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/temperature |
| chown system radio /sys/class/sensors/gyro_sensor/selftest |
| chown system radio /sys/class/sensors/gyro_sensor/selftest_dps |
| chown system radio /sys/class/sensors/gyro_sensor/vendor |
| chown system radio /sys/class/sensors/gyro_sensor/name |
| chown system system /sys/class/sensors/gyro_sensor/dhr_sensor_info |
| |
| # Magnetic_sensor |
| chown system radio /sys/class/sensors/magnetic_sensor/raw_data |
| chown system radio /sys/class/sensors/magnetic_sensor/vendor |
| chown system radio /sys/class/sensors/magnetic_sensor/name |
| chown system radio /sys/class/sensors/magnetic_sensor/selftest |
| chown system radio /sys/class/sensors/magnetic_sensor/raw_data |
| chown system system /sys/class/sensors/magnetic_sensor/dhr_sensor_info |
| |
| # Light_sensor |
| chown system radio /sys/class/sensors/light_sensor/lux |
| chown system radio /sys/class/sensors/light_sensor/raw_data |
| chown system radio /sys/class/sensors/light_sensor/vendor |
| chown system radio /sys/class/sensors/light_sensor/name |
| chown system system /sys/class/sensors/light_sensor/dhr_sensor_info |
| chown system radio /sys/class/sensors/light_sensor/light_circle |
| |
| # Proximity_sensor |
| 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/prox_avg |
| chown system radio /sys/class/sensors/proximity_sensor/prox_cal |
| chown system radio /sys/class/sensors/proximity_sensor/vendor |
| chown system radio /sys/class/sensors/proximity_sensor/name |
| 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/thresh_detect_high |
| chown system radio /sys/class/sensors/proximity_sensor/thresh_detect_low |
| chown system radio /sys/class/sensors/proximity_sensor/barcode_emul_en |
| chown system radio /sys/class/sensors/proximity_sensor/prox_offset_pass |
| chown system radio /sys/class/sensors/proximity_sensor/prox_trim |
| chown system system /sys/class/sensors/proximity_sensor/dhr_sensor_info |
| |
| # Flush |
| chown system radio /sys/class/sensors/sensor_dev/flush |
| |
| # Permissions for 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/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 |
| chown system radio /sys/class/sensors/grip_sensor/resolution |
| chown system radio /sys/class/sensors/grip_sensor/adc_filt |
| chown system radio /sys/class/sensors/grip_sensor/useful_filt |
| chown system radio /sys/class/sensors/grip_sensor/ch_count |
| 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/sampling_freq_ch2 |
| chown system radio /sys/class/sensors/grip_sensor/ch_count |
| chown system radio /sys/class/sensors/grip_sensor/rawfilt_ch2 |
| chown system radio /sys/class/sensors/grip_sensor/irq_count_ch2 |
| |
| chown system radio /sys/class/sensors/grip_sensor/grip_irq_count |
| chown system radio /sys/class/sensors/grip_sensor/grip_threshold |
| chown system radio /sys/class/sensors/grip_sensor/grip_total_cap |
| chown system radio /sys/class/sensors/grip_sensor/grip_sar_enable |
| chown system radio /sys/class/sensors/grip_sensor/grip_sw_reset |
| chown system radio /sys/class/sensors/grip_sensor/grip_earjack |
| chown system radio /sys/class/sensors/grip_sensor/grip |
| chown system radio /sys/class/sensors/grip_sensor/grip_baseline |
| chown system radio /sys/class/sensors/grip_sensor/grip_raw |
| chown system radio /sys/class/sensors/grip_sensor/grip_gain |
| chown system radio /sys/class/sensors/grip_sensor/grip_check |
| chown system radio /sys/class/sensors/grip_sensor/grip_sar_only_mode |
| chown system radio /sys/class/sensors/grip_sensor/grip_sar_press_threshold |
| chown system radio /sys/class/sensors/grip_sensor/grip_sar_release_threshold |
| chown system radio /sys/class/sensors/grip_sensor/grip_firm_version_phone |
| chown system radio /sys/class/sensors/grip_sensor/grip_firm_version_panel |
| chown system radio /sys/class/sensors/grip_sensor/grip_firm_update |
| chown system radio /sys/class/sensors/grip_sensor/grip_firm_update_status |
| chown system radio /sys/class/sensors/grip_sensor/grip_irq_state |
| chown system radio /sys/class/sensors/grip_sensor/grip_irq_en_cnt |
| chown system radio /sys/class/sensors/grip_sensor/grip_reg_rw |
| chown system radio /sys/class/sensors/grip_sensor/grip_crc_check |
| chown system radio /sys/class/sensors/grip_sensor/grip_sw_reset_ready |
| |
| chown system radio /sys/class/sensors/grip_sensor/grip_sar_press_threshold_2ch |
| chown system radio /sys/class/sensors/grip_sensor/grip_sar_release_threshold_2ch |
| |
| chown system radio /sys/class/sensors/grip_sensor/grip_irq_count_2ch |
| chown system radio /sys/class/sensors/grip_sensor/grip_threshold_2ch |
| chown system radio /sys/class/sensors/grip_sensor/grip_total_cap_2ch |
| chown system radio /sys/class/sensors/grip_sensor/grip_2ch |
| chown system radio /sys/class/sensors/grip_sensor/grip_baseline_2ch |
| chown system radio /sys/class/sensors/grip_sensor/grip_raw_2ch |
| chown system radio /sys/class/sensors/grip_sensor/grip_check_2ch |
| chown system radio /sys/class/sensors/grip_sensor/grip_register_recover |
| |
| # WIFI Grip sensor |
| 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 |
| chown system radio /sys/class/sensors/grip_sensor_wifi/irq_count |
| chown system radio /sys/class/sensors/grip_sensor_wifi/ch_count |
| chown system radio /sys/class/sensors/grip_sensor_wifi/resolution |
| chown system radio /sys/class/sensors/grip_sensor_wifi/adc_filt |
| chown system radio /sys/class/sensors/grip_sensor_wifi/useful_filt |
| chown system radio /sys/class/sensors/grip_sensor_wifi/grip_irq_count |
| chown system radio /sys/class/sensors/grip_sensor_wifi/grip_threshold |
| chown system radio /sys/class/sensors/grip_sensor_wifi/grip_total_cap |
| chown system radio /sys/class/sensors/grip_sensor_wifi/grip_sar_enable |
| chown system radio /sys/class/sensors/grip_sensor_wifi/grip_sw_reset |
| chown system radio /sys/class/sensors/grip_sensor_wifi/grip_earjack |
| chown system radio /sys/class/sensors/grip_sensor_wifi/grip |
| chown system radio /sys/class/sensors/grip_sensor_wifi/grip_baseline |
| chown system radio /sys/class/sensors/grip_sensor_wifi/grip_raw |
| chown system radio /sys/class/sensors/grip_sensor_wifi/grip_gain |
| chown system radio /sys/class/sensors/grip_sensor_wifi/grip_check |
| chown system radio /sys/class/sensors/grip_sensor_wifi/grip_sar_only_mode |
| chown system radio /sys/class/sensors/grip_sensor_wifi/grip_sar_press_threshold |
| chown system radio /sys/class/sensors/grip_sensor_wifi/grip_sar_release_threshold |
| chown system radio /sys/class/sensors/grip_sensor_wifi/grip_firm_version_phone |
| chown system radio /sys/class/sensors/grip_sensor_wifi/grip_firm_version_panel |
| chown system radio /sys/class/sensors/grip_sensor_wifi/grip_firm_update |
| chown system radio /sys/class/sensors/grip_sensor_wifi/grip_firm_update_status |
| chown system radio /sys/class/sensors/grip_sensor_wifi/grip_irq_state |
| chown system radio /sys/class/sensors/grip_sensor_wifi/grip_irq_en_cnt |
| chown system radio /sys/class/sensors/grip_sensor_wifi/grip_reg_rw |
| chown system radio /sys/class/sensors/grip_sensor_wifi/grip_crc_check |
| chown system radio /sys/class/sensors/grip_sensor_wifi/grip_sw_reset_ready |
| chown system radio /sys/class/sensors/grip_sensor_wifi/grip_register_recover |
| |
| # Barometer_sensor |
| chown system radio /sys/class/sensors/barometer_sensor/sea_level_pressure |
| chown system radio /sys/class/sensors/barometer_sensor/vendor |
| chown system radio /sys/class/sensors/barometer_sensor/name |
| chown system radio /sys/class/sensors/barometer_sensor/calibration |
| chown system radio /sys/class/sensors/barometer_sensor/temperature |
| chown system system /sys/class/sensors/barometer_sensor/dhr_sensor_info |
| |
| # SensorHub |
| chown system radio /sys/class/sensors/ssp_sensor/enable |
| chown system radio /sys/class/sensors/ssp_sensor/mcu_rev |
| chown system radio /sys/class/sensors/ssp_sensor/mcu_name |
| chown system radio /sys/class/sensors/ssp_sensor/mcu_test |
| chown system radio /sys/class/sensors/ssp_sensor/mcu_reset |
| chown system radio /sys/class/sensors/ssp_sensor/mcu_update |
| chown system radio /sys/class/sensors/ssp_sensor/mcu_sleep_test |
| chown system radio /sys/class/sensors/ssp_sensor/sensor_dump |
| chown system radio /sys/class/sensors/ssp_sensor/hall_ic |
| chown system radio /sys/class/sensors/ssp_sensor/sensor_spec |
| chown system radio /sys/class/sensors/ssp_sensor/scontext_list |
| |
| # Sensorhub IIO |
| chown system radio /sys/class/sensors/ssp_sensor/ssp_flush |
| chown system radio /sys/class/sensors/ssp_sensor/sensor_state |
| chmod 0600 /dev/batch_io |
| chown system system /dev/batch_io |
| |
| # Permissions for LSI NFC |
| # chmod 0660 /dev/sec-nfc |
| # chown nfc nfc /dev/sec-nfc |
| |
| # Diag-daemon |
| mkdir /efs/cpdebug 0771 radio system |
| symlink /dev/block/by-name/cp_debug /efs/cpdebug/node |
| chmod 0660 /efs/cpdebug/node |
| chown radio system /efs/cpdebug/node |
| |
| # ESE |
| chmod 0660 /dev/p3 |
| chown system system /dev/p3 |
| |
| # Permissions for NXP NFC |
| chmod 0660 /dev/pn547 |
| chown nfc nfc /dev/pn547 |
| |
| # Permissions for NXP ESE |
| chmod 0660 /dev/p61 |
| chown system system /dev/p61 |
| |
| # Permissions for Displayport |
| # DP AUX switch control for factory test |
| chmod 0660 /sys/class/dp_sec/dp_sbu_sw_sel |
| chown system system /sys/class/dp_sec/dp_sbu_sw_sel |
| # DP DEX control |
| chmod 0660 /sys/class/dp_sec/dex |
| chown system system /sys/class/dp_sec/dex |
| # DP AUX dev control |
| chmod 0660 /dev/secdp_aux |
| chown system system /dev/secdp_aux |
| # DP error info |
| chmod 0660 /sys/class/dp_sec/dp_error_info |
| chown system system /sys/class/dp_sec/dp_error_info |
| # DP DRM |
| chmod 0660 /sys/class/dp_sec/dp_drm |
| chown system system /sys/class/dp_sec/dp_drm |
| |
| # Permissions for audio |
| chown system radio /sys/class/audio/earjack/select_jack |
| chown system radio /sys/class/audio/earjack/key_state |
| chown system radio /sys/class/audio/earjack/state |
| chown system radio /sys/class/audio/earjack/mic_adc |
| |
| # Cirrus Amp Calibration and Factory test |
| chown system audio /sys/class/cirrus/cirrus_cal/status |
| chown system audio /sys/class/cirrus/cirrus_cal/rdc |
| chown system audio /sys/class/cirrus/cirrus_cal/rdc_r |
| chown system audio /sys/class/cirrus/cirrus_cal/temp |
| chown system audio /sys/class/cirrus/cirrus_cal/temp_r |
| mkdir /efs/cirrus 0770 audioserver audio |
| chown audioserver audio /efs/cirrus/temp_cal |
| chown audioserver audio /efs/cirrus/rdc_cal |
| chown audioserver audio /efs/cirrus/rdc_cal_r |
| chmod 0660 /efs/cirrus/temp_cal |
| chmod 0660 /efs/cirrus/rdc_cal |
| chmod 0660 /efs/cirrus/rdc_cal_r |
| chown system audio /sys/class/cirrus/cirrus_cal/v_status |
| chown system audio /sys/class/cirrus/cirrus_cal/v_validation |
| chown system audio /sys/class/cirrus/cirrus_cal/v_validation_r |
| |
| # Cirrus Amp power |
| chown system audio /sys/class/cirrus/cirrus_pwr/status |
| chown system audio /sys/class/cirrus/cirrus_pwr/value |
| chown system audio /sys/class/cirrus/cirrus_pwr/value_r |
| chown system audio /sys/class/cirrus/cirrus_pwr/spk_t |
| chown system audio /sys/class/cirrus/cirrus_pwr/spk_t_r |
| chown system audio /sys/class/cirrus/cirrus_pwr/env_temp |
| chown system audio /sys/class/cirrus/cirrus_pwr/env_temp_r |
| |
| # Cirrus Amp Bigdata |
| chown system audio /sys/class/cirrus/cirrus_bd/max_exc_left |
| chown system audio /sys/class/cirrus/cirrus_bd/max_exc_right |
| chown system audio /sys/class/cirrus/cirrus_bd/max_temp_left |
| chown system audio /sys/class/cirrus/cirrus_bd/max_temp_right |
| chown system audio /sys/class/cirrus/cirrus_bd/max_temp_keep_left |
| chown system audio /sys/class/cirrus/cirrus_bd/max_temp_keep_right |
| chown system audio /sys/class/cirrus/cirrus_bd/over_exc_count_left |
| chown system audio /sys/class/cirrus/cirrus_bd/over_exc_count_right |
| chown system audio /sys/class/cirrus/cirrus_bd/over_temp_count_left |
| chown system audio /sys/class/cirrus/cirrus_bd/over_temp_count_right |
| |
| # TI Amp Calibration and Factory test |
| chown system audio /sys/class/tas25xx/calib/calibration |
| chown system audio /sys/class/tas25xx/calib/cstatus |
| chown system audio /sys/class/tas25xx/calib/cstatus_r |
| chown system audio /sys/class/tas25xx/calib/rdc |
| chown system audio /sys/class/tas25xx/calib/rdc_r |
| chown system audio /sys/class/tas25xx/calib/temp |
| chown system audio /sys/class/tas25xx/calib/temp_r |
| |
| chown system audio /sys/class/tas25xx/valid/validation |
| chown system audio /sys/class/tas25xx/valid/status |
| chown system audio /sys/class/tas25xx/valid/status_r |
| |
| mkdir /efs/tas25xx 0770 system audio |
| chown system audio /efs/tas25xx/calib_re |
| chown system audio /efs/tas25xx/amb_temp |
| chown system audio /efs/tas25xx/calib_re_r |
| chown system audio /efs/tas25xx/amb_temp_r |
| chmod 0660 /efs/tas25xx/calib_re |
| chmod 0660 /efs/tas25xx/amb_temp |
| chmod 0660 /efs/tas25xx/calib_re_r |
| chmod 0660 /efs/tas25xx/amb_temp_r |
| |
| #dbmd |
| chmod 0660 /dev/dbmdx-1 |
| chown system audio /dev/dbmdx-1 |
| |
| #load ecd firmware |
| write /proc/ecd/load_firmware 1 |
| |
| # Set watchdog timer to 30 seconds and pet it every 10 seconds to get a 20 second margin |
| service watchdogd /system/bin/watchdogd 10 20 |
| user root |
| class core |
| oneshot |
| seclabel u:r:watchdogd:s0 |
| |
| on init && property:ro.bootmode=charger |
| write /sys/class/graphics/fb0/blank 1 |
| write /sys/class/graphics/fb0/blank 0 |
| |
| # sensorhub fw |
| on post-fs |
| chmod 0770 /spu/sensorhub |
| chmod 0660 /spu/sensorhub/shub_spu.bin |
| chown root system /spu/sensorhub |
| chown root system /spu/sensorhub/shub_spu.bin |
| write /sys/devices/platform/11980000.contexthub/poweron 1 |