start on (android-container persist.sys.usb.config=* or android) and started lightdm

task

emits android-mtp-on
emits android-mtp-off

script
 sleep 5
 VAL=$(getprop persist.sys.usb.config)
 case ${VAL} in
   mtp)
     /bin/sh /usr/share/usbinit/setupusb mtp
     /sbin/initctl emit android-mtp-on
     ;;
   mtp,adb)
     /bin/sh /usr/share/usbinit/setupusb mtp_adb
     /sbin/initctl emit android-mtp-on
     ;;
   *)
     /sbin/initctl emit android-mtp-off
     ;;
 esac
end script
