Confused about adb and android-tools-adb packages

Asked by Allan Macdonald on 2018-03-08

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

Background

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:

https://ionicframework.com/docs/developer-resources/developer-tips/#debugging-android-chrome

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:

http://bernaerts.dyndns.org/linux/74-ubuntu/354-ubuntu-xenial-android-adb-fastboot-qtadb

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

Language:
English Edit question
Status:
Solved
For:
Ubuntu android-tools Edit question
Assignee:
No assignee Edit question
Solved by:
Allan Macdonald
Solved:
2018-03-09
Last query:
2018-03-09
Last reply:
2018-03-09
Manfred Hampl (m-hampl) said : #1

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

~$ 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
adb:
  Installed: (none)
  Candidate: 1:6.0.1+r16-3
  Version table:
     1:6.0.1+r16-3 500
        500 http://ca.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
android-tools-adb:
  Installed: 5.1.1r36+git20160322-0ubuntu3
  Candidate: 5.1.1r36+git20160322-0ubuntu3
  Version table:
 *** 5.1.1r36+git20160322-0ubuntu3 500
        500 http://ca.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
        100 /var/lib/dpkg/status

Manfred Hampl (m-hampl) said : #3

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.

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! :-)

Cheers,
Allan