[GUIDE CM11] How to made your own ROM based on CyanogenMod for the Note2 - Galaxy Note II General

Make your 'own' KitKat ROM!
Overview
1. Installation of the required packages
2. Installing Java
3 The sources
5. Building the ROM
6. Rebuilding with newest sources
Installation of the required packages
Installation of the required packages (Ubuntu 13.10 64-bit)
Install packages:
Code:
sudo apt-get install bison build-essential curl flex \
g++-multilib gcc-multilib git-core gnupg gperf \
lib32ncurses5-dev lib32readline-gplv2-dev lib32z1-dev \
libesd0-dev libncurses5-dev libsdl1.2-dev \
libwxgtk2.8-dev libxml2 libxml2-utils lzop \
openjdk-6-jdk openjdk-6-jre pngcrush schedtool \
squashfs-tools xsltproc zip zlib1g-dev
Install java:
Code:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java6-installer
Check java version
Code:
java -version
Set java oracle as default
Code:
sudo update-alternatives --config java
The sources
Install repo:
Note: Repo is a tool that makes it quite easy to download and maintain the sources of Cyanogenmod.
Code:
mkdir ~/bin
PATH=~/bin:$PATH
cd ~/bin
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
Create the working directory:
Note: you can create the working directory where ever you want
Code:
mkdir ~/rom
cd ~/rom
Now Initialize Repo:
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
Download the CM sources "this is the base only" :
Note: takes some time to download the hefty 12 GB of source code! and a locate about 18GB space from storage
Code:
repo sync
great, your clean base is ready for your creativity
Let's go!
Start making your manifest :
you need to add proprietary vendor , device stuff, samsung kernel, samsung kernel common
proprietary vendor:
there two awesome proprietary for samsung:
1- by TheMuppets https://github.com/TheMuppets/proprietary_vendor_samsung/tree/cm-11.0
2- by xplodwild https://github.com/DonkeyCoyote/proprietary_vendor_samsung/tree/android-4.4
actually the both very strong and up-to-date , but i using the one by xplodwild
create new empty file "roomservice.xml" in path "~/rom/.repo/local_manifests/":
samsung kernel:
you can use CM Stock Kernel
1- https://github.com/CyanogenMod/android_kernel_samsung_smdk4412
you can use an custom kernel like devil kernel
2- https://github.com/DerTeufel/android_kernel_samsung_smdk4412/
Code:
cd ~/rom/.repo/local_manifests/ && echo "" > roomservice.xml
Edit the file:
Code:
gksu gedit ~/rom/.repo/local_manifests/roomservice.xml
add the following:
Code:
<!-- proprietary vendor -->
<project name="DonkeyCoyote/proprietary_vendor_samsung" path="vendor/samsung" remote="github" revision="android-4.4" />
<!-- device stuff-->
<project name="CyanogenMod/android_device_samsung_n7100" path="device/samsung/n7100" remote="github" />
<!-- samsung kernel common -->
<project name="CyanogenMod/android_device_samsung_smdk4412-common" path="device/samsung/smdk4412-common" remote="github" />
<!-- cm stock - samsung kernel -->
<project name="CyanogenMod/android_kernel_samsung_smdk4412" path="kernel/samsung/smdk4412" remote="github" />
Save the file.
Now download your manifests stuff:
Code:
repo sync
Now to get the files needed
Note: required for the first time after you added device repo
Code:
cd ~/rom/vendor/cm
. get-prebuilts
cd ~/rom/
Building the ROM:
Note: Breakfast is a function used to configure your build. It keeps track of a list of officially-supported devices to build
Building takes around 2 hour on fast systems and a lot more on older and slower machines, first time take more than second time
more info : http://wiki.cyanogenmod.org/w/Build_for_n7100
Run :
source build/envsetup.sh && breakfast n7100 && brunch n7100
Click to expand...
Click to collapse
Done !
Happy building! ... Happy Easter Eggs

Next Course will include :
How Setup GITHUB
How make REPOs
How pick an feature from another ROM using cherry-pick !!
How commit and upload your changes
How handling and understand the errors while compiling

reversed

reversed again

Related

[TUTORIAL][HOWTO] Building CyanogenMod 7 for the HTC Thunderbolt [FINAL]

