Skip to content
Browse files

update usb init

Change-Id: I6de832931e30fcbe2d03085cce4d597684462b10
  • Loading branch information...
1 parent 7e62207 commit 9b81450ea408daff777e44b634804940a260ea40 @KonstaT committed
Showing with 51 additions and 10 deletions.
  1. +51 −10 prebuilt/root/init.blade.usb.rc
View
61 prebuilt/root/init.blade.usb.rc
@@ -1,33 +1,74 @@
on init
- write /sys/module/g_android/parameters $ro.serialno
- write /sys/module/g_android/parameters/product_id 1351
- write /sys/devices/platform/android_usb/functions/cur_pid 1351
- write /sys/devices/platform/android_usb/functions/enable_switch 0
+ write /sys/class/android_usb/android0/iSerial CM10-Blade
+ write /sys/class/android_usb/android0/f_rndis/manufacturer ZTE
+ write /sys/class/android_usb/android0/f_rndis/vendorID 19d2
+ write /sys/class/android_usb/android0/f_rndis/wceis 1
+
+on boot
+ 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/f_mass_storage/inquiry_string "ZTE"
on property:sys.usb.config=adb
- write /sys/module/g_android/parameters/product_id 1352
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 19d2
+ write /sys/class/android_usb/android0/idProduct 1352
+ 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}
on property:sys.usb.config=mass_storage,adb
- write /sys/module/g_android/parameters/product_id 1351
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 19d2
+ write /sys/class/android_usb/android0/idProduct 1351
+ 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}
on property:sys.usb.config=mass_storage
- write /sys/module/g_android/parameters/product_id 1353
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 19d2
+ write /sys/class/android_usb/android0/idProduct 1353
+ 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}
on property:sys.usb.config=rndis
- write /sys/module/g_android/parameters/product_id 1365
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 19d2
+ write /sys/class/android_usb/android0/idProduct 1365
+ write /sys/class/android_usb/android0/functions ${sys.usb.config}
+ write /sys/class/android_usb/android0/bDeviceClass 224
+ write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=rndis,adb
- write /sys/module/g_android/parameters/product_id 1373
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 19d2
+ write /sys/class/android_usb/android0/idProduct 1373
+ write /sys/class/android_usb/android0/functions ${sys.usb.config}
+ write /sys/class/android_usb/android0/bDeviceClass 224
+ write /sys/class/android_usb/android0/enable 1
start adbd
setprop sys.usb.state ${sys.usb.config}
+on property:sys.usb.config=mass_storage,rndis
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 19d2
+ write /sys/class/android_usb/android0/idProduct 1364
+ write /sys/class/android_usb/android0/functions ${sys.usb.config}
+ write /sys/class/android_usb/android0/bDeviceClass 224
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}
+
on property:sys.usb.config=mass_storage,rndis,adb
- write /sys/module/g_android/parameters/product_id 1364
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 19d2
+ write /sys/class/android_usb/android0/idProduct 1364
+ write /sys/class/android_usb/android0/functions ${sys.usb.config}
+ write /sys/class/android_usb/android0/bDeviceClass 224
+ write /sys/class/android_usb/android0/enable 1
start adbd
setprop sys.usb.state ${sys.usb.config}

0 comments on commit 9b81450

Please sign in to comment.
Something went wrong with that request. Please try again.