[GUIDE]Compile AOKP and CyanogenMod for HTC Sensation on Ubuntu (ONLY 64-bit)

Search This thread

blahbl4hblah

Inactive Recognized Developer
Oct 3, 2010
6,061
1,514
Los Angeles, CA
A few n00b things...

1. Was having trouble with 4e, but noticed it's obsolete per this post: http://xdaforums.com/showpost.php?p=24168314&postcount=623

2. Was having trouble with 5a, but found the envsetup.sh file and realized I had to be in ~/ to run that command as it is displayed.

Running the compile command a 2nd time as the first try stalled pretty quick.

Thanks for the guide. I'm running this in a VM, so I'll try to get you stats on how long it takes along with the details of my machine(s) if you're interested.

I'm glad have figured it out on your own

Sent from my HTC Sensation
 

dc13

Inactive Recognized Developer
Dec 12, 2007
1,144
873
Boise, ID
did everything in quide from top to bottom no worky for me i give up sucks!

worked fine when thread was first posted now im at a complete loss whatever!!!
 

geoffcorey

Senior Member
Apr 24, 2010
2,156
484
Hm... I keep getting an error about RomManager.apk

Code:
make: *** No rule to make target `vendor/cm/proprietary/RomManager.apk', needed by `out/target/product/pyramid/system/app/RomManager.apk'. Stop.

How do I go about getting rommanager into the nonexistent directory, and also how do I go about editing out tye requirement for rommanager?

Sent from my HTC Sensation Z710e using Tapatalk 2
 
Last edited:

dc13

Inactive Recognized Developer
Dec 12, 2007
1,144
873
Boise, ID
It's not even that hard gonestly
But if you want to give up then I guess that's it

Sent from my HTC Sensation

i just want it to compile correctly bro!

i followed the guide as a monkey could do!

it either craps out on repo or errors out saying cant access vorbeth packages

or it compiles then integer error

either way im not the only one with issues im in the US and i have people in norway with identical issues so........ not giving up it gives up on me!!!!
 

gbzbar

Senior Member
Jun 18, 2010
700
384
Hm... I keep getting an error about RomManager.apk

Code:
make: *** No rule to make target `vendor/cm/proprietary/RomManager.apk', needed by `out/target/product/pyramid/system/app/RomManager.apk'. Stop.

How do I go about getting rommanager into the nonexistent directory, and also how do I go about editing out tye requirement for rommanager?

Sent from my HTC Sensation Z710e using Tapatalk 2

You forgot to do step 4e in the OP. Type this:

Code:
~/android/system/vendor/cm/get-prebuilts

and then try again.
 

blahbl4hblah

Inactive Recognized Developer
Oct 3, 2010
6,061
1,514
Los Angeles, CA
i just want it to compile correctly bro!

i followed the guide as a monkey could do!

it either craps out on repo or errors out saying cant access vorbeth packages

or it compiles then integer error

either way im not the only one with issues im in the US and i have people in norway with identical issues so........ not giving up it gives up on me!!!!

There's always google if you find the solution in the guide

I used Google to find some errors so you should too

Sent from my HTC Sensation
 

dc13

Inactive Recognized Developer
Dec 12, 2007
1,144
873
Boise, ID
K cool cannot fetch vorbeth packages_apps_contacts/s not found!
Any ideas?

Sent from my Sensation using XDA
 
Last edited:

blahbl4hblah

Inactive Recognized Developer
Oct 3, 2010
6,061
1,514
Los Angeles, CA
I'm putting a new requirement that will be mandatory from now on

You must be willing to use Google to find errors unless it's already reported

Sent from my HTC Sensation
 
  • Like
Reactions: dc13

dc13

Inactive Recognized Developer
Dec 12, 2007
1,144
873
Boise, ID
Not sure how to access golit hubs from terminal really want to compile cm9 or aokp to many errors here in there that I cannot understand to fix maybe a willing teacher will come along even added vorbeths manifest anyways try again at a later time tgmhanks for biting your tongue blah mad respect bro!!!!

