[Galaxy S Plus I9001 Android Development] Xistance:
I thought that this would get the development of JB for our device a bit faster. I am going to be explaining for Ubuntu 12.04 and up.

If you get any errors use pastebin and link it here. Good luck :)

Requirements

64bit Ubuntu

You will need 25GB (or more) free to complete a single build, and up to 80GB (or more) for a full set of builds.

JDK 6

sudo apt-get install openjdk-6-jdk

Python 2.4--2.7

sudo apt-get install python

Git 1.7 or newer

sudo apt-get install git-core

Installing Android SDK

Download the SDK here: http://developer.android.com/sdk/index.html

Extract the SDK and place it in your home directory.

I renamed my SDK to android-sdk to make it easier to navigate to.

Go to your home folder, press Ctrl+H to show hidden files, and open up your .bashrc file.

Add these lines at the bottom of the file(Change path according to your SDK dir):

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

Find your .profile file and add this at the bottom of the file:

PATH="$HOME/android-sdk/tools:$HOME/android-sdk/platform-tools:$PATH"

Check for updates by entering this in terminal:

android

Install required packages(12.04)

sudo apt-get install git gnupg flex bison gperf build-essential \
zip curl libc6-dev libncurses5-dev x11proto-core-dev \
libx11-dev libreadline6-dev libgl1-mesa-glx \
libgl1-mesa-dev g++-multilib mingw32 tofrodos \
python-markdown libxml2-utils xsltproc zlib1g-dev
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so

Configure your USB

gksudo gedit /etc/udev/rules.d/51-android.rules

Inside of the blank text file insert :

#Acer
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666"

#ASUS
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666"

#Dell
SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0666"

#Foxconn
SUBSYSTEM=="usb", ATTR{idVendor}=="0489", MODE="0666"

#Garmin-Asus
SUBSYSTEM=="usb", ATTR{idVendor}=="091E", MODE="0666"

#Google
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666"

#HTC
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666"

#Huawei
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666"

#K-Touch
SUBSYSTEM=="usb", ATTR{idVendor}=="24e3", MODE="0666"

#KT Tech
SUBSYSTEM=="usb", ATTR{idVendor}=="2116", MODE="0666"

#Kyocera
SUBSYSTEM=="usb", ATTR{idVendor}=="0482", MODE="0666"

#Lenevo
SUBSYSTEM=="usb", ATTR{idVendor}=="17EF", MODE="0666"

#LG
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666"

#Motorola
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666"

#NEC
SUBSYSTEM=="usb", ATTR{idVendor}=="0409", MODE="0666"

#Nook
SUBSYSTEM=="usb", ATTR{idVendor}=="2080", MODE="0666"

#Nvidia
SUBSYSTEM=="usb", ATTR{idVendor}=="0955", MODE="0666"

#OTGV
SUBSYSTEM=="usb", ATTR{idVendor}=="2257", MODE="0666"

#Pantech
SUBSYSTEM=="usb", ATTR{idVendor}=="10A9", MODE="0666"

#Philips
SUBSYSTEM=="usb", ATTR{idVendor}=="0471", MODE="0666"

#PMC-Sierra
SUBSYSTEM=="usb", ATTR{idVendor}=="04da", MODE="0666"

#Qualcomm
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0666"

#SK Telesys
SUBSYSTEM=="usb", ATTR{idVendor}=="1f53", MODE="0666"

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

#Sharp
SUBSYSTEM=="usb", ATTR{idVendor}=="04dd", MODE="0666"

#Sony Ericsson
SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0666"

#Toshiba
SUBSYSTEM=="usb", ATTR{idVendor}=="0930", MODE="0666"

#ZTE
SUBSYSTEM=="usb", ATTR{idVendor}=="19D2", MODE="0666"

Save the file and enter this into the terminal :

sudo chmod a+r /etc/udev/rules.d/51-android.rules

Install repo

mkdir -p ~/bin
mkdir -p ~/android-sdk
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo

Initialize the repo(use "-b jellybean" for CM10)

mkdir WORKING_DIRECTORY
cd WORKING_DIRECTORY
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1

When asked for, enter your real name and email.

Sync your repo

Enter this into terminal. This will take a while according to your connection.

repo sync -j16

Add i9001 to the device list

Change your directory to where you will clone the device tree:

cd WORKING_DIRECTORY/device
mkdir samsung
cd samsung

Clone the device tree from remote to local (Change git to whatever you want, I used the ADC team as an example) :

git clone git://github.com/AriesVE-DevCon-TEAM/android_device_samsung_ariesve.git -b cm-10.1 ariesve

NOTE: Use -b jb-3.0 for CM10

Now cd to ariesve :

cd ariesve

Connect your phone to your computer and make sure debugging is open and adb is set up.

Get vendor files :

cd ~/WORKING_DIRECTORY/vendor
mkdir samsung
cd samsung
git clone git://github.com/ivendor/android_vendor_samsung_ariesve.git -b jellybean ariesve

Get extra files

~/WORKING_DIRECTORY/vendor/cm/get-prebuilts

Go back to your home dir to build :

cd ~/WORKING_DIRECTORY

Get some needed files

FOR CM10.1:

You can either fetch from a dev's git or just download frameworks/av and frameworks/native completely and replace it with your own if you find that easier. I'll just do the latter for the sake of simplicity:

cd frameworks
rm -rf av
rm -rf native
git clone https://github.com/camcory/android_frameworks_av.git -b cm-10.1 av
git clone https://github.com/camcory/android_frameworks_native.git -b cm-10.1 native
cd ..

FOR CM10:

Download this script and give it permission to execute in settings and open it. Choose to run from terminal and follow the script. This should fix any errors you get while compiling. Credits to blackmambazzz for the script.

[url]http://www.mediafire.com/?b1kj0slcwo9r707[/url]

Build CM

Prepare to compile :

. build/envsetup.sh

Now compile for device

brunch ariesve -j#

Fixes for some errors

If you are running into issues such as:

Which would you like? [full-eng] 5
build/core/product_config.mk:209: *** No matches for product "ariesve". Stop.
Device ariesve not found. Attempting to retrieve device repository from CyanogenMod Github (http://github.com/CyanogenMod).
Repository for shooter not found in the CyanogenMod Github repository list. If this is in error, you may need to manually add it to your local_manifest.xml.
build/core/product_config.mk:209: *** No matches for product "ariesve". Stop.

** Don't have a product spec for: 'ariesve'
** Do you have the right repo manifest?

What you need to do is to edit your blob to match the PRODUCT_NAME to the file name. For example with mine I have full_ariesve.mk therefore in this file I need to have PRODUCT_NAME to match it. Whatever error it is looking for you just need to change the PRODUCT_NAME line to match what the error shows.

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

If you run into issues with Java being the incorrect version here is the fix:

Make sure Java 6 JDK is installed by typing in:

java -version

Open the file main.mk in build/core and delete this line from the java error code section:

$(error stop)

Credits

arco68

ivendor

Doomsday94

dastin1015

camcory

This tutorial is based off of this one : http://xdaforums.com/showthread.php?t=1762641

This is my first time making a tutorial so please tell me if I missed something :). I wish you guys luck on your builds.

Here is an example of what happens if it builds correctly :D :