on init setprop sys.usb.configfs 1 setprop sys.usb.ffs.aio_compat 0 # Allow writing to preloader partitions write /sys/block/mmcblk0boot0/force_ro 0 write /sys/block/mmcblk0boot1/force_ro 0 on fs && property:ro.debuggable=0 # distinguish USB shoulde connect or not, i.e. CDP vs SDP write /sys/class/udc/musb-hdrc/device/cmode 2 # set charging free due to it wait for USB activation start adbd on post-fs # Support A/B feature for EMMC boot region symlink /dev/block/mmcblk0boot0 /dev/block/platform/bootdevice/by-name/preloader_a symlink /dev/block/mmcblk0boot1 /dev/block/platform/bootdevice/by-name/preloader_b exec u:r:update_engine:s0 root root -- /system/bin/mtk_plpath_utils