How to compile CyanogenMod for the Cliq/Dext from source
  • ngiordanongiordano June 2011

    This is pulled from the CyanogenMod site and modified to build for the Cliq/Dext

    Prepare the Build Environment
    NOTE: You only need to do these steps the first time you build. If you previously prepared your build environment, skip to Copy proprietary files

    Install the ADB

    Install the Android SDK.

    Install the Build Packages
    Install using the package manager of your choice:

    For 32-bit & 64-bit systems:

    sudo apt-get install 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

    For 64-bit only systems:

    sudo apt-get install g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib

    NOTE: gcc-4.3-multilib g++-4.3-multilib is no longer available for Ubuntu 11.04 64-bit, but should still build without issue.
    NOTE: On Ubuntu 10.10, and variants, you need to enable the parter repository to install sun-java6-jdk:

    add-apt-repository "deb http://archive.canonical.com/ maverick partner"

    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 gingerbread
    repo sync -j16

    Copy proprietary files
    NOTE: This only needs done the first time you build. If you have already done these steps, you may skip to Download RomManager.
    You will need to have a Morrison 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/motorola/morrison/
    ./extract-files.sh

    NOTE: If some hardware isn't working, like camcorder or FM radio, you will need to find the updated prop blobs.

    Download RomManager
    NOTE: This only needs to be done when an update to RomManager is released. If you are-up-to date, you may skip to Building CyanogenMod.
    Download RomManager which is needed by the build:

    ~/android/system/vendor/cyanogen/get-rommanager

    Building CyanogenMod
    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 Morrison.

    . build/envsetup.sh && brunch morrison

    Install
    Copy your .zip file from ~/android/system/out/target/product/morrison/update.cm-XXXXX-signed.zip to the root of the SD card.
    Optional: Download Google Apps for CyanogenMod 7 and place it on the root of the SD card.
    Flash both of these .zip files from recovery.

  • ngiordanongiordano June 2011

    Want to try something fun!
    For a generic Android build:

    . build/envsetup.sh
    lunch generic_morrison-eng
    make -j2 bacon

    The -j2 is assuming you have a dual core processor...get it?
    With this configuration, you will produce a generic Android OS. No CM apps. 
    To remove Cyanogen settings from settings:
    Navigate to ~/android/system/packages/apps/Settings/res/xml/settings.xml
    Remove:

    <!-- CM Settings -->
            <com.android.settings.IconPreferenceScreen
                settings:icon="@drawable/ic_cyanogenmod"
                android:title="@string/cm_settings_title">
                <intent
                    android:action="android.intent.action.MAIN"
                    android:targetPackage="com.cyanogenmod.cmparts"
                    android:targetClass="com.cyanogenmod.cmparts.activities.MainActivity" />
            </com.android.settings.IconPreferenceScreen>

    I hope you guys have fun with this. Let's grow our team!

  • JassyCliqJassyCliq June 2011

    Oooooooo I wish we had one of these when we first started ;) lol

  • wskwsk June 2011

    Many thanks to ngiordano & JassyCliq

    Tips: if you flashed cm4morrison and there is not  libloc_api.so in /system/lib, so copy it from 2.1 ROM, then you can comlipe without Interrupt.

  • ngiordanongiordano June 2011

    libloc_api.so is converted to make gps.msm7k.so in /system/lib/hw. The pull was intended to be from a 2.1 official ROM but it will work fine if you pull the libloc_api.so and add it manually. If not you will get an error.

  • JassyCliqJassyCliq June 2011

    @ngirodano the -j2 deal if I remember correctly you double the number of cores. I usually use -j2 or nothing at all, where as most would use -j4, that's iirc =)

  • ngiordanongiordano June 2011

    That's what I thought but I was told I was wrong. I tried it both ways with little difference

  • JassyCliqJassyCliq June 2011

    Yeah I feel no diffrence but I thought it was because I was on a single core and therefore it couldnt force any other cores to do the compiling instead of multi-tasking. Idk :/

  • If you read at android dev site, it says "make -jn, with n being the amount of cpu cores you have available". So yes you can try to cheat and say make -j4, but its not going to make it any faster, and your putting extra strain on your pc.

  • ngiordanongiordano June 2011

    OK someone buld an AOSP ROM. I posted how to remove Cyanogen Settings from settings. I have my hands full with the CM build :-)

  • jesuddhajesuddha June 2011

    i decided im gonna take a crack and try my hand at build this.....lol give me time and if i have any questions your gonna be the first person i come to about this....lol wish me luck

  • ngiordanongiordano June 2011

    LOL

  • jaydubjaydub June 2011

    for a 64bit ubuntu 11.04 do i need to build gcc-4.3-multilib g++-4.3-multilib from source? and if so how? thank you

  • ngiordanongiordano June 2011

    NOTE: gcc-4.3-multilib g++-4.3-multilib is no longer available for Ubuntu 11.04 64-bit, but should still build without issue.


    LOLZ! First post

  • jaydubjaydub June 2011

    I am sorry I did read it but was confused. Does it mean the ROM will still build without it, or that you could still build those packages even though they are no longer available? sorry if its a dumb question I am still learning but very eager.

  • ngiordanongiordano June 2011

    You should be able to build without them. I upgraded b ut I believe they are not on my system anymore and I build fine.

    Oh and it's ok. I'm just having fun with you. I'm happy others are trying to build now. Actually I'm glad it's developed enough for people to be interested. It's really cool when you find fixes and make it better. If you find something useful let me know ok?

  • jaydubjaydub June 2011

    Thank you so much. This is the whole reason I bought a computer to learn how to build ROMS and mod my phone. I have set up my environment and am going to get started right now.

  • ngiordanongiordano June 2011

    :-D

  • jaydubjaydub June 2011

    when I enter make -j2 bacon I get

    make: *** No rule to make target `bacon'.  Stop.
    any ideas

  • jaydubjaydub June 2011

    nevermind
    :-D

  • JassyCliqJassyCliq June 2011

    I'm guessing its still building ;P

  • jaydubjaydub June 2011

    I did the build once but then I cant find it. Trying again maybe I did something wrong

  • jaydubjaydub June 2011

    I see a lot of warnings flying by is that normal?

  • JassyCliqJassyCliq June 2011

    Very lol

  • jaydubjaydub June 2011

    so after 'make -j2 bacon' where do I find the ROM?

    :-?

  • ngiordanongiordano June 2011

    Sorry I just woke up. It gives you the directory ~/android/system/out/target/product/morrison

  • jaydubjaydub June 2011

    Help please
    device/motorola/morrison/libaudio/Android.mk:5: Enabling QCOM audio HW
    find: `out/target/common/docs/gen': No such file or directory
    find: `out/target/common/docs/gen': No such file or directory
    find: `out/target/common/docs/gen': No such file or directory
    find: `out/target/common/docs/gen': No such file or directory
    find: `out/target/common/docs/gen': No such file or directory
    build/core/Makefile:21: warning: overriding commands for target `out/target/product/morrison/system/usr/keychars/qwerty.kcm.bin'

  • JassyCliqJassyCliq June 2011

    Idk much about rom errors but for next time I would recommend using pastebin =)

  • ngiordanongiordano June 2011

    It's looking like a permission issue. Try:
    cd ~/android/system
    chmod -R 744 *

  • jaydubjaydub June 2011

    when I run 'repo sync -16' it says fetching projects but a lot of them don't go to 100% is this normal?
     

  • jaydubjaydub June 2011

    @JassyCliq Thank you I have made an account at paste bin.

Hey are you new here?!

Welcome to the best Ad-Free Android Community around! Create your profile, and start posting now! New features are being added all the time!

Login with Facebook Sign In with OpenID Sign In with Google Sign In with Twitter

Sign In! Sign Up!

Categories

In this Discussion

Tagged