Thursday, July 14, 2011

[android-developers] Re: unable to use USB if ADB on tcp port?

Answer below!

> Is it possible to use the USB port for other purposes if ADB is running?
>
> ADB has been reconfigured to operate over Wifi. I have successfully connected to the TCP port 5555.
>
> When I try to load the USB ethernet gadget driver, I get device busy.   (modprobe g_ether)
>
> We need to use the USB for our application. Is it possible to have ADB as well?


I have answered my own question. Since very few of these type
questions actually get answered, I thought I should share.

The answer is obvious once you think about it!! The module g_android
is typically loaded to handle ADB sessions via the USB port.l However
it is possible to also connect to the ADB server on the device via TCP/
IP.

If you are interested in using you USB interface as a CDC ethernet
connection, do the following: (you will need root access)

1. open a terminal as su
2. stop adbd
3. rmmod g_android
4. modprobe g_ether

Now you should have a usb0 ethernet device.

5. ifconfig usb0 <ip address>/<#netmask bits>

Your host computer should have also magically gained a usb0 ethernet
device. Configure a static IP address and verify that you can ping
back and forth.

Now configure ADB on the device to listen to a network.

6. setprop service.adb.tcp.port 5555
7. start adbd

From your laptop, connect to the ADB server on the device.

8. adb connect <device ip>
9. adb shell

You should now be in a shell via a TCP port connection over the USB
port.

Allen

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate