Install ADB and Fastboot under Linux

By Andreas Schickedanz Aug 20, 2013

A few days ago I received my new HTC Desire C that I purchased on ebay for just a few coins. When I received it, it was flashed with the standard Android JellyBean (4.1.2).

Let’s get started. Most distributions have packages for ADB and Fastboot in their repositories, but because they are in most cases out-of-date, I recommend to install these tools by installing the Android SDK directly. So start downloading the latest Android SDL. During the download you should ensure that no system packages of ADB and Fastboot are already installed. Since I am running a Debian Wheezy on my desktop, I could remove such system packages by executing the following commands:

sudo apt-get purge android-tools-adb android-tools-fastboot

After you ensured that there are no candidates of ADB or Fastboot and the download has finished, you could extract the downloaded files:

unzip adt-bundle-linux-x86_64.zip

And move the directory to its installation target (in my case /opt):

mv adt-bundle-linux-x86_64 /opt/android-sdk-linux-x86_64

If you are running a 64-bit Linux then you have to enable the 32-bit mode and install the needed 32-bit libraries. On most systems you just have to install the ia32lib package:

sudo apt-get install ia32libs

However, if you are using Debian, like me, you have to enable multiarch to use 32-bit ADB and Fastboot and install their dependencies:

sudo dpkg --add-architecture i386
sudo apt-get update ; apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386

You always have to enable the 32-bit mode and install the 32-bit dependencies, even if you downloaded the 64-bit version of the Android SDK, because some tools are not compiled in 64-bit mode.

To be able to run ADB and Fastboot outside of platform-tools directory, you have to add the executeables to the system path. This could be achieved by adding symbolic links to /usr/bin:

sudo ln -s /opt/android-sdk-linux-x86_64/sdk/platform-tools/adb /usr/bin
sudo ln -s /opt/android-sdk-linux-x86_64/sdk/platform-tools/fastboot /usr/bin

That is it. You have now installed adb and fastboot. However some of you may have noticed, that /opt/android-sdk-linux-x86_64 contains two directories, the sdk/ directory that contains the android SDK and the android platform tools like adb and fastboot and an eclipse/ folder. This second folder contains a preconfigured eclipse that ships with a preinstalled ADT (Android Development Tools) plugin. Therefore it is the perfect environment for android development.

So you have two options. If you are not interested in using this eclipse installation just remove this directory:

sudo rm -r /opt/android-sdk-linux-x86_64/eclipse/

Or if you would like to use this installation, you should add a desktop link to /usr/share/applications/. Therefore open a file:

sudo nano /usr/share/applications/eclipse.desktop

and paste the following code:

[Desktop Entry]
Name=Eclipse
Type=Application
Exec=/opt/android-sdk-linux-x86_64/eclipse/eclipse
Terminal=false
Icon=/opt/android-sdk-linux-x86_64/eclipse/icon.xpm
Comment=Integrated Development Environment
NoDisplay=false
Categories=Development;IDE

This will add a desktop entry, which will enable you to start eclipse using the systems application menu and/or lens (Ubuntu).

I hope this short tutorials will be useful for you. Until next time - happy rooting.


is a Computer Science MSc. interested in hardware hacking, embedded Linux, compilers, etc.