[GUIDE] Setup Android Development Environment on Ubuntu 13.04+

Search This thread

matt95

Senior Member
Aug 8, 2010
5,962
2,370
Milan
new-prof.png


Hi guys and future devs :D here you will find a very helpful guide on how to setup the android development so that you can basically do anything you want!
I'll suggest you many useful programs that are needed in this field :D
In this guide I'll be using Ubuntu 13.04 but probably this will also work on 12.04-12.10 and future releases!



Ok now let's begin with the real stuff :good:

INSTALL UBUNTU

The first thing you'll need to do is obviously the ubuntu installation, unfortunately i won't cover this part of the guide cause I think that everyone who is looking at this guide knows how to install an OS on a Desktop :) (hope so)

Download


SETUP ANDROID DEVELOPMENT ENVIRONMENT
WHAT WE NEED
1- JDK 6(Java Development Kit) NOTE: you will need to sign in the oracle site for this version of java unfortunately :( )
2- GNU Make (Optional)
3- Python 2.7
4- Git 1.7
5- Android SDK
6- Some more packages


INSTALLATION

JDK

Installing the JDK is pretty tricky and stressful every time :p
First, download the JDK 6, which you can download here. Download the .bin file! (in this case my JDK has been downloaded in the ~/Download folder and my file is named jdk-6u45-linux-x64.bin)
Open up your terminal and type

Code:
$ sudo mkdir /usr/lib/jvm
$ cd ~/Downloads/
$ chmod +x jdk-6u45-linux-x64.bin
$ ./jdk-6u45-linux-x64.bin
$ sudo mv jdk1.6.0_45 /usr/lib/jvm/
$ sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_45/bin/javac 1
$ sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_45/bin/java 1
$ sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.6.0_45/bin/jar 1
$ sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_45/bin/javaws 1
$ java -version
Ok, if you did everything fine you should now have the JDK installed correctly :D

GIT

This is the easiest one :)
Code:
$ sudo apt-get install git
$ y

PYTHON

Download the 2.7.5 version or newer here
Code:
$ cd ~/Downloads/
$ tar -xzvf Python-2.7.5.tgz
$ cd Python-2.7.5/
$ ./configure
$ make
$ sudo make altinstall

GNU

You don't need this step, do this just if you want the latest version of GNU Make
Download the latest version here

Code:
$ cd ~/Downloads/
$ tar -zxvf make-3.82.tar.gz
$ cd make-3.82
$ ./configure
$ make
$ sudo make install

OTHER PACKAGES

These packages are needed to run many many android commands such as ADB and FASTBOOT (only 64-bit needs this)
Code:
$ sudo apt-get install ia32-libs
$ y
This will take about 20 mins especially if you have a slow processor or internet connection so relax and have a coffee :good:

If you're using Ubuntu 14.04 this won't work because that package isn't available anymore, so you just want to do these steps here
Code:
$ sudo dpkg --add-architecture i386
$ sudo apt-get update
$ sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386

ANDROID SDK

This will be your best friend from now on :D
Download it here > download for other platforms > download the sdk tools only
Ok now i always create a Development folder where i put all the android development stuff (you can do whatever you think here)

Code:
$ mkdir ~/development
$ cd ~/Downloads
$ tar -zxvf android-sdk_r22.0.1-linux.tgz
$ mv ~/Downloads/android-sdk-linux ~/development/
Now you're ready to run the Android SDK :D

SETUP ADB/FASTBOOT

Open up the Android SDK by running this command
Code:
$ cd ~/development/android-sdk-linux/tools
$ ./android
At this point the SDK should come up and you will need to download at least all the tools and all the extras files, so select them and install'em.
When it finishes downloading everything you have to run this commands in another terminal
Code:
$ sudo gedit .bashrc
And you need to add at the end of it your SDK paths

Code:
#Android PATHS
export PATH=$PATH:~/development/android-sdk-linux/tools
export PATH=$PATH:~/development/android-sdk-linux/platform-tools

If you followed everything now adb and fastboot should work!
to check this you need to close all the terminals opened, reopen one and simply type
Code:
$ adb
$ fastboot

You should get a long list of possible commands :D if so you're done!

