[HTC Rezound] drhile:
HOW TO BUILD CYANOGENMOD 11 ROM FOR HTC REZOUND (VIGOR)

​

CM-11.0 was recently released and is still in beta; however, it's never too late to start. Anyone can do it and this guide will help you to build your first CM-11 ROM or maybe even your first ROM ever.

Also: If you see a mistake, please let me know. I am open to help or suggestions.

Before we dive in, let's start with the warning.

[B]* Your warranty is now void.
* We are not responsible for bricked devices, dead SD cards,
* or you getting fired because the alarm app failed. Please do
* some research if you have any concerns about features included
* in this ROM before flashing it! YOU are choosing to make these
* modifications, and if you point the finger at us for
* messing up your device, we will laugh at you.[/B]

Much of my guide will be based from the CM10.1 building guide since [MENTION=4152223]shrike1978[/MENTION] did a great job on his guide.

Build section coming soon! This is a work in progress please be patient

UPDATE: I haven't been focused on this as much as I should be and I apologize. When I get a larger solid state drive (hopefully for Christmas) and migrate my files to the new one, I'll be able to figure out which script I will use for the building section. I'm debating whether I shhould use PMEM, ION or the hybrid of the two to compile the ROM. Plesae bear with me and I'll complete this guide as soon as possible. Thank you for your patience

Preliminary Requirements:

1. A windows computer with a relatively modern CPU. It doesn't have to be 64-bit but it does have to support virtualization.

2. At least 4 GB of RAM (the more the better).

3. Time and patience. Trust me, you'll ned it.

4. An unlocked Rezound. If you're not already unlocked, view this post and get it unlocked before continuing.

Downloading, installing, and configuring VirtualBox:

Downloading:

1.) Go to https://www.virtualbox.org/wiki/Downloads and download the latest version of VirtualBox for Windows hosts. The current version as of this writing is 4.3.4.

2.) From the same website, download the latest version of the Virtual Box Extension Pack.

3.) Go to http://www.ubuntu.com/download/desktop and download the 64-bit version of Ubuntu Desktop 12.04.3 LTS. This version will be supported for at least two years and will provide a stable OS base for at least that length of time.

Install and configure VirtualBox:

1.) Run the VirtualBox installer executable you downloaded in the downloading section. Choose the default options at every prompt.

2.) During the installation, the software will ask you for permission to install drivers. Choose install when it asks.

3.) When the installation is complete, uncheck the box to start the application, then click Finish.

4.) Run the VirtualBox Extension Pack installer that you downloaded in the preliminaries, and click Install and Agree.

5.) From the VirtualBox Manager, click New

6.) Name your machine whatever you wish (Android Build Box, for example), select Linux as the type, and Ubuntu (32-bit or 64-bit) as the version. Click Next

7.) Give the machine as much memory as you can spare and click Next. I've found myself to need at least 1536MB (1.5GB) as a minimum to build with. More memory will result in a faster build time. If you intend to give the machine more than one processor, you need to give it more memory as well.

8.) On the Hard drive prompt, click Create

9.) Choose VDI and click Next

10.) Choose Dynamically allocated and click Next

11.) Give the drive at least 50GB of space and click Create. As always, more is better. 50GB will give you enough room to work on a single copy of CM11 with a little breathing room. You need more if you want to work on multiple copies.

12.) Choose your VM and click Settings

13.) Click the Advanced tab in General settings. Set Shared Clipboard to Bidirectional. This will allow you to copy and paste between the virtual machine and your Windows host.

14) If you wish to give your VM access to more than one processor, click on System, then choose the Processor tab. Select the number of processors you wish your VM to use.

15) Click OK. Your VM is now configured.

Install Ubuntu 12.04.3:

1) In the VirtualBox Manager, choose your VM and click Settings.

2) Click Storage.

3) Click Empty, underneath the IDE Controller entry.

4) On the far right, under Attributes, click the small CD icon and click "Choose a virtual CD/DVD disk file..."

5) Choose the file ubuntu-12.04.3-desktop-amd64.iso (or 32-bit equivalent) that you downloaded earlier

6) Click OK

7) Make sure your VM is selected, and click Start.

8) As it boots, confirm the messages that appear, click "Do not show this message again" if desired.

9) After a few minutes, the VM will boot to a selection screen. Choose Install Ubuntu.

10) Click Download updates while installing and Install this third party software. Click Continue.

11) Leave Erase disk and install Ubuntu checked, then click Continue. This will only erase the virtual drive.

12) Click Install Now.

13) Choose your time zone and click Continue.

14) Choose your keyboard layout and click Continue.

