Adb Error on "adb devices" - android

When I type in "adb devices", the output is "error: protocol fault (no status)". The adb functionality is broken in both Android Studio and Eclipse, so it's a problem with the connection, I believe. I tried to kill adb.exe from the Task Manager, but it's not listed in the processes. Any tips?

Try to open the this directory :
adt-bundle-windows-x86_64-20130917\sdk\platform-tools
Hold shift + right mouse click. Select open command prompt here.
After that,
in the command window type
adb kill-server
and then
adb start-server
then,
adb devices
See if the adb is started and if your device is visible on eclipse or android
studio.

My problem was my parental controls software. The adb.exe works fine with it disabled.

Same problem i faced in past, the solution worked for me is:
Navigate to the plateform-tools(it is under SDK) and execute following commands on cmd.
C:\Android\android-sdk\platform-tools>set ADB_TRACE=1
C:\Android\android-sdk\platform-tools>adb start-server
I hope it will help you

Change your USB cable then it will resolve the issue.

Related

How to restart ADB manually from Android Studio

I previously developped Android apps on Android Studio . Everything works fine.
I work on real device, and Android Studio recognize it without issue.
Suddenly when I exit android studio and disconnect and reconnect my device, it doesn't recognize my device anymore, I have to exit and restart Android Studio.
I can't find a way to "Reset adb" like Android Studio.
I follow the below instruction(Tools->Android->Enable ADB Integration) and enabled ADB,but still below error occurred.
Error:-
I using windows system.
Any help great appreciation.
Open Command prompt and go to
android sdk>platform-tools>
adb kill-server
press enter
and again
adb start-server
press enter
open command prompt -> cd to your sdk\platform-tools
type below command:
adb kill-server && adb start-server
open cmd and type the following command
netstat -aon|findstr 5037
and press enter.
you will get a reply like this :
TCP 127.0.0.1:5037 0.0.0.0:0 LISTENING 3372
TCP 127.0.0.1:5037 127.0.0.1:50126 TIME_WAIT 0
TCP 127.0.0.1:5037 127.0.0.1:50127 TIME_WAIT 0
TCP 127.0.0.1:50127 127.0.0.1:5037 TIME_WAIT 0
this shows the pid which is occupying the adb. in this 3372 is the value. it will not be same for anyone. so you need to do this every time you face this problem.
now type this :
taskkill /pid 3372(the pid you get in the previous step) /f
Voila! now adb runs perfectly.
Open a Task Manager by pressing CTRL+ALT+DELETE, or right click at the bottom of the start menu and select Start Task Manager. see how to launch the task manager here
Click on Processes or depending on OS, Details. Judging by your screenshot it's Processes.
Look for adb.exe from that list, click on END PROCESS
Click on the restart button in that window above. That should do it.
Basically by suddenly removing your device ADB got confused and won't respond while waiting for a device, and Android Studio doesn't want multiple instances of an ADB server running, so you'll have to kill the previous server manually and restart the whole process.
Most of the answer is for restarting adb server in the command line.
Jiří's answer is the correct answer for this question (to restart adb server IN ANDROID STUDIO), though it's been redesign as shown below.
go to Tools > Troubleshoot Device Connections
ps. you need to hit "Next" two times to find this Restart ADB server button.
Android Device Monitor was deprecated in Android Studio 3.1 and removed from Android Studio 3.2.
I do not find a perfect way in Android Studio, get the process id and kill it from terminal:
ps -e | grep adb
kill -9 pid_adb
Open task manager and kill adb.exe, now adb will start normally
I faced same issue just fallowed some min steps in Android studio:
Manually fallowing steps in android studio
Goto Command promt and in Command promt fallow a android SDK file path "android sdk>platform-tools>" adb kill-server press enter
adb start-server press enter
-------------------------------------------------OR-----------------------------------------------------------------------
Open Command promt and got android sdk file path
adb kill-server && adb start-server
If you are in Android Studio Open Terminal
adb kill-server
press enter
and again
adb start-server
press enter
Otherwise
Open Command prompt and got android
sdk>platform-tools> adb kill-server
press enter
and again
adb start-server
press enter
AndroidStudio:
Go to: Tools -> Android -> Android Device Monitor
see the Device tab, under many icons, last one is drop-down arrow.
Open it.
At the bottom: RESET ADB.
After reinstalling Android Studio, Is working without adb kill-server
Make sure you have "USB debugging" turns on.
I never had this issue with my other devices before. However, today I worked on a device and encountered this issue. Actually took me a while to debug it. Always thought "USB debugging" is on automatically when turning on the "Developer Options". But turns out its device dependent.
Restart adb
Android Studio uses Android Debug Bridge (adb) inside
adb kill-server
adb start-server
e.g.
alex#yoAlex5$ adb kill-server
alex#yoAlex5$ adb start-server
* daemon not running; starting now at tcp:5037
* daemon started successfully
A possible solution to your problem could be the following:
Go to ~.android\avd{your_device}.avd
Delete all files with .lock extention
I'm facing this problem since i have installed another adb server for another software.
So if you are a linux user simply open terminal and type:
killall adb
When I had this problem, I wrote adb kill-server and adb restart-server in terminal, but the problem appeared again the next day. Then I updated GPU debugging tools in the Android SDK manager and restarted the computer, which worked for me.

