[Android] Aadi:
Setting Up Your Laptop/PC For Development.​

Installing Python-2.7.5:-

First and foremost is installing Python. For those who are wondering what Python is well here is the answer Python is a language like C,C++,Java which primarily centers around Linux.

1. Open Terminal by hitting Ctrl+Alt+T.

2. Type or copy paste these codes into terminal (I prefer typing though ;))

sudo apt-get install build-essential gcc
cd Downloads
wget http://www.python.org/ftp/python/2.7.5/Python-2.7.5.tgz
tar -xvzf Python-2.7.5.tgz
cd Python-2.7.5
./configure --prefix=/usr/local/python2.7
make
sudo make install
sudo ln -s /usr/local/python2.7/bin/python /usr/bin/python2.7

3. Python is now installed to make sure type this code in terminal

python

and it should produce an output like this

Python 2.7.2+ (default, Jul 20 2012, 22:15:08)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or " lincense" for more information.
>>>

4. If it shows something like that you are good to go.

5. Press Ctrl+D, close the terminal and proceed to install Java 6 JDK.

Installing Java 6 JDK:-

If you are using Ubuntu 12.04 follow these commands others skip this set of commands.

1. Download Java 6 JDK from here.

2. After Downloading copy that to the Downloads folder.

3. Open Terminal.

4. Type these commands one by one in the terminal

cd Downloads

chmod +x jdk-6u34-linux-x64.bin
sudo ./jdk-6u34-linux-x64.bin
sudo mv jdk1.6.0_34 /usr/lib/jvm/

sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_34/bin/java 1
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_34/bin/javac 1
sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_34/bin/javaws 1

sudo update-alternatives --config java
sudo update-alternatives --config javac
sudo update-alternatives --config javaws

If you are not using Ubuntu 12.04 follow these commands:-

1. Open terminal

2. Type these commands one by one in the Terminal.

sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jre sun-java6-bin sun-java6-jdk

If you had done those steps correctly then you must now have Java installed.

To check and make sure it is installed type this command in terminal.

java -version

and the output should be

java version "1.6.0_34"
Java(TM) SE Runtime Environment (build 1.6.0_34-b04)
Java HotSpot(TM) 64-Bit Server VM (build 20.9-b04, mixed mode)

If the output was some thing similar you are now ready to install GNU Make.

Close the Terminal and proceed.

Installing GNU Make 3.81

1. Open Terminal

2. Type these codes in terminal.

wget -o make.tar.gz http://ftp.gnu.org/gnu/make/make-3.81.tar.gz
tar -xvzf make-3.81.tar.gz
cd make-3.81
./configure
sudo make install

3. That's it now you got make installed.

To check and make sure that Make is installed type this command in Terminal.

make -v

and it shoud give the output

GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

This Program built for x86_64-unknown-linux-gnu

If it was something smiliar to that you can close the terminal and proceed to the next step.

Ok now we got the big guns rolling it's now time for small guns without whom we can't compile yes I mean't the dependencies.

Open Terminal and apply these commands:-

sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc gedit git schedtool
export USE_CCACHE=1

If you are using Ubuntu 10.10 apply this:-

sudo ln -s /usr/lib32/mesa/libGL.so.1 /usr/lib32/mesa/libGL.so

If you are using Ubuntu 11.04 apply this:-

sudo ln -s /usr/lib32/mesa/libGL.so.1 /usr/lib32/mesa/libGL.so
sudo apt-get install libx11-dev:i386

If you are using Ubuntu 12.04 apply this:-

sudo ln -s /usr/lib32/mesa/libGL.so.1 /usr/lib32/mesa/libGL.so
sudo apt-get install libx11-dev:i386
sudo apt-get install libncurses5-dev:i386 libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 zlib1g-dev:i386
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so

Good now you will have dependencies installed.

It is now time for SDK and ADB which will be continued in the next post.