FIXING NO PERMISSIONS ERROR
Probably, if you run
Code:
$ adb devices
or 
$ fastboot devices
right now you'll get a strange output, something like this
Code:
???????? No permissions
In order to avoid this message we have to create a simple file
Code:
$ cd /tmp/
$ touch android.rules
$ nano android.rules
Now you have to paste this lines in that file and save it
Code:
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0e79", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0502", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0b05", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="413c", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0489", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="091e", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="12d1", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="24e3", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="2116", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0482", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="17ef", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1004", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="22b8", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0409", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="2080", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0955", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="2257", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="10a9", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1d4d", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0471", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="04da", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="05c6", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1f53", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="04e8", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="04dd", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0fce", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0930", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="19d2", MODE="0666"
Now you have to set the right permissions to this file, just type
Code:
$ sudo cp /tmp/android.rules /etc/udev/rules.d/51-android.rules
$ sudo chmod 644   /etc/udev/rules.d/51-android.rules
$ sudo chown root. /etc/udev/rules.d/51-android.rules
$ sudo service udev restart
$ sudo killall adb


SUGGESTED PROGRAMS

ECLIPSE

In the Android world you don't want to miss the Eclipse IDE which is the most used! This tool will help you develop android apps
You can download it here (download the classic one)
Code:
$ cd ~/Downloads
$ tar -zxvf eclipse-SDK-4.2.2-linux-gtk-x86_64.tar.gz
$ mv ~/Downloads/eclipse ~/development/

SETUP INFO


NOTE: If you download the entire ADT bundle provided by google you will get the SDK and Eclipse IDE together

ANDROID STUDIO (Recommended)
This is the new development IDE made in Google, personally i love it! We are now on version 8.6 BETA and I have to say that it's a really really good looking and powerful IDE. I would recommend to use this IDE because, over time, it will be the main Android IDE (rumors say that Google will stop developing ADT bundles so Eclipse won't be supported anymore and this will force you to switch to Android Studio).
You can download it from here
It has a lot of new features that Eclipse doesn't have and it could be useful in some cases

Code:
$ cd ~/Downloads
$ tar -zxvf android-studio-bundle-130.687321-linux.tgz
$ mv ~/Downloads/android-studio ~/development/

To run it you just need to navigate to its bin folder and type
Code:
$ ./studio.sh

If you don't want to type this everytime you can just create a shortcut for it by opening Android Studio and going into Configure > Create desktop entry :) That's it!
 
Last edited:

SohamJ

Senior Member
Dec 26, 2011
690
747
30
New Brunswick
hey nice guide !
I personally am a ubuntu 13.04 user
just one suggestion , you can add in your thread alternate way of downloading the whole ADT bundle and setting it up; so that separate installation of sdk eclipse adt plugin etc is not required

Sent from my GT-S5670 using xda premium
 

8yt3c0d3

Member
Jun 4, 2013
5
10
Bangalore
glad it helped ;) let me know if everything works correctly

Hi matt, thanks a ton for this great tutorial. I have followed all the steps mentioned here and i think adb and fastbook has been installed on my system :) Running the ./adb and ./fastboot commands bring up a list of command on the terminal.

Nw i have been trying to connect my phone to flash a boot.img, after i run "./adb devices" to check if the phone is connected it shows me this :

List of devices attached
???????????? no permissions

not sure if the device is connected :( do u knw what is causing this error ?
 
  • Like
Reactions: Alphaygn

demkantor

Inactive Recognized Contributor
Nov 10, 2011
6,860
3,765
mpls
Being you have a path setup (per this guide) try typing either just
adb devices
or
fastboot devices
skip the ./ and see if it will work
 
  • Like
Reactions: matt95

8yt3c0d3

Member
Jun 4, 2013
5
10
Bangalore
I have got my device now connected in fastboot mode. Thanks again for this great tutorial. I am not a rom builder but a crazy flasher :p I skipped a few steps from the above tutorial to get fastboot and adb working on Ubuntu 13.04.

To install JDK:

Start by removing the openJDK if it exists already
Code:
sudo apt-get purge openjdk*

To install Java 8, do this
Add the PPA:
Code:
sudo add-apt-repository ppa:webupd8team/java

Update the repo index:
Code:
sudo apt-get update

Install Java 8:
Code:
sudo apt-get install oracle-java8-installer

Install GIT from the OP tutorial

Skip Python install :p

Skip GNU install :p

Skip ia32-libs install if you are using 32bit OS

Download the Android SDK from OP and install it as mentioned there.

Setup ADB/Fastboot as mentioned in the OP

Skip Suggested programs :p :cyclops:

Now connect your device in fastboot mode and type in terminal fastboot to check if your device is recognised, if you get
"fastboot not installed error"
Try
Code:
sudo apt-get install android-tools-adb android-tools-fastboot

connect device in fastboot and try :
Code:
sudo fastboot devices

Done ;) :D
 
