vendredi 12 décembre 2014

[Guide] How to build your own Cyanogenmod 11 for d850/d851/d852/d855/vs985/ls990 topic

18:18






Now model vs985 and d850 can get official version at download.cyanogenmod.com

Support model for this method are d850/d851/d852/d855/vs985/ls990
Thank you for source code from @invisiblek (https://github.com/invisiblek)
Thank you for original thread from @Raum1807 (http://forum.xda-developers.com/nexu...od-11-t2515305)
Thank you for original manifest from @Skin1980 (https://github.com/Skin1980/local_manifests)

Overview

I. Preparation
II. Installation of the required packages
III. Installing Java
IV. The sources
V. Building the ROM
VI. Rebuilding with newest sources


I. Preparation

Things you need for building:

A computer
An internet connection
An open mind
Time
Patience

First of all, you need a running up-to-date Ubuntu/Linux system. I am using Ubuntu 14.04 64-bit.

Use the terminal to make the steps. A terminal window can be opened by pressing Ctrl+Alt+T. Every single command for the terminal is marked with a $ sign. Just paste every command (without the $ sign) to your terminal window and there shouldn't be any problem.

IMPORTANT: INSTALL EVERYTHING AS A NORMAL USER. DON'T INSTALL AS ROOT!


II. Installation of the required packages (Ubuntu 14.04 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


III. Installing Java

You need a version 6 Java Development Kit for building CM11.0. Usually, the SUN JDK 6 is recommended. But there is another way: you can use the OpenJDK 6. When you installed the required packages as described above, you will just need to configure your Java installation.

Check your Java version:

Code:


$ java -version

Verify the symlinks. Javac, Java, Javaws, Javadoc, Javah, Javap and Jar should all point to the right Java location and version:


Code:


$ ls -la /etc/alternatives/java* && ls -la /etc/alternatives/jar

If they are pointing to the wrong versions you have to change that to OpenJDK6.

Select the default Java version for your system:

Code:


$ sudo update-alternatives --config javac
$ sudo update-alternatives --config java
$ sudo update-alternatives --config javaws
$ sudo update-alternatives --config javadoc
$ sudo update-alternatives --config javah
$ sudo update-alternatives --config javap
$ sudo update-alternatives --config jar


That's it.



IV. The sources

Install repo:

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:

Code:


$ mkdir ~/cm11
$ cd ~/cm11


Initialize Repo:

Code:


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

and enter your credentials.

Download the sources:

Code:


$ repo sync

Wait until it's finished - takes some time to download the hefty 12 GB of source code!

Have a break, have a KitKat!

If the process hangs use Ctrl+C to break out of it and resume the download with another

Code:


$ repo sync

If you are running into a lot of syncing errors the reason might be that the 'repo sync' command is establishing four threads automatically. This might be too much. So try to change the command to run with one thread only by using

Code:


$ repo sync -j1

Initialize the environment

Code:


$ . build/envsetup.sh

Obtain the proprietary files:

First get two missing repositories for the Nexus 4 by running

Code:


$ breakfast <your model>

Then create a file with the name local_manifest.xml in the local_manifests directory. To see this directory, you have to press Ctrl-H in your file manager.

Use this code

Code:


$ gedit ~/cm11/.repo/local_manifests/local_manifest.xml

Please make sure you copy and paste code with your correct model
Paste the following lines to the editor

D850

Code:


<manifest>
  <!-- D850 -->
  <project path="device/lge/d850" name="invisiblek/android_device_lge_d850" remote="github" revision="cm-11.0" />
  <project path="device/lge/g3-common" name="invisiblek/android_device_lge_g3-common" remote="github" revision="cm-11.0" />
  <project path="kernel/lge/g3" name="invisiblek/android_kernel_lge_g3" remote="github" revision="cm-11.0" />
  <project path="vendor/lge" name="invisiblek/proprietary_vendor_lge" remote="github" revision="cm-11.0" />
  <!-- CyanogenMod -->
  <project path="device/qcom/common" name="CyanogenMod/android_device_qcom_common" remote="github" revision="cm-11.0" /> 
  <project path="hardware/qcom/display-caf-new" name="CyanogenMod/android_hardware_qcom_display-caf-new" remote="github" revision="cm-11.0" />
  <project path="hardware/qcom/media-caf-new" name="CyanogenMod/android_hardware_qcom_media-caf-new" remote="github" revision="cm-11.0" />
</manifest>


D851

Code:


<manifest>
  <!-- D851 -->
  <project path="device/lge/d851" name="invisiblek/android_device_lge_d851" remote="github" revision="cm-11.0" />
  <project path="device/lge/g3-common" name="invisiblek/android_device_lge_g3-common" remote="github" revision="cm-11.0" />
  <project path="kernel/lge/g3" name="invisiblek/android_kernel_lge_g3" remote="github" revision="cm-11.0" />
  <project path="vendor/lge" name="invisiblek/proprietary_vendor_lge" remote="github" revision="cm-11.0" />
  <!-- CyanogenMod -->
  <project path="device/qcom/common" name="CyanogenMod/android_device_qcom_common" remote="github" revision="cm-11.0" /> 
  <project path="hardware/qcom/display-caf-new" name="CyanogenMod/android_hardware_qcom_display-caf-new" remote="github" revision="cm-11.0" />
  <project path="hardware/qcom/media-caf-new" name="CyanogenMod/android_hardware_qcom_media-caf-new" remote="github" revision="cm-11.0" />
</manifest>


D852

Code:


<manifest>
  <!-- D852 -->
  <project path="device/lge/d851" name="invisiblek/android_device_lge_d852" remote="github" revision="cm-11.0" />
  <project path="device/lge/g3-common" name="invisiblek/android_device_lge_g3-common" remote="github" revision="cm-11.0" />
  <project path="kernel/lge/g3" name="invisiblek/android_kernel_lge_g3" remote="github" revision="cm-11.0" />
  <project path="vendor/lge" name="invisiblek/proprietary_vendor_lge" remote="github" revision="cm-11.0" />
  <!-- CyanogenMod -->
  <project path="device/qcom/common" name="CyanogenMod/android_device_qcom_common" remote="github" revision="cm-11.0" /> 
  <project path="hardware/qcom/display-caf-new" name="CyanogenMod/android_hardware_qcom_display-caf-new" remote="github" revision="cm-11.0" />
  <project path="hardware/qcom/media-caf-new" name="CyanogenMod/android_hardware_qcom_media-caf-new" remote="github" revision="cm-11.0" />
</manifest>


D855

Code:


<manifest>
  <!-- D855 -->
  <project path="device/lge/d855" name="invisiblek/android_device_lge_d855" remote="github" revision="cm-11.0" />
  <project path="device/lge/g3-common" name="invisiblek/android_device_lge_g3-common" remote="github" revision="cm-11.0" />
  <project path="kernel/lge/g3" name="invisiblek/android_kernel_lge_g3" remote="github" revision="cm-11.0" />
  <project path="vendor/lge" name="invisiblek/proprietary_vendor_lge" remote="github" revision="cm-11.0" />
  <!-- CyanogenMod -->
  <project path="device/qcom/common" name="CyanogenMod/android_device_qcom_common" remote="github" revision="cm-11.0" /> 
  <project path="hardware/qcom/display-caf-new" name="CyanogenMod/android_hardware_qcom_display-caf-new" remote="github" revision="cm-11.0" />
  <project path="hardware/qcom/media-caf-new" name="CyanogenMod/android_hardware_qcom_media-caf-new" remote="github" revision="cm-11.0" />
</manifest>


VS985

Code:


<manifest>
  <!--VS985 -->
  <project path="device/lge/vs985" name="invisiblek/android_device_lge_vs985" remote="github" revision="cm-11.0" />
  <project path="device/lge/g3-common" name="invisiblek/android_device_lge_g3-common" remote="github" revision="cm-11.0" />
  <project path="kernel/lge/g3" name="invisiblek/android_kernel_lge_g3" remote="github" revision="cm-11.0" />
  <project path="vendor/lge" name="invisiblek/proprietary_vendor_lge" remote="github" revision="cm-11.0" />
  <!-- CyanogenMod -->
  <project path="device/qcom/common" name="CyanogenMod/android_device_qcom_common" remote="github" revision="cm-11.0" /> 
  <project path="hardware/qcom/display-caf-new" name="CyanogenMod/android_hardware_qcom_display-caf-new" remote="github" revision="cm-11.0" />
  <project path="hardware/qcom/media-caf-new" name="CyanogenMod/android_hardware_qcom_media-caf-new" remote="github" revision="cm-11.0" />
</manifest>


LS990

Code:


<manifest>
  <!--LS990 -->
  <project path="device/lge/ls990" name="invisiblek/android_device_lge_ls990" remote="github" revision="cm-11.0" />
  <project path="device/lge/g3-common" name="invisiblek/android_device_lge_g3-common" remote="github" revision="cm-11.0" />
  <project path="kernel/lge/g3" name="invisiblek/android_kernel_lge_g3" remote="github" revision="cm-11.0" />
  <project path="vendor/lge" name="invisiblek/proprietary_vendor_lge" remote="github" revision="cm-11.0" />
  <!-- CyanogenMod -->
  <project path="device/qcom/common" name="CyanogenMod/android_device_qcom_common" remote="github" revision="cm-11.0" /> 
  <project path="hardware/qcom/display-caf-new" name="CyanogenMod/android_hardware_qcom_display-caf-new" remote="github" revision="cm-11.0" />
  <project path="hardware/qcom/media-caf-new" name="CyanogenMod/android_hardware_qcom_media-caf-new" remote="github" revision="cm-11.0" />
</manifest>


Save the file.

Run

Code:


$ repo sync

again to get the files needed.

Download the necessary prebuilts from cyanogenmod by running

Code:


$ cd ~/cm11/vendor/cm
$ . get-prebuilts
$ croot


And you're done!


V. Building the ROM

Now build it:

Code:


$ brunch <your model>

change <your model> to d850/d851/d852/d855/vs985/ls990
And the building process starts. Now have patience. Building takes around half an hour on fast systems and a lot more on older and slower machines.
When everything worked as it should you will find your new ROM-image in ~/cm11/out/target/product/<your model>

It is called cm-11-DATE-UNOFFICIAL-<your model>-zip.
Before you flash you need to bump it first!
you can get bump from https://github.com/CyboLabs/Open_Bump
go to /cm11/out/target/product/<your model>/
copy boot.img and open_bump in same folder and run

Code:


python open_bump.py boot.img

you will get boot_bumped.img rename it to boot.img and push into "cm-11-DATE-UNOFFICIAL-<your model>-zip"
Now You can flash it via CWM/TWRP as usual.


VI. Rebuilding with newest sources

Whenever you like to update your sources and build a new version you have to run these four simple commands:

Code:


$ cd ~/cm11
$ repo sync
$ . build/envsetup.sh
$ brunch <your model>


Compiling takes less time than it took for creating the ROM the first time because it's only building new parts while reusing old parts that haven't changed.
and don't forgot bump boot.img



Happy building!






Written by

We are Creative Blogger Theme Wavers which provides user friendly, effective and easy to use themes. Each support has free and providing HD support screen casting.

0 commentaires:

Enregistrer un commentaire

 

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

Back To Top