How to build your own CyanogenMod 7:
Install the Build Packages
Install using the package manager of your choice:
For 32-bit & 64-bit systems:
Code:
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
For 64-bit only systems:
Code:
g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib
NOTE: gcc-4.3-multilib g++-4.3-multilib is no longer available for Ubuntu 11.04 64-bit, but should still build without issue.
NOTE: On Ubuntu 10.10, and variants, you need to enable the parter repository to install sun-java6-jdk:
Code:
add-apt-repository "deb http://archive.canonical.com/ maverick partner"
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
Code:
curl "http://php.webtutor.pl/en/wp-content/uploads/2011/09/repo" > ~/bin/repo
chmod a+x ~/bin/repo
PATH=~/bin:$PATH
Now enter the following to initialize the repository:
Code:
cd ~/android/system/
repo init -u git://github.com/ProTekk/android.git -b gingerbread
repo sync -j16
Copy proprietary files
Code:
git clone git://github.com/koush/proprietary_vendor_htc.git ~/android/system/vendor/htc
Download RomManager
NOTE: This only needs to be done when an update to RomManager is released. If you are-up-to date, you may skip to Building CyanogenMod.
Download RomManager which is needed by the build:
Code:
cd ~/android/system/device/htc/mecha
~/android/system/vendor/cyanogen/get-rommanager
Check for updates
First, check for updates in the source:
Code:
cd ~/android/system/
repo sync
Configure Build & Compile
Now, the environment must be configured to build and the ROM compiled, from code, for the Thunderbolt.
Code:
. build/envsetup.sh && brunch mecha
Now for the lazy people who don't want to type all that crap:
Download and run the new script: http://fzservers.com/newmecha.sh
You can do whatever you like while it runs. If you have never created a CyanogenMod repo on your local system then go out to dinner, grab some coffee, call your mother or do something time consuming because this will be a LONG wait depending on your Internet connection and system performance. The build will run as soon as the script sets everything up and again it is LOOOONG depending on the performance of your system.
Everything will be located in
Code:
~/android/system
Once it's done you can locate the flashable .zip in the "out" directory of your CyanogenMod repo. Happy crackflashing to all!
Reserved....
Fixed an issue with the build script. Please redownload it and try again.

[CLOSED][How to][Build CMB ROMS][TF300T][Mint64bit]

This will guide you thought the setup of Mint. The setup of your build environment, and finely the output of a flashable CMB ROM for your 700
First anything that starts with a bullet point is just for your reference.. Do not copy these things into your bash window...
Anything that is a code is copied one line at a time into your bash window and than enter
Now Install Mint 64 bit and a PC.. We will need at least a 250 GB hard drive...
This is a work in progress so let me know if anyone has any questions...
You can Find Mint here Click Me
Update System
Code:
sudo apt-get update
Code:
sudo apt-get upgrade
Build Env
Code:
sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.8-dev squashfs-tools build-essential zip curl
Code:
sudo apt-get install libncurses5-dev zlib1g-dev pngcrush schedtool libxml2 libxml2-utils xsltproc android-tools-fastboot android-tools-adb
Code:
sudo apt-get install g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline-gplv2-dev gcc-multilib meld ia32-libs lzop ccache gedit
Code:
mkdir -p ~/bin
Code:
mkdir -p ~/android/system
Code:
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
Code:
chmod a+x ~/bin/repo
Code:
export PATH=${PATH}:~/bin
Code:
gedit ~/.bashrc
Copy & Paste at bottom of bashrc on its own line
Code:
export PATH=${PATH}:~/bin
END-Paste
Code:
cd ~/android/system/
Code:
repo init -u git://github.com/cmbroms/platform_manifest.git -b kk4.4
You will be prompt to give your email and name just follow the steps on screen
Prepare to wait for a massive download 3 to 10 hours depending on your internet speed...
Code:
repo sync
Code:
cd ~/android/system/vendor/cmb
Code:
./get-prebuilts
Java
Code:
su
Code:
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" | tee -a /etc/apt/sources.list
Code:
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" | tee -a /etc/apt/sources.list
Code:
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886
Code:
apt-get update
Code:
apt-get install oracle-java6-installer
Code:
exit
Code:
sudo apt-get install oracle-java6-set-default
Ccache
Code:
gedit ~/.bashrc
Copy & Paste at bottom of bashrc on its own line
Code:
export USE_CCACHE=1
Code:
export CCACHE_DIR=~/ccache
END-Paste
Code:
source ~/.bashrc
Code:
ccache -M 50G
Building a ROM
Code:
cd ~/android/system
Make sure your in sync with the repo, you will do this every time right before you build.
Code:
repo sync
Code:
source build/envsetup.sh
Code:
lunch
Pick the number of the rom you would like to build
I maintain the 700,300,m7vzw so those are the only ones I can help with
the -j* is how may cpu cores you would like to give to the build process
So -j2 would tell the build process that you have 2 core you would like to use to build
Code:
make clean && make bacon -j2
The flash-able zip will be in the out folder of your build directory
Code:
XDA:DevDB Information
How to build CMB ROM for your TF300T, a Tool/Utility for the Asus Transformer TF300T
Contributors
lj50036
Version Information
Status: Testing
Created 2014-01-17
Last Updated 2014-01-17
Sources
CMB github Click Me
ASOP Click Me
CM wiki Click Me
Java Click Me
Reserved
Download Tab
I posted a downloadable .txt file, so you don't have to have a browser open, for the process.. The download is available in the download tab at the top of every page of this forum... Thx as always lj

