Commit | Line | Data |
---|---|---|
318eac2f DW |
1 | on boot |
2 | # Assign TCP buffer thresholds to be ceiling value of technology maximums | |
3 | # Increased technology maximums should be reflected here. | |
4 | write /proc/sys/net/core/rmem_max 2097152 | |
5 | write /proc/sys/net/core/wmem_max 2097152 | |
6 | ||
f6e6adf8 DW |
7 | # Set min_free_kbytes to keep larger VM chuncks lying around |
8 | write /proc/sys/vm/min_free_kbytes 32768 | |
9 | ||
10 | # Tune virtual memory | |
11 | write /proc/sys/vm/swappiness 160 | |
12 | write /proc/sys/vm/vfs_cache_pressure 50 | |
13 | ||
318eac2f DW |
14 | on fs |
15 | # Permissions for LCD | |
16 | chown system system /sys/class/lcd/panel/ldu_correction | |
17 | chown system system /sys/class/lcd/panel/lux | |
18 | chown system media_rw /sys/class/lcd/panel/adaptive_control | |
19 | ||
20 | # Permissions for Touchkey | |
21 | chown system radio /sys/class/sec/sec_touchkey/sar_enable | |
22 | chown system radio /sys/class/sec/sec_touchkey/sw_reset | |
23 | chown system radio /sys/class/sec/sec_touchkey/touchkey_earjack | |
85a78b61 CH |
24 | chmod 0660 /dev/i2c-0 |
25 | chown audio audio /dev/i2c-0 | |
318eac2f DW |
26 | |
27 | # Accelerometer_sensor | |
28 | chown system radio /sys/class/sensors/accelerometer_sensor/mcu_rev | |
29 | chown system radio /sys/class/sensors/accelerometer_sensor/mcu_name | |
30 | ||
31 | # Fingerprint_sensor | |
32 | chown system radio /sys/class/fingerprint/fingerprint/type_check | |
33 | chown system radio /sys/class/fingerprint/fingerprint/name | |
34 | chown system radio /sys/class/fingerprint/fingerprint/vendor | |
35 | ||
36 | # BHY | |
37 | chown system radio /sys/devices/13870000.hsi2c/i2c-0/0-0028/iio:device0/event_shealth_int | |
38 | chown system radio /sys/devices/13870000.hsi2c/i2c-0/0-0028/iio:device0/pedometer_steps | |
39 | chown system radio /sys/devices/13870000.hsi2c/i2c-0/0-0028/iio:device0/shealth_cadence | |
40 | chown system radio /sys/devices/13870000.hsi2c/i2c-0/0-0028/iio:device0/shealth_cadence_enable | |
41 | chown system radio /sys/devices/13870000.hsi2c/i2c-0/0-0028/iio:device0/shealth_enable | |
42 | chown system radio /sys/devices/13870000.hsi2c/i2c-0/0-0028/iio:device0/shealth_flush_cadence | |
43 | chmod 660 /sys/devices/13870000.hsi2c/i2c-0/0-0028/iio:device0/event_shealth_int | |
44 | chmod 660 /sys/devices/13870000.hsi2c/i2c-0/0-0028/iio:device0/pedometer_steps | |
45 | chmod 660 /sys/devices/13870000.hsi2c/i2c-0/0-0028/iio:device0/shealth_cadence_enable | |
46 | chmod 660 /sys/devices/13870000.hsi2c/i2c-0/0-0028/iio:device0/shealth_enable | |
47 | chmod 660 /sys/devices/13870000.hsi2c/i2c-0/0-0028/iio:device0/shealth_flush_cadence | |
48 | ||
cd88b391 DW |
49 | # Restore the previous batt_capacity_max (if it exists) |
50 | copy /efs/Battery/prev_batt_capacity_max /sys/class/power_supply/battery/batt_capacity_max | |
51 | ||
318eac2f DW |
52 | on property:sys.boot_completed=1 |
53 | write /proc/sys/vm/dirty_bytes 41943040 | |
54 | write /proc/sys/vm/dirty_background_bytes 20971520 | |
55 | ||
56 | # Set best cache size for internal and external storages | |
57 | write /sys/block/mmcblk0/bdi/read_ahead_kb 128 | |
58 | write /sys/block/mmcblk1/bdi/read_ahead_kb 2048 | |
59 | ||
cd88b391 DW |
60 | on shutdown |
61 | # Fix permissions then store the current batt_capacity_max value in the EFS partition | |
62 | chmod 600 /sys/class/power_supply/battery/batt_capacity_max | |
63 | copy /sys/class/power_supply/battery/batt_capacity_max /efs/Battery/prev_batt_capacity_max | |
64 |