How to build Carbon rom JB 4.3.1 for i9195 & i9190 - Galaxy S 4 Mini General

How to build Carbon for Serranoltexx{gt-I9195} & serrano3gxx {gt-I9190}
this guide is based on cyanogenmod's how to wiki
i made this easy, you just need do these things and you will download only carbon rom and serranoltexx spesific files so you dont need edit much files. i made it easier for you.
For both 32-bit & 64-bit systems, you'll need:
Code:
bison build-essential curl flex git-core gnupg
gperf libesd0-dev libncurses5-dev libsdl1.2-dev
libwxgtk2.8-dev libxml2 libxml2-utils lzop
openjdk-6-jdk openjdk-6-jre pngcrush schedtool
squashfs-tools xsltproc zip zlib1g-dev
Click to expand...
Click to collapse
In addition to the above, for 64-bit systems, get these:
Code:
g++-multilib gcc-multilib lib32ncurses5-dev
lib32readline-gplv2-dev lib32z1-dev
Click to expand...
Click to collapse
Open your Terminal and paste these commands line by line
Code:
mkdir -p ~/bin
mkdir -p ~/carbon
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
export PATH=${PATH}:~/bin
Code:
cd ~/carbon/
Download the Source
this is original carbon source but i edited it because it includes alot devices, kernel and vendor files that we dont need.
Code:
repo init -u https://github.com/proxuser/android.git -b jb3 && repo sync -f
wait it downloads the source. go out and drink a coffee or play with your smartphone, do whatever you want
it downloads carbon spesific serrano3gxx and serranoltexx devices.
after you full downloaded Carbon source, let get include some fm fixes.
Code:
cd ~/carbon/frameworks/av
git fetch http://review.cyanogenmod.org/CyanogenMod/android_frameworks_av refs/changes/24/51424/1 && git cherry-pick FETCH_HEAD
cd ~/carbon/frameworks/base
git fetch http://review.cyanogenmod.org/CyanogenMod/android_frameworks_base refs/changes/52/49752/2 && git cherry-pick FETCH_HEAD
if you sync your repo these patches will be overwritten by carbon rom. you need apply them again like above.
so are we ready to build ? :S maybe ? ok lets try
go to vendor/carbon folder and open vendorsetup.sh
then add these lines bottom or top of file
Code:
add_lunch_combo carbon_serranoltexx-userdebug
add_lunch_combo carbon_serrano3gxx-userdebug
if you want build for i9195 go to terminal
cd ~/carbon/
Code:
source build/envsetup.sh
breakfast serranoltexx
if you want build for i9190 go to terminal
cd ~/carbon/
Code:
source build/envsetup.sh
breakfast serrano3gxx
you will get information with what build number, what device and so on..
now time to start building
Code:
export USE_CCACHE=1
you want build for i9195 then
Code:
brunch serranoltexx
you want build for i9190 then
Code:
brunch serrano3gxx
if you face any errors, ask it here.

reserved for me

Amazing Tutorial
Good to see you are helping people like me learn +1 keep it up

What do you think this would run like under a Win8 environment in a Virtual Machine?

hi proxuser, followed your guide, but at breakfast got an error about nfc_enhanced.mk missing from /carbon/vendor/carbon/config, fixed that by copying that file from cyanogenmod.
Brunch gave me the following error:
Code:
make: *** No rule to make ta
rget `/home/gerbrand/android/output/carbon/target/common/obj/JAVA_LIBRARIES/telephony-msim_intermediates/classes.jar', needed by `/home/gerbrand/android/output/carbon/target/common/obj/APPS/Phone_intermediates/classes-full-debug.jar'. Stop.
make: *** Waiting for unfinished jobs....
logtags: /home/gerbrand/android/output/carbon/target/common/obj/APPS/Phone_intermediates/src/src/com/android/phone/EventLogTags.java <= packages/apps/Phone/src/com/android/phone/EventLogTags.logtags
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
any suggestions how to fix?

tinnef said:
hi proxuser, followed your guide, but at breakfast got an error about nfc_enhanced.mk missing from /carbon/vendor/carbon/config, fixed that by copying that file from cyanogenmod.
Brunch gave me the following error:
Code:
make: *** No rule to make ta
rget `/home/gerbrand/android/output/carbon/target/common/obj/JAVA_LIBRARIES/telephony-msim_intermediates/classes.jar', needed by `/home/gerbrand/android/output/carbon/target/common/obj/APPS/Phone_intermediates/classes-full-debug.jar'. Stop.
make: *** Waiting for unfinished jobs....
logtags: /home/gerbrand/android/output/carbon/target/common/obj/APPS/Phone_intermediates/src/src/com/android/phone/EventLogTags.java <= packages/apps/Phone/src/com/android/phone/EventLogTags.logtags
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
any suggestions how to fix?
Click to expand...
Click to collapse
look here http://forum.xda-developers.com/showpost.php?p=46723395&postcount=1600
go to /carbon/.repo/manifests/
open default.xml
and find
Code:
<project path="frameworks/opt/telephony" name="CyanogenMod/android_frameworks_opt_telephony" remote="cm" revision="cm-10.2" groups="pdk" />
add after
Code:
<project path="frameworks/opt/telephony-msim" name="CyanogenMod/android_frameworks_opt_telephony-msim" remote="cm" revision="cm-10.2" />
you also can try
make carbon -j7
after select serrano*** in lunch menu
i added missing projects in my manifest too.
you can do a repo init and repo sync again.
it will only add new projects to repo and will sync them.
Code:
repo init -u https://github.com/proxuser/android.git -b jb3 && repo sync -f

Will try editing the manifest.

tinnef said:
Will try editing the manifest.
Click to expand...
Click to collapse
look i edited my msg. try it

proxuser said:
look i edited my msg. try it
Click to expand...
Click to collapse
Just to be safe I deleted the whole thing and started from scratch. It build fine, now.
Still got the error about missing /vendor/carbon/config/nfc_enhanced.mk, though

tinnef said:
Just to be safe I deleted the whole thing and started from scratch. It build fine, now.
Still got the error about missing /vendor/carbon/config/nfc_enhanced.mk, though
Click to expand...
Click to collapse
I will look at it. and will report back here
Sent from my GT-I9195 using xda premium

could you also make a tutorial on how to compile the AOSP kernel, you made? And how to make a flashable .zip of it.

junkyde said:
could you also make a tutorial on how to compile the AOSP kernel, you made? And how to make a flashable .zip of it.
Click to expand...
Click to collapse
there are enough guides for kernel build. but all this needs basic knowledge. but i may write next weeks a guide about kerlen build for s4 mini devices.

proxuser said:
there are enough guides for kernel build. but all this needs basic knowledge. but i may write next weeks a guide about kerlen build for s4 mini devices.
Click to expand...
Click to collapse
Cool, thank you very much :good:

Can I use this to build AOKP or AOSPA3+ ? With some changes ?
Envoyé de mon GT-I9195 en utilisant Tapatalk

I tried to follow it, but it won't work (anymore?):
$ source build/envsetup.sh
including device/generic/armv7-a-neon/vendorsetup.sh
including device/generic/mips/vendorsetup.sh
including device/generic/x86/vendorsetup.sh
including device/samsung/serrano3gxx/vendorsetup.sh
including device/samsung/serranoltexx/vendorsetup.sh
including vendor/carbon/vendorsetup.sh
including sdk/bash_completion/adb.bash
[[email protected] carbon]$ breakfast serranoltexx
including vendor/carbon/vendorsetup.sh
build/core/product_config.mk:238: *** _nic.PRODUCTS.[[device/samsung/serranoltexx/carbon.mk]]: "vendor/carbon/config/nfc_enhanced.mk" does not exist. Stop.
** Don't have a product spec for: 'carbon_serranoltexx'
** Do you have the right repo manifest?
Click to expand...
Click to collapse

Related

[TUTORIAL] So You Want To Build AOKP/ICS for the Thunderbolt?