[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.

[Guide] Build MoKee Rom 7.1.2 For Samsung T700/T705/T800/T805

How To Build MoKee Rom For Exynos5420 Device (7.1.2)​Support Device :
HTML:
klimtwifi # Samsung T700
klimtlte # Samsung T705
chagallwifi # Samsung T800
chagalllte # Samsung T805
chagallltetmo # Samsung T807T
ha3g # Samsung Note3 (N900)
Step 1: Setting Up A Compile Environment
You must have a 64-bit environment.
A Linux computer should have 8 GB RAM or more, otherwise build errors may occur.
Ubuntu 16.04
These instructions should work for other version of Ubuntu and most other Debian-based systems.
Install build packages
Open a terminal (ctrl + alt + t). First install the necessary packages; copy paste the code below and hit enter.
HTML:
sudo apt-get update
sudo apt-get install git ccache automake lzop bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 g++-multilib python-networkx libxml2-utils bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev squashfs-tools pngcrush schedtool dpkg-dev liblz4-tool make optipng maven bc pngquant imagemagick yasm libssl-dev
sudo apt-get install openjdk-8-jdk
HTML:
mkdir -p ~/bin
mkdir -p ~/mokee
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
Add bin to PATH
HTML:
echo "export PATH=~/bin:$PATH" >> ~/.bashrc
Configure git:
HTML:
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
Move to build directory and sync the source code:
HTML:
cd ~/mokee
repo init -u https://github.com/Cyborg2017/android_mokee.git -b mokee-7.1.2
repo sync -j8 -f --no-clone-bundle
Let's configure ccache too. It will reduce the build time to 40% after first build
HTML:
echo "export USE_CCACHE=1" >> ~/.bashrc
~/mokee/prebuilts/misc/linux-x86/ccache/ccache -M 25G
25G means it will use upto 25 gb of disk space for ccaching. Atleast 10 gb is recommended. But if you want to compile for more devices, use more space for ccache.
Step 2: Compiling For Your Device
# MoKee Rom For Samsung Exynos5420 Chips Device
============================================================
To initialize your local repository using the MoKee trees, use a command like this:
HTML:
repo init -u https://github.com/Cyborg2017/android_mokee.git -b mokee-7.1.2
Then to sync up:
HTML:
repo sync
Start Work
-------------------------------------------------------------
To work faster, we introduced a new build script to help you start compiling.
First, go to the root path of your project. We assume that your source is under
(/mokee):
HTML:
cd /mokee
then feel free to use the build script:
HTML:
. build/envsetup.sh
lunch mk_klimtwifi # T700
lunch mk_klimtlte # T705
lunch mk_chagallwifi # T800
lunch mk_chagalllte # T805
lunch mk_chagallltetmo # T807T
lunch mk_ha3g # N900
mka bacon -j8
The script is interactive so everything else is self-explanatory.
Source:
https://github.com/Cyborg2017/android_mokee
https://github.com/Cyborg2017/android_device_samsung_exynos5420-common
https://github.com/Cyborg2017/android_device_samsung_chagalllte
https://github.com/Cyborg2017/android_device_samsung_chagallwifi
https://github.com/Cyborg2017/android_device_samsung_klimtlte
https://github.com/Cyborg2017/android_device_samsung_klimtwifi
https://github.com/Cyborg2017/android_device_samsung_chagallltetmo
https://github.com/Cyborg2017/android_device_samsung_ha3g
https://github.com/Cyborg2017/android_kernel_samsung_exynos5420
Thanks:
MoKee Rom Team: https://github.com/MoKee
Exynos5420 Team: https://github.com/exynos5420
LineageOs Team: https://github.com/LineageOS

Categories

Resources