67

When it comes to , I often read recommendations like "Use adb logcat to find some more details". Looking for a good way to backup all my apps including their data, Full Backup of non-rooted devices refers to adb backup and adb restore. In several places one can find ways to remotely do on an Android device with the use of ADB, such as transferring files using adb push or adb pull, accessing the via adb shell, and more. So ADB seems to be a good thing to have for an Android user.

But how to get this "ADB thingy" on my computer? Not being a developer, installing the entire Android SDK seems a bit overkill. Is there a more minimalistic approach available?

0

6 Answers 6

51

I do not really understand why anyone would prefer downloading an old version of unknown origin from a malware-ridden website to downloading the latest official version directly from Google itself. I guess to each its own.

Here are the links to the Google repository:

The latest version of the platform tools (contains just a few binaries - less than 10Mb in size each):

For users of Ubuntu and Debian (distributions I personally use) I have put together a small bash script which finds and installs the latest version of the platform tools - Installing Android platform tools (ADB) on Ubuntu

8
  • 4
    Because they might be subject to change? You just linked to a specific version. My links above go to the latest version available at the time you click them. Furthermore: My links are for the minimal installation (as specified by the question), while yours include the entire platform tools (size factor 10 for the archive: 1.4 MB vs. 12 MB for Linux, same for the installation: 3.8 MB vs. 38 MB). Thanks for the complement, though, as the "full platform tools" might be a good compromise for the one or the other user.
    – Izzy
    Mar 27, 2013 at 21:02
  • 2
    this is the difference between engineers and end users. engineers prefer to cut out the middle man and go straight to the source. this is the only way to ensure that you are getting the latest version. you do not have to unpack the whole package - just the files you need. and complaining about having to download extra 10Mb once in a few months? really? it's 2013...
    – user23414
    Mar 27, 2013 at 21:47
  • 2
    And we are talking about "end users" here (engineers go to SO :) No reason to argue, Alex -- we both made our points. Users have the choice which download to favour. If you insist, I can update my answer to point to yours for "alternative sources".
    – Izzy
    Mar 27, 2013 at 21:57
  • 3
    also check stackoverflow.com/tags/adb/info for more recent links Oct 20, 2016 at 1:24
  • 1
    @Пионерка Check my answer for the links pointing to the always latest platform tools (instead of checking for the latest link each time you need it). Luckily, Google now provided platform-tools-latest-*.zip links for the 3 major platforms :)
    – Izzy
    Jan 10, 2017 at 12:31
33

In fact, it is not necessary to install the entire SDK if one does not want to use it for development. To be able to run basic ADB commands in the context needed by an average user, a rudimentary installation is completely sufficient. I will try to explain how to do this, and hopefully cover the most used computer systems.

Requirements

First, you will need the basic binaries. These can be found e.g. in the Download area of my Android site, where I try to keep up-to-date versions available – for Linux, MacOS, and Windows.1

Windows users

