Matt Mower | ec009e8 | 2015-01-30 13:00:49 -0600 | [diff] [blame] | 1 | on fs |
| 2 | write /sys/class/android_usb/android0/enable 0 |
| 3 | write /sys/class/android_usb/android0/idVendor 18D1 |
Matt Mower | 84830ce | 2017-02-14 20:36:16 -0600 | [diff] [blame] | 4 | write /sys/class/android_usb/android0/idProduct D001 |
Matt Mower | ec009e8 | 2015-01-30 13:00:49 -0600 | [diff] [blame] | 5 | write /sys/class/android_usb/android0/f_ffs/aliases adb |
Matt Mower | 84830ce | 2017-02-14 20:36:16 -0600 | [diff] [blame] | 6 | write /sys/class/android_usb/android0/functions adb |
Matt Mower | ec009e8 | 2015-01-30 13:00:49 -0600 | [diff] [blame] | 7 | write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer} |
| 8 | write /sys/class/android_usb/android0/iProduct ${ro.product.model} |
| 9 | write /sys/class/android_usb/android0/iSerial ${ro.serialno} |
| 10 | |
Matt Mower | ec009e8 | 2015-01-30 13:00:49 -0600 | [diff] [blame] | 11 | on property:sys.usb.config=none |
Matt Mower | ec009e8 | 2015-01-30 13:00:49 -0600 | [diff] [blame] | 12 | write /sys/class/android_usb/android0/enable 0 |
| 13 | write /sys/class/android_usb/android0/bDeviceClass 0 |
| 14 | |
HandyMenny | 37d4299 | 2014-10-26 22:15:59 +0100 | [diff] [blame] | 15 | on property:sys.usb.config=mass_storage,adb |
Matt Mower | ec009e8 | 2015-01-30 13:00:49 -0600 | [diff] [blame] | 16 | write /sys/class/android_usb/android0/enable 0 |
HandyMenny | 37d4299 | 2014-10-26 22:15:59 +0100 | [diff] [blame] | 17 | write /sys/class/android_usb/android0/functions ${sys.usb.config} |
| 18 | write /sys/class/android_usb/android0/enable 1 |
| 19 | |
| 20 | on property:sys.usb.config=mtp,adb |
| 21 | write /sys/class/android_usb/android0/enable 0 |
| 22 | write /sys/class/android_usb/android0/functions ${sys.usb.config} |
Matt Mower | ec009e8 | 2015-01-30 13:00:49 -0600 | [diff] [blame] | 23 | write /sys/class/android_usb/android0/enable 1 |
| 24 | start adbd |
| 25 | |
| 26 | on property:sys.usb.config=adb |
Matt Mower | ec009e8 | 2015-01-30 13:00:49 -0600 | [diff] [blame] | 27 | write /sys/class/android_usb/android0/enable 0 |
HandyMenny | 37d4299 | 2014-10-26 22:15:59 +0100 | [diff] [blame] | 28 | write /sys/class/android_usb/android0/functions ${sys.usb.config} |
Matt Mower | ec009e8 | 2015-01-30 13:00:49 -0600 | [diff] [blame] | 29 | write /sys/class/android_usb/android0/enable ${service.adb.root} |
| 30 | start adbd |