diff options
Diffstat (limited to 'etc')
-rw-r--r-- | etc/init.rc | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/etc/init.rc b/etc/init.rc index 39724d066..dda009b84 100644 --- a/etc/init.rc +++ b/etc/init.rc @@ -23,7 +23,7 @@ on init write /sys/class/android_usb/android0/enable 0 write /sys/class/android_usb/android0/idVendor 18D1 - write /sys/class/android_usb/android0/idProduct D001 + write /sys/class/android_usb/android0/idProduct D002 write /sys/class/android_usb/android0/functions adb write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer} write /sys/class/android_usb/android0/iProduct ${ro.product.model} @@ -51,6 +51,25 @@ on property:sys.storage.ums_enabled=0 write /sys/class/android_usb/android0/functions adb write /sys/class/android_usb/android0/enable ${service.adb.root} +on property:sys.usb.config=none + stop adbd + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/bDeviceClass 0 + +on property:sys.usb.config=mtp,adb + stop adbd + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/functions mtp,adb + write /sys/class/android_usb/android0/enable 1 + start adbd + +on property:sys.usb.config=adb + stop adbd + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/functions adb + write /sys/class/android_usb/android0/enable ${service.adb.root} + start adbd + service ueventd /sbin/ueventd critical @@ -73,4 +92,4 @@ on property:ro.debuggable=1 on property:service.adb.root=1 write /sys/class/android_usb/android0/enable 0 restart adbd - write /sys/class/android_usb/android0/enable 1 + write /sys/class/android_usb/android0/enable 1
\ No newline at end of file |