There is another option that I believe works on all Android platforms.
At least the drivers exist. Unfortunately I have not found a standard
mechanism to enable it operation.

All Android platforms that I have encountered include g_ether.ko. This
is a gadget ethernet kernel module which may be used for network
communications over USB. The problem is that this conflicts with
g_android.ko, since they both want to own the USB interface.

If you have the ability to modify init.rc then you can:
1. Start adb to listen to a TCP port. This attaches adb to the wifi
interface, freeing up USB
2. Then you can load g_ether.ko and use standard Java networking
methods

If anyone knows how to do this without modifying the Android platform,
please let share....

> > 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.

-- 
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting

Reply via email to