Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[GUIDE]How to Build your own CM11 from Local sources for the Galaxy Fame

OP wulsic

13th September 2014, 01:26 PM   |  #1  
wulsic's Avatar
OP Recognized Contributor
Flag Nijmegen
Thanks Meter: 1,012
 
1,195 posts
Join Date:Joined: Aug 2013
More
Hello guys, since I don't have the time of the world to finish easily the cm11 project because of school I am posting here the updated guide to compile CM11 so Fame Dev's could like finish the project and make an fully working cyanogenmod

Overview

I. Preparation
II. Installation of the required packages
III. Installing Java
IV. The sources
V. Building the ROM
VI. Rebuilding with newest sources


I. Preparation

Things you need for building:

A computer
An internet connection
An open mind
Time
Patience

First of all, you need a running up-to-date Ubuntu/Linux system. I am using Ubuntu 14.04 64-bit.

Use the terminal to make the steps. A terminal window can be opened by pressing Ctrl+Alt+T. Every single command for the terminal is marked with a $ sign. Just paste every command (without the $ sign) to your terminal window and there shouldn't be any problem.

IMPORTANT: INSTALL EVERYTHING AS A NORMAL USER. DON'T INSTALL AS ROOT!


II. Installation of the required packages (Ubuntu 13.10 64-bit)

Install packages:
Code:
$ sudo apt-get install bison build-essential curl flex \
g++-multilib gcc-multilib git-core gnupg gperf \
lib32ncurses5-dev lib32readline-gplv2-dev lib32z1-dev \
libesd0-dev libncurses5-dev libsdl1.2-dev \
libwxgtk2.8-dev libxml2 libxml2-utils lzop \
openjdk-6-jdk openjdk-6-jre pngcrush schedtool \
squashfs-tools xsltproc zip zlib1g-dev
III. Installing Java
[/FONT]
You need a version 6 Java Development Kit for building CM11.0. Usually, the SUN JDK 6 is recommended. But there is another way: you can use the OpenJDK 6. When you installed the required packages as described above, you will just need to configure your Java installation.

Check your Java version:
Code:
$ java -version
Verify the symlinks. Javac, Java, Javaws, Javadoc, Javah, Javap and Jar should all point to the right Java location and version:

Code:
$ ls -la /etc/alternatives/java* && ls -la /etc/alternatives/jar
If they are pointing to the wrong versions you have to change that to OpenJDK6.

Select the default Java version for your system:
Code:
$ sudo update-alternatives --config javac 
$ sudo update-alternatives --config java 
$ sudo update-alternatives --config javaws 
$ sudo update-alternatives --config javadoc 
$ sudo update-alternatives --config javah 
$ sudo update-alternatives --config javap 
$ sudo update-alternatives --config jar
That's it.



IV. The sources

Install repo:

Repo is a tool that makes it quite easy to download and maintain the sources of Cyanogenmod.
Code:
$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ cd ~/bin
$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
Create the working directory:
Code:
$ mkdir ~/cm11
$ cd ~/cm11
Initialize Repo:
Code:
$ repo init -u http://github.com/CyanogenMod/android.git -b cm-11.0
and enter your credentials.

Download the sources:
Code:
$ repo sync
Wait until it's finished - takes some time to download the hefty 15-35 GB of source code!

Have a break, have a KitKat!

If the process hangs use Ctrl+C to break out of it and resume the download with another
Code:
$ repo sync
If you are running into a lot of syncing errors the reason might be that the 'repo sync' command is establishing four threads automatically. This might be too much. So try to change the command to run with one thread only by using
Code:
$ repo sync -j1
Initialize the environment
Code:
$ . build/envsetup.sh
Obtain the proprietary files:

create a file with the name local_manifest.xml in the local_manifests directory. To see this directory, you have to press Ctrl-H in your file manager.

Use this code
Code:
$ gedit ~/cm11/.repo/local_manifests/local_manifest.xml
Paste the following lines to the editor
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
  <project name="wulsic/android_device_samsung_nevispcm11.git" path="device/samsung/nevisp" remote="github" revision="master"/>
 <project name="wulsic/android_vendor_samsung_nevispcm11.git" path="vendor/samsung/nevisp" remote="github" revision="master"/>
 <project name="wulsic/android_kernel_samsung_nevispcm11.git" path="kernel/samsung/nevisp" remote="github" revision="master"/>