This is strictly just a reference guide/tutorial! If you cannot simply follow directions and copy/paste, I'm not going to help you! This is idiot-proof.
Build Environment​
Operating system -- Tested on Ubuntu 10.04 (64bit)
Terminal
Decent hardware (minimum of at least a dual core CPU and 4 GB of RAM)
Optimally have an SSD (standard mechanical drives work as well but slow down the process drastically)
Must have required packages for building installed, I will list them further down
Required Packages​
Simply copy and paste this in a terminal window:
Code:
sudo apt-get install curl git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib
Let that install and then proceed.
Getting the Source​
Make required directories
Obtain repo binary
Add repo binary to your path
Give repo binary proper permissions
Initialize empty repo
Sync repo
Grab device tree and vendor tree which are not included in the AOKP manifest
Add Mecha to the vendor setup
Alright, so now we're getting there. I have outlined the basics of what we're about to do and broke them down as I know them. This is all pretty much going to be copy/paste so it'll be fairly difficult to screw this up
Copy/paste:
Make directory for repo binary
Code:
mkdir ~/bin
Add directory for repo binary to your path
Code:
PATH=~/bin:$PATH
Download repo binary and place it in the proper directory
Code:
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
Give the repo binary the proper permissions
Code:
chmod a+x ~/bin/repo
Create directory for where the AOKP repo will be stored and synced
Code:
mkdir ~/aokp
Move to our new AOKP directory
Code:
cd ~/aokp
Initialize the AOKP repo and download the manifest
Code:
repo init -u git://github.com/AOKP/platform_manifest.git -b master
Sync AOKP source
Code:
repo sync -jX
X == Number of cores your CPU has
Grab the device tree needed for mecha
Code:
git clone git://github.com/ProTekk/device_htc_mecha.git -b aokp device/htc/mecha
Grab the vendor tree needed for mecha
Code:
git clone git://github.com/ProTekk/vendor_htc_mecha.git -b ics vendor/htc/mecha
Add mecha to the vendor setup
Code:
gedit vendor/aokp/vendorsetup.sh
Now here you'll have to do some "manual" work. At the end of the file add:
Code:
add_lunch_combo aokp_mecha-userdebug
Save and close the file.
Start the build​
This is probably the EASIEST part of all, simply copy/paste this command and walk away!
Code:
. build/envsetup.sh && lunch aokp_mecha-userdebug && make otapackage -jX
Where X == cores per CPU again.
Syncing the repo is dependent upon your Internet connection. It can take anywhere from 30 minutes to several hours to fully sync. Same thing goes for build times. Don't expect this to be short. If you have patience and have no build errors, you'll end up with a flashable zip in ~/aokp/out/target/product/mecha! Happy crack-flashing!
Sorry I'm a noob so this is probably a really dumb question but r u supposed to have ur phone plugged into the computer while doing the terminal on Ubuntu???
Sent from my HTC Mecha using xda premium
Error on the first step
I'm interested in working on this (and hopfully learning a lot (because right now I know almost nothing)) - but on the first step, I get an error related to lib32zl-dev as follows:
[email protected]:~/Android ROMs/For Mecha/Archive$ sudo apt-get install curl git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib
[sudo] password for tadiv:
Reading package lists... Done
Building dependency tree
Reading state information... Done
gnupg is already the newest version.
zip is already the newest version.
E: Couldn't find package lib32z1-dev
Any suggestions?
Thanks,
Tom
Since we have an official version of ICS now. Does the github have the updated stuffs so we can have a fully working build? I want this as I'm getting tired of sense.
Thanks for posting this ProTekk! I'd like to get this working as well, so maybe some Linux heads can chime in on the errors I'm getting after trying to install the required packages:
Code:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package lib32readline5-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
lib32readline-gplv2-dev
Package sun-java6-jdk is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'sun-java6-jdk' has no installation candidate
E: Package 'lib32readline5-dev' has no installation candidate
E: Unable to locate package gcc-4.3-multilib
E: Couldn't find any package by regex 'gcc-4.3-multilib'
E: Unable to locate package g++-4.3-multilib
E: Couldn't find any package by regex 'g++-4.3-multilib'
raphytaffy said:
Thanks for posting this ProTekk! I'd like to get this working as well, so maybe some Linux heads can chime in on the errors I'm getting after trying to install the required packages:
Code:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package lib32readline5-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
lib32readline-gplv2-dev
Package sun-java6-jdk is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'sun-java6-jdk' has no installation candidate
E: Package 'lib32readline5-dev' has no installation candidate
E: Unable to locate package gcc-4.3-multilib
E: Couldn't find any package by regex 'gcc-4.3-multilib'
E: Unable to locate package g++-4.3-multilib
E: Couldn't find any package by regex 'g++-4.3-multilib'
Click to expand...
Click to collapse
You don't have jdk 6 installed or any of the kernel tools you need.
Sent from my ADR6400L using Tapatalk 2
raphytaffy said:
Thanks for posting this ProTekk! I'd like to get this working as well, so maybe some Linux heads can chime in on the errors I'm getting after trying to install the required packages:
Code:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package lib32readline5-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
lib32readline-gplv2-dev
Package sun-java6-jdk is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'sun-java6-jdk' has no installation candidate
E: Package 'lib32readline5-dev' has no installation candidate
E: Unable to locate package gcc-4.3-multilib
E: Couldn't find any package by regex 'gcc-4.3-multilib'
E: Unable to locate package g++-4.3-multilib
E: Couldn't find any package by regex 'g++-4.3-multilib'
Click to expand...
Click to collapse
I am following this as well, this seems to be an old document because a lot of the links are dead. What I did for the libs is:
(excluding the others that are required)
sudo apt-get install gcc-4.6-multilib g++-4.6-multilib lib32z1-dev lib32ncurses5-dev lib32readline-gplv2-dev
And I plan to grab the Java SDK from Oracle's website.
That is exactly what you have to do prior to building from source.
Sent from my ADR6400L using Tapatalk 2
ViperZ28 said:
I am following this as well, this seems to be an old document because a lot of the links are dead. What I did for the libs is:
(excluding the others that are required)
sudo apt-get install gcc-4.6-multilib g++-4.6-multilib lib32z1-dev lib32ncurses5-dev lib32readline-gplv2-dev
And I plan to grab the Java SDK from Oracle's website.
Click to expand...
Click to collapse
Thanks for this tip. I've installed the updated libs that you suggested, then installed the OpenJDK using:
Code:
sudo apt-get install openjdk-6-jdk
Is OpenJDK okay to use or is there a specific need for Sun Java JDK? I found the link for the JDK here: https://help.ubuntu.com/community/Java
Now that the updated libs and the JDK were installed properly, I ran the command that ProTekk posted minus the previously installed libs:
Code:
sudo apt-get install curl git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev pngcrush schedtool g++-multilib
Everything installed properly. Just wanted to check if I'm now ready to build the source or if there's anything else I need to do beforehand.
http://forum.xda-developers.com/showthread.php?t=1920107
Here is a good guide getting java and all setup right to build from source. Of course don't use the git stuff just the java setup.
I don't think his mecha stuff is on there anymore. Could be wrong.
Sent from my Z0mbi3 ADR6425LVW using xda app-developers app
tburns said:
http://forum.xda-developers.com/showthread.php?t=1920107
Here is a good guide getting java and all setup right to build from source. Of course don't use the git stuff just the java setup.
I don't think his mecha stuff is on there anymore. Could be wrong.
Sent from my Z0mbi3 ADR6425LVW using xda app-developers app
Click to expand...
Click to collapse
Getting this error now:
Code:
repo init -u git://github.com/AOKP/platform_manifest.git -b master
error: revision master in manifests not found
raphytaffy said:
Getting this error now:
Code:
repo init -u git://github.com/AOKP/platform_manifest.git -b master
error: revision master in manifests not found
Click to expand...
Click to collapse
it's been updated... the new repo init is:
Code:
repo init -u https://github.com/AOKP/platform_manifest.git -b jb-mr1
The device tree i don't think is there anymore.
You need that to compile.
je2854 said:
it's been updated... the new repo init is:
Code:
repo init -u https://github.com/AOKP/platform_manifest.git -b jb-mr1
Click to expand...
Click to collapse
this is the updated specifics for the mecha
Code:
git clone git://github.com/CoolSilver/device_htc_mecha -b aokp device/htc/mecha
this is the updated vendor for the mecha
Code:
git clone git://github.com/ProTekk/vendor_htc_mecha.git -b ics vendor/htc/mecha
after the HARD WORK finding the updates everything else compiles correctly.
It took a LONG time to figure out the new links....
je2854 said:
this is the updated specifics for the mecha
Code:
git clone git://github.com/CoolSilver/device_htc_mecha -b aokp device/htc/mecha
this is the updated vendor for the mecha
Code:
git clone git://github.com/ProTekk/vendor_htc_mecha.git -b ics vendor/htc/mecha
after the HARD WORK finding the updates everything else compiles correctly.
It took a LONG time to figure out the new links....
Click to expand...
Click to collapse
Nice.
Also found these last night
https://github.com/ThePlayground
Some more stuff to play with..
Working?
So, after much digging and coding ... screenshot?
Does it run, do you have phone and data...?
Code:
including device/asus/grouper/vendorsetup.sh
including device/asus/tilapia/vendorsetup.sh
including device/generic/armv7-a-neon/vendorsetup.sh
including device/generic/armv7-a/vendorsetup.sh
including device/generic/mips/vendorsetup.sh
including device/generic/x86/vendorsetup.sh
including device/htc/mecha/vendorsetup.sh
including device/lge/mako/vendorsetup.sh
including device/samsung/maguro/vendorsetup.sh
including device/samsung/manta/vendorsetup.sh
including device/samsung/toroplus/vendorsetup.sh
including device/samsung/toro/vendorsetup.sh
including device/ti/panda/vendorsetup.sh
including vendor/aokp/vendorsetup.sh
including vendor/htc/mecha/vendorsetup.sh
including sdk/bash_completion/adb.bash
ls: cannot access vendor/aokp/products/mecha.mk: No such file or directory
build/core/product_config.mk:234: *** Can not locate config makefile for product "aokp_mecha". Stop.
** Don't have a product spec for: 'aokp_mecha'
** Do you have the right repo manifest?
This is what I get after attempting the actual build.
Also this is what I get with the following command.
Code:
~/aokp$ git clone git://github.com/ProTekk/vendor_htc_mecha.git -b ics vendor/htc/mecha
Cloning into 'vendor/htc/mecha'...
fatal: remote error:
Repository not found.
But I changed ProTekk to CoolSilver and it appeared to work fine. Anyone still attempting this that might be able to help?
I'm not sure what level of involvement any of you are interested in, but I'm currently working on porting CM9 to the Thunderbolt with sources at https://github.com/jblack248. Of course, it's not incorporated into the AOKP build process although that shouldn't be too difficult since it's probably just an additional makefile (an assumption).
Currently the RIL is being difficult with mobile data, but calling and SMS work using CM's HTC RIL. It's not ready for a release just yet, but I thought I'd give a shout to all of you since I see you're trying to build from source. Hopefully I can help in some way; the Thunderbolt forum could use some positive excitement.
The gitt link a few posts above is for the jellybean branch hence the -b jb for the AOKP git clone. Try -b ics
Ill take a look at the cm9 stuff tomorrow. Need to partition more HD space to Linux.
onedementedsmurf said:
Code:
including device/asus/grouper/vendorsetup.sh
including device/asus/tilapia/vendorsetup.sh
including device/generic/armv7-a-neon/vendorsetup.sh
including device/generic/armv7-a/vendorsetup.sh
including device/generic/mips/vendorsetup.sh
including device/generic/x86/vendorsetup.sh
including device/htc/mecha/vendorsetup.sh
including device/lge/mako/vendorsetup.sh
including device/samsung/maguro/vendorsetup.sh
including device/samsung/manta/vendorsetup.sh
including device/samsung/toroplus/vendorsetup.sh
including device/samsung/toro/vendorsetup.sh
including device/ti/panda/vendorsetup.sh
including vendor/aokp/vendorsetup.sh
including vendor/htc/mecha/vendorsetup.sh
including sdk/bash_completion/adb.bash
ls: cannot access vendor/aokp/products/mecha.mk: No such file or directory
build/core/product_config.mk:234: *** Can not locate config makefile for product "aokp_mecha". Stop.
** Don't have a product spec for: 'aokp_mecha'
** Do you have the right repo manifest?
This is what I get after attempting the actual build.
Also this is what I get with the following command.
Code:
~/aokp$ git clone git://github.com/ProTekk/vendor_htc_mecha.git -b ics vendor/htc/mecha
Cloning into 'vendor/htc/mecha'...
fatal: remote error:
Repository not found.
But I changed ProTekk to CoolSilver and it appeared to work fine. Anyone still attempting this that might be able to help?
Click to expand...
Click to collapse
I have been trying to figure this out as well. Any help would be appreciated.

