[GUIDE CM14.1] How to build your own CyanogenMod 14.1 ROM from sources for GT-i9505 - Galaxy S 4 General

Make your 'own' Nougat-ROM today!
Thank you note: Thank you to the whole CM-Team for bringing up-to-date-Android to so many devices.
Overview
I. Preparation
II. Installation of the required packages
III. The sources
IV. Building the ROM
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 Debian Stretch (testing) 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 (Debian Stretch (testing) 64-bit)
For both 32-bit & 64-bit systems, you'll need:
Code:
$ sudo apt-get install bison build-essential curl flex \
git gnupg gperf libesd0-dev liblz4-tool \
libncurses5-dev libsdl1.2-dev libwxgtk2.8-dev libxml2 libxml2-utils \
lzop maven openjdk-7-jdk pngcrush schedtool \
squashfs-tools xsltproc zip zlib1g-dev
In addition to the above, for 64-bit systems, get these:
Code:
$ sudo apt-get install g++-multilib gcc-multilib \
lib32ncurses5-dev lib32readline-gplv2-dev lib32z1-dev
For Ubuntu 15.10 (wily) and newer, substitute:
lib32readline-gplv2-dev -> lib32readline6-dev
For Ubuntu 16.04 (xenial) and newer, substitute (additionally see java notes below):
libwxgtk2.8-dev -> libwxgtk3.0-dev
openjdk-7-jdk -> openjdk-8-jdk
Java versions: Different versions of CyanogenMod require different versions of the JDK (Java Development Kit):
CyanogenMod 7 - 9: Sun/Oracle Java SE 1.6
CyanogenMod 10.1: Sun/Oracle Java SE 1.6 or 1.7
CyanogenMod 10.2 - 11.0: Sun/Oracle Java SE 1.6 or 1.7 (OpenJDK 1.7 works fine, but the build system will display a warning)
CyanogenMod 12.0 - 13.0: OpenJDK 1.7 (see note about OpenJDK 1.8 below)
CyanogenMod 14.1: OpenJDK 1.8
Ubuntu 16.04 (Xenial Xerus) or newer and OpenJDK: Since OpenJDK 1.7 was removed from the official Ubuntu repositories, you have a couple options:
Obtain OpenJDK 1.7 from the openjdk-r PPA
Enable experimental OpenJDK 1.8 support in CyanogenMod 13.0 (not available in earlier version). To enable OpenJDK 1.8 support, add this line to your $HOME/.bashrc file:
Code:
export EXPERIMENTAL_USE_JAVA8=true
III. The sources
You will need to set up some directories in your build environment.
To create them:
Code:
$ mkdir -p ~/bin
$ mkdir -p ~/android/system
Install the repo command
Enter the following to download the "repo" binary and make it executable (runnable):
Code:
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
Put the ~/bin directory in your path of execution
In recent versions of Ubuntu, ~/bin should already be in your PATH. You can check this by opening ~/.profile with a text editor and verifying the following code exists (add it if it is missing):
Code:
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
Time to initialize the CyanogenMod source repository
Enter the following to initialize the repository:
Note: Make sure the cm branch entered here is the one you wish to build and is supported on your device.
Code:
$ cd ~/android/system/
$ repo init -u https://github.com/CyanogenMod/android.git -b cm-14.1
Download the source code
To start the download of all the source code to your computer:
Code:
$ repo sync
The CM manifests include a sensible default configuration for repo, which we strongly suggest you use (i.e. don't add any options to sync). For reference, our default values are -j4 and -c. The -j4 part means that there will be four simultaneous threads/connections. If you experience problems syncing, you can lower this to -j3 or -j2. -c will ask repo to pull in only the current branch, instead of the entire CM history.
Prepare to wait a long time while the source code downloads.
IV. Building the ROM
Prepare the device-specific code
Code:
$ source build/envsetup.sh
$ breakfast jfltexx
Turn on caching to speed up build
You can speed up subsequent builds by adding
Code:
export USE_CCACHE=1
to your ~/.bashrc file. Then, specify the amount of disk space to dedicate to ccache by typing this from the top of your Android tree:
Code:
prebuilts/misc/linux-x86/ccache/ccache -M 50G
Start the build
Time to start building! So now type:
Code:
$ croot
$ brunch jfltexx
Happy building!

If you are familiar with your first build & GitHub, feel free to use the cm_build_script.
Code:
$ git clone https://github.com/BenJule/cm_build_scripts.git
Contributor
syphyr
BenJule

Can do this with i9515
Sent from my GT-I9505 using Tapatalk

Is this for I-9515 too or is it not?

salem.k.salem said:
Can do this with i9515
Sent from my GT-I9505 using Tapatalk
Click to expand...
Click to collapse
Mario472 said:
Is this for I-9515 too or is it not?
Click to expand...
Click to collapse
Qualcomm only unless stated otherwise.
He just made a guide for people who don't want to wait for developers or people whom are looking to start building CM from source. Great guide, I had done similar while using the Moto G3. Thanks for this.
Sent from my GT-I9505 using XDA-Developers mobile app

christopherrrg said:
Qualcomm only unless stated otherwise.
He just made a guide for people who don't want to wait for developers or people whom are looking to start building CM from source. Great guide, I had done similar while using the Moto G3. Thanks for this.
Sent from my GT-I9505 using XDA-Developers mobile app
Click to expand...
Click to collapse
I now and i want to learn about it
And descover it

You should put this on xda chef section. Also you should tell how to get the right repo in manifest sync by checking GitHub branches. Nice guide.
---------- Post added at 06:06 PM ---------- Previous post was at 06:04 PM ----------
Mario472 said:
Is this for I-9515 too or is it not?
Click to expand...
Click to collapse
Similar, you need to add a local manifest with jfvelte's device tree. Here is it https://github.com/jfvelte-dev

Mario472 said:
Is this for I-9515 too or is it not?
Click to expand...
Click to collapse
for GT-i9505
In your case, you can replace the device ID in ./repo/local_manifests/your_device.xml
Greetings
BenLue

I keep getting
Code:
Communication error with Jack server (56). Try 'jack-diagnose'
build/core/java.mk:730: recipe for target '/home/dovi/android/out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/with-local/classes.dex' failed
make: *** [/home/dovi/android/out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/with-local/classes.dex] Error 41
#### make failed to build some targets (01:34:46 (hh:mm:ss)) ####
..what do I do?

DroidKing18 said:
I keep getting
Code:
Communication error with Jack server (56). Try 'jack-diagnose'
build/core/java.mk:730: recipe for target '/home/dovi/android/out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/with-local/classes.dex' failed
make: *** [/home/dovi/android/out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/with-local/classes.dex] Error 41
#### make failed to build some targets (01:34:46 (hh:mm:ss)) ####
..what do I do?
Click to expand...
Click to collapse
post more of the log. But probably need to allocate more memory for jack / reduce parallel compilations
last post here:
http://stackoverflow.com/questions/...lding-the-android-source-code-on-ubuntu-15-10

Ran into another error here:
Code:
make: *** No rule to make target '/home/dovi/android/out/target/common/obj/JAVA_LIBRARIES/org.apache.http.legacy_intermediates/classes.dex.toc', needed by '/home/dovi/android/out/target/common/obj/APPS/Development_intermediates/with-local/classes.dex'. Stop.
make: *** Waiting for unfinished jobs....
Anyone know a fix?

BenLue said:
Make your 'own' Nougat-ROM today!
Thank you note: Thank you to the whole CM-Team for bringing up-to-date-Android to so many devices.
Overview
I. Preparation
II. Installation of the required packages
III. The sources
IV. Building the ROM
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 Debian Stretch (testing) 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.
can't do like this with windows?? any guide or idea??
thanks.
Click to expand...
Click to collapse

Mario472 said:
Is this for I-9515 too or is it not?
Click to expand...
Click to collapse
9515 is Jfvelte, correct? If yes you must modified your roomservice.xml
Example for Jfvelte
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="jfvelte-dev/android_device_samsung_jfvelte" path="device/samsung/jfvelte" remote="github" />
<project name="LineageOS/android_device_samsung_jf-common" path="device/samsung/jf-common" remote="github" />
<project name="LineageOS/android_device_qcom_common" path="device/qcom/common" remote="github" />
<project name="LineageOS/android_device_samsung_qcom-common" path="device/samsung/qcom-common" remote="github" />
<project name="LineageOS/android_external_stlport" path="external/stlport" remote="github" />
<project name="jfvelte-dev/android_kernel_samsung_jf" path="kernel/samsung/jf" remote="github" />
<project name="LineageOS/android_hardware_samsung" path="hardware/samsung" remote="github" />
<project name="LineageOS/android_packages_resources_devicesettings" path="packages/resources/devicesettings" remote="github" />
<project name="TheMuppets/proprietary_vendor_samsung" path="vendor/samsung" remote="github" />
<project name="TheMuppets/proprietary_vendor_qcom_binaries" path="vendor/qcom/binaries" />
</manifest>
Greetings

androidloveRs3104 said:
BenLue said:
Make your 'own' Nougat-ROM today!
Thank you note: Thank you to the whole CM-Team for bringing up-to-date-Android to so many devices.
Overview
I. Preparation
II. Installation of the required packages
III. The sources
IV. Building the ROM
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 Debian Stretch (testing) 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.
can't do like this with windows?? any guide or idea??
thanks.
Click to expand...
Click to collapse
Install vmware or virtualbox!
Greetings
Click to expand...
Click to collapse

androidloveRs3104 said:
BenLue said:
Make your 'own' Nougat-ROM today!
Thank you note: Thank you to the whole CM-Team for bringing up-to-date-Android to so many devices.
Overview
I. Preparation
II. Installation of the required packages
III. The sources
IV. Building the ROM
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 Debian Stretch (testing) 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.
can't do like this with windows?? any guide or idea??
thanks.
Click to expand...
Click to collapse
A better option is dualboot
Sent from my I9195I using Tapatalk
Click to expand...
Click to collapse

Doctor_Titi said:
Hello!
Thanks for your tutorial!
So, when i did
Code:
croot
, i got this message:
Code:
[email protected] ~/android/system $ croot
No command 'croot' found, did you mean:
Command 'chroot' from package 'coreutils' (main)
Command 'root' from package 'root-system-bin' (universe)
Command 'proot' from package 'proot' (universe)
croot: command not found
[email protected] ~/android/system $
Any idea?
Click to expand...
Click to collapse
Prepare the device
Code:
$ source build/envsetup.sh
$ breakfast seed(seed only exemple)
Ready Compile
Code:
$ croot
$ brunch seed(seed only exemple)
good luck :good:

Hello, I am compiling a Android 7 based ROM for my phone and after 4 hours of compilation it gives "out of memory error" and "try increasing the heap size".
I increased my heapsize by using " java -Xmx3072m" but still its showing the same error. My system specs are Core i3 peocessor and 6gb ram and using Ubuntu.
Can anyone please help me out ?

Suvam Mondal said:
Hello, I am compiling a Android 7 based ROM for my phone and after 4 hours of compilation it gives "out of memory error" and "try increasing the heap size".
I increased my heapsize by using " java -Xmx3072m" but still its showing the same error. My system specs are Core i3 peocessor and 6gb ram and using Ubuntu.
Can anyone please help me out ?
Click to expand...
Click to collapse
Try editing your jack setup file and reducing instances to compile to 2 or 1 from 4. I can't remember exact names as I'm not on Linux right now..
My java xmx is set at 6gb and i only have 2 instances set... your 6bg of ram may be the weak link here. Try xmx at 4500m
What size of a swap partition do you have? You may need to increase this too.

Buff99 said:
Try editing your jack setup file and reducing instances to compile to 2 or 1 from 4. I can't remember exact names as I'm not on Linux right now..
My java xmx is set at 6gb and i only have 2 instances set... your 6bg of ram may be the weak link here. Try xmx at 4500m
What size of a swap partition do you have? You may need to increase this too.
Click to expand...
Click to collapse
My swap partition is of 12gb

Suvam Mondal said:
My swap partition is of 12gb
Click to expand...
Click to collapse
12gb is more than enough.
try reducing your instances to 1 and leave mem at 3gb and see if that works.

Related

[GUIDE] Building CM9 for i9003 from sources

Well I haven't seen any thread about it and wanted to share it.
Here you can follow this guide to build your own nightly and change what you want.
NOTES:
This is the way I did here, it could not be the best nor the correct way but it worked for me.
If you think that you could do something here in a better way, or something is wrong let me know and I will update this thread according.
Im following the original CM9 template here: http://wiki.cyanogenmod.com/wiki/Template:Build_from_source_(CM9)
I know there is the build.sh script from teamhacksung but haven't used here, If you think it can simplify this guide in any way I'll update it according.
I have done this on Ubuntu 12.04 - 64bits.
*** Of course you are the only responsible to follow this and flash anything to your phone.
There are chances to damage your phone or loosing very important data such as /efs partition, like the latests CWM updates did, its fixed aparently atm.
I recommend always have a backup of /efs partition. ***
Click to expand...
Click to collapse
IMPORTANT: Don't run any shell command logged on as root (sudo su / sudo -i), if any command asks for root permissions just do "sudo command"
1.- Prepare the Build Environment
Click to expand...
Click to collapse
NOTE: These steps only need to be performed once. If the build environment is already prepared, skip to Copy proprietary files.
Install the Android SDK
Install the Build Packages
For 64-bit systems:
Open a new terminal and type the following:
Code:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
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-dev:i386 g++-multilib mingw32 oracle-java7-installer pngcrush schedtool tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386
Create the Directories
You will need to set up some directories in your build environment.
To create them:
Code:
mkdir -p ~/bin
mkdir -p ~/android/system
Install the Repository
Enter the following to download make executable the "repo" binary:
Code:
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
NOTE: You may need to reboot / restart the terminal for these changes to take effect.
Now enter the following to initialize the repository:
Code:
cd ~/android/system/
repo init -u git://github.com/CyanogenMod/android.git -b ics
repo sync -j16
Where 16 is the number of jobs to do simultaneously, this will download 5~10gb so take a break.
2.- Sync Relevant Repositories and Download Propietary Files
Click to expand...
Click to collapse
NOTE: This only needs to be done the first time after installing the repository.
By default, CyanogenMod 9 only syncs the core android repositories and none of the device or kernel trees to save both bandwidth and time.
To sync the necessary components for the device you need to do the following:
Start a new terminal and change dir where your repo is actually installed, in this case ~/android/system
Code:
cd ~/android/system
Then, you will need to make some changes on a hidden folder called .repo, do the following in your terminal:
Code:
cd .repo
gedit local_manifest.xml
That will create a new file, you need to copy and paste this:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="teamhacksung/android_device_samsung_galaxysl" path="device/samsung/galaxysl" remote="github" revision="ics" />
<project name="teamhacksung/android_vendor_samsung_galaxysl" path="vendor/samsung/galaxysl" remote="github" revision="ics" />
<project name="teamhacksung/android_kernel_samsung_latona" path="kernel/samsung/latona" remote="github" revision="ics-samsung-2.6.35.7" />
<project name="teamhacksung/buildscripts" path="buildscripts" remote="github" revision="ics">
<copyfile dest="build.sh" src="samsung/build.sh" />
</project>
<project name="CyanogenMod/android_packages_apps_SamsungServiceMode" path="packages/apps/SamsungServiceMode" remote="github" />
</manifest>
Click to expand...
Click to collapse
Save and close. You should have now a file called local_manifest.xml in ~/android/system/.repo/
Then, back in the terminal you must edit another .xml to fix an issue related with DHCP to make wifi work properly.
Code:
cd manifests
gedit default.xml
That will open the file to edit, then you should look (Ctrl+F) for this string: "dhcp" and replace the whole line (starts with "<" and and finishes with ">") for this one:
Code:
<project path="external/dhcpcd" name="CyanogenMod/android_external_dhcpcd" remote="github" revision="gb-release-7.2"/>
Save and close. Its almost done. Now you need to sync with the latest changes we did to the manifests, that will download the kernel, device, vendor, etc from teamhacksung repo:
Code:
cd ~/android/system
repo sync -j16
NOTE: If some hardware isn't functioning properly, you may need to run the above command again for updated proprietary files.
3.- Download Prebuilts
Click to expand...
Click to collapse
Download Prebuilts needed by the build:
Code:
~/android/system/vendor/cm/get-prebuilts
4.- Building CyanogenMod
Click to expand...
Click to collapse
Check for updates
First, check for updates in the source:
Code:
cd ~/android/system/
repo sync
Configure Build & Compile
First of all you must compile the kernel and replace the prebuilt one and modules with the new one (it's outdated).
Fortunately for you, just need to run a script and it's done automatically:
Code:
cd ~/android/system/kernel/samsung/latona
./build.sh
Now, the environment must be configured for the build process and then begin compilation for the Samsung Galaxy SL (i9003).
Code:
. build/envsetup.sh
brunch galaxysl
5.- Install
Click to expand...
Click to collapse
1.- Copy your .zip file from ~/android/system/out/target/product/galaxysl/cm-9-XXXXX-UNOFFICIAL-galaxysl.zip to the root of the SD card.
Optional: Download Google Apps for CyanogenMod 9 and place it on the root of the SD card.
2.- Flash both of these .zip files from recovery.
Credits to:
dhiru1602 and teamhacksung
For helping me to build mine flawlessly:
ganeshbiyer
loSconosciuto
alfrix > recommended me to use sun/oracle jdk (oracle-java7-installer) instead of openjdk (openjdk-7-jdk).
If you wish to use OpenJDK instead of Oracle JDK replace oracle-java7-installer with openjdk-7-jdk when Installing build packages stage.
If you want to manually install Sun-java jdk. follow the attached text in the zip. (Linux)
Could u build cm10 from sources please? Musn't be difficult...
luiseteyo said:
Could u build cm10 from sources please? Musn't be difficult...
Click to expand...
Click to collapse
Yes, sure you could build cm10 in the same way, just instead of:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b ics
do:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b jellybean
It won't boot of course, it need some changes in the kernel/ramdisk (and more) to work and you're using ics one.
Code:
<project name="teamhacksung/android_kernel_samsung_latona" path="kernel/samsung/latona" remote="github" revision="ics-samsung-2.6.35.7" />
It will look something like that when the jellybean kernel source is released:
Code:
<project name="teamhacksung/android_kernel_samsung_latona" path="kernel/samsung/latona" remote="github" revision="jellybean-samsung-2.6.35.7" />
<project name="teamhacksung/android_kernel_samsung_latona" path="kernel/samsung/latona" remote="github" revision="jb-samsung-2.6.35.7" />
Just wait for dhiru1602 to release his cm10 rom in the next days.
At least you can download cm10 base for now.
When I create the local_manifest.xml file in the .repo and fire up repo sync, I get a github duplicate remote error. I placed the file in the manifests folder of the .repo directory and the repo sync continues. Will this make the downloaded files incomplete? Can't test if the downloaded source can compile since my ISP limits download to 3GB per day.
jan3586 said:
When I create the local_manifest.xml file in the .repo and fire up repo sync, I get a github duplicate remote error. I placed the file in the manifests folder of the .repo directory and the repo sync continues. Will this make the downloaded files incomplete? Can't test if the downloaded source can compile since my ISP limits download to 3GB per day.
Click to expand...
Click to collapse
If there's a duplicate, repo tells you the exact project specified twice (once in local_manifest.xml and once in default.xml).
You need to find what you specified twice and correct it. If your local_manifest.xml looks like the one posted by frapeti, there shouldn't be problems, unless you did some changes into your default.xml, other than the dhcp one.
If you place your local_manifest.xml in .repo/manifest/, it's like as if it doesn't exist, so repo won't download anything of what there's specified in it.
jan3586 said:
When I create the local_manifest.xml file in the .repo and fire up repo sync, I get a github duplicate remote error. I placed the file in the manifests folder of the .repo directory and the repo sync continues. Will this make the downloaded files incomplete? Can't test if the downloaded source can compile since my ISP limits download to 3GB per day.
Click to expand...
Click to collapse
This is because remote definition for github is defined in default.xml and local_manifest.xml. The repo sync will continue for projects from default.xml but not for the ones in local_manifest.xml.
1. Try removing the remote definition for github from local_manifest.xml
2. Or rename all the references of github to something like githb.
That should solve the problem.
p.s. I did the second.
I am having a problem here...
I am trying to initilialize repo:
It gives me an error:
Code:
bash: /home/chinu/bin/repo: Permission denied
Then i tried to fork the repo first & then tried to initialize it:
Code:
repo init -u git://github.com/chinmayjade/platform_manifest.git -b jb
Still i am getting the same error.
EDIT:
Solved. Was a stupid error

Creating your CM ROM for Galaxy S plus

Credits:
Thanks to Arco, Realtyem and andres_a whose posts helped me to build the ROM from sources.
Most of the post is copied from the guide YardE's guide and a pdf whose author I could not find later. (Please let me know if I have missed somebody.)
*******************************************************
First get the build tools:
*******************************************************
1. Get the packages required for building the ROM.
On 10.04
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \
x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev \
libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \
libxml2-utils
sudo ln -s /usr/lib32/mesa/libGL.so.1 /usr/lib32/mesa/libGL.so
2. Download repo tool,
Code:
curl [url]https://dl-ssl.google.com/dl/googlesource/git-repo/repo[/url] > /tmp/repo
sudo mv /tmp/repo /usr/local/bin
export PATH=$PATH:/usr/local/bin
*******************************************************
Next: Get the source
*******************************************************
I have tried to build the source code from CyanogenMod for ICS version of Android and the device Samsung Galaxy S plus. (Already ported by Arco )
This example uses their repositories to download the code,
1. Get the android source code:
Code:
cd ~/work/cyanogenmod
repo init -u git://github.com/CyanogenMod/android.git -b ics
repo sync
The repo sync command takes some time which depends on your internet connection speed.
2. The above commands download the generic source code. For creating the ROM for the device Galaxy S Plus, we need to use the Arco's repositories.
3. Create a local_manifest.xml in ~/work/cyanogenmod/.repo as follows
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="arco" fetch="https://github.com/arco"/>
<project path="device/samsung/ariesve" name="android_device_samsung_ariesve" revision="ics" remote="arco"/>
<project path="kernel/ariesve" name="samsung-kernel-ariesve" remote="arco" revision="ics"/>
<project path="vendor/samsung/ariesve" name="android_vendor_samsung_ariesve" remote="arco" revision="ics"/>
<project path="frameworks/base" name="android_frameworks_base" remote="arco" revision="ics" />
<project path="kernel/msm7x30" name="samsung-kernel-msm7x30" remote="arco" revision="ics-2.6.35" />
</manifest>
4. Perform repo sync.
Code:
repo sync
*******************************************************
Building Kernel
*******************************************************
It is not necessary to build kernel – the one Arco have build is already located in ~/work/cyanogenmod/device/samsung/ariesve/prebuilt.
But if you still want to do that by our own, you should do the next thing: Download running kernel's config from your dvevice, then ungzip it and
save it as ~/work/cyanogenmod/kernel/ariesve/.config
Code:
adb pull /proc/config.gz
cat config.gz | gunzip > ~/work/cyanogenmod/kernel/ariesve/.config
rm config.gz
After that you should declare cross-compiler path variable:
Code:
export CCOMPILER=~/work/cyanogenmod/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-
Next step is to run
Code:
make oldconfig
Feel free to modify config, for example in ncurses gui:
Code:
make menuconfig
When you're done just execute
Code:
make ARCH=arm CROSS_COMPILE=$CCOMPILER -j5
where -j5 is number of your CPU cores+1;
When compile is over, the resulting zImage will be located in ~/work/cyanogenmod/kernel/ariesve/arch/arm/boot
As mentioned before, you should place it into ~/work/cyanogenmod/device/samsung/ariesve/prebuilt
So when kernel is ready, it's time for the greatest thing:
*******************************************************
Building CyanogenMod 9
*******************************************************
So when all the sources are downloaded, and (optional) kernel is built
let's start to build the CM.
First of all, download prebuilds:
Code:
~/work/cyanogenmod/vendor/cm/get-prebuilts
If you skipped kernel build chapter, please, export CCOMPILER
variable as mentioned there.
Next, edit file: ~/work/cyanogenmod/vendor/samsung/ariesve/device-vendorblobs.mk
and change “ancora” to “ariesve” on lines 25-28
and file ~/work/cyanogenmod/device/samsung/ariesve/BoardConfig.mk
and change “ancora” to “ariesve” on line 132.
The final part is actually building:
Code:
cd ~/work/cyanogenmod
bash
source build/envsetup.sh
lunch full_ariesve-eng
I wrote “bash” in the list of commands because envsetup.sh script
doesn't support some other shells.
Run the make command.
*******************************************************
Build issues.
*******************************************************
1. If you face an issue due to OverlayHtc.h file not found as below:
Code:
Notice file: hardware/libhardware_legacy/NOTICE -- out/target/product/ariesve/obj/NOTICE_FILES/src//system/lib/libpower.so.txt
Copy: out/target/product/ariesve/obj/lib/libaudioalsa.so
Copy: out/target/product/ariesve/obj/lib/libcamera.
target thumb C++: camera.msm7x30 <= device/samsung/ariesve/camerahal/cameraHAL.cpp
device/samsung/ariesve/camerahal/cameraHAL.cpp:31:27: error: ui/OverlayHtc.h: No such file or directory
Notice file: hardware/qcom/display/libcopybit/NOTICE -- out/target/product/ariesve/obj/NOTICE_FILES/src//system/lib/hw/copybit.msm7x30.so.txt
device/samsung/ariesve/camerahal/cameraHAL.cpp: In function 'camera_memory_t* wrap_memory_data(priv_camera_device_t*, const android::sp<android::IMemory>&)':
device/samsung/ariesve/camerahal/cameraHAL.cpp:268: warning: format '%x' expects type 'unsigned int', but argument 4 has type 'ssize_t'
device/samsung/ariesve/camerahal/cameraHAL.cpp: In function 'int camera_set_preview_window(camera_device*, preview_stream_ops*)':
device/samsung/ariesve/camerahal/cameraHAL.cpp:488: error: invalid use of incomplete type 'struct android::eek:verlay'
device/samsung/ariesve/camerahal/CameraHardwareInterface.h:29: error: forward declaration of 'struct android::eek:verlay'
make: *** [out/target/product/ariesve/obj/SHARED_LIBRARIES/camera.msm7x30_intermediates/cameraHAL.o] Error 1
make: *** Waiting for unfinished jobs....
You need to get the fix by using following command:
Code:
cd ~/work/cyanogenmod/frameworks/base/ && git fetch [url]http://review.cyanogenmod.com/CyanogenMod/android_frameworks_base[/url] refs/changes/85/13285/8 && git cherry-pick FETCH_HEAD
(Thanks to the post on xda: http://forum.xda-developers.com/showthread.php?p=27475486#post27475486)
2. If you face an issue in compiling charger.c with following error:
Code:
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/crespo/obj/EXECUTABLES/charger_intermediates/charger.o: in function main:system/core/charger/charger.c:958: error: undefined reference to 'gr_font_size'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/crespo/obj/EXECUTABLES/charger_intermediates/charger.o: in function main:system/core/charger/charger.c:991: error: undefined reference to 'gr_fb_blank'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/crespo/obj/EXECUTABLES/charger_intermediates/charger.o: in function main:system/core/charger/charger.c:699: error: undefined reference to 'gr_fb_blank'
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/crespo/obj/EXECUTABLES/charger_intermediates/charger.o: in function main:system/core/charger/charger.c:732: error: undefined reference to 'gr_fb_blank'
If you aren't afraid of doing some editing, grab the function "gr_fb_blank"(line 377) and "gr_font_size" (line 210) out of bootable/recovery/minui/graphics.c and paste them into device/samsung/crespo/graphics.c (at the end of the file, and at line 158, respectively) for now. Tested booting, and tested system off charging and both seem to be ok. I'm not gonna look at logs since nothing is acting wonky lol.
(Thanks to the post on xda: http://forum.xda-developers.com/showthread.php?t=1399035&page=676)
==================================================
Ref. threads:
http://forum.xda-developers.com/showthread.php?t=1650615
Nice, but I don't recommend to use the outdated framework/base repo by arco.
Instead I suggest to use the CM repo and do the following.
Needs to be done once
Code:
cd frameworks/base
git remote add arco git://github.com/arco/android_frameworks_base.git
git fetch arco
Needs to be done after every repo sync
Code:
git cherry-pick 748a5e5f70858e5f5f77c65b7c185ec980f821f5
git cherry-pick f6d9aa858cbcabb29c1f941e2e8f0672360985ba
git cherry-pick 1a3e62ddae28b3f871ced2c1d40a18c7d8a6ea7d
So you can use the CM9 repo with the necessary changes made by arco.
EDIT:
And the CODE-Tags will make your post better readable.
I think that unknown pdf file tutorial is of vpukin..
Sent from my GT-I9001 using Tapatalk 2
also this isnt needed to synch in manifest.xml
<project path="vendor/samsung/ancora" name="android_vendor_samsung_ancora" remote="arco" revision="ics"/>
Click to expand...
Click to collapse
it isnt i9001 related
texten said:
also this isnt needed to synch in manifest.xml
it isnt i9001 related
Click to expand...
Click to collapse
right.
"ancora" is Galaxy W I8150, arco's phone
...but...where is the sense of this thread? only a cm9 tutorial for...build another ones?
Good guide , But why is there a $ in front of each command ? , when i enter them it gives error
PS: You can surround all codes with CODE Tags
Thanks for suggestion.
I would update the guide with code tags.
what packages I need to download for ubuntu 12.04?[finded]
hemansan said:
2. Download repo tool,
Code:
curl [url]https://dl-ssl.google.com/dl/googlesource/git-repo/repo[/url] > /tmp/repo
sudo mv /tmp/repo /usr/local/bin
export PATH=$PATH:/usr/local/bin
Click to expand...
Click to collapse
one command is missing
Code:
sudo chmod +x /usr/local/bin/repo

[GUIDE][DEV] Compile any source built rom for your device [ULTRA NOOB FRIENDLY]

I know there are many other guides avalable regarding this, But I tried to focus on the small points also that many guides overlook
that's why I have this for you. Do let know if I have missed something or more details have to be included in case still there is a difficulty in compiling
This thread on Madteam Forums: http://madteam.co/forum/development...lt-rom-for-your-device-(ultra-noob-friendly)/
So lets start with simple things
Basic FAQ:
Q: What is a Source built rom?
A: Source Built Roms are roms that are compiled from source on a Linux Platform! They are not themed manually.
Q: How do we build these type of roms?
A: Setup Linux and then follow this guide.
Click to expand...
Click to collapse
This post/guide is divided into 4 parts:
1. Setting up build environment
2. Machine specifications etc.
3. Device Tree and source basics
4. Syncing Source and Building
PART 1: Setting up build environment​
Type sudo su and then your password to get rid of Admin Permissions
#Installing Python
STEP 1: Open terminal (CTRL + ALT + T)
Then execute the following commands in terminal one by one
Code:
sudo apt-get install build-essential gcc
cd Downloads
wget http://www.python.org/ftp/python/2.5.6/Python-2.5.6.tgz
tar -xvzf Python-2.5.6.tgz
cd Python-2.5.6
./configure --prefix=/usr/local/python2.5
make
sudo make install
sudo ln -s /usr/local/python2.5/bin/python /usr/bin/python2.5
Now Python is configured
#Installing JDK
As far as I know PPA which was the earlier method of installing JDK etc. doesn't exist's anymore, So I used another way!
Step 1: Open Terminal (CTRL + ALT + T)
STEP 2: Now we need to download the JDK 6 Binary by executing this command in terminal
Code:
wget --no-check-certificate --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com" "http://download.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-x64.bin"
STEP 3: Then we need to run the binary and move it to a shared location:
Code:
chmod +x jdk-6u45-linux-x64.bin
sudo ./jdk-6u45-linux-x64.bin
sudo mv jdk1.6.0_45 /usr/lib/jvm/
STEP 4: Now you have to install all binaries and give them highest priority, This will also overwrite the previous version of Java Binaries in your computer
Code:
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_45/bin/java 1
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_45/bin/javac 1
sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_45/bin/javaws 1
sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.6.0_45/bin/jar 1
sudo update-alternatives --install /usr/bin/javadoc javadoc /usr/lib/jvm/jdk1.6.0_45/bin/javadoc 1
STEP 5: Now check if JDK 1.6 is selected on this:
Code:
sudo update-alternatives --config java
sudo update-alternatives --config javac
sudo update-alternatives --config javaws
sudo update-alternatives --config jar
sudo update-alternatives --config javadoc
Now JDK is configured! To check if it is done
Execute this is Terminal
Code:
java -version
Output will be similar to this
Code:
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)
#Installing GNU Make
Code:
cd Downloads
wget -o make.tar.gz http://ftp.gnu.org/gnu/make/make-3.81.tar.gz
tar -xvzf make-3.81.tar.gz
cd make-3.82
./configure
sudo make install
These commands are for Make 1.81 if you want to install Make 1.82 Execute these
Code:
cd
wget -o make.tar.gz http://ftp.gnu.org/gnu/make/make-3.82.tar.gz
tar -xvzf make-3.82.tar.gz
cd make-3.82
./configure
sudo make install
Now GNU make is configures
#Installing Android SDK
STEP ONE: Download the SDK from http://developer.android.com/sdk/index.html and extract it in a folder called "sdk" in the Downloads folder
STEP TWO: Now, Execute these commands in terminal
Code:
cd ~/Downloads/sdk/tools/
./android sdk
SDK is configured now :victory:
#Installing required packages:
STEP 1: Open Terminal
Now execute these commands:
Code:
apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev libc6-dev libncurses5-dev x11proto-core-dev \
libx11-dev libreadline6-dev libgl1-mesa-dev tofrodos python-markdown \
libxml2-utils xsltproc pngcrush gcc-multilib lib32z1 schedtool
Good, Now you have successfully setup linux build environment!​
PART 2: Machine specifications and other misc. stuff​
Basic Computer Specs:
2Ghz Dual Core Processor
2GB Minimum ram
50GB File Space (For only one rom source)
*PLEASE NOTE*: This is the basic specification, It really depends on the condition of your ram and cpu!
If you want to use other apps while compilation you should make a 5GB minimum swap partition!
If ram is more than 4GB ram then you don't swap partition!
PART 3: DEVICE TREE AND SOURCE BASICS​
Basic source folders:
/packages - Proprietary rom applications
/framework - Framework (Overall rom UI and stuff)
/device - Device config
/vendor - Vendor Tree and other vendor files
/hardware - Hardware drivers
Q: What is BoardConfig.mk?
A: It's the file where you setup path's to files like toolchain etc. and enable/disable stuff, its very easy to understand. You can find it in your device's tree
Q: Where is build.prop in source?
A. Build.prop is available in the source in the form of system.prop in the device tree!
Q: How to remove ringtones, video editor, CM wallpapers from bulid?
A: Go to device/releasetools/extras.txt and Delete anything you don't want in your build
PART 4: Syncing Source and Building​
# Installing Repo Package
Code:
mkdir ~/bin
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
STEP 2: Now it is recommended to reboot your computer (No need of sudo su after reboot)
STEP 3: Now make directory:
Code:
mkdir -p ~/rom/android/system
STEP 4: Go into directory and set path for Repo Package
Code:
cd ~/rom/android/system
PATH=~/bin:$PATH
STEP 5: NOW ITS TIME FOR SYNCING:
Their are different sources for different roms:
Some are listed bellow:
MIUI - www.github.com/micode/
Rootbox - www.github.com/Root-Box/
rasbeanjelly - www.github.com/rascarlo/
Xylon AOSP - www.github.com/xyaosp/
PAC-Man - www.github.com/PAC-Man/
CyanogenMod - www.github.com/Cyanogenmod/
CarbonROM - www.github.com/carbondev/
SaberMOD - www.github.com/SaberMOD/
AOKP - www.github.com/AOKP/
From the above collection some are Gingerbread some are ICS and some are JB 4.1/4.2 you have to visit these links via browser and see which source is which and follow the commands given at android.git/platform_manifest.git
Click to expand...
Click to collapse
For CM10.1 source execute this:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm10.1
For syncing CM10 source execute:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b jellybean
You have to find for the rest!!
PS: You don't have to execute all the repo init commands written above
Now to sync execute this after the the repo init command
Code:
repo sync
Once it finishes without breaking all the folders will appear in rom/android/system folder
now execute this:
Code:
mkdir -p ~/rom/android/system/device/<ManufacturerName>/<DeviceCodeName>
and extract the device config/tree here
for me its samsung/totoro (galaxy Y, Don't mind )
then do the following:
Code:
mkdir -p ~/rom/android/system/vendor/<ManufacturerName>/<DeviceCodename>
Its the same as for the device folder
Now for compiling:
Code:
. build/envsetup.sh
lunch cm_<DeviceCodename>-eng
brunch cm_<DeviceCodename>-eng
Your build will be located at /rom/android/system/out as <RomName>-date/month/year-UNOFFICIAL-<DeviceCodeName>.zip
HAPPY COMPILING ​
Credits:
MadTeam (motafoca, whitexp etc.) for MADTeam Forums and many help
Team Broadcom CM (bieltv.3, SpaceCaker, Psychogame etc.) for giving my device a quite stable cm.. I learnt to compile because of them! Cheers
BeerGang
mithun46
abhisahara
galaxyfreak
cybojenix
Sniper Killer for supporting me a lot! Thanks dude
prototype-U for Supporting..
Others who supported me
IF YOU LIKE MY GUIDE, DO RATE THIS THREAD A FIVE STAR!
THOSE WHO ARE FACING ERRORS, DO POST YOUR PROBLEM at speed_bot's Source Building Help Thread ​
Good good !! Nicely compiled
abhisahara said:
Good good !! Nicely compiled
Click to expand...
Click to collapse
Thanks
I'll update this guide whenever I get time
Good work on this, I found it quite clear keep up the good work!
Sent from my GT-I9505 using Tapatalk 4 Beta
nicely copied
Aniruddh Chandratre said:
nicely copied
Click to expand...
Click to collapse
Just read what I said at the begging of the thread!
If you are too lazy then:
I know there are many other guides avalable regarding this, But I tried to focus on the small points also that many guides overlook
that's why I have this for you. Do let know if I have missed something or more details have to be included in case still there is a difficulty in compiling
Click to expand...
Click to collapse
And yes, I took reference from others guide... I do give credits!
Have you ever compiled it(successfully) yourself?
Sent from my HTC Desire X using xda app-developers app
prototype-U said:
Have you ever compiled it(successfully) yourself?
Sent from my HTC Desire X using xda app-developers app
Click to expand...
Click to collapse
Yes.. I did..
Thanks for your support
Arnav.G said:
Yes.. I did..
Thanks for your support
Click to expand...
Click to collapse
Where is it?
Sent from my HTC Desire X using xda app-developers app
prototype-U said:
Where is it?
Sent from my HTC Desire X using xda app-developers app
Click to expand...
Click to collapse
It will come...
Please don't spam the thread now! I know you are a RC and you know the rules but still.. Please
http://xda-university.com/as-a-developer/getting-started-building-android-from-source
Nice simplifications...
Noob friendly? Lol! Did you test it on yourself!
When I run the binaries on jdk
I get errors on the 2nd command-Syntax error
Why >
Fang Leone said:
When I run the binaries on jdk
I get errors on the 2nd command-Syntax error
Why >
Click to expand...
Click to collapse
Can you please explain your problem in a little more details?
"This Story Ends Where It Began" - Octavarium (Dream Theater)
Sent from my GT-I9505
Great Guide!!
This is very kind of you to make this helpful thread. It really helped me alot after setting up my new build environment. I ran into an error on you post that you may want to correct, other than that, great work! Here is the typo
"cd Downloads
wget -o make.tar.gz http://ftp.gnu.org/gnu/make/make-3.81.tar.gz
tar -xvzf make-3.81.tar.gz<--this is correct.
cd make-3.82<---it changes here.
./configure
sudo make install"
Hello guys!
I have an error at brunch:
Code:
host Java: guavalib (/home/richard/android/system/out/host/common/obj/JAVA_LIBRARIES/guavalib_intermediates/classes)
logtags: /home/richard/android/system/out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/core/java/android/content/EventLogTags.java <= frameworks/base/core/java/android/content/EventLogTags.logtags
logtags: /home/richard/android/system/out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/core/java/android/speech/tts/EventLogTags.java <= frameworks/base/core/java/android/speech/tts/EventLogTags.logtags
logtags: /home/richard/android/system/out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/core/java/android/webkit/EventLogTags.java <= frameworks/base/core/java/android/webkit/EventLogTags.logtags
[B]make: *** No rule to make target `/home/richard/android/system/out/host/linux-x86/bin/dx', needed by `/home/richard/android/system/out/target/common/obj/APPS/Apollo_intermediates/proguard.classes-with-local.dex'. Stop.[/B]
make: *** Waiting for unfinished jobs....
logtags: /home/richard/android/system/out/target/common/obj/JAVA_LIBRARIES/telephony-common_intermediates/src/src/java/com/android/internal/telephony/EventLogTags.java <= frameworks/opt/telephony/src/java/com/android/internal/telephony/EventLogTags.logtags
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Anyone knows what's causing it? It couldn't be the roomservice.xml in local_manifest as I used the one which another person successfully built CM with. I also repo sync'ed a few times already. I tried make clobber and built again, but nothing :crying:
I am building PACMAN ROM (4.3) now by the way.
All help is appreciated (with a thank!)
Greedings everyone
For some time now i am trying to download and compile CyanongenMod Sources for my Device. I Install VirtualBox + Linux Mint + all the needed stuff. Then i do the repo init and everything looks ok but when i do the repo sync it always throw me a error fetch stop because of sync errors. Ive done it a lot of time with no luck. Also i tried the repo sync -f which finaly finishes fetching things but stops at getting the project tree. Can anyone help me? :/ its really frustrating
vale amicis said:
I know there are many other guides avalable regarding this, But I tried to focus on the small points also that many guides overlook
that's why I have this for you. Do let know if I have missed something or more details have to be included in case still there is a difficulty in compiling
This thread on Madteam Forums: http://madteam.co/forum/development...lt-rom-for-your-device-(ultra-noob-friendly)/
So lets start with simple things
Basic FAQ:
This post/guide is divided into 4 parts:
1. Setting up build environment
2. Machine specifications etc.
3. Device Tree and source basics
4. Syncing Source and Building
PART 1: Setting up build environment​
Type sudo su and then your password to get rid of Admin Permissions
#Installing Python
STEP 1: Open terminal (CTRL + ALT + T)
Then execute the following commands in terminal one by one
Code:
sudo apt-get install build-essential gcc
cd Downloads
wget http://www.python.org/ftp/python/2.5.6/Python-2.5.6.tgz
tar -xvzf Python-2.5.6.tgz
cd Python-2.5.6
./configure --prefix=/usr/local/python2.5
make
sudo make install
sudo ln -s /usr/local/python2.5/bin/python /usr/bin/python2.5
Now Python is configured
#Installing JDK
As far as I know PPA which was the earlier method of installing JDK etc. doesn't exist's anymore, So I used another way!
Step 1: Open Terminal (CTRL + ALT + T)
STEP 2: Now we need to download the JDK 6 Binary by executing this command in terminal
Code:
wget --no-check-certificate --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com" "http://download.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-x64.bin"
STEP 3: Then we need to run the binary and move it to a shared location:
Code:
chmod +x jdk-6u45-linux-x64.bin
sudo ./jdk-6u45-linux-x64.bin
sudo mv jdk1.6.0_45 /usr/lib/jvm/
STEP 4: Now you have to install all binaries and give them highest priority, This will also overwrite the previous version of Java Binaries in your computer
Code:
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_45/bin/java 1
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_45/bin/javac 1
sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6.0_45/bin/javaws 1
sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.6.0_45/bin/jar 1
sudo update-alternatives --install /usr/bin/javadoc javadoc /usr/lib/jvm/jdk1.6.0_45/bin/javadoc 1
STEP 5: Now check if JDK 1.6 is selected on this:
Code:
sudo update-alternatives --config java
sudo update-alternatives --config javac
sudo update-alternatives --config javaws
sudo update-alternatives --config jar
sudo update-alternatives --config javadoc
Now JDK is configured! To check if it is done
Execute this is Terminal
Code:
java -version
Output will be similar to this
Code:
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)
#Installing GNU Make
Code:
cd Downloads
wget -o make.tar.gz http://ftp.gnu.org/gnu/make/make-3.81.tar.gz
tar -xvzf make-3.81.tar.gz
cd make-3.82
./configure
sudo make install
These commands are for Make 1.81 if you want to install Make 1.82 Execute these
Code:
cd
wget -o make.tar.gz http://ftp.gnu.org/gnu/make/make-3.82.tar.gz
tar -xvzf make-3.82.tar.gz
cd make-3.82
./configure
sudo make install
Now GNU make is configures
#Installing Android SDK
STEP ONE: Download the SDK from http://developer.android.com/sdk/index.html and extract it in a folder called "sdk" in the Downloads folder
STEP TWO: Now, Execute these commands in terminal
Code:
cd ~/Downloads/sdk/tools/
./android sdk
SDK is configured now :victory:
#Installing required packages:
STEP 1: Open Terminal
Now execute these commands:
Code:
apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev libc6-dev libncurses5-dev x11proto-core-dev \
libx11-dev libreadline6-dev libgl1-mesa-dev tofrodos python-markdown \
libxml2-utils xsltproc pngcrush gcc-multilib lib32z1 schedtool
Good, Now you have successfully setup linux build environment!​
PART 2: Machine specifications and other misc. stuff​
Basic Computer Specs:
2Ghz Dual Core Processor
2GB Minimum ram
50GB File Space (For only one rom source)
*PLEASE NOTE*: This is the basic specification, It really depends on the condition of your ram and cpu!
If you want to use other apps while compilation you should make a 5GB minimum swap partition!
If ram is more than 4GB ram then you don't swap partition!
PART 3: DEVICE TREE AND SOURCE BASICS​
Basic source folders:
/packages - Proprietary rom applications
/framework - Framework (Overall rom UI and stuff)
/device - Device config
/vendor - Vendor Tree and other vendor files
/hardware - Hardware drivers
Q: What is BoardConfig.mk?
A: It's the file where you setup path's to files like toolchain etc. and enable/disable stuff, its very easy to understand. You can find it in your device's tree
Q: Where is build.prop in source?
A. Build.prop is available in the source in the form of system.prop in the device tree!
Q: How to remove ringtones, video editor, CM wallpapers from bulid?
A: Go to device/releasetools/extras.txt and Delete anything you don't want in your build
PART 4: Syncing Source and Building​
# Installing Repo Package
Code:
mkdir ~/bin
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
chmod a+x ~/bin/repo
STEP 2: Now it is recommended to reboot your computer (No need of sudo su after reboot)
STEP 3: Now make directory:
Code:
mkdir -p ~/rom/android/system
STEP 4: Go into directory and set path for Repo Package
Code:
cd ~/rom/android/system
PATH=~/bin:$PATH
STEP 5: NOW ITS TIME FOR SYNCING:
For CM10.1 source execute this:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm10.1
For syncing CM10 source execute:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b jellybean
You have to find for the rest!!
PS: You don't have to execute all the repo init commands written above
Now to sync execute this after the the repo init command
Code:
repo sync
Once it finishes without breaking all the folders will appear in rom/android/system folder
now execute this:
Code:
mkdir -p ~/rom/android/system/device/<ManufacturerName>/<DeviceCodeName>
and extract the device config/tree here
for me its samsung/totoro (galaxy Y, Don't mind )
then do the following:
Code:
mkdir -p ~/rom/android/system/vendor/<ManufacturerName>/<DeviceCodename>
Its the same as for the device folder
Now for compiling:
Code:
. build/envsetup.sh
lunch cm_<DeviceCodename>-eng
brunch cm_<DeviceCodename>-eng
Your build will be located at /rom/android/system/out as <RomName>-date/month/year-UNOFFICIAL-<DeviceCodeName>.zip
HAPPY COMPILING ​
Click to expand...
Click to collapse
I had two things to ask
1)Was installing android-sdk needed
2)If device not yet had a cm build or device tree how to get them

[GUIDE] How to compile kernel EASIEST WAY + add features + useful tools

Hi guys!
I wrote this guide because after a few month of kernel development i found useful tools and tricks than helped me a lot and speeded up my work and i want to share with you this knowledge.
Setup computer and download sources​
Code:
Minumum reqirement:
* C knowledge
* Ubuntu 12.04 (13.10 if you want use Kdevelop + linux kernel plugin)
* Internet connection, possibly fast and unlimited
* the boot.img of the ROM you want to support with your kernel (AOSP, SENSE etc etc...)
* [URL="http://forum.xda-developers.com/showthread.php?t=2519416"]zImage switcher[/URL]
Install required package:
Linux 12.04;
Code:
sudo apt-get install -y build-essential kernel-package libncurses5-dev bzip2 bin86 libqt3-headers libqt3-mt-dev wget libncurses5 git-core nautilus-open-terminal
linux 13.10:
Code:
sudo apt-get install -y build-essential kernel-package libncurses5-dev bzip2 bin86 qt4-dev-tools wget libncurses5 git-core nautilus-open-terminal
and restart your PC.
Download Source:
Go to /home/<username>, create a new folder called "kernel", and enter in that folder.
right click somewhere in "kernel" folder and select "open terminal here" (CooL AH?)
and run
Code:
git clone <kernel-source-code-for-your-device-repository>
for example for HTC One S will be
Code:
git clone https://github.com/CyanogenMod/android_kernel_htc_msm8960.git
Download the toolchain
There are a lot of toolchain, stock, linaro optimized, based on gcc 4.7, based on gcc 4.8 the choice is yours! in this tutorial we use google gcc 4.7 toolchain.
Go to /home/<username>, create a new folder called "toolchains", and enter in that folder.
right click -> open terminal here
Code:
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7
Build the kernel​
Build the kernel:
in this part we will work in "/home/<username>/kernels/<kernel-folder>" folder, i'll call it <root>
go to "<root>/arch/arm/configs" and copy "<you-device-name>_defconfig" to <root>
rename <you-device-name>_defconfig to ".config"
open a terminal window in <root>
type:
Code:
make ARCH=arm CROSS_COMPILE=/home/<username>/toolchains/arm-eabi-4.7/bin/arm-eabi- > compileLog
and the compilation will start.
Some explanation:
"ARCH=arm" tells to compiler what arch the kernel is made for
"CROSS_COMPILE=xxxxxx" tells to "make" the compiler to use
"> compileLog" saves all the messages in a file called compileLog, it's easier to read than terminal window
Click to expand...
Click to collapse
Pack the kernel to boot.img:
Unpack zImage switcher somewhere, i'll call that folder <ZimgSw>.
copy in the same folder of "repack.sh" file the stock boot.img and yout zImage, you can find it in <root>/arch/arm/boot.
run the script
Code:
./repack.sh
now in <ZimgSw> there's a new file called newBoot.img, that's your kernel!
to find the modules (*.ko files) open a teminal windows to <root> and type
Code:
find ./ -name "*.ko" -exec cp {} <absolute/path/destination/folder> \;
now you have the boot.img and the modules, download a custom kernel and use the flashable zip to make your flashable zip, just replace the modules and the boot.img!
Add features​Add features to kernel:
"Woah! i'd like to add intellimand governor to my kernel"
First you need to find a git repository that contains intellimand governor, than the commit that added the governor.
for example https://github.com/rmbq/android_kernel_htc_msm8960/commit/6c87d0e0b3c82ffff8c0704dfde7369872f5602f
Open a terminal window in <root>
type:
Code:
git remote add rmbq https://github.com/rmbq/android_kernel_htc_msm8960.git -b cm-10.2
git fetch rmbq
git cherry-pick 6c87d0e0b3c82ffff8c0704dfde7369872f5602f
Explanations:
Code:
git remote add rmbq https://github.com/rmbq/android_kernel_htc_msm8960.git -b cm-10.2
add a link to https://github.com/rmbq/android_kernel_htc_msm8960.git branch cm-10.2 and called it "rmbq"
Code:
git fetch rmbq
download all the commit history to your PC without modify your sources
Code:
git cherry-pick 6c87d0e0b3c82ffff8c0704dfde7369872f5602f
apply the commit 6c87d0e0b3c82ffff8c0704dfde7369872f5602f to your source
Click to expand...
Click to collapse
in termial window type:
Code:
make ARCH=arm xconfig
will open a new window where you can configure your kernel's features
press ctrl+f (find) and serach for "intellimand" and tick the checkbox. save clicking the floppy disk in upper left corner.
the modified configuration file will be saved in ".config"
now we can build the kernel again, but first type
Code:
make ARCH=arm clean CROSS_COMPILE=/home/<username>/toolchains/prebuilts_gcc_linux-x86_arm_arm-linux-androideabi-4.8/bin/arm-linux-androideabi-
this will remove all the compiled files of previous build.
View git commits history​you can easly view all the commits in your repo:
open a terminal window in <root> and type
Code:
gitk
will open a GUI where you can see all the commits, what files were modified for each commit, the author of the commit.
you can also revert commits.
There are other GUI for git, i also like "gitg"
Hacking the kernel
suggested by @pirlano​for easy work on kernel sources, add features & co. you can use kdevelop + linux kernel plugin, here is a guide
http://www.gnurou.org/code/kdevelop-kernel
and a video guide:
http://video.linux.com/videos/kernel-browsing-and-hacking-using-kdevelop
NOTE: for linux kernel plugin ubuntu 13.10 is required
if something is not working or it's not clear or you have useful tips just tell me and i'll update the guide
Nice! I usually use kdevelop + linux kernel plugin, so i have a fast IDE and i can save compilation config, fix warning and errors on the fly, and use git from a gui, it's a good solution for me
pirlano said:
Nice! I usually use kdevelop + linux kernel plugin, so i have a fast IDE and i can save compilation config, fix warning and errors on the fly, and use git from a gui, it's a good solution for me
Click to expand...
Click to collapse
cool! if you want/have time write a small tutorial for your method and i'll add to OP
EDIT: meanwhile i added this guide http://www.gnurou.org/code/kdevelop-kernel
rmbq said:
cool! if you want/have time write a small tutorial for your method and i'll add to OP
EDIT: meanwhile i added this guide http://www.gnurou.org/code/kdevelop-kernel
Click to expand...
Click to collapse
And video guide from a nVidia tegra developer
http://video.linux.com/videos/kernel-browsing-and-hacking-using-kdevelop
Hi rmbq,
many thanks for your tutorial! I really appreciate it as I already made some first steps with compiling Roms. Now I'll try to make a kernel
Sent from my One S using XDA Premium 4 mobile app
UPDATE:
added git GUI section
Thanks for this tutorial. Maybe I will finally sit down to making my own kernel someday. If I can do it for linux why can't I for android.
@rmbq
I get an error when i run the command
sudo apt-get install -y build-essential kernel-package libncurses5-dev bzip2 bin86 libqt3-headers libqt3-mt-dev wget libncurses5 git-core nautilus-open-terminal
Click to expand...
Click to collapse
Error
$ sudo apt-get install -y build-essential kernel-package libncurses5-dev bzip2 bin86 libqt3-headers libqt3-mt-dev wget libncurses5 git-core nautilus-open-terminal
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libqt3-headers
E: Unable to locate package libqt3-mt-dev
Click to expand...
Click to collapse
This is my first time trying to build a kernel, How do i fix it?
Edit:
Im running Ubuntu 13.10
phanitej said:
@rmbq
I get an error when i run the command
Error
This is my first time trying to build a kernel, How do i fix it?
Edit:
Im running Ubuntu 13.10
Click to expand...
Click to collapse
Hi!
instead
Code:
sudo apt-get install -y build-essential kernel-package libncurses5-dev bzip2 bin86 libqt3-headers libqt3-mt-dev wget libncurses5 git-core nautilus-open-terminal
can you try to run
Code:
sudo apt-get install -y build-essential kernel-package libncurses5-dev bzip2 bin86 qt4-dev-tools wget libncurses5 git-core nautilus-open-terminal
and see if "make xconfig" (qt is required only for this command) is working? i haven't got ubuntu 13.10 so i can't test
rmbq said:
Hi!
instead
Code:
sudo apt-get install -y build-essential kernel-package libncurses5-dev bzip2 bin86 libqt3-headers libqt3-mt-dev wget libncurses5 git-core nautilus-open-terminal
can you try to run
Code:
sudo apt-get install -y build-essential kernel-package libncurses5-dev bzip2 bin86 qt4-dev-tools wget libncurses5 git-core nautilus-open-terminal
and see if "make xconfig" (qt is required only for this command) is working? i haven't got ubuntu 13.10 so i can't test
Click to expand...
Click to collapse
Tried the command. Did not get any errors. But after downloading source i dont see the kernel folder insde the kernel. What am i doing wrong?
Im trying to build a hammerhead kernel so used the below link
git clone https://android.googlesource.com/kernel/msm.git
Click to expand...
Click to collapse
phanitej said:
Tried the command. Did not get any errors. But after downloading source i dont see the kernel folder insde the kernel. What am i doing wrong?
Im trying to build a hammerhead kernel so used the below link
Click to expand...
Click to collapse
because "master" branch (the default branch) is empty.
open a terminal in <root> and type
Code:
git checkout android-msm-hammerhead-3.4-kk-r1
and you will switch from master branch to android-msm-hammerhead-3.4-kk-r1 branch, i think it's the more updated branch for hammerhead. now you should see all the folders and files of your kernel
rmbq said:
because "master" branch (the default branch) is empty.
open a terminal in <root> and type
Code:
git checkout android-msm-hammerhead-3.4-kk-r1
and you will switch from master branch to android-msm-hammerhead-3.4-kk-r1 branch, i think it's the more updated branch for hammerhead. now you should see all the folders and files of your kernel
Click to expand...
Click to collapse
First of all, a big thanks to your patience for helping me out.
The above command did show up files. I then went to root and tried to use make
make ARCH=arm CROSS_COMPILE=/home/phanitej/toolchain/prebuilts_gcc_linux-x86_arm_arm-linux-androideabi-4.8/bin/arm-linux-androideabi- > compileLog
Click to expand...
Click to collapse
It gives an error. I made sure the path is correct.
make[2]: *** [silentoldconfig] Error 1
make[1]: *** [silentoldconfig] Error 2
make: *** No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'. Stop.
phanitej said:
First of all, a big thanks to your patience for helping me out.
The above command did show up files. I then went to root and tried to use make
It gives an error. I made sure the path is correct.
make[2]: *** [silentoldconfig] Error 1
make[1]: *** [silentoldconfig] Error 2
make: *** No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'. Stop.
Click to expand...
Click to collapse
did you do these steps?
go to "<root>/arch/arm/configs" and copy "<you-device-name>_defconfig" to <root>
rename <you-device-name>_defconfig to ".config"
if yes try to (in <root>):
Code:
make ARCH=arm xconfig
save clickn' the floppy
Code:
make ARCH=arm CROSS_COMPILE=/home/<username>/toolchains/prebuilts_gcc_linux-x86_arm_arm-linux-androideabi-4.8/bin/arm-linux-androideabi- > compileLog
P.S. to post code / script / terminal commands use CODE tag instead QUOTE
rmbq said:
did you do these steps?
go to "<root>/arch/arm/configs" and copy "<you-device-name>_defconfig" to <root>
rename <you-device-name>_defconfig to ".config"
if yes try to (in <root>):
Code:
make ARCH=arm xconfig
save clickn' the floppy
Code:
make ARCH=arm CROSS_COMPILE=/home/<username>/toolchains/prebuilts_gcc_linux-x86_arm_arm-linux-androideabi-4.8/bin/arm-linux-androideabi- > compileLog
P.S. to post code / script / terminal commands use CODE tag instead QUOTE
Click to expand...
Click to collapse
Thanks for the tip Will use code tag from now on for codes.
After running
Code:
make ARCH=arm xconfig
I got the kernel config window. Saved it without modifying anything. THen ran the other command. Gives error. Checked the log and found few errors.
phanitej said:
Thanks for the tip Will use code tag from now on for codes.
After running
Code:
make ARCH=arm xconfig
I got the kernel config window. Saved it without modifying anything. THen ran the other command. Gives error. Checked the log and found few errors.
Click to expand...
Click to collapse
probably your new .config has got wrong configuration, try to delete .config in <root> (if you don't see it press ctrl+h)
and do again
go to "<root>/arch/arm/configs" and copy "<you-device-name>_defconfig" to <root>
rename <you-device-name>_defconfig to ".config"
this time run the make command without make xconfig
rmbq said:
probably your new .config has got wrong configuration, try to delete .config in <root> (if you don't see it press ctrl+h)
and do again
go to "<root>/arch/arm/configs" and copy "<you-device-name>_defconfig" to <root>
rename <you-device-name>_defconfig to ".config"
this time run the make command without make xconfig
Click to expand...
Click to collapse
Still got error
make[1]: *** [init/main.o] Error 1
make: *** [init] Error 2
Just to make sure im doing it right.
I copied hammerhead_defconfig to <root> and renamed it to .config
Then ran the make command without make xconfig i.e
Code:
make ARCH=arm CROSS_COMPILE=/home/phanitej/toolchain/prebuilts_gcc_linux-x86_arm_arm-linux-androideabi-4.8/bin/arm-linux-androideabi- > compileLog
phanitej said:
Still got error
make[1]: *** [init/main.o] Error 1
make: *** [init] Error 2
Just to make sure im doing it right.
I copied hammerhead_defconfig to <root> and renamed it to .config
Then ran the make command without make xconfig i.e
Code:
make ARCH=arm CROSS_COMPILE=/home/phanitej/toolchain/prebuilts_gcc_linux-x86_arm_arm-linux-androideabi-4.8/bin/arm-linux-androideabi- > compileLog
Click to expand...
Click to collapse
can you try to:
open <root>/Makefile
go to line 375 (it's "-fno-delete-null-pointer-checks") and replace this line with "-fno-delete-null-pointer-checks -march=armv7-a"
save and try to compile again
rmbq said:
can you try to:
open <root>/Makefile
go to line 375 (it's "-fno-delete-null-pointer-checks") and replace this line with "-fno-delete-null-pointer-checks -march=armv7-a"
save and try to compile again
Click to expand...
Click to collapse
Edited that, still no go
What am i doing wrong?
phanitej said:
Edited that, still no go
What am i doing wrong?
Click to expand...
Click to collapse
and if you change toolchain?
try to download this http://releases.linaro.org/13.11/co...ndroid-toolchain-eabi-4.8-2013.11-x86.tar.bz2
unpack it in toolchain folder and run make with new CROSS_COMPILE path
CROSS_COMPILE=/home/phanitej/toolchain/new folder/bin/new files name
to know the "new files name" go to
/home/phanitej/toolchain/prebuilts_gcc_linux-x86_arm_arm-linux-androideabi-4.8/bin
you can see all files are starting with "arm-linux-androideabi-" that's why the command is
Code:
CROSS_COMPILE=/home/phanitej/toolchain/prebuilts_gcc_linux-x86_arm_arm-linux-androideabi-4.8/bin/[COLOR="Red"]arm-linux-androideabi-[/COLOR]
make the same thing with the new toolchain
EDIT: shuold be
Code:
CROSS_COMPILE=/home/phanitej/toolchain/[COLOR="Red"]android-toolchain-eabi[/COLOR]/bin/[COLOR="Red"]arm-eabi-[/COLOR]
EDIT2: if still not working try to modify line 357 of <root>/Makefile from
CFLAGS_KERNEL =
to
CFLAGS_KERNEL = -mtune=cortex-a15 -mfpu=neon-vfpv4

[GUIDE]How to build a rom from scratch/source for the Micromax Canvas 2 aka a110.

Hello guys. I have seen a lot of activity here. But I found almost no one knew about source building in this community. Another reason for posting is for people who want to build cm11 from scratch themselves. Our computer crashes most of the time.
Here starts the fun :
Prerequisites
Quote:
HTML:
1. Ubuntu 13.10 / BBQLINUX (I personally use this)
2. patience...lots and lots of patience.
1. Installing ubuntu 13.10.
Quote:
This can be done in 3 ways and I am not gonna cover it all.
- along with windows ,i.e dual boot
- in virtualbox within windows
- as a windows application installation with "wubi" installer
For starting user i think second option, i.e installing in virtualbox is best.
here's starting tutorials
http://www.youtube.com/watch?v=tDDRFiwHujg
NOTE - you should have atleast 100 Gb partion for virtualbox.
2. Setting up building environment.
PHP:
THIS ALL BELOW STEPS ARE NOT NEEDED IF YOU HAVE INSTALLED BBQLINUX, BUILDING ENVIRONMENT IS SET IN BBQLINUX BY DEFAULT. IT WORKS OUT-OF-THE-BOX.
Initializing a fresh Android Build Environment in Ubuntu 13.10 sucks, right? The instructions at the AOSP page are outdated and inaccurate. Near as I can tell, they try to have you install 2 JDKs, the first one not even being the correct link for Saucy Salamander, and the second being OpenJDK. Which might work. But I dunno about all that, I’d rather have Oracle’s official stamp when it comes to building for Android.
Currently most of the guides are up to 12.04 LTS, which is fine and dandy, but being on the cutting edge is nice too.
This guide applies to all variations of Ubuntu 13.10 Saucy Salamander 64 bit. Do not use the 32 Bit version. Also, PAY CLOSE ATTENTION when to use “sudo” and when to not. It can make things funky if you do something as root that you shouldn’t.
Much thanks goes out to Google, ProTekk, Canonical, and everyone else that I read a random paragraph here and snippet there.
First lets perform an update:
HTML:
sudo apt-get update
After this Restart ubuntu.
Okay, let’s set up the correct JDK.
Many of you probably have some kind of wrong Java installed unless you’re starting with a fresh Ubuntu base, and even then maybe.
Let’s get rid of that. Copy and paste this into a Terminal window:
Code:
PHP:
sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*
Follow the instructions to remove OpenJDK.
If you must keep it, it’s possible. But I’m not going to tell you how to do it here. I don’t want any chance of confusion or mistake.
Now copy and paste the following into the Terminal:
Code:
PHP:
sudo add-apt-repository ppa:webupd8team/java
This will add the correct PPA to your system for updated builds of Java 6 JDK that are compatible with 13.10.
No more unrecognized Java version errors! And it will update automatically with the rest of your system.
Next, we actually need to install the package. More copy-paste:
Code:
PHP:
sudo apt-get update && sudo apt-get install oracle-java6-installer
Follow the on-screen instructions. You have to Accept the Licensing Agreement to complete the install. Hopefully no human centipede clauses.
Let’s make sure the correct version of Java is activated, run the following Terminal command:
Code:
PHP:
java -version
You should see something like the following:
Code:
PHP:
java version “1.6.0_45″ Java(TM) SE Runtime Environment (build 1.6.0_45-b06) Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01, mixed mode)
Ok, back to a fresh Terminal prompt. Time for installing the guts to build stuff in Ubuntu:
Code:
PHP:
sudo apt-get install git-core gnupg ccache lzop flex bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 libc6-dev lib32ncurses5 lib32z1 lib32bz2-1.0 lib32ncurses5-dev x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 lib32z-dev libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc readline-common libreadline6-dev libreadline6 lib32readline-gplv2-dev libncurses5-dev lib32readline5 lib32readline6 libreadline-dev libreadline6-dev:i386 libreadline6:i386 bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev lib32bz2-dev libsdl1.2-dev libesd0-dev squashfs-tools pngcrush schedtool libwxgtk2.8-dev python
When that is done installing, run the following command in your Terminal window:
Code:
PHP:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
That’s it on the package side of things.
You guessed it, time for more Terminal. This really is the easiest way, seriously. And it’s totally worth it when you’re basking in the glory of a bunch of people on XDA.
The binary for a program called “repo” will let you talk to git servers and download all that precious source code. That second part after the && allows it to be executable:
Code:
PHP:
mkdir ~/bin && curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo && chmod a+x ~/bin/repo
Use your favorite text editor to open ~/.bashrc
I like nano:
Code:
PHP:
sudo nano ~/.bashrc
At the very bottom, add the following line:
Code:
PHP:
export PATH=~/bin:$PATH
Save it. In nano that would be Ctrl-O and then Enter. Then Ctrl-X to exit back to a prompt. Restart bash:
Code:
PHP:
source ~/.bashrc
Set up android sdk
Refer this guide. Go only to sdk section.
http://forum.xda-developers.com/showthread.php?t=2302780
3. Downloading source
Open terminal
To initialize your local repository using the your Rom trees, use a command like this:
HTML:
mkdir cm11
cd cm11
Repositories of famous roms. Choose one:
HTML:
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
repo init -u git://github.com/AOKP/platform_manifest.git -b kitkat
repo init -u git://github.com/ResurrectionRemix/platform_manifest.git -b kitkat1
Of course you have to make rom specific changes as they are not supported yet. But will be in near FUTURE. I Will highlight rom specific changes in second post.
Create local_manifest.xml in .repo folder.
PHP:
cd .repo
nano local_manifest.xml
Paste following into the terminal
PHP:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project path="device/micromax/a110" name="Ateekujjawal/android_device_micromax_a110" remote="github" revision="cm-11.0" />
<project path="kernel/micromax/a110" name="Ateekujjawal/android_kernel_micromax_a110" remote="github" revision="cm-11.0" />
</manifest>
Save it. In nano that would be Ctrl-O and then Enter. Then Ctrl-X to exit back to a prompt. Restart bash.
Then to sync up:
HTML:
repo sync -j#
# is number of jobs you want to give for your downloading source. I use 2.
Download gonna be huge. Approx 12-15 GB.
So its gonna take while depending upon your internet connection.
You may get errors while downloading, like
HTML:
Sync exited due to fetch errors
Just restart download by
HTML:
repo sync
Let's extract those vendors.
HTML:
cd cm11
cd /device/micromax/a110
./extract-files.sh
Starting Building process
PHP:
. build/envsetup.sh && time brunch a110 -j#
Again # is meant for No. of CPU cores you have.
Building gonna take time, depending upon your computer configuration.
Any errors, post here.
I will try my best to solve problems .
Start building your own CM11...
Any suggestion welcome.
Sent from my GT-I9082 using Tapatalk Pro.
R1
Sent from my GT-I9082 using Tapatalk Pro.
R2
Sent from my GT-I9082 using Tapatalk Pro.
R3
Sent from my GT-I9082 using Tapatalk Pro.
Great also add to get android SDK...
We forgot that remember....??
Also add ther android touch files ..
Without that adb won't work...
More mistakes ...edit it through buddy...
Avenger4droid said:
Great also add to get android SDK...
We forgot that remember....??
Also add ther android touch files ..
Without that adb won't work...
More mistakes ...edit it through buddy...
Click to expand...
Click to collapse
If error comes, then no. Don't tell me. Plus in that link the error fixation is there. At least hit Thanks.
Sent from my GT-I9082 using Tapatalk Pro.
wow. gud one. bookmarked for future reference
So now are you going yo build ROM or we have to build by our self....????
talhask said:
So now are you going yo build ROM or we have to build by our self....????
Click to expand...
Click to collapse
Patience bro. We are building. But you know our pc crashed. So it is gonna take time. If you want to build any other rom, then you can follow this guide. I wouldn't say it is noob friendly but it's a Kickstart.
Sent from my GT-I9082 using Tapatalk Pro.
okay on my way to to download source again new expected date of release is 24 th of march...
hope this time no bad thing happens...
now those wanna try this method i say wait for a couple days as till then i will release and check wheteher its working or not...
:good::good:
regards..
i can see if i can find a good build server then it is easy

Categories

Resources