How to use USB gadget driver for debugging with adb

1,309 views
Skip to first unread message

Fasil Mohamed

unread,
Dec 18, 2009, 1:48:23 AM12/18/09
to Android Linux Kernel Development
Hi,

I want to debug an application crash with adb for the target OMAP
platform running Android donut. At present I m having USB_OTG support
in my kernel for my target platform OMAP which has only storage
support. The kernel I m using is 2.6.29 for OMAP3530.


I need to understand the role of the file android.c in /drivers/
usb/gadgets and what are all kernel support it requires to use adb
for debugging. I m also not sure of how to use USB gadget drivers for
debugging with adb for the Target platform(connectivity with the
target). As the application we are testing depends entirely on the
hardware , we cannot use emulator to debug.
Kindly help me to fix this issue.


Thanks and Regards
Fasil

Fasil Mohamed

unread,
Jan 11, 2010, 12:49:54 AM1/11/10
to Android Linux Kernel Development
Hi,

I have enabled the adb debugging with target via USB OTG.
On enabling the following configuration

Device Drivers-> USB Support-> USB Gadget support -> USB Gadget
Drivers -> Android Gadget

I got the android.c file compiled including f_adb.o (drivers/usb/
gadget/android.c) and it also depends on /drivers/switch which has
switch_gpio

Once this Android gadget is enabled, adb connection is established
which can be viewed while booting android. Further on connecting USB
you can login to adb shell, view dalvik debug manager and lots
more....

Regards
Fasil

voks

unread,
Jan 19, 2010, 12:34:46 PM1/19/10
to Android Linux Kernel Development
Fasil,

Did you have some other usb gadget also enabled while debugging with
adb via USB. I am wondering if it will be possible?
To debug with adb over USB with for example gadgetFS running.

Thanks&Regards,
voks

On Jan 11, 12:49 am, Fasil Mohamed <mfasi...@gmail.com> wrote:
> Hi,
>

>         I have enabled the adb debugging with target viaUSBOTG.
> On enabling the following configuration
>
>  Device Drivers->USBSupport->USBGadgetsupport ->USBGadget
> Drivers -> AndroidGadget
>

> I got the android.c file compiled including f_adb.o (drivers/usb/gadget/android.c) and it also depends on /drivers/switch which has
> switch_gpio
>
> Once this Androidgadgetis enabled, adb connection is established


> which can be viewed while booting android. Further on connectingUSB
> you can login to adb shell, view dalvik debug manager and lots
> more....
>
> Regards
> Fasil
>
> On Dec 18 2009, 11:48 am, Fasil Mohamed <mfasi...@gmail.com> wrote:
>
> > Hi,
>
> >      I want to debug an application crash with adb for the target OMAP
> > platform running Android donut. At present I m having USB_OTG support
> > in my kernel for my target platform OMAP which has only storage
> > support. The kernel I m using is 2.6.29 for OMAP3530.
>
> >      I need to understand  the role of the file android.c in /drivers/
> >usb/gadgets and what are all  kernel support it requires  to use adb

> > for debugging. I m also not sure of how to useUSBgadgetdrivers for

Fasil Mohamed

unread,
Jan 27, 2010, 3:52:00 AM1/27/10
to Android Linux Kernel Development
Voks

on Enabling Android gadget in USB OTG, debugging is made possible via
adb... No other gadget need to be enabled to make adb work...

Regards
Mohamed Fasil

shashi kumar

unread,
Feb 3, 2010, 11:14:43 AM2/3/10
to android...@googlegroups.com
Hi Fasil,

Can you clarify me, is it otg will work on android kernel?
main advantage of android.c file is we can switch betwen the adb and other function drivers.



Reply all
Reply to author
Forward
0 new messages