How to compile CyanogenMod for Maguro (GSM Galaxy Nexus).
This how-to was written for Ubuntu 12.04 for Maguro running CyanogenMod 9.x (Ice Cream Sandwich), on 12 April 2012.
Contents[hide] |
Prepare the Build Environment
- NOTE: These steps only need to be performed once. If the build environment is already prepared, skip to Copy proprietary files.
Install the ADB
- Install the Android SDK.
Install the Build Packages
Install using preferred package manager:
For 64-bit systems:
-
git-core gnupg flex bison gperf build-essential zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-dev:i386 g++-multilib mingw32 openjdk-6-jdk pngcrush schedtool tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386
Create the Directories
You will need to set up some directories in your build environment.
To create them:
-
mkdir -p ~/bin -
mkdir -p ~/android/system
Install the Repository
Enter the following to download make executable the "repo" binary:
-
curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo -
chmod a+x ~/bin/repo- NOTE: You may need to reboot for these changes to take effect.
Now enter the following to initialize the repository:
-
cd ~/android/system/ -
repo init -u git://github.com/CyanogenMod/android.git -b ics -
repo sync -j16
Sync Relevant Repositories
- NOTE: This only needs to be done the first time after installing the repository. If you have already done this step, you may skip to Copy Proprietary Files.
By default, CyanogenMod 9 only syncs the core android repositories and none of the device or kernel trees to save both bandwidth and time. Run the following command to sync the necessary components for the device:
-
. build/envsetup.sh && brunch maguro
Copy Proprietary Files
- NOTE: This only needs to be done the first time you build. If you have already done these steps, you may skip to Download Prebuilts.
You will need to have a maguro with a working copy of CyanogenMod install and ADB working on the computer. This script will copy the proprietary files from the device.
Connect the device to the computer and ensure that ADB is working properly.
-
cd ~/android/system/device/samsung/maguro/ -
./extract-files.sh- NOTE: If some hardware isn't functioning properly, you may need to run the above command again for updated proprietary files.
Download Prebuilts
Download Prebuilts needed by the build:
-
~/android/system/vendor/cm/get-prebuilts
Building CyanogenMod
Check for updates
First, check for updates in the source:
-
cd ~/android/system/ -
repo sync
Configure Build & Compile
Now, the environment must be configured to build and the ROM compiled, from code, for the maguro.
-
. build/envsetup.sh && brunch maguro
Install
- Copy your .zip file from ~/android/system/out/target/product/maguro/update.cm-XXXXX-signed.zip to the root of the SD card.
- Optional: Download Google Apps for CyanogenMod 9 and place it on the root of the SD card.
- Flash both of these .zip files from recovery.
本文档详细介绍了如何在Ubuntu 12.04环境下为GSM Galaxy Nexus (Maguro)编译CyanogenMod 9.x (Ice Cream Sandwich)。内容包括设置构建环境、同步相关仓库、复制专有文件等步骤。
2万+

被折叠的 条评论
为什么被折叠?