{Guide} [HOW TO]Building CM11 from source for i9082/L

Here are the steps to build your own kernel from source. This guide is showing you how to build your first the stock kernel on your own..... It is kick start for making things on your own way....
This guide applies to i9082/i9082L and general devices also.:laugh:
This guide assumes you have basic knowledge of linux and linux system configuration.
Prerequisites
Quote:
HTML:
1. Ubuntu 13.10 / BBQLINUX (I personally use this)
2. patience...lots and lots of patience.
Here starts the fun:-
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, 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
That should be everything. Now you’re ready to build Android the right way. Luck!
3. Downloading source
Open terminal
To initialize your local repository using the CyanogenMod trees, use a command like this:
HTML:
mkdir cm11
cd cm11
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
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/samsung/i9082" name="pawitp/android_device_samsung_i9082" remote="github" revision="cm-11.0" />
<project path="vendor/samsung/i9082" name="k2wl/android_vendor_samsung_i9082" remote="github" revision="master" />
<project path="kernel/samsung/i9082" name="pawitp/android_kernel_samsung_i9082" 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
4. Starting Building process
PHP:
. build/envsetup.sh && time brunch i9082 -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.
reserved for future use.
one more
Just last in case
THANKS K2wl for this amazing guide.
k2wl said:
Here starts the fun
Click to expand...
Click to collapse
Wow that's a really good guide.
You make building from a ROM/Kernel from source much simpler than it should be.
I just replaced my 12.04 LTS with 13.10 last night, was wondering if I shouldn't have, but if it's working good for your development, think I'll keep it for a while. And yes, building a fresh android build environment sucks
I'm new to android development, but so far the linux, java and php code seems mostly regular. Gonna start with kernel first, then maybe try my hand on building a ROM. Thank you for the guide! :good:
iceyhotguy said:
Wow that's a really good guide.
You make building from a ROM/Kernel from source much simpler than it should be.
I just replaced my 12.04 LTS with 13.10 last night, was wondering if I shouldn't have, but if it's working good for your development, think I'll keep it for a while. And yes, building a fresh android build environment sucks
I'm new to android development, but so far the linux, java and php code seems mostly regular. Gonna start with kernel first, then maybe try my hand on building a ROM. Thank you for the guide! :good:
Click to expand...
Click to collapse
Good. Thats the spirit.
keep 13.10. its good.
i switched to BBQLINUX just few days, until earlier i was using 13.10.
kernel develpment is not much hussle.
just be sure...dont add features which make kernel unstable.
i statred with kernel development only...:good::laugh:
and then come to ROM development.
best luck..
if any queries regarding kernel or ROM development, just ask me...i am here to help.
this can be used to build other roms too right .... by just changing the github repo to the rom u wanna build
One more question, how to apply patches?
But, k2wl.
This method builds an Odin flashable file.
How to make flashable zips, which can be flashed through custom recoveries.????
Sent from my iPhone using Tapatalk
rutvikrvr said:
this can be used to build other roms too right .... by just changing the github repo to the rom u wanna build
Click to expand...
Click to collapse
yes its gonna be useful to build other AOSP based roms. like PA,AOKP,OMNI,AICP etc... just need few modifications according to respective roms.
black87 said:
One more question, how to apply patches?
Click to expand...
Click to collapse
copy the patch file to respective directory and apply patch with following command.
HTML:
patch -p1 < patch.diff
eg. if you want to apply bluetooth patch and ur patch name is fixbluetooth.diff
then
HTML:
cd hardware/broadcom/libbt/
git checkout .
patch -p1 < fixbluetooth.diff
if any problems plz tell me..
Ateekujjawal said:
But, k2wl.
This method builds an Odin flashable file.
How to make flashable zips, which can be flashed through custom recoveries.????
Sent from my iPhone using Tapatalk
Click to expand...
Click to collapse
It builds flashable zips only ......with CWM or any other....
@k2wl im getting this error http://pastebin.com/uLy1MGew
rutvikrvr said:
@k2wl im getting this error http://pastebin.com/uLy1MGew
Click to expand...
Click to collapse
check slimrom's github source. instructions are given there.
also @k2wl said that you have to make some other modifications.
Did you try the breakfast command???
rutvikrvr said:
@k2wl im getting this error http://pastebin.com/uLy1MGew
[email protected]:~/slimrom$ . build/envsetup.sh && time brunch i9082 -j4
including device/generic/armv7-a-neon/vendorsetup.sh
including device/generic/x86/vendorsetup.sh
including device/generic/mips/vendorsetup.sh
including vendor/slim/vendorsetup.sh
including sdk/bash_completion/adb.bash
including vendor/slim/vendorsetup.sh
ls: cannot access device/*/i9082/slim.mk: No such file or directory
build/core/product_config.mk:231: *** Can not locate config makefile for product "slim_i9082". Stop.
Device i9082 not found. Attempting to retrieve device repository from SlimRoms Github (http://github.com/SlimRoms).
Repository for i9082 not found in the SlimRoms Github repository list. If this is in error, you may need to manually add it to .repo/local_manifests/slim_manifest.xml
ls: cannot access device/*/i9082/slim.mk: No such file or directory
build/core/product_config.mk:231: *** Can not locate config makefile for product "slim_i9082". Stop.
** Don't have a product spec for: 'slim_i9082'
** Do you have the right repo manifest?
No such item in brunch menu. Try 'breakfast'
real 0m22.876s
user 0m0.219s
sys 0m0.087s
Click to expand...
Click to collapse
your device folder points to device named cm_i9082, not slim_i9082. thats why.
jst open cm.mk file in device/samsung/i9082 cm.mk and edit its content to slim.
means
if it says in the line cm_i9082 change it to slim_i9082.
save it.
rename the file to slim.mk
and change one more file which will point to slim.mk
i.e androidproducts.mk
change the
HTML:
PRODUCT_MAKEFILES := \ $(LOCAL_DIR)/device_i9082.mk
to
HTML:
PRODUCT_MAKEFILES := \ $(LOCAL_DIR)/slim.mk
after that one more file to be created.
slim.dependencies.
just rename cm.dependencies to slim.dependencies.
and then try that command again.
i am attaching files for you.
jst replace them. or edit as you like.
---------------------------------------------------------------------------------------------------------------------
good to know some one started something.
you downloaded source. thats great....keep up... i will help you as much as i can....
rutvikrvr said:
@k2wl im getting this error http://pastebin.com/uLy1MGew
Click to expand...
Click to collapse
Or simply use i9082 device tree for SlimROMs from my Github. I have made all the necessary changes.
xenon92 said:
Or simply use i9082 device tree for SlimROMs from my Github. I have made all the necessary changes.
Click to expand...
Click to collapse
yep....that will do....
but i think untill and unless he do it himself, he wont understand....
@xenon92 as k2wl is saying.. Il try on my own first otherwise I'll use ur device tree if I'm not able to do it at all... Thanx fr the reply.
Sent from my GT-I9082 using XDA Premium 4 mobile app
EDIT: ITS STARTED BUILDING ..THANX FR THE SUPPORT
rutvikrvr said:
@xenon92 as k2wl is saying.. Il try on my own first otherwise I'll use ur device tree if I'm not able to do it at all... Thanx fr the reply.
Sent from my GT-I9082 using XDA Premium 4 mobile app
EDIT: ITS STARTED BUILDING ..THANX FR THE SUPPORT
Click to expand...
Click to collapse
thats the spirit of learning...keep up...
one more error http://pastebin.com/wcuPHsi0 ..pl help
device/samsung/i9082/overlay/frameworks/base/core/res/res/values/config.xml
just edit this file and delete line number 34,199,205. and save it.
just restart building again.

