[PATCH 0/3] usb: gadget: iSerialNumber for FunctionFS, FunctionFS in adb

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch series is intended to demonstrate the possibility of using adbd
(Android Debug Bridge daemon) with a generic FunctionFS gadget instead of
a custom adb gadget from Google. In order for this to work, the patch number 1
from this series introduces iSerialNumber which is set from a kernel module
parameter named usb_serial. Patches 2 and 3 are used to add a replacement usb
access layer to adbd: patch number 2 adds a new layer as a copy of an existing
usb_linux_client.c while patch number 3 introduces FunctionFS support proper
on top of patch number 2. The former usb access method is still available,
the method is chosen at compilation time by setting USE_USB_FUNCFS variable to
false in adb's Android.mk in the section dedicated to adbd.

For information on the background please refer to this post:
http://thread.gmane.org/gmane.linux.usb.general/56244
http://thread.gmane.org/gmane.linux.usb.general/56245

How to use on the target device:

$ insmod g_ffs.ko usb_vendor=<vendor ID> usb_serial=<some string>
$ mount -t functionfs adb /dev/usbgadget/adb -o uid=2000,gid=2000
$ ./adbd

In case adbd does not switch its identity to uid=2000,gid=2000, respective
options are not required in the mount command above. It depends on adb
properties. If adbd is run standalone, then the properties are set to their
defaults which imply switching uid,gid to 2000,2000.

[PATCH 1/3] usb: gadget: iSerialNumber for FunctionFS
- iSerialNumber as a module parameter, FOR KERNEL

[PATCH 2/3] adbd: add a new usb access layer
- Copy an existing usb access layer to form a new usb access layer, FOR ADBD

[PATCH 3/3] adbd: introduce FunctionFS support
- Modify the newly created usb access layer to support FunctionFS, FOR ADBD

I also have a kind request to forward this post to Android people 
(or should I say "people from Android" instead? ;) ) who might be interested. 


Patch summary, FOR KERNEL:

Andrzej Pietrasiewicz (1):

  usb: gadget: iSerialNumber for FunctionFS
  adbd: add a new usb access layer
  adbd: introduce FunctionFS support

 drivers/usb/gadget/g_ffs.c |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

Patch summary, FOR ADBD:

Andrzej Pietrasiewicz (2):
  adbd: add a new usb access layer
  adbd: introduce FunctionFS support

 adb/Android.mk                |   11 ++-
 adb/adb.c                     |    4 +
 adb/adb.h                     |    6 +
 adb/usb_funcfs_linux_client.c |  351 +++++++++++++++++++++++++++++++++++++++++
 4 files changed, 371 insertions(+), 1 deletions(-)
 create mode 100644 adb/usb_funcfs_linux_client.c

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux