I have two Galaxy S3. One of them is rooted and the other one is not. So, when I tried to connect them over the local network, computer can see the rooted one. But normal one stucks on the tcpip step. So, I write
adb tcpip 5555
It says
restarting in TCP mode port : 5555
but nothing else. Can you help me with these?
Note: My OS is Win8.
After running
adb tcpip 5555
What is the ouput when you try to run the "connect" command to the devices based on knowing the IP of the phone e.g.
adb connect 192.168.1.186
should result in something like:
connected to 192.168.1.186:5555
Also, make sure you have USB debugging turned on on the Samsung 'Settings' --> 'Developer options'
(If you don't see 'Developer Options', you'll need to enable it first (link))
I have made a small script for myself
Simply Connect your device (in USB debugging mode).
Go to location "C:\Users\PC\AppData\Local\Android\sdk\platform-tools"
Press Shift + Right Click --> open Command window here.
Paste that script there , make sure adb.exe is available at that path in PC.
run wireless.bat follow steps give your IP that's it.
wireless.bat
Related
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 am developing an app for Android that controls a robot using the FTC SDK, and I need to be able to make small changes to motor values in the code and re-install it to test the new code. My problem is that I need to do this a lot of times, and the system of taking the phone out of the mount (which takes a while) and plugging it into my computer to upload, waiting for it to upload, turning off the power to the robot, plugging the phone back in to the robot, and turning the power back on has started slowing our progress down a lot. I was wondering if there was any way I could install the new code on the phone without taking it out of the mount.
Our phone is connected to a usb hub with a webcam and the hardware controller, so I was wondering if attaching a wireless usb transmitter to the hub and my computer would still let the phone show up on the android studio connections manager and let me install it.
So if anyone has done this before, or knows about any way to make this work, thank you for the help!
Yes. First make sure that the robot phone has developer mode and USB debug enabled.
(Do this by going to settings -> software info and click on build number ten times, then go settings -> developer options and enable USB Debug)
Then, go into the robot controller phone and under the three dots at the top right select program and manage. Connect your computer to the shown internet name and password.
Next if you are on Windows plug in the phone and run the following code in command prompt,
pushd "%userprofile%\AppData\Local\Android\sdk\platform-tools"
adb disconnect
adb tcpip 5555
adb connect 192.168.49.1
popd
PAUSE
If you are on Mac plug in the device and run the following code in terminal,
cd ~/Library/Android/sdk/platform-tools
./adb disconnect
./adb tcpip 5555
./adb connect 192.168.49.1:5555
Finally, disconnect the phone, go back to android studio and happy wireless coding.
I'm using scrcpy to mirror the phone screen to computer, which uses adb.
I've followed the steps and it works:
# connect via USB
adb devices
adb tcpip 5555
# now unplug USB, and the following will work over WiFi
adb connect 192.168.1.14:5555
scrcpy
But when you reboot the phone or computer, doing adb connect 192.168.1.14:5555 and scrcpy doesn't work anymore (NB: the phone IP hasn't changed, it's fixed).
Reading the answers from Run/install/debug Android applications over Wi-Fi?, I see 3 options:
plug the USB cable each time before doing a wireless connection, but this is annoying, and somehow reduces the interest of wireless...
Use "ADB over network" (main answer's screenshot), but as noted by many people in comments: "i do not have the "ADB over network" option in debugging option"; so this option doesn't work for me
other techniques that need root (not possible for me)
Question: how to pair the phone and computer with a USB cable only once, and then be able to use adb between them without having to use a USB connection first, after each reboot?
Note: I don't use Android Studio, but only scrcpy.
It's not possible without root the phone. If your phone has rooted. You can use this app. https://play.google.com/store/apps/details?id=com.ttxapps.wifiadb&hl=en. With this app you can easily debugs android apps with only wifi. Don't want USB cable even only first time.
Based on all the information I have the next conclusion. Just for reference, how a low-level setup with changing add routes works inside, described here. It comes up, there is a pretty straight thing inside changing navigation with adb tcpip <port>.
The first thing we need to do, it's setup system property with tcp port with name setprop service.adb.tcp.port (and values with a port number) By default, there is not such property.
And then just restart adb with few commands. stop adbd and start adbd on a device in order to debug bridge listen new port. What is the trick here, that you don't have access to this service and stop/start it without root. But it could be easily done, via Developer setting with stop/start debugging.
This few simple action hidden inside adb tcpip <port>. And the problem, that you cannot change system properties (point 1). That is why all application requires root access, it's just to change the single option. That is why, we need to connect with USB to debug bridge, which can change properties with his sepolicy.
So answering your question. I don't understand either, what is the problem or enabling this small setup in Developer options. But right now, it's possible to do so on some Roms, or devices with root access.
I have read all the relative threads about ADB not recognizing devices. My case though is different: ADB sometimes "sees" my phone (Samsung Galaxy) and other times NOT. No matter how many times I kill and restart the ADB service or I disconnect and reconnect the device from/to the PC. Quite an unstable situation here. You know, it's one of these things that drives you crazy. That's why I resorted to your help.
Has anyone had this exact problem and resolved it once for all?
More info:
The PC has never a problem recognizing the device.
I try with both the standard SDK adb.exe and the Universal ADB driver adb.exe.
Either of the above have no problem recognizing the emulator.
Couple things.
1) it's a dumb suggestion but sometimes its as simple as this. Did you try more than one cable?
2) If yes, then try this. try as many times as you have to get it connected since u said "ALWAYS" so it does work sometimes. When it does work, open terminal or command line and run the following commands.
(make sure device is connected when you do this AND you are on the same wifi network)
adb tcpip 5555
then disconnect your phone and run the following command:
adb connect YOUR_LOCAL_IP
do this many times, this is wireless adb connection and if this works, its something with ADB or your computer and not the phone.
Let me know if it works. I might have more ideas depending on what result you get
============ EDIT ============
I believe it's offline because it says 8080. I just did the same with my phone and I get the following:
Try this: disconnect phone physically (if connected) and all other devices and make sure by doing: adb disconnect.
then, do adb kill-server
then, on your phone, go to Developer Options and uncheck USB debugging.
then, right underneath that options, there is Revoke USB debugging authorizations options. select and revoke all devices
then, check USB debugging
then, back on your computer, run adb start-server
then, try reconnecting with the steps I said before. make sure port is 5555
when you run the adb connect command, make sure to add the port at the end.
example: adb connect 10.0.0.15:5555
Hope this works.
So I have been following a few tutorials online for setting up android app debugging through wifi, since my USB connection is broken.
The first command line input is giving me problems.
I type in
adb tcpip 5555
and get this message:
Restarting in TCP mode port 5555
This message just hangs and the process never finishes.
I tried different port numbers, same thing. Tried to connect to my device IP and no luck.
Any ideas?
Just plug out your USB wire at that moment and it will connect.
Make sure desktop and device is connected the same network? and
1) Switch on wi-fi
2) adb tcpip 5555 - it restarts your device
3) adb connect deviceIpAddress:5555
4) Unplug your device and run project
Enjoy the life ))))
I have the same problem sometimes, when that happens, use 5556 or other port. that works for me.
When adb tcpip 5556 is not responding, remove your data cable and reconnect cable
adb shell netcfg - for finding phone ip.
adb connect ip:5556 the device will be successfully added.
adb devices - list all devices connected.
I know it's an old thread but it may still help others. My problem solved when I changed my android device usb connection mode from Usb Mass Storage to MTP inside android usb settings.
i had the same issue.
in my case i saw there is two cmd opened,
closed another cmd and its worked for me