Installing and setting up Android SDK, ADB and Fastboot on GNU/Linux


There isn’t a lot of documentation on setting up of android sdk, adb and fastboot and to get adb and fastboot to recognize your device on GNU/Linux. This post will help you to install and setup Android SDK, ADB and fastboot on your GNU/Linux machine.

1. Download the Android SDK for GNU/Linux from here. Or go to Android Developer website and download latest SDK for Linux.

2. Save it in a folder of your choice. I chose to keep it in my home folder.

3. Now that you have it, navigate to the folder you downloaded it to, right-click, and click ‘Extract’ to unzip it. If for some reason you cannot do this, open up a terminal and try this command:
tar zxvf ~/android-sdk_r13-linux_x86.tgz
You may have to adjust the command if you didn’t save it under home folder or the file name is different.

4. Now, we’ll install adb and some other software packages by starting up the Android SDK and AVD Manager. Start it either by:
– Navigating to your android-sdk-linux_x86 folder, going to the ‘tools’ folder and double-clicking the file called ‘android’. if a pop-up opens asking you what you want to do with it click ‘Run’.
– Using this command:
chmod +x ~/android-sdk-linux_x86/tools/android

5. In Android SDK and AVD Manager, click on “Available packages”. Check the box next to Android SDK Tools revisions which you want and “Android SDK Platform-tools”, and click on “Install Selected” then “Install”. When prompted click “Yes” to restart ADB.

installing android sdk in linux

6. You should now have a folder in android-sdk-linux_x86 called “platform-tools”.

7. Download fastboot from here
– Save it to the platform-tools folder.
– Now, navigate to the file, right click it, click ‘Properties’, go to the ‘Permissions’ Tab and check ‘Allow executing file as program’. Alternatively, run this command:
chmod +x ~/android-sdk-linux_x86/platform-tools/fastboot
android adb recognize device

8. Now to set things up so adb and fastboot recognize your device
– Find your vendor id from here
– Type this command into a terminal:
sudo gedit /etc/udev/rules.d/51-android.rules
– Paste this into the blank file: (vendor ID 18d1 is for google. Change it according to your device)
SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666"
– Click save and close.
– Then, type the following terminal command:
sudo restart udev

sudo udevadm control --reload-rules

9. To access SDK tools direct from terminal, run
gedit ~/.bashrc
And add this line to the bottom of the file:
export PATH=${PATH}:~/android-sdk-linux_x86/tools:~/android-sdk-linux_x86/platform-tools
Then save the file and close.

10. Done! Happy Hacking 🙂

(Tux logo source: Larry Ewing )