2

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.

user2755399
  • 139
  • 2
  • 4
  • 13
  • Have you tried turning USB Debugging on/off on your device? Also, restarting Eclipse/ADT? – Jade Byfield Mar 23 '14 at 03:31
  • Generally when I get the "unknown" showing on the device chooser, I usually turn on the phone(while connected to the computer) and get a prompt that asks me to if I trust this computer. After selecting yes on that I can now use device chooser to run the app on my phone – Parnit Mar 23 '14 at 06:25
  • @Jade, Yes I tried both turning USB debugging on/off and restarting Eclipse. – user2755399 Mar 23 '14 at 15:18
  • @Parnit, I tried restarting the phone while connected to the computer. I didn't receive a message asking if I trust the computer and it didn't fix the problem. – user2755399 Mar 23 '14 at 15:20
  • 1
    If the device chooser shows the device, then eclipse and the adb are working correctly. The first time you try to run a app on the phone from a new computer it will always show device unknown and when you open up your phone you should get a alert message. Another option to try is to change your USB computer connection from MTP to PTP or vice versa. I have noticed some phones work on PTP and others on MTP – Parnit Mar 23 '14 at 16:54
  • I tried switching between MPT and PTP along with closing eclipse between and still no luck. – user2755399 Mar 23 '14 at 18:01
  • I just tried this with my phone. I connected it to my comp and saw the usb debugging icon appear on my phone notification. Then I ran the application, but it did not show me my device in device chooser. So I changed my phone to PTP and let my computer automatically install any needed drivers . Then I ran the application again and like you saw my device in device chooser with "unknown" message for the target. At that same moment on my phone an alert popped up asking me "allow usb debugging". I clicked ok and it worked. They may be repetitive but try those steps and let me know if they work. – Parnit Mar 24 '14 at 05:27
  • I believe my phone initially tries to act as an installer. No matter what I do it initially tries to pull up a window (on my computer) to run some verizon software. Shortly afterwards the usb debugging icon switches to "connected as a media device." But I am worried that something is not completely switching over. – user2755399 Mar 25 '14 at 12:30
  • Hmm. The only other thing I can suggest is that under your developer options, click on "Revoke USB debugging authorization" and try to connect the device again? Is you device chooser showing the same as the image posted by Jaison Brooks in http://stackoverflow.com/questions/15053463/android-4-2-2-usb-debugging-always-allow-from-this-computer-option-result-in-t? – Parnit Mar 25 '14 at 15:21
  • I tried that as well. No, I do not receive the image posted by Jaison. – user2755399 Mar 26 '14 at 13:20
  • Thank you for that link, I was finally able to get it working. Going to post what I found as an answer just in case anyone else is stuck where I was. – user2755399 Mar 27 '14 at 13:30

2 Answers2

2

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)

Community
  • 1
  • 1
user2755399
  • 139
  • 2
  • 4
  • 13