Android Studio - ADB Error - "...device unauthorized. Please check the confirmation dialog on your device."
Asked Answered
T

18

117

So I started getting errors in my ADB logs which, I think, are causing my device to now display any logcat output for my app. I am getting all the logcat output except the one from the app itself.

PropertyFetcher: AdbCommandRejectedException getting properties for device 04799057970ed1fc: device offline
PropertyFetcher: AdbCommandRejectedException getting properties for device 03799467970ed5fg: device unauthorized. Please check the confirmation dialog on your device.
Tranship answered 27/9, 2014 at 22:37 Comment(8)
Try revoking the permissions on the device - Developer options -> Revoke USB debugging authorizations. Then plug the device in and accept it again.Tohubohu
Still the same error with Android Studio 1.1 - accepted solution does not work.Gentilis
Changing the USB port after revoking permissions as explained by @Tohubohu got the Fingerprint Certificate Authorization dialog to be displayed as further explained by @-Eefret in the accepted answer.Duleba
I'm getting this error message on Android 6.0 Marshmallow, but there isn't any "Revoke USB debugging authorizations" option in Developer options.Springhouse
The tablet I'm having the same problem with, simply had not displayed the auth dialog as long as I was trying on any of the USB 3 ports. Now it works perfectly on the same PC's USB 2 port.Bladder
None of the solutions worked for me on my Samsung tablet - I had to go to download Android File Transfer (with my device plugged in USB), and then finally was prompted to allow USB debugging (developer tools were on) and authorize the device. Android Studio immediately recognized the device and build started working correctly. android.com/filetransferTwobit
All the suggestions say to unplug stuff, but I'm having these errors on the emulatorIridis
try change mode to mtp im ok yeaIdaliaidalina
M
228

you have missed the Fingerprint Certificate Authorization dialog in your phone when you connected it, try to change the USB mode to Media, or another different than the one you have in and then reconnect your device, or go to Developer Options -> Revoke USB Debugging and reconnect, watch for the dialog and click on accept, that should solve your problems.

If that doesn't work, set your ANDROID_SDK_HOME again, and then:

  1. Unplug device
  2. Run:

    adb kill-server 
    adb start-server
    
  3. Plug in device

Microgroove answered 28/9, 2014 at 0:29 Comment(6)
Yeah I should have clarified that. I've always been able to connect to this pc and I have clicked the "Accept" button. I also tried changing the types of connection and it did not popup again. I even switched usb ports and that didn't work either..Tranship
Set the: ANDROID_SDK_ROOT to your home path and not 'ANDROID_SDK_HOME'!!!!!!!!!!!!!!!!!!!!!!Niigata
Missing fingerprint authentication in my case... By changing the USB to media and others it gave a pop up for authentication which i selected OK.Umbilication
switching off your hotspot on the device helps as well.Figurant
For me, I left the device unplugged for about 5 minutes leaving the screen unlocked, then made sure my device screen was unlocked when I plugged the USB cable into the device, and it prompted me. The initial failure was because I plugged the USB cable into the device when the screen was locked and I missed the trust prompt.Tiphani
The only way that I could bring up the fingerprint certificate authorization was to run flutter doctor -vRiviera
M
33

I experienced the same issue.

To ensure that your Android Device is expecting the correct fingerprint from the system (e.g. after switching Android SDK installations -> different adb server running!), do the following (actually, this did the magic for me):

  • unplug your Android Device
  • revoke USB debugging authorizations in Android Developer Options
  • plug your Device. You can accept the fingerprint once more.
Marhtamari answered 3/5, 2015 at 12:22 Comment(0)
H
10

1) Go to Phone Setting > Developer options > Revoke USB debugging.

2) Turn off USB debugging and Restart Again.

It will work definitely, in my case it worked.

Housemaster answered 4/5, 2017 at 10:33 Comment(0)
M
9

Please check this. https://code.google.com/p/android/issues/detail?id=82850

I faced the same issue. Could notice that the "adb integration" was disabled. Please enable it at your IDE (Tools | Android)

Monseigneur answered 21/1, 2015 at 1:17 Comment(1)
Worked for me Android Studio on Ubuntu 14.04Kucera
A
3

The solution to this was just to change the USB cable, having enabled ADB Integration via