The connection to adb is down, and a severe error has occured while running Android Project

[2014-04-02 12:30:28 - EsrtDummyproject1] The connection to adb is down, and a severe error has occured.
[2014-04-02 12:30:28 - EsrtDummyproject1] You must restart adb and Eclipse.
[2014-04-02 12:30:28 - EsrtDummyproject1] Please ensure that adb is correctly located at 'C:\Tulika\SOFTWARES\adt-bundle-windows-x86-20130522\sdk\platform-tools\adb.
I tried all the ways to solve it.
I have killed the adb.exe process from Task manager.
Restarted eclipse.
But still facing with the same issue.
Can anyone help resolving it ?
Try below steps:
Close the Eclipse if running
Go to the Android SDK platform-tools directory in Command Prompt
type adb kill-server
then type adb start-server
No error message is thrown while starting ADB server, then adb is started successfully.
Now you can start Eclipse again.
it worked for me this way, Eclipse should be closed before issuing these commands.
Restart your phone as well!
It happens sometimes if you use more than one instances of eclipse
To repair logging do:
1. Unplug the device
2. Close all Eclipse windows
3. Restart adb in command line: adb kill-server and than adb start-server
4. Run again Eclipse and connect device
Sometimes this also helps, Go to Eclipse Window > Perspective > DDMS and than from Device sub-window choose Reset adb

Eclipse detecting the same device multiple times

I am facing a strange problem. The eclipse is deteting the same device multiple times and thus is unable to run the project showing error as :
Failed to install MetRoute.apk on device 'EC21BF384504FC4E': adb rejected install command with: more than one device
com.android.ddmlib.AdbCommandRejectedException: more than one device
Launch canceled!
See This image:
I tried to take help of this question but no help after following the process. Does anyone have any other solution.?
update : It is not needed to restart/close Eclipse
As told in comments by Ved Praksh, the solution is:
Exit Eclipse
End all adb processes from task manager as well.. Then:
In cmd, adb kill-server --> adb start-server --> adb devices
Then restart eclipse.
Most probably it will show only one device this time.
In windows start task manager >>> Processes Tab >>> Right click adb.exe*32 >>> End Process and Press End Process on the dialog box.
Try
./adb kill-server
./adb start-server
./adb devices (This should show your device exactly once)
and it should work.
And also restart Eclipse after this.
Reset adb in eclipse,If the problem persists it may be caused due to some hardware related issues with the usb port or your cable.
try using another cable/port/device and check whether the issue is solved.

ADB not responding. You can wait more, or kill "adb.exe" ... windows 8

