Home | History | Annotate | Download | only in marlin
      1 on init
      2     write /sys/class/android_usb/android0/f_rndis/vendorID 18D1
      3     write /sys/class/android_usb/android0/f_rndis/wceis 1
      4 
      5 on boot
      6     write /sys/class/android_usb/android0/iSerial ${ro.serialno}
      7     write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer}
      8     write /sys/class/android_usb/android0/iProduct ${ro.product.model}
      9 
     10     write /sys/class/android_usb/f_mass_storage/lun/nofua 1
     11 
     12     write /sys/class/android_usb/android0/f_rndis_qc/rndis_transports BAM2BAM_IPA
     13     write /sys/module/g_android/parameters/mtp_tx_req_len 131072
     14     write /sys/module/g_android/parameters/mtp_rx_req_len 131072
     15     setprop sys.usb.rps_mask 0
     16 
     17 on post-fs
     18     mkdir /dev/usb-ffs 0770 shell shell
     19     mkdir /dev/usb-ffs/adb 0770 shell shell
     20     mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000
     21     write /sys/class/android_usb/android0/f_ffs/aliases adb
     22 
     23 on property:sys.usb.config=mtp
     24     stop adbd
     25     write /sys/class/android_usb/android0/enable 0
     26     write /sys/class/android_usb/android0/idVendor 18D1
     27     write /sys/class/android_usb/android0/idProduct 4EE1
     28     write /sys/class/android_usb/android0/bDeviceClass 0
     29     write /sys/class/android_usb/android0/bDeviceSubClass 0
     30     write /sys/class/android_usb/android0/bDeviceProtocol 0
     31     write /sys/class/android_usb/android0/functions ${sys.usb.config}
     32     write /sys/class/android_usb/android0/enable 1
     33     setprop sys.usb.state ${sys.usb.config}
     34 
     35 on property:sys.usb.config=mtp,adb
     36     write /sys/class/android_usb/android0/enable 0
     37     write /sys/class/android_usb/android0/idVendor 18D1
     38     write /sys/class/android_usb/android0/idProduct 4EE2
     39     write /sys/class/android_usb/android0/bDeviceClass 0
     40     write /sys/class/android_usb/android0/bDeviceSubClass 0
     41     write /sys/class/android_usb/android0/bDeviceProtocol 0
     42     write /sys/class/android_usb/android0/functions ${sys.usb.config}
     43     write /sys/class/android_usb/android0/enable 1
     44     start adbd
     45     setprop sys.usb.state ${sys.usb.config}
     46 
     47 on property:sys.usb.config=rndis
     48     stop adbd
     49     write /sys/class/android_usb/android0/enable 0
     50     write /sys/class/android_usb/android0/idVendor 18D1
     51     write /sys/class/android_usb/android0/idProduct 4EE3
     52     write /sys/class/android_usb/android0/bDeviceClass 239
     53     write /sys/class/android_usb/android0/bDeviceSubClass 2
     54     write /sys/class/android_usb/android0/bDeviceProtocol 1
     55     write /sys/class/android_usb/android0/functions ${sys.usb.config}
     56     write /sys/class/android_usb/android0/enable 1
     57     setprop sys.usb.state ${sys.usb.config}
     58 
     59 on property:sys.usb.config=rndis,adb
     60     write /sys/class/android_usb/android0/enable 0
     61     write /sys/class/android_usb/android0/idVendor 18D1
     62     write /sys/class/android_usb/android0/idProduct 4EE4
     63     write /sys/class/android_usb/android0/bDeviceClass 239
     64     write /sys/class/android_usb/android0/bDeviceSubClass 2
     65     write /sys/class/android_usb/android0/bDeviceProtocol 1
     66     write /sys/class/android_usb/android0/functions ${sys.usb.config}
     67     write /sys/class/android_usb/android0/enable 1
     68     start adbd
     69     setprop sys.usb.state ${sys.usb.config}
     70 
     71 on property:sys.usb.config=ptp
     72     stop adbd
     73     write /sys/class/android_usb/android0/enable 0
     74     write /sys/class/android_usb/android0/idVendor 18D1
     75     write /sys/class/android_usb/android0/idProduct 4EE5
     76     write /sys/class/android_usb/android0/bDeviceClass 0
     77     write /sys/class/android_usb/android0/bDeviceSubClass 0
     78     write /sys/class/android_usb/android0/bDeviceProtocol 0
     79     write /sys/class/android_usb/android0/functions ${sys.usb.config}
     80     write /sys/class/android_usb/android0/enable 1
     81     setprop sys.usb.state ${sys.usb.config}
     82 
     83 on property:sys.usb.config=ptp,adb
     84     write /sys/class/android_usb/android0/enable 0
     85     write /sys/class/android_usb/android0/idVendor 18D1
     86     write /sys/class/android_usb/android0/idProduct 4EE6
     87     write /sys/class/android_usb/android0/bDeviceClass 0
     88     write /sys/class/android_usb/android0/bDeviceSubClass 0
     89     write /sys/class/android_usb/android0/bDeviceProtocol 0
     90     write /sys/class/android_usb/android0/functions ${sys.usb.config}
     91     write /sys/class/android_usb/android0/enable 1
     92     start adbd
     93     setprop sys.usb.state ${sys.usb.config}
     94 
     95 on property:sys.usb.config=midi
     96     stop adbd
     97     write /sys/class/android_usb/android0/enable 0
     98     write /sys/class/android_usb/android0/idVendor 18D1
     99     write /sys/class/android_usb/android0/idProduct 4EE8
    100     write /sys/class/android_usb/android0/bDeviceClass 0
    101     write /sys/class/android_usb/android0/bDeviceSubClass 0
    102     write /sys/class/android_usb/android0/bDeviceProtocol 0
    103     write /sys/class/android_usb/android0/functions ${sys.usb.config}
    104     write /sys/class/android_usb/android0/enable 1
    105     setprop sys.usb.state ${sys.usb.config}
    106 
    107 on property:sys.usb.config=midi,adb
    108     write /sys/class/android_usb/android0/enable 0
    109     write /sys/class/android_usb/android0/idVendor 18D1
    110     write /sys/class/android_usb/android0/idProduct 4EE9
    111     write /sys/class/android_usb/android0/bDeviceClass 0
    112     write /sys/class/android_usb/android0/bDeviceSubClass 0
    113     write /sys/class/android_usb/android0/bDeviceProtocol 0
    114     write /sys/class/android_usb/android0/functions ${sys.usb.config}
    115     write /sys/class/android_usb/android0/enable 1
    116     start adbd
    117     setprop sys.usb.state ${sys.usb.config}
    118