Letux Kernel

Issue 473: Android usb gadget

Reported by Nikolaus Schaller, Jul 31, 2013

Android needs some USB gadget driver for ADB:


Comment 1 by Nikolaus Schaller, Aug 2, 2013

This appears to be the latest source for this gadget:


We also need some Kconfig/Makefile patch...

And configure "CONFIG_USB_G_ANDROID"

Comment 2 by Nikolaus Schaller, Aug 2, 2013

Well, this is not sufficient...

The android.c file consists of a ladder of #include 

This means these files have to be added as well!

Comment 3 by Nikolaus Schaller, Aug 2, 2013

According to:


there has been some work, and there was already some code in Linux 
3.5 - 3.9 for a ccg (Configurable Composite Gadget - reincarnation 
of Android Composite Gadget):


It is not immediately clear what happened to it in 3.10/3.11.

Comment 4 by Nikolaus Schaller, Aug 2, 2013

Marek wrote:
Unfortunately it was removed (in 3.10 probably):


Comment 5 by Nikolaus Schaller, Aug 3, 2013

The initial Configurable Composite Gadget from Linux 3.5 has been 
added to the code, but not yet been tested.

To configure it, one must unconfigure the other gadgets (mainly the 
usb-ethernet gadget).

Comment 6 by Nikolaus Schaller, Oct 1, 2013

The ccg has now been removed because there appears to be a better 
patch from Linaro that is compatible to the Android sysfs node names.
Labels: Milestone:3.12
Owner: slyon

Comment 7 by Lukas M, Oct 27, 2013

I've now integrated the ADB driver from the official AOSP 3.10 
kernel tree:

Our 3.12-wip-replicant4 kernel now boots to the Android UI and it is 
possible to connect with "adb shell" from the host.
Status: Fixed

Comment 8 by Lukas M, Nov 22, 2013

Here is a VERY interesting comment by John Stultz, that it is 
possible to use adb via the FunctionFS driver, which is already part 
of the mainline Linux. It is not as flexible as the original adb 
driver, though.

Progress is tracked here:

Created: 10 years 8 months ago by Nikolaus Schaller

Updated: 10 years 4 months ago

Status: Fixed

Owner: Lukas M