[Galaxy S I9000 Android Development] franzyroy:
How I compiled aokp and baked rom

______ _____ __ __ _____
/\ _ \/\ __`\/\ \/\ \ /\ _ `\
\ \ \L\ \ \ \/\ \ \ \/'/'\ \ \L\ \
\ \ __ \ \ \ \ \ \ , < \ \ ,__/
\ \ \/\ \ \ \_\ \ \ \\`\ \ \ \/
\ \_\ \_\ \_____\ \_\ \_\\ \_\
\/_/\/_/\/_____/\/_/\/_/ \/_/

===============================-Package complete-===============================

=================================- by Franzyroy-================================

Prerequisite for all builds:

Based on the tutorial of 'How build CM1O.1'

STEP 1

:

Open a terminal and install the Ubuntu packages:

sudo apt-get install git-core gnupg flex bison python rar original-awk gawk p7zip-full gperf libsdl1.2-dev libesd0-dev libwxgtk2.8-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev pngcrush schedtool
sudo apt-get install libc6-dev x11proto-core-dev libx11-dev libgl1-mesa-dev mingw32 tofrodos python-markdown libxml2-utils
sudo apt-get install g++-multilib lib32z1-dev ia32-libs lib32ncurses5-dev lib32readline-gplv2-dev gcc-multilib g++-multilib xsltproc

STEP 2

:

Install OpenJDK 6:

sudo apt-get install openjdk-6-jdk

STEP 3

:

Install the Android SDK:

-Set up directories:

cd ~
mkdir android
cd android
mkdir sdk

-Download Android SDK from http://developer.android.com/sdk/index.html

-extract it to: ~/android/sdk

-Add Android SDK Path:

sudo gedit ~/.bashrc

Enter the following:

#Android PATH
export PATH=$PATH:~/android/sdk
export PATH=$PATH:~/android/sdk/platform-tools
export PATH=$PATH:~/android/sdk/tools

-Add Extra Path For USB:

sudo gedit /etc/udev/rules.d/99-android.rules

Enter this:

#Samsung
SUBSYSTEM==usb, SYSFS{idVendor}==04e8, MODE=0666

SUBSYSTEM=="usb", ATTRS{idVendor}=="####:####", SYMLINK+="android_adb", MODE="0666" GROUP="plugdev"
TEST=="/var/run/ConsoleKit/database", \
RUN+="udev-acl --action=$env{action} --device=$env{DEVNAME}"

-Save and close the file and run:

sudo chmod +x /etc/udev/rules.d/99-android.rules

-Close and open a new terminal

android

-install the SDK platform tools

STEP 4

:

Installing the repo

-Download the repo:

mkdir -p ~/bin
mkdir -p ~/android/[COLOR="red"]AOKP[/COLOR]
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo

-Add Repo to path:

sudo gedit ~/.bashrc

enter this:

export PATH=$PATH:~/bin

-Add Toolchain path:

sudo gedit ~/.bashrc

enter this:

#Android Toolchain PATH
export ARCH=arm
export CCOMPILE=$CROSS_COMPILE
export CROSS_COMPILE=arm-eabi-
export PATH=$PATH:/home/YOUR-USERNAME/android/[COLOR="Red"]AOKP[/COLOR]/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin

What is in red, it is your folder of destination, in this case, it is AOkP.

**********************************

Building of AOKP (4.2.2):

* Based on the tutorial of Malcho

Create separate folder (for example AOKP).

I've already 'android' folder since that i compiled CM1O.1 therefore I make (AOKP folder is perhaps already created with a command above, therefore maybe no need to do 'mkdir AOKP'):

cd ~/android/
mkdir AOKP
cd AOKP

in that folder.

Type this to Initialize Repository & Sync:

repo init -u https://github.com/AOKP/platform_manifest.git -b jb-mr1
repo sync

Download these 3 files (local_manifest.xml, galaxysmtd.mk and folder aries-common) from here http://rootaxbox.no-ip.org/malcho/AOKP%20Beast/ (thanks to Malcho)

- Local_manifest.xml goes to .repo folder(you have to enable Show hidden files and folders with ctrl + H for example).

- galaxysmtd.mk file goes to vendor/aokp/products

- aries-common folder goes to vendor/aokp/overlay

In folder vendor/aokp/products add this line below to AndroidProducts.mk file.

$(LOCAL_DIR)/galaxysmtd.mk

In folder vendor/aokp add this line below to vendorsetup.sh file.

add_lunch_combo aokp_galaxysmtd-userdebug

After, in /home/android/AOKP

make

repo sync
. build/envsetup.sh

-Connect Phone to computer and type:

adb root
cd ~/android/AOKP/device/samsung/galaxysmtd/
./extract-files.sh

and:

./setup-makefiles.sh

Go to the folder and:

cd ~/android/AOKP/
lunch

choose galaxysmtd

Always in /home/android/AOKP

make

make bacon

ROM will be in folder /out/target/product/galaxysmtd

**********************************

Building of BAKED (4.2.2):

cd ~/android
mkdir BAKED
cd BAKED
repo init -u https://github.com/TeamBAKED/platform_manifest.git -b jb-4.2
repo sync
. build/envsetup.sh && lunch baked_galaxysmtd-userdebug && mka bacon

ROM will be in folder /out/target/product/galaxysmtd