When I try to test my Android application with an android emulator as always I now suddenly get an error message. I'm working with Windows 8. So far I tried the following things which unfortunately could not solve the problem:
reinstalling eclipse with android adt
reinstalling java
installing "android studios" first solved the problem but after one day mysteriously also here adb, stopped working with the error message given in the title " ADB not responding ...
furthermore I unsuccessfully tried out some advice from Mr. Google:
Stopping adb.exe via task-manager and restarting eclipse / android studios
"adb kill-server" then "start-server" via command prompt
setting the path to adb.exe as an environment variable
switching off any antivirus or firewall
starting the IDEs as an administrator
updating the IDEs
The only thing I can remember doing which may have destroyed adb on my computer for all times: I connected my motorola smartphone to my laptop and installed the motorola usb drivers but as I said the adb also won't work with the emulator.
Any help would be kindly appreciated. The issue bothers me for more than an entire day now. Maybe someone had similar problems on Windows 8 ?
On OSX helped:
Close Android Studio
Kill all processess using 5037 port
sudo lsof -i |grep 5037
sudo kill PID_NUMBER
Run adb devices from console
adb devices
Meanwhile the emulator is working again. I cannot definetly say what solved the problem. What It could be a combination of two things:
Deleting the hidden ".android" folder under C:\Users...
(Probably there was some malfunctioning automatically created code)
Deleting and recreating the Path variable to the folder with adb.exe ( ...\sdk\platform-tools\;)
Finally it could be a Windows 8 issue which I don't understand.
Try this,
Open a command prompt with administration permission and type
netsh interface tcp set global autotuninglevel=disabled
This worked for me
Edit: Windows only
Kill the adb.exe with a command prompt. Open a command prompt were your adb.exe is located and type
adb kill-server
Maybe HTTP Proxy blocked the localhost 127.0.0.1:5037
If you have config the HTTP Proxy, make sure to exclude the localhost like picture below
Also, port can also be blocked by the firewall and anti-virus firewall, please notice as well.
Try this,
at the prompt try adb kill-server
Start one of your AVDs
at the prompt try adb root
The prompt should say adbd is already running as root.
That should fix it.
In case it helps anyone else, for me the problem was related with the USB hub that the tablet was plugged into on the computer (unplugging the webcam which was in use fixed it).
I got the same error. Don't worry. I have an solution. Go to Task Manager. Kill the process called adb.exe. You will find 2 or 3 processes. Kill all of them. You are done. It will work.
I have the same problems. Verify port 5037 is free and ports 5555 to 5585 are available and never used by another process.
"ADB server sets up connections to all running emulator/device instances. It locates emulator/device instances by scanning odd-numbered ports in the range 5555 to 5585"
FROM: http://developer.android.com/tools/help/adb.html
To find out which process is listening on a port on Windows yo can use:
C:> netstat -an -o
FROM: How can you find out which process is listening on a port on Windows?
I had the same problem, here is my simple fix:
-Go to task manager in windows, look for adb.exe, and kill it
-Go to command prompt, and tap adb devices ==> it will automaticaly start adb daemon
I finally just restarted the computer, and that solved the issue for me.
Uninstall HTC Sync. Or disable it somehow.
Try to open adb from command prompt from directory location as <sdk>\platform-tools,
If adb file is missing try to re-install Android SDK with latest version,
And try to run again..
I think issues will solved, by this procedure.
I saw this on a Mac OS X.
I shut down Android Studio and ran adb get-state in the terminal. When I started Android Studio back up, the warning had gone away.
BTW, I did just try restarting Android Studio without any luck. I am sure a restart of OS would have fixed it too.
The same thing with the Asus Sync utility (with the both our Transformer's 700 and 701).
I think there is a USB-port conflict between ABD driver and Sync utility.
Exit from Sync utility resolve the problem.
Looks like this could be caused by a bunch of different issues. This just happened to me because I had my android phone device plugged in for USB debugging, then after a few hours (and multiple android studio/phpstorm restarts) I had to do unplug the device manually. Things started working again after unplugging.
I have faced this problem few days ago. When I opened my task manager it showing me two adb runnig. It may be because of I am using mobogenie for connecting my android phone for debugging application. This problem is because of moboginie and adt port conflict. then I have followed following procedure to sort out this issue.
!) close eclipse
2) Go to task manager and kill all adb processes.
3) Now go to platform-tools in android sdk
4)press shift+right click mouse and select "open command window here" option
5) type
adb kill-server
adb start-server
6)if server sucessfully started then start eclipse and then connect your phone
(Remember dont connect your phone before starting eclipse)
Following works for me every time:
go to File->Invalidate Caches/Restart
select Invalidate and Restart
And, You are good to go.

Eclipse has multiple copies of same Android Device

I've been programming for Android devices for some time now and just recently came across this:
There is a single one in the list online, but I can't run/debug my programs because it reports "ADB rejected install command with: device offline" since every other device has the same ID.
A reset fixes this, but is there any other options? Why is this happening?
Exit eclipse, kill adb and restart eclipse
I find that the issue is often with a bad cable or connection. Try and insert it into another USB slot or try with a different cable, worked for me.
I had to remind myself how to call the commands, so I thought I'd write an answer for other people that don't remember how.
Find the location of adb.exe.
Open up command prompt.
In command line, change the directory to the directory from step 1.
For me, the command and directory is: cd C:\ADT\sdk\platform-tools
Run: adb kill-server from the command prompt
Run: adb start-server from the command prompt
Credits to Squeazer for the commands.

Categories

Resources