Android rom research-download and compile cyanogenmod source code

Source: Internet
Author: User

Downloading cm source code is actually similar to downloading Google's pure Android source code. below is the official cm website. You need to download the ROM corresponding to your mobile phone and put it in the sdcard root directory, just in case.

Http://www.cyanogenmod.com/

 

Next I will introduce another website: http://forum.xda-developers.com/index.php

This is an xda developer forum, where experts like cloud will help you

 

Now let's start to show you how to download the source code, compile the source code, and fl it to your mobile phone.

 

1. install required software

I use Ubuntu 11.04.

Sudo apt-Get install <Software List>

The following is the Software List:

 

Java code
  1. Git-core GnuPG flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-Tools Build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool

NOTE: If JDK cannot be installed, you can download it by yourself or refer to my blog:

Http://hualang.iteye.com/blog/1132207

 

2. Create a directory

Mkdir-P ~ /Cyanogenmod

Used to store the downloaded source code

 

3. start downloading

 

 

Java code
  1. curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo

  2. Chmod A + x ~ /Bin/Repo

Download cyanogenmod source code with the downloaded Repo

 

 

Java code
  1. Repo init-u git: // github.com/cyanogenmod/android.git-B gingerbread
  2. Repo sync-j16

The repo sync process is quite slow. Using repo sync-JN, N indicates the number of network connections opened at the same time. Enabling multiple network connections for download will increase the speed.

 

4. Compile the source code below

First, you need to debug the USB of your mobile phone and connect it to your computer.

 

 

Java code
  1. Cd ~ /Cyanogenmod/device/Samsung/Crespo
  2. /Extract-files.sh

Then

 

Java code
  1. Cd ~ /Cyanogenmod/vendor/cyanogen
  2. ./Get-rommanager
Java code
  1. ./Extract-Google-Files

5. Copy an object with the same name.

 

Java code
  1. CP ~ /Cyanogenmod/vendor/cyanogen/products/cyanogen_crespo.mk ~ /Cyanogenmod/buildspec. mk

6. Run the script in the cyanogenmod root directory and configure the variables.

 

Java code
  1. . Build/envsetup. Sh
  2. Or
  3. Source build/envsetup. Sh

7. Click "lunch" and select the version you want to compile.

 

Java code
  1. Lunch cyanogen_crespo-eng
  2. Or
  3. Lunch
  4. This will show options, select the option you want to compile

8. Start Compilation

 

Java code
  1. Make-J4 cyanogen_with_google = true otapackage

9. Execute

 

Java code
  1. ./Vendor/cyanogen/tools/squisher

 

In this case ~ There is an update zip package under/cyanogenmod/out/target/product/Crespo, which is generated by your compilation.

You can brush it to your cell phone.

In fact, one advantage of CM is that you do not need to compile the kernel source code and generate a zip package directly, saving the trouble of creating a zip package.

 

If you do not have a mobile phone, you can use a simulator to test it. Copy zimage in the kernel/cm-kernel/ARCH/ARM/boot directory to a folder. Note that, you have to install the SDK and download a fastboot tool.

 

Java code
  1. ADB reboot bootloader
  2. ./Fastboot boot zimage

Then, we will wait to see the effect.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.