</manifest>
Save the file. (Replace the device revision with Testing if you want to get my Testing branch.)

Run
Code:
$ repo sync
again to get the files needed.

Download the necessary prebuilts from cyanogenmod by running
Code:
$ cd ~/cm11/vendor/cm
$ . get-prebuilts
$ croot
And you're done!


V. Building the ROM

Now build it:
Code:
$ brunch nevisp
And the building process starts. Now have patience. Building takes around half an hour on fast systems and a lot more on older and slower machines.

When everything worked as it should you will find your new ROM-image in ~/cm11/out/target/product/nevisp

It is called cm-11-DATE-UNOFFICIAL-nevisp-zip. You can flash it via CWM

VI. Rebuilding with newest sources

Whenever you like to update your sources and build a new version you have to run these four simple commands:
Code:
$ cd ~/cm11
$ repo sync
$ . build/envsetup.sh
$ brunch nevisp
Compiling takes less time than it took for creating the ROM the first time because it's only building new parts while reusing old parts that haven't changed.


Happy building!
[/QUOTE]

Big thanks to Raum1807 Since this is his guide but modified for the Fame Dev's/People to keep it easier. I had his permission for this.
Stop by his thread and thank him for his guide http://forum.xda-developers.com/nexu...od-11-t2515305
Thanks to Google for android and Cyanogenmod well for Cyanogenmod ofcourse ;p

I hope this Guide is good since I screwed up my ubuntu again... Please report to me if there is a mistake in the OP.
Last edited by wulsic; 19th November 2014 at 11:31 PM.
The Following 2 Users Say Thank You to wulsic For This Useful Post: [ View ]
13th September 2014, 01:27 PM   |  #2  
wulsic's Avatar
OP Recognized Contributor
Flag Nijmegen
Thanks Meter: 1,012
 
1,195 posts
Join Date:Joined: Aug 2013
More
Reserved:
You can flash the cm11 builds by flashing the Selinux enabled Clockworkmod recovery:https://drive.google.com/file/d/0B1u...it?usp=sharing

Or compile a new clockworkmod recovery by yourself since you are already compiling android but I believe this is already automatically done.
Last edited by wulsic; 13th September 2014 at 01:29 PM.
The Following 2 Users Say Thank You to wulsic For This Useful Post: [ View ]
16th September 2014, 07:08 PM   |  #3  
John Blueh's Avatar
Member
Flag Brazil
Thanks Meter: 3
 
30 posts
Join Date:Joined: May 2014
More
Question
Does it work on S6810B?

Sorry my english, I'm Brazilian and do not speak well in English.

by: Google Translate
17th September 2014, 12:30 PM   |  #4  
faizauthar12's Avatar
Senior Member
Flag Jakarta
Thanks Meter: 153
 
304 posts
Join Date:Joined: Jan 2014
More
Quote:
Originally Posted by John Blueh

Does it work on S6810B?

Sorry my english, I'm Brazilian and do not speak well in English.

by: Google Translate

try it,,yyou just need to change the repo
17th September 2014, 05:54 PM   |  #5  
wulsic's Avatar
OP Recognized Contributor
Flag Nijmegen
Thanks Meter: 1,012
 
1,195 posts
Join Date:Joined: Aug 2013
More
Quote:
Originally Posted by John Blueh

Does it work on S6810B?

Sorry my english, I'm Brazilian and do not speak well in English.

by: Google Translate

John blueh I am not sure, the S6810B is dualsim model right? The only thing you have to change then is maybe device model and somethings in the ramdisk related to the device model.
But I could not make cm11 boot yet, probably an ramdisk issue since I am doing it blindly its going harder especially with school.

I hope you could maybe also invest your time in it a bit and make an fully working cm11 only problems so far are related to the kernels ramdisk so far as I know.

I hope google translates this good for you.
The Following User Says Thank You to wulsic For This Useful Post: [ View ]
26th September 2014, 02:32 PM   |  #6  
faizauthar12's Avatar
Senior Member
Flag Jakarta
Thanks Meter: 153
 
304 posts
Join Date:Joined: Jan 2014
More
i got problem :/ ,,see below
Last edited by faizauthar12; 26th September 2014 at 02:39 PM.
Post Reply Subscribe to Thread

Tags
compiling, cyanogenmod11, guide
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes