1on property:ro.build.type=userdebug
2    write /dev/sys/block/bootdevice/pixel/enable_pixel_ufs_logging 1
3    chown system /dev/sg3
4
5on default_storage_mode
6    # F2FS
7    write /dev/sys/fs/by-name/userdata/data_io_flag 8
8    write /dev/sys/fs/by-name/userdata/node_io_flag 8
9    write /dev/sys/fs/by-name/userdata/max_io_bytes 524288
10    write /dev/sys/fs/by-name/userdata/min_hot_blocks 0
11
12    # Block
13    write /dev/sys/block/by-name/rootdisk/queue/iostats 1
14    write /dev/sys/block/by-name/rootdisk/queue/nr_requests 128
15    write /dev/sys/block/by-name/rootdisk/queue/rq_affinity 2
16    write /dev/sys/block/by-name/zoned_device/queue/rq_affinity 2
17
18    # UFS
19    write /dev/sys/block/bootdevice/clkgate_enable 1
20
21on init
22    # Symlink /dev/sys/block/bootdevice
23    wait /dev/block/platform/${ro.boot.boot_devices}
24    symlink /dev/block/platform/${ro.boot.boot_devices} /dev/block/bootdevice
25    symlink /sys/devices/platform/${ro.boot.boot_devices} /dev/sys/block/bootdevice
26
27    # F2FS
28    write /dev/sys/fs/by-name/userdata/data_io_flag 56
29    write /dev/sys/fs/by-name/userdata/node_io_flag 56
30
31    # Block
32    write /dev/sys/block/by-name/rootdisk/queue/iostats 0
33    write /dev/sys/block/by-name/rootdisk/queue/nr_requests 256
34
35    # UFS
36    write /dev/sys/block/bootdevice/clkgate_enable 0
37
38on property:sys.boot_completed=1
39    # Health Storage HAL
40    chown system system /dev/sys/block/bootdevice/manual_gc
41
42    # Pixelstats
43    chown system system /dev/sys/block/bootdevice/slowio_read_cnt
44    chown system system /dev/sys/block/bootdevice/slowio_sync_cnt
45    chown system system /dev/sys/block/bootdevice/slowio_unmap_cnt
46    chown system system /dev/sys/block/bootdevice/slowio_write_cnt
47
48    chown system system /dev/sys/fs/by-name/userdata/committed_atomic_block
49    chown system system /dev/sys/fs/by-name/userdata/compr_new_inode
50    chown system system /dev/sys/fs/by-name/userdata/compr_saved_block
51    chown system system /dev/sys/fs/by-name/userdata/compr_written_block
52    chown system system /dev/sys/fs/by-name/userdata/gc_reclaimed_segments
53    chown system system /dev/sys/fs/by-name/userdata/gc_segment_mode
54    chown system system /dev/sys/fs/by-name/userdata/peak_atomic_write
55    chown system system /dev/sys/fs/by-name/userdata/revoked_atomic_block
56
57    trigger default_storage_mode
58
59on charger
60    trigger default_storage_mode
61
62on property:ro.boot.mode=charger && property:init.svc.vendor.charger=running
63    trigger default_storage_mode
64