Tools > Android > Enable ADB Integration.

Amelita answered 12/6, 2015 at 14:3 Comment(0)
M
3

This happened to me because I enabled usb debug previously on another pc. So to mke it work on a second pc I had to disable usb debugging and re-enable it while connected to the second pc and it worked.

Maynard answered 12/3, 2016 at 20:0 Comment(0)
P
2

Below are the commands for Ubuntu user to authorise devices once developer option is ON.

sudo ~/Android/Sdk/platform-tools/adb kill-server

sudo ~/Android/Sdk/platform-tools/adb start-server

On Device:

  • Developer option activated
  • USB debugging checked

Connect your device now and you must only accept request, on your phone.

Paramatta answered 25/4, 2019 at 10:8 Comment(0)
S
1

In my case, it was literally a bad USB cable. Apparently it was right on the edge - adb logcat would work, but about half the time I would get this error when trying to push an app to the device.

Changed to a different cable, and everything was fine. The old cable was also very slow at charging, so I should have suspected it sooner...

Surprint answered 23/5, 2015 at 23:44 Comment(1)
I had to use an other USB port with the same cable.Bladder
C
1

Remove the Debug permissions on the Device, with the cell phone connected, then put them back, and ask if you want to allow the PC to have debug, accept and ready permissions: D

Camail answered 13/1, 2017 at 18:29 Comment(0)
B
0

I had the same problem when debugging over wlan. I could launch the application from Android Studio but couldn't get any messages in logcat.

I fixed it by connecting the device to my pc via USB cable, launched the application once and everything was working. Then I disconnected the USB cable and tried debugging again via wlan and everything was working again.

Bohs answered 10/12, 2014 at 10:59 Comment(0)
D
0

I've got the same message too. In my case, I have changed my dev environment to another notebook pc and my device is samsung galaxy note 2014 edition. My OS is windows 7

My galaxy note condition listed as following

  • developer option activated
  • USB debugging checked

The error message was "device unauthorized. Please check the..."

In general, the location of the default android setting was C:/Users/Your_login_name/.android then I copied and pasted all files in the '.android' folder to my new pc's setting folder.

After that the problem was gone.

I think the problem was adbkey file mismatched. Also, I didn't have any menu name such as revoke adb authorization.

Discern answered 11/9, 2015 at 3:1 Comment(0)
C
0

Seems strange the intricate cable&restart solution steps ... The first time I've plugged the Android device to my Ubuntu (15.10) I've got Connect as: multimedia or camera options and in my Android Studio the device status was unauthorized. It wasn't until I choose between one of the options that I got in the Android device the PC authorization option. When you give the proper permissions in Android then the device status changed to online in Android Studio. Cheers

Criminal answered 23/11, 2015 at 3:53 Comment(0)
F
0

This might help - Just Download and install the Android SDK version(same as your mobile's android version), then run.

Fatalism answered 24/3, 2017 at 15:5 Comment(0)
T
0

In my case the problem was about permissions. I use Ubuntu 19.04 When running Android Studio in root user it would prompt my phone about permission requirements. But with normal user it won't do this.

So the problem was about adb not having enough permission. I made my user owner of Android folder on home directory.

sudo chown -R orkhan ~/Android

Taveda answered 15/6, 2019 at 15:15 Comment(0)
P
0
  1. Download platform-tools-latest-linux.zip.
  2. Run:

    unzip platfo*.zip
    cd plat*
    ./adb devices / ./adb usb / etc
    
Pyroconductivity answered 18/6, 2019 at 13:37 Comment(0)
P
0

I get this error very often for some reason when doing "ionic cordova run android" and running on an emulator. What works for me is to end the "adb.exe" process and re-run. Sometimes that also doesn't work and what I do is exit the emulator and in android studio do a "Cold Boot" on the emulator.

Pesce answered 29/8, 2019 at 17:31 Comment(0)
B
0

in Linux i had to delete the content of .android folder which holds the adbkey and ofcourse enable USB Debugging.

Buxton answered 21/3, 2021 at 9:8 Comment(0)
P
0

I had the same issue despite:

  • developer options enabled
  • USB debugging enabled

Solved by simply unplugging and then replugging the USB.

Pirate answered 13/7, 2022 at 14:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.