[Hero CDMA Android Development] epitaphromance:
I did this in Ubuntu 10.4 linux that i installed on a 14gig partition of my laptop.

You can do this in VMware or make a partition of your HDD and download wubi.exe to install linux on your partition... its easier than installing windows. You can use this to help develop if you know anything, or as i have done, used it to get the uncompiled .9.png's to edit for themeing, bypassing the draw9patch step cause the guides are already there ready to go through eclipse IDE.

INSTALL ALL LINUX UPDATES THAT WILL POPUP WITH AUTO-UPDATER BEFORE GETTING SOURCE.

on to the good stuff.... open up the terminal and run the following commands

sudo nano /etc/apt/sources.list

Then add the following to the bottom by scrolling down with your arrow keys and pasting by right clicking, CTRL-V WONT WORK.

﻿﻿

deb http://cz.archive.ubuntu.com/ubuntu jaunty-updates main multiverse

Hit CTRL O and ENTER to save and CTRL X to return to the command line. Now lets get the repo packages cached onto your box using the following command.

sudo apt-get update

install Java 5 SDK and all the other little packages needed to build Android with this command.

32-bit x86

sudo apt-get install git-core gnupg sun-java5-jdk flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev valgrind

64-bit x86

sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl sun-java5-jdk zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev

sudo update-java-alternatives -s java-1.5.0-sun

sudo ln -s /usr/lib32/libX11.so.6 /usr/lib32/libX11.so

moving on

INSTALLING REPO

You can install repo tool any place in your path. We choose a bin directory in our home folder:

$cd ~
$mkdir bin
$export PATH=$PATH:~/bin
$curl https://android.git.kernel.org/repo >~/bin/repo
$chmod a+x ~/bin/repo

DOWNLOADING ANDROID SOURCE CODE:

Create an empty directory to hold your working files:

$mkdir mydroid
$cd mydroid

# Run repo init to bring down the latest version of Android with all its most recent bug fixes. You must specify a URL for the manifest:

$repo init -u git://android.git.kernel.org/platform/manifest.git

NOTE: using -b option we can choose which android version to install:

$repo init -u git://android.git.kernel.org/platform/manifest.git -b froyo

To pull down files to your working directory from the repositories as specified in the default manifest, run

$repo sync

NOTE: mydroid directory size grows up to 3.6G.

BUILDING ANDROID

Simply on top of your android directory execute make command:

$cd mydroid
$make

After some time it will finish.

We get the installed file list in this file:

out/target/product/generic/installed-files.txt

Also some images are created in the same directory: (system.img userdata.img ramdisk.img)

mydroid$ ls out/target/product/generic/

android-info.txt data obj ramdisk.img symbols system.img

clean_steps.mk installed-files.txt previous_build_config.mk root system userdata.img

We have built android source code but now we want to test it:

run the Android Emulator, which comes within the Android SDK

http://developer.android.com/guide/developing/tools/emulator.html

Download Android SDK

http://developer.android.com/sdk/index.html

Install Android SDK

http://developer.android.com/sdk/installing.html