Android 4.2.2 USB debugging "Always allow from this computer" option result in target unknown for device?
Asked Answered
I

8

19

I am having problem connecting my 4.2.2 android device with PC after I select "Always allow from this computer".

I have selected "Always allow from this computer" in 4.2.2 USB debugging and it works fine the first time but when I tried other time my devices always appear offline. I have tried with another device that is also 4.2.2 and the USB debugging popup and when I click ok (without selecting "Always allow from this computer") with device list became online.

I have tried the following method and it didn't work

  • adb kill-server/ adb start-server/ and adb devices
  • install new eclipse, android SDK, and ADT
  • Plug and unplug my device thousand times
  • try repeating steps from this link

Are there anyway to get rid of "Always allow from this computer" once I selected?

Internment answered 24/2, 2013 at 15:50 Comment(3)
Any luck? Have the same issue.Interplead
5 months ago. Did you find anything or did you just change the device?Biffin
Years ago, I know... Were you able to solve the problem after all? I have the same issue with a Galaxy S6 running android 6.0.1 on both Mac and Win. None of the suggestions below helped me. Since I cannot see the device on the device tree of the USB controller, I guess that the device is messed up.Metro
M
14

As described in this issue, this can happen if you run adb for the first time as root. It creates a key file on your computer owned by the root user, so your normal user account can't read or overwrite it.

To check if this is the case:

$ ls -l ~/.android/adbkey
-rw------- 1 root root 1708 Nov 13  2012 .android/adbkey
             ^ notice root here

To fix it:

$ sudo chown $USER: ~/.android/adbkey
$ ls -l ~/.android/adbkey
$ -rw------- 1 thomas thomas 1708 Nov 13  2012 /home/thomas/.android/adbkey
               ^ now shows your username and primary group

Finally, restart the adb server:

$ adb kill-server
$ adb start-server
Maroc answered 10/5, 2015 at 18:56 Comment(2)
I ran into a similar problem. adbkey and adbkey.pub were owned by my user, but were zero byte files. Deleting these files and restarting adb server caused these files to be recreated correctly, and I'm no longer prompted repeatedly to allow access.Slosh
That did it! Followed by the adb restart. $ adb kill-server $ adb start-serverKaki
I
7

Revoke USB Debugging authorization from Settings in Android device and restart adb server on PC. The dialog will appear again while connecting to PC.

for restarting ADB server

$ adb kill-server

$ adb start-server

Impotent answered 25/6, 2014 at 20:11 Comment(0)
T
5
  1. In your device: Go to settings
  2. Select developer options
  3. Tap Revoke USB debugging authorization
  4. Press Ok
Tallboy answered 12/8, 2016 at 20:54 Comment(0)
K
3

When i connected my Galaxy S3 running a 4.2.2 AOSP build, im presented with the pop up to allow debugging with the computer on my device.

enter image description here

enter image description here

On Eclipse - you see the following until you click "OK" on your device to allow USB debugging with the machine. It should change to the Target Android OS after you Press OK.

In your case - Your device seems to keep going offline after the first time you press the debugging dialog.

  • Try another 4.2 Android device
  • Do you have a custom ROM on your device?
  • Is your ROM AOSP?
Kassi answered 25/4, 2013 at 21:24 Comment(0)
D
1

I've had nothing but problems with this since upgrading to 4.2.2 (Google Nexus 10).

In device chooser I keep getting 'Unknown' as the target.

The only thing that works for me is to:

  • Disconnect the device from the PC/Laptop
  • Close Eclipse.
  • Go into settings on your device and disable USB Debugging
  • Re-enable USB debugging
  • Re-Connect device to PC/Laptop
  • Wait until windows detects the device and display the autoplay window.
  • Close this window
  • Re-open Eclipse

It's a bit of a pain, but it works for me!

Distrait answered 24/2, 2013 at 17:9 Comment(3)
I have done steps you suggest for over 5 hours and no luck while my other device became online half of the time.Internment
Very strange. I'm hoping the next update will solve this problem.Distrait
In my case it was because I haven't updated eclipse for like forever. After updating android sdk (asd following @zippy's instructions), the issue seems to have disappearedBiffin
H
0

Its quite commonplace for devices to go offline... when that happens I just un-plug and plug the device no restarts nothing!

Hodgkins answered 24/2, 2013 at 17:57 Comment(1)
Unfortunately, since I updated my tablet to 4.2.2, that no longer works for me. I have to go through all the steps in my answer to get it back online!!Distrait
C
0

I had the same problem and realized I'm better off just using the emulator. To use an emulator, click on the "Windows" tab in eclipse, and select "Android Virtual Device Manager". From there create a new emulator and click "Start" on the right hand side. After that, you can select the size, and press "Launch". It takes about 2-3 minutes to start off, but it works perfectly and is very convenient!

Good luck pal! :)

Chloride answered 8/8, 2013 at 5:57 Comment(0)
C
0

This was pulled from a comment in the 3rd answer.

After verifying ownership of $HOME/.android/adbkey and adbkey.pub to be appropriate user double check they're actually non-zero filesize ( ls -al $HOME/.android ).

Same thing happened to me as the original comment. Just delete those two files and restart adb ( adb kill-server ; adb start-server ) and you should be right as rain. Well it worked for me atleast.

Ctn answered 25/10, 2016 at 21:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.