Thursday, April 21, 2016

[DEV] Building CyanogenMod 13 for Zenfone 5/6


Development: Building CyanogenMod 13 for Zenfone 5/6

Prerequisites: Establishing a Build Environment
  • Open a Terminal Emulator (Ctrl+Alt+T)
  • Install the latest Ubuntu updates:
    Code:

    sudo apt-get update
    sudo apt-get dist-upgrade

  • Install the Required packages by Android:
    Code:

    sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache libgl1-mesa-dev libxml2-utils xsltproc unzip maven yasm optipng openjdk-7-jdk
  • Install Repo:
    Code:

    wget http://ift.tt/1mQuHPR -O/usr/bin/repo
    chmod +x /usr/bin/repo

  • Setup Git:
    Code:

    git config --global user.name "Your Name"
    git config --global user.email "you@example.com"

  • Recommended: Reboot.
Downloading the Source:
  • Create a Working Directory:
    Code:

    mkdir -p ~/CM13
    cd ~/CM13

  • Initialize the Repository:
    Stable:
    Code:

    repo init -u git://github.com/zf5/android.git -b stable/cm-13.0-ZNH2K
    Nightly:
    Code:

    repo init -u git://github.com/zf5/android.git -b cm-13.0
  • Download the Code:
    Code:

    repo sync -c -j4
  • Optional: Setup ccache (ccache acts as a compiler cache that can be used to speed up rebuilds)
    Code:

    echo "export USE_CCACHE=1" >> ~/.bashrc
    export USE_CCACHE=1
    prebuilts/misc/linux-x86/ccache/ccache -M 50G

Applying the Patches:
  • Download the Patches
  • Extract the Patches at your working directory
  • Apply the patch files by changing the directory to where they are and using the following command:
    Code:

    patch -p1 < filename.patch
  • Example: Applying the Patch for Vibration:
    Code:

    cd frameworks/base
    patch -p1 < vibration.patch

  • (Do the same for every patch file in their respective directories)
Building the System:
  • Prepare the build environment:
    Code:

    . build/envsetup.sh
    lunch cm_T00F-user

  • Build the System:
    Code:

    make -j4
  • That's it. Your system.img is located at WORKING_DIRECTORY/out/target/product/T00F/system.img
Also check out: Development: Building a Marshmallow Kernel for Zenfone 5/6

XDA:DevDB Information
Development: Building CyanogenMod 13 for Zenfone 5/6, Tool/Utility for the Asus Zenfone 5

Contributors
dgadelha, tank0412

Version Information
Status: Stable

Created 2016-04-21
Last Updated 2016-04-21


from xda-developers http://ift.tt/1SmWVCV
via IFTTT

No comments:

Post a Comment