Skip to content
Permalink
Browse files

init.huawei.usb.rc: this is just manual labour

  • Loading branch information...
Dazzozo committed Dec 27, 2012
1 parent 326eea5 commit bcff08cebf1a310db6413719cd5c0fc3d805d146
Showing with 23 additions and 23 deletions.
  1. +23 −23 ramdisk/init.huawei.usb.rc
@@ -31,9 +31,9 @@ on init
write /sys/class/android_usb/android0/f_rndis/wceis 1

on boot
write /sys/class/android_usb/android0/iSerial ${ro.serialno}
write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer}
write /sys/class/android_usb/android0/iProduct ${ro.product.model}
write /sys/class/android_usb/android0/iSerial $ro.serialno
write /sys/class/android_usb/android0/iManufacturer $ro.product.manufacturer
write /sys/class/android_usb/android0/iProduct $ro.product.model

# Mass Storage
on property:sys.usb.config=mass_storage
@@ -42,94 +42,94 @@ on property:sys.usb.config=mass_storage
write /sys/class/android_usb/android0/idProduct 1037
write /sys/class/android_usb/android0/f_mass_storage/nluns 2
write /sys/class/android_usb/android0/f_mass_storage/cdrom_index none
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/class/android_usb/android0/functions $sys.usb.config
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
setprop sys.usb.state $sys.usb.config

on property:sys.usb.config=mass_storage,adb
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 12d1
write /sys/class/android_usb/android0/idProduct 1038
write /sys/class/android_usb/android0/f_mass_storage/nluns 2
write /sys/class/android_usb/android0/f_mass_storage/cdrom_index none
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/class/android_usb/android0/functions $sys.usb.config
write /sys/class/android_usb/android0/enable 1
start adbd
setprop sys.usb.state ${sys.usb.config}
setprop sys.usb.state $sys.usb.config

# Tethering
on property:sys.usb.config=rndis
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 12d1
write /sys/class/android_usb/android0/idProduct 1039
write /sys/class/android_usb/android0/f_rndis/wceis 1
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/class/android_usb/android0/functions $sys.usb.config
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
setprop sys.usb.state $sys.usb.config

on property:sys.usb.config=rndis,adb
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 12d1
write /sys/class/android_usb/android0/idProduct 1050
write /sys/class/android_usb/android0/f_rndis/wceis 1
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/class/android_usb/android0/functions $sys.usb.config
write /sys/class/android_usb/android0/enable 1
start adbd
setprop sys.usb.state ${sys.usb.config}
setprop sys.usb.state $sys.usb.config

# MTP
on property:sys.usb.config=mtp
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 12d1
write /sys/class/android_usb/android0/idProduct 1051
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/class/android_usb/android0/functions $sys.usb.config
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
setprop sys.usb.state $sys.usb.config

on property:sys.usb.config=mtp,adb
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 12d1
write /sys/class/android_usb/android0/idProduct 1052
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/class/android_usb/android0/functions $sys.usb.config
write /sys/class/android_usb/android0/enable 1
start adbd
setprop sys.usb.state ${sys.usb.config}
setprop sys.usb.state $sys.usb.config

# PTP
on property:sys.usb.config=ptp
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 12d1
write /sys/class/android_usb/android0/idProduct 1053
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/class/android_usb/android0/functions $sys.usb.config
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
setprop sys.usb.state $sys.usb.config

on property:sys.usb.config=ptp,adb
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 12d1
write /sys/class/android_usb/android0/idProduct 1054
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/class/android_usb/android0/functions $sys.usb.config
write /sys/class/android_usb/android0/enable 1
start adbd
setprop sys.usb.state ${sys.usb.config}
setprop sys.usb.state $sys.usb.config

# Accessory
on property:sys.usb.config=accessory
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 18d1
write /sys/class/android_usb/android0/idProduct 2d00
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/class/android_usb/android0/functions $sys.usb.config
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
setprop sys.usb.state $sys.usb.config

on property:sys.usb.config=accessory,adb
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 18d1
write /sys/class/android_usb/android0/idProduct 2d01
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/class/android_usb/android0/functions $sys.usb.config
write /sys/class/android_usb/android0/enable 1
start adbd
setprop sys.usb.state ${sys.usb.config}
setprop sys.usb.state $sys.usb.config

# Adding this in because adb is being removed from persist.sys.usb.config after booting
on property:persist.service.adb.enable=1

0 comments on commit bcff08c

Please sign in to comment.
You can’t perform that action at this time.