[Samsung Galaxy Fit GT 5670] OldDroid:
!NOTICE!

This Guide will be for private use only!
I do not want that you spam Development Section with UNOFFICIAL Nightlys ;)
we all can do, also with this guide xD

​

You need to install Ubuntu 11.04 x64 for this guide, so make sure you have it! (i know its outdated and isnt supported anymore by ubuntu,

but its simply perfect to build android 4.2.1

Ubuntu 11.04 x64 can be downloaded here

Install Android SDK

First of all: Download the Android SDK r21 for Linux x64

After you downloaded it: open your terminal ...

then type in (1Command = 1 Line!)

cd ~
mkdir android
tar -zxvf ~/Downloads/android-sdk_r21-linux.tgz
mv android-sdk-linux ~/android/sdk

Next we need to set up the sdk, to run "adb" command from any directory in terminal

sudo gedit .bashrc

Now add these lines to the bottom of the document:

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

Next is, Set up the 51-android.rules, to get an adb connection from usb to ubuntu:

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

Next, add these lines to the document that has been opened:

SUBSYSTEM=="usb", SYSFS{idVendor}=="0502", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="413c", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="0489", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="091E", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="12d1", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="0482", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="1004", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="22b8", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="0955", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="10A9", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="04e8", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="04dd", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="0fce", MODE="0666"
SUBSYSTEM=="usb", SYSFS{idVendor}=="19D2", MODE="0666"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="04e8", ATTRS{idProduct}=="6860", MODE="0666", OWNER="leob" #Galaxy Nexus

Gratulation, u finally setted up the Android SDK :D (Dont worry if Android SDK wont work [ADB]! it needs a package we download later :o)

Installing JAVA 6 (JDK)

type in terminal: (remember: 1 line = 1 command)

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

(TIP: Use to keyboard (Right-Left-Top-Bottom)-Button to press ok & yes)

Installing the SDK

type in terminal (remember 1 line one command!)

cd android
cd sdk
cd tools
./android

Now the SDK Manager will be opened!

tick the small box leftside of the "SDK Android Platform tools" Part!

After its done, click "install 1 package..."

Now a window gets opened, select "Accept All ..." and click "Install"

After its done, click "close"! gratulations you now have the SDK installed

Installing required depencies

Im devloping on a 64 Bit Platform of Ubuntu 11.04 (I recommend it ;): (copy and paste this completely in terminal & press ok ^^)

sudo apt-get install git-core gnupg flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev valgrind gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32z-dev pngcrush schedtool

After thats done, you need to download an lib manually :/

The name of the lib is libreadline5-dev, download it from ubuntu directly ;)

Download Link (Credits: Ubuntu)

After it has been downloaded, goto your downloads folder and double press it (Name: lib32readline5-dev_5.2-7build1_amd64.deb) ...

Simply tap "install in the opened Ubuntu Software-Center ^^

Syncing the Source

In terminal: (1 line = 1 command)

This is only to initialize the GIT commands to sync the repo later :o

cd ~
mkdir bin

Now i recommend to close all Terminals! (BEST: Reboot Ubuntu)

After its done, open Terminal once more and type in (1 line = 1 command):

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

Now cd to android:

cd android

Then create a new directory:

mkdir cm-10.1

(just for example / but you can do it)

Now cd to your created directory:

cd cm-10.1

After that you can initialize the repo command! (1 line = 1 command!)

repo init -u git://github.com/androidarmv6/android.git -b cm-10.1

Now you can sync the repo to your local directory! (REMEMBER: This takes minutes [for me] and hours, days maybe for you!)

repo sync

Do the syncing step before, otherwise all will fail

To build CM10.1 for Fit simply do:

. build/envsetup.sh && brunch beni