adb socket not working and daemon - android

I am getting this type of error
error: could not install smartsocket listener: cannot bind to
127.0.0.1:5037: Only one usage of each socket address (protocol/network address/port) is normally permitted. (10048) 1:34:26
PM could not read ok from ADB Server 1:34:26 PM * failed to start
daemon * 1:34:26 PM error: cannot connect to daemon 1:34:26 PM
'C:\Users\MITESH
SUTHAR\AppData\Local\Android\Sdk\platform-tools\adb.exe,start-server'
failed -- run manually if necessary 1:38:14 PM Unable to obtain result
of 'adb version'
my genymotion device is running but it shows me that no device

I came across the same error. I provided the below command and the issue got solved.
COMMAND :- taskkill /f /im adb.exe

Close Eclipse or Android Studio if either is running (Optional).
Open Command Prompt.
Go to the Android SDK platform-tools directory.
Type adb kill-server.
Type adb start-server.
If no error message is thrown while starting ADB server, then adb is started successfully.
OR
Go to Task Manager, open the Processes tab, and end the adb.exe process.
Then restart Android Studio.
This may work if there is any problem with adb.

In my case, none of the above solution worked. I solved it strangely maybe it can be a bug.
Do not run Genymotion emulator before Android Studio. Firstly, I opened android studio then I clicked run project and select deployment target windows appeared. Then I run genymotion emulator and now the emulator is shown in the select deployment target windows in Android Studio. Then deployed to the emulator without errors. Done!
As another way, you can try to set Genymotion sdk to the same as Android studio sdk. To do this, first find your sdk location. You can find it by right clicking the Android Studio project -> Open Module Settings-> Select SDK location -> under Android SDK location, it is shown. Then open Genymotion -> Settings -> ADB tab -> Click Use custom Android SDK tools radio button -> navigate to SDK folder used by Android studio -> Restart Genymotion virtual device

If none of the above worked for you, just make sure that you have closed Genymotion emulator as it caused this issue with me.

Easiest Way! I just ran into this issue trying to connect a React-Native App to an Android Studio emulator. If you read the error message it tells you that "Only one usage of each socket address (protocol/network address/port) is normally permitted." So you can assume that something other than React-Native is also attempting to connect to the emulator.
Terminate The Connections:
Leave the emulator running.
Close out of and uninstall any Android Studio/Eclipse Apps you have on the emulator. This terminates apps trying to connect.
Close Eclipse or Android Studio if either are running. Android Studio doesn't have to be open in order for the emulator to work (This is important). This terminates software trying to connect.
After doing so I went back into my React-Native App and connected to Expo no problem.
All you have to do is terminate all connections. However you so choose.

I came across the same error, it worked simply after restarting the AS on windows, of course, it asked for SDK update.

Android Studio 4.1.3 with API 30 installation has this error
01-04-2021
09:56 'C:\Users\ranja\Android\Sdk\platform-tools\adb.exe start-server' failed -- run manually if necessary
Tried C:\Users\ranja>adb start-server
daemon not running; starting now at tcp:5037
**could not read ok from ADB Server
failed to start daemon
error: cannot connect to daemon**
Note: I have added 'C:\Users\ranja\Android\Sdk\platform-tools' in %PATH% environment variable on Windows 10

i've encountered same error in my ionic 2. i just uninstall and reinstall ionic. and it works fine again..
npm uninstall -g ionic
npm install -g ionic

Related

Cant run adb process

I'm creating an application in android studio but I am um able test it on the virtual emulator because the adb process won't start. It's giving this error.
I tried manually starting adb and all other things but this happens.
I tried reinstalling android studio and platform tools. I downloaded a separate adb and ran "adb start-server"/"kill server".
It just doesn't seem to work. So i constantly have to build the entire thing and generate apk to run it. Please help me guys!!!
Also regarding the virtual emulator i have intel haxm installed if that information was necessary.
It's may be because your emulator adb not allow the android studio to run on it and android studio try to stop and re-run but this process fail.
Me also the same problem. So i always follows this step and it's work for me.
1. Open android studio.
2. Try to run your app without opening your emulator(It will start your adb).
3. Then open your emulator and run your app.
It's working for me. May solve your problem.
adb server didnt ack. This issue will resolve ussually when you kill all instances of adb.exe and restart server again.
Open Task manager and kill all adb instances and start server again.
Try the following:
Close Studio.
End adb.exe process in taskmanager.
Issue kill and
Run adb kill-server
Run adb devices
Then start the emulator and try adb devices again. This should list your emulator-device.
Run you apk in studio.
If your are using Genymotion,try to link your Android Studio 's SDK to Genymotion Android SDK Path.Then try to type with adb devices, I hope this will help for you.

ADB in android studio keeps showing same error message and does not start

My ADB install does not work, it does not start or show any info. I keep getting the same error message over and over again:
18:14 Unable to run 'adb': null
18:14 '/Users/jorandob/Library/Android/sdk/platform-tools/adb start-server' failed -- run manually if necessary
If I try to start ADB manually it just doesn't show anything.
I tried so far:
Restart server
Reinstall ADB
Reinstall Android Studio
I'm on mac os X 10.11.6 and not using any special emulator.
If its helpful information, I'm using ionic.
Terminal ADB:
Jorans-iMac:~ jorandob$ adb version
Android Debug Bridge version 1.0.36
Revision 0e9850346394-android
I finally resolved my issue, it occurs if you run java and ADB at the same time.
to fix it stop all java processes in the activity monitor.

Virtual device not showing up in Android Studio

