Error message in the terminal when I type in the terminal ‘adb devices’:
unauthorized
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.
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.
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)
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 adbkey.pub
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.
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.