If your computer is running Windows, you will also need the special drivers for your device (no generic solution here, so you need to check this out yourself; usually, those drivers are offered for download on the manufacturer's website).

Linux and Mac OS users

Linux and Mac OS users might need to make their device known to their operating system. For Linux, you find the necessary steps described in my answers here and here. Not being familiar with Mac OS, I can not speak for it.

Installation

Linux

For Linux, this is quite easy: Simply unpack the downloaded binaries into a directory of your choice. At the time I'm writing this, this will only be two files: adb and aapt (the latter being used by QtADB, and not necessarily needed to execute ADB commands directly). Adjust their file permissions to make them executable (e.g. from the command line: chmod 0755 adb aapt). Finally, it's a good idea to include the chosen directory with your $PATH variable, so you can call adb from wherever you are. A good place for that is at the end of your ~/.profile file to include an additional line like export PATH="~/bin:$PATH" (if you extracted the binaries to ~/bin).

Windows

The Windows download holds a couple more files. Also extract them into a directory of your choice. If you want them to be callable from wherever you are, without preceding the complete path, you need to add that path to your environment variables as well. Not being a Windows user, I must leave the "how to do this" to you.

What else?

You should be done at this point, and can use the full powers of the ADB command line.

Alternatives?

Further readings


1: Also see Alex' answer for more alternative sources. My sources are the official Google downloads, just "stripped down".

5
  • 1
    your links are dead. Google's links are still working and specially for those complaining about file sizes Google has removed everything non-essential from their platform tools package.
    – user23414
    Jul 11, 2013 at 5:53
  • @AlexP. thanks for the hint, updated. I also highlighted where to look when they die again (not all links have been dead -- the master-link still worked. Made that bold now :)
    – Izzy
    Jul 11, 2013 at 6:11
  • Too bad QtADB does not seem to include ADB anymore.
    – user23414
    Jul 11, 2013 at 7:35
  • What? Sorry, I didn't re-download, just updated the links. Are you saying the adb binary is no longer included? =:-0 Darn, you're right :( Will update that ASAP. If somebody downloaded the Win/Mac versions before, a link would be nice. I will see for the binaries I downloaded back then.
    – Izzy
    Jul 11, 2013 at 8:32
  • Lucky us! I found the Linux and Windows archives, and finally even alternative sources plus the Mac binaries. Replaced the dead links, everything's available again now.
    – Izzy
    Jul 11, 2013 at 20:54
6

I made something for OS X, this may be exactly what you are looking for: Quick ADB/Fastboot installer: ADB and Fastboot binaries with installer

5
  • Not for me, I have no Mac (I'm a Linux user). But thanks, others might prefer an easy point-and-click solution :)
    – Izzy
    Mar 13, 2015 at 16:37
  • Okay, maybe I will make a version for Linux too. Shouldn't be that complicated ;)
    – SimMac
    Mar 13, 2015 at 16:41
  • 1
    Just follow the steps described above. From what I've read on your Github page, not too many changes are required. I'd suggest /usr/local/bin as the place for the binaries, though (actually, I use the manual approach as described in my answer (just updated it now) – and have the binaries in ~/bin (didn't need a system-wide install yet). // PS: The ones most in need will be our poor Windows fellows. Most of them are lost when it comes to "manual work" #D
    – Izzy
    Mar 13, 2015 at 16:44
  • Thanks, I just released v2.0 which brings Linux support, I would be happy if you could test it if it works for you.
    – SimMac
    Mar 14, 2015 at 19:50
  • 1
    I just took a quick look inside: Looks good to me! Your variant is even more stripped-down than mine (I also include aapt – not strictly required, though). +1 meanwhile, and thanks! (you might wish to include a link to my download area in your README.md for those requiring aapt)
    – Izzy
    Mar 14, 2015 at 20:23
5

15 seconds minimal ADB, fastboot and drivers installer.

  • No need to navigate to the installation folder in CMD.
  • It can be installed system-wide.
  • No need to check for manufacturer specific drivers.
  • Everything included in 9MB.
1
  • Note: This is Windows only.
    – Izzy
    Jan 30, 2016 at 14:09
2

Debian makes it extremely simple to get legit, up-to-date installs of adb & fastboot.

If you really just want adb without fastboot: $ sudo apt-get install android-tools-adb

Or, if you're like me and think that they work better together:
$ sudo apt-get install android-tools-adb android-tools-fastboot

2

If you're on Arch Linux and you want to do this (following Izzy's answer of course!)...

Enable multilib in /etc/pacman.conf and install the 32-bit dependencies if necessary:

$ sudo pacman -Sy
$ sudo pacman -S lib32-{glibc,gcc-libs,zlib}

get the files:

$ curl -J -O https://android.izzysoft.de/downloads.php?file=adb-binaries-linux-1.0.32.tar.gz
$ tar xf adb-binaries-linux-1.0.32.tar.gz

the commands will install to your current directory, so for instance:

$ ./aapt

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .