Build CM10.2 for Quincyatt from Source

It's just taking too much time to figure out the steps.. It'll be good to record what I have done in case I forget it..

System Spec

  • Ubuntu, eight-core, i7-2600 3.4GHz
  • Samsung Galaxy Note (quincyatt)

Preparations

For environment setup:

sudo apt-get install openjdk-7-jdk
sudo apt-get install python
sudo apt-get install git-core
sudo apt-get install gnupg flex bison gperf \
  build-essential zip curl zlib1g-dev libc6-dev \
  lib32ncurses5-dev ia32-libs x11proto-core-dev \
  libx11-dev lib32readline5-dev lib32z-dev \
  libgl1-mesa-dev g++-multilib mingw32 tofrodos \
  python-markdown libxml2-utils

For Android SDK:

Download and install SDK following the instruction here

Setup PATH like PATH=${PATH}:~/android-sdk/tools.

export PATH=${PATH}:~/android-sdk/tools
export PATH=${PATH}:~/android-sdk/platform-tools
export PATH=${PATH}:~/bin

Configure USB

gksudo gedit /etc/udev/rules.d/51-android.rules

And then

#Acer
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666"
#ASUS
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666"
#Dell
SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0666"
#Foxconn
SUBSYSTEM=="usb", ATTR{idVendor}=="0489", MODE="0666"
#Garmin-Asus
SUBSYSTEM=="usb", ATTR{idVendor}=="091E", MODE="0666"
#Google
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666"
#HTC
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666"
#Huawei
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666"
#K-Touch
SUBSYSTEM=="usb", ATTR{idVendor}=="24e3", MODE="0666"
#KT Tech
SUBSYSTEM=="usb", ATTR{idVendor}=="2116", MODE="0666"
#Kyocera
SUBSYSTEM=="usb", ATTR{idVendor}=="0482", MODE="0666"
#Lenevo
SUBSYSTEM=="usb", ATTR{idVendor}=="17EF", MODE="0666"
#LG
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666"
#Motorola
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666"
#NEC
SUBSYSTEM=="usb", ATTR{idVendor}=="0409", MODE="0666"
#Nook
SUBSYSTEM=="usb", ATTR{idVendor}=="2080", MODE="0666"
#Nvidia
SUBSYSTEM=="usb", ATTR{idVendor}=="0955", MODE="0666"
#OTGV
SUBSYSTEM=="usb", ATTR{idVendor}=="2257", MODE="0666"
#Pantech
SUBSYSTEM=="usb", ATTR{idVendor}=="10A9", MODE="0666"
#Philips
SUBSYSTEM=="usb", ATTR{idVendor}=="0471", MODE="0666"
#PMC-Sierra
SUBSYSTEM=="usb", ATTR{idVendor}=="04da", MODE="0666"
#Qualcomm
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0666"
#SK Telesys
SUBSYSTEM=="usb", ATTR{idVendor}=="1f53", MODE="0666"
#Samsung
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666"
#Sharp
SUBSYSTEM=="usb", ATTR{idVendor}=="04dd", MODE="0666"
#Sony Ericsson
SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0666"
#Toshiba
SUBSYSTEM=="usb", ATTR{idVendor}=="0930", MODE="0666"
#ZTE
SUBSYSTEM=="usb", ATTR{idVendor}=="19D2", MODE="0666"

Setup permission:

sudo chmod a+r /etc/udev/rules.d/51-android.rules

Install repo:

mkdir ~/bin
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo

Then download the built CM10.1 from Cyanogenmod. Extract it to some folder like ~/quincyattFromCM

Main

Steps

mkdir ~/cm102
cd ~/cm102
repo init -u git://github.com/CyanogenMod/android.git -b cm-10.2
mkdir -p ./.repo/local_manifests/
cd ./.repo/local_manifests/
vim roomservice.xml

And paste the following:

 <?xml version="1.0" encoding="UTF-8"?>
<manifest>
  <project name="CyanogenMod/android_device_samsung_msm8660-common" path="device/samsung/msm8660-common" remote="github" revision="cm-10.2" />
  <project name="CyanogenMod/android_device_samsung_quincyatt" path="device/samsung/quincyatt" remote="github" revision="cm-10.2" />
  <project name="CyanogenMod/android_device_samsung_qcom-common" path="device/samsung/qcom-common" remote="github" revision="cm-10.2" />
  <project name="CyanogenMod/android_device_samsung_quincy-common" path="device/samsung/quincy-common" remote="github" revision="cm-10.2" />
  <project name="CyanogenMod/android_kernel_samsung_msm8660-common" path="kernel/samsung/msm8660-common" remote="github" revision="cm-10.2"  />
  <project name="TheMuppets/proprietary_vendor_samsung" path="vendor/samsung" remote="github" revision="cm-10.2" />
</manifest>

And save and exit.

cd ~/cm102
repo sync -j16
. build/envsetup.sh
vendor/cm/get-prebuilts
repo sync -j16
cd ~/cm102/device/samsung/quincyatt
./extract-files.sh ~/quincyattFromCM
export USE_CCACHE=1
export CCACHE_DIR=~/.ccache (default)
prebuilts/misc/linux-x86/ccache/ccache -M 50G
brunch quincyatt -j7

Done!

Leave a Reply

Your email address will not be published. Required fields are marked *