Confused about adb and android-tools-adb packages

Asked by Allan W. Macdonald

adb and android-tools-adb packages both exist but if I try to install both, apt complains of unmet dependencies and that adb breaks android-tools-adb. Another version of adb exists in the Android SDK Platform Tools location. Which one should I use?

Ubuntu 16.04 LTS


I am new to Android app development.

I installed Android studio with Android SDK Platform-Tools but I was unable to invoke adb from the terminal in my home directory. I was following the instructions here:

Ubuntu suggested installing the packages adb or android-tools-adb. I tried installing both together and got the error. I then installed android-tools-adb but the version is quite old (1.0.32) according to this web site:

I did not try the additional instructions on that web site yet but I did get a hint from it and tried the following command:

$ ~/Android/Sdk/platform-tools/adb version
Android Debug Bridge version 1.0.39
Version 0.0.1-4500957

That looks better but I am confused. Should I update my path variable? Should I follow bernaerts' instructions? Should I merely copy the new adb to /usr/bin? Something else? What if I run apt-get upgrade again?

Many thanks in advance.

Question information

English Edit question
Ubuntu android-tools Edit question
No assignee Edit question
Solved by:
Allan W. Macdonald
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :

For diagnostic purposes please provide the output of the commands

uname -a
lsb_release -crid
/usr/bin/adb version
apt-cache policy adb android-tools-adb

Revision history for this message
Allan W. Macdonald (allan-w-macdonald) said :

~$ uname -a
Linux Dell-Ubuntu 4.4.0-116-generic #140-Ubuntu SMP Mon Feb 12 21:23:04 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
~$ lsb_release -crid
Distributor ID: Ubuntu
Description: Ubuntu 16.04.4 LTS
Release: 16.04
Codename: xenial
~$ /usr/bin/adb version
Android Debug Bridge version 1.0.32
~$ apt-cache policy adb android-tools-adb
  Installed: (none)
  Candidate: 1:6.0.1+r16-3
  Version table:
     1:6.0.1+r16-3 500
        500 xenial/universe amd64 Packages
  Installed: 5.1.1r36+git20160322-0ubuntu3
  Candidate: 5.1.1r36+git20160322-0ubuntu3
  Version table:
 *** 5.1.1r36+git20160322-0ubuntu3 500
        500 xenial/universe amd64 Packages
        100 /var/lib/dpkg/status

Revision history for this message
Manfred Hampl (m-hampl) said :

Yes, you cannot install the adb and android-tools-adb packages at the same time, but as far as I know both of them provide adb version 1.0.32. So it does not help to remove android-tools-adb in favour of adb.

If you want a higher version (like 1.0.39), then you probably have to use software from a foreign source. We cannot help with that, please look at the instructions that you get there.

Revision history for this message
Allan W. Macdonald (allan-w-macdonald) said :

Thanks Manfred,

I thought as much. Perhaps it is a bit confusing to me that there are two packages that nominally seem to have the same purpose. Should one of them be deprecated or named differently? Anyway, you answered my specific question well enough although I must admit my root problem is still unsolved. In spite of this, I will go ahead and press the "Problem Solved" button anyway! :-)