Debian 7 - Install Android Tools (ADB, Fastboot, ... & QtADB)



If you own an Android Smartphone and you want to manage it from your computer, you will need sooner or later to use some specific Android tools like adb or fastboot.

Under Debian, two options are available :

  • Install the whole Android SDK which bring these tools among many other things
  • Install some specific android-tools packages that bring only these tools

For some basic needs, to install the whole Android SDK is not needed, the android-tools packages are more than enough.

But these packages are only available for sid, they are not in the wheezy repository. So we'll need to backport them.

This article explains the simple steps needed to install the main Android tools (ADB, Fastboot, ... & QtADB) on a Debian 7 Wheezy workstation.

For example, after these steps, you should be able to Root a Google Nexus S or to Root a Google Nexus 7.

This guide has been tested succesfully on a i386 distribution.
I've got some feedback that there are some troubles on a Amd64 system due tobug 715238.
It seems that last patch in the thread is solving the issue (thanks to François Bianco).
If upstream sources have been corrected at the time of your compilation, just let me know so that I can remove this warning.

1. Setup ADB Udev Rule

Before accessing your android device in adb mode, you need to :

  • set the device to use USB Debug
  • declare a corresponding Udev rule on your Ubuntu box

After setting the device in USB Debug mode and connecting it to a USB port, throw the command :

# lsusb
Bus 001 Device 017: ID 18d1:4ee6 Google Inc.

This is the result for a Google Nexus 4 connected in PTP mode with USB Debug on. It gives the Manufacturer ID (18d1) and the Model ID (4ee6).

Now that we have these data, we can use the Manufacturer ID to create a very generic udev rules in /etc/udev/rules.d/99-android.rules to allow full access to any Google device.

# sudo gedit /etc/udev/rules.d/99-android.rules

# Google Nexus devices
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", OWNER="your-login" # Google Nexus devices

your-login should be your session login.

We can now restart udev for the new rules to become operationnal.

# sudo service udev restart

2. Install Android tools

If you don't plan to do some development on your android device, you don't need to install the complete SDK.

As main Android tools (adb, fastboot, ext2simg, img2simg, simg2img, simg_dump, ...) are now available from sid repository, we will simply backport them to wheezy.

To backport them, we'll need as root to :

  1. install compilation environment (if not already done)
  2. add sid sources repository
  3. install the build dependencies
  4. compile and install the sources
  5. remove sid sources repository

So, in a root console, follow these steps (I use here a french Debian repository, you can use any one you want) :

# mkdir android && cd android
# apt-get install build-essential
# echo "deb-src sid main contrib non-free" > /etc/apt/sources.list.d/sid-sources.list
# apt-get update
# apt-get build-dep android-tools
# apt-get source --build android-tools
# rm /etc/apt/sources.list.d/sid-sources.list

You should now be in front of three binary android .deb packages in your current directory :

  • android-tools-adb_xxx_arch.deb
  • android-tools-fastboot_xxx_arch.deb
  • android-tools-fsutils__xxx_arch.deb

You just need to install them.

# dpkg -i android-tools-*.deb

Latest android tools are now installed on your Debian Wheezy.

3. Allow ADB trusted connexion

Starting from Android 4.2.2 onward, a new security feature has been introduced within ADB.

You must confirm on your device that it is being attached to a trusted computer before any dialog can take place.

This security feature need adb version 1.0.30 and above.

At the time of this article, ADB version provided by sid repository is :

# adb version
Android Debug Bridge version 1.0.31
# adb devices
List of devices attached
xxxxxxxxxxxxxxx          device

If your adb version is too old you'll get :

# adb devices
List of devices attached
xxxxxxxxxxxxxxx          offline

When you will plug your Android device for the first time, it will display a message asking you to allow connexion to your computer as a trusted computer.

You need to to select the permanent checkbox and to validate the message.

4. Install QtADB

QtADB is a graphical Android device manager based on ADB protocol.

To install QtADB, just follow QtADB installation for Ubuntu.

As debian doesn't use sudo by default, just remove any sudo that appear on a command line.

You can now launch QtADB via your Gnome Shell desktop and your Android phone filesystem is now fuly accessible.

For example, you can take some screenshot very easily.


Be careful, you now have the full power on your android device !


Hope it helps.

Signature Technoblog

This article is published "as is", without any warranty that it will work for your specific need.
If you think this article needs some complement, or simply if you think it saved you lots of time & trouble,
just let me know at This email address is being protected from spambots. You need JavaScript enabled to view it.. Cheers !

icon linux icon debian icon apache icon mysql icon php icon piwik icon googleplus