Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,733,293 Members 38,374 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
wulsic
Old
(Last edited by wulsic; 18th May 2014 at 10:30 PM.) Reason: Added automatic sync with my cm10 repository folder
#1  
wulsic's Avatar
Senior Member - OP
Thanks Meter 544
Posts: 611
Join Date: Aug 2013
Location: Nijmegen
Default [GUIDE]How to Build your own CM10 from Local sources for the Galaxy Fame

Hello guys since there is no Cyanogenmod for this device only an custom recovery (no custom roms) or any really development except for stripping stockrom and tweaking it a bit i decided to make it for an friend and since 3 people of my class have this phone i am founding it pretty an unstable phone with all the stock crap bloatware.
I could make my friends phone hang with whatsapp spamming messages what is pretty pathetic.
So i contacted Corsicanu for the sourcecode of recovery what is an very important piece of the source code for not to brick you peopleīs phone and i also received some in/complete source code from adytzu33. I am trying to make the compiling work i am almost done with making it to completely work but i donīt have always time so if you can fix everything by yourself do it and upload it to here so i can adjust the guide for future developers for the fame. Watchout cause this sourcecode is for the galaxy fame p s6810p so far as i know.
If my tutorial broke yourphone from flashing an build then its not my fault
Check good or the partitions are good before flashing. Since i dont have the phone i cant test it.



Preparation:

What you need for building.
An decent PC with enough space i recommend like 80gb
Internet connection
Time and Patience
Up to date running Ubuntu/linux system i am using 12.10.

Installation of the required packages to compile:
Code:
$ sudo apt-get install git-core gnupg flex bison gperf build-essential \
  zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
  libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
  libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos \
  python-markdown libxml2-utils schedtool pngcrush xsltproc zlib1g-dev:i386
Settings the links to the files:
Code:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Step 2 Installing java:

You need the java development kit for building cm10 the most recommended is the one from sun jdk 6 update 38.

1. Download the jdk-6u38-linux-i586.bin from the Oracle/Sun Java Download Area. If you are on 64-bit Ubuntu as I am, you should grab jdk-6u38-linux-x64.bin
http://www.mediafire.com/download/wy...-linux-x64.bin (mirror for 64bit)
2. Go to your Download location and execute this command below.
Code:
chmod +x jdk-6u38-linux-x64.bin
3. Extract the bin file:

Code:
$ ./jdk-6u38-linux-x64.bin
4. Move the extracted folder to this this location:

Code:
$ sudo mv jdk1.6.0_38 /usr/lib/jvm/./jdk-6u38-linux-x64.bin
5. Install the new Java source in system:

Code:
$ sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk-6u38-linux-x64.bin/bin/javac 1
$ sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk-6u38-linux-x64.bin/bin/java 1
$ sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk-6u38-linux-x64.bin/bin/javaws 1
$ sudo update-alternatives --install /usr/bin/javadoc javadoc /usr/lib/jvm/jdk-6u38-linux-x64.bin/bin/javadoc 1
$ sudo update-alternatives --install /usr/bin/javah javah /usr/lib/jvm/jdk-6u38-linux-x64.bin/bin/javah 1
$ sudo update-alternatives --install /usr/bin/javap javap /usr/lib/jvm/jdk-6u38-linux-x64.bin/bin/javap 1
$ sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk-6u38-linux-x64.bin/bin/jar 1
6. 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
7. Check Java version:

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

Code:
$ ls -la /etc/alternatives/java* && ls -la /etc/alternatives/jar
Step 3: 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 https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
Create working directory:

Code:
$ mkdir ~/cm10
$ cd ~/cm10
Initialize Repo:
Code:
$ repo init -u git://github.com/CyanogenMod/android.git -b jellybean
and enter your credentials.

Download the sources:
Code:
$ repo sync
Wait until it's finished (takes a lot of time! depending on your internet connection)

If the process hangs use Ctrl+C to break out of it and resume the download with another

Code:
$ repo sync
Tip from ethansp: 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
Go to your Cm10 Repository folder and press CTRL+H
Go to .Repo/local_manifests and create local_manifest.xml
Paste these lines into it and repo sync after it again.
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
  <project name="wulsic/android_device_samsung_nevisp.git" path="device/samsung/nevisp" remote="github" revision="master"/>
 <project name="wulsic/android_vendor_samsung_nevisp.git" path="vendor/samsung/nevisp" remote="github" revision="master"/>
<project name="wulsic/android_frameworks.git" path="framework/" remote="github" revision="master"/>
</manifest>
Download the neccesary Cyanogenmod prebuilts:
Code:
~/cm10/vendor/cm/get-prebuilts
Step4: Building the rom

Now try to build it.
Code:
Brunch nevisp
And now the building process starts. Building takes from an half hour( very fast pc) to 2 hour on very slow pcīs maybe even more.
When everything gone fine (Canīt the guide is not finished there are still some little errors in compiling i need to fix or maybe you devīs.) you can find the flashable zip in ~/cm10/out/target/product/nevisp

It would be called cm-10-DATE-UNOFFICIAL-nevisp-zip. You can directly flash it cause it is already an flashable zip.

Step5:Rebuilding with newest sources:

Code:
$ cd ~/cm10
$ repo sync
$ . build/envsetup.sh
$ brunch nevisp
The building should now take a lot less time cause it only rebuilds it and its using old parts what havenīt changed.

For more Handy tips see this link where i based the guide off http://forum.xda-developers.com/show....php?t=1971645

Credits:All credits goes to Raum1807 for making the guide i only edit it for people so its easier for compiling for the fame.
And to corsicanu for giving me the sourcecode from adytzu33t and the cm10.1 recovery what could be also handy for beginning cm10.1 but first cm10
and adytzu33 for the sourcecode from cm10 but unfortunatly he was last online in march.

If you have problems then post it here in the thread i can help you to get compiling so far as i am since i now have the knowledge again for cm10 and you guys can help me.
Devices i owned
Htc Elf-Htc Google Nexus One-LG Optimus 2X-Samsung Galaxy S2-LG Nexus4

My status:
HDD Half working :/ Ubuntu went black. Windows first 60FPS with Titanfall now 20-30 with laggspikes to 0FPS Time for a replacement soon..
Phoneless nothing to customize now so bored...

HIT the button
The Following 4 Users Say Thank You to wulsic For This Useful Post: [ Click to Expand ]
 
wulsic
Old
#2  
wulsic's Avatar
Senior Member - OP
Thanks Meter 544
Posts: 611
Join Date: Aug 2013
Location: Nijmegen
If you have the same error like me here what i will solve today after like 12hours when i standup again then you have the same progress like me.
Going to sleep now just bring the old devs back to life on this forum cause its almost completely death if you ask me.
Reserved for Progress:

