[TUT] Compile CM9 from source for the Xperia Play [UBUNTU]

Search This thread

paxChristos

Retired Forum Moderator
Aug 27, 2011
2,032
1,779
37
West Bend
I've been trying to build the latest from source, and I'm running into the issue where (after porting in the libs for CDMA) that my MEID is screwy, and com.phone.android dies from a null pointer exception when trying to reach GSM. Any Ideas?

Pax
 

cj360

Senior Member
Oct 24, 2011
1,332
709
Does the setup in the op contain the sources for cdma? It looks like it but I'm not used to ubuntu or how easy it was to setup the repos haha
 

cj360

Senior Member
Oct 24, 2011
1,332
709
edited- fixed I added this line: replace all urls starting with "git://" to "https://" to manifest.xml and that solved the errors.
 
Last edited:

cj360

Senior Member
Oct 24, 2011
1,332
709
bump- Not sure why I'm getting a "permssion denied" when I try to run envsetup.sh.
 

cj360

Senior Member
Oct 24, 2011
1,332
709
Okay, but now droping the file in terminal does nothing while "build/envsetup.sh"
returns a "bash: build/envsetup.sh: No such file or directory".
 

paxChristos

Retired Forum Moderator
Aug 27, 2011
2,032
1,779
37
West Bend
Okay, but now droping the file in terminal does nothing while "build/envsetup.sh"
returns a "bash: build/envsetup.sh: No such file or directory".

you forgot "."
it should look like
Code:
<username>@<computername>: ~/<path_to_cm9_repo>$. build/envsetup.sh
(if you haven't changed your bash setup yet)
 
Last edited:

cj360

Senior Member
Oct 24, 2011
1,332
709
Tired that first, same error. Is there something related to bash that I'm missing?
 

paxChristos

Retired Forum Moderator
Aug 27, 2011
2,032
1,779
37
West Bend
Hi
Another question, what about the kernel. Is the last kernel compiled with the last build after sync the repo, or is there another way to build the kernel separetely.

It uses a kernel image provided by freexperia. If you want to build your own kernel, Here's something I put together: http://db.tt/Zz1QxaS5

Sent from my phone, please excuse any Swypos.
 

cj360

Senior Member
Oct 24, 2011
1,332
709
Okay, fresh ubuntu install, repo synced no issues. Somthing was missing from my java installation last time. However my list for lunch doesn't have a cm_zeus-userdebug. I'm trying to compile Gummy and use the vendor from ics. If it's prebuilts I'm missing could someone just send me the ones for zeus? Unless its some huge file.
 

paxChristos

Retired Forum Moderator
Aug 27, 2011
2,032
1,779
37
West Bend
Okay, fresh ubuntu install, repo synced no issues. Somthing was missing from my java installation last time. However my list for lunch doesn't have a cm_zeus-userdebug. I'm trying to compile Gummy and use the vendor from ics. If it's prebuilts I'm missing could someone just send me the ones for zeus? Unless its some huge file.

Did you "git" ;) the device tree from koush? (hint use git ;).)