[GUIDE]Compile CM 11 on Ubuntu 14.04 for Moto E

How to build your own CyanogenMod 11 ROM from sources for the Moto E
As you all know inorder to compile any rom based on source codes we need a linux environment. We can also use Virtual Machine on Windows but i find it slower when compared to a linux dual boot or linux os totally! So for budding developers i shall write this guide on how to setup Ubuntu 14.04 LTS Trusty Tahr 64 bit version to compile android roms. Please note that 32 bit is not supported to compile roms. So, lets get started!​
Requirements:
PC with
4gb RAM(minimum)
i3 or above processor(i7 recommended)
Ubuntu OS (installed)
Moto E
Good internet connection
Knowledge of logcat and debugging
Click to expand...
Click to collapse
I wont be doing through on how to dual boot or install Ubuntu there are many videos on youtube so search them up and get Ubuntu installed! Now open a fresh terminal and do the following:
1) Copy and paste it into a terminal window:
Code:
sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*
This will remove OpenJDK if you have it pre-installed.
2) Copy and paste the following into the terminal:
Code:
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 Ubuntu 14.04.
3) Now you need to install the package. Copy and paste the following into the terminal:
Code:
sudo apt-get update && sudo apt-get install oracle-java6-installer
Wait.
Follow the on-screen instructions. You must accept the Licensing Agreement to complete the install.
Press Enter to acknowledge the "OK", then tab over to "Yes" and press Enter again to accept the license. The installation will continue automatically.
4) Make sure the correct version of Java is activated. Run the terminal command:
Code:
java -version
You should see or something similar:
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)
Close and open a new terminal.
5) Install the main build tools with this command:
Code:
sudo apt-get install git gnupg ccache lzop flex bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 libc6-dev lib32bz2-1.0 lib32ncurses5-dev x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 lib32z1-dev libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc libreadline6-dev lib32readline-gplv2-dev libncurses5-dev bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev lib32bz2-dev squashfs-tools pngcrush schedtool dpkg-dev
6) When they are installed, run the next line in your terminal window:
Code:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
That's it packages are done! Now for the sources!
7) Install "repo" using this command:
Code:
mkdir ~/bin && curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo && chmod a+x ~/bin/repo
8) Now open .bashrc using Nano:
Code:
sudo nano ~/.bashrc
9) At the end of the page paste this code to a new line:
Code:
export PATH=~/bin:$PATH
10) Save it using Ctrl+O and then Enter. Then Ctrl+X to exit.
11) Restart bash using this command:
Code:
source ~/.bashrc
11) In the terminal, navigate to where you would like to download the Android source code. I will be placing it in "/home/user/" modify according to ur wish.
Code:
mkdir ~/cm11
cd ~/cm11
Now configure Git using:
Code:
git config --global user.email "[email protected]"
Replace "[email protected]" with your mail id of github
and also
Code:
git config --global user.name "name"
Replace "name" with your name
12) Now initialize the repo using:
Code:
$ repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
The above command is for CM 11 you also do it for other flavours of custom roms too! I will add how to initialise repos for other flavours in second post soon!
13) Now start downloading the sources!!
Code:
repo sync
It takes around 11gb so here is where your internet connection plays a major role!! Sit back and do your other works till then!
And your ready to compile your rom when the sources are fully downloaded!!
14) Initialize the build environment:
Code:
$ .build/envsetup.sh
15) Add repositories for the MOTO E by creating two files in the local_manifests directory. To see this directory, you have to press Ctrl+H in your file manager. If the directory isn't there, create using
Code:
$ mkdir ~/cm11/.repo/local_manifests
16) Use this code to create the file condor.xml
Code:
$ gedit ~/cm11/.repo/local_manifests/condor.xml
17) Paste the following lines using an editor to the name.xml:
Code:
<manifest>
<project name="CyanogenMod/android_device_qcom_common" path="device/qcom/common" remote="github" revision="cm-11.0"/>
<project name="CyanogenMod/android_device_motorola_qcom-common" path="device/motorola/qcom-common" remote="github" revision="cm-11.0"/>
<project name="CyanogenMod/android_device_motorola_name" path="device/motorola/name" remote="github" revision="cm-11.0"/>
<project name="CyanogenMod/android_kernel_motorola_msm8210" path="kernel/motorola/msm8210" remote="github" revision="cm-11.0"/>
<project name="CyanogenMod/android_device_motorola_msm8210-common" path="device/motorola/msm8210-common" remote="github" revision="cm-11.0"/>
<project name="CyanogenMod/android_hardware_qcom_display-caf-new" path="hardware/qcom/display-caf-new" remote="github" revision="cm-11.0"/>
<project name="CyanogenMod/android_hardware_qcom_media-caf-new" path="hardware/qcom/media-caf-new" remote="github" revision="cm-11.0"/>
<project name="CyanogenMod/android_hardware_qcom_fm" path="hardware/qcom/fm" remote="github" revision="cm-11.0"/>
</manifest>
Save the file and exit.
18) Use this code to create the file vendor.xml using the command:
Code:
$ gedit ~/cm11/.repo/local_manifests/vendor.xml
19) Paste the following lines using an editor to vendow.xml:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project path="vendor/motorola" name="TheMuppets/proprietary_vendor_motorola" remote="github" revision="cm-11.0"/>
</manifest>
Save the file and exit.
20) Now copy paste the command in terminal:
Code:
$ repo sync
To get the files needed.
21) Download the necessary prebuilts from cyanogenmod by copy pasting in terminal:
Code:
$ cd ~/cm11
$ vendor/cm/get-prebuilts
21) Now building the rom:
Code:
$ brunch condor
For any help or issues you can post your issues/doubts at this thread and people there will help you!
Congrats!!!You are now set to become a Developer soon!!
First building process will take from 3 hours to12 hours based on your computer specifications. Later builds will take lesser time!After the ROM has been successfully compiled you will find your new ROM in ~/cm11/out/target/product/name. It will be as cm-11-DATE-UNOFFICIAL-condor-zip. You can flash it via CWM/TWRP. Use adb and fastboot to logcat and debug your issues!
Credits:
@sylentprofet - setting up environment on Ubuntu 14.04
@Red Devil - repos, manifest and other info
@x10forevers - how to source build tutorial​
Click to expand...
Click to collapse
Build other flavours of android
Initialise repo for other android flavours of android:
Replace step #12 by these:
a) AOSP-4.4.2:
Code:
repo init -u https://android.googlesource.com/platform/manifest -b android-4.4.2_r1
b) CM-11:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
c) MoKee:
Code:
repo init -u https://github.com/MoKee/android.git -b kk_mkt
d) Omni:
Code:
repo init -u https://github.com/omnirom/android.git -b android-4.4
e) PAC:
Code:
repo init -u git://github.com/PAC-man/pacman.git -b pac-4.4
f) Carbon:
Code:
repo init -u https://github.com/CarbonDev/android.git -b kk
debug info
faq for common errors and solutions to help build process easier!
coming soon!
Click to expand...
Click to collapse
Thanks for the guide...:laugh:
So..... Nice guide that points to a device with no published sources yet...
It's not on cyanogenmod yet
The common folders won't be called 8210
This is a general waste of time. It's pointless having guides on every single device section for building.
Sent from my Nexus 7 using Tapatalk
cybojenix said:
So..... Nice guide that points to a device with no published sources yet...
It's not on cyanogenmod yet
The common folders won't be called 8210
This is a general waste of time. It's pointless having guides on every single device section for building.
Sent from my Nexus 7 using Tapatalk
Click to expand...
Click to collapse
perhaps could aspire users to develop and enable noobs to give a try!
cybojenix said:
So..... Nice guide that points to a device with no published sources yet...
It's not on cyanogenmod yet
The common folders won't be called 8210
This is a general waste of time. It's pointless having guides on every single device section for building.
Sent from my Nexus 7 using Tapatalk
Click to expand...
Click to collapse
Haha was thinking the same , cm without sources , looks like copy paste !
karthiknayak94 said:
Haha was thinking the same , cm without sources , looks like copy paste !
Click to expand...
Click to collapse
well not exactly, the part of setting up environment on Ubuntu 14.04 was referred from various guides and made noob free. Building part is my work. You can check around xda if you feel it is copy paste. Am building for Moto G and believe both processes are same so made a thread for people here to help develop easily.
sources
so the sources are out now, perhaps update the guide
yeshwanthvshenoy said:
Initialise repo for other android flavours of android:
Replace step #12 by these:
a) AOSP-4.4.2:
Code:
repo init -u https://android.googlesource.com/platform/manifest -b android-4.4.2_r1
b) CM-11:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
c) MoKee:
Code:
repo init -u https://github.com/MoKee/android.git -b kk_mkt
d) Omni:
Code:
repo init -u https://github.com/omnirom/android.git -b android-4.4
e) PAC:
Code:
repo init -u git://github.com/PAC-man/pacman.git -b pac-4.4
f) Carbon:
Code:
repo init -u https://github.com/CarbonDev/android.git -b kk
Click to expand...
Click to collapse
I think, if we are building PAC ROM, u will have to replace this command for step #14
Code:
$ ./build-pac.sh
kdomn37 said:
so the sources are out now, perhaps update the guide
Click to expand...
Click to collapse
TheStrix said:
i shall update the guide soon! exams till june 20! after that will get u guys!
I think, if we are building PAC ROM, u will have to replace this command for step #14
Code:
$ ./build-pac.sh
Click to expand...
Click to collapse
i ll check bro thanks havnt built pac till now!
What would be the expected build time in an i7 laptop with 8 GB ram ?
Sent from my XT1022 using XDA Free mobile app
raj.amalw said:
What would be the expected build time in an i7 laptop with 8 GB ram ?
Sent from my XT1022 using XDA Free mobile app
Click to expand...
Click to collapse
first build takes more time roughly around 1-2 hours after that all builds take 20 mins or so!
Motorola kernel msm 8210 repository removed
Hi,
I have been trying to clone the CM repository. The local manifest contains
device/motorola/msm8210-common and
device/motorola/msm8210 for which the repositories which has been either moved or removed. I found the the motorola kernel for the device at github.com/MotorolaMobilityLLC/kernel-msm but i'm not sure what changes in the local manifest has to be made. can anybody halp me out with it?
where's kernel source for device ?
Motorola kernel msm 8210 repository removed
andrman1 said:
where's kernel source for device ?
Click to expand...
Click to collapse
I've used the kernel forked from motorola by github.com/cybojenix/kernel_motorola_condor
Thread closed

