Affichage des articles dont le libellé est GUIDECM12. Afficher tous les articles
Affichage des articles dont le libellé est GUIDECM12. Afficher tous les articles

samedi 13 décembre 2014

[GUIDE][CM12] Compiling CM12 for Moto G and cherry picking features. topic






Here's a little something for the guys (and flashaholics) who don't like to wait for devs to release new CM12 builds.

AFAIK ROMS CAN'T BE COMPILED ON 32 BIT SYSTEMS. ONLY 64 BIT.

We start with setting up the build environment:
First, start with installing this:

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

Once that is done, we go about installing JDK-7 since that's the one that works for lollipop :p


Code:


sudo apt-get install openjdk-7-jdk

Then we install the Android SDK for some useful stuff:


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

Once all that is dealt with, we can move on to the repo tool. That's what will get your CM repos syncing:


Code:


mkdir -p ~/bin
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo


and then, reboot to apply the changes.

Now for the interesting part
Not really, actually.

Time to yank the CM source code.

Create a working directory where you're going to sync all the sources and do the dirty stuff.
For this guide, we'll call the working directory "cm12"

Create the directory by running

Code:


mkdir cm12

enter your working directory by typing

Code:


cd cm12

Inititialize the repo by throwing in:


Code:


repo init -u git://github.com/CyanogenMod/android.git -b cm-12.0

Wait for all the activity in the terminal to cease. And then type in:


Code:


repo sync

while the stuff is downloading, grab a ginger ale, or a cup of coffee and admire your handiwork. If you're the impatient type, find a generous dose of your favourite sedative, and knock yourself out for a few hours. When you're up again, you'll be faced with one of two things. Either your repos have synced successfully (yay!), or you get some nasty fetch errors. If it's the latter, then, Voila! You've just faced your first ever compiling frustration. Take some time out and break a few things, drive the neighbours crazy and then return to the PC and knock in:


Code:


repo sync -j1

This should (hopefully) work perfectly as long as you have an internet connection worth paying for. If not, then compiling probably isn't for you anyway.

Once all the repos have been synced, you need the device specific sh*t. To do that, run:


Code:


. build/envsetup.sh && breakfast falcon

It will create the falcon local manifest. Once all the stuff has been downloaded, and the terminal returns to normal, you still have one more modification to make. You need the proprietary stuffs.

Go to the working directory, and press ctrl+h this should reveal the secret land of the .repo folder.

Double click on the folder, and you will find more folders. Go to the one named local_manifests and you'll find something called "roomservice.xml" right click on it and open it with gedit.

There, right at the bottom, before the <manifest/> past this in:


Code:


  <project name="TheMuppets/proprietary_vendor_motorola" path="vendor/motorola" remote="github" />

save the file and return to the terminal.

run another repo sync and then get the prebuilts by typing in:

Code:


repo sync
cd vendor/cm
./get-prebuilts


Then cd back to your working directory

Code:


cd ~/cm12

YOU'RE READY TO ROLL!

Finally, to build, type in:


Code:



. build/envsetup.sh && brunch falcon


If you have a really powerful PC, then use:


Code:


. build/envsetup.sh && brunch cm_falcon-userdebug -j8

And if you have a really really powerful PC, then use:

Code:


. build/envsetup.sh && brunch cm_falcon-userdebug -j16

Wait for the build to compile. Usually takes about 2-3 hours on an okay PC. You'll find your completed build in cm12/out/target/product/falcon.

The next time you want to build, run:


Code:


make clean
repo sync
. build/envsetup.sh
brunch falcon
.. and so on.


Happy Building!






 

© 2013 Mobile Probleme. All rights resevered. Designed by Templateism

Back To Top