Last edited:

matt95

Senior Member
Aug 8, 2010
5,962
2,370
Milan
Hi matt, thanks a ton for this great tutorial. I have followed all the steps mentioned here and i think adb and fastbook has been installed on my system :) Running the ./adb and ./fastboot commands bring up a list of command on the terminal.

Nw i have been trying to connect my phone to flash a boot.img, after i run "./adb devices" to check if the phone is connected it shows me this :

List of devices attached
???????????? no permissions

not sure if the device is connected :( do u knw what is causing this error ?

actually i should write more to avoid that message :/ stay tuned! tonight i'll write how to solve that... sorry for making you wait
 

matt95

Senior Member
Aug 8, 2010
5,962
2,370
Milan
I have got my device now connected in fastboot mode. Thanks again for this great tutorial. I am not a rom builder but a crazy flasher :p I skipped a few steps from the above tutorial to get fastboot and adb working on Ubuntu 13.04.

To install JDK:

Start by removing the openJDK if it exists already
Code:
sudo apt-get purge openjdk*

To install Java 8, do this
Add the PPA:
Code:
sudo add-apt-repository ppa:webupd8team/java

Update the repo index:
Code:
sudo apt-get update

Install Java 8:
Code:
sudo apt-get install oracle-java8-installer

Install GIT from the OP tutorial

Skip Python install :p

Skip GNU install :p

Skip ia32-libs install if you are using 32bit OS

Download the Android SDK from OP and install it as mentioned there.

Setup ADB/Fastboot as mentioned in the OP

Skip Suggested programs :p :cyclops:

Now connect your device in fastboot mode and type in terminal fastboot to check if your device is recognised, if you get
"fastboot not installed error"
Try
Code:
sudo apt-get install android-tools-adb android-tools-fastboot

connect device in fastboot and try :
Code:
sudo fastboot devices

Done ;) :D

yeah that works too but sometimes you may have some problem with that command and probably it won't work on every distro, while the manual installation always works :)
 
  • Like
Reactions: Alphaygn

matt95

Senior Member
Aug 8, 2010
5,962
2,370
Milan
Hi matt, thanks a ton for this great tutorial. I have followed all the steps mentioned here and i think adb and fastbook has been installed on my system :) Running the ./adb and ./fastboot commands bring up a list of command on the terminal.

Nw i have been trying to connect my phone to flash a boot.img, after i run "./adb devices" to check if the phone is connected it shows me this :

List of devices attached
???????????? no permissions

not sure if the device is connected :( do u knw what is causing this error ?

you should run adb with root user :)

Code:
sudo adb devices

that should do the trick
 

old.splatterhand

Recognized Contributor
Nov 4, 2010
3,981
2,214
Saturn III
HTC One (M8)
Android Wear
Hello and greetings to Verona. I love your region, very nice there!

Very good guide, sir! Used this to set up my first Linux/Ubuntu/Android environment! :good:

Some points/questions i have (as a long time windows user :D):

OTHER PACKAGES

These packages are needed to run many many android commands such as ADB and FASTBOOT
Code:
$ sudo apt-get install ia32-libs
$ y
These packages are only for 64bit i think?


Code:
$ cd ~/Downloads
$ tar -zxvf eclipse-SDK-4.2.2-linux-gtk-x86_64.tar.gz
[B][COLOR="Red"]$ mv ~/Downloads/ ~/development/[/COLOR][/B]
Is the red line correct, cause it moves the complete download folder to development?

And the most important thing for me as windows user:

I have now all importent things for development in ~/development/ folder.
Every time i have to go with terminal to the specific folder and execute the program:
Code:
cd ~/development/kitchen
./menu

cd ~/development/eclipse
./eclipse

cd ~/development/android-studio/bin
./studio.sh

