[GUIDE] Compile CM/AOSP for MOTO E [SOURCES FOR MOTO E] - Moto E General

How to Build CyanogenMod for Moto E (codename: condor)
What you’ll need
Add a comment to this section
A Moto E
A relatively recent computer (Linux distribution (http://www.linuxmint.com/) w/a reasonable amount of RAM and about 35 GB of free storage. The less RAM you have, the longer the build will take. Using SSDs results in faster builds than traditional hard drives.
A USB cable compatible with the Moto E (typically micro USB, but older devices may use mini USB or have a proprietary cable)
A decent Internet connection & reliable electricity
Some familiarity with basic Android operation and terminology. It would help if you’ve installed custom roms on other devices and are familiar with what a recovery image such as ClockworkMod is, for example. It may also be useful to know some basic command line concepts such as cd for “change directory”, the concept of directory hierarchies, that in Linux they are separated by /, etc.
Install the Build Packages
sudo apt-get install
Code:
bison build-essential curl flex git gnupg gperf libesd0-dev libncurses5-dev libsdl1.2-dev libwxgtk2.8-dev libxml2 libxml2-utils lzop openjdk-6-jdk openjdk-6-jre phablet-tools pngcrush schedtool squashfs-tools xsltproc zip zlib1g-dev
FOR 64 BITS
Code:
g++-multilib gcc-multilib lib32ncurses5-dev lib32readline-gplv2-dev lib32z1-dev
Create the directories
Code:
$ mkdir -p ~/bin
$ mkdir -p ~/android/system
Initialize the CyanogenMod source repository
Code:
$ cd ~/android/system/
$ repo init -u git://github.com/CyanogenMod/android.git -b cm-11.0
repo sync -c
Get prebuilt apps
Code:
cd ~/android/system/vendor/cm
./get-prebuilts
GET MOTOROLA FILE FOR BUILD
Code:
ALL SOURCES TO COMPILE CYANOGENMOD OR OTHER ROM FOR MOTO E....
[URL="https://github.com/xperiafan-xda?tab=repositories"]SOURCES[/URL]
ALL IS DONE
Code:
cd ~/android/system
. build/envsetup.sh
brunch condor

Thanks for the guide!!

All sources...
Im fork all soucers that you need to compile without problem..
All is already patched...

xperiafan13 said:
Im fork all soucers that you need to compile without problem..
All is already patched...
Click to expand...
Click to collapse
Dear Sir,
I tried to build a custom ROM for moto E with your sources. But im getting following error when. Could you please advice me to resolve this matter.
hardware/qcom/display/msm8960/libhwcomposer/hwc_utils.cpp: In function 'int qhwc::hwc_sync(hwc_context_t*, hwc_display_contents_1_t*, int, int)':
hardware/qcom/display/msm8960/libhwcomposer/hwc_utils.cpp:676:37: error: aggregate 'qhwc::hwc_sync(hwc_context_t*, hwc_display_contents_1_t*, int, int)::msm_rotator_buf_sync rotData' has incomplete type and cannot be defined
hardware/qcom/display/msm8960/libhwcomposer/hwc_utils.cpp:684:26: error: 'MSM_ROTATOR_IOCTL_BUFFER_SYNC' was not declared in this scope
make: *** [/home/nodeone/moto_e/cm11/out/target/product/condor/obj/SHARED_LIBRARIES/hwcomposer.msm8610_intermediates/hwc_utils.o] Error 1
make: *** Waiting for unfinished jobs....
roomservie.xml
============
<project name="xperiafan-xda/android_device_moto_condor" path="device/moto/condor" revision="cm-11.0" />
<project name="xperiafan-xda/android_device_qcom_common" path="device/moto/qcom-common" remote="github" />
<project name="xperiafan-xda/kernel_moto_condor" path="kernel/moto/condor" revision="Kit-Kat" />
<project name="JackpotClavin/android_vendor_moto_condor" path="vendor/moto/condor" revision="cm-11.0" />
Thank you,
Best Regards,
Lasith.

i have been trying to flash unofficial cm11 on moto e . everything works but when i open any app on it if just minimizes itself im not able to use any app on cm11

Dear sir,
I save that you have used following configuraion path. Could you please tell me from where i can get this. This is not in your repo.
vendor/carbon/config/common_phone.mk
Thank you,
Best Regards,
lasith.

lasithwaruna said:
Dear Sir,
I tried to build a custom ROM for moto E with your sources. But im getting following error when. Could you please advice me to resolve this matter.
hardware/qcom/display/msm8960/libhwcomposer/hwc_utils.cpp: In function 'int qhwc::hwc_sync(hwc_context_t*, hwc_display_contents_1_t*, int, int)':
hardware/qcom/display/msm8960/libhwcomposer/hwc_utils.cpp:676:37: error: aggregate 'qhwc::hwc_sync(hwc_context_t*, hwc_display_contents_1_t*, int, int)::msm_rotator_buf_sync rotData' has incomplete type and cannot be defined
hardware/qcom/display/msm8960/libhwcomposer/hwc_utils.cpp:684:26: error: 'MSM_ROTATOR_IOCTL_BUFFER_SYNC' was not declared in this scope
make: *** [/home/nodeone/moto_e/cm11/out/target/product/condor/obj/SHARED_LIBRARIES/hwcomposer.msm8610_intermediates/hwc_utils.o] Error 1
make: *** Waiting for unfinished jobs....
roomservie.xml
============
<project name="xperiafan-xda/android_device_moto_condor" path="device/moto/condor" revision="cm-11.0" />
<project name="xperiafan-xda/android_device_qcom_common" path="device/moto/qcom-common" remote="github" />
<project name="xperiafan-xda/kernel_moto_condor" path="kernel/moto/condor" revision="Kit-Kat" />
<project name="JackpotClavin/android_vendor_moto_condor" path="vendor/moto/condor" revision="cm-11.0" />
Thank you,
Best Regards,
Lasith.
Click to expand...
Click to collapse
check here, mmay be some others commits to do, idk.
https://github.com/OpenDesireProjec...1916e666f6cc1/include/linux/msm_rotator.h#L15

@satthak sharma
Do a nandroid backup .Go to recovery n wipe cache and dalvik cache then reboot see if this works.

I've been trying to build aokp rom from source over here!! Unfortunately i dont have the device tree ,vendor tree to go further with its compilation!! Can anyone help me here??
•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•°•

Related

[GUIDE CM11] How to made your own ROM based on CyanogenMod for the Note2

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

Guide on building Lollipop for the OnePlus One

Today I went about and built a copy of CM12 for my phone so that I can control when I get updates and I can get the most latest update. There was a few issues I ran into following other peoples guides in the Android L Dicussions, so I thought I'll do a quick write on exactly what I did so you can go about building it for yourself.
A good resource on building CyanogenMod is available at http://wiki.cyanogenmod.org/w/Build_for_bacon, they don't have a guide for CM12, but still has some useful information.
Make sure you use the same operating system as I am using which is Ubuntu. I tried using Debian earlier, but had issues which may have been resulted to me not having enought memory on disk or me interupting the download of source code.
Preparing System for Build
Install the following items via apt-get.
Code:
sudo apt-get install bison build-essential curl flex git 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 g++-multilib gcc-multilib lib32ncurses5-dev lib32readline-gplv2-dev lib32z1-dev
As per the instructions on the wiki for building CM, if you use a 32bit system, do not install g++-multilib gcc-multilib lib32ncurses5-dev lib32readline-gplv2-dev lib32z1-dev.
Install the latest version of Java's development kit using the following.
Code:
sudo apt-get install openjdk-7-jdk
Install the Android Development Kit using the following.
Code:
sudo apt-get install android androidsdk-uiautomatorviewer android-copyright android-src-vendor android-emulator android-tools-adb android-headers android-tools-adbd androidsdk-ddms android-tools-fastboot androidsdk-hierarchyviewer android-tools-fsutils androidsdk-traceview
Run the following in terminal.
Code:
mkdir -p ~/bin
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
reboot your system or use the following in terminal to load the .profile file again.
Code:
. ~/.profile
Getting the source code.
Now we can get onto grabbing the source code of CM12.
Run the following in terminal.
Code:
mkdir ~/cm
cd ~/cm
repo init -u git://github.com/CyanogenMod/android.git -b cm-12.0
mkdir .repo/local_manifests
nano .repo/local_manifests/local_manifests.xml
When nano appears, paste the following into it and then exit using ctrl-x and choose to save.
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="CyanogenMod/android_device_oneplus_bacon" path="device/oneplus/bacon" remote="github" />
<project name="CyanogenMod/android_device_qcom_common" path="device/qcom/common" remote="github" />
<project name="CyanogenMod/android_device_oppo_msm8974-common" path="device/oppo/msm8974-common" remote="github" />
<project name="CyanogenMod/android_device_oppo_common" path="device/oppo/common" remote="github" revision="cm-12.0" />
<project name="CyanogenMod/android_kernel_oneplus_msm8974" path="kernel/oneplus/msm8974" remote="github" />
<project name="TheMuppets/proprietary_vendor_oppo" path="vendor/oppo" remote="github" />
<project name="TheMuppets/proprietary_vendor_oneplus" path="vendor/oneplus" remote="github" />
<project name="CyanogenMod/android_frameworks_opt_connectivity" path="frameworks/opt/connectivity" remote="github" revision="cm-11.0" />
</manifest>
Continue getting the code using the following.
Code:
repo sync
cd vendor/cm
./get-prebuilts
cd ../..
Building CM12
Run the following commands to build CyanogenMod.
Code:
. build/envsetup.sh
breakfast bacon
brunch bacon
After successful build, you should be able to go about copying the built CyanogenMod and installing it into your phone. The CyanogenMod build is located in ~/cm/out/target/product/bacon/ named something like cm-12-*-UNOFFICIAL-bacon.zip
You can install folllowing: http://forum.xda-developers.com/oneplus-one/general/lollipop-install-guide-oneplus-one-t2940091
Re-building to update.
To re-build, you should just be able to run the following (Not yet tested myself, but makes logical sense).
Code:
make clobber
repo sync
cd vendor/cm
./get-prebuilts
cd ../..
. build/envsetup.sh
brunch bacon
Q&A
Q: Recieve error: fatal: duplicate path device/qcom/sepolicy in ~/cm/.repo/manifest.xml
A: edit .repo/local_manifests/local_manifests.xml to remove the item which matches the item located in bold.
Q: How big is the repo?
A: 20GB just source code and 40GB when built. Therefore you should aim to have about 60GB free on your system.
you don't necessarily need Ubuntu 14.04. You could do just fine on 12.04 or 13.10 or whatever.
Also, something that's good to know: if you have a build environment that you've been building kitkat in, the only thing you need to do is update your Java from 1.6 to 1.7
how big is the cm 12 download?
This is a really nice tutorial. Thanks OP.
Nice guide!
Umm.... As far as I know, it isn't necessary to croot...
And it seems to compile fine with just . build/envsetup.sh && brunch bacon.
Just my two cents.
Sent from my A0001 using XDA Premium 4 mobile app
rudi_j7 said:
Nice guide!
Umm.... As far as I know, it isn't necessary to croot...
And it seems to compile fine with just . build/envsetup.sh && brunch bacon.
Just my two cents.
Sent from my A0001 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Exactly this.
Croot "change root (directory)" is unneeded when you're already in the root directoy.
Code:
. build/envsetup.sh
breakfast bacon
brunch bacon
is more than than enough. This will automatically allocate to cores as is needed and compiles the flashable zips. Silly to make the build with make -j*of cores* and then make otapackage when one command will do both for you.
On the grounds of repo sync, inputting it just like that "repo sync" runs on 4 threads with -c already which is more than fast enough for people.
The CM manifests include a sensible default configuration for repo, which we strongly suggest you use (i.e. don't add any options to sync). For reference, our default values are -j 4 and -c. The -j 4 part means that there will be four simultaneous threads/connections. If you experience problems syncing, you can lower this to -j 3 or -j 2. -c will ask repo to pull in only the current branch, instead of the entire CM history.
Click to expand...
Click to collapse
As for the platform tools, those are all installable through Ubuntu's apt repositories.
Code:
[email protected]:~$ sudo apt-get install android
android androidsdk-uiautomatorviewer
android-copyright android-src-vendor
android-emulator android-tools-adb
android-headers android-tools-adbd
androidsdk-ddms android-tools-fastboot
androidsdk-hierarchyviewer android-tools-fsutils
androidsdk-traceview
No offense to @GRMrGecko but people should read up on what they're inputting into their Terminals.
What Envsetup does: http://wiki.cyanogenmod.org/w/Envsetup_help
linezero said:
how big is the cm 12 download?
Click to expand...
Click to collapse
20GB, probably larger once compiled.
pandasa123 said:
you don't necessarily need Ubuntu 14.04. You could do just fine on 12.04 or 13.10 or whatever.
Also, something that's good to know: if you have a build environment that you've been building kitkat in, the only thing you need to do is update your Java from 1.6 to 1.7
Click to expand...
Click to collapse
I completely forgot to add the java install into the guide.
Nburnes said:
No offense to @GRMrGecko but people should read up on what they're inputting into their Terminals.
What Envsetup does: http://wiki.cyanogenmod.org/w/Envsetup_help
Click to expand...
Click to collapse
Thanks for the input. I had an understanding on what I was doing as far as envsetup.sh setting the environment for the commands for croot, breakfast, ect and that breakfast builds the make configuration somewhat like how configure on many other software. But I never took the time to go about and research as I wanted to make a working build and had issues using Debian. I thought that I will share what I did and just make a general resource for people to come to and get help with building as I only saw build instructions here and there in the Lollipop discussions.
I have incorporated your feedback into the instructions and I am testing the re-build now with your commands to verify that they work the way they are.
Thank you.
This is great, now there's no excuse for anyone!
?good job
Sent from my NX507J using XDA Premium 4 mobile app
Nburnes said:
Code:
. build/envsetup.sh
breakfast bacon
brunch bacon
Click to expand...
Click to collapse
According to the URL you posted (http://wiki.cyanogenmod.org/w/Envsetup_help) breakfast isn't even needed as brunch does breakfast and mka in one go.
GRMrGecko said:
According to the URL you posted (http://wiki.cyanogenmod.org/w/Envsetup_help) breakfast isn't even needed as brunch does breakfast and mka in one go.
Click to expand...
Click to collapse
Exactly why I said only . build/envsetup.sh && brunch bacon
Sent from my A0001 using XDA Premium 4 mobile app
rudi_j7 said:
Exactly why I said only . build/envsetup.sh && brunch bacon
Click to expand...
Click to collapse
Thanks, I wasn't sure if that was true as Nburnes said to use both brunch and breakfast and from what I saw in the discussions posts, he knew what he was doing.
I have this problem. How to solve it?
E: Unable to locate package android
E: Unable to locate package android-copyright
E: Unable to locate package android-src-vendor
E: Unable to locate package android-emulator
scafroglia57 said:
I have this problem. How to solve it?
E: Unable to locate package android
E: Unable to locate package android-copyright
E: Unable to locate package android-src-vendor
E: Unable to locate package android-emulator
Click to expand...
Click to collapse
What version of Ubuntu do you have? lsb_release -a
I think you may be fine with those packages not being available, as long as you get adb/fastboot.
GRMrGecko said:
What version of Ubuntu do you have? lsb_release -a
I think you may be fine with those packages not being available, as long as you get adb/fastboot.
Click to expand...
Click to collapse
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.1 LTS
Release: 14.04
Codename: trusty
scafroglia57 said:
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.1 LTS
Release: 14.04
Codename: trusty
Click to expand...
Click to collapse
That is the same as mine. Try running sudo apt-get update and see if that changes what packages are available.
GRMrGecko said:
That is the same as mine. Try running sudo apt-get update and see if that changes what packages are available.
Click to expand...
Click to collapse
Nothing
scafroglia57 said:
Nothing
Click to expand...
Click to collapse
Just try continuing without those packages.

[Guide][Lollipop] How to Compile Your own ROM's for the Zenfone 2 Z00A/Z008

Well I've been getting a lot of questions on how users can take development into their own hands and start compiling your very own builds of your favorite ROM's. Because of this I have decided to write up a guide that will explain all the steps you need to take to compile a ROM.
NOTE: if your problem is that you cant get your build booting but you already know how to compile ROM's then skip to step 5
Step 1: Install A linux distribution
you will need to be on a linux distribution such as Ubuntu to compile android from source. You can do it on OSX as well but I don't have instructions for that because I haven't done it. So if you aren't on a linux distribution that will be the first thing you need to do. there's thousands of guides online on how to do that so go do that
Step 2: set up the build environment
you will need a lot of packages installed to successfully compile without any errors which ill list here
if you're using ubuntu or another debian based distro then type this in your terminal
Code:
sudo apt-get install bison build-essential curl flex git 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 g++-multilib gcc-multilib lib32ncurses5-dev lib32readline-gplv2-dev lib32z1-dev openjdk-7-jdk android androidsdk-uiautomatorviewer android-copyright android-src-vendor android-emulator android-tools-adb android-headers android-tools-adbd androidsdk-ddms android-tools-fastboot androidsdk-hierarchyviewer android-tools-fsutils androidsdk-traceview yasm
you probably dont need all of those installed but its better to have one extra package then one missing package.
now that you have all the packages needed. its time to set up repo so you are able to sync the sources. type this into your terminal
Code:
mkdir -p ~/bin
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
Step 3: getting the ROM sources
time to play the waiting game! For this part of the guide I will explain how to fetch cyanogenmod's sources.
in your home folder, make a folder called cyanogenmod. Now open the folder and open a terminal inside of it.
inside the terminal type
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-12.1
now you might get an error that says something like "Error, tell me who you are!" so you are going to want to type
Code:
git config --global user.email [email protected]
then
Code:
git config --global user.name YourGithubName
you can use fake credentials but i recommend making a git and using your real information.
now run the command once more
Code:
repo init -u git://github.com/CyanogenMod/android.git -b cm-12.1
now it will properly set up the repository. After that type in
Code:
repo sync
and wait for all the sources to download. It will probably take a few hours so I suggest you go do something else and come back later.
If you get any errors while syncing type
Code:
repo sync -j1 -f
Step 4: set up Zenfone specific sources
now that you have cyanogenmods sources downloaded you will need to add zenfones sources.
you can find the zenfone sources here:
https://github.com/CM-zenfone2
for now go into the .repo folder inside your cyanogenmod folder. you may have to enable "show hidden folders" in your file managers settings to see it. inside of this folder create another one called local_manifests . inside this folder create a file called local_manifest.xml .
now open that xml file with a text editor and paste this into it
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<!-- REMOVE AOSP PROJECTS -->
<remove-project name="platform/hardware/intel/common/libmix" path="hardware/intel/common/libmix" />
<remove-project name="platform/hardware/intel/common/libstagefrighthw" path="hardware/intel/common/libstagefrighthw" />
<remove-project name="platform/hardware/intel/common/libva" path="hardware/intel/common/libva" />
<remove-project name="platform/hardware/intel/common/omx-components" path="hardware/intel/common/omx-components" />
<remove-project name="platform/hardware/intel/common/utils" path="hardware/intel/common/utils" />
<remove-project name="platform/hardware/intel/common/wrs_omxil_core" path="hardware/intel/common/wrs_omxil_core" />
<remove-project name="platform/hardware/intel/img/hwcomposer" path="hardware/intel/img/hwcomposer" />
<remove-project name="platform/hardware/intel/img/libdrm" path="hardware/intel/img/libdrm" />
<remove-project name="platform/hardware/intel/img/psb_video" path="hardware/intel/img/psb_video" />
<!-- ADD CM-ZENFONE2 PROJECTS -->
<project name="CM-zenfone2/android_hardware_intel_common_libmix" path="hardware/intel/common/libmix" remote="github" />
<project name="CM-zenfone2/android_hardware_intel_common_libstagefrighthw" path="hardware/intel/common/libstagefrighthw" remote="github" />
<project name="CM-zenfone2/android_hardware_intel_common_libva" path="hardware/intel/common/libva" remote="github" />
<project name="CM-zenfone2/android_hardware_intel_common_omx-components" path="hardware/intel/common/omx-components" remote="github" />
<project name="CM-zenfone2/android_hardware_intel_common_utils" path="hardware/intel/common/utils" remote="github" />
<project name="CM-zenfone2/android_hardware_intel_common_wrs_omxil_core" path="hardware/intel/common/wrs_omxil_core" remote="github" />
<project name="CM-zenfone2/android_hardware_intel_img_hwcomposer" path="hardware/intel/img/hwcomposer" remote="github" />
<project name="CM-zenfone2/android_hardware_intel_img_libdrm" path="hardware/intel/img/libdrm" remote="github" />
<project name="CM-zenfone2/android_hardware_intel_img_psb_video" path="hardware/intel/img/psb_video" remote="github" />
<!-- CM-ZENFONE2 DEVICE PROJECTS -->
<project name="CM-zenfone2/android_device_asus_Z00A" path="device/asus/Z00A" remote="github" />
<project name="CM-zenfone2/android_device_asus_Z008" path="device/asus/Z008" remote="github" />
<project name="CM-zenfone2/android_device_asus_mofd-common" path="device/asus/mofd-common" remote="github" />
<project name="CM-zenfone2/android_kernel_asus_moorefield" path="kernel/asus/moorefield" remote="github" />
<project name="CM-zenfone2/proprietary_vendor_asus" path="vendor/asus" remote="github" />
</manifest>
now save and close that xml file. go back to your terminal in the cyanogenmod folder and run
Code:
repo sync -j1 --force-sync
this will now pull in the zenfone files you need.
Zenfone sources are now synced into the official CM github so these steps aren't needed. the only extra thing to do now is:
in your vendor folder
Code:
git clone https://github.com/TheMuppets/proprietary_vendor_asus.git -b cm-12.1
then rename the folder to "asus"
Step 5: adding device specific commits
this is probably the step that most people don't do and therefore get builds that won't boot. You need to add 4 A bunch of very important commits to get your ROM properly booting.
commit 1
go inside of your external/tinyalsa folder and open a terminal then type in:
Code:
git fetch http://review.cyanogenmod.org/CyanogenMod/android_external_tinyalsa refs/changes/43/103343/1 && git cherry-pick FETCH_HEAD
now close the terminal and go to the folder hardware/intel/img/hwcomposer and open a terminal. type this in:
Code:
git fetch http://review.cyanogenmod.org/CyanogenMod/android_hardware_intel_img_hwcomposer refs/changes/82/117182/1 && git cherry-pick FETCH_HEAD
and
Code:
git fetch http://review.cyanogenmod.org/CyanogenMod/android_hardware_intel_img_hwcomposer refs/changes/83/117183/1 && git cherry-pick FETCH_HEAD
open up hardware/intel/img/libdrm and paste this in the terminal:
Code:
git fetch http://review.cyanogenmod.org/CyanogenMod/android_hardware_intel_img_libdrm refs/changes/01/117201/1 && git cherry-pick FETCH_HEAD
put this in hardware/intel/common/libmix
Code:
git fetch http://review.cyanogenmod.org/CyanogenMod/android_hardware_intel_common_libmix refs/changes/91/117191/1 && git cherry-pick FETCH_HEAD
now go into the folder hardware/ril. Open the terminal and type:
Code:
git fetch http://review.cyanogenmod.org/CyanogenMod/android_hardware_ril refs/changes/25/102725/2 && git cherry-pick FETCH_HEAD
now open the frameworks/native folder and type in the terminal:
Code:
git fetch http://review.cyanogenmod.org/CyanogenMod/android_frameworks_native refs/changes/36/108636/2 && git cherry-pick FETCH_HEAD
these are the 4 commits that those commands are adding for anybody interested:
https://github.com/TeamEOS/system_core/commit/870fff040f14f4a659807d74419300ef0f223a30
https://github.com/TeamEOS/system_core/commit/7fb271f606394692cbf303f3e7d4889e4ff04369
https://github.com/TeamEOS/hardware_ril/commit/bb9b4e567e5bba35ae380ee0a56833ba385af654
https://github.com/TeamEOS/external_tinyalsa/commit/3bba475d5ad4db3f813ff121ff3d195043307f46
NOTE:New commits for the quick charging UI have been added that you need to add. check post 3 for them
now we have set everything we need properly to build the rom!
Step 6: Start the build
finally, time to start building! open a terminal in the cyanogenmod folder and type
Code:
. build/envsetup.sh
now type
Code:
brunch Z00A
for Z00A or
Code:
brunch Z008
for Z008.
this will also take a while depending on your computers specs (around 4 hours).
When its done you will find the zip in the folder out/target/product/Z00A (or Z008).
you can now put this zip on your device and flash away
to update sources and make a new build you can do repo sync and step 5 and 6 again
I hope this guide can help motivate people interested in building to give it a go as well as help grow the community even more then it already is! feel free to post any questions you have here and I will help to the best of my ability.
reserved
I will expand on this more but to build a rom other then cyanogenmod, (for example EOS) you would go into the device/asus/Z00A folder and change the cm.mk file to eos.mk as well as everything inside that file that refers to cyanogenmod to eos. most ROM's you do something similar to that but instead of changing to eos you change it to the rom you are building. Refer to other device sources of the ROM you want to build as a guide to what to do
For quick charging UI
paste this command into your frameworks/native folder
Code:
git fetch http://review.cyanogenmod.org/CyanogenMod/android_frameworks_native refs/changes/64/109364/3 && git cherry-pick FETCH_HEAD
then paste this into your frameworks/base folder
Code:
git fetch http://review.cyanogenmod.org/CyanogenMod/android_frameworks_base refs/changes/66/109366/7 && git cherry-pick FETCH_HEAD
and lastly paste this into system/core
Code:
git fetch http://review.cyanogenmod.org/CyanogenMod/android_system_core refs/changes/65/109365/6 && git cherry-pick FETCH_HEAD
Thanks bro, I started this but I'm very noob xD
Hebelm16 said:
Thanks bro, I started this but I'm very noob xD
Enviado desde mi ASUS_Z00AD mediante Tapatalk
Click to expand...
Click to collapse
Nice! No worries we all start somewhere
Great bro thanks
Good Job Bro Thanks
Niropa said:
Nice! No worries we all start somewhere
Click to expand...
Click to collapse
I swear I was looking for this type of teacher from a very very long time..
And when you said it will take a long time, how much is the data to be downloaded? Actually the speed differs here so I will estimate myself how much time it will take
S#@DY said:
I swear I was looking for this type of teacher from a very very long time..
And when you said it will take a long time, how much is the data to be downloaded? Actually the speed differs here so I will estimate myself how much time it will take
Click to expand...
Click to collapse
Generally its changing but i downloaded 40gb for blisspop know i downloading euphoria os repo we will see the size
S#@DY said:
I swear I was looking for this type of teacher from a very very long time..
And when you said it will take a long time, how much is the data to be downloaded? Actually the speed differs here so I will estimate myself how much time it will take
Click to expand...
Click to collapse
It will be around 50gb so compare that to your internet speed
Niropa said:
It will be around 50gb so compare that to your internet speed
Click to expand...
Click to collapse
That would take 2 days
If I have any free time next month am going to try to learn all this rom compiling etc and build a temasek based rom.
GGL-Daz said:
If I have any free time next month am going to try to learn all this rom compiling etc and build a temasek based rom.
Click to expand...
Click to collapse
Great to hear! Temasek is actually very easy, you would follow this guide exactly but instead of syncing cyanogenmods sources you would sync temaseks which you can find on his github
Sorry @Niropa how add source? (step 4)
Hebelm16 said:
Sorry @Niropa how add source? (step 4)
Click to expand...
Click to collapse
what are you having trouble with?
also there might be an issue with the steps I showed to cherry-pick the commits so im going to update it right now
Code:
. build/envsetup.sh
lunch <rom name>_<device model>-userdebug
make bacon -j8
This works as well and eats your cpu little less compared to brunch. You could add in the OP @Niropa
Vatsal said:
Code:
. build/envsetup.sh
lunch <rom name>_<device model>-userdebug
make bacon -j8
This works as well and eats your cpu little less compared to brunch. You could add in the OP @Niropa
Click to expand...
Click to collapse
right because brunch uses mka instead of make. mka uses all cores/threads available so your build will finish faster
hi noob here..
i have following steps in the first post.
however, i got error like below:
device/asus/mofd-common/libhealthd/healthd_board_mofd_v1.cpp: In function 'int mapBatteryStatusString(const char*)':
device/asus/mofd-common/libhealthd/healthd_board_mofd_v1.cpp:26:12: error: 'HEALTHD_MAP_CONTINUE_SEARCH' was not declared in this scope
return HEALTHD_MAP_CONTINUE_SEARCH;
^
device/asus/mofd-common/libhealthd/healthd_board_mofd_v1.cpp: In function 'int mapChargeRateString(const char*)':
device/asus/mofd-common/libhealthd/healthd_board_mofd_v1.cpp:32:16: error: 'BATTERY_CHARGE_RATE_FAST_CHARGING' is not a member of 'android'
return android::BATTERY_CHARGE_RATE_FAST_CHARGING;
^
device/asus/mofd-common/libhealthd/healthd_board_mofd_v1.cpp:34:16: error: 'BATTERY_CHARGE_RATE_UNKNOWN' is not a member of 'android'
return android::BATTERY_CHARGE_RATE_UNKNOWN;
^
device/asus/mofd-common/libhealthd/healthd_board_mofd_v1.cpp: In function 'void healthd_board_init(healthd_config*)':
device/asus/mofd-common/libhealthd/healthd_board_mofd_v1.cpp:39:13: error: 'struct healthd_config' has no member named 'batteryChargeRatePath'
config->batteryChargeRatePath = "/sys/class/power_supply/battery/status";
^
device/asus/mofd-common/libhealthd/healthd_board_mofd_v1.cpp:40:13: error: 'struct healthd_config' has no member named 'mapBatteryStatusString'
config->mapBatteryStatusString = mapBatteryStatusString;
^
device/asus/mofd-common/libhealthd/healthd_board_mofd_v1.cpp:41:13: error: 'struct healthd_config' has no member named 'mapChargeRateString'
config->mapChargeRateString = mapChargeRateString;
^
make: *** [/home/myusuf1810/cyanogenmod/out/target/product/Z00A/obj/STATIC_LIBRARIES/libhealthd.mofd_v1_intermediates/healthd_board_mofd_v1.o] Error 1
make: *** Waiting for unfinished jobs....
#### make failed to build some targets (03:29 (mm:ss)) ####
Click to expand...
Click to collapse
i retried the whole steps on new folder, get the same result.
is it the code or my mistake for missing some steps?
ucupsz said:
hi noob here..
i have following steps in the first post.
however, i got error like below:
i retried the whole steps on new folder, get the same result.
is it the code or my mistake for missing some steps?
Click to expand...
Click to collapse
hey! no worries you did nothing wrong. because of the new quick charging UI the cm zenfone team added theres a few new things you have to cherry-pick.
paste this command into your frameworks/native folder
Code:
git fetch http://review.teameos.org/frameworks_native refs/changes/14/914/1 && git cherry-pick FETCH_HEAD
then paste this into your frameworks/base folder
Code:
git fetch http://review.teameos.org/frameworks_base refs/changes/16/916/1 && git cherry-pick FETCH_HEAD
and lastly paste this into system/core
Code:
git fetch http://review.teameos.org/system_core refs/changes/15/915/1 && git cherry-pick FETCH_HEAD
wow!! thanks so much Niropa! it works!
took 3 hrs on my rig )
so, i try to go to review.teameos.org and searching for libhealthd which is shown in error message. and get to the changes you shown. (914-916).
however, i'm a bit lost on how to get the link "refs/changes/14/914/1" "refs/changes/15/915/1" and "refs/changes/16/916/1" to be inputted to the command line.
from the searching, what i found was numbering 914, 915 and 916.
so if i had similar error (some update on the code), can you show me how i can get to "refs/changes......"

[GUIDE] How to build Marshmallow Custom ROMs for Galaxy Note 2

Hello everyone,
today I will present you the ultimate guide for how to build Android Marshmallow for our Galaxy Note 2. Thid guide can be only used for GT-N7100.
Let's start
What you’ll need
PC with Linux
At least 4GB RAM
100GB hard disk or SSD
Linux 64-Bit
1:Open the Terminal and copy the following into:
Code:
sudo apt-get install bison build-essential curl flex git gnupg gperf libesd0-dev liblz4-tool libncurses5-dev libsdl1.2-dev libwxgtk2.8-dev libxml2 libxml2-utils lzop maven openjdk-7-jdk openjdk-7-jre pngcrush schedtool squashfs-tools xsltproc zip zlib1g-dev
2.After installing the modules, you will need to create some directorys
Code:
mkdir -p ~/bin
3. Now we should install repo. You will need repo to sync all the souece code (17GB)
Code:
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repochmod a+x ~/bin/repo
Now the preparations are all done. This guide will be split up into the ROM sections now.
​
Temasek
How to build Android Marshmallow Temasek for GT-N7100
4:Create a directory for Temasek ROM:
Code:
mkdir Temasek
5. Now we will go into the directory and sync the source code:
Code:
cd Temasek
6. Inizialize:
Code:
repo init -u https://github.com/temasek/android.git -b cm-13.0
7. Sync the Code:
Code:
repo sync
8. Create a local manifest:
Go with the explorer into the Temasek directory and press STRG+H.
Now go into the dir .repo and create a new dir named local_manifests
Now create a roomservice.xml.
9. Copy this into the XML:
Code:
[URL]https://raw.githubusercontent.com/Trafalgar-Square/roomservice/temasek-mm6.0/n7100.xml[/URL]
10. Sync the device specific files:
Code:
Type [B]repo sync[/B] in terminal
11. Build the ROM:
Code:
. build/envsetup.sh
breakfast n7100
brunch n7100
12. Get the ROM:
Code:
Get the ROM here:
Temasek/out/target/product/n7100/***
Resurrection Remix
How to build Android Marshmallow ResurrectionRemix for GT-N7100
4:Create a directory for Resurrection ROM:
Code:
mkdir RR
5. Now we will go into the directory and sync the source code:
Code:
cd RR
6. Inizialize:
Code:
repo init -u https://github.com/ResurrectionRemix/platform_manifest.git -b marshmallow
7. Sync the Code:
Code:
repo sync
8. Create a local manifest:
Go with the explorer into the RR directory and press STRG+H.
Now go into the dir .repo and create a new dir named local_manifests
Now create a roomservice.xml.
9. Copy this into the XML:
Code:
[URL]https://raw.githubusercontent.com/Trafalgar-Square/roomservice/temasek-mm6.0/n7100.xml[/URL]
10. Sync the device specific files:
Code:
Type [B]repo sync[/B] in terminal
11. Build the ROM:
Code:
. build/envsetup.sh
breakfast n7100
brunch n7100
12. Get the ROM:
Code:
Get the ROM here:
RR/out/target/product/n7100/***
Note:
You can use the same device specific files for ResurrectionRemix as they are all Cyanogen based.
​
Bliss Marsh
How to build Android Marshmallow BlissMarsh for GT-N7100
4:Create a directory for Bliss ROM:
Code:
mkdir Bliss
5. Now we will go into the directory and sync the source code:
Code:
cd Bliss
6. Inizialize:
Code:
repo init -u https://github.com/BlissRoms/platform_manifest.git -b mm6.0
7. Sync the Code:
Code:
repo sync
8. Create a local manifest:
Go with the explorer into the Bliss directory and press STRG+H.
Now go into the dir .repo and create a new dir named local_manifests
Now create a roomservice.xml.
9. Copy this into the XML:
Code:
[URL]https://raw.githubusercontent.com/Trafalgar-Square/roomservice/bliss-mm6.0/n7100.xml[/URL]
10. Sync the device specific files:
Code:
Type [B]repo sync[/B] in terminal
11. Build the ROM:
Code:
. build/envsetup.sh
breakfast n7100
brunch n7100
12. Get the ROM:
Code:
Get the ROM here:
Bliss/out/target/product/n7100/***
CyanogenMod
How to build Android Marshmallow CyanogenMod for GT-N7100
4:Create a directory for CyanogenMod ROM:
Code:
mkdir CyanogenMod
5. Now we will go into the directory and sync the source code:
Code:
cd CyanogenMod
6. Inizialize:
Code:
repo init -u https://github.com/CyanogenMod/android.git -b cm-13.0
7. Sync the Code:
Code:
repo sync
8. Create a local manifest:
Go with the explorer into the CyanogenMod directory and press STRG+H.
Now go into the dir .repo and create a new dir named local_manifests
Now create a roomservice.xml.
9. Copy this into the XML:
Code:
[URL]https://raw.githubusercontent.com/Tr...m6.0/n7100.xml[/URL]
10. Sync the device specific files:
Code:
Type [B]repo sync[/B] in terminal
11. Build the ROM:
Code:
. build/envsetup.sh
breakfast n7100
brunch n7100
12. Get the ROM:
Code:
Get the ROM here:
CyanogenMod/out/target/product/n7100/***
Could you please correct the last post, URL is incorrect under 9.
hello Trafalgar Square, please help me, why with follow error?
I access "https://gerrit.googlesource.com/git-repo/" with explorer and it can access it
[email protected]:~/CyanogenMod# ~/bin/repo init -u https://github.com/CyanogenMod/android.git -b cm-13.0
fatal: Cannot get https://gerrit.googlesource.com/git-repo/clone.bundle
fatal: error [Errno 101] Network is unreachable
[email protected]:~/CyanogenMod#
Thanks i will try
Right now my phone is dead ??
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repochmod a+x ~/bin/repo
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 26223 100 26223 0 0 28644 0 --:--:-- --:--:-- --:--:-- 28627
0 0 0 0 0 0 0 0 --:--:-- 0:00:14 --:--:-- 0curl: (6) Could not resolve host: a+x
curl: (3) <url> malformed
Omg !! @Trafalgar Square i have been waiting for someone to make this guide for a long time and you are the first to help in . Thank you so much !! You make me so happy today . May God bless you buddy.
One more thing , can i use 32 bit computer to make a cm 13 rom?
husseinholmes said:
One more thing , can i use 32 bit computer to make a cm 13 rom?
Click to expand...
Click to collapse
No.
Trafalgar Square said:
No.
Click to expand...
Click to collapse
Thanks , it seems i need to get a job
to buy 64 bit computer.
husseinholmes said:
Thanks , it seems i need to get a job
to buy 64 bit computer.
Click to expand...
Click to collapse
Lol yes.
If you need more help with building contact me here
Trafalgar Square said:
Lol yes.
If you need more help with building contact me here
Click to expand...
Click to collapse
Ok thanks ^_^
@Trafalgar Square Can you share n7100.xml local manifest roomservice file for cm12.1?
error: Exited sync due to fetch errors
Looking for dependencies
Dependencies file not found, bailing out.
Done
build/core/product_config.mk:239: *** _nic.PRODUCTS.[[device/samsung/n7100/cm.mk]]: "vendor/samsung/smdk4412-common/common-vendor.mk" does not exist. Durdu.
** Don't have a product spec for: 'cm_n7100'
** Do you have the right repo manifest?
@Trafalgar Square i want to build Temasek cm12.1. He is still update going on cm12.1. Can you help me about this?
i am stuck this error
target thumb C++: hwcomposer.exynos4 <= hardware/samsung/exynos4/hal/libhwcomposer/SecHWCLog.cpp
In file included from hardware/samsung/exynos4/hal/libhwcomposer/SecHWCLog.cpp:28:0:
hardware/samsung/exynos4/hal/libhwcomposer/SecHWCUtils.h:37:28: fatal error: linux/videodev.h: No such file or directory
#include <linux/videodev.h>
^
compilation terminated.
make: *** [/home/zeratull/cm/out/target/product/n7100/obj/SHARED_LIBRARIES/hwcomposer.exynos4_intermediates/SecHWCLog.o] Error 1
make: *** Waiting for unfinished jobs....
make: Leaving directory `/home/zeratull/cm'
#### make failed to build some targets (25:22 (mm:ss)) ####
my roomservice is under
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project name="CyanogenMod/android_device_samsung_N7100" path="device/samsung/N7100" remote="github" revision="cm-12.1" />
<project name="CyanogenMod/android_kernel_samsung_smdk4412" path="kernel/samsung/smdk4412" remote="github" revision="cm-12.1" />
<project name="CyanogenMod/android_packages_apps_SamsungServiceMode" path="packages/apps/SamsungServiceMode" remote="github" revision="cm-12.1" />
<project name="CyanogenMod/android_hardware_samsung" path="hardware/samsung" remote="github" revision="cm-12.1" />
<remove-project name="CyanogenMod/android_hardware_samsung" />
<project name="tilaksidduram/android_hardware_samsung" path="hardware/samsung" remote="github" revision="lollipop" />
<project name="TheMuppets/proprietary_vendor_samsung" path="vendor/samsung" remote="github" revision="cm-12.1" />
</manifest>
Click to expand...
Click to collapse
zeratull said:
i am stuck this error
target thumb C++: hwcomposer.exynos4 <= hardware/samsung/exynos4/hal/libhwcomposer/SecHWCLog.cpp
In file included from hardware/samsung/exynos4/hal/libhwcomposer/SecHWCLog.cpp:28:0:
hardware/samsung/exynos4/hal/libhwcomposer/SecHWCUtils.h:37:28: fatal error: linux/videodev.h: No such file or directory
#include <linux/videodev.h>
^
compilation terminated.
make: *** [/home/zeratull/cm/out/target/product/n7100/obj/SHARED_LIBRARIES/hwcomposer.exynos4_intermediates/SecHWCLog.o] Error 1
make: *** Waiting for unfinished jobs....
make: Leaving directory `/home/zeratull/cm'
#### make failed to build some targets (25:22 (mm:ss)) ####
my roomservice is under
Click to expand...
Click to collapse
Search git in CyanogenMod android-hardware-samsung the commit you are missing. The same mistake tells you what you need.
Enviado desde mi GT-N7100 mediante Tapatalk

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

Categories

Resources