Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

star: Use the p880's USB layout

Since I copied over the USB stack patches from the X3, might as well use
its composition layouts
  • Loading branch information...
commit 9ce500f6635b1c5af2b6baa3fb61bb003650a97a 1 parent f9584f4
@rmcc rmcc authored
Showing with 72 additions and 46 deletions.
  1. +71 −45 init.star.usb.rc
  2. +1 −1  star.mk
View
116 init.star.usb.rc
@@ -1,66 +1,71 @@
on init
write /sys/class/android_usb/android0/iSerial $ro.serialno
- write /sys/class/android_usb/android0/f_rndis/manufacturer LGE
- write /sys/class/android_usb/android0/f_rndis/vendorID 18D1
- write /sys/class/android_usb/android0/f_rndis/wceis 1
+ write /sys/class/android_usb/android0/f_ecm/manufacturer LG
+ write /sys/class/android_usb/android0/f_ecm/vendorID 1004
+# write /sys/class/android_usb/android0/f_rndis/manufacturer LG
+# write /sys/class/android_usb/android0/f_rndis/vendorID 1004
+# write /sys/class/android_usb/android0/f_rndis/wceis 1
+on post-fs-data
+ chown system system /sys/class/android_usb/android0/f_cdrom_storage/lun/cdrom_usbmode
+ chmod 0660 /sys/class/android_usb/android0/f_cdrom_storage/lun/cdrom_usbmode
+
on boot
- write /sys/class/android_usb/android0/enable 0
- write /sys/class/android_usb/android0/idVendor 18D1
- write /sys/class/android_usb/android0/idProduct 618e
- write /sys/class/android_usb/android0/functions adb,mass_storage
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/enable 1
- setprop sys.usb.state adb,mass_storage
- stop adbd
- start adbd
-on property:sys.usb.config=adb
+on recovery
write /sys/class/android_usb/android0/enable 0
- write /sys/class/android_usb/android0/idvendor 18D1
- write /sys/class/android_usb/android0/idproduct 6000
- write /sys/class/android_usb/android0/functions $sys.usb.config
+ write /sys/class/android_usb/android0/idVendor 1004
+ write /sys/class/android_usb/android0/idProduct 61A6
+ write /sys/class/android_usb/android0/functions mass_storage,adb
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
+on property:sys.usb.config=adb
write /sys/class/android_usb/android0/enable 0
- write /sys/class/android_usb/android0/idvendor 18D1
- write /sys/class/android_usb/android0/idproduct 618e
- write /sys/class/android_usb/android0/functions $sys.usb.config
+ write /sys/class/android_usb/android0/idVendor 1004
+ write /sys/class/android_usb/android0/idProduct 6000
+ write /sys/class/android_usb/android0/functions acm,adb
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/class/android_usb/android0/enable 0
- write /sys/class/android_usb/android0/idvendor 18D1
- write /sys/class/android_usb/android0/idproduct 618d
- write /sys/class/android_usb/android0/functions $sys.usb.config
+ write /sys/class/android_usb/android0/idVendor 1004
+ write /sys/class/android_usb/android0/idProduct 61C5
+ write /sys/class/android_usb/android0/functions mass_storage
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state $sys.usb.config
-
-on property:sys.usb.config=mtp
+
+on property:sys.usb.config=mass_storage,adb
write /sys/class/android_usb/android0/enable 0
- write /sys/class/android_usb/android0/idVendor 18D1
- write /sys/class/android_usb/android0/idProduct d109
+ write /sys/class/android_usb/android0/idVendor 1004
+ write /sys/class/android_usb/android0/idProduct 61A6
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=mtp,adb
+on charger
write /sys/class/android_usb/android0/enable 0
- write /sys/class/android_usb/android0/idVendor 18D1
- write /sys/class/android_usb/android0/idProduct d10a
- write /sys/class/android_usb/android0/functions $sys.usb.config
+ write /sys/class/android_usb/android0/idVendor 1004
+ write /sys/class/android_usb/android0/idProduct 61FC
+ write /sys/class/android_usb/android0/bDeviceClass 239
+ write /sys/class/android_usb/android0/bDeviceSubClass 2
+ write /sys/class/android_usb/android0/bDeviceProtocol 1
+ write /sys/class/android_usb/android0/functions acm,serial,cdrom_storage,mass_storage,adb
write /sys/class/android_usb/android0/enable 1
start adbd
+ start port-bridge
setprop sys.usb.state $sys.usb.config
on property:sys.usb.config=rndis
write /sys/class/android_usb/android0/enable 0
- write /sys/class/android_usb/android0/idVendor 18D1
- write /sys/class/android_usb/android0/idProduct d103
+ write /sys/class/android_usb/android0/idVendor 1004
+ write /sys/class/android_usb/android0/idProduct 61DA
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
@@ -68,35 +73,56 @@ on property:sys.usb.config=rndis
on property:sys.usb.config=rndis,adb
write /sys/class/android_usb/android0/enable 0
- write /sys/class/android_usb/android0/idVendor 18D1
- write /sys/class/android_usb/android0/idProduct 61d9
+ write /sys/class/android_usb/android0/idVendor 1004
+ write /sys/class/android_usb/android0/idProduct 61D9
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=ptp
+on property:sys.usb.config=mtp
write /sys/class/android_usb/android0/enable 0
- write /sys/class/android_usb/android0/idVendor 18D1
- write /sys/class/android_usb/android0/idProduct 6865
- write /sys/class/android_usb/android0/functions $sys.usb.config
+ write /sys/class/android_usb/android0/idVendor 1004
+ write /sys/class/android_usb/android0/idProduct 631C
+ write /sys/class/android_usb/android0/bDeviceClass 0
+ write /sys/class/android_usb/android0/bDeviceSubClass 0
+ write /sys/class/android_usb/android0/bDeviceProtocol 0
+ write /sys/class/android_usb/android0/functions mtp
+ write /sys/class/android_usb/android0/enable 1
+ 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 1004
+ write /sys/class/android_usb/android0/idProduct 61F9
+ write /sys/class/android_usb/android0/bDeviceClass 239
+ write /sys/class/android_usb/android0/bDeviceSubClass 2
+ write /sys/class/android_usb/android0/bDeviceProtocol 1
+ write /sys/class/android_usb/android0/functions mtp,adb
write /sys/class/android_usb/android0/enable 1
+ start adbd
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 18D1
- write /sys/class/android_usb/android0/idProduct 6866
- write /sys/class/android_usb/android0/functions $sys.usb.config
+ write /sys/class/android_usb/android0/idVendor 1004
+ write /sys/class/android_usb/android0/idProduct 631D
+ write /sys/class/android_usb/android0/bDeviceClass 239
+ write /sys/class/android_usb/android0/bDeviceSubClass 2
+ write /sys/class/android_usb/android0/bDeviceProtocol 1
+ write /sys/class/android_usb/android0/functions ptp,adb
write /sys/class/android_usb/android0/enable 1
start adbd
setprop sys.usb.state $sys.usb.config
-on property:sys.usb.config=rndis,dm
+on property:sys.usb.config=ptp
write /sys/class/android_usb/android0/enable 0
- write /sys/class/android_usb/android0/idVendor 18D1
- write /sys/class/android_usb/android0/idProduct 6862
- write /sys/class/android_usb/android0/functions $sys.usb.config
+ write /sys/class/android_usb/android0/idVendor 1004
+ write /sys/class/android_usb/android0/idProduct 631E
+ write /sys/class/android_usb/android0/bDeviceClass 0
+ write /sys/class/android_usb/android0/bDeviceSubClass 0
+ write /sys/class/android_usb/android0/bDeviceProtocol 0
+ write /sys/class/android_usb/android0/functions ptp
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state $sys.usb.config
View
2  star.mk
@@ -78,7 +78,7 @@ PRODUCT_PACKAGES += \
# Set default USB interface
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \
- persist.sys.usb.config=ptp
+ persist.sys.usb.config=mtp,adb
PRODUCT_BUILD_PROP_OVERRIDES += BUILD_UTC_DATE=0
PRODUCT_MANUFACTURER := LGE
Please sign in to comment.
Something went wrong with that request. Please try again.