cd ~/development/android-sdk-linux/tools
./android
Is it possible to make these programs executable like adb and fastboot?
What i mean is, open terminal, write ./menu and kitchen starts, without moving to the kitchen folder (like adb).
If yes, a step-by-step guide would be very appreciated!
Or any other way to start those programs on a easy way, like linked into Cairo Dock?

Thanks in advance and keep on rockin'!
 
  • Like
Reactions: matt95

matt95

Senior Member
Aug 8, 2010
5,962
2,370
Milan
Hello and greetings to Verona. I love your region, very nice there!

Very good guide, sir! Used this to set up my first Linux/Ubuntu/Android environment! :good:

Some points/questions i have (as a long time windows user :D):


These packages are only for 64bit i think?



Is the red line correct, cause it moves the complete download folder to development?

And the most important thing for me as windows user:

I have now all importent things for development in ~/development/ folder.
Every time i have to go with terminal to the specific folder and execute the program:
Code:
cd ~/development/kitchen
./menu

cd ~/development/eclipse
./eclipse

cd ~/development/android-studio/bin
./studio.sh

cd ~/development/android-sdk-linux/tools
./android
Is it possible to make these programs executable like adb and fastboot?
What i mean is, open terminal, write ./menu and kitchen starts, without moving to the kitchen folder (like adb).
If yes, a step-by-step guide would be very appreciated!
Or any other way to start those programs on a easy way, like linked into Cairo Dock?

Thanks in advance and keep on rockin'!

Yes those packages are for the x64 desktops, i should have said that! :good:
The red highlighted command was wrong, now i've corrected it! thanks for reporting that :D
And last thing, if you want to run that commands as adb and fastboot you only have to add those commands' directories to the .bashrc
so open up the terminal and type
Code:
$ gedit .bashrc
and then you have to write down the directories

example (the menu command is in the ~/development/kitchen directory) you should write
Code:
#Personal PATHS(you can write what you want after the #)
export PATH=$PATH:~/development/kitchen
then hit save and that's all :) close all the terminals that are open and now you can launch the kitchen just by typing menu (you don't have to type ./ before it).

if you need help again just ask :)
 
Last edited:
  • Like
Reactions: old.splatterhand

old.splatterhand

Recognized Contributor
Nov 4, 2010
3,981
2,214
Saturn III
HTC One (M8)
Android Wear

And last thing, if you want to run that commands as adb and fastboot you only have to add those commands' directories to the .bashrc
so open up the terminal and type
Code:
$ gedit .bashrc
and then you have to write down the directories

example (the menu command is in the ~/development/kitchen directory) you should write
Code:
#Personal PATHS(you can write what you want after the #)
export PATH=$PATH:~/development/kitchen
then hit save and that's all :) close all the terminals that are open and now you can launch the kitchen just by typing menu (you don't have to type ./ before it).
First, thank you for your super-quick reply! :good:
Yes, i thought about that, adding those lines to ".bashrc". :laugh:
I did it already yesterday, but maybe i did something wrong, cause i tried to open kitchen in terminal with ./menu and it did not work. But maybe its because of ./
The .bashrc file don't need to be "updated" after saving (like for example grub, when editing the OS that starts first on dual boot)?
Anyway, i will have a look and post the result.
 

matt95

Senior Member
Aug 8, 2010
5,962
2,370
Milan
First, thank you for your super-quick reply! :good:
Yes, i thought about that, adding those lines to ".bashrc". :laugh:
I did it already yesterday, but maybe i did something wrong, cause i tried to open kitchen in terminal with ./menu and it did not work. But maybe its because of ./
The .bashrc file don't need to be "updated" after saving (like for example grub, when editing the OS that starts first on dual boot)?
Anyway, i will have a look and post the result.

when you add something to the .bashrc you do not have to type the ./ before the command :) and yes, it doesn't need to be updated, just save it and that's it
 
  • Like
Reactions: old.splatterhand

