> > I would like to create an Android application that communicates with a
> > PC Windows app using the USB interface. May I know if this is
> > possible? Do I need to modify the Android OS, add in drivers or can
> > this be done at the application level?
>
> This is possible, but poorly supported enough that it may not be suitable
> for end users.
>
> Unless you are in a position to install a custom android build adding a new
> device side USB driver, you don't really get to use the USB as USB.
>  Instead you have two choices:
>
> 1) Install an "ADB" driver on the PC and enable "USB debugging" on the
> android device.  Set up an ADB port forward.  Run a TCP server on the
> device, and have a TCP client on the PC connect to the local port which is
> forwarded to the android device via ADB.  This should work on all ordinary
> android devices, but several of the steps (identifying and installing the
> appropriate ADB driver for the phone, activating USB debugging on the
> phone) may not be a good fit for non-technical end users.
>
> 2) Activate some device/build-specific USB (reverse)tethering or internet
> pass through, and hope that as a side effect this makes TCP connections
> between the PC and device possible.  This will only work on some devices.
>
> A more practical option may be to ask the user to place the device and PC
> on the same wireless network, or even communicate by was of a server you
> place on the Internet so that it is visible from both the PC's network
> provider and the android device's mobile network.

There is another option that is available on all the Android platforms
I have looked at, load g_ether.ko. Unfortunately this isn't as easy as
it should be since g_android.ko, the ADB kernel driver, wants to use
the USB interface by default. If you could modify the default behavior
so ADB connects to a TCP port via Wifi by default, then USB will be
available.

I have been able to accomplish this with a custom init.rc file. If
anyone knows how to do this in a vanilla Android environment it would
be greatly appreciated.

Allen

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting

Reply via email to