I have an android head unit that I am developing an application for. I need to be able to debug over wifi. However when I setup adb tcpip 5555 etc.. I cannot connect. I checked the netstat output from the device and sure enough its listening on :::5555
Does anyone know if there is a way to get adb to listen on ipv4 addresses? The device is not rooted by the way. The link to the device is : https://www.amazon.com/dp/B08HPZP1NV/?th=1
The model is: ATOTO S8 Standard
Getting this device to even show up on USB took installing a "settings app" that the developers removed, turn on usb debugging, then switch usb mode to host mode (I think it says host mode as its in Chinese).
I develop on my tablet using android studio.
The tablet is connected to the computer by wifi using
adb connect <ip_andress>:5555
My application contains listeners for USB devices attached/detached.
But unfourtunately, when I connect/disconnect usb device to/from the tablet, the adb connection is getting killed, and I can no longer see the device under "adb devices".
It is not a adb-connection-by-wifi what gets killed. It is just that USB enumerations affect the sys.usb.* system properties which on many devices is causing restart of adbd regardless whether it's being used over USB or tcpip.
Do grep "stop adbd" /init*rc to see what I mean.
You could either comment out those stop adbd lines or just disconnect the USB cable before running your adb connect command.
I was never able to connect my cellphone with my computar through wi-fi.
I had already given up. I followed all the instructions and tips, and nothing worked.
Finally, I did what no one said to do.
I've connected the phone to the WiFi network provided by the cable modem itself and not to some (not all) additional networks that are included in the router.
At home I use one of these networks, because I use a Deco Tp-Link router, which propagates the signal to my entire house, but this network is NOT compatible with ADB. It does not identify it as belonging to the same network.
After this, I use the normal procedure described here.
a) Connect cellphone with a USB cable
b) Find the IP_Phone depends on system in the cell phone. Here I use Settings, About Phone, Status and IP address.
c) Run the following adb commands in Command Prompt (Windows) or Terminal (Linux), where IP_Phone is the IP above mentioned. Normally adb.exe is an executable stored in computer path. adb is already included in Android Studio package.
adb tcpip 5555
adb connect IP_Phone
d) Now disconnect USB cable and it's ready. The cellphone model continues to appear in the status line in the top of Android Studio.
-/-
The best wifi is that defined in Cable Modem. It, unlike an any account defined in my router, answers to a ping command.
ping IP_Phone
Disconnect the usb cable just before running adb connect <*ip_address_of_your_phone*>
Essentially, my problem is that I tried connecting my device to adb over Wifi, got to adb connect xxx.xx.xx.xxx but then adb claims that it was unable to connect to xxx.xx.xx.xxx:5555.
Ok, but now I'm having trouble getting it back to listening over USB. adb usb tells me that there isn't a device attached and adb devices gives me an empty list.
I've tried killing the adb server and then restarting it, toggling the device's debugging mode and toggling the device's USB storage transfer but nothing seems to be working. This question seems very similar to my problem but I have no idea what the guy is doing in the solution.
I'm guessing the problem is that adb is still trying to listen through Wifi but since I can't connect to it over Wifi it can never go back to listening to it over USB. Idk...
For wifi, you may be able to get it to work if you first use the browser on the device to visit a webpage or something and so effectively wake up the wifi radio and its connection to the access point. You may need to keep doing this every once in a while.
(Maybe you should listen to internet radio while you work?)
Of course your access point will have to permit peer-to-peer traffic on the local subnet. In many cases that may be the norm, but I believe an access point can be configured not to support that, and some may default to such settings. There can also be issues between wired and wireless subnets sourced from the same box.
Finally, restarting the device might get it back into USB mode.
I am trying to debug some USB attach/detach Intents while using USB Accessory mode to some custom Host hardware. I am able to connect ADB via WiFi TCP/IP and it works great. However, when a USB attach/detach Intent comes along, the ADB connection is broken - even though ADB is not running over USB at all.
After reading countless threads here that dance around that topic, a common suggestion seems to be that having "USB Debugging" checked in Settings will make the ADB connection sensitive to USB. Several posts suggest unchecking that box when running over WiFi/TCP. But I've tried that, and cannot associate ("adb connect 192.168.x.y") if that box is unchecked even when running over WiFi.
I have confirmed that when the box is unchecked, getprops still shows "service.adb.tcp.port 5555" like it always does. I've also tried explicitly killing and restarting the adbd daemon. Nothing works... except checking that box, at which point I can immediately connect via TCP.
So... what's the real story? I must say it FEELS likely that having that box checked would make ADB sensitive to USB even if it's not running on it. But is that box mislabeled, and instead of meaning "USB Debugging" it really means "Debugging regardless of connection type"? I really need to make ADB ignore the USB connection so I can debug attach/detach events. Any help appreciated. Thanks!
I need network connection on my Android device to test apps. My notebook WiFi adapter is broken, so after 2 hours I've set connection via USB. But! Eclipse doesn't see the device when I start "Wired Tether" on it to get connection and I can't debug my apps.
Does anybody know how to solve this issue? Use USB tethering to get internet connection on phone and debug apps at the same time?
I don't know of a way to simultaneously use USB debugging and tethering. Here are some workarounds, though:
Get a USB wireless adapter for your computer (see http://www.amazon.com/gp/bestsellers/electronics/13983791/ref=pd_zg_hrsr_e_2_4_last). I don't know if buying one of these is an option for you in India.
Send your apk to your phone wirelessly for app installation (see Developing on android-based device via wireless) and then view the logcat directly on the phone for debugging (aLogcat seems to be popular, and allows you to send log files via, for example, email, so that you can open them on your computer to view them on a bigger screen)
I know these solutions involve some cost, effort, or inconvenience, but hopefully one will work for you.
EDIT:
As noted in answers from #shkschneider and #CodeShane, Internet sharing via Bluetooth is possible. CodeShane's answer mentions PdaNet (which apparently also allows for simultaneous USB tethering and debugging), and includes a link. Another solution is OpenGarden. These solutions provide access to the Internet for the computer via the phone. If the reverse is desired (and this is not entirely clear from the question), reverse tethering seems to be the answer (see the answer from #NickL).
Long story short: you can't. Android simply does not supports it (that is more because of the USB standard and tethering action than AOSP's fault).
So to go around the problem, you should either:
Get internet form another source
Maybe you could have ethernet connection?
Tether internet from your phone to your netbook in another way
You can't use wireless tether since your wifi adapter is broken, but maybe you could tether using bluetooth?
Debug your phone in another way
Maybe you could use an android application like aLogCat or similar?
But in the hand, sorry, you can't tether usb from phone to netbook while usb debugging from the netbook. Your success will depend on your ability to find an alternative solution.
I would like to point out that I am using PDANet for USB-tethered internet to type this reply while I am also debugging an android application on the same phone via Eclipse Juno. Not sure which side fixed this, but it is awesome!
As for why Eclipse isn't seeing your device, standard troubleshooting tips apply .. make sure to enable USB debugging and unknown sources/3rd party apps, try restarting, check usb drivers, update drivers/eclipse..
Device not detected in Eclipse when connected with USB cable
http://developer.android.com/tools/device.html
Eclipse not finding phone
PdaNet 3.5
Eclipse Juno Service Release 1; Build id: 20120920-0800
You can use bluetooth tethering to get internet connection and debug using USB.
Step 1. Turn off USB tethering
Step 2. Turn on Wireless USB Debugging
Connect to your device via USB
Enter "adb tcpip 5555"
Unplug your device
Look up your device's IP in the system settings
Enter "adb connect [ip address]:5555"
Step 3. Turn on USB tethering
Now you can use internet via USB cable and debug app in wireless mode
That's it!
Yes, its possible. There's a hack available at below links !
Source: HowToGeek , StackOverFlow
You can actually connect the adb to the phone via TCP. You may need a rooted phone for this to work, though
If I understand your question correctly, you want to tether your phone to the PC via USB, and use the (internet)connection of your PC + still get logcat output?
Then yes, this certainly is possible.Tethering is when your PC uses the internet of your phone, the other way around is called reverse tethering. Your device has to be rooted, then you can use this application for reverse tethering.
When you connect your phone to the computer via USB, you press 'connect' in the application. It then installs an app on your phone, which handles the reverse tethering connection. It works, I sometimes have to press 'check DNS' while it is connecting to make it working.. but it works! Also debugging via USB works the usual way.
First you need to debug your device using USB cable then type adb tcpip 5555 it will allow debugging via TCP/IP protocol.
After that turn on your USB tethering, now your computer get internet connection but lost the USB debugging.
Now you must know your phone IP address so you can debug via TCP/IP. You can use command arp -a in terminal and look at the gateway address.
The last is connect to your phone using adb connect yourphoneip:5555 for example adb connect 192.168.42.129:5555
Now you get debug and tether at the same time
You can use
WiFi Tethering - For Internet connection
Connect USB for adb.