Home | History | Annotate | Download | only in dragon
      1 on init
      2     start watchdogd
      3     mkdir /config
      4     mount configfs none /config
      5     mkdir /config/usb_gadget/g1 0770 shell shell
      6     write /config/usb_gadget/g1/idVendor 0x18d1
      7     write /config/usb_gadget/g1/idProduct 0xd001
      8     mkdir /config/usb_gadget/g1/strings/0x409 0770
      9     write /config/usb_gadget/g1/strings/0x409/serialnumber ${ro.serialno}
     10     write /config/usb_gadget/g1/strings/0x409/manufacturer ${ro.product.manufacturer}
     11     write /config/usb_gadget/g1/strings/0x409/product ${ro.product.model}
     12     mkdir /config/usb_gadget/g1/functions/ffs.adb
     13 
     14 # Set watchdog timer to 30 seconds and pet it every 10 seconds to get a 20 second margin
     15 service watchdogd /sbin/watchdogd 10 20
     16     class core
     17     seclabel u:r:watchdogd:s0
     18 
     19 on property:sys.usb.ffs.ready=1
     20     write /config/usb_gadget/g1/UDC "none"
     21     rmdir /config/usb_gadget/g1/configs/b.1
     22     mkdir /config/usb_gadget/g1/configs/b.1 0777 shell shell
     23     mkdir /config/usb_gadget/g1/configs/b.1/strings/0x409 0770 shell shell
     24     write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ffs1"
     25     rm /config/usb_gadget/g1/configs/b.1/f1
     26     rm /config/usb_gadget/g1/configs/b.1/f2
     27     symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1
     28     write /config/usb_gadget/g1/idVendor 0x18d1
     29     write /config/usb_gadget/g1/idProduct 0xd001
     30     write /config/usb_gadget/g1/UDC "700d0000.usb-device"
     31