ADB is not starting (no error message)
Solution 1
Try setting the environment variable ADB_TRACE before starting the ADB server to see if it can provide any clues:
C:\Android\android-sdk\platform-tools>set ADB_TRACE=1
C:\Android\android-sdk\platform-tools>adb start-server
Please include the output in your question.
Solution 2
This solution worked for me:
=> Check if adb is running in Task Manager, then kill it. Now Then try to restart it again via following method:
1) Shift + Right click in ...\android-sdk\platform-tools
folder and select Open command window here
2) Use these commands:
adb kill-server
then adb start-server
If this method didn't work and you see something like this in Command window Killing adb...
Then apply following steps:
3) Close eclipse
4) Now kill javaw.exe Java(TM) Platform SE binary
in Task manager
And follow step 1 & 2 again.
It will surely work. :)
Solution 3
To solve problem in windows machine, try the following:
Problem
ADB stop connecting attached Android device
demon is not running and demon is running on port 5037
Solution
first list all processes which are running on port 5037
command: netstat -ano | find "5037"
Output for above command:
TCP 127.0.0.1:52935 127.0.0.1:5037 SYN_SENT 31016
TCP 127.0.0.1:52936 127.0.0.1:5037 SYN_SENT 31016
Kill processes which are running on port 5037 using the following command: taskkill /F /PID 31016
Then, restart the adb server adb kill-server adb start-server
Expected output:
* daemon not running. starting it now at tcp:5037 *
* daemon started successfully *
Typing adb devices
will give you list of devices connected to the adb server
Solution 4
I have the same while i was running a java application 'traccar', it works for me after killing this process
Solution 5
I think another process like java web server or java application like "traccar" running on your machine. It works for me after killing these process.
Comments
-
Olivvv almost 2 years
I am trying to run adb. When I run : "adb start-server" it hangs during a while, and then no message.
After that the command "adb get-state" receive the answer "error: protocol fault (no status)" If I run then "adb kill-server" the answer is "* server not running *"
I am using windows 7. An admin has elevated my rights to local admin, but it did not solve anything.
I used resources monitor to verify if any other app is using the ports of adb, but it is not the case.
on https://developers.google.com/chrome-developer-tools/docs/remote-debugging the step 3 indicates to "Enable USB Web debugging" under Settings > Advanced > DevTools. But on my test phone, there is no "advanced" category in the chrome settings. I couldn't find out either what is the version of chrome installed.
Somewhere on the web I saw a suggestion to change the rights of "tmp/android/" to allow read & write for all users, but in C:\Users\me\AppData\Local\Android\android-sdk\temp there is no android folder.
So I am pretty desperate now, any help would be immensely appreciated.
thanks
-olivier
EDIT 1: I could't find "Enable USB Web debugging" because it was "android browser" and not chrome (a bit ridiculous yes). I did not know that. Using another device with a proper chrome installed, I could check the option there, but adb is still crashing at startup.
EDIT 2: I did a wild guess that there was some Write issue with the platform-tools folder. So I uninstalled everything using the sdk manager, I deleted the whole adt-bundle-windows-x86_64. Then I unzipped it elsewhere, on c:. Strange thing is, when I launch SDKManager.exe, several packages are already marked as installed :
- Tools>Android SDK Tools
- Tools>Android SDK Plateform-tools
- Android 4.2.2>SDK Plateform
- Android 4.2.2>ARM EABI v7a System Image
- Extras>Android Support Library
I tried deinstall them again, delete the folder, unzip again and re-install, but still same result. It seems that somehow, it is installed wrong, but refuses to uninstall properly. Anyone knows how to force the unistallation ?
EDIT 3 : output of adb start-server after having used set ADB_TRACE=1
C:\adt-bundle-windows-x86_64-20130219\sdk\platform-tools>adb start-server system/core/adb/adb.c::main():Handling commandline() system/core/adb/adb_client.c::_adb_connect():_adb_connect: host:version system/core/adb/sysdeps_win32.c::socket_loopback_client():socket_loopback_client: port 5037 type tcp => fd 100 system/core/adb/transport.c::writex():writex: fd=100 len=4: 30303063 000c system/core/adb/transport.c::writex():writex: fd=100 len=12: 686f73743a76657273696f6e host:version system/core/adb/transport.c::readx():readx: fd=100 wanted=4 system/core/adb/transport.c::readx():readx: fd=100 disconnected system/core/adb/sysdeps_win32.c::adb_close():adb_close: 100(lo-client:5037) system/core/adb/adb_client.c::adb_connect():adb_connect: service host:start-server
-
Olivvv about 11 yearsI tried that, but now I get "unable to start the application because AdbWinApi.dll is missing" (translated to english). I dont know if is important, but during re-installation I get "Stopping ADB server failed (code -1)"
-
Alex P. about 11 yearsyou need to add the folder with AdbWinUsbApi.dll, AdbWinApi.dll and adb.exe to the PATH environment variable
-
Olivvv about 11 yearsI will check if I did it correctly once i am back at work tomorrow. But if i did it wrong, then I think the adb.exe process wouldn't have started when used the command adb start-server. Wouldn't it ?
-
Joe about 11 yearsHmm .. did you ever see
* daemon not running. starting it now on port 5037 *
and* daemon started successfully *
message? -
Joe about 11 yearsYour output seems to indicate that the program was able to connect to that tcp port (meaning that something is running?) but got disconnected after that.
-
Olivvv about 11 yearsYes adb is starting and then crashing without error message. I runned netstat -ano | find ":5037" /c and it outputs 0. So no other application is using that port. I also changed device, using a Samsung Galaxy tab. It is displayed correctly as GT-P7511 in windows device manager. It has "enable usb debugging" in chrome settings and usb debugging once connected in the general settings. So what else should I check ? If the culprit is not the device/driver. Is it then the operating system ? Is adb well tested on win 7 ?
-
Joe about 11 yearsIf possible, maybe ask your admin to login to your computer and see if it works if we try running it with him logged in. If it still does not work, maybe ask him to disable any security software too. Not sure if it will help to ask him to reinstall the SDK while logged in as an admin.
-
Olivvv about 11 yearsSo I did delete that folder. I also did the install in winXP compatibilty mode. I changed in android.bat: for /f %%a in ('%java_exe% -jar C:\adt-bundle-windows-x86_64-20130219\sdk\tools\lib\archquery.jar') do set swt_path=lib\%%a to make sure the path is correct. And after restart, adb is able to start. So happy. Then I runned adb forward tcp:9222 localabstract:chrome_devtools_remote and went to localhost:9222. I am getting a "Error 324 (net::ERR_EMPTY_RESPONSE)" ... (Both the tablet general settings and the tablet chrome have the enable usb setting set...)
-
Ger Soto about 11 yearsAt this point, you should install the specific driver of your driver, and not the windows driver. I'va had to install an specific driver for Samsung Galaxy, HTC, and Acer Drivers, each different driver, and I haven't had for Nexus
-
Olivvv about 11 yearsOk I tried with Samsung galaxy and installed the latest driver. error 324 again. Then I tried with Nexus and same result. I noticed that in the device manager, the nexus appears twice. As mobile device, and as "other device" and is marked there with the yellow exclamation mark signaling an issue.
-
Ger Soto about 11 yearsWith the Galaxy I had to install the "kies" software, appart of driver. I'm sure than for Acer tablets I ned to put the usb connection in "Camera Mode", not in Massive storage, I think that in Samsung it's the same. In Both cases, "Camera mode" and "Massive Storage mode", the computer detects your tablet, but it uses a different driver, so, one of them interacts with ADB and the other don't.
-
Olivvv about 11 yearsI did right click run as admin in the msdos invite shortcut. About the firewall, I will check that. Also I have some kind of antivirus installed, it is nammed forticlient. I will have a look at that monday when I am back at work. thanks.
-
Olivvv about 11 yearsI did run the command as local admin. Yes I will also try with a macBook, I need that anyway to debug on iOS/safari, but it is disappointing if I cant get it to work on pc. As answer to Ger Soto, I'll look at the driver (kies), but still it is strange that it did not work with nexus as well.
-
Ger Soto about 11 yearsplease, first try with the different USB profiles. kies is the samsung's iTunes and it justs slows tour computer without any valuable functionality... but it installs TVE correct driver...
-
Olivvv about 11 yearssmall progress, I see the samsung tablet under 'adb devices', listed as C4F124C1A39363F. Then I run "adb forward tcp:9222 localabstract:chrome_devtools_remote". Having ADB_TRACE=1, it gives me logs, and sasy "OKAY" everywhere, but localhost:9222 is still unreachable.
-
Olivvv about 11 yearskies + installing the sdk under the sysadmin session did it !!! I can connect to the samsung tablet. Nexus does not work yet, but at least I got it running for one device. thanks a lot.
-
Olivvv about 11 yearsThank you very much for your help Ger Soto, I got it running with kies + install under sysadmin session.
-
Olivvv about 11 yearsyes, apparently being local admin was not sufficient, I did the install under the sysadmin session, and added kies, that gave me remote debug access to the samsung tablet.
-
Ger Soto about 11 yearsNexus uses Google Driver ... I tried lot of devices, and Nexus is the best, first, for the native adoption of android, second, because its lack of problems and third, its "first" and "always-update" expectatives
-
Giszmo almost 11 yearsWhile I'm happy your "debug it this way" helped the OP to solve his problem, your ""answer"" is not really an answer and therefore I guess this deserves further investigations as I believe I am having the exact same issue. If you feel inclined to get to the cause of this issue, maybe you could have a look at my question here: stackoverflow.com/questions/17116121/…
-
Olivvv over 10 yearsthanks, but that was 7 months ago. As far as I remember, I solved it by changing device. I can't tell if your answer is right or not, but it may help somebody.
-
Boubacar Traoré almost 2 yearsJust the second one did the trick for me, thanks ;)
adb kill-server
thenadb start-server