[Samsung Galaxy Mini] A_U:
So this is about settings up the development environment in linux distro, particularly Ubuntu 13/12/11 versions.

Lets begin -

PC Requirements -

A PC running ubuntu 13/12/11 version with minimum of 20Gb HDD space allocated for /root and 50Gb for /home partition. [if compiling JB based roms]

Swap size should be double the size of ur existing RAM memory.

A good processor [Dual core minimum. Quad core recommended]

A fast internet connection for downloading sources.

----------------------------------------------------------------------------------

Things you need -

java sdk

some software packages like bison, perl, git, python etc [mentioned below]

boot image tools [if working with kernels]

android kitchen by dsixda [for basic rom tweaking] [not mandatory, but useful when working with kernels]

Android SDK [for adb, fastboot and app building platform]

eclipse [for app building][will not be covered]

----------------------------------------------------------------------------------

1. Installing oracle java sdk / open jdk

Open jdk is simplest. Just use the applet provided in Ubuntu store and install it. If u want oracle's closed source java sdk , then type these commands. They will work for all latest ubuntu versions. just run one by one in terminal.

this will purge[remove] any old java openjdk versions

sudo apt-get purge openjdk*

just type 1 line after other in terminal..

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

this will install java 7.

----------------------------------------------------------------------------------

2. If u r compiling android roms from source, then u need these packages/software for basic building.

for 32bit and 64 bit pc's

git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.8-dev squashfs-tools build-essential zip curl
libncurses5-dev zlib1g-dev pngcrush schedtool

for 64 bit only

g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline-gplv2-dev gcc-4.7-multilib g++-4.5-multilib

----------------------------------------------------------------------------------

3. Android SDK -

Download the SDK from android developers blog.

Then install the sdk using these commands -

$ mkdir ~/development
$ cd ~/Downloads
$ tar -zxvf android-sdk_r22.0.1-linux.tgz
$ mv ~/Downloads/android-sdk-linux ~/development/

----------------------------------------------------------------------------------

4. For building kernels -

type these -

sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386 git

u also need some toolchain for building kernels. Get them from here.

change directory into something like "cd android" and issue this command.

Then export the specified path of toolchain while building ur kernel.

git clone git://github.com/AndroidUnited/Android_Toolchains

----------------------------------------------------------------------------------

5. Android Kitchen and Boot image tools can be found HERE and HERE.

----------------------------------------------------------------------------------

Future references and other helpful guides -

Kernel building HERE and HERE.

Rom building HERE.

Goodluck :)