[GUIDE] build lineageOS for titan in ubuntu 16.04 (or Debian 8) environment

LineageOS is in an official state, so that's for the ones with no patience, like me. I want my nightlies!! So DIY!!
This is not about flashing. Only how to build a ROM in an Ubuntu (meanwhile Debian 8) environment! So I have nothing to do with what you do with the finished Zip-file.
I am not responsible for your phone or your computer! Everything you read here resulting in taking action is at your own risk!
All credits go to all devs and supporters here on XDA, CyanogenMod / LineageOS for all their work they provide for free on github. We just take thankful the benefit!! Mainly LuK1337 provided the best hints and informations!
## These sites will help you:
http://wiki.lineageos.org/titan_build.html
http://web.archive.org/web/20160722172103/http://wiki.cyanogenmod.org/w/Envsetup_help
http://web.archive.org/web/20160421170720/http://wiki.cyanogenmod.org/w/Build_for_titan
http://gojira.tokyo/?building_cyanogenmod_14_from_source
http://source.android.com/source/initializing.html
## GIT and repos
https://forum.xda-developers.com/showthread.php?t=2329228
## SET UP THE ENVIRONMENT
## Install (in VMware Player or Virtualbox?) 64-bit-Ubuntu 16.04.1 LTS / 8GB RAM / 100GB HDD
## All following is done in a terminal
## These are the packets you need (if you use debian some will fail (e.g. JAVA) -take them out of the list manually):
Code:
sudo apt-get install android-tools-adb automake bc bison build-essential bzip2 ccache curl dpkg-dev flex git gnupg gperf libbz2-1.0 libesd0-dev libghc-bzlib-dev liblz4-tool libncurses5-dev libsdl1.2-dev libwxgtk2.8-dev libxml2 libxml2-utils lzop make maven openjdk-8-jdk pngcrush python-networkx schedtool squashfs-tools xsltproc zip zlib1g-dev g++-multilib gcc-multilib lib32ncurses5-dev lib32z1-dev lib32readline6 lib32readline6-dev
## To install JAVA 8 in Debian:
Code:
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | tee /etc/apt/sources.list.d/webupd8team-java.list
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
apt-get update
apt-get install oracle-java8-installer
## Add all needed paths and the ccache command (following two lines) to the end of ~/.bashrc
## copy the whole box to your terminal and the lines will be added...
Code:
echo "export PATH=~/bin:~/android/lineageos/toolchain:~/android/lineageos/external/v8/build/toolchain:~/android/lineageos/prebuilts/sdk/tools:$PATH
export USE_CCACHE=1" >> ~/.bashrc
## Maybe here is a good point to restart the Ubuntu machine once...
## I'm not sure if necessary you need an account at https://github.com but it complains when not...
Code:
git config --global user.email "your-GIT-REG-email"
git config --global user.name "your-GIT-REG-username"
Code:
mkdir -p ~/bin
mkdir -p ~/android/lineageos/
mkdir -p ~/android/lineageos/.repo/local_manifests
## get the repo command
Code:
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
## The right git-repos to sync are in: ~/android/lineageos/.repo/local_manifests/roomservice.xml
## copy the whole box into the terminal and the roomservice.xml will be written:
Code:
echo "<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote fetch="ssh://[email protected]" name="bitbucket" />
<remote fetch="ssh://[email protected]" name="gitlab" />
<remote fetch="git://codeaurora.org/" name="caf" review="codeaurora.org" sync-c="true" />
<project name="LineageOS/android_device_motorola_titan" path="device/motorola/titan" remote="github" />
<project name="LineageOS/android_device_motorola_thea" path="device/motorola/thea" remote="github" />
<project name="LineageOS/android_device_motorola_msm8226-common" path="device/motorola/msm8226-common" remote="github" />
<project name="LineageOS/android_device_qcom_common" path="device/qcom/common" remote="github" />
<project name="LineageOS/android_kernel_motorola_msm8226" path="kernel/motorola/msm8226" remote="github" />
<project name="LineageOS/android_packages_resources_devicesettings" path="packages/resources/devicesettings" remote="github" />
<project name="TheMuppets/proprietary_vendor_motorola" path="vendor/motorola" remote="github" />
<project name="TheMuppets/proprietary_vendor_qcom_binaries" path="vendor/qcom/binaries" remote="github" />
<project name="TheMuppets/proprietary_vendor_asus" path="vendor/asus" remote="github" />
</manifest>" > ~/android/lineageos/.repo/local_manifests/roomservice.xml
## Get the github to the machine
Code:
repo init -u git://github.com/lineageos/android.git -b cm-14.1
## additional folders to put the repos and binaries for building
## O.K. lets start the first try
Code:
cd ~/android/lineageos/
source build/envsetup.sh
Code:
repo sync
## Wait VERY LONG (really hours) and IF STUCKS, press "ctrl+C" and once more "repo sync" again.
## Then Extract proprietary blobs from the phone
## the device must be connected via USB cable (adb has to be functional) and go to the TITAN directory:
Code:
cd ~/android/lineageos/device/motorola/titan
## and
Code:
./extract-files.sh
## and maybe (only once before the first time of building) configure the CCACHE, which makes compiling much faster:
Code:
prebuilts/misc/linux-x86/ccache/ccache -M 50G
##WHEN ALL IS DONE
## we now can forget all steps before! ...Until we run in trouble - then look at the bottom or restart from scratch.
## In my experience now it shows, that the compiling processes recompiles and replaces "new synced packets" in the out-directory and leave the untouched untouched. So we can (nearly) always restart a broken build process... maybe the devs will VETO this. Some delete the whole out-directory every time - I think you can easily start over
## However, what we should do everytime before we start building is:
Code:
cd ~/android/lineageos/
source build/envsetup.sh
repo sync
## OKAY, lets build.... Nooooooo! Not yet!
## The most Important question now:
## "Do you want to have a ROOTED phone?" If yes, then you have to
Code:
export WITH_SU=true
## If you don't want root then just start with:
Code:
brunch titan
## Now you can wait again for hours and hopefully got finished
## ~/android/lineageos/out/target/product/titan/lineage-14.1-2017****-UNOFFICIAL-titan.zip
------------------------------------------------------------------------
------------------------------------------------------------------------
## TROUBLE with compilation stops / stucks with error:
## JACK-SERVER error:
## reinstall the Jack Server
Code:
cd ~/android/lineageos/prebuilts/sdk/tools
jack-admin kill-server
jack-admin uninstall-server
jack-admin install-server jack-launcher.jar jack-server-4.8.ALPHA.jar
## sometimes a permission problem:
Code:
chmod 700 ~/.jack-server
find ~/.jack-server -type f -print0 | xargs -0 chmod 600
chmod 664 ~/.jack-settings
##Also helpful if Java stops compiling is to limit the usage of RAM:
Code:
export ANDROID_JACK_VM_ARGS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4G"
##NINJA error:
## increase RAM of VM, or you cant put
Code:
export USE_NINJA=false
command to the .bashrc
## APPS/org.cyanogenmod.platform-res_intermediates error:
Code:
javac: file not found: ~android/lineageos/out/target/common/obj/APPS/org.cyanogenmod.platform-res_intermediates/src/cyanogenmod/platform/Manifest.java
Usage: javac <options> <source files>
use -help for a list of possible options
ninja: build stopped: subcommand failed.
build/core/ninja.mk:151: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
make: Leaving directory '~/android/lineageos'
#### make failed to build some targets (25:19 (mm:ss)) ####
When this happens, give a:
Code:
mka org.cyanogenmod.platform-res
This also works for most other Errors, which stop the process... Find the line with "****_intermediate" and give the "mka ****" WITHOUT the "_intermediate".
After compiling of the single package is finished - once more:
Code:
brunch titan
## New one: *** This repo is now deprecated. Move your blobs to your device's vendor repo..
Code:
find: "~/android/lineageos/out/target/common/obj/SHARED_LIBRARIES/libwifi-hal-mock_intermediates": Datei oder Verzeichnis nicht gefunden
build/core/package_internal.mk:143: Empty argument supplied to find-subdir-assets
./vendor/qcom/binaries/Android.mk:1: *** This repo is now deprecated. Move your blobs to your device's vendor repo..
The solution is given here by mirkosrc:
Code:
~/android/lineageos$ mv vendor/qcom/binaries/Android.mk vendor/qcom/binaries/Android.mk.bak
Now we have the proper solution given by kessaras in post #37 (thanks a lot!!):
the solution is not to rename the .mk or even remove that repo since we ignore it by renaming the .mk.
The proper solution is to edit the .mk and remove the 1st line that redirects to an error on purpose because its depricated (old).
This way, IF the .mk is needed during the build, it will get called.
If its not needed , then the compiler will just not use it.
At least thats my point of view here. We dont just remove things by renaming. We add them properly in case they r needed. If they are not needed then they wont be used.
Click to expand...
Click to collapse
## LAST OPTION:
When nothing works at all anymore you can delete the whole content of the out-folder:
Code:
rm -rf ~/android/lineageos/out/*
But then the first compiling last very long again...
## If the DISK runs full,
look into android/lineageos/out/target/product/titan/obj/PACKAGING/target_files_intermediates and delete the files...
## repo sync crashes with error:
Code:
repo sync -j1 -f --force-sync
------------------------------------------------------------------------
Thank you for this guide. I'll try to build CM14.1 here
Danilo-Sanchez said:
Thank you for this guide. I'll try to build CM14.1 here
Click to expand...
Click to collapse
Ah, great keep me informed, so I can make it better. Try myself from the scratch and have found some issues in the chronological order... is getting better. So look out for changes
mankokoma said:
Ah, great keep me informed, so I can make it better. Try myself from the scratch and have found some issues in the chronological order... is getting better. So look out for changes
Click to expand...
Click to collapse
Ok. As soon as I try I'll let you know
For the Ninja error:
export USE_NINJA=false
Has been asked for RAM usage. Battery life is as CM always have been - not the best, could be worse, so what?
mankokoma said:
Has been asked for RAM usage. Battery life is as CM always have been - not the best, could be worse, so what?
Click to expand...
Click to collapse
Thank you
It's almost the same RAM usage as CM13.
i will also try to build the rom from ur guide........really thanks.......so much for the guide
:laugh:Thank you for share!!!:good:
@mankokoma Can I extract proprietary files even if I'm not using CM14.1?
Danilo-Sanchez said:
@mankokoma Can I extract proprietary files even if I'm not using CM14.1?
Click to expand...
Click to collapse
Why not? As far as I can follow the scripts, the files will be extracted (in our case) to ~/android/lineageos/vendor/motorola/titan/proprietary/... (and maybe also to /android/lineageos/vendor/motorola/msm8226-common/proprietary...) I'm not sure if they are always the same for the different Android Versions, but I assume: Yes.
I put some more order in the guide and cleaned the chaos in case there is still interest in building LineageOS yourself. In fact preparing of the environment and the first setup and building of the ZIP lasts really (annoying) long but the following building processes are done within ONE and a HALF hours. So I enjoy immediately the last build when there has something good changed in the Repos: https://www.cmxlog.com/14.1/titan/
Have a lot of fun!
mankokoma said:
I put some more order in the guide and cleaned the chaos in case there is still interest in building LineageOS yourself. In fact preparing of the environment and the first setup and building of the ZIP lasts really (annoying) long but the following building processes are done within ONE and a HALF hours. So I enjoy immediately the last build when there has something good changed in the Repos: https://www.cmxlog.com/14.1/titan/
Have a lot of fun!
Click to expand...
Click to collapse
Did you managed to build Lineage OS 13.0?
I've tried to build Lineage OS 13.0 but unfortunately it didn't work.
Danilo-Sanchez said:
Did you managed to build Lineage OS 13.0?
I've tried to build Lineage OS 13.0 but unfortunately it didn't work.
Click to expand...
Click to collapse
No, I didn't. "Shoot from the hip": Downgrade Java to 1.7 first. Maybe it's easier to building up Ubuntu 14.x environment as I don't know about gcc or other libs-things for CM13
mankokoma said:
No, I didn't. "Shoot from the hip": Downgrade Java to 1.7 first. Maybe it's easier to building up Ubuntu 14.x environment as I don't know about gcc or other libs-things for CM13
Click to expand...
Click to collapse
Did you managed to include OMS support in Lineage 14.1?
Danilo-Sanchez said:
Did you managed to include OMS support in Lineage 14.1?
Click to expand...
Click to collapse
No, didn't have any efforts, though a dark notification panel would be nice.
I just take, what comes from the "normal" repositories.
@mankokoma any idea?
Makefile:795: *** multiple target patterns. Stop.
hashroot said:
@mankokoma any idea?
Makefile:795: *** multiple target patterns. Stop.
Click to expand...
Click to collapse
I'm sorry, have only very little time these days... can you provide some more lines before this error occurs?
Are you using Ubuntu or Debian?
I have read something about cleaning the "obj" folder could help
Hi, I am building klte version of CrdroidAndroid ( a LineageOS based ROM) on a ubuntu 16.04 LTS VM.
I am getting the following error. I am not sure what to do here. I have been cleaning the build folder and ccache and trying to build. I keep ending at this error. Any help to solve this issue is greatly appreciated.
----------------------------------
/usr/bin/x86_64-linux-gnu-ld: /home/sadanand/crdroid/android/system/out/host/linux-x86/obj/SHARED_LIBRARIES/libart_intermediates/base/allocator.o: relocation R_X86_64_PC32 against protected symbol `_ZN3art18g_malloc_allocatorE' can not be used when making a shared object
/usr/bin/x86_64-linux-gnu-ld: final link failed: Bad value
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
-----------------------------------------------------------
Thanks
Did you try just "mka libart" to compile only the package with the error?
Usually then it's finishing without errors and you can brunch again.

Building Android for some devices (Huawei Y6 - msm8909 - in this Guide)

Today i share my knowledge to setup and build lineageos-7 for the Huawei Y6.
First of all we need to install some things.
Run these commands with root or sudo.
Code:
apt-get install -y bison build-essential curl flex git gnupg gperf libesd0-dev liblz4-tool libncurses5-dev libsdl1.2-dev libwxgtk3.0-dev libxml2 libxml2-utils lzop maven openjdk-8-jdk pngcrush schedtool squashfs-tools xsltproc zip zlib1g-dev g++-multilib gcc-multilib lib32ncurses5-dev lib32readline6-dev lib32z1-dev ccache rsync tig sudo imagemagick android-tools-adb android-tools-fastboot bc bsdmainutils file screen bash-completion wget nano
This one works well for Ubuntu 16.04 64 bit.
After that create a user with that you like to build android and log in with that user.
You need to run the following command after login:
HTML:
mkdir ~/bin && cd ~/bin && curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > repo && chmod a+x repo && cd
After that you should configure git. For me it is:
HTML:
git config --global user.name "username" && git config --global user.email "[email protected]"
Now you can start to fetch the sources.:
HTML:
mkdir lineageos-7.1 && cd lineageos-7.1 && repo init -u git://github.com/LineageOS/android.git -b cm-14.1 && repo sync
That will set up up a fresh source for lineageos-7.1 at all. Everything from now is device specific.
First we should create the basic folders for our device. I always fetch the sources for the huawei cherry to get the deps.:
HTML:
cd ~/lineageos-7.1 && . build/envsetup.sh
That will set up the lineageos build env.
Next command:
HTML:
breakfast cherry
That will fetch some sources for qcom devices.
Now we need to get the files to build lineageos-7.1 for our huawei y6.
HTML:
cd ~/lineageos-7.1/kernel/huawei && git clone https://github.com/giorgio130/android_kernel_huawei_msm8916.git msm8908 -b cm-14.1 && cd ~/lineageos-7.1/devices/huawei && git clone https://github.com/giorgio130/android_device_huawei_scale.git scale -b cm-14.1 && git clone https://github.com/giorgio130/android_device_huawei_msm8909-common.git msm8909-common -b cm-14.1 && git clone https://github.com/giorgio130/proprietary_vendor_huawei.git ~/lineageos-7.1/vendor/huawei -b cm-14.1
That was a simple Do that after that command quene. Nothing special for linux users.
If you got everything at the right place, please edit:
lineageos-14.1/device/huawei/msm8909-common/BoardConfigCommon.mk
and change:
HTML:
TARGET_KERNEL_SOURCE := kernel/huawei/msm8916
to:
HTML:
TARGET_KERNEL_SOURCE := kernel/huawei/msm8909
Now we should be ready to go. Go back to the base folder and run:
HTML:
. build/envsetup.sh && export WITH_SU=true && brunch lineage_scale-userdebug
With that commands everybody should be able to build and run LineageOs for the Huawei Y6 and other devices. It is the same with only other devices.
Step 1.
HTML:
. build/envsetup.sh
will source up the LineageOS.
Step 2.
HTML:
export WITH_SU=true
will enable full root access inside the finished build.
Step 3.
HTML:
brunch lineage_scale-userdebug
will build a flashable zip file for the Huawei Y6 aka Huawei Scale.
HTML:
make clean && make clobber
will clean up your whole environment before or after you compiled Android. You need to run step 1, 2, and 3 again after you run this or changed something.
Edit 1: Moved text to code.
Edit 2: Added some stuff.
Edit 3: Cleanup
@Runner85sx thank a lot, was looking for such tutorial.
On the lineage for y6 scl l01 the rotation is reverse. Can please guide me how to solve it.
Ps am not a dev but want to learn, for can manage to do minor changes
Thanks a lot! Hope to see new developers get into this device. Thanks
haidar.com said:
@Runner85sx thank a lot, was looking for such tutorial.
On the lineage for y6 scl l01 the rotation is reverse. Can please guide me how to solve it.
Ps am not a dev but want to learn, for can manage to do minor changes
Click to expand...
Click to collapse
I'm not sure why you have this problem. My device is working still well. I built new flashable zips and tested them. Everything okay till now here with an debranded Vodafone Huawei Y6 SCL-L01.
So you may you/me have a problem with DTS/DTB.
Can I use this to build AOSP for Y6?
Runner85sx said:
I'm not sure why you have this problem. My device is working still well. I built new flashable zips and tested them. Everything okay till now here with an debranded Vodafone Huawei Y6 SCL-L01.
So you may you/me have a problem with DTS/DTB.
Click to expand...
Click to collapse
How did you debrand your y6?
emre.yv said:
Can I use this to build AOSP for Y6?
Click to expand...
Click to collapse
Yes. You only need to modify some files inside device/huawei/msm8909-common and device/huawei/scale
Is it posible to make cm 11 for y6?
Ruven03 said:
Is it posible to make cm 11 for y6?
Click to expand...
Click to collapse
I'm not an advanced developer but, if Runner85sx bring android 7 to our device, You'll be able to change some files and create older version (cm 11), but the only problem is, unfortunately there's a chance that drivers would have some problems or/and simply not work.
Just a stupid question... Can you tell me what files I need to edit to make it work on AOSP? I want to compile the source without compiling the kernel and using the stock one
thanks
How?
Whether other devices can use this to build a custom kernel and use this kernel source
@Runner85sx thank you... I feel so empowered.... now trying to figure out how to deal with the camera. Any idea where I must start, cause I am beginning to miss my selfies
vajohnify said:
@Runner85sx thank you... I feel so empowered.... now trying to figure out how to deal with the camera. Any idea where I must start, cause I am beginning to miss my selfies
Click to expand...
Click to collapse
You are welcome.
I think the right place to start is the source code of the camera driver.
hi dear @Runner85sx thanks for your guide and work on this device... :fingers-crossed:
I have try this guide on desktop without problems...
but on my pi3 with berryboot last version and ubuntu mate 16.04 after the command
Code:
sudo apt-get install -y bison build-essential curl flex git gnupg gperf libesd0-dev liblz4-tool libncurses5-dev libsdl1.2-dev libwxgtk3.0-dev libxml2 libxml2-utils lzop maven openjdk-8-jdk pngcrush schedtool squashfs-tools xsltproc zip zlib1g-dev g++-multilib gcc-multilib lib32ncurses5-dev lib32readline6-dev lib32z1-dev ccache rsync tig sudo imagemagick android-tools-adb android-tools-fastboot bc bsdmainutils file screen bash-completion wget nano
i have this problem after Reading package lists... Done
Building dependency tree
Reading state information... Done
Code:
E: Unable to locate package lib32ncurses5-dev
E: Unable to locate package lib32readline6-dev
E: Unable to locate package lib32z1-dev
I have read you use pi 3 to built android I can know your set up or a solution to my error? Thanks :laugh:
Is there like a program or something that I can use to learn how to code? Cause I'm interested in learning but I don't know where to start and all of what you posted did not make any sense to me.
adam_s_459_ said:
Is there like a program or something that I can use to learn how to code? Cause I'm interested in learning but I don't know where to start and all of what you posted did not make any sense to me.
Click to expand...
Click to collapse
Same
Hello XDA Community! I'm building my first custom ROM and I have a question: Is it required to flash the ROM on the device or I can do something familiar to 'fastboot boot' style?
EDIT: And one more question: I'm making cm10 rom and will it work when I port our tree to this rom (kernel version etc)
EDIT 2: I have a problem while porting because cm10 didn't find cherry when typing breakfast cherry. Any Ideas?
Won't compile
Thank you Runner85sx so much for this comprehensive quick start guide. This is just what this community is missing.
I have changed in the following text all the backslashes to slashes in order for the forum to let me post. It thinks the paths are links and blocks my post as a new user. Ridiculous.
I run up to some issues executing the commands.
Firstly the 7th command I think should be:
HTML:
cd ~\lineageos-7.1\device\huawei
instead of:
HTML:
cd ~\lineageos-7.1\devices\huawei
Secondly the file that needs editing:
HTML:
~\lineageos-14.1\device\huawei\msm8909-common\BoardConfigCommon.mk
should be:
HTML:
~\lineageos-7.1\device\huawei\msm8909-common\BoardConfigCommon.mk
And lastly the last command
HTML:
brunch lineage_scale-userdebug
failed with the following output:
HTML:
including vendor\cm\vendorsetup.sh
build\core\product_config.mk:254: *** _nic.PRODUCTS.[[device\huawei\scale\lineage.mk]]: "device\cyanogen\msm8909-common\msm8909.mk" does not exist. Stop.
Device scale not found. Attempting to retrieve device repository from LineageOS Github (http:\\github.com\LineageOS).
Repository for scale not found in the LineageOS Github repository list. If this is in error, you may need to manually add it to your local_manifests\roomservice.xml.
build\core\product_config.mk:254: *** _nic.PRODUCTS.[[device\huawei\scale\lineage.mk]]: "device\cyanogen\msm8909-common\msm8909.mk" does not exist. Stop.
build\core\product_config.mk:254: *** _nic.PRODUCTS.[[device\huawei\scale\lineage.mk]]: "device\cyanogen\msm8909-common\msm8909.mk" does not exist. Stop.
** Don't have a product spec for: 'lineage_scale'
** Do you have the right repo manifest?
complaining that the directory "cyanogen" does not contain a directory called "msm8909-common", so I copied it from "~\lineageos-7.1\device\huawei\msm8909-common" (probably a stupid thing to do, but it was a quick try).
Then I had some compiling activity but unfortunately ended with the following output:
HTML:
Checking build tools versions...
build\core\base_rules.mk:183: *** device\huawei\msm8909-common\camera\QCamera2\HAL: MODULE.TARGET.SHARED_LIBRARIES.camera.msm8909 already defined by device\cyanogen\msm8909-common\camera\QCamera2\HAL.
build\core\ninja.mk:166: recipe for target '\home\hlucid\lineageos-7.1\out\build-lineage_scale.ninja' failed
make: *** [\home\hlucid\lineageos-7.1\out\build-lineage_scale.ninja] Error 1
make: Leaving directory '\home\hlucid\lineageos-7.1'
#### make failed to build some targets (43 seconds) ####
Does anybody have a clue of what is wrong? Any help is appreciated. Thanks.

Categories

Resources