Sent from my Sensation using XDA
 

danielmid84

Senior Member
May 26, 2009
159
23
If you're having that many errors, I would start with removing the whole build directory and starting from scratch. Also if you're running 64 bit you need to do both install lines for 32 and 64.

Beyond that, I second what blah said, Google is your best friend, it helped me go from no knowledge of repo building to running a daily build completely from one script.

And don't forget, you can copy from the guide and paste into the terminal window to ensure you don't miss anything.

Sent from my HTC Sensation
 

danielmid84

Senior Member
May 26, 2009
159
23
Also, I think I'm going to add to my script to pull Vorbeth's latest local_manifest every build too, he's changed it the last few builds on me and it always gets me.

Sent from my HTC Sensation
 

Top Liked Posts

  • There are no posts matching your filters.
  • 69
    First of all, BIG BIG thanks to SparksCo for his guide for compiling CM7, I used his guide as a base for this

    Credits:
    CyanogenMod for giving their source to everyone
    SparksCo for teaching me what I know
    Vorbeth for releasing the original source for Sensation
    Elelinux for his hardwork on adding things to the device tree

    I'm making this guide for those who don't want to wait for a new CyanogenMod or AOKP build and want to build it themselves.
    Working on both ubuntu 11.10 and 12.04

    NOTE: DEPENDING ON YOUR COMPUTER'S HARDWARE, COMPILING TIME WILL BE DIFFERENT
    If you have a MAC OSX, I do not have a guide for that as I don't have one.

    Be aware for which part is for AOKP and CyanogenMod
    I have put "AOKP" and "CyanogenMod" Labels to help


    EVERYTHING THAT IS IN A BOX, OPEN TERMINAL AND ENTER THE COMMAND IN THAT SECTION

    Guide Requirements:
    - Computer
    - Common Sense
    - Some Linux Experience
    - Ubuntu 64-bit Installed
    - At least 4GB of ram with a dual core processor.


    Required Software to Install:

    For 32-bit and 64-bit System
    Code:
    sudo apt-get install git-core gnupg flex bison python rar original-awk gawk p7zip-full gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev pngcrush schedtool xsltproc

    For 64-bit System
    Code:
    sudo apt-get install g++-multilib lib32z1-dev ia32-libs lib32ncurses5-dev lib32readline-gplv2-dev gcc-multilib g++-multilib

    Other Required Software:
    Code:
    sudo apt-get install libc6-dev x11proto-core-dev libx11-dev libgl1-mesa-dev mingw32 tofrodos python-markdown libxml2-utils

    Link libx11
    Code:
    sudo ln -s /usr/lib/i386-linux-gnu/libX11.so.6 /usr/lib/i386-linux-gnu/libX11.so

    You must have a 1.6.x to compile on the ics branch of cyanogenmod.

    MUST Install Java 1.6 (NOT Java 1.7):

    1a. Download Java JDK for Linux 64-bit from Java site
    Code:
    http://www.oracle.com/technetwork/java/javase/downloads/index.html

    Be sure to download (## will change if there's an update):
    Code:
    jdk-6u##-linux-x64.bin

    1b. Move the downloaded Java JDK into your home directory

    1c. Be sure to completely remove ALL OTHER JAVA

    Don't worry if some things are asked to be installed just accept!

    Code:
    sudo apt-get purge openjdk-\* icedtea-\* icedtea6-\*

    1d. Copy Java JDK into /opt/java/64
    Code:
    sudo mkdir -p /opt/java/64/
    sudo cp jdk-6u##-linux-x64.bin /opt/java/64
    sudo su -
    cd /opt/java/64
    chmod +x jdk-6u##-linux-x64.bin
    ./jdk-6u##-linux-x64.bin
    exit

    1e. Add the needed PATH to .bashrc
    Code:
    gedit ~/.bashrc

    Add these lines to .bashrc (Better to be near the top):
    Code:
    # Java PATHs
    export JAVA_HOME=/opt/java/64/jdk1.6.0_##
    export PATH=$PATH:$JAVA_HOME/bin

    Setting Up Android SDK

    2a. Download Android SDK at http://developer.android.com/sdk/index.html

    2b. Extract it to your home folder [Ex. ~/android/sdk]

    2c. Add Android SDK Path

    gedit ~/.bashrc
    Enter the Following:
    Code:
    #Android PATH
    export PATH=$PATH:~/android/sdk
    export PATH=$PATH:~/android/sdk/platform-tools
    export PATH=$PATH:~/android/sdk/tools

    2d. Add Extra Path For Device:

    sudo gedit /etc/udev/rules.d/99-android.rules (Text Editor will open up)
    Enter this in it:
    Code:
    #Acer
    SUBSYSTEM==usb, SYSFS{idVendor}==0502, MODE=0666
    #ASUS
    SUBSYSTEM==usb, SYSFS{idVendor}==0b05, MODE=0666
    #Dell
    SUBSYSTEM==usb, SYSFS{idVendor}==413c, MODE=0666
    #Foxconn
    SUBSYSTEM==usb, SYSFS{idVendor}==0489, MODE=0666
    #Garmin-Asus
    SUBSYSTEM==usb, SYSFS{idVendor}==091E, MODE=0666
    #Google
    SUBSYSTEM==usb, SYSFS{idVendor}==18d1, MODE=0666
    #HTC
    SUBSYSTEM==usb, SYSFS{idVendor}==0bb4, MODE=0666
    #Huawei
    SUBSYSTEM==usb, SYSFS{idVendor}==12d1, MODE=0666
    #K-Touch
    SUBSYSTEM==usb, SYSFS{idVendor}==24e3, MODE=0666
    #KT Tech
    SUBSYSTEM==usb, SYSFS{idVendor}==2116, MODE=0666
    #Kyocera
    SUBSYSTEM==usb, SYSFS{idVendor}==0482, MODE=0666
    #Lenevo
    SUBSYSTEM==usb, SYSFS{idVendor}==17EF, MODE=0666
    #LG
    SUBSYSTEM==usb, SYSFS{idVendor}==1004, MODE=0666
    #Motorola
    SUBSYSTEM==usb, SYSFS{idVendor}==22b8, MODE=0666
    #NEC
    SUBSYSTEM==usb, SYSFS{idVendor}==0409, MODE=0666
    #Nook
    SUBSYSTEM==usb, SYSFS{idVendor}==2080, MODE=0666
    #Nvidia
    SUBSYSTEM==usb, SYSFS{idVendor}==0955, MODE=0666
    #OTGV
    SUBSYSTEM==usb, SYSFS{idVendor}==2257, MODE=0666
    #Pantech
    SUBSYSTEM==usb, SYSFS{idVendor}==10A9, MODE=0666
    #Philips
    SUBSYSTEM==usb, SYSFS{idVendor}==0471, MODE=0666
    #PMC-Sierra
    SUBSYSTEM==usb, SYSFS{idVendor}==04da, MODE=0666
    #Qualcomm
    SUBSYSTEM==usb, SYSFS{idVendor}==05c6, MODE=0666
    #SK Telesys
    SUBSYSTEM==usb, SYSFS{idVendor}==1f53, MODE=0666
    #Samsung
    SUBSYSTEM==usb, SYSFS{idVendor}==04e8, MODE=0666
    #Sharp
    SUBSYSTEM==usb, SYSFS{idVendor}==04dd, MODE=0666
    #Sony Ericsson
    SUBSYSTEM==usb, SYSFS{idVendor}==0fce, MODE=0666
    #Toshiba
    SUBSYSTEM==usb, SYSFS{idVendor}==0930, MODE=0666
    #ZTE
    SUBSYSTEM==usb, SYSFS{idVendor}==19D2, MODE=0666
    
    
    SUBSYSTEM=="usb", ATTRS{idVendor}=="####:####", SYMLINK+="android_adb", MODE="0666" GROUP="plugdev"
    TEST=="/var/run/ConsoleKit/database", \
    RUN+="udev-acl --action=$env{action} --device=$env{DEVNAME}"

    After this, close it and then enter:
    Code:
    sudo chmod +x /etc/udev/rules.d/99-android.rules

    If your using ANY AOSP rom like AOKP or CM9 and CM10
    Go into developer options and go to root access and change it from "Apps only" to Apps and ADB"

    2e. Install Certain Android SDK Tools

    Type:
    Code:
    android
    Check Android SDK Tools and Android SDK platform-tools and Install them

    Setting Up the .bashrc file

    gedit ~/.bashrc
    Enter the Following:
    Code:
    #Android PATH
    export PATH=$PATH:~/android/sdk
    export PATH=$PATH:~/android/sdk/platform-tools
    export PATH=$PATH:~/android/sdk/tools
    
    #Java PATH
    export JAVA_HOME=/opt/java/64/jdk1.6.0_32
    export PATH=$PATH:$JAVA_HOME/bin

    3b. After your done setting this up, close .bashrc file.

    Setup Workplace

    4a. Download CyanogenMod 9 Source
    Code:
    mkdir -p ~/bin
    mkdir -p ~/android/system
    curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
    chmod a+x ~/bin/repo (Reboot your computer after this)

    4b. Add Repo Path

    gedit ~/.bashrc

    Enter the following:
    Code:
    export PATH=$PATH:~/bin

    4c. Setup Necessary Source

    For CyanogenMod 9
    Code:
    cd ~/android/system
    repo init -u git://github.com/CyanogenMod/android.git -b ics

    For CyanogenMod 10
    Code:
    cd ~/android/system
    repo init -u git://github.com/CyanogenMod/android.git -b jellybean

    4d. Download Necessary Source
    Code:
    repo sync

    4e. Download Extra Needed Files
    Code:
    ~/android/system/vendor/cm/get-prebuilts

    Your Final .bashrc

    It SHOULD Look Something Like This:
    Code:
    #Android PATH
    export PATH=$PATH:~/android/sdk
    export PATH=$PATH:~/android/sdk/platform-tools
    export PATH=$PATH:~/android/sdk/tools
    export PATH=$PATH:~/bin
    
    #Java PATH
    export JAVA_HOME=/opt/java/64/jdk1.6.0_##
    export PATH=$PATH:$JAVA_HOME/bin

    Building CyanogenMod
    Code:
    . build/envsetup.sh; lunch cm_pyramid-userdebug; mka bacon

    Making a New Build

    Go inside to your source folder and delete the 'out' folder

    THEN Do This:
    Code:
    repo sync

    Code:
    . build/envsetup.sh; lunch cm_pyramid-userdebug; mka bacon
    16
    Compile AOKP Section

    Be sure to follow the steps from the above post and ONLY use this instead of the part called 4c. Setup Necessary Source

    FOR AOKP (ICS Version)
    Code:
    cd ~/android/system
    repo init -u https://github.com/AOKP/platform_manifest.git -b ics

    Temporary fix to build:
    Code:
    install -d prebuilt/android-arm/kernel

    Then do:
    Code:
    curl -o prebuilt/android-arm/kernel/LINUX_KERNEL_COPYING -O https://raw.github.com/ezterry/kernel-biff-testing/ezgb-2636/COPYING

    FOR AOKP (JELLYBEAN Version)
    Code:
    cd ~/android/system
    repo init -u https://github.com/AOKP/platform_manifest.git -b jb

    5b. Building AOKP
    Code:
    . build/envsetup.sh; lunch aokp_pyramid-userdebug; mka bacon
    11
    Reference

    This section is to help those who may look for answers

    Basic Linux Commands
    http://ss64.com/bash/

    CyanogenMod Wiki
    http://wiki.cyanogenmod.com/wiki/Main_Page

    Difference between breakfast, brunch and lunch
    http://synrgi.wordpress.com/2011/09/16/breakfast-brunch-and-lunch/

    Installing Android SDK
    http://developer.android.com/sdk/installing.html
    4
    Added it to the OP, sorry it took forever
    Can you also add my page with nightlies to the OP?