Top Liked Posts

  • There are no posts matching your filters.
  • 167
    new-prof.png


    Hi guys and future devs :D here you will find a very helpful guide on how to setup the android development so that you can basically do anything you want!
    I'll suggest you many useful programs that are needed in this field :D
    In this guide I'll be using Ubuntu 13.04 but probably this will also work on 12.04-12.10 and future releases!



    Ok now let's begin with the real stuff :good:

    INSTALL UBUNTU

    The first thing you'll need to do is obviously the ubuntu installation, unfortunately i won't cover this part of the guide cause I think that everyone who is looking at this guide knows how to install an OS on a Desktop :) (hope so)

    Download


    SETUP ANDROID DEVELOPMENT ENVIRONMENT
    WHAT WE NEED
    1- JDK 6(Java Development Kit) NOTE: you will need to sign in the oracle site for this version of java unfortunately :( )
    2- GNU Make (Optional)
    3- Python 2.7
    4- Git 1.7
    5- Android SDK
    6- Some more packages


    INSTALLATION

    JDK

    Installing the JDK is pretty tricky and stressful every time :p
    First, download the JDK 6, which you can download here. Download the .bin file! (in this case my JDK has been downloaded in the ~/Download folder and my file is named jdk-6u45-linux-x64.bin)
    Open up your terminal and type

    Code:
    $ sudo mkdir /usr/lib/jvm
    $ cd ~/Downloads/
    $ chmod +x jdk-6u45-linux-x64.bin
    $ ./jdk-6u45-linux-x64.bin
    $ sudo mv jdk1.6.0_45 /usr/lib/jvm/
    $ sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_45/bin/javac 1
    $ sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_45/bin/java 1
    $ sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.6.0_45/bin/jar 1
    $ sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_45/bin/javaws 1
    $ java -version
    Ok, if you did everything fine you should now have the JDK installed correctly :D

    GIT

    This is the easiest one :)
    Code:
    $ sudo apt-get install git
    $ y

    PYTHON

    Download the 2.7.5 version or newer here
    Code:
    $ cd ~/Downloads/
    $ tar -xzvf Python-2.7.5.tgz
    $ cd Python-2.7.5/
    $ ./configure
    $ make
    $ sudo make altinstall

    GNU

    You don't need this step, do this just if you want the latest version of GNU Make
    Download the latest version here

    Code:
    $ cd ~/Downloads/
    $ tar -zxvf make-3.82.tar.gz
    $ cd make-3.82
    $ ./configure
    $ make
    $ sudo make install

    OTHER PACKAGES

    These packages are needed to run many many android commands such as ADB and FASTBOOT (only 64-bit needs this)
    Code:
    $ sudo apt-get install ia32-libs
    $ y
    This will take about 20 mins especially if you have a slow processor or internet connection so relax and have a coffee :good:

    If you're using Ubuntu 14.04 this won't work because that package isn't available anymore, so you just want to do these steps here
    Code:
    $ sudo dpkg --add-architecture i386
    $ sudo apt-get update
    $ sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386

    ANDROID SDK

    This will be your best friend from now on :D
    Download it here > download for other platforms > download the sdk tools only
    Ok now i always create a Development folder where i put all the android development stuff (you can do whatever you think here)

    Code:
    $ mkdir ~/development
    $ cd ~/Downloads
    $ tar -zxvf android-sdk_r22.0.1-linux.tgz
    $ mv ~/Downloads/android-sdk-linux ~/development/
    Now you're ready to run the Android SDK :D

    SETUP ADB/FASTBOOT

    Open up the Android SDK by running this command
    Code:
    $ cd ~/development/android-sdk-linux/tools
    $ ./android
    At this point the SDK should come up and you will need to download at least all the tools and all the extras files, so select them and install'em.
    When it finishes downloading everything you have to run this commands in another terminal
    Code:
    $ sudo gedit .bashrc
    And you need to add at the end of it your SDK paths

    Code:
    #Android PATHS
    export PATH=$PATH:~/development/android-sdk-linux/tools
    export PATH=$PATH:~/development/android-sdk-linux/platform-tools

    If you followed everything now adb and fastboot should work!
    to check this you need to close all the terminals opened, reopen one and simply type
    Code:
    $ adb
    $ fastboot

    You should get a long list of possible commands :D if so you're done!

    FIXING NO PERMISSIONS ERROR
    Probably, if you run
    Code:
    $ adb devices
    or 
    $ fastboot devices
    right now you'll get a strange output, something like this
    Code:
    ???????? No permissions
    In order to avoid this message we have to create a simple file
    Code:
    $ cd /tmp/
    $ touch android.rules
    $ nano android.rules
    Now you have to paste this lines in that file and save it
    Code:
    SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="0e79", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="0502", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="0b05", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="413c", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="0489", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="091e", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="12d1", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="24e3", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="2116", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="0482", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="17ef", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="1004", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="22b8", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="0409", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="2080", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="0955", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="2257", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="10a9", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="1d4d", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="0471", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="04da", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="05c6", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="1f53", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="04e8", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="04dd", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="0fce", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="0930", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="19d2", MODE="0666"
    Now you have to set the right permissions to this file, just type
    Code:
    $ sudo cp /tmp/android.rules /etc/udev/rules.d/51-android.rules
    $ sudo chmod 644   /etc/udev/rules.d/51-android.rules
    $ sudo chown root. /etc/udev/rules.d/51-android.rules
    $ sudo service udev restart
    $ sudo killall adb


    SUGGESTED PROGRAMS

    ECLIPSE

    In the Android world you don't want to miss the Eclipse IDE which is the most used! This tool will help you develop android apps
    You can download it here (download the classic one)
    Code:
    $ cd ~/Downloads
    $ tar -zxvf eclipse-SDK-4.2.2-linux-gtk-x86_64.tar.gz
    $ mv ~/Downloads/eclipse ~/development/

    SETUP INFO


    NOTE: If you download the entire ADT bundle provided by google you will get the SDK and Eclipse IDE together

    ANDROID STUDIO (Recommended)
    This is the new development IDE made in Google, personally i love it! We are now on version 8.6 BETA and I have to say that it's a really really good looking and powerful IDE. I would recommend to use this IDE because, over time, it will be the main Android IDE (rumors say that Google will stop developing ADT bundles so Eclipse won't be supported anymore and this will force you to switch to Android Studio).
    You can download it from here
    It has a lot of new features that Eclipse doesn't have and it could be useful in some cases

    Code:
    $ cd ~/Downloads
    $ tar -zxvf android-studio-bundle-130.687321-linux.tgz
    $ mv ~/Downloads/android-studio ~/development/

    To run it you just need to navigate to its bin folder and type
    Code:
    $ ./studio.sh

    If you don't want to type this everytime you can just create a shortcut for it by opening Android Studio and going into Configure > Create desktop entry :) That's it!
    9
    I have got my device now connected in fastboot mode. Thanks again for this great tutorial. I am not a rom builder but a crazy flasher :p I skipped a few steps from the above tutorial to get fastboot and adb working on Ubuntu 13.04.

    To install JDK:

    Start by removing the openJDK if it exists already
    Code:
    sudo apt-get purge openjdk*

    To install Java 8, do this
    Add the PPA:
    Code:
    sudo add-apt-repository ppa:webupd8team/java

    Update the repo index:
    Code:
    sudo apt-get update

    Install Java 8:
    Code:
    sudo apt-get install oracle-java8-installer

    Install GIT from the OP tutorial

    Skip Python install :p

    Skip GNU install :p

    Skip ia32-libs install if you are using 32bit OS

    Download the Android SDK from OP and install it as mentioned there.

    Setup ADB/Fastboot as mentioned in the OP

    Skip Suggested programs :p :cyclops:

    Now connect your device in fastboot mode and type in terminal fastboot to check if your device is recognised, if you get
    "fastboot not installed error"
    Try
    Code:
    sudo apt-get install android-tools-adb android-tools-fastboot

    connect device in fastboot and try :
    Code:
    sudo fastboot devices

    Done ;) :D
    4
    I've updated a little bit the thread, hope this helps :good:
    4
    Code:
    $ sudo apt-get install ia32-libs
    $ y



    gives an error on ubuntu 13.10 will post the exact error when i get back to the desk


    ia32-libs isn't available any more, but instead you can use these libaries:

    Code:
    sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0
    (the error-message you get if you try to install ia32-libs says that, too)

    anyway, adb still wasn't working for me after that because libstdc++6 seemed to be missing, even if it's installed with ubuntu by default... in fact, this was just another 64-bit problem, so you have to go for the 32-bit version:

    Code:
    sudo apt-get install lib32stdc++6

    now everything should work :fingers-crossed:
    3
    hey nice guide !
    I personally am a ubuntu 13.04 user
    just one suggestion , you can add in your thread alternate way of downloading the whole ADT bundle and setting it up; so that separate installation of sdk eclipse adt plugin etc is not required

    Sent from my GT-S5670 using xda premium