# Blueport specific init.rc

# When ro.vendor.factory=1, add vendor/bin/factory to default path
on init && property:ro.vendor.factory=1
    export PATH /product/bin:/apex/com.android.runtime/bin:/apex/com.android.art/bin:/system_ext/bin:/system/bin:/system/xbin:/odm/bin:/vendor/bin:/vendor/xbin:/vendor/bin/factory
    import /vendor/etc/init/hw/init.factory.rc

on init
    # register/nvmem dump
    chown system system /sys/bus/nvmem/devices/8-00500/nvmem
    # NFC streset tool name
    setprop persist.vendor.nfc.streset libstreset21
    setprop persist.vendor.se.streset libstreset21

on early-boot
    # Wait for insmod_sh to finish all common modules
    wait_for_prop vendor.common.modules.ready 1
    start insmod_sh_blueport

service insmod_sh_blueport /vendor/bin/insmod.sh /vendor_dlkm/etc/init.insmod.${ro.hardware}.cfg
    class main
    user root
    group root system
    disabled
    oneshot

on boot && property:ro.vendor.factory=1
    # FTM log folder
    mkdir /data/ftmlog 0775 system system

    # Audio test folder
    mkdir /data/AudioTest 0775 system system