Code:
target Strip: libvariablespeed (/home/wulsic/cm10/out/target/product/nevisp/obj/lib/libvariablespeed.so)
Install: /home/wulsic/cm10/out/target/product/nevisp/system/lib/libvariablespeed.so
/home/wulsic/cm10/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/../../../../arm-linux-androideabi/bin/ld: /home/wulsic/cm10/out/target/product/nevisp/obj/STATIC_LIBRARIES/libLLVMAsmPrinter_intermediates/libLLVMAsmPrinter.a(AsmPrinter.o): in function llvm::AsmPrinter::EmitFunctionHeader():external/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:477: error: undefined reference to 'llvm::DwarfDebug::beginFunction(llvm::MachineFunction const*)'
/home/wulsic/cm10/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/../../../../arm-linux-androideabi/bin/ld: /home/wulsic/cm10/out/target/product/nevisp/obj/STATIC_LIBRARIES/libLLVMAsmPrinter_intermediates/libLLVMAsmPrinter.a(AsmPrinter.o): in function llvm::AsmPrinter::EmitFunctionBody():external/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:685: error: undefined reference to 'llvm::DwarfDebug::beginInstruction(llvm::MachineInstr const*)'
/home/wulsic/cm10/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/../../../../arm-linux-androideabi/bin/ld: /home/wulsic/cm10/out/target/product/nevisp/obj/STATIC_LIBRARIES/libLLVMAsmPrinter_intermediates/libLLVMAsmPrinter.a(AsmPrinter.o): in function llvm::AsmPrinter::EmitFunctionBody():external/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:727: error: undefined reference to 'llvm::DwarfDebug::endInstruction(llvm::MachineInstr const*)'
/home/wulsic/cm10/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/../../../../arm-linux-androideabi/bin/ld: /home/wulsic/cm10/out/target/product/nevisp/obj/STATIC_LIBRARIES/libLLVMAsmPrinter_intermediates/libLLVMAsmPrinter.a(AsmPrinter.o): in function llvm::AsmPrinter::EmitFunctionBody():external/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:788: error: undefined reference to 'llvm::DwarfDebug::endFunction(llvm::MachineFunction const*)'
/home/wulsic/cm10/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/../../../../arm-linux-androideabi/bin/ld: /home/wulsic/cm10/out/target/product/nevisp/obj/STATIC_LIBRARIES/libLLVMAsmPrinter_intermediates/libLLVMAsmPrinter.a(AsmPrinter.o): in function llvm::AsmPrinter::doFinalization(llvm::Module&):external/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:895: error: undefined reference to 'llvm::DwarfDebug::endModule()'
/home/wulsic/cm10/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/../../../../arm-linux-androideabi/bin/ld: /home/wulsic/cm10/out/target/product/nevisp/obj/STATIC_LIBRARIES/libLLVMAsmPrinter_intermediates/libLLVMAsmPrinter.a(AsmPrinter.o): in function llvm::AsmPrinter::doFinalization(llvm::Module&):external/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:897: error: undefined reference to 'llvm::DwarfDebug::~DwarfDebug()'
/home/wulsic/cm10/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/../../../../arm-linux-androideabi/bin/ld: /home/wulsic/cm10/out/target/product/nevisp/obj/STATIC_LIBRARIES/libLLVMAsmPrinter_intermediates/libLLVMAsmPrinter.a(AsmPrinter.o): in function llvm::AsmPrinter::doInitialization(llvm::Module&):external/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:205: error: undefined reference to 'llvm::ARMException::ARMException(llvm::AsmPrinter*)'
/home/wulsic/cm10/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/../../../../arm-linux-androideabi/bin/ld: /home/wulsic/cm10/out/target/product/nevisp/obj/STATIC_LIBRARIES/libLLVMAsmPrinter_intermediates/libLLVMAsmPrinter.a(AsmPrinter.o): in function llvm::AsmPrinter::doInitialization(llvm::Module&):external/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:208: error: undefined reference to 'llvm::Win64Exception::Win64Exception(llvm::AsmPrinter*)'
/home/wulsic/cm10/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/../../../../arm-linux-androideabi/bin/ld: /home/wulsic/cm10/out/target/product/nevisp/obj/STATIC_LIBRARIES/libLLVMAsmPrinter_intermediates/libLLVMAsmPrinter.a(AsmPrinter.o): in function llvm::AsmPrinter::doInitialization(llvm::Module&):external/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:202: error: undefined reference to 'llvm::DwarfCFIException::DwarfCFIException(llvm::AsmPrinter*)'
/home/wulsic/cm10/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/../../../../arm-linux-androideabi/bin/ld: /home/wulsic/cm10/out/target/product/nevisp/obj/STATIC_LIBRARIES/libLLVMAsmPrinter_intermediates/libLLVMAsmPrinter.a(AsmPrinter.o): in function llvm::AsmPrinter::doInitialization(llvm::Module&):external/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:195: error: undefined reference to 'llvm::DwarfDebug::DwarfDebug(llvm::AsmPrinter*, llvm::Module*)'
collect2: ld returned 1 exit status
make: *** [/home/wulsic/cm10/out/target/product/nevisp/obj/SHARED_LIBRARIES/libbcc_intermediates/LINKED/libbcc.so] Error 1
make: *** Waiting for unfinished jobs....
Devices i owned
Htc Elf-Htc Google Nexus One-LG Optimus 2X-Samsung Galaxy S2-LG Nexus4

My status:
HDD Half working :/ Ubuntu went black. Windows first 60FPS with Titanfall now 20-30 with laggspikes to 0FPS Time for a replacement soon..
Phoneless nothing to customize now so bored...

HIT the button
The Following 3 Users Say Thank You to wulsic For This Useful Post: [ Click to Expand ]
 
faizauthar12
Old
#3  
faizauthar12's Avatar
Senior Member
Thanks Meter 97
Posts: 192
Join Date: Jan 2014
Location: Jakarta
Thanks for give us guide, I want to try
After I download ubuntu
Sent from my GT-S6810 using XDA Premium 4 mobile app
If you feel i help you please Hit Thanks button ,i am verry happy for that
The Following User Says Thank You to faizauthar12 For This Useful Post: [ Click to Expand ]
 
