on post-fs
## ensure correct calibration file permissions
    chown root system /mnt/vendor/persist/sensorcal.json
    chmod 0640 /mnt/vendor/persist/sensorcal.json
    start vendor.flash-nanohub-fw

on post-fs-data
    mkdir /data/vendor/sensor
    chown root system /data/vendor/sensor
    chmod 0770 /data/vendor/sensor

service vendor.flash-nanohub-fw /vendor/bin/nanoapp_cmd download
    oneshot
    disabled
    user root
    group system

on post-fs-data
    mkdir /data/system/nanohub_lock/
    restorecon /data/system/nanohub_lock