15) Set up your username, password, and a machine name. REMEMBER THIS PASSWORD. You will need it for authorizing certain commands, even if you enable Log in automatically. Click Continue.

16) Now sit back and relax. The installation will take a while.

17) When installation is complete, click Restart Now

18) When prompted, press Enter

19) The VM will reboot into your new Ubuntu installation.

A note about your new VM installation of Ubuntu:

This is just like any other computer and should be treated as such. It needs to be properly shut down to prevent disk corruption. To shut down the system, click the gear icon in the upper right and choose Shut down. You should also keep the system properly updated, because when it is running, it is just as accessible to the Internet as any other computer on your network, so keep the security updates installed as you are notified.

Update Ubuntu 12.04.3 and install Guest Additions:

1) Log into your system with the user you created during installation. Ignore any warnings you may get about new drivers being available. We will take care of that in a bit.

2) Click the top icon of the sidebar (Dash Home), type update, and click Update Manager.

3) Click Install Updates

4) When prompted, enter your user password.

5) When updating is complete, click Restart Now

6) After restart, log back in.

7) In the VM Window menu, click Devices, then click Install Guest Additions...

8) Click Run and enter your password when prompted.

9) After process completes, reboot by clicking the gear in the upper right corner, clicking Shut Down, and clicking Restart.

Configure your build environment

1.) Click on Dash Home, type terminal, and open the Terminal app.

2) Right click on Terminal in the sidebar and select Lock to Launcher.

3.) Retrieve the build tools:

sudo apt-get install git-core git gnupg flex bison gperf build-essential zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 libglapi-mesa:i386 libgl1-mesa-glx:i386 libgl1-mesa-dev libgl1-mesa-dri:i386 g++-multilib mingw32 openjdk-6-jdk tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386 schedtool gcc-multilib g++-multilib pngcrush g++ gcc dpkg-dev

4.) Go to the Oracle download page here, accept the terms and download the binary that looks like this: jdk-6u45-linux-x64.bin

Note: Be sure to use sudo in the right places to prevent permission issues. If you can remember where the mistake was made, use the following syntax below:

sudo chown [your user name] [file address/file name]

5.) Move, extract and unpack Java by typing the following commands in terminal:

cd ~/Downloads
sudo chmod a+x ~/Downloads/jdk-6u45-linux-x64.bin
sudo mv ~/Downloads/jdk-6u45-linux-x64.bin /usr/lib
cd /usr/lib
sudo ./jdk-6u45-linux-x64.bin

6.) Install Java by executing the following commands:

sudo mv jdk1.6.0_45/ jvm/
sudo rm jdk-6u45-linux-x64.bin
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0_45/jre/bin/java 1
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0_45/bin/javac 1
sudo update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.6.0_45/bin/jar 1
sudo update-alternatives --install /usr/bin/javadoc javadoc /usr/lib/jvm/jdk1.6.0_45/bin/javadoc 1

7.) Make Java 1.6 the default by typing the following commands individually, and selecing the jdk1.6.0_45 line in each (typically number 2):

sudo update-alternatives --config java
sudo update-alternatives --config javac
sudo update-alternatives --config jar
sudo update-alternatives --config javadoc

Create the build directories and retrieve the code:

1.) Log into your Ubuntu system and open a terminal window

2.) Create your build directories:

mkdir ~/android ~/android/bin ~/android/cm11.0-vigor

3.) Open your profile config:

gedit ~/.bashrc

4.) Insert the following into the end of your profile:

ANDROID_JAVA_HOME=/usr/lib/jvm/jdk1.6.0_45
export ANDROID_JAVA_HOME
PATH=~/android/bin:$PATH
export PATH

5.) To reload your profile, exit your terminal window and open a new one.

6.) Be sure you're in the build directory and download the repo binary:

cd ~/android/cm11.0-vigor
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/android/bin/repo
sudo chmod a+x ~/android/bin/repo

7.) Next is to grab an important script to correctly initiate the repo:

wget https://github.com/vigor/android/blob/cm-11.0/Build%20Scripts/fixrepo.sh ~/android/cm11.0-vigor
sudo chmod a+x ~/android/cm11.0-vigor/fixrepo.sh

Building the ROM

NOTE: This will take some time to finish so please be patient. I will have it up as soon as time permits.

Special thanks to:

IAmTheOneTheyCallNeo - For answering my stupid noob questions and inspiring me to get more involved in ROM building along with his GitHub.

brenuga - For helping me with the build section of the guide.

shrike1978 - For providing the guide that got me started in which most of my guide is based from.

chad0989 - For AOSP on the Rezound.

Team Vigor - For host all of the necessary coding to make CM-11 possible.

Please let me know if I forgot anyone so I can add them to the list.​