Sent from my phone, please excuse any Swypos.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 19
    Just before we start, Google says:
    Note: The source download is approximately 6GB in size. You will need 25GB free to complete a single build, and up to 90GB (or more) for a full set of builds.

    Google also test compiling on Ubuntu 10.04 LTS, but I used 10.10, 32 bit. These instructions are for Ubuntu version 10.04-11.10

    To install JDK6 (needed):
    Code:
    sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
    sudo apt-get update
    sudo apt-get install sun-java6-jdk

    FOR 64bit: You will need the required packages, so open up your terminal and enter:
    Code:
    sudo apt-get install git-core gnupg flex bison gperf build-essential \
      zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \
      x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev \
      libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \
      libxml2-utils xsltproc

    On Ubuntu 10.10:
    Code:
    sudo ln -s /usr/lib32/mesa/libGL.so.1 /usr/lib32/mesa/libGL.so

    On Ubuntu 11.10:
    Code:
    sudo apt-get install libx11-dev:i386

    FOR 32bit (what I used): You will need the required packages, so open up your terminal and enter:
    Code:
    sudo apt-get install git-core gnupg flex bison gperf build-essential \
      zip curl zlib1g-dev libc6-dev libncurses5-dev x11proto-core-dev \
      libx11-dev libreadline6-dev libgl1-mesa-dev tofrodos python-markdown \
      libxml2-utils xsltproc

    Now, onto downloading the source :)

    First of all, you need to get the google repo tool, in a terminal:
    Code:
    mkdir ~/bin
    PATH=~/bin:$PATH
    curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
    chmod a+x ~/bin/repo

    Then reboot the PC :)

    Now, we will actually initialize the repository:
    Code:
    mkdir -p ~/android/ics/
    cd ~/android/ics/
    repo init -u git://github.com/CyanogenMod/android.git -b ics

    Then enter your name and email address

    Then:
    Code:
    repo sync -j8
    if you have bad internet, use a smaller number than 8, eg. 4 or 2

    Now, wait for the repo to sync (all 6GB of it :))

    Then after that is done, you need to setup vendor and device trees for our device :)

    In the terminal again:
    Code:
    cd ~/android/ics/vendor/
    git clone https://github.com/koush/proprietary_vendor_semc.git -b ics semc

    Then:

    Code:
    cd ~/android/ics/device/
    mkdir semc
    cd semc
    git clone https://github.com/CyanogenMod/android_device_semc_msm7x30-common.git -b ics msm7x30-common
    git clone https://github.com/CyanogenMod/android_device_semc_zeus.git -b ics zeus
    git clone https://github.com/CyanogenMod/android_device_semc_zeus-common.git -b ics zeus-common

    to sync changes since last sync:
    Code:
    cd ~/android/ics/
    repo sync

    get CM props:
    Code:
    cd ~/android/ics/vendor/cm/
    ./get-prebuilts

    then to build :D :

    Setup environment:
    Code:
    cd ~/android/ics/
    . build/envsetup.sh

    then to get device list:
    Code:
    lunch

    Now, select the number that is cm_zeus-userdebug

    Now to finally build:

    Code:
    make -j4 bacon
    again, you can use a higher value than 4 if you have more cores and more ram.

    My specs:
    Intel Core 2 Duo @ 1.8GHz
    4GB RAM
    VirginMedia 50Mbps broadband

    My time:
    Time to sync: 2hours+
    Time to compile: 5+ hours, using -j16 which made my laptop VERY laggy :D

    Enjoy, run into any issues, post here please :)
    6
    Troubleshooting:
    Getting this: http://pastebin.com/Cy55wKZK ?
    FIX:
    In a file manager open up the directory: android/ics/frameworks/base/telephony/tests/ and delete the telephonytests folder :)
    this is harmless :)
    then recompile again :)
    2
    Reserved again

    Sent from my Xperia Play using Tapatalk
    2
    Hi all,

    i thought i would post here an updated tut for compiling jellybean 4.1.2 (cm10):

    First of all, the needed packages for ubuntu 12.04 or 12.10 (64 bit required!):
    Code:
    sudo apt-get install 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-glx:i386 \
      libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos \
      python-markdown libxml2-utils xsltproc zlib1g-dev:i386
    
    sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so

    Then you need to get the google repo tool, in a terminal:

    Code:
    mkdir ~/bin
    PATH=~/bin:$PATH
    curl [url]https://dl-ssl.google.com/dl/googlesource/git-repo/repo[/url] > ~/bin/repo
    chmod a+x ~/bin/repo

    Reboot the PC

    Now, we will actually initialize the repository:


    Code:
    mkdir -p ~/android/jellybean/
    cd ~/android/jellybean/
    repo init -u git://github.com/CyanogenMod/android.git -b jellybean

    Then enter your name and email address

    Then:

    Code:
    repo sync -j8

    if you have bad internet, use a smaller number than 8, eg. 4 or 2

    Now, wait for the repo to sync (all 6GB of it )

    Then after that is done, you need to setup vendor and device trees for our device

    In the terminal again:


    Code:
    cd ~/android/jellybean/vendor/
    git clone https://github.com/TheMuppets/proprietary_vendor_semc.git -b jellybean semc


    Then:


    Code:
    cd ~/android/jellybean/device/
    mkdir semc
    cd semc
    git clone https://github.com/CyanogenMod/android_device_semc_msm7x30-common.git -b jellybean msm7x30-common
    git clone https://github.com/CyanogenMod/android_device_semc_zeus.git -b jellybean zeus
    git clone https://github.com/CyanogenMod/android_device_semc_zeus-common.git -b jellybean zeus-common

    only do this if /android/jellybean/kernel/semc/msm7x30 doesn't exists:

    Code:
    cd ~/android/jellybean/
    mkdir kernel
    cd kernel
    mkdir semc
    cd semc
    git clone git://github.com/CyanogenMod/semc-kernel-msm7x30.git -b jellybean msm7x30
    to sync changes since last sync:

    Code:
    cd ~/android/jellybean/
    repo sync

    get CM props:
    Code:
    cd ~/android/jellybean/vendor/cm/
    ./get-prebuilts

    Setup environment:
    Code:
    cd ~/android/jellybean/
    . build/envsetup.sh

    then to get device list:

    Code:
    lunch

    Now, select the number that is cm_zeus-eng

    Now to finally build:
    Code:
    make -j4 otapackage
    (if you have 4gb or more ram, i would use a higer number, like -j10)
    2
    Sent you a pm with the files,
    Thanks for the make files (off to sync cm9 :p)

    Sent from my R800x using Tapatalk

    Cheers, will get CM9 zeusc vendor tree set up then too :)






    Hi keiran,

    Have you managed to compile fxp113 for me yet?

    Sorry to chase just need to know what I have to work with :p

    Sent from my R800i using XDA
    Forgot about that, will get you a download link tomorrow night if I can?

    Newest CM9 ICS change log:
    Data works brilliantly, although I never get H, just 3G
    New adreno libs are there, faster rendering and all.
    Some launcher shizz I didn't read
    New CM9 boot animation when I add it into the make files :D
    Reboot option works, unless used by ROM Manager

    I think that hw decoder will be fixed soon, because I seen something about it on CM code review, about qualcomm omx which fixes video. Not sure it is working though, but there are tons of devices all with the same problem, it will be fixed :)

    Ty,

    Keiran



    Sent from my Xperia Play using Tapatalk