wulsic
Old
(Last edited by wulsic; 18th May 2014 at 11:23 PM.) Reason: Adding the progress.
#4  
wulsic's Avatar
Senior Member - OP
Thanks Meter 544
Posts: 611
Join Date: Aug 2013
Location: Nijmegen
EDIT:
Compiling problems fixed thanks to corsicanu, he fixed the boardconfig.mk and the recovery.fstab so without him i would still be figuring out what to edit by those files.
Now we only need testers to log the problems from boot so we can fix those problems.
Here is staying the compiling guide and it will stay in update with the repository so i will push fixes to the repo and merge fixes from people who review the sourcecode.
I will create a new thread in the Original android development thread since its not modified stock but it will be the first cyanogenmod 10 for the fame.
The build wasnīt really on time it was 18 minutes later posted then i said i would make it but that doesnīt matter i think.
Development Thread:
http://forum.xda-developers.com/show...php?p=52756482
Devices i owned
Htc Elf-Htc Google Nexus One-LG Optimus 2X-Samsung Galaxy S2-LG Nexus4

My status:
HDD Half working :/ Ubuntu went black. Windows first 60FPS with Titanfall now 20-30 with laggspikes to 0FPS Time for a replacement soon..
Phoneless nothing to customize now so bored...

HIT the button
The Following 3 Users Say Thank You to wulsic For This Useful Post: [ Click to Expand ]
 
John Blueh
Old
#5  
Junior Member
Thanks Meter 1
Posts: 6
Join Date: May 2014
Location: Brazil
I can compile and install on my GT-6810B?

I am Brazilian and I'm using Google Translator
 
wulsic
Old
#6  
wulsic's Avatar
Senior Member - OP
Thanks Meter 544
Posts: 611
Join Date: Aug 2013
Location: Nijmegen
Well you can compile it but i am still finding out or everything is compatible with each other so i mean all the fame phones since i do not own it and i still need to dig In the specifications and threads here i cant promise anything. We are still trying to make logcat work on the s6810/p so i just want to say that its better that you will first wait till we have hammered out all the problems. Else you might be able to compile it but it wil not boot. Hold an Eye on the thread mentioned above for progressieve.

Verstuurd vanaf mijn Nexus 4 met Tapatalk
Devices i owned
Htc Elf-Htc Google Nexus One-LG Optimus 2X-Samsung Galaxy S2-LG Nexus4

My status:
HDD Half working :/ Ubuntu went black. Windows first 60FPS with Titanfall now 20-30 with laggspikes to 0FPS Time for a replacement soon..
Phoneless nothing to customize now so bored...

HIT the button
 
John Blueh
Old
#7  
Junior Member
Thanks Meter 1
Posts: 6
Join Date: May 2014
Location: Brazil
Thanks, I think it best to wait
The Following User Says Thank You to John Blueh For This Useful Post: [ Click to Expand ]
 
faizauthar12
Old
#8  
faizauthar12's Avatar
Senior Member
Thanks Meter 97
Posts: 192
Join Date: Jan 2014
Location: Jakarta
Quote:
Originally Posted by John Blueh View Post
Thanks, I think it best to wait
Maybe you can help him on this thread http://forum.xda-developers.com/show....php?t=2755948


Sent from my GT-S6810 using XDA Premium 4 mobile app
If you feel i help you please Hit Thanks button ,i am verry happy for that
 
misha_android
Old
#9  
misha_android's Avatar
Junior Member
Thanks Meter 11
Posts: 14
Join Date: Nov 2013
Location: Ukraine

 
DONATE TO ME
Thanks [emoji4]

Отправлено с моего GT-S6810 через Tapatalk
 
wulsic
Old
(Last edited by wulsic; 28th June 2014 at 05:41 PM.)
#10  
wulsic's Avatar
Senior Member - OP
Thanks Meter 544
Posts: 611
Join Date: Aug 2013
Location: Nijmegen
Misha_android if you got problems with compiling just post it here or send a message tot me.

Verstuurd vanaf mijn Nexus 4 met Tapatalk

CM11 coming soon.
Devices i owned
Htc Elf-Htc Google Nexus One-LG Optimus 2X-Samsung Galaxy S2-LG Nexus4

My status:
HDD Half working :/ Ubuntu went black. Windows first 60FPS with Titanfall now 20-30 with laggspikes to 0FPS Time for a replacement soon..
Phoneless nothing to customize now so bored...

HIT the button

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes