This question already has answers here:
Error "The connection to adb is down, and a severe error has occurred."
(39 answers)
Closed 7 years ago.
The connection to adb is down, and a severe error has occurred.
You must restart adb and Eclipse.
Please ensure that adb is correctly located at '/home/ASDK/platform-tools/adb' and can be executed
WHAT SHOULD I DO?
this question was raised by me and here I am explaining my experience.
Actually this question was raised when one of my friend was trying to setup android on his laptop but his micromax mobile could not be detected for debugging. he is just a teen eager. I suggested above answer and some other solutions to him one of which is installing mobomarket mobile synchronization software (used for micromax mobiles- a company whose adb driver can not be installed automatically).
He install that s/w but facing this error every now and then. one thing he observed that this s/w installed req adb driver for micromax mobile. but port no 8700 on which adb process used to run was occupied by this new s/w.
so he made very good assumption that if he uninstalled the s/w driver will not be uninstalled. and trick works. good thing is that he completed his whole android app without facing this error.
hope this trick will help you all.
Related
I know this question has been asked many times - I've read them all and followed most of the suggestions.
I have a new computer, windows 10, so a clean install of AS 3.5.3 . All fine, except trying to get adb to work. I get 'Unable to locate ADB' when after finding no devices I try to restart ADB.
There's also a series of error messages in the event log:
18:16 Adb connection Error:An existing connection was forcibly closed by the remote host
18:16 Unable to open connection to: localhost/127.0.0.1:5037, due to: java.net.ConnectException: Connection refused: connect
18:16 Connection attempts: 1
18:16 * daemon not running; starting now at tcp:5037
18:16 * daemon started successfully
adb.exe is visible in the right place in platform-tools. But I've tried deleting and reinstalling platform-tools. Reinstalling AS, and not using old setup configurations. I've run AS as an administrator, checked file properties in platform-tools, rebooted the computer, I don't have antivirus except windows defender, and I've run that over the platform-tools folder and it didn't object to that... so I've run out of ideas! The setup looks just the same as in my old computer, and everything works on my old computer (but slowly!).
Any other suggestions? Are those error messages significant.
Thanks.
I should have said I was trying to connect adb using wifi. I installed and android wifi adb plugin (File, Settings, Plugins) and now it's working.
I have 2 other machines with AS on them, and adb over wifi works fine and I never had to do this before.
Edit: I have been asked not to use this post as an answer. It's true, my experience doesn't offer a useful solution to anyone (can't be sure that installing the adb plugin actually helped) but adb is working now, so I don't need anyone bothering themselves trying to figure out a problem that no longer exists. In that sense, it's an answer.
Android Studio on my OS X Yosemite very often stops displaying log messages written by my app under development.
If I go to the ADB logs tab I see a plenty of different error messages:
1) Broken pipe:
ddmlib: Broken pipe
java.io.IOException: Broken pipe
2) null
ddms: null
java.lang.NullPointerException
at com.android.ddmlib.Client.read(Client.java:731)
at com.android.ddmlib.MonitorThread.processClientActivity(MonitorThread.java:311)
at com.android.ddmlib.MonitorThread.run(MonitorThread.java:263)
3) Closed connections
DeviceMonitor: Adb rejected connection to client '5022': closed
4) Unauthorized device
PropertyFetcher: AdbCommandRejectedException getting properties for device HT4C9JT00135: device unauthorized. Please check the confirmation dialog on your device.
5) EOF
DeviceMonitor: Adb connection Error:EOF
It would be funny if this wasn't the development environment for Android.
I was able to solve only error number 4 (I had to forget associated devices and authorize again).
I tried combos of answers found here on SO (for example adb kill/start-server), enabling the ADB integration (which was disabled), ....
Besides planning a trip to Lourdes, what else can I check to see why Android Studio refuses to log my messages? It used to work till some days ago: problems started after the upgrade to 1.1.
Update
I uninstalled and reinstalled Android Studio.
The first time I ran my app adb worked fine: I could see the log messages. From the second run, adb started refusing connections again (problem 3).
Is there anyone who was able to solve this incredible mess?
2nd Update
When there are no log messages, if I unplug and plug again the USB cable, the messages magically appears.
I am trying to upload a basic program from eclipse to my phone but I have been having difficulties. When I attempt to upload the program, the device chooser says that the target is "unknown." I tried resetting the adb in the DDMS and receive the following error,
"Adb connection Error:An existing connection was forcibly closed by the remote host"
I have searched other posts and tried resetting the adb by clicking on the error in the device view. I also tried killing and re-starting the adb manually in the control prompt. I also tried updating the driver software in the device manager. I also tried downloading the google usb driver from the android developer page (http://developer.android.com/sdk/win-usb.html#top). Nothing has helped.
Any additional help to fix this problem would be appreciated.
I needed to update my adb version to 1.0.31 as indicated in the note in the link below.
http://developer.android.com/tools/device.html#setting-up
However, I then ran into a problem with the Android API 19 SDK platform not upgrading. Apparently this is a known issue and the next link gave suggestions to over come this.
Android SDK Manager doesn't load the latest Android SDK Platform (API 17)
Make sure to connect with Camera (PTP)
http://www.techotopia.com/index.php/Testing_Android_Applications_on_a_Physical_Android_Device_with_ADB
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Eclipse Error: “Failed to connect to remote VM”
I am using Eclipse to dip my toe into Android development. All going well but recently, I am not able to use debug anymore. When I click 'Debug As' - 'Android Application', app builds ok, installs ok but Android device (either actual device or emulator, it makes no difference) waits with 'Waiting For Debugger' with a single 'Force Close' button. In the console, I get something like:-
[2011-08-26 11:59:59 - Sunrise] Starting activity
com.sr.sunrise.Sunrise on device 3833CB14F52C00EC [2011-08-26 11:59:59
- Sunrise] ActivityManager: Starting: Intent {
act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER]
cmp=com.sr.sunrise/.Sunrise } [2011-08-26 12:00:00 - Sunrise]
Attempting to connect debugger to 'com.sr.sunrise' on port 8614
[2011-08-26 12:00:00 - Sunrise] Launch error: Failed to connect to
remote VM
I have followed many searches (including this one
StackOverflow.com link
and this
StackOverflow.com link2
and I have tried many suggestions but nothing has fixed this problem yet.
Can anyone help me as this is now stopping me from creating my masterpiece ;-)
This just worked for me:
Close Eclipse.
Remove USB.
Go to task manager, and delete all 'eclipse.exe' (in my case I had 4-5 instances).
Also delete 'adb.exe'.
Restart Eclipse.
Reconnect USB.
Maybe this will work for others who have the same problem.
THIS IS PRETTY MUCH THE NUCLEAR OPTION...
I had the same problem on my macbookpro, I don't know exactly how to fix it data loss, but on my system, I "rm -r ~/.android", recreated my devices, and I can again debug.
It is important to note that this is destructive in that the .android directory is where the android emulator is saving the state of the devices I am emulating.
I think the root cause of the problem had something to do with an old android SDK that I removed from my system when I downloaded the android-sdk_r15-macosx.zip leaving some cruft around in the .android directory.
I'm trying to work through their notepad tutorial and it describes how the Eclipse project should automagically build and re-generate the auto-generated code when a file is saved. That wasn't happening, and looking at their debugging, they suggest the "reset adb" link in the DDMS perspective in the Devices panel. When I try to do that, I get the following output which I assume is bad:
[2010-01-03 23:09:51 - DeviceMonitor]Adb connection Error:EOF
[2010-01-03 23:09:51 - DeviceMonitor]Connection attempts: 1
a quick Google didn't reveal anything particular useful. What are the next debugging steps and/or what might be the issue?
UPDATE: So this actually isn't a problem like I thought it was, but I'd still be curious what this message means if anyone knows.
DDMS uses a long-lived connection to the adb server running locally to get info about connected devices/emulators etc. The error message you posted generally just means that the connection to adb has been lost.
Because you ran the reset command, you essentially just killed and restarted an adb process, so Eclipse showed that harmless warning for a moment.
You can see this yourself by killing the adb process manually. Eclipse will show Connection attempts: n for about 10 attempts before giving up.