I am a total newbie in Android Studio programming.
When I click the Run button to run my program, my virtual device doesn't show up in Select Deployment Target and I get the following error:
18:08:32 error: Invalid argument: cannot open transport registration
socketpair
18:08:32 could not read ok from ADB Server
18:08:32 * failed to start daemon *
18:08:32 error: cannot connect to daemon
18:08:32 'C:\Users\samarc\AppData\Local\Android\Sdk\platform-
tools\adb.exe,start-server' failed -- run manually if necessary
What should I do? This seems to be the only thing that is stopping me from programming in Android Studio. Any and all help will be appreciated. I use Android Studio 2.2.3 and Windows 7 x64.
Just check there might be an existing adb process running in your task manager. Just kill the process and run the 'adb start-server' command.
Other Method:
Close android studio and the emulator and check in your task manager for another adb process and kill it if one exists.
If you have done it open Android studio again and first of all start the emulator and if it is running then your project.
You can even do it manually:
adb kill-server
adb start-server
Hope it helps
One may need to delete *.lock file from the Android main folder location and then at the subfolder as follow Android InstalledPath.android\avd\Nexus_5X_API_26.avd
If you are not able to delete the file and then try deleting the corresponding *.exe process from the task manager and then run the Android studio again and then AVD Manager. Select the virtual device (which shows available in play store)

ddms: 'adb.exe,start-server' failed -- run manually if necessary, Android Studio

My adb is down, no matter I am using ADT or Android Studio.
And according to the second answer of this SO question, I did:
I type:
adb nodaemon server
Output:
cannot bind 'tcp:5037'
Then netstat -ano | findstr 5037
I did find a pid of 7416 who listen in 127.0.0.1:5037
I use taskkill /pid 7416 -f to kill it.
I type netstat -ano | findstr 5037 again, I found another pid listens at 127.0.0.1:5037 again!
I guess they are the same, but I have no idea who it is.
Can I simply have a easy way to release this port or change the adb port to another one?
In my case I was trying to use genymotion emulator device.
With genymotion opened and running, I've tried to run my app in this emulator but I it doesn't worth
In this part I had this error:
'C:\Users\Jose\AppData\Local\Android\sdk\platform-tools\adb.exe,start-server' failed -- run manually if necessary
Then I've tried Jaskey's solution but it doesn't works.
So I stopped genymotion emulator.
Then I restart ADB (Tools > Android > Unchecked Unable ADB Integration then I've checked again)
Next I've start genymotion emulator again
And now the app works on the emulator.
For Windows,
Close Android Studio and any of your Emulators you are using,
then goto->TaskManager and Kill the process(adb.exe)
After finishing all these First open Android studio followed by emulators.
Sometimes there are conflicts between ADB Genymotion and ADB SDK because both of them use the same port. So I recommend always set up ADB Genymotion to use the ADB SDK, in that way to avoid incompatible issues.
Genymotion-> Settings -> ADB -> Use custom Android SDK tools (here your set up your sdk android location).
I solve this problem at last! I finally found the program name of the pid and I kill it in the task manager.
The way to detect is described in the question:
adb nodaemon server
Output:
cannot bind 'tcp:5037'
2.and then netstat -ano | findstr 5037 to find who takes this port.
Get the pid and find it in the task manager. Please note that the process tab may not show the column of pid, we should include it by setting.
In my case, it is tfadb.exe who takes this port! This is a Chinese Video program client! Try to kill it in task manager.
Now I stop it starting from booting. The problem is solved.
The best and working solution is:
Close Android Studio
Open task manager
Kill the process adb.exe
Open android studio again
Problem solved
Close Android studio then go to Task Manager
End Task adb.exe
goto Details menu
End Task java.exe and jusched.exe
now open Android Studio it will work properly
I solved by End task "adb.exe" background process from task manager.
and Start adb thats it :)
Open the Genymotion emulator after opening The Android studio.
in my case one application on window use adb.exe.
that application name is mobogenie.
Fixed ::
Goto Window TaskManager select adb.exe and press End process
Just goto the task manager on your PC, and kill adb.exe, then back to your android studio. it should initialize and reconnect.
disconnect any usb connected android devices. I was tethering to my laptop via my cellphone for internet connection. I got the adb start server failed error with loopback error "port is only used for one socket connection".
I disconnected my cellphone usb connection from my laptop and now android studio recognizes my genymotion emulator and another android device I have connected via usb in the deployment target box.
if genymotion or emulator not working try to install pdanet+ in your system and mobile device choose your mobile type(motorola,sony,other)it will automatically install driver and run your application in mobile device.
Check the firewall of the system. May be the "allow app to communicate through windows firewall" may have blocked android studio.
I have tried all of the solutions proposed above, but no one of them solve my problem. I had some hour of hadaches trying to solve this problem on my laptop (Ubuntu 20.04). This is how I came to solve it finally.
The problem was that the adb default port 5037 was already taken by another, so the solution became simple :
kill the process running on that port (5037) then launch the adb manually
launch the adb on another port :
user~$ adb start-server -P xxxx
Where xxxx represent another port
There may be a problem with Windows 11. to solve that issue follow the steps
Go to the android studio app
Right-click the app
Go to Properties
Go to compatibility
Check the Run this program in compatibility mode
Select windows version 10 or 8 or 7 Then apply and ok
After these changes start the Android Studio App, This is works for me.

ADT keeps crashing all the time

I have problem in launching the adb or running my application my ADT keeps crashing or keeps not responding i already tried some ADB KILL-SERVER,ADB START-SERVER but it's not working i also tried to put the full path of platform tools in the environment variables but no lucks.I also tried to manual kill the adb.exe in task manager and restart my ADT but still it will hang or keeps not responding.I am using windows 7 32bit.
Thank you in advance.
Try to update your Android SDK tools with SDK manager. Make sure that no other process is running on port 5037. ADB runs on port 5037 by default.
Post the error messages that you get when you launch adb from command prompt.

Categories

Resources