Adb usb Missing RSA Security authorization dialog popup

Error message in the terminal when I type in the terminal ‘adb devices’:
The popup message to authorize the usb connection does not appear on my phone.

I use Ubuntu Linux on my pc.
I tried different usb cables.
I switched between the different usb modes (MTP, PTP)
USB Debugging is active on my phone.
I tried with another pc (that has Linux Mint installed): the popup authorization does show up on my phone.

My first investigations:
I see something interesting here:
I tried this:
cedric@cedric-Fujitsu:~$ ls ~/.android/
ls: cannot open directory ‘/home/cedric/.android/’: Permission denied

Looks like a problem with the setup on the Ubuntu PC. You can try either running adb as root, or changing ownership (probably) or permissions (less likely) of /home/cedric/.android (something like sudo chown -R cedric /home/cedric/.android). If you want to reset entirely, you can delete the android settings folder as root (Obligatory warning: carefull! as root you can delete your entire system) using sudo rm -r /home/cedric/.android.

1 Like

I’ll try it tonight. thanks.
What could have caused an ownership problem?
(I had installed adb with the following command line: $ sudo apt-get install android-tools-adb)

By the way, on my other computer with Linux Mint I have installed adb the same way. However I get this instead:
$ ls ~/.android/

What would be the root cause of my problem?

There may be a hint if you compare the output of ll ~/.android/. Check the ownership and permissions.

in Ubuntu pc:
cedric@cedric-Fujitsu:~$ ll ~/.android/
ls: cannot open directory ‘/home/cedric/.android/’: Permission denied

in Linux Mint pc:
cedric@cedric-vaio:~$ ll ~/.android/
ll: command not found
cedric@cedric-vaio:~$ ls-l ~/.android/
ls-l: command not found

Here we go:
cedric@cedric-vaio:~$ ls -l ~/.android/
total 8
-rw------- 1 cedric cedric 1704 Dec 2 13:36 adbkey
-rw-r–r-- 1 cedric cedric 719 Dec 2 13:36

You could try syudo on the permission denied one:
cedric@cedric-Fujitsu:~$ sudo ll ~/.android/

cedric@cedric-Fujitsu:~$ sudo ll ~/.android/
[sudo] password for cedric:
sudo: ll: command not found

does ls -l work with sudo?
Also, in some cases when using sudo you’ll need the full path - i.e /home/cedric/.android

cedric@cedric-Fujitsu:~$ sudo ls -l ~/.android/
total 8
-rw------- 1 root root 1704 Dez 1 21:36 adbkey
-rw-r–r-- 1 root root 720 Dez 1 21:36

Yep, looks like on the ubuntu machine the files were created when running as root. Unless I’m very much mistaken, those files are created by adb when adb is first run. They cannot be part of the package that is installed using apt-get, as the keys should be unique per system and per user. Hence my guess that the first time adb was started, it was started via sudo.
Using sudo, ~/ expands to home directory of the user that is calling sudo, but any files created are owned by root. You can verify this by, for example doing: sudo touch ~/filecreatedviasudo and then ls -l ~/filecreatedviasudo without sudo. It will show that the file is in your home directory, but is owned by root.
The permissions look identical, so fixing it should only require changing ownership from root to cedric (or removing the folder, and then starting adb as cedric to make it generate the required files again), as suggested a couple posts back.


cedric@cedric-Fujitsu:~$ sudo touch ~/filecreatedviasudo
cedric@cedric-Fujitsu:~$ ls -l ~/filecreatedviasudo
-rw-r–r-- 1 root root 0 Dez 6 21:19 /home/cedric/filecreatedviasudo

I changed ownership from root to cedric, as you explained, and got the popup message on my phone that I was so much looking for!
Thanks a lot! and I understood, despite knowing little about coding.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.