Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

usb: set up for usb mass storage(old gadget stack)

  • Loading branch information...
commit be05c12c7e3a0ba1acffc6cb4eef4fec0b4d9f5a 1 parent 180d1a8
@dalingrin dalingrin authored
View
5 BoardConfig.mk
@@ -93,9 +93,8 @@ TARGET_PREBUILT_KERNEL := device/hp/tenderloin/prebuilt/boot/kernel
# clockworkmod
TARGET_NO_RECOVERY := true
-#BOARD_CUSTOM_RECOVERY_KEYMAPPING:= ../../device/hp/tenderloin/recovery_ui.c
-#TARGET_RECOVERY_INITRC := device/hp/tenderloin/init.recovery.rc
-#BOARD_RECOVERY_IGNORE_BOOTABLES := true
+
+TARGET_USE_CUSTOM_LUN_FILE_PATH := /sys/devices/platform/usb_mass_storage/lun0/file
# tenderloin - these partition sizes are temporary to complete build
TARGET_USERIMAGES_USE_EXT4 := true
View
72 init.tenderloin.usb.rc
@@ -1,71 +1,33 @@
-on init
- write /sys/class/android_usb/android0/iSerial $ro.serialno
- write /sys/class/android_usb/android0/f_rndis/manufacturer HP
- write /sys/class/android_usb/android0/f_rndis/vendorID 0bb4
- 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
+on property:sys.usb.config=adb
+ write /sys/class/usb_composite/adb/enable 1
+ start adbd
+ setprop sys.usb.state $sys.usb.config
-on property:sys.usb.config=mtp
- write /sys/class/android_usb/android0/enable 0
- write /sys/class/android_usb/android0/idVendor 0bb4
- write /sys/class/android_usb/android0/idProduct 685c
- write /sys/class/android_usb/android0/functions $sys.usb.config
- write /sys/class/android_usb/android0/enable 1
+on property:sys.usb.config=mass_storage
+ write /sys/class/usb_composite/usb_mass_storage/enable 1
+ start adbd
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 0bb4
- write /sys/class/android_usb/android0/idProduct 6860
- write /sys/class/android_usb/android0/functions $sys.usb.config
- write /sys/class/android_usb/android0/enable 1
+on property:sys.usb.config=mass_storage,adb
+ write /sys/class/usb_composite/usb_mass_storage/enable 1
+ write /sys/class/usb_composite/adb/enable 1
start adbd
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 0bb4
- write /sys/class/android_usb/android0/idProduct 6863
- 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
+ write /sys/class/usb_composite/rndis/enable 1
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 0bb4
- write /sys/class/android_usb/android0/idProduct 6864
- 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
+ write /sys/class/usb_composite/rndis/enable 1
+ write /sys/class/usb_composite/adb/enable 1
start adbd
setprop sys.usb.state $sys.usb.config
-on property:sys.usb.config=ptp
- write /sys/class/android_usb/android0/enable 0
- write /sys/class/android_usb/android0/idVendor 0bb4
- write /sys/class/android_usb/android0/idProduct 6865
- 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=ptp,adb
- write /sys/class/android_usb/android0/enable 0
- write /sys/class/android_usb/android0/idVendor 0bb4
- write /sys/class/android_usb/android0/idProduct 6866
- write /sys/class/android_usb/android0/functions $sys.usb.config
- write /sys/class/android_usb/android0/enable 1
+on property:sys.usb.config=mass_storage,rndis,adb
+ write /sys/class/usb_composite/usb_mass_storage/enable 1
+ write /sys/class/usb_composite/rndis/enable 1
+ write /sys/class/usb_composite/adb/enable 1
start adbd
setprop sys.usb.state $sys.usb.config
-on property:sys.usb.config=rndis,dm
- write /sys/class/android_usb/android0/enable 0
- write /sys/class/android_usb/android0/idVendor 0bb4
- write /sys/class/android_usb/android0/idProduct 6862
- 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
-
View
5 overlay/frameworks/base/core/res/res/xml/storage_list.xml
@@ -35,9 +35,10 @@
<StorageList xmlns:android="http://schemas.android.com/apk/res/android">
<storage android:mountPoint="/mnt/sdcard"
- android:storageDescription="@string/storage_sd_card"
+ android:storageDescription="@string/storage_usb"
android:primary="true"
- android:removable="false" />
+ android:removable="false"
+ android:allowMassStorage="true"/>
</StorageList>
View
2  system.prop
@@ -35,4 +35,4 @@ ro.emmc = 1
net.bt.name=Android
persist.service.adb.enable=1
-
+persist.sys.usb.config=mass_storage,adb
Please sign in to comment.
Something went wrong with that request. Please try again.