Skip to content

Commit

Permalink
init.huawei.usb.rc: this is just manual labour
Browse files Browse the repository at this point in the history
  • Loading branch information
Daz Jones committed Dec 27, 2012
1 parent 326eea5 commit bcff08c
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions ramdisk/init.huawei.usb.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit bcff08c

Please sign in to comment.